pandora-kernel.git
10 years agoi2c: i801: enable Intel BayTrail SMBUS
Chew, Kean ho [Fri, 28 Feb 2014 16:03:56 +0000 (00:03 +0800)]
i2c: i801: enable Intel BayTrail SMBUS

Add Device ID of Intel BayTrail SMBus Controller.

Signed-off-by: Chew, Kean ho <kean.ho.chew@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: designware-pci: Add Baytrail PCI IDs
Mika Westerberg [Wed, 19 Feb 2014 14:10:29 +0000 (16:10 +0200)]
i2c: designware-pci: Add Baytrail PCI IDs

Intel Baytrail I2C controllers can be enumerated from PCI as well as from
ACPI. In order to support this add the Baytrail PCI IDs to the driver.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: designware-pci: Cleanup driver power management
Mika Westerberg [Tue, 4 Feb 2014 12:37:07 +0000 (14:37 +0200)]
i2c: designware-pci: Cleanup driver power management

The PCI part of the DesignWare I2C driver does a lot of things that are not
required anymore. For example drivers aren't supposed to handle PCI state
transitions themselves. This is all provided by the PCI bus core already.

In addition to that there is no point scheduling RPM suspend on driver's
idle hook but instead we can use RPM autosuspend for this (which is enabled
in the driver already).

As a bonus, this patch also fixes following compile warning which is
emitted when the driver was compiled without CONFIG_PM_RUNTIME set:

drivers/i2c/busses/i2c-designware-pcidrv.c:245:12: warning: ‘i2c_dw_pci_runtime_idle’ defined but not used [-Wunused-function]

Reported-by: xinhui.pan <xinhuix.pan@intel.com>
Reported-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: designware: make SCL and SDA falling time configurable
Romain Baeriswyl [Mon, 20 Jan 2014 16:43:43 +0000 (17:43 +0100)]
i2c: designware: make SCL and SDA falling time configurable

This patch allows to set independantly SCL and SDA falling times.
The tLOW period is computed by taking into account the SCL falling time.
The tHIGH period is computed by taking into account the SDA falling time.

For instance in case the margin on tLOW is considered too small, it can
be increased by increasing the SCL falling time which is by default set
at 300ns.

The same applies for tHIGH period with the help of SDA falling time.

Signed-off-by: Romain Baeriswyl <romainba@abilis.com>
Reviewed-by: Christian Ruppert <christian.ruppert@abilis.com>
Acked-by: Shinya Kuribayashi <skuribay@pobox.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: bfin-twi: remove unnecessary Blackfin SSYNC from the driver
Sonic Zhang [Tue, 28 Jan 2014 08:55:22 +0000 (16:55 +0800)]
i2c: bfin-twi: remove unnecessary Blackfin SSYNC from the driver

Put necessary SSYNC code into blackfin twi arch header. The generic TWI
driver should not contain any architecture specific code.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: bfin-twi: move bits macros and structs in header from arch include to generic...
Sonic Zhang [Tue, 28 Jan 2014 08:55:21 +0000 (16:55 +0800)]
i2c: bfin-twi: move bits macros and structs in header from arch include to generic include

The ADI TWI peripheral is not binding to the Blackfin processor only.
The bits macros and structs should be put in the generic include header.
And update head file path in drivers accordingly.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: mv64xxx: fix circular Kconfig dependency
Wolfram Sang [Thu, 6 Mar 2014 09:08:50 +0000 (10:08 +0100)]
i2c: mv64xxx: fix circular Kconfig dependency

Commit 370136bc67c3 ("i2c: mv64xxx: Add reset deassert call")
introduced:

drivers/video/Kconfig:42:error: recursive dependency detected!

ARCH_SUNXI selects RESET_CONTROLLER anyhow.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: mv64xxx: Add support for the Allwinner A31 I2C driver
Maxime Ripard [Tue, 4 Mar 2014 16:28:38 +0000 (17:28 +0100)]
i2c: mv64xxx: Add support for the Allwinner A31 I2C driver

The Allwinner A31 I2C controller is almost identical to the one used in the
other Allwinner SoCs, except for the fact that it needs to clear the interrupt
by setting the INT_FLAGS bit in the control register, instead of clearing it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: mv64xxx: Add reset deassert call
Maxime Ripard [Tue, 4 Mar 2014 16:28:37 +0000 (17:28 +0100)]
i2c: mv64xxx: Add reset deassert call

The Allwinner A31 SoC using that IP has a reset controller maintaining
it reset unless told otherwise.

Add some optional reset support to the driver.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: i2c-rcar: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:06 +0000 (11:04 +0100)]
i2c: i2c-rcar: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: i2c-tegra: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:10 +0000 (11:04 +0100)]
i2c: i2c-tegra: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
10 years agoi2c: i2c-stu300: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:09 +0000 (11:04 +0100)]
i2c: i2c-stu300: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoi2c: i2c-ocores: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:05 +0000 (11:04 +0100)]
i2c: i2c-ocores: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
10 years agoi2c: i2c-nomadik: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:04 +0000 (11:04 +0100)]
i2c: i2c-nomadik: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoi2c: i2c-bfin-twi: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:04:00 +0000 (11:04 +0100)]
i2c: i2c-bfin-twi: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoi2c: i2c-at91: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:03:58 +0000 (11:03 +0100)]
i2c: i2c-at91: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
10 years agoi2c: i2c-omap: deprecate class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:03:57 +0000 (11:03 +0100)]
i2c: i2c-omap: deprecate class based instantiation

Warn users that class based instantiation is going away soon in favour
of more robust probing and faster bootup times.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: add deprecation warning for class based instantiation
Wolfram Sang [Mon, 10 Feb 2014 10:03:56 +0000 (11:03 +0100)]
i2c: add deprecation warning for class based instantiation

Class based instantiation can cause noticeable delays when booting. This
mechanism is used when it is not possible to describe slaves on I2C
busses. As we do have other mechanisms, most embedded I2C will not need
classes and for embedded it is explicitly not recommended to use them. Add
a deprecation warning for drivers which want to disable class based
instantiation in the near future to gain boot-up time, so users relying
on this technique can switch to something better. They really should.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: Remove busy check for transfers at suspend late
Ulf Hansson [Wed, 19 Feb 2014 12:27:47 +0000 (13:27 +0100)]
i2c: nomadik: Remove busy check for transfers at suspend late

We should never be busy performing transfers at suspend late, thus
there are no reason to check for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: Convert to late and early system PM callbacks
Ulf Hansson [Mon, 17 Feb 2014 15:20:53 +0000 (16:20 +0100)]
i2c: nomadik: Convert to late and early system PM callbacks

At system suspend_late, runtime PM has been disabled by the PM core
which means we can safely operate on these resources. Consequentially
we no longer have to wait until the noirq phase of the system suspend.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: Fixup deployment of runtime PM
Ulf Hansson [Mon, 17 Feb 2014 15:20:41 +0000 (16:20 +0100)]
i2c: nomadik: Fixup deployment of runtime PM

Since the runtime PM state is expected to be active according to the
amba bus, we must align our behaviour while probing to it.

Moreover, this is needed to be able to have the driver fully functional
without depending on CONFIG_RUNTIME_PM.

