Commit Graph

2469 Commits

Author SHA1 Message Date
Olof Johansson
4e9ab19576 Add regulators to the scpsys binding.
Move the include of the reset contoller to include/dt-bindings/reset.
 
 Add basic support for mt2701 SoC and evaluation board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJWdxfdAAoJELQ5Ylss8dNDxEgP/RhO5qFNw7ThTlVd8HHHGXqu
 JuUy8WsVsp5cPq1Aksf9qNYlkv3tdGtKDmVv1QDTg5lIB7ytrm6uO3m+4feM+Awk
 6qya8meRQowZTBU9SoBMLiNvKSiHkHnGeXVW3br92cPK9uxNJlCU9M1y9h9T7siW
 OdxQ884c09/ubTgUnspDPIrpoCCjcLvHhy+6etEfU6zZLxxOrOUbCFkOHxf4EHwZ
 BVDgukpxlDb3yL+GX9S0IfZu7EDu7MnUx/14RqyEPeAdXG4GR+cLrVg5s0YYyLuI
 YTRcwd7/WClMhGIYprf0mX8kPGJKC/L5JK7DGu1GmdLMCZ+vke5xgdqIiK0ssxkH
 O8VJIWRL1W6OuJQpZUDxRGpMo0aR+0fhpR5FuAtCyM8kaq8zTT182SpXR1AgsYmD
 FF8L6bxX68YIY8PHCs0B6wjN6gKGcQdXVPMAvPlLLaGbw5qZtLqiM2zQnaZSD6JM
 9IpNx3jjjIWNHLol3wOQnosECJONqa/JuiWyCOA/5mGRAJS+NE7tEEnm9yTPrc3M
 7dn4RrYq50xf0roqLpAmFZ6MU7RVA31vn0DkFnmRvoEzt5ZLAUMsg2nJImyhhMrm
 f5cdYIumHQCT0lpSvZL8gL/D+7AIffQaaQIfXzb7TsvJuta2kJSNhEbV1gNxS5Bs
 iPSJYeaMLhq807UJG+lw
 =qUem
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-next-dts' of https://github.com/mbgg/linux-mediatek into next/dt

Add regulators to the scpsys binding.

Move the include of the reset contoller to include/dt-bindings/reset.

Add basic support for mt2701 SoC and evaluation board.

* tag 'v4.4-next-dts' of https://github.com/mbgg/linux-mediatek:
  dt-bindings: soc: Add supplies for Mediatek SCPSYS unit
  ARM: mediatek: DT: Move reset controller constants into common location
  ARM: dts: mediatek: add MT2701 basic support
  Document: DT: Add bindings for mediatek MT2701 SoC Platform

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 13:00:45 -08:00
Olof Johansson
9205a7ade8 Update psci support to the arm,psci-1.0 to mt8173
Add display PWM driver to mt8173
 
 Add mediatek general porpose timer to mt8173
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJWdximAAoJELQ5Ylss8dNDsZ4QAIDi9HPJpKzHCs+W/7+F3e+P
 LZ+fIEYzRhhKgBWCGOWmbrOAVweOhi5ja5tk2IlOcLvZceY7X03EZLsPV0WCofKW
 F7Hcp/Qs+VhAVinUlz5Zgx8nuS3BAd+U9iOi/2CcGczj8zYB9Un2cfV4ZqTImgol
 5zgt3kXpqX3RiZ/ubkUODMsH9RLcW1yRuIyzDUlNO18GjV0+luat9Ws+fU+dMOyM
 RnfjLALnga3QwIol0tMFktLJpfbwCkKKtLY3kRKEjS1FFg+4ucSwnBfRetxtdEcQ
 ebBwF2Vh/tvx/13ewer5Xjmz/J2qRriK8WWqK88CPbSguvRjSpnwJpurGtirfT4B
 AbrlIRZyhjwyhw4Us2KCTnOvjmsuHUKsvGTJPyLBpBCsQ1s9cL/DDhbd+z3j5hdM
 qekKvGP5yygYcqyc1t5tOs5POO1Ey2/vZ4cJdfWql/0AXhwDSgjr//rUYuAAsMrJ
 g/ySJPN4erb3hR3CbfLwbYMW9wErTbUGGRbe3Buzx7nTd/zhax1psbakS2SyI2q9
 410Plhm1iHhildOyJjAINMMqXqE4uyo1eCXxr2/Ul93Xf1epcvaerBFVE/Fk2DHc
 ecIN8ufWaKfkBbBCeAs1XYVeO5zbv4YyvTTw07B2A9bKs44Skk8zOhsKJIw6ydjT
 lU2HvzhLowA8fExy1Viy
 =xWtj
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-next-arm64' of https://github.com/mbgg/linux-mediatek into next/dt64

Update psci support to the arm,psci-1.0 to mt8173

Add display PWM driver to mt8173

Add mediatek general porpose timer to mt8173

