]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branch 'next/fixes-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 18 Feb 2013 00:03:12 +0000 (16:03 -0800)]
Merge branch 'next/fixes-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/fixes-non-critical

From Kukjin Kim:
Here is Samsung fixes for v3.9 and it is not a critical fixes.

* 'next/fixes-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl
  ARM: SAMSUNG: Silence empty switch warning in fimc-core.h
  ARM: SAMSUNG: Silence empty switch warning in sdhci.h
  ARM: S5PV210: Fix early uart output in fifo mode
  ARM: S3C24XX: Fix compile breakage for SMDK2410
  ARM: S3C24XX: add missing platform_device.h include for osiris
  ARM: S3C24XX: let S3C2412_PM select S3C2412_PM_SLEEP
  ARM: SAMSUNG: Gracefully exit on suspend failure
  ARM: SAMSUNG: using vsnprintf instead of vsprintf for the limit buffer length 256
  ARM: S3C24XX: Make 'clk_msysclk' static

11 years agoARM: imx: MACH_MX31ADS_WM1133_EV1 needs REGULATOR_WM8350
Arnd Bergmann [Thu, 14 Feb 2013 16:45:58 +0000 (17:45 +0100)]
ARM: imx: MACH_MX31ADS_WM1133_EV1 needs REGULATOR_WM8350

MACH_MX31ADS_WM1133_EV1 already depends on REGULATOR_WM8350,
but that still allows REGULATOR_WM8350 to be a loadable
module. Depending on REGULATOR_WM8350 to be built-in
ensures we cannot create a broken configuration.

Without this patch, building allmodconfig results in:

arch/arm/mach-imx/built-in.o: In function `mx31_wm8350_init':
arch/arm/mach-imx/mach-mx31ads.c:461: undefined reference to `wm8350_register_regulator'
arch/arm/mach-imx/mach-mx31ads.c:471: undefined reference to `wm8350_dcdc_set_slot'
arch/arm/mach-imx/mach-mx31ads.c:473: undefined reference to `wm8350_isink_set_flash'
arch/arm/mach-imx/mach-mx31ads.c:480: undefined reference to `wm8350_dcdc25_set_mode'
arch/arm/mach-imx/mach-mx31ads.c:485: undefined reference to `wm8350_register_led'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Axel Lin <axel.lin@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoMerge branch 'warning-fixes' into next/fixes-non-critical
Arnd Bergmann [Thu, 14 Feb 2013 14:05:40 +0000 (15:05 +0100)]
Merge branch 'warning-fixes' into next/fixes-non-critical

These are fixes for compiler warnings that for the most
part were introduced during the 3.8 cycle but are otherwise
harmless.

* warning-fixes:
  scripts/sortextable: silence script output
  ARM: s3c: i2c: add platform_device forward declaration
  ARM: mvebu: allow selecting mvebu without Armada XP
  ARM: pick Versatile by default for !MMU
  ARM: integrator: fix build with INTEGRATOR_AP off
  ARM: integrator/versatile: fix NOMMU warnings
  ARM: sa1100: don't warn about mach/ide.h
  ARM: shmobile: fix defconfig warning on CONFIG_USB
  ARM: w90x900: fix legacy assembly syntax
  ARM: samsung: fix assembly syntax for new gas
  ARM: disable virt_to_bus/virt_to_bus almost everywhere

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoscripts/sortextable: silence script output
Arnd Bergmann [Tue, 27 Nov 2012 09:18:00 +0000 (09:18 +0000)]
scripts/sortextable: silence script output

The exception table sorter outputs one line every time
it gets called, e.g. 'sort done marker at 66dc00', which
is slightly annoying when doing 'make -s' which is otherwise
completely silent. Since that output is not helpful to
most people building the kernel, turn it off by default.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Daney <david.daney@cavium.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
11 years agoARM: s3c: i2c: add platform_device forward declaration
Arnd Bergmann [Wed, 13 Feb 2013 22:08:18 +0000 (23:08 +0100)]
ARM: s3c: i2c: add platform_device forward declaration