Since the device is active while a successful probe has been completed,
the reference counting for the clock will be screwed up and never reach
zero. We resolve this by implementing runtime PM callbacks and let them
handle the resources accordingly, including the clock.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[wsa: s/#if/#ifdef/]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: Remove redundant call to pm_runtime_disable
Ulf Hansson [Mon, 17 Feb 2014 15:20:29 +0000 (16:20 +0100)]
i2c: nomadik: Remove redundant call to pm_runtime_disable

The amba bus are responsible for pm_runtime_enable|disable, remove the
redundant pm_runtime_disable at driver removal.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: Convert to devm functions
Ulf Hansson [Tue, 18 Feb 2014 22:35:44 +0000 (23:35 +0100)]
i2c: nomadik: Convert to devm functions

Use devm_* functions to simplify code and error handling.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: nomadik: factor platform data into state container
Linus Walleij [Mon, 3 Feb 2014 10:27:26 +0000 (11:27 +0100)]
i2c: nomadik: factor platform data into state container

Move the former platform data struct nmk_i2c_controller into the
per-device state container struct i2c_nmk_client, and remove all
the platform data probe path hacks.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[wsa: use 100kHz as default]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoi2c: rcar: add compatible entry for r8a7791
Wolfram Sang [Thu, 20 Feb 2014 08:03:20 +0000 (09:03 +0100)]
i2c: rcar: add compatible entry for r8a7791

While we are here, also brush up the devicetree binding documentation.
The example was an inappropriate copy from the sh_mobile driver.

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
10 years agoLinux 3.14-rc4 v3.14-rc4
Linus Torvalds [Mon, 24 Feb 2014 01:40:03 +0000 (17:40 -0800)]
Linux 3.14-rc4

10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Mon, 24 Feb 2014 01:38:04 +0000 (17:38 -0800)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A collection of fixes for ARM platforms.  Most are fixes for DTS
  files, mostly from DT conversion on OMAP which is still finding a few
  issues here and there.

  There's a couple of small stale code removal patches that we usually
  queue for the next release instead, but they seemed harmless enough to
  bring in now.

  Also, a fix for backlight on some PXA platforms, and a cache
  configuration fix for Tegra, etc"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits)
  MAINTAINERS: add additional ARM BCM281xx/BCM11xxx maintainer
  ARM: tegra: only run PL310 init on systems with one
  ARM: tegra: Add head numbers to display controllers
  ARM: imx6: build pm-imx6q.c independently of CONFIG_PM
  ARM: tegra: fix RTC0 alias for Cardhu
  ARM: dove: dt: revert PMU interrupt controller node
  Documentation: dt: OMAP: Update Overo/Tobi
  ARM: dts: Add support for both OMAP35xx and OMAP36xx Overo/Tobi
  ARM: dts: omap3-tobi: Use the correct vendor prefix
  ARM: dts: omap3-tobi: Fix boot with OMAP36xx-based Overo
  ARM: OMAP2+: Remove legacy macros for zoom platforms
  ARM: OMAP2+: Remove MACH_NOKIA_N800
  ARM: dts: N900: add missing compatible property
  ARM: dts: N9/N950: fix boot hang with 3.14-rc1
  ARM: OMAP1: nokia770: enable tahvo-usb
  ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
  ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
  ARM: dts: omap3-gta04: Fix mmc1 properties.
  ARM: dts: omap3-gta04: Fix 'aux' gpio key flags.
  ARM: OMAP2+: add missing ARCH_HAS_OPP
  ...

10 years agoMerge tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 24 Feb 2014 01:37:25 +0000 (17:37 -0800)]
Merge tag 'regulator-v3.14-rc4' of git://git./linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Mostly unexciting driver fixes, plus one fix to lower the severity of
  the log message when we don't use an optional regulator - the fixes
  for ACPI system made this come up more often and it was correctly
  observed that it was causing undue concern for users"

* tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: max14577: Fix invalid return value on DT parse success
  regulator: core: Change dummy supplies error message to a warning
  regulator: s5m8767: Add missing of_node_put
  regulator: s5m8767: Use of_get_child_by_name
  regulator: da9063: Bug fix when setting max voltage on LDOs 5-11

