pandora-kernel.git
18 years agoIPoIB: Fix another send-only join race
Michael S. Tsirkin [Wed, 8 Feb 2006 00:39:26 +0000 (16:39 -0800)]
IPoIB: Fix another send-only join race

Further, there's an additional issue that I saw in testing:
ipoib_mcast_send may get called when priv->broadcast is NULL (e.g. if
the device was downed and then upped internally because of a port
event).

If this happends and the send-only join request gets completed before
priv->broadcast is set, we get an oops.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIPoIB: Don't start send-only joins while multicast thread is stopped
Michael S. Tsirkin [Wed, 8 Feb 2006 00:37:08 +0000 (16:37 -0800)]
IPoIB: Don't start send-only joins while multicast thread is stopped

Fix the following race scenario:
  - Device is up.
  - Port event or set mcast list triggers ipoib_mcast_stop_thread,
    this cancels the query and waits on mcast "done" completion.
  - Completion is called and "done" is set.
  - Meanwhile, ipoib_mcast_send arrives and starts a new query,
    re-initializing "done".

Fix this by adding a "multicast started" bit and checking it before
starting a send-only join.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mad: Handle DR SMPs with a LID routed part
Ralph Campbell [Fri, 3 Feb 2006 22:28:48 +0000 (14:28 -0800)]
IB/mad: Handle DR SMPs with a LID routed part

Fix handling of directed route SMPs with a beginning or ending LID
routed part.

Signed-off-by: Ralph Campbell <ralphc@pathscale.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[PATCH] kernel-doc: clean up the script (whitespace)
Randy Dunlap [Wed, 1 Feb 2006 11:06:58 +0000 (03:06 -0800)]
[PATCH] kernel-doc: clean up the script (whitespace)

Remove lots of trailing whitespace.  Nothing else.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Doc/kernel-doc: add more usage info
Randy Dunlap [Wed, 1 Feb 2006 11:06:57 +0000 (03:06 -0800)]
[PATCH] Doc/kernel-doc: add more usage info

- Add info that structs, unions, enums, and typedefs are supported.

- Add doc about "private:" and "public:" tags for struct fields.

- Fix some typos.

- Remove some trailing whitespace.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] DocBook: fix some kernel-doc comments in fs and block
Martin Waitz [Wed, 1 Feb 2006 11:06:57 +0000 (03:06 -0800)]
[PATCH] DocBook: fix some kernel-doc comments in fs and block

Update some parameter descriptions to actually match the code.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] DocBook: fix some kernel-doc comments in net/sunrpc
Martin Waitz [Wed, 1 Feb 2006 11:06:56 +0000 (03:06 -0800)]
[PATCH] DocBook: fix some kernel-doc comments in net/sunrpc

Fix the syntax of some kernel-doc comments

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] DocBook: allow even longer return types
Martin Waitz [Wed, 1 Feb 2006 11:06:55 +0000 (03:06 -0800)]
[PATCH] DocBook: allow even longer return types

kernel-doc errored out because it could not understand the new __copy_to_user
definition.  Now we allow return types with four words.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i810fb: Do not probe the third i2c bus by default
Manuel Lauss [Wed, 1 Feb 2006 11:06:54 +0000 (03:06 -0800)]
[PATCH] i810fb: Do not probe the third i2c bus by default

Some time before 2.6.15, a third DDC channel was added to i810fb.  On
systems where these ddc pins are not connected, the probe takes about 10
seconds.

Add a boot/module option for i810fb to explicitly probe for the 3rd ddc bus
if needed.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] video: hp680 backlight driver
Andriy Skulysh [Wed, 1 Feb 2006 11:06:53 +0000 (03:06 -0800)]
[PATCH] video: hp680 backlight driver

This adds support for the hp680 backlight, as found in the hp6xx series of
sh devices.

Signed-off-by: Andriy Skulysh <askulysh@image.kiev.ua>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fbcon: Fix screen artifacts when moving cursor
Antonino A. Daplas [Wed, 1 Feb 2006 11:06:52 +0000 (03:06 -0800)]
[PATCH] fbcon: Fix screen artifacts when moving cursor

When moving the cursor by writing to /dev/vcs*, the old cursor image is not
erased.  Fix by hiding the cursor first before moving the cursor to the new
position.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: reiserfs: check for files > 2GB on 3.5.x disks
Jeff Mahoney [Wed, 1 Feb 2006 11:06:51 +0000 (03:06 -0800)]
[PATCH] reiserfs: reiserfs: check for files > 2GB on 3.5.x disks

When a filesystem has been converted from 3.5.x to 3.6.x, we need an extra
check during file write to make sure we are not trying to make a 3.5.x file
> 2GB.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: reiserfs fix journal accounting in journal_transaction_should_end
Chris Mason [Wed, 1 Feb 2006 11:06:50 +0000 (03:06 -0800)]
[PATCH] reiserfs: reiserfs fix journal accounting in journal_transaction_should_end

