]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoARM: defconfig: tx28: added defconfig for Ka-Ro TX28 modules mainline kc/mainline KARO-TX28-2014-09-10
Lothar Waßmann [Wed, 10 Sep 2014 08:15:02 +0000 (10:15 +0200)]
ARM: defconfig: tx28: added defconfig for Ka-Ro TX28 modules

9 years agoARM: dts: imx28-tx28: add alias for CAN XCVR regulator
Lothar Waßmann [Mon, 8 Sep 2014 12:50:51 +0000 (14:50 +0200)]
ARM: dts: imx28-tx28: add alias for CAN XCVR regulator

This alias is used by U-Boot to enable/disable the regulator depending
on baseboard type.

9 years agoARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs
Lothar Waßmann [Fri, 5 Sep 2014 07:00:13 +0000 (09:00 +0200)]
ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs

The spi-mxs driver does not allow full duplex SPI transfers. The
spi-gpio driver may be used as an alternative if this is required.

Make the choice between those drivers easier for the end user by
providing settings for both drivers.

9 years agoARM: dts: imx28-tx28: use GPIO flags
Lothar Waßmann [Mon, 8 Sep 2014 12:48:21 +0000 (14:48 +0200)]
ARM: dts: imx28-tx28: use GPIO flags

9 years agoARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev
Lothar Waßmann [Fri, 5 Sep 2014 06:58:57 +0000 (08:58 +0200)]
ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev

The labels on the spidev nodes are not used and not required, so
remove them. The TX28 supports 3 chipselects on the SPI
interface. Make all those chipselects available to the user.

9 years agoInput: matrix_keypad - make driver useable with GPIO drivers requiring threaded irqs
Lothar Waßmann [Mon, 8 Sep 2014 13:10:31 +0000 (15:10 +0200)]
Input: matrix_keypad - make driver useable with GPIO drivers requiring threaded irqs

Trying to use the matrix-keypad driver with GPIO drivers that require
nested irq handlers (e.g. I2C GPIO adapters like PCA9554),
request_irq() fails because the GPIO driver requires a threaded
interrupt handler.

Use request_any_context_irq() to be able to use any GPIO driver as
keypad driver.

9 years agogpio: pca953x: Fix warning when HW interrupts are rescheduled by the softirq tasklet
Lothar Waßmann [Mon, 8 Sep 2014 13:28:47 +0000 (15:28 +0200)]
gpio: pca953x: Fix warning when HW interrupts are rescheduled by the softirq tasklet

When using the matrix_keymap driver with the gpio-pca953x driver, the
following warning may be issued when a keypress is detected:
WARNING: CPU: 0 PID: 3 at kernel/irq/manage.c:677 irq_nested_primary_handler+0x18/0x2c()
Primary handler called for nested irq 245
Modules linked in: evbug ci_hdrc_imx usbmisc_imx ci_hdrc udc_core ehci_hcd phy_mxs_usb
CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G        W     3.16.0-karo+ #118
[<c00142cc>] (unwind_backtrace) from [<c00118f8>] (show_stack+0x10/0x14)
[<c00118f8>] (show_stack) from [<c001bf10>] (warn_slowpath_common+0x64/0x84)
[<c001bf10>] (warn_slowpath_common) from [<c001bfc4>] (warn_slowpath_fmt+0x30/0x40)
[<c001bfc4>] (warn_slowpath_fmt) from [<c004ce08>] (irq_nested_primary_handler+0x18/0x2c)
[<c004ce08>] (irq_nested_primary_handler) from [<c004cb80>] (handle_irq_event_percpu+0x50/0x168)
[<c004cb80>] (handle_irq_event_percpu) from [<c004ccf8>] (handle_irq_event+0x60/0x7c)
[<c004ccf8>] (handle_irq_event) from [<c004f02c>] (handle_simple_irq+0x78/0xdc)
[<c004f02c>] (handle_simple_irq) from [<c004ed14>] (resend_irqs+0x4c/0x78)
[<c004ed14>] (resend_irqs) from [<c001f3ec>] (tasklet_action+0x74/0xd8)
[<c001f3ec>] (tasklet_action) from [<c001f760>] (__do_softirq+0xd0/0x1f4)
[<c001f760>] (__do_softirq) from [<c001f8c4>] (run_ksoftirqd+0x40/0x64)
[<c001f8c4>] (run_ksoftirqd) from [<c003d464>] (smpboot_thread_fn+0x174/0x234)
[<c003d464>] (smpboot_thread_fn) from [<c0036dd4>] (kthread+0xb4/0xd0)
[<c0036dd4>] (kthread) from [<c000f0f0>] (ret_from_fork+0x14/0x24)
---[ end trace a68cf7bc5348c4f7 ]---

This happens when an IRQ is detected by the GPIO driver while the GPIO
client driver (matrix_keypad in this case) has disabled the irq for
the GPIO it has acquired. When the HW IRQ is being rescheduled by the
softirq thread, the primary IRQ handler is called for the nested IRQ.

This patch makes sure, that the parent_irq (gpio-pca953x) is
rescheduled rather than the nested irq registered by the matrix_keypad
driver.
Similar patches are most probably required for a bunch of other
drivers too.

9 years agoleds: trigger: gpio: make ledtrig-gpio useable with GPIO drivers requiring threaded...
Lothar Waßmann [Mon, 8 Sep 2014 13:04:49 +0000 (15:04 +0200)]
leds: trigger: gpio: make ledtrig-gpio useable with GPIO drivers requiring threaded irqs

When trying to use the LED GPIO trigger with e.g. the PCA953x GPIO
driver, request_irq() fails with -EINVAL, because the GPIO driver
requires a nested interrupt handler.

Use request_any_context_irq() to be able to use any GPIO driver as LED
trigger.

9 years agoleds: trigger: gpio: fix warning in gpio trigger for gpios whose accessor function...
Lothar Waßmann [Mon, 8 Sep 2014 12:59:03 +0000 (14:59 +0200)]
leds: trigger: gpio: fix warning in gpio trigger for gpios whose accessor function may sleep

When using a GPIO driver whose accessor functions may sleep (e.g. an
I2C GPIO extender like PCA9554) the following warning is issued:
WARNING: CPU: 0 PID: 665 at drivers/gpio/gpiolib.c:2274 gpiod_get_raw_value+0x3c/0x48()
Modules linked in:
CPU: 0 PID: 665 Comm: kworker/0:2 Not tainted 3.16.0-karo+ #115
Workqueue: events gpio_trig_work
[<c00142cc>] (unwind_backtrace) from [<c00118f8>] (show_stack+0x10/0x14)
[<c00118f8>] (show_stack) from [<c001bf10>] (warn_slowpath_common+0x64/0x84)
[<c001bf10>] (warn_slowpath_common) from [<c001bf4c>] (warn_slowpath_null+0x1c/0x24)
[<c001bf4c>] (warn_slowpath_null) from [<c020a1b8>] (gpiod_get_raw_value+0x3c/0x48)
[<c020a1b8>] (gpiod_get_raw_value) from [<c02f68a0>] (gpio_trig_work+0x1c/0xb0)
[<c02f68a0>] (gpio_trig_work) from [<c0030c1c>] (process_one_work+0x144/0x38c)
[<c0030c1c>] (process_one_work) from [<c0030ef8>] (worker_thread+0x60/0x5cc)
[<c0030ef8>] (worker_thread) from [<c0036dd4>] (kthread+0xb4/0xd0)
[<c0036dd4>] (kthread) from [<c000f0f0>] (ret_from_fork+0x14/0x24)
---[ end trace cd51a1dad8b86c9c ]---

