cascardo/linux.git
9 years agoARM: hisi: remove smp from machine descriptor
Haojian Zhuang [Mon, 28 Jul 2014 12:14:32 +0000 (20:14 +0800)]
ARM: hisi: remove smp from machine descriptor

Use CPU_METHOD_OF_DECLARE() instead. And declare smp method in dts file.

Changelog:
v6:
  * Use hisilicon,hi3620-smp as enable-method property in Hi3620 dts.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agopower: reset: move hisilicon reboot code
Haojian Zhuang [Tue, 13 May 2014 09:11:28 +0000 (17:11 +0800)]
power: reset: move hisilicon reboot code

Move reboot code from hisilicon platform driver into reset driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: dts: Add hix5hd2-dkb dts file.
Haifeng Yan [Fri, 11 Apr 2014 04:50:13 +0000 (12:50 +0800)]
ARM: dts: Add hix5hd2-dkb dts file.

Add dts file for Hisilicon x5hd2 development kit board.

Signed-off-by: Haifeng Yan <yanhaifeng@gmail.com>
Signed-off-by: Jiancheng Xue <jchxue@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
[olof: Rename dts/dtsi to include hisi prefix]
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: debug: Rename Hi3716 to HIX5HD2
Haifeng Yan [Fri, 11 Apr 2014 03:40:58 +0000 (11:40 +0800)]
ARM: debug: Rename Hi3716 to HIX5HD2

Rename Hisilicon HI3716 to HIX5HD2 and add dependency on ARCH_HIX5HD2.

HiX5HD2 is a SoC with dual Cortex A9 cores for STB market, and original
Hi3xxx SoC is for mobile market.

To avoid confusing the two types of SoCs and also because of different
implementation (SMP, IPs integrated and earlycon config), rename Hi3716
to HIX5HD2 and add ARCH_HIX5HD2.

Signed-off-by: Haifeng Yan <yanhaifeng@gmail.com>
Signed-off-by: Jiancheng Xue <jchxue@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
[olof: fixed description typos]
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: hisi: enable hix5hd2 SoC
Haifeng Yan [Fri, 11 Apr 2014 03:54:11 +0000 (11:54 +0800)]
ARM: hisi: enable hix5hd2 SoC

Enable support for the Hisilicon HiX5HD2 SoC. This HiX5HD2 SoC series
support both single and dual Cortex-A9 cores.

Add ARCH_HIX5HD2 to distinguish HiX5HD2 from Hi3xxx.

They are different in implementation such as SMP, IPs integarted and
earlycon configure.

Signed-off-by: Haifeng Yan <yanhaifeng@gmail.com>
Signed-off-by: Jiancheng Xue <jchxue@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: hisi: add ARCH_HISI
Haojian Zhuang [Tue, 1 Apr 2014 03:01:09 +0000 (11:01 +0800)]
ARM: hisi: add ARCH_HISI

Since multiple ARCH configuration will be appended into mach-hisi
directory, add ARCH_HISI as common configuration for different platforms
in mach-hisi.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'for-3.17/bcm-soc' of git://github.com/broadcom/mach-bcm into next/soc
Arnd Bergmann [Mon, 28 Jul 2014 15:25:43 +0000 (17:25 +0200)]
Merge tag 'for-3.17/bcm-soc' of git://github.com/broadcom/mach-bcm into next/soc

Merge "ARM: mach-bcm: soc updates for 3.17" from Matt Porter:

- BCM Mobile SMP support
- BRCM STB platform support

* tag 'for-3.17/bcm-soc' of git://github.com/broadcom/mach-bcm:
  MAINTAINERS: add entry for Broadcom ARM STB architecture
  ARM: brcmstb: select GISB arbiter and interrupt drivers
  ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
  ARM: configs: enable SMP in bcm_defconfig
  ARM: add SMP support for Broadcom mobile SoCs

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMAINTAINERS: add entry for Broadcom ARM STB architecture
Brian Norris [Tue, 15 Jul 2014 01:06:03 +0000 (18:06 -0700)]
MAINTAINERS: add entry for Broadcom ARM STB architecture

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Porter <mporter@linaro.org>
9 years agoARM: brcmstb: select GISB arbiter and interrupt drivers
Brian Norris [Tue, 22 Jul 2014 22:58:17 +0000 (15:58 -0700)]
ARM: brcmstb: select GISB arbiter and interrupt drivers

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Porter <mporter@linaro.org>
9 years agoARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
Marc Carino [Thu, 16 Jan 2014 23:00:42 +0000 (15:00 -0800)]
ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs

The BCM7xxx series of Broadcom SoCs are used primarily in set-top boxes.

This patch adds machine support for the ARM-based Broadcom SoCs.

Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
9 years agoARM: configs: enable SMP in bcm_defconfig
Alex Elder [Mon, 30 Jun 2014 22:15:38 +0000 (17:15 -0500)]
ARM: configs: enable SMP in bcm_defconfig

Also explicitly set CONFIG_NR_CPUS to 2, limiting it to the most we
currently need.

Signed-off-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
9 years agoARM: add SMP support for Broadcom mobile SoCs
Alex Elder [Mon, 30 Jun 2014 22:15:37 +0000 (17:15 -0500)]
ARM: add SMP support for Broadcom mobile SoCs

This patch adds SMP support for BCM281XX and BCM21664 family SoCs.

This feature is controlled with a distinct config option such that
an SMP-enabled multi-v7 binary can be configured to run these SoCs
in uniprocessor mode.  Since this SMP functionality is used for
multiple Broadcom mobile chip families the config option is called
ARCH_BCM_MOBILE_SMP (for lack of a better name).

On SoCs of this type, the secondary core is not held in reset on
power-on.  Instead it loops in a ROM-based holding pen.  To release
it, one must write into a special register a jump address whose
low-order bits have been replaced with a secondary core's id, then
trigger an event with SEV.  On receipt of an event, the ROM code
will examine the register's contents, and if the low-order bits
match its cpu id, it will clear them and write the value back to the
register just prior to jumping to the address specified.

The location of the special register is defined in the device tree
using a "secondary-boot-reg" property in a node whose "enable-method"
matches.

Derived from code originally provided by Ray Jui <rjui@broadcom.com>

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
9 years agoMerge branch 'clk-rockchip' of git://git.linaro.org/people/mike.turquette/linux into...
Arnd Bergmann [Mon, 28 Jul 2014 12:02:13 +0000 (14:02 +0200)]
Merge branch 'clk-rockchip' of git://git.linaro.org/people/mike.turquette/linux into next/soc

This is a dependency for the rk3288 DT updates, the branch should
first get merged through Mike's clk git.

* 'clk-rockchip' of git://git.linaro.org/people/mike.turquette/linux:
  ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER
  clk: rockchip: add clock controller for rk3288
  dt-bindings: add documentation for rk3288 cru
  clk: rockchip: add clock driver for rk3188 and rk3066 clocks
  dt-bindings: add documentation for rk3188 clock and reset unit
  clk: rockchip: add reset controller
  clk: rockchip: add clock type for pll clocks and pll used on rk3066
  clk: rockchip: add basic infrastructure for clock branches
  clk: composite: improve rate_hw sanity check logic
  clk: composite: allow read-only clocks
  clk: composite: support determine_rate using rate_ops->round_rate + mux_ops->set_parent

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'mvebu-soc-3.17-4' of git://git.infradead.org/linux-mvebu into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 16:17:08 +0000 (18:17 +0200)]
Merge tag 'mvebu-soc-3.17-4' of git://git.infradead.org/linux-mvebu into next/soc