* tag 'v4.4-next-arm64' of https://github.com/mbgg/linux-mediatek:
  arm64: dts: mediatek: mt8173 PSCI-1.0 support
  arm64: dts: mt8173: add MT8173 display PWM driver support node
  arm64: dts: mt8173: add timer node

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 13:00:10 -08:00
Olof Johansson
43ff5eaf09 Third Round of Renesas ARM64 Based SoC DT Updates for v4.5
* Enable SATA
 * Add salvator-x part number to DT bindings documentation
 * Enable all four A57 cores instead of just one
 * Enhanced audio support:
   - Use CS2000 as AUDIO_CLK_B
   - Set ak4613 In/Out pin as single-end
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWc12aAAoJENfPZGlqN0++N7YP/iUOSo2pptyYMC6SYjT+v7ST
 R2eYynCqUktGycOeMbxZzcm15jhltCE4roxz01uhuSETAHpBDCyMhr34075UCYr/
 he/NoswZ2zFE9b2cKx6i0teb8Plegx3BJhBAovTK3kegEAg5ouqRX2Kyfa3/VWDd
 ZoXXp2WiEQ09JVrJQGViCNb7EkKt2X3lFwctFWWMuR5dq2g12W4Ka2vbHNcBrWU8
 otSAn7CFoEaKc190RF8kVcHPvVh87ZnuIW15Hs+fr5RFvnGy5PVOLF/l0/ihY9pF
 ErP+M7G8s0wmh3OaeMWHXLeU2pY2TNWAY+mVo49TOe9HpTyC4ij0rDTHE9qiZELm
 lwFP4Pl6liYnJzuAEYh9lbwbtkQ0jvjMihz7bhdlfXOaTFSjbev48NWh+HXeAlSv
 LPCrukqKn1KQVNA2bU1Fg0mEpfpVy+42WAMm7dZzIEacOGs8/0khWZMl3rAvEiRT
 EC4N/bVgIbspSTtvj4F6YHPhTnvI1kx9J5tbjDelTHwuxDBXwEGEiP6b3rTw3znL
 xMv5hc+7kt77UHhmUCYZYpcKfiR8/6Rc8WiQaIdO2oglWdzKuaaf16Ib67aKj31D
 y7SWpEyhUF9g/tqEUwmrL6Kl1F9EXKtYQh8rP2SaTWdU1Ndapa3mtRC95rxcpYai
 ASSssEwMGwbS2S4Oui9G
 =qm/m
 -----END PGP SIGNATURE-----

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

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

* Enable SATA
* Add salvator-x part number to DT bindings documentation
* Enable all four A57 cores instead of just one
* Enhanced audio support:
  - Use CS2000 as AUDIO_CLK_B
  - Set ak4613 In/Out pin as single-end

* tag 'renesas-arm64-dt3-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: renesas: r8a7795: fix SATA clock assignment
  arm64: dts: salvator-x: Enable SATA controller
  arm64: dts: r8a7795: Add SATA controller node
  arm64: renesas: r8a7795: add internal delay for i2c IPs
  arm64: renesas: salvator-x: Add board part number to DT bindings
  arm64: dts: r8a7795: Add pmu device nodes
  arm64: dts: r8a7795: Add Cortex-A57 CPU cores
  arm64: dts: r8a7795: Add PSCI node
  arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B
  arm64: renesas: salvator-x: set ak4613 In/Out pin as single-end

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 12:51:21 -08:00
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
James Morse
49003a8d6b arm64: don't call C code with el0's fp register
On entry from el0, we save all the registers on the kernel stack, and
restore them before returning. x29 remains unchanged when we call out
to C code, which will store x29 as the frame-pointer on the stack.

Instead, write 0 into x29 after entry from el0, to avoid any risk of
tracing into user space.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 12:08:09 +00:00
James Morse
1ffe199b1c arm64: when walking onto the task stack, check sp & fp are in current->stack
When unwind_frame() reaches the bottom of the irq_stack, the last fp
points to the original task stack. unwind_frame() uses
IRQ_STACK_TO_TASK_STACK() to find the sp value. If either values is
wrong, we may end up walking a corrupt stack.

Check these values are sane by testing if they are both on the stack
pointed to by current->stack.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 12:08:09 +00:00
James Morse
aa4d5d3cbc arm64: Add this_cpu_ptr() assembler macro for use in entry.S
irq_stack is a per_cpu variable, that needs to be access from entry.S.
Use an assembler macro instead of the unreadable details.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-10 12:08:09 +00:00
Ard Biesheuvel
f7d9248942 arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM
This refactors the EFI init and runtime code that will be shared
between arm64 and ARM so that it can be built for both archs.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-09 16:57:23 +00:00
Ard Biesheuvel
e5bc22a42e arm64/efi: split off EFI init and runtime code for reuse by 32-bit ARM
This splits off the early EFI init and runtime code that
- discovers the EFI params and the memory map from the FDT, and installs
  the memblocks and config tables.
- prepares and installs the EFI page tables so that UEFI Runtime Services
  can be invoked at the virtual address installed by the stub.

This will allow it to be reused for 32-bit ARM.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-09 16:57:23 +00:00
Ard Biesheuvel
4dffbfc48d arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP
Change the EFI memory reservation logic to use memblock_mark_nomap()
rather than memblock_reserve() to mark UEFI reserved regions as
occupied. In addition to reserving them against allocations done by
memblock, this will also prevent them from being covered by the linear
mapping.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-09 16:57:23 +00:00
Ard Biesheuvel
68709f4538 arm64: only consider memblocks with NOMAP cleared for linear mapping
Take the new memblock attribute MEMBLOCK_NOMAP into account when
deciding whether a certain region is or should be covered by the
kernel direct mapping.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-09 16:57:23 +00:00
Will Deacon
7596abf2e5 arm64: irq: fix walking from irq stack to task stack
Running with CONFIG_DEBUG_SPINLOCK=y can trigger a BUG with the new IRQ
stack code:

  BUG: spinlock lockup suspected on CPU#1

