]> git.hungrycats.org Git - linux/log
linux
21 years agoMerge bk://bart.bkbits.net/ide-2.6
Linus Torvalds [Wed, 20 Oct 2004 10:08:10 +0000 (03:08 -0700)]
Merge bk://bart.bkbits.net/ide-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

21 years ago[ide] unify PIO code
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 21:10:23 +0000 (23:10 +0200)]
[ide] unify PIO code

Use PIO code from ide-taskfile.c in ide-disk.c so:
* drive status is checked after PIO read
* request is failed if invalid data phase
  is detected during PIO write

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[ide] ide-disk: unify PIO write/multiwrite code
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 21:05:20 +0000 (23:05 +0200)]
[ide] ide-disk: unify PIO write/multiwrite code

Merge multwrite_intr() into write_intr().

The only change in functionality is that rq->errors is
now also cleared for multiwrite PIO (if there is no error).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[ide] sg PIO for fs requests
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 20:52:39 +0000 (22:52 +0200)]
[ide] sg PIO for fs requests

Convert CONFIG_IDE_TASKFILE_IO=n code
to use scatterlists for PIO transfers.

Fixes longstanding 'data integrity on error'
issue and makes barriers work with PIO.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[ide] sg PIO for taskfile requests
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 20:48:28 +0000 (22:48 +0200)]
[ide] sg PIO for taskfile requests

Use scatterlists for taskfile based PIO transfers
instead of directly walking rq->[bio,cbio] lists.

If CONFIG_IDE_TASKFILE_IO is defined
this code will be used for fs requests.

ide_pio_sector() is based on ata_pio_sector()
from libata-core.c so kudos to Jeff.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[ide] always allocate hwif->sg_table
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 19:08:34 +0000 (21:08 +0200)]
[ide] always allocate hwif->sg_table

Allocate hwif->sg_table in hwif_init() so it can also be used for PIO.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[ide] pmac: use more ide_hwif_t fields
Bartlomiej Zolnierkiewicz [Wed, 20 Oct 2004 19:02:39 +0000 (21:02 +0200)]
[ide] pmac: use more ide_hwif_t fields

Use dmatable_dma, sg_table, sg_nents and sg_dma_direction fields
of ide_hwif_t and remove their equivalents from pmac_ide_hwif_t.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 years ago[PATCH] i2o: missing bits from merge
Andrew Morton [Wed, 20 Oct 2004 10:05:52 +0000 (03:05 -0700)]
[PATCH] i2o: missing bits from merge

A couple of functions got themselves lost.

cc: <Markus.Lidel@shadowconnect.com>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] v4l: missing bits
Andrew Morton [Wed, 20 Oct 2004 10:05:35 +0000 (03:05 -0700)]
[PATCH] v4l: missing bits

Missing parts of the v4l update

Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years agoMerge http://linux-watchdog.bkbits.net/linux-2.6-watchdog
Linus Torvalds [Wed, 20 Oct 2004 10:04:34 +0000 (03:04 -0700)]
Merge http://linux-watchdog.bkbits.net/linux-2.6-watchdog
into ppc970.osdl.org:/home/torvalds/v2.6/linux

21 years agoMerge bk://bk.arm.linux.org.uk/linux-2.6-rmk
Linus Torvalds [Wed, 20 Oct 2004 09:43:55 +0000 (02:43 -0700)]
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux

21 years ago[ARM] Add seqlocking to timers.
Russell King [Wed, 20 Oct 2004 21:34:23 +0000 (22:34 +0100)]
[ARM] Add seqlocking to timers.

Sometimes, it's useful to have locking.  Especially when we're
talking about time keeping.

It would appear that shemminger's patch of 5th February 2003
completely missed updating _ANY_ ARM timer implementations and,
because linux-arch didn't exist at the time, there appears to
have been no notification to any architecture developer that
maybe, just maybe, some work was required.

One wonders how many other changes are in the kernel which
architecture maintainers have missed.

21 years ago[ARM] Export find_{first,next}_bit_{l,b}e
Russell King [Wed, 20 Oct 2004 15:57:54 +0000 (16:57 +0100)]
[ARM] Export find_{first,next}_bit_{l,b}e

21 years ago[ARM] Cleanup some quirks.
Russell King [Wed, 20 Oct 2004 15:47:09 +0000 (16:47 +0100)]
[ARM] Cleanup some quirks.

- Ensure FIQs are enabled when cpu_idle() is called.
- Remove unused members of irq_cpustat_t.
- Remove unnecessary #ifndef CONFIG_SMP...#endif around irq_exit()
  macro.
- Rename __stf/__clf such that it stresses that they affect only
  local state (as per local_irq_xxx).
- Move THREAD_SIZE such that it can be used in current_thread_info()

21 years agoMerge bk://kernel.bkbits.net/davem/sparc-2.6
Linus Torvalds [Wed, 20 Oct 2004 03:02:44 +0000 (20:02 -0700)]
Merge bk://kernel.bkbits.net/davem/sparc-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

21 years agoMerge bk://kernel.bkbits.net/davem/net-2.6
Linus Torvalds [Wed, 20 Oct 2004 03:00:37 +0000 (20:00 -0700)]
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

21 years ago[PATCH] typhoon build fix
Andrew Morton [Wed, 20 Oct 2004 01:46:19 +0000 (18:46 -0700)]
[PATCH] typhoon build fix

Fix incorrect attempt to doubly-initialise the ethtool ops.

Cc: <jgarzik@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] doc: scsihosts parameter no longer exists
Phil Oester [Wed, 20 Oct 2004 01:46:04 +0000 (18:46 -0700)]
[PATCH] doc: scsihosts parameter no longer exists

The scsihosts boot parameter was removed in 2.5.73, but references to it
still exist in docs.  Cleanup below.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] ext3 directio block leak fix
Stephen C. Tweedie [Wed, 20 Oct 2004 01:45:49 +0000 (18:45 -0700)]
[PATCH] ext3 directio block leak fix

