linux-2.6
19 years ago[PATCH] ARM: fix debug macros
Russell King [Sun, 17 Apr 2005 15:28:31 +0000 (16:28 +0100)] 
[PATCH] ARM: fix debug macros

Fix debug EBSA285 and RiscPC debugging macros to detect whether the
MMU is enabled.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
19 years ago[PATCH] ARM: bitops
Russell King [Sun, 17 Apr 2005 14:51:02 +0000 (15:51 +0100)] 
[PATCH] ARM: bitops

Convert ARM bitop assembly to a macro.  All bitops follow the same
format, so it's silly duplicating the code when only one or two
instructions are different.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
19 years ago[PATCH] ARM: showregs
Russell King [Sun, 17 Apr 2005 14:50:36 +0000 (15:50 +0100)] 
[PATCH] ARM: showregs

Fix show_regs() to provide a backtrace.  Provide a new __show_regs()
function which implements the common subset of show_regs() and die().
Add prototypes to asm-arm/system.h

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
19 years ago[PATCH] ARM: h3600_irda_set_speed arguments
Russell King [Sun, 17 Apr 2005 14:40:46 +0000 (15:40 +0100)] 
[PATCH] ARM: h3600_irda_set_speed arguments

h3600_irda_set_speed() had the wrong type for the "speed" argument.
Fix this.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
19 years ago[PATCH] ARM: footbridge rtc init
Russell King [Sun, 17 Apr 2005 14:36:55 +0000 (15:36 +0100)] 
[PATCH] ARM: footbridge rtc init

The footbridge ISA RTC was being initialised before we had setup the
kernel timer.  This caused a divide by zero error when the current
time of day is set.  Resolve this by initialising the RTC after
the kernel timer has been initialised.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
19 years ago[PATCH] md: remove a number of misleading calls to MD_BUG
NeilBrown [Sat, 16 Apr 2005 22:26:42 +0000 (15:26 -0700)] 
[PATCH] md: remove a number of misleading calls to MD_BUG

The conditions that cause these calls to MD_BUG are not kernel bugs, just
oddities in what userspace is asking for.

Also convert analyze_sbs to return void, and the value it returned was
always 0.

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>
19 years ago[PATCH] md: close a small race in md thread deregistration
NeilBrown [Sat, 16 Apr 2005 22:26:41 +0000 (15:26 -0700)] 
[PATCH] md: close a small race in md thread deregistration

There is a tiny race when de-registering an MD thread, in that the thread
could disappear before it is set a SIGKILL, causing send_sig to have
problems.

This is most easily closed by holding tasklist_lock between enabling the
thread to exit (setting ->run to NULL) and telling it to exit.

(akpm: ick.  Needs to use kthread API and stop using signals)

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>
19 years ago[PATCH] fbdev MAINTAINERS update
Benjamin Herrenschmidt [Sat, 16 Apr 2005 22:26:40 +0000 (15:26 -0700)] 
[PATCH] fbdev MAINTAINERS update

This patch does the long overdue updates to MAINTAINERS file for aty128fb
and radeonfb.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] serial: fix comments in 8250.c
Russell King [Sat, 16 Apr 2005 22:26:39 +0000 (15:26 -0700)] 
[PATCH] serial: fix comments in 8250.c

Fix the formatting of some comments in 8250.c, and add a note that the
register_serial / unregister_serial shouldn't be used in new code.

We do this here in preference to adding to linux/serial.h, since that is used
by a number of non-8250 drivers which pretend to be 8250.  It is not known
whether it would be appropriate to do so.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] nfsd4: fix struct file leak
NeilBrown [Sat, 16 Apr 2005 22:26:38 +0000 (15:26 -0700)] 
[PATCH] nfsd4: fix struct file leak

We were failing to close on an error path, resulting in a leak of struct files
which could take a v4 server down fairly quickly....  So call
nfs4_close_delegation instead of just open-coding parts of it.

Simplify the cleanup on delegation failure while we're at it.

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>
19 years ago[PATCH] nfsd4: callback create rpc client returns
NeilBrown [Sat, 16 Apr 2005 22:26:38 +0000 (15:26 -0700)] 
[PATCH] nfsd4: callback create rpc client returns

rpc_create_clnt and friends return errors, not NULL, on failure.

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>
19 years ago[PATCH] nfsd: clear signals before exiting the nfsd() thread
NeilBrown [Sat, 16 Apr 2005 22:26:37 +0000 (15:26 -0700)] 
[PATCH] nfsd: clear signals before exiting the nfsd() thread

Fixes the error "RPC: failed to contact portmap (errno -512)." when the server
later tries to unregister from the portmapper.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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>
19 years ago[PATCH] jbd dirty buffer leak fix
akpm@osdl.org [Sat, 16 Apr 2005 22:26:36 +0000 (15:26 -0700)] 
[PATCH] jbd dirty buffer leak fix