This is due to the IRQ_STACK_TO_TASK_STACK macro incorrectly retrieving
the task stack pointer stashed at the top of the IRQ stack.

Sayeth James:

| Yup, this is what is happening. Its an off-by-one due to broken
| thinking about how the stack works. My broken thinking was:
|
| >   top ------------
| >       | dummy_lr | <- irq_stack_ptr
| >       ------------
| >       |   x29    |
| >       ------------
| >       |   x19    | <- irq_stack_ptr - 0x10
| >       ------------
| >       |   xzr    |
| >       ------------
|
| But the stack-pointer is decreased before use. So it actually looks
| like this:
|
| >       ------------
| >       |          |  <- irq_stack_ptr
| >   top ------------
| >       | dummy_lr |
| >       ------------
| >       |   x29    | <- irq_stack_ptr - 0x10
| >       ------------
| >       |   x19    |
| >       ------------
| >       |   xzr    | <- irq_stack_ptr - 0x20
| >       ------------
|
| The value being used as the original stack is x29, which in all the
| tests is sp but without the current frames data, hence there are no
| missing frames in the output.
|
| Jungseok Lee picked it up with a 32bit user space because aarch32
| can't use x29, so it remains 0 forever. The fix he posted is correct.

This patch fixes the macro and adds some of this wisdom to a comment,
so that the layout of the IRQ stack is well understood.

Cc: James Morse <james.morse@arm.com>
Reported-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-09 13:59:09 +00:00
Ivan T. Ivanov
d66dd9e08f arm64: dts: qcom: 8x16: UART1 and UART2 use DMA for RX and TX
Add DMA channels definitions for UART1 and UART2 controllers.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
2015-12-08 14:34:22 -06:00
Ivan T. Ivanov
806c765ee9 arm64: dts: qcom: 8x16: UART1 add CTS_N, RTS_N pin configurations
Add devicetree bindings for UART1 CTS_N and RTS_N pins.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
2015-12-08 14:34:22 -06:00
James Morse
8e23dacd12 arm64: Add do_softirq_own_stack() and enable irq_stacks
entry.S is modified to switch to the per_cpu irq_stack during el{0,1}_irq.
irq_count is used to detect recursive interrupts on the irq_stack, it is
updated late by do_softirq_own_stack(), when called on the irq_stack, before
__do_softirq() re-enables interrupts to process softirqs.

do_softirq_own_stack() is added by this patch, but does not yet switch
stack.

This patch adds the dummy stack frame and data needed by the previous
stack tracing patches.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-08 11:42:51 +00:00
AKASHI Takahiro
132cd887b5 arm64: Modify stack trace and dump for use with irq_stack
This patch allows unwind_frame() to traverse from interrupt stack to task
stack correctly. It requires data from a dummy stack frame, created
during irq_stack_entry(), added by a later patch.

A similar approach is taken to modify dump_backtrace(), which expects to
find struct pt_regs underneath any call to functions marked __exception.
When on an irq_stack, the struct pt_regs is stored on the old task stack,
the location of which is stored in the dummy stack frame.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
[james.morse: merged two patches, reworked for per_cpu irq_stacks, and
 no alignment guarantees, added irq_stack definitions]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-08 11:41:51 +00:00
Jungseok Lee
6cdf9c7ca6 arm64: Store struct thread_info in sp_el0
There is need for figuring out how to manage struct thread_info data when
IRQ stack is introduced. struct thread_info information should be copied
to IRQ stack under the current thread_info calculation logic whenever
context switching is invoked. This is too expensive to keep supporting
the approach.

Instead, this patch pays attention to sp_el0 which is an unused scratch
register in EL1 context. sp_el0 utilization not only simplifies the
management, but also prevents text section size from being increased
largely due to static allocated IRQ stack as removing masking operation
using THREAD_SIZE in many places.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-08 11:40:48 +00:00
John Blackwood
5db4fd8c52 arm64: Clear out any singlestep state on a ptrace detach operation
Make sure to clear out any ptrace singlestep state when a ptrace(2)
PTRACE_DETACH call is made on arm64 systems.

Otherwise, the previously ptraced task will die off with a SIGTRAP
signal if the debugger just previously singlestepped the ptraced task.

