linux-2.6
16 years agoxen: definisions which ia64 needs
Isaku Yamahata [Wed, 2 Apr 2008 17:53:50 +0000 (10:53 -0700)] 
xen: definisions which ia64 needs

Add xen hypercall numbers defined for arch specific use.
ia64/xen domU uses __HYPERVISOR_arch_1 to manipulate paravirtualized
IOSAPIC. Although all those constants aren't used yet by IA64 at this
moment, add all arch specific hypercall numbers.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: jump to iret fixup
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:22 +0000 (16:37 -0700)] 
xen: jump to iret fixup

Use jmp rather than call for the iret fixup, so its consistent with
the sysexit fixup, and it simplifies the stack (which is already
complex).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: no need for domU to worry about MCE/MCA
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:21 +0000 (16:37 -0700)] 
xen: no need for domU to worry about MCE/MCA

Mask MCE/MCA out of cpu caps.  Its harmless to leave them there, but
it does prevent the kernel from starting an unnecessary thread.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: short-cut for recursive event handling
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:20 +0000 (16:37 -0700)] 
xen: short-cut for recursive event handling

If an event comes in while events are currently being processed, then
just increment the counter and have the outer event loop reprocess the
pending events.  This prevents unbounded recursion on heavy event
loads (of course massive event storms will cause infinite loops).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: make sure retriggered events are set pending
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:19 +0000 (16:37 -0700)] 
xen: make sure retriggered events are set pending

retrigger_dynirq() was incomplete, and didn't properly set the event
to be pending again.  It doesn't seem to actually get used.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: implement a debug-interrupt handler
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:18 +0000 (16:37 -0700)] 
xen: implement a debug-interrupt handler

Xen supports the notion of a debug interrupt which can be triggered
from the console.  For now this is implemented to show pending events,
masks and each CPU's pending event set.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: support sysenter/sysexit if hypervisor does
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:17 +0000 (16:37 -0700)] 
xen: support sysenter/sysexit if hypervisor does

64-bit Xen supports sysenter for 32-bit guests, so support its
use.  (sysenter is faster than int $0x80 in 32-on-64.)

sysexit is still not supported, so we fake it up using iret.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: add support for callbackops hypercall
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:15 +0000 (16:37 -0700)] 
xen: add support for callbackops hypercall

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: unify pgd ctor/dtor
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:14 +0000 (16:37 -0700)] 
x86: unify pgd ctor/dtor

All pagetables need fundamentally the same setup and destruction, so
just use the same code for everything.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: unify KERNEL_PGD_PTRS
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:13 +0000 (16:37 -0700)] 
x86: unify KERNEL_PGD_PTRS

Make KERNEL_PGD_PTRS common, as previously it was only being defined
for 32-bit.

There are a couple of follow-on changes from this:
 - KERNEL_PGD_PTRS was being defined in terms of USER_PGD_PTRS.  The
   definition of USER_PGD_PTRS doesn't really make much sense on x86-64,
   since it can have two different user address-space configurations.
   I renamed USER_PGD_PTRS to KERNEL_PGD_BOUNDARY, which is meaningful
   for all of 32/32, 32/64 and 64/64 process configurations.

 - USER_PTRS_PER_PGD was also defined and was being used for similar
   purposes.  Converting its users to KERNEL_PGD_BOUNDARY left it
   completely unused, and so I removed it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Zach Amsden <zach@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: make sure iret faults are trapped
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:12 +0000 (16:37 -0700)] 
xen: make sure iret faults are trapped

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: unify pte operations on machine frames
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:11 +0000 (16:37 -0700)] 
xen: unify pte operations on machine frames

Xen's pte operations on mfns can be unified like the kernel's pfn operations.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: use phys_addr_t when referring to physical addresses
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:10 +0000 (16:37 -0700)] 
xen: use phys_addr_t when referring to physical addresses

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: unify pte operations
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:09 +0000 (16:37 -0700)] 
xen: unify pte operations

We can fold the essentially common pte functions together now.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: make use of pte_t union
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:08 +0000 (16:37 -0700)] 
xen: make use of pte_t union

pte_t always contains a "pte" field for the whole pte value, so make
use of it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: use appropriate pte types
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:07 +0000 (16:37 -0700)] 
xen: use appropriate pte types

Convert Xen pagetable handling to use appropriate *val_t types.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: demacro pgalloc paravirt stubs
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:06 +0000 (16:37 -0700)] 
x86: demacro pgalloc paravirt stubs