Fix this by using the _cansleep() variant of gpio_get().

9 years agoARM: dts: am335x-tx48: disable dysfunctional ti-am335x-tsc driver KARO-TX-2014-08-29
Lothar Waßmann [Fri, 29 Aug 2014 10:52:11 +0000 (12:52 +0200)]
ARM: dts: am335x-tx48: disable dysfunctional ti-am335x-tsc driver

9 years agoARM: defconfig: tx48: update for v3.16
Lothar Waßmann [Wed, 27 Aug 2014 11:49:41 +0000 (13:49 +0200)]
ARM: defconfig: tx48: update for v3.16

9 years agoregulator: ltc3589: make IRQ optional
Lothar Waßmann [Wed, 27 Aug 2014 10:02:15 +0000 (12:02 +0200)]
regulator: ltc3589: make IRQ optional

On the AM335x SoC rev. <= 1.0 the "Input Function of the EXTINTn
Terminal is Inverted", for which the only remedy is to "Use an active
high interrupt source or use an external inverter to change the
polarity of any active low interrupt source."

This pin is used as IRQ pin for the LTC3589 PMIC on the Ka-Ro
electronics TX48 module. Make the IRQ optional in the driver and use a
polling routine instead if no IRQ is specified in DT.
Otherwise the driver will continuously generate interrupts and make
the system unusable.

9 years agoARM: defconfig: tx48: enable UBIFS support
Lothar Waßmann [Thu, 17 Jul 2014 15:04:52 +0000 (17:04 +0200)]
ARM: defconfig: tx48: enable UBIFS support

9 years agoARM: defconfig: tx48: update for kernel version 3.16-rc3
Lothar Waßmann [Thu, 17 Jul 2014 14:03:45 +0000 (16:03 +0200)]
ARM: defconfig: tx48: update for kernel version 3.16-rc3

9 years agoASoC: am335x-tx48: disable debug messages
Lothar Waßmann [Thu, 17 Jul 2014 13:57:01 +0000 (15:57 +0200)]
ASoC: am335x-tx48: disable debug messages

9 years agospi: omap2-mcspi: fix blatant abuse of the resource subsystem
Lothar Waßmann [Thu, 17 Jul 2014 13:20:12 +0000 (15:20 +0200)]
spi: omap2-mcspi: fix blatant abuse of the resource subsystem

9 years agoASoC: sgtl5000: check whether regulator is enabled before disabling it
Lothar Waßmann [Thu, 17 Jul 2014 13:18:54 +0000 (15:18 +0200)]
ASoC: sgtl5000: check whether regulator is enabled before disabling it

9 years agoASoC: sgtl5000: fix regulator registering/removal
Lothar Waßmann [Thu, 17 Jul 2014 13:06:11 +0000 (15:06 +0200)]
ASoC: sgtl5000: fix regulator registering/removal

Due to using devm_regulator_bulk_get() the LDO regulator which may
have been registered is still referenced when ldo_regulator_remove()
tries to unregister it. This leads to the following warning from the
regulator subsystem (and makes it impossible to unload the
snd-soc-sgtl5000 module):

WARNING: CPU: 0 PID: 1297 at drivers/regulator/core.c:3600 regulator_unregister+0x78/0xd4()
Modules linked in: snd_soc_imx_sgtl5000(-) snd_soc_fsl_ssi imx_pcm_dma imx_pcm_fiq snd_soc_imx_audmux snd_soc_sgtl5000 regmap_i2c snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd flexcan can_dev usbmisc_imx mmc_block ci_hdrc_imx ci_hdrc udc_core ehci_hcd imx_keypad matrix_keymap sdhci_esdhc_imx sdhci_pltfm sdhci mmc_core spidev spi_imx spi_bitbang gpio_keys [last unloaded: tsc2007]
CPU: 0 PID: 1297 Comm: modprobe Not tainted 3.16.0-rc2-next-20140627-dt+ #1
Backtrace:
[<80011324>] (dump_backtrace) from [<8001169c>] (show_stack+0x18/0x1c)
 r6:804c5563 r5:00000009 r4:00000000 r3:00400100
[<80011684>] (show_stack) from [<803b7cc0>] (dump_stack+0x20/0x28)
[<803b7ca0>] (dump_stack) from [<8001cc70>] (warn_slowpath_common+0x6c/0x8c)
[<8001cc04>] (warn_slowpath_common) from [<8001ccb4>] (warn_slowpath_null+0x24/0x2c)
 r8:9e6c93c0 r7:00000000 r6:00000000 r5:9e6c9798 r4:9d820980
[<8001cc90>] (warn_slowpath_null) from [<802472bc>] (regulator_unregister+0x78/0xd4)
[<80247244>] (regulator_unregister) from [<7f176720>] (ldo_regulator_remove+0x28/0x30 [snd_soc_sgtl5000])
 r4:9e7497c0 r3:9d871918
[<7f1766f8>] (ldo_regulator_remove [snd_soc_sgtl5000]) from [<7f17675c>] (sgtl5000_remove+0x34/0x3c [snd_soc_sgtl5000])
[<7f176728>] (sgtl5000_remove [snd_soc_sgtl5000]) from [<7f13e090>] (soc_remove_codec+0x24/0x94 [snd_soc_core])
 r5:9d8234ac r4:9e7497c0

Use regulator_bulk_get() and explicitly free the regulators to prevent
this.

Also set sgtl5000->ldo to NULL when the regulator has been
unregistered to prevent possible derefence of the stale pointer.

9 years agoASoC: sgtl5000: use devm_* functions to allocate memory
Lothar Waßmann [Thu, 17 Jul 2014 11:27:02 +0000 (13:27 +0200)]
ASoC: sgtl5000: use devm_* functions to allocate memory

9 years agoASoC: sgtl5000: source cleanup
Lothar Waßmann [Thu, 17 Jul 2014 11:26:48 +0000 (13:26 +0200)]
ASoC: sgtl5000: source cleanup

9 years agousb: musb: core: properly setup the HW before registering it to the USB core
Lothar Waßmann [Thu, 17 Jul 2014 10:56:12 +0000 (12:56 +0200)]
usb: musb: core: properly setup the HW before registering it to the USB core

Without this patch overriding the USBOTG_ID pin by setting the iddig
bit in the USB_MODE register doesn't work because it obviously is done
too late to be recognized correctly.

9 years agousb: musb: core: cleanup - remove some useless 'break's from switch statements
Lothar Waßmann [Thu, 17 Jul 2014 10:56:02 +0000 (12:56 +0200)]
usb: musb: core: cleanup - remove some useless 'break's from switch statements

