linux-2.6
18 years agoIB/ipath: Fix lockdep error upon "ifconfig ibN down"
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:24 +0000 (09:00 -0700)] 
IB/ipath: Fix lockdep error upon "ifconfig ibN down"

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix races with ib_resize_cq()
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:23 +0000 (09:00 -0700)] 
IB/ipath: Fix races with ib_resize_cq()

The resize CQ function changes the memory used to store the queue.
Other routines need to honor the lock before accessing the pointer
to the queue and verify that the head and tail are in range.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Support new PCIE device, QLE7142
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:22 +0000 (09:00 -0700)] 
IB/ipath: Support new PCIE device, QLE7142

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Set CPU affinity early
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:21 +0000 (09:00 -0700)] 
IB/ipath: Set CPU affinity early

This change moves around port assignment so that it happens before any
memory is allocated.  This allows memory to be allocated on an appropriate
CPU, which improves performance for users of /dev/ipath.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix EEPROM read when driver is compiled with -Os
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:19 +0000 (09:00 -0700)] 
IB/ipath: Fix EEPROM read when driver is compiled with -Os

The EEPROM is read via programmable I/O pins. When the driver
is compiled -Os, the CPU can speculatively read the I/O
value before it is valid.  This patch fixes the problem.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix and recover TXE piobuf and PBC parity errors
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:18 +0000 (09:00 -0700)] 
IB/ipath: Fix and recover TXE piobuf and PBC parity errors

We can sometimes trigger parity errors due to processor speculative
reads to our write-combined memory (mostly seen on Woodcrest).   Add a
stats counter for these.

Factored out the sendbuffererror buffer cancellation code so it can be
used in the new handling; suppress likely subsequent error messages if
within two jiffies of the cancellation.

Also restore 2 dropped TXE lines on hwe_bitsextant noticed while
debugging.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Change HT CRC message to indicate how to resolve problem
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:17 +0000 (09:00 -0700)] 
IB/ipath: Change HT CRC message to indicate how to resolve problem

The system must be powercycled to clear a HT CRC error; reloading the
driver is not enough.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Clean up module exit code
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:16 +0000 (09:00 -0700)] 
IB/ipath: Clean up module exit code

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Call mtrr_del with correct arguments
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:15 +0000 (09:00 -0700)] 
IB/ipath: Call mtrr_del with correct arguments

We were passing 0 for base and length, which worked on older kernels,
but it doesn't seem to any longer.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Flush RWQEs if access error or invalid error seen
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:14 +0000 (09:00 -0700)] 
IB/ipath: Flush RWQEs if access error or invalid error seen

If the receiver goes into the error state, we need to flush the
posted receive WQEs.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Improved support for PowerPC
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:13 +0000 (09:00 -0700)] 
IB/ipath: Improved support for PowerPC

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Drop unnecessary "(void *)" casts
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:12 +0000 (09:00 -0700)] 
IB/ipath: Drop unnecessary "(void *)" casts

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Support multiple simultaneous devices of different types
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:11 +0000 (09:00 -0700)] 
IB/ipath: Support multiple simultaneous devices of different types

Prior to this change, the driver was not able to support a HT and PCIE
card simultaneously present in the same machine.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix mismatch in shifts and masks for printing debug info
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:10 +0000 (09:00 -0700)] 
IB/ipath: Fix mismatch in shifts and masks for printing debug info

Fixed mismatch in linkstate/trainingstate shifts and masks in the
IPATH_IBSTATE_MASK macro.  It kept some linktrainingstates
from being printed correctly in debug; no functionality issue unless
I misread the code.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix compiler warnings and errors on non-x86_64 systems
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:09 +0000 (09:00 -0700)] 
IB/ipath: Fix compiler warnings and errors on non-x86_64 systems

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Print more informative parity error messages
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:08 +0000 (09:00 -0700)] 
IB/ipath: Print more informative parity error messages

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Ensure that PD of MR matches PD of QP checking the Rkey
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:07 +0000 (09:00 -0700)] 
IB/ipath: Ensure that PD of MR matches PD of QP checking the Rkey

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: RC and UC should validate SLID and DLID
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:06 +0000 (09:00 -0700)] 
IB/ipath: RC and UC should validate SLID and DLID

This is required for IB conformance (spec ch. 9.6.1.5).

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Only allow complete writes to flash
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:05 +0000 (09:00 -0700)] 
IB/ipath: Only allow complete writes to flash

Don't allow a write to the eeprom from ipathfs unless the write is exactly
128 bytes and starts at offset 0.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Count SRQs properly
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:04 +0000 (09:00 -0700)] 
IB/ipath: Count SRQs properly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Lock and count allocated CQs properly
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:03 +0000 (09:00 -0700)] 
IB/ipath: Lock and count allocated CQs properly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Clean up handling of GUID 0
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:02 +0000 (09:00 -0700)] 
IB/ipath: Clean up handling of GUID 0