Merge "mvebu SoC changes for v3.17 (round 4)" from Jason Cooper:

 - Armada XP
    - Fix return value check in pmsu code
    - Document URLs for new public datasheets (Thanks, Marvell & free-electrons!)

 - Armada 370/38x
    - Add cpuidle support

 - mvebu
    - Fix build when no platforms are selected
    - Update EBU SoC status in docs

* tag 'mvebu-soc-3.17-4' of git://git.infradead.org/linux-mvebu: (21 commits)
  Documentation: arm: misc updates to Marvell EBU SoC status
  Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC
  ARM: mvebu: fix build without platforms selected
  ARM: mvebu: add cpuidle support for Armada 38x
  ARM: mvebu: add cpuidle support for Armada 370
  cpuidle: mvebu: add Armada 38x support
  cpuidle: mvebu: add Armada 370 support
  cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
  ARM: mvebu: export the SCU address
  ARM: mvebu: make the snoop disabling optional in mvebu_v7_pmsu_idle_prepare()
  ARM: mvebu: use a local variable to store the resume address
  ARM: mvebu: make the cpuidle initialization more generic
  ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c
  ARM: mvebu: use the common function for Armada 375 SMP workaround
  ARM: mvebu: add a common function for the boot address work around
  ARM: mvebu: sort the #include of pmsu.c in alphabetic order
  ARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code
  ARM: mvebu: fix return value check in armada_xp_pmsu_cpufreq_init()
  clk: mvebu: extend clk-cpu for dynamic frequency scaling
  ARM: mvebu: extend PMSU code to support dynamic frequency scaling
  ...

Conflicts:
arch/arm/mach-mvebu/Kconfig
drivers/cpuidle/cpuidle-armada-370-xp.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branch 'cleanup/gpio-header-removal' into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 16:00:40 +0000 (18:00 +0200)]
Merge branch 'cleanup/gpio-header-removal' into next/soc

* cleanup/gpio-header-removal:
  ARM: delete old reference to ARM_GPIOLIB_COMPLEX
  ARM: kill CONFIG_NEED_MACH_GPIO_H
  ARM: mach-s5p: get rid of all <mach/gpio.h> headers
  ARM: s5p: cut the custom ARCH_NR_GPIOS definition

This resolves a massive amount of conflicts between the
mach/gpio.h removal and the s5p platform removal.

Almost all changes are trivial, as both sides remove
stuff.

Conflicts:
arch/arm/Kconfig
arch/arm/mach-s5p64x0/common.c
arch/arm/mach-s5p64x0/dev-audio.c
arch/arm/mach-s5p64x0/include/mach/gpio-samsung.h
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5p64x0/setup-fb-24bpp.c
arch/arm/mach-s5p64x0/setup-i2c0.c
arch/arm/mach-s5p64x0/setup-i2c1.c
arch/arm/mach-s5p64x0/setup-sdhci-gpio.c
arch/arm/mach-s5p64x0/setup-spi.c
arch/arm/mach-s5pc100/dev-audio.c
arch/arm/mach-s5pc100/include/mach/gpio-samsung.h
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pc100/setup-fb-24bpp.c
arch/arm/mach-s5pc100/setup-i2c0.c
arch/arm/mach-s5pc100/setup-i2c1.c
arch/arm/mach-s5pc100/setup-ide.c
arch/arm/mach-s5pc100/setup-keypad.c
arch/arm/mach-s5pc100/setup-sdhci-gpio.c
arch/arm/mach-s5pc100/setup-spi.c
arch/arm/mach-s5pv210/dev-audio.c
arch/arm/mach-s5pv210/include/mach/gpio-samsung.h
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv210/setup-fb-24bpp.c
arch/arm/mach-s5pv210/setup-fimc.c
arch/arm/mach-s5pv210/setup-i2c0.c
arch/arm/mach-s5pv210/setup-i2c1.c
arch/arm/mach-s5pv210/setup-i2c2.c
arch/arm/mach-s5pv210/setup-ide.c
arch/arm/mach-s5pv210/setup-keypad.c
arch/arm/mach-s5pv210/setup-sdhci-gpio.c
arch/arm/mach-s5pv210/setup-spi.c
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/s5p-irq-eint.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branch 'next/fixes-non-critical' into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 15:54:21 +0000 (17:54 +0200)]
Merge branch 'next/fixes-non-critical' into next/soc

This resolves a nontrivial conflict against a bug fix
in another branch.

Conflicts:
arch/arm/mach-exynos/pm.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'v3.17-rockchip-smp-hotplug' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Sat, 26 Jul 2014 15:34:26 +0000 (17:34 +0200)]
Merge tag 'v3.17-rockchip-smp-hotplug' of git://git./linux/kernel/git/mmind/linux-rockchip into next/soc

Merge "CPU-Hotplug support for RK3066 and RK3188" from Heiko Stuebner:

* tag 'v3.17-rockchip-smp-hotplug' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
  ARM: rockchip: select ARMv7 compiler flags for platsmp.o

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'misc-for-3.17' of git://github.com/hisilicon/linux-hisi into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 10:20:21 +0000 (12:20 +0200)]
Merge tag 'misc-for-3.17' of git://github.com/hisilicon/linux-hisi into next/soc

Merge "update MAINTAINERS to add Hisilicon SoC maintainer" from Wei Xu:

* tag 'misc-for-3.17' of git://github.com/hisilicon/linux-hisi:
  MAINTAINERS:ARM:hisi: add Hisilicon SoC family

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 's5pv210-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
Arnd Bergmann [Sat, 26 Jul 2014 10:01:10 +0000 (12:01 +0200)]
Merge tag 's5pv210-dt' of git://git./linux/kernel/git/kgene/linux-samsung into next/soc

Merge "Samsung S5PV210 DT support for v3.17" from Kukjin Kim:

- support common clock framework for s5pv210 clock
- add generic PHY driver on s5pv210 to support it via DT
- add dt support for s5pv210-goni, smdkc110, smdkv210 and torbreck boards
- remove board files from mach-s5pv210 and unused codes
- enable multiplatform for s5pv210

* tag 's5pv210-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  clk: samsung: s5pv210: Remove legacy board support
  ARM: SAMSUNG: Remove remaining legacy code
  gpio: samsung: Remove legacy support of S5PV210
  ARM: S5PV210: Enable multi-platform build support
  cpufreq: s5pv210: Make the driver multiplatform aware
  ARM: S5PV210: Register cpufreq platform device
  ARM: S5PV210: move debug-macro.S into the common space
  ARM: S5PV210: Untie PM support from legacy code
  ARM: S5PV210: Remove support for board files
  ARM: dts: Add Device tree for s5pc110/s5pv210 boards
  ARM: dts: Add Device tree for s5pv210 SoC
  ARM: S5PV210: Add board file for boot using Device Tree
  phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver
  clk: samsung: Add S5PV210 Audio Subsystem clock driver
  ARM: SAMSUNG: Remove legacy clock code
  serial: samsung: Remove support for legacy clock code
  cpufreq: s3c24xx: Remove some dead code
  ARM: S5PV210: Migrate clock handling to Common Clock Framework
  clk: samsung: Add clock driver for S5PV210 and compatible SoCs

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'power-exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
Arnd Bergmann [Sat, 26 Jul 2014 09:53:20 +0000 (11:53 +0200)]
Merge tag 'power-exynos' of git://git./linux/kernel/git/kgene/linux-samsung into next/soc

Merge "Samsung power management related updates for v3.17" from Kukjin Kim

- support cluster power off on exynos5420 and exynos5800
  to save power.
- use PMU address via DT to remove PMU static mapping
- remove exynos_cpuidle_init() and exynos_cpufreq_init()

* Note that this is including tags/samsung-cleanup and
tags/exynos-cpuidle are already merged into arm-soc.

