]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agox86: add %gs accessors for x86_32
Tejun Heo [Mon, 9 Feb 2009 13:17:40 +0000 (22:17 +0900)]
x86: add %gs accessors for x86_32

Impact: cleanup

On x86_32, %gs is handled lazily.  It's not saved and restored on
kernel entry/exit but only when necessary which usually is during task
switch but there are few other places.  Currently, it's done by
calling savesegment() and loadsegment() explicitly.  Define
get_user_gs(), set_user_gs() and task_user_gs() and use them instead.

While at it, clean up register access macros in signal.c.

This cleans up code a bit and will help future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use asm .macro instead of cpp #define in entry_32.S
Tejun Heo [Mon, 9 Feb 2009 13:17:40 +0000 (22:17 +0900)]
x86: use asm .macro instead of cpp #define in entry_32.S

Impact: cleanup

Use .macro instead of cpp #define where approriate.  This cleans up
code and will ease future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: no stack protector for vdso
Tejun Heo [Mon, 9 Feb 2009 13:17:40 +0000 (22:17 +0900)]
x86: no stack protector for vdso

Impact: avoid crash on vsyscall

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agostackprotector: update make rules
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
stackprotector: update make rules

Impact: no default -fno-stack-protector if stackp is enabled, cleanup

Stackprotector make rules had the following problems.

* cc support test and warning are scattered across makefile and
  kernel/panic.c.

* -fno-stack-protector was always added regardless of configuration.

Update such that cc support test and warning are contained in makefile
and -fno-stack-protector is added iff stackp is turned off.  While at
it, prepare for 32bit support.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: stackprotector.h misc update
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
x86: stackprotector.h misc update

Impact: misc udpate

* wrap content with CONFIG_CC_STACK_PROTECTOR so that other arch files
  can include it directly

* add missing includes

This will help future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoelf: add ELF_CORE_COPY_KERNEL_REGS()
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
elf: add ELF_CORE_COPY_KERNEL_REGS()

ELF core dump is used for both user land core dump and kernel crash
dump.  Depending on architecture, register might need to be accessed
differently for userland and kernel.  Allow architectures to define
ELF_CORE_COPY_KERNEL_REGS() and use different operation for kernel
register dump.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86/urgent' into core/percpu
Ingo Molnar [Mon, 9 Feb 2009 23:41:02 +0000 (00:41 +0100)]
Merge branch 'x86/urgent' into core/percpu

Conflicts:
arch/x86/kernel/acpi/boot.c

15 years agoMerge branch 'x86/uaccess' into core/percpu
Ingo Molnar [Mon, 9 Feb 2009 23:40:48 +0000 (00:40 +0100)]
Merge branch 'x86/uaccess' into core/percpu

15 years agox86: fix math_emu register frame access
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
x86: fix math_emu register frame access

do_device_not_available() is the handler for #NM and it declares that
it takes a unsigned long and calls math_emu(), which takes a long
argument and surprisingly expects the stack frame starting at the zero
argument would match struct math_emu_info, which isn't true regardless
of configuration in the current code.

This patch makes do_device_not_available() take struct pt_regs like
other exception handlers and initialize struct math_emu_info with
pointer to it and pass pointer to the math_emu_info to math_emulate()
like normal C functions do.  This way, unless gcc makes a copy of
struct pt_regs in do_device_not_available(), the register frame is
correctly accessed regardless of kernel configuration or compiler
used.

This doesn't fix all math_emu problems but it at least gets it
somewhat working.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agobridge: Fix LRO crash with tun
Herbert Xu [Mon, 9 Feb 2009 23:07:18 +0000 (15:07 -0800)]
bridge: Fix LRO crash with tun

> Kernel BUG at drivers/net/tun.c:444
> invalid opcode: 0000 [1] SMP
> last sysfs file: /class/net/lo/ifindex
> CPU 0
> Modules linked in: tun ipt_MASQUERADE iptable_nat ip_nat xt_state ip_conntrack
> nfnetlink ipt_REJECT xt_tcpudp iptable_filter d
> Pid: 6912, comm: qemu-kvm Tainted: G      2.6.18-128.el5 #1
> RIP: 0010:[<ffffffff886f57b0>]  [<ffffffff886f57b0>]
> :tun:tun_chr_readv+0x2b1/0x3a6
> RSP: 0018:ffff8102202c5e48  EFLAGS: 00010246
> RAX: 0000000000000000 RBX: ffff8102202c5e98 RCX: 0000000004010000
> RDX: ffff810227063680 RSI: ffff8102202c5e9e RDI: ffff8102202c5e92
> RBP: 0000000000010ff6 R08: 0000000000000000 R09: 0000000000000001
> R10: ffff8102202c5e94 R11: 0000000000000202 R12: ffff8102275357c0
> R13: ffff81022755e500 R14: 0000000000000000 R15: ffff8102202c5ef8
> FS:  00002ae4398db980(0000) GS:ffffffff803ac000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> CR2: 00002ae4ab514000 CR3: 0000000221344000 CR4: 00000000000026e0
> Process qemu-kvm (pid: 6912, threadinfo ffff8102202c4000, task
ffff81022e58d820)
> Stack:  00000000498735cb ffff810229d1a3c0 0000000000000000 ffff81022e58d820
>  ffffffff8008a461 ffff81022755e528 ffff81022755e528 ffffffff8009f925
>  000005ea05ea0000 ffff8102209d0000 00001051143e1600 ffffffff8003c00e
> Call Trace:
>  [<ffffffff8008a461>] default_wake_function+0x0/0xe
>  [<ffffffff8009f925>] enqueue_hrtimer+0x55/0x70
>  [<ffffffff8003c00e>] hrtimer_start+0xbc/0xce
>  [<ffffffff886f58bf>] :tun:tun_chr_read+0x1a/0x1f
>  [<ffffffff8000b3f3>] vfs_read+0xcb/0x171
>  [<ffffffff800117d4>] sys_read+0x45/0x6e
>  [<ffffffff8005d116>] system_call+0x7e/0x83
>
>
> Code: 0f 0b 68 40 62 6f 88 c2 bc 01 f6 42 0a 08 74 0c 80 4c 24 41
> RIP  [<ffffffff886f57b0>] :tun:tun_chr_readv+0x2b1/0x3a6
>  RSP <ffff8102202c5e48>
>  <0>Kernel panic - not syncing: Fatal exception

