Граф коммитов

10405 Коммитов

Автор SHA1 Сообщение Дата
Will Deacon 75a19a0202 arm64: arch_timer: Ensure counter register reads occur with seqlock held
When executing clock_gettime(), either in the vDSO or via a system call,
we need to ensure that the read of the counter register occurs within
the seqlock reader critical section. This ensures that updates to the
clocksource parameters (e.g. the multiplier) are consistent with the
counter value and therefore avoids the situation where time appears to
go backwards across multiple reads.

Extend the vDSO logic so that the seqlock critical section covers the
read of the counter register as well as accesses to the data page. Since
reads of the counter system registers are not ordered by memory barrier
instructions, introduce dependency ordering from the counter read to a
subsequent memory access so that the seqlock memory barriers apply to
the counter access in both the vDSO and the system call paths.

Cc: <stable@vger.kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/linux-arm-kernel/alpine.DEB.2.21.1902081950260.1662@nanos.tec.linutronix.de/
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-30 11:04:23 +01:00
Andrew Murray 21137301de arm64: KVM: Fix perf cycle counter support for VHE
The kvm_vcpu_pmu_{read,write}_evtype_direct functions do not handle
the cycle counter use-case, this leads to inaccurate counts and a
WARN message when using perf with the cycle counter (-e cycle).

Let's fix this by adding a use case for pmccfiltr_el0.

Fixes: 39e3406a09 ("arm64: KVM: Avoid isb's by using direct pmxevtyper sysreg")
Reported-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-30 10:11:49 +01:00
Olof Johansson 6cbc4d88ad Bitmain SoC changes for v5.2:
- Added GPIO support for BM1880 SoC based on Designware APB GPIO
   controller
 - Added GPIO line names for Sophon Edge board based on 96Boards CE
   specification for accessing GPIOs using line names from userspace
   tools like MRAA.
 - Added pinctrl node for BM1880 SoC as a child node of sctrl syscon
   node.
 - Added pinctrl support to UARTs exposed on the Sophon Edge board.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZ6VDKoFIy9ikWCeXVZ8R5v6RzvUFAlzGixQACgkQVZ8R5v6R
 zvXzAwgAn+KrTa0tM+HdDFwW8S9jzPll9zOj5YcTSvopecsUu1d+qGy4knd3Ufev
 HzeuD8gfUfxqaZ5nX9yETQ7XH6zwz4kTvGLh3jHhkdZ+SH7AYEdro9d8fEx71YD1
 dEoUXSws5lWrvUusPzSsjWYCMbCOooBgXV2BjgK+jmVhE6HIDNSzIkQLrWRAgcxz
 V5VyLw2p+4vwY8cPBs7K6N8u453y1a5zcK3644a6dw58vqTRtg5++Acp0xrXg66b
 adFzIsUAto9W8mvwFYHwYty2NvdRWsSSnlZqfo8fopeUYUnzFKnlEHptisMcYuux
 ITN7ZkQFjVFKGXUZTV1CK4rIAby2kA==
 =7o9e
 -----END PGP SIGNATURE-----

Merge tag 'bitmain-soc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-bitmain into arm/dt

Bitmain SoC changes for v5.2:

- Added GPIO support for BM1880 SoC based on Designware APB GPIO
  controller
- Added GPIO line names for Sophon Edge board based on 96Boards CE
  specification for accessing GPIOs using line names from userspace
  tools like MRAA.
- Added pinctrl node for BM1880 SoC as a child node of sctrl syscon
  node.
- Added pinctrl support to UARTs exposed on the Sophon Edge board.

* tag 'bitmain-soc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-bitmain:
  arm64: dts: bitmain: Add UART pinctrl support for Sophon Edge
  arm64: dts: bitmain: Add pinctrl support for BM1880 SoC
  arm64: dts: bitmain: Add GPIO Line names for Sophon Edge board
  arm64: dts: bitmain: Add GPIO support for BM1880 SoC

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-29 10:06:33 -07:00
Olof Johansson 5f08da63d7 mvebu arm64 for 5.2 (part 1)
- Update the defconfig to enable the mv-xor driver found on the
    Armada 3700
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXL7CVgAKCRALBhiOFHI7
 1VzpAJ4g2dWLtkB9F1YlPOMGzfZnAPamKACgjUMB8UM2+avwae6rdk6oa3qudSQ=
 =gg0T
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-arm64-5.2-1' of git://git.infradead.org/linux-mvebu into arm/defconfig

mvebu arm64 for 5.2 (part 1)

 - Update the defconfig to enable the mv-xor driver found on the
   Armada 3700

* tag 'mvebu-arm64-5.2-1' of git://git.infradead.org/linux-mvebu:
  arm64: defconfig: enable mv-xor driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-29 09:46:45 -07:00
Olof Johansson 89f4f128ea i.MX arm64 device tree update for 5.2:
- Add initial i.MX8MM SoC and EVK board support.
  - Enable OPP table for cpufreq support on i.MX8MQ, i.MX8QXP and
    i.MX8MM.
  - A series from Andrey Smirnov to enable PCIe support for i.MX8MQ.
  - Add TMU (Thermal Management Unit) device on i.MX8MQ for managing
    thermal of CPU, GPU, and VPU.
  - Add SDMA and SAI2 devices for i.MX8MQ SoC and enable wm8524 audio
    support on EVK board.
  - Add LPUART, OCOTP and GPU devices for i.MX8MQ SoC.
  - Add initial i.MX8MQ based Zii Ultra board support
  - Add SCU general IRQ and watchdog support for i.MX8QXP.
  - Add audio related devices and PMU for LS1028A.
  - Enable SATA and cpuidle support for LX2160A.
  - Other small random updates.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJcvXYXAAoJEFBXWFqHsHzOWlEH/iJbC6k4poz0+q2/skY1yfRk
 7oJv+R62y6PiejRW44Rb/yY7H9D2WZS/r6lvo8XeG9zMJsKbi/NoeN9EUHu3uZDI
 xrhEz/joDCS9LyEfsibRWNSFjm5wXUMw5qa+wpvSMvS4ipOv2lySZKeBzmjQq55v
 2+OTO0S6r3totaJ203rp6jlmuhQK6NfC72umpcw8Wxmyfudi337xzbMH/dtm4Pb5
 Q9G322cywDjZ3TukgMqWqg/s8kya7iKkyVb6abvEEAmCR2JZYzO0+XOpVLHbLDEi
 lYC8ONALwOSyHW7mvxqB87qaCPinTH7PTKi3bNv+qgG1Fyemshs0nvPskaJO394=
 =MK87
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt64-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt

i.MX arm64 device tree update for 5.2:
 - Add initial i.MX8MM SoC and EVK board support.
 - Enable OPP table for cpufreq support on i.MX8MQ, i.MX8QXP and
   i.MX8MM.
 - A series from Andrey Smirnov to enable PCIe support for i.MX8MQ.
 - Add TMU (Thermal Management Unit) device on i.MX8MQ for managing
   thermal of CPU, GPU, and VPU.
 - Add SDMA and SAI2 devices for i.MX8MQ SoC and enable wm8524 audio
   support on EVK board.
 - Add LPUART, OCOTP and GPU devices for i.MX8MQ SoC.
 - Add initial i.MX8MQ based Zii Ultra board support
 - Add SCU general IRQ and watchdog support for i.MX8QXP.
 - Add audio related devices and PMU for LS1028A.
 - Enable SATA and cpuidle support for LX2160A.
 - Other small random updates.

* tag 'imx-dt64-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (41 commits)
  arm64: dts: lx2160a: add cpu idle support
  arm64: dts: imx8mq: fix GPU clock frequency
  arm64: dts: fsl: imx8mq-evk: link regulator to GPU domain
  arm64: dts: imx8mm: Add cpufreq properties
  arm64: dts: imx8qxp-mek: Add i2c1 with pca9646
  arm64: dts: imx8qxp: enable scu general irq channel
  arm64: dts: imx8mq: add GPU node
  arm64: dts: imx: add Zii Ultra board support
  arm64: dts: imx8mq: fix higher CPU operating point
  arm64: dts: imx8mq-evk: Enable PCIE0 interface
  arm64: dts: imx8mq: Add nodes for PCIe IP blocks
  arm64: dts: imx8mq: Combine PCIE power domains
  arm64: dts: imx8mq: Add a node for SRC IP block
  arm64: dts: imx8mq: Mark iomuxc_gpr as i.MX6Q compatible
  arm64: dts: imx8qxp: Add lpuart1/lpuart2/lpuart3 nodes
  arm64: dts: lx2160a: add sata node support
  arm64: dts: ls1028a: Corrected the SATA ecc address
  arm64: dts: imx8mq: Change ahb clock for imx8mq
  arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  arm64: dts: imx8qxp: add system controller watchdog support
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-29 09:26:55 -07:00
Boyang Zhou f08cae2f28 arm64: mmap: Ensure file offset is treated as unsigned
The file offset argument to the arm64 sys_mmap() implementation is
scaled from bytes to pages by shifting right by PAGE_SHIFT.
Unfortunately, the offset is passed in as a signed 'off_t' type and
therefore large offsets (i.e. with the top bit set) are incorrectly
sign-extended by the shift. This has been observed to cause false mmap()
failures when mapping GPU doorbells on an arm64 server part.

Change the type of the file offset argument to sys_mmap() from 'off_t'
to 'unsigned long' so that the shifting scales the value as expected.

Cc: <stable@vger.kernel.org>
Signed-off-by: Boyang Zhou <zhouby_cn@126.com>
[will: rewrote commit message]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-29 15:27:41 +01:00
Will Deacon bc15cf701f arm64: Kconfig: Tidy up errata workaround help text
The nature of silicon errata means that the Kconfig help text for our
various software workarounds has been written by many different people.
Along the way, we've accumulated typos and inconsistencies which make
the options needlessly difficult to read.

Fix up minor issues with the help text.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-29 14:21:11 +01:00
Olof Johansson fe08dd9eea Renesas ARM64 Based SoC Defconfig Updates for v5.2
+ Enable support for RX-8571/RX-8581 RTC
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAly52M0ACgkQ189kaWo3
 T77aJw/+Lo5uhF6EckfUPiCeqfuGGpfRvfI/NhBoT0uQwmHsTx5yk4LvRv8xmPjr
 C6qE7U5iypXvvBDyuA0vyaOEgt5WEk7VgdwIB1rorFXL5dPV3BkB0VUI6GhHCApM
 1RQQl8/0smYltBoLblfoYGi0l5Icp3nkBeOkD21H1WUl+0gtsj7wNw84Q8GkhAtz
 1oxOStLLyDYvfuogingG3fKvar7ZyIhy1x7HXf2NFfG6vbzg/u33wVqd9qi973/S
 l28nlDjukJH6CNI/YLOzYRvyToCsD2BiP1Ze6vD7XZr79lLxek8AVx02FM4p3eUv
 aTTPPITzkdLhXtFNnhRe0vUMIGJuXvg3yQvzDFMMxIz/Yg3tYcdIasQu01R2zjge
 IIyZtveiyYMIqJHi4ws14gUSTn2cUnZCWwm5kO+Wn2F/iLSFw1hETbIRlRMGaLt+
 5+2eGDLecxGqu0jeWOFxSC3gmK8cPerrcFPHvm83I+/F2U7O9Rek9bkqrr3DN3e6
 ZV+viUjcYh92GKT5K0/RNhnr0BcTTho2KZ/VGXQzRCb5GRa55PuPbhyUUa1k9iS9
 TAehaPWHW0fqd5IywsGR0WXdvP1gRl4cT7JbSnbYfeBX7B6txjD1bTCMgOgu9hcx
 /pBIWiFvuxMyZ/yZsnoRTnu2XltA7i3EBktFcQyu6z0H+YaDFVM=
 =cAnq
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/defconfig

Renesas ARM64 Based SoC Defconfig Updates for v5.2

+ Enable support for RX-8571/RX-8581 RTC

* tag 'renesas-arm64-defconfig-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: enable RX-8581 config option

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 23:39:27 -07:00
Olof Johansson 784baecf92 Allwinner arm64 defconfig changes for 5.2
Just a single patch to enable our SPI controller on the arm64 defconfig.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLmzPwAKCRDj7w1vZxhR
 xdmbAP0WZ/2DSFexF4dkaRMcMfZ74b10mh4Yvn9usm6nUll3NAEA2IbdPWLK+/pk
 ocj1Jwr4KHxHnMBXES1SQ6I9AYo9YAs=
 =bA+y
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config64-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig

Allwinner arm64 defconfig changes for 5.2

Just a single patch to enable our SPI controller on the arm64 defconfig.

* tag 'sunxi-config64-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: defconfig: Enable SPI_SUN6I

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 23:38:12 -07:00
Olof Johansson 82b8118d0c arm64: tegra: Default configuration updates for v5.2-rc1
These patches enable PWM fan and Tegra HDA support in the 64-bit ARM
 default configuration, so that these features are enabled by default.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAly4jv8THHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoUX+D/oDmy4P8LUMvTwj/qeby2JvMHTck3nu
 XB7SVYYzULb7XKBgnBbhRVC2MjuNGz7mLK7sANEX9dopIKjpih286vGDyEArpyAV
 Z2POwGCOoiPr4g8W9GHdvblrUlW+UXxAm80LWXYMv/kqcr9Puj/8d3szYyQhKZkN
 Jr1tHYarRzIzYy4VEypQ8EGUcrvoZZ+EOyptfqYCja+02BMpPZL0rz6v1b/cFdzv
 xUmKs5iWf9ercv9/ZhCBn1MGDlSjlLEOysLctrrAuXf2SF3iWKmusrbyZSbq22yn
 Jj60mUq84gWhpN05JhiX6OivPnLIMYSBtQSdOsM64h0b/uX52sALbzyCrRYSHiJQ
 OrX6TxiL8GBQ3BidlDXcGwiKTdvCHBa1/dYdLcD4cFtYbgGxcULf/WqoDiESSD9W
 j8vHTSQegE0HBSPqBe6h4guZce3A+1OvaYRwbpuuj9HuLUQStr3DqtK3XL5upLhz
 bWLnotlq7sD0pDVK/zWjdPRBVG7S/PIAj3zqKd1UWUg9u9XBy1mR9eb0FZLASINa
 h1oKqc1/kDF8TLrKSWSPtHbv9aoDXvkLqySzzkA0mr1HRMEdaipBdiMlKj/9nwbZ
 FnFVaWXkkLROsqR/UNkZRTj3fRjhywnA4ZNr2A5hDOgNnI7JkdwI6DfMd4Q5eOez
 7Nq+Myl/TAqHkQ==
 =rrf3
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.2-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig

arm64: tegra: Default configuration updates for v5.2-rc1

These patches enable PWM fan and Tegra HDA support in the 64-bit ARM
default configuration, so that these features are enabled by default.

* tag 'tegra-for-5.2-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Add PWM Fan support
  arm64: defconfig: Enable Tegra HDA support

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 23:37:08 -07:00
Valentin Schneider 7b3320e6b1 arm64: defconfig: Update UFSHCD for Hi3660 soc
Commit 7ee7ef24d0 ("scsi: arm64: defconfig: enable configs for Hisilicon ufs")
set 'CONFIG_SCSI_UFS_HISI=y', but the configs it depends
on

  (CONFIG_SCSI_HFSHCD_PLATFORM && CONFIG_SCSI_UFSHCD)

were left to being built as modules.

Commit 1f4fa50dd4 ("arm64: defconfig: Regenerate for v4.20") "fixed"
that by reverting to 'CONFIG_SCSI_UFS_HISI=m'.

Thing is, if the rootfs is stored in the on-board flash (which
is the "canonical" way of doing things), we either need these drivers
to be built-in, or we need to fiddle with an initramfs to access that
flash and eventually load the modules installed over there.