* tag 'power-exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
  ARM: EXYNOS: Refactored code for using PMU address via DT
  ARM: EXYNOS: Support cluster power off on exynos5420/5800

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branches 'samsung/cleanup' and 'samsung/s5p-cleanup-v2', tag 'v3.16-rc6' into...
Arnd Bergmann [Sat, 26 Jul 2014 09:58:35 +0000 (11:58 +0200)]
Merge branches 'samsung/cleanup' and 'samsung/s5p-cleanup-v2', tag 'v3.16-rc6' into next/soc

The following samsung branches are based on these cleanups,
which are already in mainline before this branch gets pulled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'omap-for-v3.17/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm...
Arnd Bergmann [Sat, 26 Jul 2014 09:35:41 +0000 (11:35 +0200)]
Merge tag 'omap-for-v3.17/fixes-not-urgent-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical

Merge non-urgent omap fixes from Tony Lindgren:

Fixes for omaps that were not considered urgent enough for the
rc series. Mostly a fix for GPMC allocation and omap5 ABB
(Adaptive Body Bias).

* tag 'omap-for-v3.17/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: omap2+: gpmc-nand: Use dynamic platform_device_alloc()
  omap16xx: Removes fixme no longer needed in ocpi_enable()
  ARM: dts: OMAP5: Add device nodes for ABB
  ARM: omap2+: usb-tusb6010.c: Cleaning up variable is set more than once

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'omap-for-v3.17/soc-new' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Sat, 26 Jul 2014 09:33:34 +0000 (11:33 +0200)]
Merge tag 'omap-for-v3.17/soc-new' of git://git./linux/kernel/git/tmlind/linux-omap into next/soc

Merge "SoC related changes for omaps for v3.17 merge window"
from Tony Lindgren:

- Add device tree and hwmod data for various devices
  for new SoCs

- Remove legacy mailbox hwmod data that's no longer
  needed for SoCs that are DT only. Note that this may
  cause a minor merge conflict in mach-omap2/devices.c
  with omap_init_mbox() and omap_init_hdmi_audio(), both
  are legacy code that is getting removed

* tag 'omap-for-v3.17/soc-new' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: DRA7: hwmod: Add data for RTC
  arm: dra7xx: Add hwmod data for MDIO and CPSW
  arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems
  arm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy
  ARM: DRA7: hwmod: Add OCP2SCP3 module
  ARM: DRA7: hwmod: remove interrupts for DMA
  ARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver
  ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs
  ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs
  ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs
  ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot
  ARM: DRA7: hwmod_data: Add mailbox hwmod data
  ARM: dts: DRA7: Add mailbox nodes
  ARM: dts: AM4372: Correct mailbox node data
  ARM: dts: AM33xx: Add mailbox node
  ARM: dts: OMAP4: Add mailbox node
  ARM: dts: OMAP2+: Add mailbox fifo and user information
  ARM: AM43xx: hwmod: add DSS hwmod data

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branch 'omap/cleanup' into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 09:32:47 +0000 (11:32 +0200)]
Merge branch 'omap/cleanup' into next/soc

This is a dependency for the omap/soc branch

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoDocumentation: arm: misc updates to Marvell EBU SoC status
Thomas Petazzoni [Thu, 24 Jul 2014 18:46:33 +0000 (20:46 +0200)]
Documentation: arm: misc updates to Marvell EBU SoC status

Following the merging of mach-kirkwood into mach-mvebu, the removal of
mach-kirkwood, and the progress of the integration of mach-dove into
mach-mvebu, this commit makes a few updates to the Marvell README file
in the kernel documentation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lkml.kernel.org/r/1406227593-29749-3-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoDocumentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC
Thomas Petazzoni [Thu, 24 Jul 2014 18:46:32 +0000 (20:46 +0200)]
Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC

Marvell has very recently released a public version of the "Functional
specifications" and "Hardware specifications" datasheets for the
Marvell Armada XP SoC. This allows contributors and developers not
under NDA with Marvell to get more details about this SoC than what
the current kernel code shows, and hopefully allows to improve the
support for this SoC in the mainline kernel, as well as in other
projects.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lkml.kernel.org/r/1406227593-29749-2-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: fix build without platforms selected
Arnd Bergmann [Wed, 23 Jul 2014 21:05:49 +0000 (23:05 +0200)]
ARM: mvebu: fix build without platforms selected

When building a multiplatform kernel that enables 'ARCH_MVEBU' but
none of the individual options under it, we get this link error:

arch/arm/mach-mvebu/built-in.o: In function `mvebu_armada375_smp_wa_init':
:(.text+0x190): undefined reference to `mvebu_setup_boot_addr_wa'

The best solution seems to be to ensure that in this configuration,
we don't actually build any of the mvebu code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/7339332.ZE2mWIdyDh@wuerfel
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoMerge branch 'mvebu/soc-cpuidle' into mvebu/soc
Jason Cooper [Thu, 24 Jul 2014 23:10:02 +0000 (23:10 +0000)]
Merge branch 'mvebu/soc-cpuidle' into mvebu/soc

Conflicts:
arch/arm/mach-mvebu/pmsu.c

9 years agoARM: mvebu: add cpuidle support for Armada 38x
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:52 +0000 (15:00 +0200)]
ARM: mvebu: add cpuidle support for Armada 38x

Unlike the Armada XP and the Armada 370, this SoC uses a Cortex A9
core. Consequently, the procedure to enter the idle state is
different: interaction with the SCU, not disabling snooping, etc.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-16-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: add cpuidle support for Armada 370
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:51 +0000 (15:00 +0200)]
ARM: mvebu: add cpuidle support for Armada 370

This commit introduces the cpuidle support for Armada 370. The main
difference compared to the already supported Armada XP is that the
Armada 370 has an issue caused by "a slow exit process from the deep
idle state due to heavy L1/L2 cache cleanup operations performed by
the BootROM software" (cf errata GL-BootROM-10).

To work around this issue, we replace the restart code of the BootROM
by some custom code located in an internal SRAM. For this purpose, we
use the common function mvebu_boot_addr_wa() introduced in the commit
"ARM: mvebu: Add a common function for the boot address work around".

The message in case of failure to suspend the system was switched from
the warn level to the debug level. Indeed due to the "slow exit
process from the deep idle state" in Armada 370, this situation
happens quite often. Using the debug level avoids spamming the kernel
logs, but still allows to enable it if needed.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-15-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agocpuidle: mvebu: add Armada 38x support
Thomas Petazzoni [Wed, 23 Jul 2014 13:00:50 +0000 (15:00 +0200)]
cpuidle: mvebu: add Armada 38x support

This commit adds the list of cpuidle states supported by the Armada
38x SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lkml.kernel.org/r/1406120453-29291-14-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agocpuidle: mvebu: add Armada 370 support
Thomas Petazzoni [Wed, 23 Jul 2014 13:00:49 +0000 (15:00 +0200)]
cpuidle: mvebu: add Armada 370 support

This commit adds the list of cpuidle states supported by the Armada
370 SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lkml.kernel.org/r/1406120453-29291-13-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agocpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:48 +0000 (15:00 +0200)]
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7

This driver will be able to manage the cpuidle for more SoCs than just
Armada 370 and XP. It will also support Armada 38x and potentially
other SoC of the Marvell Armada EBU family. To take this into account,
this patch renames the driver and its symbols.

It also changes the driver name from cpuidle-armada-370-xp to
cpuidle-armada-xp, because separate platform drivers will be
registered for the other SoC types. This change must be done
simultaneously in the cpuidle driver and in the PMSU code in order to
remain bisectable.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lkml.kernel.org/r/1406120453-29291-12-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: export the SCU address
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:46 +0000 (15:00 +0200)]
ARM: mvebu: export the SCU address

