]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agofs/Kconfig: move sunrpc out
Alexey Dobriyan [Thu, 22 Jan 2009 08:11:56 +0000 (11:11 +0300)]
fs/Kconfig: move sunrpc out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move nfsd out
Alexey Dobriyan [Thu, 22 Jan 2009 08:08:58 +0000 (11:08 +0300)]
fs/Kconfig: move nfsd out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move nfs out
Alexey Dobriyan [Thu, 22 Jan 2009 08:07:41 +0000 (11:07 +0300)]
fs/Kconfig: move nfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move ufs out
Alexey Dobriyan [Thu, 22 Jan 2009 08:05:02 +0000 (11:05 +0300)]
fs/Kconfig: move ufs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move sysv out
Alexey Dobriyan [Thu, 22 Jan 2009 08:04:23 +0000 (11:04 +0300)]
fs/Kconfig: move sysv out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move romfs out
Alexey Dobriyan [Thu, 22 Jan 2009 08:03:34 +0000 (11:03 +0300)]
fs/Kconfig: move romfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move qnx4 out
Alexey Dobriyan [Thu, 22 Jan 2009 08:02:21 +0000 (11:02 +0300)]
fs/Kconfig: move qnx4 out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move hpfs out
Alexey Dobriyan [Thu, 22 Jan 2009 08:01:26 +0000 (11:01 +0300)]
fs/Kconfig: move hpfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move omfs out
Alexey Dobriyan [Thu, 22 Jan 2009 08:00:41 +0000 (11:00 +0300)]
fs/Kconfig: move omfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move minix out
Alexey Dobriyan [Thu, 22 Jan 2009 07:59:49 +0000 (10:59 +0300)]
fs/Kconfig: move minix out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move vxfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:58:51 +0000 (10:58 +0300)]
fs/Kconfig: move vxfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move squashfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:57:46 +0000 (10:57 +0300)]
fs/Kconfig: move squashfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move cramfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:56:54 +0000 (10:56 +0300)]
fs/Kconfig: move cramfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move efs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:56:07 +0000 (10:56 +0300)]
fs/Kconfig: move efs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move bfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:55:13 +0000 (10:55 +0300)]
fs/Kconfig: move bfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move befs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:54:16 +0000 (10:54 +0300)]
fs/Kconfig: move befs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move hfs, hfsplus out
Alexey Dobriyan [Thu, 22 Jan 2009 07:53:24 +0000 (10:53 +0300)]
fs/Kconfig: move hfs, hfsplus out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move ecryptfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:50:50 +0000 (10:50 +0300)]
fs/Kconfig: move ecryptfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move affs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:49:44 +0000 (10:49 +0300)]
fs/Kconfig: move affs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move adfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:48:46 +0000 (10:48 +0300)]
fs/Kconfig: move adfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move configfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:42:52 +0000 (10:42 +0300)]
fs/Kconfig: move configfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move sysfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:40:58 +0000 (10:40 +0300)]
fs/Kconfig: move sysfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move ntfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:39:20 +0000 (10:39 +0300)]
fs/Kconfig: move ntfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move fat out
Alexey Dobriyan [Thu, 22 Jan 2009 07:37:59 +0000 (10:37 +0300)]
fs/Kconfig: move fat out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move iso9660, udf out
Alexey Dobriyan [Thu, 22 Jan 2009 07:35:21 +0000 (10:35 +0300)]
fs/Kconfig: move iso9660, udf out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move fuse out
Alexey Dobriyan [Thu, 22 Jan 2009 07:33:25 +0000 (10:33 +0300)]
fs/Kconfig: move fuse out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move autofs, autofs4 out
Alexey Dobriyan [Thu, 22 Jan 2009 07:31:56 +0000 (10:31 +0300)]
fs/Kconfig: move autofs, autofs4 out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move btrfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:27:30 +0000 (10:27 +0300)]
fs/Kconfig: move btrfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move ocfs2 out
Alexey Dobriyan [Thu, 22 Jan 2009 07:26:11 +0000 (10:26 +0300)]
fs/Kconfig: move ocfs2 out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move jfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:24:27 +0000 (10:24 +0300)]
fs/Kconfig: move jfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agofs/Kconfig: move reiserfs out
Alexey Dobriyan [Thu, 22 Jan 2009 07:22:31 +0000 (10:22 +0300)]
fs/Kconfig: move reiserfs out

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoMerge branch 'core/debugobjects' into core/urgent
Thomas Gleixner [Thu, 22 Jan 2009 09:03:02 +0000 (10:03 +0100)]
Merge branch 'core/debugobjects' into core/urgent

15 years agodebugobjects: add and use INIT_WORK_ON_STACK
Thomas Gleixner [Thu, 22 Jan 2009 08:50:44 +0000 (09:50 +0100)]
debugobjects: add and use INIT_WORK_ON_STACK

Impact: Fix debugobjects warning

debugobject enabled kernels spit out a warning in hpet code due to a
workqueue which is initialized on stack.

Add INIT_WORK_ON_STACK() which calls init_timer_on_stack() and use it
in hpet.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agorcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR
Lai Jiangshan [Thu, 22 Jan 2009 01:46:38 +0000 (09:46 +0800)]
rcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR

Impact: remove the old CONFIG_RCU_CPU_STALL_DETECTOR