Turn paravirt stubs into inline functions, so that the arguments are
still typechecked.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86/pgtable.h: demacro ptep_clear_flush_young
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:05 +0000 (16:37 -0700)] 
x86/pgtable.h: demacro ptep_clear_flush_young

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86/pgtable.h: demacro ptep_test_and_clear_young
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:04 +0000 (16:37 -0700)] 
x86/pgtable.h: demacro ptep_test_and_clear_young

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86/pgtable.h: demacro ptep_set_access_flags
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:03 +0000 (16:37 -0700)] 
x86/pgtable.h: demacro ptep_set_access_flags

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: add pud_alloc for 4-level pagetables
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:02 +0000 (16:37 -0700)] 
x86: add pud_alloc for 4-level pagetables

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: rename paravirt_alloc_pt etc after the pagetable structure
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:01 +0000 (16:37 -0700)] 
x86: rename paravirt_alloc_pt etc after the pagetable structure

Rename (alloc|release)_(pt|pd) to pte/pmd to explicitly match the name
of the appropriate pagetable level structure.

[ x86.git merge work by Mark McLoughlin <markmc@redhat.com> ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: move all the pgd_list handling to one place
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:37:00 +0000 (16:37 -0700)] 
x86: move all the pgd_list handling to one place

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: move pgalloc pud and pgd operations into common place
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:59 +0000 (16:36 -0700)] 
x86: move pgalloc pud and pgd operations into common place

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: move pmd functions into common asm/pgalloc.h
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:58 +0000 (16:36 -0700)] 
x86: move pmd functions into common asm/pgalloc.h

Common definitions for 3-level pagetable functions.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: move pte functions into common asm/pgalloc.h
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:57 +0000 (16:36 -0700)] 
x86: move pte functions into common asm/pgalloc.h

Common definitions for 2-level pagetable functions.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: put paravirt stubs into common asm/pgalloc.h
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:56 +0000 (16:36 -0700)] 
x86: put paravirt stubs into common asm/pgalloc.h

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: xen unify x86 add common mm pgtable c fix
Ingo Molnar [Wed, 19 Mar 2008 19:30:40 +0000 (20:30 +0100)] 
x86: xen unify x86 add common mm pgtable c fix

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: add common mm/pgtable.c
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:55 +0000 (16:36 -0700)] 
x86: add common mm/pgtable.c

Add a common arch/x86/mm/pgtable.c file for common pagetable functions.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: convert pgalloc_64.h from macros to inlines
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:54 +0000 (16:36 -0700)] 
x86: convert pgalloc_64.h from macros to inlines