Cc: <stable@vger.kernel.org>
Signed-off-by: John Blackwood <john.blackwood@ccur.com>
[will: added comment to justify why this is in the arch code]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-07 17:48:21 +00:00
Ard Biesheuvel
98fb754831 arm64: update linker script to increased L1_CACHE_BYTES value
Bring the linker script in line with the recent increase of
L1_CACHE_BYTES to 128. Replace the hardcoded value of 64 with the
symbolic constant.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
[catalin.marinas@arm.com: fix up RW_DATA_SECTION as well]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-12-07 17:22:24 +00:00
Jisheng Zhang
1544f99c0a arm64: dts: berlin4ct: support cpuidle-dt
This patch adds an idle-states node to describe the berlin4ct idle
states and also adds references to the idle-states node in all CPU
nodes. After this patch cpuidle is enabled.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-12-06 10:25:28 +01:00
Catalin Marinas
db3899a647 arm64: Add trace_hardirqs_off annotation in ret_to_user
When a kernel is built with CONFIG_TRACE_IRQFLAGS the following warning
is produced when entering userspace for the first time:

  WARNING: at /work/Linux/linux-2.6-aarch64/kernel/locking/lockdep.c:3519
  Modules linked in:
  CPU: 1 PID: 1 Comm: systemd Not tainted 4.4.0-rc3+ #639
  Hardware name: Juno (DT)
  task: ffffffc9768a0000 ti: ffffffc9768a8000 task.ti: ffffffc9768a8000
  PC is at check_flags.part.22+0x19c/0x1a8
  LR is at check_flags.part.22+0x19c/0x1a8
  pc : [<ffffffc0000fba6c>] lr : [<ffffffc0000fba6c>] pstate: 600001c5
  sp : ffffffc9768abe10
  x29: ffffffc9768abe10 x28: ffffffc9768a8000
  x27: 0000000000000000 x26: 0000000000000001
  x25: 00000000000000a6 x24: ffffffc00064be6c
  x23: ffffffc0009f249e x22: ffffffc9768a0000
  x21: ffffffc97fea5480 x20: 00000000000001c0
  x19: ffffffc00169a000 x18: 0000005558cc7b58
  x17: 0000007fb78e3180 x16: 0000005558d2e238
  x15: ffffffffffffffff x14: 0ffffffffffffffd
  x13: 0000000000000008 x12: 0101010101010101
  x11: 7f7f7f7f7f7f7f7f x10: fefefefefefeff63
  x9 : 7f7f7f7f7f7f7f7f x8 : 6e655f7371726964
  x7 : 0000000000000001 x6 : ffffffc0001079c4
  x5 : 0000000000000000 x4 : 0000000000000001
  x3 : ffffffc001698438 x2 : 0000000000000000
  x1 : ffffffc9768a0000 x0 : 000000000000002e
  Call trace:
  [<ffffffc0000fba6c>] check_flags.part.22+0x19c/0x1a8
  [<ffffffc0000fc440>] lock_is_held+0x80/0x98
  [<ffffffc00064bafc>] __schedule+0x404/0x730
  [<ffffffc00064be6c>] schedule+0x44/0xb8
  [<ffffffc000085bb0>] ret_to_user+0x0/0x24
  possible reason: unannotated irqs-off.
  irq event stamp: 502169
  hardirqs last  enabled at (502169): [<ffffffc000085a98>] el0_irq_naked+0x1c/0x24
  hardirqs last disabled at (502167): [<ffffffc0000bb3bc>] __do_softirq+0x17c/0x298
  softirqs last  enabled at (502168): [<ffffffc0000bb43c>] __do_softirq+0x1fc/0x298
  softirqs last disabled at (502143): [<ffffffc0000bb830>] irq_exit+0xa0/0xf0

This happens because we disable interrupts in ret_to_user before calling
schedule() in work_resched. This patch adds the necessary
trace_hardirqs_off annotation.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-04 18:44:25 +00:00
Linus Torvalds
db281766ba KVM/ARM fixes for v4.4-rc4
- A series of fixes to deal with the aliasing between the sp and xzr register
 - A fix for the cache flush fix that went in -rc3
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJWYc+rAAoJEL/70l94x66DlH4H/j7K4mDoruS8knO3WM7kZko5
 McsWq17GQCpPoDEsciOFLe1hESgQG5e9Dp4aZPotivExovFFstfRGGXAfNC1E1kx
 IskeJ6jxyYXtp6BDo5i9+lxCh3wSgO6IfphuXgiVJab8IdUxlDWkBPJrNPL7507l
 UGNkCMBJ2v0gswMl4uJkFGpkC2vV13a8KmDCXKpLpElA6SoIFLIkBPfhu5JrORjz
 Nn/Ky6wvc72AKDOpTbBPCE5Oz4+dRIiQdpjrXMqQA196DlgiDrGG/LcHm2/NxWI2
 9Z8WepIc1FScPX8UCs9NzMkiydCv7oWL9ymHw5leVZj4rdd4bWV0Z9Ng1qRkU0Y=
 =II4Q
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull ARM KVM fixes from Paolo Bonzini:

 - a series of fixes to deal with the aliasing between the sp and xzr
   register

 - a fix for the cache flush fix that went in -rc3

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  ARM/arm64: KVM: correct PTE uncachedness check
  arm64: KVM: Get rid of old vcpu_reg()
  arm64: KVM: Correctly handle zero register in system register accesses
  arm64: KVM: Remove const from struct sys_reg_params
  arm64: KVM: Correctly handle zero register during MMIO
2015-12-04 10:17:20 -08:00
Paolo Bonzini
0992207600 KVM/ARM fixes for v4.4-rc4
- A series of fixes to deal with the aliasing between the sp and xzr register
 - A fix for the cache flush fix that went in -rc3
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWYcEKAAoJECPQ0LrRPXpDMe0P/0t4kieg6O+3/8DwzGJGRYmZ
 paf1UBg99Mq2+xkrHbHmyObYTs2z56m2x9Q5/Wcmg0kG2d7jWv9Hyg7he+CPjnfb
 OtnizA/u/4so+bH28idhamZyinm6CMQIwMxhiU4yokUn2aiv3crYP89tWDUHlMvr
 rYQt29u4wtDmDJWyddXWM7nev7zc3ZG5q19ZEiEhyjHqbp1LXksFAos3U8sTHd8f
 jzWPQTaJDJX62wtg/FLo2prbDD+NGWyY68y6x/c3d9GhkW1NoBoUfgLtWRUuEACN
 HaponhD79C24gZ53knbgvoB3J7Gc03RUCUzMYoOi1Aq+ggOofiluO/B8cYZ0P1Ni
 tL0OcC4TPiEOxrQch6sEJroIPBulj/DKeO+wVqBWBfQaB3/aS3Y5QTBLIdL9yco+
 u/woq5TjRseV5B4e2ZAlAxINB4mscx4mDkM318xFtHD6f8K7FsKA++XqMcIJon6J
 a+sdvjiGSc3DP6L3+sTqFflgCUzIk9Vx+p7+jjZgOmqUZDSmi+M6ZgIslWa6f8sz
 IhYKI4j4G266qjh/tBF8Um77d8q1aM9qmgnshoML/oYQMTocZucf5/f0ddGfiMp8
 2rrMrSLpazvEBDIV7+BR8UVcV/yuwxdHeZM/Yu2YdsxvBEhoHYgYhyr/GfDx0CG1
 RGpwSQaYxhbnF9SS91+R
 =6wxm
 -----END PGP SIGNATURE-----