tree_rcu introduce CONFIG_RCU_CPU_STALL_DETECTOR again.

These two are the same exactly except:

 the old one "depends on CLASSIC_RCU"
 the new one "depends on CLASSIC_RCU || TREE_RCU"

This patch remove the old one.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: unmask CPUID levels on Intel CPUs
H. Peter Anvin [Wed, 21 Jan 2009 23:04:32 +0000 (15:04 -0800)]
x86: unmask CPUID levels on Intel CPUs

Impact: Fixes crashes with misconfigured BIOSes on XSAVE hardware

Avuton Olrich reported early boot crashes with v2.6.28 and
bisected it down to dc1e35c6e95e8923cf1d3510438b63c600fee1e2
("x86, xsave: enable xsave/xrstor on cpus with xsave support").

If the CPUID limit bit in MSR_IA32_MISC_ENABLE is set, clear it to
make all CPUID information available.  This is required for some
features to work, in particular XSAVE.

Reported-and-bisected-by: Avuton Olrich <avuton@gmail.com>
Tested-by: Avuton Olrich <avuton@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15 years agoi915: fix freeing path for gem phys objects.
Dave Airlie [Thu, 22 Jan 2009 07:58:49 +0000 (17:58 +1000)]
i915: fix freeing path for gem phys objects.

This off-by-one was pointed out by Jesse Barnes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: create mode_config idr lock
Jesse Barnes [Mon, 19 Jan 2009 07:21:45 +0000 (17:21 +1000)]
drm: create mode_config idr lock

Create a separate mode_config IDR lock for simplicity.  The core DRM
config structures (connector, mode, etc. lists) are still protected by
the mode_config mutex, but the CRTC IDR (used for the various identifier
IDs) is now protected by the mode_config idr_mutex.  Simplifies the
locking a bit and removes a warning.

All objects are protected by the config mutex, we may in the future,
split the object further to have reference counts.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoLong btree pointers are still 64 bit on disk
Dave Chinner [Wed, 21 Jan 2009 04:22:17 +0000 (15:22 +1100)]
Long btree pointers are still 64 bit on disk

[XFS] Long btree pointers are still 64 bit on disk

On 32 bit machines with CONFIG_LBD=n, XFS reduces the
in memory size of xfs_fsblock_t to 32 bits so that it
will fit within 32 bit addressing. However, the disk format
for long btree pointers are still 64 bits in size.

The recent btree rewrite failed to take this into account
when initialising new btree blocks, setting sibling pointers
to NULL and checking if they are NULL. Hence checking whether
a 64 bit NULL was the same as a 32 bit NULL was failingi
resulting in NULL sibling pointers failing to be detected
correctly. This showed up as WANT_CORRUPTED_GOTO shutdowns
in xfs_btree_delrec.

Fix this by making all the comparisons and setting of long
pointer btree NULL blocks to the disk format, not the
in memory format. i.e. use NULLDFSBNO.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Reported-by: Jacek Luczak <difrost.kernel@gmail.com>
Reported-by: Danny ter Haar <dth@dth.net>
Tested-by: Jacek Luczak <difrost.kernel@gmail.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
15 years agox86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h>
H. Peter Anvin [Wed, 21 Jan 2009 23:01:56 +0000 (15:01 -0800)]
x86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h>

Impact: None (new bit definitions currently unused)

Add bit definitions for the MSR_IA32_MISC_ENABLE MSRs to
<asm/msr-index.h>.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15 years agodlm: initialize file_lock struct in GETLK before copying conflicting lock
Jeff Layton [Wed, 21 Jan 2009 16:34:50 +0000 (11:34 -0500)]
dlm: initialize file_lock struct in GETLK before copying conflicting lock

dlm_posix_get fills out the relevant fields in the file_lock before
returning when there is a lock conflict, but doesn't clean out any of
the other fields in the file_lock.

When nfsd does a NFSv4 lockt call, it sets the fl_lmops to
nfsd_posix_mng_ops before calling the lower fs. When the lock comes back
after testing a lock on GFS2, it still has that field set. This confuses
nfsd into thinking that the file_lock is a nfsd4 lock.

Fix this by making DLM reinitialize the file_lock before copying the
fields from the conflicting lock.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: fix plock notify callback to lockd
David Teigland [Mon, 19 Jan 2009 19:13:33 +0000 (13:13 -0600)]
dlm: fix plock notify callback to lockd

We should use the original copy of the file_lock, fl, instead
of the copy, flc in the lockd notify callback.  The range in flc has
been modified by posix_lock_file(), so it will not match a copy of the
lock in lockd.

Signed-off-by: David Teigland <teigland@redhat.com>
15 years agousb/mcs7830: Don't use buffers from stack for USB transfers
Christian Eggers [Wed, 21 Jan 2009 20:56:24 +0000 (12:56 -0800)]
usb/mcs7830: Don't use buffers from stack for USB transfers

mcs7830_set_reg() and mcs7830_get_reg() are called with buffers
from stack which must not be used directly for USB transfers.
This causes corruption of the stack particulary on non x86
architectures because DMA may be used for these transfers.

Signed-off-by: Christian Eggers <christian.eggers@kathrein.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousbnet: allow type check of devdbg arguments in non-debug build
Steve Glendinning [Wed, 21 Jan 2009 20:35:43 +0000 (12:35 -0800)]
usbnet: allow type check of devdbg arguments in non-debug build