The former is the easiest, do that.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 23:19:50 -07:00
Olof Johansson 86c77f4944 ARM64 defconfig updates for v5.1
- 'make savedefconfig' cleanup
 - Enable PCIE_ALTERA and PCIE_ALTERA_MSI
 - Enable the Intel Stratix10 Service layer driver, FPGA manager and
   Altera Freeze Bridge driver.
 - Adds the Intel Agilex platform to the arm64 defconfig
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAly1L2MUHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPRWAA//fC4SWGsyTJmTTlIGXIE3O0BJ9RyT
 6lth0Hgmfq9MhNNgvXEZzf26vH1WgCN57A2c065W9jp3T4lMaUyIRX/3hHBDq0EN
 z00EeBqHZMoeHFTi3Q0lmtm6GRlsydaqD9Eif2OThcRdtKLq6cgqhF75aoxFkVZm
 Y/85gUMX1w4xjiJmh1sC94RMUfYtjP/+rKFAEcs8hHrooJ2djdF8iyyQMLpuhS0L
 6gH25oKRzSDBXM1rvttSIw10CXI2NDym9v4dB2vHxB9RtrqH0VQ03UIOlCjit8CP
 BqgGiDspDF1sNyVToPyc/u9+3KWe9Ox/yev7OWQbapgG7dvkk3B7jma6UZvUCA/x
 71nXZnFkusop+p2+uFtIY84aA7G34Ps0tQOI29EnXXIJQsNOFGtaAK2AShnMmFYG
 hQP3rd2ZzvpjklcTbsCuLkqAnENAFQSdKfdQzrmofcJUkqNaY51sKIPMni1Te1LA
 dXlyi1Nsen0FTnkulLaTZnqFjD7AAWhJ7XTSdAeYeKj1/4G2Eb52s2nFnxhvk6Cc
 Dj2wlYqjveFikybQq0SOfLw1ReD6IG9fUxO3YOGPRthEqEkxtbZx7YXgKYVpQ8YZ
 AltuaBCIffyK6jh2yd2A8iUqNtH0CabmGxTY02JuE8pJArGQzAlYUSiMzXPYMSBJ
 3WMhqqsY5bFYzeY=
 =Lem8
 -----END PGP SIGNATURE-----

Merge tag 'arm64_defconfig_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/defconfig

ARM64 defconfig updates for v5.1
- 'make savedefconfig' cleanup
- Enable PCIE_ALTERA and PCIE_ALTERA_MSI
- Enable the Intel Stratix10 Service layer driver, FPGA manager and
  Altera Freeze Bridge driver.
- Adds the Intel Agilex platform to the arm64 defconfig

* tag 'arm64_defconfig_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: defconfig: include the Agilex platform to the arm64 defconfig
  arm64: defconfig: enable fpga and service layer
  arm64: defconfig: enable PCIE_ALTERA

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 23:11:56 -07:00
Manivannan Sadhasivam 470fa42933
arm64: dts: bitmain: Add UART pinctrl support for Sophon Edge
Add pinctrl support for UARTs exposed on the Sophon Edge board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2019-04-29 10:47:41 +05:30
Manivannan Sadhasivam c1294fb5cb
arm64: dts: bitmain: Add pinctrl support for BM1880 SoC
Add pinctrl support for Bitmain BM1880 SoC. This SoC only supports
pinmuxing and the pinctrl registers are part of the sctrl block.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2019-04-29 10:47:36 +05:30
Manivannan Sadhasivam 9fe408413f
arm64: dts: bitmain: Add GPIO Line names for Sophon Edge board
Add GPIO line names for Sophon Edge board based on BM1880 SoC from
Bitmain. Line names are based on the board schematics as well as the
96Boards Consumer Edition specification v1.0.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2019-04-29 10:38:40 +05:30
Manivannan Sadhasivam 367e592788
arm64: dts: bitmain: Add GPIO support for BM1880 SoC
Add GPIO support for Bitmain BM1880 SoC based on Designware APB GPIO
controller IP. IP exposes 3 GPIO controllers with a total of 72 pins.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2019-04-29 10:38:29 +05:30
Olof Johansson c7edf19716 Allwinner fixes for 5.1
- Pinctrl related fixes for the A33 NAND controller
  - Fix the refcounting of DT nodes in our core code
  - Fix for a typo'd DT property
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLmrygAKCRDj7w1vZxhR
 xWPzAPsG8IOfePeDDq5QtpXuO/ksMCb1H/+1dsHwe6yW2CFrQwD/W3p/n5i/ervO
 tUtfb4a4uz0WthUrApkWlCUS30IGdwU=
 =/Hf9
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes

Allwinner fixes for 5.1

 - Pinctrl related fixes for the A33 NAND controller
 - Fix the refcounting of DT nodes in our core code
 - Fix for a typo'd DT property

* tag 'sunxi-fixes-for-5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sun8i: a33: Reintroduce default pinctrl muxing
  arm64: dts: allwinner: a64: Rename hpvcc-supply to cpvdd-supply
  ARM: sunxi: fix a leaked reference by adding missing of_node_put
  ARM: sunxi: fix a leaked reference by adding missing of_node_put

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 13:25:29 -07:00
Olof Johansson 0b6cf36a47 Samsung DTS ARM64 changes for v5.2, second round
DTC warning fixes: move fixed-clocks, timer and pmu nodes outside of soc
 node.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAlzFuxQQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1/y3D/9jSRCF84zZfiwiWfY6ThFZGzzV7Czz9QAA
 292mY6Lom/dG2rZpppdKMUafsfzmv2BwfO3nFCMmWWfjr/zXFM7073f2olflegCU
 paXaC6O3+G7/v5/72W4UuTUgJXcSQj8w5jWI58ylcx/zEpQzDJV/YKe5WgXstu8D
 G1xBw2wRy4aZzW3EIA/mfraKZnPzLA0jSJSpOyoQtLyR1/cgd64QYm9IIXBXItVF
 thVXctlfqlzHLABWQKrTO1eJCNv251d6cH/JzcKJQXpoLTaYFfHEntKlyLBKa07n
 ZokDznA4idGrEhM5WdSa3BhSXVdesquDgZ6E1OEMJq1gPmG+pI16qBkmM+924Crw
 KIfUboxG49bENkspB6IZA7Uk+/JijKno4ZO8NGsLLN+8M8T4Q0dkN8V53ders+1Q
 ztsrHpXXe+ozI44mllpxy9l4xiqak51Zat41mEnecUha09d7EJ8uQbvJVN9T1nBm
 KScg9mFahXVvfBHx6oYuUfC55XDbLT2xNK5GkNC2n1XqKB3ZMuzvSi+4Jpvc5QyA
 YJP4HDOybEKBfs2CJyyH9p3BoJNqIDdPh8fI9nTio3cp8pYIIKtkbIHcOv12UPrY
 85NG8P+xNNlAgBV4IuaZFGO2r2AtPwf+Z7pj5jGc6YsBQMJPDUrDjnIWEebolIbc
 eGdr29OE3w==
 =HEmT
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-5.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt

Samsung DTS ARM64 changes for v5.2, second round

DTC warning fixes: move fixed-clocks, timer and pmu nodes outside of soc
node.

* tag 'samsung-dt64-5.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: Move fixed-clocks out of soc
  arm64: dts: exynos: Move pmu and timer nodes out of soc

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 13:02:46 -07:00
Olof Johansson 97fc172d86 Qualcomm ARM64 Updates for v5.2 - Part 2
* Add ADC temp for temp alarm node on PM8998
 * Add ref clks for DSI PHYs on SDM845 and MSM8916
 * Add CPU capacity and topology on SDM845
 * Add display and gpu related nodes on MSM8996
 * Add sound and hdmi display support on DB820C
 * Fixup thermal nodes on MSM8998 platform
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcwoc2AAoJEFKiBbHx2RXV79sP/1l5EzWuFvypYASL+GTO7p2V
 VUdsg6LQIniM1+A3WbYfHHX6gaydbd/M1fzt4gbK7bMcCfMkIkC5awvORjYF723n
 LohxsAv0VVSEYZQBO6cPyP0TYPrUaIvtyjuazXHVJ+sdoapkuX6n8/nlsiBtqrAs
 3gsH3CHYLkDH2OZdUqwiMmksXjg15sXCiCrGgygNYISyV43tujPDBCy5632RF14j
 AHqL0WdyqJE5CxTJ70I9jZis4x0Ramj56fdhjue6zOZ8uGEcXgBezOyao8T8CpxK
 cbl9KhYDQBHK+DC991lzEJsqYrup+xeZ1P+PI7HVILYogcyjRa8ZvnKQ3DXimhSW
 6bUWKjsDmONMiKFXZDsDFnZYrOIH2gdd2q+Ve4J++zeGahqn3MbL1JxFBCgKnQ+S
 dAWgk/iSazbwrqxRcpkn4SsRsrdFxBVMWMWU3OVTgcDV/6wHATcCMqW114djlYMJ
 jNU9JiqHFntDX/WRu8ZIVGxv7qPhD0DL1w0NK+5gPofnfGasDjMppaH058xHJqPO
 9F8+zaKljzoIzXiEyk2j/VimFuL6caLI7kv0Qi1WC0hAA1oJ8ZzPMe8eWCnFuG22
 Ldn/Dr3iKIzv8L3x03EIA1raNB6sMhSZgb7IEFb7CC8QJ3BjeDR2izTnDk5kIKWO
 14/sVe2utNiUOBZr9u2r
 =99VN
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into arm/dt

Qualcomm ARM64 Updates for v5.2 - Part 2

* Add ADC temp for temp alarm node on PM8998
* Add ref clks for DSI PHYs on SDM845 and MSM8916
* Add CPU capacity and topology on SDM845
* Add display and gpu related nodes on MSM8996
* Add sound and hdmi display support on DB820C
* Fixup thermal nodes on MSM8998 platform

* tag 'qcom-arm64-for-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: dts: msm8998: thermal: Restrict thermal zone name length to under 20
  arm64: dts: msm8998: thermal: Fix number of supported sensors
  arm64: dts: msm8998-mtp: thermal: Remove skin and battery thermal zones
  arm64: dts: db820c: Add sound card support
  arm64: dts: apq8096-db820c: Add HDMI display support
  arm64: dts: Add Adreno GPU definitions
  arm64: qcom: msm8996.dtsi: Add Display nodes
  arm64: dts: msm8996: Add display smmu node
  arm64: dts: msm8996: Add graphics smmu node
  arm64: dts: sdm845: Add CPU capacity values
  arm64: dts: sdm845: Add CPU topology
  arm64: dts: sdm845: Set 'bi_tcxo' as ref clock of the DSI PHYs
  arm64: dts: qcom: msm8916: Set 'xo_board' as ref clock of the DSI PHY
  arm64: dts: qcom: pm8998: Use ADC temperature to temp-alarm node

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 13:01:50 -07:00
Olof Johansson b726e211b9 Bulk conversion of remaining gpios to the helper constants, new peripherals
for the rk3328-roc-cc and some minor fixes for rk3399 and rockpro64.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAly/g+YQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgX5oB/0Sub17eWc+RSKRLTKoBZooMK+aS4iEqzl9
 T3Um1m0c/zR5XY+cMnmlvBUp9ryu/XEjiX9pi2EiE/Oio2Ty6t4q/4td+9BvH+gb
 TbCmNI+ZVWvqrMyRAPjrXT3lJc2dOIWbf9Ej02MdZC/WSG5JfWMKfI8PxZRV4IlW
 TSJbQLVVjrVcFk0J2Ov/iDyIuDNBOhN4zUNm3YbBGLJ0Wa0KmoaHa0qtTK5SRcEm
 ZUztuzscla5nWo2kXI2Aw2UMiparGaqGT+uAODGdhIbgIsa+o2D9WzAfW4xalvlJ
 NSzXvJIHGIDdWmBEku8JNitWh3S85Y4DYfXv/kGqWU6CYGaTqr5z
 =Sd0J
 -----END PGP SIGNATURE-----

Merge tag 'v5.2-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

Bulk conversion of remaining gpios to the helper constants, new peripherals
for the rk3328-roc-cc and some minor fixes for rk3399 and rockpro64.

* tag 'v5.2-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: fix IO domain voltage setting of APIO5 on rockpro64
  arm64: dts: rockchip: fix cts, rts pin assign of UART3 for rk3399
  arm64: dts: rockchip: bulk convert gpios to their constant counterparts
  arm64: dts: rockchip: enable display nodes on rk3328-roc-cc
  arm64: dts: rockchip: eMMC additions for rk3328-roc-cc

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 13:00:33 -07:00
Olof Johansson ad88400145 mt8173:
- use assinged-clocks and assigned-clock-parents
 - fix compatible for SoC to a72
 - add pmu nodes
 
 mt8183:
 - add sysirq binding
 - add pinctrl dt header file
 
 mt7629:
 - update bindings description fo sysirq, uart and scpsys
 
 mt8516:
 - add binding description for watchdog, timer, uart and sysirq
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEiUuSfQSYnG8EMsBltDliWyzx00MFAly/N3cXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQtDliWyzx00MgsQ/+PJskV7y1fW26XPg/fu7EkzMZ
 fxEfgvHncadJGz10B9UF4t5+B+WW3HyY1kklzOhVsBSk3psMCYIu/J09MSPFtAgX
 yZ8Xeo8inwKakOwn3jY4a8sloilNFaJX5zJZLVLWHMoBPMugvy2ROBquMxFHdM7r
 yde6ZoKxR0XPyRr1abbma8cmGS2UZA9pD9Vakawk34NcmADKNwwtl23LXAitevCR
 xfa8Ln0vsRUpz9JZSQ32yYGnE4OsxkOFn8dwtiKlKd8wzxExGRU+8E5kVZlX9P3f
 oe5EsRW+3whCEzF+rW9udjAOeYrdDBckR3vsho34TVWOkdGpunj/duvNOLLKD0sl
 +mzEty+tWDEc6IK0aEJT6SK87WfLOLIOYIWLA2eSd3kjoB48XmxQ+WUB2ogAgZzQ
 AsUWjGKwbse1xKjMTV1A8AJsDLN8lMwURyVmaSjA3HOhC3BC2X25XGBQ+srogSzj
 U6h128D5OKiXqp+n2EwCmfX+NKlWgT6IPENgRiaALfahGelWhpdhKRMF5v4jOgXO
 6ev/djagiqpLz4zIO7RnisbdqcObhxRobWOwmnHBa6BkdHxs+8EH7X8jnVXoIN2/
 43plOEn7Wt7sMBdRdzrSM6m7PaRn1ttefHq4YQx2TaNJj3AGBYwS7rCCVlwtgXck
 HtYZ4FCkNeqOhTq7/EY=
 =KVpr
 -----END PGP SIGNATURE-----

Merge tag 'v5.1-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt

mt8173:
- use assinged-clocks and assigned-clock-parents
- fix compatible for SoC to a72
- add pmu nodes

mt8183:
- add sysirq binding
- add pinctrl dt header file

mt7629:
- update bindings description fo sysirq, uart and scpsys

mt8516:
- add binding description for watchdog, timer, uart and sysirq