Merge tag 'kvm-arm-for-v4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master

KVM/ARM fixes for v4.4-rc4

- A series of fixes to deal with the aliasing between the sp and xzr register
- A fix for the cache flush fix that went in -rc3
2015-12-04 18:32:32 +01:00
Pavel Fedin
f6be563abb arm64: KVM: Get rid of old vcpu_reg()
Using oldstyle vcpu_reg() accessor is proven to be inappropriate and
unsafe on ARM64. This patch converts the rest of use cases to new
accessors and completely removes vcpu_reg() on ARM64.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-04 16:30:03 +00:00
Pavel Fedin
2ec5be3dbf arm64: KVM: Correctly handle zero register in system register accesses
System register accesses also use zero register for Rt == 31, and
therefore using it will also result in getting SP value instead. This
patch makes them also using new accessors, introduced by the previous
patch. Since register value is no longer directly associated with storage
inside vCPU context structure, we introduce a dedicated storage for it in
struct sys_reg_params.

This refactor also gets rid of "massive hack" in kvm_handle_cp_64().

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-04 16:29:54 +00:00
Pavel Fedin
3fec037d0f arm64: KVM: Remove const from struct sys_reg_params
Further rework is going to introduce a dedicated storage for transfer
register value in struct sys_reg_params. Before doing this we have to
remove 'const' modifiers from it in all accessor functions and their
callers.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-04 16:29:47 +00:00
Pavel Fedin
bc45a516fa arm64: KVM: Correctly handle zero register during MMIO
On ARM64 register index of 31 corresponds to both zero register and SP.
However, all memory access instructions, use ZR as transfer register. SP
is used only as a base register in indirect memory addressing, or by
register-register arithmetics, which cannot be trapped here.

Correct emulation is achieved by introducing new register accessor
functions, which can do special handling for reg_num == 31. These new
accessors intentionally do not rely on old vcpu_reg() on ARM64, because
it is to be removed. Since the affected code is shared by both ARM
flavours, implementations of these accessors are also added to ARM32 code.

This patch fixes setting MMIO register to a random value (actually SP)
instead of zero by something like:

 *((volatile int *)reg) = 0;

compilers tend to generate "str wzr, [xx]" here