reiserfs: journal_transaction_should_end should increase the count of
blocks allocated so the transaction subsystem can keep new writers from
creating a transaction that is too large.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: reiserfs write_ordered_buffers should not oops on dirty non-uptodate bh
Chris Mason [Wed, 1 Feb 2006 11:06:49 +0000 (03:06 -0800)]
[PATCH] reiserfs: reiserfs write_ordered_buffers should not oops on dirty non-uptodate bh

write_ordered_buffers should handle dirty non-uptodate buffers without a
BUG()

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: reiserfs hang and performance fix for data=journal mode
Chris Mason [Wed, 1 Feb 2006 11:06:49 +0000 (03:06 -0800)]
[PATCH] reiserfs: reiserfs hang and performance fix for data=journal mode

In data=journal mode, reiserfs writepage needs to make sure not to trigger
transactions while being run under PF_MEMALLOC.  This patch makes sure to
redirty the page instead of forcing a transaction start in this case.

Also, calling filemap_fdata* in order to trigger io on the block device can
cause lock inversions on the page lock.  Instead, do simple batching from
flush_commit_list.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: zero b_private when allocating buffer heads
Chris Mason [Wed, 1 Feb 2006 11:06:48 +0000 (03:06 -0800)]
[PATCH] reiserfs: zero b_private when allocating buffer heads

The b_private field in buffer heads needs to be zero filled when the
buffers are allocated.  Thanks to Nathan Scott for finding this.  It was
causing problems on systems with both XFS and reiserfs.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] resierfs: fix reiserfs_invalidatepage race against data=ordered
Chris Mason [Wed, 1 Feb 2006 11:06:47 +0000 (03:06 -0800)]
[PATCH] resierfs: fix reiserfs_invalidatepage race against data=ordered

After a transaction has closed but before it has finished commit, there is
a window where data=ordered mode requires invalidatepage to pin pages
instead of freeing them.  This patch fixes a race between the
invalidatepage checks and data=ordered writeback, and it also adds a check
to the reiserfs write_ordered_buffers routines to write any anonymous
buffers that were dirtied after its first writeback loop.

That bug works like this:

proc1: transaction closes and a new one starts
proc1: write_ordered_buffers starts processing data=ordered list
proc1: buffer A is cleaned and written
proc2: buffer A is dirtied by another process
proc2: File is truncated to zero, page A goes through invalidatepage
proc2: reiserfs_invalidatepage sees dirty buffer A with reiserfs
       journal head, pins it
proc1: write_ordered_buffers frees the journal head on buffer A

At this point, buffer A stays dirty forever

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: use generic_permission
Christoph Hellwig [Wed, 1 Feb 2006 11:06:46 +0000 (03:06 -0800)]
[PATCH] reiserfs: use generic_permission

Use the generic_permission code with a proper wrapper and callback instead
of having a local copy.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: remove reiserfs_permission_locked
Christoph Hellwig [Wed, 1 Feb 2006 11:06:45 +0000 (03:06 -0800)]
[PATCH] reiserfs: remove reiserfs_permission_locked

This function is completely unused since the xattr permission checking
changes.  Remove it and fold __reiserfs_permission into
reiserfs_permission.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: missing kmalloc failure check
Diego Calleja [Wed, 1 Feb 2006 11:06:44 +0000 (03:06 -0800)]
[PATCH] reiserfs: missing kmalloc failure check

According to http://bugzilla.kernel.org/show_bug.cgi?id=5778
fs/reiserfs/file.c is missing this check.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation
Pekka Enberg [Wed, 1 Feb 2006 11:06:43 +0000 (03:06 -0800)]
[PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation

This patch replaces yield and retry loop with __GFP_NOFAIL in
alloc_journal_list().

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: remove kmalloc wrapper
Pekka Enberg [Wed, 1 Feb 2006 11:06:43 +0000 (03:06 -0800)]
[PATCH] reiserfs: remove kmalloc wrapper

Remove kmalloc() wrapper from fs/reiserfs/.  Please note that a reiserfs
/proc entry format is changed because kmalloc statistics is removed.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] RCU documentation fixes (January 2006 update)
Paul E. McKenney [Wed, 1 Feb 2006 11:06:42 +0000 (03:06 -0800)]
[PATCH] RCU documentation fixes (January 2006 update)

Updates to in-tree RCU documentation based on comments over the past few
months.

Signed-off-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Altix ioc3: correct export call
Pat Gefre [Wed, 1 Feb 2006 11:06:41 +0000 (03:06 -0800)]
[PATCH] Altix ioc3: correct export call

Use EXPORT_SYMBOL_GPL in ioc3 shim layer.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ebcdic do_kdsk_ioctl off-by-one
Davi Arnaut [Wed, 1 Feb 2006 11:06:40 +0000 (03:06 -0800)]
[PATCH] ebcdic do_kdsk_ioctl off-by-one

Add a missing return check from strnlen_user and fixes a off-by-one when
terminating the string with zero.