Improve usbnet's devdbg to always type-check diagnostic arguments,
like dev_dbg (device.h).  This makes no change to the resulting size of
usbnet modules.

This patch also removes an #ifdef DEBUG directive from rndis_wlan so
it's devdbg statements are always type-checked at compile time.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: ctnetlink: fix scheduling while atomic
Patrick McHardy [Wed, 21 Jan 2009 20:19:49 +0000 (12:19 -0800)]
netfilter: ctnetlink: fix scheduling while atomic

Caused by call to request_module() while holding nf_conntrack_lock.

Reported-and-tested-by: Kövesdi György <kgy@teledigit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agox86: fix PTE corruption issue while mapping RAM using /dev/mem
Suresh Siddha [Tue, 13 Jan 2009 18:21:30 +0000 (10:21 -0800)]
x86: fix PTE corruption issue while mapping RAM using /dev/mem

Beschorner Daniel reported:
> hwinfo problem since 2.6.28, showing this in the oops:
> Corrupted page table at address 7fd04de3ec00

Also, PaX Team reported a regression with this commit:

> commit 9542ada803198e6eba29d3289abb39ea82047b92
> Author: Suresh Siddha <suresh.b.siddha@intel.com>
> Date:   Wed Sep 24 08:53:33 2008 -0700
>
>     x86: track memtype for RAM in page struct

This commit breaks mapping any RAM page through /dev/mem, as the
reserve_memtype() was not initializing the return attribute type and as such
corrupting the PTE entry that was setup with the return attribute type.

Because of this bug, application mapping this RAM page through /dev/mem
will die with "Corrupted page table at address xxxx" message in the kernel
log and also the kernel identity mapping which maps the underlying RAM
page gets converted to UC.

Fix this by initializing the return attribute type before calling
reserve_ram_pages_type()

Reported-by: PaX Team <pageexec@freemail.hu>
Reported-and-tested-by: Beschorner Daniel <Daniel.Beschorner@facton.com>
Tested-and-Acked-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoi.MX31: framebuffer driver
Guennadi Liakhovetski [Wed, 21 Jan 2009 17:32:34 +0000 (10:32 -0700)]
i.MX31: framebuffer driver

This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop()
Jan Kara [Mon, 12 Jan 2009 16:44:34 +0000 (17:44 +0100)]
ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop()

Since ->acquire_dquot and ->release_dquot callbacks aren't called under
dqptr_sem anymore, we don't have to start a transaction and obtain locks
so early. So we can just remove all this complicated stuff.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mark Fasheh <mfasheh@suse.de>
15 years agox86: mtrr fix debug boot parameter
Thomas Renninger [Tue, 20 Jan 2009 09:37:39 +0000 (10:37 +0100)]
x86: mtrr fix debug boot parameter

while looking at:

  http://bugzilla.kernel.org/show_bug.cgi?id=11541

I realized that the mtrr.show param cannot work, because
the code is processed much too early.

This patch:
 - Declares mtrr.show as early_param
 - Stays consistent with the previous param (which I doubt
   that it ever worked), so mtrr.show=1 would still work
 - Declares mtrr_show as initdata

Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix page attribute corruption with cpa()
Suresh Siddha [Tue, 20 Jan 2009 22:20:21 +0000 (14:20 -0800)]
x86: fix page attribute corruption with cpa()

Impact: fix sporadic slowdowns and warning messages

This patch fixes a performance issue reported by Linus on his
Nehalem system. While Linus reverted the PAT patch (commit
58dab916dfb57328d50deb0aa9b3fc92efa248ff) which exposed the issue,
existing cpa() code can potentially still cause wrong(page attribute
corruption) behavior.

This patch also fixes the "WARNING: at arch/x86/mm/pageattr.c:560" that
various people reported.

In 64bit kernel, kernel identity mapping might have holes depending
on the available memory and how e820 reports the address range
covering the RAM, ACPI, PCI reserved regions. If there is a 2MB/1GB hole
in the address range that is not listed by e820 entries, kernel identity
mapping will have a corresponding hole in its 1-1 identity mapping.

If cpa() happens on the kernel identity mapping which falls into these holes,
existing code fails like this:

__change_page_attr_set_clr()
__change_page_attr()
returns 0 because of if (!kpte). But doesn't
set cpa->numpages and cpa->pfn.
cpa_process_alias()
uses uninitialized cpa->pfn (random value)
which can potentially lead to changing the page
attribute of kernel text/data, kernel identity
mapping of RAM pages etc. oops!

This bug was easily exposed by another PAT patch which was doing
cpa() more often on kernel identity mapping holes (physical range between
max_low_pfn_mapped and 4GB), where in here it was setting the
cache disable attribute(PCD) for kernel identity mappings aswell.

Fix cpa() to handle the kernel identity mapping holes. Retain
the WARN() for cpa() calls to other not present address ranges
(kernel-text/data, ioremap() addresses)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agodma-coherent: Restore dma_alloc_from_coherent() large alloc fall back policy.
Paul Mundt [Wed, 21 Jan 2009 09:51:53 +0000 (18:51 +0900)]
dma-coherent: Restore dma_alloc_from_coherent() large alloc fall back policy.