[Marc: Fixed 32bit splat]

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-12-04 16:29:37 +00:00
Li Bin
004ab584e0 arm64: ftrace: fix the comments for ftrace_modify_code
There is no need to worry about module and __init text disappearing
case, because that ftrace has a module notifier that is called when
a module is being unloaded and before the text goes away and this
code grabs the ftrace_lock mutex and removes the module functions
from the ftrace list, such that it will no longer do any
modifications to that module's text, the update to make functions
be traced or not is done under the ftrace_lock mutex as well.
And by now, __init section codes should not been modified
by ftrace, because it is black listed in recordmcount.c and
ignored by ftrace.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-04 12:03:25 +00:00
Li Bin
81a6a146e8 arm64: ftrace: stop using kstop_machine to enable/disable tracing
For ftrace on arm64, kstop_machine which is hugely disruptive
to a running system is not needed to convert nops to ftrace calls
or back, because that to be modified instrucions, that NOP, B or BL,
are all safe instructions which called "concurrent modification
and execution of instructions", that can be executed by one
thread of execution as they are being modified by another thread
of execution without requiring explicit synchronization.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-04 12:03:25 +00:00
Linus Torvalds
071f5d105a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 "A lot of Thanksgiving turkey leftovers accumulated, here goes:

   1) Fix bluetooth l2cap_chan object leak, from Johan Hedberg.

   2) IDs for some new iwlwifi chips, from Oren Givon.

   3) Fix rtlwifi lockups on boot, from Larry Finger.

   4) Fix memory leak in fm10k, from Stephen Hemminger.

   5) We have a route leak in the ipv6 tunnel infrastructure, fix from
      Paolo Abeni.

   6) Fix buffer pointer handling in arm64 bpf JIT,f rom Zi Shen Lim.

   7) Wrong lockdep annotations in tcp md5 support, fix from Eric
      Dumazet.

   8) Work around some middle boxes which prevent proper handling of TCP
      Fast Open, from Yuchung Cheng.

   9) TCP repair can do huge kmalloc() requests, build paged SKBs
      instead.  From Eric Dumazet.

  10) Fix msg_controllen overflow in scm_detach_fds, from Daniel
      Borkmann.

  11) Fix device leaks on ipmr table destruction in ipv4 and ipv6, from
      Nikolay Aleksandrov.

  12) Fix use after free in epoll with AF_UNIX sockets, from Rainer
      Weikusat.

  13) Fix double free in VRF code, from Nikolay Aleksandrov.

  14) Fix skb leaks on socket receive queue in tipc, from Ying Xue.

  15) Fix ifup/ifdown crach in xgene driver, from Iyappan Subramanian.

  16) Fix clearing of persistent array maps in bpf, from Daniel
      Borkmann.

  17) In TCP, for the cross-SYN case, we don't initialize tp->copied_seq
      early enough.  From Eric Dumazet.

  18) Fix out of bounds accesses in bpf array implementation when
      updating elements, from Daniel Borkmann.

  19) Fill gaps in RCU protection of np->opt in ipv6 stack, from Eric
      Dumazet.

  20) When dumping proxy neigh entries, we have to accomodate NULL
      device pointers properly, from Konstantin Khlebnikov.

  21) SCTP doesn't release all ipv6 socket resources properly, fix from
      Eric Dumazet.

  22) Prevent underflows of sch->q.qlen for multiqueue packet
      schedulers, also from Eric Dumazet.

  23) Fix MAC and unicast list handling in bnxt_en driver, from Jeffrey
      Huang and Michael Chan.

  24) Don't actively scan radar channels, from Antonio Quartulli"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (110 commits)
  net: phy: reset only targeted phy
  bnxt_en: Setup uc_list mac filters after resetting the chip.
  bnxt_en: enforce proper storing of MAC address
  bnxt_en: Fixed incorrect implementation of ndo_set_mac_address
  net: lpc_eth: remove irq > NR_IRQS check from probe()
  net_sched: fix qdisc_tree_decrease_qlen() races
  openvswitch: fix hangup on vxlan/gre/geneve device deletion
  ipv4: igmp: Allow removing groups from a removed interface
  ipv6: sctp: implement sctp_v6_destroy_sock()
  arm64: bpf: add 'store immediate' instruction
  ipv6: kill sk_dst_lock
  ipv6: sctp: add rcu protection around np->opt
  net/neighbour: fix crash at dumping device-agnostic proxy entries
  sctp: use GFP_USER for user-controlled kmalloc
  sctp: convert sack_needed and sack_generation to bits
  ipv6: add complete rcu protection around np->opt
  bpf: fix allocation warnings in bpf maps and integer overflow
  mvebu: dts: enable IP checksum with jumbo frames for Armada 38x on Port0
  net: mvneta: enable setting custom TX IP checksum limit
  net: mvneta: fix error path for building skb
  ...
2015-12-03 16:02:46 -08:00
Will Deacon
d86b8da04d arm64: spinlock: serialise spin_unlock_wait against concurrent lockers
Boqun Feng reported a rather nasty ordering issue with spin_unlock_wait
on architectures implementing spin_lock with LL/SC sequences and acquire
semantics:

 | CPU 1                   CPU 2                     CPU 3
 | ==================      ====================      ==============
 |                                                   spin_unlock(&lock);
 |                         spin_lock(&lock):
 |                           r1 = *lock; // r1 == 0;
 |                         o = READ_ONCE(object); // reordered here
 | object = NULL;
 | smp_mb();
 | spin_unlock_wait(&lock);
 |                           *lock = 1;
 | smp_mb();
 | o->dead = true;
 |                         if (o) // true
 |                           BUG_ON(o->dead); // true!!

The crux of the problem is that spin_unlock_wait(&lock) can return on
CPU 1 whilst CPU 2 is in the process of taking the lock. This can be
resolved by upgrading spin_unlock_wait to a LOCK operation, forcing it
to serialise against a concurrent locker and giving it acquire semantics
in the process (although it is not at all clear whether this is needed -
different callers seem to assume different things about the barrier
semantics and architectures are similarly disjoint in their
implementations of the macro).

This patch implements spin_unlock_wait using an LL/SC sequence with
acquire semantics on arm64. For v8.1 systems with the LSE atomics, the
exclusive writeback is omitted, since the spin_lock operation is
indivisible and no intermediate state can be observed.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-03 19:37:59 +00:00
Will Deacon
24da208db3 arm64: enable HAVE_IRQ_TIME_ACCOUNTING
arm64 relies on the arm_arch_timer for sched_clock, so we can select
HAVE_IRQ_TIME_ACCOUNTING and have the core sched-clock code enable the
feature at runtime based on the rate.

Reported-by: Mario Smarduch <m.smarduch@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-03 19:37:10 +00:00
Yang Shi
df849ba3a8 arm64: bpf: add 'store immediate' instruction
aarch64 doesn't have native store immediate instruction, such operation
has to be implemented by the below instruction sequence:

Load immediate to register
Store register

Signed-off-by: Yang Shi <yang.shi@linaro.org>
CC: Zi Shen Lim <zlim.lnx@gmail.com>
CC: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Zi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-03 11:38:31 -05:00
Yury Norov
b9b7aebb42 arm64: fix COMPAT_SHMLBA definition for large pages
ARM glibc uses (4 * __getpagesize()) for SHMLBA, which is correct for
4KB pages and works fine for 64KB pages, but the kernel uses a hardcoded
16KB that is too small for 64KB page based kernels. This changes the
definition to what user space sees when using 64KB pages.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-02 14:00:10 +00:00
Jisheng Zhang
a7c61a3452 arm64: add __init/__initdata section marker to some functions/variables
These functions/variables are not needed after booting, so mark them
as __init or __initdata.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-02 12:17:11 +00:00
Caesar Wang
5378e28c97 arm64: dts: rockchip: add rk3368 evaluation board
This board is similar with the rk3288 evb board but the rk3368 top
board. There exist the act8846 as the pmic.