A recent cleanup to the mach-osiris.c file is causing build errors
because the i2c-s3c2410.h header file is included before we see
the definition for platform_device. The fix is to make the header file
more robust against inclusion from other places. While this should
normally go through the i2c tree, the bug only exists in arm-soc
at the moment, so it's easier to fix it there before it goes upstream.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/mach-osiris.c:34:0:
include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'struct platform_device' declared inside parameter list [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: mvebu: allow selecting mvebu without Armada XP
Arnd Bergmann [Thu, 14 Feb 2013 12:14:53 +0000 (13:14 +0100)]
ARM: mvebu: allow selecting mvebu without Armada XP

Selecting only CONFIG_ARCH_MVEBU but not the respective
options for Armada 370 or Armada XP results in these
link errors:

arch/arm/mach-mvebu/built-in.o: In function `armada_xp_smp_init_cpus':
arch/arm/mach-mvebu/platsmp.c:91: undefined reference to `coherency_get_cpu_count'
arch/arm/mach-mvebu/platsmp.c:104: undefined reference to `armada_mpic_send_doorbell'
arch/arm/mach-mvebu/built-in.o: In function `armada_xp_smp_prepare_cpus':
arch/arm/mach-mvebu/platsmp.c:111: undefined reference to `set_cpu_coherent'
arch/arm/mach-mvebu/built-in.o: In function `armada_xp_boot_secondary':
arch/arm/mach-mvebu/platsmp.c:83: undefined reference to `armada_xp_boot_cpu'
arch/arm/mach-mvebu/built-in.o: In function `armada_xp_secondary_init':
arch/arm/mach-mvebu/platsmp.c:75: undefined reference to `armada_xp_mpic_smp_cpu_init'
arch/arm/mach-mvebu/built-in.o: In function `armada_xp_secondary_startup':
arch/arm/mach-mvebu/headsmp.S:46: undefined reference to `ll_set_cpu_coherent'

We can solve this by enabling all common MVEBU files that are
referenced by the SMP files. This means we enable code that
is not going to be used without a machine descriptor referencing
it, but only if the kernel is configured specifically for this
case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agoARM: pick Versatile by default for !MMU
Arnd Bergmann [Thu, 14 Feb 2013 12:33:36 +0000 (13:33 +0100)]
ARM: pick Versatile by default for !MMU

The introduction of ARCH_MULTIPLATFORM changed
the default for nommu kernels from Versatile to
Integrator, which is less common, and does not
currently build for allnoconfig because that does
not select any of the CPUs.

This also ensures that at least one of the three
board files in versatile are enabled, which lets
us successfully build an allnoconfig kernel.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
11 years agoARM: integrator: fix build with INTEGRATOR_AP off
Arnd Bergmann [Thu, 14 Feb 2013 12:43:29 +0000 (13:43 +0100)]
ARM: integrator: fix build with INTEGRATOR_AP off

The conditional declaration of ap_uart_data is broken
and causes this build error:

In file included from arch/arm/mach-integrator/core.c:35:0:
arch/arm/mach-integrator/common.h:6:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

Turning the check into an constant-expression if(IS_ENABLED()) statement
creates more readable code and solves this problem as well.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
11 years agoARM: integrator/versatile: fix NOMMU warnings
Arnd Bergmann [Thu, 14 Feb 2013 12:50:57 +0000 (13:50 +0100)]
ARM: integrator/versatile: fix NOMMU warnings

On NOMMU kernels, the io_desc variables are unused
because we don't use the MMU to remap the MMIO
areas.

Marking these variables as __maybe_unused easily
avoids the otherwise harmless warnings like

warning: 'versatile_io_desc' defined but not used

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
11 years agoARM: sa1100: don't warn about mach/ide.h
Arnd Bergmann [Fri, 25 Jan 2013 22:20:40 +0000 (22:20 +0000)]
ARM: sa1100: don't warn about mach/ide.h

This warning has existed since before the start of (git) history.
Apparently nobody has bothered to fix it in a long time, and
this is unlikely to change. Note that the file that the warning
refers to has moved to a different location and was subsequently
deleted in 2008.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
11 years agoARM: shmobile: fix defconfig warning on CONFIG_USB
Arnd Bergmann [Thu, 24 Jan 2013 16:50:32 +0000 (16:50 +0000)]
ARM: shmobile: fix defconfig warning on CONFIG_USB

A recent update to the marzen_defconfig introduced a
duplicate CONFIG_USB=y line. This removes one of the
two.

arch/arm/configs/marzen_defconfig:86:warning: override: reassigning to symbol USB

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: linux-sh@vger.kernel.org
11 years agoARM: w90x900: fix legacy assembly syntax
Arnd Bergmann [Mon, 14 Jan 2013 12:49:02 +0000 (12:49 +0000)]
ARM: w90x900: fix legacy assembly syntax

New ARM binutils don't allow extraneous whitespace inside
of brackets, which causes this error on all mach-w90x900
defconfigs:

arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x10C)]'
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x110)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x10C)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x110)]'

This removes the whitespace in order to build the kernel
again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wan ZongShun <mcuos.com@gmail.com>
11 years agoARM: samsung: fix assembly syntax for new gas
Arnd Bergmann [Tue, 8 Jan 2013 21:58:31 +0000 (21:58 +0000)]
ARM: samsung: fix assembly syntax for new gas

Recent assembler versions complain about extraneous
whitespace inside [] brackets. This fixes all of
these instances for the samsung platforms. We should
backport this to all kernels that might need to
be built with new binutils.

arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S: Assembler messages:
arch/arm/mach-s3c24xx/sleep-s3c2410.S:48: Error: ARM register expected -- `ldr r7,[ r4 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:49: Error: ARM register expected -- `ldr r8,[ r5 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:50: Error: ARM register expected -- `ldr r9,[ r6 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:64: Error: ARM register expected -- `streq r7,[ r4 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:65: Error: ARM register expected -- `streq r8,[ r5 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:66: Error: ARM register expected -- `streq r9,[ r6 ]'
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/mach-s3c24xx/pm-h1940.S: Assembler messages:
arch/arm/mach-s3c24xx/pm-h1940.S:33: Error: ARM register expected -- `ldr pc,[ r0,#((0x0B8)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000)))]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S: Assembler messages:
arch/arm/mach-s3c24xx/sleep-s3c2412.S:60: Error: ARM register expected -- `ldrne r9,[ r1 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:61: Error: ARM register expected -- `strne r9,[ r1 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:62: Error: ARM register expected -- `ldrne r9,[ r2 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:63: Error: ARM register expected -- `strne r9,[ r2 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:64: Error: ARM register expected -- `ldrne r9,[ r3 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:65: Error: ARM register expected -- `strne r9,[ r3 ]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: stable@vger.kernel.org
11 years agoARM: disable virt_to_bus/virt_to_bus almost everywhere
Arnd Bergmann [Mon, 12 Nov 2012 22:16:12 +0000 (22:16 +0000)]
ARM: disable virt_to_bus/virt_to_bus almost everywhere

We are getting a number of warnings about the use of the deprecated
bus_to_virt function in drivers using the ARM ISA DMA API:

drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma':
drivers/parport/parport_pc.c:622:3: warning: 'bus_to_virt' is deprecated
(declared at arch/arm/include/asm/memory.h:253) [-Wdeprecated-declarations]

This is only because that function gets used by the inline
set_dma_addr() helper. We know that any driver for the ISA DMA API
is correctly using the DMA addresses, so we can change this
to use the __bus_to_virt() function instead, which does not warn.

After this, there are no remaining drivers that are used on
any defconfigs on ARM using virt_to_bus or bus_to_virt, with
the exception of the OSS sound driver. That driver is only used
on RiscPC, NetWinder and Shark, so we can set ARCH_NO_VIRT_TO_BUS
on all other platforms and hide the deprecated functions, which
is far more effective than marking them as deprecated, in order
to avoid any new users of that code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
11 years agoMerge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into next/fixes-non...
Olof Johansson [Tue, 12 Feb 2013 23:04:11 +0000 (15:04 -0800)]
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into next/fixes-non-critical

From Nicolas Ferre:
Correction of 9x5 and 9n12 USART nodes

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/DT: remove atmel,use-dma-* from 9x5 and 9n12 USART nodes

11 years agoMerge branch 'fixes-for-3.9' into next/fixes-non-critical
Olof Johansson [Tue, 12 Feb 2013 23:03:14 +0000 (15:03 -0800)]
Merge branch 'fixes-for-3.9' into next/fixes-non-critical

This is a branch of fixes that originally were scheduled for 3.8 but
due to the request from Linus to hold back on all but the most critical
of fixes, we're re-queueing them for 3.9 here.

* fixes-for-3.9:
  ARM: dts: imx6: fix fec ptp clock slow 10 time
  ARM: highbank: mask cluster id from cpu_logical_map
  ARM: scu: mask cluster id from cpu_logical_map
  ARM: scu: add empty scu_enable for !CONFIG_SMP
  ARM: at91/at91sam9x5.dtsi: fix usart3 TXD
  ARM: at91: at91sam9x5: fix usart3 pinctrl name
  ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
  ARM: dts: fix tick and alarm irq numbers for exynos5440
  ARM: dts: fix compatible value for exynos pinctrl
  ARM: dts: Fix compatible value of pinctrl module on EXYNOS5440
  ARM: S3C24XX: fix uninitialized variable warning
  mfd/vexpress: vexpress_sysreg_setup must not be __init
  ARM: ux500: Fix u9540 booting issues
  arm: mvebu: i2c come back in defconfig
  arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  Dove: activate GPIO interrupts in DT
  ARM: ux500: add spin_unlock(&master_lock).
  ARM: ux500: Disable Power Supply and Battery Management by default

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl
Shirish S [Tue, 12 Feb 2013 18:35:40 +0000 (10:35 -0800)]
ARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl

This patch corrects the pin function value of sd4_bus8
from 3 to 4. This is verified on origen board for testing
eMMC on dw_mci controller.

Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: SAMSUNG: Silence empty switch warning in fimc-core.h
Sachin Kamat [Tue, 12 Feb 2013 18:27:55 +0000 (10:27 -0800)]
ARM: SAMSUNG: Silence empty switch warning in fimc-core.h

Add 'default' case to silence the below warning:
arch/arm/plat-samsung/include/plat/fimc-core.h:25:9:
warning: switch with no cases

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: SAMSUNG: Silence empty switch warning in sdhci.h
Sachin Kamat [Tue, 12 Feb 2013 18:27:52 +0000 (10:27 -0800)]
ARM: SAMSUNG: Silence empty switch warning in sdhci.h

Add 'default' case to silence the following warning:
arch/arm/plat-samsung/include/plat/sdhci.h:356:9: warning: switch with no cases

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: msm: proc_comm_boot_wait should not be __init
Arnd Bergmann [Fri, 25 Jan 2013 14:14:20 +0000 (14:14 +0000)]
ARM: msm: proc_comm_boot_wait should not be __init

msm_smd_probe is a driver probe function and may get
called after the __init time, so it must not call
any __init function, as the link-time warning reports.
Take away the __init annotation on proc_comm_boot_wait
to fix this.

Without this patch, building msm_defconfig results in:

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

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Daniel Walker <c_dwalke@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoarm: vt8500: Update MAINTAINERS entry for arch-vt8500
Tony Prisk [Fri, 8 Feb 2013 05:18:03 +0000 (18:18 +1300)]
arm: vt8500: Update MAINTAINERS entry for arch-vt8500

Sort the VT8500 entries in alphabetical order and add missing entries
for the files.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: integrator: ensure ap_syscon_base is initialised when !CONFIG_MMU
Will Deacon [Wed, 6 Feb 2013 18:25:12 +0000 (18:25 +0000)]
ARM: integrator: ensure ap_syscon_base is initialised when !CONFIG_MMU

When running on Integrator/AP using atags, ap_syscon_base is initialised
in ->map_io, which isn't called for !MMU platforms.

Instead, initialise the pointer in ->machine_init, as we do when booting
with device-tree.

Cc: stable@vger.kernel.org
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: S5PV210: Fix early uart output in fifo mode
Alexey Galakhov [Fri, 8 Feb 2013 21:44:43 +0000 (13:44 -0800)]
ARM: S5PV210: Fix early uart output in fifo mode

Enabling UART FIFO in bootloader caused the kernel infinite
loop on S5PV210 due to uninitialized fifo_max and fifo_mask global
variables. This patch adds the correct initialization.

Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: Fix compile breakage for SMDK2410
Alexander Shiyan [Fri, 8 Feb 2013 21:41:36 +0000 (13:41 -0800)]
ARM: S3C24XX: Fix compile breakage for SMDK2410

Symbol S3C_DEV_USB_HOST should be defined to avoid this problem.

  LINK    vmlinux
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
arch/arm/mach-s3c24xx/built-in.o:(.init.data+0x660): undefined reference to `s3c_device_ohci'
make: *** [vmlinux] Error 1

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: add missing platform_device.h include for osiris
Heiko Stuebner [Fri, 8 Feb 2013 19:13:16 +0000 (11:13 -0800)]
ARM: S3C24XX: add missing platform_device.h include for osiris

The missing include led to a implcit declaration warning:

In file included from arch/arm/mach-s3c24xx/mach-osiris.c:34:0:
include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:37:26: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:66:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:67:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:68:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:69:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:70:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:71:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:72:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]
include/linux/platform_data/i2c-s3c2410.h:73:38: warning: 'struct platform_device' declared inside parameter list [enabled by default]

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: let S3C2412_PM select S3C2412_PM_SLEEP
Heiko Stuebner [Fri, 8 Feb 2013 19:13:15 +0000 (11:13 -0800)]
ARM: S3C24XX: let S3C2412_PM select S3C2412_PM_SLEEP

The code to enter sleep is used by both the s3c2412 and s3c2416 and
was thus factored out into an extra config option.

But it seems it was forgotten to add the appropriate select to the
s3c2412 pm option, resulting in breakage when only compiling s3c2412
support.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoMerge tag 'omap-for-v3.9/fixes-non-critical-signed-v2' of git://git.kernel.org/pub...
Olof Johansson [Tue, 5 Feb 2013 21:55:59 +0000 (13:55 -0800)]
Merge tag 'omap-for-v3.9/fixes-non-critical-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical

From Tony Lindgren:
Few fixes for v3.9 merge window that are not urgent for
the -rc series.

* tag 'omap-for-v3.9/fixes-non-critical-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: using strlcpy instead of strncpy
  ARM: OMAP2+: Fix selection of clockevent timer when using device-tree
  ARM: OMAP: Fix the use of uninitialized dma_lch_count
  ARM: OMAP: make wakeupgen_lock raw
  + Linux 3.8-rc6

11 years agoMerge tag 'imx-fixes-3.8-4' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Olof Johansson [Tue, 5 Feb 2013 18:33:01 +0000 (10:33 -0800)]
Merge tag 'imx-fixes-3.8-4' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo:
imx fixes for 3.8, take 4

 - It fixes fec ptp clock pointer in device tree source.

* tag 'imx-fixes-3.8-4' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: dts: imx6: fix fec ptp clock slow 10 time

11 years agoMerge tag 'highbank-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux into...
Olof Johansson [Tue, 5 Feb 2013 18:31:42 +0000 (10:31 -0800)]
Merge tag 'highbank-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux into fixes

From Rob Herring:
highbank fixes for 3.8

-Compile fix for !SMP
-More cpu cluster id related fixes

* tag 'highbank-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux:
  ARM: highbank: mask cluster id from cpu_logical_map
  ARM: scu: mask cluster id from cpu_logical_map
  ARM: scu: add empty scu_enable for !CONFIG_SMP

11 years agoARM: at91/DT: remove atmel,use-dma-* from 9x5 and 9n12 USART nodes
Nicolas Ferre [Wed, 30 Jan 2013 14:32:26 +0000 (15:32 +0100)]
ARM: at91/DT: remove atmel,use-dma-* from 9x5 and 9n12 USART nodes

Fix the use of USART on both at91sam9x5 and at91sam9n12. In DTS, the
atmel,use-dma-[rx|tx] property is present but a DMA channel cannot be used.
Indeed the connexion between the DMA engine and the slave is not implemented
yet in Device Tree.
Note however that this property is also used for PDC (private DMA) on older
SoCs. This is why the driver alone cannot determine the validity of this
property.

Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [3.8+]
11 years agoARM: dts: imx6: fix fec ptp clock slow 10 time
Frank Li [Tue, 5 Feb 2013 06:21:06 +0000 (14:21 +0800)]
ARM: dts: imx6: fix fec ptp clock slow 10 time

ptp should use enet_ref instead of pll6_enet
pll6_enet is fixed 500Mhz.
There are divider between enet_ref and pll6_enet

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: OMAP2+: using strlcpy instead of strncpy
Chen Gang [Wed, 30 Jan 2013 11:46:49 +0000 (19:46 +0800)]
ARM: OMAP2+: using strlcpy instead of strncpy

the fields must be null-terminated:
the caller may use it as null-terminted string, next.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2+: Fix selection of clockevent timer when using device-tree
Jon Hunter [Tue, 29 Jan 2013 20:23:11 +0000 (14:23 -0600)]
ARM: OMAP2+: Fix selection of clockevent timer when using device-tree

Commit 9725f44 (ARM: OMAP: Add DT support for timer driver) added
device-tree support for selecting a clockevent timer by property.
However, the code is currently ignoring the property passed and
selecting the first available timer found. Hence, for the OMAP3 beagle
board timer-12 is not being selected as expected. Fix this problem
by ensuring the timer property is passed to omap_get_timer_dt().

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: Fix the use of uninitialized dma_lch_count
Chen Gang [Fri, 11 Jan 2013 05:39:18 +0000 (13:39 +0800)]
ARM: OMAP: Fix the use of uninitialized dma_lch_count

  'omap_dma_reserve_channels' when used is suppose to be from command.
    so, it alreay has value before 1st call of omap_system_dma_probe.
    and it will never be changed again during running (not from ioctl).

  but 'dma_lch_count' is zero before 1st call of omap_system_dma_probe.
    so it will be failed for omap_dma_reserve_channels, when 1st call.

  so, need use 'd->lch_count' instead of 'dma_lch_count' for judging.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP: make wakeupgen_lock raw
Thomas Gleixner [Fri, 7 Dec 2012 14:49:47 +0000 (16:49 +0200)]
ARM: OMAP: make wakeupgen_lock raw

When applying RT patch on top of Linux, spinlocks are
implemented as RT-mutexes, which means they are preemptable.

Current GIC implementation on OMAP is using a spinlock
to protect against preemption. As it turns out, we need
to convert that lock into a raw_spinlock so that OMAP's
interrupt controller works as expected after RT-patch
is applied.

This patch is simply to decrease the amount of changes
RT-team needs to carry out of tree. It doesn't cause any
changes in behavior.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
11 years agoLinux 3.8-rc6 v3.8-rc6
Linus Torvalds [Fri, 1 Feb 2013 01:08:14 +0000 (12:08 +1100)]
Linux 3.8-rc6

11 years agoMerge tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm
Linus Torvalds [Fri, 1 Feb 2013 01:04:22 +0000 (12:04 +1100)]
Merge tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm

Pull more device-mapper fixes from Alasdair G Kergon:
 "A fix for stacked dm thin devices and a fix for the new dm WRITE SAME
  support."

* tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
  dm: fix write same requests counting
  dm thin: fix queue limits stacking

11 years agoMerge branch 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 31 Jan 2013 21:44:59 +0000 (08:44 +1100)]
Merge branch 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

PullHID fixes from Jiri Kosina:

 - fix i2c-hid and hidraw interaction, by Benjamin Tissoires

 - a quirk to make a particular device (Formosa IR receiver) work
   properly, by Nicholas Santos

* 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: i2c-hid: fix i2c_hid_output_raw_report
  HID: usbhid: quirk for Formosa IR receiver
  HID: remove x bit from sensor doc

11 years agoMerge tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Thu, 31 Jan 2013 21:43:52 +0000 (08:43 +1100)]
Merge tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - Error reporting in nfs_xdev_mount incorrectly maps all errors to
   ENOMEM

 - Fix an NFSv4 refcounting issue

 - Fix a mount failure when the server reboots during NFSv4 trunking
   discovery

 - NFSv4.1 mounts may need to run the lease recovery thread.

 - Don't silently fail setattr() requests on mountpoints

 - Fix a SUNRPC socket/transport livelock and priority queue issue

 - We must handle NFS4ERR_DELAY when resetting the NFSv4.1 session.

* tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session
  SUNRPC: When changing the queue priority, ensure that we change the owner
  NFS: Don't silently fail setattr() requests on mountpoints
  NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery
  NFSv4: Fix NFSv4 trunking discovery
  NFSv4: Fix NFSv4 reference counting for trunked sessions
  NFS: Fix error reporting in nfs_xdev_mount

11 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Thu, 31 Jan 2013 21:43:04 +0000 (08:43 +1100)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "A number of fixes all across the MIPS tree.  No area is particularly
  standing out and things have cooled down quite nicely for a release."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Function tracer: Fix broken function tracing
  mips: Move __virt_addr_valid() to a place for MIPS 64
  MIPS: Netlogic: Fix UP compilation on XLR
  MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE
  MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE
  MIPS: Lantiq: Fix cp0_perfcount_irq mapping
  MIPS: DSP: Fix DSP mask for registers.
  MIPS: Fix build failure by adding definition of pfn_pmd().
  MIPS: Octeon: Fix warning.
  MIPS: delay.c: Check BITS_PER_LONG instead of __SIZEOF_LONG__
  MIPS: PNX833x: Fix comment.
  MIPS: Add struct p_format to union mips_instruction.
  MIPS: Export <asm/break.h>.
  MIPS: BCM47xx: Enable SSB prerequisite SSB_DRIVER_PCICORE.
  MIPS: BCM47xx: Select GPIOLIB for BCMA on bcm47xx platform
  MIPS: vpe.c: Fix null pointer dereference in print arguments.

11 years agoARM: highbank: mask cluster id from cpu_logical_map
Rob Herring [Thu, 31 Jan 2013 19:28:42 +0000 (13:28 -0600)]
ARM: highbank: mask cluster id from cpu_logical_map

With commit a0ae0240 (ARM: kernel: add device tree init map function),
the cpu id value may include the cluster id and is no longer 0-3, so we
need to mask it now to get the right hard cpu index.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoARM: scu: mask cluster id from cpu_logical_map
Rob Herring [Thu, 31 Jan 2013 19:26:29 +0000 (13:26 -0600)]
ARM: scu: mask cluster id from cpu_logical_map

With commit a0ae0240 (ARM: kernel: add device tree init map function),
the cpu id value may include the cluster id and is no longer 0-3, so we
need to mask it in scu_power_mode to get the local cpu number. Since we
are only dealing with the cpu we are running on, the cluster id should
not ever be needed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoARM: scu: add empty scu_enable for !CONFIG_SMP
Rob Herring [Thu, 31 Jan 2013 15:26:06 +0000 (09:26 -0600)]
ARM: scu: add empty scu_enable for !CONFIG_SMP

Add an empty version of scu_enable for !SMP builds. This fixes
compile error for highbank suspend code on !SMP builds.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoHID: i2c-hid: fix i2c_hid_output_raw_report
Benjamin Tissoires [Thu, 31 Jan 2013 16:50:02 +0000 (17:50 +0100)]
HID: i2c-hid: fix i2c_hid_output_raw_report

i2c_hid_output_raw_report is used by hidraw to forward set_report requests.
The current implementation of i2c_hid_set_report needs to take the
report_id as an argument. The report_id is stored in the first byte
of the buffer in argument of i2c_hid_output_raw_report.

Not removing the report_id from the given buffer adds this byte 2 times
in the command, leading to a non working command.

Reported-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoMIPS: Function tracer: Fix broken function tracing
Al Cooper [Wed, 16 Jan 2013 22:43:28 +0000 (22:43 +0000)]
MIPS: Function tracer: Fix broken function tracing

Function tracing is currently broken for all 32 bit MIPS platforms.
When tracing is enabled, the kernel immediately hangs on boot.
This is a result of commit b732d439cb43336cd6d7e804ecb2c81193ef63b0
that changes the kernel/trace/Kconfig file so that is no longer
forces FRAME_POINTER when FUNCTION_TRACING is enabled.

MIPS frame pointers are generally considered to be useless because
they cannot be used to unwind the stack. Unfortunately the MIPS
function tracing code has bugs that are masked by the use of frame
pointers. This commit fixes the bugs so that MIPS frame pointers
don't need to be enabled.

The bugs are a result of the odd calling sequence used to call the trace
routine. This calling sequence is inserted into every traceable function
when the tracing CONFIG option is enabled. This sequence is generated
for 32bit MIPS platforms by the compiler via the "-pg" flag.

Part of the sequence is "addiu sp,sp,-8" in the delay slot after every
call to the trace routine "_mcount" (some legacy thing where 2 arguments
used to be pushed on the stack). The _mcount routine is expected to
adjust the sp by +8 before returning.  So when not disabled, the original
jalr and addiu will be there, so _mcount has to adjust sp.

The problem is that when tracing is disabled for a function, the
"jalr _mcount" instruction is replaced with a nop, but the
"addiu sp,sp,-8" is still executed and the stack pointer is left
trashed. When frame pointers are enabled the problem is masked
because any access to the stack is done through the frame
pointer and the stack pointer is restored from the frame pointer when
the function returns.

This patch writes two nops starting at the address of the "jalr _mcount"
instruction whenever tracing is disabled. This means that the
"addiu sp,sp.-8" will be converted to a nop along with the "jalr".  When
disabled, there will be two nops.

This is SMP safe because the first time this happens is during
ftrace_init() which is before any other processor has been started.
Subsequent calls to enable/disable tracing when other CPUs ARE running
will still be safe because the enable will only change the first nop
to a "jalr" and the disable, while writing 2 nops, will only be changing
the "jalr". This patch also stops using stop_machine() to call the
tracer enable/disable routines and calls them directly because the
routines are SMP safe.

When the kernel first boots we have to be able to handle the gcc
generated jalr, addui sequence until ftrace_init gets a chance to run
and change the sequence. At this point mcount just adjusts the stack
and returns. When ftrace_init runs, we convert the jalr/addui to nops.
Then whenever tracing is enabled we convert the first nop to a "jalr
mcount+8". The mcount+8 entry point skips the stack adjust.

[ralf@linux-mips.org: Folded in  Steven Rostedt's build fix.]

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Cc: rostedt@goodmis.org
Cc: ddaney.cavm@gmail.com
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/4806/
Patchwork: https://patchwork.linux-mips.org/patch/4841/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agodm: fix write same requests counting
Alasdair G Kergon [Thu, 31 Jan 2013 14:23:36 +0000 (14:23 +0000)]
dm: fix write same requests counting

When processing write same requests, fix dm to send the configured
number of WRITE SAME requests to the target rather than the number of
discards, which is not always the same.

Device-mapper WRITE SAME support was introduced by commit
23508a96cd2e857d57044a2ed7d305f2d9daf441 ("dm: add WRITE SAME support").

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
11 years agomips: Move __virt_addr_valid() to a place for MIPS 64
Steven Rostedt [Fri, 25 Jan 2013 17:13:15 +0000 (17:13 +0000)]
mips: Move __virt_addr_valid() to a place for MIPS 64

Commit d3ce88431892 "MIPS: Fix modpost error in modules attepting to use
virt_addr_valid()" moved __virt_addr_valid() from a macro in a header
file to a function in ioremap.c. But ioremap.c is only compiled for MIPS
32, and not for MIPS 64.

When compiling for my yeeloong2, which supposedly supports hibernation,
which compiles kernel/power/snapshot.c which calls virt_addr_valid(), I
got this error:

  LD      init/built-in.o
kernel/built-in.o: In function `memory_bm_free':
snapshot.c:(.text+0x4c9c4): undefined reference to `__virt_addr_valid'
snapshot.c:(.text+0x4ca58): undefined reference to `__virt_addr_valid'
kernel/built-in.o: In function `snapshot_write_next':
(.text+0x4e44c): undefined reference to `__virt_addr_valid'
kernel/built-in.o: In function `snapshot_write_next':
(.text+0x4e890): undefined reference to `__virt_addr_valid'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2

I suspect that __virt_addr_valid() is fine for mips 64. I moved it to
mmap.c such that it gets compiled for mips 64 and 32.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4842/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agodm thin: fix queue limits stacking
Mike Snitzer [Thu, 31 Jan 2013 14:11:14 +0000 (14:11 +0000)]
dm thin: fix queue limits stacking

thin_io_hints() is blindly copying the queue limits from the thin-pool
which can lead to incorrect limits being set.  The fix here simply
deletes the thin_io_hints() hook which leaves the existing stacking
infrastructure to set the limits correctly.

When a thin-pool uses an MD device for the data device a thin device
from the thin-pool must respect MD's constraints about disallowing a bio
from spanning multiple chunks.  Otherwise we can see problems.  If the raid0
chunksize is 1152K and thin-pool chunksize is 256K I see the following
md/raid0 error (with extra debug tracing added to thin_endio) when
mkfs.xfs is executed against the thin device:

md/raid0:md99: make_request bug: can't convert block across chunks or bigger than 1152k 6688 127
device-mapper: thin: bio sector=2080 err=-5 bi_size=130560 bi_rw=17 bi_vcnt=32 bi_idx=0

This extra DM debugging shows that the failing bio is spanning across
the first and second logical 1152K chunk (sector 2080 + 255 takes the
bio beyond the first chunk's boundary of sector 2304).  So the bio
splitting that DM is doing clearly isn't respecting the MD limits.

max_hw_sectors_kb is 127 for both the thin-pool and thin device
(queue_max_hw_sectors returns 255 so we'll excuse sysfs's lack of
precision).  So this explains why bi_size is 130560.

But the thin device's max_hw_sectors_kb should be 4 (PAGE_SIZE) given
that it doesn't have a .merge function (for bio_add_page to consult
indirectly via dm_merge_bvec) yet the thin-pool does sit above an MD
device that has a compulsory merge_bvec_fn.  This scenario is exactly
why DM must resort to sending single PAGE_SIZE bios to the underlying
layer. Some additional context for this is available in the header for
commit 8cbeb67a ("dm: avoid unsupported spanning of md stripe boundaries").

Long story short, the reason a thin device doesn't properly get
configured to have a max_hw_sectors_kb of 4 (PAGE_SIZE) is that
thin_io_hints() is blindly copying the queue limits from the thin-pool
device directly to the thin device's queue limits.

Fix this by eliminating thin_io_hints.  Doing so is safe because the
block layer's queue limits stacking already enables the upper level thin
device to inherit the thin-pool device's discard and minimum_io_size and
optimal_io_size limits that get set in pool_io_hints.  But avoiding the
queue limits copy allows the thin and thin-pool limits to be different
where it is important, namely max_hw_sectors_kb.

Reported-by: Daniel Browning <db@kavod.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
11 years agoARM: SAMSUNG: Gracefully exit on suspend failure
Abhilash Kesavan [Fri, 25 Jan 2013 18:40:19 +0000 (10:40 -0800)]
ARM: SAMSUNG: Gracefully exit on suspend failure

As per the Exynos5250 User Manual:
When there are pending interrupt events, WFI/WFE instruction are
ignored. To cancel the power-down sequence follow these steps:
1) Disable system power-down using CENTRAL_SEQ_CONFIGURATION register
2) Clear WAKEUP_STAT register
3) Enable interrupt service routine for CPU

Code for early wakeup for exynos already exists. Remove the panic
on suspend failure, clear the wakeup state register and return 1
from cpu_suspend to indicate a failed suspend (to a user daemon).

Older Samsung SoCs have similar panics and I have removed them all.
Haven't touched the S3C2410 sleep code.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: SAMSUNG: using vsnprintf instead of vsprintf for the limit buffer length 256
Chen Gang [Fri, 25 Jan 2013 18:29:01 +0000 (10:29 -0800)]
ARM: SAMSUNG: using vsnprintf instead of vsprintf for the limit buffer length 256

the buff is 256 limited, so need use vsnprintf instead of vsprintf

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Ben Dooks <ben@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: Make 'clk_msysclk' static
Sachin Kamat [Wed, 16 Jan 2013 23:53:48 +0000 (15:53 -0800)]
ARM: S3C24XX: Make 'clk_msysclk' static

Fixes the following warning:
arch/arm/mach-s3c24xx/common-s3c2443.c:135:19: warning:
symbol 'clk_msysclk' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoMerge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 31 Jan 2013 06:10:36 +0000 (17:10 +1100)]
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 EFI fixes from Peter Anvin:
 "This is a collection of fixes for the EFI support.  The controversial
  bit here is a set of patches which bumps the boot protocol version as
  part of fixing some serious problems with the EFI handover protocol,
  used when booting under EFI using a bootloader as opposed to directly
  from EFI.  These changes should also make it a lot saner to support
  cross-mode 32/64-bit EFI booting in the future.  Getting these changes
  into 3.8 means we avoid presenting an inconsistent ABI to bootloaders.

  Other changes are display detection and fixing efivarfs."

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, efi: remove attribute check from setup_efi_pci
  x86, build: Dynamically find entry points in compressed startup code
  x86, efi: Fix PCI ROM handing in EFI boot stub, in 32-bit mode
  x86, efi: Fix 32-bit EFI handover protocol entry point
  x86, efi: Fix display detection in EFI boot stub
  x86, boot: Define the 2.12 bzImage boot protocol
  x86/boot: Fix minor fd leakage in tools/relocs.c
  x86, efi: Set runtime_version to the EFI spec revision
  x86, efi: fix 32-bit warnings in setup_efi_pci()
  efivarfs: Delete dentry from dcache in efivarfs_file_write()
  efivarfs: Never return ENOENT from firmware
  efi, x86: Pass a proper identity mapping in efi_call_phys_prelog
  efivarfs: Drop link count of the right inode

11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 31 Jan 2013 06:08:43 +0000 (17:08 +1100)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "This is a collection of miscellaneous fixes, the most important one is
  the fix for the Samsung laptop bricking issue (auto-blacklisting the
  samsung-laptop driver); the efi_enabled() changes you see below are
  prerequisites for that fix.

  The other issues fixed are booting on OLPC XO-1.5, an UV fix, NMI
  debugging, and requiring CAP_SYS_RAWIO for MSR references, just as
  with I/O port references."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  samsung-laptop: Disable on EFI hardware
  efi: Make 'efi_enabled' a function to query EFI facilities
  smp: Fix SMP function call empty cpu mask race
  x86/msr: Add capabilities check
  x86/dma-debug: Bump PREALLOC_DMA_DEBUG_ENTRIES
  x86/olpc: Fix olpc-xo1-sci.c build errors
  arch/x86/platform/uv: Fix incorrect tlb flush all issue
  x86-64: Fix unwind annotations in recent NMI changes
  x86-32: Start out cr0 clean, disable paging before modifying cr3/4

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 31 Jan 2013 06:04:46 +0000 (17:04 +1100)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull console lockdep checking revert from Dave Airlie.

The lockdep splat this showed was interesting, but it's very very old,
and we won't be fixing it until 3.9.  In the meantime, undo the lockdep
annotation so that we don't generate the (known) console lockdep issue,
and then possibly hide any potential other (unknown) lockdep problems
that got disabled by the first one that triggered.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  Revert "console: implement lockdep support for console_lock"

11 years agoRevert "console: implement lockdep support for console_lock"
Dave Airlie [Thu, 31 Jan 2013 03:27:03 +0000 (14:27 +1100)]
Revert "console: implement lockdep support for console_lock"

This reverts commit daee779718a319ff9f83e1ba3339334ac650bb22.

I'll requeue this after the console locking fixes, so lockdep
is useful again for people until fbcon is fixed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoNFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session
Trond Myklebust [Wed, 30 Jan 2013 18:04:10 +0000 (13:04 -0500)]
NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session

NFS4ERR_DELAY is a legal reply when we call DESTROY_SESSION. It
usually means that the server is busy handling an unfinished RPC
request. Just sleep for a second and then retry.
We also need to be able to handle the NFS4ERR_BACK_CHAN_BUSY return
value. If the NFS server has outstanding callbacks, we just want to
similarly sleep & retry.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agoSUNRPC: When changing the queue priority, ensure that we change the owner
Trond Myklebust [Sun, 27 Jan 2013 19:20:49 +0000 (14:20 -0500)]
SUNRPC: When changing the queue priority, ensure that we change the owner

This fixes a livelock in the xprt->sending queue where we end up never
making progress on lower priority tasks because sleep_on_priority()
keeps adding new tasks with the same owner to the head of the queue,
and priority bumps mean that we keep resetting the queue->owner to
whatever task is at the head of the queue.

Regression introduced by commit c05eecf636101dd4347b2d8fa457626bf0088e0a
(SUNRPC: Don't allow low priority tasks to pre-empt higher priority ones).

Reported-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoMerge tag 'efi-for-3.8' into x86/efi
H. Peter Anvin [Wed, 30 Jan 2013 22:43:05 +0000 (14:43 -0800)]
Merge tag 'efi-for-3.8' into x86/efi

Various urgent EFI fixes and some warning cleanups for v3.8

  * EFI boot stub fix for Macbook Pro's from Maarten Lankhorst
  * Fix an oops in efivarfs from Lingzhu Xiang
  * 32-bit warning cleanups from Jan Beulich
  * Patch to Boot on >512GB RAM systems from Nathan Zimmer
  * Set efi.runtime_version correctly
  * efivarfs updates

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoNFS: Don't silently fail setattr() requests on mountpoints
Trond Myklebust [Tue, 22 Jan 2013 05:17:06 +0000 (00:17 -0500)]
NFS: Don't silently fail setattr() requests on mountpoints

Ensure that any setattr and getattr requests for junctions and/or
mountpoints are sent to the server. Ever since commit
0ec26fd0698 (vfs: automount should ignore LOOKUP_FOLLOW), we have
silently dropped any setattr requests to a server-side mountpoint.
For referrals, we have silently dropped both getattr and setattr
requests.

This patch restores the original behaviour for setattr on mountpoints,
and tries to do the same for referrals, provided that we have a
filehandle...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agoMIPS: Netlogic: Fix UP compilation on XLR
Jayachandran C [Mon, 7 Jan 2013 13:21:08 +0000 (13:21 +0000)]
MIPS: Netlogic: Fix UP compilation on XLR

The commit 2a37b1a "MIPS: Netlogic: Move from u32 cpumask to cpumask_t"
breaks uniprocessor compilation on XLR with:

arch/mips/netlogic/xlr/setup.c: In function 'prom_init':
arch/mips/netlogic/xlr/setup.c:196:6: error: unused variable 'i'

Fix by defining 'i' only when CONFIG_SMP is defined.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/4760/
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE
Gabor Juhos [Tue, 29 Jan 2013 08:27:04 +0000 (08:27 +0000)]
MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE

The base address of the PCI memory is 0x10000000 and the base address of the
PCI configuration space is 0x17000000 on the AR71xx SoCs.

The AR71XX_PCI_MEM_SIZE is defined as 0x08000000 which is wrong because that
overlaps with the configuration space.  This patch fixes the value of the
AR71XX_PCI_MEM_SIZE constant, in order to avoid this resource conflicts.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4873/
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: AR724x: Fix AR724X_PCI_MEM_SIZE
Gabor Juhos [Tue, 29 Jan 2013 08:27:03 +0000 (08:27 +0000)]
MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE

The base address of the PCI memory is
0x10000000 and the base address of the
PCI configuration space is 0x14000000
on the AR724x SoCs.

The AR724X_PCI_MEM_SIZE is defined as
0x08000000 which is wrong because that
overlaps  with the configuration space.

The patch fixes the value of the
AR724X_PCI_MEM_SIZE constant, in order
to avoid this resource conflicts.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4872/
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Lantiq: Fix cp0_perfcount_irq mapping
John Crispin [Tue, 29 Jan 2013 18:46:02 +0000 (18:46 +0000)]
MIPS: Lantiq: Fix cp0_perfcount_irq mapping

The introduction of the OF support broke the cp0_perfcount_irq mapping. This
resulted in oprofile not working anymore.

Offending commit is :

commit 3645da0276ae9f6938ff29b13904b803ecb68424
Author: John Crispin <blogic@openwrt.org>
Date:   Tue Apr 17 10:18:32 2012 +0200

OF: MIPS: lantiq: implement irq_domain support

Signed-off-by: Conor O'Gorman <i@conorogorman.net>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4875/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agosamsung-laptop: Disable on EFI hardware
Matt Fleming [Thu, 3 Jan 2013 09:02:37 +0000 (09:02 +0000)]
samsung-laptop: Disable on EFI hardware

It has been reported that running this driver on some Samsung laptops
with EFI can cause those machines to become bricked as detailed in the
following report,

https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

There have also been reports of this driver causing Machine Check
Exceptions on recent EFI-enabled Samsung laptops,

https://bugzilla.kernel.org/show_bug.cgi?id=47121

So disable it if booting from EFI since this driver relies on
grovelling around in the BIOS memory map which isn't going to work.

Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Steve Langasek <steve.langasek@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoefi: Make 'efi_enabled' a function to query EFI facilities
Matt Fleming [Wed, 14 Nov 2012 09:42:35 +0000 (09:42 +0000)]
efi: Make 'efi_enabled' a function to query EFI facilities

Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Cc: David Airlie <airlied@linux.ie>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Peter Jones <pjones@redhat.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Steve Langasek <steve.langasek@canonical.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoMerge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
Olof Johansson [Wed, 30 Jan 2013 17:37:10 +0000 (09:37 -0800)]
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

From Nicolas Ferre:
Two little Device Tree fixes for USART on at91sam9x5.

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/at91sam9x5.dtsi: fix usart3 TXD
  ARM: at91: at91sam9x5: fix usart3 pinctrl name

11 years agoMerge tag 'edac_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Wed, 30 Jan 2013 11:32:48 +0000 (22:32 +1100)]
Merge tag 'edac_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull EDAC fixlets from Borislav Petkov:
 "Two minor correctness fixlets from Dan Carpenter and Joe Perches each."

* tag 'edac_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC: Fix kcalloc argument order
  EDAC: Test correct variable in ->store function

11 years agoMerge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 30 Jan 2013 11:20:48 +0000 (22:20 +1100)]
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:

 - A collection of small ASoC driver fixes (error path fixes, register
   correction, regulator bypass mode fix, etc)

 - A few regression fixes and quirks of HD-audio (wrong page attributes
   for SG-buffer, Poulsbo/Oaktrail controller fix, digital mic fix for
   Acer, etc)

 - A fix for USB-audio UAC2 devices wrt FU length check

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix non-snoop page handling
  ALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail
  ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5
  ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices
  ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880
  ASoC: wm_adsp: Release firmware on error
  ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
  ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK
  ASoC: wm2200: correct mixer values and text
  ASoC: MAINTAINERS: Update email address.
  ASoC: wm5110: Correct AEC loopback mask
  ASoC: wm5102: Correct AEC loopback mask
  ASoC: dapm: Fix sense of regulator bypass mode
  ASoC: fsl: fix multiple definition of init_module
  ASoC: arizona: Disable free-running mode on FLL1

11 years agoEDAC: Fix kcalloc argument order
Joe Perches [Sat, 26 Jan 2013 19:24:00 +0000 (11:24 -0800)]
EDAC: Fix kcalloc argument order

First number, then size.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
11 years agoEDAC: Test correct variable in ->store function
Dan Carpenter [Sat, 26 Jan 2013 07:49:24 +0000 (10:49 +0300)]
EDAC: Test correct variable in ->store function

We're testing for ->show but calling ->store().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Borislav Petkov <bp@suse.de>
11 years agoARM: at91/at91sam9x5.dtsi: fix usart3 TXD
Douglas Gilbert [Wed, 30 Jan 2013 09:09:17 +0000 (10:09 +0100)]
ARM: at91/at91sam9x5.dtsi: fix usart3 TXD

Comment for usart3 TXD (TXD3) is correct, dt code is wrong.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91: at91sam9x5: fix usart3 pinctrl name
Robert Nelson [Mon, 28 Jan 2013 15:43:36 +0000 (09:43 -0600)]
ARM: at91: at91sam9x5: fix usart3 pinctrl name

The renaming of pinctrl_uart3 to pinctrl_usart3 was missed in
commit 9e3129e (ARM: at91: fix usart/uart namimg in pinctrl).

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoMAINTAINERS: Add ARM/Zynq architecture entry
Michal Simek [Mon, 21 Jan 2013 16:41:46 +0000 (17:41 +0100)]
MAINTAINERS: Add ARM/Zynq architecture entry

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 30 Jan 2013 01:02:26 +0000 (12:02 +1100)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Intel, radeon and exynos fixes.  Nothing too major or wierd: one dmar
  fix and a radeon cursor corruption, along with misc exynos fixes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (21 commits)
  drm/exynos: add check for the device power status
  drm/exynos: Make 'drm_hdmi_get_edid' static
  drm/exynos: fimd and ipp are broken on multiplatform
  drm/exynos: don't include plat/gpio-cfg.h
  drm/exynos: Remove "internal" interrupt handling
  drm/exynos: Add missing static specifiers in exynos_drm_rotator.c
  drm/exynos: Replace mdelay with usleep_range
  drm/exynos: Make ipp_handle_cmd_work static
  drm/exynos: Make g2d_userptr_get_dma_addr static
  drm/exynos: consider DMA_NONE flag to dmabuf import
  drm/exynos: free sg object if dma_map_sg is failed
  drm/exynos: added validation of edid for vidi connection
  drm/exynos: let drm handle edid allocations
  drm/radeon: Enable DMA_IB_SWAP_ENABLE on big endian hosts.
  drm/radeon: fix a rare case of double kfree
  radeon_display: Use pointer return error codes
  drm/radeon: fix cursor corruption on DCE6 and newer
  drm/i915: dump UTS_RELEASE into the error_state
  iommu/intel: disable DMAR for g4x integrated gfx
  drm/i915: GFX_MODE Flush TLB Invalidate Mode must be '1' for scanline waits
  ...

11 years agoMerge tag 'for-linus-v3.8-rc6' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Wed, 30 Jan 2013 00:59:37 +0000 (11:59 +1100)]
Merge tag 'for-linus-v3.8-rc6' of git://oss.sgi.com/xfs/xfs

Pull xfs bugfixes from Ben Myers:
 "Here are fixes for returning EFSCORRUPTED on probe of a non-xfs
  filesystem, the stack switch in xfs_bmapi_allocate, a crash in
  _xfs_buf_find, speculative preallocation as the filesystem nears
  ENOSPC, an unmount hang, a race with AIO, and a regression with
  xfs_fsr:

   - fix return value when filesystem probe finds no XFS magic, a
     regression introduced in 9802182.

   - fix stack switch in __xfs_bmapi_allocate by moving the check for
     stack switch up into xfs_bmapi_write.

   - fix oops in _xfs_buf_find by validating that the requested block is
     within the filesystem bounds.

   - limit speculative preallocation near ENOSPC.

   - fix an unmount hang in xfs_wait_buftarg by freeing the
     xfs_buf_log_item in xfs_buf_item_unlock.

   - fix a possible use after free with AIO.

   - fix xfs_swap_extents after removal of xfs_flushinval_pages, a
     regression introduced in commit fb59581404a."

* tag 'for-linus-v3.8-rc6' of git://oss.sgi.com/xfs/xfs:
  xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
  xfs: Fix possible use-after-free with AIO
  xfs: fix shutdown hang on invalid inode during create
  xfs: limit speculative prealloc near ENOSPC thresholds
  xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
  xfs: pull up stack_switch check into xfs_bmapi_write
  xfs: Do not return EFSCORRUPTED when filesystem probe finds no XFS magic

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Wed, 30 Jan 2013 00:58:26 +0000 (11:58 +1100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull one s390 fix from Martin Schwidefsky:
 "Another transparent huge page fix, we need to define a s390 variant
  for pmdp_set_wrprotect to flush the TLB for the huge page correctly."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/thp: implement pmdp_set_wrprotect()

11 years agoMerge tag 'pinctrl-fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Wed, 30 Jan 2013 00:34:50 +0000 (11:34 +1100)]
Merge tag 'pinctrl-fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "This is a late pinctrl fix pull request, we had to revert out the
  pinctrl-single GPIO backend, because of, well, design issues.  We're
  cooking a better thing for the next cycle.

   - Revert gpio request/free backend, new patch set in the works, will
     be for v3.9.  Get this old cruft out before anyone hurts himself on
     it.
   - Kconfig buzz
   - Various compile warnings
   - MPP6 value for the Kirkwood"

* tag 'pinctrl-fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: nomadik: nmk_prcm_gpiocr_get_mode may be unused
  pinctrl: exynos: don't mark probing functions as __init
  Revert "pinctrl: single: support gpio request and free"
  pinctrl: mvebu: fix MPP6 value for kirkwood driver
  pinctrl: mvebu: Fix compiler warnings
  pinctrl: pinctrl-mxs: Fix variables' definition type
  pinctrl: samsung: removing duplicated condition for PINCTRL_SAMSUNG

11 years agoMerge tag 'vexpress/fixes-for-3.9' of git://git.linaro.org/people/pawelmoll/linux...
Olof Johansson [Tue, 29 Jan 2013 23:34:05 +0000 (15:34 -0800)]
Merge tag 'vexpress/fixes-for-3.9' of git://git.linaro.org/people/pawelmoll/linux into next/fixes-non-critical

From Pawel Moll:
Versatile Express related fixes for 3.9
* Correct interrupt definitions for WDT node in
  V2P-CA15 and V2P-CA15_A7 Device Trees

* tag 'vexpress/fixes-for-3.9' of git://git.linaro.org/people/pawelmoll/linux:
  ARM: vexpress: Fix wdt interrupt in ca15{-tc1,_a7} dts

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agopinctrl: nomadik: nmk_prcm_gpiocr_get_mode may be unused
Arnd Bergmann [Fri, 25 Jan 2013 14:14:30 +0000 (14:14 +0000)]
pinctrl: nomadik: nmk_prcm_gpiocr_get_mode may be unused

nmk_prcm_gpiocr_get_mode is only needed for debugfs output at
the moment, which can be compile-time disabled. Marking
the function __maybe_unused still gives us compile-time
coverage, but avoids a gcc warning.

Without this patch, building nhk8815_defconfig results in:

drivers/pinctrl/pinctrl-nomadik.c:676:12: warning: 'nmk_prcm_gpiocr_get_mode' defined but not used [-Wunused-function]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: exynos: don't mark probing functions as __init
Arnd Bergmann [Fri, 25 Jan 2013 14:14:29 +0000 (14:14 +0000)]
pinctrl: exynos: don't mark probing functions as __init

Functions called from a driver probe() method must not be
marked __init, because they may get called after the
init phase is done, when the device shows up late, or
because of deferred probing.

Without this patch, building exynos_defconfig results in
multiple warnings like:

WARNING: drivers/pinctrl/built-in.o(.text+0x51bc): Section mismatch in reference from the function exynos5440_pinctrl_probe() to the function .init.text:exynos5440_gpiolib_register()
The function exynos5440_pinctrl_probe() references
the function __init exynos5440_gpiolib_register().
This is often because exynos5440_pinctrl_probe lacks a __init
annotation or the annotation of exynos5440_gpiolib_register is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoMerge tag 'mvebu_fixes_for_v3.8-rc6' of git://git.infradead.org/users/jcooper/linux...
Olof Johansson [Tue, 29 Jan 2013 18:36:43 +0000 (10:36 -0800)]
Merge tag 'mvebu_fixes_for_v3.8-rc6' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper:
fixes for v3.8-rc6

 - add missing gpio interrupt lines to dove dt
 - fix bad logic for printing MPP error message on orion boards
 - build proper serial port driver after changing mvebu DT compatible property
   - This is a change to mvebu_defconfig that I wouldn't usually push out as a
     fix.  However, the commit

     b24212f arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

     changed the serial driver for the board in the dts file.  without the patch
     I've included in this pull, users won't see any log messages.

* tag 'mvebu_fixes_for_v3.8-rc6' of git://git.infradead.org/users/jcooper/linux:
  arm: mvebu: i2c come back in defconfig
  arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  Dove: activate GPIO interrupts in DT

11 years agoMerge branch 'v3.8-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Tue, 29 Jan 2013 18:20:43 +0000 (10:20 -0800)]
Merge branch 'v3.8-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

From Kukjin Kim:
This fixes compatible values for exynos pinctrl and crash on soft reset,
tick and alarm irq numbers on exynos5440 and uninitialized variable on
s3c24xx.

* 'v3.8-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
  ARM: dts: fix tick and alarm irq numbers for exynos5440
  ARM: dts: fix compatible value for exynos pinctrl
  ARM: dts: Fix compatible value of pinctrl module on EXYNOS5440
  ARM: S3C24XX: fix uninitialized variable warning

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: vexpress: Fix wdt interrupt in ca15{-tc1,_a7} dts
Mark Rutland [Mon, 17 Dec 2012 17:04:50 +0000 (17:04 +0000)]
ARM: vexpress: Fix wdt interrupt in ca15{-tc1,_a7} dts

As the wdt nodes have the gic as their interrupt-parent, their
interrupts property should be 3 cells in format described in the gic
devicetree binding document.

This patch fixes the interrupts property in the wdt nodes to be in the
correct format.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
11 years agox86, efi: remove attribute check from setup_efi_pci
Maarten Lankhorst [Tue, 29 Jan 2013 16:52:24 +0000 (17:52 +0100)]
x86, efi: remove attribute check from setup_efi_pci

It looks like the original commit that copied the rom contents from
efi always copied the rom, and the fixup in setup_efi_pci from commit
886d751a2ea99a160 ("x86, efi: correct precedence of operators in
setup_efi_pci") broke that.

This resulted in macbook pro's no longer finding the rom images, and
thus not being able to use the radeon card any more.

The solution is to just remove the check for now, and always copy the
rom if available.

Reported-by: Vitaly Budovski <vbudovski+news@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
11 years agoALSA: hda - Fix non-snoop page handling
Takashi Iwai [Tue, 29 Jan 2013 17:07:22 +0000 (18:07 +0100)]
ALSA: hda - Fix non-snoop page handling

For non-snoop mode, we fiddle with the page attributes of CORB/RIRB
and the position buffer, but also the ring buffers.  The problem is
that the current code blindly assumes that the buffer is contiguous.
However, the ring buffers may be SG-buffers, thus a wrong vmapped
address is passed there, leading to Oops.

This patch fixes the handling for SG-buffers.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail
Takashi Iwai [Tue, 29 Jan 2013 09:12:23 +0000 (10:12 +0100)]
ALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail

Currently we use LPIB forcibly for both playback and capture for
Poulsbo and Oaktrail devices, and this seems rather problematic.
The recent fix for LPIB delay count seems working well with these
devices, so let's enable it instead.

Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Tue, 29 Jan 2013 06:44:53 +0000 (22:44 -0800)]
Merge tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Fairly small stuff - a build failure fix for ST platforms, an error
  checking fix and an update to the MAINTAINERS file for Liam."

* tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: tps80031: Use IS_ERR to check return value of regulator_register()
  regulators: db8500: Fix compile failure for drivers/regulator/dbx500-prcmu.c
  regulator: MAINTAINERS: update email address

11 years agoMerge remote-tracking branch 'regulator/fix/lrg' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:41 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/lrg' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/tps80031' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:35 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/tps80031' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/db8500' into tmp
Mark Brown [Tue, 29 Jan 2013 03:14:28 +0000 (11:14 +0800)]
Merge remote-tracking branch 'regulator/fix/db8500' into tmp

11 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Tue, 29 Jan 2013 00:23:07 +0000 (16:23 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
 "Whenever you have a chance between two dives, you might want to
  consider pulling my merge branch to pickup a few fixes for 3.8 that
  have been accumulating for the last couple of weeks (I was myself
  travelling then on vacation).

  Nothing major, just a handful of powerpc bug fixes that I consider
  worth getting in before 3.8 goes final."

And I'll have everybody know that I'm not diving for several days yet.
Snif.

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Max next_tb to prevent from replaying timer interrupt
  powerpc: kernel/kgdb.c: Fix memory leakage
  powerpc/book3e: Disable interrupt after preempt_schedule_irq
  powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
  powerpc/pasemi: Fix crash on reboot
  powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32

11 years agopowerpc: Max next_tb to prevent from replaying timer interrupt
Tiejun Chen [Tue, 15 Jan 2013 17:01:19 +0000 (17:01 +0000)]
powerpc: Max next_tb to prevent from replaying timer interrupt

With lazy interrupt, we always call __check_irq_replaysome with
decrementers_next_tb to check if we need to replay timer interrupt.
So in hotplug case we also need to set decrementers_next_tb as MAX
to make sure __check_irq_replay don't replay timer interrupt
when return as we expect, otherwise we'll trap here infinitely.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: kernel/kgdb.c: Fix memory leakage
Cong Ding [Mon, 14 Jan 2013 07:26:32 +0000 (07:26 +0000)]
powerpc: kernel/kgdb.c: Fix memory leakage

the variable backup_current_thread_info isn't freed before existing the
function.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/book3e: Disable interrupt after preempt_schedule_irq
Tiejun Chen [Sun, 6 Jan 2013 00:49:34 +0000 (00:49 +0000)]
powerpc/book3e: Disable interrupt after preempt_schedule_irq

In preempt case current arch_local_irq_restore() from
preempt_schedule_irq() may enable hard interrupt but we really
should disable interrupts when we return from the interrupt,
and so that we don't get interrupted after loading SRR0/1.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
Carl E. Love [Thu, 29 Nov 2012 06:42:03 +0000 (06:42 +0000)]
powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function

The calculation for the left shift of the mask OPROFILE_PM_PMCSEL_MSK has an
error.  The calculation is should be to shift left by (max_cntrs - cntr) times
the width of the pmsel field width.  However, the #define OPROFILE_MAX_PMC_NUM
was used instead of OPROFILE_PMSEL_FIELD_WIDTH.  This patch fixes the
calculation.

Signed-off-by: Carl Love <cel@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pasemi: Fix crash on reboot
Steven Rostedt [Mon, 21 Jan 2013 17:23:26 +0000 (17:23 +0000)]
powerpc/pasemi: Fix crash on reboot

commit f96972f2dc "kernel/sys.c: call disable_nonboot_cpus() in
kernel_restart()"

added a call to disable_nonboot_cpus() on kernel_restart(), which tries
to shutdown all the CPUs except the first one. The issue with the PA
Semi, is that it does not support CPU hotplug.

When the call is made to __cpu_down(), it calls the notifiers
CPU_DOWN_PREPARE, and then tries to take the CPU down.

One of the notifiers to the CPU hotplug code, is the cpufreq. The
DOWN_PREPARE will call __cpufreq_remove_dev() which calls
cpufreq_driver->exit. The PA Semi exit handler unmaps regions of I/O
that is used by an interrupt that goes off constantly
(system_reset_common, but it goes off during normal system operations
too). I'm not sure exactly what this interrupt does.

Running a simple function trace, you can see it goes off quite a bit:

# tracer: function
#
#           TASK-PID    CPU#    TIMESTAMP  FUNCTION
#              | |       |          |         |
          <idle>-0     [001]  1558.859363: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.860112: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.861109: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [001]  1558.861361: .pasemi_system_reset_exception <-.system_reset_exception
          <idle>-0     [000]  1558.861437: .pasemi_system_reset_exception <-.system_reset_exception

When the region is unmapped, the system crashes with:

Disabling non-boot CPUs ...
Error taking CPU1 down: -38
Unable to handle kernel paging request for data at address 0xd0000800903a0100
Faulting instruction address: 0xc000000000055fcc
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT SMP NR_CPUS=64 NUMA PA Semi PWRficient
Modules linked in: shpchp
NIP: c000000000055fcc LR: c000000000055fb4 CTR: c0000000000df1fc
REGS: c0000000012175d0 TRAP: 0300   Not tainted  (3.8.0-rc4-test-dirty)
MSR: 9000000000009032 <SF,HV,EE,ME,IR,DR,RI>  CR: 24000088  XER: 00000000
SOFTE: 0
DAR: d0000800903a0100, DSISR: 42000000
TASK = c0000000010e9008[0] 'swapper/0' THREAD: c000000001214000 CPU: 0
GPR00: d0000800903a0000 c000000001217850 c0000000012167e0 0000000000000000
GPR04: 0000000000000000 0000000000000724 0000000000000724 0000000000000000
GPR08: 0000000000000000 0000000000000000 0000000000000001 0000000000a70000
GPR12: 0000000024000080 c00000000fff0000 ffffffffffffffff 000000003ffffae0
GPR16: ffffffffffffffff 0000000000a21198 0000000000000060 0000000000000000
GPR20: 00000000008fdd35 0000000000a21258 000000003ffffaf0 0000000000000417
GPR24: 0000000000a226d0 c000000000000000 0000000000000000 0000000000000000
GPR28: c00000000138b358 0000000000000000 c000000001144818 d0000800903a0100
NIP [c000000000055fcc] .set_astate+0x5c/0xa4
LR [c000000000055fb4] .set_astate+0x44/0xa4
Call Trace:
[c000000001217850] [c000000000055fb4] .set_astate+0x44/0xa4 (unreliable)
[c0000000012178f0] [c00000000005647c] .restore_astate+0x2c/0x34
[c000000001217980] [c000000000054668] .pasemi_system_reset_exception+0x6c/0x88
[c000000001217a00] [c000000000019ef0] .system_reset_exception+0x48/0x84
[c000000001217a80] [c000000000001e40] system_reset_common+0x140/0x180

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoMerge tag 'md-3.8-fixes' of git://neil.brown.name/md
Linus Torvalds [Mon, 28 Jan 2013 23:15:34 +0000 (15:15 -0800)]
Merge tag 'md-3.8-fixes' of git://neil.brown.name/md

Pull dmraid fix from NeilBrown:
 "Just one fix for md in 3.8

  dmraid assess redundancy and replacements slightly inaccurately which
  could lead to some degraded arrays failing to assemble."

* tag 'md-3.8-fixes' of git://neil.brown.name/md:
  DM-RAID: Fix RAID10's check for sufficient redundancy

11 years agopowerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32
Li Zhong [Sun, 2 Dec 2012 20:19:22 +0000 (20:19 +0000)]
powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32

This patch fixes MAX_STACK_TRACE_ENTRIES too low warning for ppc32,
which is similar to commit 12660b17.

Reported-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
Thomas Abraham [Thu, 24 Jan 2013 18:09:13 +0000 (10:09 -0800)]
ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440

The soft-reset control register is located in the XMU controller space.
Map this controller space before writing to the soft-reset controller
register.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Girish K S <ks.giri@samsung.com>
Signed-off-by: Kukjin <kgene.kim@samsung.com>
11 years agoARM: dts: fix tick and alarm irq numbers for exynos5440
Giridhar Maruthy [Fri, 28 Dec 2012 02:02:58 +0000 (18:02 -0800)]
ARM: dts: fix tick and alarm irq numbers for exynos5440

The interrupts for RTC tick and alarm interrupt were swapped.
Has been fixed here.

Signed-off-by: Giridhar Maruthy <giridhar.m@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>