Respond with an error to the SM if our GUID is 0, and don't allow the
user to set our GUID to 0.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Unregister from IB core early
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:01 +0000 (09:00 -0700)] 
IB/ipath: Unregister from IB core early

This gives upper-level protocols a chance to unregister while the device
is still usable.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Support revision 2 InfiniPath PCIE devices
Bryan O'Sullivan [Thu, 28 Sep 2006 16:00:00 +0000 (09:00 -0700)] 
IB/ipath: Support revision 2 InfiniPath PCIE devices

This also entailed a little GPIO-interrupt general cleanup.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Driver support for userspace sharing of HW contexts
Bryan O'Sullivan [Thu, 28 Sep 2006 15:59:59 +0000 (08:59 -0700)] 
IB/ipath: Driver support for userspace sharing of HW contexts

This allows multiple userspace processes to share a single hardware
context in a master/slave arrangement.  It is backwards binary compatible
with existing userspace.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix memory leak if allocation fails
Bryan O'Sullivan [Thu, 28 Sep 2006 15:59:58 +0000 (08:59 -0700)] 
IB/ipath: Fix memory leak if allocation fails

If the second allocation failed, the first structure allocated in this
routine was not freed.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Limit # of packets sent without an ACK received
Bryan O'Sullivan [Thu, 28 Sep 2006 15:59:57 +0000 (08:59 -0700)] 
IB/ipath: Limit # of packets sent without an ACK received

The sender requests an ACK every 1/2 MB to avoid retransmit timeouts that
were causing MVAPICH mod_bw to fail after a predictable number of sends.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: Fix the description of iSER in Kconfig
Erez Zilber [Wed, 27 Sep 2006 13:48:57 +0000 (16:48 +0300)] 
IB/iser: Fix the description of iSER in Kconfig

Fix the description of iSER in Kconfig.  It is not accurate.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: DMA unmap unaligned for RDMA data before touching it
Erez Zilber [Wed, 27 Sep 2006 13:43:06 +0000 (16:43 +0300)] 
IB/iser: DMA unmap unaligned for RDMA data before touching it

iSER uses the DMA mapping api to map the page holding the
SCSI command data to the HCA DMA address space. When the
command data is not aligned for RDMA, the data is copied
to/from an allocated buffer which in turn is used for
executing this command. The pages associated with the
command must be unmapped before being touched.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: Have iSER data transaction object point to iSER conn
Erez Zilber [Wed, 27 Sep 2006 12:27:10 +0000 (15:27 +0300)] 
IB/iser: Have iSER data transaction object point to iSER conn

iSER uses a data transaction object (struct iser_dto) as part
of its IB data descriptors (struct iser_desc) management.
It also uses a hierarchy of connection structures pointing to
each other. A DTO may exist even after the iscsi_iser connection
pointed by it is destroyed (eg one that is bound to a post
receive buffer which was flushed by the IB HW). Hence DTOs need
point to the lowest connection, which is struct iser_conn.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/amso1100: Fix memory leak in c2_reg_phys_mr()
Roland Dreier [Thu, 28 Sep 2006 17:44:07 +0000 (10:44 -0700)] 
RDMA/amso1100: Fix memory leak in c2_reg_phys_mr()

If the allocation of mr fails, then c2_reg_phys_mr() leaks the
page_list array it allocated earlier.

This was Coverity CID #1413.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/amso1100: Fix error path in c2_llp_accept()
Eric Sesterhenn [Thu, 28 Sep 2006 17:38:32 +0000 (10:38 -0700)] 
RDMA/amso1100: Fix error path in c2_llp_accept()