When doing large allocations (larger than the per-device coherent area)
the generic memory allocators are silently fallen back on regardless of
consideration for the per-device constraints.

In the DMA_MEMORY_EXCLUSIVE case falling back on generic memory is not
an option, as it tends not to be addressable by the DMA hardware in
question. This issue showed up with the 8139too breakage on the
Dreamcast, where non-addressable buffers were silently allocated due to
the size mismatch calculation -- while it should have simply errored out
upon being unable to satisfy the allocation with the given device
constraints.

This restores fall back behaviour to what it was before the oversized
request change caused multiple regressions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agodma-coherent: per-device coherent area is in pages, not bytes.
Adrian McMenamin [Wed, 21 Jan 2009 09:47:38 +0000 (18:47 +0900)]
dma-coherent: per-device coherent area is in pages, not bytes.

Commit 58c6d3dfe436eb8cfb451981d8fdc9044eaf42da ("dma-coherent: catch
oversized requests to dma_alloc_from_coherent()") attempted to add a
sanity check to bail out on allocations larger than the coherent area.

Unfortunately when this was implemented, the fact the coherent area
is tracked in pages rather than bytes was overlooked, which subsequently
broke every single dma_alloc_from_coherent() user, forcing the allocation
silently through generic memory instead.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk >
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: fix unaligned and nonexistent address handling
SUGIOKA Toshinobu [Wed, 21 Jan 2009 00:42:10 +0000 (09:42 +0900)]
sh: fix unaligned and nonexistent address handling

unaligned and nonexistent address causes wrong exception
handling in traps_32.c(handle_unaligned_access).

'handle_unalinged_ins' should return -EFAULT if address error
is fixed up with kernel exception table, otherwise
'handle_unaligned_access' increases already fixed program counter
and then crash.

for example
   ioctl(fd, TCGETA, (struct termio *)-1)
never return and stay in TASK_UNINTERRUPTIBLE state forever
in my kernel.

Signed-off-by: SUGIOKA Toshinobu <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agonommu: Stub in vm_map_ram()/vm_unmap_ram()/vm_unmap_aliases().
Paul Mundt [Wed, 21 Jan 2009 08:45:47 +0000 (17:45 +0900)]
nommu: Stub in vm_map_ram()/vm_unmap_ram()/vm_unmap_aliases().

Presently we do not support these interfaces, so make them BUG() wrappers
as per the rest of the vmap interface on nommu. Fixes up the modular xfs
build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: fix sh-sci / early printk build on sh7723
Magnus Damm [Tue, 20 Jan 2009 03:18:22 +0000 (12:18 +0900)]
sh: fix sh-sci / early printk build on sh7723

This patch adds the SCSPTR register to the sh-sci driver in
the case of sh7723 to make sure early printk builds properly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: export the sh7343 JPU to user space
Magnus Damm [Thu, 25 Dec 2008 09:55:26 +0000 (18:55 +0900)]
sh: export the sh7343 JPU to user space

This patch exports the sh7343 JPU to user space using uio_pdrv_genirq,
very similar to the sh7722 JPU patch by Hayama-san.

While at it fix up the end of the sh7722 JPU iomem resource.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: update defconfigs.
Paul Mundt [Tue, 13 Jan 2009 03:38:06 +0000 (12:38 +0900)]
sh: update defconfigs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Fix up SH7720/SH7721 SCI build.
Paul Mundt [Fri, 9 Jan 2009 07:32:08 +0000 (16:32 +0900)]
serial: sh-sci: Fix up SH7720/SH7721 SCI build.

Missing definitions for PORT_xxx defs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off obsolete busses from arch/sh/Kconfig.
Paul Mundt [Fri, 9 Jan 2009 06:12:30 +0000 (15:12 +0900)]
sh: Kill off obsolete busses from arch/sh/Kconfig.

ISA can go away now that the hd6446x PCMCIA drivers no longer exist
in-tree. The rationale for enabling CONFIG_ISA in the first place is
likewise no longer valid given that the subsystem has changed since
the time that assertion was valid.

While we are at it, kill off SBUS, MCA, EISA, and so on. These are
not supported and never will be.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7785lcr/highlander/hp6xx need linux/irq.h.
Paul Mundt [Fri, 9 Jan 2009 06:11:58 +0000 (15:11 +0900)]
sh: sh7785lcr/highlander/hp6xx need linux/irq.h.

More build fixes..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Migo-R MMC support using spi_gpio and mmc_spi.
Magnus Damm [Wed, 7 Jan 2009 11:36:10 +0000 (20:36 +0900)]
sh: Migo-R MMC support using spi_gpio and mmc_spi.

This patch adds CN9 MMC support for MigoR using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoRevert "x86: signal: change type of paramter for sys_rt_sigreturn()"
Ingo Molnar [Tue, 20 Jan 2009 08:31:49 +0000 (09:31 +0100)]
Revert "x86: signal: change type of paramter for sys_rt_sigreturn()"

This reverts commit 4217458dafaa57d8e26a46f5d05ab8c53cf64191.

Justin Madru bisected this commit, it was causing weird Firefox
crashes.

The reason is that GCC mis-optimizes (re-uses) the on-stack parameters of
the calling frame, which corrupts the syscall return pt_regs state and
thus corrupts user-space register state.

So we go back to the slightly less clean but more optimization-safe
method of getting to pt_regs. Also add a comment to explain this.

Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=12505

Reported-and-bisected-by: Justin Madru <jdm64@gawab.com>
Tested-by: Justin Madru <jdm64@gawab.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use early clobbers in usercopy*.c
Andi Kleen [Fri, 16 Jan 2009 14:22:11 +0000 (15:22 +0100)]
x86: use early clobbers in usercopy*.c

Impact: fix rare (but currently harmless) miscompile with certain configs and gcc versions

Hugh Dickins noticed that strncpy_from_user() was miscompiled
in some circumstances with gcc 4.3.

Thanks to Hugh's excellent analysis it was easy to track down.

Hugh writes:

> Try building an x86_64 defconfig 2.6.29-rc1 kernel tree,
> except not quite defconfig, switch CONFIG_PREEMPT_NONE=y
> and CONFIG_PREEMPT_VOLUNTARY off (because it expands a
> might_fault() there, which hides the issue): using a
> gcc 4.3.2 (I've checked both openSUSE 11.1 and Fedora 10).
>
> It generates the following:
>
0000000000000000 <__strncpy_from_user>:
>    0:   48 89 d1                mov    %rdx,%rcx
>    3:   48 85 c9                test   %rcx,%rcx
>    6:   74 0e                   je     16 <__strncpy_from_user+0x16>
>    8:   ac                      lods   %ds:(%rsi),%al
>    9:   aa                      stos   %al,%es:(%rdi)
>    a:   84 c0                   test   %al,%al
>    c:   74 05                   je     13 <__strncpy_from_user+0x13>
>    e:   48 ff c9                dec    %rcx
>   11:   75 f5                   jne    8 <__strncpy_from_user+0x8>
>   13:   48 29 c9                sub    %rcx,%rcx
>   16:   48 89 c8                mov    %rcx,%rax
>   19:   c3                      retq
>
> Observe that "sub %rcx,%rcx; mov %rcx,%rax", whereas gcc 4.2.1
> (and many other configs) say "sub %rcx,%rdx; mov %rdx,%rax".
> Isn't it returning 0 when it ought to be returning strlen?

The asm constraints for the strncpy_from_user() result were missing an
early clobber, which tells gcc that the last output arguments
are written before all input arguments are read.

Also add more early clobbers in the rest of the file and fix 32-bit
usercopy.c in the same way.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[ since this API is rarely used and no in-kernel user relies on a 'len'
  return value (they only rely on negative return values) this miscompile
  was never noticed in the field. But it's worth fixing it nevertheless. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosh: ap325rxa MMC support using spi_gpio and mmc_spi
Magnus Damm [Wed, 7 Jan 2009 11:35:21 +0000 (20:35 +0900)]
sh: ap325rxa MMC support using spi_gpio and mmc_spi

This patch adds CN3 MMC support for ap325rxa using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-x3proto: needs linux/irq.h.
Paul Mundt [Wed, 7 Jan 2009 08:45:02 +0000 (17:45 +0900)]
sh: mach-x3proto: needs linux/irq.h.

Since commit ba84be2338d3a2b6020d39279335bb06fcd332e1
("remove linux/hardirq.h from asm-generic/local.h"), the asm/irq.h
definitions that mach-x3proto/setup.c depends on are no longer available,
causing the build to die. So, include linux/irq.h explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Drop the BKL from sys_execve() on SH-5.
Paul Mundt [Wed, 7 Jan 2009 08:42:32 +0000 (17:42 +0900)]
sh: Drop the BKL from sys_execve() on SH-5.

Brings it in line with the SH implementation, the BKL is not
necessary here.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert rsk7203 to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:22:24 +0000 (17:22 +0900)]
sh: convert rsk7203 to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert magicpanelr2 platform to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:21:29 +0000 (17:21 +0900)]
sh: convert magicpanelr2 platform to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert ap325rxa platform to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:20:07 +0000 (17:20 +0900)]
sh: convert ap325rxa platform to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Add tw9910 support.
Kuninori Morimoto [Mon, 5 Jan 2009 07:25:16 +0000 (16:25 +0900)]
sh: mach-migor: Add tw9910 support.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Delete soc_camera_platform setup.
Kuninori Morimoto [Tue, 2 Dec 2008 07:42:24 +0000 (16:42 +0900)]
sh: mach-migor: Delete soc_camera_platform setup.