The orphan list holds inodes that need to be truncated on recovery.  In the
O_DIRECT case, it's used if we extend the inode --- the truncate on recovery
means we'll recover the newly-allocated disk blocks if we crash after the IO
starts but before i_size is updated on disk.

Now, the orphan list is *also* used to delete inodes that are unlinked but
still-open.  Those get truncated but also deleted on recovery.

The orphan list is held both in memory and on disk.  So the rules are that the
inode can't be reclaimed while on the orphan list.  There are only two cases
--- either the inode is actively being written(O_DIRECT) or truncated (in
which case the inode is by definition not going to be reused), or it's
unlinked but still open (again, non-reclaimable).

But in the case where you're truncating or write(O_DIRECT)ing a file that is
*ALSO* unlinked, there's a problem --- the final unlink would put the inode on
the orphan list, but the write/truncate would try to add/remove it.  End
result is that the inode disappears from the orphan list while it's still
unlinked-but-in-use.

That's just a leak-on-crash, it's not going to be detectable in normal use.
But it's still a bug, and the way we fix it is for direct-IO and truncate not
to do the ext3_orphan_del if the file is unlinked (ie.  i_nlink==0).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: add the new lock manager callbacks to the documentation
William A. Adamson [Wed, 20 Oct 2004 01:45:34 +0000 (18:45 -0700)]
[PATCH] nfs4 lease: add the new lock manager callbacks to the documentation

Add the new lock manager callbacks to the documentation

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: export remove_lease
William A. Adamson [Wed, 20 Oct 2004 01:45:19 +0000 (18:45 -0700)]
[PATCH] nfs4 lease: export remove_lease

Export remove_lease(), an interface to time_out_leases() with an
fl_break_time in the past.  needed by nfsd

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: export setlease
William A. Adamson [Wed, 20 Oct 2004 01:45:03 +0000 (18:45 -0700)]
[PATCH] nfs4 lease: export setlease

Export setlease(), a direct interface to __setlease() used by nfsd

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: use the inode i_writecount
William A. Adamson [Wed, 20 Oct 2004 01:44:48 +0000 (18:44 -0700)]
[PATCH] nfs4 lease: use the inode i_writecount

Use the inode i_writecount to test for handing out a F_RDLCK lease.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: separate the lease processsing code
William A. Adamson [Wed, 20 Oct 2004 01:44:33 +0000 (18:44 -0700)]
[PATCH] nfs4 lease: separate the lease processsing code

nfsd will not have a file descriptor, nor an owner on the filp.  nfsd also
will not use signals.  Seperate the lease processsing coe from
fcntl_setlease() into a __setlease() call.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: move the f_delown processing
William A. Adamson [Wed, 20 Oct 2004 01:44:22 +0000 (18:44 -0700)]
[PATCH] nfs4 lease: move the f_delown processing

Move the f_delown processing from lease_modify() into a new default lock
manager fl_release_private callback.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: aeparate the lease initialization code
William A. Adamson [Wed, 20 Oct 2004 01:44:07 +0000 (18:44 -0700)]
[PATCH] nfs4 lease: aeparate the lease initialization code

Separate the lease initialization code from lease_alloc().  set the default
lock manager ops.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: add a lock manager break callback
William A. Adamson [Wed, 20 Oct 2004 01:43:51 +0000 (18:43 -0700)]
[PATCH] nfs4 lease: add a lock manager break callback

- Add a lock manager break callback to break_lease() for lock managers to
  initiate breaking a lease.

- Move the break_lease() kill_fasync() call to a default lock manager
  fl_break callback

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: add a lock manager release private callback
William A. Adamson [Wed, 20 Oct 2004 01:43:39 +0000 (18:43 -0700)]
[PATCH] nfs4 lease: add a lock manager release private callback

Add a lock manager release private callback to locks_free_lock() for lock
manger lease clean-up.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfs4 lease: add a lock manager copy lock callback
William A. Adamson [Wed, 20 Oct 2004 01:43:24 +0000 (18:43 -0700)]
[PATCH] nfs4 lease: add a lock manager copy lock callback

The following patches provide an interface to the lease subsystem in the
current VFS locking code.  NFSv4 delegations and Samba op-locks share most
architecture features.  The version 4 NFS server delegation implementation
should use leases to co-ordinate behavior between local, Samba, and NFS
access.

The main design points are

- Seperate the fcntl interface from the file_lock FL_LEASE processing in
  fcntl_setlease, creating __setlease() called by fcntl_setlease()

- Add new lock_manager callbacks to enable lease properties to be set,
  leases to be broken, and leases to be cleaned up: with default callbacks
  preserving the current fcntl_setlease properties.

- Add a new interface, setlease() which also calls __setlease(), and
  remove_lease() for kernel lease managers (e.g.  the v4 NFS server)

This patch:

Add a lock manager copy lock callback to locks_copy_lock() so that nfsd can
set lease properties.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] reiserfs: allow user_xattr and acl options to be ignored, with warning
Jeff Mahoney [Wed, 20 Oct 2004 01:43:11 +0000 (18:43 -0700)]
[PATCH] reiserfs: allow user_xattr and acl options to be ignored, with warning

This patch uses the REISERFS_UNSUPPORTED_OPT flag to denote -o(no)acl, and
-o(no)user_xattr as unsupported, but allowable, when support isn't built
into the kernel.

Signed-off-by: Jeff Mahoney <jeffm@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] reiserfs: support for REISERFS_UNSUPPORTED_OPT notation
Jeff Mahoney [Wed, 20 Oct 2004 01:42:56 +0000 (18:42 -0700)]
[PATCH] reiserfs: support for REISERFS_UNSUPPORTED_OPT notation

This patch adds a REISERFS_UNSUPPORTED_OPT flag to denote when a mount
option is allowable, but is unsupported in the running configuration.  This
allows the potential for the set of mount options to be consistent,
regardless of what features the kernel is compiled with.