Another NULL dereference spotted by the Coverity checker (cid #1395):
In case we can't alloc the vq_req, we goto bail1, where we call
vq_req_free(c2dev, vq_req); which then dereferences vq_req.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/amso1100: Fix compile warnings
Roland Dreier [Wed, 27 Sep 2006 21:42:56 +0000 (14:42 -0700)] 
RDMA/amso1100: Fix compile warnings

Make sure all 64-bit quantities are cast to unsigned long long
when printed with "%ll" printk formats.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 27 Sep 2006 17:53:30 +0000 (10:53 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] minor reformatting to vmlinux.lds.S
  [IA64] CMC/CPE: Reverse the order of fetching log and checking poll threshold
  [IA64] PAL calls need physical mode, stacked
  [IA64] ar.fpsr not set on MCA/INIT kernel entry
  [IA64] printing support for MCA/INIT
  [IA64] trim output of show_mem()
  [IA64] show_mem() printk levels
  [IA64] Make gp value point to Region 5 in mca handler
  Revert "[IA64] Unwire set/get_robust_list"
  [IA64] Implement futex primitives
  [IA64-SGI] Do not request DMA memory for BTE
  [IA64] Move perfmon tables from thread_struct to pfm_context
  [IA64] Add interface so modules can discover whether multithreading is on.
  [IA64] kprobes: fixup the pagefault exception caused by probehandlers
  [IA64] kprobe opcode 16 bytes alignment on IA64
  [IA64] esi-support
  [IA64] Add "model name" to /proc/cpuinfo

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Wed, 27 Sep 2006 15:49:07 +0000 (08:49 -0700)] 
Merge /pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (108 commits)
  sh: Fix occasional flush_cache_4096() stack corruption.
  sh: Calculate shm alignment at runtime.
  sh: dma-mapping compile fixes.
  sh: Initial vsyscall page support.
  sh: Clean up PAGE_SIZE definition for assembly use.
  sh: Selective flush_cache_mm() flushing.
  sh: More intelligent entry_mask/way_size calculation.
  sh: Support for L2 cache on newer SH-4A CPUs.
  sh: Update kexec support for API changes.
  sh: Optimized readsl()/writesl() support.
  sh: Report movli.l/movco.l capabilities.
  sh: CPU flags in AT_HWCAP in ELF auxvt.
  sh: Add support for 4K stacks.
  sh: Enable /proc/kcore support.
  sh: stack debugging support.
  sh: select CONFIG_EMBEDDED.
  sh: machvec rework.
  sh: Solution Engine SH7343 board support.
  sh: SH7710VoIPGW board support.
  sh: Enable verbose BUG() support.
  ...

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 27 Sep 2006 15:32:01 +0000 (08:32 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Kill bogus check from bootmem_init().
  [SPARC64]: Update defconfig.

18 years ago[PATCH] x86: use probe_kernel_address in handle_BUG()
Andrew Morton [Wed, 27 Sep 2006 08:51:15 +0000 (01:51 -0700)] 
[PATCH] x86: use probe_kernel_address in handle_BUG()

Avoid possible deadlock on a BUG() inside down_write(mmap_sem).  The deadlock
can only occur if something has gone horridly wrong, because a fault here
shouldn't happen.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] add probe_kernel_address()
Andrew Morton [Wed, 27 Sep 2006 08:51:14 +0000 (01:51 -0700)] 
[PATCH] add probe_kernel_address()

Add a version of __get_user() which is safe to call inside mmap_sem.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] de_thread: Use tsk not current
Eric W. Biederman [Wed, 27 Sep 2006 08:51:13 +0000 (01:51 -0700)] 
[PATCH] de_thread: Use tsk not current

Ingo Oeser pointed out that because current expands to an inline function
it is more space efficient and somewhat faster to simply keep a cached copy
of current in another variable.  This patch implements that for the
de_thread function.

(akpm: saves nearly 100 bytes of text on x86)

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/nfs/: make code static
Adrian Bunk [Wed, 27 Sep 2006 08:51:13 +0000 (01:51 -0700)] 
[PATCH] fs/nfs/: make code static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] add newline to nfs dprintk
Martin Bligh [Wed, 27 Sep 2006 08:51:12 +0000 (01:51 -0700)] 
[PATCH] add newline to nfs dprintk

Add missing \n to dprintk

Signed-off-by: Martin Bligh <mbligh@google.com>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] pid: remove temporary debug code in attach_pid
Eric W. Biederman [Wed, 27 Sep 2006 08:51:11 +0000 (01:51 -0700)] 
[PATCH] pid: remove temporary debug code in attach_pid

With the patches flying between Oleg and myself somehow this temporary
debug code got left in pid.c.  It was never intended to make it to the
stable kernel.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] pid: Implement transfer_pid and use it to simplify de_thread
Eric W. Biederman [Wed, 27 Sep 2006 08:51:06 +0000 (01:51 -0700)] 
[PATCH] pid: Implement transfer_pid and use it to simplify de_thread

In de_thread we move pids from one process to another, a rather ugly case.
The function transfer_pid makes it clear what we are doing, and makes the
action atomic.  This is useful we ever want to atomically traverse the
process group and session lists, in a rcu safe manner.

Even if the atomic properties this change should be a win as transfer_pid
should be less code to execute than executing both attach_pid and
detach_pid, and this should make de_thread slightly smaller as only a
single function call needs to be emitted.  The only downside is that the
code might be slower to execute as the odds are against transfer_pid being
in cache.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sysctl: Document that sys_sysctl will be removed
Eric W. Biederman [Wed, 27 Sep 2006 08:51:05 +0000 (01:51 -0700)] 
[PATCH] sysctl: Document that sys_sysctl will be removed

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sysctl: Allow /proc/sys without sys_sysctl
Eric W. Biederman [Wed, 27 Sep 2006 08:51:04 +0000 (01:51 -0700)] 
[PATCH] sysctl: Allow /proc/sys without sys_sysctl

Since sys_sysctl is deprecated start allow it to be compiled out.  This
should catch any remaining user space code that cares, and paves the way
for further sysctl cleanups.

[akpm@osdl.org: If sys_sysctl() is not compiled-in, emit a warning]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] msi: use kmem_cache_zalloc()
Pekka J Enberg [Wed, 27 Sep 2006 08:51:03 +0000 (01:51 -0700)] 
[PATCH] msi: use kmem_cache_zalloc()

Simpler, cleaner.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Include __param section in read-only data range
Marcelo Tosatti [Wed, 27 Sep 2006 08:51:02 +0000 (01:51 -0700)] 
[PATCH] Include __param section in read-only data range