9 years agousb: phy: am335x: call usb_gen_phy_init()/usb_gen_phy_shutdown() in am335x_init(...
Lothar Waßmann [Thu, 17 Jul 2014 10:50:28 +0000 (12:50 +0200)]
usb: phy: am335x: call usb_gen_phy_init()/usb_gen_phy_shutdown() in am335x_init()/am335x_shutdown()

9 years agousb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy
Lothar Waßmann [Thu, 17 Jul 2014 10:49:41 +0000 (12:49 +0200)]
usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy

9 years agousb: phy: am335x: group the #includes by subdirs
Lothar Waßmann [Thu, 17 Jul 2014 10:48:33 +0000 (12:48 +0200)]
usb: phy: am335x: group the #includes by subdirs

9 years agousb: musb_am335x: make module unload/reload work
Lothar Waßmann [Thu, 17 Jul 2014 09:58:55 +0000 (11:58 +0200)]
usb: musb_am335x: make module unload/reload work

Currently unloading and reloading the usb-am335x module will render
the USB driver non-functional. This is because of_platform_populate()
does nothing upon reload because the OF_POPULATED flag will still be
set on the device nodes from the first module load.

Clearing this flag when unregistering the devices makes this driver
functional also upon repeated unload/load sequences.

Conflicts:
drivers/usb/musb/musb_am335x.c

9 years agousb: musb_am335x: source cleanup
Lothar Waßmann [Thu, 17 Jul 2014 09:51:12 +0000 (11:51 +0200)]
usb: musb_am335x: source cleanup

- remove comma after end of list delimiter
  The empty entry must always be the last item in the list, thus there
  is no point in having a trailing comma to facilitate adding
  succeding entries.
  Remove the comma, so that inadvertedly adding an entry after the end
  of list sentinel will produce a compile time error rather than an
  unreachable entry in the list.
- consistently use tabs for indentation

Conflicts:
drivers/usb/musb/musb_am335x.c

9 years agoARM: dts: AM33XX: fix compatible string for RTC
Lothar Waßmann [Thu, 17 Jul 2014 09:47:49 +0000 (11:47 +0200)]
ARM: dts: AM33XX: fix compatible string for RTC

9 years agoASoC: am335x-tx48: update sound driver
Lothar Waßmann [Thu, 17 Jul 2014 12:56:54 +0000 (14:56 +0200)]
ASoC: am335x-tx48: update sound driver

9 years agoARM: dts: am335x-tx48: fix mclk definition
Lothar Waßmann [Thu, 17 Jul 2014 12:55:51 +0000 (14:55 +0200)]
ARM: dts: am335x-tx48: fix mclk definition

9 years agoARM: dts: am335x-tx48: add support for LT3589 PMIC
Lothar Waßmann [Thu, 17 Jul 2014 09:25:09 +0000 (11:25 +0200)]
ARM: dts: am335x-tx48: add support for LT3589 PMIC

9 years agoARM: dts: am335x-tx48: force regulators for LCD and CAN XCVR always on
Lothar Waßmann [Thu, 17 Jul 2014 09:24:38 +0000 (11:24 +0200)]
ARM: dts: am335x-tx48: force regulators for LCD and CAN XCVR always on

9 years agoARM: dts: am335x-tx48: remove pinctrl from usb0_phy
Lothar Waßmann [Thu, 17 Jul 2014 09:17:14 +0000 (11:17 +0200)]
ARM: dts: am335x-tx48: remove pinctrl from usb0_phy

The pins used for VBUSEN and OC in host mode are also used for the 2nd
CAN interface. When the USB0 interface is used in device mode, the
pins can still be used for the CAN interface if they are not claimed
by the USB PHY driver. Thus move the pinctrl reference to the
reg_usbotg which will only claim them for host mode.

9 years agoARM: dts: am335x-tx48: remove unnecessary usbhost regulator
Lothar Waßmann [Thu, 17 Jul 2014 09:16:13 +0000 (11:16 +0200)]
ARM: dts: am335x-tx48: remove unnecessary usbhost regulator

9 years agoARM: dts: am335x-tx48: fix pintypes for SSI interface
Lothar Waßmann [Thu, 17 Jul 2014 09:15:49 +0000 (11:15 +0200)]
ARM: dts: am335x-tx48: fix pintypes for SSI interface

9 years agoARM: dts: am335x-tx48: fix pin types for CSPI interface
Lothar Waßmann [Thu, 17 Jul 2014 09:15:34 +0000 (11:15 +0200)]
ARM: dts: am335x-tx48: fix pin types for CSPI interface

9 years agoARM: dts: am335x-tx48: add aliases for usb nodes
Lothar Waßmann [Thu, 17 Jul 2014 09:14:04 +0000 (11:14 +0200)]
ARM: dts: am335x-tx48: add aliases for usb nodes

9 years agoARM: defconfig: update Ka-Ro TX48 defconfig
Lothar Waßmann [Thu, 17 Jul 2014 08:18:33 +0000 (10:18 +0200)]
ARM: defconfig: update Ka-Ro TX48 defconfig

9 years agousb: musb: dsps: coding style cleanup
Lothar Waßmann [Mon, 30 Jun 2014 10:51:57 +0000 (12:51 +0200)]
usb: musb: dsps: coding style cleanup

There is no reason for the register accessor functions not to adhere
to the CodingStyle rules.

9 years agoASoC: am335x-tx48: add support for mclk
Lothar Waßmann [Fri, 27 Jun 2014 09:49:41 +0000 (11:49 +0200)]
ASoC: am335x-tx48: add support for mclk

9 years agousb: musb: add dependency on AM335X_PHY_USB for USB_MUSB_AM35X to fix build error
Lothar Waßmann [Fri, 27 Jun 2014 09:29:29 +0000 (11:29 +0200)]
usb: musb: add dependency on AM335X_PHY_USB for USB_MUSB_AM35X to fix build error

9 years agoclk: ti: am335x: add support for DT defined clocks
Lothar Waßmann [Fri, 27 Jun 2014 09:28:17 +0000 (11:28 +0200)]
clk: ti: am335x: add support for DT defined clocks

9 years agoARM: dts: am335x-tx48: cleanup
Lothar Waßmann [Fri, 27 Jun 2014 09:26:36 +0000 (11:26 +0200)]
ARM: dts: am335x-tx48: cleanup

- sort nodes alphabetically
- move 'status' property to end of property list
- reduce indentation level of pinctrl comments
- rename sound card model to 'TX48-SGTL5000'

9 years agoARM: dts: am335x-tx45: move 'status' property to end of property list
Lothar Waßmann [Wed, 18 Jun 2014 10:58:06 +0000 (12:58 +0200)]
ARM: dts: am335x-tx45: move 'status' property to end of property list

9 years agoARM: defconfig: add Ka-Ro TX48 defconfig
Lothar Waßmann [Wed, 7 May 2014 08:45:25 +0000 (10:45 +0200)]
ARM: defconfig: add Ka-Ro TX48 defconfig

9 years agoARM: AM33XX: dts: fix regulator 'gpio' property names
Lothar Waßmann [Wed, 7 May 2014 08:35:24 +0000 (10:35 +0200)]
ARM: AM33XX: dts: fix regulator 'gpio' property names

9 years agopwm: tiehrpwm: honor PWM_POLARITY_INVERTED flag when shutting down PWM
Lothar Waßmann [Thu, 12 Dec 2013 08:06:48 +0000 (09:06 +0100)]
pwm: tiehrpwm: honor PWM_POLARITY_INVERTED flag when shutting down PWM

9 years agospi: omap2-mcspi: don't call dma_async_issue_pending() when there is no dma_tx
Lothar Waßmann [Wed, 11 Dec 2013 15:30:12 +0000 (16:30 +0100)]
spi: omap2-mcspi: don't call dma_async_issue_pending() when there is no dma_tx

9 years agospi: omap2-mcspi: general cleanups
Lothar Waßmann [Wed, 11 Dec 2013 15:18:35 +0000 (16:18 +0100)]
spi: omap2-mcspi: general cleanups

- fix indentations
- remove useles initialization of regs_offset
- remove blank line at end of function
- remove comma after end marker in struct initializer

9 years agogpu: drm: tilcdc: fix double free error
Lothar Waßmann [Wed, 11 Dec 2013 15:07:38 +0000 (16:07 +0100)]
gpu: drm: tilcdc: fix double free error

The pointer passed to display_timings_release() is already being freed
in that function.

9 years agoASoC: am335x-tx48: add support for Ka-Ro TX48 module
Lothar Waßmann [Wed, 11 Dec 2013 15:06:45 +0000 (16:06 +0100)]
ASoC: am335x-tx48: add support for Ka-Ro TX48 module

9 years agousb: phy: am335x-control: prevent module from being unloaded when in use
Lothar Waßmann [Wed, 11 Dec 2013 14:51:15 +0000 (15:51 +0100)]
usb: phy: am335x-control: prevent module from being unloaded when in use

9 years agousb: musb: print error message with dev_err() instead of dev_dbg()
Lothar Waßmann [Wed, 11 Dec 2013 14:48:15 +0000 (15:48 +0100)]
usb: musb: print error message with dev_err() instead of dev_dbg()

9 years agomfd: ti_am335x_tscadc: print error message with dev_err() instead of dev_dbg()
Lothar Waßmann [Wed, 11 Dec 2013 14:46:37 +0000 (15:46 +0100)]
mfd: ti_am335x_tscadc: print error message with dev_err() instead of dev_dbg()

9 years agomfd: ti_am335x_tscadc: cleanup mixed space/tab indentation
Lothar Waßmann [Wed, 11 Dec 2013 14:46:03 +0000 (15:46 +0100)]
mfd: ti_am335x_tscadc: cleanup mixed space/tab indentation

9 years agoARM: dts: am33xx: adjust mmc labels to be in sync with ref manual
Lothar Waßmann [Wed, 11 Dec 2013 14:43:30 +0000 (15:43 +0100)]
ARM: dts: am33xx: adjust mmc labels to be in sync with ref manual

9 years agoARM: dts: am33xx: update dts file for Ka-Ro TX48
Lothar Waßmann [Wed, 11 Dec 2013 14:35:05 +0000 (15:35 +0100)]
ARM: dts: am33xx: update dts file for Ka-Ro TX48

9 years agoARM: dts: am33xx: add support for Ka-Ro TX48
Lothar Waßmann [Mon, 2 Dec 2013 10:01:31 +0000 (11:01 +0100)]
ARM: dts: am33xx: add support for Ka-Ro TX48

9 years agoARM: dts: imx53-tx53: disable VPU as it currently hangs the kernel when loading the... KARO-TX53-2014-08-15
Lothar Waßmann [Fri, 15 Aug 2014 07:40:48 +0000 (09:40 +0200)]
ARM: dts: imx53-tx53: disable VPU as it currently hangs the kernel when loading the firmware

9 years agoARM: imx53: add defconfig for Ka-Ro TX53 modules KARO-TX53-2014-08-14
Lothar Waßmann [Thu, 14 Aug 2014 14:57:44 +0000 (16:57 +0200)]
ARM: imx53: add defconfig for Ka-Ro TX53 modules

9 years agoARM: dts: imx53-tx53: fix LVDS panel control pins usage
Lothar Waßmann [Thu, 14 Aug 2014 13:03:02 +0000 (15:03 +0200)]
ARM: dts: imx53-tx53: fix LVDS panel control pins usage

The pin of the HSD100PXN1 display currently used as display enable is
actually a 'CABC' (Content Adaptive Backlight Control) control pin.
Change the regulator names accordingly and don't enable the regulators
by default.

9 years agoARM: dts:imx53-tx53: move lvds pinctrl into lvds-channel nodes
Lothar Waßmann [Wed, 13 Aug 2014 13:58:47 +0000 (15:58 +0200)]
ARM: dts:imx53-tx53: move lvds pinctrl into lvds-channel nodes

9 years agoARM: dts:imx53-tx53: fix buggy lvds data-mapping
Lothar Waßmann [Wed, 13 Aug 2014 13:58:00 +0000 (15:58 +0200)]
ARM: dts:imx53-tx53: fix buggy lvds data-mapping

The pixel mapping of the HSD100PXN1 display is 18 bit spwg rather than
24 bit jeida. The incorrect setting produced a correct image anyway.

9 years agoARM: dts: imx53-tx53: use DRM panel-simple driver for LCD power and backlight control
Lothar Waßmann [Thu, 14 Aug 2014 13:48:03 +0000 (15:48 +0200)]
ARM: dts: imx53-tx53: use DRM panel-simple driver for LCD power and backlight control

9 years agoARM: dts: imx53-tx53: remove LCD regulator GPIO pinctrls from hog section
Lothar Waßmann [Thu, 14 Aug 2014 13:47:13 +0000 (15:47 +0200)]
ARM: dts: imx53-tx53: remove LCD regulator GPIO pinctrls from hog section

9 years agoARM: dts: imx53-tx53: Move 'display' node out of 'soc' node
Lothar Waßmann [Wed, 13 Aug 2014 13:54:22 +0000 (15:54 +0200)]
ARM: dts: imx53-tx53: Move 'display' node out of 'soc' node

Move the display node out of the soc node. This aligns the DT with
other boards; no functional change.

9 years agostaging: imx-drm-core: fix buggy component registration
Lothar Waßmann [Wed, 13 Aug 2014 13:13:14 +0000 (15:13 +0200)]
staging: imx-drm-core: fix buggy component registration

Currently the imx-drm-core driver builds up a list of device nodes
found via the 'ports' property in DT. The DRM subsystem builds a
similar list of all drivers for the individual display-subsystem
components (crtc, ldb, ...) via the component_add() call.

The ldb driver presents a special case, since it supports two channels
which are represented in DT as two separate nodes.
When both LVDS channels are enabled, the component list in the
imx-drm-core driver will contain one element more than the component
list in the DRM subsystem. Thus, the DRM subsystem will never reach
the state in which all components are assembled and won't ever
initialize the display-subsystem.

Rather than registering all device nodes found in DT and handling the
'lvds-channel' special case in imx_drm_add_components() which is
called by the DRM subsystem once for each component added there, do it
in imx_drm_add_component(), which builds up the list of components in
the imx-drm-core driver.

This way both lists will have a matching number of entries and the DRM
subsystem will be properly initialized.

9 years agoARM: dts: i.MX53: fix apparent bug in VPU clks
Lothar Waßmann [Wed, 13 Aug 2014 13:13:02 +0000 (15:13 +0200)]
ARM: dts: i.MX53: fix apparent bug in VPU clks

9 years agopwm-backlight:
Lothar Waßmann [Thu, 12 Jun 2014 11:38:54 +0000 (13:38 +0200)]
pwm-backlight:

commit 257462dbf3ed pwm-backlight: switch to gpiod interface
introduced a regression leading to acquiring a bogus GPIO-0 when
configured from DT without an 'enable-gpios' property.
The driver will happily accept the 0 initialized 'enable_gpio' member
of the struct platform_pwm_backlight_data as valid gpio number, and
request this GPIO as enable pin. In case of multiple driver instances,
the second will fail to register with the error message:
pwm-backlight backlight1.23: failed to request GPIO#0: -16

Fix this by setting enable_gpio in the pdata struct to -EINVAL.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
9 years agopwm: imx: support output polarity inversion
Lothar Waßmann [Thu, 12 Jun 2014 11:38:07 +0000 (13:38 +0200)]
pwm: imx: support output polarity inversion

The i.MX pwm unit on i.MX27 and newer SoCs provides a configurable
output polarity. This patch adds support to utilize this feature where
available.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
9 years agopwm: imx: indentation cleanup
Lothar Waßmann [Thu, 12 Jun 2014 11:37:59 +0000 (13:37 +0200)]
pwm: imx: indentation cleanup

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
9 years agopwm: make the PWM_POLARITY flag in DTB optional
Lothar Waßmann [Thu, 12 Jun 2014 11:37:52 +0000 (13:37 +0200)]
pwm: make the PWM_POLARITY flag in DTB optional

Change the pwm chip driver registration, so that a chip driver that
supports polarity inversion can still be used with DTBs that don't
provide the 'PWM_POLARITY' flag.

This is done to provide polarity inversion support for the pwm-imx
driver without having to modify all existing DTS files.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
9 years agopwm: print error messages with pr_err() instead of pr_debug()
Lothar Waßmann [Thu, 12 Jun 2014 11:34:42 +0000 (13:34 +0200)]
pwm: print error messages with pr_err() instead of pr_debug()

Make the messages that are printed in case of fatal errors actually
visible to the user without having to recompile the driver with
debugging enabled.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
9 years agoLinux 3.16 v3.16
Linus Torvalds [Sun, 3 Aug 2014 22:25:02 +0000 (15:25 -0700)]
Linux 3.16

9 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 3 Aug 2014 16:58:20 +0000 (09:58 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "Two fixes in the timer area:
   - a long-standing lock inversion due to a printk
   - suspend-related hrtimer corruption in sched_clock"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timer: Fix lock inversion between hrtimer_bases.lock and scheduler locks
  sched_clock: Avoid corrupting hrtimer tree during suspend

9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sat, 2 Aug 2014 17:57:39 +0000 (10:57 -0700)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "A few fixes for ARM.  Some of these are correctness issues:
   - TLBs must be flushed after the old mappings are removed by the DMA
     mapping code, but before the new mappings are established.
   - An off-by-one entry error in the Keystone LPAE setup code.

  Fixes include:
   - ensuring that the identity mapping for LPAE does not remove the
     kernel image from the identity map.
   - preventing userspace from trapping into kgdb.
   - fixing a preemption issue in the Intel iwmmxt code.
   - fixing a build error with nommu.

  Other changes include:
   - Adding a note about which areas of memory are expected to be
     accessible while the identity mapping tables are in place"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction
  ARM: idmap: add identity mapping usage note
  ARM: 8115/1: LPAE: reduce damage caused by idmap to virtual memory layout
  ARM: fix alignment of keystone page table fixup
  ARM: 8112/1: only select ARM_PATCH_PHYS_VIRT if MMU is enabled
  ARM: 8100/1: Fix preemption disable in iwmmxt_task_enable()
  ARM: DMA: ensure that old section mappings are flushed from the TLB

9 years agoARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction
Omar Sandoval [Fri, 1 Aug 2014 17:14:06 +0000 (18:14 +0100)]
ARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction

The kgdb breakpoint hooks (kgdb_brk_fn and kgdb_compiled_brk_fn)
should only be entered when a kgdb break instruction is executed
from the kernel. Otherwise, if kgdb is enabled, a userspace program
can cause the kernel to drop into the debugger by executing either
KGDB_BREAKINST or KGDB_COMPILED_BREAK.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: idmap: add identity mapping usage note
Russell King [Tue, 29 Jul 2014 11:18:34 +0000 (12:18 +0100)]
ARM: idmap: add identity mapping usage note

Add a note about the usage of the identity mapping; we do not support
accesses outside of the identity map region and kernel image while a
CPU is using the identity map.  This is because the identity mapping
may overwrite vmalloc space, IO mappings, the vectors pages, etc.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 2 Aug 2014 01:01:41 +0000 (18:01 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "This contains a couple of fixes - one is the aio fix from Christoph,
  the other a fallocate() one from Eric"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: fix check for fallocate on active swapfile
  direct-io: fix AIO regression

9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 2 Aug 2014 00:37:01 +0000 (17:37 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Peter Anvin:
 "A single fix to not invoke the espfix code on Xen PV, as it turns out
  to oops the guest when invoked after all.  This patch leaves some
  amount of dead code, in particular unnecessary initialization of the
  espfix stacks when they won't be used, but in the interest of keeping
  the patch minimal that cleanup can wait for the next cycle"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86_64/entry/xen: Do not invoke espfix64 on Xen

9 years agoMerge tag 'staging-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 2 Aug 2014 00:16:05 +0000 (17:16 -0700)]
Merge tag 'staging-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver bugfixes from Greg KH:
 "Here are some tiny staging driver bugfixes that I've had in my tree
  for the past week that resolve some reported issues.  Nothing major at
  all, but it would be good to get them merged for 3.16-rc8 or -final"

* tag 'staging-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: vt6655: Fix disassociated messages every 10 seconds
  staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
  staging: rtl8723au: rtw_resume(): release semaphore before exit on error
  iio:bma180: Missing check for frequency fractional part
  iio:bma180: Fix scale factors to report correct acceleration units
  iio: buffer: Fix demux table creation

9 years agoMerge tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Fri, 1 Aug 2014 19:50:05 +0000 (12:50 -0700)]
Merge tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:
 "Fix dm bufio shrinker to properly zero-fill all fields.

  Fix race in dm cache that caused improper reporting of the number of
  dirty blocks in the cache"

* tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm cache: fix race affecting dirty block count
  dm bufio: fully initialize shrinker

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 1 Aug 2014 19:49:02 +0000 (12:49 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM straggler SoC fix from Olof Johansson:
 "A DT bugfix for Nomadik that had an ambigouos double-inversion of a
  gpio line, and one MAINTAINER URL update that might as well go in now.

  We could hold off until the merge window, but then we'll just have to
  mark the DT fix for stable and it just seems like in total causing
  more work"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  MAINTAINERS: Update Tegra Git URL
  ARM: nomadik: fix up double inversion in DT

9 years agodm cache: fix race affecting dirty block count
Anssi Hannula [Fri, 1 Aug 2014 15:55:47 +0000 (11:55 -0400)]
dm cache: fix race affecting dirty block count

nr_dirty is updated without locking, causing it to drift so that it is
non-zero (either a small positive integer, or a very large one when an
underflow occurs) even when there are no actual dirty blocks.  This was
due to a race between the workqueue and map function accessing nr_dirty
in parallel without proper protection.

People were seeing under runs due to a race on increment/decrement of
nr_dirty, see: https://lkml.org/lkml/2014/6/3/648

Fix this by using an atomic_t for nr_dirty.

Reported-by: roma1390@gmail.com
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
9 years agodm bufio: fully initialize shrinker
Greg Thelen [Thu, 31 Jul 2014 16:07:19 +0000 (09:07 -0700)]
dm bufio: fully initialize shrinker

1d3d4437eae1 ("vmscan: per-node deferred work") added a flags field to
struct shrinker assuming that all shrinkers were zero filled.  The dm
bufio shrinker is not zero filled, which leaves arbitrary kmalloc() data
in flags.  So far the only defined flags bit is SHRINKER_NUMA_AWARE.
But there are proposed patches which add other bits to shrinker.flags
(e.g. memcg awareness).

Rather than simply initializing the shrinker, this patch uses kzalloc()
when allocating the dm_bufio_client to ensure that the embedded shrinker
and any other similar structures are zeroed.

This fixes theoretical over aggressive shrinking of dm bufio objects.
If the uninitialized dm_bufio_client.shrinker.flags contains
SHRINKER_NUMA_AWARE then shrink_slab() would call the dm shrinker for
each numa node rather than just once.  This has been broken since 3.12.

Signed-off-by: Greg Thelen <gthelen@google.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # v3.12+
9 years agotimer: Fix lock inversion between hrtimer_bases.lock and scheduler locks
Jan Kara [Fri, 1 Aug 2014 10:20:02 +0000 (12:20 +0200)]
timer: Fix lock inversion between hrtimer_bases.lock and scheduler locks

clockevents_increase_min_delta() calls printk() from under
hrtimer_bases.lock. That causes lock inversion on scheduler locks because
printk() can call into the scheduler. Lockdep puts it as:

======================================================
[ INFO: possible circular locking dependency detected ]
3.15.0-rc8-06195-g939f04b #2 Not tainted
-------------------------------------------------------
trinity-main/74 is trying to acquire lock:
 (&port_lock_key){-.....}, at: [<811c60be>] serial8250_console_write+0x8c/0x10c

but task is already holding lock:
 (hrtimer_bases.lock){-.-...}, at: [<8103caeb>] hrtimer_try_to_cancel+0x13/0x66

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #5 (hrtimer_bases.lock){-.-...}:
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
       [<8103c918>] __hrtimer_start_range_ns+0x1c/0x197
       [<8107ec20>] perf_swevent_start_hrtimer.part.41+0x7a/0x85
       [<81080792>] task_clock_event_start+0x3a/0x3f
       [<810807a4>] task_clock_event_add+0xd/0x14
       [<8108259a>] event_sched_in+0xb6/0x17a
       [<810826a2>] group_sched_in+0x44/0x122
       [<81082885>] ctx_sched_in.isra.67+0x105/0x11f
       [<810828e6>] perf_event_sched_in.isra.70+0x47/0x4b
       [<81082bf6>] __perf_install_in_context+0x8b/0xa3
       [<8107eb8e>] remote_function+0x12/0x2a
       [<8105f5af>] smp_call_function_single+0x2d/0x53
       [<8107e17d>] task_function_call+0x30/0x36
       [<8107fb82>] perf_install_in_context+0x87/0xbb
       [<810852c9>] SYSC_perf_event_open+0x5c6/0x701
       [<810856f9>] SyS_perf_event_open+0x17/0x19
       [<8142f8ee>] syscall_call+0x7/0xb

-> #4 (&ctx->lock){......}:
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f04c>] _raw_spin_lock+0x21/0x30
       [<81081df3>] __perf_event_task_sched_out+0x1dc/0x34f
       [<8142cacc>] __schedule+0x4c6/0x4cb
       [<8142cae0>] schedule+0xf/0x11
       [<8142f9a6>] work_resched+0x5/0x30

-> #3 (&rq->lock){-.-.-.}:
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f04c>] _raw_spin_lock+0x21/0x30
       [<81040873>] __task_rq_lock+0x33/0x3a
       [<8104184c>] wake_up_new_task+0x25/0xc2
       [<8102474b>] do_fork+0x15c/0x2a0
       [<810248a9>] kernel_thread+0x1a/0x1f
       [<814232a2>] rest_init+0x1a/0x10e
       [<817af949>] start_kernel+0x303/0x308
       [<817af2ab>] i386_start_kernel+0x79/0x7d

-> #2 (&p->pi_lock){-.-...}:
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
       [<810413dd>] try_to_wake_up+0x1d/0xd6
       [<810414cd>] default_wake_function+0xb/0xd
       [<810461f3>] __wake_up_common+0x39/0x59
       [<81046346>] __wake_up+0x29/0x3b
       [<811b8733>] tty_wakeup+0x49/0x51
       [<811c3568>] uart_write_wakeup+0x17/0x19
       [<811c5dc1>] serial8250_tx_chars+0xbc/0xfb
       [<811c5f28>] serial8250_handle_irq+0x54/0x6a
       [<811c5f57>] serial8250_default_handle_irq+0x19/0x1c
       [<811c56d8>] serial8250_interrupt+0x38/0x9e
       [<810510e7>] handle_irq_event_percpu+0x5f/0x1e2
       [<81051296>] handle_irq_event+0x2c/0x43
       [<81052cee>] handle_level_irq+0x57/0x80
       [<81002a72>] handle_irq+0x46/0x5c
       [<810027df>] do_IRQ+0x32/0x89
       [<8143036e>] common_interrupt+0x2e/0x33
       [<8142f23c>] _raw_spin_unlock_irqrestore+0x3f/0x49
       [<811c25a4>] uart_start+0x2d/0x32
       [<811c2c04>] uart_write+0xc7/0xd6
       [<811bc6f6>] n_tty_write+0xb8/0x35e
       [<811b9beb>] tty_write+0x163/0x1e4
       [<811b9cd9>] redirected_tty_write+0x6d/0x75
       [<810b6ed6>] vfs_write+0x75/0xb0
       [<810b7265>] SyS_write+0x44/0x77
       [<8142f8ee>] syscall_call+0x7/0xb

-> #1 (&tty->write_wait){-.....}:
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
       [<81046332>] __wake_up+0x15/0x3b
       [<811b8733>] tty_wakeup+0x49/0x51
       [<811c3568>] uart_write_wakeup+0x17/0x19
       [<811c5dc1>] serial8250_tx_chars+0xbc/0xfb
       [<811c5f28>] serial8250_handle_irq+0x54/0x6a
       [<811c5f57>] serial8250_default_handle_irq+0x19/0x1c
       [<811c56d8>] serial8250_interrupt+0x38/0x9e
       [<810510e7>] handle_irq_event_percpu+0x5f/0x1e2
       [<81051296>] handle_irq_event+0x2c/0x43
       [<81052cee>] handle_level_irq+0x57/0x80
       [<81002a72>] handle_irq+0x46/0x5c
       [<810027df>] do_IRQ+0x32/0x89
       [<8143036e>] common_interrupt+0x2e/0x33
       [<8142f23c>] _raw_spin_unlock_irqrestore+0x3f/0x49
       [<811c25a4>] uart_start+0x2d/0x32
       [<811c2c04>] uart_write+0xc7/0xd6
       [<811bc6f6>] n_tty_write+0xb8/0x35e
       [<811b9beb>] tty_write+0x163/0x1e4
       [<811b9cd9>] redirected_tty_write+0x6d/0x75
       [<810b6ed6>] vfs_write+0x75/0xb0
       [<810b7265>] SyS_write+0x44/0x77
       [<8142f8ee>] syscall_call+0x7/0xb

-> #0 (&port_lock_key){-.....}:
       [<8104a62d>] __lock_acquire+0x9ea/0xc6d
       [<8104a942>] lock_acquire+0x92/0x101
       [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
       [<811c60be>] serial8250_console_write+0x8c/0x10c
       [<8104e402>] call_console_drivers.constprop.31+0x87/0x118
       [<8104f5d5>] console_unlock+0x1d7/0x398
       [<8104fb70>] vprintk_emit+0x3da/0x3e4
       [<81425f76>] printk+0x17/0x19
       [<8105bfa0>] clockevents_program_min_delta+0x104/0x116
       [<8105c548>] clockevents_program_event+0xe7/0xf3
       [<8105cc1c>] tick_program_event+0x1e/0x23
       [<8103c43c>] hrtimer_force_reprogram+0x88/0x8f
       [<8103c49e>] __remove_hrtimer+0x5b/0x79
       [<8103cb21>] hrtimer_try_to_cancel+0x49/0x66
       [<8103cb4b>] hrtimer_cancel+0xd/0x18
       [<8107f102>] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
       [<81080705>] task_clock_event_stop+0x20/0x64
       [<81080756>] task_clock_event_del+0xd/0xf
       [<81081350>] event_sched_out+0xab/0x11e
       [<810813e0>] group_sched_out+0x1d/0x66
       [<81081682>] ctx_sched_out+0xaf/0xbf
       [<81081e04>] __perf_event_task_sched_out+0x1ed/0x34f
       [<8142cacc>] __schedule+0x4c6/0x4cb
       [<8142cae0>] schedule+0xf/0x11
       [<8142f9a6>] work_resched+0x5/0x30

other info that might help us debug this:

Chain exists of:
  &port_lock_key --> &ctx->lock --> hrtimer_bases.lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(hrtimer_bases.lock);
                               lock(&ctx->lock);
                               lock(hrtimer_bases.lock);
  lock(&port_lock_key);

 *** DEADLOCK ***

4 locks held by trinity-main/74:
 #0:  (&rq->lock){-.-.-.}, at: [<8142c6f3>] __schedule+0xed/0x4cb
 #1:  (&ctx->lock){......}, at: [<81081df3>] __perf_event_task_sched_out+0x1dc/0x34f
 #2:  (hrtimer_bases.lock){-.-...}, at: [<8103caeb>] hrtimer_try_to_cancel+0x13/0x66
 #3:  (console_lock){+.+...}, at: [<8104fb5d>] vprintk_emit+0x3c7/0x3e4

stack backtrace:
CPU: 0 PID: 74 Comm: trinity-main Not tainted 3.15.0-rc8-06195-g939f04b #2
 00000000 81c3a310 8b995c14 81426f69 8b995c44 81425a99 8161f671 8161f570
 8161f538 8161f559 8161f538 8b995c78 8b142bb0 00000004 8b142fdc 8b142bb0
 8b995ca8 8104a62d 8b142fac 000016f2 81c3a310 00000001 00000001 00000003
Call Trace:
 [<81426f69>] dump_stack+0x16/0x18
 [<81425a99>] print_circular_bug+0x18f/0x19c
 [<8104a62d>] __lock_acquire+0x9ea/0xc6d
 [<8104a942>] lock_acquire+0x92/0x101
 [<811c60be>] ? serial8250_console_write+0x8c/0x10c
 [<811c6032>] ? wait_for_xmitr+0x76/0x76
 [<8142f11d>] _raw_spin_lock_irqsave+0x2e/0x3e
 [<811c60be>] ? serial8250_console_write+0x8c/0x10c
 [<811c60be>] serial8250_console_write+0x8c/0x10c
 [<8104af87>] ? lock_release+0x191/0x223
 [<811c6032>] ? wait_for_xmitr+0x76/0x76
 [<8104e402>] call_console_drivers.constprop.31+0x87/0x118
 [<8104f5d5>] console_unlock+0x1d7/0x398
 [<8104fb70>] vprintk_emit+0x3da/0x3e4
 [<81425f76>] printk+0x17/0x19
 [<8105bfa0>] clockevents_program_min_delta+0x104/0x116
 [<8105cc1c>] tick_program_event+0x1e/0x23
 [<8103c43c>] hrtimer_force_reprogram+0x88/0x8f
 [<8103c49e>] __remove_hrtimer+0x5b/0x79
 [<8103cb21>] hrtimer_try_to_cancel+0x49/0x66
 [<8103cb4b>] hrtimer_cancel+0xd/0x18
 [<8107f102>] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
 [<81080705>] task_clock_event_stop+0x20/0x64
 [<81080756>] task_clock_event_del+0xd/0xf
 [<81081350>] event_sched_out+0xab/0x11e
 [<810813e0>] group_sched_out+0x1d/0x66
 [<81081682>] ctx_sched_out+0xaf/0xbf
 [<81081e04>] __perf_event_task_sched_out+0x1ed/0x34f
 [<8104416d>] ? __dequeue_entity+0x23/0x27
 [<81044505>] ? pick_next_task_fair+0xb1/0x120
 [<8142cacc>] __schedule+0x4c6/0x4cb
 [<81047574>] ? trace_hardirqs_off_caller+0xd7/0x108
 [<810475b0>] ? trace_hardirqs_off+0xb/0xd
 [<81056346>] ? rcu_irq_exit+0x64/0x77

Fix the problem by using printk_deferred() which does not call into the
scheduler.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
9 years agovfs: fix check for fallocate on active swapfile
Eric Biggers [Wed, 25 Jun 2014 04:45:08 +0000 (23:45 -0500)]
vfs: fix check for fallocate on active swapfile

Fix the broken check for calling sys_fallocate() on an active swapfile,
introduced by commit 0790b31b69374ddadefe ("fs: disallow all fallocate
operation on active swapfile").

Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodirect-io: fix AIO regression
Christoph Hellwig [Wed, 30 Jul 2014 11:18:48 +0000 (07:18 -0400)]
direct-io: fix AIO regression

The direct-io.c rewrite to use the iov_iter infrastructure stopped updating
the size field in struct dio_submit, and thus rendered the check for
allowing asynchronous completions to always return false.  Fix this by
comparing it to the count of bytes in the iov_iter instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Tim Chen <tim.c.chen@linux.intel.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
9 years agoMerge tag 'pm+acpi-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Thu, 31 Jul 2014 23:42:10 +0000 (16:42 -0700)]
Merge tag 'pm+acpi-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "One commit that fixes a problem causing PNP devices to be associated
  with wrong ACPI device objects sometimes during device enumeration due
  to an incorrect check in a matching function.

  That problem was uncovered by the ACPI device enumeration rework in
  3.14"

* tag 'pm+acpi-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PNP: Fix acpi_pnp_match()

9 years agoMerge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux
Linus Torvalds [Thu, 31 Jul 2014 17:02:15 +0000 (10:02 -0700)]
Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux

Pull clock driver fix from Mike Turquette:
 "A single patch to re-enable audio which is broken on all DRA7
  SoC-based platforms.  Missed this one from the last set of fixes"

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
  clk: ti: clk-7xx: Correct ABE DPLL configuration

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Thu, 31 Jul 2014 17:01:34 +0000 (10:01 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This adds missing SELinux labeling to AF_ALG sockets which apparently
  causes SELinux (or at least the SELinux people) to misbehave :)"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: af_alg - properly label AF_ALG socket

9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 31 Jul 2014 17:00:42 +0000 (10:00 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI barrier fix from James Bottomley:
 "This is a potential data corruption fix: If we get an error sending
  down a barrier, we simply ignore it meaning the barrier semantics get
  violated without anyone being any the wiser.  If the system crashes at
  this point, the filesystem potentially becomes corrupt.  Fix is to
  report errors on failed barriers"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: handle flush errors properly

9 years agoclk: ti: clk-7xx: Correct ABE DPLL configuration
Peter Ujfalusi [Wed, 2 Apr 2014 13:48:45 +0000 (16:48 +0300)]
clk: ti: clk-7xx: Correct ABE DPLL configuration

ABE DPLL frequency need to be lowered from 361267200
to 180633600 to facilitate the ATL requironments.
The dpll_abe_m2x2_ck clock need to be set to double
of ABE DPLL rate in order to have correct clocks
for audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
9 years agocrypto: af_alg - properly label AF_ALG socket
Milan Broz [Tue, 29 Jul 2014 18:41:09 +0000 (18:41 +0000)]
crypto: af_alg - properly label AF_ALG socket

Th AF_ALG socket was missing a security label (e.g. SELinux)
which means that socket was in "unlabeled" state.

This was recently demonstrated in the cryptsetup package
(cryptsetup v1.6.5 and later.)
See https://bugzilla.redhat.com/show_bug.cgi?id=1115120

This patch clones the sock's label from the parent sock
and resolves the issue (similar to AF_BLUETOOTH protocol family).

Cc: stable@vger.kernel.org
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
9 years agokexec: fix build error when hugetlbfs is disabled
David Rientjes [Thu, 31 Jul 2014 02:05:55 +0000 (19:05 -0700)]
kexec: fix build error when hugetlbfs is disabled

free_huge_page() is undefined without CONFIG_HUGETLBFS and there's no
need to filter PageHuge() page is such a configuration either, so avoid
exporting the symbol to fix a build error:

   In file included from kernel/kexec.c:14:0:
   kernel/kexec.c: In function 'crash_save_vmcoreinfo_init':
   kernel/kexec.c:1623:20: error: 'free_huge_page' undeclared (first use in this function)
     VMCOREINFO_SYMBOL(free_huge_page);
                       ^

Introduced by commit 8f1d26d0e59b ("kexec: export free_huge_page to
VMCOREINFO")

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Olof Johansson <olof@lixom.net>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'akpm' (patches from Andrew Morton)
Linus Torvalds [Thu, 31 Jul 2014 00:16:36 +0000 (17:16 -0700)]
Merge branch 'akpm' (patches from Andrew Morton)

Merge fixes from Andrew Morton:
 "10 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  Josh has moved
  kexec: export free_huge_page to VMCOREINFO
  mm: fix filemap.c pagecache_get_page() kernel-doc warnings
  mm: debugfs: move rounddown_pow_of_two() out from do_fault path
  memcg: oom_notify use-after-free fix
  hwpoison: call action_result() in failure path of hwpoison_user_mappings()
  hwpoison: fix hugetlbfs/thp precheck in hwpoison_user_mappings()
  rapidio/tsi721_dma: fix failure to obtain transaction descriptor
  mm, thp: do not allow thp faults to avoid cpuset restrictions
  mm/page-writeback.c: fix divide by zero in bdi_dirty_limits()

9 years agoJosh has moved
Josh Triplett [Wed, 30 Jul 2014 23:08:42 +0000 (16:08 -0700)]
Josh has moved

My IBM email addresses haven't worked for years; also map some
old-but-functional forwarding addresses to my canonical address.

Update my GPG key fingerprint; I moved to 4096R a long time ago.

Update description.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agokexec: export free_huge_page to VMCOREINFO
Atsushi Kumagai [Wed, 30 Jul 2014 23:08:39 +0000 (16:08 -0700)]
kexec: export free_huge_page to VMCOREINFO

PG_head_mask was added into VMCOREINFO to filter huge pages in b3acc56bfe1
("kexec: save PG_head_mask in VMCOREINFO"), but makedumpfile still need
another symbol to filter *hugetlbfs* pages.

If a user hope to filter user pages, makedumpfile tries to exclude them by
checking the condition whether the page is anonymous, but hugetlbfs pages
aren't anonymous while they also be user pages.

We know it's possible to detect them in the same way as PageHuge(),
so we need the start address of free_huge_page():

    int PageHuge(struct page *page)
    {
            if (!PageCompound(page))
                    return 0;

            page = compound_head(page);
            return get_compound_page_dtor(page) == free_huge_page;
    }

For that reason, this patch changes free_huge_page() into public
to export it to VMCOREINFO.

Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm: fix filemap.c pagecache_get_page() kernel-doc warnings
Randy Dunlap [Wed, 30 Jul 2014 23:08:37 +0000 (16:08 -0700)]
mm: fix filemap.c pagecache_get_page() kernel-doc warnings

Fix kernel-doc warnings in mm/filemap.c: pagecache_get_page():

  Warning(..//mm/filemap.c:1054): No description found for parameter 'cache_gfp_mask'
  Warning(..//mm/filemap.c:1054): No description found for parameter 'radix_gfp_mask'
  Warning(..//mm/filemap.c:1054): Excess function parameter 'gfp_mask' description in 'pagecache_get_page'

Fixes: 2457aec63745 ("mm: non-atomically mark page accessed during page cache allocation where possible")
[mgorman@suse.de: change everything]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm: debugfs: move rounddown_pow_of_two() out from do_fault path
Andrey Ryabinin [Wed, 30 Jul 2014 23:08:35 +0000 (16:08 -0700)]
mm: debugfs: move rounddown_pow_of_two() out from do_fault path

do_fault_around() expects fault_around_bytes rounded down to nearest page
order.  Instead of calling rounddown_pow_of_two every time in
fault_around_pages()/fault_around_mask() we could do round down when user
changes fault_around_bytes via debugfs interface.

This also fixes bug when user set fault_around_bytes to 0.  Result of
rounddown_pow_of_two(0) is not defined, therefore fault_around_bytes == 0
doesn't work without this patch.

Let's set fault_around_bytes to PAGE_SIZE if user sets to something less
than PAGE_SIZE

[akpm@linux-foundation.org: tweak code layout]
Fixes: a9b0f861("mm: nominate faultaround area in bytes rather than page order")
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: <stable@vger.kernel.org> [3.15.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>