Signed-off-by: Davi Arnaut <davi.arnaut@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: Add missing memory constraint to stcrw()
Peter Oberparleiter [Wed, 1 Feb 2006 11:06:40 +0000 (03:06 -0800)]
[PATCH] s390: Add missing memory constraint to stcrw()

Add missing memory constraint to stcrw() inline assembly.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: Fix modalias for ccw devices
Cornelia Huck [Wed, 1 Feb 2006 11:06:39 +0000 (03:06 -0800)]
[PATCH] s390: Fix modalias for ccw devices

Fix modalias for ccw devices: cu_type should be in capitals as well.

Signed-off-by: Cornelia Huck <cohuck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: Add support for new syscalls/TIF_RESTORE_SIGMASK
Heiko Carstens [Wed, 1 Feb 2006 11:06:38 +0000 (03:06 -0800)]
[PATCH] s390: Add support for new syscalls/TIF_RESTORE_SIGMASK

Add support for the new *at, pselect6 and ppoll system calls.  This includes
adding required support for TIF_RESTORE_SIGMASK.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: New default configuration
Heiko Carstens [Wed, 1 Feb 2006 11:06:37 +0000 (03:06 -0800)]
[PATCH] s390: New default configuration

New default configuration.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: dasd wait for clear i/o interrupt
Horst Hummel [Wed, 1 Feb 2006 11:06:37 +0000 (03:06 -0800)]
[PATCH] s390: dasd wait for clear i/o interrupt

The sleep_on function clears a running cqr without waiting for the related
interrupt.  This can lead to a panic at the time the interrupt is processed
because the related memory might already be freed.  Wait for clear-interrupt
and de-queue cqr prior to return.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: dasd open counter
Horst Hummel [Wed, 1 Feb 2006 11:06:36 +0000 (03:06 -0800)]
[PATCH] s390: dasd open counter

The open_count is increased for every opener, that includes the blkdev_get in
dasd_scan_partitions.  This tampers the open_count in BIODASDINFO.  Hide the
internal open from user-space.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: ccw_device_probe_console return value
Peter Oberparleiter [Wed, 1 Feb 2006 11:06:35 +0000 (03:06 -0800)]
[PATCH] s390: ccw_device_probe_console return value

The return code of ccw_device_probe_console() is not properly handled.  It
should only return a valid ccw device pointer or a error value converted by
ERR_PTR.  Fix the console driver code to check with IS_ERR instead against
NULL.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: hangcheck timer support
Jan Glauber [Wed, 1 Feb 2006 11:06:34 +0000 (03:06 -0800)]
[PATCH] s390: hangcheck timer support

Remove useless s390 define from hangcheck-timer, remove wrong definition of a
TOD second and other s390 ifdefs.  Use monotonic_clock instead.

Add hangcheck-timer option, copied from drivers/char/Kconfig.  This is ugly
but unless we have a big Kconfig cleanup we cannot include
drivers/char/Kconfig...

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: monotonic_clock interface
Jan Glauber [Wed, 1 Feb 2006 11:06:33 +0000 (03:06 -0800)]
[PATCH] s390: monotonic_clock interface

Add monotonic_clock interface, used by the hangcheck-timer.  On s390 this is
the same as sched_clock().

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: overflow in sched_clock
Jan Glauber [Wed, 1 Feb 2006 11:06:32 +0000 (03:06 -0800)]
[PATCH] s390: overflow in sched_clock

The least significant bit of the TOD clock value returned by get_clock
is the 4096th part of a microsecond. To get to nanoseconds the value
needs to be divided by 4096 and multiplied with 1000.

The current method multiplies first and then shifts the value to make the
result as precise as possible.  The disadvantage is that the multiplication
with 1000 will overflow shortly after 52 days.  sched_clock is used by the
scheduler for time stamp deltas, if an overflow occurs between two time stamps
the scheduler will get confused.

With the patch the problem occurs only after approx.  one year, so the chance
to run into this overflow is extremly low.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: Remove CVS generated information
Heiko Carstens [Wed, 1 Feb 2006 11:06:31 +0000 (03:06 -0800)]
[PATCH] s390: Remove CVS generated information

- Remove all CVS generated information like e.g. revision IDs from
  drivers/s390 and include/asm-s390 (none present in arch/s390).

- Add newline at end of arch/s390/lib/Makefile to avoid diff message.

Acked-by: Andreas Herrmann <aherrman@de.ibm.com>
Acked-by: Frank Pavlic <pavlic@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] xtensa: add asm/futex.h
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:30 +0000 (03:06 -0800)]
[PATCH] xtensa: add asm/futex.h

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:29 +0000 (03:06 -0800)]
[PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages

      Olaf Hering <olh@suse.de>

Olaf reported UML doesn't build for him with a clear analisys of what happened
- we're using NR_CPUS in files linked against glibc headers.  Seems like it
defines CONFIG_SMP but not CONFIG_NR_CPUS, so we get CONFIG_NR_CPUS
undeclared.

The fix is to move the declaration away from that header file and move it in
asm-um headers, and to add that header where needed.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: some harmless sparse warning fixes
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:29 +0000 (03:06 -0800)]
[PATCH] uml: some harmless sparse warning fixes