Rather than failing the mount, a warning is issued and the mount succeeds.

Signed-off-by: Jeff Mahoney <jeffm@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Enable config_schedstats for all arches
Kenneth W. Chen [Wed, 20 Oct 2004 01:42:41 +0000 (18:42 -0700)]
[PATCH] Enable config_schedstats for all arches

Config option CONFIG_SCHEDSTATS is currently enabled via arch specific
Kconfig.debug.  Only x86 and ppc arches has code to turn it on.  Why not
put it in generic lib/Kconfig.debug so it is done once to enable everyone?

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Remove obsolete file Documentation/isdn/README.eicon
Armin Schindler [Wed, 20 Oct 2004 01:42:29 +0000 (18:42 -0700)]
[PATCH] Remove obsolete file Documentation/isdn/README.eicon

The file

   Documentation/isdn/README.eicon

is outdated and obsolete in kernel 2.6.  This file includes description of
the old Eicon ISDN driver in kernel 2.4, which was removed in 2.6.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] make CONFIG_PM_DEBUG depend on CONFIG_PM
Adrian Bunk [Wed, 20 Oct 2004 01:42:17 +0000 (18:42 -0700)]
[PATCH] make CONFIG_PM_DEBUG depend on CONFIG_PM

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fix block/cciss.c with PROC_FS=n
Adrian Bunk [Wed, 20 Oct 2004 01:42:02 +0000 (18:42 -0700)]
[PATCH] fix block/cciss.c with PROC_FS=n

kernel/built-in.o(.text+0x1d42b): In function `crash_create_proc_entry':
: undefined reference to `proc_vmcore'

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] reference_init fix
Keith Owens [Wed, 20 Oct 2004 01:41:42 +0000 (18:41 -0700)]
[PATCH] reference_init fix

Treat .pci_fixup entries the same as .init code/data.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] transmeta efficeon support and cpuid update
Dean Gaudet [Wed, 20 Oct 2004 01:41:28 +0000 (18:41 -0700)]
[PATCH] transmeta efficeon support and cpuid update

This patch adds efficeon as a cpu option, and makes a small update to the
transmeta cpuid code.  (i wasn't sure if the various doc files are UTF-8...
if they are, then the e should be a U-275 ;)

The compile options may not be ideal, but they're probably close.  i used
-march=pentium3, but -march=pentium4 would have been good enough too.

The cpuid update teaches transmeta.c about the extended processor revision
present in cpuid level 0x80860002...  the external documentation does not
indicate how to break apart this field, and instructs only that the 32-bit
value should be printed in hex (alas).

Signed-off-by: dean gaudet <dean@arctic.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] "console=" parameter ignored
Maciej W. Rozycki [Wed, 20 Oct 2004 01:41:12 +0000 (18:41 -0700)]
[PATCH] "console=" parameter ignored

I've noticed that under specific circumstances the "console=" kernel
parameter is ignored.  This happens when EARLY_PRINTK is enabled and the
serial console is the only available.  In this case unregister_console()
when called for the early console sets preferred_console back to -1
replacing the value that was recorded by console_setup() -- the order of
calls is as follows:

1. register_console() -- for the early console,

2. console_setup() -- recording the console index for the real console,

3. unregister_console() -- for the early console, erasing the console
   index recorded above,

4. register_console() -- for the real console, picking up the first device
   available, instead of the selected one.

I've observed this problem with a DECstation system using ttyS3 -- its
default console device from the firmware's point of view.

The solution is to restore the setting of "console=" upon
unregister_console().  This made a snapshot of 2.4.26 work for me.  I
wasn't able to test the changes with 2.6 because DECstation drivers don't
support it yet, but the code responsible for console selection appears
functionally the same.  So I've concluded it needs the same change.  Here's
a patch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] bttv IRQ fix
Matthieu Castet [Wed, 20 Oct 2004 01:40:58 +0000 (18:40 -0700)]
[PATCH] bttv IRQ fix

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] lockd: remove hardcoded maximum NLM cookie length
Ed Schouten [Wed, 20 Oct 2004 01:40:45 +0000 (18:40 -0700)]
[PATCH] lockd: remove hardcoded maximum NLM cookie length

At the moment, the NLM cookie length is fixed to 8 bytes, while 1024 is the
theoretical maximum.  FreeBSD uses 16 bytes, Mac OS X uses 20 bytes.
Therefore we need to make the length dynamic (which I set to 32 bytes).

This patch is based on an old patch for Linux 2.4.23-pre9, which I changed
to patch properly (also added some stylish NIPQUAD fixes).

From: Neil Brown <neilb@cse.unsw.edu.au>

Further lockd tidyups.
  - NIPQUAD everywhere that is appropriate
  - use XDR_QUADLEN in more places as appropriate
  - discard QUADLEN which is a lockd-specific version of XDR_QUADLEN

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] md: convert %Lu to %llu in printk
Neil Brown [Wed, 20 Oct 2004 01:40:33 +0000 (18:40 -0700)]
[PATCH] md: convert %Lu to %llu in printk

While %Lu works with gcc, %llu is the correct usage.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] slab: reduce fragmentation due to kmem_cache_alloc_node
Manfred Spraul [Wed, 20 Oct 2004 01:40:18 +0000 (18:40 -0700)]
[PATCH] slab: reduce fragmentation due to kmem_cache_alloc_node

Attached is a patch that fixes the fragmentation that Badri noticed with
kmem_cache_alloc_node.

kmem_cache_alloc_node tries to allocate memory from a given node. The
current implementation contains two bugs:

- the node aware code was used even for !CONFIG_NUMA systems.  Fix:
  inline function that redefines kmem_cache_alloc_node as kmem_cache_alloc
  for !CONFIG_NUMA.

- the code always allocated a new slab for each new allocation.  This
  caused severe fragmentation.  Fix: walk the slabp lists and search for a
  matching page instead of allocating a new page.

