]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
13 years agoparisc: fix dino/gsc interrupts
James Bottomley [Thu, 2 Dec 2010 23:36:47 +0000 (23:36 +0000)]
parisc: fix dino/gsc interrupts

The essential problem we're currently having is that dino (and gsc) is a
cascaded CPU interrupt.  Under the old __do_IRQ() handler, our CPU
interrupts basically did an ack followed by an end.  In the new scheme,
we replaced them with level handlers which do a mask, an ack and then an
unmask (but no end).  Instead, with the renaming of end to eoi, we
actually want to call the percpu flow handlers, because they actually
have all the characteristics we want.

This patch does the conversion and gets my C360 booting again.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
13 years agoARM: 6523/1: iop: ensure sched_clock() is notrace
Rabin Vincent [Sat, 4 Dec 2010 05:20:52 +0000 (06:20 +0100)]
ARM: 6523/1: iop: ensure sched_clock() is notrace

Include sched.h to ensure sched_clock() has the notrace
annotation, and mark any functions it calls as notrace
too.
Include sched.h to ensure sched_clock() has the notrace
annotation, and mark any functions it calls as notrace
too.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.
Marcelo Roberto Jimenez [Mon, 18 Oct 2010 21:38:08 +0000 (22:38 +0100)]
ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.

This patch fixes a compilation issue when compiling PCMCIA SA1100
support as a module with PCMCIA_DEBUG enabled. The symbol
soc_pcmcia_debug was not beeing exported.
ARM: pcmcia: Fix for building DEBUG with sa11xx_base.c as a module.

This patch fixes a compilation issue when compiling PCMCIA SA1100
support as a module with PCMCIA_DEBUG enabled. The symbol
soc_pcmcia_debug was not beeing exported.

Cc: <stable@kernel.org>
Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers
Dave Martin [Wed, 1 Dec 2010 17:12:43 +0000 (18:12 +0100)]
ARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers

The existing code invokes the syscall with rubbish in r7,
due to what looks like an incorrect literal load idiom.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoslub: Fix a crash during slabinfo -v
Tero Roponen [Wed, 1 Dec 2010 18:04:20 +0000 (20:04 +0200)]
slub: Fix a crash during slabinfo -v