Fix some simple sparse warnings - a lot more staticness and a misplaced
__user.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: skas0-hold-own-ldt fixups for x86-64
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:28 +0000 (03:06 -0800)]
[PATCH] uml: skas0-hold-own-ldt fixups for x86-64

In a recent fixup i386 code was copied raw to x86_64 subarch to make it
compile again.

Here there are some little fixups and resyncs needed for it (mainly for
cleanliness sake) - I did an audit and found the rest of the code to be safe.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:27 +0000 (03:06 -0800)]
[PATCH] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup

Fixes a bug introduced in commit e32dacb9f481fd6decb41adb28e720c923d34f54 -
index is initialized based on syscall before syscall is calculated.

I'm bothering with this mainly because it gives a correct warning when the
config option is enabled, even if the code is for a almost unused debugging
option.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix "apples/bananas" typo
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:26 +0000 (03:06 -0800)]
[PATCH] uml: fix "apples/bananas" typo

Fix stupid typo.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix hugest stack users
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:25 +0000 (03:06 -0800)]
[PATCH] uml: fix hugest stack users

The C99 initialization, with GCC's bad handling, for 6K wide structs (which
_aren't_ on the stack), is causing GCC to use 12K for these silly procs with 3
vars.  Workaround this.

Note that .name = { '\0' } translates to memset(->name, 0, '->name' size) - I verified
this with GCC's docs and a testprogram.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: comments about libc-conflict guards
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:25 +0000 (03:06 -0800)]
[PATCH] uml: comments about libc-conflict guards

While fixing myself the mktime conflict (which someone already merged), I also
improved a few comments.  Merge them up.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: typo fixup
Paolo 'Blaisorblade' Giarrusso [Wed, 1 Feb 2006 11:06:24 +0000 (03:06 -0800)]
[PATCH] uml: typo fixup

Trivial innocent cosmetical fixup.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix some typos
Jeff Dike [Wed, 1 Feb 2006 11:06:23 +0000 (03:06 -0800)]
[PATCH] uml: fix some typos

Fix a couple of typos.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: add a build dependency
Jeff Dike [Wed, 1 Feb 2006 11:06:22 +0000 (03:06 -0800)]
[PATCH] uml: add a build dependency

kern_constants.h now depends on arch/um/include to make sure it exists
before we try to create symlinks in it.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: select BLK_DEV_FD only on A5K
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:22 +0000 (03:06 -0800)]
[PATCH] arm26: select BLK_DEV_FD only on A5K

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: add __kernel_old_dev_t for nfsd
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:21 +0000 (03:06 -0800)]
[PATCH] arm26: add __kernel_old_dev_t for nfsd

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: drop first arg of prepare_arch_switch, finish_arch_switch
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:20 +0000 (03:06 -0800)]
[PATCH] arm26: drop first arg of prepare_arch_switch, finish_arch_switch

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: drop local task_running copy
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:20 +0000 (03:06 -0800)]
[PATCH] arm26: drop local task_running copy

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: fixup asm statement in kernel/fiq.c
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:19 +0000 (03:06 -0800)]
[PATCH] arm26: fixup asm statement in kernel/fiq.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: fixup get_signal_to_deliver call
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:18 +0000 (03:06 -0800)]
[PATCH] arm26: fixup get_signal_to_deliver call

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: select system type via "choice"
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:17 +0000 (03:06 -0800)]
[PATCH] arm26: select system type via "choice"

Choosing ARCH_ARC and ARCH_A5K together causes redefining and errors
here and there.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: remove irq_exit() from hardirq.h
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:17 +0000 (03:06 -0800)]
[PATCH] arm26: remove irq_exit() from hardirq.h

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: fix warnings about NR_IRQS being not defined
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:16 +0000 (03:06 -0800)]
[PATCH] arm26: fix warnings about NR_IRQS being not defined

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arm26: fix find_first_zero_bit related warnings
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:14 +0000 (03:06 -0800)]
[PATCH] arm26: fix find_first_zero_bit related warnings

include/linux/nodemask.h: In function `__first_unset_node':
include/linux/nodemask.h:254: warning: passing arg 1 of `_find_first_zero_bit_le' discards qualifiers from pointer target type
fs/minix/bitmap.c: In function `minix_new_block':
fs/minix/bitmap.c:89: warning: passing arg 1 of `_find_first_zero_bit_le' from incompatible pointer type

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha show_interrups() trashes argument
Eric Sesterhenn [Wed, 1 Feb 2006 11:06:13 +0000 (03:06 -0800)]
[PATCH] alpha show_interrups() trashes argument

This is a bug found by cpminer.  The show_interrupts function reuses i as a
for loop counter, and therefore trashes its contents, which are needed
later.

