pandora-kernel.git
11 years agostaging: dgrp: check return value of alloc_tty_driver
Bill Pemberton [Tue, 9 Oct 2012 18:18:20 +0000 (14:18 -0400)]
staging: dgrp: check return value of alloc_tty_driver

alloc_tty_driver was always assumed to succeed.  Add code to check the
return value and return -ENOMEM if alloc_tty_driver fails.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgrp: check for NULL pointer in (un)register_proc_table
Bill Pemberton [Tue, 9 Oct 2012 18:18:19 +0000 (14:18 -0400)]
staging: dgrp: check for NULL pointer in (un)register_proc_table

register_proc_table and unregister_proc_table didn't deal with the
possibility that the *table pointer could be NULL.  Check for this and
return if table is NULL.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'disintegrate-tty-20121009' of git://git.infradead.org/users/dhowells/linux...
Greg Kroah-Hartman [Wed, 17 Oct 2012 21:07:56 +0000 (14:07 -0700)]
Merge tag 'disintegrate-tty-20121009' of git://git.infradead.org/users/dhowells/linux-headers into tty-linus

UAPI Disintegration 2012-10-09

11 years agodtc: fix for_each_*() to skip first object if deleted
Stephen Warren [Mon, 8 Oct 2012 22:15:26 +0000 (16:15 -0600)]
dtc: fix for_each_*() to skip first object if deleted

The previous definition of for_each_*() would always include the very
first object within the list, irrespective of whether it was marked
deleted, since the deleted flag was not checked on the first object,
but only on any "next" object.

Fix for_each_*() to check the deleted flag in the loop body every
iteration to correct this.

(upstream dtc commit 1762ab42ef77db7ab2776d0d6cba3515150f518a)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoof/platform: sparse fix
Kim Phillips [Tue, 9 Oct 2012 00:42:11 +0000 (19:42 -0500)]
of/platform: sparse fix

drivers/of/platform.c:110:59: warning: incorrect type in argument 2 (different base types)
drivers/of/platform.c:110:59:    expected restricted __be32 const [usertype] *addr
drivers/of/platform.c:110:59:    got unsigned int const [usertype] *[assigned] reg

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoof/irq: sparse fixes
Kim Phillips [Tue, 9 Oct 2012 00:42:04 +0000 (19:42 -0500)]
of/irq: sparse fixes

drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer
drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer
drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers)
drivers/of/irq.c:470:37:    expected int ( *[usertype] irq_init_cb )( ... )
drivers/of/irq.c:470:37:    got void const *const data
drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types)

drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types)
drivers/of/of_pci_irq.c:91:40:    expected unsigned int const [usertype] *intspec
drivers/of/of_pci_irq.c:91:40:    got restricted __be32 *<noident>
drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types)
drivers/of/of_pci_irq.c:91:53:    expected unsigned int const [usertype] *addr
drivers/of/of_pci_irq.c:91:53:    got restricted __be32 *<noident>

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoof/address: sparse fixes
Kim Phillips [Tue, 9 Oct 2012 00:41:58 +0000 (19:41 -0500)]
of/address: sparse fixes

drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:66:29:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:66:29:    got unsigned int [usertype] *addr
drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:87:32:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:87:32:    got unsigned int [usertype] *addr
drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types)
drivers/of/address.c:91:30:    expected unsigned int [unsigned] [usertype] <noident>
drivers/of/address.c:91:30:    got restricted __be32 [usertype] <noident>
drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types)
drivers/of/address.c:92:22:    expected unsigned int [unsigned] [usertype] <noident>
drivers/of/address.c:92:22:    got restricted __be32 [usertype] <noident>
drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:147:35:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:147:35:    got unsigned int [usertype] *addr
drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:157:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:157:34:    got unsigned int [usertype] *
drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer
drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer
drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:262:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:262:34:    got unsigned int [usertype] *
drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:372:41:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:372:41:    got unsigned int [usertype] *addr
drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:395:53:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:395:53:    got unsigned int [usertype] *addr
drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:443:50:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:443:50:    got unsigned int *<noident>
drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:455:49:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:455:49:    got unsigned int *<noident>
drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:480:60:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:480:60:    got unsigned int *<noident>
drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoof: add stub of_get_child_by_name for non-OF builds
Olof Johansson [Sun, 7 Oct 2012 17:40:54 +0000 (10:40 -0700)]
of: add stub of_get_child_by_name for non-OF builds

Fixes build error on s3c6400_defconfig, introduced by commit
06455bbcab76e5f5225de5f38ab948d37a1c3587, "dt/s3c64xx/spi: Use
of_get_child_by_name to get a named child".

drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata':
drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function
    'of_get_child_by_name' [-Werror=implicit-function-declaration]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoUSB: spcp8x5: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 14:31:33 +0000 (16:31 +0200)]
USB: spcp8x5: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: ssu100: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 14:31:34 +0000 (16:31 +0200)]
USB: ssu100: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: ti_usb_3410_5052: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 14:31:35 +0000 (16:31 +0200)]
USB: ti_usb_3410_5052: fix port-data memory leak

Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: oti6858: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 14:31:32 +0000 (16:31 +0200)]
USB: oti6858: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: iuu_phoenix: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:34:59 +0000 (13:34 +0200)]
USB: iuu_phoenix: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: kl5kusb105: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:35:01 +0000 (13:35 +0200)]
USB: kl5kusb105: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: io_ti: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:34:58 +0000 (13:34 +0200)]
USB: io_ti: fix port-data memory leak

Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: keyspan_pda: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:35:00 +0000 (13:35 +0200)]
USB: keyspan_pda: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: f81232: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:34:56 +0000 (13:34 +0200)]
USB: f81232: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: io_edgeport: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:34:57 +0000 (13:34 +0200)]
USB: io_edgeport: fix port-data memory leak

Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: kobil_sct: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:35:02 +0000 (13:35 +0200)]
USB: kobil_sct: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: cypress_m8: fix port-data memory leak
Johan Hovold [Wed, 17 Oct 2012 11:34:55 +0000 (13:34 +0200)]
USB: cypress_m8: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: acm: fix the computation of the number of data bits
Nicolas Boullis [Mon, 15 Oct 2012 22:06:23 +0000 (00:06 +0200)]
usb: acm: fix the computation of the number of data bits