* tag 'v5.1-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt8173: add pmu nodes for mt8173
  arm64: dts: mt8173: correct cpu type of cpu2 and cpu3 to cortex-a72
  dt-bindings: irq: mtk,sysirq: add support for MT8516
  dt-bindings: serial: mtk-uart: add support for MT8516
  dt-bindings: timer: mtk-timer: add support for MT8516
  dt-bindings: wdog: mtk-wdt: add support for MT851
  dt-bindings: soc: fix a typo for MT7623A
  dt-bindings: mediatek: update bindings for MT7629 SoC
  arm64: dts: mt8183: add pinctrl file
  dt-bindings: mtk-sysirq: Add compatible for Mediatek MT8183
  arm64: dts: Using standard CCF interface to set vcodec clk

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:59:22 -07:00
Robin Murphy c8e3993dd5 dt-bindings: hwmon (pwm-fan) Remove dead "cooling-*-state" properties
The old "cooling-{min,max}-state" properties for thermal bindings were
ratified to "cooling-{min,max}-level" by commit eb168b70de ("of:
thermal: Fix inconsitency between cooling-*-state and cooling-*-level"),
which were later removed entirely by commit e04907dbc2 ("dt-bindings:
thermal: Remove "cooling-{min|max}-level" properties").

The pwm-fan binding, however, was apparently in-flight in parallel with
that ratification, and so managed to introduce an example of the old
properties which escaped the scope of the later cleanup and has thus
continued to be dutifully copied for new boards despite being useless.
Clean up these remaining undocumented anachronisms to minimise any
further confusion.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:54:31 -07:00
Olof Johansson 40a250ae69 mvebu dt64 for 5.2 (part 1)
Add wlan_disable signal hog for rfkill signal on clearfog-gt-8k
 (Armada 8040 based board)
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXL7EYQAKCRALBhiOFHI7
 1f2CAJ4nM5kwS3ogb4dRIixdHzTVxZZabwCdE2uvCR2nncS4NC05L07TKISs/pk=
 =v9Z0
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-5.2-1' of git://git.infradead.org/linux-mvebu into arm/dt

mvebu dt64 for 5.2 (part 1)

Add wlan_disable signal hog for rfkill signal on clearfog-gt-8k
(Armada 8040 based board)

* tag 'mvebu-dt64-5.2-1' of git://git.infradead.org/linux-mvebu:
  arm64: dts: clearfog-gt-8k: add wlan_disable signal hog

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:53:52 -07:00
Olof Johansson 38c2f3826d Qualcomm ARM64 Updates for v5.2
* Add gpio ranges for Qualcomm platforms
 * Fix MSM8998 BLSP2 I2C5 address
 * Add MSM8998 UFS nodes and associated information
 * Add SDM845 interconnect header and usage
 * Add ADSP and CDSP PAS, RMTFS memory, and UFS phy reset on SDM845
 * Update reserved memory map on SDM845
 * Add QCS404 spmi regulators, ethernet, bluetooth, and uart3
 * Remove remotely-controlled property as default for BAM on QCS404
 * Add spmi regulators on PMS405
 * Fixup QCS404 l3 voltages and regulator supply names
 * Fixup thermal trip names on Qualcomm platforms
 * Add thermal sensors on Qualcomm platforms
 * Remove invalid efficiency property on MSM8998
 * Change QCS404-evb compatible to help distinguish platforms
 * Add rpmhd header file and convert to use definitions on SDM845
 * Add interconnect header file on SDM845
 * Add PMS405 ADC binding
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcvp8dAAoJEFKiBbHx2RXV0lcQAMhrmgw9ZM72Nx3pNR0dwdqW
 fDoLxKPmV36ZO7EYmnV2CHwAH4a0wVzLsySD8yI/BuxzDplg1sxvKGQ9QDOxZmhn
 jFLX05qBDz67Zs1gwH8g2fVs/7cZCu0epNNhgZeTzSvfRORaXpfaNkPslpvUPhBs
 08++Brs6LQhGTf9xW+0I6JBUPg7QRKA2ZoiFdZ/x0SYX4nKFqnAuVqj3XZnYWe2C
 Wt9kYceYSOnw0dfa4cV2Q85a5wKQjbb/fLtZyLUGgfKbGpZO8L5GeJDyuLaugvzB
 4aT63m9foJRi2RePjQXq4nQQQPdFNXwcWHLR02svjq2IJaZQfRnzZbxKAzr5DraH
 ZaUchXLn8yvpTCm04lRZYNzea2ltQ26mCTFG2RGtCR/WMqJ9zh6Er1vgn4lvSdCZ
 ejsK2VNTUP9fpwVefObJUdEyS65ca5P1uKZVavwV6E64l8SaWwthGB+f24r/t7Om
 4zVpxS/QuQdstIns09En69Hee0cQetG8JdP0fFserhAauZTQsWShzsnc8scdOCXB
 /rm8XbsHKoitIZgJy+v5c82OfRvKC8wtnRT5RbLH+s/dHBzxhNMjSQ4FDAkwDTZT
 cb1SU4r44/iQ8XngbukVGyPTYnm0ECF8jqdMgV00GnEPn8Donc/HTQ52pxtXKdie
 FS0vEami4Q8R+KwG5fFv
 =piHY
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into arm/dt

Qualcomm ARM64 Updates for v5.2

* Add gpio ranges for Qualcomm platforms
* Fix MSM8998 BLSP2 I2C5 address
* Add MSM8998 UFS nodes and associated information
* Add SDM845 interconnect header and usage
* Add ADSP and CDSP PAS, RMTFS memory, and UFS phy reset on SDM845
* Update reserved memory map on SDM845
* Add QCS404 spmi regulators, ethernet, bluetooth, and uart3
* Remove remotely-controlled property as default for BAM on QCS404
* Add spmi regulators on PMS405
* Fixup QCS404 l3 voltages and regulator supply names
* Fixup thermal trip names on Qualcomm platforms
* Add thermal sensors on Qualcomm platforms
* Remove invalid efficiency property on MSM8998
* Change QCS404-evb compatible to help distinguish platforms
* Add rpmhd header file and convert to use definitions on SDM845
* Add interconnect header file on SDM845
* Add PMS405 ADC binding

* tag 'qcom-arm64-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (38 commits)
  arm64: dts: sdm845: Introduce ADSP and CDSP PAS nodes
  arm64: dts: qcom: sdm845: Define rmtfs memory
  arm64: dts: qcom: sdm845: Update reserved memory map
  arm64: dts: sdm845: Add UFS PHY reset
  arm64: dts: qcom: msm8998: Fix blsp2_i2c5 address
  arm64: dts: qcom: qcs404-evb: Change the compatible to distinguish platforms
  arm64: dts: qcom: pmi8998: add gpio-ranges
  arm64: dts: qcom: pmi8994: add gpio-ranges
  arm64: dts: qcom: pm8998: add gpio-ranges
  arm64: dts: qcom: pm8005: add gpio-ranges
  arm64: dts: msm8998: Add UFS phy reset
  arm64: dts: msm8916: thermal: Convert camera trip type to hot
  arm64: dts: msm8996: thermal: Make trip names consistent
  arm64: dts: msm8916: thermal: Make trip names consistent
  arm64: dts: msm8998: thermal: Make trip names consistent
  arm64: dts: sdm845: thermal: Add temperature sensors near major peripherals
  arm64: dts: msm8998: thermal: Add temperature sensors near major peripherals
  arm64: dts: msm8998: thermal: GPU has two sensors, add the second
  arm64: dts: msm8998: thermal: Fix the gpu sensor number
  arm64: dts: msm8998: thermal: Fix the cpu sensor numbers
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:52:08 -07:00
Olof Johansson 1e67323721 arm64: dts: Amlogic updates for v5.2, round 2
- add display/gfx support for G12a boards
 - enable USB for g12a boards
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAly8ghgACgkQWTcYmtP7
 xmXqyg/9HtVrO5aNLEmGi3l/YySSH7fSp5BNnvTzlT8SpB1vBAKLXWjemVss2XVE
 QEE7d1UyUoXwgE4GoAyguuuj0Ov+JwYRTQb+OZKliALPlHfQQkklN8FKVMnDzEz7
 u1ivVqmoXzwqW32NW3a24AyGLgQXgJi2+ctAZSGNd+pLydwANLCB+Ffc1I4fTmW0
 kwLnqBgyVMxhbgRw6Blj9nh+ZlQOLwktpiMfrOwIpV0WLT3LZdRMrY1M/SnP+4+B
 Pq2BEzBAaHC5cNjQ3TjEj+nckXnrncJ0V6DepT+UIOC8L61rsb/tQAx8ecVVoHcW
 TTsQ3fewNcqIrKLRFpyNpXEAEAzlciwpV8lDczY5fLv5/j0MHiRSwBctj1pcK+CF
 Rsl2NygGZv0SuU0hDsDfEzVGLPjD1VYVGSJezWaaNzhjLw4sDUylBsKOcMNui4fW
 IUT3ahdjtvp03xjlGWAd1NI/MkYuu3RxJ2wR28vPEUGu2JEVpI8PtkR1FVqRIwBU
 Qd20x3bAn76zxMSWrsmDiTAa0+HMqjUbhzyeJxKPV5ON5k7RbmADrQ2rvxx+E4Uj
 FR3S6iulwaXDxIrvKZvTJDX3Myf2EL0bck5/XlKrD/B8tN5dCBgySA+SGHLhIiwZ
 XpCQmP6nLzZayeU4TX7jvAQdbhmR5GYCpO7SsIFTz7fJr6Vb8lM=
 =T6Im
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-dt64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt

arm64: dts: Amlogic updates for v5.2, round 2
- add display/gfx support for G12a boards
- enable USB for g12a boards

* tag 'amlogic-dt64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (26 commits)
  arm64: dts: meson-g12a-u200: Add support for Video Display
  arm64: dts: meson-g12a-sei510: Add support for Video Display
  arm64: dts: meson-g12a-x96-max: Add support for Video Display
  arm64: dts: meson-g12a: Add AO-CEC nodes
  arm64: dts: meson-g12a: Add VPU and HDMI related nodes
  arm64: dts: meson-g12a-x96-max: Enable USB
  arm64: dts: meson-g12a-u200: Enable USB
  arm64: dts: meson-g12a-sei510: Enable USB
  arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
  arm64: dts: meson-g12a-u200: add regulators
  arm64: dts: meson: g12a: Add mali-g31 gpu node
  arm64: dts: meson: g12a: Add G12A USB nodes
  arm64: dts: meson: g12a: Add SAR ADC node
  dt-bindings: power: amlogic, meson-gx-pwrc: Add G12A compatible
  arm64: dts: meson-gxm: Add Mali-T820 node
  dt-bindings: gpu: mali-midgard: Add resets property
  dt-bindings: clock: meson8b: export the video decoder clocks
  dt-bindings: clock: meson8b: export the VPU clock
  dt-bindings: clock: g12a-aoclk: expose CLKID_AO_CTS_OSCIN
  dt-bindings: clock: meson8b: drop the "ABP" clock definition
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:50:02 -07:00
Olof Johansson 64f32d9d30 Second Round of Renesas ARM64 Based SoC DT Updates for v5.2
* R-Car H3 (r8a7795), M3-N (r8a77965) and E3 (r8a77990) SoCs
   - Describe CMT devices in DT
 
 * R-Car M3-N (r8a77965) SoC
   - Remove unecessary reg-names of display node
 
 * R-Car V3H (r8a77980) SoC
   - Add missing "renesas,id" property to VIN of device tree
 
 * RZ/G2E (r8a774c0) based CAT874 board
   - Add USB-HOST support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAly52g0ACgkQ189kaWo3
 T77vmw/+I4Rl6nK3aN3Drowy6rXFw3qO4Lxdudva7auV65VKcdIjeQQueyQBLslq
 5/9T6K/1ewcKYy9fMWS14lyw6O2gmZD5WUeqFlmsxzXqr/0e2X3cOJ/gB7yg3I4+
 PGDiFH9L4AV09eZM/emPvoh8gUKi6kL7A2MrCdv8+8qyTyV3kWvJKAtodRgh22RJ
 BSEuNXAJts03af/8QPCYpu2kkRHIzTqBN5AKnLAy0UafMWVNDR+I1ynOTJ6wyDV+
 0wckrti4uTU25khZbr+bnn/jth7L02ejztU/A186JydgoPAZJ5b3l7rKlMLAMhP3
 6JCLm/9aKsVd+72mKBjubfNHIBz49zQM2pVADQ7prYFMA9iBuBngTfZUwRFzTWCd
 fx45s+9rTYZa3en3Q4l4gO0lPL6HTfdaQZgqSpC3CBG2Tri5KqNIBWo7eTp8eJIp
 +lBRe0djW8/Z8kwx3x8c/wCVORR5cqYKtlMj0X3S6rVvQsUQsOGz0Mm5gyJrQQfI
 MKT5C+R8Pup8GX3wR9lk1Pf8F8Rw8FOVmEfAleJA7z6anri7icy9ttA/49OriF6N
 RB2W473dElQSYeSNFkX2jrSigxw8PlXkwgjwU9mBRiODWxKZOznGErK4JCVzVybR
 MVERKLH9wmMypdB6drhpmSbkrKoaMjdwaPmMpfPi+LguU3v0ueI=
 =FMAR
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt2-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/dt

Second Round of Renesas ARM64 Based SoC DT Updates for v5.2

* R-Car H3 (r8a7795), M3-N (r8a77965) and E3 (r8a77990) SoCs
  - Describe CMT devices in DT

* R-Car M3-N (r8a77965) SoC
  - Remove unecessary reg-names of display node

* R-Car V3H (r8a77980) SoC
  - Add missing "renesas,id" property to VIN of device tree

* RZ/G2E (r8a774c0) based CAT874 board
  - Add USB-HOST support

* tag 'renesas-arm64-dt2-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: dts: renesas: r8a77980: Add "renesas,id" to VIN
  arm64: dts: renesas: r8a77965: Remove reg-names of display node
  arm64: dts: renesas: r8a77990: Add CMT device nodes
  arm64: dts: renesas: r8a77965: Add CMT device nodes
  arm64: dts: renesas: r8a7795: Add CMT device nodes
  arm64: dts: renesas: cat874: Add USB-HOST support

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:43:06 -07:00
Olof Johansson 68a3ead584 Allwinner H3/H5 changes for 5.2
Our usual bunch of changes shared between arm and arm64, the most notable
 one being:
   - Fix of improper usage of DT bindings, thanks to the DT validation
   - Add the SID for the H3 and H5
   - New board: RerVision H3-DVK
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLm2aQAKCRDj7w1vZxhR
 xQJYAQDs7mcoEHwBqw+1iZGmHZuvj4jJXdAd/FkmoujMawaGoQD/a4zddy8AL7s9
 WA9I42cSuBwfZjftLX/br4Ycssd1sgQ=
 =90I8
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-h3-h5-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Allwinner H3/H5 changes for 5.2

Our usual bunch of changes shared between arm and arm64, the most notable
one being:
  - Fix of improper usage of DT bindings, thanks to the DT validation
  - Add the SID for the H3 and H5
  - New board: RerVision H3-DVK

* tag 'sunxi-h3-h5-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sun8i: mapleboard: Remove cd-inverted
  ARM: dts: sunxi: h3/h5: Remove useless phy-names from EHCI and OHCI
  ARM: dts: sun8i: h3: bluetooth for Banana Pi M2 Zero board
  ARM: dts: sun8i: h3: Add default dr_mode
  ARM: dts: sun8i: h3: Refactor the pinctrl node names
  ARM: dts: sunxi: h3/h5: Remove stale pinctrl-names entry
  ARM: dts: sunxi: h3/h5: Add device node for SID
  ARM: dts: sun8i-h3: Add support for the RerVision H3-DVK board

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:42:35 -07:00
Olof Johansson b76cabc9de Allwinner arm64 DT changes for 5.2
Our usual bunch of patches, the most notable one being:
   - Fixing the DTC warnings
   - Fix DT bindings not being properly respected, thanks to the DT
     validation
   - New Board: Oceanic 5205, Beelink GS1, Orange Pi3
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLm03gAKCRDj7w1vZxhR
 xVkaAP4qZrFTs5vzvZU0yl9B/26eX9MxlMEmeQ30pQRAFT3PDQEA7Wzb7LWABPvV
 rXhqQSt7Xwbga9XmKP3DAMjh+SZwGw8=
 =+coj
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt64-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Allwinner arm64 DT changes for 5.2

Our usual bunch of patches, the most notable one being:
  - Fixing the DTC warnings
  - Fix DT bindings not being properly respected, thanks to the DT
    validation
  - New Board: Oceanic 5205, Beelink GS1, Orange Pi3

* tag 'sunxi-dt64-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (22 commits)
  arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node
  arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1
  arm64: dts: allwinner: Fix DE2 bus node name
  arm64: dts: allwinner: Remove useless phy-names from EHCI and OHCI
  arm64: dts: allwinner: h6: Add MMC1 pins
  arm64: dts: allwinner: h6: Add Orange Pi 3 DTS
  arm64: dts: allwinner: h6: Introduce Beelink GS1 board
  dt-bindings: vendor-prefixes: add AZW
  arm64: dts: allwinner: h6: move MMC pinctrl to dtsi
  arm64: dts: allwinner: h6: Add device node for SID
  arm64: dts: allwinner: a64: Fix the Codec I2S binding
  arm64: dts: allwinner: a64: Add default dr_mode
  arm64: dts: allwinner: Fix pinctrl node names
  arm64: dts: allwinner: a64: Add missing PIO clocks
  arm64: dts: allwinner: a64: Fix display pipeline endpoints
  arm64: dts: allwinner: a64: Fix the TCON output clock
  arm64: dts: allwinner: h6: Add Video Engine node
  arm64: dts: allwinner: a64: Add cross links for the mixers
  arm64: allwinner: a64: Add Oceanic 5205 5inMFD initial support
  dt-bindings: Add vendor prefix for oceanic
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:42:11 -07:00
Olof Johansson f5d6e8c077 Allwinner DT changes for 5.2
This PR is pretty significant, but it been mostly about:
   - Fixing the DTC warnings in most of our DT. We're now down to 2
     warnings, from several thousands.
   - Fixing a good number of minor issues, typos, and so on thanks to the DT
     validation tools
   - Describe the MBUS controller and the special DMA RAM mapping on the A13
   - Add support for the LRADC on the A83t
   - Add support for the I2C bus used for the PMIC on the A33
   - Start using the DT annotation /omit-if-no-ref/ on our pinctrl nodes
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLmxsgAKCRDj7w1vZxhR
 xQs0APwIUuCrLfRD0av6xeCI4bon+G6drCxNVqkgf/cm3sAd5AEAzd6Ok74CEJar
 xlSPxgqpBxCVyt2bxQxfN5mch2OPKgA=
 =HH/F
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Allwinner DT changes for 5.2

This PR is pretty significant, but it been mostly about:
  - Fixing the DTC warnings in most of our DT. We're now down to 2
    warnings, from several thousands.
  - Fixing a good number of minor issues, typos, and so on thanks to the DT
    validation tools
  - Describe the MBUS controller and the special DMA RAM mapping on the A13
  - Add support for the LRADC on the A83t
  - Add support for the I2C bus used for the PMIC on the A33
  - Start using the DT annotation /omit-if-no-ref/ on our pinctrl nodes

* tag 'sunxi-dt-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (65 commits)
  ARM: dts: sun8i: a83t: Enable USB OTG controller on some boards
  ARM: dtsi: axp81x: add USB power supply node
  ARM: dts: sun5i: Reorder pinctrl nodes
  ARM: dts: sun6i: i7: Remove useless property
  ARM: dts: sun4i: lime: Fix the USB PHY ID detect GPIO properties
  ARM: dts: sun4i: protab2: Remove stale pinctrl-names entry
  ARM: dts: sunxi: Remove useless phy-names from EHCI and OHCI
  ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences.
  ARM: dts: sun5i: Add the MBUS controller
  dt-bindings: sunxi: Add compatible for OrangePi 3 board
  ARM: dts: sun8i: a83t: Add I2C2 pinmux setting for PE pins
  dt-bindings: arm: sunxi: Add Beelink GS1 board
  ARM: dts: sun8i: tbs-a711: Add support for volume keys input
  ARM: dts: sunxi: Add R_LRADC support for A83T
  ARM: dts: sunxi: Improve A33 NAND transfers by using DMA
  ARM: dts: sun8i: tbs-a711: Enable UART2 (for NEO-6M GPS module)
  ARM: dts: sunxi: Remove useless pinctrl nodes
  ARM: dts: sunxi: Remove pinctrl groups setting bias
  ARM: dts: sunxi: Remove useless address and size cells
  ARM: dts: sunxi: Conform to DT spec for NAND controller
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:40:48 -07:00
Olof Johansson 14d55a3df4 arm64: tegra: Device tree changes for v5.2-rc1
This contains a bunch of changes all across the board. Perhaps the most
 notable introduction here is support for the Jetson Nano Developer Kit.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAly4jscTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoTevD/9jwO9JSPox9Cuy/d1V+R4XXk5xbf3i
 c+oMpWqWMmkQMkEi6VA8w76WpRej5WyClCvxbY9cdoY5xpNYpnLN6sw2c6kMCwC1
 EYM7BVuJh1DLTfUWbj8N7TTxZP5+PtKDWRAVfgnq9i4W52WjfwlUdJt8OmPd4KFf
 zHiSmf4oJiz5aiIX/fqQf852HE9lpijnWrHcsdDqRzBh64O83jO52JF3bBEnwg23
 x1i1aMzlYrOoNmAJHZxUxfFG+/qF6BcKY7ba7DQOIHXGBwUKGDMbELNLg4yuS0So
 NcEVsZZEjTtOYmzMWKqm3wSQISYSguU43QtyRBkBZLOrHvEQRjgNRKs3Bmvug7L3
 jCwA/qyA7kkYeBr9gn9CfE42ih8Az5dki38rzo5vfXqF6fALIf+J7MIur+p08kBk
 VOzMvDPT2FWXlykSfOaCq6ppdo0Fh88qDFxTCx97nYm6s7NDw1ZUI1IDZ0JgoA7n
 YqH0bC9WDAyA17gsyUH+mynvLiQvJ4kpAIaYa2JxlITXt05L5mTHEpsnelcSOrOx
 K96/M3r+z6/1OP68IqPWC0oh3adwJ9tuVZv2iO//cWeEXwO48wH6KERYJqG6cYLk
 x+tFhNPBy8U4x0FIEbpXW7s9bKWD07TpDijRDa4NriegkpTPmEm644QRPsBEgQuX
 qtzaoIrFFGOJIg==
 =V3kv
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.2-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt

arm64: tegra: Device tree changes for v5.2-rc1

This contains a bunch of changes all across the board. Perhaps the most
notable introduction here is support for the Jetson Nano Developer Kit.

* tag 'tegra-for-5.2-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Remove regulator hacks on Jetson TX2
  arm64: tegra: Enable XUSB on P2771
  arm64: tegra: Add XUSB and pad controller on Tegra186
  arm64: tegra: Add NVIDIA Jetson Nano Developer Kit support
  arm64: tegra: smaug: Move PLL power supplies to XUSB pad controller
  arm64: tegra: jetson-tx1: Move PLL power supplies to XUSB pad controller
  arm64: tegra: Enable command queue for Tegra186 SDMMC4
  arm64: tegra: Fix default tap and trim values
  arm64: tegra: Add supply for temperature sensor on P2888
  arm64: tegra: Enable aconnect, ADMA and AGIC on Jetson TX1
  arm64: tegra: Add L2 cache topology to Tegra210
  arm64: tegra: Enable CPU idle support for Shield
  arm64: tegra: Enable CPU idle support for Smaug
  arm64: tegra: Enable CPU idle support for Jetson TX1
  arm64: tegra: Add CPU idle states properties for Tegra210
  arm64: tegra: Fix timer node for Tegra210

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:40:13 -07:00
Olof Johansson a41332dd5e SoCFPGA DTS updates for v5.2
- Add base support for Agilex platform
 - Add 'cap-mmc-highspeed' Stratix10 and 32-bit SoCFPGA platform
 - Increase Stratix10 QSPI support to 100 MHz
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAly1Mv8UHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPS7mg//d56np59wWQ1k4wP7FFo3ewnNcqdu
 Zr3e2T586KCRFpCAH2zsY32jzPLPgzgX0ssiXg4FDr8Q0tptDfYFtkzUfM+9J8LH
 91VhGCUoq3YfKudnovl4vOo9QLTXyXxm9qSv4MN+8z+np/uLOc05qWFrPS6Ylh0O
 cYcC/1hif8svnxziH9d7QwF3Eely8aYAETY4waQVG5SDkzVMG9JuecC8rfxfOyCv
 uMy4jBTeOY7xDAJwl0yILPcI3qLZX97AoBUD64b7TmgGkrraSm9xijDmQKRFgFlz
 r42Ze4o1kjY+iKYefyXJiE+k4TQUoark8V0tBLst8KujiveH6gPQ8T8s75d0djFj
 r9koVafOege64KsY3Gdrkkv7e9vI8oCqcy/dvoApb9RBA3X+4V/gXJCZxv5KPOcn
 t3/swEsHKYnmJ1GumkmCnO+2aGKkDcJewJkQrnU4DNC8AVyGOyehPu9kqYfrMC3g
 eODzoHWC+4ZKltglfxP0mihqXHXcdYrSHfxAKtWAZyTect20w5w3dCsvvvpoxaA2
 gYr008kqrGVIxumpCZlbaEVnr/0PnHdiMstIWMVsIOsvs8EuvQrbmJJS2TSqhhI0
 gUFyADgnh4RCV/cD3EeYC9dokM6Ms2SDB/r7QdnQG1aELkVi51hSJf201w6fYemI
 Uq1EBLmMGaF8zow=
 =PxBZ
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_dts_updates_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt

SoCFPGA DTS updates for v5.2
- Add base support for Agilex platform
- Add 'cap-mmc-highspeed' Stratix10 and 32-bit SoCFPGA platform
- Increase Stratix10 QSPI support to 100 MHz

* tag 'socfpga_dts_updates_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: dts: agilex: Add initial support for Intel's Agilex SoCFPGA
  arm64: dts: stratix10: increase QSPI max frequency to 100MHz
  arm64: dts: stratix10: enable MMC highspeed support
  ARM: dts: socfpga: enable MMC highspeed support

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:35:51 -07:00
Olof Johansson 1c3a454083 ARM64: DT: Hisilicon SoCs DT updates for 5.2
* Hi3660 SoC and related boards:
   - Added DMA support for the uart nodes
   - Added the asp DMA controller node
   - Replaced dma-min-chan with dma-channel-mask to follow the binding
 
 * Hi3670 SoC and related boards:
   - Reused Hi3660 reset to support Hi3670, updated the binding
     document and added dts node
   - Reused Hi3660 MMC controller to support Hi3670, updated the
     binding document and added related nodes to support SD and WiFi
     for the SoC and hikey970 board
   - Added UFS controller node
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJctKRtAAoJEAvIV27ZiWZcHWUP/2adwR95p9SDb4WUZsmxWAPm
 W3vveeLqack6K70ySStBmNCgrTyW5txJcJOFU4ceoERBOkpEfWJV6SEuWMma0ssW
 Vz4Zs15T+d6Pz2UbIi7owhj1ooyxVuJpPwZRFMs0esD8d92ZuptTWAnnbyA5WCKB
 Obvucl04QUHpzmCQAPKXW2icQFmGPCA+UOviSR/0Kj00XDhmxVkpUl54fe16r6e+
 keVT5ElVuI4SZax5BPIHiUryKbujL6A+n7y3goV57MGkKhklJ78BRb3czxLUpgSq
 xyqfYYnpTGszZ/gNIIYohHvp1N09dMXXhmIt22zfUCpG+1ClquK8oDtZzDBAl0wV
 ZtXn1Khb+D96nzZobYIEhKX0ki76OeRIJAj1gxLkpMJkhp8amGLmeVJP6ER88zuN
 ypVSpXfPnOAeGGcrVUIXhYIGqBWinM7iCasX9lctkD+Mui0bBjaF5NFWuNAIo74w
 N57yNRQRdK0CMxuyU57lrxPzlmWibnSx3gVz8BXTSBBXDkTefmwKITDjyJ8swo8m
 voeBOAYOdbdCKWaU5Nh1DAfBorvP3MPXi33KkdTUaMzkd5pqbNq02IqG7DlFE3L1
 CMw4PnCgLoVVN8s7ud8l1wiXkeXJSgskE2P/c57/4t4cGargC8xyz8ALXobCJFGq
 N795O6Za9LYzTQyLpyzn
 =9+Sr
 -----END PGP SIGNATURE-----

Merge tag 'hisi-arm64-dt-for-5.2' of git://github.com/hisilicon/linux-hisi into arm/dt

ARM64: DT: Hisilicon SoCs DT updates for 5.2

* Hi3660 SoC and related boards:
  - Added DMA support for the uart nodes
  - Added the asp DMA controller node
  - Replaced dma-min-chan with dma-channel-mask to follow the binding

* Hi3670 SoC and related boards:
  - Reused Hi3660 reset to support Hi3670, updated the binding
    document and added dts node
  - Reused Hi3660 MMC controller to support Hi3670, updated the
    binding document and added related nodes to support SD and WiFi
    for the SoC and hikey970 board
  - Added UFS controller node

* tag 'hisi-arm64-dt-for-5.2' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hisilicon: hi3670: Add UFS controller support
  arm64: dts: hi3660: Fixup unofficial dma-min-chan to dma-channel-mask
  arm64: dts: hi3660: Add hisi asp dma device
  arm64: dts: hi3660: Add dma to uart nodes
  arm64: dts: hisilicon: hikey970: Add SD and WiFi support
  arm64: dts: hisilicon: hi3670: Add MMC controller support
  dt-bindings: mmc: Add HI3670 MMC controller binding
  arm64: dts: hisilicon: hi3670: Add reset controller support
  dt-bindings: reset: Add HI3670 reset controller binding

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:32:12 -07:00
Olof Johansson 236a4234ce arm64: dts: zynqmp: DT changes for v5.2
- Align xlnx-zynqmp-clk.h file name and separate
   binding for clock driver
 - Add TI quirks to zynqmp boards
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAly0Q7IACgkQykllyylKDCHtLACfZGBpUNq5coHf3tQohyNyROnh
 q9cAn11bsVu3/BDOYhAO9TzKuYtzCACh
 =n0Wu
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-v5.2' of https://github.com/Xilinx/linux-xlnx into arm/dt

arm64: dts: zynqmp: DT changes for v5.2

- Align xlnx-zynqmp-clk.h file name and separate
  binding for clock driver
- Add TI quirks to zynqmp boards

* tag 'zynqmp-dt-for-v5.2' of https://github.com/Xilinx/linux-xlnx:
  arm64: zynqmp: dt: Add TI PHY quirk
  dt-bindings: xilinx: Separate clock binding from firmware doc
  include: dt-binding: clock: Rename zynqmp header file

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:31:33 -07:00
Olof Johansson 629d716187 Samsung DTS ARM64 changes for v5.2
1. Use proper clock rates for GSCALER module on TM2 boards.
 2. Add clocks for local paths on DECON and GSCALER modules of
    Exynos5433.
 3. Add Slim SecuritySubSystem to Exynos5433.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAlyzVIgQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD11HFD/9uiXfydqVDwnC6OgJg0usKHXbfA8qhtgdK
 IGYTv99Cxk3uR2MHkCDI1xDeMUcgAL7Dd9DI8HI0rGlCJ0zWVS/UtMD2oG3nd2p0
 A0g8kbp7jxKU2UjfjKrcnd62aXbqgvz+T8/Phvjhv+UIOOEChqjeWj6rqCVVCOLk
 jSDXi3zu1buO1Z+XuvIIn9/YmPOXevrAy8qs69NNIMbKYAx8aA5tsg2zmwenJxKp
 43EXVjgfTFyCVjezflkezj+osxAiUHKD8xkbW5byPWnhop/4uuvEv6G6AwEA8zcm
 sXMmWSqvo3nuCcqDe8MiE18ZvcSl5FpM9KNAhN8WD1mS3o++uBgntpMOsIHmq2Py
 591MWBt0FsmYD0wS4uWCqISN/rQPJiXxuCzk4k1Wv92/TKSOarTZBuqi2R5u2pP+
 lposx27g2XxYjv6VPkOU0+4802R3Mliyo3qyT9EysoxJBy//U2DAVXc7gQARqAJJ
 0UW95PafFI/UbLyeSOBQriVAeBFXcVPqSL80jdf7qk7G7VS8JRbx1gwKA0VLh4+o
 IE4QLIKNltW3QgdKsvx7Dx1T0VPG5ztSYCZQRs13WD+I7SosVWOlZ1ti+ecFJp68
 GCytNRibpsSTHNcU8LviguHjvWjstBk3QmBnVGBDLH8GXNgOIhnEoq3hxyeNGVLe
 FDThtgkr1Q==
 =hXn6
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt

Samsung DTS ARM64 changes for v5.2

1. Use proper clock rates for GSCALER module on TM2 boards.
2. Add clocks for local paths on DECON and GSCALER modules of
   Exynos5433.
3. Add Slim SecuritySubSystem to Exynos5433.

* tag 'samsung-dt64-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: Add SlimSSS to Exynos5433
  arm64: dts: exynos: add DSD/GSD clocks to DECONs and GSCALERs of Exynos5433
  arm64: dts: exynos: configure GSCALER related clocks on TM2

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:29:48 -07:00
Olof Johansson 2fe743c27f Renesas ARM64 Based SoC DT Updates for v5.2
* R-Car Gen3 SoC based Salvator-X and Salvator-XS boards
   - Add GPIO keys support
   - Sort rwdt node alphabetically
 
 * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) SoCs
   - Use extended audio DMAC register
 
 * R-Car M3-W (r8a7796) SoC
   - Remove unneeded sound #address/size-cells
 
 * R-Car M3-N (r8a77965) SoC
   - Add SSIU support for audio
 
 * R-Car E3 (r8a77990) and RZ/G2E (r8a774c0) SoCs
   - Remove invalid compatible value for CSI40
 
 * R-Car E3 (r8a77990) SoC
   - Cprrect SPDX license identifier style
 
 * R-Car E3 (r8a77990) based Ebisu board
   - Add BD9571 PMIC with DDR0 backup power config
   - Correct adv7482 hexadecimal register address
   - Add GPIO expander
 
 * R-Car E3 (r8a77990) based Ebisu and D3 (r8a77995) based Draak boards
   - Update bootargs to bring them into line with other R-Car Gen3 boards
   - Enable LVDS1 encoder
 
 * R-Car D3 (r8a77995) based Draak board
   - Correct EthernetAVB phy mode
   - Enable CAN0 and CAN1
 
 * RZ/G2E (r8a774c0) SoC
   - Add CANFD support
   - Correct CPU node style
 
 * RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs
   - Add clkp2 clock to CAN nodes
 
 * RZ/G2E (r8a774c0) based EK874 board
   - Add LED, CAN and RTC support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlykdLsACgkQ189kaWo3
 T74+7Q/9GzHHmezp1OYOjjUU2ykz8L2m8+qmIr2q8rkCJeSPr3OADjONltcEhZM0
 3mlqYxYMaKyYODbgtEp9mzJOpVEe/5Kl/mPBCXt0b+eX8LrJcH58hChN4ERrrhZj
 MpDTxvhP3qAt7aScAiU11oWCKvHC4EJWmsfnRtj/AWb2ZuhgS0jw2ZZG0rwKMwi/
 Ms9ZOkYoz5aV2zsE5AtuCr2qJXtQwjkLBuqtIy9jzjMrIpNv811FU8lsUitfgkrm
 jPKKKdHMPjzX8ii6Y3BgzM6uhh0lwoS5FCKZwCH6dHJQU11bRaFb2Cjvc0OzwgFE
 3aKsaElD6upnF0xddbYzPKwv/TSKV8bqtpC6QUwTOOi9R2tt0rKYpzy+D7akrI97
 o07WYaBL14Etfdl1F2QxPPasB38akKrAXLoo4nK1QyVhJsQC1dONVWdUPVOYvDAb
 mj+NS9sr6O1vcrXrG01Pru91eOE/tqrfMVQ557Yc+tTi0kbyxjIhIJS7sduqxy+t
 MV/RoMTUkT0MK99yF9aAwnlUNrcZ4AnW7Axdozlo2p0m9H+tTugxa+aX3KrIR3px
 pcThu9MzoagomM6h+aEKlLPst4HQIaG5hrecEah1hL9Zbc85FM0xG9muUsSgBxkG
 A72Bhd8h611KiIrFIQyGkhui+K26S0DJCGGqwc10trvtIKy6XkE=
 =XgtL
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/dt

Renesas ARM64 Based SoC DT Updates for v5.2

* R-Car Gen3 SoC based Salvator-X and Salvator-XS boards
  - Add GPIO keys support
  - Sort rwdt node alphabetically

* R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) SoCs
  - Use extended audio DMAC register