This fixes the lots-of-fsx-linux-instances-cause-a-slow-leak bug.

It's been there since 2.6.6, caused by:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm4/broken-out/jbd-move-locked-buffers.patch

That patch moves under-writeout ordered-data buffers onto a separate journal
list during commit.  It took out the old code which was based on a single
list.

The old code (necessarily) had logic which would restart I/O against buffers
which had been redirtied while they were on the committing transaction's
t_sync_datalist list.  The new code only writes buffers once, ignoring
redirtyings by a later transaction, which is good.

But over on the truncate side of things, in journal_unmap_buffer(), we're
treating buffers on the t_locked_list as inviolable things which belong to the
committing transaction, and we just leave them alone during concurrent
truncate-vs-commit.

The net effect is that when truncate tries to invalidate a page whose buffers
are on t_locked_list and have been redirtied, journal_unmap_buffer() just
leaves those buffers alone.  truncate will remove the page from its mapping
and we end up with an anonymous clean page with dirty buffers, which is an
illegal state for a page.  The JBD commit will not clean those buffers as they
are removed from t_locked_list.  The VM (try_to_free_buffers) cannot reclaim
these pages.

The patch teaches journal_unmap_buffer() about buffers which are on the
committing transaction's t_locked_list.  These buffers have been written and
I/O has completed.  We can take them off the transaction and undirty them
within the context of journal_invalidatepage()->journal_unmap_buffer().

Acked-by: "Stephen C. Tweedie" <sct@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] drivers/infiniband/hw/mthca/mthca_main.c: remove an unused label
Roland Dreier [Sat, 16 Apr 2005 22:26:35 +0000 (15:26 -0700)] 
[PATCH] drivers/infiniband/hw/mthca/mthca_main.c: remove an unused label