10 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 23 Feb 2014 22:17:08 +0000 (14:17 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "Serialize the registration of a new sched_clock in the currently ARM
  only generic sched_clock facilty to avoid sched_clock havoc"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched_clock: Prevent callers from seeing half-updated data

10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 23 Feb 2014 22:15:46 +0000 (14:15 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:

 - a bugfix which prevents a divide by 0 panic when the newly introduced
   try_msr_calibrate_tsc() fails

 - enablement of the Baytrail platform to utilize the newfangled msr
   based calibration

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: tsc: Add missing Baytrail frequency to the table
  x86, tsc: Fallback to normal calibration if fast MSR calibration fails

10 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 23 Feb 2014 22:15:08 +0000 (14:15 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "Another four fixlets to tame the ARM orion irq chip"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: orion: Fix getting generic chip pointer.
  irqchip: orion: clear stale interrupts in irq_startup
  irqchip: orion: use handle_edge_irq on bridge irqs
  irqchip: orion: clear bridge cause register on init

10 years agoMerge tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 23 Feb 2014 18:40:22 +0000 (10:40 -0800)]
Merge tag 'usb-3.14-rc4' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a number of USB fixes for reported issues for 3.14-rc4

  The majority of these are for USB gadget, phy, and musb driver issues.
  And there's a few new device ids thrown in for good measure"

* tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: chipidea: need to mask when writting endptflush and endptprime
  usb: musb: correct use of schedule_delayed_work()
  usb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP
  usb: gadget: fix NULL pointer dereference
  usb: gadget: printer: using gadget_is_otg to check otg support at runtime
  phy: let phy_provider_register be the last step in registering PHY
  phy-core: Don't allow building phy-core as a module
  phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
  phy-core: phy_get: Leave error logging to the caller
  phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM
  usb: musb: correct use of schedule_delayed_work()
  usb: musb: do not sleep in atomic context
  USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
  USB: EHCI: add delay during suspend to prevent erroneous wakeups
  usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
  usb: musb: do not sleep in atomic context
  usb: gadget: s3c2410_udc: Fix build error
  usb: musb: core: Fix remote-wakeup resume
  usb: musb: host: Fix SuperSpeed hub enumeration
  usb: musb: fix obex in g_nokia.ko causing kernel panic

10 years agoMerge tag 'tty-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 23 Feb 2014 18:39:50 +0000 (10:39 -0800)]
Merge tag 'tty-3.14-rc4' of git://git./linux/kernel/git/gregkh/tty

Pull TTY revert from Greg KH:
 "Here is a single commit, a revert of a sysfs file change that ended up
  breaking a userspace tool"

* tag 'tty-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "tty: Set correct tty name in 'active' sysfs attribute"

10 years agoMerge tag 'staging-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 23 Feb 2014 18:39:21 +0000 (10:39 -0800)]
Merge tag 'staging-3.14-rc4' of git://git./linux/kernel/git/gregkh/staging

Pull staging tree fix from Greg KH:
 "Here is a single android driver fix for 3.14-rc4 that fixes a reported
  problem in the binder driver"

* tag 'staging-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: binder: Fix death notifications

10 years agoMerge tag 'char-misc-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sun, 23 Feb 2014 18:38:51 +0000 (10:38 -0800)]
Merge tag 'char-misc-3.14-rc4' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg KH:
 "Here is a single commit, to fix a reported problem in the mei driver"

* tag 'char-misc-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: set client's read_cb to NULL when flow control fails

10 years agoMAINTAINERS: add additional ARM BCM281xx/BCM11xxx maintainer
Matt Porter [Fri, 14 Feb 2014 15:15:03 +0000 (10:15 -0500)]
MAINTAINERS: add additional ARM BCM281xx/BCM11xxx maintainer

Add myself as an additional maintainer for the Broadcom mobile
SoCs.

Signed-off-by: Matt Porter <mporter@linaro.org>
Acked-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge remote-tracking branches 'regulator/fix/da9063', 'regulator/fix/max14577' and...
Mark Brown [Sun, 23 Feb 2014 03:22:18 +0000 (12:22 +0900)]
Merge remote-tracking branches 'regulator/fix/da9063', 'regulator/fix/max14577' and 'regulator/fix/s5m8767' into regulator-linus

10 years agoMerge remote-tracking branch 'regulator/fix/core' into regulator-linus
Mark Brown [Sun, 23 Feb 2014 03:22:18 +0000 (12:22 +0900)]
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus

10 years agoRevert "tty: Set correct tty name in 'active' sysfs attribute"
Greg Kroah-Hartman [Sat, 22 Feb 2014 22:31:04 +0000 (14:31 -0800)]
Revert "tty: Set correct tty name in 'active' sysfs attribute"

This reverts commit d8a5dc3033af2fd6d16030d2ee4fbd073460fe54.

This breaks plymouth installs, either because plymouth is using the file
"incorrectly" or because the patch is incorrect.  Either way, this needs
to be reverted until it is all figured out.

Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Reported-by: Ray Strode <halfline@gmail.com>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Werner Fink <werner@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Feb 2014 20:12:50 +0000 (12:12 -0800)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Misc fixlets: a fair number of them resulting from the new
  SCHED_DEADLINE code"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/deadline: Remove useless dl_nr_total
  sched/deadline: Test for CPU's presence explicitly
  sched: Add 'flags' argument to sched_{set,get}attr() syscalls
  sched: Fix information leak in sys_sched_getattr()
  sched,numa: add cond_resched to task_numa_work
  sched/core: Make dl_b->lock IRQ safe
  sched/core: Fix sched_rt_global_validate
  sched/deadline: Fix overflow to handle period==0 and deadline!=0
  sched/deadline: Fix bad accounting of nr_running

10 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Feb 2014 20:11:54 +0000 (12:11 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Misc fixlets from all around the place"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/uncore: Fix IVT/SNB-EP uncore CBOX NID filter table
  perf/x86: Correctly use FEATURE_PDCM
  perf, nmi: Fix unknown NMI warning
  perf trace: Fix ioctl 'request' beautifier build problems on !(i386 || x86_64) arches
  perf trace: Add fallback definition of EFD_SEMAPHORE
  perf list: Fix checking for supported events on older kernels
  perf tools: Handle PERF_RECORD_HEADER_EVENT_TYPE properly
  perf probe: Do not add offset twice to uprobe address
  perf/x86: Fix Userspace RDPMC switch
  perf/x86/intel/p6: Add userspace RDPMC quirk for PPro

10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Sat, 22 Feb 2014 16:29:25 +0000 (08:29 -0800)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
 "Fix writing the minimum temperature in max1668 driver"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (max1668) Fix writing the minimum temperature

10 years agoMerge branch 'xfs-fixes-for-3.14-rc4' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 22 Feb 2014 16:26:01 +0000 (08:26 -0800)]
Merge branch 'xfs-fixes-for-3.14-rc4' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Dave Chinner:
 "This is the first pull request I've had to do for you, so I'm still
  sorting things out.  The reason I'm sending this and not Ben should be
  obvious from the first commit below - SGI has stepped down from the
  XFS maintainership role.  As such, I'd like to take another
  opportunity to thank them for their many years of effort maintaining
  XFS and supporting the XFS community that they developed from the
  ground up.

  So I haven't had time to work things like signed tags into my
  workflows yet, so this is just a repo branch I'm asking you to pull
  from.  And yes, I named the branch -rc4 because I wanted the fixes in
  rc4, not because the branch was for merging into -rc3.  Probably not
  right, either.

  Anyway, I should have everything sorted out by the time the next merge
  window comes around.  If there's anything that you don't like in the
  pull req, feel free to flame me unmercifully.

  The changes are fixes for recent regressions and important thinkos in
  verification code:

        - a log vector buffer alignment issue on ia32
        - timestamps on truncate got mangled
        - primary superblock CRC validation fixes and error message
          sanitisation"

* 'xfs-fixes-for-3.14-rc4' of git://oss.sgi.com/xfs/xfs:
  xfs: limit superblock corruption errors to actual corruption
  xfs: skip verification on initial "guess" superblock read
  MAINTAINERS: SGI no longer maintaining XFS
  xfs: xfs_sb_read_verify() doesn't flag bad crcs on primary sb
  xfs: ensure correct log item buffer alignment
  xfs: ensure correct timestamp updates from truncate

10 years agoMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Sat, 22 Feb 2014 16:20:46 +0000 (17:20 +0100)]
Merge tag 'perf-urgent-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

  * Handle PERF_RECORD_HEADER_EVENT_TYPE properly. (Jiri Olsa)

  * Fix checking for supported events on older kernels in
    'perf list' (Vince Weaver)

  * Do not add offset twice to uprobe address in
    'perf probe' (Masami Hiramatsu)

  * Fix perf trace's ioctl 'request' beautifier build problems
    on !(i386 || x86_64) arches (Arnaldo Carvalho de Melo)

  * Fix 'perf trace' build by adding a fallback definition for
    EFD_SEMAPHORE (Ben Hutchings)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
10 years agoregulator: max14577: Fix invalid return value on DT parse success
Krzysztof Kozlowski [Fri, 21 Feb 2014 12:12:38 +0000 (13:12 +0100)]
regulator: max14577: Fix invalid return value on DT parse success

This fixes bug introduced in 667a6b7a (regulator: max14577: Add missing
of_node_put). The DTS parsing function returned number of matched
regulators as success status which then was compared against 0 in probe.

Result was a probe fail after successful parsing the DTS:
max14577-regulator: probe of max14577-regulator failed with error 2

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviwed-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu into...
Thomas Gleixner [Fri, 21 Feb 2014 22:57:33 +0000 (23:57 +0100)]
Merge tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu into irq/urgent

irqchip mvebu fixes for v3.14

 - orion:
    - fixes for clearing bridge cause register, and clearing stale interrupts

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agoMerge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux
Linus Torvalds [Fri, 21 Feb 2014 22:35:05 +0000 (14:35 -0800)]
Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux

Pull devicetree fixes from Grant Likely:
 "Device tree compatible match order bug fix

  This branch contains a bug fix for the way devicetree code identifies
  the type of device.  Device drivers can contain a list of
  of_device_ids, but it more than one entry will match, then the device
  driver may choose the wrong one.  Commit 105353145e, "match each node
  compatible against all given matches first", was queued for v3.14 but
  ended up causing other bugs.  Commit 06b29e76a7 attempted to fix it
  but it had other bugs.  Merely reverting the fix and waiting until
  v3.15 isn't a good option because there is code in v3.14 that depends
  on the revised behaviour to boot.

  This branch should finally fixes the problem correctly.  This time
  instead of just hoping that the patch is correct, this branch also
  adds new testcases that validate the behaviour.

  The changes in this branch are larger than I would like for a -rc
  pull, but moving the test case data out of out of arch/arm so that it
  could be validated on other architectures was important"

* tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
  of: Add self test for of_match_node()
  of: Move testcase FDT data into drivers/of
  of: reimplement the matching method for __of_match_node()
  Revert "of: search the best compatible match first in __of_match_node()"

10 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Fri, 21 Feb 2014 22:34:26 +0000 (14:34 -0800)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fix from Wim Van Sebroeck:
 "It corrects the error code when no device was found for w83697hf_wdt"

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: w83697hf_wdt: return ENODEV if no device was found

10 years agoirqchip: orion: Fix getting generic chip pointer.
Andrew Lunn [Thu, 6 Feb 2014 23:41:58 +0000 (00:41 +0100)]
irqchip: orion: Fix getting generic chip pointer.

Enabling SPARSE_IRQ shows up a bug in the irq-orion bridge interrupt
handler. The bridge interrupt is implemented using a single generic
chip. Thus the parameter passed to irq_get_domain_generic_chip()
should always be zero.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Fixes: 9dbd90f17e4f ("irqchip: Add support for Marvell Orion SoCs")
Cc: <stable@vger.kernel.org> # v3.11+
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
10 years agoperf/x86/uncore: Fix IVT/SNB-EP uncore CBOX NID filter table
Stephane Eranian [Wed, 19 Feb 2014 13:10:18 +0000 (14:10 +0100)]
perf/x86/uncore: Fix IVT/SNB-EP uncore CBOX NID filter table

This patch updates the CBOX PMU filters mapping tables for SNB-EP
and IVT (model 45 and 62 respectively).

The NID umask always comes in addition to another umask.
When set, the NID filter is applied.

The current mapping tables were missing some code/umask
combinations to account for the NID umask. This patch
fixes that.

Cc: mingo@elte.hu
Cc: ak@linux.intel.com
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140219131018.GA24475@quad
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agoperf/x86: Correctly use FEATURE_PDCM
Peter Zijlstra [Mon, 3 Feb 2014 13:29:03 +0000 (14:29 +0100)]
perf/x86: Correctly use FEATURE_PDCM

The current code simply assumes Intel Arch PerfMon v2+ to have
the IA32_PERF_CAPABILITIES MSR; the SDM specifies that we should check
CPUID[1].ECX[15] (aka, FEATURE_PDCM) instead.

This was found by KVM which implements v2+ but didn't provide the
capabilities MSR. Change the code to DTRT; KVM will also implement the
MSR and return 0.

Cc: pbonzini@redhat.com
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140203132903.GI8874@twins.programming.kicks-ass.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agoperf, nmi: Fix unknown NMI warning
Markus Metzger [Sat, 15 Feb 2014 00:44:08 +0000 (16:44 -0800)]
perf, nmi: Fix unknown NMI warning

When using BTS on Core i7-4*, I get the below kernel warning.

$ perf record -c 1 -e branches:u ls
Message from syslogd@labpc1501 at Nov 11 15:49:25 ...
 kernel:[  438.317893] Uhhuh. NMI received for unknown reason 31 on CPU 2.

Message from syslogd@labpc1501 at Nov 11 15:49:25 ...
 kernel:[  438.317920] Do you have a strange power saving mode enabled?

Message from syslogd@labpc1501 at Nov 11 15:49:25 ...
 kernel:[  438.317945] Dazed and confused, but trying to continue

Make intel_pmu_handle_irq() take the full exit path when returning early.

Cc: eranian@google.com
Cc: peterz@infradead.org
Cc: mingo@kernel.org
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392425048-5309-1-git-send-email-andi@firstfloor.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agousb: chipidea: need to mask when writting endptflush and endptprime
Matthieu CASTET [Wed, 19 Feb 2014 05:46:31 +0000 (13:46 +0800)]
usb: chipidea: need to mask when writting endptflush and endptprime

ENDPTFLUSH and ENDPTPRIME registers are set by software and clear
by hardware. There is a bit for each endpoint. When we are setting
a bit for an endpoint we should make sure we do not touch other
endpoint bit. There is a race condition if the hardware clear the
bit between the read and the write in hw_write.

Cc: stable <stable@vger.kernel.org> # 3.11+
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Tested-by: Michael Grzeschik <mgrzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: binder: Fix death notifications
Arve Hjønnevåg [Mon, 17 Feb 2014 21:58:29 +0000 (13:58 -0800)]
staging: binder: Fix death notifications

The change (008fa749e0fe5b2fffd20b7fe4891bb80d072c6a) that moved the
node release code to a separate function broke death notifications in
some cases. When it encountered a reference without a death
notification request, it would skip looking at the remaining
references, and therefore fail to send death notifications for them.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Cc: stable <stable@vger.kernel.org> # 3.10
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agosched/deadline: Remove useless dl_nr_total
Kirill Tkhai [Mon, 17 Feb 2014 22:24:13 +0000 (02:24 +0400)]
sched/deadline: Remove useless dl_nr_total

In deadline class we do not have group scheduling like in RT.

dl_nr_total is the same as dl_nr_running. So, one of them should
be removed.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/368631392675853@web20h.yandex.ru
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched/deadline: Test for CPU's presence explicitly
Boris Ostrovsky [Mon, 17 Feb 2014 14:12:33 +0000 (09:12 -0500)]
sched/deadline: Test for CPU's presence explicitly

A hot-removed CPU may have ID that is numerically larger than the number of
existing CPUs in the system (e.g. we can unplug CPU 4 from a system that
has CPUs 0, 1 and 4).

Thus the WARN_ONs should check whether the CPU in question is currently
present, not whether its ID value is less than num_present_cpus().

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392646353-1874-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched: Add 'flags' argument to sched_{set,get}attr() syscalls
Peter Zijlstra [Fri, 14 Feb 2014 16:19:29 +0000 (17:19 +0100)]
sched: Add 'flags' argument to sched_{set,get}attr() syscalls

Because of a recent syscall design debate; its deemed appropriate for
each syscall to have a flags argument for future extension; without
immediately requiring new syscalls.

Cc: juri.lelli@gmail.com
Cc: Ingo Molnar <mingo@redhat.com>
Suggested-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140214161929.GL27965@twins.programming.kicks-ass.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched: Fix information leak in sys_sched_getattr()
Vegard Nossum [Sun, 16 Feb 2014 21:24:17 +0000 (22:24 +0100)]
sched: Fix information leak in sys_sched_getattr()

We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).

