Commit Graph

2416 Commits

Author SHA1 Message Date
Olof Johansson 8bdd6f5454 Third Round of Renesas ARM64 Based SoC Defconfig Updates for v4.5
* Enable CS2000 and Renesas R-Car SATA driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWc1zcAAoJENfPZGlqN0++GKMP/RBwpAkn8GtGwmGEbIHmx0n7
 npLr8+Anzt+jud6v5E17mg8k/7UDlCB+Deua366mpiAZ3KYNwEyViYXU0OwBwVMG
 UbATErlvHVT9O/yD5z52hy+qSVlh2YhmhV55uQ7Ky5POpHWBazqFQqMdCLyDC8jU
 qQBZpJ9i3pVc+N7+KvIUP1UPun4/5TcTy3sG+ZdTSZ4bCa6WGdKLR+hPzMXbm7Yv
 v6dG+8yi8/4Xl2AT9brhg5v59KBKZM7bx6fSlPr7z09fhVadCjxjCMMGEKP+Q87I
 nS2lB0mJ/5wNpZmZogzTOwTtiFgfDq4v082gA8MpydXsw787N9bXslMGq+V54xBB
 QV0IxN/Tb8TXIgzDiN5/V5Oqh+nm1YfON/prI433H+itEFCXUIKhcO7vBExyRniw
 RZfkF7BhvYHpOTBcCgfIvHhXKCrpliyan5bBS8/ADkngJJ56wO4AWSdi4vz9/P70
 vqPDGfyiffOiXYGkr95AmQhSO6LOo/INmqAHhLb0Z65kVkIAAIiWvXmmxhNFhj9p
 s4lMh6T0dK1PN2l/ctudgSIHgllQanJ5Vl7nPsHQTZ06lkW/O4gNxm3AtIlSRetN
 /NaSrKVVmAIfCKwJ2VMZzVHruyYKJCTGkozW5QMtYh+zqbGyoxZ5R95BYA6R7Dq7
 Bs8XsleUxMNJbk+ahpCX
 =9272
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig3-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/config64

Third Round of Renesas ARM64 Based SoC Defconfig Updates for v4.5

* Enable CS2000 and Renesas R-Car SATA driver

* tag 'renesas-arm64-defconfig3-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: add CS2000 support
  arm64: defconfig: Add Renesas R-Car SATA driver for R-Car Gen3 SoCs

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 12:50:29 -08:00
Olof Johansson 1c5d795704 Qualcomm ARM64 Updates for v4.5
* Add fixed rate oscillators to dts
 * Fixup PMIC alias and properties
 * Change 8916-MTP compatible to be compliant with new scheme
 * Fix 8x16 UART pinctrl configuration
 * Add SMEM, RPM/SMD, and PM8916 support on MSM8916
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWckTvAAoJEFKiBbHx2RXVAH0QAIOVo46P/LtOQk8J+A8lUyM3
 eui/kuJG5H9iKf+r7maPCnWQbkdRfAevHFBixDfqq3WLK6muNAsWlAeTWasBG2AR
 mMqg/0pkVCJHHxJ9xeMqdo7RkAPDgmk/CiR+kD+SA19N+OegU+fExI7RyEd9LQ/B
 sQgbebZxB5VBQPIPlJorFP4UPG6T/sbV4FjsQ65GMGxZ321EV4OsApJHbEK9bzO7
 8fFAU6OX9wRcqkQ9K5aLTo312ZzE1TvgyPLfSfZmAVAmgrWSC99nqKzd3u1qeCOC
 jAzcv9yGMx4bfCMZcTuHp2OIGHbxFE9S0vBHfZrlzYxn8gniKBepGIr8w09TZgEq
 TfDl2pzzfOsLF2sh1UAA3Is/i88zgf/EXt4q+1qgSZAGG66BvNUHDZP3uXVItRcY
 GvugxN/96v5eszrG/0d+0IYQzYvFqXAbFfuYi5ax4+B4eah5YNPjSufJnWbHKogt
 Eg3DVnvlilMBDpqc8zMCR5AnLsFFxGZEtsd8WTofE3Gd8wtkqCMS95Hh5PkNxkyC
 bp1WXKEarMPjJ0X3YtAhQo7M5eFMYsZPxblhCr1CPmuVFzbwlyMkpqdaX23H93Ni
 it+geo3aRKFdtxIX11bqCO6S6f2en7ZGg1bsychxqk+oN309EAqJkQAyNGYpo2h3
 aWGLpsxVEC3/NHNh9aRg
 =mu4g
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64

Qualcomm ARM64 Updates for v4.5

* Add fixed rate oscillators to dts
* Fixup PMIC alias and properties
* Change 8916-MTP compatible to be compliant with new scheme
* Fix 8x16 UART pinctrl configuration
* Add SMEM, RPM/SMD, and PM8916 support on MSM8916

* tag 'qcom-arm64-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: dts: Add PM8916 support on MSM8916
  arm64: dts: qcom: Add RPM/SMD support on MSM8916
  arm64: dts: qcom: Add MSM8916 SMEM nodes
  arm64: dts: set the default i2c pin drive strength to 16mA
  arm64: dts: fix the i2c aliasing to match to schematics.
  arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators
  arm64: dts: qcom: Alias pm8916 on msm8916 devices
  arm64: dts: qcom: Make msm8916-mtp compatible string compliant
  arm64: dts: qcom: 8x16: UART1 and UART2 use DMA for RX and TX
  arm64: dts: qcom: 8x16: UART1 add CTS_N, RTS_N pin configurations

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 12:20:54 -08:00
Olof Johansson e9dd4939ac ARM: tegra: Default configuration updates for v4.5-rc1
This set of patches enable various drivers and features required by
 64-bit Tegra SoCs (Tegra132 and Tegra210).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWcqwyAAoJEN0jrNd/PrOh8k0QAJuMMfICxDzPRCWZ+I13o/Pk
 RHlu+ISgOEO5wiCoLsQha628OXu8pl5MiGtD1I84c5DStCF++2SH3aZz3XDaiXEq
 ew19o7lPbvhr2XfHeLMy9DxxYCBgFpKwgNFQanUE5pIs9GFUPuCKAbGkuvFOXKTO
 XV527jxg/TMXNqHkGGiChHjy6AzhVQ69JTsclERikQ9JOspihl3SgXwqagEvmlEy
 ngaxwihDtJ/H+Jw5JhjYEFyA6io998lXlBKriLsu3xbE0SnqH3BU6MBOMNIiqOBB
 SwZdyE7Q8hS18mQg9aqxVZNdYaLDhMyjNLliZ3TnYJFe/MsyVtn1gvebEBiWxwT1
 f0GtT8Z1iAaE3RFlNT2+Da77rCdPYP2VJSmTN655rVFqmHmWksTQeud7TUyZ6BvM
 c7L1XQlG6SWVEbP9XiAbjerj/nqw6YOM7Orde2WvkrwSO97pzT2ACtorgh0Ak5ng
 vL29O4eOduq0vJV6eMXX7LulO/7VIO39aNbG1x6V1fh1LK7QGzmBlXc0f/HbNl8o
 Z6U3Qe8SoeGxRUfavX3lrhj1sqB6kgaheMmAKHLZUJuTDXq6i73bss0Cnl6wkRPp
 8Lh6jqITWBCXj8/NqBPBQ1iei95x3qF7F1FxmD8rh02xBZDGPXHswxbO7lbH77Al
 u3LApmgvYfeuIaPyiu/y
 =e72e
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/config64

ARM: tegra: Default configuration updates for v4.5-rc1

This set of patches enable various drivers and features required by
64-bit Tegra SoCs (Tegra132 and Tegra210).

* tag 'tegra-for-4.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Enable printk timestamps
  arm64: defconfig: Enable squashfs support
  arm64: defconfig: Enable sdhci-tegra driver
  arm64: defconfig: Enable serial-tegra driver
  arm64: defconfig: Enable tegra-apbdma driver
  arm64: defconfig: Do not disable Tegra AHB driver
  arm64: defconfig: Enable Tegra210 support

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:56:20 -08:00
Olof Johansson 5b30ffc29d arm: Xilinx ZynqMP dt patches for v4.5
- Label GPIO controller as interrupt controller
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlZus2EACgkQykllyylKDCEfZwCdHZEn5t3e73R3pgctM8fiuInZ
 3lMAni1qDWL4G4PVGVoibUBNTgZ3hSNT
 =/W1/
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-4.5' of https://github.com/Xilinx/linux-xlnx into next/dt64

arm: Xilinx ZynqMP dt patches for v4.5

- Label GPIO controller as interrupt controller