- the patch also adds a new statistics field for node-local allocs.  They
  should be rare - the codepath is quite slow, especially compared to the
  normal kmem_cache_alloc.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Remove redundant AND from swp_type()
Marcelo Tosatti [Wed, 20 Oct 2004 01:40:03 +0000 (18:40 -0700)]
[PATCH] Remove redundant AND from swp_type()

There is a useless AND in swp_type() function.

We just shifted right SWP_TYPE_SHIFT() bits the value from the swp_entry_t,
and then we AND it with "(1 << 5) - 1" (which is a mask corresponding to
the number of bits used by "type").

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] ps shows wrong ppid
Dinakar Guniguntala [Wed, 20 Oct 2004 01:39:44 +0000 (18:39 -0700)]
[PATCH] ps shows wrong ppid

/proc shows the wrong PID as parent in the following case

Process A creates Threads 1 & 2 (using pthread_create) Thread 2 then forks
and execs process B getppid() for Process B shows Process A (rightly) as
parent, however /proc/B/status shows Thread 3 as PPid (incorrect).

Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] #include <asm/bitops.h> -> #include <linux/bitops.h>
Adrian Bunk [Wed, 20 Oct 2004 01:39:25 +0000 (18:39 -0700)]
[PATCH] #include <asm/bitops.h> -> #include <linux/bitops.h>

There's no reason to directly #include <asm/bitops.h> since it's
available on all architectures and also included by
#include <linux/bitops.h>.

This patch changes #include <asm/bitops.h> to #include <linux/bitops.h>.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove weird pmd cast
Dave Hansen [Wed, 20 Oct 2004 01:38:41 +0000 (18:38 -0700)]
[PATCH] remove weird pmd cast

I don't know what this is trying to do.  It might be some kind of artifact
from when get_pgd_slow() was removed.

The expanded expression with __pa() ends up looking something like this:

(unsigned long)(u64)(u32)pmd-PAGE_OFFSET

and that is just nutty because pmd is a pointer now, anyway.

Attached patch removes the casts.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] use container_of() for rb_entry()
Paolo \'Blaisorblade\' Giarrusso [Wed, 20 Oct 2004 01:38:30 +0000 (18:38 -0700)]
[PATCH] use container_of() for rb_entry()

Use, in the rb_entry definition, the container_of macro instead of
reinventing the wheel; compared to using offset_of() as I did in the prev.
version, it has type safety checking.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] __init poisoning for i386
Pavel Machek [Wed, 20 Oct 2004 01:38:15 +0000 (18:38 -0700)]
[PATCH] __init poisoning for i386

Overwrite __init section so calls to __init functions from normal code
are caught, reliably.

(Plus a fix from Dave Hansen)

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vmalloc_to_page() preempt cleanup
Andrew Morton [Wed, 20 Oct 2004 01:38:01 +0000 (18:38 -0700)]
[PATCH] vmalloc_to_page() preempt cleanup

remove unneeded preempt_disable/enable.  pte_offset_map/unmap already does
that.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] __copy_to_user return value checks in i2o_config.c
Jesper Juhl [Wed, 20 Oct 2004 01:37:45 +0000 (18:37 -0700)]
[PATCH] __copy_to_user return value checks in i2o_config.c

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] modules: put srcversion checksum in each modinfo section
Matt Domsch [Wed, 20 Oct 2004 01:37:33 +0000 (18:37 -0700)]
[PATCH] modules: put srcversion checksum in each modinfo section

Separate the module source and header checksum into a separate modinfo
field srcversion.

With CONFIG_MODULE_SRCVERSION_ALL=y, put srcversion into every module, not
just those with MODULE_VERSION("something").

Patch by Rusty Russell, trivial merging and testing by Matt Domsch

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] idefloppy: suppress media not present errors
Matt Domsch [Wed, 20 Oct 2004 01:37:21 +0000 (18:37 -0700)]
[PATCH] idefloppy: suppress media not present errors

Below is a patch to suppress printing uninformative errors from
ide-floppy.c in response to commands to floppy drives in which no media is
present.

Without this patch, commands sent to ide-floppy devices without media
inserted cause error messages on the console (KERN_ERR level) such as:

ide-floppy: ide: I/O error, pc = 0 key = 2, asc = 3a asq = 0
ide-floppy: ide: I/O error, pc = 1b key = 2, asc = 3a asq = 0
ide-floppy: ide: I/O error, pc = 23 key = 2, asc = 3a asq = 0
ide-floppy: ide: I/O error, pc = 1e key = 2, asc = 3a asq = 0
ide-floppy: ide: I/O error, pc = 1e key = 2, asc = 3a asq = 0

Dell's Virtual Floppy (system management presents to the local system an
IDE floppy device, which is actually a floppy device in a remote system
connected over an IP link) exhibits this also, when connecting to a remote
floppy drive with no media present.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Warning fix in drivers/macintosh/macio-adb.c
Colin Leroy [Wed, 20 Oct 2004 01:37:06 +0000 (18:37 -0700)]
[PATCH] Warning fix in drivers/macintosh/macio-adb.c

This one fixes another unitialized var warning (which is harmless, but
whatever).

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] proc.txt cleanup
Hideo Aoki [Wed, 20 Oct 2004 01:36:51 +0000 (18:36 -0700)]
[PATCH] proc.txt cleanup

In Documentation/filesystems/proc.txt, explanation of /proc/meminfo is
described in section 1.3 (IDE devices in /proc/ide).  I think that it
should be described in section 1.2 (Kernel data).

Signed-off-by: Hideo Aoki <aoki@sdl.hitachi.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm thrashing control tuning
Hideo Aoki [Wed, 20 Oct 2004 01:36:36 +0000 (18:36 -0700)]
[PATCH] vm thrashing control tuning