This fix copies only as much as we actually have on the stack
(attr->size defaults to the size of the struct) and leaves the rest of
the userspace-provided buffer untouched.

Found using kmemcheck + trinity.

Fixes: d50dde5a10f30 ("sched: Add new scheduler syscalls to support an extended scheduling parameters ABI")
Cc: Dario Faggioli <raistlin@linux.it>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392585857-10725-1-git-send-email-vegard.nossum@oracle.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched,numa: add cond_resched to task_numa_work
Rik van Riel [Tue, 18 Feb 2014 22:12:44 +0000 (17:12 -0500)]
sched,numa: add cond_resched to task_numa_work

Normally task_numa_work scans over a fairly small amount of memory,
but it is possible to run into a large unpopulated part of virtual
memory, with no pages mapped. In that case, task_numa_work can run
for a while, and it may make sense to reschedule as required.

Cc: akpm@linux-foundation.org
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: Xing Gang <gang.xing@hp.com>
Tested-by: Chegu Vinod <chegu_vinod@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392761566-24834-2-git-send-email-riel@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched/core: Make dl_b->lock IRQ safe
Juri Lelli [Tue, 11 Feb 2014 08:24:27 +0000 (09:24 +0100)]
sched/core: Make dl_b->lock IRQ safe

Fix this lockdep warning:

[   44.804600] =========================================================
[   44.805746] [ INFO: possible irq lock inversion dependency detected ]
[   44.805746] 3.14.0-rc2-test+ #14 Not tainted
[   44.805746] ---------------------------------------------------------
[   44.805746] bash/3674 just changed the state of lock:
[   44.805746]  (&dl_b->lock){+.....}, at: [<ffffffff8106ad15>] sched_rt_handler+0x132/0x248
[   44.805746] but this lock was taken by another, HARDIRQ-safe lock in the past:
[   44.805746]  (&rq->lock){-.-.-.}

and interrupts could create inverse lock ordering between them.

[   44.805746]
[   44.805746] other info that might help us debug this:
[   44.805746]  Possible interrupt unsafe locking scenario:
[   44.805746]
[   44.805746]        CPU0                    CPU1
[   44.805746]        ----                    ----
[   44.805746]   lock(&dl_b->lock);
[   44.805746]                                local_irq_disable();
[   44.805746]                                lock(&rq->lock);
[   44.805746]                                lock(&dl_b->lock);
[   44.805746]   <Interrupt>
[   44.805746]     lock(&rq->lock);

by making dl_b->lock acquiring always IRQ safe.

Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392107067-19907-3-git-send-email-juri.lelli@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched/core: Fix sched_rt_global_validate
Juri Lelli [Tue, 11 Feb 2014 08:24:26 +0000 (09:24 +0100)]
sched/core: Fix sched_rt_global_validate

Don't compare sysctl_sched_rt_runtime against sysctl_sched_rt_period if
the former is equal to RUNTIME_INF, otherwise disabling -rt bandwidth
management (with CONFIG_RT_GROUP_SCHED=n) fails.

Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392107067-19907-2-git-send-email-juri.lelli@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched/deadline: Fix overflow to handle period==0 and deadline!=0
Steven Rostedt [Wed, 19 Feb 2014 18:53:35 +0000 (13:53 -0500)]
sched/deadline: Fix overflow to handle period==0 and deadline!=0

While debugging the crash with the bad nr_running accounting, I hit
another bug where, after running my sched deadline test, I was getting
failures to take a CPU offline. It was giving me a -EBUSY error.

Adding a bunch of trace_printk()s around, I found that the cpu
notifier that called sched_cpu_inactive() was returning a failure. The
overflow value was coming up negative?

Talking this over with Juri, the problem is that the total_bw update was
suppose to be made by dl_overflow() which, during my tests, seemed to
not be called. Adding more trace_printk()s, it wasn't that it wasn't
called, but it exited out right away with the check of new_bw being
equal to p->dl.dl_bw. The new_bw calculates the ratio between period and
runtime. The bug is that if you set a deadline, you do not need to set
a period if you plan on the period being equal to the deadline. That
is, if period is zero and deadline is not, then the system call should
set the period to be equal to the deadline. This is done elsewhere in
the code.

The fix is easy, check if period is set, and if it is not, then use the
deadline.

Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140219135335.7e74abd4@gandalf.local.home
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agosched/deadline: Fix bad accounting of nr_running
Juri Lelli [Thu, 20 Feb 2014 08:19:39 +0000 (09:19 +0100)]
sched/deadline: Fix bad accounting of nr_running

Rostedt writes:

My test suite was locking up hard when enabling mmiotracer. This was due
to the mmiotracer placing all but one CPU offline. I found this out
when I was able to reproduce the bug with just my stress-cpu-hotplug
test. This bug baffled me because it would not always trigger, and
would only trigger on the first run after boot up. The
stress-cpu-hotplug test would crash hard the first run, or never crash
at all. But a new reboot may cause it to crash on the first run again.

I spent all week bisecting this, as I couldn't find a consistent
reproducer. I finally narrowed it down to the sched deadline patches,
and even more peculiar, to the commit that added the sched
deadline boot up self test to the latency tracer. Then it dawned on me
to what the bug was.