The param section is an array of "kernel_param" structures, storing only
constant data: pointer to name, permission of the variable pointed to by
(void *)arg and pointers to set/get methods.

Move end_rodata down to include __param section in the read-only range used
by CONFIG_DEBUG_RODATA.

Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alloc_fdtable() cleanup
Andrew Morton [Wed, 27 Sep 2006 08:51:02 +0000 (01:51 -0700)] 
[PATCH] alloc_fdtable() cleanup

free_fdset(NULL, ...) is legal.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EISA bus MODALIAS attributes support
Michael Tokarev [Wed, 27 Sep 2006 08:50:56 +0000 (01:50 -0700)] 
[PATCH] EISA bus MODALIAS attributes support

Add modalias attribute support for the almost forgotten now EISA bus and
(at least some) EISA-aware modules.

The modalias entry looks like (for an 3c509 NIC):

 eisa:sTCM5093

and the in-module alias like:

 eisa:sTCM5093*

The patch moves struct eisa_device_id declaration from include/linux/eisa.h
to include/linux/mod_devicetable.h (so that the former now #includes the
latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
declared), and adds recognision of __mod_eisa_device_table to
scripts/mod/file2alias.c so that proper modules.alias will be generated.

There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
by any existing tools, and because with in-kernel modalias mechanism those
maps are obsolete anyway.

The rationale for this patch is:

 a) to make EISA bus to act as other busses with modalias
    support, to unify driver loading

 b) to foget about EISA finally - with this patch, kernel
    (who still supports EISA) will be the only one who knows
    how to choose the necessary drivers for this bus ;)

[akpm@osdl.org: fix the kbuild bit]
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org>
Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] consistently use MAX_ERRNO in __syscall_return
Randy Dunlap [Wed, 27 Sep 2006 08:50:55 +0000 (01:50 -0700)] 
[PATCH] consistently use MAX_ERRNO in __syscall_return

Consistently use MAX_ERRNO when checking for errors in __syscall_return().

[ralf@linux-mips.org: build fix]
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86 microcode: don't check the size
Shaohua Li [Wed, 27 Sep 2006 08:50:54 +0000 (01:50 -0700)] 
[PATCH] x86 microcode: don't check the size

IA32 manual says if micorcode update's size is 0, then the size is
default size (2048 bytes). But this doesn't suggest all microcode
update's size should be above 2048 bytes to me. We actually had a
microcode update whose size is 1024 bytes. The patch just removed the
check.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Tigran Aivazian <tigran@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86 microcode: add sysfs and hotplug support
Shaohua Li [Wed, 27 Sep 2006 08:50:53 +0000 (01:50 -0700)] 
[PATCH] x86 microcode: add sysfs and hotplug support

Add sysfs support.  Currently each CPU has three microcode related
attributes.  One is 'version' which shows current ucode version of CPU.
Tools can use the attribute do validation or show CPU ucode status.  one is
'reload' which allows manually reloading ucode.  Another is
'processor_flags', which exports processor flags, so we can write tools to
check if CPU has latest ucode.  Also add suspend/resume and CPU hotplug
support.

[akpm@osdl.org: cleanups, build fix]
[bunk@stusta.de: Kconfig fixes]
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Tigran Aivazian <tigran@veritas.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86 microcode: using request_firmware to pull microcode
Shaohua Li [Wed, 27 Sep 2006 08:50:52 +0000 (01:50 -0700)] 
[PATCH] x86 microcode: using request_firmware to pull microcode

Using request_firmware to pull ucode from userspace, so we don't need the
application 'microcode_ctl' to assist.  We name each ucode file according
to CPU's info as intel-ucode/family-model-stepping.  In this way we could
split ucode file as small one.  This has a lot of advantages such as
selectively update and validate microcode for specific models, better
manage microcode file, easily write tools for administerators and so on.
with the changes, we should put all intel-ucode/xx-xx-xx microcode files
into the firmware dir (I had a tool to split previous big data file into
small one and later we will release new style data file).  The init script
should be changed to just loading the driver without unloading

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Tigran Aivazian <tigran@veritas.com>
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] x86 microcode: microcode driver cleanup.
Shaohua Li [Wed, 27 Sep 2006 08:50:51 +0000 (01:50 -0700)] 
[PATCH] x86 microcode: microcode driver cleanup.

Clean up microcode update driver and make it more readable.

[akpm@osdl.org: cleanups]
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Tigran Aivazian <tigran@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: warn about the useless nolargeio option
Adrian Bunk [Wed, 27 Sep 2006 08:50:50 +0000 (01:50 -0700)] 
[PATCH] reiserfs: warn about the useless nolargeio option

Since the nolargeio option no longer has any effect, print a warning
instead of setting a write-only variable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Cc: Hans Reiser <reiser@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inode-diet: Eliminate i_blksize from the inode structure
Theodore Ts'o [Wed, 27 Sep 2006 08:50:49 +0000 (01:50 -0700)] 
[PATCH] inode-diet: Eliminate i_blksize from the inode structure