Moment, add the balight/thermal/emmc/usb.. stuff,
Let the board can happy work.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2015-12-02 00:35:22 +01:00
Caesar Wang
fa54322a94 arm64: dts: rockchip: add the pwm node info for RK3368 SoCs
The pulse-width modulator (PWM) feature is very common in
embedded systems. On the rk3368 there exist 4 built-in PWM channels.

In general, the pwm pins can via the pinctrl to
configure iomux mode except the pwm2 since the pwm2 iomux mode from
the SoC control register.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2015-12-02 00:19:39 +01:00
Chunfeng Yun
bfcce47af5 arm64: dts: mediatek: add xHCI & usb phy for mt8173
add xHCI and phy drivers for MT8173-EVB

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-01 10:45:51 -08:00
Will Deacon
76c714be0e arm64: pgtable: implement pte_accessible()
This patch implements the pte_accessible() macro, which can be used to
test whether or not a given pte is a candidate for allocation in the
TLB.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-01 09:47:03 +00:00
Mark Rutland
9c4e08a302 arm64: mm: allow sections for unaligned bases
Callees of __create_mapping may decide to create section mappings if
sufficient low bits of the physical and virtual addresses they were
passed are zero. While __create_mapping rounds the virtual base address
down, it does not similarly round the physical base address down, and
hence non-zero bits in the physical address can prevent use of a section
mapping, even where a whole next-level table would be used instead.

Round down the physical base address in __create_mapping to enable all
callees to always create section mappings when such a mapping is
possible.

Cc: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-01 09:47:03 +00:00
Mark Rutland
cc5d2b3b95 arm64: mm: detect bad __create_mapping uses
If a caller of __create_mapping provides a PA and VA which have
different sub-page offsets, it is not clear which offset they expect to
apply to the mapping, and is indicative of a bad caller.

In some cases, the region we wish to map may validly have a sub-page
offset in the physical and virtual addresses. For example, EFI runtime
regions have 4K granularity, yet may be mapped by a 64K page kernel. So
long as the physical and virtual offsets are the same, the region will
be mapped at the expected VAs.

Disallow calls with differing sub-page offsets, and WARN when they are
encountered, so that we can detect and fix such cases.

Cc: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-12-01 09:47:03 +00:00
Kuninori Morimoto
8a8f181d2c arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B
CS2000 needs AUDIO_CLKOUT as master clock which is generated
by Renesas sound, and Renesas sound needs CS2000 as ADUIO_CLK_B.
Because of this relationship, it will be dead-lock when driver probe.

cs2000: clk_multiplier@4f {
        ...
        clocks = <&rcar_sound 0>, <&x12_clk>;
        ...
};

&rcar_sound {
        ...
        assigned-clocks = <&cs2000>;
        ...
};

This patch is using dummy audio_clkout to avoid this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-12-01 15:32:06 +09:00
Kuninori Morimoto
40fbe14b54 arm64: renesas: salvator-x: set ak4613 In/Out pin as single-end
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-11-30 09:36:35 +09:00
Jisheng Zhang
5fbb15316f arm64: dts: berlin: PSCI-1.0 support
The firmware can support PSCI-1.0 in fact. This change also enables
suspend to ram on Marvell berlin arm64 SoC.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-11-28 12:30:08 +01:00
Jisheng Zhang
d2318f3402 arm64: dts: berlin4ct: add watchdog nodes
The Marvell Berlin BG4CT has 3 watchdogs which are compatible with the
snps,dw-wdt driver sit in the sysmgr domain. This patch adds the
corresponding device tree nodes.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-11-28 12:30:07 +01:00
Linus Torvalds
5d8686276a arm64 fixes:
- Build fix when !CONFIG_UID16 (the patch is touching generic files but
   it only affects arm64 builds; submitted by Arnd Bergmann)
 
 - EFI fixes to deal with early_memremap() returning NULL and correctly
   mapping run-time regions
 
 - Fix CPUID register extraction of unsigned fields (not to be
   sign-extended)
 
 - ASID allocator fix to deal with long-running tasks over multiple
   generation roll-overs
 
 - Revert support for marking page ranges as contiguous PTEs (it leads to
   TLB conflicts and requires additional non-trivial kernel changes)
 
 - Proper early_alloc() failure check
 
 - Disable KASan for 48-bit VA and 16KB page configuration (the pgd is
   larger than the KASan shadow memory)
 
 - Update the fault_info table (original descriptions based on early
   engineering spec)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWWJiuAAoJEGvWsS0AyF7xlWIP/3ma+ZSyitIS0FWOld/uo3c1
 KbH9i7DrEL9tOzz4AhkKHBA7LOs0NvNkjz2sPLbnVg57H6r2y6Bi1ls5ODUWFy6y
 CKI0aaCYhWPyYWDq6H9NfD5Xh6jx0+45dMqKiCy1mvpChEwPfW4aZGceKptNbBrG
 v0VG1H5s0U+SjNqKqZ3W/hbwyQ1ZvAXJ022q7/ihPt6s2U0ebjXqc+6S2TcJyWNn
 C0bDn40+MK7p8jqRrq80bAjAvC5yDQ7/o7fBsNzsVYhuNTA3HR5CG1jGMJwGcVvA
 NJt71vfBq8L4PT2ndt8BxC5G500GdkQk2Nb2i1G9EgakH8Yv5Y2deFTUFDYPTHBg
 EfUgORet2iBiCcLY+lLTonjKICsHi4Bn//DsyyEZ7HXAovS0DIH3rQfKubYNlT3p
 FR2eskr3cDoQei3L9u0YU1zn+OuWRS7yJdjisjcTAEFaRBKqRXYMoczhVvJPb5xQ
 RPtHZNAS0JXH+0Cmdo+nHjSfpEo20nefBvd3Xvs0jvwWKxS6rwexxQWYTKNTbycq
 5iTYOGXlequnyTztK5M0AcfAajE+EVT2mAXkD/C727tUdO7yiCh86CNLIREHK8sH
 cLnc2iJ12IsJmqV7uRPI5YjNmYau7ZQpfcRfflt1LlL7mx1VmSiyb4JeomGEE/gu
 IdJ1iBl2JGguat1DHIXU
 =YgtU
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Build fix when !CONFIG_UID16 (the patch is touching generic files but
   it only affects arm64 builds; submitted by Arnd Bergmann)

 - EFI fixes to deal with early_memremap() returning NULL and correctly
   mapping run-time regions

 - Fix CPUID register extraction of unsigned fields (not to be
   sign-extended)

 - ASID allocator fix to deal with long-running tasks over multiple
   generation roll-overs

 - Revert support for marking page ranges as contiguous PTEs (it leads
   to TLB conflicts and requires additional non-trivial kernel changes)

 - Proper early_alloc() failure check

 - Disable KASan for 48-bit VA and 16KB page configuration (the pgd is
   larger than the KASan shadow memory)

 - Update the fault_info table (original descriptions based on early
   engineering spec)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: efi: fix initcall return values
  arm64: efi: deal with NULL return value of early_memremap()
  arm64: debug: Treat the BRPs/WRPs as unsigned
  arm64: cpufeature: Track unsigned fields
  arm64: cpufeature: Add helpers for extracting unsigned values
  Revert "arm64: Mark kernel page ranges contiguous"
  arm64: mm: keep reserved ASIDs in sync with mm after multiple rollovers
  arm64: KASAN depends on !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
  arm64: efi: correctly map runtime regions
  arm64: mm: fix fault_info table xFSC decoding
  arm64: fix building without CONFIG_UID16
  arm64: early_alloc: Fix check for allocation failure