All it took was to run a task under sched deadline to screw up the CPU
hot plugging. This explained why it would lock up only on the first run
of the stress-cpu-hotplug test. The bug happened when the boot up self
test of the schedule latency tracer would test a deadline task. The
deadline task would corrupt something that would cause CPU hotplug to
fail. If it didn't corrupt it, the stress test would always work
(there's no other sched deadline tasks that would run to cause
problems). If it did corrupt on boot up, the first test would lockup
hard.

I proved this theory by running my deadline test program on another box,
and then run the stress-cpu-hotplug test, and it would now consistently
lock up. I could run stress-cpu-hotplug over and over with no problem,
but once I ran the deadline test, the next run of the
stress-cpu-hotplug would lock hard.

After adding lots of tracing to the code, I found the cause. The
function tracer showed that migrate_tasks() was stuck in an infinite
loop, where rq->nr_running never equaled 1 to break out of it. When I
added a trace_printk() to see what that number was, it was 335 and
never decrementing!

Looking at the deadline code I found:

static void __dequeue_task_dl(struct rq *rq, struct task_struct *p, int flags) {
dequeue_dl_entity(&p->dl);
dequeue_pushable_dl_task(rq, p);
}

static void dequeue_task_dl(struct rq *rq, struct task_struct *p, int flags) {
update_curr_dl(rq);
__dequeue_task_dl(rq, p, flags);

dec_nr_running(rq);
}

And this:

if (dl_runtime_exceeded(rq, dl_se)) {
__dequeue_task_dl(rq, curr, 0);
if (likely(start_dl_timer(dl_se, curr->dl.dl_boosted)))
dl_se->dl_throttled = 1;
else
enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);

if (!is_leftmost(curr, &rq->dl))
resched_task(curr);
}

Notice how we call __dequeue_task_dl() and in the else case we
call enqueue_task_dl()? Also notice that dequeue_task_dl() has
underscores where enqueue_task_dl() does not. The enqueue_task_dl()
calls inc_nr_running(rq), but __dequeue_task_dl() does not. This is
where we get nr_running out of sync.

[snip]

Another point where nr_running can get out of sync is when the dl_timer
fires:

dl_se->dl_throttled = 0;
if (p->on_rq) {
enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
if (task_has_dl_policy(rq->curr))
check_preempt_curr_dl(rq, p, 0);
else
resched_task(rq->curr);

This patch does two things:

 - correctly accounts for throttled tasks (that are now considered
   !running);

 - fixes the bug, updating nr_running from {inc,dec}_dl_tasks(),
   since we risk to update it twice in some situations (e.g., a
   task is dequeued while it has exceeded its budget).

Cc: mingo@redhat.com
Cc: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1392884379-13744-1-git-send-email-juri.lelli@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agowatchdog: w83697hf_wdt: return ENODEV if no device was found
Stanislav Kholmanskikh [Mon, 27 Jan 2014 07:04:33 +0000 (11:04 +0400)]
watchdog: w83697hf_wdt: return ENODEV if no device was found

Most WDT driver modules return ENODEV during modprobe if
no valid device was found, but w83697hf_wdt returns EIO.

Let w83697hf_wdt return ENODEV.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 21 Feb 2014 18:14:15 +0000 (10:14 -0800)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Three minor fixes from David Howells and Paul Gortmaker"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  Sparc: sparc_cpu_model isn't in asm/system.h any more [ver #2]
  sparc32: make copy_to/from_user_page() usable from modular code
  sparc32: fix build failure for arch_jump_label_transform

10 years agoMerge tag 'pm+acpi-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 21 Feb 2014 18:01:17 +0000 (10:01 -0800)]
Merge tag 'pm+acpi-3.14-rc4' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "These include two fixes for recent regressions related to ACPI, a
  cpufreq fix for breakage overlooked by a previous fix commit, two
  intel_pstate fixes for stuff added during the 3.13 cycle that need to
  go into -stable, three fixes for older bugs that also are -stable
  candidates, ACPI video blacklist changes related to BIOSes that behave
  in a special way on Windows 8, several build fixes for CONFIG_PM_SLEEP
  unset in ACPI drivers and an ACPI driver cleanup.

  Specifics:

   - Fix for a recent probing regression in the nouveau driver
     introduced by an ACPI change related to the handling of _DSM from
     Jiang Liu.

   - Fix for a dock station sysfs attribute that stopped working
     correctly after recent changes in the ACPI core.

   - cpufreq fix taking care of broken code related to CPU removal and
     overlooked by a previous recent fix in that area.  From Viresh
     Kumar.

   - Two intel_pstate fixes related to Baytrail support added during the
     3.13 cycle (candidates for -stable) from Dirk Brandewie.

   - ACPI video fix removing duplicate brightness values from the _BCL
     table which makes its user space interface behave sanely.  From
     Hans de Goede.

   - Fix for the powernow-k8 cpufreq driver making it initialize its
     per-CPU data structures correctly from Srivatsa S Bhat.

   - Fix for an obscure memory leak in the ACPI PCI interrupt allocation
     code (related to ISA) from Tomasz Nowicki.

   - ACPI video blacklist changes moving several systems that should use
     the native backlight interface instead of the ACPI one from the
     general ACPI _OSI blacklist the the ACPI video driver's blacklist
     where they belong.  This consists of an ACPI video driver update
     from Aaron Lu and a revert of a previous commit adding systems to
     the ACPI _OSI blacklist requested by Takashi Iwai.

   - Several fixes for build issues in ACPI drivers occuring when
     CONFIG_PM_SLEEP is unset from Shuah Khan.

   - Fix for an sscanf() format string in the ACPI Smart Battery
     Subsystem (SBS) driver from Luis G.F"

* tag 'pm+acpi-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  intel_pstate: Add support for Baytrail turbo P states
  intel_pstate: Use LFM bus ratio as min ratio/P state
  ACPI / nouveau: fix probing regression related to _DSM
  Revert "ACPI: Blacklist Win8 OSI for some HP laptop 2013 models"
  ACPI / video: Add systems that should favour native backlight interface
  ACPI / video: Filter the _BCL table for duplicate brightness values
  cpufreq: powernow-k8: Initialize per-cpu data-structures properly
  cpufreq: remove sysfs link when a cpu != policy->cpu, is removed
  ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
  ACPI / dock: Make 'docked' sysfs attribute work as documented
  ACPI / SBS: Fix incorrect sscanf() string
  ACPI / thermal: fix thermal driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / SBS: fix SBS driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / fan: fix fan driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / button: fix button driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / battery: fix battery driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / AC: fix AC driver compile error when CONFIG_PM_SLEEP is undefined

10 years agoMerge tag 'iommu-fixes-v3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 21 Feb 2014 17:59:46 +0000 (09:59 -0800)]
Merge tag 'iommu-fixes-v3.14-rc3' of git://git./linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "The fixes are only for the ARM-SMMU driver.  Here is the summary from
  Will Deacon:

   - Andreas Herrmann took the driver for a run with a real SATA
     controller, which caused the new mutex-based locking to explode
     since we require mappings in atomic context

   - Yifan fixed an issue with the page table creation, which then
     caused breakages with the way in which we flush descriptors out to
     the table walker

   - I ran the driver on a system where the SMMU is hooked into a
     coherent interconnect for table walks, and noticed a shareability
     mismatch between the CPU and the SMMU

  These issues are all fixed here and have been tested on both arm and
  arm64 based systems.

  Besides that I put a fix on-top to make the spinlock irq-safe, so that
  the code-paths can be used in the DMA-API"

* tag 'iommu-fixes-v3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  arm/smmu: Use irqsafe spinlock for domain lock
  iommu/arm-smmu: fix compilation issue when !CONFIG_ARM_AMBA
  iommu/arm-smmu: set CBARn.BPSHCFG to NSH for s1-s2-bypass contexts
  iommu/arm-smmu: fix table flushing during initial allocations
  iommu/arm-smmu: really fix page table locking
  iommu/arm-smmu: fix pud/pmd entry fill sequence

10 years agoMerge tag 'sound-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 21 Feb 2014 17:55:32 +0000 (09:55 -0800)]
Merge tag 'sound-3.14-rc4' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This time we got a slightly higher volume than previous times, but all
  device-specific good fixes.  Noticeable changes are fixes in davinci,
  and the removal of open-codes in HD-audio ca0132 driver.  The rest are
  all small fixes and/or quirks"

* tag 'sound-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Enable front audio jacks on one HP desktop model
  ALSA: hda/ca0132 - Fix recording from mode id 0x8
  ALSA: hda/ca0132 - setup/cleanup streams
  ALSA: hda - add headset mic detect quirks for two Dell laptops
  ALSA: usb-audio: work around KEF X300A firmware bug
  ASoC: max98090: make REVISION_ID readable
  ASoC: txx9aclc_ac97: Fix kernel crash on probe
  ASoC: max98090: sync regcache on entering STANDBY
  ASoC: blackfin: Fix machine driver Kconfig dependencies
  ASoC: da9055: Fix device registration of PMIC and CODEC devices
  ASoC: fsl-esai: fix ESAI TDM slot setting
  ASoC: fsl: fix pm support of machine drivers
  ASoC: rt5640: Add ACPI ID for Intel Baytrail
  ASoC: davinci-evm: Add pm callbacks to platform driver
  ASoC: davinci-mcasp: Consolidate pm_runtime_get/put() use in the driver
  ASoC: davinci-mcasp: Configure xxTDM, xxFMT and xxFMCT registers synchronously
  ASoC: davinci-mcasp: Harmonize the sub hw_params function names
  ASoC: samsung: Fix trivial typo
  ASoC: samsung: Remove invalid dependencies
  ASoC: wm8993: drop regulator_bulk_free of devm_ allocated data

10 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Fri, 21 Feb 2014 00:28:23 +0000 (01:28 +0100)]
Merge branch 'pm-cpufreq'