Migo-R can use ov772x camera driver in Linux 2.6.29.
Therefore, soc_camera_platform setting is no longer needed.
This patch removes it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Add ov772x support.
Kuninori Morimoto [Tue, 2 Dec 2008 07:38:34 +0000 (16:38 +0900)]
sh: mach-migor: Add ov772x support.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoasm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usage
Mike Frysinger [Fri, 2 Jan 2009 07:52:57 +0000 (02:52 -0500)]
asm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usage

Bring sh in line with all the other ports.  Not sure how sh missed this
change as all the other arches were being updated ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoarch/sh/mm: Move a dereference below a NULL test
Julia Lawall [Fri, 26 Dec 2008 07:27:24 +0000 (08:27 +0100)]
arch/sh/mm: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/).

// <smpl>
@disable is_null@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (E == NULL) S
  f(...,E->fld,...);
- if (E == NULL) S

@@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (!E) S
  f(...,E->fld,...);
- if (!E) S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoklist.c: bit 0 in pointer can't be used as flag
Jesper Nilsson [Wed, 14 Jan 2009 10:19:08 +0000 (11:19 +0100)]
klist.c: bit 0 in pointer can't be used as flag

The commit a1ed5b0cffe4b16a93a6a3390e8cee0fbef94f86
(klist: don't iterate over deleted entries) introduces use of the
low bit in a pointer to indicate if the knode is dead or not,
assuming that this bit is always free.

This is not true for all architectures, CRIS for example may align data
on byte borders.

The result is a bunch of warnings on bootup, devices not being
added correctly etc, reported by Hinko Kocevar <hinko.kocevar@cetrtapot.si>:

------------[ cut here ]------------
WARNING: at lib/klist.c:62 ()
Modules linked in:

Stack from c1fe1cf0:
       c01cc7f4 c1fe1d11 c000eb4e c000e4de 00000000 00000000 c1f4f78f c1f50c2d
       c01d008c c1fdd1a0 c1fdd1a0 c1fe1d38 c0192954 c1fe0000 00000000 c1fe1dc0
       00000002 7fffffff c1fe1da8 c0192d50 c1fe1dc0 00000002 7fffffff c1ff9fcc
Call Trace: [<c000eb4e>] [<c000e4de>] [<c0192954>] [<c0192d50>] [<c001d49e>] [<c000b688>] [<c0192a3c>]
       [<c000b63e>] [<c000b63e>] [<c001a542>] [<c00b55b0>] [<c00411c0>] [<c00b559c>] [<c01918e6>] [<c0191988>]
       [<c01919d0>] [<c00cd9c8>] [<c00cdd6a>] [<c0034178>] [<c000409a>] [<c0015576>] [<c0029130>] [<c0029078>]
       [<c0029170>] [<c0012336>] [<c00b4076>] [<c00b4770>] [<c006d6e4>] [<c006d974>] [<c006dca0>] [<c0028d6c>]
       [<c0028e12>] [<c0006424>] <4>---[ end trace 4eaa2a86a8e2da22 ]---
------------[ cut here ]------------
Repeat ad nauseam.

Wed, Jan 14, 2009 at 12:11:32AM +0100, Bastien ROUCARIES wrote:
> Perhaps using a pointerhackalign trick on this structure where
> #define pointerhackalign(x) __attribute__ ((aligned (x)))
> and declare
> struct klist_node {
> ...
> }  pointerhackalign(2);
>
> Because  __attribute__ ((aligned (x))) could only increase alignment
> it will safe to do that and serve as documentation purpose :)