Correct unwinding in error path of mthca_init_icm().

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: add support for new MT25204 HCA
Roland Dreier [Sat, 16 Apr 2005 22:26:34 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: add support for new MT25204 HCA

Decouple table of HCA features from exact HCA device type.  Add a current FW
version field so we can warn when someone is using old FW.  Add support for
new MT25204 HCA.

Remove the warning about mem-free support, since it should be pretty solid at
this point.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: map context for RDMA responder in mem-free mode
Roland Dreier [Sat, 16 Apr 2005 22:26:34 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: map context for RDMA responder in mem-free mode

Fix RDMA in mem-free mode: we need to make sure that the RDMA context memory
is mapped for the HCA.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: update receive queue initialization for new HCAs
Roland Dreier [Sat, 16 Apr 2005 22:26:33 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: update receive queue initialization for new HCAs

Update initialization of receive queue to match new documentation.  This
change is required to support new MT25204 HCA.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: encapsulate mem-free check into mthca_is_memfree()
Roland Dreier [Sat, 16 Apr 2005 22:26:32 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: encapsulate mem-free check into mthca_is_memfree()

Clean up mem-free mode support by introducing mthca_is_memfree() function,
which encapsulates the logic of deciding if a device is mem-free.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: tweaks to mthca_cmd.c
Roland Dreier [Sat, 16 Apr 2005 22:26:31 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: tweaks to mthca_cmd.c

Minor tweaks to firmware command handling: kill off an unused get of a value,
and add a little more info to debug output.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: add fast memory region implementation
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:30 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: add fast memory region implementation

Implement fast memory regions (FMRs), where the driver writes directly into
the HCA's translation tables rather than requiring a firmware command.  For
Tavor, MTTs for FMR are separate from regular MTTs, and are reserved at driver
initialization.  This is done to limit the amount of virtual memory needed to
map the MTTs.  For Arbel, there's no such limitation, and all MTTs and MPTs
may be used for FMR or for regular MR.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: split MR key munging routines
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:30 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: split MR key munging routines

Split Tavor and Arbel/mem-free index<->hw key munging routines, so that FMR
implementation can call correct implementation without testing HCA type (which
it already knows).

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: add mthca_table_find() function
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:29 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: add mthca_table_find() function

Add mthca_table_find() function, which returns the lowmem address of an entry
in a mem-free HCA's context tables.  This will be used by the FMR
implementation.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: add SYNC_TPT firmware command
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:28 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: add SYNC_TPT firmware command

Add code for SYNC_TPT firmware command, which will be used by FMR
implementation.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: add mthca_write64_raw() for writing to MTT table directly
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:27 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: add mthca_write64_raw() for writing to MTT table directly

Add mthca_write64_raw() function, which will be used to write FMR entries that
are in ioremapped PCI memory.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: encapsulate MTT buddy allocator
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:26 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: encapsulate MTT buddy allocator

Encapsulate the buddy allocator used for MTT segments.  This cleans up the
code and also gets us ready to add FMR support.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: allow address handle creation in interrupt context
Roland Dreier [Sat, 16 Apr 2005 22:26:26 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: allow address handle creation in interrupt context

Make address handle verbs usable from interrupt context.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fill in opcode field for send completions
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:25 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fill in opcode field for send completions

Fill in missing fields in send completions.

Signed-off-by: Itamar Rabenstein <itamar@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fix MTT allocation in mem-free mode
Roland Dreier [Sat, 16 Apr 2005 22:26:24 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fix MTT allocation in mem-free mode

Fix bug in MTT allocation in mem-free mode.

I misunderstood the MTT size value returned by the firmware -- it is really
the size of a single MTT entry, since mem-free mode does not segment the MTT
as the original firmware did.  This meant that our MTT addresses ended up
being off by a factor of 8.  This meant that our MTT allocations might
overlap, and so we could overwrite and corrupt earlier memory regions when
writing new MTT entries.

We fix this by always using our 64-byte MTT segment size.  This allows some
simplification of the code as well, since there's no reason to put the MTT
segment size in a variable -- we can always use our enum value directly.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: implement RDMA/atomic operations for mem-free mode
Roland Dreier [Sat, 16 Apr 2005 22:26:23 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: implement RDMA/atomic operations for mem-free mode

Add code to support RDMA and atomic send work requests in mem-free mode.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fix format of CQ number for CQ events
Roland Dreier [Sat, 16 Apr 2005 22:26:22 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fix format of CQ number for CQ events

CQ numbers are only 24 bits, so only print 6 hex digits and mask off reserved
part when reporting a CQ event.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: only free doorbell records in mem-free mode
Roland Dreier [Sat, 16 Apr 2005 22:26:21 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: only free doorbell records in mem-free mode

On error path, only free doorbell records if we're in mem-free mode.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: print assigned IRQ when interrupt test fails
Roland Dreier [Sat, 16 Apr 2005 22:26:21 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: print assigned IRQ when interrupt test fails

Print IRQ number when NOP command interrupt test fails to help debugging.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: release mutex on doorbell alloc error path
Roland Dreier [Sat, 16 Apr 2005 22:26:20 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: release mutex on doorbell alloc error path

Release mutex on error return path from mthca_alloc_db().

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fix MR allocation error path
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:19 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fix MR allocation error path

Fix error handling in MR allocation for mem-free mode: mthca_free must get an
MR index, not a key.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: allocate correct number of doorbell pages
Roland Dreier [Sat, 16 Apr 2005 22:26:18 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: allocate correct number of doorbell pages

Doorbell record pages are allocated in HCA page size chunks (always 4096
bytes), so we need to divide by 4096 and not PAGE_SIZE when figuring out how
many pages we'll need space for.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: clean up mthca_dereg_mr()
Roland Dreier [Sat, 16 Apr 2005 22:26:17 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: clean up mthca_dereg_mr()

It's cleaner to kfree mthca_mr, and not rely on the fact that ib_mr is the
first field in mthca_mr.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: allow unaligned memory regions
Michael S. Tsirkin [Sat, 16 Apr 2005 22:26:16 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: allow unaligned memory regions

The first buffer of a memory region is not required to be page-aligned, so
don't return an error if it's not.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fix posting sends with immediate data
Roland Dreier [Sat, 16 Apr 2005 22:26:16 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fix posting sends with immediate data

When posting a work request with immediate data, put the immediate data in the
immediate data field of the hardware's work request (rather than overwriting
the flags field).

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fix calculation of RDB shift
Roland Dreier [Sat, 16 Apr 2005 22:26:15 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fix calculation of RDB shift

Fix calculation of rdb_shift by using original number of QPs, not
their slot in profile[] (which will be rearranged when we sort it).

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: fill in more device query fields
Roland Dreier [Sat, 16 Apr 2005 22:26:14 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: fill in more device query fields

Implement more of the device_query method in mthca.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB/mthca: map MPT/MTT context in mem-free mode
Roland Dreier [Sat, 16 Apr 2005 22:26:13 +0000 (15:26 -0700)] 
[PATCH] IB/mthca: map MPT/MTT context in mem-free mode

In mem-free mode, when allocating memory regions, make sure that the HCA has
context memory mapped to cover the virtual space used for the MPT and MTTs
being used.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: Remove incorrect comments
Hal Rosenstock [Sat, 16 Apr 2005 22:26:12 +0000 (15:26 -0700)] 
[PATCH] IB: Remove incorrect comments

Eliminate unneeded and misleading comments

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: Fix user MAD registrations with class 0
Roland Dreier [Sat, 16 Apr 2005 22:26:11 +0000 (15:26 -0700)] 
[PATCH] IB: Fix user MAD registrations with class 0

Fix handling of MAD agent registrations with mgmt_class == 0.  In this case
ib_umad should pass a NULL registration request to the MAD core rather than a
request with mgmt_class set to 0.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: Trivial FMR printk cleanup
Libor Michalek [Sat, 16 Apr 2005 22:26:11 +0000 (15:26 -0700)] 
[PATCH] IB: Trivial FMR printk cleanup

Add missing newline in printk.

Signed-off-by: Libor Michalek <libor@topspin.com>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: Fix FMR pool crash
Roland Dreier [Sat, 16 Apr 2005 22:26:10 +0000 (15:26 -0700)] 
[PATCH] IB: Fix FMR pool crash

Mask bits correctly from jhash result in ib_fmr_hash() so that the
computed bucket index is within our hash table.  This fixes an SDP
crash.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: remove unneeded includes
Hal Rosenstock [Sat, 16 Apr 2005 22:26:09 +0000 (15:26 -0700)] 
[PATCH] IB: remove unneeded includes

Eliminate no longer needed include files

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: Keep MAD work completion valid
Sean Hefty [Sat, 16 Apr 2005 22:26:08 +0000 (15:26 -0700)] 
[PATCH] IB: Keep MAD work completion valid

Replace the *wc field in ib_mad_recv_wc from pointing to a structure on the
stack to one allocated with the received MAD buffer.  This allows a client to
access the *wc field after their receive completion handler has returned.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IPoIB: document conversion to debugfs
Roland Dreier [Sat, 16 Apr 2005 22:26:07 +0000 (15:26 -0700)] 
[PATCH] IPoIB: document conversion to debugfs

Update IPoIB documentation now that multicast debugging files have moved from
ipoibdebugfs to debugfs.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IPoIB: convert to debugfs
Roland Dreier [Sat, 16 Apr 2005 22:26:07 +0000 (15:26 -0700)] 
[PATCH] IPoIB: convert to debugfs

Convert IPoIB to use debugfs instead of its own custom debugging filesystem.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IPoIB: fix static rate calculation
Roland Dreier [Sat, 16 Apr 2005 22:26:06 +0000 (15:26 -0700)] 
[PATCH] IPoIB: fix static rate calculation

Correct and simplify calculation of static rate.  We need to round up the
quotient of (local_rate - path_rate) / path_rate.  To round up we add
(path_rate - 1) to the numerator, so the quotient simplifies to (local_rate -
1) / path_rate.

No idea how I came up with the old formula.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IPoIB: set skb->mac.raw on receive
Hal Rosenstock [Sat, 16 Apr 2005 22:26:05 +0000 (15:26 -0700)] 
[PATCH] IPoIB: set skb->mac.raw on receive

Set skb->mac.raw on receive.  This fixes crashes when this is
dereferenced, for example by netfilter or when PF_PACKET is used.

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Maintainers list update: linux-net -> netdev
Horms [Sat, 16 Apr 2005 22:26:03 +0000 (15:26 -0700)] 
[PATCH] Maintainers list update: linux-net -> netdev

Use netdev as the mailing list contact instead of the mostly dead linux-net
list.

Signed-off-by: Horms <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] arm: fix floppy disk dependencies
Russell King [Sat, 16 Apr 2005 22:26:02 +0000 (15:26 -0700)] 
[PATCH] arm: fix floppy disk dependencies

Both the RiscPC and (optionally) EBSA285 have floppy disk support.  Allow this
option to be selected on these ARM platforms again.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] reparent_to_init cleanup
Coywolf Qi Hunt [Sat, 16 Apr 2005 22:26:01 +0000 (15:26 -0700)] 
[PATCH] reparent_to_init cleanup

This patch hides reparent_to_init().  reparent_to_init() should only be
called by daemonize().

Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] MAINTAINERS: remove obsolete ACP/MWAVE MODEM entry
Adrian Bunk [Sat, 16 Apr 2005 22:26:00 +0000 (15:26 -0700)] 
[PATCH] MAINTAINERS: remove obsolete ACP/MWAVE MODEM entry

Both maintainer email addresses are bouncing and the web address is no
longer valid.

Seems to be a good time to remove the entry.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] let SOUND_AD1889 depend on PCI
Adrian Bunk [Sat, 16 Apr 2005 22:25:59 +0000 (15:25 -0700)] 
[PATCH] let SOUND_AD1889 depend on PCI

Compiling SOUND_AD1889 with PCI=n results in the following compile
error:

sound/built-in.o(.text+0x24f0c): In function `ad1889_remove':
: undefined reference to `pci_release_region'

This patch adds the missing dependency on PCI.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] cpuset: remove function attribute const
Benoit Boissinot [Sat, 16 Apr 2005 22:25:59 +0000 (15:25 -0700)] 
[PATCH] cpuset: remove function attribute const

gcc-4 warns with
include/linux/cpuset.h:21: warning: type qualifiers ignored on function
return type

cpuset_cpus_allowed is declared with const
extern const cpumask_t cpuset_cpus_allowed(const struct task_struct *p);

First const should be __attribute__((const)), but the gcc manual
explains that:

"Note that a function that has pointer arguments and examines the data
pointed to must not be declared const. Likewise, a function that calls a
non-const function usually must not be const. It does not make sense for
a const function to return void."

The following patch remove const from the function declaration.

Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] pci enumeration on ixp2000: overflow in kernel/resource.c
Lennert Buytenhek [Sat, 16 Apr 2005 22:25:58 +0000 (15:25 -0700)] 
[PATCH] pci enumeration on ixp2000: overflow in kernel/resource.c

IXP2000 (ARM-based) platforms use a separate 'struct resource' for PCI MEM
space.  Resource allocation for PCI BARs always fails because the 'root'
resource (the IXP2000 PCI MEM resource) always has the entire address space
(00000000-ffffffff) free, and find_resource() calculates the size of that
range as ffffffff-00000000+1=0, so all allocations fail because it thinks
there is no space.

(akpm: pls. double-check)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] CREDITS update
Colin Leroy [Sat, 16 Apr 2005 22:25:57 +0000 (15:25 -0700)] 
[PATCH] CREDITS update

Update Colin's credits entry.

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Add dontdiff file
Randy.Dunlap [Sat, 16 Apr 2005 22:25:56 +0000 (15:25 -0700)] 
[PATCH] Add dontdiff file

Add a current 'dontdiff' file for use with 'diff -X dontdiff'.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] update maintainer for /dev/random
Matt Mackall [Sat, 16 Apr 2005 22:25:56 +0000 (15:25 -0700)] 
[PATCH] update maintainer for /dev/random

Ted has agreed to let me take over as maintainer of /dev/random and
friends.  I've gone ahead and added a line to his entry in CREDITS.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] opl3sa2: MODULE_PARM_DESC
Magnus Damm [Sat, 16 Apr 2005 22:25:55 +0000 (15:25 -0700)] 
[PATCH] opl3sa2: MODULE_PARM_DESC

opl3sa2: Fix "irq"-parameter name typo for parameter description.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] add Big Endian variants of ioread/iowrite
James Bottomley [Sat, 16 Apr 2005 22:25:54 +0000 (15:25 -0700)] 
[PATCH] add Big Endian variants of ioread/iowrite

In the new io infrastructure, all of our operators are expecting the
underlying device to be little endian (because the PCI bus, their main
consumer, is LE).

However, there are a fair few devices and busses in the world that are
actually Big Endian.  There's even evidence that some of these BE bus and
chip types are attached to LE systems.  Thus, there's a need for a BE
equivalent of our io{read,write}{16,32} operations.

The attached patch adds this as io{read,write}{16,32}be.  When it's in,
I'll add the first consume (the 53c700 SCSI chip driver).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] efi: eliminate bad section references
maximilian attems [Sat, 16 Apr 2005 22:25:53 +0000 (15:25 -0700)] 
[PATCH] efi: eliminate bad section references

Randy please double check especially this one.
there may be a better solution.

Fix efi section references:
 remove __initdata for struct efi efi_phys
 and struct efi_memory_map memmap

Error: ./arch/i386/kernel/efi.o .text refers to 000000d3 R_386_32
.init.data
Error: ./arch/i386/kernel/efi.o .text refers to 000000ff R_386_32
.init.data

efi_memmap_walk (which is not __init nor static)
accesses both efi_phys and memmap.

Signed-off-by: maximilian attems <janitor@sternwelten.at>
Acked-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] hd: eliminate bad section references
maximilian attems [Sat, 16 Apr 2005 22:25:52 +0000 (15:25 -0700)] 
[PATCH] hd: eliminate bad section references

Fix hd section references:
make parse_hd_setup() __init

Error: ./drivers/ide/legacy/hd.o .text refers to 00000943 R_386_PC32
.init.text

Signed-off-by: maximilian attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] pnpbios: eliminate bad section references
maximilian attems [Sat, 16 Apr 2005 22:25:51 +0000 (15:25 -0700)] 
[PATCH] pnpbios: eliminate bad section references

one of the last buildcheck errors on i386, thanks Randy again for double
checking.

Fix pnpbios section references:
make dmi_system_id pnpbios_dmi_table __initdata

Error: ./drivers/pnp/pnpbios/core.o .data refers to 00000100 R_386_32
.init.text
Error: ./drivers/pnp/pnpbios/core.o .data refers to 0000012c R_386_32
.init.text

Signed-off-by: maximilian attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix comment in list.h that refers to nonexistent API
Paul E. McKenney [Sat, 16 Apr 2005 22:25:51 +0000 (15:25 -0700)] 
[PATCH] Fix comment in list.h that refers to nonexistent API

The hlist_for_each_entry_rcu() comment block refers to a nonexistent
hlist_add_rcu() API, needs to change to hlist_add_head_rcu().

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>
19 years ago[PATCH] Direct IO async short read fix
Daniel McNeil [Sat, 16 Apr 2005 22:25:50 +0000 (15:25 -0700)] 
[PATCH] Direct IO async short read fix

The direct I/O code is mapping the read request to the file system block.  If
the file size was not on a block boundary, the result would show the the read
reading past EOF.  This was only happening for the AIO case.  The non-AIO case
truncates the result to match file size (in direct_io_worker).  This patch
does the same thing for the AIO case, it truncates the result to match the
file size if the read reads past EOF.

When I/O completes the result can be truncated to match the file size
without using i_size_read(), thus the aio result now matches the number of
bytes read to the end of file.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] undo do_readv_writev() behavior change
Dave Hansen [Sat, 16 Apr 2005 22:25:49 +0000 (15:25 -0700)] 
[PATCH] undo do_readv_writev() behavior change

Bugme bug 4326: http://bugme.osdl.org/show_bug.cgi?id=4326 reports:

executing the systemcall readv with Bad argument
->len == -1) it gives out error EFAULT instead of EINVAL

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] officially deprecate register_ioctl32_conversion
Christoph Hellwig [Sat, 16 Apr 2005 22:25:48 +0000 (15:25 -0700)] 
[PATCH] officially deprecate register_ioctl32_conversion

These have been deprecated since ->compat_ioctl when in, thus only a short
deprecation period.  There's four users left: i2o_config, s390/z90crypy,
s390/dasd and s390/zfcp and for the first two patches are about to be
submitted to get rid of it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kill #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER in signal.c
Christoph Hellwig [Sat, 16 Apr 2005 22:25:47 +0000 (15:25 -0700)] 
[PATCH] kill #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER in signal.c

Now that no architectures defines HAVE_ARCH_GET_SIGNAL_TO_DELIVER anymore
this can go away.  It was a transitional hack only.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] quota: possible bug in quota format v2 support
Niu YaWei [Sat, 16 Apr 2005 22:25:47 +0000 (15:25 -0700)] 
[PATCH] quota: possible bug in quota format v2 support

Don't put root block of quota tree to the free list (when quota file is
completely empty).  That should not actually happen anyway (somebody should
get accounted for the filesystem root and so quota file should never be
empty) but better prevent it here than solve magical quota file
corruption.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] quota: fix possible oops on quotaoff
Jan Kara [Sat, 16 Apr 2005 22:25:46 +0000 (15:25 -0700)] 
[PATCH] quota: fix possible oops on quotaoff