* pm-cpufreq:
  intel_pstate: Add support for Baytrail turbo P states
  intel_pstate: Use LFM bus ratio as min ratio/P state
  cpufreq: powernow-k8: Initialize per-cpu data-structures properly
  cpufreq: remove sysfs link when a cpu != policy->cpu, is removed

10 years agoMerge branches 'acpi-pm' and 'acpi-video'
Rafael J. Wysocki [Fri, 21 Feb 2014 00:28:12 +0000 (01:28 +0100)]
Merge branches 'acpi-pm' and 'acpi-video'

* acpi-pm:
  ACPI / thermal: fix thermal driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / SBS: fix SBS driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / fan: fix fan driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / button: fix button driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / battery: fix battery driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / AC: fix AC driver compile error when CONFIG_PM_SLEEP is undefined

* acpi-video:
  Revert "ACPI: Blacklist Win8 OSI for some HP laptop 2013 models"
  ACPI / video: Add systems that should favour native backlight interface
  ACPI / video: Filter the _BCL table for duplicate brightness values

10 years agoMerge branches 'acpi-cleanup', 'acpi-dock', 'acpi-pci' and 'acpi-dsm'
Rafael J. Wysocki [Fri, 21 Feb 2014 00:27:48 +0000 (01:27 +0100)]
Merge branches 'acpi-cleanup', 'acpi-dock', 'acpi-pci' and 'acpi-dsm'

* acpi-cleanup:
  ACPI / SBS: Fix incorrect sscanf() string

* acpi-dock:
  ACPI / dock: Make 'docked' sysfs attribute work as documented

* acpi-pci:
  ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()

* acpi-dsm:
  ACPI / nouveau: fix probing regression related to _DSM

10 years agointel_pstate: Add support for Baytrail turbo P states
Dirk Brandewie [Wed, 12 Feb 2014 18:01:07 +0000 (10:01 -0800)]
intel_pstate: Add support for Baytrail turbo P states

A documentation update exposed the existance of the turbo ratio
register. Update baytrail support to use the turbo range.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: Use LFM bus ratio as min ratio/P state
Dirk Brandewie [Wed, 12 Feb 2014 18:01:06 +0000 (10:01 -0800)]
intel_pstate: Use LFM bus ratio as min ratio/P state

LFM (max efficiency ratio) is the max frequency at minimum voltage
supported by the processor.  Using LFM as the minimum P state
increases performmance without affecting power. By not using P states
below LFM we avoid using P states that are less power efficient.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoregulator: core: Change dummy supplies error message to a warning
Shuah Khan [Thu, 20 Feb 2014 19:58:15 +0000 (12:58 -0700)]
regulator: core: Change dummy supplies error message to a warning

Change "dummy supplies not allowed" error message to warning instead, as this
is a just warning message with no change to the behavior.

[Added a CC to stable since some other bug fixes cause this to come up
more frequently on PCs which is how it was noticed -- broonie]

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
10 years agoMerge tag 'fixes-for-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Thu, 20 Feb 2014 23:23:37 +0000 (15:23 -0800)]
Merge tag 'fixes-for-v3.14-rc4' of git://git./linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.14-rc4

Here are 10 fixes for our current -rc cycle. It's likely
the last round of fixes for this merge window. All patches
have soaked for a long time and have all been tested in real
HW.

The most interesting fixes are a fix for enumeration of superspeed
hubs when MUSB is acting as host, and a remote-wakeup fix also on
MUSB.

Signed-of-by: Felipe Balbi <balbi@ti.com>
10 years agoMerge tag 'pci-v3.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Thu, 20 Feb 2014 20:46:24 +0000 (12:46 -0800)]
Merge tag 'pci-v3.14-fixes-1' of git://git./linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:
 "The most interesting thing here is the change to enable INTx (by
  clearing PCI_COMMAND_INTX_DISABLE) if the BIOS left INTx disabled.
  Apparently the Baytrail BIOS does this, which means EHCI doesn't work.

  Also, fix an AHCI MSI regression and other issues with the recent MSI
  changes.  This also adds pci_enable_msi_exact() and
  pci_enable_msix_exact(), which aren't regression fixes, but will keep
  us from touching drivers twice (once to stop using the deprecated
  pci_enable_msi(), etc., and again to use the *_exact() variants).

  There's also a minor MVEBU fix.

  Summary:

  MSI:
    - Fix AHCI single-MSI fallback (Alexander Gordeev)
    - Fix populate_msi_sysfs() error paths (Greg Kroah-Hartman)
    - Fix htmldocs problem (Masanari Iida)
    - Add pci_enable_msi_exact() and pci_enable_msix_exact() (Alexander Gordeev)
    - Update documentation (Alexander Gordeev)

  Miscellaneous:
    - mvebu: expose device ID & revision via lspci (Andrew Lunn)
    - Enable INTx if the BIOS left them disabled (Bjorn Helgaas)"

* tag 'pci-v3.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  ahci: Fix broken fallback to single MSI mode
  PCI: Enable INTx if BIOS left them disabled
  PCI/MSI: Add pci_enable_msi_exact() and pci_enable_msix_exact()
  PCI/MSI: Fix cut-and-paste errors in documentation
  PCI/MSI: Add pci_enable_msi() documentation back
  PCI/MSI: Fix pci_msix_vec_count() htmldocs failure
  PCI/MSI: Fix leak of msi_attrs
  PCI/MSI: Check kmalloc() return value, fix leak of name
  PCI: mvebu: Use Device ID and revision from underlying endpoint

10 years agoACPI / nouveau: fix probing regression related to _DSM
Jiang Liu [Thu, 20 Feb 2014 09:23:16 +0000 (17:23 +0800)]
ACPI / nouveau: fix probing regression related to _DSM

Fix regression caused by commit b072e53, which breaks loading nouveau
driver on optimus laptops.

On some platforms, ACPI _DSM method (nouveau_op_dsm_muid, function 0)
has special requirements on the fourth parameter, which is different
from ACPI specifications. So revert to the private implementation
to check availability of _DSM functions instead of using common
acpi_check_dsm() interface.

Fixes: b072e53b0a27 (ACPI / nouveau: replace open-coded _DSM code with helper functions)
Reported-and-tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
[rjw: Subject]
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Thu, 20 Feb 2014 20:04:15 +0000 (12:04 -0800)]
Merge branch 'for-3.14-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "Various device specific fixes.  Nothing too interesting"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ahci: disable NCQ on Samsung pci-e SSDs on macbooks
  ata: sata_mv: Cleanup only the initialized ports
  sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN
  ata: enable quirk from jmicron JMB350 for JMB394
  ATA: SATA_MV: Add missing Kconfig select statememnt
  ata: pata_imx: Check the return value from clk_prepare_enable()