* R-Car M3-W (r8a7796) SoC
  - Remove unneeded sound #address/size-cells

* R-Car M3-N (r8a77965) SoC
  - Add SSIU support for audio

* R-Car E3 (r8a77990) and RZ/G2E (r8a774c0) SoCs
  - Remove invalid compatible value for CSI40

* R-Car E3 (r8a77990) SoC
  - Cprrect SPDX license identifier style

* R-Car E3 (r8a77990) based Ebisu board
  - Add BD9571 PMIC with DDR0 backup power config
  - Correct adv7482 hexadecimal register address
  - Add GPIO expander

* R-Car E3 (r8a77990) based Ebisu and D3 (r8a77995) based Draak boards
  - Update bootargs to bring them into line with other R-Car Gen3 boards
  - Enable LVDS1 encoder

* R-Car D3 (r8a77995) based Draak board
  - Correct EthernetAVB phy mode
  - Enable CAN0 and CAN1

* RZ/G2E (r8a774c0) SoC
  - Add CANFD support
  - Correct CPU node style

* RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs
  - Add clkp2 clock to CAN nodes

* RZ/G2E (r8a774c0) based EK874 board
  - Add LED, CAN and RTC support

* tag 'renesas-arm64-dt-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (26 commits)
  arm64: dts: renesas: salvator-common: Add GPIO keys support
  arm64: dts: renesas: use extended audio dmac register
  arm64: dts: renesas: r8a77995: draak: Fix EthernetAVB phy mode to rgmii
  arm64: dts: renesas: salvator-common: Sort node label
  arm64: dts: renesas: Update Ebisu and Draak bootargs
  arm64: dts: renesas: r8a774c0: Add clkp2 clock to CAN nodes
  arm64: dts: renesas: r8a774c0: Add CANFD support
  arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes
  arm64: dts: renesas: ebisu: Add PMIC DDR0 Backup Power config
  arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC
  arm64: dts: renesas: r8a77990: Remove invalid compatible value for CSI40
  arm64: dts: renesas: r8a774c0: Remove invalid compatible value for CSI40
  arm64: dts: renesas: r8a77995: draak: Enable CAN0, CAN1
  arm64: dts: renesas: r8a774c0-cat874: Add RWDT support
  arm64: dts: renesas: ebisu: Enable VIN5
  arm64: dts: renesas: r8a774c0-cat874: Add LEDs support
  arm64: dts: renesas: r8a774c0-cat874: add RTC support
  arm64: dts: renesas: cat875: Add CAN support
  arm64: dts: renesas: r8a774c0: Fix cpu nodes style
  arm64: dts: renesas: r8a77965: add SSIU support for sound
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:16:26 -07:00
Olof Johansson 1a88083b93 Core new soc features are hdmi-cec for rk3328, scheduler capacity-values
and emmc cleanups for rk3399. New boards are the OrangePi (rk3399) and
 NanoPi NEO4. Both the OrangePi as well as the NanoPC/Pie family also
 directly got some additional features added after the boards itself.
 
 The Rock960 family (rock960+ficus) got their power-tree cleaned to match
 the schematics and also got hdmi-audio and their gpu enabled.
 
 Mali support also got enabled on the RockPi4 and finally both
 rk3328-rock64 and rk3328-roc-cc got some additional features.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlyjIrAQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgTCuB/9wEiNDr5DvIYHdQM0/TrAWzMepdaO2YAHI
 5v2NaZ3l0LDB1yXEJUJn/f7PRbGW9IETaldXLWKca8g8zJq6tM60p4gWx0XHw2hq
 szajRwBhbvo16u3vSNOJ1LlK8SdfI+ENx9129qWVtXToODK/0TIo+ubOpPT3uBxt
 P2Og+2F0zoj1WSWTXPEaGexF0YnwRp1v5NODF9XV6jpB9wAL+CYsllse7GFLxc52
 sdp2Lfp/r/3VzHOCDOJ8e9YPXmLIYrjBQNw12/XkGdbnMKucCnI8GYxdkU7gSUh8
 9ryBAAjOWREopY8GwdBfX+C+l1AKUFi8YFvC6PCxqFoseglzvAK0
 =/JXo
 -----END PGP SIGNATURE-----