This eliminates the i_blksize field from struct inode.  Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.

Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.

[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inode-diet: Move i_cdev into a union
Theodore Ts'o [Wed, 27 Sep 2006 08:50:49 +0000 (01:50 -0700)] 
[PATCH] inode-diet: Move i_cdev into a union

Move the i_cdev pointer in struct inode into a union.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inode-diet: Move i_bdev into a union
Theodore Ts'o [Wed, 27 Sep 2006 08:50:48 +0000 (01:50 -0700)] 
[PATCH] inode-diet: Move i_bdev into a union

Move the i_bdev pointer in struct inode into a union.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inode-diet: Move i_pipe into a union
Theodore Ts'o [Wed, 27 Sep 2006 08:50:47 +0000 (01:50 -0700)] 
[PATCH] inode-diet: Move i_pipe into a union

Move the i_pipe pointer into a union that will be shared with i_bdev and
i_cdev.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private
Theodore Ts'o [Wed, 27 Sep 2006 08:50:46 +0000 (01:50 -0700)] 
[PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private

The following patches reduce the size of the VFS inode structure by 28 bytes
on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
in the inode size on a UP kernel that is configured in a production mode
(i.e., with no spinlock or other debugging functions enabled; if you want to
save memory taken up by in-core inodes, the first thing you should do is
disable the debugging options; they are responsible for a huge amount of bloat
in the VFS inode structure).

This patch:

The filesystem or device-specific pointer in the inode is inside a union,
which is pretty pointless given that all 30+ users of this field have been
using the void pointer.  Get rid of the union and rename it to i_private, with
a comment to explain who is allowed to use the void pointer.  This is just a
cleanup, but it allows us to reuse the union 'u' for something something where
the union will actually be used.

[judith@osdl.org: powerpc build fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Judith Lebzelter <judith@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fat: cleanup fat_get_block(s)
OGAWA Hirofumi [Wed, 27 Sep 2006 08:50:45 +0000 (01:50 -0700)] 
[PATCH] fat: cleanup fat_get_block(s)

get_blocks() was removed.  So, this removes it on fat, and will take
advantage of the multi block mapping.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kdump: introduce "reset_devices" command line option
Vivek Goyal [Wed, 27 Sep 2006 08:50:44 +0000 (01:50 -0700)] 
[PATCH] kdump: introduce "reset_devices" command line option

Resetting the devices during driver initialization can be a costly
operation in terms of time (especially scsi devices).  This option can be
used by drivers to know that user forcibly wants the devices to be reset
during initialization.

This option can be useful while kernel is booting in unreliable
environment.  For ex.  during kdump boot where devices are in unknown
random state and BIOS execution has been skipped.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] autofs4 needs to force fail return revalidate
Ian Kent [Wed, 27 Sep 2006 08:50:44 +0000 (01:50 -0700)] 
[PATCH] autofs4 needs to force fail return revalidate

For a long time now I have had a problem with not being able to return a
lookup failure on an existsing directory.  In autofs this corresponds to a
mount failure on a autofs managed mount entry that is browsable (and so the
mount point directory exists).

While this problem has been present for a long time I've avoided resolving
it because it was not very visible.  But now that autofs v5 has "mount and
expire on demand" of nested multiple mounts, such as is found when mounting
an export list from a server, solving the problem cannot be avoided any
longer.

I've tried very hard to find a way to do this entirely within the autofs4
module but have not been able to find a satisfactory way to achieve it.

So, I need to propose a change to the VFS.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix allocation size
Jeff Dike [Wed, 27 Sep 2006 08:50:43 +0000 (01:50 -0700)] 
[PATCH] uml: fix allocation size

Fix an instance of ptr=alloc(sizeof(ptr)).  Grepping showed no more instances
of this pattern.

Also fixed the formatting in the area.

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: fix sleep length bug
Jeff Dike [Wed, 27 Sep 2006 08:50:42 +0000 (01:50 -0700)] 
[PATCH] uml: fix sleep length bug

um_timer shouldn't add local_offset to the host time since get_time already
did it.  This threw off sleep when a settimeofday or equivalent had happened.

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 an export
Jeff Dike [Wed, 27 Sep 2006 08:50:41 +0000 (01:50 -0700)] 
[PATCH] uml: add an export

Some modules need strnlen_user_skas.

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: file renaming
Jeff Dike [Wed, 27 Sep 2006 08:50:40 +0000 (01:50 -0700)] 
[PATCH] uml: file renaming

Move some foo_kern.c files to foo.c now that the old foo.c files are out
of the way.

Also cleaned up some whitespace and an emacs formatting comment.

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: thread creation tidying
Jeff Dike [Wed, 27 Sep 2006 08:50:40 +0000 (01:50 -0700)] 
[PATCH] uml: thread creation tidying

fork on UML has always somewhat subtle.  The underlying cause has been the
need to initialize a stack for the new process.  The only portable way to
initialize a new stack is to set it as the alternate signal stack and take a
signal.  The signal handler does whatever initialization is needed and jumps
back to the original stack, where the fork processing is finished.  The basic
context switching mechanism is a jmp_buf for each process.  You switch to a
new process by longjmping to its jmp_buf.

Now that UML has its own implementation of setjmp and longjmp, and I can poke
around inside a jmp_buf without fear that libc will change the structure, a
much simpler mechanism is possible.  The jmpbuf can simply be initialized by
hand.

This eliminates -
the need to set up and remove the alternate signal stack
sending and handling a signal
the signal blocking needed around the stack switching, since
there is no stack switching
setting up the jmp_buf needed to jump back to the original
stack after the new one is set up

In addition, since jmp_buf is now defined by UML, and not by libc, it can be
embedded in the thread struct.  This makes it unnecessary to have it exist on
the stack, where it used to be.  It also simplifies interfaces, since the
switch jmp_buf used to be a void * inside the thread struct, and functions
which took it as an argument needed to define a jmp_buf variable and assign it
from the void *.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: mark some tt-mode code
Jeff Dike [Wed, 27 Sep 2006 08:50:38 +0000 (01:50 -0700)] 
[PATCH] uml: mark some tt-mode code

Mark a symbol and file as being tt-mode only.  This shrinks the binary
slightly when tt mode support is compiled out and makes it easier to identity
stuff when tt mode is removed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: add checkstack support
Jeff Dike [Wed, 27 Sep 2006 08:50:37 +0000 (01:50 -0700)] 
[PATCH] uml: add checkstack support

Make checkstack work for UML.  We need to pass the underlying architecture
name, rather than "um" to checkstack.pl.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: use correct SIGBUS handler
Jeff Dike [Wed, 27 Sep 2006 08:50:37 +0000 (01:50 -0700)] 
[PATCH] uml: use correct SIGBUS handler

BB noticed that we had the wrong bus error handler.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix gcov support
Jeff Dike [Wed, 27 Sep 2006 08:50:36 +0000 (01:50 -0700)] 
[PATCH] uml: fix gcov support

Make __bb_init_func weak in order to avoid a link failure with some libcs
and/or gccs.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix missing x86_64 register definitions
Jeff Dike [Wed, 27 Sep 2006 08:50:35 +0000 (01:50 -0700)] 
[PATCH] uml: fix missing x86_64 register definitions

The UML/x86_64 headers were missing ptrace support for some segment registers.
 The underlying problem was that the x86_64 kernel uses user_regs_struct
rather than the ptrace register definitions in ptrace.  This patch switches
UML/x86_64 to using user_regs_struct for its definitions of the host's
registers.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: get rid of ZONE_DMA use
Jeff Dike [Wed, 27 Sep 2006 08:50:34 +0000 (01:50 -0700)] 
[PATCH] uml: get rid of ZONE_DMA use

ZONE_DMA might become dependent on CONFIG_ZONE_DMA, which UML doesn't define
(we're still arguing about this) So, let's change ZONE_DMA to ZONE_NORMAL.

This is prompted by optional-zone_dma-in-the-vm.patch, but should be harmless
on its own.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: const more data
Jeff Dike [Wed, 27 Sep 2006 08:50:33 +0000 (01:50 -0700)] 
[PATCH] uml: const more data

Make lots of structures const in order to make it obvious that they need no
locking.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix proc-vs-interrupt context spinlock deadlock
Paolo 'Blaisorblade' Giarrusso [Wed, 27 Sep 2006 08:50:31 +0000 (01:50 -0700)] 
[PATCH] uml: fix proc-vs-interrupt context spinlock deadlock

This spinlock can be taken on interrupt too, so spin_lock_irq[save] must be
used.

However, Documentation/networking/netdevices.txt explains we are called with
rtnl_lock() held - so we don't need to care about other concurrent opens.
Verified also in LDD3 and by direct checking.  Also verified that the network
layer (through a state machine) guarantees us that nobody will close the
interface while it's being used.  Please correct me if I'm wrong.

Also, we must check we don't sleep with irqs disabled!!!  But anyway, this is
not news - we already can't sleep while holding a spinlock.  Who says this is
guaranted really by the present code?

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: use -mcmodel=kernel for x86_64
Paolo 'Blaisorblade' Giarrusso [Wed, 27 Sep 2006 08:50:27 +0000 (01:50 -0700)] 
[PATCH] uml: use -mcmodel=kernel for x86_64

We have never used this flag and recently one user experienced a complaining
warning about this (there was a symbol in the positive half of the address space
IIRC). So fix it.

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] m32r: revise __raw_read_trylock()
Hirokazu Takata [Wed, 27 Sep 2006 08:50:24 +0000 (01:50 -0700)] 
[PATCH] m32r: revise __raw_read_trylock()

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m32r: Fix "value computed not used" warnings
Hirokazu Takata [Wed, 27 Sep 2006 08:50:24 +0000 (01:50 -0700)] 
[PATCH] m32r: Fix "value computed not used" warnings

Fix to remove annoying gcc-4.1 warnings "value computed not used" for m32r;
Modify set_mb to cast to void for SMP.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place
David Howells [Wed, 27 Sep 2006 08:50:23 +0000 (01:50 -0700)] 
[PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place

Move the fallback arch_vma_name() to a sensible place (kernel/signal.c).

Currently it's in fs/proc/task_mmu.c, a file that is dependent on both
CONFIG_PROC_FS and CONFIG_MMU being enabled, but it's used from
kernel/signal.c from where it is called unconditionally.

[akpm@osdl.org: build fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Make futexes work under NOMMU conditions
David Howells [Wed, 27 Sep 2006 08:50:22 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Make futexes work under NOMMU conditions

Make futexes work under NOMMU conditions.

This can be tested by running this in one shell:

#define SYSERROR(X, Y) \
do { if ((long)(X) == -1L) { perror(Y); exit(1); }} while(0)

int main()
{
int shmid, tmp, *f, n;

shmid = shmget(23, 4, IPC_CREAT|0666);
SYSERROR(shmid, "shmget");

f = shmat(shmid, NULL, 0);
SYSERROR(f, "shmat");

n = *f;
printf("WAIT: %p{%x}\n", f, n);
tmp = futex(f, FUTEX_WAIT, n, NULL, NULL, 0);
SYSERROR(tmp, "futex");
printf("WAITED: %d\n", tmp);

tmp = shmdt(f);
SYSERROR(tmp, "shmdt");

exit(0);
}

And then this in the other shell:

#define SYSERROR(X, Y) \
do { if ((long)(X) == -1L) { perror(Y); exit(1); }} while(0)

int main()
{
int shmid, tmp, *f;

shmid = shmget(23, 4, IPC_CREAT|0666);
SYSERROR(shmid, "shmget");

f = shmat(shmid, NULL, 0);
SYSERROR(f, "shmat");

(*f)++;
printf("WAKE: %p{%x}\n", f, *f);
tmp = futex(f, FUTEX_WAKE, 1, NULL, NULL, 0);
SYSERROR(tmp, "futex");
printf("WOKE: %d\n", tmp);

tmp = shmdt(f);
SYSERROR(tmp, "shmdt");

exit(0);
}

The first program will set up a SYSV IPC SHM segment and wait on a futex in it
for the number at the start to change.  The program will increment that number
and wake the first program up.  This leads to output of the form:

SHELL 1 SHELL 2
======================= =======================
# /dowait
WAIT: 0xc32ac000{0}
# /dowake
WAKE: 0xc32ac000{1}
WAITED: 0 WOKE: 1

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Add docs about shared memory
David Howells [Wed, 27 Sep 2006 08:50:21 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Add docs about shared memory

Add documentation about using shared memory in NOMMU mode.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Make mremap() partially work for NOMMU kernels
David Howells [Wed, 27 Sep 2006 08:50:21 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Make mremap() partially work for NOMMU kernels

Make mremap() partially work for NOMMU kernels.  It may resize a VMA provided
that it doesn't exceed the size of the slab object in which the storage is
allocated that the VMA refers to.  Shareable VMAs may not be resized.

Moving VMAs (as permitted by MREMAP_MAYMOVE) is not currently supported.

This patch also makes use of the fact that the VMA list is now ordered to cut
it short when possible.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Order the per-mm_struct VMA list
David Howells [Wed, 27 Sep 2006 08:50:20 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Order the per-mm_struct VMA list

Order the per-mm_struct VMA list by address so that searching it can be cut
short when the appropriate address has been exceeded.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Implement /proc/pid/maps for NOMMU
David Howells [Wed, 27 Sep 2006 08:50:19 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Implement /proc/pid/maps for NOMMU

Implement /proc/pid/maps for NOMMU by reading the vm_area_list attached to
current->mm->context.vmlist.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Permit ptrace to ignore non-PROT_WRITE VMAs in NOMMU mode
David Howells [Wed, 27 Sep 2006 08:50:19 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Permit ptrace to ignore non-PROT_WRITE VMAs in NOMMU mode

Permit ptrace to modify a section that's non-shared but is marked
unwritable, such as is obtained by mapping the text segment of an ELF-FDPIC
executable binary with into a binary that's being ptraced[*].

[*] Under NOMMU conditions ptrace causes read-only MAP_PRIVATE mmaps to become
    totally private copies because if a private mapping was actually shared
    then the debugging setting breakpoints in it would potentially crash
    other processes.

This is done by using the VM_MAYWRITE flag rather than the VM_WRITE flag
when deciding whether to permit a write.

Without this patch a debugger can't set breakpoints in the mapped text
sections of executables that are mapped read-only private, even if the
mmap() syscall has taken a private copy because PT_PTRACED is set.

In addition, VM_MAYREAD is used instead of VM_READ for similar reasons.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Check VMA protections
David Howells [Wed, 27 Sep 2006 08:50:18 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Check VMA protections

Check the VMA protections in get_user_pages() against what's being asked.

This checks to see that we don't accidentally write on a non-writable VMA or
permit an I/O mapping VMA to be accessed (which may lack page structs).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Check if start address is in vma region in NOMMU function get_user_pages()
Sonic Zhang [Wed, 27 Sep 2006 08:50:17 +0000 (01:50 -0700)] 
[PATCH] Check if start address is in vma region in NOMMU function get_user_pages()

In NOMMU arch, if run "cat /proc/self/mem", data from physical address 0
are read.  This behavior is different from MMU arch.  In IA32, message
"cat: /proc/self/mem: Input/output error" is reported.

This issue is rootcaused by not validate the start address in NOMMU
function get_user_pages().  Following patch solves this issue.

Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Use find_vma() rather than reimplementing a VMA search
David Howells [Wed, 27 Sep 2006 08:50:16 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Use find_vma() rather than reimplementing a VMA search

Use find_vma() in the NOMMU version of access_process_vm() rather than
reimplementing it.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmem
David Howells [Wed, 27 Sep 2006 08:50:16 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmem

Set the backing device info capabilities for /dev/mem and /dev/kmem to
permit direct sharing under no-MMU conditions and full mapping capabilities
under MMU conditions.  Make the BDI used by these available to all directly
mappable character devices.

Also comment the capabilities for /dev/zero.

[akpm@osdl.org: ifdef reductions]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NOMMU: Check that access_process_vm() has a valid target
David Howells [Wed, 27 Sep 2006 08:50:15 +0000 (01:50 -0700)] 
[PATCH] NOMMU: Check that access_process_vm() has a valid target

Check that access_process_vm() is accessing a valid mapping in the target
process.

This limits ptrace() accesses and accesses through /proc/<pid>/maps to only
those regions actually mapped by a program.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] AVR32: Use unsigned long flags for saving interrupt state
Haavard Skinnemoen [Wed, 27 Sep 2006 08:50:14 +0000 (01:50 -0700)] 
[PATCH] AVR32: Use unsigned long flags for saving interrupt state

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Mark __remove_vm_area() static
Rolf Eike Beer [Wed, 27 Sep 2006 08:50:13 +0000 (01:50 -0700)] 
[PATCH] Mark __remove_vm_area() static

The function is exported but not used from anywhere else.  It's also marked as
"not for driver use" so noone out there should really care.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix kerneldoc comments in mm/vmalloc.c
Rolf Eike Beer [Wed, 27 Sep 2006 08:50:13 +0000 (01:50 -0700)] 
[PATCH] Fix kerneldoc comments in mm/vmalloc.c

The empty line between the short description and the first argument
description causes a section to appear twice in the generated manpage.
Also the short description should really be short: the script can't handle
multiple lines.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Acked-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/page_alloc: use NULL instead of 0 for ptr
Randy Dunlap [Wed, 27 Sep 2006 08:50:12 +0000 (01:50 -0700)] 
[PATCH] mm/page_alloc: use NULL instead of 0 for ptr

Use NULL instead of 0 for pointer value, eliminate sparse warnings.

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] mspec driver
Jes Sorensen [Wed, 27 Sep 2006 08:50:11 +0000 (01:50 -0700)] 
[PATCH] mspec driver

Implement the special memory driver (mspec) based on the do_no_pfn
approach.  The driver is currently used only on SN2 hardware with special
fetchop support but could be beneficial on other architectures using the
uncached mode.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] do_no_pfn()
Jes Sorensen [Wed, 27 Sep 2006 08:50:10 +0000 (01:50 -0700)] 
[PATCH] do_no_pfn()

Implement do_no_pfn() for handling mapping of memory without a struct page
backing it.  This avoids creating fake page table entries for regions which
are not backed by real memory.

This feature is used by the MSPEC driver and other users, where it is
highly undesirable to have a struct page sitting behind the page (for
instance if the page is accessed in cached mode via the struct page in
parallel to the the driver accessing it uncached, which can result in data
corruption on some architectures, such as ia64).

This version uses specific NOPFN_{SIGBUS,OOM} return values, rather than
expect all negative pfn values would be an error.  It also bugs on cow
mappings as this would not work with the VM.

[akpm@osdl.org: micro-optimise]
Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] zone_statistics: Use hot node instead of cold zone_pgdat
Christoph Lameter [Wed, 27 Sep 2006 08:50:10 +0000 (01:50 -0700)] 
[PATCH] zone_statistics: Use hot node instead of cold zone_pgdat

Now that we have the node in the hot zone of struct zone we can avoid
accessing zone_pgdat in zone_statistics.

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] Do not allocate pagesets for unpopulated zones.
Christoph Lameter [Wed, 27 Sep 2006 08:50:09 +0000 (01:50 -0700)] 
[PATCH] Do not allocate pagesets for unpopulated zones.

We do not need to allocate pagesets for unpopulated zones.

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] Add node to zone for the NUMA case
Christoph Lameter [Wed, 27 Sep 2006 08:50:08 +0000 (01:50 -0700)] 
[PATCH] Add node to zone for the NUMA case

Add the node in order to optimize zone_to_nid.

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