The current code assumes that CSIZE is 0000060, which appears to be
wrong on some arches (such as powerpc).

Signed-off-by: Nicolas Boullis <nboullis@debian.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: Missing dma_mask in ehci-vt8500.c when probed from device-tree
Tony Prisk [Sun, 14 Oct 2012 03:22:35 +0000 (16:22 +1300)]
usb: Missing dma_mask in ehci-vt8500.c when probed from device-tree

Device-tree probed devices don't get a dev.dma_mask set. This patch
sets a default 32bit mask on arch-vt8500 when using devicetree.

Without this patch, arch-vt8500 cannot detect ehci attached devices.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: Missing dma_mask in uhci-platform.c when probed from device-tree
Tony Prisk [Sun, 14 Oct 2012 03:22:34 +0000 (16:22 +1300)]
usb: Missing dma_mask in uhci-platform.c when probed from device-tree

Device-tree probed devices don't get a dev.dma_mask set. This patch
sets a default 32bit mask on platforms using devicetree.

Without this patch, arch-vt8500 cannot detect uhci attached devices.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: cdc-acm: fix pipe type of write endpoint
Ming Lei [Tue, 16 Oct 2012 13:21:21 +0000 (21:21 +0800)]
USB: cdc-acm: fix pipe type of write endpoint

If the write endpoint is interrupt type, usb_sndintpipe() should
be passed to usb_fill_int_urb() instead of usb_sndbulkpipe().

Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousbdevfs: Fix broken scatter-gather transfer
Henrik Rydberg [Sat, 13 Oct 2012 10:20:36 +0000 (12:20 +0200)]
usbdevfs: Fix broken scatter-gather transfer

The handling of large output bulk transfers is broken; the same user
page is read over and over again. Fixed with this patch.

Cc: stable <stable@vger.kernel.org>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers
Linus Torvalds [Wed, 17 Oct 2012 20:40:22 +0000 (13:40 -0700)]
Merge tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers

Pull misc UAPI fixes from David Howells:
 "They do a number of things:

  (1) Import a patch from Catalin Marinas to extend the generic-y in
      Kbuild facility to uapi directories.

  (2) Make arch/tile's ucontext.h file use (1) and remove the header-y
      line from the kernel internal side of things.

  (3) Remove some now-empty conditional bits from include/linux/Kbuild.
      The contents got moved to the UAPI side of things along with new
      conditionals.

  (4) Deal with now-empty files:

     (a) Empty Kbuild files under include/ get removed.

     (b) Empty Kbuild files under arch/ get comments to hold them as
         they are likely to end up with generic-y or genhdr-y lines.
         Deleting them appears to work if we want to go that route.

     (c) Put a comment into uapi/asm-generic/kvm_para.h to prevent the
         patch program from deleting that, and made the arches with
         empty kvm_para.h uapi files use that instead of having their
         own files.

     (d) Put comments into four other empty uapi/ headers to prevent the
         patch program from deleting them.

  A question: Is this the right way to deal with the now-empty Kbuild
  files?

  The ones under include/ are unlikely to be used - even for generated
  files, I think - so getting rid of them is probably okay.  Once all
  the bits are in, we can probably remove all the Kbuild files under
  include/ that aren't also under include/uapi/.

  The ones under arch/ are more of an issue because of the potential for
  generic-y and genhdr-y."

* tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
  UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
  UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
  UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
  UAPI: The tile arch uses the generic ucontext.h file
  UAPI: Place comments in empty arch Kbuilds to make them non-empty
  UAPI: Remove empty non-UAPI Kbuild files
  UAPI: Remove empty conditionals from include/linux/Kbuild
  UAPI: Make uapi/linux/irqnr.h non-empty
  uapi: Allow automatic generation of uapi/asm/ header files

11 years ago[media] Kconfig: Fix dependencies for driver autoselect options
Mauro Carvalho Chehab [Wed, 17 Oct 2012 19:09:23 +0000 (16:09 -0300)]
[media] Kconfig: Fix dependencies for driver autoselect options

This option is a merge of both analog TV and DVB CUSTOMISE.