Merge tag 'v5.2-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

Core new soc features are hdmi-cec for rk3328, scheduler capacity-values
and emmc cleanups for rk3399. New boards are the OrangePi (rk3399) and
NanoPi NEO4. Both the OrangePi as well as the NanoPC/Pie family also
directly got some additional features added after the boards itself.

The Rock960 family (rock960+ficus) got their power-tree cleaned to match
the schematics and also got hdmi-audio and their gpu enabled.

Mali support also got enabled on the RockPi4 and finally both
rk3328-rock64 and rk3328-roc-cc got some additional features.

* tag 'v5.2-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (23 commits)
  arm64: dts: rockchip: Decrease emmc-phy's drive impedance on rk3399-puma
  arm64: dts: rockchip: Define drive-impedance-ohm for RK3399's emmc-phy.
  arm64: dts: rockchip: Disable DCMDs on RK3399's eMMC controller.
  arm64: dts: rockchip: Add nanopi4 ethernet phy
  arm64: dts: rockchip: Add PWM fan for NanoPC-T4
  arm64: dts: rockchip: Add the fusb typec manager to rk3399-orangepi
  arm64: dts: rockchip: Specify vid supply for the rk3399-orangepi compass (AK09911)
  arm64: dts: rockchip: Fix clock names and add missing supplies for bluetooth on rk3399-orangepi
  arm64: dts: rockchip: Add 12V DCIN regulator to rk3399-ficus
  arm64: dts: rockchip: Rename vcc_sys into vcc5v0_sys on rk3399-rock960
  arm64: dts: rockchip: Add Nanopi NEO4 initial support
  arm64: dts: rockchip: enable hdmi audio out for rk3399-rockpro64
  arm64: dts: rockchip: Add support for the Orange Pi RK3399 board.
  arm64: dts: rockchip: enable mali on rock960 boards
  arm64: dts: rockchip: enable mali on Rock Pi 4
  arm64: dts: rockchip: add rk3328-roc-cc cpu-supply entries for all cpu nodes
  arm64: dts: rockchip: give some life to the rk3328-roc-cc leds
  arm64: dts: rockchip: add #sound-dai-cells to HDMI of rk3328
  arm64: dts: rockchip: add ir-receiver node on rk3328-rock64
  arm64: dts: rockchip: add leds node on rk3328-rock64
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:15:49 -07:00
Olof Johansson 0159225bc9 arm64: dts: Amlogic updates for v5.2
Highlights
 - new board: SEI Robotics 510, based on S905X2 SoC (G12A)
 - enable more periphearls for S905X2 based boards
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlyejMcACgkQWTcYmtP7
 xmV0LQ//TloHVjh3MDKwp6hwVygi9eSIB+n0UP1KyH44Al565+OgWY8PN2lPWJhE
 4EpPDHgndJhWCABNVYXvuodStPPvH3qE4aibqdmtDaZP9jWVoAB53ZGyHvGkkAHp
 wzTlrX1WG2Rl6QI/ggrPU9bKYFponrBQYEyETNCFa3iGQPpmr2diwhZjz/DRbYYK
 BUUB1iFz5WCuLCviZMyeJipkjeio3Qpqegg2muEm1oUfdqM5loIJMxVND866gU7d
 /AiXy8Nky/EnapEUjau3pyuQQQOCNZXBsp8btRDaq9JURtft3uXAK3s6tHFQ0+qz
 mcjTrRdruOB9rgctlP8a5AqYnUx8IGorYlZxlorENZop6zrvOUDYSIKyZ7hapj3h
 0rvCz2JB7Lr/nN78pfchNHBDP+MackvJNAZw+zDOEXtNgq81ix4Mf392VAsgHX+6
 mC8CPzFeJuanhua+DXVBNtQ3ZNXOH3xozEQnGUwEJL/iZJ4T/vafAx0dl385wMGL
 m5oqVV4odRsNRcVRQlk7AO/atiBoOhBStPB7E3s90gWHEQXo1P2WKY2vEk05JGy8
 tpQ3tOjraxmitzPpr7pSAvLnAxkN+KwHDy55oGOCLdr4G60fuEpZJ5dJzLTDmrKe
 aaN5Ki/foGufxVMqqpLYaxosmyvbUp3Sn4UHF2jcImL3pPRgTNU=
 =SkrM
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt

arm64: dts: Amlogic updates for v5.2

Highlights
- new board: SEI Robotics 510, based on S905X2 SoC (G12A)
- enable more periphearls for S905X2 based boards

* tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-g12a: Add CMA reserved memory
  arm64: dts: meson-g12a-x96-max: Enable BT Module
  arm64: dts: meson-g12a-x96-max: add regulators
  arm64: dts: meson-g12a-sei510: add regulators
  arm64: dts: meson-g12a-x96-max: add uart_AO pinctrl
  arm64: dts: meson-g12a-sei510: add uart_AO pinctrl
  arm64: dts: meson-g12a-u200: add uart_AO pinctrl
  arm64: dts: meson: g12a: Add UART A, B & C nodes and pins
  arm64: dts: meson: g12a: add reset controller
  arm64: dts: meson: g12a: add uart_ao_a pinctrl
  arm64: dts: meson: g12a: add pinctrl support controllers
  arm64: dts: meson: g12a: Add AO Clock + Reset Controller support
  arm64: dts: meson-gxm-nexbox-a1: Enable USB
  arm64: dts: meson: g12a: add efuse
  arm64: dts: meson: g12a: add secure monitor
  arm64: dts: meson-gxl-s905d-phicomm-n1: add status LED
  arm64: dts: meson-g12a: Add AO Secure node
  arm64: dts: Add SEI Robotics SEI510 Board
  vendor-prefixes: Add prefix for Shenzhen SEI Robotics Co., Ltd

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:14:10 -07:00
David S. Miller 5f0d736e7f Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says:

====================
pull-request: bpf-next 2019-04-28

The following pull-request contains BPF updates for your *net-next* tree.

The main changes are:

1) Introduce BPF socket local storage map so that BPF programs can store
   private data they associate with a socket (instead of e.g. separate hash
   table), from Martin.

2) Add support for bpftool to dump BTF types. This is done through a new
   `bpftool btf dump` sub-command, from Andrii.

3) Enable BPF-based flow dissector for skb-less eth_get_headlen() calls which
   was currently not supported since skb was used to lookup netns, from Stanislav.

4) Add an opt-in interface for tracepoints to expose a writable context
   for attached BPF programs, used here for NBD sockets, from Matt.

5) BPF xadd related arm64 JIT fixes and scalability improvements, from Daniel.

6) Change the skb->protocol for bpf_skb_adjust_room() helper in order to
   support tunnels such as sit. Add selftests as well, from Willem.

7) Various smaller misc fixes.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-28 08:42:41 -04:00
Daniel Borkmann 34b8ab091f bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd
Since ARMv8.1 supplement introduced LSE atomic instructions back in 2016,
lets add support for STADD and use that in favor of LDXR / STXR loop for
the XADD mapping if available. STADD is encoded as an alias for LDADD with
XZR as the destination register, therefore add LDADD to the instruction
encoder along with STADD as special case and use it in the JIT for CPUs
that advertise LSE atomics in CPUID register. If immediate offset in the
BPF XADD insn is 0, then use dst register directly instead of temporary
one.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-26 18:53:40 -07:00
Daniel Borkmann 8968c67a82 bpf, arm64: remove prefetch insn in xadd mapping
Prefetch-with-intent-to-write is currently part of the XADD mapping in
the AArch64 JIT and follows the kernel's implementation of atomic_add.
This may interfere with other threads executing the LDXR/STXR loop,
leading to potential starvation and fairness issues. Drop the optional
prefetch instruction.

Fixes: 85f68fe898 ("bpf, arm64: implement jiting of BPF_XADD")
Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-26 18:53:15 -07:00
Linus Torvalds 857e17c2ee arm64 fixes:
- keep the tail of an unaligned initrd reserved
 
 - adjust ftrace_make_call() to deal with the relative nature of PLTs
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAlzDOjcACgkQa9axLQDI
 XvFJag/7BER6yur0NSCAAMCcbn0cL7guNNUBJaLwZIPSN7lFNvqWZ+5wN50Yja7k
 B9D+6EhX8h8VUHJ5ne1veQQGka1eNaldzFvS6mzj8xt4aNiTqZaTLgYS2CW5iEPA
 ga0VJB0vT3Lvu7SGziN7P6jw+5YOeyohL89VYCdHSN7ATM8nc9HsUXjONYEwD6ip
 /d6psCWh0wEmioUPSDhbxSr7zxJ6w5MPwG1V+t8HbsFVY1D3OBOyaW9I6SrA07Kj
 vzV3N8sY1pxY3MtnIwt4lOC39vW2GyW5x1ULCMiaASRSYsmxkAfQ3j0FR+trZ4kd
 VGEK54NTUQerG4e2hJSxMVORxtb/zhzM/NNu8wT2yZqig2Bf6/WfWBW6laFtOX5e
 c1olY03qUC5AZLSXTbmOm2REPUhMv4gOLUKnDHWuVpo2583Cef/Na9290B4vSe5X
 XHYJhj13tVekuDOBJR47SSTVqf/Kpt+WTjxVgLKTyQjtujXkqPg37jktV1e9hVvl
 eD50YhpEqOFNxPYlo/ACc+sFDxSAEVwqnRzCjoQJOcri3t9EEK7mzvJMyFJz89IH
 Sc0kM53VUAaD4QoEng3/wtMcQQ4QJAGnCezZ5Cux5HVJXmCarTVt9N87HJmO2Qnw
 4rj3lVoSc3B20sYCfeERlHsKA6JIp1+LH7qNYOdIyxdMLabQRUQ=
 =0qQL
 -----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:

 - keep the tail of an unaligned initrd reserved

 - adjust ftrace_make_call() to deal with the relative nature of PLTs

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64/module: ftrace: deal with place relative nature of PLTs
  arm64: mm: Ensure tail of unaligned initrd is reserved