(akpm: rename local `i' to `irq', use for_each_inline_cpu())

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha: Fix getxpid on alpha so it works for threads
Eric W. Biederman [Wed, 1 Feb 2006 11:06:12 +0000 (03:06 -0800)]
[PATCH] alpha: Fix getxpid on alpha so it works for threads

While looking in the code I discovered that alpha has fallen behind because
it doesn't use sys_getppid.  The problem is that it doesn't follow the task
struct to the task_group_leader.

Acked-by: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] VMSPLIT config options
Mark Lord [Wed, 1 Feb 2006 11:06:11 +0000 (03:06 -0800)]
[PATCH] VMSPLIT config options

Enable selection of different user/kernel VM splits for i386, including an
optimized mode for 1GB physical RAM, which gives the kernel a direct (non
HIGHMEM) mapping to the entire 1GB rather than just the first 896MB.

There is a similarly a similarly optimized mode for machines with exactly 2GB
of physical RAM.

This can speed up the kernel by avoiding having to create/destroy temporary
HIGHMEM mappings, and by not having to include HIGHMEM support at all on such
machines.  The flip side is that there's less virtual addressing left for
userspace in these alternatives, and some binary-only kernel modules may
misbehave unless rebuilt with the same VMSPLIT option as the main kernel
image.

Original idea/patch from Jens Axboe, modified based on suggestions from Linus
et al.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arch/sh64/kernel/time.c: add module.h
Alexey Dobriyan [Wed, 1 Feb 2006 11:06:09 +0000 (03:06 -0800)]
[PATCH] arch/sh64/kernel/time.c: add module.h

It uses EXPORT_SYMBOL.

arch/sh64/kernel/time.c:254: warning: type defaults to `int' in declaration of `EXPORT_SYMBOL'
arch/sh64/kernel/time.c:254: warning: parameter names (without types) in function declaration
arch/sh64/kernel/time.c:254: warning: data definition has no type or storage class

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh/sh64: Fix bogus TIOCGICOUNT definitions
Paul Mundt [Wed, 1 Feb 2006 11:06:09 +0000 (03:06 -0800)]
[PATCH] sh/sh64: Fix bogus TIOCGICOUNT definitions

As reported by Russell King, sh and sh64 currently have bogus definitions for
TIOCGICOUNT, particularly referencing a kernel only structure.  Switch to
using a sensible ioctl value.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: machine_halt()/machine_power_off() cleanups
Paul Mundt [Wed, 1 Feb 2006 11:06:08 +0000 (03:06 -0800)]
[PATCH] sh: machine_halt()/machine_power_off() cleanups

machine_halt() managed to trigger the soft lockup detection due to not
disabling interrupts before going to sleep, so correct that.

machine_power_off() should be using pm_power_off, which lets us drop the
board-specific hacks from here.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: Add missing timers directory rule to build
Paul Mundt [Wed, 1 Feb 2006 11:06:07 +0000 (03:06 -0800)]
[PATCH] sh: Add missing timers directory rule to build

This should have been part of the timer framework support that was merged
earlier, but looks to have been accidentally omitted.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: sh-sci clock framework updates
Paul Mundt [Wed, 1 Feb 2006 11:06:06 +0000 (03:06 -0800)]
[PATCH] sh: sh-sci clock framework updates

A couple of updates for the sh-sci serial driver:

- Update for clock framework on sh.
- Fix a compile error introduced by some h8300 changes.
- Add SH7770/SH7780 subtype support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: convert voyagergx to platform device, drop sh-bus
Paul Mundt [Wed, 1 Feb 2006 11:06:05 +0000 (03:06 -0800)]
[PATCH] sh: convert voyagergx to platform device, drop sh-bus

Trivial patch updating the voyagergx cchip code to reference a platform device
instead, now that the dma mask is taken care of.  Given this, there's no
longer any reason to drag around the SH-bus code, so kill that off entirely.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: drop maskpos from make_ipr_irq(), remove duplicate irq definitions
Paul Mundt [Wed, 1 Feb 2006 11:06:04 +0000 (03:06 -0800)]
[PATCH] sh: drop maskpos from make_ipr_irq(), remove duplicate irq definitions

Clean up some of the subtype IRQ definitions for IPR IRQ, and consolidate the
make_ipr_irq() definitions by dropping maskpos.  SH-4A was the only thing
interested in the maskpos, and this should be handled through INTC2 rather
than IPR.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: unknown mach-type updates
Paul Mundt [Wed, 1 Feb 2006 11:06:03 +0000 (03:06 -0800)]
[PATCH] sh: unknown mach-type updates

Trivial cleanup of the unknown machine type for some of the recent machvec
changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: Cleanup struct sh_cpuinfo for clock framework changes
Paul Mundt [Wed, 1 Feb 2006 11:06:02 +0000 (03:06 -0800)]
[PATCH] sh: Cleanup struct sh_cpuinfo for clock framework changes

Now that the clock framework changes have been integrated, the manual clock
accounting that was done in sh_cpuinfo can be dropped.