The SCU address will be needed in other files than board-v7.c,
especially in pmsu.c for cpuidle related activities. So this patch
adds a function that allows to retrieve the virtual address at which
the SCU has been mapped.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-10-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: make the snoop disabling optional in mvebu_v7_pmsu_idle_prepare()
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:45 +0000 (15:00 +0200)]
ARM: mvebu: make the snoop disabling optional in mvebu_v7_pmsu_idle_prepare()

On some mvebu v7 SoCs (the ones using a Cortex-A9 core and not a PJ4B
core), the snoop disabling feature does not exist as the hardware
coherency is handled in a different way. Therefore, in preparation to
the introduction of the cpuidle support for those SoCs, this commit
modifies the mvebu_v7_psmu_idle_prepare() function to take several
flags, which allow to decide whether snooping should be disabled, and
whether we should use the deep idle mode or not.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-9-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: use a local variable to store the resume address
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:44 +0000 (15:00 +0200)]
ARM: mvebu: use a local variable to store the resume address

The resume address used by the cpuidle code will not always be the
same depending on the SoC. Using a local variable to store the resume
address allows to keep the same function for the PM notifier but with
a different address. This address will be set during the
initialization of the cpuidle logic in pmsu.c.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-8-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: make the cpuidle initialization more generic
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:43 +0000 (15:00 +0200)]
ARM: mvebu: make the cpuidle initialization more generic

In preparation to the addition of the cpuidle support for more SoCs,
this patch moves the Armada XP specific initialization to a separate
function.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-7-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:42 +0000 (15:00 +0200)]
ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c

Most of the function related to the PMSU are not specific to the
Armada 370 or Armada XP SoCs. They can also be used for most of the
other mvebu ARMv7 SoCs, and will actually be used to support cpuidle
on Armada 38x.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-6-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: use the common function for Armada 375 SMP workaround
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:41 +0000 (15:00 +0200)]
ARM: mvebu: use the common function for Armada 375 SMP workaround

Use the common function mvebu_setup_boot_addr_wa() introduced in the
commit "ARM: mvebu: Add a common function for the boot address work
around" instead of the dedicated version for Armada 375.

This commit also moves the workaround in the system-controller
module. Indeed the workaround on 375 is really related to setting the
boot address which is done by the system controller.

As a bonus we no longer use an harcoded value to access the register
storing the boot address.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-5-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: add a common function for the boot address work around
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:40 +0000 (15:00 +0200)]
ARM: mvebu: add a common function for the boot address work around

On some of the mvebu SoCs and due to internal BootROM issue, the CPU
initial jump code must be placed in the SRAM memory of the SoC. In
order to achieve this, we have to unmap the BootROM and at some
specific location where the BootROM was placed, create a dedicated
MBus window for the SRAM. This SRAM is initialized with a few
instructions of code that allows to jump to the real secondary CPU
boot address. The SRAM used is the Crypto engine one.

This work around is currently needed for booting SMP on Armada 375 Z1
and will be needed for cpuidle support on Armada 370. Instead of
duplicating the same code, this commit introduces a common function to
handle it: mvebu_setup_boot_addr_wa().

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-4-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: sort the #include of pmsu.c in alphabetic order
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:39 +0000 (15:00 +0200)]
ARM: mvebu: sort the #include of pmsu.c in alphabetic order

Sorting the headers in alphabetic order will help to reduce conflicts
when adding new headers later.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-3-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code
Gregory CLEMENT [Wed, 23 Jul 2014 13:00:38 +0000 (15:00 +0200)]
ARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code

do_armada_370_xp_cpu_suspend() and armada_370_xp_pmsu_idle_prepare(),
have been merged into a single function called
armada_370_xp_pmsu_idle_enter() by the commit "bbb92284b6c8 ARM:
mvebu: slightly refactor/rename PMSU idle related functions", in
prepare for the introduction of the CPU hotplug support for Armada XP.

But for cpuidle the prepare function will be common to all the mvebu
SoCs that use the PMSU, while the suspend function will be specific to
each SoC. Keeping the prepare function separate will help reducing
code duplication while new SoC support is added.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-2-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoMerge branch 'mvebu/fixes' into mvebu/soc-cpuidle
Jason Cooper [Thu, 24 Jul 2014 11:41:36 +0000 (11:41 +0000)]
Merge branch 'mvebu/fixes' into mvebu/soc-cpuidle

9 years agoMerge tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek...
Arnd Bergmann [Wed, 23 Jul 2014 20:49:24 +0000 (22:49 +0200)]
Merge tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek into next/soc

Merge basic support for the Mediatek Cortex-A7 SoCs from Matthias Brugger:

Support is quite basic, as the only component working up to now are the
timers.

* tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek:
  arm: mediatek: add dts for Aquaris5 mobile phone
  dt-bindings: add documentation for Mediatek SoC
  arm: add basic support for Mediatek MT6589 boards

Signed-off-by: Matthias Brugger matthias.bgg@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: mvebu: fix return value check in armada_xp_pmsu_cpufreq_init()
Wei Yongjun [Tue, 22 Jul 2014 14:18:08 +0000 (22:18 +0800)]
ARM: mvebu: fix return value check in armada_xp_pmsu_cpufreq_init()

In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Link: https://lkml.kernel.org/r/1406038688-26417-1-git-send-email-weiyj_lk@163.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
Romain Perier [Sat, 19 Jul 2014 13:03:26 +0000 (13:03 +0000)]
ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs

Adds ability to shutdown all CPUs except the first one
(since it might be special for a lot of platforms).
It is now possible to use kexec which requires such a feature.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
9 years agoARM: rockchip: select ARMv7 compiler flags for platsmp.o
Heiko Stuebner [Wed, 23 Jul 2014 09:36:49 +0000 (11:36 +0200)]
ARM: rockchip: select ARMv7 compiler flags for platsmp.o