That works, but we need to do it not for the struct klist_node,
but for the struct we insert into the void * in klist_node,
which is struct klist.

Reported-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si
Cc: Bastien ROUCARIES <roucaries.bastien@gmail.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodebugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
Inaky Perez-Gonzalez [Tue, 20 Jan 2009 20:17:28 +0000 (12:17 -0800)]
debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n

Toralf Förster <toralf.foerster@gmx.de> reported a build failure in
the WiMAX stack when CONFIG_DEBUG_FS=n

http://linuxwimax.org/pipermail/wimax/2009-January/000449.html

This is due to debugfs_create_size_t() missing an stub that returns
-ENODEV when the DEBUGFS subsystem is not configured in (like the rest
of the debugfs API).

This patch adds said stub.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysfs: fix problems with binary files
Greg Kroah-Hartman [Tue, 20 Jan 2009 23:51:16 +0000 (15:51 -0800)]
sysfs: fix problems with binary files

Some sysfs binary files don't like having 0 passed to them as a size.
Fix this up at the root by just returning to the vfs if userspace asks
us for a zero sized buffer.

Thanks to Pavel Roskin for pointing this out.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoPNP: fix broken pnp lowercasing for acpi module aliases
Kay Sievers [Thu, 8 Jan 2009 02:06:42 +0000 (03:06 +0100)]
PNP: fix broken pnp lowercasing for acpi module aliases

Based on a patch from Brian, who identified the issue.

Signed-off-by: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: Convert '/' to '!' in dev_set_name()
Roland Dreier [Sat, 10 Jan 2009 06:27:42 +0000 (22:27 -0800)]
driver core: Convert '/' to '!' in dev_set_name()