Remove dquot structures from quota file on quotaon - quota code does not
expect them to be there.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ext2 corruption - regression between 2.6.9 and 2.6.10
Bernard Blackham [Sat, 16 Apr 2005 22:25:45 +0000 (15:25 -0700)] 
[PATCH] ext2 corruption - regression between 2.6.9 and 2.6.10

Whilst trying to stress test a Promise SX8 card, we stumbled across
some nasty filesystem corruption in ext2. Our tests involved
creating an ext2 partition, mounting, running several concurrent
fsx's over it, umounting, and fsck'ing, all scripted[1]. The fsck
would always return with errors.

This regression was traced back to a change between 2.6.9 and
2.6.10, which moves the functionality of ext2_put_inode into
ext2_clear_inode.  The attached patch reverses this change, and
eliminated the source of corruption.

Mingming Cao <cmm@us.ibm.com> said:

I think his patch for ext2 is correct.  The corruption on ext3 is not the same
issue he saw on ext2.  I believe that's the race between discard reservation
and reservation in-use that we already fixed it in 2.6.12- rc1.

For the problem related to ext2, at the time when we design reservation for
ext3, we decide we only need to discard the reservation at the last file
close, so we have ext3_discard_reservation on iput_final- >ext3_clear_inode.

The ext2 handle discard preallocation differently at that time, it discard the
preallocation at each iput(), not in input_final(), so we think it's
unnecessary to thrash it so frequently, and the right thing to do, as we did
for ext3 reservation, discard preallocation on last iput().  So we moved the
ext2_discard_preallocation from ext2_put_inode(0 to ext2_clear_inode.

Since ext2 preallocation is doing pre-allocation on disk, so it is possible
that at the unmount time, someone is still hold the reference of the inode, so
the preallocation for a file is not discard yet, so we still mark those blocks
allocated on disk, while they are not actually in the inode's block map, so
fsck will catch/fix that error later.

This is not a issue for ext3, as ext3 reservation(pre-allocation) is done in
memory.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix up newly added jsm driver
Christoph Hellwig [Sat, 16 Apr 2005 22:25:44 +0000 (15:25 -0700)] 
[PATCH] fix up newly added jsm driver

 - plug various leaks and use after frees in the remove and
   initialization failure path (some still left)
 - remove useless global list of boards and use pci_set_drvdata instead
 - unobsfucate init path by merging functions together
 - kill various totally useless state variables
 - .. probably more I forgot

Note that the tty part still generates lots of sparse warnings and there's
still a totally useless layer of function pointer indirections, but maybe
someone else will fix that bit up.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] use cheaper elv_queue_empty when unplug a device
Ken Chen [Sat, 16 Apr 2005 22:25:43 +0000 (15:25 -0700)] 
[PATCH] use cheaper elv_queue_empty when unplug a device