Commit f7cb1933621bce66a77f690776a16fe3ebbc4d58 ("SLUB: Pass active
and inactive redzone flags instead of boolean to debug functions")
missed two instances of check_object(). This caused a lot of warnings
during 'slabinfo -v' finally leading to a crash:

  BUG ext4_xattr: Freepointer corrupt
  ...
  BUG buffer_head: Freepointer corrupt
  ...
  BUG ext4_alloc_context: Freepointer corrupt
  ...
  ...
  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  IP: [<ffffffff810a291f>] file_sb_list_del+0x1c/0x35
  PGD 79d78067 PUD 79e67067 PMD 0
  Oops: 0002 [#1] SMP
  last sysfs file: /sys/kernel/slab/:t-0000192/validate

This patch fixes the problem by converting the two missed instances.

Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tero Roponen <tero.roponen@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agostaging: brcm80211: added firmware validation
Roland Vossen [Wed, 1 Dec 2010 20:38:31 +0000 (21:38 +0100)]
staging: brcm80211: added firmware validation

Fix for https://bugzilla.kernel.org/show_bug.cgi?id=21872

New function wl_check_firmwares() checks validity of all firmware images
loaded from user space.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/vme_user: add missing calls to vme_master_free calls in .remove
Emilio G. Cota [Fri, 3 Dec 2010 14:20:51 +0000 (14:20 +0000)]
staging/vme_user: add missing calls to vme_master_free calls in .remove

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/vme/vme_user: use __dev{init, exit} for .probe and .remove
Emilio G. Cota [Fri, 3 Dec 2010 13:44:15 +0000 (13:44 +0000)]
staging/vme/vme_user: use __dev{init, exit} for .probe and .remove

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: Fixed checkpatch line length warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/vme_user: fix usage of the slave resources after they've been freed
Emilio G. Cota [Fri, 3 Dec 2010 09:05:08 +0000 (09:05 +0000)]
staging/vme_user: fix usage of the slave resources after they've been freed

buf_unalloc() frees the memory buffers allocated with vme_alloc_consistent.
The associated VME resource is needed in both vme_alloc_consistent and
vme_free_consistent; however the slave VME resources are being freed before
the calls to vme_free_consistent are made, which means the buffers
are never returned.

Fix this by freeing the VME resources only after the consistent buffers have
been returned.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch '2.6.37-rc4-pvhvm-fixes' of git://xenbits.xen.org/people/sstabellini...
Linus Torvalds [Fri, 3 Dec 2010 19:30:57 +0000 (11:30 -0800)]
Merge branch '2.6.37-rc4-pvhvm-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm

* '2.6.37-rc4-pvhvm-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
  xen: unplug the emulated devices at resume time
  xen: fix save/restore for PV on HVM guests with pirq remapping
  xen: resume the pv console for hvm guests too
  xen: fix MSI setup and teardown for PV on HVM guests
  xen: use PHYSDEVOP_get_free_pirq to implement find_unbound_pirq

13 years agoMerge branches 'upstream/core' and 'upstream/bugfix' of git://git.kernel.org/pub...
Linus Torvalds [Fri, 3 Dec 2010 18:08:52 +0000 (10:08 -0800)]
Merge branches 'upstream/core' and 'upstream/bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: allocate irq descs on any NUMA node
  xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory
  xen: use default_idle
  xen: clean up "extra" memory handling some more

* 'upstream/bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: x86/32: perform initial startup on initial_page_table
  xen: don't bother to stop other cpus on shutdown/reboot

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 3 Dec 2010 17:20:41 +0000 (09:20 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency
  ALSA: hda: Use "alienware" model quirk for another SSID
  ASoC: WM8731: Fix incorrect mask for bypass path disable
  s6105-ipcam: fix compilation
  s6000-pcm: fix compilation
  s6000-i2s: fix compilation
  ASoC: Fix missing spin_unlock_irqrestore
  ALSA: Fix SNDCTL_DSP_RESET ioctl for OSS emulation
  ASoC: Add missing dev_set_drvdata in p1022_ds_probe
  ASoC: Add missing dev_set_drvdata in mpc8610_hpcd_probe
  ASoC: Remove unneeded !! operations while checking return value of nuc900_checkready
  ASoC: Fix compile error for nuc900-pcm.c
  ASoC: Fix prototype for nuc900_ac97_probe and nuc900_ac97_remove
  ASoC: Fix compile error for nuc900-ac97.c
  ALSA: hda: Use BIOS auto-parsing instead of existing model quirk for MEDION MD2

13 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Fri, 3 Dec 2010 17:20:21 +0000 (09:20 -0800)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: fix corrupted PEB detection for NOR flash

13 years agoMerge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 3 Dec 2010 17:19:54 +0000 (09:19 -0800)]
Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: se/7724: Remove FSI/B of GPIO init code
  sh: se/7724: Update clock framework of FSI clock to non-legacy
  sh: Assume new page cache pages have dirty dcache lines.
  sh: boards: mach-se: use IS_ERR() instead of NULL check
  sh: Add div6_reparent_clks to clock framework for FSI
  dma: shdma: add a MODULE_ALIAS() to allow module autoloading

13 years agoMerge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Dec 2010 17:19:31 +0000 (09:19 -0800)]
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6

* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  lxfb: Maintain video processor palette through suspend/resume
  video: da8xx: Register IRQ as last thing in driver probing.
  framebuffer: fix fbcmap.c kernel-doc warning

13 years agoMN10300: Implement asm/syscall.h
David Howells [Fri, 3 Dec 2010 15:59:50 +0000 (15:59 +0000)]
MN10300: Implement asm/syscall.h

Implement asm/syscall.h for the MN10300 arch.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoUBI: fix corrupted PEB detection for NOR flash
Artem Bityutskiy [Thu, 2 Dec 2010 04:34:01 +0000 (06:34 +0200)]
UBI: fix corrupted PEB detection for NOR flash

My new shiny code for corrupted PEB detection has NOR specific bug.
We tread PEB as corrupted and preserve it, if

1. EC header is OK.
2. VID header is corrupted.
3. data area is not "all 0xFFs"

In case of NOR we have 'nor_erase_prepare()' quirk, which invalidates
the headers before erasing the PEB. And we invalidate first the VID
header, and then the EC header. So if a power cut happens after we have
invalidated the VID header, but before we have invalidated the EC
header, we end up with a PEB which satisfies the above 3 conditions,
and the scanning code will treat it as corrupted, and will print
scary warnings, wrongly.

This patch fixes the issue by firt invalidating the EC header, then
invalidating the VID header. In case of power cut inbetween, we still
just lose the EC header, and UBI can deal with this situation gracefully.

Thanks to Anatolij Gustschin <agust@denx.de> for tracking this down.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reported-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
13 years agoMerge branch 'sh/urgent' into sh-fixes-for-linus
Paul Mundt [Fri, 3 Dec 2010 05:42:29 +0000 (14:42 +0900)]
Merge branch 'sh/urgent' into sh-fixes-for-linus

13 years agosh: se/7724: Remove FSI/B of GPIO init code
Nobuhiro Iwamatsu [Fri, 3 Dec 2010 05:37:54 +0000 (05:37 +0000)]
sh: se/7724: Remove FSI/B of GPIO init code

se7724 board does not have FSI/B.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: se/7724: Update clock framework of FSI clock to non-legacy
Nobuhiro Iwamatsu [Fri, 3 Dec 2010 05:37:53 +0000 (05:37 +0000)]
sh: se/7724: Update clock framework of FSI clock to non-legacy

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Fri, 3 Dec 2010 01:40:04 +0000 (17:40 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: length resolution should be reported units/mm
  HID: add support for F430 Force Feedback Wheel
  HID: egalax: Use kzalloc
  HID: Remove KERN_DEBUG from dbg_hid use

Manually fixed trivial conflict in drivers/hid/hid-input.c (due to
removal of KERN_DEBUG from dbg_hid use clashing with new keycode
interface switch)

13 years agoxen: allocate irq descs on any NUMA node
Jeremy Fitzhardinge [Fri, 3 Dec 2010 00:14:27 +0000 (16:14 -0800)]
xen: allocate irq descs on any NUMA node

Allocate irq descs on any NUMA node (we don't care) rather than
specifically node 0, which may not exist.

(At the moment NUMA is meaningless within a domain, so any info
the kernel has is just from an SRAT table we haven't suppressed/disabled.)

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory
Jeremy Fitzhardinge [Thu, 2 Dec 2010 23:30:06 +0000 (15:30 -0800)]
xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory

If this is a non-HIGHMEM 32-bit kernel, then the page structures only go
up to the limit of addressable memory, even if more memory is physically
present.  Don't try to add that extra memory to the balloon.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agodo_exit(): make sure that we run with get_fs() == USER_DS
Nelson Elhage [Thu, 2 Dec 2010 22:31:21 +0000 (14:31 -0800)]
do_exit(): make sure that we run with get_fs() == USER_DS

If a user manages to trigger an oops with fs set to KERNEL_DS, fs is not
otherwise reset before do_exit().  do_exit may later (via mm_release in
fork.c) do a put_user to a user-controlled address, potentially allowing
a user to leverage an oops into a controlled write into kernel memory.

This is only triggerable in the presence of another bug, but this
potentially turns a lot of DoS bugs into privilege escalations, so it's
worth fixing.  I have proof-of-concept code which uses this bug along
with CVE-2010-3849 to write a zero to an arbitrary kernel address, so
I've tested that this is not theoretical.

A more logical place to put this fix might be when we know an oops has
occurred, before we call do_exit(), but that would involve changing
every architecture, in multiple places.

Let's just stick it in do_exit instead.

[akpm@linux-foundation.org: update code comment]
Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoksm: annotate ksm_thread_mutex is no deadlock source
KOSAKI Motohiro [Thu, 2 Dec 2010 22:31:20 +0000 (14:31 -0800)]
ksm: annotate ksm_thread_mutex is no deadlock source

commit 62b61f611e ("ksm: memory hotremove migration only") caused the
following new lockdep warning.

  =======================================================
  [ INFO: possible circular locking dependency detected ]
  -------------------------------------------------------
  bash/1621 is trying to acquire lock:
   ((memory_chain).rwsem){.+.+.+}, at: [<ffffffff81079339>]
  __blocking_notifier_call_chain+0x69/0xc0

  but task is already holding lock:
   (ksm_thread_mutex){+.+.+.}, at: [<ffffffff8113a3aa>]
  ksm_memory_callback+0x3a/0xc0

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #1 (ksm_thread_mutex){+.+.+.}:
       [<ffffffff8108b70a>] lock_acquire+0xaa/0x140
       [<ffffffff81505d74>] __mutex_lock_common+0x44/0x3f0
       [<ffffffff81506228>] mutex_lock_nested+0x48/0x60
       [<ffffffff8113a3aa>] ksm_memory_callback+0x3a/0xc0
       [<ffffffff8150c21c>] notifier_call_chain+0x8c/0xe0
       [<ffffffff8107934e>] __blocking_notifier_call_chain+0x7e/0xc0
       [<ffffffff810793a6>] blocking_notifier_call_chain+0x16/0x20
       [<ffffffff813afbfb>] memory_notify+0x1b/0x20
       [<ffffffff81141b7c>] remove_memory+0x1cc/0x5f0
       [<ffffffff813af53d>] memory_block_change_state+0xfd/0x1a0
       [<ffffffff813afd62>] store_mem_state+0xe2/0xf0
       [<ffffffff813a0bb0>] sysdev_store+0x20/0x30
       [<ffffffff811bc116>] sysfs_write_file+0xe6/0x170
       [<ffffffff8114f398>] vfs_write+0xc8/0x190
       [<ffffffff8114fc14>] sys_write+0x54/0x90
       [<ffffffff810028b2>] system_call_fastpath+0x16/0x1b

  -> #0 ((memory_chain).rwsem){.+.+.+}:
       [<ffffffff8108b5ba>] __lock_acquire+0x155a/0x1600
       [<ffffffff8108b70a>] lock_acquire+0xaa/0x140
       [<ffffffff81506601>] down_read+0x51/0xa0
       [<ffffffff81079339>] __blocking_notifier_call_chain+0x69/0xc0
       [<ffffffff810793a6>] blocking_notifier_call_chain+0x16/0x20
       [<ffffffff813afbfb>] memory_notify+0x1b/0x20
       [<ffffffff81141f1e>] remove_memory+0x56e/0x5f0
       [<ffffffff813af53d>] memory_block_change_state+0xfd/0x1a0
       [<ffffffff813afd62>] store_mem_state+0xe2/0xf0
       [<ffffffff813a0bb0>] sysdev_store+0x20/0x30
       [<ffffffff811bc116>] sysfs_write_file+0xe6/0x170
       [<ffffffff8114f398>] vfs_write+0xc8/0x190
       [<ffffffff8114fc14>] sys_write+0x54/0x90
       [<ffffffff810028b2>] system_call_fastpath+0x16/0x1b

But it's a false positive.  Both memory_chain.rwsem and ksm_thread_mutex
have an outer lock (mem_hotplug_mutex).  So they cannot deadlock.

Thus, This patch annotate ksm_thread_mutex is not deadlock source.

[akpm@linux-foundation.org: update comment, from Hugh]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomem-hotplug: introduce {un}lock_memory_hotplug()
KOSAKI Motohiro [Thu, 2 Dec 2010 22:31:19 +0000 (14:31 -0800)]
mem-hotplug: introduce {un}lock_memory_hotplug()

Presently hwpoison is using lock_system_sleep() to prevent a race with
memory hotplug.  However lock_system_sleep() is a no-op if
CONFIG_HIBERNATION=n.  Therefore we need a new lock.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Suggested-by: Hugh Dickins <hughd@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/filesystems/vfs.txt: fix ->repeasepage() description
Andrew Morton [Thu, 2 Dec 2010 22:31:19 +0000 (14:31 -0800)]
Documentation/filesystems/vfs.txt: fix ->repeasepage() description

->releasepage() does not remove the page from the mapping.

Acked-by: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agovmalloc: eagerly clear ptes on vunmap
Jeremy Fitzhardinge [Thu, 2 Dec 2010 22:31:18 +0000 (14:31 -0800)]
vmalloc: eagerly clear ptes on vunmap

On stock 2.6.37-rc4, running:

  # mount lilith:/export /mnt/lilith
  # find  /mnt/lilith/ -type f -print0 | xargs -0 file

crashes the machine fairly quickly under Xen.  Often it results in oops
messages, but the couple of times I tried just now, it just hung quietly
and made Xen print some rude messages:

    (XEN) mm.c:2389:d80 Bad type (saw 7400000000000001 != exp
    3000000000000000) for mfn 1d7058 (pfn 18fa7)
    (XEN) mm.c:964:d80 Attempt to create linear p.t. with write perms
    (XEN) mm.c:2389:d80 Bad type (saw 7400000000000010 != exp
    1000000000000000) for mfn 1d2e04 (pfn 1d1fb)
    (XEN) mm.c:2965:d80 Error while pinning mfn 1d2e04

Which means the domain tried to map a pagetable page RW, which would
allow it to map arbitrary memory, so Xen stopped it.  This is because
vm_unmap_ram() left some pages mapped in the vmalloc area after NFS had
finished with them, and those pages got recycled as pagetable pages
while still having these RW aliases.

Removing those mappings immediately removes the Xen-visible aliases, and
so it has no problem with those pages being reused as pagetable pages.
Deferring the TLB flush doesn't upset Xen because it can flush the TLB
itself as needed to maintain its invariants.

When unmapping a region in the vmalloc space, clear the ptes
immediately.  There's no point in deferring this because there's no
amortization benefit.

The TLBs are left dirty, and they are flushed lazily to amortize the
cost of the IPIs.

This specific motivation for this patch is an oops-causing regression
since 2.6.36 when using NFS under Xen, triggered by the NFS client's use
of vm_map_ram() introduced in 56e4ebf877b60 ("NFS: readdir with vmapped
pages") .  XFS also uses vm_map_ram() and could cause similar problems.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Bryan Schumaker <bjschuma@netapp.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Alex Elder <aelder@sgi.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocs5535-gpio: apply CS5536 errata workaround for GPIOs
Andres Salomon [Thu, 2 Dec 2010 22:31:17 +0000 (14:31 -0800)]
cs5535-gpio: apply CS5536 errata workaround for GPIOs

The AMD Geode CS5536 Companion Device Silicon Revision B1 Specification
Update mentions the follow as issue #36:

 "Atomic write transactions to the atomic GPIO High Bank Feature Bit
  registers should only affect the bits selected [...]"

 "after Suspend, an atomic write transaction [...] will clear all
  non-selected bits of the accessed register."

In other words, writing to the high bank for a single GPIO bit will
clear every other GPIO bit (but only sometimes after a suspend).

The workaround described is obvious and simple; do a read-modify-write.
This patch does that, and documents why we're doing it.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoreiserfs: don't acquire lock recursively in reiserfs_acl_chmod
Frederic Weisbecker [Thu, 2 Dec 2010 22:31:16 +0000 (14:31 -0800)]
reiserfs: don't acquire lock recursively in reiserfs_acl_chmod

reiserfs_acl_chmod() can be called by reiserfs_set_attr() and then take
the reiserfs lock a second time.  Thereafter it may call journal_begin()
that definitely requires the lock not to be nested in order to release
it before taking the journal mutex because the reiserfs lock depends on
the journal mutex already.

So, aviod nesting the lock in reiserfs_acl_chmod().

Reported-by: Pawel Zawora <pzawora@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Tested-by: Pawel Zawora <pzawora@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: <stable@kernel.org> [2.6.32.x+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: fix up dependencies
Johannes Berg [Thu, 2 Dec 2010 22:31:14 +0000 (14:31 -0800)]
leds: fix up dependencies

It's not useful to build LED triggers when there's no LEDs that can be
triggered by them.  Therefore, fix up the dependencies so that this
cannot happen, and fix a few users that select triggers to depend on
LEDS_CLASS as well (there is also one user that also selects LEDS_CLASS,
which is OK).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Arnd Hannemann <arnd@arndnet.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agovmstat: fix dirty threshold ordering
Wu Fengguang [Thu, 2 Dec 2010 22:31:13 +0000 (14:31 -0800)]
vmstat: fix dirty threshold ordering

The nr_dirty_[background_]threshold fields are misplaced before the
numa_* fields, and users will read strange values.

This is the right order.  Before patch, nr_dirty_background_threshold
will read as 0 (the value from numa_miss).

numa_hit 128501
numa_miss 0
numa_foreign 0
numa_interleave 7388
numa_local 128501
numa_other 0
nr_dirty_threshold 144291
nr_dirty_background_threshold 72145

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Michael Rubin <mrubin@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm/mempolicy.c: add rcu read lock to protect pid structure
Zeng Zhaoming [Thu, 2 Dec 2010 22:31:13 +0000 (14:31 -0800)]
mm/mempolicy.c: add rcu read lock to protect pid structure

find_task_by_vpid() should be protected by rcu_read_lock(), to prevent
free_pid() reclaiming pid.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm/hugetlb.c: avoid double unlock_page() in hugetlb_fault()
Dean Nelson [Thu, 2 Dec 2010 22:31:12 +0000 (14:31 -0800)]
mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault()

Have hugetlb_fault() call unlock_page(page) only if it had previously
called lock_page(page).

Setting CONFIG_DEBUG_VM=y and then running the libhugetlbfs test suite,
resulted in the tripping of VM_BUG_ON(!PageLocked(page)) in
unlock_page() having been called by hugetlb_fault() when page ==
pagecache_page.  This patch remedied the problem.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 2 Dec 2010 20:59:11 +0000 (12:59 -0800)]
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (27 commits)
  Staging: rt2870: Add USB ID for Buffalo Airstation WLI-UC-GN
  staging: easycap needs smp_lock.h, fixes build error
  Staging: batman-adv: ensure that eth_type_trans gets linear memory
  Staging: batman-adv: Don't remove interface with spinlock held
  staging: brcm80211: updated maintainers contact information
  staging: fix winbond build, needs delay.h
  Staging: line6: fix up my fixup for some sysfs attribute permissions
  Staging: zram: fix up my fixup for some sysfs attribute permissions
  Staging: udlfb: fix up my fixup for some sysfs attribute permissions
  Staging: samsung-laptop: fix up my fixup for some sysfs attribute permissions
  Staging: iio: adis16220: fix up my fixup for some sysfs attribute permissions
  Staging: frontier: fix up my fixup for some sysfs attribute permissions
  Staging: asus_oled: fix up my fixup for some sysfs attribute permissions
  staging: spectra: fix build error
  Staging: intel_sst: fix memory leak
  Staging: rtl8712: signedness bug in init
  staging: rtl8187se: Change panic to warn when RF switch turned off
  staging: comedi: fix memory leak
  Staging: quickstart: free after input_unregister_device()
  Staging: speakup: free after input_unregister_device()
  ...

13 years agoMerge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 2 Dec 2010 20:58:36 +0000 (12:58 -0800)]
Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  uio: Change mail address of Hans J. Koch
  driver core: prune docs about device_interface
  driver core: the development tree has switched to git

13 years agoMerge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 2 Dec 2010 20:58:16 +0000 (12:58 -0800)]
Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6

* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: mfd: adjust the baud rate setting
  TTY: open/hangup race fixup
  TTY: don't allow reopen when ldisc is changing
  NET: wan/x25, fix ldisc->open retval
  TTY: ldisc, fix open flag handling
  serial8250: Mark console as CON_ANYTIME

13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 2 Dec 2010 20:57:35 +0000 (12:57 -0800)]
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fix autosuspend bug in usb-serial
  USB: ehci: disable LPM and PPCD for nVidia MCP89 chips
  USB: serial: ftdi_sio: Vardaan USB RS422/485 converter PID added
  USB: yurex: add .llseek fop to file_operations
  USB: ftdi_sio: Add ID for RT Systems USB-29B radio cable
  usb: musb: do not use dma for control transfers
  usb: musb: gadget: fix compilation warning
  usb: musb: clear RXCSR_AUTOCLEAR before PIO read
  usb: musb: unmap dma buffer when switching to PIO
  xhci: Don't let the USB core disable SuperSpeed ports.
  xhci: Setup array of USB 2.0 and USB 3.0 ports.
  xhci: Fix reset-device and configure-endpoint commands

13 years agostaging: adis16255 delete driver
Matthias Brugger [Thu, 2 Dec 2010 13:13:04 +0000 (14:13 +0100)]
staging: adis16255 delete driver

This patch deletes the adis16255 driver from staging as a similar
implementation exists inside the iio subsystem.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/sep: Fix printk format warning
Peter Huewe [Wed, 1 Dec 2010 23:43:34 +0000 (00:43 +0100)]
staging/sep: Fix printk format warning

This patch fixes gcc's complaints about the wrong format string for
size_t arguments:
"format '%x' expects type 'unsigned int', but argument has type
'size_t'"

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/sep: Fix sparse warning 'Using plain integer as NULL pointer'
Peter Huewe [Wed, 1 Dec 2010 23:43:33 +0000 (00:43 +0100)]
staging/sep: Fix sparse warning 'Using plain integer as NULL pointer'

This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the offending 0s with NULL.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/sep: Fix sparse warning 'do-while statement is not a compound statement'
Peter Huewe [Wed, 1 Dec 2010 23:43:32 +0000 (00:43 +0100)]
staging/sep: Fix sparse warning 'do-while statement is not a compound statement'

This patch fixes the warning generated by sparse: 'do-while statement is
not a compound statement' by adding the necessary brackets around the do
block

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove redundant CHIPREV macro
Arend van Spriel [Thu, 2 Dec 2010 14:44:52 +0000 (15:44 +0100)]
staging: brcm80211: remove redundant CHIPREV macro

The CHIPREV macro simply expands to the macro argument so it is
redundant and as such removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove redundant CHIPID macro
Arend van Spriel [Thu, 2 Dec 2010 14:44:51 +0000 (15:44 +0100)]
staging: brcm80211: remove redundant CHIPID macro

The CHIPID macro simply expands to the macro argument so it is
redundant and as such removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove redundant CHIPTYPE macro
Arend van Spriel [Thu, 2 Dec 2010 14:44:50 +0000 (15:44 +0100)]
staging: brcm80211: remove redundant CHIPTYPE macro

The CHIPTYPE macro simply expands to the macro argument so it is
redundant and as such removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: absorb linux_osl.h into osl.h
Brett Rudley [Wed, 1 Dec 2010 23:36:39 +0000 (15:36 -0800)]
staging: brcm80211: absorb linux_osl.h into osl.h

Move code from linux_osl.h into osl.h and delete linux_osl.h, which
created a bunch of checkpatch errors...
I fixed most but volatile warnings will have to be dealt with later.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: Remove unused code from osl.h
Brett Rudley [Wed, 1 Dec 2010 23:36:38 +0000 (15:36 -0800)]
staging: brcm80211: Remove unused code from osl.h

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove vmbus_on_event_dpc()
Greg Kroah-Hartman [Thu, 2 Dec 2010 20:12:46 +0000 (12:12 -0800)]
Staging: hv: remove vmbus_on_event_dpc()

Just call VmbusOnEvents() as that's all the function did, so we can
remove it.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Thu, 2 Dec 2010 20:11:31 +0000 (12:11 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  watchdog: it8712f_wdt: add note to Kconfig
  watchdog: gef_wdt: include fs.h
  watchdog: bcm63xx_wdt: improve platform part.
  watchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg PCH

13 years agoStaging: hv: make some vmbus_drv functions static
Greg Kroah-Hartman [Thu, 2 Dec 2010 20:11:25 +0000 (12:11 -0800)]
Staging: hv: make some vmbus_drv functions static

Now that vmbus_drv.c is merged with vmbus.c, some of the newly global
functions can now be marked static.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Thu, 2 Dec 2010 20:10:56 +0000 (12:10 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB: Fix information leak in marshalling code
  IB/pack: Remove some unused code added by the IBoE patches
  IB/mlx4: Fix IBoE link state
  IB/mlx4: Fix IBoE reported link rate
  mlx4_core: Workaround firmware bug in query dev cap
  IB/mlx4: Fix memory ordering of VLAN insertion control bits
  MAINTAINERS: Update NetEffect entry

13 years agoStaging: hv: merge VmbusInitialize into vmbus_bus_init
Greg Kroah-Hartman [Thu, 2 Dec 2010 20:08:08 +0000 (12:08 -0800)]
Staging: hv: merge VmbusInitialize into vmbus_bus_init

No need to have two functions for this.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove gDriver variable
Greg Kroah-Hartman [Thu, 2 Dec 2010 20:04:59 +0000 (12:04 -0800)]
Staging: hv: remove gDriver variable

It's only set and never used anymore, so remove it.

Gotta love static variables with a "global" hungarian notatation on the
name...

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: call VmbusInitialize directly from vmbus_bus_init()
Greg Kroah-Hartman [Thu, 2 Dec 2010 20:04:00 +0000 (12:04 -0800)]
Staging: hv: call VmbusInitialize directly from vmbus_bus_init()

No need to pass a function pointer to a function in the same file.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove vmbus.c
Greg Kroah-Hartman [Thu, 2 Dec 2010 19:59:22 +0000 (11:59 -0800)]
Staging: hv: remove vmbus.c

Merge the functions into vmbus_drv.c as there's no need to have them
separate anymore.  It will also make unwinding some of the function and
pointer mess easier, as well as making functions static in the future.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: rename the vmbus to "hyperv"
Greg Kroah-Hartman [Thu, 2 Dec 2010 19:28:28 +0000 (11:28 -0800)]
Staging: hv: rename the vmbus to "hyperv"

This changes the name of the bus in sysfs from "vmbus" to "hyperv" which
is the name it should show (vmbus is way to generic).

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove struct vmbus_driver
Greg Kroah-Hartman [Thu, 2 Dec 2010 17:42:18 +0000 (09:42 -0800)]
Staging: hv: remove struct vmbus_driver

It's only a wrapper for the struct hv_driver structure, so just use that
instead, as there are no other fields left in it at the moment.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnChildDeviceAdd vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 17:16:04 +0000 (09:16 -0800)]
Staging: hv: remove OnChildDeviceAdd vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 2 Dec 2010 17:13:36 +0000 (09:13 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: only run xfs_error_test if error injection is active
  xfs: avoid moving stale inodes in the AIL
  xfs: delayed alloc blocks beyond EOF are valid after writeback
  xfs: push stale, pinned buffers on trylock failures
  xfs: fix failed write truncation handling.

13 years agoStaging: hv: remove GetChannelOffers vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:50:58 +0000 (08:50 -0800)]
Staging: hv: remove GetChannelOffers vmbus_driver callback

It's only ever set to one function, so just call that function instead.
Actually, that wrapper function only ever called vmbus_request_offers()
so just call that function instead, no need for a do-nothing
intermediate step here.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnEventDpc vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:47:11 +0000 (08:47 -0800)]
Staging: hv: remove OnEventDpc vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnMsgDpc vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:44:48 +0000 (08:44 -0800)]
Staging: hv: remove OnMsgDpc vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnIsr vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:41:05 +0000 (08:41 -0800)]
Staging: hv: remove OnIsr vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnChildDeviceRemove vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:34:45 +0000 (08:34 -0800)]
Staging: hv: remove OnChildDeviceRemove vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Thu, 2 Dec 2010 16:33:53 +0000 (17:33 +0100)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Thu, 2 Dec 2010 16:31:18 +0000 (17:31 +0100)]
Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc

13 years agoStaging: hv: remove OnChildDeviceDestroy vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:25:17 +0000 (08:25 -0800)]
Staging: hv: remove OnChildDeviceDestroy vmbus_driver callback

No one ever calls it so get rid of it, it's pointless.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove OnChildDeviceCreate vmbus_driver callback
Greg Kroah-Hartman [Thu, 2 Dec 2010 16:22:41 +0000 (08:22 -0800)]
Staging: hv: remove OnChildDeviceCreate vmbus_driver callback

It's only ever set to one function, so just call that function instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 2 Dec 2010 16:14:50 +0000 (17:14 +0100)]
Merge branch 'fix/hda' into for-linus

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Thu, 2 Dec 2010 16:06:16 +0000 (08:06 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: fix kernel-doc for set_consumer_device_supply
  regulator: enable supply regulator only when use count is zero
  regulator: twl-regulator - fix twlreg_set_mode
  regulator: lock supply in regulator enable
  regulator: Return proper error for regulator_register()
  regulator: Ensure enough delay time for enabling regulator
  regulator: Remove a redundant device_remove_file call in create_regulator
  regulator: Staticise mc13783_powermisc_rmw()
  regulator: regulator disable supply fix

13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 2 Dec 2010 16:05:56 +0000 (08:05 -0800)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] v4l: Remove module_name argument to the v4l2_i2c_new_subdev* functions
  [media] v4l: Remove hardcoded module names passed to v4l2_i2c_new_subdev* (2)