Also correct a bug with running past the end of the CPU flags when there's a
mismatch between the added flags and printed ones.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: Move TRA/EXPEVT/INTEVT definitions for reuse
Paul Mundt [Wed, 1 Feb 2006 11:06:01 +0000 (03:06 -0800)]
[PATCH] sh: Move TRA/EXPEVT/INTEVT definitions for reuse

Currently entry.S is home to these definitions, so we move them somewhere more
sensible.  IPR IRQ handling depends on being to read from INTEVT.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: Make peripheral clock frequency setting mandatory
Paul Mundt [Wed, 1 Feb 2006 11:06:01 +0000 (03:06 -0800)]
[PATCH] sh: Make peripheral clock frequency setting mandatory

Pretty much every subtype does this now anyways, and as we depend on it in a
few places being set to something sensible quite early on, it's better for a
new subtype to simply set a sensible default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: SH4-202 microdev updates
Paul Mundt [Wed, 1 Feb 2006 11:05:59 +0000 (03:05 -0800)]
[PATCH] sh: SH4-202 microdev updates

A few trivial updates for the microdev board support code:

- Update for __IO_PREFIX changes.
- Consolidate headers into a single microdev.h.
- Update the microdev_defconfig.
- Add init values for the S1D13806 used by s1d13xxxfb.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: Fix sigmask handling in sys_sigsuspend.
Heiko Carstens [Wed, 1 Feb 2006 11:05:58 +0000 (03:05 -0800)]
[PATCH] powerpc: Fix sigmask handling in sys_sigsuspend.

Better save the sigmask instead of throwing it away so it can be restored.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] MODALIAS= for macio
Olaf Hering [Wed, 1 Feb 2006 11:05:58 +0000 (03:05 -0800)]
[PATCH] MODALIAS= for macio

Prodive a MODALIAS= enviroment variable for devices on the mac-io bus.
Change the buffer length counter to not waste memory by advancing the
pointer for the next string too far.  Tested on an ibook1 with modular
pmac_zilog.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: fix for kexec ppc32
Albert Herranz [Wed, 1 Feb 2006 11:05:57 +0000 (03:05 -0800)]
[PATCH] powerpc: fix for kexec ppc32

- kexec.h is included from assembly code, thus C code must be properly
  protected.

- (embedded) ppc32 systems use machine_kexec_simple whose declaration
  vanished during a recent powerpc merge change.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: <fastboot@osdl.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] selinux: remove security struct magic number fields and tests
Stephen Smalley [Wed, 1 Feb 2006 11:05:56 +0000 (03:05 -0800)]
[PATCH] selinux: remove security struct magic number fields and tests

Remove the SELinux security structure magic number fields and tests, along
with some unnecessary tests for NULL security pointers.  These fields and
tests are leftovers from the early attempts to support SELinux as a
loadable module during LSM development.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] selinux: change file_alloc_security to use GFP_KERNEL
Stephen Smalley [Wed, 1 Feb 2006 11:05:55 +0000 (03:05 -0800)]
[PATCH] selinux: change file_alloc_security to use GFP_KERNEL

This patch changes the SELinux file_alloc_security function to use
GFP_KERNEL rather than GFP_ATOMIC; the use of GFP_ATOMIC appears to be a
remnant of when this function was being called with the files_lock spinlock
held, and is no longer necessary.  Please apply.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] selinux: fix and cleanup mprotect checks
Stephen Smalley [Wed, 1 Feb 2006 11:05:54 +0000 (03:05 -0800)]
[PATCH] selinux: fix and cleanup mprotect checks

Fix the SELinux mprotect checks on executable mappings so that they are not
re-applied when the mapping is already executable as well as cleaning up
the code.  This avoids a situation where e.g.  an application is prevented
from removing PROT_WRITE on an already executable mapping previously
authorized via execmem permission due to an execmod denial.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: fix sparse warning
Randy Dunlap [Wed, 1 Feb 2006 11:05:53 +0000 (03:05 -0800)]
[PATCH] slab: fix sparse warning

mm/slab.c:1522:13: error: incompatible types for operation (&)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm/slab: add kernel-doc for one function
Randy.Dunlap [Wed, 1 Feb 2006 11:05:52 +0000 (03:05 -0800)]
[PATCH] mm/slab: add kernel-doc for one function

Fix kernel-doc for calculate_slab_order().

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: fix kzalloc and kstrdup caller report for CONFIG_DEBUG_SLAB
Pekka Enberg [Wed, 1 Feb 2006 11:05:52 +0000 (03:05 -0800)]
[PATCH] slab: fix kzalloc and kstrdup caller report for CONFIG_DEBUG_SLAB

Fix kzalloc() and kstrdup() caller report for CONFIG_DEBUG_SLAB.  We must
pass the caller to __cache_alloc() instead of directly doing
__builtin_return_address(0) there; otherwise kzalloc() and kstrdup() are
reported as the allocation site instead of the real one.