In function __generic_unplug_device(), kernel can use a cheaper function
elv_queue_empty() instead of more expensive elv_next_request to find
whether the queue is empty or not.  blk_run_queue can also made conditional
on whether queue's emptiness before calling request_fn().

Signed-off-by: Jens Axboe <axboe@suse.de>
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>
19 years ago[PATCH] fix module_param_string() calls
Bert Wesarg [Sat, 16 Apr 2005 22:25:43 +0000 (15:25 -0700)] 
[PATCH] fix module_param_string() calls

This patch fix 3 calls to module_param_string() in
driver/media/video/tuner-core.c and drivers/media/video/tda9887.c.  In all
three places, the len and the perm parameter was switched.

Signed-off-by: Bert Wesarg <wesarg@informatik.uni-halle.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kernel/param.c: don't use .max when .num is NULL in param_array_set()
Bert Wesarg [Sat, 16 Apr 2005 22:25:42 +0000 (15:25 -0700)] 
[PATCH] kernel/param.c: don't use .max when .num is NULL in param_array_set()

there seems to be a bug, at least for me, in kernel/param.c for arrays with
.num == NULL.  If .num == NULL, the function param_array_set() uses &.max
for the call to param_array(), wich alters the .max value to the number of
arguments.  The result is, you can't set more array arguments as the last
time you set the parameter.