Commit 3ada8b7e ("block: struct device - replace bus_id with dev_name(),
dev_set_name()") deleted the code in register_disk() that changed a '/'
to a '!' in the device name when registering a disk, but dev_set_name()
does not perform this conversion.

This leads to amusing problems with disks that have '/' in their names:
for example a failure to boot with the root partition on a cciss device,
even though the kernel says it knows about the root device:

    VFS: Cannot open root device "cciss/c0d0p6" or unknown-block(0,0)
    Please append a correct "root=" boot option; here are the available partitions:
    6800        71652960 cciss/c0d0 driver: cciss
      6802               1 cciss/c0d0p2
      6805         2931831 cciss/c0d0p5
      6806        34354908 cciss/c0d0p6
    6810        71652960 cciss/c0d1 driver: cciss

Fix this by adding code to change '/' to '!' in dev_set_name() to handle
this until dev_set_name() is converted to use kobject_set_name().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda: 83xxx port 0xe DAC selection
Matthew Ranostay [Tue, 20 Jan 2009 21:50:25 +0000 (16:50 -0500)]
ALSA: hda: 83xxx port 0xe DAC selection

On the 92hd8xxx codecs port 0xe needs the connection selected to be the
last DAC in the list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agogro: Fix merging of paged packets
Herbert Xu [Sat, 17 Jan 2009 19:48:13 +0000 (19:48 +0000)]
gro: Fix merging of paged packets

The previous fix to paged packets broke the merging because it
reset the skb->len before we added it to the merged packet.  This
wasn't detected because it simply resulted in the truncation of
the packet while the missing bit is subsequently retransmitted.

The fix is to store skb->len before we clobber it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Fix error handling on extremely short frags
Herbert Xu [Sat, 17 Jan 2009 19:47:18 +0000 (19:47 +0000)]
gro: Fix error handling on extremely short frags

When a frag is shorter than an Ethernet header, we'd return a
zeroed packet instead of aborting.  This patch fixes that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Fix handling of complete checksums in IPv6
Herbert Xu [Sat, 17 Jan 2009 19:46:16 +0000 (19:46 +0000)]
gro: Fix handling of complete checksums in IPv6

We need to perform skb_postpull_rcsum after pulling the IPv6
header in order to maintain the correctness of the complete
checksum.

This patch also adds a missing iph reload after pulling.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovia-velocity: fix hot spin
roel kluin [Sat, 17 Jan 2009 11:14:31 +0000 (11:14 +0000)]
via-velocity: fix hot spin

while(--j >= 0) keeps spinning when j is unsigned:

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri10ge: don't forget pci_disable_device()
Brice Goglin [Sat, 17 Jan 2009 08:27:19 +0000 (08:27 +0000)]
myri10ge: don't forget pci_disable_device()

Don't forget to call pci_disable_device() in myri10ge_remove()
and when myri10ge_probe() fails.

By the way, update the copyright years.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoNET: net_namespace, fix lock imbalance
Jiri Slaby [Sat, 17 Jan 2009 06:47:12 +0000 (06:47 +0000)]
NET: net_namespace, fix lock imbalance

register_pernet_gen_subsys omits mutex_unlock in one fail path.
Fix it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 20 Jan 2009 22:37:10 +0000 (14:37 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agoASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Timur Tabi [Mon, 19 Jan 2009 23:14:24 +0000 (17:14 -0600)]
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers

The Freescale MPC8610 driver was defining two SOC card (snd_soc_card)
structures, partially initializing each one, but registering only one of
them with ASoC.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoRevert "xfrm: For 32/64 compatability wrt. xfrm_usersa_info"
David S. Miller [Tue, 20 Jan 2009 17:49:51 +0000 (09:49 -0800)]
Revert "xfrm: For 32/64 compatability wrt. xfrm_usersa_info"

This reverts commit fc8c7dc1b29560c016a67a34ccff32a712b5aa86.

As indicated by Jiri Klimes, this won't work.  These numbers are
not only used the size validation, they are also used to locate
attributes sitting after the message.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix DAX handling via userspace access from kernel.
David S. Miller [Tue, 20 Jan 2009 06:44:04 +0000 (22:44 -0800)]
sparc64: Fix DAX handling via userspace access from kernel.

If we do a userspace access from kernel mode, and get a
data access exception, we need to check the exception
table just like a normal fault does.

The spitfire DAX handler was doing this, but such logic
was missing from the sun4v DAX code.

Reported-by: Dennis Gilmore <dgilmore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()
David S. Miller [Tue, 20 Jan 2009 05:11:27 +0000 (21:11 -0800)]
sparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
Christian Borntraeger [Tue, 20 Jan 2009 04:21:49 +0000 (20:21 -0800)]
[CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit

sparc64 needs sign-extended function parameters. We have to enable
the system call wrappers.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowimax/i2400m: error paths that need to free an skb should use kfree_skb()
Inaky Perez-Gonzalez [Mon, 19 Jan 2009 13:19:30 +0000 (13:19 +0000)]
wimax/i2400m: error paths that need to free an skb should use kfree_skb()

Roel Kluin reported a bug in two error paths where skbs were wrongly
being freed using kfree(). He provided a fix where it was replaced to
kfree_skb(), as it should be.

However, in i2400mu_rx(), the error path was missing returning an
indication of the failure. Changed to reset rx_skb to NULL and return
it to the caller, i2400mu_rxd(). It will be treated as a transient
error and just ignore the packet.

Depending on the buffering conditions inside the device, the data
packet might be dropped or the device will signal the host again for
data-ready-to-read and the host will retry.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: prevent interrupt storm on ifconfig down
Gabriel Paubert [Tue, 20 Jan 2009 01:18:09 +0000 (17:18 -0800)]
mv643xx_eth: prevent interrupt storm on ifconfig down

Contrary to what the docs say, the 'extended interrupt cause' bit in
the interrupt cause register (bit 1) appears to not be maskable on at
least some of the mv643xx_eth platforms, making writing zeroes to the
interrupt mask register but not the extended interrupt mask register
insufficient to stop interrupts from occuring.  Therefore, also write
zeroes to the extended interrupt mask register when shutting down the
port.

This fixes the interrupt storm seen on the Pegasos board when shutting
down the interface.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: fix multicast filter programming
Lennert Buytenhek [Tue, 20 Jan 2009 01:17:18 +0000 (17:17 -0800)]
mv643xx_eth: fix multicast filter programming

Commit 66e63ffbc04706568d8789cbb00eaa8ddbcae648 ("mv643xx_eth:
implement ->set_rx_mode()") cleaned up mv643xx_eth's multicast filter
programming, but broke it as well.

The non-special multicast filter table (for multicast addresses that
are not of the form 01:00:5e:00:00:xx) consists of 256 hash table
buckets organised as 64 32-bit words, where the 'accept' bits are
in the LSB of each byte, so in bits 24 16 8 0 of each 32-bit word.
The old code got this right, but the referenced commit broke this by
using bits 3 2 1 0 instead.  This commit fixes this up.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert "mv643xx_eth: use longer DMA bursts".
Lennert Buytenhek [Tue, 20 Jan 2009 01:16:00 +0000 (17:16 -0800)]
Revert "mv643xx_eth: use longer DMA bursts".

This reverts commit cd4ccf76bfd2c36d351e68be7e6a597268f98a1a.

On the Pegasos board, we can't do DMA burst that are longer than
one cache line.  For now, go back to using 32 byte DMA bursts for
all mv643xx_eth platforms -- we can switch the ARM-based platforms
back to doing long 128 byte bursts in the next development cycle.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reported-by: Alan Curry <pacman@kosh.dhis.org>
Reported-by: Gabriel Paubert <paubert@iram.es>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix data corruption when splicing from sockets.
Jarek Poplawski [Tue, 20 Jan 2009 01:03:56 +0000 (17:03 -0800)]
net: Fix data corruption when splicing from sockets.

The trick in socket splicing where we try to convert the skb->data
into a page based reference using virt_to_page() does not work so
well.

The idea is to pass the virt_to_page() reference via the pipe
buffer, and refcount the buffer using a SKB reference.

But if we are splicing from a socket to a socket (via sendpage)
this doesn't work.

The from side processing will grab the page (and SKB) references.
The sendpage() calls will grab page references only, return, and
then the from side processing completes and drops the SKB ref.

The page based reference to skb->data is not enough to keep the
kmalloc() buffer backing it from being reused.  Yet, that is
all that the socket send side has at this point.

This leads to data corruption if the skb->data buffer is reused
by SLAB before the send side socket actually gets the TX packet
out to the device.

The fix employed here is to simply allocate a page and copy the
skb->data bytes into that page.

This will hurt performance, but there is no clear way to fix this
properly without a copy at the present time, and it is important
to get rid of the data corruption.

With fixes from Herbert Xu.

Tested-by: Willy Tarreau <w@1wt.eu>
Foreseen-by: Changli Gao <xiaosuo@gmail.com>
Diagnosed-by: Willy Tarreau <w@1wt.eu>
Reported-by: Willy Tarreau <w@1wt.eu>
Fixed-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Fix firmware loading
Matt Carlson [Tue, 20 Jan 2009 00:57:45 +0000 (16:57 -0800)]
tg3: Fix firmware loading

This patch modifies how the tg3 driver handles device firmware.

The patch starts by consolidating David Woodhouse's earlier patch under
the same name.  Specifically, the patch moves the request_firmware call
into a separate tg3_request_firmware() function and calls that function
from tg3_open() rather than tg3_init_one().

The patch then goes on to limit the number of devices that will make
request_firmware calls.  The original firmware patch unnecessarily
requested TSO firmware for devices that did not need it.  This patch
reduces the set of devices making TSO firmware patches to approximately
the following device set : 5703, 5704, and 5705.

Finally, the patch reduces the effects of a request_firmware() failure.
For those devices that are requesting TSO firmware, the driver will turn
off the TSO capability.  If TSO firmware becomes available at a later
time, the device can be closed and then opened again to reacquire the
TSO capability.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
Peter P Waskiewicz Jr [Tue, 20 Jan 2009 00:55:03 +0000 (16:55 -0800)]
ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()

netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
queues is redundant and unnecessary.  By the same token, netif_carrier_on()
will be sufficient to re-enable Tx, so waking the queues is unnecessary.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix tag stripping for VLAN ID 0
Don Skidmore [Tue, 20 Jan 2009 00:54:36 +0000 (16:54 -0800)]
ixgbe: fix tag stripping for VLAN ID 0

Register VLAN ID 0 so that frames with VLAN ID 0 are received and get
their tag stripped when ixgbe is not in DCB mode.  VLAN ID 0 means
that the frame is 'priority tagged' only - it is not a VLAN, but the
priority value is the tag in valid.  The functions
ixgbe_vlan_rx_register() and ixgbe_vlan_rx_kill_vid() were moved up a
couple functions to correct compiling issues with this change.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix dca issue with relaxed ordering turned on
Don Skidmore [Tue, 20 Jan 2009 00:54:13 +0000 (16:54 -0800)]
ixgbe: fix dca issue with relaxed ordering turned on

The is an issue where setting Relaxed Ordering (RO) bit
(in a PCI-E write transaction) on 82598 causing the chipset
to drop DCA hints.  This patch forces RO not to be set for
descriptors as well as payload.  This will only be in effect
while DCA is enabled and no performance difference was
noticed in testing.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>