Thanks to Valdis Kletnieks for reporting the problem and Steven Rostedt for
the original idea.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] dump_stack() in oom handler
Andrew Morton [Wed, 1 Feb 2006 11:05:51 +0000 (03:05 -0800)]
[PATCH] dump_stack() in oom handler

Sometimes it's nice to know who's calling.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: replace kmem_cache_t with struct kmem_cache
Pekka Enberg [Wed, 1 Feb 2006 11:05:50 +0000 (03:05 -0800)]
[PATCH] slab: replace kmem_cache_t with struct kmem_cache

Replace uses of kmem_cache_t with proper struct kmem_cache in mm/slab.c.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: rename ac_data to cpu_cache_get
Pekka Enberg [Wed, 1 Feb 2006 11:05:49 +0000 (03:05 -0800)]
[PATCH] slab: rename ac_data to cpu_cache_get

Rename the ac_data() function to more descriptive cpu_cache_get().

Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: extract virt_to_{cache|slab}
Pekka Enberg [Wed, 1 Feb 2006 11:05:49 +0000 (03:05 -0800)]
[PATCH] slab: extract virt_to_{cache|slab}

Introduce virt_to_cache() and virt_to_slab() functions to reduce duplicate
code and introduce a proper abstraction should we want to support other kind
of mapping for address to slab and cache (eg.  for vmalloc() or I/O memory).

Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: reduce inlining
Pekka Enberg [Wed, 1 Feb 2006 11:05:48 +0000 (03:05 -0800)]
[PATCH] slab: reduce inlining

From: Manfred Spraul <manfred@colorfullife.com>

Reduce the amount of inline functions in slab to the functions that
are used in the hot path:

  - no inline for debug functions
  - no __always_inline, inline is already __always_inline
  - remove inline from a few numa support functions.

Before:

   text    data     bss     dec     hex filename
  13588     752      48   14388    3834 mm/slab.o (defconfig)
  16671    2492      48   19211    4b0b mm/slab.o (numa)

After:

   text    data     bss     dec     hex filename
  13366     752      48   14166    3756 mm/slab.o (defconfig)
  16230    2492      48   18770    4952 mm/slab.o (numa)

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: extract slab_{put|get}_obj
Matthew Dobson [Wed, 1 Feb 2006 11:05:47 +0000 (03:05 -0800)]
[PATCH] slab: extract slab_{put|get}_obj

Create two helper functions slab_get_obj() and slab_put_obj() to replace
duplicated code in mm/slab.c

Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: extract slab_destroy_objs()
Matthew Dobson [Wed, 1 Feb 2006 11:05:46 +0000 (03:05 -0800)]
[PATCH] slab: extract slab_destroy_objs()

Create a helper function, slab_destroy_objs() which called from
slab_destroy().  This makes slab_destroy() smaller and more readable, and
moves ifdefs outside the function body.

Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: cache_estimate cleanup
Steven Rostedt [Wed, 1 Feb 2006 11:05:45 +0000 (03:05 -0800)]
[PATCH] slab: cache_estimate cleanup

Clean up cache_estimate() in mm/slab.c and improves the algorithm from O(n) to
O(1).  We first calculate the maximum number of objects a slab can hold after
struct slab and kmem_bufctl_t for each object has been given enough space.
After that, to respect alignment rules, we decrease the number of objects if
necessary.  As required padding is at most align-1 and memory of obj_size is
at least align, it is always enough to decrease number of objects by one.

The optimization was originally made by Balbir Singh with more improvements
from Steven Rostedt.  Manfred Spraul provider further modifications: no loop
at all for the off-slab case and added comments to explain the background.

Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: have index_of bug at compile time
Steven Rostedt [Wed, 1 Feb 2006 11:05:44 +0000 (03:05 -0800)]
[PATCH] slab: have index_of bug at compile time

I noticed the code for index_of is a creative way of finding the cache
index using the compiler to optimize to a single hard coded number.  But
I couldn't help noticing that it uses two methods to let you know that
someone used it wrong.  One is at compile time (the correct way), and
the other is at run time (not good).

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: minor cleanup to kmem_cache_alloc_node
Christoph Lameter [Wed, 1 Feb 2006 11:05:43 +0000 (03:05 -0800)]
[PATCH] slab: minor cleanup to kmem_cache_alloc_node

Clean up kmem_cache_alloc_node a bit.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: distinguish between object and buffer size
Manfred Spraul [Wed, 1 Feb 2006 11:05:42 +0000 (03:05 -0800)]
[PATCH] slab: distinguish between object and buffer size

An object cache has two different object lengths:

  - the amount of memory available for the user (object size)
  - the amount of memory allocated internally (buffer size)

This patch does some renames to make the code reflect that better.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Direct Migration V9: Avoid writeback / page_migrate() method
Christoph Lameter [Wed, 1 Feb 2006 11:05:41 +0000 (03:05 -0800)]
[PATCH] Direct Migration V9: Avoid writeback / page_migrate() method

Migrate a page with buffers without requiring writeback