This crashed when an LRO packet generated by bnx2x reached a
tun device through the bridge.  We're supposed to drop it at
the bridge.  However, because the check was placed in br_forward
instead of __br_forward, it's only effective if we are sending
the packet through a single port.

This patch fixes it by moving the check into __br_forward.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPv6: fix to set device name when new IPv6 over IPv6 tunnel device is created.
Noriaki TAKAMIYA [Mon, 9 Feb 2009 23:01:19 +0000 (15:01 -0800)]
IPv6: fix to set device name when new IPv6 over IPv6 tunnel device is created.

When the user creates IPv6 over IPv6 tunnel, the device name created
by the kernel isn't set to t->parm.name, which is referred as the
result of ioctl().

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: Fix boot hangs while bringing up gianfar ethernet
Jarek Poplawski [Mon, 9 Feb 2009 22:59:30 +0000 (14:59 -0800)]
gianfar: Fix boot hangs while bringing up gianfar ethernet

Ira Snyder found that commit 8c7396aebb68994c0519e438eecdf4d5fa9c7844
"gianfar: Merge Tx and Rx interrupt for scheduling clean up ring" can
cause hangs. It's because there was removed clearing of interrupts in
gfar_schedule_cleanup() (which is called by an interrupt handler) in
case when netif scheduling has been disabled. This patch brings back
this action and a comment.

Reported-by: Ira Snyder <iws@ovro.caltech.edu>
Reported-by: Peter Korsgaard <jacmet@sunsite.dk>
Bisected-by: Ira Snyder <iws@ovro.caltech.edu>
Tested-by: Peter Korsgaard <jacmet@sunsite.dk>
Tested-by: Ira Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: xt_sctp: sctp chunk mapping doesn't work
Qu Haoran [Mon, 9 Feb 2009 22:34:56 +0000 (14:34 -0800)]
netfilter: xt_sctp: sctp chunk mapping doesn't work

When user tries to map all chunks given in argument, kernel
works on a copy of the chunkmap, but at the end it doesn't
check the copy, but the orginal one.

Signed-off-by: Qu Haoran <haoran.qu@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: ctnetlink: fix echo if not subscribed to any multicast group
Pablo Neira Ayuso [Mon, 9 Feb 2009 22:34:26 +0000 (14:34 -0800)]
netfilter: ctnetlink: fix echo if not subscribed to any multicast group

This patch fixes echoing if the socket that has sent the request to
create/update/delete an entry is not subscribed to any multicast
group. With the current code, ctnetlink would not send the echo
message via unicast as nfnetlink_send() would be skip.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: ctnetlink: allow changing NAT sequence adjustment in creation
Pablo Neira Ayuso [Mon, 9 Feb 2009 22:33:57 +0000 (14:33 -0800)]
netfilter: ctnetlink: allow changing NAT sequence adjustment in creation

This patch fixes an inconsistency in the current ctnetlink code
since NAT sequence adjustment bit can only be updated but not set
in the conntrack entry creation.

This patch is used by conntrackd to successfully recover newly
created entries that represent connections with helpers and NAT
payload mangling.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: nf_conntrack_ipv6: don't track ICMPv6 negotiation message
Eric Leblond [Mon, 9 Feb 2009 22:33:20 +0000 (14:33 -0800)]
netfilter: nf_conntrack_ipv6: don't track ICMPv6 negotiation message

This patch removes connection tracking handling for ICMPv6 messages
related to Stateless Address Autoconfiguration, MLD, and MLDv2. They
can not be tracked because they are massively using multicast (on
pre-defined address). But they are not invalid and should not be
detected as such.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix tuple inversion for Node information request
Eric Leblond [Mon, 9 Feb 2009 22:33:03 +0000 (14:33 -0800)]
netfilter: fix tuple inversion for Node information request

The patch fixes a typo in the inverse mapping of Node Information
request. Following draft-ietf-ipngwg-icmp-name-lookups-09, "Querier"
sends a type 139 (ICMPV6_NI_QUERY) packet to "Responder" which answer
with a type 140 (ICMPV6_NI_REPLY) packet.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxen: expose enable_IO_APIC for 32-bit
Ian Campbell [Mon, 9 Feb 2009 20:05:48 +0000 (12:05 -0800)]
xen: expose enable_IO_APIC for 32-bit

enable_IO_APIC() is defined for both 32- and 64-bit x86, so it should
be declared for both.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: unstatic ioapic entry funcs
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: unstatic ioapic entry funcs

Unstatic ioapic_write_entry and setup_ioapic_entry functions so that
the Xen code can do its own ioapic routing setup.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: add mp_find_ioapic_pin
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: add mp_find_ioapic_pin

Add mp_find_ioapic_pin() to find an IO APIC's specific pin from a GSI,
and use this function within acpi/boot.  Make it non-static so other
code can use it too.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: unstatic mp_find_ioapic so it can be used elsewhere
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: unstatic mp_find_ioapic so it can be used elsewhere

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: make apic_* operations inline functions
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: make apic_* operations inline functions