When compiling for multiplatform for both ARMv6 and ARMv7, the default
compiler flags are for ARMv6, and the following cpu-hotplug change will
fail with:
 /tmp/ccSFxfmI.s:68: Error: selected processor does not support ARM mode `isb '
 /tmp/ccSFxfmI.s:74: Error: selected processor does not support ARM mode `isb '
 /tmp/ccSFxfmI.s:75: Error: selected processor does not support ARM mode `dsb '

Fix this in a similar manner as in commit 9f0affcf3e21 "ARM: mvebu: Fix pmsu
compilation when ARMv6 is selected", by specifying ARMv7 flags for platsmp.o.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
9 years agoMerge branch 'omap-for-v3.17/mailbox' into omap-for-v3.17/soc
Tony Lindgren [Wed, 23 Jul 2014 08:26:02 +0000 (01:26 -0700)]
Merge branch 'omap-for-v3.17/mailbox' into omap-for-v3.17/soc

9 years agoMerge tag 'for-v3.17/omap-hwmod-a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Wed, 23 Jul 2014 08:21:33 +0000 (01:21 -0700)]
Merge tag 'for-v3.17/omap-hwmod-a' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.17/soc

OMAP hwmod data additions for v3.17.  Most of these are DRA7xx-related,
although one patch adds DSS hwmods for AM43xx.

Basic build, boot, and PM test results are available here:

http://www.pwsan.com/omap/testlogs/hwmod-a-v3.17/20140722143514/

9 years agoARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
Pankaj Dubey [Fri, 18 Jul 2014 18:48:35 +0000 (03:48 +0900)]
ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine

As exynos_cpuidle_init() and exynos_cpufreq_init() functions have just
one line of code for registering platform devices. So we can move them
to exynos_dt_machine_init() and remove exynos_cpuidle_init() and
exynos_cpufreq_init(). This will help in reducing lines of code in
exynos.c, making it more clean.

Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoARM: EXYNOS: Refactored code for using PMU address via DT
Pankaj Dubey [Fri, 18 Jul 2014 18:43:22 +0000 (03:43 +0900)]
ARM: EXYNOS: Refactored code for using PMU address via DT

Under "arm/mach-exynos" many files are using PMU register offsets.
Since we have added support for accessing PMU base address via DT,
now we can remove PMU mapping from exynosX_iodesc. Let's convert
all these access using iomapped address.
This will help us in removing static mapping of PMU base address
as well as help in reducing dependency over machine header files.
Thus helping for migration of PMU implementation from machine to
driver folder which can be reused for ARM64 based SoC.

Also as we have removed static mappings from "regs-pmu.h" it does
not need map.h anymore. But "platsmp.c" needed this and till now it
got included indirectly. So lets move header inclusion of
"mach/map.h" from "regs-pmu.h" to "platsmp.c".

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoARM: EXYNOS: Support cluster power off on exynos5420/5800
Abhilash Kesavan [Fri, 4 Jul 2014 20:50:58 +0000 (05:50 +0900)]
ARM: EXYNOS: Support cluster power off on exynos5420/5800

Turning off a cluster when all 4 cores of the cluster are powered off
saves power significantly. Powering off the A15 L2 alone gives around
100mW in savings. Add support for powering off the A15/A7 clusters on
exynos5420/5800.

The patch enables specific register bits which ensure that:
   - cluster L2 will be turned on before the first man is powered up.
   - last man will be turned off before the cluster L2 is turned off.
   - core is powered down before powering it up.

Remove the exynos_cluster_power_control function completely as we can
rely on the above mentioned bits rather than polling the cluster power
status register.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoMerge branch 'v3.17-next/cpuidle-exynos' into v3.17-next/power-exynos
Kukjin Kim [Tue, 22 Jul 2014 23:18:15 +0000 (08:18 +0900)]
Merge branch 'v3.17-next/cpuidle-exynos' into v3.17-next/power-exynos

9 years agoMerge branch 'v3.17-next/cleanup-samsung' into v3.17-next/power-exynos
Kukjin Kim [Tue, 22 Jul 2014 23:18:08 +0000 (08:18 +0900)]
Merge branch 'v3.17-next/cleanup-samsung' into v3.17-next/power-exynos

9 years agoMerge branch 'mvebu/soc-cpufreq' into mvebu/soc
Jason Cooper [Tue, 22 Jul 2014 20:46:48 +0000 (20:46 +0000)]
Merge branch 'mvebu/soc-cpufreq' into mvebu/soc

9 years agoARM: DRA7: hwmod: Add data for RTC
Lokesh Vutla [Tue, 22 Jul 2014 19:15:57 +0000 (13:15 -0600)]
ARM: DRA7: hwmod: Add data for RTC

Add hwmod data for RTC

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for MDIO and CPSW
Mugunthan V N [Tue, 8 Jul 2014 13:16:39 +0000 (18:46 +0530)]
arm: dra7xx: Add hwmod data for MDIO and CPSW

Adding hwmod data for CPSW and MDIO which is present in DRA7xx SoC

Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems
Kishon Vijay Abraham I [Wed, 9 Jul 2014 09:02:47 +0000 (14:32 +0530)]
arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems

Added hwmod data for pcie1 and pcie2 subsystem present in DRA7xx SOC.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy
Kishon Vijay Abraham I [Wed, 25 Jun 2014 18:02:45 +0000 (23:32 +0530)]
arm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy

Added hwmod data for pcie1 and pcie2 phy present in DRA7xx SOC.
Also added the missing CLKCTRL OFFSET macro and CONTEXT OFFSET macro
for pcie1 phy and pcie2 phy.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoARM: DRA7: hwmod: Add OCP2SCP3 module
Roger Quadros [Sat, 5 Jul 2014 23:44:58 +0000 (17:44 -0600)]
ARM: DRA7: hwmod: Add OCP2SCP3 module

This module is needed for the SATA and PCIe PHYs.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoMAINTAINERS: Add sdhci-st file to ARCH/STI architecture
Peter Griffin [Wed, 4 Jun 2014 16:30:24 +0000 (17:30 +0100)]
MAINTAINERS: Add sdhci-st file to ARCH/STI architecture

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoarm: mediatek: add dts for Aquaris5 mobile phone
Matthias Brugger [Sun, 11 May 2014 00:16:13 +0000 (02:16 +0200)]
arm: mediatek: add dts for Aquaris5 mobile phone

The Aquaris5 is a mobile phone based on the MT6589 SoC.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
9 years agodt-bindings: add documentation for Mediatek SoC
Matthias Brugger [Mon, 12 May 2014 23:14:17 +0000 (01:14 +0200)]
dt-bindings: add documentation for Mediatek SoC

This adds a DT binding documentation for the MT6589 SoC from Mediatek.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
9 years agoarm: add basic support for Mediatek MT6589 boards
Matthias Brugger [Mon, 12 May 2014 23:06:13 +0000 (01:06 +0200)]
arm: add basic support for Mediatek MT6589 boards

This adds a generic devicetree board file and a dtsi for boards
based on MT6589 SoCs from Mediatek.

Apart from the generic parts (gic, clocks) the only component
currently supported are the timers.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
9 years agoARM: DRA7: hwmod: remove interrupts for DMA
Nishanth Menon [Thu, 12 Jun 2014 11:45:23 +0000 (17:15 +0530)]
ARM: DRA7: hwmod: remove interrupts for DMA

DMA interrupts are now available in of, and the definitions are
duplicates in hwmod. This prevents us from dynamically allocating
interrupt resources for dma from devicetree.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
9 years agoARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver
Nishanth Menon [Thu, 12 Jun 2014 11:45:22 +0000 (17:15 +0530)]
ARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver

we have currently 2 DMA drivers that try to co-exist.
drivers/dma/omap-dma.c which registers it's own IRQ and is device tree
aware and uses arch/arm/plat-omap/dma.c instance created by
arch/arm/mach-omap2/dma.c to maintain channel usage (omap_request_dma).

Currently both try to register interrupts and mach-omap2/plat-omap dma.c
attempts to use the IRQ number registered by hwmod to register it's own
interrupt handler.

Now, there is no reasonable way of static allocating DMA irq in GIC
SPI when we use crossbar. However, since the dma_chan structure is
freed as a result of IRQ not being present due to devm allocation,
maintaining information of channel by platform code fails at a later
point in time when that region of memory is reused.

So, if hwmod does not indicate an IRQ number, then, assume that
dma-engine will take care of the interrupt handling.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
9 years agoMerge tag 'for-v3.17/omap-clock-a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Mon, 21 Jul 2014 07:35:38 +0000 (00:35 -0700)]
Merge tag 'for-v3.17/omap-clock-a' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.17/soc

An OMAP clock cleanup series for 3.17 from Tero Kristo.
This is in preparation for moving this code into drivers/clk/ti.

Basic build, boot, and PM test logs are here:

http://www.pwsan.com/omap/testlogs/clock-a-v3.17/20140717034329/

9 years agoLinux 3.16-rc6 v3.16-rc6
Linus Torvalds [Mon, 21 Jul 2014 04:04:16 +0000 (21:04 -0700)]
Linux 3.16-rc6

9 years agoMerge tag 'staging-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 21 Jul 2014 03:44:53 +0000 (20:44 -0700)]
Merge tag 'staging-3.16-rc6' of git://git./linux/kernel/git/gregkh/staging

Pull more IIO driver fixes from Greg KH:
 "Here are two IIO driver fixes for 3.16-rc6 that resolve some reported
  issues"

* tag 'staging-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: mma8452: Use correct acceleration units.
  iio:core: Handle error when mask type is not separate

9 years agoMerge tag 'usb-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Mon, 21 Jul 2014 03:44:18 +0000 (20:44 -0700)]
Merge tag 'usb-3.16-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are two USB patches that resolve some reported issues, one with
  an odd HUB, and one in the chipidea driver"

* tag 'usb-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: Check if port status is equal to RxDetect
  usb: chipidea: udc: Disable auto ZLP generation on ep0

9 years agoMerge tag 'driver-core-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 21 Jul 2014 03:43:46 +0000 (20:43 -0700)]
Merge tag 'driver-core-3.16-rc6' of git://git./linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is a single driver core fix that reverts an older patch that has
  been causing a number of reported problems with the platform devices.

  This revert has been in linux-next for a while with no reported issues"

* tag 'driver-core-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  platform_get_irq: Revert to platform_get_resource if of_irq_get fails

9 years agoMerge tag 'char-misc-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Mon, 21 Jul 2014 03:43:14 +0000 (20:43 -0700)]
Merge tag 'char-misc-3.16-rc6' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg KH:
 "Here's a single hyper-v driver fix for a reported issue"

* tag 'char-misc-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Drivers: hv: hv_fcopy: fix a race condition for SMP guest

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 21 Jul 2014 03:39:28 +0000 (20:39 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull intel drm fixes from Dave Airlie:
 "Intel fixes came in late, but since I debugged one of them I'll send
  them on,

  Two reverts, a quirk and one warn regression"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  Revert "drm/i915: reverse dp link param selection, prefer fast over wide again"
  drm/i915: Track the primary plane correctly when reassigning planes
  drm/i915: Ignore VBT backlight presence check on HP Chromebook 14
  Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Linus Torvalds [Mon, 21 Jul 2014 03:28:04 +0000 (20:28 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rw/uml

Pull UML fixes from Richard Weinberger:
 "Four fixes, all discovered by Trinity"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: segv: Save regs only in case of a kernel mode fault
  um: Fix hung task in fix_range_common()
  um: Ensure that a stub page cannot get unmapped
  Revert "um: Fix wait_stub_done() error handling"

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Mon, 21 Jul 2014 03:21:05 +0000 (20:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We have two more fixes in my for-linus branch.

  I was hoping to also include a fix for a btrfs deadlock with
  compression enabled, but we're still nailing that one down"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: test for valid bdev before kobj removal in btrfs_rm_device
  Btrfs: fix abnormal long waiting in fsync

9 years agoMerge tag 'nfs-for-3.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Mon, 21 Jul 2014 02:55:44 +0000 (19:55 -0700)]
Merge tag 'nfs-for-3.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client fixes from Trond Myklebust:
 "Apologies for the relative lateness of this pull request, however the
  commits fix some issues with the NFS read/write code updates in
  3.16-rc1 that can cause serious Oopsing when using small r/wsize.  The
  delay was mainly due to extra testing to make sure that the fixes
  behave correctly.

  Highlights include;
   - Stable fix for an NFSv3 posix ACL regression
   - Multiple fixes for regressions to the NFS generic read/write code:
     - Fix page splitting bugs that come into play when a small
       rsize/wsize read/write needs to be sent again (due to error
       conditions or page redirty)
     - Fix nfs_wb_page_cancel, which is called by the "invalidatepage"
       method
   - Fix 2 compile warnings about unused variables
   - Fix a performance issue affecting unstable writes"

* tag 'nfs-for-3.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Don't reset pg_moreio in __nfs_pageio_add_request
  NFS: Remove 2 unused variables
  nfs: handle multiple reqs in nfs_wb_page_cancel
  nfs: handle multiple reqs in nfs_page_async_flush
  nfs: change find_request to find_head_request
  nfs: nfs_page should take a ref on the head req
  nfs: mark nfs_page reqs with flag for extra ref
  nfs: only show Posix ACLs in listxattr if actually present

9 years agoum: segv: Save regs only in case of a kernel mode fault
Richard Weinberger [Sun, 20 Jul 2014 11:39:27 +0000 (13:39 +0200)]
um: segv: Save regs only in case of a kernel mode fault

...otherwise me lose user mode regs and the resulting
stack trace is useless.

Signed-off-by: Richard Weinberger <richard@nod.at>
9 years agoum: Fix hung task in fix_range_common()
Richard Weinberger [Sun, 20 Jul 2014 11:16:20 +0000 (13:16 +0200)]
um: Fix hung task in fix_range_common()

If do_ops() fails we have to release current->mm->mmap_sem
otherwise the failing task will never terminate.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
9 years agoum: Ensure that a stub page cannot get unmapped
Richard Weinberger [Sun, 20 Jul 2014 11:09:15 +0000 (13:09 +0200)]
um: Ensure that a stub page cannot get unmapped

Trinity discovered an execution path such that a task
can unmap his stub page.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
9 years agoRevert "um: Fix wait_stub_done() error handling"
Richard Weinberger [Sun, 20 Jul 2014 10:56:34 +0000 (12:56 +0200)]
Revert "um: Fix wait_stub_done() error handling"

This reverts commit 0974a9cadc7886f7baaa458bb0c89f5c5f9d458e.
The real for for that issue is to release current->mm->mmap_sem in
fix_range_common().

Signed-off-by: Richard Weinberger <richard@nod.at>
9 years agoMerge tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Olof Johansson [Sat, 19 Jul 2014 22:03:08 +0000 (15:03 -0700)]
Merge tag 'exynos-cpuidle' of git://git./linux/kernel/git/kgene/linux-samsung into next/soc

Merge "Samsung exynos cpuidle update for v3.17" from Kukjin Kim:

- add callbacks exynos_suspend() and exynos_powered_up()
  for support cpuidle through mcpm
- skip exynos_cpuidle for exynos5420 because is uses
  cpuidle-big-liggle generic cpuidle driver
- add generic functions to calculate cpu number is used
  for pmu and this is required for exynos5420 multi-cluster
- add of_device_id structure for big.LITTLE cpuidle and
  add "samsung,exynos5420" compatible string for exynos5420

* tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm
  ARM: EXYNOS: do not allow cpuidle registration for exynos5420
  cpuidle: big.LITTLE: init driver for exynos5420
  cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config
  ARM: EXYNOS: add generic function to calculate cpu number
  cpuidle: big.LITTLE: add of_device_id structure
  + Linux 3.16-rc5

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: EXYNOS: Fix build breakge with PM_SLEEP=n
Krzysztof Kozlowski [Fri, 18 Jul 2014 19:45:02 +0000 (04:45 +0900)]
ARM: EXYNOS: Fix build breakge with PM_SLEEP=n

Fix building of exynos_defconfig with disabled PM_SLEEP:
CONFIG_PM_SLEEP=n
CONFIG_PM_SLEEP_SMP=n
CONFIG_SUSPEND=n
by moving functions for power up/down of CPU and cluster to platsmp.c

The build error messages:
arch/arm/mach-exynos/built-in.o: In function `exynos_boot_secondary':
arch/arm/mach-exynos/platsmp.c:111: undefined reference to `exynos_cpu_power_state'
arch/arm/mach-exynos/platsmp.c:112: undefined reference to `exynos_cpu_power_up'
arch/arm/mach-exynos/platsmp.c:116: undefined reference to `exynos_cpu_power_state'
make: *** [vmlinux] Error 1

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>,
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'v3.16-rc5' into next/fixes-non-critical
Olof Johansson [Sat, 19 Jul 2014 21:59:07 +0000 (14:59 -0700)]
Merge tag 'v3.16-rc5' into next/fixes-non-critical

Linux 3.16-rc5

9 years agoMerge tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu into next/soc
Olof Johansson [Sat, 19 Jul 2014 21:28:06 +0000 (14:28 -0700)]
Merge tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu into next/soc

Merge "ARM: mvebu SoC changes for v3.17 (round 2)" from Jason Cooper:

"Yeah, it's just one patch, but it's a beautiful one!  Thanks to the
efforts of many people over the last couple years, and in particular,
Andrew Lunn, Kirkwood has been completely converted to DT."

 - kirkwood
   * Remove mach-kirkwood/, It's fully supported in mach-mvebu/

* tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu:
  ARM: Kirkwood: Remove mach-kirkwood

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'sunxi-core-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sat, 19 Jul 2014 19:22:47 +0000 (12:22 -0700)]
Merge tag 'sunxi-core-for-3.17' of git://git./linux/kernel/git/mripard/linux into next/soc

Merge "Allwinner core additions for 3.17" from Maxime Ripard:

Nothing very fancy here, only the introduction from the new Allwinner A23 SoC.

* tag 'sunxi-core-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  ARM: sunxi: select MFD_SUN6I_PRCM when sun8i arch support is enabled
  ARM: sunxi: Add earlyprintk support using R_UART (sun6i/sun8i)
  ARM: sunxi: Introduce Allwinner A23 support

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'imx-soc-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Olof Johansson [Sat, 19 Jul 2014 18:56:39 +0000 (11:56 -0700)]
Merge tag 'imx-soc-3.17' of git://git./linux/kernel/git/shawnguo/linux into next/soc

Merge "ARM: imx: SoC changes for 3.17" from Shawn Guo:

The i.MX SoC changes for 3.17:
 - Add devicetree support for i.MX1 and i.MX21 clock driver
 - Use CLOCKSOURCE_OF_DECLARE() to initialize timer for DT targets
 - Use of_clk_init() to initialize i.MX25 and i.MX27 clock driver in
   device tree boot
 - Remove i.MX1 camera support
 - Remove i.MX27 IP Camera and Lite-Kit board support
 - Add suspend and cpuidle support for i.mx6sx
 - Clean up unused clk_register_clkdev() lookups
 - Update imx-weim bus driver to support populating devices on a simple
   bus
 - Switch i.MX27 and i.MX6QDL clock driver to use macro for clock IDs
 - Make i.MX51 a DT only platform and clean up the non-DT support code
 - Support disabling supervisor protect via DT
 - Random defconfig updates

* tag 'imx-soc-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (69 commits)
  ARM: imx: clk-vf610: fix FlexCAN clock gating
  ARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targets
  ARM: i.MX53: globally disable supervisor protect
  ARM: i.MX: allow disabling supervisor protect via DT
  ARM: i.MX27 clk: Add 26 MHz oscillator circuit clock gate
  ARM: i.MX27 clk: Remove unused definitions
  ARM: i.MX27 clk: Introduce DT include for clock provider
  ARM: i.MX: Remove Freescale Logic Product Development i.MX27 Lite-Kit board support
  ARM: i.MX: Remove excess symbols ARCH_MX1, ARCH_MX25 and MACH_MX27
  ARM: i.MX: Remove i.MX1 camera support
  ARM: imx: use PTR_ERR_OR_ZERO
  bus: imx-weim: populate devices on a simple bus
  ARM: imx: build cpu_is_imx6sl function conditionally
  ARM: imx: imx6sx uses imx6q cpuidle code
  ARM: imx: drop PL310 errata 588369 and 727915
  ARM: imx_v6_v7_defconfig: add FSL_EDMA and PRINTK_TIME
  ARM: imx: clk-imx6sx: register SSI/SSI_IPG as shared gate clocks
  ARM: imx_v6_v7_defconfig: Enable flexcan driver for can support
  ARM: imx_v6_v7_defconfig: Enable STMPE gpio support
  ARM: imx: mark .dt_compat as const
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agobtrfs: test for valid bdev before kobj removal in btrfs_rm_device
Eric Sandeen [Mon, 7 Jul 2014 17:34:49 +0000 (12:34 -0500)]
btrfs: test for valid bdev before kobj removal in btrfs_rm_device

commit 99994cd btrfs: dev delete should remove sysfs entry
added a btrfs_kobj_rm_device, which dereferences device->bdev...
right after we check whether device->bdev might be NULL.

I don't honestly know if it's possible to have a NULL device->bdev
here, but assuming that it is (given the test), we need to move
the kobject removal to be under that test.

(Coverity spotted this)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <clm@fb.com>
9 years agoBtrfs: fix abnormal long waiting in fsync
Liu Bo [Thu, 17 Jul 2014 08:08:36 +0000 (16:08 +0800)]
Btrfs: fix abnormal long waiting in fsync

xfstests generic/127 detected this problem.

With commit 7fc34a62ca4434a79c68e23e70ed26111b7a4cf8, now fsync will only flush
data within the passed range.  This is the cause of the above problem,
-- btrfs's fsync has a stage called 'sync log' which will wait for all the
ordered extents it've recorded to finish.

In xfstests/generic/127, with mixed operations such as truncate, fallocate,
punch hole, and mapwrite, we get some pre-allocated extents, and mapwrite will
mmap, and then msync.  And I find that msync will wait for quite a long time
(about 20s in my case), thanks to ftrace, it turns out that the previous
fallocate calls 'btrfs_wait_ordered_range()' to flush dirty pages, but as the
range of dirty pages may be larger than 'btrfs_wait_ordered_range()' wants,
there can be some ordered extents created but not getting corresponding pages
flushed, then they're left in memory until we fsync which runs into the
stage 'sync log', and fsync will just wait for the system writeback thread
to flush those pages and get ordered extents finished, so the latency is
inevitable.

This adds a flush similar to btrfs_start_ordered_extent() in
btrfs_wait_logged_extents() to fix that.

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
9 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 16:27:55 +0000 (06:27 -1000)]
Merge branch 'locking-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "The locking department delivers:

   - A rather large and intrusive bundle of fixes to address serious
     performance regressions introduced by the new rwsem / mcs
     technology.  Simpler solutions have been discussed, but they would
     have been ugly bandaids with more risk than doing the right thing.

   - Make the rwsem spin on owner technology opt-in for architectures
     and enable it only on the known to work ones.

   - A few fixes to the lockdep userspace library"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rwsem: Add CONFIG_RWSEM_SPIN_ON_OWNER
  locking/mutex: Disable optimistic spinning on some architectures
  locking/rwsem: Reduce the size of struct rw_semaphore
  locking/rwsem: Rename 'activity' to 'count'
  locking/spinlocks/mcs: Micro-optimize osq_unlock()
  locking/spinlocks/mcs: Introduce and use init macro and function for osq locks
  locking/spinlocks/mcs: Convert osq lock to atomic_t to reduce overhead
  locking/spinlocks/mcs: Rename optimistic_spin_queue() to optimistic_spin_node()
  locking/rwsem: Allow conservative optimistic spinning when readers have lock
  tools/liblockdep: Account for bitfield changes in lockdeps lock_acquire
  tools/liblockdep: Remove debug print left over from development
  tools/liblockdep: Fix comparison of a boolean value with a value of 2

9 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 16:26:43 +0000 (06:26 -1000)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fix from Thomas Gleixner:
 "Prevent a possible divide by zero in the debugging code"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix possible divide by zero in avg_atom() calculation

9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 16:26:01 +0000 (06:26 -1000)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "Three patches addressing shortcomings in the ARM gic interrupt chip
  driver"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: gic: Fix core ID calculation when topology is read from DT
  irqchip: gic: Add binding probe for ARM GIC400
  irqchip: gic: Add support for cortex a7 compatible string

9 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 16:25:03 +0000 (06:25 -1000)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "A single fix for a long standing issue in the alarm timer subsystem,
  which was noticed recently when people finally started to use alarm
  timers for serious work"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  alarmtimer: Fix bug where relative alarm timers were treated as absolute

9 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 16:23:27 +0000 (06:23 -1000)]
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull RCU fixes from Thomas Gleixner:
 "Two RCU patches:
   - Address a serious performance regression on open/close caused by
     commit ac1bea85781e ("Make cond_resched() report RCU quiescent
     states")
   - Export RCU debug functions.  Not a regression, but enablement to
     address a serious recursion bug in the sl*b allocators in 3.17"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  rcu: Reduce overhead of cond_resched() checks for RCU
  rcu: Export debug_init_rcu_head() and and debug_init_rcu_head()

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 19 Jul 2014 06:49:47 +0000 (20:49 -1000)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A smaller set of fixes this week, and all regression fixes:
   - a handful of issues fixed on at91 with common clock conversion
   - a set of fixes for Marvell mvebu (SMP, coherency, PM)
   - a clock fix for i.MX6Q.
   - ... and a SMP/hotplug fix for Exynos"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: EXYNOS: Fix core ID used by platsmp and hotplug code
  ARM: at91/dt: add missing clocks property to pwm node in sam9x5.dtsi
  ARM: at91/dt: fix usb0 clocks definition in sam9n12 dtsi
  ARM: at91: at91sam9x5: correct typo error for ohci clock
  ARM: clk-imx6q: parent lvds_sel input from upstream clock gates
  ARM: mvebu: Fix coherency bus notifiers by using separate notifiers
  ARM: mvebu: Fix the operand list in the inline asm of armada_370_xp_pmsu_idle_enter
  ARM: mvebu: fix SMP boot for Armada 38x and Armada 375 Z1 in big endian

9 years agoMerge tag 'drm-intel-fixes-2014-07-18' of git://anongit.freedesktop.org/drm-intel
Dave Airlie [Sat, 19 Jul 2014 06:48:38 +0000 (16:48 +1000)]
Merge tag 'drm-intel-fixes-2014-07-18' of git://anongit.freedesktop.org/drm-intel

But in any case nothing really shocking in
here, 2 reverts, 1 quirk and a regression fix a WARN.

* tag 'drm-intel-fixes-2014-07-18' of git://anongit.freedesktop.org/drm-intel:
  Revert "drm/i915: reverse dp link param selection, prefer fast over wide again"
  drm/i915: Track the primary plane correctly when reassigning planes
  drm/i915: Ignore VBT backlight presence check on HP Chromebook 14
  Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"

9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Jul 2014 06:46:55 +0000 (20:46 -1000)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "A couple of key fixes and a few less critical ones.  The main ones
  are:

   - add a .bss section to the PE/COFF headers when building with EFI
     stub

   - invoke the correct paravirt magic when building the espfix page
     tables

  Unfortunately both of these areas also have at least one additional
  fix each still in thie pipeline, but which are not yet ready to push"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Remove unused variable "polling"
  x86/espfix/xen: Fix allocation of pages for paravirt page tables
  x86/efi: Include a .bss section within the PE/COFF headers
  efi: fdt: Do not report an error during boot if UEFI is not available
  efi/arm64: efistub: remove local copy of linux_banner

9 years agoMerge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sat, 19 Jul 2014 06:39:34 +0000 (20:39 -1000)]
Merge tag 'rdma-for-linus' of git://git./linux/kernel/git/roland/infiniband

Pull infiniband/rdma fixes from Roland Dreier:
 - cxgb4 hardware driver regression fixes
 - mlx5 hardware driver regression fixes

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx5: Enable "block multicast loopback" for kernel consumers
  RDMA/cxgb4: Call iwpm_init() only once
  mlx5_core: Fix possible race between mr tree insert/delete
  RDMA/cxgb4: Initialize the device status page
  RDMA/cxgb4: Clean up connection on ARP error
  RDMA/cxgb4: Fix skb_leak in reject_cr()

9 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Sat, 19 Jul 2014 06:37:24 +0000 (20:37 -1000)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "More fallout from module tests and code inspection.

  Fixes to temperature limit write operations in adt7470 driver.  Also,
  dashes are not allowed in hwmon 'name' attributes.  Fix drivers where
  necessary"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adt7470) Fix writes to temperature limit registers
  hwmon: (da9055) Don't use dash in the name attribute
  hwmon: (da9052) Don't use dash in the name attribute

9 years agoMerge tag 'iommu-fixes-v3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 19 Jul 2014 06:36:13 +0000 (20:36 -1000)]
Merge tag 'iommu-fixes-v3.16-rc5' of git://git./linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 "A couple of fixes for the Freescale PAMU driver queued up:

   - fix PAMU window size check.
   - fix the device domain attach condition.
   - fix the error condition during iommu group"

* tag 'iommu-fixes-v3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/fsl: Fix the error condition during iommu group
  iommu/fsl: Fix the device domain attach condition.
  iommu/fsl: Fix PAMU window size check.

9 years agoMerge tag 'pm+acpi-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sat, 19 Jul 2014 06:28:27 +0000 (20:28 -1000)]
Merge tag 'pm+acpi-3.16-rc6' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "These are a few recent regression fixes, a revert of the ACPI video
  commit I promised, a system resume fix related to request_firmware(),
  an ACPI video quirk for one more Win8-oriented BIOS, an ACPI device
  enumeration documentation update and a few fixes for ARM cpufreq
  drivers.

  Specifics:

   - Fix for a recently introduced NULL pointer dereference in the core
     system suspend code occuring when platforms without ACPI attempt to
     use the "freeze" sleep state from Zhang Rui.

   - Fix for a recently introduced build warning in cpufreq headers from
     Brian W Hart.

   - Fix for a 3.13 cpufreq regression related to sysem resume that
     triggers on some systems with multiple CPU clusters from Viresh
     Kumar.

   - Fix for a 3.4 regression in request_firmware() resulting in
     WARN_ON()s on some systems during system resume from Takashi Iwai.

   - Revert of the ACPI video commit that changed the default value of
     the video.brightness_switch_enabled command line argument to 0 as
     it has been reported to break existing setups.

   - ACPI device enumeration documentation update to take recent code
     changes into account and make the documentation match the code
     again from Darren Hart.

   - Fixes for the sa1110, imx6q, kirkwood, and cpu0 cpufreq drivers
     from Linus Walleij, Nicolas Del Piano, Quentin Armitage, Viresh
     Kumar.

   - New ACPI video blacklist entry for HP ProBook 4540s from Hans de
     Goede"

* tag 'pm+acpi-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: make table sentinel macros unsigned to match use
  cpufreq: move policy kobj to policy->cpu at resume
  cpufreq: cpu0: OPPs can be populated at runtime
  cpufreq: kirkwood: Reinstate cpufreq driver for ARCH_KIRKWOOD
  cpufreq: imx6q: Select PM_OPP
  cpufreq: sa1110: set memory type for h3600
  ACPI / video: Add use_native_backlight quirk for HP ProBook 4540s
  PM / sleep: fix freeze_ops NULL pointer dereferences
  PM / sleep: Fix request_firmware() error at resume
  Revert "ACPI / video: change acpi-video brightness_switch_enabled default to 0"
  ACPI / documentation: Remove reference to acpi_platform_device_ids from enumeration.txt