example:

# a module 'example' with
# static int array[10] = { 0, };
# module_param_array(array, int, NULL, 0644);

$ insmod example.ko array=1,2,3
$ cat /sys/module/example/parameters/array
1,2,3
$ echo "4,3,2,1" > /sys/module/example/parameters/array
$ dmesg | tail -n 1
kernel: array: can take only 3 arguments

Signed-off-by: Bert Wesarg <wesarg@informatik.uni-halle.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] AYSNC IO using singals other than SIGIO
Bharath Ramesh [Sat, 16 Apr 2005 22:25:41 +0000 (15:25 -0700)] 
[PATCH] AYSNC IO using singals other than SIGIO

A question on sigwaitinfo based IO mechanism in multithreaded applications.

I am trying to use RT signals to notify me of IO events using RT signals
instead of SIGIO in a multithreaded applications.  I noticed that there was
some discussion on lkml during november 1999 with the subject of the
discussion as "Signal driven IO".  In the thread I noticed that RT signals
were being delivered to the worker thread.  I am running 2.6.10 kernel and
I am trying to use the very same mechanism and I find that only SIGIO being
propogated to the worker threads and RT signals only being propogated to
the main thread and not the worker threads where I actually want them to be
propogated too.  On further inspection I found that the following patch
which I have attached solves the problem.