10 years agoMerge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Thu, 20 Feb 2014 20:01:09 +0000 (12:01 -0800)]
Merge branch 'for-3.14-fixes' of git://git./linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:
 "Quite a few fixes this time.

  Three locking fixes, all marked for -stable.  A couple error path
  fixes and some misc fixes.  Hugh found a bug in memcg offlining
  sequence and we thought we could fix that from cgroup core side but
  that turned out to be insufficient and got reverted.  A different fix
  has been applied to -mm"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup: update cgroup_enable_task_cg_lists() to grab siglock
  Revert "cgroup: use an ordered workqueue for cgroup destruction"
  cgroup: protect modifications to cgroup_idr with cgroup_mutex
  cgroup: fix locking in cgroup_cfts_commit()
  cgroup: fix error return from cgroup_create()
  cgroup: fix error return value in cgroup_mount()
  cgroup: use an ordered workqueue for cgroup destruction
  nfs: include xattr.h from fs/nfs/nfs3proc.c
  cpuset: update MAINTAINERS entry
  arm, pm, vmpressure: add missing slab.h includes

10 years agoMerge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Thu, 20 Feb 2014 20:00:27 +0000 (12:00 -0800)]
Merge branch 'for-3.14-fixes' of git://git./linux/kernel/git/tj/wq

Pull workqueue fixes from Tejun Heo:
 "Two workqueue fixes.  One for an unlikely but possible critical bug
  during kworker shutdown and the other to make lockdep names a bit more
  descriptive"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: ensure @task is valid across kthread_stop()
  workqueue: add args to workqueue lockdep name

10 years agoMerge branch 'fixes-for-v3.14' of git://git.linaro.org/people/mszyprowski/linux-dma...
Linus Torvalds [Thu, 20 Feb 2014 19:58:56 +0000 (11:58 -0800)]
Merge branch 'fixes-for-v3.14' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping

Pull DMA-mapping fixes from Marek Szyprowski:
 "This contains fixes for incorrect atomic test in dma-mapping subsystem
  for ARM and x86 architecture"

* 'fixes-for-v3.14' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  x86: dma-mapping: fix GFP_ATOMIC macro usage
  ARM: dma-mapping: fix GFP_ATOMIC macro usage

10 years agouser_namespace.c: Remove duplicated word in comment
Brian Campbell [Mon, 17 Feb 2014 03:58:12 +0000 (22:58 -0500)]
user_namespace.c: Remove duplicated word in comment

Signed-off-by: Brian Campbell <brian.campbell@editshare.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoSparc: sparc_cpu_model isn't in asm/system.h any more [ver #2]
David Howells [Thu, 20 Feb 2014 16:08:12 +0000 (16:08 +0000)]
Sparc: sparc_cpu_model isn't in asm/system.h any more [ver #2]

sparc_cpu_model isn't in asm/system.h any more, so remove a comment
about it.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agousb: musb: correct use of schedule_delayed_work()
Daniel Mack [Wed, 5 Feb 2014 14:34:18 +0000 (15:34 +0100)]
usb: musb: correct use of schedule_delayed_work()

schedule_delayed_work() takes the delay in jiffies, not msecs.

This bug slipped in with the recent reset logic cleanup
(8ed1fb790ea: "usb: musb: finish suspend/reset work independently from
musb_hub_control()").

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP
Josh Cartwright [Tue, 18 Feb 2014 16:36:29 +0000 (10:36 -0600)]
usb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP

Both the PM_RUNTIME and PM_SLEEP callbacks call into the common
msm_otg_{suspend,resume} routines, however these routines are only being
built when CONFIG_PM_SLEEP.  In addition, msm_otg_{suspend,resume} also
depends on msm_hsusb_config_vddcx(), which is only built when
CONFIG_PM_SLEEP.

Fix the CONFIG_PM_RUNTIME, !CONFIG_PM_SLEEP case by changing the
preprocessor conditional, and moving msm_hsusb_config_vddcx().

While we're here, eliminate the CONFIG_PM conditional for setting
up the dev_pm_ops.

This address the following errors Russell King has hit doing randconfig
builds:

drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_runtime_suspend':
drivers/usb/phy/phy-msm-usb.c:1691:2: error: implicit declaration of function 'msm_otg_suspend'
drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_runtime_resume':
drivers/usb/phy/phy-msm-usb.c:1699:2: error: implicit declaration of function 'msm_otg_resume'

Cc: Ivan T. Ivanov <iivanov@mm-sol.com>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: fix NULL pointer dereference
Andrzej Pietrasiewicz [Mon, 20 Jan 2014 07:33:50 +0000 (08:33 +0100)]
usb: gadget: fix NULL pointer dereference

Fix possible NULL pointer dereference introduced in
commit 219580e (usb: f_fs: check quirk to pad epout
buf size when not aligned to maxpacketsize)

In cases we do wait with:

wait_event_interruptible(epfile->wait, (ep = epfile->ep));

for endpoint to be enabled, functionfs_bind() has not been called yet
and epfile->ffs->gadget is still NULL and the automatic variable 'gadget'
has been initialized with NULL at the point of its definition.
Later on it is used as a parameter to:

usb_ep_align_maybe(gadget, ep->ep, len)

which in turn dereferences it.

This patch fixes it by moving the actual assignment to the local 'gadget'
variable after the potential waiting has completed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: printer: using gadget_is_otg to check otg support at runtime
Peter Chen [Fri, 3 Jan 2014 08:45:13 +0000 (16:45 +0800)]
usb: gadget: printer: using gadget_is_otg to check otg support at runtime

We need to use gadget_is_otg to check if the gadget is really
otg support at runtime, other composite gadget drivers have already
followed this method.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoarm/smmu: Use irqsafe spinlock for domain lock
Joerg Roedel [Thu, 20 Feb 2014 11:19:08 +0000 (12:19 +0100)]
arm/smmu: Use irqsafe spinlock for domain lock

As the lock might be used through DMA-API which is allowed
in interrupt context.

Signed-off-by: Joerg Roedel <joro@8bytes.org>
Acked-by: Will Deacon <will.deacon@arm.com>
10 years agoof: Add self test for of_match_node()
Grant Likely [Tue, 18 Feb 2014 21:38:55 +0000 (21:38 +0000)]
of: Add self test for of_match_node()

Adds a selftest function for the of_match_node function. of_match_node
is supposed to handle precedence for the compatible property as well as
the name and device_type values. This patch adds some test case data and
a function that makes sure each test node matches against the correct
entry of an of_device_id table.

This code was written to verify the new of_match_node() implementation
that is an earlier part of this series.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Kevin Hao <haokexin@gmail.com>
10 years agoof: Move testcase FDT data into drivers/of
Grant Likely [Tue, 18 Feb 2014 21:46:16 +0000 (21:46 +0000)]
of: Move testcase FDT data into drivers/of

The testcase data is usable by any platform. This patch moves it into
the drivers/of directory so it can be included by any architecture.

Using the test cases requires manually adding #include <testcases.dtsi>
to the end of the boards .dtsi file and enabling CONFIG_OF_SELFTEST. Not
pretty though. A useful project would be to make the testcase code
easier to execute.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
10 years agoof: reimplement the matching method for __of_match_node()
Kevin Hao [Wed, 19 Feb 2014 08:15:45 +0000 (16:15 +0800)]
of: reimplement the matching method for __of_match_node()

In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().

To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.

Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
  1. specific compatible && type && name
  2. specific compatible && type
  3. specific compatible && name
  4. specific compatible
  5. general compatible && type && name
  6. general compatible && type
  7. general compatible && name
  8. general compatible
  9. type && name
  10. type
  11. name

v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
    remove extra __of_device_is_compatible() wrapper stub.
    Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
    entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
    entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};

Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
10 years agoALSA: hda - Enable front audio jacks on one HP desktop model
Hui Wang [Thu, 20 Feb 2014 03:47:21 +0000 (11:47 +0800)]
ALSA: hda - Enable front audio jacks on one HP desktop model

The front headphone and mic jackes on a HP desktop model (Vendor Id:
0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
machine has 8 physical ports, 6 of them are routed to rear jackes
and all of them work very well, while the remaining 2 ports are
routed to front headphone and mic jackes, but the corresponding
pin complex node are not defined correctly.

After apply this fix, the front audio jackes can work very well.

[trivial fix of enum definition by tiwai]

BugLink: https://bugs.launchpad.net/bugs/1282369
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Gerald Yang <gerald.yang@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Thu, 20 Feb 2014 06:50:32 +0000 (07:50 +0100)]
Merge tag 'asoc-v3.14-rc3' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.14