2019-04-26 11:26:53 -07:00
Jeremy Linton d42281b6e4 arm64: Always enable ssb vulnerability detection
Ensure we are always able to detect whether or not the CPU is affected
by SSB, so that we can later advertise this to userspace.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
[will: Use IS_ENABLED instead of #ifdef]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:32:45 +01:00
Jeremy Linton d2532e27b5 arm64: add sysfs vulnerability show for spectre-v2
Track whether all the cores in the machine are vulnerable to Spectre-v2,
and whether all the vulnerable cores have been mitigated. We then expose
this information to userspace via sysfs.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:31:36 +01:00
Jeremy Linton 8c1e3d2bb4 arm64: Always enable spectre-v2 vulnerability detection
Ensure we are always able to detect whether or not the CPU is affected
by Spectre-v2, so that we can later advertise this to userspace.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:30:18 +01:00
Marc Zyngier 517953c2c4 arm64: Use firmware to detect CPUs that are not affected by Spectre-v2
The SMCCC ARCH_WORKAROUND_1 service can indicate that although the
firmware knows about the Spectre-v2 mitigation, this particular
CPU is not vulnerable, and it is thus not necessary to call
the firmware on this CPU.

Let's use this information to our benefit.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:30:11 +01:00
Marc Zyngier 73f3816609 arm64: Advertise mitigation of Spectre-v2, or lack thereof
We currently have a list of CPUs affected by Spectre-v2, for which
we check that the firmware implements ARCH_WORKAROUND_1. It turns
out that not all firmwares do implement the required mitigation,
and that we fail to let the user know about it.

Instead, let's slightly revamp our checks, and rely on a whitelist
of cores that are known to be non-vulnerable, and let the user know
the status of the mitigation in the kernel log.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:29:15 +01:00
Jeremy Linton 1b3ccf4be0 arm64: add sysfs vulnerability show for meltdown
We implement page table isolation as a mitigation for meltdown.
Report this to userspace via sysfs.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:28:12 +01:00
Mian Yousaf Kaukab 3891ebccac arm64: Add sysfs vulnerability show for spectre-v1
spectre-v1 has been mitigated and the mitigation is always active.
Report this to userspace via sysfs

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:27:10 +01:00
Jeremy Linton e5ce5e7267 arm64: Provide a command line to disable spectre_v2 mitigation
There are various reasons, such as benchmarking, to disable spectrev2
mitigation on a machine. Provide a command-line option to do so.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 16:26:42 +01:00
Will Deacon 8e4e0ac02b arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()
Returning an error code from futex_atomic_cmpxchg_inatomic() indicates
that the caller should not make any use of *uval, and should instead act
upon on the value of the error code. Although this is implemented
correctly in our futex code, we needlessly copy uninitialised stack to
*uval in the error case, which can easily be avoided.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 13:57:49 +01:00
Will Deacon 03110a5cb2 arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP
Our futex implementation makes use of LDXR/STXR loops to perform atomic
updates to user memory from atomic context. This can lead to latency
problems if we end up spinning around the LL/SC sequence at the expense
of doing something useful.

Rework our futex atomic operations so that we return -EAGAIN if we fail
to update the futex word after 128 attempts. The core futex code will
reschedule if necessary and we'll try again later.

Cc: <stable@kernel.org>
Fixes: 6170a97460 ("arm64: Atomic operations")
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 13:57:43 +01:00
Will Deacon 84ff7a09c3 arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
Rather embarrassingly, our futex() FUTEX_WAKE_OP implementation doesn't
explicitly set the return value on the non-faulting path and instead
leaves it holding the result of the underlying atomic operation. This
means that any FUTEX_WAKE_OP atomic operation which computes a non-zero
value will be reported as having failed. Regrettably, I wrote the buggy
code back in 2011 and it was upstreamed as part of the initial arm64
support in 2012.

The reasons we appear to get away with this are:

  1. FUTEX_WAKE_OP is rarely used and therefore doesn't appear to get
     exercised by futex() test applications

  2. If the result of the atomic operation is zero, the system call
     behaves correctly

  3. Prior to version 2.25, the only operation used by GLIBC set the
     futex to zero, and therefore worked as expected. From 2.25 onwards,
     FUTEX_WAKE_OP is not used by GLIBC at all.

Fix the implementation by ensuring that the return value is either 0
to indicate that the atomic operation completed successfully, or -EFAULT
if we encountered a fault when accessing the user mapping.

Cc: <stable@kernel.org>
Fixes: 6170a97460 ("arm64: Atomic operations")
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-26 13:57:04 +01:00
Amit Kucheria 060f4211f6 arm64: dts: msm8998: thermal: Restrict thermal zone name length to under 20
The thermal core restricts names of thermal zones to under 20
characters. Fix the names for a couple of msm8998 thermal zones.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-25 23:05:35 -05:00
Amit Kucheria 280acabbaa arm64: dts: msm8998: thermal: Fix number of supported sensors
msm8998 has 22 sensors connected in total, 14 on the 1st controller, 8
on the 2nd controller. Increase the number to allow sensors with ID 12
and 13 to be registered.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-25 23:05:28 -05:00
Amit Kucheria ad480e0149 arm64: dts: msm8998-mtp: thermal: Remove skin and battery thermal zones
The msm8998-mtp doesn't have TSENS-based sensors wired up for skin and
battery thermal zones. TSENS sensors should be common across all boards
using the SoC and shouldn't be board-specific as these entries.

They also show the following error when trying to read the temperature

   cat: read error: Invalid argument

Remove these board-specific erroneous thermal zones.

Fixes: 4449b6f248 ("arm64: dts: qcom: msm8998: Add tsens and thermal-zones")
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-25 23:04:57 -05:00
Kees Cook be604c616c arm64: sysreg: Make mrs_s and msr_s macros work with Clang and LTO
Clang's integrated assembler does not allow assembly macros defined
in one inline asm block using the .macro directive to be used across
separate asm blocks. LLVM developers consider this a feature and not a
bug, recommending code refactoring:

  https://bugs.llvm.org/show_bug.cgi?id=19749

As binutils doesn't allow macros to be redefined, this change uses
UNDEFINE_MRS_S and UNDEFINE_MSR_S to define corresponding macros
in-place and workaround gcc and clang limitations on redefining macros
across different assembler blocks.

Specifically, the current state after preprocessing looks like this:

asm volatile(".macro mXX_s ... .endm");
void f()
{
	asm volatile("mXX_s a, b");
}

With GCC, it gives macro redefinition error because sysreg.h is included
in multiple source files, and assembler code for all of them is later
combined for LTO (I've seen an intermediate file with hundreds of
identical definitions).

With clang, it gives macro undefined error because clang doesn't allow
sharing macros between inline asm statements.

I also seem to remember catching another sort of undefined error with
GCC due to reordering of macro definition asm statement and generated
asm code for function that uses the macro.

The solution with defining and undefining for each use, while certainly
not elegant, satisfies both GCC and clang, LTO and non-LTO.

Co-developed-by: Alex Matveev <alxmtvv@gmail.com>
Co-developed-by: Yury Norov <ynorov@caviumnetworks.com>
Co-developed-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-25 14:59:49 +01:00
Krzysztof Kozlowski f36afdd0f5 arm64: dts: exynos: Move fixed-clocks out of soc
The XXTI fixed-clock is the input to the SoC therefore it should not be
inside the soc node.  This also fixes DTC W=1 warning:

    arch/arm64/boot/dts/exynos/exynos7.dtsi:90.17-94.5:
        Warning (simple_bus_reg): /soc/xxti: missing or empty reg/ranges property

While moving, change the name of the xxti node to match the generic type
of device (following DeviceTree specification).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-04-24 19:57:59 +02:00
Krzysztof Kozlowski 179a2802ac arm64: dts: exynos: Move pmu and timer nodes out of soc
The ARM PMU and ARM architected timer nodes are part of ARM CPU design
therefore they should not be inside the soc node.  This also fixes DTC
W=1 warnings like:

    arch/arm64/boot/dts/exynos/exynos7.dtsi:472.11-480.5:
        Warning (simple_bus_reg): /soc/arm-pmu: missing or empty reg/ranges property
    arch/arm64/boot/dts/exynos/exynos7.dtsi:482.9-492.5:
        Warning (simple_bus_reg): /soc/timer: missing or empty reg/ranges property

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-04-24 19:57:15 +02:00
Andrew Murray 39e3406a09 arm64: KVM: Avoid isb's by using direct pmxevtyper sysreg
Upon entering or exiting a guest we may modify multiple PMU counters to
enable of disable EL0 filtering. We presently do this via the indirect
PMXEVTYPER_EL0 system register (where the counter we modify is selected
by PMSELR). With this approach it is necessary to order the writes via
isb instructions such that we select the correct counter before modifying
it.

Let's avoid potentially expensive instruction barriers by using the
direct PMEVTYPER<n>_EL0 registers instead.

As the change to counter type relates only to EL0 filtering we can rely
on the implicit instruction barrier which occurs when we transition from
EL2 to EL1 on entering the guest. On returning to userspace we can, at the
latest, rely on the implicit barrier between EL2 and EL0. We can also
depend on the explicit isb in armv8pmu_select_counter to order our write
against any other kernel changes by the PMU driver to the type register as
a result of preemption.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:46:26 +01:00
Andrew Murray 435e53fb5e arm64: KVM: Enable VHE support for :G/:H perf event modifiers
With VHE different exception levels are used between the host (EL2) and
guest (EL1) with a shared exception level for userpace (EL0). We can take
advantage of this and use the PMU's exception level filtering to avoid
enabling/disabling counters in the world-switch code. Instead we just
modify the counter type to include or exclude EL0 at vcpu_{load,put} time.

We also ensure that trapped PMU system register writes do not re-enable
EL0 when reconfiguring the backing perf events.

This approach completely avoids blackout windows seen with !VHE.

Suggested-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:46:26 +01:00
Andrew Murray 3d91befbb3 arm64: KVM: Enable !VHE support for :G/:H perf event modifiers
Enable/disable event counters as appropriate when entering and exiting
the guest to enable support for guest or host only event counting.

For both VHE and non-VHE we switch the counters between host/guest at
EL2.

The PMU may be on when we change which counters are enabled however
we avoid adding an isb as we instead rely on existing context
synchronisation events: the eret to enter the guest (__guest_enter)
and eret in kvm_call_hyp for __kvm_vcpu_run_nvhe on returning.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:36:22 +01:00
Andrew Murray d1947bc4bc arm64: arm_pmu: Add !VHE support for exclude_host/exclude_guest attributes
Add support for the :G and :H attributes in perf by handling the
exclude_host/exclude_guest event attributes.

We notify KVM of counters that we wish to be enabled or disabled on
guest entry/exit and thus defer from starting or stopping events based
on their event attributes.

With !VHE we switch the counters between host/guest at EL2. We are able
to eliminate counters counting host events on the boundaries of guest
entry/exit when using :G by filtering out EL2 for exclude_host. When
using !exclude_hv there is a small blackout window at the guest
entry/exit where host events are not captured.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:35:58 +01:00
Andrew Murray eb41238cf1 arm64: KVM: Add accessors to track guest/host only counters
In order to effeciently switch events_{guest,host} perf counters at
guest entry/exit we add bitfields to kvm_cpu_context for guest and host
events as well as accessors for updating them.

A function is also provided which allows the PMU driver to determine
if a counter should start counting when it is enabled. With exclude_host,
we may only start counting when entering the guest.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:35:30 +01:00
Andrew Murray 630a16854d arm64: KVM: Encapsulate kvm_cpu_context in kvm_host_data
The virt/arm core allocates a kvm_cpu_context_t percpu, at present this is
a typedef to kvm_cpu_context and is used to store host cpu context. The
kvm_cpu_context structure is also used elsewhere to hold vcpu context.
In order to use the percpu to hold additional future host information we
encapsulate kvm_cpu_context in a new structure and rename the typedef and
percpu to match.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:35:24 +01:00
Andrew Murray 21bb0ebf5d arm64: arm_pmu: Remove unnecessary isb instruction
The armv8pmu_enable_event_counter function issues an isb instruction
after enabling a pair of counters - this doesn't provide any value
and is inconsistent with the armv8pmu_disable_event_counter.

In any case armv8pmu_enable_event_counter is always called with the
PMU stopped. Starting the PMU with armv8pmu_start results in an isb
instruction being issued prior to writing to PMCR_EL0.

Let's remove the unnecessary isb instruction.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:34:31 +01:00
Amit Daniel Kachhap a243c16d18 KVM: arm64: Add capability to advertise ptrauth for guest
This patch advertises the capability of two cpu feature called address
pointer authentication and generic pointer authentication. These
capabilities depend upon system support for pointer authentication and
VHE mode.

The current arm64 KVM partially implements pointer authentication and
support of address/generic authentication are tied together. However,
separate ABI requirements for both of them is added so that any future
isolated implementation will not require any ABI changes.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:30:40 +01:00
Amit Daniel Kachhap a22fa321d1 KVM: arm64: Add userspace flag to enable pointer authentication
Now that the building blocks of pointer authentication are present, lets
add userspace flags KVM_ARM_VCPU_PTRAUTH_ADDRESS and
KVM_ARM_VCPU_PTRAUTH_GENERIC. These flags will enable pointer
authentication for the KVM guest on a per-vcpu basis through the ioctl
KVM_ARM_VCPU_INIT.

This features will allow the KVM guest to allow the handling of
pointer authentication instructions or to treat them as undefined
if not set.

Necessary documentations are added to reflect the changes done.

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:30:40 +01:00
Mark Rutland 384b40caa8 KVM: arm/arm64: Context-switch ptrauth registers
When pointer authentication is supported, a guest may wish to use it.
This patch adds the necessary KVM infrastructure for this to work, with
a semi-lazy context switch of the pointer auth state.

Pointer authentication feature is only enabled when VHE is built
in the kernel and present in the CPU implementation so only VHE code
paths are modified.

When we schedule a vcpu, we disable guest usage of pointer
authentication instructions and accesses to the keys. While these are
disabled, we avoid context-switching the keys. When we trap the guest
trying to use pointer authentication functionality, we change to eagerly
context-switching the keys, and enable the feature. The next time the
vcpu is scheduled out/in, we start again. However the host key save is
optimized and implemented inside ptrauth instruction/register access
trap.

Pointer authentication consists of address authentication and generic
authentication, and CPUs in a system might have varied support for
either. Where support for either feature is not uniform, it is hidden
from guests via ID register emulation, as a result of the cpufeature
framework in the host.

Unfortunately, address authentication and generic authentication cannot
be trapped separately, as the architecture provides a single EL2 trap
covering both. If we wish to expose one without the other, we cannot
prevent a (badly-written) guest from intermittently using a feature
which is not uniformly supported (when scheduled on a physical CPU which
supports the relevant feature). Hence, this patch expects both type of
authentication to be present in a cpu.

This switch of key is done from guest enter/exit assembly as preparation
for the upcoming in-kernel pointer authentication support. Hence, these
key switching routines are not implemented in C code as they may cause
pointer authentication key signing error in some situations.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[Only VHE, key switch in full assembly, vcpu_has_ptrauth checks
, save host key in ptrauth exception trap]
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
[maz: various fixups]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-24 15:30:40 +01:00
Katsuhiro Suzuki 798689e451 arm64: dts: rockchip: fix IO domain voltage setting of APIO5 on rockpro64
This patch fixes IO domain voltage setting that is related to
audio_gpio3d4a_ms (bit 1) of GRF_IO_VSEL.

This is because RockPro64 schematics P.16 says that regulator
supplies 3.0V power to APIO5_VDD. So audio_gpio3d4a_ms bit should
be clear (means 3.0V). Power domain map is saying different thing
(supplies 1.8V) but I believe P.16 is actual connectings.

Fixes: e4f3fb4909 ("arm64: dts: rockchip: add initial dts support for Rockpro64")
Cc: stable@vger.kernel.org
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-04-23 23:29:08 +02:00
Linus Torvalds d286e13d53 arch: add pidfd and io_uring syscalls everywhere
This comes a bit late, but should be in 5.1 anyway: we want the newly
 added system calls to be synchronized across all architectures in
 the release.
 
 I hope that in the future, any newly added system calls can be added
 to all architectures at the same time, and tested there while they
 are in linux-next, avoiding dependencies between the architecture
 maintainer trees and the tree that contains the new system call.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJcv2aZAAoJEGCrR//JCVIncu4QALpTBqbjSu9u1/nXRGMLWo9J
 uToSBohDvsKW7wMkHcr1dU75ERIX9gqIY5pJWDrwzBdGDt02/oiy6WofXZDv4WkR
 Sp4YncdTeZENi0nNN+mrGDzNrcvBJd0FRc1MSLgPzfKXgf8P1oRzEsOaJVlGY5hS
 A8rNNUYE37m6rhTS59tNxzGvQcq3J7Q9ZRc0xjbSqIFngYVfQQiVbQCqd8RI6s9W
 +Hek+e5VF5HQnzhmTT9MQM4TsxMRMNfzrYpjhhayuLJ3CHROJPX7x9pZEGdyusQS
 5rDZxKes9SKTFS9QqycSyJkoP0awxrVrjqD1zFkWOJht0c3UCQAmw6GD7rlJkGPB
 vofuzmPzMq5XaZ8vpTucWNL+0ymzRXhhQ6esV39vRwxztRc4/DCy5MHDnrPK5yXb
 olPbltMAlHMaY5KePI/3jwpkcmzZjz9SNOKQ9/9tFlB5+RVF2qQdUgRMPE+XYa4H
 pRrZChrEAf6ZjINGeLlIVtpTlBFPl1LRF7UkOy7TYBvtRqukduXYpOFPb1XspQUl
 flIdBLOY3iF33o0eQnz10BEMxlblFhTj0SQrt0684kili7TjsWDaT+hPZSd72hhi
 Wey9l39kaexV2Sh7XZ6oUe205ay3R8sTn0Ic2+CnZaboeOuYlLYc8/w2HkTeTYmu
 9f3HAlX4Qu6RuX8bxLO0
 =Y7Kd
 -----END PGP SIGNATURE-----

Merge tag 'syscalls-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull syscall numbering updates from Arnd Bergmann:
 "arch: add pidfd and io_uring syscalls everywhere

  This comes a bit late, but should be in 5.1 anyway: we want the newly
  added system calls to be synchronized across all architectures in the
  release.

  I hope that in the future, any newly added system calls can be added
  to all architectures at the same time, and tested there while they are
  in linux-next, avoiding dependencies between the architecture
  maintainer trees and the tree that contains the new system call"

* tag 'syscalls-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  arch: add pidfd and io_uring syscalls everywhere
2019-04-23 13:34:17 -07:00
Srinivas Kandagatla f3eb39a55a arm64: dts: db820c: Add sound card support
This patch adds support both digital and analog audio on DB820c.
This board has HDMI port and 3.5mm audio jack to support both digital
and analog audio respectively.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:54:47 -05:00
Christoph Hellwig c67fdc1f00 arch: mostly remove <asm/segment.h>
A few architectures use <asm/segment.h> internally, but nothing in
common code does. Remove all the empty or almost empty versions of it,
including the asm-generic one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-04-23 21:51:40 +02:00
Archit Taneja 1ad69b6955 arm64: dts: apq8096-db820c: Add HDMI display support
The APQ8096 DB820c platform provides HDMI output. The MDSS block on
8x96 supports a direct HDMI out. Populate the MDSS, MDP and HDMI DT
nodes. Also, add the HDMI HPD and DDC pinctrl nodes with the bias
and driver strength specified for this platform.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:42:15 -05:00
Jordan Crouse 69cc3114ab arm64: dts: Add Adreno GPU definitions
Add an initial node for the Adreno GPU.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:42:11 -05:00
Archit Taneja 3a4547c1fc arm64: qcom: msm8996.dtsi: Add Display nodes
Signed-off-by: Archit Taneja <architt@codeaurora.org>
[Removed instances of mmagic clocks;
Use qcom,msm8996-smmu-v2 bindings]
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:42:06 -05:00
Archit Taneja 953f657370 arm64: dts: msm8996: Add display smmu node
Add device node for display smmu, aka. mdp_smmu.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:41:27 -05:00
Jordan Crouse d26c474d4c arm64: dts: msm8996: Add graphics smmu node
Add device node for graphics smmu, aka. adreno_smmu.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:38:44 -05:00
Matthias Kaehlcke b6bc6423fa arm64: dts: sdm845: Add CPU capacity values
Specify the relative CPU capacity of all SDM845 AP cores.

The values were provided by Qualcomm engineers.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:22:16 -05:00
Matthias Kaehlcke 7b5ee83dfd arm64: dts: sdm845: Add CPU topology
The 8 CPU cores of the SDM845 are organized in two clusters of 4 big
("gold") and 4 little ("silver") cores. Add a cpu-map node to the DT
that describes this topology.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:21:39 -05:00
Matthias Kaehlcke 0c0e72705a arm64: dts: sdm845: Set 'bi_tcxo' as ref clock of the DSI PHYs
Add 'bi_tcxo' as ref clock for the DSI PHYs, it was previously
hardcoded in the PLL 'driver' for the 10nm PHY.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:20:37 -05:00
Matthias Kaehlcke 79e51645a1 arm64: dts: qcom: msm8916: Set 'xo_board' as ref clock of the DSI PHY
Add 'xo_board' as ref clock for the DSI PHYs, it was previously
hardcoded in the PLL 'driver' for the 28nm PHY.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:20:24 -05:00
Matthias Kaehlcke 7bfd90f5a5 arm64: dts: qcom: pm8998: Use ADC temperature to temp-alarm node
The temperature information from the temp-alarm block itself is very
coarse ("temperature is above/below trip points"). Provide the driver
with the die temperature channel of the ADC on the PMIC for more precise
readings.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 14:19:06 -05:00
Dave Martin 06a916feca arm64: Expose SVE2 features for userspace
This patch provides support for reporting the presence of SVE2 and
its optional features to userspace.

This will also enable visibility of SVE2 for guests, when KVM
support for SVE-enabled guests is available.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:02:00 +01:00
Will Deacon dd523791c9 arm64: Kconfig: Make CONFIG_COMPAT a menuconfig entry
Make CONFIG_COMPAT a menuconfig entry so that we can place
CONFIG_KUSER_HELPERS and CONFIG_ARMV8_DEPRECATED underneath it.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:01:59 +01:00
Vincenzo Frascino af1b3cf2c2 arm64: compat: Add KUSER_HELPERS config option
When kuser helpers are enabled the kernel maps the relative code at
a fixed address (0xffff0000). Making configurable the option to disable
them means that the kernel can remove this mapping and any access to
this memory area results in a sigfault.

Add a KUSER_HELPERS config option that can be used to disable the
mapping when it is turned off.

This option can be turned off if and only if the applications are
designed specifically for the platform and they do not make use of the
kuser helpers code.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[will: Use IS_ENABLED() instead of #ifdef]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:01:58 +01:00
Vincenzo Frascino 1255a7341b arm64: compat: Refactor aarch32_alloc_vdso_pages()
aarch32_alloc_vdso_pages() needs to be refactored to make it
easier to disable kuser helpers.

Divide the function in aarch32_alloc_kuser_vdso_page() and
aarch32_alloc_sigreturn_vdso_page().

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[will: Inlined sigpage allocation to simplify error paths]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:01:58 +01:00
Vincenzo Frascino d1e5ca64d5 arm64: compat: Split kuser32
To make it possible to disable kuser helpers in aarch32 we need to
divide the kuser and the sigreturn functionalities.

Split the current version of kuser32 in kuser32 (for kuser helpers)
and sigreturn32 (for sigreturn helpers).

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:01:57 +01:00
Vincenzo Frascino 0d747f6585 arm64: compat: Alloc separate pages for vectors and sigpage
For AArch32 tasks, we install a special "[vectors]" page that contains
the sigreturn trampolines and kuser helpers, which is mapped at a fixed
address specified by the kuser helpers ABI.

Having the sigreturn trampolines in the same page as the kuser helpers
makes it impossible to disable the kuser helpers independently.

Follow the Arm implementation, by moving the signal trampolines out of
the "[vectors]" page and into their own "[sigpage]".

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[will: tweaked comments and fixed sparse warning]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-23 18:01:31 +01:00
Ard Biesheuvel 4e69ecf4da arm64/module: ftrace: deal with place relative nature of PLTs
Another bodge for the ftrace PLT code: plt_entries_equal() now takes
the place relative nature of the ADRP/ADD based PLT entries into
account, which means that a struct trampoline instance on the stack
is no longer equal to the same set of opcodes in the module struct,
given that they don't point to the same place in memory anymore.

Work around this by using memcmp() in the ftrace PLT handling code.

Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-04-23 13:35:00 +01:00
Bjorn Andersson d4d18e3ec6 arm64: mm: Ensure tail of unaligned initrd is reserved
In the event that the start address of the initrd is not aligned, but
has an aligned size, the base + size will not cover the entire initrd
image and there is a chance that the kernel will corrupt the tail of the
image.

By aligning the end of the initrd to a page boundary and then
subtracting the adjusted start address the memblock reservation will
cover all pages that contains the initrd.

Fixes: c756c592e4 ("arm64: Utilize phys_initrd_start/phys_initrd_size")
Cc: stable@vger.kernel.org
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-04-23 10:56:24 +01:00
Amit Daniel Kachhap b890d75c4c KVM: arm64: Add a vcpu flag to control ptrauth for guest
A per vcpu flag is added to check if pointer authentication is
enabled for the vcpu or not. This flag may be enabled according to
the necessary user policies and host capabilities.

This patch also adds a helper to check the flag.

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-23 08:47:01 +01:00
Bjorn Andersson 6ef7c11b31 arm64: dts: sdm845: Introduce ADSP and CDSP PAS nodes
Add the Audio DSP (ADSP) and Compute DSP (CDSP) nodes for TrustZone
based remoteproc, supporting booting these cores on e.g. the MTP, and
enable the same for the MTP.

Tested-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 00:10:35 -05:00
Bjorn Andersson bdecbe6b48 arm64: dts: qcom: sdm845: Define rmtfs memory
Define the rmtfs memory node. As the memory region specified in version
10 of the memory map is only 1MB a chunk of unallocated memory is
chosen.

Tested-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 00:10:27 -05:00
Bjorn Andersson a23b5378b2 arm64: dts: qcom: sdm845: Update reserved memory map
Update existing and add missing regions to the reserved memory map, as
described in version 10.

Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 00:10:18 -05:00
Evan Green 71278b058a arm64: dts: sdm845: Add UFS PHY reset
Wire up the reset controller in the Qcom UFS controller for the PHY.
This will be used to toggle PHY reset during initialization of the PHY.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-23 00:10:10 -05:00
Ran Wang 00c5ce8ac0 arm64: dts: lx2160a: add cpu idle support
lx2160a supports pw20 which could help save more power during cpu is
dile. It needs system firmware support via PSCI.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 10:40:45 +08:00
Lucas Stach ade5a57e30 arm64: dts: imx8mq: fix GPU clock frequency
v2 of "clk: imx: Refactor entire sccg pll clk" dropped the implicit
reparenting of the PLL output from the bypass clock to the real
PLL. The commit introducing the GPU node had only been tested against
v1 of this patch. Without an explicit reparent to the real PLL the
GPU is stuck at the bypass clock rate of 25MHz, serverly hampering
performance.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:05 +08:00
Lucas Stach eda73fc814 arm64: dts: fsl: imx8mq-evk: link regulator to GPU domain
Link the SW1AB regulator to the GPU domain, so that it gets enabled
when needed.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:05 +08:00
Leonard Crestez e85c9d0faa arm64: dts: imx8mm: Add cpufreq properties
This is very similar to imx8mq cpufreq-dt support.

Operating points are from datasheet:
https://www.nxp.com/docs/en/data-sheet/IMX8MMCEC.pdf

Higher opps were omitted (just like imx8mq) because it requires checking
speed grade from OCOTP fuses.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:05 +08:00
Leonard Crestez 7b2ac489c3 arm64: dts: imx8qxp-mek: Add i2c1 with pca9646
Add an initial description of the i2c1 bus with a pca9646 i2c switch and
various gpio expanders and sensors behind that. Only add the sensors
which already have upstream drivers.

According to the datasheet the pca9646 is software compatible with
pca9546 so no driver changes should be required.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:04 +08:00
Anson Huang 6b2bcbd8f9 arm64: dts: imx8qxp: enable scu general irq channel
On i.MX8QXP, SCU uses MU1 general interrupt channel #3 to notify
user for IRQs of RTC alarm, thermal alarm and WDOG etc., mailbox
RX doorbell mode is used for this function, this patch adds
support for it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:04 +08:00
Lucas Stach 45d2c84eb3 arm64: dts: imx8mq: add GPU node
This enables the Vivante GC7000L GPU on the i.MX8MQ SoC.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:04 +08:00
Lucas Stach 4a13b3bec3 arm64: dts: imx: add Zii Ultra board support
The Zii Ultra design, also known as RDU3, is the i.MX8M based successor
to the the i.MX6 based RDU2. This adds the basic board support for all
components which are supported by the upstream kernel at this time.

The board comes in 2 different versions, called RMB3 and Zest, which
are derived from the same design, but have different layouts and a
few small differences in the populated components.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-22 09:26:04 +08:00
Thomas Schreiber e97bb6d478 arm64: dts: clearfog-gt-8k: add wlan_disable signal hog
There is currently no DT binding for GPIO rfkill signals. To make
mini-PCIe attached WiFi devices work, use gpio-hog to hold the
wlan_disable signal de-asserted.

Signed-off-by: Thomas Schreiber <tschreibe@gmail.com>
[baruch: add pinctrl node; rename tag]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2019-04-21 19:07:47 +02:00
Thomas Petazzoni 04eb7fd961 arm64: defconfig: enable mv-xor driver
The mv-xor DMA driver is used for the XOR engine found in the ARM64
Marvell Armada 3720 SoC, so it makes sense to have it enabled in the
arm64 defconfig. A recent boot-time regression was found in mv-xor,
which would have been more easily noticed with this driver enabled by
default.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2019-04-21 15:46:39 +02:00
David Howells 5dd50aaeb1
Make anon_inodes unconditional
Make the anon_inodes facility unconditional so that it can be used by core
VFS code and pidfd code.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[christian@brauner.io: adapt commit message to mention pidfds]
Signed-off-by: Christian Brauner <christian@brauner.io>
2019-04-19 14:03:11 +02:00
Marc Gonzalez c8be554104 arm64: dts: qcom: msm8998: Fix blsp2_i2c5 address
blsp1_i2c1 is at 0x0c175000
blsp2_i2c5 is at 0x0c1ba000 (the label is correct)

Fixes: 1e71d0c273 ("arm64: dts: qcom: msm8998: Enumerate i2c controllers")
Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:48 -05:00
Khasim Syed Mohammed 3efd4352ba arm64: dts: qcom: qcs404-evb: Change the compatible to distinguish platforms
The compatible flag should be different for each board to match
with the dtb and to let the bootloader pick the appropriate dtb.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:47 -05:00
Brian Masney d1fe337337 arm64: dts: qcom: pmi8998: add gpio-ranges
This adds the gpio-ranges property so that the GPIO pins are initialized
by the GPIO framework and not pinctrl. This fixes a circular dependency
between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same
change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:46 -05:00
Brian Masney 21750eb93e arm64: dts: qcom: pmi8994: add gpio-ranges
This adds the gpio-ranges property so that the GPIO pins are initialized
by the GPIO framework and not pinctrl. This fixes a circular dependency
between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same
change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:46 -05:00
Brian Masney 99c70e7286 arm64: dts: qcom: pm8998: add gpio-ranges
This adds the gpio-ranges property so that the GPIO pins are initialized
by the GPIO framework and not pinctrl. This fixes a circular dependency
between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same
change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:45 -05:00
Brian Masney 136e9d920d arm64: dts: qcom: pm8005: add gpio-ranges
This adds the gpio-ranges property so that the GPIO pins are initialized
by the GPIO framework and not pinctrl. This fixes a circular dependency
between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same
change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Andy Gross <agross@kernel.org>
2019-04-18 23:09:45 -05:00
Nathan Chancellor ff8acf9290 arm64: futex: Restore oldval initialization to work around buggy compilers
Commit 045afc2412 ("arm64: futex: Fix FUTEX_WAKE_OP atomic ops with
non-zero result value") removed oldval's zero initialization in
arch_futex_atomic_op_inuser because it is not necessary. Unfortunately,
Android's arm64 GCC 4.9.4 [1] does not agree:

../kernel/futex.c: In function 'do_futex':
../kernel/futex.c:1658:17: warning: 'oldval' may be used uninitialized
in this function [-Wmaybe-uninitialized]
   return oldval == cmparg;
                 ^
In file included from ../kernel/futex.c:73:0:
../arch/arm64/include/asm/futex.h:53:6: note: 'oldval' was declared here
  int oldval, ret, tmp;
      ^

GCC fails to follow that when ret is non-zero, futex_atomic_op_inuser
returns right away, avoiding the uninitialized use that it claims.
Restoring the zero initialization works around this issue.

[1]: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/

Cc: stable@vger.kernel.org
Fixes: 045afc2412 ("arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-04-18 18:17:08 +01:00
Dave Martin 92e68b2b1b KVM: arm/arm64: Clean up vcpu finalization function parameter naming
Currently, the internal vcpu finalization functions use a different
name ("what") for the feature parameter than the name ("feature")
used in the documentation.

To avoid future confusion, this patch converts everything to use
the name "feature" consistently.

No functional change.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:02 +01:00
Dave Martin ecfb6ed4f6 KVM: arm64/sve: Explain validity checks in set_sve_vls()
Correct virtualization of SVE relies for correctness on code in
set_sve_vls() that verifies consistency between the set of vector
lengths requested by userspace and the set of vector lengths
available on the host.

However, the purpose of this code is not obvious, and not likely to
be apparent at all to people who do not have detailed knowledge of
the SVE system-level architecture.

This patch adds a suitable comment to explain what these checks are
for.

No functional change.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:02 +01:00
Dave Martin 4bd774e57b KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing
A complicated DIV_ROUND_UP() expression is currently written out
explicitly in multiple places in order to specify the size of the
bitmap exchanged with userspace to represent the value of the
KVM_REG_ARM64_SVE_VLS pseudo-register.

Userspace currently has no direct way to work this out either: for
documentation purposes, the size is just quoted as 8 u64s.

To make this more intuitive, this patch replaces these with a
single define, which is also exported to userspace as
KVM_ARM64_SVE_VLS_WORDS.

Since the number of words in a bitmap is just the index of the last
word used + 1, this patch expresses the bound that way instead.
This should make it clearer what is being expressed.

For userspace convenience, the minimum and maximum possible vector
lengths relevant to the KVM ABI are exposed to UAPI as
KVM_ARM64_SVE_VQ_MIN, KVM_ARM64_SVE_VQ_MAX.  Since the only direct
use for these at present is manipulation of KVM_REG_ARM64_SVE_VLS,
no corresponding _VL_ macros are defined.  They could be added
later if a need arises.

Since use of DIV_ROUND_UP() was the only reason for including
<linux/kernel.h> in guest.c, this patch also removes that #include.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:02 +01:00
Dave Martin 55ffad3b63 KVM: arm64/sve: WARN when avoiding divide-by-zero in sve_reg_to_region()
sve_reg_to_region() currently passes the result of
vcpu_sve_state_size() to array_index_nospec(), effectively
leading to a divide / modulo operation.

Currently the code bails out and returns -EINVAL if
vcpu_sve_state_size() turns out to be zero, in order to avoid going
ahead and attempting to divide by zero.  This is reasonable, but it
should only happen if the kernel contains some other bug that
allowed this code to be reached without the vcpu having been
properly initialised.

To make it clear that this is a defence against bugs rather than
something that the user should be able to trigger, this patch marks
the check with WARN_ON().

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin 52110aa959 KVM: arm64/sve: Make register ioctl access errors more consistent
Currently, the way error codes are generated when processing the
SVE register access ioctls in a bit haphazard.

This patch refactors the code so that the behaviour is more
consistent: now, -EINVAL should be returned only for unrecognised
register IDs or when some other runtime error occurs.  -ENOENT is
returned for register IDs that are recognised, but whose
corresponding register (or slice) does not exist for the vcpu.

To this end, in {get,set}_sve_reg() we now delegate the
vcpu_has_sve() check down into {get,set}_sve_vls() and
sve_reg_to_region().  The KVM_REG_ARM64_SVE_VLS special case is
picked off first, then sve_reg_to_region() plays the role of
exhaustively validating or rejecting the register ID and (where
accepted) computing the applicable register region as before.

sve_reg_to_region() is rearranged so that -ENOENT or -EPERM is not
returned prematurely, before checking whether reg->id is in a
recognised range.

-EPERM is now only returned when an attempt is made to access an
actually existing register slice on an unfinalized vcpu.

Fixes: e1c9c98345 ("KVM: arm64/sve: Add SVE support to register access ioctl interface")
Fixes: 9033bba4b5 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths")
Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin f8d4635aff KVM: arm64/sve: Miscellaneous tidyups in guest.c
* Remove a few redundant blank lines that are stylistically
   inconsistent with code already in guest.c and are just taking up
   space.

 * Delete a couple of pointless empty default cases from switch
   statements whose behaviour is otherwise obvious anyway.

 * Fix some typos and consolidate some redundantly duplicated
   comments.

 * Respell the slice index check in sve_reg_to_region() as "> 0"
   to be more consistent with what is logically being checked here
   (i.e., "is the slice index too large"), even though we don't try
   to cope with multiple slices yet.

No functional change.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin 8ae6efdde4 KVM: arm64/sve: Clean up UAPI register ID definitions
Currently, the SVE register ID macros are not all defined in the
same way, and advertise the fact that FFR maps onto the nonexistent
predicate register P16.  This is really just for kernel
convenience, and may lead userspace into bad habits.

Instead, this patch masks the ID macro arguments so that
architecturally invalid register numbers will not be passed through
any more, and uses a literal KVM_REG_ARM64_SVE_FFR_BASE macro to
define KVM_REG_ARM64_SVE_FFR(), similarly to the way the _ZREG()
and _PREG() macros are defined.

Rather than plugging in magic numbers for the number of Z- and P-
registers and the maximum possible number of register slices, this
patch provides definitions for those too.  Userspace is going to
need them in any case, and it makes sense for them to come from
<uapi/asm/kvm.h>.

sve_reg_to_region() uses convenience constants that are defined in
a different way, and also makes use of the fact that the FFR IDs
are really contiguous with the P15 IDs, so this patch retains the
existing convenience constants in guest.c, supplemented with a
couple of sanity checks to check for consistency with the UAPI
header.

Fixes: e1c9c98345 ("KVM: arm64/sve: Add SVE support to register access ioctl interface")
Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin 700698a8a9 KVM: arm64/sve: sys_regs: Demote redundant vcpu_has_sve() checks to WARNs
Because of the logic in kvm_arm_sys_reg_{get,set}_reg() and
sve_id_visibility(), we should never call
{get,set}_id_aa64zfr0_el1() for a vcpu where !vcpu_has_sve(vcpu).

To avoid the code giving the impression that it is valid for these
functions to be called in this situation, and to help the compiler
make the right optimisation decisions, this patch adds WARN_ON()
for these cases.

Given the way the logic is spread out, this seems preferable to
dropping the checks altogether.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin a3be836df7 KVM: arm/arm64: Demote kvm_arm_init_arch_resources() to just set up SVE
The introduction of kvm_arm_init_arch_resources() looks like
premature factoring, since nothing else uses this hook yet and it
is not clear what will use it in the future.

For now, let's not pretend that this is a general thing:

This patch simply renames the function to kvm_arm_init_sve(),
retaining the arm stub version under the new name.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Dave Martin 624835abf9 arm64/sve: Clarify vq map semantics
Currently the meanings of sve_vq_map and the ancillary helpers
__bit_to_vq() and __vq_to_bit() are not clearly explained.

This patch makes the explanatory comment clearer, and removes the
duplicate comment from fpsimd.h.

The WARN_ON() currently present in __bit_to_vq() confuses the
intended use of this helper.  Since these are low-level helpers not
intended for general-purpose use anyway, it is better not to make
guesses about how these functions will be used: rather, this patch
removes the WARN_ON() and relies on callers to use the helpers
sensibly.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-04-18 17:14:01 +01:00
Jagan Teki 7cc399f267
arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node
Amarula A64-Relic board by default bound with OV5640 camera,
so add support for it with below pin information.

- PE13, PE12 via i2c-gpio bitbanging
- CLK_CSI_MCLK as external clock
- PE1 as external clock pin muxing
- ALDO1 as AVDD supply
- DLDO3 as DOVDD supply
- ELDO3 as DVDD supply
- PE14 gpio for reset pin
- PE15 gpio for powerdown pin

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-04-18 16:53:57 +02:00
Jagan Teki f7056b28b7
arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1
Some camera modules have the SoC feeding a master clock to the sensor
instead of having a standalone crystal. This clock signal is generated
from the clock control unit and output from the CSI MCLK function of
pin PE1.

Add a pinmux setting for it for camera sensors to reference.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-04-18 16:53:23 +02:00
Eric Biggers 4a8108b705 crypto: arm64/aes-neonbs - don't access already-freed walk.iv
If the user-provided IV needs to be aligned to the algorithm's
alignmask, then skcipher_walk_virt() copies the IV into a new aligned
buffer walk.iv.  But skcipher_walk_virt() can fail afterwards, and then
if the caller unconditionally accesses walk.iv, it's a use-after-free.

xts-aes-neonbs doesn't set an alignmask, so currently it isn't affected
by this despite unconditionally accessing walk.iv.  However this is more
subtle than desired, and unconditionally accessing walk.iv has caused a
real problem in other algorithms.  Thus, update xts-aes-neonbs to start
checking the return value of skcipher_walk_virt().

Fixes: 1abee99eaf ("crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64")
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-04-18 22:14:58 +08:00
Miquel Raynal 72c5af0027 mtd: rawnand: Clarify Kconfig entry MTD_NAND
MTD_NAND is large and encloses much more than what the symbol is
actually used for: raw NAND. Clarify the symbol by naming it
MTD_RAW_NAND instead.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-04-18 08:54:00 +02:00
Maxime Ripard 275b63178f
arm64: dts: allwinner: Fix DE2 bus node name
According to the device tree specification, any bus should have a 'bus'
node name.

Since it isn't the case for us on the DE2 bus, fix that.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-04-17 16:56:59 +02:00
Thierry Reding 2f03e39b5b arm64: tegra: Remove regulator hacks on Jetson TX2
Various regulators were marked as always-on for Jetson TX2. At this
point, all of the regulators are properly hooked up, so this workaround
is no longer required.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:48:44 +02:00
Thierry Reding 72f8ae3f8d arm64: tegra: Enable XUSB on P2771
Enable the relevant pads for XUSB support on P2771-0000 and hook up the
USB supply voltage regulators to the ports.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:48:44 +02:00
Thierry Reding 8bfde5183e arm64: tegra: Add XUSB and pad controller on Tegra186
Adds the XUSB pad and XUSB controllers on Tegra186.

Reviewed-by: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:48:43 +02:00
Thierry Reding 6772cd0eac arm64: tegra: Add NVIDIA Jetson Nano Developer Kit support
The Jetson Nano Developer Kit is a Tegra X1 based development board. It
is similar to Jetson TX1 but it is not pin compatible. It features 4 GB
of LPDDR4, an SPI NOR flash for early boot firmware and an SD card slot
used for storage.

HDMI 2.0 or DP 1.2 are available for display, four USB ports (3 USB 2.0
and 1 USB 3.0) can be used to attach a variety of peripherals and a PCI
Ethernet controller provides onboard network connectivity. An M.2 Key-E
slot with PCIe x1 adds additional possibilities.

A 40-pin header on the board can be used to extend the capabilities and
exposed interfaces of the Jetson Nano.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:25:18 +02:00
Thierry Reding fa941e695e arm64: tegra: smaug: Move PLL power supplies to XUSB pad controller
The XUSB pad controller is responsible for supplying power to the PLLs
used to drive the various USB, PCI and SATA pads. Move the PLL power
supplies from the PCIe and XUSB controllers to the XUSB pad controller
to make sure they are available when needed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:25:15 +02:00
Thierry Reding 8f68dcd74d arm64: tegra: jetson-tx1: Move PLL power supplies to XUSB pad controller
The XUSB pad controller is responsible for supplying power to the PLLs
used to drive the various USB, PCI and SATA pads. Move the PLL power
supplies from the PCIe and XUSB controllers to the XUSB pad controller
to make sure they are available when needed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-17 16:25:14 +02:00
Maxime Ripard 3c7ab90aaa
arm64: dts: allwinner: Remove useless phy-names from EHCI and OHCI
Neither the OHCI or EHCI bindings are using the phy-names property, so we
can just drop it.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-04-17 09:58:14 +02:00
Neil Armstrong 659f2563d3 arm64: dts: meson-g12a-u200: Add support for Video Display
This patch adds the HDMI, CVBS and CEC attributes and nodes to support
full display on the U200 Reference Design.

AO-CEC-B is used by default and AO-CEC-A is disabled.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:21:46 -07:00
Neil Armstrong 912a3395df arm64: dts: meson-g12a-sei510: Add support for Video Display
This patch adds the HDMI, CVBS and CEC attributes and nodes to support
full display on the SEI510 STB.

AO-CEC-B is used by default and AO-CEC-A is disabled.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:21:45 -07:00
Neil Armstrong b0be96160a arm64: dts: meson-g12a-x96-max: Add support for Video Display
This patch adds the HDMI, CVBS and CEC attributes and nodes to support
full display on the X96 Max STB.

AO-CEC-B is used by default and AO-CEC-A is disabled.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:21:44 -07:00
Neil Armstrong 91516e5419 arm64: dts: meson-g12a: Add AO-CEC nodes
Amlogic G12A embeds 2 CEC controllers :
- AO-CEC-A the same controller as in GXBB, GXL & GXM SoCs
- AO-CEC-B is a new controller

Note, the two controller can work simultanously since 2 Pads can
handle CEC, thus this SoC can handle 2 distinct CEC busses.

This patch adds the nodes for the AO-CEC-A and AO-CEC-B controllers.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:21:41 -07:00
Neil Armstrong 083feecd85 arm64: dts: meson-g12a: Add VPU and HDMI related nodes
Add VPU and HDMI display support.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-04-16 11:21:30 -07:00
Vincenzo Frascino 81fb8736dd arm64: vdso: Fix clock_getres() for CLOCK_REALTIME
clock_getres() in the vDSO library has to preserve the same behaviour
of posix_get_hrtimer_res().

In particular, posix_get_hrtimer_res() does:

    sec = 0;
    ns = hrtimer_resolution;

where 'hrtimer_resolution' depends on whether or not high resolution
timers are enabled, which is a runtime decision.

The vDSO incorrectly returns the constant CLOCK_REALTIME_RES. Fix this
by exposing 'hrtimer_resolution' in the vDSO datapage and returning that
instead.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
[will: Use WRITE_ONCE(), move adr off COARSE path, renumber labels, use 'w' reg]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 18:15:56 +01:00
Nishad Kamdar 22e6c8087e arm64: Use the correct style for SPDX License Identifier
This patch corrects the SPDX License Identifier style
in the arm64 Hardware Architecture related files.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:28:01 +01:00
Mark Rutland 131e135f7f arm64: instrument smp_{load_acquire,store_release}
Our __smp_store_release() and __smp_load_acquire() macros use inline
assembly, which is opaque to kasan. This means that kasan can't catch
erroneous use of these.

This patch adds kasan instrumentation to both.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[will: consistently use *p as argument to sizeof]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:28:00 +01:00
Miles Chen eea1bb2248 arm64: mm: check virtual addr in virt_to_page() if CONFIG_DEBUG_VIRTUAL=y
This change uses the original virt_to_page() (the one with __pa()) to
check the given virtual address if CONFIG_DEBUG_VIRTUAL=y.

Recently, I worked on a bug: a driver passes a symbol address to
dma_map_single() and the virt_to_page() (called by dma_map_single())
does not work for non-linear addresses after commit 9f2875912d
("arm64: mm: restrict virt_to_page() to the linear mapping").

I tried to trap the bug by enabling CONFIG_DEBUG_VIRTUAL but it
did not work - bacause the commit removes the __pa() from
virt_to_page() but CONFIG_DEBUG_VIRTUAL checks the virtual address
in __pa()/__virt_to_phys().

A simple solution is to use the original virt_to_page()
(the one with__pa()) if CONFIG_DEBUG_VIRTUAL=y.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:59 +01:00
Andrew Murray b9585f53bc arm64: Advertise ARM64_HAS_DCPODP cpu feature
Advertise ARM64_HAS_DCPODP when both DC CVAP and DC CVADP are supported.

Even though we don't use this feature now, we provide it for consistency
with DCPOP and anticipate it being used in the future.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:59 +01:00
Andrew Murray 04a1438e56 arm64: add CVADP support to the cache maintenance helper
Allow users of dcache_by_line_op to specify cvadp as an op.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:58 +01:00
Andrew Murray 671db58181 arm64: Expose DC CVADP to userspace
ARMv8.5 builds upon the ARMv8.2 DC CVAP instruction by introducing a DC
CVADP instruction which cleans the data cache to the point of deep
persistence. Let's expose this support via the arm64 ELF hwcaps.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:56 +01:00
Andrew Murray d16ed4105f arm64: Handle trapped DC CVADP
The ARMv8.5 DC CVADP instruction may be trapped to EL1 via
SCTLR_EL1.UCI therefore let's provide a handler for it.

Just like the CVAP instruction we use a 'sys' instruction instead of
the 'dc' alias to avoid build issues with older toolchains.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:36 +01:00
Andrew Murray aec0bff757 arm64: HWCAP: encapsulate elf_hwcap
The introduction of AT_HWCAP2 introduced accessors which ensure that
hwcap features are set and tested appropriately.

Let's now mandate access to elf_hwcap via these accessors by making
elf_hwcap static within cpufeature.c.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:35 +01:00
Andrew Murray aaba098fe6 arm64: HWCAP: add support for AT_HWCAP2
As we will exhaust the first 32 bits of AT_HWCAP let's start
exposing AT_HWCAP2 to userspace to give us up to 64 caps.

Whilst it's possible to use the remaining 32 bits of AT_HWCAP, we
prefer to expand into AT_HWCAP2 in order to provide a consistent
view to userspace between ILP32 and LP64. However internal to the
kernel we prefer to continue to use the full space of elf_hwcap.

To reduce complexity and allow for future expansion, we now
represent hwcaps in the kernel as ordinals and use a
KERNEL_HWCAP_ prefix. This allows us to support automatic feature
based module loading for all our hwcaps.

We introduce cpu_set_feature to set hwcaps which complements the
existing cpu_have_feature helper. These helpers allow us to clean
up existing direct uses of elf_hwcap and reduce any future effort
required to move beyond 64 caps.

For convenience we also introduce cpu_{have,set}_named_feature which
makes use of the cpu_feature macro to allow providing a hwcap name
without a {KERNEL_}HWCAP_ prefix.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
[will: use const_ilog2() and tweak documentation]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-16 16:27:12 +01:00