I am not sure if this is a bug or feature in the kernel.

Roland McGrath <roland@redhat.com> said:

This relates only to fcntl F_SETSIG, which is a Linux extension.  So there is
no POSIX issue.  When changing various things like the normal SIGIO signalling
to do group signals, I was concerned strictly with the POSIX semantics and
generally avoided touching things in the domain of Linux inventions.  That's
why I didn't change this when I changed the call right next to it.  There is
no reason I can see that F_SETSIG-requested signals shouldn't use a group
signal like normal SIGIO does.  I'm happy to ACK this patch, there is nothing
wrong with its change to the semantics in my book.  But neither POSIX nor I
care a whit what F_SETSIG does.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] possible use-after-free of bio
Jens Axboe [Sat, 16 Apr 2005 22:25:40 +0000 (15:25 -0700)] 
[PATCH] possible use-after-free of bio

There is a possibility that a bio will be accessed after it has been freed
on SCSI.  It happens if you submit a bio with BIO_SYNC marked and the
auto-unplugging kicks the request_fn, SCSI re-enables interrupts in-between
so if the request completes between the add_request() in __make_request()
and the bio_sync() call, we could be looking at a dead bio.  It's a slim
race, but it has been triggered in the Real World.

So assign bio_sync() to a local variable instead.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix compilation for __CHOOSE_MODE addition
Paolo 'Blaisorblade' Giarrusso [Sat, 16 Apr 2005 22:25:39 +0000 (15:25 -0700)] 
[PATCH] uml: fix compilation for __CHOOSE_MODE addition

I had added the __CHOOSE_MODE syntax to fix some warnings with newer GCC's
in the uml-fix-cond-expr-as-lvalues-warning patch.

Here is the update from the version I sent to make it work also when only
one mode (TT or SKAS) is enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] swsusp: SMP fix
Alexander Nyberg [Sat, 16 Apr 2005 22:25:39 +0000 (15:25 -0700)] 
[PATCH] swsusp: SMP fix

Fix some smp_processor_id-in-preemptible warnings

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix few remaining u32 vs. pm_message_t problems
Pavel Machek [Sat, 16 Apr 2005 22:25:38 +0000 (15:25 -0700)] 
[PATCH] fix few remaining u32 vs. pm_message_t problems