Mainly to get proper type-checking and consistency.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Mon, 9 Feb 2009 22:00:16 +0000 (14:00 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: don't use spin_is_contended

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 9 Feb 2009 21:59:51 +0000 (13:59 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: Storage: Update unusual_devs entry for Datafab KECF-USB
  USB: Correct Makefile to make isp1760 buildable
  USB: option: New mobile broadband modems to be supported
  USB: two more usb ids for ti_usb_3410_5052
  USB: ftdi_sio: unlock_kernel() on error in set_serial_info()
  USB: usb-storage: add Pentax to the bad-vendor list
  USB: ftdi_sio: add support for the NDI Polaris system
  USB: usb-serial: fix the aircable_init failure path
  USB: usb-storage: remove WARN from last-sector hacks
  Revert USB: option: add Pantech cards
  USB: cdc-acm.c: remove duplicate lines for MTK gps support
  USB: fsl_qe_udc: Fix stalled TX requests bug
  USB: fsl_qe_udc: Fix muram corruption by disabled endpoints
  USB: fsl_qe_udc: Fix disconnects reporting during bus reset
  USB: fsl_qe_udc: Fix QE USB controller initialization
  USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()
  USB: fsl_qe_udc: Fix oops on QE UDC probe failure

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Mon, 9 Feb 2009 21:58:40 +0000 (13:58 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: panel: fix lcd panel driver build failure
  Staging: android: fix up units in timed_gpio
  Staging: android: ram_console: Disable ECC when early init is enabled and validate buffer size
  Staging: at76_usb: Add support for OQO Model 01+
  Staging: at76_usb: fix bugs introduced by "Staging: at76_usb: cleanup dma on stack issues"
  Revert Staging: at76_usb: update drivers/staging/at76_usb w/ mac80211 port

15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 9 Feb 2009 21:58:22 +0000 (13:58 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] powernow-k8: Get transition latency from ACPI _PSS table
  [CPUFREQ] Make ignore_nice_load setting of ondemand work as expected.

15 years agoBtrfs: don't use spin_is_contended
Chris Mason [Mon, 9 Feb 2009 21:22:03 +0000 (16:22 -0500)]
Btrfs: don't use spin_is_contended

Btrfs was using spin_is_contended to see if it should drop locks before
doing extent allocations during btrfs_search_slot.  The idea was to avoid
expensive searches in the tree unless the lock was actually contended.

But, spin_is_contended is specific to the ticket spinlocks on x86, so this
is causing compile errors everywhere else.

In practice, the contention could easily appear some time after we started
doing the extent allocation, and it makes more sense to always drop the lock
instead.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoStaging: panel: fix lcd panel driver build failure
Sachin P. Sant [Tue, 3 Feb 2009 15:40:58 +0000 (21:10 +0530)]
Staging: panel: fix lcd panel driver build failure

* Fix build break for lcd panel driver.

Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: android: fix up units in timed_gpio
Greg Kroah-Hartman [Wed, 4 Feb 2009 23:05:05 +0000 (15:05 -0800)]
Staging: android: fix up units in timed_gpio

The last build fix I did messed up the units of the sysfs file.

This puts them back to be milliseconds, like they originally were.

Thanks to Juha Motorsportcom for pointing this out.

Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: android: ram_console: Disable ECC when early init is enabled and validate...
Arve Hjønnevåg [Sat, 31 Jan 2009 04:21:09 +0000 (20:21 -0800)]
Staging: android: ram_console: Disable ECC when early init is enabled and validate buffer size

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: at76_usb: Add support for OQO Model 01+
Jamie Lentin [Wed, 4 Feb 2009 13:38:44 +0000 (13:38 +0000)]
Staging: at76_usb: Add support for OQO Model 01+

Add USB device ID for OQO 01+'s internal wireless LAN

An OQO employee mentions the chip's true identity here:-
   ftp://ftp.oqo.com/unsupported/linux/OQOLinux.html

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: at76_usb: fix bugs introduced by "Staging: at76_usb: cleanup dma on stack...
Jason Andryuk [Fri, 30 Jan 2009 14:05:03 +0000 (09:05 -0500)]
Staging: at76_usb: fix bugs introduced by "Staging: at76_usb: cleanup dma on stack issues"

Tracking down the firmware loading problem led to this commit.

$ git bisect bad
0d1d1424330cc1934f2b2742f0cfa2c31e6a250b is first bad commit
commit 0d1d1424330cc1934f2b2742f0cfa2c31e6a250b
Author: Oliver Neukum <oliver@neukum.org>
Date:   Thu Dec 18 13:16:40 2008 +0100

    Staging: at76_usb: cleanup dma on stack issues

    - no DMA on stack
    - cleanup unclear endianness issue

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
:040000 040000 c4fee9ea0fef25926229d810d19dc2f89cca9401
8b165a35d16280d2413b2700a6080ef290ca1009 M drivers

The "no DMA on stack" conversion was incomplete with respect to
updating the arguments passed to usb_control_msg.  The value 40 is
hardcoded as it was prior to conversion.

The driver can now load firmware, but is not fully functional.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRevert Staging: at76_usb: update drivers/staging/at76_usb w/ mac80211 port
Greg Kroah-Hartman [Wed, 4 Feb 2009 00:28:48 +0000 (16:28 -0800)]
Revert Staging: at76_usb: update drivers/staging/at76_usb w/ mac80211 port

Reverts 02227c28391b5059a7710d6039c52912b0ee2c1d
(Had to be done by hand due to other patches that had come after this.)

Turns out that we don't want the mac80211 port of this driver just yet, as
there is a different driver working on adding this support.

So keep things old and different for now.

This is being reverted at the request of the linux-wireless developers.

Cc: Kalle Valo <kalle.valo@iki.fi>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Storage: Update unusual_devs entry for Datafab KECF-USB
Nick Holloway [Sun, 25 Jan 2009 16:58:43 +0000 (16:58 +0000)]
USB: Storage: Update unusual_devs entry for Datafab KECF-USB

This device suffers from the off-by-one error when reporting the capacity,
so add US_FL_FIX_CAPACITY to the existing entry.

Signed-off-by: Nick Holloway <Nick.Holloway@pyrites.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Correct Makefile to make isp1760 buildable
Ivan Kuten [Fri, 6 Feb 2009 09:42:34 +0000 (17:42 +0800)]
USB: Correct Makefile to make isp1760 buildable

Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option: New mobile broadband modems to be supported
Dirk De Schepper [Fri, 6 Feb 2009 20:48:34 +0000 (20:48 +0000)]
USB: option: New mobile broadband modems to be supported

- New Novatel and Dell mobile broadband modem products added
 - Dell pid variables used in stead of numerical PIDs for known
   products

Signed-off-by: Dirk De Schepper <ddeschepper@nvtl.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: two more usb ids for ti_usb_3410_5052
Oliver Neukum [Wed, 4 Feb 2009 15:38:33 +0000 (16:38 +0100)]
USB: two more usb ids for ti_usb_3410_5052

This patch adds device IDs and balances the counts to make the
hot ID additioning mechanism work.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Cc: Chris Adams <cmadams@hiwaay.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: unlock_kernel() on error in set_serial_info()
Dan Carpenter [Tue, 3 Feb 2009 08:11:38 +0000 (11:11 +0300)]
USB: ftdi_sio: unlock_kernel() on error in set_serial_info()

There was one error path where unlock_kernel() wasn't called.

This was found with a code checker (http://repo.or.cz/w/smatch.git/)
Compile tested only, sorry.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usb-storage: add Pentax to the bad-vendor list
Alan Stern [Wed, 4 Feb 2009 20:48:03 +0000 (15:48 -0500)]
USB: usb-storage: add Pentax to the bad-vendor list

This patch (as1202) adds Pentax to usb-storage's list of bad vendors
whose devices always need the CAPACITY_HEURISTICS flag.  This is in
addition to the existing entries: Nokia, Nikon, and Motorola.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Virgo Pärna <virgo.parna@mail.ee>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: add support for the NDI Polaris system
Stephane Clerambault [Mon, 2 Feb 2009 21:39:12 +0000 (13:39 -0800)]
USB: ftdi_sio: add support for the NDI Polaris system

Add support for the NDI Polaris system *http://www.ndigital.com/).

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usb-serial: fix the aircable_init failure path
Dave Young [Sun, 1 Feb 2009 10:54:54 +0000 (18:54 +0800)]
USB: usb-serial: fix the aircable_init failure path

The failure path of aircable_init is wrong, fix the order of (goto) labels.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usb-storage: remove WARN from last-sector hacks
Alan Stern [Mon, 2 Feb 2009 14:51:01 +0000 (09:51 -0500)]
USB: usb-storage: remove WARN from last-sector hacks

This patch (as1201) removes the WARN() from the last-sector hacks in
usb-storage, thereby making the code match the version now in
.27-stable and .28-stable.  The WARN() isn't needed, since there is no
longer any intention of assuming that all storage devices have an even
number of sectors, and it annoys users for no good reason.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRevert USB: option: add Pantech cards
Greg Kroah-Hartman [Wed, 4 Feb 2009 00:02:21 +0000 (16:02 -0800)]
Revert USB: option: add Pantech cards

Revert 8b6346ec899713a90890c9e832f7eff91ea73504 as these devices really
work just fine with the cdc-acm driver, as they follow the spec
properly.

Thanks to Chuck Ebbert for pointing out the problem here.

Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm.c: remove duplicate lines for MTK gps support
James Treacy [Fri, 30 Jan 2009 01:17:17 +0000 (20:17 -0500)]
USB: cdc-acm.c: remove duplicate lines for MTK gps support

The same patch to add support for MTK gps loggers was submitted by two
different people and applied twice. Remove the redundant lines.

Signed-off-by: James Treacy <treacy@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix stalled TX requests bug
Anton Vorontsov [Thu, 25 Dec 2008 14:15:14 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix stalled TX requests bug

While disabling an endpoint the driver nuking any pending requests,
thus completing them with -ESHUTDOWN status. But the driver doesn't
clear the tx_req, which means that a next TX request (after
ep_enable), might get stalled, since the driver won't queue the new
reqests.

This patch fixes a bug I'm observing with ethernet gadget while
playing with ifconfig usb0 up/down (the up/down sequence disables
and enables `in' and `out' endpoints).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix muram corruption by disabled endpoints
Anton Vorontsov [Thu, 25 Dec 2008 14:15:11 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix muram corruption by disabled endpoints

Before freeing an endpoint's muram memory, we should stop all activity
of the endpoint, otherwise the QE UDC controller might do nasty things
with the muram memory that isn't belong to that endpoint anymore.

The qe_ep_reset() effectively flushes the hardware fifos, finishes all
late transaction and thus prevents the corruption.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix disconnects reporting during bus reset
Anton Vorontsov [Thu, 25 Dec 2008 14:15:09 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix disconnects reporting during bus reset

Freescale QE UDC controllers can't report the "port change" states,
so the only way to handle disconnects is to process bus reset
interrupts. The bus reset can take some time, that is, few irqs.
Gadgets may print the disconnection events, and this causes few
repetitive messages in the kernel log.

This patch fixes the issue by using the usb_state machine, if the
usb controller has been already reset, just quit the reset irq
early.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix QE USB controller initialization
Anton Vorontsov [Thu, 25 Dec 2008 14:15:07 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix QE USB controller initialization

qe_udc_reg_init() leaves the USB controller enabled before muram memory
initialized. Sometimes the uninitialized muram memory confuses the
controller, and it start sending the busy interrupts.

Fix this by disabling the controller, it will be enabled later by
the gadget driver, at bind time.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()
Anton Vorontsov [Thu, 25 Dec 2008 14:15:05 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()

The call chain is this:

qe_udc_irq() <- grabs the udc->lock spinlock
rx_irq()
qe_ep0_rx()
ep0_setup_handle()
setup_received_handle()
ch9getstatus()
qe_ep_queue() <- tries to grab the udc->lock again

It seems unsafe to temporarily drop the lock in the ch9getstatus(),
so to fix that bug the lock-less __qe_ep_queue() function
implemented and used by the ch9getstatus().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_qe_udc: Fix oops on QE UDC probe failure
Anton Vorontsov [Thu, 25 Dec 2008 14:15:02 +0000 (17:15 +0300)]
USB: fsl_qe_udc: Fix oops on QE UDC probe failure

In case of probing errors the driver kfrees the udc_controller, but it
doesn't set the pointer to NULL.

When usb_gadget_register_driver is called, it checks for udc_controller
!= NULL, the check passes and the driver accesses nonexistent memory.
Fix this by setting udc_controller to NULL in case of errors.

While at it, also implement irq_of_parse_and_map()'s failure and cleanup
cases.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMerge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 9 Feb 2009 18:30:19 +0000 (10:30 -0800)]
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.29' of git://linux-nfs.org/~bfields/linux:
  lockd: fix regression in lockd's handling of blocked locks

15 years agolockd: fix regression in lockd's handling of blocked locks
J. Bruce Fields [Wed, 4 Feb 2009 22:35:38 +0000 (17:35 -0500)]
lockd: fix regression in lockd's handling of blocked locks

If a client requests a blocking lock, is denied, then requests it again,
then here in nlmsvc_lock() we will call vfs_lock_file() without FL_SLEEP
set, because we've already queued a block and don't need the locks code
to do it again.

But that means vfs_lock_file() will return -EAGAIN instead of
FILE_LOCK_DENIED.  So we still need to translate that -EAGAIN return
into a nlm_lck_blocked error in this case, and put ourselves back on
lockd's block list.

The bug was introduced by bde74e4bc64415b1 "locks: add special return
value for asynchronous locks".

Thanks to Frank van Maarseveen for the report; his original test
case was essentially

for i in `seq 30`; do flock /nfsmount/foo sleep 10 & done

Tested-by: Frank van Maarseveen <frankvm@frankvm.com>
Reported-by: Frank van Maarseveen <frankvm@frankvm.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoi915: Fix more size_t format string warnings
Linus Torvalds [Mon, 9 Feb 2009 16:57:29 +0000 (08:57 -0800)]
i915: Fix more size_t format string warnings

The DRI people seem to have a hard time getting these right (see also
commit aeb565dfc3ac4c8b47c5049085b4c7bfb2c7d5d7).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 9 Feb 2009 16:52:28 +0000 (08:52 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: select framebuffer support automatically
  drm/i915: add get_vblank_counter function for GM45
  drm/i915: capture last_vblank count at IRQ uninstall time too
  drm/i915: Unlock mutex on i915_gem_fault() error path
  drm/i915: Quiet the message on get/setparam ioctl with an unknown value.
  drm/i915: skip LVDS initialization on Apple Mac Mini
  drm/i915: sync SDVO code with stable userland modesetting driver
  drm/i915: Unref the object after failing to set tiling mode.
  drm/i915: add fence register management to execbuf
  drm/i915: Return error from i915_gem_object_get_fence_reg() when failing.
  drm/i915: Set up an MTRR covering the GTT at driver load.
  drm/i915: Skip SDVO/HDMI init when the chipset tells us it's not present.
  drm/i915: Suppress GEM teardown on X Server exit in KMS mode.
  drm/radeon: fix ioremap conflict with AGP mappings
  i915: fix unneeded locking in i915 LVDS get modes code.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 9 Feb 2009 16:52:02 +0000 (08:52 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: scatterwalk - Avoid flush_dcache_page on slab pages
  crypto: shash - Fix tfm destruction
  crypto: api - Fix zeroing on free
  crypto: shash - Fix module refcount
  crypto: api - Fix algorithm test race that broke aead initialisation

15 years agoFRV: in_interrupt() requires #inclusion of linux/hardirq.h not asm/hardirq.h now
David Howells [Mon, 9 Feb 2009 16:47:36 +0000 (16:47 +0000)]
FRV: in_interrupt() requires #inclusion of linux/hardirq.h not asm/hardirq.h now

in_interrupt() requires #inclusion of linux/hardirq.h not asm/hardirq.h now.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agox86: spinlocks: define dummy __raw_spin_is_contended
Kyle McMartin [Sun, 8 Feb 2009 22:39:58 +0000 (17:39 -0500)]
x86: spinlocks: define dummy __raw_spin_is_contended

Architectures other than mips and x86 are not using ticket spinlocks.
Therefore, the contention on the lock is meaningless, since there is
nobody known to be waiting on it (arguably /fairly/ unfair locks).

Dummy it out to return 0 on other architectures.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge commit 'v2.6.29-rc4' into core/percpu
Ingo Molnar [Mon, 9 Feb 2009 13:58:11 +0000 (14:58 +0100)]
Merge commit 'v2.6.29-rc4' into core/percpu

Conflicts:
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/fault.c

15 years agox86: math_emu info cleanup
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
x86: math_emu info cleanup

Impact: cleanup

* Come on, struct info?  s/struct info/struct math_emu_info/

* Use struct pt_regs and kernel_vm86_regs instead of defining its own
  register frame structure.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: include correct %gs in a.out core dump
Tejun Heo [Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)]
x86: include correct %gs in a.out core dump

Impact: dump the correct %gs into a.out core dump

aout_dump_thread() read %gs but didn't include it in core dump.  Fix
it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, es7000: fix ACPI table mappings
Yinghai Lu [Sat, 7 Feb 2009 23:39:41 +0000 (15:39 -0800)]
x86, es7000: fix ACPI table mappings

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoacpi/x86: introduce __apci_map_table, v4
Yinghai Lu [Sat, 7 Feb 2009 23:39:41 +0000 (15:39 -0800)]
acpi/x86: introduce __apci_map_table, v4

to prevent wrongly overwriting fixmap that still want to use.

ACPI used to rely on low mappings being all linearly mapped and
grew a habit: it never really unmapped certain kinds of tables
after use.

This can cause problems - for example the hypothetical case
when some spurious access still references it.

v2: remove prev_map and prev_size in __apci_map_table
v3: let acpi_os_unmap_memory() call early_iounmap too, so remove extral calling to
early_acpi_os_unmap_memory
v4: fix typo in one acpi_get_table_with_size calling

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoacpi: remove final __acpi_map_table mapping before setting acpi_gbl_permanent_mmap
Jeremy Fitzhardinge [Sat, 7 Feb 2009 23:39:40 +0000 (15:39 -0800)]
acpi: remove final __acpi_map_table mapping before setting acpi_gbl_permanent_mmap

On x86, __acpi_map_table uses early_ioremap() to create the mapping,
replacing the previous mapping with a new one.  Once enough of the
kernel is up an running it switches to using normal ioremap().  At
that point, we need to clean up the final mapping to avoid a warning
from the early_ioremap subsystem.

This can be removed after all the instances in the ACPI code are fixed
that rely on early-ioremap's implicit overmapping of previously
mapped tables.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: always explicitly map acpi memory
Jeremy Fitzhardinge [Sat, 7 Feb 2009 23:39:38 +0000 (15:39 -0800)]
x86: always explicitly map acpi memory

Always map acpi tables, rather than assuming we can use the normal
linear mapping to access the acpi tables.  This is necessary in a
virtual environment where the linear mappings are to pseudo-physical
memory, but the acpi tables exist at a real physical address.  It
doesn't hurt to map in the normal non-virtual case, so just do it
unconditionally.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use early_ioremap in __acpi_map_table
Jeremy Fitzhardinge [Sat, 7 Feb 2009 23:39:38 +0000 (15:39 -0800)]
x86: use early_ioremap in __acpi_map_table

__acpi_map_table() effectively reimplements early_ioremap().  Rather
than have that duplication, just implement it in terms of
early_ioremap().

However, unlike early_ioremap(), __acpi_map_table() just maintains a
single mapping which gets replaced each call, and has no corresponding
unmap function.  Implement this by just removing the previous mapping
each time its called.  Unfortunately, this will leave a stray mapping
at the end.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, vmi: put a missing paravirt_release_pmd in pgd_dtor
Alok Kataria [Fri, 6 Feb 2009 18:29:35 +0000 (10:29 -0800)]
x86, vmi: put a missing paravirt_release_pmd in pgd_dtor

Commit 6194ba6ff6ccf8d5c54c857600843c67aa82c407 ("x86: don't special-case
pmd allocations as much") made changes to the way we handle pmd allocations,
and while doing that it dropped a call to  paravirt_release_pd on the
pgd page from the pgd_dtor code path.

As a result of this missing release, the hypervisor is now unaware of the
pgd page being freed, and as a result it ends up tracking this page as a
page table page.

After this the guest may start using the same page for other purposes, and
depending on what use the page is put to, it may result in various performance
and/or functional issues ( hangs, reboots).

Since this release is only required for VMI, I now release the pgd page from
the (vmi)_pgd_free hook.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
15 years agox86: find nr_irqs_gsi with mp_ioapic_routing
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: find nr_irqs_gsi with mp_ioapic_routing

Impact: find right nr_irqs_gsi on some systems.

One test-system has gap between gsi's:

[    0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 4, version 0, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: IOAPIC (id[0x05] address[0xfeafd000] gsi_base[48])
[    0.000000] IOAPIC[1]: apic_id 5, version 0, address 0xfeafd000, GSI 48-54
[    0.000000] ACPI: IOAPIC (id[0x06] address[0xfeafc000] gsi_base[56])
[    0.000000] IOAPIC[2]: apic_id 6, version 0, address 0xfeafc000, GSI 56-62
...
[    0.000000] nr_irqs_gsi: 38

So nr_irqs_gsi is not right. some irq for MSI will overwrite with io_apic.

need to get that with acpi_probe_gsi when acpi io_apic is used

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: explicitly initialise the cpu field of irq_info
Ian Campbell [Sat, 7 Feb 2009 00:55:58 +0000 (16:55 -0800)]
xen: explicitly initialise the cpu field of irq_info

I was seeing a very odd crash on 64 bit in bind_evtchn_to_cpu because
cpu_from_irq(irq) was coming out as -1. I found this was coming direct
from the mk_ipi_info call.

It's not clear to me that this isn't a compiler bug (implicit
initialisation to zero of unsigned shorts in a struct not handled
correctly?).

On the other hand is it true that all event channels start of bound to
CPU 0? If not then -1 might be correct and the various other functions
should cope with this.

Signed-off-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: make sure that softirqs get handled at the end of event processing
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:46 +0000 (14:09 -0800)]
xen: make sure that softirqs get handled at the end of event processing

Make sure that irq_enter()/irq_exit() wrap the entire event processing
loop, rather than each individual event invokation.  This makes sure
that softirq processing is deferred until the end of event processing,
rather than in the middle with interrupts disabled.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: remove irq bindcount
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:45 +0000 (14:09 -0800)]
xen: remove irq bindcount

There should be no need for us to maintain our own bind count for
irqs, since the surrounding irq system should keep track of shared
irqs for us.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: pack all irq-related info together
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:44 +0000 (14:09 -0800)]
xen: pack all irq-related info together

Put all irq info into one struct.  Also, use a union to keep
event channel type-specific information, rather than overloading the
index field.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: use our own eventchannel->irq path
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:43 +0000 (14:09 -0800)]
xen: use our own eventchannel->irq path

Rather than overloading vectors for event channels, take full
responsibility for mapping an event channel to irq directly.  With
this patch Xen has its own irq allocator.

When the kernel gets an event channel upcall, it maps the event
channel number to an irq and injects it into the normal interrupt
path.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86/paravirt' into x86/apic
Ingo Molnar [Mon, 9 Feb 2009 11:16:59 +0000 (12:16 +0100)]
Merge branch 'x86/paravirt' into x86/apic

Conflicts:
arch/x86/mach-voyager/voyager_smp.c

15 years agoxen: set irq_chip disable
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:42 +0000 (14:09 -0800)]
xen: set irq_chip disable

By default, the irq_chip.disable operation is a no-op.  Explicitly set
it to disable the Xen event channel.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: unify do_IRQ()
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:41 +0000 (14:09 -0800)]
x86: unify do_IRQ()

With the differences in interrupt handling hoisted into handle_irq(),
do_IRQ is more or less identical between 32 and 64 bit, so unify it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add handle_irq() to allow interrupt injection
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:40 +0000 (14:09 -0800)]
x86: add handle_irq() to allow interrupt injection

Xen uses a different interrupt path, so introduce handle_irq() to
allow interrupts to be inserted into the normal interrupt path.  This
is handled slightly differently on 32 and 64-bit.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, pgtable.h: fix 2-level 32-bit build
Ingo Molnar [Mon, 9 Feb 2009 10:57:45 +0000 (11:57 +0100)]
x86, pgtable.h: fix 2-level 32-bit build

- pmd_flags() needs to be available on 2-levels too
- provide pud_large() wrapper as well
- include page.h - it provides basic types relied on by pgtable.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, pgtable.h: macro-ify *_page() methods
Ingo Molnar [Mon, 9 Feb 2009 10:42:57 +0000 (11:42 +0100)]
x86, pgtable.h: macro-ify *_page() methods

The p?d_page() methods still rely on highlevel types and methods:

In file included from arch/x86/kernel/early_printk.c:18:
/home/mingo/tip/arch/x86/include/asm/pgtable.h: In function ‘pmd_page’:
/home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: implicit declaration of function â\80\98__pfn_to_sectionâ\80\99
/home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: initialization makes pointer from integer without a cast
/home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: implicit declaration of function ‘__section_mem_map_addr’
/home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: return makes pointer from integer without a cast

So convert them to macros and document the type dependency.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: early_printk.c - fix pgtable.h unification fallout
Ingo Molnar [Mon, 9 Feb 2009 10:32:17 +0000 (11:32 +0100)]
x86: early_printk.c - fix pgtable.h unification fallout

 arch/x86/kernel/early_printk.c: In function ‘early_dbgp_init’:
 arch/x86/kernel/early_printk.c:827: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function)
 arch/x86/kernel/early_printk.c:827: error: (Each undeclared identifier is reported only once
 arch/x86/kernel/early_printk.c:827: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'jsgf/x86/unify' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy...
Ingo Molnar [Mon, 9 Feb 2009 10:19:29 +0000 (11:19 +0100)]
Merge branch 'jsgf/x86/unify' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/headers

15 years agox86: add clflush before monitor for Intel 7400 series
Pallipadi, Venkatesh [Sat, 7 Feb 2009 00:52:05 +0000 (16:52 -0800)]
x86: add clflush before monitor for Intel 7400 series

For Intel 7400 series CPUs, the recommendation is to use a clflush on the
monitored address just before monitor and mwait pair [1].

This clflush makes sure that there are no false wakeups from mwait when the
monitored address was recently written to.

[1] "MONITOR/MWAIT Recommendations for Intel Xeon Processor 7400 series"
    section in specification update document of 7400 series
    http://download.intel.com/design/xeon/specupdt/32033601.pdf

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Mon, 9 Feb 2009 09:43:47 +0000 (09:43 +0000)]
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6

15 years agox86: fix abuse of per_cpu_offset
Brian Gerst [Sun, 8 Feb 2009 14:58:40 +0000 (09:58 -0500)]
x86: fix abuse of per_cpu_offset

Impact: bug fix

Don't use per_cpu_offset() to determine if it valid to access a
per-cpu variable for a given cpu number.  It is not a valid assumption
on x86-64 anymore. Use cpu_possible() instead.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use linker to offset symbols by __per_cpu_load
Brian Gerst [Sun, 8 Feb 2009 14:58:39 +0000 (09:58 -0500)]
x86: use linker to offset symbols by __per_cpu_load

Impact: cleanup and bug fix

Use the linker to create symbols for certain per-cpu variables
that are offset by __per_cpu_load.  This allows the removal of
the runtime fixup of the GDT pointer, which fixes a bug with
resume reported by Jiri Slaby.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agopercpu: make PER_CPU_BASE_SECTION overridable by arches
Brian Gerst [Sun, 8 Feb 2009 14:58:38 +0000 (09:58 -0500)]
percpu: make PER_CPU_BASE_SECTION overridable by arches

Impact: bug fix

IA-64 needs to put percpu data in the seperate section even on UP.
Fixes regression caused by "percpu: refactor percpu.h"

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: don't pretend that non-framepointer stack traces are reliable
Arjan van de Ven [Sat, 7 Feb 2009 20:23:37 +0000 (12:23 -0800)]
x86: don't pretend that non-framepointer stack traces are reliable

Without frame pointers enabled, the x86 stack traces should not
pretend to be reliable; instead they should just be what they are:
unreliable.

The effect of this is that they have a '?' printed in the stacktrace,
to warn the reader that these entries are guesses rather than known
based on more reliable information.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: find nr_irqs_gsi with mp_ioapic_routing
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: find nr_irqs_gsi with mp_ioapic_routing

Impact: find right nr_irqs_gsi on some systems.

One test-system has gap between gsi's:

[    0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 4, version 0, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: IOAPIC (id[0x05] address[0xfeafd000] gsi_base[48])
[    0.000000] IOAPIC[1]: apic_id 5, version 0, address 0xfeafd000, GSI 48-54
[    0.000000] ACPI: IOAPIC (id[0x06] address[0xfeafc000] gsi_base[56])
[    0.000000] IOAPIC[2]: apic_id 6, version 0, address 0xfeafc000, GSI 56-62
...
[    0.000000] nr_irqs_gsi: 38

So nr_irqs_gsi is not right. some irq for MSI will overwrite with io_apic.

need to get that with acpi_probe_gsi when acpi io_apic is used

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: check_timer cleanup
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: check_timer cleanup

Impact: make check-timer more robust potentially solve boot fragility

For edge trigger io-apic routing, we already unmasked the pin via
setup_IO_APIC_irq(), so don't unmask it again.

Also call local_irq_disable() between timer_irq_works(), because it
calls local_irq_enable() inside.

Also remove not needed apic version reading for 64-bit

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use NR_IRQS_LEGACY to replace 16
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: use NR_IRQS_LEGACY to replace 16

Impact: cleanup

also could kill platform_legacy_irq

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86/irq: optimize nr_irqs
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86/irq: optimize nr_irqs

Impact: make nr_irqs depend more on cards used in a system

depend on nr_irq_gsi more, and have a ratio for MSI.

v2: make nr_irqs less than NR_VECTORS * nr_cpu_ids
    aka if only one cpu, we only can support nr_irqs = NR_VECTORS

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosparc64: Fix probe_kernel_{read,write}().
David S. Miller [Mon, 9 Feb 2009 06:32:31 +0000 (22:32 -0800)]
sparc64: Fix probe_kernel_{read,write}().

This is based upon a report from Chris Torek and his initial patch.
From Chris's report:

--------------------
This came up in testing kgdb, using the built-in tests -- turn
on CONFIG_KGDB_TESTS, then

    echo V1 > /sys/module/kgdbts/parameters/kgdbts

-- but it would affect using kgdb if you were debugging and looking
at bad pointers.
--------------------

When we get a copy_{from,to}_user() request and the %asi is set to
something other than ASI_AIUS (which is userspace) then we branch off
to a routine called memcpy_user_stub().  It just does a straight
memcpy since we are copying from kernel to kernel in this case.

The logic was that since source and destination are both kernel
pointers we don't need to have exception checks.

But for what probe_kernel_{read,write}() is trying to do, we have to
have the checks, otherwise things like kgdb bad kernel pointer
accesses don't do the right thing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Kill .fixup section bloat.
David S. Miller [Mon, 9 Feb 2009 06:00:55 +0000 (22:00 -0800)]
sparc64: Kill .fixup section bloat.

This is an implementation of a suggestion made by Chris Torek:
--------------------
Something else I noticed in passing: the EX and EX_LD/EX_ST macros
scattered throughout the various .S files make a fair bit of .fixup
code, all of which does the same thing.  At the cost of one symbol
in copy_in_user.S, you could just have one common two-instruction
retl-and-mov-1 fixup that they all share.
--------------------

The following is with a defconfig build:

   text    data     bss     dec     hex filename
3972767  344024  584449 4901240  4ac978 vmlinux.orig
3968887  344024  584449 4897360  4aba50 vmlinux

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocrypto: scatterwalk - Avoid flush_dcache_page on slab pages
Herbert Xu [Mon, 9 Feb 2009 03:22:14 +0000 (14:22 +1100)]
crypto: scatterwalk - Avoid flush_dcache_page on slab pages

It's illegal to call flush_dcache_page on slab pages on a number
of architectures.  So this patch avoids doing so if PageSlab is
true.

In future we can move the flush_dcache_page call to those page
cache users that actually need it.

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agonetxen: fix msi-x interrupt handling
Dhananjay Phadke [Mon, 9 Feb 2009 03:20:19 +0000 (19:20 -0800)]
netxen: fix msi-x interrupt handling

o Cut down msi-x vectors from 8 to 1 since only one is used for now.
o Use separate handler for msi-x, that doesn't unnecessarily scrub
  msi status register.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agode2104x: force correct order when writing to rx ring
Risto Suominen [Mon, 9 Feb 2009 01:50:34 +0000 (17:50 -0800)]
de2104x: force correct order when writing to rx ring

DescOwn should not be set, thus allowing the chip to use the
descriptor, before everything else is set up correctly.

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: Fix unicast filter overflow
Alex Williamson [Mon, 9 Feb 2009 01:49:17 +0000 (17:49 -0800)]
tun: Fix unicast filter overflow

Tap devices can make use of a small MAC filter set via the
TUNSETTXFILTER ioctl.  The filter has a set of exact matches
plus a hash for imperfect filtering of additional multicast
addresses.  The current code is unbalanced, adding unicast
addresses to the multicast hash, but only checking the hash
against multicast addresses.  This results in the filter
dropping unicast addresses that overflow the exact filter.
The fix is simply to disable the filter by leaving count set
to zero if we find non-multicast addresses after the exact
match table is filled.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/isdn: introduce missing kfree
Julia Lawall [Mon, 9 Feb 2009 01:00:49 +0000 (17:00 -0800)]
drivers/isdn: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/atm: introduce missing kfree
Julia Lawall [Mon, 9 Feb 2009 01:00:02 +0000 (17:00 -0800)]
drivers/atm: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomm: fix error case in mlock downgrade reversion
Hugh Dickins [Sun, 8 Feb 2009 20:56:58 +0000 (20:56 +0000)]
mm: fix error case in mlock downgrade reversion

Commit 27421e211a39784694b597dbf35848b88363c248, Manually revert
"mlock: downgrade mmap sem while populating mlocked regions", has
introduced its own regression: __mlock_vma_pages_range() may report
an error (for example, -EFAULT from trying to lock down pages from
beyond EOF), but mlock_vma_pages_range() must hide that from its
callers as before.

Reported-by: Sami Farin <safari-kernel@safari.iki.fi>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoLinux 2.6.29-rc4
Linus Torvalds [Sun, 8 Feb 2009 20:37:20 +0000 (12:37 -0800)]
Linux 2.6.29-rc4