A few fixes, all driver speccific ones.  The DaVinci ones aren't as
clear as they should be from the subject lines on the commits but they
fix issues which will prevent correct operation in some use cases and
only affect that particular driver so are reasonably safe.

10 years agosparc32: make copy_to/from_user_page() usable from modular code
Paul Gortmaker [Thu, 13 Feb 2014 21:15:01 +0000 (16:15 -0500)]
sparc32: make copy_to/from_user_page() usable from modular code

While copy_to/from_user_page() users are uncommon, there is one in
drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c which leads
to the following:

ERROR: "sparc32_cachetlb_ops" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!

during routine allmodconfig build coverage.  The reason this happens
is as follows:

In arch/sparc/include/asm/cacheflush_32.h we have:

 #define flush_cache_page(vma,addr,pfn) \
        sparc32_cachetlb_ops->cache_page(vma, addr)

 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
        do {                                                    \
                flush_cache_page(vma, vaddr, page_to_pfn(page));\
                memcpy(dst, src, len);                          \
        } while (0)
 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
        do {                                                    \
                flush_cache_page(vma, vaddr, page_to_pfn(page));\
                memcpy(dst, src, len);                          \
        } while (0)

However, sparc32_cachetlb_ops isn't exported and hence the error.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosparc32: fix build failure for arch_jump_label_transform
Paul Gortmaker [Thu, 13 Feb 2014 18:57:44 +0000 (13:57 -0500)]
sparc32: fix build failure for arch_jump_label_transform

In arch/sparc/Kernel/Makefile, we see:

   obj-$(CONFIG_SPARC64)   += jump_label.o

However, the Kconfig selects HAVE_ARCH_JUMP_LABEL unconditionally
for all SPARC.  This in turn leads to the following failure when
doing allmodconfig coverage builds:

kernel/built-in.o: In function `__jump_label_update':
jump_label.c:(.text+0x8560c): undefined reference to `arch_jump_label_transform'
kernel/built-in.o: In function `arch_jump_label_transform_static':
(.text+0x85cf4): undefined reference to `arch_jump_label_transform'
make: *** [vmlinux] Error 1

Change HAVE_ARCH_JUMP_LABEL to be conditional on SPARC64 so that it
matches the Makefile.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoRevert "ACPI: Blacklist Win8 OSI for some HP laptop 2013 models"
Rafael J. Wysocki [Tue, 18 Feb 2014 13:55:15 +0000 (14:55 +0100)]
Revert "ACPI: Blacklist Win8 OSI for some HP laptop 2013 models"

This reverts commit 2d4054d84224 (ACPI: Blacklist Win8 OSI for some HP
laptop 2013 models) that is not necessary any more after previous
commit 1811fcb029fa (ACPI / video: Add systems that should favour native
backlight interface).

Requested-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Add systems that should favour native backlight interface
Aaron Lu [Tue, 18 Feb 2014 05:54:20 +0000 (13:54 +0800)]
ACPI / video: Add systems that should favour native backlight interface

Some system's ACPI video backlight control interface is broken and the
native backlight control interface should be used by default. This patch
sets the use_native_backlight parameter to true for those systems so
that video backlight control interface will not be created. For detailed
models that are added here, reference the following list.

Note that the user specified kernel cmdline option will always have the
highest priority, i.e. if use_native_backlight=0 is specified and the
system is in the DMI table, the video module will not skip registering
backlight interface for it.

Thinkpad T430s:
Reported-by: Theodore Tso <tytso@mit.edu>
Reported-and-tested-by: Peter Weber <bugs@ttyhoney.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=51231
Thinkpad X230:
Reported-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=51231
ThinkPad X1 Carbon:
Reported-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Lenovo Yoga 13:
Reported-by: Lennart Poettering <lennart@poettering.net>
Reported-and-tested-by: Kevin Smith <thirdwiggin@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=63811
Dell Inspiron 7520:
Reported-by: Rinat Ibragimov <ibragimovrinat@mail.ru>
Acer Aspire 5733Z:
Reported-by: <sov.info@mail.ru>
References: https://bugzilla.kernel.org/show_bug.cgi?id=62941
Acer Aspire V5-431:
Reported-by: Thomas Christensen <christensenthomas@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=68751
HP ProBook 4340s:
Reported-and-tested-by: Vladimir Sherenkov <a_12300@mail.ru>
References: http://redmine.russianfedora.pro/issues/1258
HP EliteBook/ProBook 2013 models, ZBook and some others:
Provided-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Filter the _BCL table for duplicate brightness values
Hans de Goede [Thu, 13 Feb 2014 15:32:51 +0000 (16:32 +0100)]
ACPI / video: Filter the _BCL table for duplicate brightness values

Some devices have duplicate entries in there brightness levels table, ie
on my Dell Latitude E6430 the table looks like this:

[    3.686060] acpi backlight index   0, val 80
[    3.686095] acpi backlight index   1, val 50
[    3.686122] acpi backlight index   2, val 5
[    3.686147] acpi backlight index   3, val 5
[    3.686172] acpi backlight index   4, val 5
[    3.686197] acpi backlight index   5, val 5
[    3.686223] acpi backlight index   6, val 5
[    3.686248] acpi backlight index   7, val 5
[    3.686273] acpi backlight index   8, val 6
[    3.686332] acpi backlight index   9, val 7
[    3.686356] acpi backlight index  10, val 8
[    3.686380] acpi backlight index  11, val 9
etc.

Notice that brightness values 0-5 are all mapped to 5. This means that
if userspace writes any value between 0 and 5 to the brightness sysfs attribute
and then reads it, it will always return 0, which is somewhat unexpected.

This is a problem for ie gnome-settings-daemon, which uses read-modify-write
logic when the users presses the brightness up or down keys. This is done
this way to take brightness changes from other sources into account.

On this specific laptop what happens once the brightness has been set to 0,
is that gsd reads 0, adds 5, writes 5, and on the next brightness up key press
again reads 0, so things get stuck at the lowest brightness setting.

Filtering out the duplicate table entries, makes any write to brightness
read back as the written value as one would expect, fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge tag 'nfs-for-3.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Wed, 19 Feb 2014 20:13:02 +0000 (12:13 -0800)]
Merge tag 'nfs-for-3.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include stable fixes for the following bugs:

   - General performance regression due to NFS_INO_INVALID_LABEL being
     set when the server doesn't support labeled NFS
   - Hang in the RPC code due to a socket out-of-buffer race
   - Infinite loop when trying to establish the NFSv4 lease
   - Use-after-free bug in the RPCSEC gss code.
   - nfs4_select_rw_stateid is returning with a non-zero error value on
     success

  Other bug fixes:

  - Potential memory scribble in the RPC bi-directional RPC code
  - Pipe version reference leak
  - Use the correct net namespace in the new NFSv4 migration code"

* tag 'nfs-for-3.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS fix error return in nfs4_select_rw_stateid
  NFSv4: Use the correct net namespace in nfs4_update_server
  SUNRPC: Fix a pipe_version reference leak
  SUNRPC: Ensure that gss_auth isn't freed before its upcall messages
  SUNRPC: Fix potential memory scribble in xprt_free_bc_request()
  SUNRPC: Fix races in xs_nospace()
  SUNRPC: Don't create a gss auth cache unless rpc.gssd is running
  NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS

10 years agoMerge tag 'mfd-fixes-3.14-1' of git://git.linaro.org/people/lee.jones/mfd
Linus Torvalds [Wed, 19 Feb 2014 20:04:06 +0000 (12:04 -0800)]
Merge tag 'mfd-fixes-3.14-1' of git://git.linaro.org/people/lee.jones/mfd

Pull MFD fixes from Lee Jones:
 "Couple of small issues solved:
   - Suspend/Resume call-backs require CONFIG_PM_SLEEP
   - Some drivers written for 32bit architectures fail when compiled
     with a 64bit compiler.  The fixes will future proof the drivers"

* tag 'mfd-fixes-3.14-1' of git://git.linaro.org/people/lee.jones/mfd:
  mfd: sec-core: sec_pmic_{suspend,resume}() should depend on CONFIG_PM_SLEEP
  mfd: max14577: max14577_{suspend,resume}() should depend on CONFIG_PM_SLEEP
  mfd: tps65217: Naturalise cross-architecture discrepancies
  mfd: wm8994-core: Naturalise cross-architecture discrepancies
  mfd: max8998: Naturalise cross-architecture discrepancies
  mfd: max8997: Naturalise cross-architecture discrepancies