Randy Dunlap [Fri, 22 Dec 2006 09:10:50 +0000 (01:10 -0800)]
[PATCH] kernel-doc: allow unnamed structs/unions
Make kernel-doc support unnamed (anonymous) structs and unions. There is
one (union) in include/linux/skbuff.h (inside struct sk_buff) that is
currently generating a kernel-doc warning, so this fixes that warning.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vadim Lobanov [Fri, 22 Dec 2006 09:10:43 +0000 (01:10 -0800)]
[PATCH] fdtable: Provide free_fdtable() wrapper
Christoph Hellwig has expressed concerns that the recent fdtable changes
expose the details of the RCU methodology used to release no-longer-used
fdtable structures to the rest of the kernel. The trivial patch below
addresses these concerns by introducing the appropriate free_fdtable()
calls, which simply wrap the release RCU usage. Since free_fdtable() is a
one-liner, it makes sense to promote it to an inline helper.
Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Fri, 22 Dec 2006 09:10:36 +0000 (01:10 -0800)]
[PATCH] gxt4500: Fix colormap and PLL setting, support GXT6000P
This fixes some bugs in the gxt4500 framebuffer driver, and adds support
for GXT6000P cards.
First, I had the red and blue channels swapped in the colormap update code,
resulting in penguins' noses and feet turning blue (though the penguins
weren't actually shivering :).
Secondly, the code that calculated the values to put in the PLL that
generates the pixel clock wasn't observing some constraints that I wasn't
originally aware of, but am now that I have some documentation on the chip.
The GXT6000P is essentially identical from software's point of view, except
for a different reference clock for the PLL, and the addition of a geometry
engine (which this driver doesn't use).
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akinobu Mita [Fri, 22 Dec 2006 09:10:28 +0000 (01:10 -0800)]
[PATCH] tlclk: delete unnecessary sysfs_remove_group
It is unnecessary and invalid to call sysfs_remove_group() after
sysfs_create_group() failure.
Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Cc: Mark Gross <mark.gross@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ben Dooks [Fri, 22 Dec 2006 09:10:23 +0000 (01:10 -0800)]
[PATCH] MAINTAINERS: fix email for S3C2410 and S3C2440
Change the email address for the S3C2410 and S3C2440 maintainer. The old
addresses have been deleted due to spam issues.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jean Delvare [Fri, 22 Dec 2006 09:10:19 +0000 (01:10 -0800)]
[PATCH] microcode: fix mc_cpu_notifier section warning
Structure mc_cpu_notifier references a __cpuinit function, but isn't
declared __cpuinitdata itself:
WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 22 Dec 2006 09:10:14 +0000 (01:10 -0800)]
[PATCH] schedule_timeout(): improve warning message
Kyle is hitting this warning, and we don't have a clue what it's caused by.
Add the obligatory dump_stack().
Cc: kyle <kylewong@southa.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akinobu Mita [Fri, 22 Dec 2006 09:10:09 +0000 (01:10 -0800)]
[PATCH] gss_spkm3: fix error handling in module init
Return error and prevent from loading module when gss_mech_register()
failed.
Cc: Andy Adamson <andros@citi.umich.edu>
Cc: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akinobu Mita [Fri, 22 Dec 2006 09:10:02 +0000 (01:10 -0800)]
[PATCH] audit: fix kstrdup() error check
kstrdup() returns NULL on error.
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Yasunori Goto [Fri, 22 Dec 2006 09:09:54 +0000 (01:09 -0800)]
[PATCH] compile error of register_memory()
register_memory() becomes double definition in 2.6.20-rc1. It is defined
in arch/i386/kernel/setup.c as static definition in 2.6.19. But it is
moved to arch/i386/kernel/e820.c in 2.6.20-rc1. And same name function is
defined in driver/base/memory.c too. So, it becomes cause of compile error
of duplicate definition if memory hotplug option is on.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Yasunori Goto [Fri, 22 Dec 2006 09:09:44 +0000 (01:09 -0800)]
[PATCH] handle SLOB with sparsemen
This is to disallow to make SLOB with SMP or SPARSEMEM. This avoids latent
troubles of SLOB with SLAB_DESTROY_BY_RCU. And fix compile error.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick Piggin [Fri, 22 Dec 2006 09:09:33 +0000 (01:09 -0800)]
[PATCH] mm: more rmap debugging
Add more debugging in the rmap code in an attempt to locate to source of
the occasional "mapcount went negative" assertions.
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ed L. Cashin [Fri, 22 Dec 2006 09:09:21 +0000 (01:09 -0800)]
[PATCH] fix aoe without scatter-gather [Bug 7662]
Fix a bug that only appears when AoE goes over a network card that does not
support scatter-gather. The headers in the linear part of the skb appeared
to be larger than they really were, resulting in data that was offset by 24
bytes.
This patch eliminates the offset data on cards that don't support
scatter-gather or have had scatter-gather turned off. There remains an
unrelated issue that I'll address in a separate email.
Fixes bugzilla #7662
Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Cc: <stable@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: <boddingt@optusnet.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robert P. J. Day [Fri, 22 Dec 2006 09:09:11 +0000 (01:09 -0800)]
[PATCH] Add a new section to CodingStyle, promoting include/linux/kernel.h
Add a new section to the CodingStyle file, encouraging people not to
re-invent available kernel macros such as ARRAY_SIZE(), FIELD_SIZEOF(),
min() and max(), among others.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Josh Boyer [Fri, 22 Dec 2006 09:09:03 +0000 (01:09 -0800)]
[PATCH] Make JFFS depend on CONFIG_BROKEN
Mark JFFS as broken and provide a warning to users that it is deprecated
and scheduled for removal in 2.6.21
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Fri, 22 Dec 2006 09:08:52 +0000 (01:08 -0800)]
[PATCH] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
Matthew Wilcox noticed that the debug_locks_silent use should be inverted
in DEBUG_LOCKS_WARN_ON(). This bug was causing spurious stacktraces and
incorrect failures in the locking self-test on the parisc kernel.
Bug-found-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Halcrow [Fri, 22 Dec 2006 09:08:43 +0000 (01:08 -0800)]
[PATCH] fsstack: Remove inode copy
Trevor found a file size problem in eCryptfs in recent kernels, and he
tracked it down to an fsstack change.
This was the eCryptfs copy_attr_all:
> -void ecryptfs_copy_attr_all(struct inode *dest, const struct inode *src)
> -{
> - dest->i_mode = src->i_mode;
> - dest->i_nlink = src->i_nlink;
> - dest->i_uid = src->i_uid;
> - dest->i_gid = src->i_gid;
> - dest->i_rdev = src->i_rdev;
> - dest->i_atime = src->i_atime;
> - dest->i_mtime = src->i_mtime;
> - dest->i_ctime = src->i_ctime;
> - dest->i_blkbits = src->i_blkbits;
> - dest->i_flags = src->i_flags;
> -}
This is the fsstack copy_attr_all:
> +void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
> + int (*get_nlinks)(struct inode *))
> +{
> + if (!get_nlinks)
> + dest->i_nlink = src->i_nlink;
> + else
> + dest->i_nlink = (*get_nlinks)(dest);
> +
> + dest->i_mode = src->i_mode;
> + dest->i_uid = src->i_uid;
> + dest->i_gid = src->i_gid;
> + dest->i_rdev = src->i_rdev;
> + dest->i_atime = src->i_atime;
> + dest->i_mtime = src->i_mtime;
> + dest->i_ctime = src->i_ctime;
> + dest->i_blkbits = src->i_blkbits;
> + dest->i_flags = src->i_flags;
> +
> + fsstack_copy_inode_size(dest, src);
> +}
The addition of copy_inode_size breaks eCryptfs, since eCryptfs needs to
interpolate the file sizes (eCryptfs has extra space in the lower file for
the header). The setting of the upper inode size occurs elsewhere in
eCryptfs, and the new copy_attr_all now undoes what eCryptfs was doing
right beforehand.
I see three ways of going forward from here. (1) Something like this patch
needs to go in (assuming it jives with Unionfs), (2) we need to make a
change to the fsstack API for more fine-grained control over copying
attributes (e.g., by also including a callback function for calculating the
right file size, which will require some more work on both eCryptfs and
Unionfs), or (3) the fsstack patch on eCryptfs (commit
0cc72dc7f050188d8d7344b1dd688cbc68d3cd30 made on Fri Dec 8 02:36:31 2006
-0800) needs to be yanked in 2.6.20.
I think the simplest solution, from eCryptfs' perspective, is to just
remove the inode size copy.
Remove inode size copy in general fsstack attr copy code. Stacked
filesystems may need to interpolate the inode size, since the file
size in the lower file may be different than the file size in the
stacked layer.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Acked-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 22 Dec 2006 09:08:33 +0000 (01:08 -0800)]
[PATCH] smc911 workqueue fixes
Teach this driver about the workqueue changes.
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vitaly Wool [Fri, 22 Dec 2006 09:08:24 +0000 (01:08 -0800)]
[PATCH] smc911x: fix netpoll compilation faliure
Fix the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set.
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Thomas Gleixner [Fri, 22 Dec 2006 09:08:14 +0000 (01:08 -0800)]
[PATCH] genirq: fix irq flow handler uninstall
The sanity check for no_irq_chip in __set_irq_hander() is unconditional on
both install and uninstall of an handler. This triggers false warnings and
replaces no_irq_chip by dummy_irq_chip in the uninstall case.
Check only, when a real handler is installed.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Magnus Damm [Fri, 22 Dec 2006 09:08:01 +0000 (01:08 -0800)]
[PATCH] fix vm_events_fold_cpu() build breakage
fix vm_events_fold_cpu() build breakage
2.6.20-rc1 does not build properly if CONFIG_VM_EVENT_COUNTERS is set
and CONFIG_HOTPLUG is unset:
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
mm/built-in.o: In function `page_alloc_cpu_notify':
page_alloc.c:(.text+0x56eb): undefined reference to `vm_events_fold_cpu'
make: *** [.tmp_vmlinux1] Error 1
[akpm@osdl.org: cleanup]
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tim Chen [Fri, 22 Dec 2006 09:07:50 +0000 (01:07 -0800)]
[PATCH] sched: remove __cpuinitdata anotation to cpu_isolated_map
The structure cpu_isolated_map is used not only during initialization.
Multi-core scheduler configuration changes and exclusive cpusets
use this during run time. During setting of sched_mc_power_savings
policy, this structure is accessed to update sched_domains.
Signed-off-by: Tim Chen <tim.c.chen@intel.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Fri, 22 Dec 2006 09:07:32 +0000 (01:07 -0800)]
[PATCH] Add cscope generated files to .gitignore
Ignore files generated by 'make cscope'
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nigel Cunningham [Fri, 22 Dec 2006 09:07:21 +0000 (01:07 -0800)]
[PATCH] Fix swapped parameters in mm/vmscan.c
The version of mm/vmscan.c in Linus' current tree has swapped parameters in
the shrink_all_zones declaration and call, used by the various
suspend-to-disk implementations. This doesn't seem to have any great
adverse effect, but it's clearly wrong.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 22 Dec 2006 09:07:09 +0000 (01:07 -0800)]
[PATCH] fs/sysv/: proper prototypes for 2 functions
Add proper prototypes for sysv_{init,destroy}_icache() in sysv.h
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 22 Dec 2006 09:07:00 +0000 (01:07 -0800)]
[PATCH] make kernel/printk.c:ignore_loglevel_setup() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Fri, 22 Dec 2006 09:06:52 +0000 (01:06 -0800)]
[PATCH] fix kernel-doc warnings in 2.6.20-rc1
Fix kernel-doc warnings in 2.6.20-rc1.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christoph Lameter [Fri, 22 Dec 2006 09:06:44 +0000 (01:06 -0800)]
[PATCH] slab: fix kmem_ptr_validate definition
The declaration of kmem_ptr_validate in slab.h does not match the
one in slab.c. Remove the fastcall attribute (this is the only use in
slab.c).
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 22 Dec 2006 09:06:36 +0000 (01:06 -0800)]
[PATCH] rtc warning fix
drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used
Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Badari Pulavarty [Fri, 22 Dec 2006 09:06:23 +0000 (01:06 -0800)]
[PATCH] Fix for shmem_truncate_range() BUG_ON()
Ran into BUG() while doing madvise(REMOVE) testing. If we are punching a
hole into shared memory segment using madvise(REMOVE) and the entire hole
is below the indirect blocks, we hit following assert.
BUG_ON(limit <= SHMEM_NR_DIRECT);
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mark Fasheh [Fri, 22 Dec 2006 09:06:15 +0000 (01:06 -0800)]
[PATCH] Conditionally check expected_preempt_count in __resched_legal()
Commit
2d7d253548cffdce80f4e03664686e9ccb1b0ed7 ("fix cond_resched() fix")
introduced an 'expected_preempt_count' parameter to __resched_legal() to
fix a bug where it was returning a false negative when called from
cond_resched_lock() and preemption was enabled.
Unfortunately this broke things for when preemption is disabled.
preempt_count() will always return zero, thus failing the check against any
value of expected_preempt_count not equal to zero. cond_resched_lock() for
example, passes an expected_preempt_count value of 1.
So fix the fix for the cond_resched() fix by skipping the check of
preempt_count() against expected_preempt_count when preemption is disabled.
Credit should go to Sunil Mushran for spotting the bug during testing.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Jackson [Fri, 22 Dec 2006 09:06:10 +0000 (01:06 -0800)]
[PATCH] CONFIG_VM_EVENT_COUNTER comment decrustify
The VM event counters, enabled by CONFIG_VM_EVENT_COUNTERS, which provides
VM event counters in /proc/vmstat, has become more essential to
non-EMBEDDED kernel configurations than they were in the past. Comments in
the code and the Kconfig configuration explanation were stale, downplaying
their role excessively.
Refresh those comments to correctly reflect the current role of VM event
counters.
Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Avi Kivity [Fri, 22 Dec 2006 09:06:02 +0000 (01:06 -0800)]
[PATCH] KVM: API versioning
Add compile-time and run-time API versioning.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Riepe [Fri, 22 Dec 2006 09:05:53 +0000 (01:05 -0800)]
[PATCH] KVM: Handle p5 mce msrs
This allows plan9 to get a little further booting.
Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Riepe [Fri, 22 Dec 2006 09:05:45 +0000 (01:05 -0800)]
[PATCH] KVM: Force real-mode cs limit to 64K
This allows opensolaris to boot on kvm/intel.
Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Riepe [Fri, 22 Dec 2006 09:05:36 +0000 (01:05 -0800)]
[PATCH] KVM: Do not export unsupported msrs to userspace
Some msrs, such as MSR_STAR, are not available on all processors. Exporting
them causes qemu to try to fetch them, which will fail.
So, check all msrs for validity at module load time.
Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Avi Kivity [Fri, 22 Dec 2006 09:05:28 +0000 (01:05 -0800)]
[PATCH] KVM: Use more traditional error handling in kvm_mmu_init()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Avi Kivity [Fri, 22 Dec 2006 09:05:20 +0000 (01:05 -0800)]
[PATCH] KVM: AMD SVM: Save and restore the floating point unit state
Fixes sf bug 1614113 (segfaults in nbench).
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Avi Kivity [Fri, 22 Dec 2006 09:05:08 +0000 (01:05 -0800)]
[PATCH] KVM: AMD SVM: handle MSR_STAR in 32-bit mode
This is necessary for linux guests.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
James Morris [Fri, 22 Dec 2006 09:04:55 +0000 (01:04 -0800)]
[PATCH] KVM: add valid_vcpu() helper
Consolidate the logic for checking whether a vcpu index is valid. Also, use
likely(), as a valid value should be the overwhelmingly common case.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 22 Dec 2006 09:04:48 +0000 (01:04 -0800)]
[PATCH] truncate: dirty memory accounting fix
Only (un)account for IO and page-dirtying for devices which have real backing
store (ie: not tmpfs or ramdisks).
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jens Axboe [Thu, 21 Dec 2006 20:20:01 +0000 (21:20 +0100)]
[PATCH] elevator: fixup typo in merge logic
The recent io scheduler allow_merge commit left the block layer with
no merging, oops. This patch fixes that up.
That means the CFQ change needs to be verified again, it might not fix
the original bug now. But that's a seperate thing, I'll double check
that tomorrow.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Thu, 21 Dec 2006 19:00:33 +0000 (11:00 -0800)]
[PATCH] truncate: clear page dirtiness before running try_to_free_buffers()
truncate presently invalidates the dirty page's buffer_heads then shoots down
the page. But try_to_free_buffers() will now bale out because the page is
dirty.
Net effect: the LRU gets filled with dirty pages which have invalidated
buffer_heads attached. They have no ->mapping and hence cannot be cleaned.
The machine leaks memory at an enormous rate.
Fix this by cleaning the page before running try_to_free_buffers(), so
try_to_free_buffers() can do its work.
Also, remember to do dirty-page-acoounting in cancel_dirty_page() so the
machine won't wedge up trying to write non-existent dirty pages.
Probably still wrong, but now less so.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Chinner [Wed, 20 Dec 2006 23:24:01 +0000 (10:24 +1100)]
[PATCH] Fix XFS after clear_page_dirty() removal
XFS appears to call clear_page_dirty to get the mapping tree dirty tag
set correctly at the same time the page dirty flag is cleared. I note
that this can be done by set_page_writeback() if we clear the dirty flag
on the page first when we are writing back the entire page.
Hence it seems to me that the XFS call to clear_page_dirty() could
easily be substituted by clear_page_dirty_for_io() followed by a call to
set_page_writeback() to get the mapping tree tags set correctly after
the page has been marked clean.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Miklos Szeredi [Thu, 21 Dec 2006 14:18:23 +0000 (15:18 +0100)]
[PATCH] fuse: remove clear_page_dirty() call
The use by FUSE was just a remnant of an optimization from the time
when writable mappings were supported.
Now FUSE never actually allows the creation of dirty pages, so this
invocation of clear_page_dirty() is effectively a no-op.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Kleikamp [Wed, 20 Dec 2006 21:55:35 +0000 (15:55 -0600)]
[PATCH] Fix JFS after clear_page_dirty() removal
This patch removes some questionable code that attempted to make a
no-longer-used page easier to reclaim.
Calling metapage_writepage against such a page will not result in any
I/O being performed, so removing this code shouldn't be a big deal.
[ It's likely that we could have just replaced the "clear_page_dirty()"
call with a call to "cancel_dirty_page()" instead, but in the
meantime this is cleaner and simpler anyway, so unless there is some
overriding reason (and Dave implies there isn't) I'll just use this
patch as-is. - Linus ]
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 20 Dec 2006 21:46:42 +0000 (13:46 -0800)]
VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functions
They were horribly easy to mis-use because of their tempting naming, and
they also did way more than any users of them generally wanted them to
do.
A dirty page can become clean under two circumstances:
(a) when we write it out. We have "clear_page_dirty_for_io()" for
this, and that function remains unchanged.
In the "for IO" case it is not sufficient to just clear the dirty
bit, you also have to mark the page as being under writeback etc.
(b) when we actually remove a page due to it becoming inaccessible to
users, notably because it was truncate()'d away or the file (or
metadata) no longer exists, and we thus want to cancel any
outstanding dirty state.
For the (b) case, we now introduce "cancel_dirty_page()", which only
touches the page state itself, and verifies that the page is not mapped
(since cancelling writes on a mapped page would be actively wrong as it
is still accessible to users).
Some filesystems need to be fixed up for this: CIFS, FUSE, JFS,
ReiserFS, XFS all use the old confusing functions, and will be fixed
separately in subsequent commits (with some of them just removing the
offending logic, and others using clear_page_dirty_for_io()).
This was confirmed by Martin Michlmayr to fix the apt database
corruption on ARM.
Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Andrei Popa <andrei.popa@i-neo.ro>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Gordon Farquharson <gordonfarquharson@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Tue, 19 Dec 2006 23:21:59 +0000 (15:21 -0800)]
Clean up and make try_to_free_buffers() not race with dirty pages
This is preparatory work in our continuing saga on some hard-to-trigger
file corruption with shared writable mmap() after the dirty page
tracking changes (commit
d08b3851da41d0ee60851f2c75b118e1f7a5fc89 etc)
were merged.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Mon, 18 Dec 2006 19:05:09 +0000 (20:05 +0100)]
[PATCH] workqueue: fix schedule_on_each_cpu()
fix the schedule_on_each_cpu() implementation: __queue_work() is now
stricter, hence set the work-pending bit before passing in the new work.
(found in the -rt tree, using Peter Zijlstra's files-lock scalability
patchset)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Mon, 18 Dec 2006 13:31:18 +0000 (13:31 +0000)]
[PATCH] fix leaks on pipe(2) failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 21 Dec 2006 08:13:09 +0000 (00:13 -0800)]
Merge /linux/kernel/git/steve/gfs2-2.6-fixes
* master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
[GFS2] Fix Kconfig
[DLM] fix compile warning
Peter Williams [Tue, 19 Dec 2006 02:48:50 +0000 (12:48 +1000)]
[PATCH] sched: improve efficiency of sched_fork()
Problem:
sched_fork() has always called scheduler_tick() in some (unlikely)
circumstances in order to update the current task in light of those
circumstances. It has always been the case that the work done by
scheduler_tick() was more than was required to handle the problem in
hand but no harm was done except for the waste of a few CPU cycles.
However, the splitting of scheduler_tick() into two procedures in
2.6.20-rc1 enables the wasted cycles to be saved as the new procedure
task_running_tick() does all the work that is required to rectify the
problem being handled.
Solution:
Replace the call to scheduler_tick() in sched_fork() with a call to
task_running_tick().
Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Wed, 20 Dec 2006 10:53:32 +0000 (11:53 +0100)]
[PATCH] x86_64: fix boot time hang in detect_calgary()
if CONFIG_CALGARY_IOMMU is built into the kernel via
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT, or is enabled via the
iommu=calgary boot option, then the detect_calgary() function runs to
detect the presence of a Calgary IOMMU.
detect_calgary() first searches the BIOS EBDA area for a "rio_table_hdr"
BIOS table. It has this parsing algorithm for the EBDA:
while (offset) {
...
/* The next offset is stored in the 1st word. 0 means no more */
offset = *((unsigned short *)(ptr + offset));
}
got that? Lets repeat it slowly: we've got a BIOS-supplied data
structure, plus Linux kernel code that will only break out of an
infinite parsing loop once the BIOS gives a zero offset. Ok?
Translation: what an excellent opportunity for BIOS writers to lock up
the Linux boot process in an utterly hard to debug place! Indeed the
BIOS jumped on that opportunity on my box, which has the following EBDA
chaining layout:
384, 65282, 65535, 65535, 65535, 65535, 65535, 65535 ...
see the pattern? So my, definitely non-Calgary system happily locks up
in detect_calgary()!
the patch below fixes the boot hang by trusting the BIOS-supplied data
structure a bit less: the parser always has to make forward progress,
and if it doesnt, we break out of the loop and i get the expected kernel
message:
Calgary: Unable to locate Rio Grande Table in EBDA - bailing!
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Wed, 20 Dec 2006 10:28:46 +0000 (11:28 +0100)]
[PATCH] x86_64: fix boot hang caused by CALGARY_IOMMU_ENABLED_BY_DEFAULT
one of my boxes didnt boot the 2.6.20-rc1-rt0 kernel rpm, it hung during
early bootup. After an hour or two of happy debugging i narrowed it down
to the CALGARY_IOMMU_ENABLED_BY_DEFAULT option, which was freshly added
to 2.6.20 via the x86_64 tree and /enabled by default/.
commit
bff6547bb6a4e82c399d74e7fba78b12d2f162ed claims:
[PATCH] Calgary: allow compiling Calgary in but not using it by default
This patch makes it possible to compile Calgary in but not use it by
default. In this mode, use 'iommu=calgary' to activate it.
but the change does not actually practice it:
config CALGARY_IOMMU_ENABLED_BY_DEFAULT
bool "Should Calgary be enabled by default?"
default y
depends on CALGARY_IOMMU
help
Should Calgary be enabled by default? if you choose 'y', Calgary
will be used (if it exists). If you choose 'n', Calgary will not be
used even if it exists. If you choose 'n' and would like to use
Calgary anyway, pass 'iommu=calgary' on the kernel command line.
If unsure, say Y.
it's both 'default y', and says "If unsure, say Y". Clearly not a typo.
disabling this option makes my box boot again. The patch below fixes the
Kconfig entry. Grumble.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Geert Uytterhoeven [Wed, 20 Dec 2006 14:59:48 +0000 (15:59 +0100)]
[PATCH] __set_irq_handler bogus space
__set_irq_handler: Kill a bogus space
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 21 Dec 2006 08:03:38 +0000 (00:03 -0800)]
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
[PATCH] block: document io scheduler allow_merge_fn hook
[PATCH] cfq-iosched: don't allow sync merges across queues
[PATCH] Fixup blk_rq_unmap_user() API
[PATCH] __blk_rq_unmap_user() fails to return error
[PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock
[PATCH] Remove queue merging hooks
[PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC requests
[PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request
[PATCH] cciss: set default raid level when reading geometry fails
Linus Torvalds [Thu, 21 Dec 2006 08:02:35 +0000 (00:02 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] sata_svw, sata_vsc: kill iomem warnings
[PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
[PATCH] libata: kill @cdb argument from xlat methods
[PATCH] libata: clean up variable name usage in xlat related functions
[libata] Move some PCI IDs from sata_nv to ahci
[libata] pata_via: suspend/resume support fix
[libata] pata_cs5530: suspend/resume support tweak
Linus Torvalds [Thu, 21 Dec 2006 08:02:03 +0000 (00:02 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
Driver core: proper prototype for drivers/base/init.c:driver_init()
kobject: kobject_uevent() returns manageable value
kref refcnt and false positives
Linus Torvalds [Thu, 21 Dec 2006 08:01:47 +0000 (00:01 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (22 commits)
acpiphp: Link-time error for PCI Hotplug
shpchp: cleanup shpchp.h
shpchp: remove shpchprm_get_physical_slot_number
shpchp: cleanup struct controller
shpchp: remove unnecessary struct php_ctlr
PCI: ATI sb600 sata quirk
PCI legacy resource fix
PCI: don't export device IDs to userspace
PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
PCI: Fix multiple problems with VIA hardware
PCI: Only check the HT capability bits in mpic.c
PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
PCI: Add #defines for Hypertransport MSI fields
PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
pci: Introduce pci_find_present
PCI: pcieport-driver: remove invalid warning message
rpaphp: compiler warning cleanup
PCI quirks: remove redundant check
...
Linus Torvalds [Thu, 21 Dec 2006 08:01:06 +0000 (00:01 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (34 commits)
USB Storage: remove duplicate Nokia entry in unusual_devs.h
[PATCH] bluetooth: add support for another Kensington dongle
[PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
[PATCH] USB: Nokia E70 is an unusual device
USB: fix to usbfs_snoop logging of user defined control urbs
USB: at91_udc: Additional checks
USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
USB: at91_udc: allow drivers that support high speed
USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
USB: at91_udc, misc fixes
USB: at91 udc, support at91sam926x addresses
USB: OHCI support for PNX8550
USB: ohci handles hardware faults during root port resets
USB: ohci at91 warning fix
USB: ohci whitespace/comment fixups
USB: MAINTAINERS update, EHCI and OHCI
USB: gadget driver unbind() is optional; section fixes; misc
UHCI: module parameter to ignore overcurrent changes
USB: Nokia E70 is an unusual device
USB AUERSWALD: replace kmalloc+memset with kzalloc
...
Linus Torvalds [Thu, 21 Dec 2006 07:59:36 +0000 (23:59 -0800)]
Merge branch 'merge' of /linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Fix register save area alignment for swapcontext syscall
[POWERPC] Fix PCI device channel state initialization
[POWERPC] Update MTD OF documentation
[POWERPC] Probe Efika platform before CHRP.
[POWERPC] Fix build of cell zImage.initrd
[POWERPC] iSeries: fix CONFIG_VIOPATH dependency
[POWERPC] iSeries: fix viocons init
[POWERPC] iSeries: fix viocd init
[POWERPC] iSeries: fix iseries_veth init
[POWERPC] iSeries: fix viotape init
[POWERPC] iSeries: fix viodasd init
[POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges
[POWERPC] powerpc: add scanning of ebc bus to of_platform
[POWERPC] spufs: fix assignment of node numbers
[POWERPC] cell: Fix spufs with "new style" device-tree
[POWERPC] cell: Enable spider workarounds on all PCI buses
[POWERPC] cell: add forward struct declarations to spu.h
[POWERPC] cell: update cell_defconfig
Linus Torvalds [Thu, 21 Dec 2006 07:59:07 +0000 (23:59 -0800)]
Merge branch 'drm-patches' of /linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: Stop defining pci_pretty_name
drm: r128: comment aligment with drm git
drm: make kernel context switch same as for drm git tree.
drm: fixup comment header style
drm: savage: compat fix from drm git.
drm: Unify radeon offset checking.
i915_vblank_tasklet: Try harder to avoid tearing.
DRM: handle pci_enable_device failure
drm: fix return value check
Linus Torvalds [Thu, 21 Dec 2006 07:56:06 +0000 (23:56 -0800)]
Merge branch 'linus' of /linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (30 commits)
[ALSA] version 1.0.14rc1
[ALSA] ac97: Identify CMI9761 chips.
[ALSA] ac97_codec - trivial fix for bit update functions
[ALSA] snd-ca0106: Fix typos.
[ALSA] snd-ca0106: Add new card variant.
[ALSA] sound: fix PCM substream list
[ALSA] sound: initialize rawmidi substream list
[ALSA] snd_hda_intel 3stack mode for ASUS P5P-L2
[ALSA] Remove IRQF_DISABLED for shared PCI irqs
[ALSA] Fix invalid assignment of PCI revision
[ALSA] Fix races in PCM OSS emulation
[ALSA] hda-codec - fix typo in PCI IDs
[ALSA] ac97 - Fix potential negative array index
[ALSA] hda-codec - Verbose proc output for PCM parameters
[ALSA] hda-codec - Fix detection of supported sample rates
[ALSA] hda-codec - Fix model for ASUS V1j laptop
[ALSA] sound/core/control.c: remove dead code
[ALSA] hda-codec - Add model for HP q965
[ALSA] pcm core: fix silence_start calculations
[ALSA] hda-codec - Fix a typo
...
Linus Torvalds [Thu, 21 Dec 2006 07:54:23 +0000 (23:54 -0800)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (29 commits)
[ARM] 4062/1: S3C24XX: Anubis and Osiris shuld have CONFIG_PM_SIMTEC
[ARM] 4060/1: update several ARM defconfigs
[ARM] 4061/1: xsc3: change of maintainer
[ARM] 4059/1: VR1000: fix LED3's platform device number
[ARM] 4022/1: iop13xx: generic irq fixups
[ARM] 4015/1: s3c2410 cpu ifdefs
[ARM] 4057/1: ixp23xx: unconditionally enable hardware coherency
[ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup
[ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc
[ARM] 4054/1: ep93xx: add HWCAP_CRUNCH
[ARM] 4052/1: S3C24XX: Fix PM in arch/arm/mach-s3c2410/Kconfig
[ARM] Fix warnings from asm/system.h
[ARM] 4051/1: S3C24XX: clean includes in S3C2440 and S3C2442 support
[ARM] 4050/1: S3C24XX: remove old changelogs in arch/arm/mach-s3c2410
[ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h
[ARM] 4048/1: S3C24XX: make s3c2410_pm_resume() static
[ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410
[ARM] 4045/1: S3C24XX: remove old VA for non-shared areas
[ARM] 4044/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2442-clock.c
[ARM] 4043/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2440-clock.c
...
Greg Kroah-Hartman [Wed, 20 Dec 2006 19:46:03 +0000 (11:46 -0800)]
USB Storage: remove duplicate Nokia entry in unusual_devs.h
How many times are we going to merge this entry...
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jeff Garzik [Wed, 20 Dec 2006 19:37:04 +0000 (14:37 -0500)]
[libata] sata_svw, sata_vsc: kill iomem warnings
Now that iomap merge is close to reality, and since the warnings and
issue have been around so long, we don't need a reminder on every build
that libata needs to be converted over to iomap.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Olivier Galibert [Tue, 19 Dec 2006 21:15:25 +0000 (13:15 -0800)]
[PATCH] bluetooth: add support for another Kensington dongle
Add the stupid sco fixup quirk to yet another Broadcom/Kensington device.
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Eric Smith [Tue, 19 Dec 2006 21:15:25 +0000 (13:15 -0800)]
[PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.
Signed-off-by: Eric Smith <eric@brouhaha.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andrew Morton [Tue, 19 Dec 2006 21:15:23 +0000 (13:15 -0800)]
[PATCH] USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508
When the Nokia E70 Phone is plugged in to the USB port, I get:
end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000
The fix is to add these lines to drivers/usb/storage/unusual_devs.h:
Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tejun Heo [Sun, 17 Dec 2006 01:46:33 +0000 (10:46 +0900)]
[PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
libata depended on SCSI command to have the correct length when
tranlating it into an ATA command. This generally worked for commands
issued by SCSI HLD but user could issue arbitrary broken command using
sg interface.
Also, when building ATAPI command, full command size was always
copied. Because some ATAPI devices needs bytes after CDB cleared, if
upper layer doesn't clear bytes after CDB, such devices will
malfunction. This necessiated recent clear-garbage-after-CDB fix in
sg interfaces. However, scsi_execute() isn't fixed yet and HL-DT-ST
DVD-RAM GSA-H30N malfunctions on initialization commands issued from
SCSI.
This patch makes xlat functions always consider SCSI cmd_len. Each
translation function checks for proper cmd_len and ATAPI translaation
clears bytes after CDB.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 17 Dec 2006 01:45:57 +0000 (10:45 +0900)]
[PATCH] libata: kill @cdb argument from xlat methods
xlat function will be updated to consider qc->scsicmd->cmd_len and
many xlat functions deference qc->scsicmd already. It doesn't make
sense to pass qc->scsicmd->cmnd as @cdb separately. Kill the
argument.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 17 Dec 2006 01:45:08 +0000 (10:45 +0900)]
[PATCH] libata: clean up variable name usage in xlat related functions
Variable names in xlat functions are quite confusing now. 'scsicmd'
is used for CDB while qc->scsicmd points to struct scsi_cmnd while
'cmd' is used for struct scsi_cmnd.
This patch cleans up variable names in xlat functions such that 'scmd'
is used for struct scsi_cmnd and 'cdb' for CDB. Also, 'scmd' local
variable is added if qc->scsicmd is used multiple times.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Peer Chen [Wed, 20 Dec 2006 19:18:00 +0000 (14:18 -0500)]
[libata] Move some PCI IDs from sata_nv to ahci
The content of memory map io of BAR5 have been change from MCP65 then
sata_nv can't work fine on the platform based on MCP65 and MCP67, so move
their IDs from sata_nv.c to ahci.c.
Signed-off-by: Peer Chen <pchen@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Adrian Bunk [Tue, 19 Dec 2006 21:01:28 +0000 (13:01 -0800)]
Driver core: proper prototype for drivers/base/init.c:driver_init()
Add a prototype for driver_init() in include/linux/device.h.
Also remove a static function of the same name in drivers/acpi/ibm_acpi.c to
ibm_acpi_driver_init() to fix the namespace collision.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aneesh Kumar K.V [Tue, 19 Dec 2006 21:01:27 +0000 (13:01 -0800)]
kobject: kobject_uevent() returns manageable value
Since kobject_uevent() function does not return an integer value to
indicate if its operation was completed with success or not, it is worth
changing it in order to report a proper status (success or error) instead
of returning void.
[randy.dunlap@oracle.com: Fix inline kobject functions]
Cc: Mauricio Lin <mauriciolin@gmail.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Venkatesh Pallipadi [Tue, 19 Dec 2006 21:01:29 +0000 (13:01 -0800)]
kref refcnt and false positives
With WARN_ON addition to kobject_init()
[ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/dont-use/broken-out/gregkh-driver-kobject-warn.patch ]
I started seeing following WARNING on CPU offline followed by online on my
x86_64 system.
WARNING at lib/kobject.c:172 kobject_init()
Call Trace:
[<
ffffffff8020ab45>] dump_trace+0xaa/0x3ef
[<
ffffffff8020aec4>] show_trace+0x3a/0x50
[<
ffffffff8020b0f6>] dump_stack+0x15/0x17
[<
ffffffff80350abc>] kobject_init+0x3f/0x8a
[<
ffffffff80350be1>] kobject_register+0x1a/0x3e
[<
ffffffff803bbd89>] sysdev_register+0x5b/0xf9
[<
ffffffff80211d0b>] mce_create_device+0x77/0xf4
[<
ffffffff80211dc2>] mce_cpu_callback+0x3a/0xe5
[<
ffffffff805632fd>] notifier_call_chain+0x26/0x3b
[<
ffffffff8023f6f3>] raw_notifier_call_chain+0x9/0xb
[<
ffffffff802519bf>] _cpu_up+0xb4/0xdc
[<
ffffffff80251a12>] cpu_up+0x2b/0x42
[<
ffffffff803bef00>] store_online+0x4a/0x72
[<
ffffffff803bb6ce>] sysdev_store+0x24/0x26
[<
ffffffff802baaa2>] sysfs_write_file+0xcf/0xfc
[<
ffffffff8027fc6f>] vfs_write+0xae/0x154
[<
ffffffff80280418>] sys_write+0x47/0x6f
[<
ffffffff8020963e>] system_call+0x7e/0x83
DWARF2 unwinder stuck at system_call+0x7e/0x83
Leftover inexact backtrace:
This is a false positive as mce.c is unregistering/registering sysfs
interfaces cleanly on hotplug.
kref_put() and conditional decrement of refcnt seems to be the root cause
for this and the patch below resolves the issue for me.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kristen Carlson Accardi [Sat, 16 Dec 2006 23:26:04 +0000 (15:26 -0800)]
acpiphp: Link-time error for PCI Hotplug
I'm seeing:
`acpiphp_glue_exit' referenced in section `.init.text' of
drivers/built-in.o: defined in discarded section `.exit.text' of
drivers/built-in.o
when trying to compile an IA64 kernel with PCI hotplug enabled.
I suggest this patch:
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kenji Kaneshige [Sat, 16 Dec 2006 23:25:57 +0000 (15:25 -0800)]
shpchp: cleanup shpchp.h
This patch cleans up shpchp.h.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kenji Kaneshige [Sat, 16 Dec 2006 23:25:49 +0000 (15:25 -0800)]
shpchp: remove shpchprm_get_physical_slot_number
This patch removes unnecessary shpchprm_get_physical_slot_number()
function.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kenji Kaneshige [Sat, 16 Dec 2006 23:25:42 +0000 (15:25 -0800)]
shpchp: cleanup struct controller
This patch removes unused/unnecessary members from struct controller.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kenji Kaneshige [Sat, 16 Dec 2006 23:25:34 +0000 (15:25 -0800)]
shpchp: remove unnecessary struct php_ctlr
The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Conke Hu [Tue, 19 Dec 2006 21:11:37 +0000 (13:11 -0800)]
PCI: ATI sb600 sata quirk
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ralf Baechle [Tue, 19 Dec 2006 21:12:08 +0000 (13:12 -0800)]
PCI legacy resource fix
Since commit
368c73d4f689dae0807d0a2aa74c61fd2b9b075f the kernel will try
to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if
pci_assign_unassigned_resources() is used to do full resource assignment of
the bus. This fails because in the PIIX4 these BAR registers have
implicitly assumed values and read back as zero; it used to work because
the kernel used to just write zero to that register the read back value did
match what was written.
The fix is a new resource flag IORESOURCE_PCI_FIXED used to mark a resource
as non-movable. This will also be useful to keep other import system
resources from being moved around - for example system consoles on PCI
busses.
[akpm@osdl.org: cleanup]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adrian Bunk [Tue, 19 Dec 2006 21:12:07 +0000 (13:12 -0800)]
PCI: don't export device IDs to userspace
I don't see any good reason for exporting device IDs to userspace.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jesper Juhl [Mon, 4 Dec 2006 23:14:48 +0000 (15:14 -0800)]
PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
pci_get_slot() may return NULL if nothing was found. quirk_nvidia_ck804()
does not check the value returned from pci_get_slot(), so it may end up
causing a NULL pointer deref.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 4 Dec 2006 23:14:45 +0000 (15:14 -0800)]
PCI: Fix multiple problems with VIA hardware
This patch is designed to fix:
- Disk eating corruptor on KT7 after resume from RAM
- VIA IRQ handling
- VIA fixups for bus lockups after resume from RAM
The core of this is to add a table of resume fixups run at resume time.
We need to do this for a variety of boards and features, but particularly
we need to do this to get various critical VIA fixups done on resume.
The second part of the problem is to handle VIA IRQ number rules which
are a bit odd and need special handling for PIC interrupts. Various
patches broke various boxes and while this one may not be perfect
(hopefully it is) it ensures the workaround is applied to the right
devices only.
From: Jean Delvare <khali@linux-fr.org>
Now that PCI quirks are replayed on software resume, we can safely
re-enable the Asus SMBus unhiding quirk even when software suspend support
is enabled.
[akpm@osdl.org: fix const warning]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:22 +0000 (18:26 +1100)]
PCI: Only check the HT capability bits in mpic.c
Only compare the exact HT capability bits against HT_CAPTYPE_IRQ,
this is a little paranoid, but doesn't hurt.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:21 +0000 (18:26 +1100)]
PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
Use pci_find_ht_capability() in drivers/pci/quirks.c.
I'm pretty sure the logic is unchanged here, but someone please eye-ball it
for me. I've changed the message to be a little shorter, it's now:
PCI: Found (enabled|disabled) HT MSI mapping on xxxx:xx:xx.x
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:20 +0000 (18:26 +1100)]
PCI: Add #defines for Hypertransport MSI fields
Add a few #defines for grabbing and working with the address fields
in a HT_CAPTYPE_MSI_MAPPING capability. All from the HT spec v3.00.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:19 +0000 (18:26 +1100)]
PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
Use pci_find_ht_capability() in drivers/pci/htirq.c
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:18 +0000 (18:26 +1100)]
PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
There are already several places in the kernel that want to search a PCI
device for a given Hypertransport capability. Although this is possible
using pci_find_capability() etc., it makes sense to encapsulate that
logic in a helper - pci_find_ht_capability().
To cater for searching exhaustively for a capability, we also provide
pci_find_next_ht_capability().
We also need to cater for the fact that the HT capability fields may be
either 3 or 5 bits wide. pci_find_ht_capability() deals with this for you,
but callers using the #defines directly must handle that themselves.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Ellerman [Wed, 22 Nov 2006 07:26:16 +0000 (18:26 +1100)]
PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
The current implementation of __pci_bus_find_cap() does two things,
first it determines the start of the capability chain for the device,
and then it trys to find the requested capability.
Split these out, so that we can use the two parts independantly in
a subsequent patch. Externally visible behaviour should be unchanged.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 4 Dec 2006 23:14:44 +0000 (15:14 -0800)]
pci: Introduce pci_find_present
This works like pci_dev_present but instead of returning boolean returns
the matching pci_device_id entry. This makes it much more useful. Code
bloat is basically nil as the old boolean function is rewritten in terms of
the new one.
This will be used by the updated VIA PCI quirks for one
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kenji Kaneshige [Wed, 6 Dec 2006 13:07:30 +0000 (22:07 +0900)]
PCI: pcieport-driver: remove invalid warning message
The following warning message should not be displayed for devices
which don't use an interrupt pin.
pcie_portdrv_probe->Dev[XXXX:XXXX] has invalid IRQ. Check vendor BIOS
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linas Vepstas [Sat, 2 Dec 2006 00:31:27 +0000 (16:31 -0800)]
rpaphp: compiler warning cleanup
This janitorial patch removes the following annoying
compile-time message:
drivers/pci/hotplug/rpaphp_slot.c:57: warning: ignoring return
value of sfs_create_file declared with attribute warn_unused_result
It also fixes a typo, removes some misc crud.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@us.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Rientjes [Sun, 3 Dec 2006 19:55:34 +0000 (11:55 -0800)]
PCI quirks: remove redundant check
Removes redundant check for dev->subordinate; if it is NULL, the function
returns before the patch-affected code region.
Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Acked-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Inaky Perez-Gonzalez [Thu, 30 Nov 2006 23:58:58 +0000 (15:58 -0800)]
pci: add class codes for Wireless RF controllers
pci: add class codes for Wireless RF controllers
Add PCI codes to include/linux/pci_ids.h for RF controllers; first
batch of these devices seem to be the Ultra-Wide-Band and Wireless USB
controllers (WHCI spec).
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Russell King [Wed, 29 Nov 2006 21:18:04 +0000 (21:18 +0000)]
PCI: use /sys/bus/pci/drivers/<driver>/new_id first
Unfortunately, the .../new_id feature does not work with the 8250_pci
driver.
The reason for this comes down to the way .../new_id is implemented.
When PCI tries to match a driver to a device, it checks the modules
static device ID tables _before_ checking the dynamic new_id tables.
When a driver is capable of matching by ID, and falls back to matching
by class (as 8250_pci does), this makes it absolutely impossible to
specify a board by ID, and as such the correct driver_data value to
use with it.
Let's say you have a serial board with vendor 0x1234 and device 0x5678.
It's class is set to PCI_CLASS_COMMUNICATION_SERIAL.
On boot, this card is matched to the 8250_pci driver, which tries to
probe it because it matched using the class entry. The driver finds
that it is unable to automatically detect the correct settings to use,
so it returns -ENODEV.
You know that the information the driver needs is to match this card
using a device_data value of '7'. So you echo 1234 5678 0 0 0 0 7
into new_id.
The kernel attempts to re-bind 8250_pci to this device. However,
because it scans the PCI driver tables, it _again_ matches the class
entry which has the wrong device_data. It fails.
End of story. You can't support the card without rebuilding the
kernel (or writing a specific PCI probe module to support it.)
So, can we make new_id override the driver-internal PCI ID tables?
IOW, like this:
From: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Chris Frey [Sat, 16 Dec 2006 07:37:42 +0000 (02:37 -0500)]
USB: fix to usbfs_snoop logging of user defined control urbs
When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged. This patch fixes that.
I didn't see any major changes to devio.c recently, so this patch should apply
cleanly to even the latest kernel. I can resubmit if it doesn't.
From: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wojtek Kaniewski [Fri, 8 Dec 2006 11:26:00 +0000 (03:26 -0800)]
USB: at91_udc: Additional checks
This patch performs additional checks in at91_udc, just in case of
some spurious interrupts or device enumeration.
Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>