At the merge, the dependencies were not done right: the menu
currently appears only for analog TV. It should also be opened
for digital TV. As there are other I2C devices there (flash
devices, etc) that aren't related to either one, it is better
to make it generic enough to open for all media devices with
video.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 17 Oct 2012 19:41:18 +0000 (12:41 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix regression in /proc/net/if_inet6, sometimes devices do not get
    listed.  From Eric Dumazet.

 2) Add IPSEC networking sub-section to MAINTAINERS.

 3) S390 networking fixes from Hendrik Brueckner and Stefan Raspl.

 4) Fix enslavement of devices that can't do VLAN properly, from Jiri
    Pirko.

 5) SCTP sack handling fix from Zijie Pan.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  ipv6: addrconf: fix /proc/net/if_inet6
  bnx2x: fix handling mf storage modes
  qeth: fix deadlock between recovery and bonding driver
  smsgiucv: reestablish IUCV path after resume
  sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()
  vlan: fix bond/team enslave of vlan challenged slave/port
  MAINTAINERS: Add explicit section for IPSEC networking.

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Wed, 17 Oct 2012 19:40:44 +0000 (12:40 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Two sparc64 perf bug fixes and add a sysrq facility so I can diagnose
  these kinds of problems more quickly in the future."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix bit twiddling in sparc_pmu_enable_event().
  sparc64: Add global PMU register dumping via sysrq.
  sparc64: Like x86 we should check current->mm during perf backtrace generation.

11 years agoSUNRPC: Prevent kernel stack corruption on long values of flush
Sasha Levin [Mon, 16 Jul 2012 22:01:26 +0000 (00:01 +0200)]
SUNRPC: Prevent kernel stack corruption on long values of flush

The buffer size in read_flush() is too small for the longest possible values
for it. This can lead to a kernel stack corruption:

[   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
[   43.047329]
[   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
[   43.050038] Call Trace:
[   43.050435]  [<ffffffff836c60c2>] panic+0xcd/0x1f4
[   43.050931]  [<ffffffff833e64b4>] ? read_flush.isra.7+0xe4/0x100
[   43.051602]  [<ffffffff810e94e6>] __stack_chk_fail+0x16/0x20
[   43.052206]  [<ffffffff833e64b4>] read_flush.isra.7+0xe4/0x100
[   43.052951]  [<ffffffff833e6500>] ? read_flush_pipefs+0x30/0x30
[   43.053594]  [<ffffffff833e652c>] read_flush_procfs+0x2c/0x30
[   43.053596]  [<ffffffff812b9a8c>] proc_reg_read+0x9c/0xd0
[   43.053596]  [<ffffffff812b99f0>] ? proc_reg_write+0xd0/0xd0
[   43.053596]  [<ffffffff81250d5b>] do_loop_readv_writev+0x4b/0x90
[   43.053596]  [<ffffffff81250fd6>] do_readv_writev+0xf6/0x1d0
[   43.053596]  [<ffffffff812510ee>] vfs_readv+0x3e/0x60
[   43.053596]  [<ffffffff812511b8>] sys_readv+0x48/0xb0
[   43.053596]  [<ffffffff8378167d>] system_call_fastpath+0x1a/0x1f

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
11 years agox86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup
Daniel J Blueman [Mon, 1 Oct 2012 06:42:05 +0000 (14:42 +0800)]
x86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup

When booting on a federated multi-server system (NumaScale), the
processor Northbridge lookup returns NULL; add guards to prevent this
causing an oops.

On those systems, the northbridge is accessed through MMIO and the
"normal" northbridge enumeration in amd_nb.c doesn't work since we're
generating the northbridge ID from the initial APIC ID and the last
is not unique on those systems. Long story short, we end up without
northbridge descriptors.

Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
Cc: stable@vger.kernel.org # 3.6
Link: http://lkml.kernel.org/r/1349073725-14093-1-git-send-email-daniel@numascale-asia.com
[ Boris: beef up commit message ]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoUSB: usb.h: remove dbg() macro
Greg Kroah-Hartman [Fri, 5 Oct 2012 22:09:38 +0000 (15:09 -0700)]
USB: usb.h: remove dbg() macro

There are no users of this macro anymore in the kernel tree, so finally
delete it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agox86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.
Jacob Shin [Thu, 20 Oct 2011 21:15:26 +0000 (16:15 -0500)]
x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.

On systems with very large memory (1 TB in our case), BIOS may report a
reserved region or a hole in the E820 map, even above the 4 GB range. Exclude
these from the direct mapping.

[ hpa: this should be done not just for > 4 GB but for everything above the legacy
  region (1 MB), at the very least.  That, however, turns out to require significant
  restructuring.  That work is well underway, but is not suitable for rc/stable. ]

Cc: stable@kernel.org # > 2.6.32
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/1319145326-13902-1-git-send-email-jacob.shin@amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agogpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
Axel Lin [Sun, 30 Sep 2012 08:23:27 +0000 (16:23 +0800)]
gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Add crypto engine to DT
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:18 +0000 (02:02 +0200)]
ARM: dove: Add crypto engine to DT

Make use of DT support for the crypto engine on dove and remove
the obsolete init call.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Remove watchdog from DT
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:17 +0000 (02:02 +0200)]
ARM: dove: Remove watchdog from DT

The watchdog on dove requires an interrupt that is not yet
available on DT. Therefore, the watchdog DT node is removed
until the corresponding chained intc is available.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Restructure SoC device tree descriptor
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:16 +0000 (02:02 +0200)]
ARM: dove: Restructure SoC device tree descriptor

This patch adds proper ranges for all mapped addresses within
dove SoC and moves the interrupt controller node inside the simple-bus
node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Fix clock names of sata and gbe
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:15 +0000 (02:02 +0200)]
ARM: dove: Fix clock names of sata and gbe

This patch fixes wrong clock names of lately added clock gates
for sata and gbe (mv64xx_eth).

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Fix tauros2 device tree init
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:14 +0000 (02:02 +0200)]
ARM: dove: Fix tauros2 device tree init

During the review process of dove DT patches, Tauros2 cache
init call was changed and DT support added. This patch fixes
the call to Tauros2 init and adds a DT node. Moreover, plat/irq.h
include was missing from mach-dove/common.c.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoARM: dove: Add pcie clock support
Sebastian Hesselbarth [Tue, 25 Sep 2012 00:02:13 +0000 (02:02 +0200)]
ARM: dove: Add pcie clock support

As dove now has clock gating control ensure pcie ports grab their
clocks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
11 years agoperf hists browser: Add back callchain folding symbol
Arnaldo Carvalho de Melo [Wed, 17 Oct 2012 16:54:08 +0000 (13:54 -0300)]
perf hists browser: Add back callchain folding symbol