This patch adds "swap_token_timeout" parameter in /proc/sys/vm.  The
parameter means expired time of token.  Unit of the value is HZ, and the
default value is the same as current SWAP_TOKEN_TIMEOUT (i.e.  HZ * 300).

Signed-off-by: Hideo Aoki <aoki@sdl.hitachi.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] EDD: use EXTENDED READ command, add CONFIG_EDD_SKIP_MBR
Matt Domsch [Wed, 20 Oct 2004 01:36:22 +0000 (18:36 -0700)]
[PATCH] EDD: use EXTENDED READ command, add CONFIG_EDD_SKIP_MBR

Some controller BIOSes have problems with the legacy int13 fn02 READ
SECTORS command.  int13 fn42 EXTENDED READ is used in preference by most
boot loaders today, so lets use that.  If EXTENDED READ fails or isn't
supported, fall back to READ SECTORS.

This hopefully resolves the three reports of BIOSes which would either
long-pause (30+ seconds) or hang completely on the legacy READ SECTORS
command.

This also adds CONFIG_EDD_SKIP_MBR to eliminate reading the MBR on each
BIOS-presented disk, in case there are further problems in this area.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] hvc_console fix to prevent oops and late hangup and write operations
Ryan S. Arnold [Wed, 20 Oct 2004 01:36:07 +0000 (18:36 -0700)]
[PATCH] hvc_console fix to prevent oops and late hangup and write operations

This patch prevents execution of hvc_write() and hvc_hangup() after the tty
layer has executed a final hvc_close() against a device.  This patch
provides a better method than was previously used.  tty->driver_data is no
longer invalidated so we'll no longer get oopses when the tty layer allows
late hangup() and write() operations.

- Removed silly tty->driver_data = NULL; from hvc_close which prevents
  possible oops in hvc_write() and hvc_hangup() due to improperly acting
  ldisc close ordering.

- Added hp->count <= 0 check to hvc_write() and hvc_hangup() to prevent
  execution of these function after hvc_close() has been invoked by the tty
  layer.  Same tty ldisc issues as above are the reason.

- Added some comments to clarify the situation.

- Awaiting a forth coming patch from Alan Cox which should clean up the
  close ordering and prevent the late hangup and write ops from happening.

Signed-off-by: Ryan S. Arnold <rsa@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] mips: added missing definition and fixed typo
Yoichi Yuasa [Wed, 20 Oct 2004 01:35:52 +0000 (18:35 -0700)]
[PATCH] mips: added missing definition and fixed typo

This patch had added missing definition and had fixed typo for VRC4173.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd: Insecure port warning shows decimal IPv4 address
Ed Schouten [Wed, 20 Oct 2004 01:35:37 +0000 (18:35 -0700)]
[PATCH] nfsd: Insecure port warning shows decimal IPv4 address

print a couple of ipv4 addresses as dotted quads, not as hex.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove scsi ioctl from udf/lowlevel.c
Olaf Hering [Wed, 20 Oct 2004 01:35:22 +0000 (18:35 -0700)]
[PATCH] remove scsi ioctl from udf/lowlevel.c

I'm not sure why these defines and typedefs exists, the driver compiles
fine without it.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] firmware_class: avoid double free
Duncan Sands [Wed, 20 Oct 2004 01:35:07 +0000 (18:35 -0700)]
[PATCH] firmware_class: avoid double free

The error exit path in request_firmware frees the allocated struct firmware
*firmware, which is good.  What is not so good is that the value of
firmware has already been copied out to the caller as *firmware_p.  The
risk is that the caller will pass this to release_firmware, a double free.
This is exactly what will happen if the caller copied the example code

         if(request_firmware(&fw_entry, $FIRMWARE, device) == 0)
                copy_fw_to_device(fw_entry->data, fw_entry->size);
         release(fw_entry);

from the firmware documentation.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Amifb: use new amifb:off logic to enhance audio experience
Geert Uytterhoeven [Wed, 20 Oct 2004 01:34:53 +0000 (18:34 -0700)]
[PATCH] Amifb: use new amifb:off logic to enhance audio experience

Amiga frame buffer: We used to have a local hack in fbmem.c to always call the
fbdev setup() routines, even when an fbdev was explicitly disabled on the
kernel command line (video=xxx:off).  This allowed amifb to suspend the
monitor, but program the sync generator of the video controller in Denise/Lisa
to a 31 kHz/70 Hz mode, increasing the maximum audio playback frequency.
Thanks to the recently introduced fb_get_options() routine, we can kill the
local hack and just use the return value of fb_get_options().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] m68k: NULL vs. 0 cleanups
Geert Uytterhoeven [Wed, 20 Oct 2004 01:34:38 +0000 (18:34 -0700)]
[PATCH] m68k: NULL vs. 0 cleanups

A few more NULL vs. 0 cleanups, as detected by sparse.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Amiga frame buffer: kill obsolete DMI Resolver code
Geert Uytterhoeven [Wed, 20 Oct 2004 01:34:23 +0000 (18:34 -0700)]
[PATCH] Amiga frame buffer: kill obsolete DMI Resolver code

Kill remainings of the DMI Resolver support code that got removed somewhere
between 2.0 and 2.2.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Amifb: update pseudocolor bitfield lenghts
Geert Uytterhoeven [Wed, 20 Oct 2004 01:34:09 +0000 (18:34 -0700)]
[PATCH] Amifb: update pseudocolor bitfield lenghts

Amiga frame buffer: The new convention (introduced in 2.6.9-rc1) requires that
the usable color depth for pseudocolor visuals is indicated by the lengths of
the color bitfields.  Update amifb for this convention, and add a special case
for HAM (Hold-and-Modify) mode (colormap has 16 (HAM6) or 64 (HAM8) entries).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] M68k: don't emit empty stack program header in vmlinux
Geert Uytterhoeven [Wed, 20 Oct 2004 01:33:54 +0000 (18:33 -0700)]
[PATCH] M68k: don't emit empty stack program header in vmlinux