* tag 'zynqmp-dt-for-4.5' of https://github.com/Xilinx/linux-xlnx:
  ARM64: zynqmp: DT: Add interrupt-controller property to GPIO

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:27:29 -08:00
Rob Herring dd90caaca2 arm64: dts: hikey: add label properties to UARTs
Add label properties to provide a way to identify UARTs based on their
board or connector name. This follows naming convention in 96boards CE
spec. Ports without external connections are not labelled.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:25:43 -08:00
Rob Herring 262c45d43f arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI
Add label properties to provide a way to identify UART, I2C and SPI
ports based on their connector names. This follows naming convention in
96boards CE spec. Ports without external connections are not labelled.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Andy Gross <agross@codeaurora.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:25:26 -08:00
Rob Herring 700dfee190 arm64: dts: apq8016-sbc: enable UART0 on LS connector
The LS UART0 is not used by anything else and should be enabled for
expansion boards.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Andy Gross <agross@codeaurora.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:25:15 -08:00
Jon Medhurst (Tixy) 28e10a8f3a arm64: dts: juno: Add idle-states to device tree
This patch adds idle-states bindings data collected through a set of
benchmarking experiments (latency and energy consumption) on Juno
boards. Latencies data represents the worst case scenarios as required
by the DT idle-states bindings.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:23:20 -08:00
J. German Rivera c7a5675f52 arm64: dts: Added syscon-reboot node for FSL's LS2080A SoC
Added sys-reboot node to the FSL's LS2080A SoC DT to leverage
the ARM-generic reboot mechanism for this SoC. This mechanism
is enabled through CONFIG_POWER_RESET_SYSCON.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 10:53:36 -08:00
Shaohui Xie ac0ca41634 arm64: dts: add LS1043a-RDB board support
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Wenbin Song <Wenbin.Song@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 10:53:33 -08:00
Mingkai Hu 6d453cd223 arm64: dts: add Freescale LS1043a SoC support
LS1043a is an SoC with 4 ARMv8 A53 cores and most other IP blocks are
similar to LS1021a which also complies to Freescale Chassis 2.1 spec.

Created LS1043a SoC DTSI file to be included by board level DTS files.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Wenbin Song <Wenbin.Song@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 10:53:29 -08:00
Will Deacon 5d7ee87708 arm64: perf: add support for Cortex-A72
Cortex-A72 has a PMUv3 implementation that is compatible with the PMU
implemented by Cortex-A57.

This patch hooks up the new compatible string so that the Cortex-A57
event mappings are used.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-22 14:45:35 +00:00
Will Deacon 57d7412395 arm64: perf: add format entry to describe event -> config mapping
It's all very well providing an events directory to userspace that
details our events in terms of "event=0xNN", but if we don't define how
to encode the "event" field in the perf attr.config, then it's a waste
of time.

This patch adds a single format entry to describe that the event field
occupies the bottom 10 bits of our config field on ARMv8 (PMUv3).

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-22 14:45:07 +00:00
Olof Johansson ea83c68ba8 Samsung DeviceTree ARM64 updates and improvements for 4.5:
1. Add S2MPS15 PMIC node to Espresso board. This gives proper
    control over regulators, provides 32KHz clocks and RTC driver.
 2. Enable HS200 mode operation on Espresso board for MMC0.
 3. Add reboot capability (generic syscon-reboot).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWXkVOAAoJEME3ZuaGi4PX1yIP+wR8B2CHEyMjivlP5hhMvyl+
 Brmk2Y0FnY1/vb9lK0myXgMXVS+lpEg5HEZDgvE1jHYour+RcpbNuMudS+ZT5AwF
 K1akZ1IhIKbAyvzp/T5ah9LlaiRib4sjPqJnDIeVq837TmTcCBrFFy5By8GCj3wH
 i/zpx3Am8NTlW6q5BskyB3mzQNydJa8OgSW7gMkzNWrONdKN0uJZD6UTrL9tgci8
 yYfzCmft0JOKsulFZo84KSUgI6TyOazaj5+VQEMqXFAC0IIJ4a1wRauCyaOu+0Qm
 EvWssLKssE3U6N5NQec0npIt3YL6JDKOZJ/erA776tcGDWSZeKlIYn4rxfcv6Ce+
 X6bNfZ5w1JIgUNnRxYJ9eCAAF3Hq/GrUdHjmYH+FPCwUnA1T+O+hfR7HrgxMn6aA
 a9xfptpxmpC0A0MZJbKTV3OnDnOTNbYFtv9CNo1sRT9qrNzuwjo891Mtskf1i44s
 kG/BT4gDAKyUb/skybLumtnSkzYdqWsLZACO9e7I7ylrf2j9maE2ZNID4g88GEd0
 9NzHHk+TB6FHI0/uvnMLvX3ufCHwNgHQoR2NxH0FRsw386qMIUZR0JBCesowVlEb
 B2Yxsx40L1cNHPRyHK+xCFj4IELsguuWVbx21XzE7G/37PENoffvMiHh+xB+O0Sd
 AhxbMaSiUF98ZnPTrVCt
 =MFYu
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64

Samsung DeviceTree ARM64 updates and improvements for 4.5:
1. Add S2MPS15 PMIC node to Espresso board. This gives proper
   control over regulators, provides 32KHz clocks and RTC driver.
2. Enable HS200 mode operation on Espresso board for MMC0.
3. Add reboot capability (generic syscon-reboot).

* tag 'samsung-dt64-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: Add reboot node for exynos7
  arm64: dts: Enable HS200 mode operation on exynos7-espresso
  arm64: dts: Add S2MPS15 PMIC node on exynos7-espresso

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-21 20:52:46 -08:00
Masahiro Yamada e1a0ebc8d8 arm64: dts: uniphier: add PH1-LD10 SoC/board support
This is the first ARMv8 SoC from Socionext Inc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-21 20:38:24 -08:00
Will Deacon c9cd0ed925 arm64: traps: address fallout from printk -> pr_* conversion
Commit ac7b406c1a ("arm64: Use pr_* instead of printk") was a fairly
mindless s/printk/pr_*/ change driven by a complaint from checkpatch.

As is usual with such changes, this has led to some odd behaviour on
arm64:

  * syslog now picks up the "pr_emerg" line from dump_backtrace, but not
    the actual trace, which leads to a bunch of "kernel:Call trace:"
    lines in the log

  * __{pte,pmd,pgd}_error print at KERN_CRIT, as opposed to KERN_ERR
    which is used by other architectures.

This patch restores the original printk behaviour for dump_backtrace
and downgrade the pgtable error macros to KERN_ERR.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:02 +00:00
AKASHI Takahiro 20380bb390 arm64: ftrace: fix a stack tracer's output under function graph tracer
Function graph tracer modifies a return address (LR) in a stack frame
to hook a function return. This will result in many useless entries
(return_to_handler) showing up in
 a) a stack tracer's output
 b) perf call graph (with perf record -g)
 c) dump_backtrace (at panic et al.)

For example, in case of a),
  $ echo function_graph > /sys/kernel/debug/tracing/current_tracer
  $ echo 1 > /proc/sys/kernel/stack_trace_enabled
  $ cat /sys/kernel/debug/tracing/stack_trace
        Depth    Size   Location    (54 entries)
        -----    ----   --------
  0)     4504      16   gic_raise_softirq+0x28/0x150
  1)     4488      80   smp_cross_call+0x38/0xb8
  2)     4408      48   return_to_handler+0x0/0x40
  3)     4360      32   return_to_handler+0x0/0x40
  ...

In case of b),
  $ echo function_graph > /sys/kernel/debug/tracing/current_tracer
  $ perf record -e mem:XXX:x -ag -- sleep 10
  $ perf report
                  ...
                  |          |          |--0.22%-- 0x550f8
                  |          |          |          0x10888
                  |          |          |          el0_svc_naked
                  |          |          |          sys_openat
                  |          |          |          return_to_handler
                  |          |          |          return_to_handler
                  ...

In case of c),
  $ echo function_graph > /sys/kernel/debug/tracing/current_tracer
  $ echo c > /proc/sysrq-trigger
  ...
  Call trace:
  [<ffffffc00044d3ac>] sysrq_handle_crash+0x24/0x30
  [<ffffffc000092250>] return_to_handler+0x0/0x40
  [<ffffffc000092250>] return_to_handler+0x0/0x40
  ...

This patch replaces such entries with real addresses preserved in
current->ret_stack[] at unwind_frame(). This way, we can cover all
the cases.