This fixes remaining u32 vs.  pm_message_t confusions in -rc2-mm3.  [There
are usb changes, too; they went to Greg on his request.]

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in rest of the tree
Pavel Machek [Sat, 16 Apr 2005 22:25:37 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in rest of the tree

This fixes u32 vs.  pm_message_t confusion in remaining places.  Fortunately
there's few of them.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in driver/video
Pavel Machek [Sat, 16 Apr 2005 22:25:36 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in driver/video

This fixes u32 vs.  pm_message_t confusion in drivers/video.  Should change no
code.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in drivers/
Pavel Machek [Sat, 16 Apr 2005 22:25:35 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in drivers/

-rc2-mm1 still contains few places where u32 and pm_message_t.  This fixes
drivers/serial [should change no code].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] power/video.txt: update documentation with more systems
Pavel Machek [Sat, 16 Apr 2005 22:25:34 +0000 (15:25 -0700)] 
[PATCH] power/video.txt: update documentation with more systems

This updates video.txt documentation with information about few more
systems.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] u32 vs. pm_message_t in ppc and radeon
Pavel Machek [Sat, 16 Apr 2005 22:25:34 +0000 (15:25 -0700)] 
[PATCH] u32 vs. pm_message_t in ppc and radeon

This fixes pm_message_t vs.  u32 confusion in ppc and aty (I *hope* that's
basically radeon code...).  I was not able to test most of these, but I'm
not really changing anything, so it should be okay.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in PCI, PCIE
Pavel Machek [Sat, 16 Apr 2005 22:25:33 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in PCI, PCIE

This fixes drivers/pci (mostly pcie stuff).

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in drivers/macintosh
Pavel Machek [Sat, 16 Apr 2005 22:25:32 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in drivers/macintosh

I thought I'm done with fixing u32 vs.  pm_message_t ...  unfortunately that
turned out not to be the case as Russel King pointed out.  Here are fixes for
drivers/macintosh.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix u32 vs. pm_message_t in x86-64
Pavel Machek [Sat, 16 Apr 2005 22:25:31 +0000 (15:25 -0700)] 
[PATCH] Fix u32 vs. pm_message_t in x86-64

I thought I'm done with fixing u32 vs.  pm_message_t ...  unfortunately that
turned out not to be the case...  Here are fixes x86-64.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix pm_message_t vs. u32 in alsa
Pavel Machek [Sat, 16 Apr 2005 22:25:30 +0000 (15:25 -0700)] 
[PATCH] fix pm_message_t vs. u32 in alsa

I thought I'm done with fixing u32 vs.  pm_message_t ...  unfortunately that
turned out not to be the case as Russel King pointed out.  This fixes last few
bits in alsa.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in drivers/mmc,mtd,scsi
Pavel Machek [Sat, 16 Apr 2005 22:25:29 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in drivers/mmc,mtd,scsi

This fixes u32 vs.  pm_message_t in drivers/mmc, drivers/mtd and
drivers/scsi.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in drivers/message
Pavel Machek [Sat, 16 Apr 2005 22:25:28 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in drivers/message

This fixes u32 vs. pm_message_t in drivers/message.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in drivers/media
Pavel Machek [Sat, 16 Apr 2005 22:25:27 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in drivers/media

Here are fixes for drivers/media.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix u32 vs. pm_message_t in pcmcia
Pavel Machek [Sat, 16 Apr 2005 22:25:26 +0000 (15:25 -0700)] 
[PATCH] fix u32 vs. pm_message_t in pcmcia

This fixes u32 vs. pm_message_t in pcmcia.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] u32 vs. pm_message_t fixes for drivers/net
Pavel Machek [Sat, 16 Apr 2005 22:25:25 +0000 (15:25 -0700)] 
[PATCH] u32 vs. pm_message_t fixes for drivers/net

This fixes remaining u32s in drivers/ net.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix u32 vs. pm_message_t in drivers/char
Pavel Machek [Sat, 16 Apr 2005 22:25:24 +0000 (15:25 -0700)] 
[PATCH] Fix u32 vs. pm_message_t in drivers/char

Here are fixes for drivers/char.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] pm_message_t: more fixes in common and i386
Pavel Machek [Sat, 16 Apr 2005 22:25:24 +0000 (15:25 -0700)] 
[PATCH] pm_message_t: more fixes in common and i386

I thought I'm done with fixing u32 vs.  pm_message_t ...  unfortunately
that turned out not to be the case as Russel King pointed out.  Here are
fixes for Documentation and common code (mainly system devices).

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] h8300 header update
Yoshinori Sato [Sat, 16 Apr 2005 22:25:21 +0000 (15:25 -0700)] 
[PATCH] h8300 header update

- page.h: fix build error
- unistd.h: _syscall macro cleanup.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>