Convert asm-x86/pgalloc_64.h from macros into functions (#include hell
prevents __*_free_tlb from being inline, but they're probably a bit
big to inline anyway).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 23 Apr 2008 01:27:56 +0000 (18:27 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()
  [PATCH] proc_readfd_common() race fix
  [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()
  [PATCH] teach seq_file to discard entries
  [PATCH] umount_tree() will unhash everything itself
  [PATCH] get rid of more nameidata passing in namespace.c
  [PATCH] switch a bunch of LSM hooks from nameidata to path
  [PATCH] lock exclusively in collect_mounts() and drop_collected_mounts()
  [PATCH] move a bunch of declarations to fs/internal.h

16 years agoFix cardbus resource allocation
Linus Torvalds [Wed, 23 Apr 2008 01:16:30 +0000 (18:16 -0700)] 
Fix cardbus resource allocation

Commit 884525655d07fdee9245716b998ecdc45cdd8007 ("PCI: clean up resource
alignment management") didn't set the alignment information for the
cardbus window resources, causing their subsequent allocations to fail
miserably with a message like

  yenta_cardbus 0000:15:00.0: device not available because of BAR 7 [100:1ff] collisions
  yenta_cardbus: probe of 0000:15:00.0 failed with error -16

or similar.

This fixes it and clarifies the code a bit too (we used to have to use
the insane PCI bridge alignment logic that put the alignment in the
"start" field, this makes it use the slightly easier-to-understand
size-based alignment, and allows us to set the resource start to zero
until it gets allocated).

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobus_remove_device: be more careful about incomplete initialization
Rafael J. Wysocki [Tue, 22 Apr 2008 20:57:50 +0000 (22:57 +0200)] 
bus_remove_device: be more careful about incomplete initialization

Prevent bus_remove_device() from crashing if dev->knode_bus has not been
initialized before it's called.

This can happen if the device_add() ended up breaking out early due to
an error, for example.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRelax check on adding children of suspended devices
Rafael J. Wysocki [Tue, 22 Apr 2008 22:48:23 +0000 (00:48 +0200)] 
Relax check on adding children of suspended devices

Do not refuse to actually register children of suspended devices,
but still warn about attempts to do that.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()
Al Viro [Tue, 22 Apr 2008 09:35:42 +0000 (05:35 -0400)] 
[PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()

The only reason to have separated __...() for those was to keep them inlined
for local users in exit.c.  Since Alexey removed the inline on those, there's
no reason whatsoever to keep them around; just collapse with normal variants.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] proc_readfd_common() race fix
Al Viro [Tue, 22 Apr 2008 05:32:44 +0000 (01:32 -0400)] 
[PATCH] proc_readfd_common() race fix

Since we drop the rcu_read_lock inside the loop, we can't assume
that files->fdt will remain unchanged (and not freed) between
iterations.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()
Al Viro [Tue, 22 Apr 2008 23:51:27 +0000 (19:51 -0400)] 
[PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()

Duh...  Fortunately, the bug is quite recent (post-2.6.25) and, embarrassingly,
mine ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 22 Apr 2008 23:47:54 +0000 (16:47 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl
  [IA64] run rest drivers/misc/sgi-xp through scripts/Lindent
  [IA64] run some drivers/misc/sgi-xp through scripts/Lindent
  [IA64] move XP and XPC to drivers/misc/sgi-xp
  [IA64] minor irq handler cleanups
  [IA64] simplify notify hooks in mca.c
  [IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs
  [IA64] disable interrupts on exit of ia64_trace_syscall

16 years agofs: use loff_t type instead of long long
David Sterba [Tue, 22 Apr 2008 13:09:22 +0000 (15:09 +0200)] 
fs: use loff_t type instead of long long

Use offset type consistently.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 22 Apr 2008 22:15:48 +0000 (15:15 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux fixups needed for preemptable RCU from -rt
  SELinux: no BUG_ON(!ss_initialized) in selinux_clone_mnt_opts

16 years ago[IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl
Dean Nelson [Tue, 22 Apr 2008 19:50:17 +0000 (14:50 -0500)] 
[IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl

Addressed issues raised by scripts/checkpatch.pl. Removed unnecessary curly
braces. Eliminated uses of volatiles and use of kernel_thread() and daemonize().

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] run rest drivers/misc/sgi-xp through scripts/Lindent
Dean Nelson [Tue, 22 Apr 2008 19:48:55 +0000 (14:48 -0500)] 
[IA64] run rest drivers/misc/sgi-xp through scripts/Lindent

Ran patches through scripts/Lindent (part 2).

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] run some drivers/misc/sgi-xp through scripts/Lindent
Dean Nelson [Tue, 22 Apr 2008 19:48:01 +0000 (14:48 -0500)] 
[IA64] run some drivers/misc/sgi-xp through scripts/Lindent

Ran patches through scripts/Lindent (part 1).

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] move XP and XPC to drivers/misc/sgi-xp
Dean Nelson [Tue, 22 Apr 2008 19:46:56 +0000 (14:46 -0500)] 
[IA64] move XP and XPC to drivers/misc/sgi-xp

Move XPC and XPNET from arch/ia64/sn/kernel to drivers/misc/sgi-xp.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Tue, 22 Apr 2008 20:59:30 +0000 (13:59 -0700)] 
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Fix platform driver hotplug/coldplug
  i2c: New driver for the SuperH Mobile I2C bus controller
  i2c/scx200_acb: Don't use 0 as NULL pointer
  i2c-bfin-twi: Fix mismatch in add timer and delete timer
  i2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN
  i2c-bfin-twi: Use simpler comment headers and strip out information that is maintained in the scm's log
  i2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information
  i2c-bfin-twi: Add missing pin mux operation
  i2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers
  i2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer operation
  i2c: Remove trailing whitespaces in busses/Kconfig
  i2c: Replace remaining __FUNCTION__ occurrences
  i2c: Renesas SH7760 I2C master driver
  i2c-dev: Split i2cdev_ioctl
  i2c-ibm_iic: Support building as an of_platform driver
  i2c-ibm_iic: Change the log levels
  i2c: Add platform driver on top of the new pca-algorithm
  i2c-algo-pca: Extend for future drivers
  i2c-algo-pca: Remove trailing whitespaces and unnecessary UTF
  i2c: Remove the algorithm drivers from the config menu

16 years agokernel-doc: fix sched.c missing parameter
Randy Dunlap [Tue, 22 Apr 2008 17:07:22 +0000 (10:07 -0700)] 
kernel-doc: fix sched.c missing parameter

Add missing kernel-doc in kernel/sched.c:

Warning(linux-2.6.25-git3//kernel/sched.c:7044): No description found for parameter 'span'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Tue, 22 Apr 2008 20:44:23 +0000 (13:44 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: linux/{dlm,dlm_device}.h: cleanup for userspace
  dlm: common max length definitions
  dlm: move plock code from gfs2
  dlm: recover nodes that are removed and re-added
  dlm: save master info after failed no-queue request
  dlm: make dlm_print_rsb() static
  dlm: match signedness between dlm_config_info and cluster_set

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 22 Apr 2008 20:43:46 +0000 (13:43 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Suppress hidinput for Samsung IR control
  HID: remove 60x GTCO devices from blacklist
  HID: export headers properly
  HID: WiseGroup 866 Dual Joypad needs output reports quirk
  HID: ThrustMaster FF driver is no longer experimental
  HID: Logitech diNovo Mini pad support
  HID: fix race between open() and disconnect() in usbhid
  HID: make hid_input_field and usbhid_modify_dquirk static
  HID: pass numbered reports properly to hidraw
  HID: fix misplaced rdesc quirk
  HID: force feedback driver for Logitech Rumblepad 2
  HID: move wait from hid to usbhid
  HID: make function from dbg_hid
  HID: fix sparse warnings
  HID: only dump report traffic with debug level 2
  HID: patch to add NOGET for DMI/Acomdata
  HID: Sunplus Wireless Desktop needs report descriptor fixup
  HID: quirk for MS Wireless Desktop Receiver (model 1028)
  HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
  HID: fix build failure in hiddev_ioctl with gcc 3.2

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Tue, 22 Apr 2008 20:40:47 +0000 (13:40 -0700)] 
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: (41 commits)
  udf: use crc_itu_t from lib instead of udf_crc
  udf: Fix compilation warnings when UDF debug is on
  udf: Fix bug in VAT mapping code
  udf: Add read-only support for 2.50 UDF media
  udf: Fix handling of multisession media
  udf: Mount filesystem read-only if it has pseudooverwrite partition
  udf: Handle VAT packed inside inode properly
  udf: Allow loading of VAT inode
  udf: Fix detection of VAT version
  udf: Silence warning about accesses beyond end of device
  udf: Improve anchor block detection
  udf: Cleanup anchor block detection.
  udf: Move processing of virtual partitions
  udf: Move filling of partition descriptor info into a separate function
  udf: Improve error recovery on mount
  udf: Cleanup volume descriptor sequence processing
  udf: fix anchor point detection
  udf: Remove declarations of arrays of size UDF_NAME_LEN (256 bytes)
  udf: Remove checking of existence of filename in udf_add_entry()
  udf: Mark udf_process_sequence() as noinline
  ...

16 years agofix brd allocation flags
Petr Tesarik [Tue, 22 Apr 2008 03:36:52 +0000 (05:36 +0200)] 
fix brd allocation flags

While looking at the implementation of the Ram backed block device
driver, I stumbled across a write-only local variable, which makes
little sense, so I assume it should actually work like this:

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi2c: Fix platform driver hotplug/coldplug
Kay Sievers [Tue, 22 Apr 2008 20:16:49 +0000 (22:16 +0200)] 
i2c: Fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform
modalias is prefixed with "platform:". Add MODULE_ALIAS() to the
hotpluggable I2C platform drivers, to allow module auto loading.

[ db: add some more drivers ]

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: New driver for the SuperH Mobile I2C bus controller
Magnus Damm [Tue, 22 Apr 2008 20:16:49 +0000 (22:16 +0200)] 
i2c: New driver for the SuperH Mobile I2C bus controller

This is V5 of the SuperH Mobile I2C Controller Driver. A simple Master
only driver for the I2C block included in processors such as sh7343,
sh7722 and sh7723. Tested on a sh7722 MigoR using a rs5c732b rtc.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c/scx200_acb: Don't use 0 as NULL pointer
Adrian Bunk [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c/scx200_acb: Don't use 0 as NULL pointer

Don't use 0 as NULL pointer.

Spotted by sparse.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Fix mismatch in add timer and delete timer
Hans Schillstrom [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Fix mismatch in add timer and delete timer

Move init_completion to just before i2c transfer.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3385

Signed-off-by: Hans Schillstrom <hans.schillstrom@shlsys.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN

Simply use "depends on BLACKFIN" (which is technically correct) and just
document which machines have the device.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Use simpler comment headers and strip out information that is maintaine...
Mike Frysinger [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Use simpler comment headers and strip out information that is maintained in the scm's log

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add missing pin mux operation
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Add missing pin mux operation

Blackfin TWI controller hardware pin should be requested from GPIO port controller
Before BF54x, there is no need to do this. But as long as BF54x and BF52x
are supported by this generic driver, the missing pin mux operation should be
added.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)] 
i2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers

 - Dynamic alloc the resource of TWI driver data according to board information
 - TWI register read/write accessor based on dynamic regs_base
 - Support TWI0/TWI1 for BF54x

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer...
Sonic Zhang [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer operation

 - Create a new mode TWI_I2C_MODE_REPEAT.
 - No change to smbus operation.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Remove trailing whitespaces in busses/Kconfig
Wolfram Sang [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c: Remove trailing whitespaces in busses/Kconfig

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Replace remaining __FUNCTION__ occurrences
Harvey Harrison [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c: Replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Renesas SH7760 I2C master driver
Manuel Lauss [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c: Renesas SH7760 I2C master driver

Driver for I2C interfaces in master mode on SH7760.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-dev: Split i2cdev_ioctl
Jean Delvare [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c-dev: Split i2cdev_ioctl

Split the handling of the I2C_RDWR and I2C_SMBUS ioctls to their own
functions. This limits the stack usage, saves one level of indentation
and makes the code more readable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-ibm_iic: Support building as an of_platform driver
Sean MacLennan [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)] 
i2c-ibm_iic: Support building as an of_platform driver

This patch allows the i2c-ibm_iic driver to be built either as an ocp
driver or an of_platform driver. This allows it to run under the powerpc
arch but maintains backward compatibility with the ppc arch.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-ibm_iic: Change the log levels
Sean MacLennan [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)] 
i2c-ibm_iic: Change the log levels

Change the log levels based on feedback from linxppc-dev.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Add platform driver on top of the new pca-algorithm
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)] 
i2c: Add platform driver on top of the new pca-algorithm

Tested on a blackfin.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-algo-pca: Extend for future drivers
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)] 
i2c-algo-pca: Extend for future drivers

The separation between algorithm and adapter was unsharp at places. This was
partly hidden by the fact, that the ISA-driver allowed just one instance and
had all private data in static variables. This patch makes neccessary
preparations to add a platform driver on top of the algorithm, while still
supporting ISA. Note: Due to lack of hardware, the ISA-driver could not be
tested except that it builds.

Concerning the core struct i2c_algo_pca_data:

- A private data field was added, all hardware dependant data may go here.
  Similar to other algorithms, now a pointer to this data is passed to the
  adapter's functions. In order to make as less changes as possible to the
  ISA-driver, it leaves the private data empty and still only uses its static
  variables.

- A "reset_chip" function pointer was added; such a functionality must come
  from the adapter, not the algorithm.

- use a variable "i2c_clock" instead of a function pointer "get_clock",
  allowing for write access to a default in case a wrong value was supplied.

In the algorithm-file:

- move "i2c-pca-algo.h" into "linux/i2c-algo-pca.h"
- now using per_instance timeout values (i2c_adap->timeout)
- error messages specify the device, not only the driver name
- restructure initialization to easily support "i2c_add_numbered_adapter"
- drop "retries" and "own" (i2c address) as they were unused

(The state-machine for I2C-communication was not touched.)

In the ISA-driver:

- adapt to new algorithm

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-algo-pca: Remove trailing whitespaces and unnecessary UTF
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)] 
i2c-algo-pca: Remove trailing whitespaces and unnecessary UTF

Remove trailing whitespaces to make further patches more readable.  Also remove
an unnecessary UTF-char for simplicity ("us" for microseconds is fine enough).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Remove the algorithm drivers from the config menu
Jean Delvare [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)] 
i2c: Remove the algorithm drivers from the config menu

The algorithm drivers are helper drivers that are selected automatically
as needed. There's no point in listing them in the config menu, it can
only confuse users and waste their time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years ago[IA64] minor irq handler cleanups
Jeff Garzik [Fri, 18 Apr 2008 23:22:58 +0000 (19:22 -0400)] 
[IA64] minor irq handler cleanups

- remove unused 'irq' argument from pfm_do_interrupt_handler()

- remove pointless cast to void*

- add KERN_xxx prefix to printk()

- remove braces around singleton C statement

- in tioce_provider.c, start tioce_dma_consistent() and
  tioce_error_intr_handler() function declarations in column 0

This change's main purpose is to prepare for the patchset in
jgarzik/misc-2.6.git#irq-remove, that explores removal of the
never-used 'irq' argument in each interrupt handler.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] simplify notify hooks in mca.c
Hidetoshi Seto [Thu, 17 Apr 2008 08:00:37 +0000 (17:00 +0900)] 
[IA64] simplify notify hooks in mca.c

There are many notify_die() and almost all take same style with
ia64_mca_spin().  This patch defines macros and replace them all,
to reduce lines and to improve readability.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs
Hidetoshi Seto [Thu, 17 Apr 2008 07:59:52 +0000 (16:59 +0900)] 
[IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs

There are 3 hooks in MCA handler, but this DIE_MCA_MONARCH_PROCESS
event does not notified other than for the first monarch.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] disable interrupts on exit of ia64_trace_syscall
Hidetoshi Seto [Mon, 21 Apr 2008 21:34:39 +0000 (14:34 -0700)] 
[IA64] disable interrupts on exit of ia64_trace_syscall

While testing with CONFIG_VIRT_CPU_ACCOUNTING=y, I found that
I occasionally get very huge system time in some threads.

So I dug the issue and finally noticed that it was caused
because of an interrupt which interrupt in the following window:

> [arch/ia64/kernel/entry.S: (!CONFIG_PREEMPT && CONFIG_VIRT_CPU_ACCOUNTING)]
>
> ENTRY(ia64_leave_syscall)
>    :
> (pUStk) rsm psr.i
>         cmp.eq pLvSys,p0=r0,r0          // pLvSys=1: leave from syscall
> (pUStk) cmp.eq.unc p6,p0=r0,r0          // p6 <- pUStk
> .work_processed_syscall:
>         adds r2=PT(LOADRS)+16,r12
> (pUStk) mov.m r22=ar.itc                        // fetch time at leave
>         adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
>         ;;
> <<< window: from here >>>
> (p6)    ld4 r31=[r18]  // load current_thread_info()->flags
>         ld8 r19=[r2],PT(B6)-PT(LOADRS)
>         adds r3=PT(AR_BSPSTORE)+16,r12
>         ;;
>         mov r16=ar.bsp
>         ld8 r18=[r2],PT(R9)-PT(B6)
> (p6)    and r15=TIF_WORK_MASK,r31  // any work other than TIF_SYSCALL_TRACE?
>         ;;
>         ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)
> (p6)    cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
> (p6)    br.cond.spnt .work_pending_syscall
>         ;;
>         ld8 r9=[r2],PT(CR_IPSR)-PT(R9)
>         ld8 r11=[r3],PT(CR_IIP)-PT(R11)
> (pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE!
>         ;;
>         invala
> <<< window: to here >>>
>         rsm psr.i | psr.ic // turn off interrupts and interruption collection

If pUStk is true, it means we are going to return user mode, hence we fetch
ar.itc to get time at leave from system.
It seems that it is not possible to interrupt the window if pUStk is true,
because interrupts are disabled early.  And also disabling interrupt makes
sense because it is safe for referring current_thread_info()->flags.

However interrupting the window while pUStk is true was possible.
The route was:
ia64_trace_syscall
-> .work_pending_syscall_end
-> .work_processed_syscall
Only in case entering the window from this route, interrupts are enabled
during in the window even if pUStk is true.  I suppose interrupts must be
disabled here anyway if pUStk is true.
I'm not sure but afraid that what kind of bad effect were there, other
than crazy system time which I found.

FYI, there was a commit 6f6d75825dc49b082906b84537b4df28293c2977 that
points out a bug at same point(exit of ia64_trace_syscall) in 2006.
It can be said that there was an another bug.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoHID: Suppress hidinput for Samsung IR control
Robert Schedel [Fri, 11 Apr 2008 07:21:48 +0000 (09:21 +0200)] 
HID: Suppress hidinput for Samsung IR control

Samsung USB remotes (0419:0001) report six keys via standard HID usage pages
(arrow keys, OK, Power).  Kernel 2.6.25 maps those to input events (in addition
to the hiddev report).  The remaining 43 keys are reported via proprietary HID
report page and therefore by hiddev only.

Applications using hiddev and input device might process the 6 standard keys
twice.  To avoid this, the input device will be suppressed for the Samsung
remote with a quirk entry, forcing to use the hiddev device only.

LIRC already contains the proper support.

Signed-off-by: Robert Schedel <r.schedel@yahoo.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: remove 60x GTCO devices from blacklist
Jiri Kosina [Wed, 9 Apr 2008 08:21:48 +0000 (10:21 +0200)] 
HID: remove 60x GTCO devices from blacklist

Jeremy Robertson reports that GTCO engineers made a mistake and we don't
need 0x60x GTCO product ids blacklisted.

This mostly reverts dda3fd35, but leaves PID 0x1007 intact.

Reported-by: Jeremy Roberson <jeremy.roberson@einstruction.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: export headers properly
Mike Frysinger [Tue, 8 Apr 2008 08:20:36 +0000 (10:20 +0200)] 
HID: export headers properly

I have people whining about using these headers in userspace, and they have
__KERNEL__ markings which implies they're supposed to be exported.  I also
added the required linux/types.h include to hidraw.h since it uses the __u##
kernel types.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Jiri Kosina <jikos@jikos.cz>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: WiseGroup 866 Dual Joypad needs output reports quirk
Jiri Kosina [Fri, 4 Apr 2008 14:50:12 +0000 (16:50 +0200)] 
HID: WiseGroup 866 Dual Joypad needs output reports quirk

WiseGroup Ltd, MP-8866 Dual Joypad needs to skip output reports,
as it contains force-feedback output reports.

Reported-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: ThrustMaster FF driver is no longer experimental
Jiri Kosina [Mon, 31 Mar 2008 23:56:33 +0000 (01:56 +0200)] 
HID: ThrustMaster FF driver is no longer experimental

There is no need to keep a few years old ThrustMaster force-feedback
driver as experimental.

HID_FF is currently marked experimental anyway, so this is even redundant.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: Logitech diNovo Mini pad support
Jiri Kosina [Mon, 31 Mar 2008 21:49:22 +0000 (23:49 +0200)] 
HID: Logitech diNovo Mini pad support

Logitech diNovo Mini needs DUPLICATE_USAGES quirk.

Reported-by: Tom Horsley <tom.horsley@att.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix race between open() and disconnect() in usbhid
Oliver Neukum [Mon, 31 Mar 2008 14:27:30 +0000 (16:27 +0200)] 
HID: fix race between open() and disconnect() in usbhid

There is a window:

task A task B
spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
usb_set_intfdata(intf, NULL);
spin_unlock_irq(&usbhid->inlock);
usb_kill_urb(usbhid->urbin);
usb_kill_urb(usbhid->urbout);
usb_kill_urb(usbhid->urbctrl);

del_timer_sync(&usbhid->io_retry);
cancel_work_sync(&usbhid->reset_work);

if (!hid->open++) {
res = usb_autopm_get_interface(usbhid->intf);
if (res < 0) {
hid->open--;
return -EIO;
}
}
if (hid_start_in(hid))

if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(hid);

in which an open() to an already disconnected device will submit an URB
to an undead device. In case disconnect() was called by an ioctl, this'll
oops. Fix by introducing a new flag and checking it in hid_start_in().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: make hid_input_field and usbhid_modify_dquirk static
Adrian Bunk [Sun, 30 Mar 2008 23:53:56 +0000 (01:53 +0200)] 
HID: make hid_input_field and usbhid_modify_dquirk static

This patch makes the following needlessly global functions static:
- hid-core.c:hid_input_field()
- usbhid/hid-quirks.c:usbhid_modify_dquirk()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: pass numbered reports properly to hidraw
Jiri Kosina [Fri, 28 Mar 2008 13:11:22 +0000 (14:11 +0100)] 
HID: pass numbered reports properly to hidraw

The numbered reports need to be passed properly to hidraw (i.e. with the first
data field indicating the report number), otherwise userspace has no idea
about the identification of the report.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix misplaced rdesc quirk
Jiri Kosina [Wed, 2 Apr 2008 09:34:10 +0000 (11:34 +0200)] 
HID: fix misplaced rdesc quirk

This moves the misplaced rdesc quirk to the place where it belongs.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: force feedback driver for Logitech Rumblepad 2
Anssi Hannula [Mon, 31 Mar 2008 23:51:11 +0000 (01:51 +0200)] 
HID: force feedback driver for Logitech Rumblepad 2

Add force feedback support for Logitech Rumblepad 2.

Tested-By: Edgar Simo <bobbens@gmail.com>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: move wait from hid to usbhid
Jiri Slaby [Wed, 19 Mar 2008 20:55:04 +0000 (21:55 +0100)] 
HID: move wait from hid to usbhid

Since only place where this is used is usbhid, move it there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: make function from dbg_hid
Jiri Slaby [Sun, 9 Mar 2008 15:29:24 +0000 (16:29 +0100)] 
HID: make function from dbg_hid

To check paramters even if debug is disabled, convert dbg_hid
to inline function with __attribute__(format) checking.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix sparse warnings
Jiri Slaby [Fri, 28 Mar 2008 16:06:41 +0000 (17:06 +0100)] 
HID: fix sparse warnings

Fix these sparse warnings:
.../hid/hid-core.c:100:15: warning: incorrect type in assignment (different signedness)
.../hid/hid-core.c:100:15:    expected signed int [usertype] *value
.../hid/hid-core.c:100:15:    got unsigned int *<noident>
        by unsigned -> s32

.../hid/hid-input-quirks.c:336:10: warning: Using plain integer as NULL pointer
        by 0 -> NULL

.../hid/usbhid/hid-core.c:786:46: warning: incorrect type in argument 3 (different signedness)
.../hid/usbhid/hid-core.c:786:46:    expected int *max
.../hid/usbhid/hid-core.c:786:46:    got unsigned int *<noident>
.../hid/usbhid/hid-core.c:787:47: warning: incorrect type in argument 3 (different signedness)
.../hid/usbhid/hid-core.c:787:47:    expected int *max
.../hid/usbhid/hid-core.c:787:47:    got unsigned int *<noident>
.../hid/usbhid/hid-core.c:788:48: warning: incorrect type in argument 3 (different signedness)
.../hid/usbhid/hid-core.c:788:48:    expected int *max
.../hid/usbhid/hid-core.c:788:48:    got unsigned int *<noident>
        by int -> unsigned int

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: only dump report traffic with debug level 2
Anssi Hannula [Sat, 22 Mar 2008 22:50:13 +0000 (23:50 +0100)] 
HID: only dump report traffic with debug level 2

Currently using debug=1 with hid module prints out all sent and received
reports to the kernel log, while in many cases we only want to see the
report descriptors and hid-input mappings that are printed when a device
is probed.

Add new level debug=2, and only dump the report traffic with that level.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: patch to add NOGET for DMI/Acomdata
Pete Zaitcev [Thu, 20 Mar 2008 09:14:02 +0000 (10:14 +0100)] 
HID: patch to add NOGET for DMI/Acomdata

This must be the weirdest failure yet. My external disk stops processing
the storage commands the moment it receives a GET_REPORT. The firmware
does not crash; if I do rmmod hid, then SET-INTERFACE restores normal
operations. Still, I cannot live without the keyboard when I want backup
my files. Adding the NOGET quirk fixes this problem for me.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: Sunplus Wireless Desktop needs report descriptor fixup
Jiri Kosina [Fri, 14 Mar 2008 15:53:07 +0000 (16:53 +0100)] 
HID: Sunplus Wireless Desktop needs report descriptor fixup

This device has reports lower logical maximum compared to the real
usages for Zoom+ and Zoom- it emits.

This patch bumps the values in the report descriptor up, and also
adjusts HID_MAX_USAGE accordingly.

Reported-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: quirk for MS Wireless Desktop Receiver (model 1028)
Jim Duchek [Fri, 14 Mar 2008 14:53:49 +0000 (15:53 +0100)] 
HID: quirk for MS Wireless Desktop Receiver (model 1028)

Microsoft's wireless desktop receiver (Model 1028) has a bug in the report
descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when
it quite obviously doesn't intend to.

In other words, it reports that it has pretty much _everything_ in 'consumer'
and 'generic desktop'.  And then the X evdev driver believes I have a mouse
with 36 absolute axes and a huge pile of keys and buttons, when I in fact,
should have zero.  255/256 in three of the cases, and 0-1024 in another.

This patch fixes the report descriptor of this device before it enters the HID
parser.

Signed-off-by: Jim Duchek <jim.duchek@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
Pekka Sarnila [Thu, 6 Mar 2008 12:23:14 +0000 (13:23 +0100)] 
HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd

Many vendors highspeed devices give erroneously fullspeed interval value in
endpoint descriptor for interrupt endpoints. This quirk fixes up that by
recalculating the right value for highspeed device.

At the time of hid configuration this quirk calculates which highspeed interval
value gives same interval delay as, or next smaller then, what it would be if
the original value would be interpreted as fullspeed value. In subsequent urbs
that new value is used instead.

Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more
descriptive printk reporting the fixup.

In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared
HID-keyboard. It reports value 16 which means 4,069s in highspeed while
obviously 16ms was intended. In this case quirk calculates new value to be 8
which gives when interpreted as highspeed value 16ms as wanted. The behavior of
the device was verified to be what expected both before and after the patch.

Signed-off-by: Pekka Sarnila <sarnila@adit.fi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix build failure in hiddev_ioctl with gcc 3.2
Jean Delvare [Mon, 3 Mar 2008 10:48:43 +0000 (11:48 +0100)] 
HID: fix build failure in hiddev_ioctl with gcc 3.2

Fix build failure in hiddev_ioctl with gcc 3.2:
http://bugzilla.kernel.org/show_bug.cgi?id=10121

The trick is to move the handling of ioctls which need to allocate
memory to separate functions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoSELinux fixups needed for preemptable RCU from -rt
Paul E. McKenney [Tue, 22 Apr 2008 01:12:33 +0000 (18:12 -0700)] 
SELinux fixups needed for preemptable RCU from -rt

The attached patch needs to move from -rt to mainline given preemptable RCU.
This patch fixes SELinux code that implicitly assumes that disabling
preemption prevents an RCU grace period from completing, an assumption that
is valid for Classic RCU, but not necessarily for preemptable RCU.  Explicit
rcu_read_lock() calls are thus added.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
16 years ago[PATCH] teach seq_file to discard entries
Al Viro [Fri, 28 Mar 2008 04:46:41 +0000 (00:46 -0400)] 
[PATCH] teach seq_file to discard entries

Allow ->show() return SEQ_SKIP; that will discard all
output from that element and move on.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] umount_tree() will unhash everything itself
Al Viro [Mon, 24 Mar 2008 04:16:03 +0000 (00:16 -0400)] 
[PATCH] umount_tree() will unhash everything itself

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] get rid of more nameidata passing in namespace.c
Al Viro [Sat, 22 Mar 2008 22:00:39 +0000 (18:00 -0400)] 
[PATCH] get rid of more nameidata passing in namespace.c

Further reduction of stack footprint (sys_pivot_root());
lose useless BKL in there, while we are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] switch a bunch of LSM hooks from nameidata to path
Al Viro [Sat, 22 Mar 2008 21:48:24 +0000 (17:48 -0400)] 
[PATCH] switch a bunch of LSM hooks from nameidata to path

Namely, ones from namespace.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] lock exclusively in collect_mounts() and drop_collected_mounts()
Al Viro [Sat, 22 Mar 2008 20:19:49 +0000 (16:19 -0400)] 
[PATCH] lock exclusively in collect_mounts() and drop_collected_mounts()

Taking namespace_sem shared there isn't worth the trouble, especially with
vfsmount ID allocation about to be added.  That way we know that umount_tree(),
copy_tree() and clone_mnt() are _always_ serialized by namespace_sem.
umount_tree() still needs vfsmount_lock (it manipulates hash chains, among
other things), but that's a separate story.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>