Recent versions of ld add an empty stack program header to the kernel image,
which makes it incompatible with current m68k bootstrap loaders.  Modify the
linker script to make sure we see only the program headers that are really
needed.  (from Roman Zippel)

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] m68k: minmax-removal arch/m68k/kernel/bios32.c
Geert Uytterhoeven [Wed, 20 Oct 2004 01:33:40 +0000 (18:33 -0700)]
[PATCH] m68k: minmax-removal arch/m68k/kernel/bios32.c

M68k PCI: Removes unnecessary min/max macros and change calls to use kernel.h
macros instead.

Signed-off-by: Michael Veeck <michael.veeck@gmx.net>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Atari ACSI dependencies
Geert Uytterhoeven [Wed, 20 Oct 2004 01:33:24 +0000 (18:33 -0700)]
[PATCH] Atari ACSI dependencies

Atari ACSI: Correct a small problem in the dependencies of ATARI_BIONET and
ATARI_PAMSNET (e.g.  ATARI_ACSI=m shouldn't allow ATARI_BIONET=y).

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] m68k: MM off-by-one
Geert Uytterhoeven [Wed, 20 Oct 2004 01:33:12 +0000 (18:33 -0700)]
[PATCH] m68k: MM off-by-one

Fix off-by-one error in zone size calculation (from Didier Mequignon and Petr
Stehlik)

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] drivers: remove unused MOD_{DEC,INC}_USE_COUNT
Maximilian Attems [Wed, 20 Oct 2004 01:32:59 +0000 (18:32 -0700)]
[PATCH] drivers: remove unused MOD_{DEC,INC}_USE_COUNT

hch send in a patch to remove MOD_{DEC,INC}_USE_COUNT.  Let's also remove
useless references to it (comments, old ifdefs).

Signed-off-by: maximilian attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] copy_thread(): unneeded child_tid initialization
Oleg Nesterov [Wed, 20 Oct 2004 01:32:44 +0000 (18:32 -0700)]
[PATCH] copy_thread(): unneeded child_tid initialization

{set,clear}_child_tid initialized in copy_process() right after return from
copy_thread().

These vars are not used in cleanup path if copy_thread() fails.

grep -r _child_tid arch/ shows only ia64/kernel/asm-offsets.c,
so i blindly patched non i386 archs too.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] x86[64]: display phys_proc_id only when it is initialized
Venkatesh Pallipadi [Wed, 20 Oct 2004 01:32:29 +0000 (18:32 -0700)]
[PATCH] x86[64]: display phys_proc_id only when it is initialized

phys_proc_id gets initialized only when (smp_num_siblings > 1).  But gets
printed even when (smp_num_siblings == 1).  As a result we print incorrect
physical processor id in /proc/cpuinfo, when HT is disabled.

Signed-off-by:: "Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] don't include <linux/irq.h> from drivers
Christoph Hellwig [Wed, 20 Oct 2004 01:32:14 +0000 (18:32 -0700)]
[PATCH] don't include <linux/irq.h> from drivers

<linux/irq.h> is internals for the generic irq handler implementation,
which is used on most but not all platforms.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] detach_pid(): eliminate one find_pid() call
Oleg Nesterov [Wed, 20 Oct 2004 01:31:59 +0000 (18:31 -0700)]
[PATCH] detach_pid(): eliminate one find_pid() call

Now there is no point in calling costly find_pid(type) if
__detach_pid(type) returned non zero value.

Acked-By: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] detach_pid(): restore optimization
Oleg Nesterov [Wed, 20 Oct 2004 01:31:47 +0000 (18:31 -0700)]
[PATCH] detach_pid(): restore optimization

Kirill's kernel/pid.c rework broke optimization logic in detach_pid().  Non
zero return from __detach_pid() was used to indicate, that this pid can
probably be freed.  Current version always (modulo idle threads) return non
zero value, thus resulting in unneccesary pid_hash scanning.

Also, uninlining __detach_pid() reduces pid.o text size from 2492 to 1600
bytes.

Acked-By: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Posix compliant cpu clocks V6: mmtimer provides CLOCK_SGI_CYCLE
Christoph Lameter [Wed, 20 Oct 2004 01:31:31 +0000 (18:31 -0700)]
[PATCH] Posix compliant cpu clocks V6: mmtimer provides CLOCK_SGI_CYCLE

* Add CLOCK_SGI_CYCLE provided by drivers/char/mmtimer

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Posix compliant cpu clocks
Christoph Lameter [Wed, 20 Oct 2004 01:31:19 +0000 (18:31 -0700)]
[PATCH] Posix compliant cpu clocks

POSIX clocks are to be implemented in the following way according
to V3 of the Single Unix Specification:

1. CLOCK_PROCESS_CPUTIME_ID

  Implementations shall also support the special clockid_t value
  CLOCK_PROCESS_CPUTIME_ID, which represents the CPU-time clock of the
  calling process when invoking one of the clock_*() or timer_*()
  functions. For these clock IDs, the values returned by clock_gettime() and
  specified by clock_settime() represent the amount of execution time of the
  process associated with the clock.

2. CLOCK_THREAD_CPUTIME_ID

  Implementations shall also support the special clockid_t value
  CLOCK_THREAD_CPUTIME_ID, which represents the CPU-time clock of the
  calling thread when invoking one of the clock_*() or timer_*()
  functions. For these clock IDs, the values returned by clock_gettime()
  and specified by clock_settime() shall represent the amount of
  execution time of the thread associated with the clock.

These times mentioned are CPU processing times and not the time that has
passed since the startup of a process. Glibc currently provides its own
implementation of these two clocks which is designed to return the time
that passed since the startup of a process or a thread.

Moreover Glibc's clocks are bound to CPU timers which is problematic when the
frequency of the clock changes or the process is moved to a different
processor whose cpu timer may not be fully synchronized to the cpu timer
of the current CPU. This patchset results in a both clocks working reliably.