2015-11-27 11:09:59 -08:00
Linus Torvalds
4fe5e199eb xen: bug fixes for 4.4-rc2
- Fix gntdev and numa balancing.
 - Fix x86 boot crash due to unallocated legacy irq descs.
 - Fix overflow in evtchn device when > 1024 event channels.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWV1coAAoJEFxbo/MsZsTROo8H/1D69XtlQmLrAKWq4JafZrXM
 rYQoiRxW/yDNoA3whtOcK4TLf/JpA+B1VAoekXqSEG5Mv9YbIH1Su/y4KwF7WaeX
 xSL812ODeN8iYk8A52Zccw0gdl/emzLesPLuq5UrdDhehYp8vQGtk/CdvZIiQAAc
 of5Ds9ozIuKTcwDkxOZdUrSG0DvCuvhHBz4xrmuKkbs8CAornfQGBUPKb+vkS05b
 2IVzFhCtM2Bhsb8Ji4TfNjsH90T9tghb/QG73APniRMx+hn7CUHkifZ074tnGATp
 LdXCJ8D5C8WZx0QCklzcBZUpXbwWv9AWyZR8gZqhGUCMh9XGgByC3lqsMGFgwiM=
 =5872
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-4.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen bug fixes from David Vrabel:

 - Fix gntdev and numa balancing.

 - Fix x86 boot crash due to unallocated legacy irq descs.

 - Fix overflow in evtchn device when > 1024 event channels.

* tag 'for-linus-4.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/evtchn: dynamically grow pending event channel ring
  xen/events: Always allocate legacy interrupts on PV guests
  xen/gntdev: Grant maps should not be subject to NUMA balancing
2015-11-26 11:42:25 -08:00
Ard Biesheuvel
66362c9afc arm64: efi: fix initcall return values
Even though initcall return values are typically ignored, the
prototype is to return 0 on success or a negative errno value on
error. So fix the arm_enable_runtime_services() implementation to
return 0 on conditions that are not in fact errors, and return a
meaningful error code otherwise.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:15:54 +00:00
Ard Biesheuvel
81d945772a arm64: efi: deal with NULL return value of early_memremap()
Add NULL return value checks to two invocations of early_memremap()
in the UEFI init code. For the UEFI configuration tables, we just
warn since we have a better chance of being able to report the issue
in a way that can actually be noticed by a human operator if we don't
abort right away. For the UEFI memory map, however, all we can do is
panic() since we cannot proceed without a description of memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:15:49 +00:00
Suzuki K. Poulose
1944bf8e78 arm64: debug: Treat the BRPs/WRPs as unsigned
IDAA64DFR0_EL1: BRPs and WRPs are unsigned values. Use
the appropriate helpers to extract those fields.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:08:36 +00:00
Suzuki K. Poulose
4f0a606bce arm64: cpufeature: Track unsigned fields
Some of the feature bits have unsigned values and need
to be treated accordingly to avoid errors. Adds the property
to the feature bits and use the appropriate field extract helpers.

Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:07:59 +00:00