This introduces a new address space operation migratepage() that may be used
by a filesystem to implement its own version of page migration.

A version is provided that migrates buffers attached to pages.  Some
filesystems (ext2, ext3, xfs) are modified to utilize this feature.

The swapper address space operation are modified so that a regular
migrate_page() will occur for anonymous pages without writeback (migrate_pages
forces every anonymous page to have a swap entry).

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Direct Migration V9: upgrade MPOL_MF_MOVE and sys_migrate_pages()
Christoph Lameter [Wed, 1 Feb 2006 11:05:40 +0000 (03:05 -0800)]
[PATCH] Direct Migration V9: upgrade MPOL_MF_MOVE and sys_migrate_pages()

Modify policy layer to support direct page migration

- Add migrate_pages_to() allowing the migration of a list of pages to a a
  specified node or to vma with a specific allocation policy in sets of
  MIGRATE_CHUNK_SIZE pages

- Modify do_migrate_pages() to do a staged move of pages from the source
  nodes to the target nodes.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Direct Migration V9: remove_from_swap() to remove swap ptes
Christoph Lameter [Wed, 1 Feb 2006 11:05:39 +0000 (03:05 -0800)]
[PATCH] Direct Migration V9: remove_from_swap() to remove swap ptes

Add remove_from_swap

remove_from_swap() allows the restoration of the pte entries that existed
before page migration occurred for anonymous pages by walking the reverse
maps.  This reduces swap use and establishes regular pte's without the need
for page faults.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Direct Migration V9: migrate_pages() extension
Christoph Lameter [Wed, 1 Feb 2006 11:05:38 +0000 (03:05 -0800)]
[PATCH] Direct Migration V9: migrate_pages() extension

Add direct migration support with fall back to swap.

Direct migration support on top of the swap based page migration facility.

This allows the direct migration of anonymous pages and the migration of file
backed pages by dropping the associated buffers (requires writeout).

Fall back to swap out if necessary.

The patch is based on lots of patches from the hotplug project but the code
was restructured, documented and simplified as much as possible.

Note that an additional patch that defines the migrate_page() method for
filesystems is necessary in order to avoid writeback for anonymous and file
backed pages.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Direct Migration V9: PageSwapCache checks
Christoph Lameter [Wed, 1 Feb 2006 11:05:36 +0000 (03:05 -0800)]
[PATCH] Direct Migration V9: PageSwapCache checks

Check for PageSwapCache after looking up and locking a swap page.

The page migration code may change a swap pte to point to a different page
under lock_page().

If that happens then the vm must retry the lookup operation in the swap space
to find the correct page number.  There are a couple of locations in the VM
where a lock_page() is done on a swap page.  In these locations we need to
check afterwards if the page was migrated.  If the page was migrated then the
old page that was looked up before was freed and no longer has the
PageSwapCache bit set.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Reclaim slab during zone reclaim
Christoph Lameter [Wed, 1 Feb 2006 11:05:35 +0000 (03:05 -0800)]
[PATCH] Reclaim slab during zone reclaim

If large amounts of zone memory are used by empty slabs then zone_reclaim
becomes uneffective.  This patch shakes the slab a bit.

The problem with this patch is that the slab reclaim is not containable to a
zone.  Thus slab reclaim may affect the whole system and be extremely slow.
This also means that we cannot determine how many pages were freed in this
zone.  Thus we need to go off node for at least one allocation.

The functionality is disabled by default.

We could modify the shrinkers to take a zone parameter but that would be quite
invasive.  Better ideas are welcome.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Zone reclaim: Allow modification of zone reclaim behavior
Christoph Lameter [Wed, 1 Feb 2006 11:05:34 +0000 (03:05 -0800)]
[PATCH] Zone reclaim: Allow modification of zone reclaim behavior

In some situations one may want zone_reclaim to behave differently.  For
example a process writing large amounts of memory will spew unto other nodes
to cache the writes if many pages in a zone become dirty.  This may impact the
performance of processes running on other nodes.

Allowing writes during reclaim puts a stop to that behavior and throttles the
process by restricting the pages to the local zone.

Similarly one may want to contain processes to local memory by enabling
regular swap behavior during zone_reclaim.  Off node memory allocation can
then be controlled through memory policies and cpusets.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zone_reclaim: configurable off node allocation period.
Christoph Lameter [Wed, 1 Feb 2006 11:05:33 +0000 (03:05 -0800)]
[PATCH] zone_reclaim: configurable off node allocation period.

Currently the zone_reclaim code has a fixed window of 30 seconds of off node
allocations should a local zone have no unused pagecache pages left.  Reclaim
will be attempted again after this timeout period to avoid repeated useless
scans for memory.  This is also useful to established sufficiently large off
node allocation chunks to relieve the local node.

It may be beneficial to adjust that time period for some special situations.
For example if memory use was exceeding node capacity one may want to give up
for longer periods of time.  If memory spikes intermittendly then one may want
to shorten the time period to reduce the number of off node allocations.

This patch allows just that....

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>