The commit 5395a04841fc ("perf hists: Separate overhead and baseline
columns") makes the "Overhead" column no more the first one, this
caused the test that checks if it is time to show if a histogram
entry has callchains never hits.

Fix it by checking if the 'i' variable is equal to PERF_HPP__OVERHEAD
instead of 0.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-w3lcbx0fx1fnh3l2cbq40q2e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
11 years agoALSA: emu10k1: add chip details for E-mu 1010 PCIe card
Maxim Kachur [Wed, 17 Oct 2012 16:18:10 +0000 (18:18 +0200)]
ALSA: emu10k1: add chip details for E-mu 1010 PCIe card

Add chip details for E-mu 1010 PCIe card. It has the same
chip as found in E-mu 1010b but it uses different PCI id.

Signed-off-by: Maxim Kachur <mcdebugger@duganet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory omap-for-v3.7-rc1/fixes-take5-signed
Jon Hunter [Wed, 17 Oct 2012 14:41:25 +0000 (09:41 -0500)]
ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory

Currently, if the GPMC driver fails to reserve memory when probed we will
call BUG() and the kernel will not boot. Instead of calling BUG(), return
an error from probe and allow kernel to boot.

Boot tested on AM335x beagle bone board and OMAP4430 Panda board.

V2 changes:
- Ensure that clock and memory resources are released on error.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
Tero Kristo [Tue, 25 Sep 2012 16:05:32 +0000 (19:05 +0300)]
ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable

Previously the code only acquired spinlock after increasing / decreasing
the usecount value, which is wrong. This leaves a small window where
a task switch may occur between the check of the usecount and the actual
wakeup / sleep of the domain. Fixed by moving the spinlock locking before
the usecount access. Left the usecount as atomic_t if someone wants an
easy access to the parameter through atomic_read.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas...
Olof Johansson [Wed, 17 Oct 2012 15:08:22 +0000 (08:08 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/horms/renesas into fixes

From Simon Horman:
"Please consider the following fix for the KZM-A9-GT board for 3.7.
 They both resolve fallout from recent IOMEM() changes."

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7779: use __iomem pointers for MMIO
  ARM: shmobile: armadillo800eva: __io abuse cleanup

11 years agoMIPS: JZ4740: Forward declare struct uart_port in header.
Ralf Baechle [Wed, 17 Oct 2012 15:00:50 +0000 (17:00 +0200)]
MIPS: JZ4740: Forward declare struct uart_port in header.

As suggested by Geert Uytterhoeven <geert@linux-m68k.org>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Lars-Peter Clausen <lars@metafoo.de>
11 years agoMIPS: JZ4740: Fix '#include guard' in serial.h
Antony Pavlov [Mon, 15 Oct 2012 21:38:46 +0000 (01:38 +0400)]
MIPS: JZ4740: Fix '#include guard' in serial.h

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Lars-Peter Clausen <lars@metafoo.de>
Patchwork: https://patchwork.linux-mips.org/patch/4424/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoperf tools: Fix build on sparc.
David Miller [Wed, 17 Oct 2012 05:06:56 +0000 (01:06 -0400)]
perf tools: Fix build on sparc.

More UAPI stuff.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20121017.010656.383828471689899431.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
11 years agoperf python: Link with libtraceevent
Arnaldo Carvalho de Melo [Tue, 16 Oct 2012 17:53:24 +0000 (14:53 -0300)]
perf python: Link with libtraceevent

The evsel methods to read tracepoint fields uses libtraceevent
functions, becoming needed by the python binding as well.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-j3o4v7jyvp9ke9n230l96a1m@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
11 years agoperf python: Initialize 'page_size' variable
Arnaldo Carvalho de Melo [Tue, 16 Oct 2012 17:51:04 +0000 (14:51 -0300)]
perf python: Initialize 'page_size' variable

The commit 0c1fe6b:

 'perf tools: Have the page size value available for all tools'

Broke the python binding because the global variable 'page_size' is
initialized on the main() routine, that is not called when using
just the python binding, causing evlist.mmap() to fail because it
expects that variable to be initialized to the system's page size.

Fix it by initializing it on the binding init routine.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vrvp3azmbfzexnpmkhmvtzzc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
11 years agoNLM: nlm_lookup_file() may return NLMv4-specific error codes
Trond Myklebust [Sat, 13 Oct 2012 04:30:28 +0000 (00:30 -0400)]
NLM: nlm_lookup_file() may return NLMv4-specific error codes

If the filehandle is stale, or open access is denied for some reason,
nlm_fopen() may return one of the NLMv4-specific error codes nlm4_stale_fh
or nlm4_failed. These get passed right through nlm_lookup_file(),
and so when nlmsvc_retrieve_args() calls the latter, it needs to filter
the result through the cast_status() machinery.

Failure to do so, will trigger the BUG_ON() in encode_nlm_stat...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Reported-by: Larry McVoy <lm@bitmover.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
11 years agoARM: s3c: mark s3c2440_clk_add as __init_refok
Arnd Bergmann [Fri, 12 Oct 2012 11:03:28 +0000 (11:03 +0000)]
ARM: s3c: mark s3c2440_clk_add as __init_refok

s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table,
which is marked as __init. The modpost script complains about this
because we must not call an __init function from a function in the .text
section, and we cannot reference an __init function from a subsys_interface
pointer.

I have verified that the only code path into s3c2440_clk_add() is
from "int __init s3c2440_init(void)", so s3c2440_clk_add can be marked
__init_refok instead.

Without this patch, building mini2440_defconfig results in:

WARNING: vmlinux.o(.text+0x9848): Section mismatch in reference from the function s3c2440_clk_add() to the function .init.text:clkdev_add_table()
The function s3c2440_clk_add() references
the function __init clkdev_add_table().
This is often because s3c2440_clk_add lacks a __init
annotation or the annotation of clkdev_add_table is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Ben Dooks <ben-linux@fluff.org>
11 years agospi/s3c64xx: use correct dma_transfer_direction type
Arnd Bergmann [Mon, 30 Apr 2012 16:31:27 +0000 (16:31 +0000)]
spi/s3c64xx: use correct dma_transfer_direction type

There is a subtle difference between dma_transfer_direction and
dma_data_direction: the former is used by the dmaengine framework,
while the latter is used by the dma-mapping API. Although the
purpose is comparable, the actual values are different and must
not be mixed. In this case, the driver just wants to use
dma_transfer_direction.

Without this patch, building s3c6400_defconfig results in:

drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb':
drivers/spi/spi-s3c64xx.c:239:21: warning: comparison between
'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]

As pointed out by Kukjin Kim, this also changes the use of constants
from DMA_FROM_DEVICE/DMA_TO_DEVICE to DMA_DEV_TO_MEM/DMA_MEM_TO_DEV.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: spi-devel-general@lists.sourceforge.net
11 years agoDocBook/media/Makefile: Fix build due to uapi breakage
Mauro Carvalho Chehab [Wed, 17 Oct 2012 13:05:09 +0000 (10:05 -0300)]
DocBook/media/Makefile: Fix build due to uapi breakage

The uapi changeset forgot to fix the header locations, needed
for the DocBook specs. Fix it.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/dvb
David Howells [Tue, 9 Oct 2012 08:48:42 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/dvb

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge tag 'v3.7-rc1' into staging/for_v3.8
Mauro Carvalho Chehab [Wed, 17 Oct 2012 12:32:49 +0000 (09:32 -0300)]
Merge tag 'v3.7-rc1' into staging/for_v3.8

Linux 3.7-rc1

* tag 'v3.7-rc1': (9579 commits)
  Linux 3.7-rc1
  x86, boot: Explicitly include autoconf.h for hostprogs
  perf: Fix UAPI fallout
  ARM: config: make sure that platforms are ordered by option string
  ARM: config: sort select statements alphanumerically
  UAPI: (Scripted) Disintegrate include/linux/byteorder
  UAPI: (Scripted) Disintegrate include/linux
  UAPI: Unexport linux/blk_types.h
  UAPI: Unexport part of linux/ppp-comp.h
  perf: Handle new rbtree implementation
  procfs: don't need a PATH_MAX allocation to hold a string representation of an int
  vfs: embed struct filename inside of names_cache allocation if possible
  audit: make audit_inode take struct filename
  vfs: make path_openat take a struct filename pointer
  vfs: turn do_path_lookup into wrapper around struct filename variant
  audit: allow audit code to satisfy getname requests from its names_list
  vfs: define struct filename and have getname() return it
  btrfs: Fix compilation with user namespace support enabled
  userns: Fix posix_acl_file_xattr_userns gid conversion
  userns: Properly print bluetooth socket uids
  ...

11 years agoMerge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Wed, 17 Oct 2012 12:09:15 +0000 (14:09 +0200)]
Merge tag 'asoc-3.7' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.7

Nothing too exciting except for the ams-delta change which is relatively
lerge due to the fact that the driver loading had been totally broken as
the driver needed a newer API to function.

11 years agoUAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
David Howells [Wed, 17 Oct 2012 11:32:35 +0000 (12:32 +0100)]
UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty

arch/sparc/include/uapi/asm/sigcontext.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: David S. Miller <davem@davemloft.net>
cc: sparclinux@vger.kernel.org

11 years agoUAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
David Howells [Wed, 17 Oct 2012 11:32:35 +0000 (12:32 +0100)]
UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty

arch/sh/include/uapi/asm/hw_breakpoint.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: linux-sh@vger.kernel.org

11 years agoUAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
David Howells [Wed, 17 Oct 2012 11:32:35 +0000 (12:32 +0100)]
UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty

arch/mn10300/include/uapi/asm/setup.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoUAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
David Howells [Wed, 17 Oct 2012 11:32:07 +0000 (12:32 +0100)]
UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches

Make uapi/asm-generic/kvm_para.h non-empty by addition of a comment to stop
the patch program from deleting it when it creates it.

Then delete empty arch-specific uapi/asm/kvm_para.h files and tell the Kbuild
files to use the generic instead.

Should this perhaps instead be a #warning or #error that the facility is
unsupported on this arch?

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Arnd Bergmann <arnd@arndb.de>
cc: Avi Kivity <avi@redhat.com>
cc: Marcelo Tosatti <mtosatti@redhat.com>
cc: kvm@vger.kernel.org

11 years agoUAPI: The tile arch uses the generic ucontext.h file
David Howells [Wed, 17 Oct 2012 11:31:16 +0000 (12:31 +0100)]
UAPI: The tile arch uses the generic ucontext.h file

Move the header-y and generic-y lines for ucontext.h from
arch/tile/include/asm/Kbuild to the uapi/ Kbuild as the asm-generic variant is
used.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Chris Metcalf <cmetcalf@tilera.com>

11 years agoUAPI: Place comments in empty arch Kbuilds to make them non-empty
David Howells [Wed, 17 Oct 2012 11:31:16 +0000 (12:31 +0100)]
UAPI: Place comments in empty arch Kbuilds to make them non-empty

Place comments in:

arch/mips/include/asm/Kbuild
arch/tile/include/arch/Kbuild

to make them non-empty so that the patch program doesn't remove them when it
reduces them to nothing.

Possibly they should be just deleted, but it's possible that they'll acquire
generic-y or genhdr-y lines in future, so I'm keeping them around for the
moment.

Note that MIPS will compile happily if the file is deleted instead.  I haven't
tested TILE, but I suspect it will be the same there.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ralf Baechle <ralf@linux-mips.org>
cc: Chris Metcalf <cmetcalf@tilera.com>

11 years agoUAPI: Remove empty non-UAPI Kbuild files
David Howells [Wed, 17 Oct 2012 11:31:15 +0000 (12:31 +0100)]
UAPI: Remove empty non-UAPI Kbuild files

Remove non-UAPI Kbuild files that have become empty as a result of UAPI
disintegration.  They used to have only header-y lines in them and those have
now moved to the Kbuild files in the corresponding uapi/ directories.

Possibly these should not be removed but rather have a comment inserted to say
they are intentionally left blank.  This would make it easier to add generated
header lines in future without having to restore the infrastructure.

Note that at this point not all the UAPI disintegration parts have been merged,
so it is likely that more empty Kbuild files will turn up.

It is probably necessary to make the files non-empty to prevent the patch
program from automatically deleting them when it reduces them to nothing.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoUAPI: Remove empty conditionals from include/linux/Kbuild
David Howells [Wed, 17 Oct 2012 11:31:15 +0000 (12:31 +0100)]
UAPI: Remove empty conditionals from include/linux/Kbuild

Remove empty conditionals from include/linux/Kbuild as the contents, with new
conditionals, have moved to include/uapi/linux/Kbuild.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoUAPI: Make uapi/linux/irqnr.h non-empty
David Howells [Wed, 17 Oct 2012 11:31:15 +0000 (12:31 +0100)]
UAPI: Make uapi/linux/irqnr.h non-empty

uapi/linux/irqnr.h was emitted by the UAPI disintegration script as an empty
file because the parent linux/irqnr.h had no UAPI stuff in it, despite being
marked with "header-y".

Unfortunately, the patch program deletes the empty file when applying a kernel
patch.

It's not clear why this file is part of the UAPI at all.  Looking in:

/usr/include/linux/irqnr.h

there's nothing there but a header reinclusion guard and a comment.

So just stick a comment in there as a placeholder.

Without this, if the kernel is fabricated from, say, a tarball and a patch, you
can get this error when building x86_64 or usermode Linux (and probably
others):

include/linux/irqnr.h:4:30: fatal error: uapi/linux/irqnr.h: No such file or directory

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Alessandro Suardi <alessandro.suardi@gmail.com>

11 years agouapi: Allow automatic generation of uapi/asm/ header files
Catalin Marinas [Wed, 17 Oct 2012 11:25:44 +0000 (12:25 +0100)]
uapi: Allow automatic generation of uapi/asm/ header files

Several arch/*/include/uapi/asm/* header simply include the
corresponding <asm-generic/*> file. This patch allows such files to be
specified in uapi/asm/Kbuild via "generic-y += ..." to be automatically
generated (similar to asm/Kbuild).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
11 years agoALSA: hda - Always check array bounds in alc_get_line_out_pfx
David Henningsson [Wed, 17 Oct 2012 10:43:44 +0000 (12:43 +0200)]
ALSA: hda - Always check array bounds in alc_get_line_out_pfx

Even when CONFIG_SND_DEBUG is not enabled, we don't want to
return an arbitrary memory location when the channel count is
larger than we expected.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: bells: Correct typo in sub speaker DAI name for WM5110
Mark Brown [Wed, 26 Sep 2012 15:22:32 +0000 (16:22 +0100)]
ASoC: bells: Correct typo in sub speaker DAI name for WM5110

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Wed, 17 Oct 2012 02:24:00 +0000 (19:24 -0700)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH updates from Paul Mundt.

The bulk of this is the UAPI disintegration for SH.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Fix up more fallout from pointless ARM __iomem churn.
  sh: Wire up kcmp syscall.
  UAPI: (Scripted) Disintegrate arch/sh/include/asm

11 years agoMerge branch 'frv' (FRV patches from David Howells)
Linus Torvalds [Wed, 17 Oct 2012 01:49:22 +0000 (18:49 -0700)]
Merge branch 'frv' (FRV patches from David Howells)

Merge emailed FRV fixes from David Howells.

* frv:
  FRV: Fix linux/elf-fdpic.h
  FRV: Fix const sections change
  FRV: Fix incorrect symbol in copy_thread()
  FRV: Fix VLIW packing constraint violation in entry.S

11 years agoFRV: Fix linux/elf-fdpic.h
David Howells [Mon, 15 Oct 2012 23:10:35 +0000 (00:10 +0100)]
FRV: Fix linux/elf-fdpic.h

It seems I accidentally switched the guard on linux/elf-fdpic.h from #ifdef
__KERNEL__ to #ifndef __KERNEL__ when attempting to expand the guarded region
to cover the elf_fdpic_params struct when doing the UAPI split - with the
result that the struct became unavailable to kernel code.

Move incorrectly guarded bits back to the kernelspace header.

Whilst we're at it, the __KERNEL__ guards can be deleted as they're no longer
necessary.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Fengguang Wu <fengguang.wu@intel.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
cc: uclinux-dev@uclinux.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoFRV: Fix const sections change
Andi Kleen [Mon, 15 Oct 2012 23:10:28 +0000 (00:10 +0100)]
FRV: Fix const sections change

Add __pminitconst to fix the build, otherwise the following error can occur:

  arch/frv/kernel/setup.c:187:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  arch/frv/kernel/setup.c:386:2: error: 'clock_cmodes' undeclared (first use in this function)
  arch/frv/kernel/setup.c:571:6: error: 'clock_cmodes' undeclared (first use in this function)
  make[2]: *** [arch/frv/kernel/setup.o] Error 1

http://kisskb.ellerman.id.au/kisskb/buildresult/7344691/

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoFRV: Fix incorrect symbol in copy_thread()
David Howells [Mon, 15 Oct 2012 23:10:21 +0000 (00:10 +0100)]
FRV: Fix incorrect symbol in copy_thread()

Fix an incorrect symbol in copy_thread():

  arch/frv/kernel/process.c: In function 'copy_thread':
  arch/frv/kernel/process.c:197: error: 'chilregs' undeclared (first use in this function)
  arch/frv/kernel/process.c:197: error: (Each undeclared identifier is reported only once
  arch/frv/kernel/process.c:197: error: for each function it appears in.)

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoFRV: Fix VLIW packing constraint violation in entry.S
David Howells [Mon, 15 Oct 2012 23:10:13 +0000 (00:10 +0100)]
FRV: Fix VLIW packing constraint violation in entry.S

Fix VLIW packing constraint violation in entry.S:

  arch/frv/kernel/entry.S: Assembler messages:
  arch/frv/kernel/entry.S:871: Error: VLIW packing constraint violation

When packing CALLL with OR, CALLL must go in the first slot.  The
instructions are executed simultaneously, so it doesn't matter which way
round they're packed from that point of view.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoprintk: Fix scheduling-while-atomic problem in console_cpu_notify()
Paul E. McKenney [Tue, 16 Oct 2012 04:35:59 +0000 (21:35 -0700)]
printk: Fix scheduling-while-atomic problem in console_cpu_notify()

The console_cpu_notify() function runs with interrupts disabled in the
CPU_DYING case.  It therefore cannot block, for example, as will happen
when it calls console_lock().  Therefore, remove the CPU_DYING leg of
the switch statement to avoid this problem.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 17 Oct 2012 01:14:31 +0000 (18:14 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Fixes for i915, nouveau and radeon:

   - i915: haswell stability, modeset rework fallout, ums fix
   - nouveau: misc fixes from code rework
   - radeon: pll rework fixes, more 2 level PTE cleanups.
   - core: warning fixes on 32-bit."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
  nouveau: fix warning on 32-bit build.
  drm/nouveau/bios: fix typo in error message
  drm/nouveau: only call ttm_agp_tt_create when __OS_HAS_AGP
  drm/nv50/fb: fix double free of vram mm
  drm/nouveau/pm: do not stop reclocking if failing to set the fan speed
  drm/nouveau/pm: fix a typo related to the move to the therm subdev
  drm/nouveau/hwmon: fix the initialization condition
  drm: fix warning on 32-bit.
  drm: radeon: fix printk format warning
  drm/radeon: fix spelling typos in debugging output
  drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
  drm/radeon: check if pcie gen 2 is already enabled (v2)
  drm/radeon/cayman: set VM max pfn at MC init
  drm/radeon: separate pt alloc from lru add
  drm/radeon: don't add the IB pool to all VMs v2
  drm/radeon: allocate page tables on demand v4
  drm/radeon: update comments to clarify VM setup (v2)
  drm/radeon: allocate PPLLs from low to high
  drm/radeon: fix compilation with backlight disabled
  drm/radeon: use %zu for formatting size_t
  ...

11 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Linus Torvalds [Wed, 17 Oct 2012 01:12:38 +0000 (18:12 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs

Pull ext2, ext3, quota fixes from Jan Kara:
 "Fix three regressions caused by user namespace conversions (ext2,
  ext3, quota) and minor ext3 fix and cleanup."

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  quota: Silence warning about PRJQUOTA not being handled in need_print_warning()
  ext3: fix return values on parse_options() failure
  ext2: fix return values on parse_options() failure
  ext3: ext3_bread usage audit
  ext3: fix possible non-initialized variable on htree_dirblock_to_tree()

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Wed, 17 Oct 2012 01:11:48 +0000 (18:11 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "Fix for my braino in replace_fd(), dhowell's fix for the fallout from
  over-enthusiastic bo^Wdeclaration movements plus crapectomy that
  should've happened a long time ago (SEL_...  definitions)."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  bury SEL_{IN,OUT,EX}
  Unexport some bits of linux/fs.h
  fix a leak in replace_fd() users

11 years agoMerge tag 'pinctrl-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 17 Oct 2012 01:10:26 +0000 (18:10 -0700)]
Merge tag 'pinctrl-fixes-v3.7-rc2' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "A number of pinctrl fixes for the v3.7 series:
   - duplicate includes, section markup, code mishaps
   - erroneous return value in errorpath on the bcm2835 driver
   - remove an unused sirf function that was causing build errors
   - multiple-platform compilation stubs and a missed code review
     comment fixup on the nomadik pin controller"

* tag 'pinctrl-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: always use the simple irqdomain
  pinctrl/nomadik: provide stubs for legacy Nomadik
  pinctrl: remove duplicated include from pinctrl-xway.c
  pinctrl: sirf: remove sirfsoc_gpio_set_pull function
  pinctrl: fix return value in bcm2835_pinctrl_probe()
  pinctrl: remove duplicated include from pinctrl-bcm2835.c
  pinctrl: bcm2835: Use existing pointer to struct device
  pinctrl: samsung: use __devinit section for init code

11 years agoMerge branch 'ipmi' (IPMI patches from Corey Minyard)
Linus Torvalds [Wed, 17 Oct 2012 01:08:21 +0000 (18:08 -0700)]
Merge branch 'ipmi' (IPMI patches from Corey Minyard)

Merge emailed patches from Corey Minyard:
 "Remove some bogus docs, Fix ACPI/IPMI interactions, fix some warnings,
  and add register spacing detection for PCI interfaces."

* ipmi:
  IPMI: Detect register spacing on PCI interfaces
  IPMI: Fix some uninitialized warning
  IPMI: Change link order
  ACPI: Reorder IPMI driver before any other ACPI drivers
  IPMI: Remove SMBus driver info from the docs

11 years agoIPMI: Detect register spacing on PCI interfaces
Corey Minyard [Tue, 16 Oct 2012 20:53:40 +0000 (15:53 -0500)]
IPMI: Detect register spacing on PCI interfaces

The IPMI spec defines a way to detect register spacing for PCI interfaces,
so implement it.

Signed-off-by: Steven Hsieh <sshsieh@broadcom.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoIPMI: Fix some uninitialized warning
Corey Minyard [Tue, 16 Oct 2012 20:53:39 +0000 (15:53 -0500)]
IPMI: Fix some uninitialized warning

There was a spot where the compiler couldn't tell some variables
would be set.  So initialize them to make the warning go away.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoIPMI: Change link order
Matthew Garrett [Tue, 16 Oct 2012 20:53:38 +0000 (15:53 -0500)]
IPMI: Change link order

IPMI must be initialised before ACPI in order to ensure that any IPMI
services are available before ACPI driver initialisation attempts to use
any IPMI operation regions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoACPI: Reorder IPMI driver before any other ACPI drivers
Matthew Garrett [Tue, 16 Oct 2012 20:53:37 +0000 (15:53 -0500)]
ACPI: Reorder IPMI driver before any other ACPI drivers

Drivers may make calls that require the ACPI IPMI driver to have been
initialised already, so make sure that it appears earlier in the build
order.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoIPMI: Remove SMBus driver info from the docs
Corey Minyard [Tue, 16 Oct 2012 20:53:36 +0000 (15:53 -0500)]
IPMI: Remove SMBus driver info from the docs

Some documentation for the SMBus driver is in the IPMI docs, but that
code is not in the kernel tree at this point.  So remove the docs to
avoid confusion.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMAINTAINERS: change email after moving for LED subsystem maintaining
Bryan Wu [Tue, 16 Oct 2012 19:55:19 +0000 (12:55 -0700)]
MAINTAINERS: change email after moving for LED subsystem maintaining

Signed-off-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm, mempolicy: fix printing stack contents in numa_maps
David Rientjes [Wed, 17 Oct 2012 00:31:23 +0000 (17:31 -0700)]
mm, mempolicy: fix printing stack contents in numa_maps

When reading /proc/pid/numa_maps, it's possible to return the contents of
the stack where the mempolicy string should be printed if the policy gets
freed from beneath us.

This happens because mpol_to_str() may return an error the
stack-allocated buffer is then printed without ever being stored.

There are two possible error conditions in mpol_to_str():

 - if the buffer allocated is insufficient for the string to be stored,
   and

 - if the mempolicy has an invalid mode.

The first error condition is not triggered in any of the callers to
mpol_to_str(): at least 50 bytes is always allocated on the stack and this
is sufficient for the string to be written.  A future patch should convert
this into BUILD_BUG_ON() since we know the maximum strlen possible, but
that's not -rc material.

The second error condition is possible if a race occurs in dropping a
reference to a task's mempolicy causing it to be freed during the read().
The slab poison value is then used for the mode and mpol_to_str() returns
-EINVAL.

This race is only possible because get_vma_policy() believes that
mm->mmap_sem protects task->mempolicy, which isn't true.  The exit path
does not hold mm->mmap_sem when dropping the reference or setting
task->mempolicy to NULL: it uses task_lock(task) instead.

Thus, it's required for the caller of a task mempolicy to hold
task_lock(task) while grabbing the mempolicy and reading it.  Callers with
a vma policy store their mempolicy earlier and can simply increment the
reference count so it's guaranteed not to be freed.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.
Ralf Baechle [Tue, 16 Oct 2012 23:01:21 +0000 (01:01 +0200)]
MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.

On some CPU the write to pagemask might complete before the TLB write
instruction reads from the pagemask register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Restore pagemask after dumping the TLB.
Ralf Baechle [Tue, 16 Oct 2012 23:01:20 +0000 (01:01 +0200)]
MIPS: Restore pagemask after dumping the TLB.

Or bad things might happen if the last TLB entry isn't a basic size page.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()
Ralf Baechle [Tue, 16 Oct 2012 23:01:12 +0000 (01:01 +0200)]
MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
Sebastien Guiriec [Tue, 16 Oct 2012 18:19:17 +0000 (11:19 -0700)]
ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message

Correct DMIC hwmod lockup error message and replace printk() by
pr_err().

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
Benoit Cousson [Tue, 16 Oct 2012 18:19:17 +0000 (11:19 -0700)]
ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck

The GPMC code has been converted to a driver by the following commit:

 commit da496873970c57c4b31e186d967933da0ffa0d7c
 Author: Afzal Mohammed <afzal@ti.com>
 Date:   Sun Sep 23 17:28:25 2012 -0600

   ARM: OMAP2+: gpmc: minimal driver support

It now requests a clock with con-id "fck" otherwise the probe will fails.

[    0.342010] omap-gpmc omap-gpmc: error: clk_get
[    0.346771] omap-gpmc: probe of omap-gpmc failed with error -2

Add the "omap-gmpc" dev-id and fck con-id to the already existing
gmpc-fck dummy clock.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: resolve sparse warning concerning debug_card_init()
Paul Walmsley [Tue, 16 Oct 2012 18:19:17 +0000 (11:19 -0700)]
ARM: OMAP: resolve sparse warning concerning debug_card_init()

Commit 801475ccb2b2c1928b22aec4b9e5285d9e347602 ("ARM: OMAP: move
debug_card_init() function") results in the following new sparse
warning:

arch/arm/plat-omap/debug-devices.c:71:12: warning: symbol 'debug_card_init' was not declared. Should it be static?

Fix by implementing Tony's suggestion to add a "sideways include" to the
new location of the debug-devices.h file in arch/arm/mach-omap2/.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoUAPI: (Scripted) Disintegrate arch/parisc/include/asm
David Howells [Tue, 16 Oct 2012 20:28:05 +0000 (21:28 +0100)]
UAPI: (Scripted) Disintegrate arch/parisc/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoMerge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc...
David Howells [Tue, 16 Oct 2012 20:28:01 +0000 (21:28 +0100)]
Merge branch 'misc' of git://git./linux/kernel/git/jejb/parisc-2.6.git/

11 years agoMIPS: R5000: Fix TLB hazard handling.
Ralf Baechle [Tue, 16 Oct 2012 20:13:06 +0000 (22:13 +0200)]
MIPS: R5000: Fix TLB hazard handling.

R5000 and the Nevada CPUs (RM5230, RM5231, RM5260, RM5261, RM5270 and
RM5271) are basically the same CPU core and all are documented to require
two instructions separating a write to c0_pagemask, c0_entryhi, c0_entrylo0,
c0_entrylo1 or c0_index.

So far we were only providing on cycle before / after a TLBR/TLBWI
for R5000 but 3 cycles before and 1 cycles after for the Nevadas.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: tlbex: Deal with re-definition of label
Ralf Baechle [Sat, 13 Oct 2012 20:46:26 +0000 (22:46 +0200)]
MIPS: tlbex: Deal with re-definition of label

The microassembler used in tlbex.c does not notice if a label is redefined
resulting in relocations against such labels silently missrelocated.
The issues exists since commit add6eb04776db4189ea89f596cbcde31b899be9d
[Synthesize TLB exception handlers at runtime.] in 2.6.10 and went unnoticed
for so long because the relocations for the affected branches got computed
to do something *almost* sensible.

The issue affects R4000, R4400, QED/IDT RM5230, RM5231, RM5260, RM5261,
RM5270 and RM5271 processors.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Make __{,n,u}delay declarations match definitions and generic delay.h
David Daney [Fri, 28 Sep 2012 18:34:10 +0000 (11:34 -0700)]
MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h

At some recent point arch/mips/include/asm/delay.h has started being
included into csrc-octeon.c where the __?delay() functions are defined.
This causes a compile failure due to conflicting declarations and
definitions of the functions.

It turns out that the generic definitions in arch/mips/lib/delay.c also
conflict.

Proposed fix: Declare the functions to take unsigned long parameters
just like asm-generic (and x86) does.  Update __delay to agree
(__ndelay and __udelay need no change).

Bonus: Get rid of 'inline' from __delay() definition, as it is globally
visible, and the compiler should be making this decision itself (it does
in fact inline the function without being told to).

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4354/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agosparc64: Fix bit twiddling in sparc_pmu_enable_event().
David S. Miller [Tue, 16 Oct 2012 20:05:25 +0000 (13:05 -0700)]
sparc64: Fix bit twiddling in sparc_pmu_enable_event().

There was a serious disconnect in the logic happening in
sparc_pmu_disable_event() vs. sparc_pmu_enable_event().

Event disable is implemented by programming a NOP event into the PCR.

However, event enable was not reversing this operation.  Instead, it
was setting the User/Priv/Hypervisor trace enable bits.

That's not sparc_pmu_enable_event()'s job, that's what
sparc_pmu_enable() and sparc_pmu_disable() do .

The intent of sparc_pmu_enable_event() is clear, since it first clear
out the event type encoding field.  So fix this by OR'ing in the event
encoding rather than the trace enable bits.

Signed-off-by: David S. Miller <davem@davemloft.net>