13 years agoMerge branch 'rbd-sysfs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Thu, 2 Dec 2010 16:05:22 +0000 (08:05 -0800)]
Merge branch 'rbd-sysfs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'rbd-sysfs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: replace the rbd sysfs interface

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 2 Dec 2010 16:04:21 +0000 (08:04 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: fix parsing of hostname in dfs referrals
  cifs: display fsc in /proc/mounts
  cifs: enable fscache iff fsc mount option is used explicitly
  cifs: allow fsc mount option only if CONFIG_CIFS_FSCACHE is set
  cifs: Handle extended attribute name cifs_acl to generate cifs acl blob (try #4)
  cifs: Misc. cleanup in cifsacl handling [try #4]
  cifs: trivial comment fix for cifs_invalidate_mapping
  [CIFS] fs/cifs/Kconfig: CIFS depends on CRYPTO_HMAC
  cifs: don't take extra tlink reference in initiate_cifs_search
  cifs: Percolate error up to the caller during get/set acls [try #4]
  cifs: fix another memleak, in cifs_root_iget
  cifs: fix potential use-after-free in cifs_oplock_break_put

13 years agoxen: unplug the emulated devices at resume time
Stefano Stabellini [Wed, 1 Dec 2010 14:51:44 +0000 (14:51 +0000)]
xen: unplug the emulated devices at resume time

Early after being resumed we need to unplug again the emulated devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agoxen: fix save/restore for PV on HVM guests with pirq remapping
Stefano Stabellini [Wed, 1 Dec 2010 14:51:44 +0000 (14:51 +0000)]
xen: fix save/restore for PV on HVM guests with pirq remapping

Re-map and re-bind all the pirqs at resume time.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agoxen: resume the pv console for hvm guests too
Stefano Stabellini [Wed, 1 Dec 2010 14:51:44 +0000 (14:51 +0000)]
xen: resume the pv console for hvm guests too

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agoxen: fix MSI setup and teardown for PV on HVM guests
Stefano Stabellini [Wed, 1 Dec 2010 14:51:44 +0000 (14:51 +0000)]
xen: fix MSI setup and teardown for PV on HVM guests

When remapping MSIs into pirqs for PV on HVM guests, qemu is responsible
for doing the actual mapping and unmapping.
We only give qemu the desired pirq number when we ask to do the mapping
the first time, after that we should be reading back the pirq number
from qemu every time we want to re-enable the MSI.

This fixes a bug in xen_hvm_setup_msi_irqs that manifests itself when
trying to enable the same MSI for the second time: the old MSI to pirq
mapping is still valid at this point but xen_hvm_setup_msi_irqs would
try to assign a new pirq anyway.
A simple way to reproduce this bug is to assign an MSI capable network
card to a PV on HVM guest, if the user brings down the corresponding
ethernet interface and up again, Linux would fail to enable MSIs on the
device.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agoxen: use PHYSDEVOP_get_free_pirq to implement find_unbound_pirq
Stefano Stabellini [Wed, 1 Dec 2010 14:51:44 +0000 (14:51 +0000)]
xen: use PHYSDEVOP_get_free_pirq to implement find_unbound_pirq

Use the new hypercall PHYSDEVOP_get_free_pirq to ask Xen to allocate a
pirq. Remove the unsupported PHYSDEVOP_get_nr_pirqs hypercall to get the
amount of pirq available.

This fixes find_unbound_pirq that otherwise would return a number
starting from nr_irqs that might very well be out of range in Xen.

The symptom of this bug is that when you passthrough an MSI capable pci
device to a PV on HVM guest, Linux would fail to enable MSIs on the
device.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
13 years agowatchdog: it8712f_wdt: add note to Kconfig
Wim Van Sebroeck [Thu, 2 Dec 2010 14:03:29 +0000 (14:03 +0000)]
watchdog: it8712f_wdt: add note to Kconfig

On some motherboards the it8712f watchdog does not work unless
the game port was enabled. see Bug 13140. We therefor add a note
to Kconfig.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 years agowatchdog: gef_wdt: include fs.h
Wolfram Sang & Martyn Welch [Wed, 1 Dec 2010 23:11:16 +0000 (00:11 +0100)]
watchdog: gef_wdt: include fs.h

Add missing include "linux/fs.h".
This fixes compile failure.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 years agowatchdog: bcm63xx_wdt: improve platform part.
Wim Van Sebroeck [Sat, 23 Oct 2010 20:59:42 +0000 (20:59 +0000)]
watchdog: bcm63xx_wdt: improve platform part.

* fix devinit and devexit sections
* fix platform removal code so that the iounmap happens after the removal of the timer.
* changes the reboot_notifier by a platform shutdown method.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 years agowatchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg PCH
Seth Heasley [Wed, 17 Nov 2010 19:15:08 +0000 (12:15 -0700)]
watchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg PCH

This patch adds an additional LPC Controller DeviceID for the Intel Patsburg PCH for TCO Watchdog.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 years agoASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency
Jarkko Nikula [Wed, 1 Dec 2010 09:01:20 +0000 (11:01 +0200)]
ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency

Not all omap boards use kernel based pin multiplexing so
CONFIG_SND_OMAP_SOC_N810 should not select it by default as it can make
harm to other boards in multi-board kernels.

Therefore put CONFIG_OMAP_MUX as a dependency to N810 ASoC machine driver.

Thanks to Tony Lindgren <tony@atomide.com> for noticing.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoHID: length resolution should be reported units/mm
Dmitry Torokhov [Thu, 2 Dec 2010 10:49:06 +0000 (11:49 +0100)]
HID: length resolution should be reported units/mm

Input ABI requires reporting resolution on main axes in units per
millimeter, not units per inch, so we need to convert accordingly.

Tested-by: Nikolai Kondrashov <spbnick@gmail.com>
Acked-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoALSA: hda: Use "alienware" model quirk for another SSID
Daniel T Chen [Thu, 2 Dec 2010 00:16:07 +0000 (19:16 -0500)]
ALSA: hda: Use "alienware" model quirk for another SSID

BugLink: https://launchpad.net/bugs/683695
The original reporter states that headphone jacks do not appear to
work.  Upon inspecting his codec dump, and upon further testing, it is
confirmed that the "alienware" model quirk is correct.

Reported-and-tested-by: Cody Thierauf
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branches 'misc', 'mlx4' and 'nes' into for-next
Roland Dreier [Thu, 2 Dec 2010 00:33:47 +0000 (16:33 -0800)]
Merge branches 'misc', 'mlx4' and 'nes' into for-next

13 years agoIB: Fix information leak in marshalling code
Vasiliy Kulikov [Sun, 14 Nov 2010 09:22:52 +0000 (09:22 +0000)]
IB: Fix information leak in marshalling code

ib_ucm_init_qp_attr() and ucma_init_qp_attr() pass struct ib_uverbs_qp_attr
with reserved, qp_state, {ah_attr,alt_ah_attr}{reserved,->grh.reserved}
fields uninitialized to copy_to_user().  This leads to leaking of
contents of kernel stack memory to userspace.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/pack: Remove some unused code added by the IBoE patches
Or Gerlitz [Mon, 29 Nov 2010 07:20:50 +0000 (07:20 +0000)]
IB/pack: Remove some unused code added by the IBoE patches

Remove unused functions added by commit ff7f5aab354d ("IB/pack: IBoE UD
packet packing support").

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
13 years agoIB/mlx4: Fix IBoE link state
Eli Cohen [Thu, 11 Nov 2010 21:05:58 +0000 (21:05 +0000)]
IB/mlx4: Fix IBoE link state

Use netif_running() and netif_carrier_ok() to report link state,
exactly as is done to report Ethernet link state in sysfs.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoIB/mlx4: Fix IBoE reported link rate
Eli Cohen [Mon, 15 Nov 2010 14:04:39 +0000 (14:04 +0000)]
IB/mlx4: Fix IBoE reported link rate

The link rate is the product of the link speed in the link width. For
Etherent ports the rate is 10G, so we use 1 for the width and 4 for
speed to get the correct rate.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agomlx4_core: Workaround firmware bug in query dev cap
Eli Cohen [Wed, 10 Nov 2010 12:52:37 +0000 (12:52 +0000)]
mlx4_core: Workaround firmware bug in query dev cap

ConnectX firmware is supposed to report the number blue flame
registers per page as log2 of the value.  However, due to a firmware
bug, it reports actual number.  This patch works around this by
checking if the number of registers calculated fits within a page.  If
it does not, we use 8 registers per page.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agorbd: replace the rbd sysfs interface
Yehuda Sadeh [Fri, 19 Nov 2010 22:51:04 +0000 (14:51 -0800)]
rbd: replace the rbd sysfs interface

The new interface creates directories per mapped image
and under each it creates a subdir per available snapshot.
This allows keeping a cleaner interface within the sysfs
guidelines. The ABI documentation was updated too.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agostaging: brcm80211: replaced typedef struct wl_info_t by struct wl_info.
Roland Vossen [Wed, 1 Dec 2010 20:37:34 +0000 (21:37 +0100)]
staging: brcm80211: replaced typedef struct wl_info_t by struct wl_info.

Part of the code cleanup effort. CodingStyle doc advises to restrict the usage
of typedefs. Also moved several function declarations from .c to .h file
because this typedef replace operation induced checkpatch.pl warnings.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211 needs lots of delay.h
Randy Dunlap [Wed, 1 Dec 2010 19:16:35 +0000 (11:16 -0800)]
staging: brcm80211 needs lots of delay.h

Fix lots of errors like:

drivers/staging/brcm80211/phy/wlc_phy_n.c:17613: error: implicit declaration of function 'mdelay'
drivers/staging/brcm80211/util/nicpci.c:246: error: implicit declaration of function 'udelay'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Dowan Kim <dowan@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: bcmp => memcmp
Brett Rudley [Wed, 1 Dec 2010 04:32:51 +0000 (20:32 -0800)]
staging: brcm80211: bcmp => memcmp

s/bcmp/memcmp/

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: bzero => memset
Brett Rudley [Wed, 1 Dec 2010 04:09:49 +0000 (20:09 -0800)]
staging: brcm80211: bzero => memset

s/bzero/memset/g

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove OSL_SYSUPTIME_SUPPORT
Brett Rudley [Wed, 1 Dec 2010 01:35:09 +0000 (17:35 -0800)]
staging: brcm80211: remove OSL_SYSUPTIME_SUPPORT

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: Remove bogus gcc version checking
Brett Rudley [Tue, 30 Nov 2010 23:22:15 +0000 (15:22 -0800)]
staging: brcm80211: Remove bogus gcc version checking

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: Remove unused PKTFREESETCB
Brett Rudley [Tue, 30 Nov 2010 23:22:14 +0000 (15:22 -0800)]
staging: brcm80211: Remove unused PKTFREESETCB

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: Remove OSL_DMADDRWIDTH
Brett Rudley [Tue, 30 Nov 2010 23:22:13 +0000 (15:22 -0800)]
staging: brcm80211: Remove OSL_DMADDRWIDTH

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>