The patch also implements the access to other the thread and process clocks
of linux processes by using negative clockid's:

1. For CLOCK_PROCESS_CPUTIME_ID: -pid
2. For CLOCK_THREAD_CPUTIME_ID: -(pid + PID_MAX_LIMIT)

This allows

clock_getcpuclockid(pid) to return -pid

and

pthread_getcpuiclock(pid) to return -(pid + PID_MAX_LIMIT)

to allow access to the corresponding clocks.

Todo:
- The timer API to generate events by a non tick based timer is not
  usable in its current state. The posix timer API seems to be only
  useful at this point to define clock_get/set. Need to revise this.
- Implement timed interrupts in mmtimer after API is revised.

The mmtimer patch is unchanged from V6 and stays as is in 2.6.9-rc3-mm2.
But I expect to update the driver as soon as the interface to setup hardware
timer interrupts is usable.

Single Thread Testing
  CLOCK_THREAD_CPUTIME_ID=          0.494140878 resolution= 0.000976563
 CLOCK_PROCESS_CPUTIME_ID=          0.494140878 resolution= 0.000976563
Multi Thread Testing
Starting Thread: 0 1 2 3 4 5 6 7 8 9
 Joining Thread: 0 1 2 3 4 5 6 7 8 9
0 Cycles=      0 Thread=  0.000000000ns Process=  0.495117441ns
1 Cycles=1000000 Thread=  0.140625072ns Process=  2.523438792ns
2 Cycles=2000000 Thread=  0.966797370ns Process=  8.512699671ns
3 Cycles=3000000 Thread=  0.806641038ns Process=  7.561527309ns
4 Cycles=4000000 Thread=  1.865235330ns Process= 12.891608163ns
5 Cycles=5000000 Thread=  1.604493009ns Process= 11.528326215ns
6 Cycles=6000000 Thread=  2.086915131ns Process= 13.500983475ns
7 Cycles=7000000 Thread=  2.245118337ns Process= 13.947272766ns
8 Cycles=8000000 Thread=  1.604493009ns Process= 12.252935961ns
9 Cycles=9000000 Thread=  2.160157356ns Process= 13.977546219ns

Clock status at the end of the timer tests:
          Gettimeofday() = 1097084999.489938000
           CLOCK_REALTIME= 1097084999.490116229 resolution= 0.000000040
          CLOCK_MONOTONIC=        177.071675109 resolution= 0.000000040
 CLOCK_PROCESS_CPUTIME_ID=         13.978522782 resolution= 0.000976563
  CLOCK_THREAD_CPUTIME_ID=          0.497070567 resolution= 0.000976563
          CLOCK_SGI_CYCLE=        229.967982280 resolution= 0.000000040
PROCESS clock of 1 (init)=          4.833986850 resolution= 0.000976563
 THREAD clock of 1 (init)=          0.009765630 resolution= 0.000976563

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Display committed memory limit and available in meminfo
Frank Hirtz [Wed, 20 Oct 2004 01:31:04 +0000 (18:31 -0700)]
[PATCH] Display committed memory limit and available in  meminfo

The following patch will have the committed memory limit (per the current
overcommit ratio) and the amount of memory remaining under this limit
displayed in meminfo.

It's presently somewhat difficult to use the strict memory overcommit
settings as it's somewhat difficult to determine the amount of memory
remaining under the cap.  This patch would make using strict overcommit a
good bit simpler.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] register_chrdev_region(), alloc_chrdev_region() const char
Stephen Hemminger [Wed, 20 Oct 2004 01:30:53 +0000 (18:30 -0700)]
[PATCH] register_chrdev_region(), alloc_chrdev_region() const char

A couple chrdev routines take a constant string and should be declared with
const char *.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] BSD Secure Levels LSM: documentation
Michael A. Halcrow [Wed, 20 Oct 2004 01:30:40 +0000 (18:30 -0700)]
[PATCH] BSD Secure Levels LSM: documentation

This patch includes documentation on using the BSD Secure Levels LSM.

Signed-off-by: Michael A. Halcrow <mahalcro@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] BSD Secure Levels LSM: core
Michael A. Halcrow [Wed, 20 Oct 2004 01:30:25 +0000 (18:30 -0700)]
[PATCH] BSD Secure Levels LSM: core

This patch modifies Kconfig and Makefile to support building the BSD
Secure Levels LSM, in addition to the module itself.

Signed-off-by: Michael A. Halcrow <mahalcro@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] BSD Secure Levels LSM: add time hooks
Michael A. Halcrow [Wed, 20 Oct 2004 01:30:12 +0000 (18:30 -0700)]
[PATCH] BSD Secure Levels LSM: add time hooks

I have received positive feedback from various individuals who have applied my
BSD Secure Levels LSM patch, and so at this point I am submitting it to you
with a request to merge it in.  Nothing has changed in this patch since when I
last posted it to the LKML, so I am not re-sending it there.

This first patch adds hooks to catch attempts to set the system clock back.

Signed-off-by: Michael A. Halcrow <mahalcro@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] move struct k_itimer out of linux/sched.h
Roland McGrath [Wed, 20 Oct 2004 01:30:01 +0000 (18:30 -0700)]
[PATCH] move struct k_itimer out of linux/sched.h

I don't know why struct k_itimer was ever declared in sched.h; perhaps at
one time it was referenced by something else there.  There is no need for
it now.  This patch moves the struct where it belongs, in
linux/posix-timers.h.  It has zero effect on anything except keeping the
source easier to read.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Document DEC VSXXX-AB digitizer as known working
Jan-Benedict Glaw [Wed, 20 Oct 2004 01:29:47 +0000 (18:29 -0700)]
[PATCH] Document DEC VSXXX-AB digitizer as known working

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] disk stats preempt safety
Ingo Molnar [Wed, 20 Oct 2004 01:29:31 +0000 (18:29 -0700)]
[PATCH] disk stats preempt safety