Reviewed-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
[will: fixed minor context changes conflicting with irq stack bits]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:02 +00:00
AKASHI Takahiro fe13f95b72 arm64: pass a task parameter to unwind_frame()
Function graph tracer modifies a return address (LR) in a stack frame
to hook a function's return. This will result in many useless entries
(return_to_handler) showing up in a call stack list.
We will fix this problem in a later patch ("arm64: ftrace: fix a stack
tracer's output under function graph tracer"). But since real return
addresses are saved in ret_stack[] array in struct task_struct,
unwind functions need to be notified of, in addition to a stack pointer
address, which task is being traced in order to find out real return
addresses.

This patch extends unwind functions' interfaces by adding an extra
argument of a pointer to task_struct.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:01 +00:00
AKASHI Takahiro 79fdee9b63 arm64: ftrace: modify a stack frame in a safe way
Function graph tracer modifies a return address (LR) in a stack frame by
calling ftrace_prepare_return() in a traced function's function prologue.
The current code does this modification before preserving an original
address at ftrace_push_return_trace() and there is always a small window
of inconsistency when an interrupt occurs.

This doesn't matter, as far as an interrupt stack is introduced, because
stack tracer won't be invoked in an interrupt context. But it would be
better to proactively minimize such a window by moving the LR modification
after ftrace_push_return_trace().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:01 +00:00
James Morse d224a69e3d arm64: remove irq_count and do_softirq_own_stack()
sysrq_handle_reboot() re-enables interrupts while on the irq stack. The
irq_stack implementation wrongly assumed this would only ever happen
via the softirq path, allowing it to update irq_count late, in
do_softirq_own_stack().

This means if an irq occurs in sysrq_handle_reboot(), during
emergency_restart() the stack will be corrupted, as irq_count wasn't
updated.

Lose the optimisation, and instead of moving the adding/subtracting of
irq_count into irq_stack_entry/irq_stack_exit, remove it, and compare
sp_el0 (struct thread_info) with sp & ~(THREAD_SIZE - 1). This tells us
if we are on a task stack, if so, we can safely switch to the irq stack.
Finally, remove do_softirq_own_stack(), we don't need it anymore.

Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
[will: use get_thread_info macro]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:01 +00:00
David Woods 66b3923a1a arm64: hugetlb: add support for PTE contiguous bit
The arm64 MMU supports a Contiguous bit which is a hint that the TTE
is one of a set of contiguous entries which can be cached in a single
TLB entry.  Supporting this bit adds new intermediate huge page sizes.

The set of huge page sizes available depends on the base page size.
Without using contiguous pages the huge page sizes are as follows.

 4KB:   2MB  1GB
64KB: 512MB

With a 4KB granule, the contiguous bit groups together sets of 16 pages
and with a 64KB granule it groups sets of 32 pages.  This enables two new
huge page sizes in each case, so that the full set of available sizes
is as follows.

 4KB:  64KB   2MB  32MB  1GB
64KB:   2MB 512MB  16GB

If a 16KB granule is used then the contiguous bit groups 128 pages
at the PTE level and 32 pages at the PMD level.

If the base page size is set to 64KB then 2MB pages are enabled by
default.  It is possible in the future to make 2MB the default huge
page size for both 4KB and 64KB granules.

Reviewed-by: Chris Metcalf <cmetcalf@ezchip.com>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: David Woods <dwoods@ezchip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 17:26:00 +00:00
Lorenzo Pieralisi 60792ad349 arm64: kernel: enforce pmuserenr_el0 initialization and restore
The pmuserenr_el0 register value is architecturally UNKNOWN on reset.
Current kernel code resets that register value iff the core pmu device is
correctly probed in the kernel. On platforms with missing DT pmu nodes (or
disabled perf events in the kernel), the pmu is not probed, therefore the
pmuserenr_el0 register is not reset in the kernel, which means that its
value retains the reset value that is architecturally UNKNOWN (system
may run with eg pmuserenr_el0 == 0x1, which means that PMU counters access
is available at EL0, which must be disallowed).

This patch adds code that resets pmuserenr_el0 on cold boot and restores
it on core resume from shutdown, so that the pmuserenr_el0 setup is
always enforced in the kernel.

Cc: <stable@vger.kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-21 14:43:04 +00:00
Stefano Stabellini 72d39c691b xen/arm: introduce HYPERVISOR_platform_op on arm and arm64
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2015-12-21 14:40:56 +00:00
Stefano Stabellini dfd57bc3a5 arm64: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops
Introduce CONFIG_PARAVIRT and PARAVIRT_TIME_ACCOUNTING on ARM64.
Necessary duplication of paravirt.h and paravirt.c with ARM.

The only paravirt interface supported is pv_time_ops.steal_clock, so no
runtime pvops patching needed.

This allows us to make use of steal_account_process_tick for stolen
ticks accounting.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-21 14:40:54 +00:00
Daniel Borkmann 8b614aebec bpf: move clearing of A/X into classic to eBPF migration prologue
Back in the days where eBPF (or back then "internal BPF" ;->) was not
exposed to user space, and only the classic BPF programs internally
translated into eBPF programs, we missed the fact that for classic BPF
A and X needed to be cleared. It was fixed back then via 83d5b7ef99
("net: filter: initialize A and X registers"), and thus classic BPF
specifics were added to the eBPF interpreter core to work around it.

This added some confusion for JIT developers later on that take the
eBPF interpreter code as an example for deriving their JIT. F.e. in
f75298f5c3 ("s390/bpf: clear correct BPF accumulator register"), at
least X could leak stack memory. Furthermore, since this is only needed
for classic BPF translations and not for eBPF (verifier takes care
that read access to regs cannot be done uninitialized), more complexity
is added to JITs as they need to determine whether they deal with
migrations or native eBPF where they can just omit clearing A/X in
their prologue and thus reduce image size a bit, see f.e. cde66c2d88
("s390/bpf: Only clear A and X for converted BPF programs"). In other
cases (x86, arm64), A and X is being cleared in the prologue also for
eBPF case, which is unnecessary.

Lets move this into the BPF migration in bpf_convert_filter() where it
actually belongs as long as the number of eBPF JITs are still few. It
can thus be done generically; allowing us to remove the quirk from
__bpf_prog_run() and to slightly reduce JIT image size in case of eBPF,
while reducing code duplication on this matter in current(/future) eBPF
JITs.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Tested-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Cc: Yang Shi <yang.shi@linaro.org>
Acked-by: Yang Shi <yang.shi@linaro.org>
Acked-by: Zi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 16:04:51 -05:00
Vladimir Murzin 20475f784d arm64: KVM: Add support for 16-bit VMID
The ARMv8.1 architecture extension allows to choose between 8-bit and
16-bit of VMID, so use this capability for KVM.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-18 10:15:12 +00:00
Vladimir Murzin 9d4dc68834 arm/arm64: KVM: Remove unreferenced S2_PGD_ORDER
Since commit a987370 ("arm64: KVM: Fix stage-2 PGD allocation to have
per-page refcounting") there is no reference to S2_PGD_ORDER, so kill it
for the good.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-18 10:15:11 +00:00
Marc Zyngier 281243cbe0 arm64: KVM: debug: Remove spurious inline attributes
The debug trapping code is pretty heavy on the "inline" attribute,
but most functions are actually referenced in the sysreg tables,
making the inlining imposible.

Removing the useless inline qualifier seems the right thing to do,
having verified that the output code is similar.

Cc: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-18 10:15:11 +00:00
Yingjoe Chen c050b45d87 arm64: mediatek: enable MTK_TIMER
Enable MTK_TIMER for MediaTek plaform, which will be used as
tick broadcast device and schedule clock.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2015-12-18 09:41:18 +01:00
Ulrich Hecht 2eb2b50661 arm64: renesas: r8a7795: fix SATA clock assignment
SATA clock is 815, not 915.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:29 +09:00
Kouei Abe 52ee9fb34a arm64: dts: salvator-x: Enable SATA controller
This enables SATA device in r8a7795-salvator-x.dts.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:29 +09:00
Kouei Abe 4c13472b8c arm64: dts: r8a7795: Add SATA controller node
This adds SATA device node to r8a7795.dtsi.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
[uli: adjusted for new MSTP clock scheme]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:28 +09:00
Wolfram Sang 9036a73087 arm64: renesas: r8a7795: add internal delay for i2c IPs
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:28 +09:00
Yoshifumi Hosoya a6b6b47845 arm64: dts: r8a7795: Add pmu device nodes
Enabling the performance monitor unit on r8a7795.

Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:27 +09:00
Gaku Inami 0ed1a79ed0 arm64: dts: r8a7795: Add Cortex-A57 CPU cores
Add Cortex-A57 CPU cores to r8a7795 SoC for a total of 4 x Cortex-A57.

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Sigend-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:27 +09:00
Gaku Inami 12e5155783 arm64: dts: r8a7795: Add PSCI node
Add PSCI node for r8a7795 SoC, and cpu node enable-method property is
set to "psci".

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:07:27 +09:00
Kuninori Morimoto d3643e1669 arm64: defconfig: add CS2000 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-18 10:06:57 +09:00
Ashok Kumar 0a28714c53 arm64: Use PoU cache instr for I/D coherency
In systems with three levels of cache(PoU at L1 and PoC at L3),
PoC cache flush instructions flushes L2 and L3 caches which could affect
performance.
For cache flushes for I and D coherency, PoU should suffice.
So changing all I and D coherency related cache flushes to PoU.

Introduced a new __clean_dcache_area_pou API for dcache flush till PoU
and provided a common macro for __flush_dcache_area and
__clean_dcache_area_pou.

Also, now in __sync_icache_dcache, icache invalidation for non-aliasing
VIPT icache is done only for that particular page instead of the earlier
__flush_icache_all.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ashok Kumar <ashoks@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-17 11:07:13 +00:00
Ashok Kumar e6b1185f77 arm64: Defer dcache flush in __cpu_copy_user_page
Defer dcache flushing to __sync_icache_dcache by calling
flush_dcache_page which clears PG_dcache_clean flag.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ashok Kumar <ashoks@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-17 11:07:13 +00:00
Andy Gross 9e1dfb858d arm64: dts: Add PM8916 support on MSM8916
This patch adds the PM8916 regulator nodes found on MSM8916 platforms.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
2015-12-16 23:01:44 -06:00
Andy Gross 8fd55d41ca arm64: dts: qcom: Add RPM/SMD support on MSM8916
Add support for the SMD and RPM devices found on MSM8916 platforms.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
2015-12-16 23:01:44 -06:00
Andy Gross a0ece65777 arm64: dts: qcom: Add MSM8916 SMEM nodes
This patch adds the nodes necessary to support the SMEM driver on MSM8916
platforms.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
2015-12-16 23:01:43 -06:00
Srinivas Kandagatla c240f29e75 arm64: dts: set the default i2c pin drive strength to 16mA
2mA drive strength is not enough when we connect multiple i2c devices
on the bus with different pull up resistors.

This issue was detected when multiple i2c devices connected on the other side
of level shifters on Linaro sensor board. Maxing up to 16mA made i2c much stable.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2015-12-16 23:01:43 -06:00
Srinivas Kandagatla b98e6c7658 arm64: dts: fix the i2c aliasing to match to schematics.
This patch fixes the i2c bus number aliasing so that it matches with the
schematics bus naming.

Without this patch the user might would get bus numbers depending on
the order the devices are probed.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2015-12-16 23:01:42 -06:00
Georgi Djakov f4fb6aeafa arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators
Currently the rates of the xo and sleep clocks are hard-coded in the
GCC driver, but this is a board layout description that actually should
be in the DT. Moving them into DT also allows us to insert the RPM
controlled clocks between the DT and GCC clocks.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
2015-12-16 23:01:42 -06:00
Stephen Boyd 2bce84c1a0 arm64: dts: qcom: Alias pm8916 on msm8916 devices
Add an alias for pm8916 on msm8916 based SoCs so that the newly
updated dtbTool can find the pmic compatible string and add the
pmic-id element to the QCDT header.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
2015-12-16 23:01:42 -06:00
Stephen Boyd 503b01ec9b arm64: dts: qcom: Make msm8916-mtp compatible string compliant
This compatible string isn't compliant with the format for
subtypes. Replace it with a compliant compatible type.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
2015-12-16 23:01:41 -06:00
James Morse 971c67ce37 arm64: reduce stack use in irq_handler
The code for switching to irq_stack stores three pieces of information on
the stack, fp+lr, as a fake stack frame (that lets us walk back onto the
interrupted tasks stack frame), and the address of the struct pt_regs that
contains the register values from kernel entry. (which dump_backtrace()
will print in any stack trace).

To reduce this, we store fp, and the pointer to the struct pt_regs.
unwind_frame() can recognise this as the irq_stack dummy frame, (as it only
appears at the top of the irq_stack), and use the struct pt_regs values
to find the missing interrupted link-register.

Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-15 17:09:08 +00:00
Will Deacon 129b985cc3 Merge branch 'aarch64/efi' into aarch64/for-next/core
Merge in EFI memblock changes from Ard, which form the preparatory work
for UEFI support on 32-bit ARM.
2015-12-15 10:59:03 +00:00
Kouei Abe 1fd6b873c2 arm64: defconfig: Add Renesas R-Car SATA driver for R-Car Gen3 SoCs
This adds Renesas sata_rcar driver to defconfig.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-15 13:21:23 +09:00
Marc Zyngier 3ffa75cd18 arm64: KVM: Remove weak attributes
As we've now switched to the new world switch implementation,
remove the weak attributes, as nobody is supposed to override
it anymore.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:44 +00:00
Marc Zyngier 23a13465c8 arm64: KVM: Cleanup asm-offset.c
As we've now rewritten most of our code-base in C, most of the
KVM-specific code in asm-offset.c is useless. Delete-time again!

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:43 +00:00
Marc Zyngier 9d8415d6c1 arm64: KVM: Turn system register numbers to an enum
Having the system register numbers as #defines has been a pain
since day one, as the ordering is pretty fragile, and moving
things around leads to renumbering and epic conflict resolutions.

Now that we're mostly acessing the sysreg file in C, an enum is
a much better type to use, and we can clean things up a bit.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:43 +00:00
Marc Zyngier 1ea66d27e7 arm64: KVM: Move away from the assembly version of the world switch
This is it. We remove all of the code that has now been rewritten.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:43 +00:00
Marc Zyngier 044ac37d12 arm64: KVM: Add compatibility aliases
So far, we've implemented the new world switch with a completely
different namespace, so that we could have both implementation
compiled in.

Let's take things one step further by adding weak aliases that
have the same names as the original implementation. The weak
attributes allows the new implementation to be overriden by the
old one, and everything still work.

At a later point, we'll be able to simply drop the old code, and
everything will hopefully keep working, thanks to the aliases we
have just added. This also saves us repainting all the callers.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:42 +00:00
Marc Zyngier 53fd5b6487 arm64: KVM: Add panic handling
Add the panic handler, together with the small bits of assembly
code to call the kernel's panic implementation.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:42 +00:00
Marc Zyngier 2b28162cf6 arm64: KVM: HYP mode entry points
Add the entry points for HYP mode (both for hypercalls and
exception handling).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:42 +00:00
Marc Zyngier 5eec0a91e3 arm64: KVM: Implement TLB handling
Implement the TLB handling as a direct translation of the assembly
code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:41 +00:00
Marc Zyngier c13d1683df arm64: KVM: Implement fpsimd save/restore
Implement the fpsimd save restore, keeping the lazy part in
assembler (as returning to C would be overkill).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:41 +00:00
Marc Zyngier be901e9b15 arm64: KVM: Implement the core world switch
Implement the core of the world switch in C. Not everything is there
yet, and there is nothing to re-enter the world switch either.

But this already outlines the code structure well enough.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:41 +00:00
Marc Zyngier c1bf6e18e9 arm64: KVM: Add patchable function selector
KVM so far relies on code patching, and is likely to use it more
in the future. The main issue is that our alternative system works
at the instruction level, while we'd like to have alternatives at
the function level.

In order to cope with this, add the "hyp_alternate_select" macro that
outputs a brief sequence of code that in turn can be patched, allowing
an alternative function to be selected.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:40 +00:00
Marc Zyngier b97b66c14b arm64: KVM: Implement guest entry
Contrary to the previous patch, the guest entry is fairly different
from its assembly counterpart, mostly because it is only concerned
with saving/restoring the GP registers, and nothing else.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:40 +00:00
Marc Zyngier 8eb992674c arm64: KVM: Implement debug save/restore
Implement the debug save restore as a direct translation of
the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:40 +00:00
Marc Zyngier c209ec85a2 arm64: KVM: Implement 32bit system register save/restore
Implement the 32bit system register save/restore as a direct
translation of the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:40 +00:00
Marc Zyngier 6d6ec20fcf arm64: KVM: Implement system register save/restore
Implement the system register save/restore as a direct translation of
the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:39 +00:00
Marc Zyngier 1431af367e arm64: KVM: Implement timer save/restore
Implement the timer save restore as a direct translation of
the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:39 +00:00
Marc Zyngier f68d2b1b73 arm64: KVM: Implement vgic-v3 save/restore
Implement the vgic-v3 save restore as a direct translation of
the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:39 +00:00
Marc Zyngier 06282fd2c2 arm64: KVM: Implement vgic-v2 save/restore
Implement the vgic-v2 save restore (mostly) as a direct translation
of the assembly code version.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:38 +00:00
Marc Zyngier c76a0a6695 arm64: KVM: Add a HYP-specific header file
In order to expose the various EL2 services that are private to
the hypervisor, add a new hyp.h file.

So far, it only contains mundane things such as section annotation
and VA manipulation.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:38 +00:00
Mark Rutland 3600c2fdc0 arm64: Add macros to read/write system registers
Rather than crafting custom macros for reading/writing each system
register provide generics accessors, read_sysreg and write_sysreg, for
this purpose.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-14 11:30:38 +00:00
Amit Tomar b19e6892a9 KVM: arm/arm64: Count guest exit due to various reasons
It would add guest exit statistics to debugfs, this can be helpful
while measuring KVM performance.

  [ Renamed some of the field names - Christoffer ]

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-12-14 11:30:00 +00:00
Soren Brinkmann bdd5739008 ARM64: zynqmp: DT: Add interrupt-controller property to GPIO
GPIO can be used as interrupt-controller. Add the missing properties to
the GPIO node.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-12-14 09:48:20 +01:00
Greg Kroah-Hartman 252ca494ac Merge 4.4-rc5 into usb-next as we want those fixes here for testing
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-13 19:20:27 -08:00
Linus Torvalds dec9cbf97d Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixlets from Thomas Gleixner:
 "Two trivial fixes which add missing header fileas and forward
  declarations so the code will compile even when the magic include
  chains are different"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3: Add missing include for barrier.h
  irqchip/gic-v3: Add missing struct device_node declaration
2015-12-13 12:41:10 -08:00
Linus Torvalds 097b285d32 ARM: SoC fixes for 4.4-rc
Here are a bunch of small bug fixes for various ARM platforms, nothing
 really sticks out this week, most of either fixes bugs in code that was
 just added in 4.4, or that has been broken for many years without anyone
 noticing.
 
 at91/sama5d2
 - fix sama5de hardware setup of sd/mmc interface
 - proper selection of pinctrl drivers. PIO4 is necessary for sama5d2
 
 berlin
 - fix incorrect clock input for SDIO
 
 exynos
 - Fix potential NULL pointer dereference in Exynos PMU driver.
 
 imx
 - Fix vf610 SAI clock configuration bug which is discovered by
   the newly added master mode support in SAI audio driver.
 - Fix buggy L2 cache latency values in vf610 device trees, which may
   cause system hang when cpu runs at a higher frequency.
 
 ixp4xx
 - fix prototypes for readl/writel functions
 
 ls2080a
 - use little-endian register access for GPIO and SDHCI
 
 omap
 - Fix clock source for ARM TWD and global timers on am437x
 - Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of
   when MACH_OMAP3_PANDORA is selected
 - Fix SPI DMA handles for dm816x as only some were mapped
 - Fix up mbox cells for dm816x to make mailbox usable
 
 pxa
 - use PWM lookup table for all ezx machines
 
 s3c24xx
 - Remove incorrect __init annotation from s3c24xx cpufreq driver structures.
 
 versatile
 - fix PCI IRQ mapping on Versatile PB
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAVmyQMWCrR//JCVInAQIIDA//VyJ2UoTJ2JC3thVP56P/ZXh7Pz8VDqnq
 cgoFUio27IeHPSgs+W9qWliOrb+LaXkuOl8CKgepm+Bv7j8Y+uryP4X2rKQ3ZRmy
 2f5+uUqAIZ0Co2aJdtG395lY9TKNHl6cPEskcbgL7cjdgj7QBqfIyj22QZbj6yRp
 kp8pj+cKXBFRLa5PvePon2w03MA/bLaP30VzKCSL1zchcs52rxekU694V3ISNa63
 eshyyKf354Sl9hP4Y8xCdl/mboymKzQxEGDQS/Fcb8h/OQ3djoh+7EKdVbdyZ2A7
 phgfazd2aE7wQ5GVIkMNV/MzGHj9xpiD4Z1Hi/2E8WdzuXJTRicS4bJihRAIualt
 H1FOEdgqT+xS4JUYxAvl46fwwqcFJfixtGgKka27sJTtk+Y1kHjASWvueZKlHMIK
 ln9CF7PoecF0InQaY2N8Vy05Qcp5MuoB/0v+XlftI0sAtIXNeo142H2NQZCsO+1U
 bJDyb5E4z06jzqk7IOK4/AKyEAV9KZPDws+ZxcNH/faPT10epK7MeZdetbD7b8q3
 pkY7s5iXV8uBox7FtHoamrlMFgAzN9Qh0E4bcw70aKaJZZ02ozTXCvJIKjoIPMne
 FsvidQToznqbA2RSXpxRQrcXrMxvURaPCRBe7CxrCoynmhIxd4UHND2HJ4OG645z
 4SAGOzOlZKM=
 =fgEd
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Here are a bunch of small bug fixes for various ARM platforms, nothing
  really sticks out this week, most of either fixes bugs in code that
  was just added in 4.4, or that has been broken for many years without
  anyone noticing.

  at91/sama5d2:
   - fix sama5de hardware setup of sd/mmc interface
   - proper selection of pinctrl drivers.  PIO4 is necessary for sama5d2

  berlin:
   - fix incorrect clock input for SDIO

  exynos:
   - Fix potential NULL pointer dereference in Exynos PMU driver.

  imx:
   - Fix vf610 SAI clock configuration bug which is discovered by the
     newly added master mode support in SAI audio driver.
   - Fix buggy L2 cache latency values in vf610 device trees, which may
     cause system hang when cpu runs at a higher frequency.

  ixp4xx:
   - fix prototypes for readl/writel functions

  ls2080a:
   - use little-endian register access for GPIO and SDHCI

  omap:
   - Fix clock source for ARM TWD and global timers on am437x
   - Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of when
     MACH_OMAP3_PANDORA is selected
   - Fix SPI DMA handles for dm816x as only some were mapped
   - Fix up mbox cells for dm816x to make mailbox usable

  pxa:
   - use PWM lookup table for all ezx machines

  s3c24xx:
   - Remove incorrect __init annotation from s3c24xx cpufreq driver
     structures.

  versatile:
   - fix PCI IRQ mapping on Versatile PB"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ls2080a/dts: Add little endian property for GPIO IP block
  dt-bindings: define little-endian property for QorIQ GPIO
  ARM64: dts: ls2080a: fix eSDHC endianness
  ARM: dts: vf610: use reset values for L2 cache latencies
  ARM: pxa: use PWM lookup table for all machines
  ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1
  ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock
  ARM: dts: am4372: fix clock source for arm twd and global timers
  ARM: at91: fix pinctrl driver selection
  ARM: at91/dt: add always-on to 1.8V regulator
  ARM: dts: vf610: fix clock definition for SAI2
  ARM: imx: clk-vf610: fix SAI clock tree
  ARM: ixp4xx: fix read{b,w,l} return types
  irqchip/versatile-fpga: Fix PCI IRQ mapping on Versatile PB
  ARM: OMAP2+: enable REGULATOR_FIXED_VOLTAGE
  ARM: dts: add dm816x missing spi DT dma handles
  ARM: dts: add dm816x missing #mbox-cells
  cpufreq: s3c24xx: Do not mark s3c2410_plls_add as __init
  ARM: EXYNOS: Fix potential NULL pointer access in exynos_sys_powerdown_conf
2015-12-12 16:43:44 -08:00
Caesar Wang b8084e5b34 arm64: dts: rockchip: Add the broadcast-timer for RK3368 SoC
There is a need of a broadcast timer in this case to ensure proper
wakeup when the cpus are in sleep mode and a timer expires.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2015-12-12 23:20:38 +01:00
Arnd Bergmann bd8f27ba82 Reset controller changes for v4.5 v2
- oftree support for getting reset devices by index
 - fixed return value consistency of of_reset_control_get
 - added support for STi co-processor resets
 - added STi status callback
 - added HiSilicon Hi6220 reset driver
 - added ath79 system restart support
 - various fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWX/etAAoJEFDCiBxwnmDrw40QAJJ7oUucjj6zqH4G6lS0EQ+e
 xmEutp7u7F94DwIuvB9wTXGqdZuLX5Fho/LArMZuBoQVZ/JTtbQ9e/uJLdNQRiLo
 sDXlD+MaS2TJxTpwC8CQZfrqK/GRLyhMW8AwfVQJYkOuzvaYLswZd45/kytFXKpq
 SFU91Yy4Yi4uguwT8TCDZmzM4DyLiZ7IFBBGrrj/mwjmc+G4Zv+EHAojwgeeuTXV
 FcGUFMWoKhyWRQTlWjj76UeVCViqho/YOzGLHY4nG4ZdjgAi+q+nX/HtSL5/qb4z
 OWkQ5sFV3tsktjr3GTuTN0ffewlOAGdEtHcpMcX/QL3+TR3VFBiV6H6CxRYAyeP2
 B6r7Nx8Itf8x1cigkEsM+TxrUccAcN47IulK/vgZReuPa90K2oFuYzVSjQE/2oe5
 +sUGFlFdQiLnTW0PCAxMUqY5p1QvNE6/u1p/Qmu8X8pg3GFKX3AnyZTSgMhDOZGQ
 3BCftjjICiifkmplvLlnRtmpfqdEgdTEIX807fqep6ZCFizwD6qD8FvbsNufYvgi
 M+nwYjAXvRNeUM5Ck+/EfBEKwjgY+awPwz4DKD5VQvH2B3Efafydzutxn5e48VuI
 bMkzbmLoC62JCLTzG89+UQgZDtMWLorzGbnHvroRlkI/LrClKgtFbkdHmRgi1Euz
 wQ2cx1V1wC7MsmMIjoV0
 =TXCk
 -----END PGP SIGNATURE-----

Merge tag 'reset-for-4.5-2' of git://git.pengutronix.de/git/pza/linux into next/drivers

Merge "Reset controller changes for v4.5 v2" from Philipp Zabel:

- oftree support for getting reset devices by index
- fixed return value consistency of of_reset_control_get
- added support for STi co-processor resets
- added STi status callback
- added HiSilicon Hi6220 reset driver
- added ath79 system restart support
- various fixes

* tag 'reset-for-4.5-2' of git://git.pengutronix.de/git/pza/linux:
  reset: ath79: Add system restart support
  arm64: dts: Add reset dts config for Hisilicon Hi6220 SoC
  reset: hi6220: Reset driver for hisilicon hi6220 SoC
  reset: hisilicon: document hisi-hi6220 reset controllers bindings
  reset: remove unused device pointer from struct reset_control
2015-12-12 01:22:28 +01:00
Arnd Bergmann 2bf53f4e48 Marvell Berlin64 SoC changes (round 1):
- add PINCTRL dependency
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWZAq6AAoJEN2kpao7fSL4iLIP/AmioldZX1ICb7XHrn/2OgeZ
 tnpN5gRS3s4HW1mtJ7pyKQ+uvNPjDSqKFm2nqkMw9a6yCq45qkmY0nTikhot5+9+
 sBKKBlpnBJMDtA6Q/sXfP77svvIiWh7bSwLTfJzLMW7PODKomzigPk1XaOozisAZ
 taEKvcXojEMa1GuHMeOCSdS0e8HABP+ZicreizpG5ExvZMEjumH0c3je3bzYq9U8
 n0OHI+kV11yp+YcC6lBku5GkzXRJGb+Veu+z2Z1iDPxvaj7iINj8iXslQuW26sdT
 5T7deJJHYwKluhT3baPU3eQYDkDwHlKN+yExarCuCCzxllLruzD6Qf3qyHHj5gJc
 yqz7PriKbnKBu8BvTgqAYgVVeM2w+GwlyK02fKu+8pUQFbgE9khJibsUq3lgaNoy
 ffFg0J/znjSwGA+lD+smsKOdhGTbiwjm6joZFzqge75KZxlLQK1zc/VQPTeP28Q1
 jZkYCd6uHcuXpnjFB9ao+KPSW+N/gyf+OQPmA7Hlw3Frv0Qaz/Xth0Mr5GdKxDbX
 /yld5IGyFS1cmFdVqm4HB36v5Oe6UxmLnIyQV3kG0I6gMPgmfKke82fZlcink3rl
 FPD+OajKWRKK2g9pXTTk72UW9mmHHa77nr4i5WNC8aw18A9l4DOmOiJywcTH3S3R
 TFSiSm+p/D62DmwugIaL
 =SdNq
 -----END PGP SIGNATURE-----

Merge tag 'berlin64-soc-for-4.5-1' of git://git.infradead.org/users/hesselba/linux-berlin into next/config64

Merge "Marvell Berlin64 SoC changes (round 1)" from Sebastian Hesselbarth:

- add PINCTRL dependency

* tag 'berlin64-soc-for-4.5-1' of git://git.infradead.org/users/hesselba/linux-berlin:
  arm64: berlin: add the pinctrl dependency for Marvell Berlin SoCs
2015-12-12 01:20:45 +01:00
Masahiro Yamada 208ef7f18d arm64: defconfig: enable UniPhier SoCs support
Enable ARCH_UNIPHIER with its on-chip UART driver.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-12 01:19:30 +01:00
Masahiro Yamada 56aaafb6b7 arm64: add Kconfig entry for Socionext UniPhier SoC family
Add the ARM64 Linux support for Socionext UniPhier SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-12 01:19:24 +01:00
Arnd Bergmann ba7ce91e1a Second Round of Renesas ARM64 Based SoC Defconfig Updates for v4.5
* Enable Renesas Sound, DMAC, I2C, EthernetAVB and GPIO for
   R-Car Gen3 r8a7795/salvator-x
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWV7XUAAoJENfPZGlqN0++rbkQALSS4KTnhiEzYed4Rxjs/XyQ
 JzLd1ikrtPyN+tr1IMbs4IRSpVtxJU2p1NQ+DWEjeFDePMRYV4M1kWxnqR0OBjyk
 RHm6j44jln2DtOB4aEiqfyJZd4gI3fl6wHoh2vuOuxZmQ29DtukrqF+1noltEMh4
 HABT2Vbf3j2sr66BIdwy+EU/JpFv0sHnvN0wDHo4Fr7kAmtUvsXzTbb1Dg+aDOQS
 D7lBO+P86n/6J5/qWGEpY5PeHdmFS2lc9teuzVdW7QkmPY0quM8CG2w+RqVhzaJQ
 jYmDblHk7qfy348H250P6LfqkK1tlIXKtjHRc1UZsIQ15u2Ht2KXZCaB9MPQ3i+r
 q4WT8p/H/T0i7HFH+Pq9+AnPj9wUh7SjnpPJmWWNYNO5qmrAUR8NUmGjNkaY7RZJ
 Yf0ik7IwuWei7wEU9XbIW3NecRcd67msPmSq+UJ/BvOCkTDlMK1HEnYsOBFf2uti
 ggtK5Rr6CmgbldVIjkJSgwu4X6FhamaHg5lZSaPGd0mZ1PPBOGgLsdQIgkJ2H8V7
 LkVMLxLsEiZL10fDOhuNCRQdTW/1SDfEmNrRZ0jffB6sGAe4AV88FnqEOo3x00xG
 l6mWw2sku6K/Za+RLzdngMWtixNrgYQYxsqw9DoXH5B9bkxeWMZTdVqvLJEouzS9
 M+FbyqAXv8KQaOoJX18u
 =1ywl
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/config64

Merge "Second Round of Renesas ARM64 Based SoC Defconfig Updates for v4.5" from Simon Horman:

* Enable Renesas Sound, DMAC, I2C, EthernetAVB and GPIO for
  R-Car Gen3 r8a7795/salvator-x

* tag 'renesas-arm64-defconfig2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: add Renesas sound and AK4613 support
  arm64: defconfig: add Renesas R-Car DMAC driver support
  arm64: defconfig: Enable Renesas R-Car I2C Controller
  arm64: defconfig: enable EthernetAVB
  arm64: defconfig: Enable GPIO of Renesas R-Car Gen3 SoC
2015-12-12 01:15:31 +01:00
Liu Gang 6534778371 ls2080a/dts: Add little endian property for GPIO IP block
The GPIO block for ls2080a platform has little endian registers,
the GPIO driver needs this property to read/write registers by
right interface.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-12-11 16:13:03 -08:00
yangbo lu 2dd2e4d1ea ARM64: dts: ls2080a: fix eSDHC endianness
Add the "little-endian" property to fix the issue that eSDHC
is not working and dumping out "mmc0: Controller never released
inhibit bit(s)." error messages constantly.

Fixes: 5461597f6c ("dts/ls2080a: Update DTSI to add support of various peripherals")
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-12-11 16:13:02 -08:00
Arnd Bergmann 37c0fe6568 Renesas ARM64 Based SoC Defconfig Updates for v4.5
* Enable Renesas r8a7795 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTm2hAAoJENfPZGlqN0++I7wQAJZu1mf6Z6c4SLDUMeYg0nDi
 7YOJgXMYazlUgdFjGS0lU/7MnmMeXnlpn3JISPh50z/H8qoQviDMKm51ai1W+iuq
 Aa+WjO0c9T6/sVRwu7YDm8cbM60bgiGALBGL3tEBJS61LAHrsa7nqPMVuwwI6T0j
 gIOxVZke9OYbS8WttUYruZ07xqB6iRaSkvUociE2lxiy11fDve8QWyXIZQ0W6urB
 vmCiBxdoaNM6tltEystTQS216QsO5fQxFijQ/ICheBzCSF1TOrh0Yrz0EVAns0oZ
 PcjR1kqYN4aKhYWzScWwTqM1DCdkayHgIs/LxNTpA7A4SlhBUialtQOLkGMUn7sG
 E6ZsdVowKO3Ks0P5dqLuoAMeOh0CmK5WTohCuYQjO8heY84dJekJvEPid4Qxstf+
 YGXceiVDWRwE1g8hMOVF/GQfrY1BgvC/AI1rN1aD3efA4ncUOE+190Kg6JYtp6ye
 888spiJoOn3GNn0IdaNYj5XPfoMeSv/lSSr+7gvRiCnQcK70bFeZymp1HyPB8hcD
 izmu3oRpegrmtq2xY8JWlODOezid8bu/mEld9gS9tF2zSAgMI2d7k0WUtMI/Owoy
 L9VomGekRHLm7/Fh489Y/cF4NkZuiYb0Muehqen6DAB/jM9BUAwE2D2JreIGvL5s
 hGLLkM7yQVKgJNv91lxX
 =W5Y5
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/config64

Merge "Renesas ARM64 Based SoC Defconfig Updates for v4.5" from Simon Horman:

* Enable Renesas r8a7795 SoC

* tag 'renesas-arm64-defconfig-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: renesas: Enable Renesas r8a7795 SoC
2015-12-12 01:12:56 +01:00
Arnd Bergmann 8b9a3fde5a Merge tag 'arm-soc/for-4.5/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64
Merge "Broadcom devicetree-arm64 changes for v4.5" from Florian Fainelli:

This pull request contains Broadcom ARM64-based Device Tree changes:

- Anup Patel adds L2 cache, SMMU, syscon-based reboot, PMU v3, iProc RNG200 (HWRNG) and
  NAND flash controller support to the Northstar 2 SoCs

- Ray Jui adds the I2C Device Tree nodes to the Norsthar 2 SoCs

- Jon Mason enables the clock providers on the Norsthar 2 SoCs

* tag 'arm-soc/for-4.5/devicetree-arm64' of http://github.com/Broadcom/stblinux:
  ARM64: dts: enable clock support for Broadcom NS2
  arm64: dts: Add BRCM IPROC NAND DT node for NS2
  arm64: dts: Add I2C nodes for NS2
  arm64: dts: Add IPROC RNG200 DT node for NS2
  arm64: dts: Add ARM PMUv3 DT node in NS2 DT
  arm64: dts: Add syscon based reboot in DT for NS2
  arm64: dts: Add SMMU DT node for NS2
  arm64: dts: Add L2-cache DT node for NS2
2015-12-12 01:02:07 +01:00
Arnd Bergmann 3ef6cf0043 Marvell Berlin64 DT changes (round 1):
- add pinctrl nodes and uart0 pinmux
 - add watchdog nodes
 - add PSCI-1.0 support
 - add cpuidle support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWZAmqAAoJEN2kpao7fSL4jSQP/2YgjPLfqZU7kk+P4CR3IoCb
 241Zl2BYfFY7p3IxFCFTVxHH77ZHHzoKoUc6BLp2qWSPvG6TgqI9Q7CNWjwRYofJ
 dQQMp4kKZs0ap60CypaC5iQLEKAPjsw3FZ9aIE8KZrLcnCLRSqqPIhI2e5zVsixT
 IyizdxheB88TY3AzyWaPT2UkPFLPAROnOKnEL1mNdNF5apqtDTG6qwA831xRMUey
 uzw/ajERerCLOrrtbVf8GjimrOEQNzITD9J6VNpD7PfUx2ADe4bD9nQ5GrYMBYE5
 r7GPw+by2f1Cz1gVrUL7OCwzMHWtfx8ZeaYrwiCYrT3Wb0ydiCRfoOVlHDeDTXBz
 MyfEZWq0gHIpwmiJLYKdKhwVbtpD3FjGqM8WKMB9f9YTScan+jpRqo6M9+O5fh0O
 pxnFzkvtcVkEOQKzApmo3VmerTaQEA+/TVlXSMzLgWVt2CZ2Ks68k1eisES1yhru
 OAe4xhZR/I1MsM0AdLoetBBc0g6EWNjd+mKzglqvZCT32x4qZhi66WXnkpE5/C/4
 HUxMOthKA7eGaTzk58lLaJ/Sb3ZncErrpzdx8KYj/QjUloN24VvDlKxCiWWamL/o
 kyVcKNoJedNCPfIBrJZl5ajVG7A9jyv41AV7GYY5LBTE27W5cSAtAXot+S/rXrqv
 qVJqLNZgCJAxVzmttkZc
 =heAb
 -----END PGP SIGNATURE-----

Merge tag 'berlin64-dt-for-4.5-1' of git://git.infradead.org/users/hesselba/linux-berlin into next/dt64

Merge "Marvell Berlin64 DT changes (round 1)" from Sebastian Hesselbarth:

- add pinctrl nodes and uart0 pinmux
- add watchdog nodes
- add PSCI-1.0 support
- add cpuidle support

* tag 'berlin64-dt-for-4.5-1' of git://git.infradead.org/users/hesselba/linux-berlin:
  arm64: dts: berlin4ct: support cpuidle-dt
  arm64: dts: berlin: PSCI-1.0 support
  arm64: dts: berlin4ct: add watchdog nodes
  arm64: dts: berlin4ct: add default pinmux for uart0
  arm64: dts: berlin4ct: add the pinctrl node
2015-12-12 00:59:49 +01:00
Arnd Bergmann fc3359b97f First round of 64bit devicetree changes for Rockchip socs.
This includes support for the evaluation board of the rk3368
 as well as the dts-part for the newly added thermal management
 support, rk3368 pwm nodes and an alias.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJWYew9AAoJEPOmecmc0R2BCxoH/0TzuVJAD9RoQ9sBEGsasVqx
 HYr8EHBBmtAhkgAKJG7rwaTufpoxeQSQL5u5YYIFcZP/JV9GfIt4vWLHaPoqCZM7
 CgEpr2JcHAkLYsUzVBXe3gH8wLRNlGPOTPAegrZxn2Q4kmDZ6rATBWdcdGowPxEV
 aNIFLgavrW+3qnqF9ppR0s26Upv9nsZ0KamRoVlRlX+/qPiAr4tF3HL/rk33RYIO
 WjGHGoOeHM14BuM6t5EIuc6uiiXLS+Ogl9EH39aHdM4rT8ZAUMBBPpI0T2JiwAPP
 74cgtMjAR+d/bwZGjvZ6Nn+Qf8HYt+ZaBkVglvVop0K42+CDowJgeZrZWUFHp8E=
 =kU7g
 -----END PGP SIGNATURE-----

Merge tag 'v4.5-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64

Merge "rockchip dts64 changes for 4.5" from Heiko Stuebner:

First round of 64bit devicetree changes for Rockchip socs.
This includes support for the evaluation board of the rk3368
as well as the dts-part for the newly added thermal management
support, rk3368 pwm nodes and an alias.

* tag 'v4.5-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: add rk3368 evaluation board
  arm64: dts: rockchip: add the pwm node info for RK3368 SoCs
  arm64: dts: rockchip: Enable the Thermal on R88 board
  arm64: dts: rockchip: Add main thermal info to rk3368.dtsi
  arm64: dts: rockchip: Add the thermal data found on RK3368
  arm64: dts: rockchip: Setup rk3368 ethernet0 alias for u-boot
2015-12-12 00:58:08 +01:00
Arnd Bergmann 4702d5993a DTS changes for X-Gene platforms queued for v4.5
This patch set adds DTS entries to support various IPs
 for X-Gene v1 and X-Gene v2 SoC:
 - X-Gene v1: Enable support for MMC, USB, GPIO controllers,
   I2C controller, L2 Cache topology
 - X-Gene v2: Enable support for MMC, USB, GPIO controller,
   I2C controller (with RTC), PCIe controller with GICv2m MSI,
   EDAC, L2 Cache topology, TRNG
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWXI+jAAoJEB11UG/BVQ/gqJgP/jKWVMUP04sKvtb6VCVFgAbE
 0KgdM89rd3qvk7BB0nAdbhoYMpmnljCLLfNPe2nkj/fRmm3gUuBEc42GJA9Y7b72
 fT2mqK3teLE4O57mBJbgghe1An2fqiuh6CgRB4tSvqpViRpFwswMvlL191OzzsyC
 lpek/AY3+DRHZrYrfcattZRTuxD9NXe+uRCuHzV46Abm8fn6Z3WdCS3ai198XSO1
 G8xGv9GZYYLWFLDcMeBiL1/uj4fHhkD3qqSXElM+HOwuYaSY7Hi7701p/RlBve+6
 GPXL9CeJB6O/etCY6DQNK88hVtUgPLvHlkQx0RZJdHFZpiOY+tGFNYzWi0N6hJqt
 Nm9sFH+PEUga+8JMv/FrE8U/10Ou6bSvky6QGKiZsr205zjzhf/Pz4YWTFasc1Sz
 9CtNVg17jcVIIm5nyRnvRGomr/IDpz9X0SGzVdIU4TxTLCb76EKU0Qt8FfYNbsf4
 WdsppSG6lhXnyN9VyOv8cgbFrv2URfFNZVB98uos9mi1PI1xe3+YTh78EF534jbW
 EDKcZQCZVaLerBUpVQZN0uE9S0TTy+fispi0C+achC8Hf+rkF2G8GLZrhpF02EhF
 HCICub3hDOyo63V0urDgeWZL5xQy/qJQ25LNtBuL/GgO+oLDaEhcHtsvhKCIuZUc
 gW/9vcCgV6TkECDo20tv
 =XJqR
 -----END PGP SIGNATURE-----

Merge tag 'xgene-dts-for-v4.5-v1' of https://github.com/AppliedMicro/xgene-next into next/dt64

Merge "DTS changes for X-Gene platforms queued for v4.5" from Duc Dang

This patch set adds DTS entries to support various IPs
for X-Gene v1 and X-Gene v2 SoC:
- X-Gene v1: Enable support for MMC, USB, GPIO controllers,
  I2C controller, L2 Cache topology
- X-Gene v2: Enable support for MMC, USB, GPIO controller,
  I2C controller (with RTC), PCIe controller with GICv2m MSI,
  EDAC, L2 Cache topology, TRNG

* tag 'xgene-dts-for-v4.5-v1' of https://github.com/AppliedMicro/xgene-next:
  arm64: dts: Add L2 cache topology for APM X-Gene SoC
  arm64: dts: Add RTC DTS entry for X-Gene v2 SoC platform
  arm64: dts: Add Designware I2C controller DTS entries for X-Gene v2 SoC platform
  arm64: dts: Add Designware I2C controller DTS entries for X-Gene v1 SoC
  arm64: dts: Add APM X-Gene v2 SoC EDAC DTS entries
  arm64: dts: Add APM X-Gene v2 SoC Designware GPIO controller DTS entry
  arm64: dts: Add Designware GPIO dts binding for APM X-Gene v1 platform
  arm64: dts: Add APM X-Gene v2 SoC GFC GPIO controller DTS entry
  arm64: dts: Add APM X-Gene v1 SoC GFC GPIO controller DTS entries
  arm64: dts: Add USB nodes for APM X-Gene v2 platforms
  arm64: dts: Add USB nodes for APM X-Gene v1 platforms
  arm64: dts: Add PCIe node for APM X-Gene v2 platforms
  arm64: dts: Add v2m MSI frame nodes for APM X-Gene v2 platforms
  arm64: dts: Add RNG device tree nodes for APM X-Gene v2 platform
  arm64: dts: X-Gene: Do not reset or enable/disable clock for AHB block
  arm64: dts: Add the arasan mmc DTS entries for APm X-Gene v2 SoC
  arm64: dts: Add the arasan mmc DTS entries for APM X-Gene v1 SoC
2015-12-12 00:54:02 +01:00
Arnd Bergmann fd0adfd82b Second Round of Renesas ARM64 Based SoC DT Updates for v4.5
* Enable GPIO, EthernetAVB, I2C and Sound on r8a7795/salvator-x
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWV7IQAAoJENfPZGlqN0++ppEP/2UUE8H1mC6Hxa74C7/tLr+V
 +5NJem7fhfUFyXcVvlZTBWQWtUQygrYEMwfv9/fObw56b/uorgNtrbr/C1YRM8qu
 d4rW5Nvzhy+3R8ufttLhtV69VLhIeetpLHgwOzgBDX3QAhdrhx4ctiDSvR768Tzl
 c9ihl4EF39KOmx6EmIhBIK/CYIvq/ftUnVNbu46O/7wTlQNnYu9a+Jh+BVlm/eeM
 +Rm5amt2W1camXS55fJca/mHAmwio61GhC0cHDpvqgGspCPYCCSFCEruu7FiUV/H
 FMWBwgMs6aTX6+FUjkJIR4jjPd7LDFKd04mKIn7lhmZkYvw+bqtFxV14q0riEkPS
 3PYgvfxhFwrwwk6/1hjIxfokWMrIWWDZYZ2AGc6dP3Oq5UVn80y72acyKfO0S3SE
 yHlm7F8Xqsn0/8OS8Ho5nEpEFnilCGD7FjM+yC/UrvEguc7bzwBcXl+G257iKHb9
 pK4uCONdK6cXsqtbWXFGO5fE19SNth1RBVfsup/Of3Mqr/xZg/11LWFpneI1RFni
 nybwcpnI3HICU8Cm7N6qP9yP9fk9vxBWi67bwm+haAX3dFaQqrvK4E/WR3vpIeYN
 ArvvgSHIHx1rarySUFT0u4qRSSeazqVAMkxt0YY3ZsVoLDEZ4yI5aqnA4Fx47Dme
 yf171kYvCE1T32Z9UtCw
 =GMVv
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64

Merge "Second Round of Renesas ARM64 Based SoC DT Updates for v4.5" from Simon Horman:

* Enable GPIO, EthernetAVB, I2C and Sound on r8a7795/salvator-x

* tag 'renesas-arm64-dt2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: renesas: salvator-x: Sound DVC support
  arm64: renesas: salvator-x: Sound SRC support
  arm64: renesas: salvator-x: Sound SSI DMA support via BUSIF
  arm64: renesas: salvator-x: Sound SSI DMA support
  arm64: renesas: salvator-x: Sound SSI PIO support
  arm64: renesas: r8a7795: Sound DVC support
  arm64: renesas: r8a7795: Sound SRC support
  arm64: renesas: r8a7795: Sound SSI DMA support
  arm64: renesas: r8a7795: Sound SSI PIO support
  arm64: renesas: r8a7795: add AUDIO_DMAC support
  arm64: renesas: r8a7795 dtsi: Add all HSCIF nodes
  arm64: renesas: salvator-x: enable I2C
  arm64: renesas: r8a7795: add I2C support
  arm64: renesas: salvator-x: Setup ethernet0 alias for U-Boot
  arm64: dts: r8a7795: enable nfs root on Salvator-X board
  arm64: dts: r8a7795: enable EthernetAVB on Salvator-X
  arm64: dts: r8a7795: add EthernetAVB device node
  arm64: dts: r8a7795: add GPIO nodes
2015-12-12 00:53:07 +01:00
Arnd Bergmann 63747d3c27 Renesas ARM64 Based SoC DT Updates for v4.5
* Initial support for Renesas ARM64 Based r8a7795 SoC and
   Salvator-X board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTm0oAAoJENfPZGlqN0++n8EP/1Xg9Yx1KzY5Ss2yLviTFy7k
 1L0UpgYotdahDZr3x0QAeXNSEzJOyxjau9eg9+gwbuDxIYZNt8jO3tfAXzqcbNkv
 0X7m3BL7K5f1EOWEpaOq4pwdSkKTjPs3CycjS3lYJtI9WQj0lmsBVTuuF77CuZjr
 aZa432UCzdnZEs9B/YA4HkOVb3s1Y5pLeiD28NPDK/ZJE1lR0+of2sVgK1YuteXx
 pff13nOuOaYuU5mdkbhmE1Djkl6O4UTo8bJcK9ylzoht2dj672ftJuVA5bp5jox6
 I3O+x4NPoByGEGQ7cdg4kihqEbAcVEWm6GaXk6/3Kq+1KKafELY6F0ABsHmOANFk
 fjtq9PQjFPYO/ygrxN/4pDvr7u6WCOFWEk/SgfJKg1dVPZN54K0kcr5P1gggzDx8
 pgRg0h0Rnf4uSZCAtVmLMcoFWOb3ZKzHbmv5rUxgVXovMJiSBQrMQyfMnn/t+uVf
 PrTzJDR9/FodmvmJ2oKPkLuiH8MOUFaUiP91A2Se68ijCglIXZ65j6rGBZtsrrkQ
 hGIYu8HL43AWsAqVzrFQIFmT9cqQh728o3ahJtHn/XkqHmuO2D1Z8/MzdHnFybyy
 FCuma2pROhFfbj4T/dgd2IWFC3SgTVSP2HI5VLsdJ4uyEIEqjxCErc22rzawGB9C
 XK0fRUn6cy7jntdeKMN3
 =MVJ0
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64

Merge "Renesas ARM64 Based SoC DT Updates for v4.5" from Simon Horman:

* Initial support for Renesas ARM64 Based r8a7795 SoC and
  Salvator-X board

* tag 'renesas-arm64-dt-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  MAINTAINERS: Add entry for Renesas arm64 architecture
  arm64: renesas: add Salvator-X board support
  arm64: renesas: r8a7795: enable PFC
  arm64: renesas: r8a7795: Add all SCIF nodes
  arm64: renesas: r8a7795: Add dummy dma-controller nodes
  arm64: renesas: r8a7795: Add Renesas R8A7795 SoC support
2015-12-12 00:49:59 +01:00
Will Deacon 32d6397805 arm64: mm: ensure that the zero page is visible to the page table walker
In paging_init, we allocate the zero page, memset it to zero and then
point TTBR0 to it in order to avoid speculative fetches through the
identity mapping.

In order to guarantee that the freshly zeroed page is indeed visible to
the page table walker, we need to execute a dsb instruction prior to
writing the TTBR.

Cc: <stable@vger.kernel.org> # v3.14+, for older kernels need to drop the 'ishst'
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-11 17:33:22 +00:00
Mark Rutland f00083cae3 arm64: mm: place __cpu_setup in .text
We drop __cpu_setup in .text.init, which ends up being part of .text.
The .text.init section was a legacy section name which has been unused
elsewhere for a long time.

The ".text.init" name is misleading if read as a synonym for
".init.text". Any CPU may execute __cpu_setup before turning the MMU on,
so it should simply live in .text.

Remove the pointless section assignment. This will leave __cpu_setup in
the .text section.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-11 17:33:21 +00:00
Catalin Marinas 82d340081b arm64: Improve error reporting on set_pte_at() checks
Currently the BUG_ON() checks do not give enough information about the
PTEs being set. This patch changes BUG_ON to WARN_ONCE and dumps the
values of the old and new PTEs. In addition, the checks are only made if
the new PTE entry is valid.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Ming Lei <tom.leiming@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
2015-12-11 15:44:24 +00:00
Matthias Brugger 8fc5abd40e arm64: dts: rockchip: Fix typo in rk3368 sdmmc card detect pin name
The card detect pin is currently called sdmcc-cd.
This patch fixes the typo and renames the pin to sdmmc-cd.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2015-12-11 15:31:33 +01:00
Caesar Wang 87ac9de3b4 arm64: dts: rockchip: correct voltage range for rk3368-evb-act8846 board
In general, the logic voltage is affected by ddr frequency factors.
We should fix the correct voltage range since assuemd that we have the
ddr frequency driver in mainline.

AFAIK, the 1.8v voltage is used by the SD3.0 card.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2015-12-11 14:02:25 +01:00
Marc Zyngier 8e31ed9c18 irqchip/gic-v3: Add missing include for barrier.h
Both the 32bit and 64bit versions of the GICv3 header file are using
barriers, but neglect to include barrier.h, leading to an interesting
splat in some circumstances.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1449483072-17694-3-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-12-10 19:13:26 +01:00
Mark Brown 4a6ccf3026 arm64: cmpxchg: Don't incldue linux/mmdebug.h
The arm64 asm/cmpxchg.h includes linux/mmdebug.h but doesn't so far as I
can tell actually use anything from it.  Removing the inclusion reduces
spurious header dependency rebuilds and also avoids issues with
recursive inclusions of headers causing build breaks due to attempts to
use things before they are defined if linux/mmdebug.h starts pulling in
more low level headers.

Such errors have happened in -next recently, for example:

In file included from include/linux/completion.h:11:0,
                 from include/linux/rcupdate.h:43,
                 from include/linux/tracepoint.h:19,
                 from include/linux/mmdebug.h:6,
                 from ./arch/arm64/include/asm/cmpxchg.h:22,
                 from ./arch/arm64/include/asm/atomic.h:41,
                 from include/linux/atomic.h:4,
                 from include/linux/spinlock.h:406,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from arch/arm64/kernel/asm-offsets.c:21:
include/linux/wait.h: In function 'wait_on_atomic_t':
include/linux/wait.h:1218:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]
 if (atomic_read(val) == 0)

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 17:36:09 +00:00
Mark Rutland 9aa4ec1571 arm64: mm: fold alternatives into .init
Currently we treat the alternatives separately from other data that's
only used during initialisation, using separate .altinstructions and
.altinstr_replacement linker sections. These are freed for general
allocation separately from .init*. This is problematic as:

* We do not remove execute permissions, as we do for .init, leaving the
  memory executable.

* We pad between them, making the kernel Image bianry up to PAGE_SIZE
  bytes larger than necessary.

This patch moves the two sections into the contiguous region used for
.init*. This saves some memory, ensures that we remove execute
permissions, and allows us to remove some code made redundant by this
reorganisation.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 17:36:08 +00:00
Mark Rutland 5b28cd9d08 arm64: Remove redundant padding from linker script
Currently we place an ALIGN_DEBUG_RO between text and data for the .text
and .init sections, and depending on configuration each of these may
result in up to SECTION_SIZE bytes worth of padding (for
DEBUG_RODATA_ALIGN).

We make no distinction between the text and data in each of these
sections at any point when creating the initial page tables in head.S.
We also make no distinction when modifying the tables; __map_memblock,
fixup_executable, mark_rodata_ro, and fixup_init only work at section
granularity. Thus this padding is unnecessary.

For the spit between init text and data we impose a minimum alignment of
16 bytes, but this is also unnecessary. The init data is output
immediately after the padding before any symbols are defined, so this is
not required to keep a symbol for linker a section array correctly
associated with the data. Any objects within the section will be given
at least their usual alignment regardless.

This patch removes the redundant padding.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 17:36:08 +00:00
Mark Rutland e2c30ee320 arm64: mm: remove pointless PAGE_MASKing
As pgd_offset{,_k} shift the input address by PGDIR_SHIFT, the sub-page
bits will always be shifted out. There is no need to apply PAGE_MASK
before this.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 17:36:08 +00:00