The per-cpu disk stats are being updated in a non-preempt-safe manner in a
couple of places.

The patch introduces introduces preempt and non-preempt versions of the
statistics code and updates the block code to use the appropriate ones.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Update 'noapic' description
Zwane Mwaikambo [Wed, 20 Oct 2004 01:29:19 +0000 (18:29 -0700)]
[PATCH] Update 'noapic' description

The 'noapic' kernel parameter only disables IOAPIC use and not all the
APICs (which would include local APICs) in the system.

Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm: convert users of remap_page_range() under sound/ to use remap_pfn_range()
William Lee Irwin III [Wed, 20 Oct 2004 01:29:04 +0000 (18:29 -0700)]
[PATCH] vm: convert users of remap_page_range() under sound/ to use remap_pfn_range()

This patch converts all users of remap_page_range() under sound/ to use
remap_pfn_range(), with the exception of maestro3 changelogs, which are likely
expected to be preserved intact apart from additions (as most changelogs are),
regardless of API changes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm: convert users of remap_page_range() under include/asm-*/ to use remap_pfn...
William Lee Irwin III [Wed, 20 Oct 2004 01:28:49 +0000 (18:28 -0700)]
[PATCH] vm: convert users of remap_page_range() under include/asm-*/ to use remap_pfn_range()

This patch converts uses of remap_page_range() via io_remap_page_range() in
include/asm-*/ to use remap_pfn_range().  io_remap_page_range() has a similar
physical address overflow issue that needs to be addressed later.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm: convert users of remap_page_range() under drivers/ and net/ to use remap_...
William Lee Irwin III [Wed, 20 Oct 2004 01:28:33 +0000 (18:28 -0700)]
[PATCH] vm: convert users of remap_page_range() under drivers/ and net/ to use remap_pfn_range()

This patch converts all callers of remap_page_range() under arch/ and net/ to
use remap_pfn_range() instead.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm: convert references to remap_page_range() under arch/ and Documentation...
William Lee Irwin III [Wed, 20 Oct 2004 01:28:15 +0000 (18:28 -0700)]
[PATCH] vm: convert references to remap_page_range() under arch/ and Documentation/ to remap_pfn_range()

This patch converts all callers of remap_page_range() under arch/ and all
references in Documentation/ to use remap_pfn_range().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] vm: introduce remap_pfn_range() to replace remap_page_range()
William Lee Irwin III [Wed, 20 Oct 2004 01:28:00 +0000 (18:28 -0700)]
[PATCH] vm: introduce remap_pfn_range() to replace remap_page_range()

This patch introduces remap_pfn_range(), destined to replace
remap_page_range(), to which all callers of remap_page_range() are converted
in the sequel.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: move code to truncate on open to separate function
Neil Brown [Wed, 20 Oct 2004 01:27:48 +0000 (18:27 -0700)]
[PATCH] nfsd4: move code to truncate on open to separate function

for OPEN with O_TRUNC, if the truncate fails, the open fails.  for
nfs4_open_upgrade, this means undo the get_write_access.  for new OPENs, this
means release the newly created stateid.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: fix putrootfh return
Neil Brown [Wed, 20 Oct 2004 01:27:34 +0000 (18:27 -0700)]
[PATCH] nfsd4: fix putrootfh return

Thanks to Al Viro for noticing that putrootfh could return either a linux or
an nfs error.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd: clean up nfsd4_process_open2
Neil Brown [Wed, 20 Oct 2004 01:27:19 +0000 (18:27 -0700)]
[PATCH] nfsd: clean up nfsd4_process_open2

Comments, dprintk cleanup

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: move some nfsd4_process_open2 code to nfs4_new_open
Neil Brown [Wed, 20 Oct 2004 01:27:05 +0000 (18:27 -0700)]
[PATCH] nfsd4: move some nfsd4_process_open2 code to nfs4_new_open

Move most of the code in the new_open case of nfsd4_process_open2 to
nfs4_new_open.

Signed-off-by: Andy Adamson <andros@umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: move open_upgrade code into a separate function
Neil Brown [Wed, 20 Oct 2004 01:26:49 +0000 (18:26 -0700)]
[PATCH] nfsd4: move open_upgrade code into a separate function

Move most of the code for the open_upgrade case into a separate
nfs4_upgrade_open.

Signed-off-by: Andy Adamson <andros@umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: reorganize "if" in nfsd4_process_open2 to make test clearer
Neil Brown [Wed, 20 Oct 2004 01:26:38 +0000 (18:26 -0700)]
[PATCH] nfsd4: reorganize "if" in nfsd4_process_open2 to make test clearer

Reorganize "if" in nfsd4_process_open2 to make test clearer; there was no real
reason to test for the negative here.

Signed-off-by: Andy Adamson <andros@umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: move seqid decrement on reclaim to separate function
Neil Brown [Wed, 20 Oct 2004 01:26:23 +0000 (18:26 -0700)]
[PATCH] nfsd4: move seqid decrement on reclaim to separate function

Move seqid decrement on reclaim to separate function

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd: set OPEN_RESULT_LOCKTYPE_POSIX in open()
Neil Brown [Wed, 20 Oct 2004 01:26:11 +0000 (18:26 -0700)]
[PATCH] nfsd: set OPEN_RESULT_LOCKTYPE_POSIX in open()

We should set the OPEN_RESULT_LOCKTYPE_POSIX flag in the return to open, to
indicate that we support locking.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] nfsd4: move open owner checks from nfsd4_process_open2 into new function
Neil Brown [Wed, 20 Oct 2004 01:25:56 +0000 (18:25 -0700)]
[PATCH] nfsd4: move open owner checks from nfsd4_process_open2 into new function

nfsd4_process_open2 has become a bit long and contorted.  The following
patches break nfsd4_process_open2 into smaller functions and add comments to
describe logic flow, in preparation for delegation state.

We begin by pulling out the code that searches for conflicting open owners
into a separate function.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>