Commit Graph

13743 Commits

Author SHA1 Message Date
Ard Biesheuvel 6e99d3213b efi/libstub: Add missing prototype for PE/COFF entry point
Fix a missing prototype warning by adding a forward declaration
for the PE/COFF entrypoint, and while at it, align the function
name between the x86 and ARM versions of the stub.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2020-05-23 11:01:57 +02:00
Bartosz Golaszewski 4e4ad6862d ARM64: dts: mediatek: enable ethernet on pumpkin boards
Add remaining properties to the ethernet node and enable it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 14:20:12 -07:00
Bartosz Golaszewski 7c20f7f36e ARM64: dts: mediatek: add ethernet pins for pumpkin boards
Setup the pin control for the Ethernet MAC.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 14:20:12 -07:00
Bartosz Golaszewski b3f5758f0d ARM64: dts: mediatek: add an alias for ethernet0 for pumpkin boards
Add the ethernet0 alias for ethernet so that u-boot can find this node
and fill in the MAC address.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 14:20:12 -07:00
Bartosz Golaszewski fe3b2107ae ARM64: dts: mediatek: add the ethernet node to mt8516.dtsi
Add the Ethernet MAC node to mt8516.dtsi. This defines parameters common
to all the boards based on this SoC.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 14:20:11 -07:00
Bartosz Golaszewski e56e82da17 ARM64: dts: mediatek: add pericfg syscon to mt8516.dtsi
This adds support for the PERICFG register range as a syscon. This will
soon be used by the MediaTek Ethernet MAC driver for NIC configuration.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 14:20:11 -07:00
Linus Torvalds 4286d192c8 - Bring the PTRACE_SYSEMU semantics in line with the man page.
- Annotate variable assignment in get_user() with the type to avoid
   sparse warnings.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAl7H+w0ACgkQa9axLQDI
 XvEiVQ//azhBez3lTHeEgh2p45d75Na8HrrHjGGvQ9lhvtMBisrh/N7fp41Fl1vY
 2nG3YJqUY7SZJG2EZkF7OQOMHUjpGE3kHJX3YAn6dCk2RzNDe1TCXKrP0r7xkbLh
 OW3MpBsUbGksR8THYJsZ+GiTLZ/BrnZJjpJxcMHNwxnNZeVKT1OY4nJSebUo5Rdf
 4lm1jMuSiKuHHfkucp1UsGe3QQxsWYpFahjMgU/iCm3BhlzWvocV8NNG6na10SIb
 unT4+sXmFM/0pzVFBSdObmeEik4wSibkKh76A8z0SROMkPCtigu2n9RdDtii22ia
 uiixQ6CkEYaXaGBXFqjE50dKkMCH0EYpZiEPp22QGHkLRSKI6ZZi0wvQmTvYNLMI
 3a6Ptw0u9Ym/MH17HmjCiBuEfWOQeNhOM8YRcMqhHoguTz6Xj/mglbX8DDC37YAw
 MnGNH0a/uhBy35eujgW92b2wvNMWcYnuRSiSX8/PSsG3Hxe36nWTI8y20dQ88wAR
 wTqzNExmWDQqbTmaSAM0gGfDPkaSiiY+WDAO2FdB/jtovmefB/RBXVmwqbjBsigX
 OtXuyF/rVitZ6S3SXal5YBT4xey/MI4NRbnwCm4edXyz+Hz7cDM2iQwDBaiaVZj8
 4QHn+TqJTUKWeHRfLuMzg2a5UbCnEZGVBNEPtVxx9bSGqjQ2o+Q=
 =HdPI
 -----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:

 - Bring the PTRACE_SYSEMU semantics in line with the man page.

 - Annotate variable assignment in get_user() with the type to avoid
   sparse warnings.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Add get_user() type annotation on the !access_ok() path
  arm64: Fix PTRACE_SYSEMU semantics
2020-05-22 09:34:19 -07:00
Al Viro 8cfb347ad0 arm64: Add get_user() type annotation on the !access_ok() path
Sparse reports "Using plain integer as NULL pointer" when the arm64
__get_user_error() assigns 0 to a pointer type. Use proper type
annotation.

Signed-of-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: kbuild test robot <lkp@intel.com>
Link: http://lkml.kernel.org/r/20200522142321.GP23230@ZenIV.linux.org.uk
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2020-05-22 16:59:49 +01:00
Jon Hunter 358a6777f5 arm64: tegra: Make the RTC a wakeup source on Jetson Nano and TX1
The RTC found on the MAX77620 PMIC can be used as a wakeup source on
Jetson Nano and TX1, which is useful to wake the system from suspend
at a given time.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-22 14:56:54 +02:00
Arnd Bergmann ccffeae7af Merge branch 'v5.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/fixes
* 'v5.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  soc: mediatek: cmdq: return send msg error code
  arm64: dts: mt8173: fix vcodec-enc clock

Link: https://lore.kernel.org/r/33a0556a-e2a3-7f0b-b09b-4516642a4bfe@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-22 00:09:09 +02:00
Arnd Bergmann fec6111ae3 ARM64: hisilicon: defconfig updates for 5.8
- Enable PCI PASID as built-in module and UACCE/SEC2/HPRE as
   loadable modules to support UACCE use case for the D06CS board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJevg9xAAoJEAvIV27ZiWZcNlkQAI7ZLE9YP0KmkioDrPqABz+7
 2K3V0p66BaRdKtq1W9IASQ1sNYJUSDhQGrCrB1xyPGqsLdjGxz2bR8XI4E4bwzlL
 uO/8mKRmTDeAtSKuZf0p9hRh+HNdCi8juHm1f4ta02TaaRn0t+V2Hs/H9/+Zzxfl
 I+vDkGF2/0E52Gk1ZnxWr+to12O/wJgGResTS9E9qs77Lzzi1gSpg8EdC3ZWk5G5
 MUAk0V92jU+RwCCr6IFlQSkSDqkmeqnUTg9peqHrcZh2hi1EizQ6tcErSp7XvGA2
 Br2vXS/ZVDLVoVuo+jLEvSL2mCi5i/J1DfUvl5mVevtOulBWzkdhlBkMS2vOkJgm
 pyr1psyJUkhtUzq4FflQ7Jpfl4cSWuN2LEl9JpwOyIwfGUuZxPuhhaRlqd+usqRj
 UT3i/TQnvLoNEqhWUnztZcI4xIIwiHMo6q9zkMgaK+remG+JBK+lk0NQoQwPtoXy
 aGZere//k2rp/NQKJycUl9/hvBygOWn85NBAlE3eGVfMWJAV3GDs27HYexlssuPB
 XHVvjX/PLHwMpz5YbxwfgRaptLHgWnW7rakRRnMORHqapHHDU9K49qA/rGAfmqs1
 khTysBFjW5N0guHLLr224FRpvuKhW9qTdXrheA362Cd+3ADpTT/EYdOjbWZvz/GO
 1KxFzBRG7P0k9GlmrQH6
 =Oq8w
 -----END PGP SIGNATURE-----

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

ARM64: hisilicon: defconfig updates for 5.8

- Enable PCI PASID as built-in module and UACCE/SEC2/HPRE as
  loadable modules to support UACCE use case for the D06CS board

* tag 'hisi-arm64-defconfig-for-5.8' of git://github.com/hisilicon/linux-hisi:
  arm64: defconfig: Enable UACCE/PCI PASID/SEC2/HPRE configs

Link: https://lore.kernel.org/r/5EBE4217.6000900@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:56:22 +02:00
Arnd Bergmann 93d2fa6a03 arm64: defconfig: Amlogic updates for v5.8
- enable meson gx audio as module
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl7Gz50ACgkQWTcYmtP7
 xmX4Fg/+Is2GoZUGeh7seKGX3XjpYgwoDlzdUll1qp97Y/3ucDamCII2mirTFw0n
 lDGE+Hqtym4sYMulC67a5Mh8X6LxuwJDm6PsNlbKPNkD2w0OJIyDkd8hWvNlA6yg
 s2L3jGf+lTbvNk44QCBhre6Ur9uDt2ToxVIZ4nrZLsZZG7d1Ep2mocuHBxw7E3MJ
 zcJwBag+6KLlTeWCTW7/ZTKUNzS7zo/KMw9qWW2bRzyysSTDXL32p6udN6YhJapP
 38AUo5TIO8bSF8nwaZ1A513MRTiPQ2/pp+hn6rL/8FZDRe4XUEKJ8mppzdRofpa/
 24tB1l7y4mfyFqTb25ODTeEBtySld8a24eublil/yS5TBYVr8Cy7Z2sTa+QsqVFX
 tGwaZJwna0XLWIe6uIwYt1vnuDpa6ny12EuARA3QVSP3dQG4sngqGdrXeS1SkCkc
 vWRySFNNe6tAiriKy98yMoQnnQFVM90v4tF1utAL/0jbGYcXN5Pv7XpnSk1f6iOk
 dxne1aCcO6fp7LZBRiUVUN2VDOu8lOTs5yj74Cpf9uosC6OMacpmk49AgweIGwzF
 pFuOdr75IXbNEhcKfDs4L5z/IVDYOQZDvRyf5hqL8ARCg5MhrXCknEUSRnCuCocV
 gun1Br+9HRA/Iyxh6W9vPIEF0nxTpDrdL52Mo0yegl48DNrfH3c=
 =+zSH
 -----END PGP SIGNATURE-----

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

arm64: defconfig: Amlogic updates for v5.8
- enable meson gx audio as module

* tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: defconfig: enable meson gx audio as module

Link: https://lore.kernel.org/r/5ec6f4f6.1c69fb81.3fe34.b693@mx.google.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:54:22 +02:00
Arnd Bergmann 72a790ac7c Qualcomm ARM64 defconfig updates for v5.8
This enables SM8250 GCC clock driver, SC7180 GCC clock driver and SC7180
 TLMM pinctrl driver, the IPA and RMNET drivers, CCI, camera subsystem
 and camera clock drivers and removes the now depricated GLINK_SSR entry.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl7DWyAbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FCR8P/3+4drYyXxNDSslPiy3v
 Nb4iffsrJlMMLehlYul4NhWDWh7HQ0+10D2CGyJjh/2sDQmyh4MVIePxtr3VoE8B
 51aM0OuBwHiQ6598rw6niQHnXcx2cdqXVesIVp6GkeYh0l1wt4KE7sPcmzag1ffm
 fVqu+jCUMgY6yt55Ac35jCCUBuD/V6G8RNFzeTDDJPpqiuc5H0v7BWSZwuJzE7N6
 0Y0raIdEdeYtZS1DNE+GU4v6/QuDSHsLtc6tXibuOe5VuSLPyos/Md6GRGeynQVZ
 sqXMZ0ZR35QLT/qGOFDrYrXzYfXCH+aLG8KKMlMerE+HmWO2og6kaRb1/YNgd2RD
 nBxMLfsTqCuE6PopOVZ4OnAilbjvMqI9B0pPd2e47v+NWYrVekviQ96DWpd3Hx/T
 UFm6wV5GAmrTSxmcP3hgWOmYpuBukx7bXPxnMNmvvoSL8xJDYqLlN1AQnh7O4uaw
 uP79sGYBEQZZAshiUYCX7iHJRwnqXJPeSxdHGP48Ts5mY3FYXifUFZ2gNfIUmvXh
 wJfhl4d2dRV1ty3jFGT3iK9UhG0YzHk805y4CNm03R9qerDNSIEi8x115GZeOXB2
 F3nN3g8HJziiDqQ7u5zd6JCspeJ+tcJCGGz1ynvgQCSu/geotU9w02LNo7KrQBLH
 BXiNWURDYUxs1eahxepOdBrS
 =ukjE
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 defconfig updates for v5.8

This enables SM8250 GCC clock driver, SC7180 GCC clock driver and SC7180
TLMM pinctrl driver, the IPA and RMNET drivers, CCI, camera subsystem
and camera clock drivers and removes the now depricated GLINK_SSR entry.

* tag 'qcom-arm64-defconfig-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: enable Qualcomm IPA and RMNet modules
  arm64: defconfig: Enable Qualcomm SC7180 pinctrl and gcc
  arm64: defconfig: Remove QCOM_GLINK_SSR
  arm64: defconfig: Enable SM8250 GCC driver
  arm64: defconfig: Enable Qualcomm CAMCC, CAMSS and CCI drivers

Link: https://lore.kernel.org/r/20200519052502.1249888-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:53:07 +02:00
Arnd Bergmann 6e15f0a9c4 Two patches to enable the new cpufreq support on the H6 for the arm64
defconfig to enable the audio codec in sunxi_defconfig.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXr7MmQAKCRDj7w1vZxhR
 xYFJAQC7OE0ip7aQrJY24AXQgeA1abiQ1+P1oHbHW6E7qnXiGgD9Exd18pO1N1JH
 URcmEMjg8plFQn9+gGcHy7VFhE5V8w8=
 =ut84
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config-for-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig

Two patches to enable the new cpufreq support on the H6 for the arm64
defconfig to enable the audio codec in sunxi_defconfig.

* tag 'sunxi-config-for-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: configs: Enable sun50i cpufreq nvmem
  ARM: configs: sunxi: Add sun8i analog codec

Link: https://lore.kernel.org/r/9fd4d403-f6c8-420d-8b03-62e8485a0b3d.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:52:11 +02:00
Arnd Bergmann f0c59fd97c New soc variant the rk3326 which is essentially a px30 with only one
display controller and a new board using it, the Odroid Advance Go.
 sdcard regulator for the rockpro64 and a lot of devicetree fixes
 making the dt-binding check a lot happier.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl7F1N0QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgV34CAChtYhGGRGEr8WwGL3WG1f8z1nwEfxEGaMx
 niLnchgR2kWRiPFV8SVHaNkcGj9+VkeA/F8mCrrKiPDPrsL+s5X6q2liAmEGnIWo
 OvlfyuIJNaSjnVxwhdZABIQsjjeLZI2i0OWGmq47vGopWaNWDGW9wrPlRslPrf4N
 AIww1TwjKYK8Et5ja3COwfSt1gn2/PwR09wTfQwCy7wi9At6UWOQsDmpyFbjuTgv
 GmPcQJZa2YtQovSM5FrbhguCKSGFSukopqqrrxmfsvlkz+xmZyeHN6MMpdNnwBXe
 Kf3VU2p6b+75YouuOcJAAueBj6b37/tvi7KK/MZszdG2pM85SL1z
 =BL2H
 -----END PGP SIGNATURE-----

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

New soc variant the rk3326 which is essentially a px30 with only one
display controller and a new board using it, the Odroid Advance Go.
sdcard regulator for the rockpro64 and a lot of devicetree fixes
making the dt-binding check a lot happier.

* tag 'v5.8-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (22 commits)
  arm64: dts: rockchip: fix pinctrl-names for gpio-leds node on rk3326-odroid-go2
  arm64: dts: rockchip: fix pd_tcpc0 and pd_tcpc1 node position on rk3399
  arm64: dts: rockchip: add bus-width properties to mmc nodes for px30
  arm64: dts: rockchip: remove disable-wp from rk3308-roc-cc emmc node
  arm64: dts: rockchip: rename and label gpio-led subnodes
  arm64: dts: rockchip: fix defines in pd_vio node for rk3399
  arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-orangepi
  arm64: dts: rockchip: fix rtl8211e nodename for rk3399-orangepi
  arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-nanopi4
  arm64: dts: rockchip: fix rtl8211e nodename for rk3399-nanopi4
  arm64: dts: rockchip: fix rtl8211f nodename for rk3328 Beelink A1
  arm64: dts: rockchip: fix phy nodename for rk3328
  include: dt-bindings: rockchip: remove unused defines
  arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2
  arm64: dts: rockchip: Define the rockchip Video Decoder node on rk3399
  arm64: dts: rockchip: remove #sound-dai-cells from &spdif node of rk3399-hugsun-x99.dts
  arm64: dts: rockchip: remove #sound-dai-cells from &i2s1 node of rk3399-pinebook-pro.dts
  arm64: dts: rockchip: add Odroid Advance Go
  dt-bindings: Add binding for Hardkernel Odroid Go Advance
  arm64: dts: rockchip: add core devicetree for rk3326
  ...

Link: https://lore.kernel.org/r/1970481.V9vR1fIhX2@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:14:11 +02:00
Arnd Bergmann 87b990ab62 mvebu dt64 for 5.8 (part 1)
Armada 3720 based SoC:
 
 + Fix PCIe support allowing to use Compex wifi cards
 
 + Turris MOX board:
   - fix SFP binding
   - forbid SDR104 on SDIO to pass electromagnetic interference certifications
 
 + uDPU board: add i2c recovery support
 
 Armada 8040 based SoC: SolidRun 8040: update phy interface
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXsVWvQAKCRALBhiOFHI7
 1fNrAKCYPUl4BxCp/m6VNL0IMFc2FgTXawCdFxUNczPfHVyx0AgtiZf3DYzQUIw=
 =FAnH
 -----END PGP SIGNATURE-----

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

mvebu dt64 for 5.8 (part 1)

Armada 3720 based SoC:

+ Fix PCIe support allowing to use Compex wifi cards

+ Turris MOX board:
  - fix SFP binding
  - forbid SDR104 on SDIO to pass electromagnetic interference certifications

+ uDPU board: add i2c recovery support

Armada 8040 based SoC: SolidRun 8040: update phy interface

* tag 'mvebu-dt64-5.8-1' of git://git.infradead.org/linux-mvebu:
  arm64: dts: armada-3720-turris-mox: fix SFP binding
  arm64: dts: armada-3720-turris-mox: forbid SDR104 on SDIO for FCC purposes
  arm64: dts: add uDPU i2c bus recovery
  arm64: dts: marvell: drop i2c timeout-ms property
  arm64: dts: marvell: armada-37xx: Move PCIe max-link-speed property
  arm64: dts: marvell: armada-37xx: Move PCIe comphy handle property
  arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio function
  arm64: dts: update SolidRun Armada 8040 phy interface types

Link: https://lore.kernel.org/r/878shmeffd.fsf@FE-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:10:18 +02:00
Arnd Bergmann 564ef85341 ARMv8 Juno/Vexpress/Fast Models updates for v5.8
Various miscellaneous device tree source fixes to make them fully
 binding compliant. It includes fixing various device node names,
 order of interrupt properties, compatible names, address and size
 cell fields and their aligment with children nodes as well as
 moving some fixed devices out of bus node.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAl7DqaoACgkQAEG6vDF+
 4phj+xAAw0pYfFBqH89qx7dl+BgKl4SMpue0WlhUgiZhbBS2RgrlGTW5TfBb6IVa
 boU30Vw4rOdPozy7xizC0JnHsoD8PTxWKbA2t6s3VtTra3iGU0gT7wua/rzQ9pC2
 yrk7mTMpa6j5FUdTNSkQwr3x5g95K5haTZV2kRZFBNHzgjZmh02BhGmfQ1TX+sbw
 4vEde0xi1dOi9/A78gIWSUbvpdniFrYBkOAbMN8bo37KoCvnuvm2OU6t0UF6nj3h
 51eKZjWbxxxh5Jj2DyFZzOaEW9T2vIeW6aqoNEinvz9blSUBmX8Dx8n2YZbUVr/O
 ZsnfMXwU3SeRlIt4avNguGk0+xQuHAzy+Jls+A/ypTUL1vX8kTwO7Gs6gOZHsQ9n
 DwFhoWesk86EQyzBy3t1mmvWU7Ic2YMjfW6WjmWxgccuTfTEbSZ6VAA/TQWQtvop
 6xUtUbLJr1yuBshVsoJyO/yR1MoAnVKsOjB+AbiTW+nqs4oAoQ4q6TLti/z20G/k
 l3cTdKVC97cqhXa9hEuIP5wTTBJ7uQJ0boR7fvdrfk0doRvEAI5Xh/OyCWKi2SUH
 6nqUEtDoXFfUBfqLEj/uETQzHCo2CQPIyubJB0XhWkT+52/0Gi6KHzq6GvNrb7gt
 tx27VizSRz1f1nbZ6jYi0MMnyGBjnRw+HIDBuiUU7kgFIGkJheI=
 =Z5QL
 -----END PGP SIGNATURE-----

Merge tag 'juno-updates-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt

ARMv8 Juno/Vexpress/Fast Models updates for v5.8

Various miscellaneous device tree source fixes to make them fully
binding compliant. It includes fixing various device node names,
order of interrupt properties, compatible names, address and size
cell fields and their aligment with children nodes as well as
moving some fixed devices out of bus node.

* tag 'juno-updates-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm64: dts: juno: Fix SCPI shared mem node name
  arm64: dts: vexpress: Fix VExpress LED names
  arm64: dts: juno: Fix GPU interrupt order
  arm64: dts: fvp/juno: Fix bus node names
  arm64: dts: fvp: Fix SMMU DT node
  arm64: dts: fvp/juno: Fix serial node names
  arm64: dts: juno: Use proper DT node name for USB
  arm64: dts: fvp: Fix ITS node names and #msi-cells
  arm64: dts: fvp: Fix GIC child nodes
  arm64: dts: juno: Fix GIC child nodes
  arm64: dts: fvp: Fix GIC compatible names
  arm64: dts: juno: Fix mem-timer
  arm64: dts: juno: Move fixed devices out of bus node
  arm64: dts: fvp: Move fixed clocks out of bus node
  arm64: dts: vexpress: Move fixed devices out of bus node
  arm64: dts: fvp: Move fixed devices out of bus node
  arm64: dts: fvp/juno: Fix node address fields

Link: https://lore.kernel.org/r/20200519094702.GA32975@bogus
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 23:07:21 +02:00
Arnd Bergmann 1cb00f8c3b Qualcomm ARM64 DT updates for v5.8
For SDM845 this defines the IPA network accelerator and the CCI camera
 control bus, it defines the required UFS reset and adds WiFi for the
 Lenovo Yoga C630 and defines GPIO pin names and adds OV8856 and OC7251
 camera nodes for DB845c.
 
 For SC7180 it adds GPU support, defines the modem remoteproc, adds the
 IPA network accelerator, Coresight and ETM support, adds cpuidle low
 power states and updates the CPUs' compatible.
 
 For SM8250 it adds regulators from the PM8150, PM8150L and PM8009 and
 adds voltage corners, it defines the nodes for UFS PHY and controller
 and finally corrects a typo in the PDC node to make SPMI functional.
 
 For MSM8916 I2C1 and I2C5 are defined, a node for the CCI camera control
 interface bus is added and Coresight is disabled by default to match
 some product configurations. The Samsung A3U gained display support and
 Samsung A5U gained touchscreen support.
 
 MSM8996 now property describes the power supply chain for the GPU, the
 CCI camera control interface bus is added and the DB820c has the
 regulators of the secondary PMIC defined.
 
 For QCS404 USB PHYs and controllers are defined and wired up for the
 EVB.
 
 SDM630/SDM660 platform support is added and the Xiaomi Redmi Note 7
 defined.
 
 It also contains a number of changes throughout to improve DT binding
 compliance.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl7DYUQbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FWxgP/RgO73BTFzapqi2GO/lC
 Jsc/lE9gNpmkuM9kluPrYvDIdDjEgfAehajCmBgkk2nyJnmN0XWSyJWzrAHstaUd
 6TKYww43mPtCjPH7mk18DCINTK0yVrrpdpbgy2FQm5/heCQFPsZFWtLPJ23t8wQn
 fBJV/JzHjzeaEKf97QPgdTILt/hPSob5PVSdVT+VDC9jp/vnVEAVlc6+58rsH5sZ
 eRsGeoA0hUuaKZb7vji8afzyQzjs8Qra+56yhP13eFOtR0Ww1UOvESLWHFzUI91T
 yx9qjEDqF4Rw44MWxAxRpwQUU06PiwcIO0Z4ziZ5/FCr+Tseo+yo21B59i+9p112
 ihJsQNN18oxAAtyuzv+OxcD3+H7qODvxR0fCdeAWZajeP994P79I4Ddejs+V0KN2
 SZmJQmn8Ba8zMPJA7EZAug1IFrNfJ/xOu6KAv6bXpUYc8a5vRyQNqKgBIokry3V+
 SDDrHOxu3XhPGR6YmkorJ6EfWdOm1iPs/o5b2GkJZLww6Vd89tIbNsMIDlVCVWaO
 R0gImZcpJpO9CLmQvnfKmE9yozIoadCS6lkfaCKuGm+usi5uPFXJqE5AcJ+Yj3/4
 fi+MksJOrVwKRpuxr2lMM4GpOVqo7yUZ1iCveNn/GAfw3OVtsef0zL4vk0o4gYvd
 Bg0AVo61nTwJ7ef/i8mdlLT8
 =ds6R
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT updates for v5.8

For SDM845 this defines the IPA network accelerator and the CCI camera
control bus, it defines the required UFS reset and adds WiFi for the
Lenovo Yoga C630 and defines GPIO pin names and adds OV8856 and OC7251
camera nodes for DB845c.

For SC7180 it adds GPU support, defines the modem remoteproc, adds the
IPA network accelerator, Coresight and ETM support, adds cpuidle low
power states and updates the CPUs' compatible.

For SM8250 it adds regulators from the PM8150, PM8150L and PM8009 and
adds voltage corners, it defines the nodes for UFS PHY and controller
and finally corrects a typo in the PDC node to make SPMI functional.

For MSM8916 I2C1 and I2C5 are defined, a node for the CCI camera control
interface bus is added and Coresight is disabled by default to match
some product configurations. The Samsung A3U gained display support and
Samsung A5U gained touchscreen support.

MSM8996 now property describes the power supply chain for the GPU, the
CCI camera control interface bus is added and the DB820c has the
regulators of the secondary PMIC defined.

For QCS404 USB PHYs and controllers are defined and wired up for the
EVB.

SDM630/SDM660 platform support is added and the Xiaomi Redmi Note 7
defined.

It also contains a number of changes throughout to improve DT binding
compliance.

* tag 'qcom-arm64-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (68 commits)
  arm64: dts: qcom: sc7180: Correct the pdc interrupt ranges
  arm64: dts: qcom: sc7180: add IPA information
  arm64: dts: qcom: sc7180: Fix ETMv4 power management patch
  arm64: dts: qcom: sc7180: Add A618 gpu dt blob
  dt-bindings: arm-smmu: Add sc7180 compatible string
  arm64: dts: qcom: msm8996: Make GPU node control GPU_GX GDSC
  arm64: dts: qcom: db820c: Add vdd_gfx and tie it into mmcc
  arm64: dts: qcom: apq8016-sbc: merge -pins.dtsi into main .dtsi
  arm64: dts: qcom: msm8916: move gpu opp table to gpu node
  arm64: dts: qcom: msm8916: avoid using _ in node names
  arm64: dts: qcom: c630: Specify UFS device reset
  arm64: dts: qcom: c630: Add WiFi node
  arm64: dts: qcom: msm8916-samsung-a3u: add nodes for display panel
  arm64: dts: qcom: db820c: Fix invalid pm8994 supplies
  arm64: dts: qcom: db820c: Add pmi8994 RPM regulators
  arm64: dts: qcom: msm8916: Disable coresight by default
  arm64: dts: qcom: sc7180: Add "no-map" to cmd_db reserved area
  arm64: dts: qcom: msm8916-samsung-a5u: Add touchscreen
  arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator
  arm64: dts: qcom: msm8916: Add blsp_i2c5
  ...

Link: https://lore.kernel.org/r/20200519052528.1249950-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 22:50:41 +02:00
Arnd Bergmann c8128b5c07 UniPhier ARM64 SoC DT updates for v5.8
- add DMA controller nodes
 
 - add Akebi96 board support
 -----BEGIN PGP SIGNATURE-----
 
 iQJSBAABCgA8FiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl7CO7QeHHlhbWFkYS5t
 YXNhaGlyb0Bzb2Npb25leHQuY29tAAoJED2LAQed4NsGPjsQAI49mzoA95hlKpfi
 mLXZOSFKE6+jN8CGp3zV10cAHaWT1ZGomqDQMHIqMoI2u/Z8hILpvNzNhusbKvCl
 R1d/P+m9730Nab7BRvuu8FzCiEMQwxLP++lXEkLdRFsWO8LDLkFLJaH1RxikT8dj
 X+CUNE0Q1+vBKzc1ZDgVQiF448QOQOpUMCuAH6k2Rv2r/xj6yKvzIz42XlbT5qmF
 J3zMtjb4WJOZWcPa2j+HaMbB2fAh/g31Gy+gKjqiADOut6vifsJn3fS9sG0eLb18
 tW8sykcU2KKuEsdpjC6ixB/3l7Y/m0roa9D7J4S7rjXRC+fqIMd75WE7HSr81iae
 6fm199DR6yDzkrEog21mZrZ3qGIuXJGlJNGvk2oWNB5e9oD7W3kIocNZ4gWgmg+x
 9rBSeulXZdZ6XL5/YP//1abzirHpvYyXlY607jHNH4BQ+lcHpaU1x5MCEYiVZC1n
 dtPS11jc4OgCx/6ru5o1RSi3tb3uwCtUZoUyNGUR9p/VDQiAshyGJXabrlg6AV8r
 OyDVWWNOX2BrEeepIdxxk83UWwzDC1a28p4qXhJ/2eFVldr/WdDEEOizg4uwpp+3
 8VxpfET5idXfcqyKJv+NMXHIlGmsHU+/jqSPmVSNYOcwEAsdOZQVXAC7KjAw6hZx
 y3R1NRvZ+qE/9D9Hrg2Cj/HxypWV
 =SdeL
 -----END PGP SIGNATURE-----

Merge tag 'uniphier-dt64-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt

UniPhier ARM64 SoC DT updates for v5.8

- add DMA controller nodes

- add Akebi96 board support

* tag 'uniphier-dt64-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier:
  arm64: dts: uniphier: Add support for Akebi96
  dt-bindings: arm: Add Akebi96 board support
  arm64: dts: uniphier: add #address-cells and #size-cells to SPI nodes
  arm64: dts: uniphier: Stabilize Ethernet RGMII mode of PXs3 ref board
  arm64: dts: uniphier: Add ethernet aliases
  arm64: dts: uniphier: Add XDMAC node

Link: https://lore.kernel.org/r/CAK7LNARUL52pBhg8AD9XeScVqhD8qr2eVEfu4+1v8D+KPyOwNw@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 22:48:15 +02:00
Arnd Bergmann 622a380d62 MT2712:
- replace deprecated compatible for the usb PHY
 
 MT6797:
 - switch to SPDX identifier
 - add and enable I2C device for x20 development board
 - add I2C compatible to the binding description
 
 MT7622:
 - add Wi-Fi device and enable it for the Bananpi-R64
 
 MT8173:
 - add CPU capacities based on Dhryston benchmark
 - fix DT build warnings
 - set throtteling range to limitless
 - add Elm and Hana devices on which several chromebooks are based
 - add Global Command Queue entries to the users
 
 MT8183:
 - split cpuidle states in two as the clusters have different target residencies
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAl7APygXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH61dQ/6AmOSIyRASzUakYIsINERDP2e
 OEFRy8aEDo6WG6Ww6Fc93cxb0EigzVEdZV67hTyF6/OuWfzM6UM+TI40ZqBEAbcV
 4O/keVh7mT7mSU5Qbx0RkJaimPzIXX6h9otGL5cFlGkCkx4HIrg+WaF44n7mibFI
 y4gSTnMQSVHSQk2aU5CNnEyybYk/7L5WoPrciykNpOXKw+LCcZ6dwzyA5uA9PcFy
 XTnjoIwdPRSnYKw8MNVGGLe56HS2luWs0Yr4zv1sVZNczNNGcZ3HOTI1m4lrYW2A
 aCtLMTYiu+ujTq59fyJ9FocL+2gzwWYcRpr3RbE/ykwnWeDrm4S2hCDd3NpvyqRh
 /EYFYzvbPle3+uGlyWu3RNWscoo8J+C/tm3tksiObOmoZ8K8InY2QjaSnqHFPRfQ
 lqdNFhsi5mPPpAz1aQYtNFTwAcSZndNQFOGFYdxZZerjIOWw+I45x0O06yVtYN/9
 PQSqOoMDlt2Tpyzr9CC7Fso/+e6Z7KsezC3xQhUgvUCJ9CUMmyAn2WgJx9DsVCWi
 N+2e1sbaimUf/Ee5i6qDRjDlnTIXulMOZQFYrj30QKuFOqSzduvfW9L5dFSH+/aR
 FvtpAogUreYoXvY6frNaHUaUHuo9yOgP/DIIdzAmwL5/Frgb19keQc/RFSGNh+7C
 d38+03KUniYJ3Kl1gCw=
 =tN8C
 -----END PGP SIGNATURE-----

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

MT2712:
- replace deprecated compatible for the usb PHY

MT6797:
- switch to SPDX identifier
- add and enable I2C device for x20 development board
- add I2C compatible to the binding description

MT7622:
- add Wi-Fi device and enable it for the Bananpi-R64

MT8173:
- add CPU capacities based on Dhryston benchmark
- fix DT build warnings
- set throtteling range to limitless
- add Elm and Hana devices on which several chromebooks are based
- add Global Command Queue entries to the users

MT8183:
- split cpuidle states in two as the clusters have different target residencies

* tag 'v5.7-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt8173: Add capacity-dmips-mhz attributes
  arm64: dts: mt2712: use non-empty ranges for usb-phy
  arm64: dts: mt8173: fix mdp aliases property name
  arm64: dts: mediatek: Switch to SPDX license identifier for MT6797 SoC
  arm64: dts: mediatek: Enable I2C support for 96Boards X20 Development board
  arm64: dts: mediatek: Add I2C support for MT6797 SoC
  dt-bindings: i2c: Document I2C controller binding for MT6797 SoC
  arm64: dts: mt8173: fix cooling device range
  arm64: dts: mediatek: add mt8173 elm and hana board
  arm64: dts: mt8173: fix unit name warnings
  arm64: dts: mt8173: add uart aliases
  dt-bindings: arm64: dts: mediatek: Add mt8173 elm and hana
  arm64: dts: mt8183: adjust cpuidle target residency
  arm64: dts: mt8173: Add gce setting in mmsys and display node
  arm64: dts: mt7622: add built-in Wi-Fi device nodes

Link: https://lore.kernel.org/r/2794a8db-c14f-ac34-9e28-9f3700db6c4c@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 22:42:00 +02:00
Arnd Bergmann 0e909f1861 Our usual number of patches to improve the Allwinner Device Tree
support, including:
   - Support for the IOMMU on the H6
   - Support for cpufreq / thermal throttling on the H6
   - Support for the mailbox on the A64, A83t, H3, H5 and H6
   - New boards: A20-OLinuXino-LIME-eMMC
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXr7NHgAKCRDj7w1vZxhR
 xbhGAQCDavHkpjvq4Hwk/znoS0Y6NvW1JQUyKUWH8K6ah1ZkFwEA5gC0Ac9cbDAk
 Q5fZeYl7mPbEL9DI0RphVqHmY2ezXw0=
 =WR5/
 -----END PGP SIGNATURE-----

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

Our usual number of patches to improve the Allwinner Device Tree
support, including:
  - Support for the IOMMU on the H6
  - Support for cpufreq / thermal throttling on the H6
  - Support for the mailbox on the A64, A83t, H3, H5 and H6
  - New boards: A20-OLinuXino-LIME-eMMC

* tag 'sunxi-dt-for-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (23 commits)
  arm64: dts: allwinner: h6: Add IOMMU
  arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
  arm64: dts: allwinner: h6: add voltage range to OPP table
  arm64: dts: allwinner: sun50i-a64: Add missing address/size-cells
  arm64: dts: allwinner: h6: Enable CPU opp tables for Pine H64
  arm64: dts: allwinner: Sort Pine H64 device-tree nodes
  arm64: dts: allwinner: h6: Enable CPU opp tables for Orange Pi 3
  arm64: dts: allwinner: h6: Enable CPU opp tables for Beelink GS1
  arm64: dts: allwinner: h6: Add CPU Operating Performance Points table
  arm64: dts: allwinner: h6: Add thermal trip points/cooling map
  arm64: dts: allwinner: h6: Add clock to CPU cores
  arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module
  arm64: dts: allwinner: h6: orangepi: Disable OTG mode
  arm64: dts: allwinner: h6: orangepi: Add gpio power supply
  ARM: dts: sun8i-h2-plus-bananapi-m2-zero: Fix led polarity
  arm64: dts: allwinner: h6: Add msgbox node
  arm64: dts: allwinner: a64: Add msgbox node
  ARM: dts: sunxi: h3/h5: Add msgbox node
  ARM: dts: sunxi: a83t: Add msgbox node
  ARM: dts: sun8i-h3: add opp table for mali gpu
  ...

Link: https://lore.kernel.org/r/cfa66bd9-f74c-4614-9ea5-9ef8546cc571.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 22:35:59 +02:00
Anshuman Khandual 858b8a8039 arm64/cpuinfo: Add ID_MMFR4_EL1 into the cpuinfo_arm64 context
ID_MMFR4_EL1 has been missing in the CPU context (i.e cpuinfo_arm64). This
just adds the register along with other required changes.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-18-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:12 +01:00
Anshuman Khandual 14e270fa5c arm64/cpufeature: Add remaining feature bits in ID_AA64PFR1 register
Enable the following features bits in ID_AA64PFR1 register as per ARM DDI
0487F.a specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-12-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:12 +01:00
Anshuman Khandual 011e5f5bf5 arm64/cpufeature: Add remaining feature bits in ID_AA64PFR0 register
Enable MPAM and SEL2 features bits in ID_AA64PFR0 register as per ARM DDI
0487F.a specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-11-git-send-email-anshuman.khandual@arm.com
[will: Make SEL2 a NONSTRICT feature per Suzuki]
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 7cd51a5a84 arm64/cpufeature: Add remaining feature bits in ID_AA64ISAR0 register
Enable TLB features bit in ID_AA64ISAR0 register as per ARM DDI 0487F.a
specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-10-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual fcd6535322 arm64/cpufeature: Add remaining feature bits in ID_MMFR4 register
Enable all remaining feature bits like EVT, CCIDX, LSM, HPDS, CnP, XNX,
SpecSEI in ID_MMFR4 register per ARM DDI 0487F.a.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-9-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 0ae43a99fe arm64/cpufeature: Add remaining feature bits in ID_PFR0 register
Enable DIT and CSV2 feature bits in ID_PFR0 register as per ARM DDI 0487F.a
specification. Except RAS and AMU, all other feature bits are now enabled.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-8-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 152accf847 arm64/cpufeature: Introduce ID_MMFR5 CPU register
This adds basic building blocks required for ID_MMFR5 CPU register which
provides information about the implemented memory model and memory
management support in AArch32 state. This is added per ARM DDI 0487F.a
specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-7-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual dd35ec0704 arm64/cpufeature: Introduce ID_DFR1 CPU register
This adds basic building blocks required for ID_DFR1 CPU register which
provides top level information about the debug system in AArch32 state.
We hide the register from KVM guests, as we don't emulate the 'MTPMU'
feature.

This is added per ARM DDI 0487F.a specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Will Deacon <will@kernel.org>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-6-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 16824085a7 arm64/cpufeature: Introduce ID_PFR2 CPU register
This adds basic building blocks required for ID_PFR2 CPU register which
provides information about the AArch32 programmers model which must be
interpreted along with ID_PFR0 and ID_PFR1 CPU registers. This is added
per ARM DDI 0487F.a specification.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-5-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual e965bcb062 arm64/cpufeature: Make doublelock a signed feature in ID_AA64DFR0
Double lock feature can have the following possible values.

0b0000 - Double lock implemented
0b1111 - Double lock not implemented

But in case of a conflict the safe value should be 0b1111. Hence this must
be a signed feature instead. Also change FTR_EXACT to FTR_LOWER_SAFE. While
here, fix the erroneous bit width value from 28 to 4.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-4-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 1ed1b90a05 arm64/cpufeature: Drop TraceFilt feature exposure from ID_DFR0 register
ID_DFR0 based TraceFilt feature should not be exposed to guests. Hence lets
drop it.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-3-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Anshuman Khandual 2a5bc6c47b arm64/cpufeature: Add explicit ftr_id_isar0[] for ID_ISAR0 register
ID_ISAR0[31..28] bits are RES0 in ARMv8, Reserved/UNK in ARMv7. Currently
these bits get exposed through generic_id_ftr32[] which is not desirable.
Hence define an explicit ftr_id_isar0[] array for ID_ISAR0 register where
those bits can be hidden.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1589881254-10082-2-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 15:47:11 +01:00
Arnd Bergmann a2a3e46cfb Texas Instruments K3 SoC DT updates for v5.8
- Add DSS support for both AM65x and J721e
 - Add watchdog support for J721e
 - Add EHRPWM support for AM65x
 - Add Thermal support for AM65x
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEtQ6szHmfiBT7fujkyvq9MXlQGhEFAl6+iGsQHHQta3Jpc3Rv
 QHRpLmNvbQAKCRDK+r0xeVAaEbSzD/99PcH5wtvSe2n5KuEpnbDMAmJznwE2yl1u
 qz0BZQ0PJi3xNbJLsp7oxvdNszntFwaSDghGBVTgutHk8IcWbaGssP5Qmw80olot
 itlVGsfGVgQp/OTYtMBJGzOxZQl6TrcBEn0qUbpqPWVhy7v/LGayfWmPi5dGPshQ
 0WzF6UdKR+U15M4c20DaZJ6+bPHNVrUE6/IdNHaYCXPp+MYdlBtWfEhHKyaL7zwA
 jgAp053oPRnzfwracoYcTv+9w8ZL3V/PzttULwLdZIKfJY+b3CUzQ/ohkaEwFov8
 d1iH2CVu4NDWXYxp6NwqqAqmaHsVNPAuXU2jWMGgjB/BtiWdcSEM7yAZW+1IE2Mj
 pwrKJRIddm+ZESB2O4mrFNT0849slgxSZcCLE6nu7QP9gz5XvzotbS/yOt540pjb
 rlYlS4weUlXQ1fYCuJhlqcvWgchpEP6WboKfsE0xzFRcuyMr/CJDYY+vkftICQgm
 rZxbzJfWAvnKrNmW2EyrnbxGesDRrcbVu6WUQLYtyWTnRAkhy/frBxyqsS5T/IT6
 gHwV63CJ0Y56euT/j/Z+FIi08yeeA3fn/w5LSMdGPsOrUOLOMJd/DypK30SV5+Dm
 QZAjSWs0OXqPn6uWEq3ACof2HJUJo/KYL/uqTm0Pe9nbWXnKxWMti9fkGo83YO2z
 8mPWYqp5yA==
 =64P3
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-dt-for-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt

Texas Instruments K3 SoC DT updates for v5.8

- Add DSS support for both AM65x and J721e
- Add watchdog support for J721e
- Add EHRPWM support for AM65x
- Add Thermal support for AM65x

* tag 'ti-k3-dt-for-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux:
  arm64: dts: ti: k3-j721e-main: Add main domain watchdog entries
  arm64: dts: ti: k3-am65-main: Add ehrpwm nodes
  arm64: dts: ti: am654: Add thermal zones
  arm64: dts: ti: am65-wakeup: Add VTM node
  arm64: dts: ti: k3-j721e-common-proc-board: add assigned clks for DSS
  arm64: dts: ti: k3-j721e-main: Add DSS node
  arm64: dts: ti: am654: Add DSS node

Link: https://lore.kernel.org/r/7484d3c9-323f-36a3-f0df-1287586f356d@ti.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 16:03:56 +02:00
Arnd Bergmann de12d92147 Renesas ARM DT updates for v5.8 (take two)
- Initial support for the Renesas RZ/G1H SoC on the iWave RainboW
     Qseven SOM (G21M) and board (G21D),
   - Support for the AISTARVISION MIPI Adapter V2.1 camera board on the
     Silicon Linux EK874 RZ/G2E evaluation kit.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXr5g8QAKCRCKwlD9ZEnx
 cDusAQD4SCmyY0MZZNWQhkhu2ics2wYpKItw4Y7E4fl9XUlXkQEAyyN11vVNoteX
 7KvNX7/9eXpberlcx4H6szPQsOzWzwM=
 =2KDk
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-dt-for-v5.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt

Renesas ARM DT updates for v5.8 (take two)

  - Initial support for the Renesas RZ/G1H SoC on the iWave RainboW
    Qseven SOM (G21M) and board (G21D),
  - Support for the AISTARVISION MIPI Adapter V2.1 camera board on the
    Silicon Linux EK874 RZ/G2E evaluation kit.

* tag 'renesas-arm-dt-for-v5.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1
  ARM: dts: r8a7742: Add GPIO nodes
  ARM: dts: r8a7742: Add [H]SCIF{A|B} support
  ARM: dts: r8a7742: Add IRQC support
  ARM: dts: r8a7742-iwg21d-q7: Add iWave G21D-Q7 board based on RZ/G1H
  ARM: dts: r8a7742-iwg21m: Add iWave RZ/G1H Qseven SOM
  ARM: dts: r8a7742: Initial SoC device tree
  clk: renesas: Add r8a7742 CPG Core Clock Definitions
  dt-bindings: power: rcar-sysc: Add r8a7742 power domain index macros

Link: https://lore.kernel.org/r/20200515100547.14671-3-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 16:02:12 +02:00
Jean-Philippe Brucker 4fc92254bf arm64: mm: Add asid_gen_match() helper
Add a macro to check if an ASID is from the current generation, since a
subsequent patch will introduce a third user for this test.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20200519175502.2504091-6-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 14:46:14 +01:00
Arnd Bergmann 9c7ae8edb9 ARM64: DT: Hisilicon SoCs DT updates for 5.8
- Add pinconf for spi2 and spi3 nodes and increase the drive
   strength to achieve the max speed for the Hikey960 board
 - Add CTI nodes for the Hikey620 board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJevjyIAAoJEAvIV27ZiWZcGoYQAJdLtw+VmW+NarmObzZ1vFh9
 tpAWA1UDgH6oY61lscdbi8feAYmj2i8kdCCEFldxUSQCcVFX3MoZAJMTb18EaASg
 tJpLvHcNd47BYv+t9VdlIcEsbKHmZO1eJU4KnzOR4uHr6sS1n4spwpPV7lhIFoHY
 yp5xZSp5COraHrmBkytgcLgxMhLmQl40Kej1MF2Ce6bP/+C10UuejPOn8KaO9bmm
 +7ipF0B254HxmzJJlNWszVJiBweX8UYmeSAe/xLz5mbKAHYnZ1R9Iz2+lJO8SQSz
 ztPrZ5JRW+FNGbHq+Q+e5l2OdxcVoIptlHLbrrmVCt7NoTm/CeXnOg7SzxfHN8J9
 Y8GyFugjXRV4Oe/3SzlApy4Yq5Hf3iAi0jNrbwQHasKptOXEIP/XLP+slppbQmPY
 aklo8iIxM9rUuqHoolFmvl+KE8B7v12YkhBa0sQXWwbGNW2jF6cBknHRC/Lrq6/a
 W0VDdAQJ+Tu8fLvG2mO71ZGAvSC0FMkkQ1XE6wMKNkbwf4g1DCgkK+EqQV1eeZcz
 WJfgwyMQcql6uv5ICbvgiL48MrAxDCaxMLvvjZc1ti9e2DDMROXILCR5Z/tKd8UB
 +2ve/5xcVdujClfpPUoAPwKGrRG9cKZ4PuNOfw5YGntFvLBwhXjtLCjf3/hF4dbD
 Qt9KY+9bBMDcf3qY4JrX
 =+heh
 -----END PGP SIGNATURE-----

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

ARM64: DT: Hisilicon SoCs DT updates for 5.8

- Add pinconf for spi2 and spi3 nodes and increase the drive
  strength to achieve the max speed for the Hikey960 board
- Add CTI nodes for the Hikey620 board

* tag 'hisi-arm64-dt-for-5.8' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hi6220: Add CTI options
  arm64: dts: hikey960: pinctrl: Fix spi2/spi3 pinconf

Link: https://lore.kernel.org/r/5EBE430E.6090508@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 15:43:46 +02:00
Will Deacon a4eb355a3f arm64: vdso: Fix CFI directives in sigreturn trampoline
Daniel reports that the .cfi_startproc is misplaced for the sigreturn
trampoline, which causes LLVM's unwinder to misbehave:

  | I run into this with LLVM’s unwinder.
  | This combination was always broken.

This prompted Dave to question our use of CFI directives more generally,
and I ended up going down a rabbit hole trying to figure out how this
very poorly documented stuff gets used.

Move the CFI directives so that the "mysterious NOP" is included in
the .cfi_{start,end}proc block and add a bunch of comments so that I
can save myself another headache in future.

Cc: Tamas Zsoldos <tamas.zsoldos@arm.com>
Reported-by: Dave Martin <dave.martin@arm.com>
Reported-by: Daniel Kiss <daniel.kiss@arm.com>
Tested-by: Daniel Kiss <daniel.kiss@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 12:59:26 +01:00
Will Deacon 9a96428557 arm64: vdso: Don't prefix sigreturn trampoline with a BTI C instruction
For better or worse, GDB relies on the exact instruction sequence in the
VDSO sigreturn trampoline in order to unwind from signals correctly.
Commit c91db232da ("arm64: vdso: Convert to modern assembler annotations")
unfortunately added a BTI C instruction to the start of __kernel_rt_sigreturn,
which breaks this check. Thankfully, it's also not required, since the
trampoline is called from a RET instruction when returning from the signal
handler

Remove the unnecessary BTI C instruction from __kernel_rt_sigreturn,
and do the same for the 32-bit VDSO as well for good measure.

Cc: Daniel Kiss <daniel.kiss@arm.com>
Cc: Tamas Zsoldos <tamas.zsoldos@arm.com>
Reviewed-by: Dave Martin <dave.martin@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Fixes: c91db232da ("arm64: vdso: Convert to modern assembler annotations")
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-21 12:57:18 +01:00
Arnd Bergmann 8c915019e3 Realtek Arm based SoC DT for v5.8
Add RTD1195, RTD1395 and RTD1619 SoCs as well as Xnano X5 TV box.
 Clean up memory nodes and /soc ranges. Factor out r-bus and partition it
 into CRT, Iso, Misc, SB2 and SCPU Wrapper blocks.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEF08DRxvMIhphdW+W+i7RLT5+AT8FAl64dfoRHGFmYWVyYmVy
 QHN1c2UuZGUACgkQ+i7RLT5+AT+iXA//eNc5DNAN7/B3GcoSaKd4jUfh4aCo2FkO
 octvWWuPdMom1zzzpR5GTi4AxFAj3V4gAwFc0SLxXRC1Mwb1QFoGVXsDsFXclhsA
 LdF73S2umVkl65kDvS8rLqq/1e4TidYI6Nlo5MQWcGrTrrkSZdLxiQlhokwsSoLf
 6lS5SqTXuU0Y7b8TOAgsHXZ8HdeNuM0MBvLrNkWSQokFO8tRPYzP6FmrGCK0Z0DE
 dEarIAgrqw5OOoDgSNH80AWzUZGWJSR9gLsl9JwxgmQoG4b66HJrTYZHZ4ylFaeQ
 GsSwiuy7SM1NrU25i6qIGtj7WueGLYczLEBWwKg5AgNcFqq/hGwmoxsLRhJAyb1J
 jcUiH+sfR5fmcuFjA6k3MRD5rTporkS6e44Xni8/AaElSRgu+YYpsXAUeOenMR9m
 cDuR8DrOKkPWyipRK32WyQsF7P3JPaL9gD6q5hSdIAolEncR6LcHNkMUx0zgb/BL
 +gakFU4lmsV9SEFFVyKUr5w0fZLPPWdeXRFtKNZTsPI/AT4jPztIiszB9NWeumMZ
 54uqsm9ct5flLFbqJ/575NDLQHoIY4uz6gZq/oRKdQ/g0AyCI80ZkqnMzm4om4GZ
 Fpdi63l+e2VAJE77R9tqxmj8LQJE9PfTZNo41zFA8gzCqmBN9Rrzs/E47KCLKQYq
 k54Vwaf891g=
 =wdYa
 -----END PGP SIGNATURE-----

Merge tag 'realtek-dt-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into arm/dt

Realtek Arm based SoC DT for v5.8

Add RTD1195, RTD1395 and RTD1619 SoCs as well as Xnano X5 TV box.
Clean up memory nodes and /soc ranges. Factor out r-bus and partition it
into CRT, Iso, Misc, SB2 and SCPU Wrapper blocks.

* tag 'realtek-dt-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek: (35 commits)
  dt-bindings: reset: rtd1295: Add SB2 reset
  arm64: dts: realtek: rtd16xx: Add SB2 and SCPU Wrapper syscon nodes
  arm64: dts: realtek: rtd139x: Add SB2 and SCPU Wrapper syscon nodes
  arm64: dts: realtek: rtd129x: Add SB2 and SCPU Wrapper syscon nodes
  ARM: dts: rtd1195: Add SB2 and SCPU Wrapper syscon nodes
  arm64: dts: realtek: rtd16xx: Add CRT syscon node
  ARM: dts: rtd1195: Add UART resets
  ARM: dts: rtd1195: Add reset nodes
  dt-bindings: reset: Add Realtek RTD1195
  ARM: dts: rtd1195: Add CRT syscon node
  arm64: dts: realtek: rtd16xx: Introduce iso and misc syscon
  arm64: dts: realtek: rtd139x: Introduce CRT, iso and misc syscon
  arm64: dts: realtek: rtd129x: Introduce CRT, iso and misc syscon
  ARM: dts: rtd1195: Introduce iso and misc syscon
  arm64: dts: realtek: rtd1295: Add Xnano X5
  dt-bindings: arm: realtek: Add Xnano X5
  dt-bindings: vendor-prefixes: Add Xnano
  arm64: dts: realtek: rtd16xx: Add memory reservations
  arm64: dts: realtek: rtd16xx: Carve out boot ROM from memory
  arm64: dts: realtek: Add RTD1619 SoC and Realtek Mjolnir EVB
  ...

Link: https://lore.kernel.org/r/20200510232158.18477-2-afaerber@suse.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 12:34:23 +02:00
Arnd Bergmann 71dbe9524d Renesas ARM DT updates for v5.8
- USB, UART, PWM, and PCIe support for R-Car M3-W+,
   - PWM (16-bit Timer Pulse Unit and PWM Timers) support for R-Car M2-W,
   - Minor fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXqqHDQAKCRCKwlD9ZEnx
 cOAWAP0Vmb2PNTBL8lT1eD+iji5lIEH2Dp4PaB2xOVP3BQsU+gEAlc169Jq/fXKo
 F+T6hE2D0ExJMkp0DiDfttpKyQsb5wA=
 =Y+Go
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-dt-for-v5.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt

Renesas ARM DT updates for v5.8

  - USB, UART, PWM, and PCIe support for R-Car M3-W+,
  - PWM (16-bit Timer Pulse Unit and PWM Timers) support for R-Car M2-W,
  - Minor fixes and cleanups.

* tag 'renesas-arm-dt-for-v5.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: Fix IOMMU device node names
  ARM: dts: renesas: Fix IOMMU device node names
  ARM: dts: shmobile: Update CMT1 compatible values
  ARM: dts: r8a7791: Add PWM device nodes
  ARM: dts: r8a7791: Add TPU device node
  arm64: dts: renesas: r8a77961: Add PCIe device nodes
  arm64: dts: renesas: r8a77961: Add PWM device nodes
  arm64: dts: renesas: r8a77961: Add SCIF and HSCIF nodes
  arm64: dts: renesas: r8a77961: Add USB3.0 device nodes
  arm64: dts: renesas: r8a77961: Add USB2.0 device nodes

Link: https://lore.kernel.org/r/20200430084849.1457-3-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 11:54:42 +02:00
Chunyan Zhang 161af8fd02 arm64: dts: Add SC9863A emmc and sd card nodes
Add emmc and sd card devicetree nodes for SC9863A.

Link: https://lore.kernel.org/r/20200414101636.24503-3-zhang.lyra@gmail.com
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 11:50:44 +02:00
Chunyan Zhang 78efc0199f arm64: dts: Add SC9863A clock nodes
add clock devicetree nodes for SC9863A.

Link: https://lore.kernel.org/r/20200414101636.24503-2-zhang.lyra@gmail.com
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-21 11:50:32 +02:00
Hsin-Hsiung Wang 9f88722216 arm64: dts: mt6358: add PMIC MT6358 related nodes
add PMIC MT6358 related nodes which is for MT8183 platform

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Link: https://lore.kernel.org/r/1587438012-24832-7-git-send-email-hsin-hsiung.wang@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-21 11:31:39 +02:00
Johan Jonker b2cb68e864 arm64: dts: rockchip: fix pinctrl-names for gpio-leds node on rk3326-odroid-go2
The 'pinctrl-names' property should contain a list of names
to the assigned states. The value 'led_pins' in the gpio-leds
node on rk3326-odroid-go2 is not a state that is normally used,
so change it the common name 'default'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200519111444.2208-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-21 02:16:51 +02:00
Christian Hewitt 0b928e4e41 arm64: dts: meson-g12b-gtking-pro: add initial device-tree
The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400
reference board with an S922X chip.

- 4GB LPDDR4 RAM
- 64GB eMMC storage
- 10/100/1000 Base-T Ethernet
- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
- HDMI 2.1 video
- Analogue audio output
- 1x RS232 port
- 2x USB 2.0 port
- 2x USB 3.0 ports
- IR receiver
- 1x micro SD card slot
- 1x Power on/off button

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200520014329.12469-6-christianshewitt@gmail.com
2020-05-20 14:43:48 -07:00
Christian Hewitt c5522ff9c7 arm64: dts: meson-g12b-gtking: add initial device-tree
The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference
board with an S922X chip.

- 4GB LPDDR4 RAM
- 64GB eMMC storage
- 10/100/1000 Base-T Ethernet
- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
- HDMI 2.1 video
- S/PDIF optical output
- Analogue audio output
- 1x USB 2.0 port
- 2x USB 3.0 ports
- IR receiver
- 1x micro SD card slot

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200520014329.12469-4-christianshewitt@gmail.com
2020-05-20 14:43:48 -07:00
Christian Hewitt 3cb74db9b2 arm64: dts: meson: convert ugoos-am6 to common w400 dtsi
Convert the Ugoos AM6 dts into meson-g12b-w400.dtsi, and then create
a new AM6 dts that references it. This is in preparation for several
new G12B devices that will share the common w400 dtsi.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200520014329.12469-2-christianshewitt@gmail.com
2020-05-20 14:43:48 -07:00
Sudeep Holla ad5a57dfe4 firmware: smccc: Drop smccc_version enum and use ARM_SMCCC_VERSION_1_x instead
Instead of maintaining 2 sets of enums/macros for tracking SMCCC version,
let us drop smccc_version enum and use ARM_SMCCC_VERSION_1_x directly
instead.

This is in preparation to drop smccc_version here and move it separately
under drivers/firmware/smccc.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Etienne Carriere <etienne.carriere@st.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20200518091222.27467-5-sudeep.holla@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-20 19:10:37 +01:00
Anshuman Khandual f73531f025 arm64/cpufeature: Drop open encodings while extracting parange
Currently there are multiple instances of parange feature width mask open
encodings while fetching it's value. Even the width mask value (0x7) itself
is not accurate. It should be (0xf) per ID_AA64MMFR0_EL1.PARange[3:0] as in
ARM ARM (0487F.a). Replace them with cpuid_feature_extract_unsigned_field()
which can extract given standard feature (4 bits width i.e 0xf mask) field.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/1589360614-1164-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-20 18:40:13 +01:00
Zhao Qiang 48ffd4ebc1 arm64: dts: Add ds26522 node to dts to ls1043ardb
Add ds26522 node to fsl-ls1043a-rdb.dts

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 23:00:47 +08:00
Zhao Qiang 76afd7dbbd arm64: dts: add qe node to ls1043ardb
Add qe node to fsl-ls1043a.dtsi and fsl-ls1043a-rdb.dts

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 23:00:27 +08:00
Anshuman Khandual c73433fc63 arm64/cpufeature: Validate hypervisor capabilities during CPU hotplug
This validates hypervisor capabilities like VMID width, IPA range for any
hot plug CPU against system finalized values. KVM's view of the IPA space
is used while allowing a given CPU to come up. While here, it factors out
get_vmid_bits() for general use.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-kernel@vger.kernel.org

Suggested-by: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1589248647-22925-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-20 15:59:23 +01:00
Michael Walle 0d99633fd0 arm64: dts: ls1028a: sl28: keep switch port names consistent
Keep the switch port labels consistent across the different board
variants. If the user wants to rename them, it should be done in
user-space.

Fixes: ab43f03074 ("arm64: dts: ls1028a: sl28: add support for variant 2")
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 22:58:15 +08:00
Thierry Reding e9bdccb0bd arm64: tegra: Make the RTC a wakeup source on Jetson TX2
The RTC found on the MAX77620 PMIC can be used as a wakeup source on
Jetson TX2, which is useful to wake the system from suspend at a given
time.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
2020-05-20 15:26:11 +02:00
Thierry Reding ce8a85968d arm64: tegra: Enable VI I2C on Jetson Nano
Enable the VI I2C so that the peripherals connected to it (such as the
camera connector, an INA3221 power monitor and the USB 3.1 4-port hub)
can be accessed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:11 +02:00
Vidya Sagar 3482a7afb2 arm64: tegra: Fix flag for 64-bit resources in 'ranges' property
Fix flag in PCIe controllers device-tree nodes 'ranges' property to correctly
represent 64-bit resources.

Fixes: 2602c32f15 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra194 DT")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:10 +02:00
Sowjanya Komatineni c415388539 arm64: tegra: Add Tegra VI CSI support in device tree
Tegra210 contains VI controller for video input capture from MIPI
CSI camera sensors and also supports built-in test pattern generator.

CSI ports can be one-to-one mapped to VI channels for capturing from
an external sensor or from built-in test pattern generator.

This patch adds support for VI and CSI and enables them in Tegra210
device tree.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:10 +02:00
Sowjanya Komatineni 2eb8e1a4b1 arm64: tegra: Add reset-cells to memory controller
Tegra210 device tree is missing reset-cells property for the memory
controller node. This patch adds it.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:10 +02:00
Sowjanya Komatineni b4f99176a5 arm64: tegra: Fix SOR powergate clocks and reset
Tegra210 device tree lists CSI clock and reset under SOR powergate
node.

But Tegra210 has CSICIL in SOR partition and CSI in VENC partition.

So, this patch includes fix for SOR powergate node.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:09 +02:00
Jon Hunter 4012ab12b3 arm64: tegra: Allow the PMIC RTC to wakeup Jetson Xavier
The PMIC RTC is currently unable to wakeup Tegra194 on the Jetson Xavier
platform because the interrupt from the PMIC is not usin the PMC as the
interrupt parent but the GIC directly. Update the PMIC interrupt to use
the PMC as the interrupt parent so that the PMIC RTC alarms can wakeup
the device.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:09 +02:00
Jon Hunter bba25915b1 arm64: tegra: Fix ethernet phy-mode for Jetson Xavier
The 'phy-mode' property is currently defined as 'rgmii' for Jetson
Xavier. This indicates that the RGMII RX and TX delays are set by the
MAC and the internal delays set by the PHY are not used.

If the Marvell PHY driver is enabled, such that it is used and not the
generic PHY, ethernet failures are seen (DHCP is failing to obtain an
IP address) and this is caused because the Marvell PHY driver is
disabling the internal RX and TX delays. For Jetson Xavier the internal
PHY RX and TX delay should be used and so fix this by setting the
'phy-mode' to 'rgmii-id' and not 'rgmii'.

Fixes: f89b58ce71 ("arm64: tegra: Add ethernet controller on Tegra194")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:09 +02:00
Thierry Reding e12325f699 arm64: tegra: Hook up EMC cooling device
The external memory controller can be used as a cooling device for the
LPDDR chips. Hook it up to the "mem" thermal zone of the SOCTHERM block
so that temperature polling can be enabled on the EMC when a given
temperature is exceeded.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:08 +02:00
Joseph Lo cd9350c55b arm64: tegra: Add external memory controller node for Tegra210
Add external memory controller (EMC) node for Tegra210

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-20 15:26:03 +02:00
Keno Fischer 1cf6022bd9 arm64: Fix PTRACE_SYSEMU semantics
Quoth the man page:
```
       If the tracee was restarted by PTRACE_SYSCALL or PTRACE_SYSEMU, the
       tracee enters syscall-enter-stop just prior to entering any system
       call (which will not be executed if the restart was using
       PTRACE_SYSEMU, regardless of any change made to registers at this
       point or how the tracee is restarted after this stop).
```

The parenthetical comment is currently true on x86 and powerpc,
but not currently true on arm64. arm64 re-checks the _TIF_SYSCALL_EMU
flag after the syscall entry ptrace stop. However, at this point,
it reflects which method was used to re-start the syscall
at the entry stop, rather than the method that was used to reach it.
Fix that by recording the original flag before performing the ptrace
stop, bringing the behavior in line with documentation and x86/powerpc.

Fixes: f086f67485 ("arm64: ptrace: add support for syscall emulation")
Cc: <stable@vger.kernel.org> # 5.3.x-
Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Acked-by: Will Deacon <will@kernel.org>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Bin Lu <Bin.Lu@arm.com>
[catalin.marinas@arm.com: moved 'flags' bit masking]
[catalin.marinas@arm.com: changed 'flags' type to unsigned long]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2020-05-20 12:02:42 +01:00
Matthias Brugger 0607a30d5f arm64: dts: mt6797: Fix mmsys node name
Node names are supposed to match the class of the device. The
mmsys node is a syscon as it provides more then just a clock controller.
Update the name.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20200518113156.25009-4-matthias.bgg@kernel.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-20 12:49:07 +02:00
Enric Balletbo i Serra ae167ae25b arm64: dts: mt8173: Fix mmsys node name
Node names are supposed to match the class of the device, mmsys is a
system controller (syscon) not a clock controller, so change the node
name accordingly.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20200401201736.2980433-4-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-20 12:48:10 +02:00
Paolo Bonzini 9d5272f5e3 Merge tag 'noinstr-x86-kvm-2020-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD 2020-05-20 03:40:09 -04:00
Anson Huang 1641b23470 arm64: dts: imx8mp: Add src node interrupts
Interrupts is a required property according to SRC binding, add
it for SRC node.

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>
2020-05-20 09:31:56 +08:00
Anson Huang d0955f6649 arm64: dts: imx8mq: Add src node interrupts
Interrupts is a required property according to SRC binding, add
it for SRC node.

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>
2020-05-20 09:31:41 +08:00
Peng Fan 9e6337e6fd arm64: dts: imx8m: assign clocks for A53
Assign IMX8M*_CLK_A53_SRC's parent to system pll1 and
assign IMX8M*_CLK_A53_CORE's parent to arm pll out as what
is done in drivers/clk/imx/clk-imx8m*.c, then we could remove
the settings in driver which triggers lockdep warning.

Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 09:24:12 +08:00
Michael Walle a0a44420e5 arm64: dts: freescale: sl28: enable LPUART1
Now that the LPUART has support for the LS1028A SoC, also enable it on
our board.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 09:12:45 +08:00
Yangbo Lu fa578d4e9f arm64: dts: ls1043a-rdb: add compatible for board
Add compatible for board to identify.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 08:58:13 +08:00
Christian Hewitt 647e1643d6 arm64: dts: meson: add ethernet interrupt to wetek dtsi
Add Ethernet interrupt details to the WeTek Hub/Play2 dtsi to resolve
an issue with Ethernet probing in mainline u-boot.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200518025451.16401-1-christianshewitt@gmail.com
2020-05-19 16:31:57 -07:00
Christian Hewitt 1d6ece87b7 arm64: dts: meson: add support for the Smartlabs SML-5442TW
The Smartlabs SML-5442TW is based on the Amlogic P231 reference design
but with the following differences:

- The Yellow and Blue LEDs are available but disabled
- The Red and Green LEDs are used to signal off/on status
- uart_AO can be accessed after opening the case; soldered pins exist
- QCA9377 instead of the usual Ampak/Broadcom module

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200510124129.31575-4-christianshewitt@gmail.com
2020-05-19 16:31:57 -07:00
Jerome Brunet dbffd7f9bd arm64: dts: meson: g12: add internal DAC glue
add the internal DAC glue support on the g12 and sm1 family
This glue connects the different TDM interfaces of the SoC to
the internal audio DAC codec.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-8-jbrunet@baylibre.com
2020-05-19 16:31:56 -07:00
Jerome Brunet 457fa78771 arm64: dts: meson: g12: add internal DAC
add internal audio DAC support on the g12 and sm1 SoC family

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-7-jbrunet@baylibre.com
2020-05-19 16:31:55 -07:00
Jerome Brunet 2989a2d6c7 arm64: dts: meson: libretech-pc: add internal DAC support
Add the internal DAC support on the libretech CC. The output of this
DAC is provided on the 9J4 connector.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-6-jbrunet@baylibre.com
2020-05-19 16:31:55 -07:00
Jerome Brunet 451323f8bc arm64: dts: meson: libretech-ac: add internal DAC support
Add the internal DAC support on the libretech CC. The output of this
DAC is provided on the 9J5 connector.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-5-jbrunet@baylibre.com
2020-05-19 16:31:55 -07:00
Jerome Brunet 249ce3777c arm64: dts: meson: libretech-cc: add internal DAC support
Add the internal DAC support on the libretech CC. The output of this
DAC is provided on the 3.5mm jack connector.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-4-jbrunet@baylibre.com
2020-05-19 16:31:55 -07:00
Jerome Brunet f3c3538225 arm64: dts: meson: p230-q200: add internal DAC support
Add the necessary bits to support the internal audio DAC the p230/q200
reference design derivated boards. The output of this DAC is provided
on the 3.5mm jack connector

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-3-jbrunet@baylibre.com
2020-05-19 16:31:54 -07:00
Jerome Brunet a66d4ae314 arm64: dts: meson: gxl: add acodec support
Add the internal audio DAC to the gxl SoC DT

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-2-jbrunet@baylibre.com
2020-05-19 16:31:54 -07:00
Dongjin Kim 326e57518b arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4
Add the board support for the Hardkernel Odroid-C4 single board computer.

The Odroid-C4 is the Odroid-C2 successor with same form factor, but using
a modern Amlogic S905X3 (SM1) SoC and 4x USB3 ports.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506080702.6645-3-narmstrong@baylibre.com
2020-05-19 16:31:54 -07:00
Neil Armstrong c30dd92701 arm64: dts: meson-sm1: add cpu thermal nodes
Add thermal nodes for the Amlogic SM1 SoCs based on the G12A and G12B
thermal nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200512093916.19676-3-narmstrong@baylibre.com
2020-05-19 16:31:53 -07:00
Neil Armstrong fc9eab4b42 arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi
The G12B thermal nodes should be in the meson-g12b.dtsi file.

Fixes: 195f140318 ("arm64: dts: meson: g12b: add cooling properties")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200512093916.19676-2-narmstrong@baylibre.com
2020-05-19 16:31:53 -07:00
Jerome Brunet d8e8e66ea5 arm64: dts: meson: libretech-pc: add initial audio playback support
Add initial audio support limited to HDMI i2s.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-7-jbrunet@baylibre.com
2020-05-19 16:31:53 -07:00
Jerome Brunet c755c7913c arm64: dts: meson: libretech-ac: add initial audio playback support
Add initial audio support limited to HDMI i2s.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-6-jbrunet@baylibre.com
2020-05-19 16:31:52 -07:00
Jerome Brunet a3ff86dcbb arm64: dts: meson: libretech-cc: add initial audio playback support
Add initial audio support limited to HDMI i2s.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-5-jbrunet@baylibre.com
2020-05-19 16:31:52 -07:00
Jerome Brunet 3ffeb9532d arm64: dts: meson: p230-q200: add initial audio playback support
Add basic audio support on the p230/q200 reference design.
This initial support is limited to HDMI i2s and SPDIF (LPCM).

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-4-jbrunet@baylibre.com
2020-05-19 16:31:52 -07:00
Jerome Brunet 4cc1b2659d arm64: dts: meson-gx: add aiu support
Add the AIU audio device to the Amlogic GX SoC family DT.
ATM, this device provides the i2s and spdif output stages and also
the hdmi and internal codec glues.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-3-jbrunet@baylibre.com
2020-05-19 16:31:51 -07:00
James Morse 8fcc4ae6fa arm64: acpi: Make apei_claim_sea() synchronise with APEI's irq work
APEI is unable to do all of its error handling work in nmi-context, so
it defers non-fatal work onto the irq_work queue. arch_irq_work_raise()
sends an IPI to the calling cpu, but this is not guaranteed to be taken
before returning to user-space.

Unless the exception interrupted a context with irqs-masked,
irq_work_run() can run immediately. Otherwise return -EINPROGRESS to
indicate ghes_notify_sea() found some work to do, but it hasn't
finished yet.

With this apei_claim_sea() returning '0' means this external-abort was
also notification of a firmware-first RAS error, and that APEI has
processed the CPER records.

Signed-off-by: James Morse <james.morse@arm.com>
Tested-by: Tyler Baicar <baicar@os.amperecomputing.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-05-19 19:51:11 +02:00
Peter Zijlstra 69ea03b56e hardirq/nmi: Allow nested nmi_enter()
Since there are already a number of sites (ARM64, PowerPC) that effectively
nest nmi_enter(), make the primitive support this before adding even more.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lkml.kernel.org/r/20200505134100.864179229@linutronix.de
2020-05-19 15:51:17 +02:00
Frederic Weisbecker 28f6bf9e24 arm64: Prepare arch_nmi_enter() for recursion
When using nmi_enter() recursively, arch_nmi_enter() must also be recursion
safe. In particular, it must be ensured that HCR_TGE is always set while in
NMI context when in HYP mode, and be restored to it's former state when
done.

The current code fails this when interleaved wrong. Notably it overwrites
the original hcr state on nesting.

Introduce a nesting counter to make sure to store the original value.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lkml.kernel.org/r/20200505134100.771491291@linutronix.de
2020-05-19 15:51:17 +02:00
Johan Jonker 2b99e61966 arm64: dts: rockchip: fix pd_tcpc0 and pd_tcpc1 node position on rk3399
The pd_tcpc0 and pd_tcpc1 nodes are currently a sub node of pd_vio.
In the rk3399 TRM figure of the 'Power Domain Partition' and in the
table of 'Power Domain and Voltage Domain Summary' these power domains
are positioned directly under VD_LOGIC, so fix that in 'rk3399.dtsi'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
Link: https://lore.kernel.org/r/20200428203003.3318-2-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 10:17:51 +02:00
Maulik Shah 7d2f29e494 arm64: dts: qcom: sc7180: Correct the pdc interrupt ranges
Few PDC interrupts do not map to respective parent GIC interrupt.
Fix this by correcting the pdc interrupt map.

Fixes: 22f185ee81 ("arm64: dts: qcom: sc7180: Add pdc interrupt controller")
Cc: devicetree@vger.kernel.org
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/1589804402-27130-1-git-send-email-mkshah@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-18 20:08:35 -07:00
Alex Elder 5ef3c35809 arm64: defconfig: enable Qualcomm IPA and RMNet modules
Enable building the Qualcomm IPA driver as a kernel module.  To be
useful, the IPA driver also requires RMNet, so enable building that
as a module as well.

Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20200518215455.10095-1-elder@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-18 16:36:30 -07:00
Alex Elder d82fade846 arm64: dts: qcom: sc7180: add IPA information
Add IPA-related nodes and definitions to "sc7180.dtsi".

Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20200518214939.9730-1-elder@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-18 16:35:38 -07:00
Johan Jonker fb0ab17f1a arm64: dts: rockchip: add bus-width properties to mmc nodes for px30
'bus-width' and pinctrl containing the bus-pins
should be in the same file, so add them to
all mmc nodes in 'px30.dtsi'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200416183053.6045-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:34:58 +02:00
Johan Jonker 1fab4cf51e arm64: dts: rockchip: remove disable-wp from rk3308-roc-cc emmc node
The mmc-controller.yaml didn't explicitly say disable-wp is
for SD card slot only, but that is what it was designed for
in the first place.
Remove all disable-wp from emmc or sdio controllers.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20191219121954.2450-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:22:52 +02:00
Johan Jonker e916d85b92 arm64: dts: rockchip: rename and label gpio-led subnodes
Current dts files with 'gpio-led' nodes were manually verified.
In order to automate this process leds-gpio.txt
has been converted to yaml. With this conversion a check
for pattern properties was added. A test with the command
below gives a screen full of warnings like:

arch/arm64/boot/dts/rockchip/rk3368-r88.dt.yaml: gpio-leds:
'work' does not match any of the regexes:
'(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'

Fix these errors with help of the following rules:

1: Add nodename in the preferred form.

2: Always add a label that ends with '_led' to prevent conflicts
   with other labels such as 'power' and 'mmc'

3: If leds need pinctrl add a label that ends with '_led_pin'
   also to prevent conflicts with other labels.

patternProperties:
  # The first form is preferred, but fall back to just 'led'
  # anywhere in the node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/
leds-gpio.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200428144933.10953-2-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:15:56 +02:00
Johan Jonker 84836ded76 arm64: dts: rockchip: fix defines in pd_vio node for rk3399
A test with the command below gives for example this error:

arch/arm64/boot/dts/rockchip/rk3399-evb.dt.yaml: pd_vio@15:
'pd_tcpc0@RK3399_PD_TCPC0', 'pd_tcpc1@RK3399_PD_TCPC1'
do not match any of the regexes:
'.*-names$', '.*-supply$', '^#.*-cells$',
'^#[a-zA-Z0-9,+\\-._]{0,63}$',
'^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}$',
'^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$',
'^__.*__$', 'pinctrl-[0-9]+'

Fix error by replacing the wrong defines by the ones
mentioned in 'rk3399-power.h'.

make -k ARCH=arm64 dtbs_check

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200428203003.3318-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:10:10 +02:00
Johan Jonker 302a729c84 arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-orangepi
A test with the command below this error:

arch/arm64/boot/dts/rockchip/rk3399-orangepi.dt.yaml: phy:
'#phy-cells' is a required property

'phy' is a reserved nodename and should not be used for pinctrl,
so change it to 'gmac'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-6-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker b2bb769100 arm64: dts: rockchip: fix rtl8211e nodename for rk3399-orangepi
A test with the command below gives this error:

arch/arm64/boot/dts/rockchip/rk3399-orangepi.dt.yaml: phy@1:
'#phy-cells' is a required property

The phy nodename is used by a phy-handle.
The parent node is compatible with "snps,dwmac-mdio",
so change nodename to 'ethernet-phy', for which '#phy-cells'
is not a required property

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-5-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker 737157f961 arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-nanopi4
A test with the command below gives for example this error:

arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dt.yaml: phy:
'#phy-cells' is a required property
arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dt.yaml: phy:
'#phy-cells' is a required property
arch/arm64/boot/dts/rockchip/rk3399-nanopi-neo4.dt.yaml: phy:
'#phy-cells' is a required property

'phy' is a reserved nodename and should not be used for pinctrl,
so change it to 'gmac'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-4-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker b450d1c566 arm64: dts: rockchip: fix rtl8211e nodename for rk3399-nanopi4
A test with the command below gives these errors:

arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dt.yaml: phy@1:
'#phy-cells' is a required property
arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dt.yaml: phy@1:
'#phy-cells' is a required property
arch/arm64/boot/dts/rockchip/rk3399-nanopi-neo4.dt.yaml: phy@1:
'#phy-cells' is a required property

The rtl8211e node is used by a phy-handle.
The parent node is compatible with "snps,dwmac-mdio",
so change nodename to 'ethernet-phy', for which '#phy-cells'
is not a required property.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker 63834d1edb arm64: dts: rockchip: fix rtl8211f nodename for rk3328 Beelink A1
A test with the command below gives this error:

arch/arm64/boot/dts/rockchip/rk3328-a1.dt.yaml: phy@0:
'#phy-cells' is a required property

The rtl8211f node is used by a phy-handle.
The parent node is compatible with "snps,dwmac-mdio",
so change nodename to 'ethernet-phy', for which '#phy-cells'
is not a required property.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-2-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker 8370cc5533 arm64: dts: rockchip: fix phy nodename for rk3328
A test with the command below gives for example this error:

arch/arm64/boot/dts/rockchip/rk3328-evb.dt.yaml: phy@0:
'#phy-cells' is a required property

The phy nodename is normally used by a phy-handle.
This node is however compatible with
"ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"
which is just been added to 'ethernet-phy.yaml'.
So change nodename to 'ethernet-phy' for which '#phy-cells'
is not a required property

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200321215423.12176-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-19 00:03:31 +02:00
Johan Jonker 213f272b75 arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2
The defines RK_FUNC_1 and RK_FUNC_2 are deprecated,
so replace them with the preferred form.
Restyle properties in the same line.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200512203524.7317-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-05-18 23:39:31 +02:00
Bjorn Andersson 909bc56cb0 arm64: dts: qcom: sc7180: Fix ETMv4 power management patch
The lack of unique context in  '0f1decaa83b7 ("arm64: dts: qcom: sc7180:
Support ETMv4 power management")' caused the patch to be applied
off-by-one. Move the "arm,coresight-loses-context-with-cpu" properties
down one node, so that it applies to the ETMs and not the replicator.

Reported-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-18 11:44:57 -07:00
Yunfeng Ye bd4298c72b arm64: stacktrace: Factor out some common code into on_stack()
There are some common codes for stack checking, so factors it out into
the function on_stack().

No functional change.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Link: https://lore.kernel.org/r/07b3b0e6-3f58-4fed-07ea-7d17b7508948@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 18:04:22 +01:00
Douglas Anderson b322c65f8c arm64: Call debug_traps_init() from trap_init() to help early kgdb
A new kgdb feature will soon land (kgdb_earlycon) that lets us run
kgdb much earlier.  In order for everything to work properly it's
important that the break hook is setup by the time we process
"kgdbwait".

Right now the break hook is setup in debug_traps_init() and that's
called from arch_initcall().  That's a bit too late since
kgdb_earlycon really needs things to be setup by the time the system
calls dbg_late_init().

We could fix this by adding call_break_hook() into early_brk64() and
that works fine.  However, it's a little ugly.  Instead, let's just
add a call to debug_traps_init() straight from trap_init().  There's
already a documented dependency between trap_init() and
debug_traps_init() and this makes the dependency more obvious rather
than just relying on a comment.

NOTE: this solution isn't early enough to let us select the
"ARCH_HAS_EARLY_DEBUG" KConfig option that is introduced by the
kgdb_earlycon patch series.  That would only be set if we could do
breakpoints when early params are parsed.  This patch only enables
"late early" breakpoints, AKA breakpoints when dbg_late_init() is
called.  It's expected that this should be fine for most people.

It should also be noted that if you crash you can still end up in kgdb
earlier than debug_traps_init().  Since you don't need breakpoints to
debug a crash that's fine.

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200513160501.1.I0b5edf030cc6ebef6ab4829f8867cdaea42485d8@changeid
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:51:20 +01:00
Will Deacon 258c3d628f arm64: entry-ftrace.S: Update comment to indicate that x18 is live
The Shadow Call Stack pointer is held in x18, so update the ftrace
entry comment to indicate that it cannot be safely clobbered.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:47:50 +01:00
Will Deacon 871e100e43 scs: Move DEFINE_SCS macro into core code
Defining static shadow call stacks is not architecture-specific, so move
the DEFINE_SCS() macro into the core header file.

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:47:48 +01:00
Will Deacon 88485be531 scs: Move scs_overflow_check() out of architecture code
There is nothing architecture-specific about scs_overflow_check() as
it's just a trivial wrapper around scs_corrupted().

For parity with task_stack_end_corrupted(), rename scs_corrupted() to
task_scs_end_corrupted() and call it from schedule_debug() when
CONFIG_SCHED_STACK_END_CHECK_is enabled, which better reflects its
purpose as a debug feature to catch inadvertent overflow of the SCS.
Finally, remove the unused scs_overflow_check() function entirely.

This has absolutely no impact on architectures that do not support SCS
(currently arm64 only).

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:47:40 +01:00
Will Deacon 711e8b0de0 arm64: scs: Use 'scs_sp' register alias for x18
x18 holds the SCS stack pointer value, so introduce a register alias to
make this easier to read in assembly code.

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:47:37 +01:00
Will Deacon 51189c7a7e arm64: scs: Store absolute SCS stack pointer value in thread_info
Storing the SCS information in thread_info as a {base,offset} pair
introduces an additional load instruction on the ret-to-user path,
since the SCS stack pointer in x18 has to be converted back to an offset
by subtracting the base.

Replace the offset with the absolute SCS stack pointer value instead
and avoid the redundant load.

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-18 17:47:22 +01:00
Andre Przywara 94cc3f1baa arm64: dts: juno: Fix SCPI shared mem node name
The SRAM DT binding requires child nodes to use a certain node name
scheme.

Change the naming from scp-shmem to scp-sram to comply with that.

Link: https://lore.kernel.org/r/20200513103016.130417-19-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara 36d48981d6 arm64: dts: juno: Fix GPU interrupt order
The Mali binding insists on the GPU interrupts to be in ordered as: job,
mmu, gpu.
Sort the GPU interrupts and interrupt-names properties accordingly.

Link: https://lore.kernel.org/r/20200513103016.130417-17-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara 9d0a36ddcc arm64: dts: fvp/juno: Fix bus node names
Most Arm Ltd. boards are employing a layered bus structure, to map
the hardware design (SoC, motherboard, IOFPGA) and structure the DTs.

The "simple-bus" nodes only allow a limited set of node names. Switch
to use *-bus to be binding compliant.

This relies on a pending dt-schema.git fix for now:
https://github.com/devicetree-org/dt-schema/pull/38

Link: https://lore.kernel.org/r/20200513103016.130417-16-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara 906e6dd481 arm64: dts: fvp: Fix SMMU DT node
The SMMU name in the RevC FVP DT file was not fully binding compliant.

Adjust the node name to match the binding's list of allowed names, also
shuffle the order of the interrupts to comply with the expected order.

Link: https://lore.kernel.org/r/20200513103016.130417-15-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara 608f1b6cf3 arm64: dts: fvp/juno: Fix serial node names
The UARTs for all Arm Ltd. boards were using "uart" as their node name
stub.

Replace that with the required "serial" string, to comply with the PL011
DT binding.

Link: https://lore.kernel.org/r/20200513103016.130417-14-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara edfac966f6 arm64: dts: juno: Use proper DT node name for USB
The EHCI/OCHI DT binding requires to use "usb" as the node name stub.

Replace the existing name with "usb" to comply with the binding.

Link: https://lore.kernel.org/r/20200513103016.130417-13-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-18 17:08:54 +01:00
Andre Przywara fac959c93f arm64: dts: fvp: Fix ITS node names and #msi-cells
The GIC ITS nodes in the fastmodel DTS files were not fully binding
compliant.

Use one of the allowed node names, also add the required #msi-cells
property for the older model.

Link: https://lore.kernel.org/r/20200513103016.130417-12-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara 78631aecc5 arm64: dts: fvp: Fix GIC child nodes
The GIC DT nodes for the fastmodels were not fully compliant with the
DT binding, which has certain expectations about child nodes and their
size and address cells values.

Use smaller #address-cells and #size-cells values, as the binding
requests, and adjust the reg properties accordingly.
This requires adjusting the interrupt nexus nodes as well, as one
field of the interrupt-map property depends on the GIC's address-size.

Since the .dts files share interrupt nexus nodes across different
interrupt controllers (GICv2 vs. GICv3), we need to use the only
commonly allowed #address-size value of <1> for both.

Link: https://lore.kernel.org/r/20200513103016.130417-11-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara a78aee9e43 arm64: dts: juno: Fix GIC child nodes
The GIC DT nodes for the Juno boards were not fully compliant with
the DT binding, which has certain expectations about child nodes and
their size and address cells values.

Use smaller #address-cells and #size-cells values, as the binding
requests, and adjust the reg properties accordingly.
This requires adjusting the interrupt nexus nodes as well, as one
field of the interrupt-map property depends on the GIC's address-size.

Link: https://lore.kernel.org/r/20200513103016.130417-10-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara 336edacfb9 arm64: dts: fvp: Fix GIC compatible names
The GIC DT binding only allows certain combinations of DT compatible
strings. The somewhat awkward "arm,cortex-a15-gic", "arm,cortex-a9-gic"
is not among those.

Drop that combination of different "cortex" based strings used for the
models, and replace it with the more useful combination including
"arm,gic-400".

Link: https://lore.kernel.org/r/20200513103016.130417-9-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara 0e529dae51 arm64: dts: juno: Fix mem-timer
The Juno's mem-timer DT node was not fully compliant with the DT binding,
which has certain expectation about child nodes and their size and
address cells values.

Use a cell size of 1, as the binding requests, and spell out the ranges
property to be binding compliant.

Link: https://lore.kernel.org/r/20200513103016.130417-8-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara 948204a1bf arm64: dts: juno: Move fixed devices out of bus node
The devicetree compiler complains when DT nodes without a reg property
live inside a (simple) bus node:
Warning (simple_bus_reg): Node /bus@8000000/v2m_refclk32khz
                          missing or empty reg/ranges property

Move the fixed clocks, the fixed regulator, and the gpio keys to the
root node, since they do not depend on any busses.

Link: https://lore.kernel.org/r/20200513103016.130417-7-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Andre Przywara feebdc3f79 arm64: dts: fvp: Move fixed clocks out of bus node
The devicetree compiler complains when DT nodes without a reg property
live inside a (simple) bus node:
Warning (simple_bus_reg): Node /bus@8000000/v2m_refclk32khz
                          missing or empty reg/ranges property

Move the fixed clocks to the root node, since they do not depend on any
busses.

Link: https://lore.kernel.org/r/20200513103016.130417-6-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 18:57:10 +01:00
Marek Behún c2671acbbb arm64: dts: armada-3720-turris-mox: fix SFP binding
The sfp compatible should be 'sff,sfp', not 'sff,sfp+'. We used patched
kernel where the latter was working.

Fixes: 7109d817db ("arm64: dts: marvell: add DTS for Turris Mox")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 18:57:48 +02:00
Andre Przywara 849bfc3dfc arm64: dts: fvp: Move fixed devices out of bus node
The devicetree compiler complains when DT nodes without a reg property
live inside a (simple) bus node:
Warning (simple_bus_reg): Node /bus@8000000/motherboard-bus/v2m_refclk32khz
                          missing or empty reg/ranges property

Move the fixed clocks, the fixed regulator, and the config bus subtree
to the root node, since they do not depend on any busses.

Link: https://lore.kernel.org/r/20200513103016.130417-4-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 17:56:48 +01:00
Marek Behún 7a2c36b039 arm64: dts: armada-3720-turris-mox: forbid SDR104 on SDIO for FCC purposes
Use sdhci-caps-mask to forbid SDR104 mode on the SDIO capable SDHCI
controller. Without this the device cannot pass electromagnetic
interference certifications.

Fixes: 7109d817db ("arm64: dts: marvell: add DTS for Turris Mox")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 18:56:29 +02:00
Andre Przywara bb5cce12ac arm64: dts: fvp/juno: Fix node address fields
The Arm Ltd. boards were using an outdated address convention in the DT
node names, by separating the high from the low 32-bits of an address by
a comma.

Remove the comma from the node name suffix to be DT spec compliant.

Link: https://lore.kernel.org/r/20200513103016.130417-3-andre.przywara@arm.com
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2020-05-17 17:55:58 +01:00
Russell King 11b2af36cc arm64: dts: add uDPU i2c bus recovery
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 18:07:34 +02:00
Baruch Siach 1e6e612853 arm64: dts: marvell: drop i2c timeout-ms property
The timeout-ms property for i2c master nodes is undocumented, and as
never been supported. Drop it.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 18:00:11 +02:00
Pali Rohár 1b5a2dd9e2 arm64: dts: marvell: armada-37xx: Move PCIe max-link-speed property
Move the max-link-speed property of the PCIe node from board specific
device tree files to the generic armada-37xx.dtsi.

Armada 37xx supports only PCIe gen2 speed so max-link-speed property
should be in the generic armada-37xx.dtsi file.

Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 17:52:30 +02:00
Marek Behún df749cdb01 arm64: dts: marvell: armada-37xx: Move PCIe comphy handle property
Move the comphy handle property of the PCIe node from board specific
device tree files (EspressoBin and Turris Mox) to the generic
armada-37xx.dtsi.

This is correct since this is the only possible PCIe PHY configuration
on Armada 37xx, so when PCIe is enabled on any board, this handle is
correct.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 17:52:13 +02:00
Marek Behún 7158780169 arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio function
We found out that we are unable to control the PERST# signal via the
default pin dedicated to be PERST# pin (GPIO2[3] pin) on A3700 SOC when
this pin is in EP_PCIE1_Resetn mode. There is a register in the PCIe
register space called PERSTN_GPIO_EN (D0088004[3]), but changing the
value of this register does not change the pin output when measuring
with voltmeter.

We do not know if this is a bug in the SOC, or if it works only when
PCIe controller is in a certain state.

Commit f4c7d053d7 ("PCI: aardvark: Wait for endpoint to be ready
before training link") says that when this pin changes pinctrl mode
from EP_PCIE1_Resetn to GPIO, the PERST# signal is asserted for a brief
moment.

So currently the situation is that on A3700 boards the PERST# signal is
asserted in U-Boot (because the code in U-Boot issues reset via this pin
via GPIO mode), and then in Linux by the obscure and undocumented
mechanism described by the above mentioned commit.

We want to issue PERST# signal in a known way, therefore this patch
changes the pcie_reset_pin function from "pcie" to "gpio" and adds the
reset-gpios property to the PCIe node in device tree files of
EspressoBin and Armada 3720 Dev Board (Turris Mox device tree already
has this property and uDPU does not have a PCIe port).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Remi Pommarel <repk@triplefau.lt>
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 17:51:43 +02:00
Russell King 847c3323d5 arm64: dts: update SolidRun Armada 8040 phy interface types
Update the SolidRun Armada 8040 platforms phy interface types from the
old 10gbase-kr to the newer and more correct 10gbase-r.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-05-17 17:43:48 +02:00
Fugang Duan f9654d26e1 arm64: dts: imx8mp: add "fsl,imx6sx-fec" compatible string
Add "fsl,imx6sx-fec" compatible string for fec node, then
i.MX8MP EVK ethernet function can work now.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-17 22:13:47 +08:00
Linus Torvalds 5c33696f2b ARM: SoC/dt fixes for v5.7
This round of fixes is almost exclusively device tree changes,
 with trivial defconfig fixes and one compiler warning fix
 added in.
 
 A number of patches are to fix dtc warnings, in particular on
 Amlogic, i.MX and Rockchips.
 
 Other notable changes include:
 
 Renesas:
  - Fix a wrong clock configuration on R-Mobile A1,
  - Fix IOMMU support on R-Car V3H
 
 Allwinner
  - Multiple audio fixes
 
 Qualcomm
  - Use a safe CPU voltage on MSM8996
  - Fixes to match a late audio driver change
 
 Rockchip:
  - Some fixes for the newly added Pinebook Pro
 
 NXP i.MX:
  - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board.
  - Fix imx6dl-yapp4-ursa board Ethernet connection.
 
 OMAP:
  - A regression fix for non-existing can device on am534x-idk
  - Fix flakey wlan on droid4 where some devices would not connect
    at all because of internal pull being used with an external pull
  - Fix occasional missed wake-up events on droid4 modem uart
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAl6/Dx8ACgkQmmx57+YA
 GNmRJw/+MjrVUuD+KHjkfOX68zJ4puLluj1PGn//t0DnQPkrmPnDMP0gs/62cMNc
 4U3SIlYCivSOiz6N6gyvEU+j/sMqzCn7J3jBsUqCEvcOBm0X3b1T6OAwK8kp1TVq
 zAbEs/YaHBYKPIUOrstZwLkTCDLUXQlqPs7aEubyZ+awqa+EW9joGDyrus53jCIP
 pbaLV+52TGpOENfKRv05k6eJrtLfNM6Yt5qoCPRE4DYvbSumwXarPT/WOC1V5C/9
 KUwh3bVi6bRUEuhIHomnKqLK+GA8DMVw+HU9vNHDHexbdSQGsIMuFrCyWktwEizq
 7FTAKpEiuFJkOD6eyNCe3x5f2W5isDRvV8ehULaCRa8CbiBJUGY9wOdllMAYLuna
 haFGjJ8aKIPwgmoxjFL534hXprAMAGAAm8ZUcULIS+X8/8R2c+fzIadJ6ZS+VmNh
 2Nq4qNAPh8pTJJXzM9oNtI7HQLwOkAp49/r5FOrSReUFQVt84ofHy/QxAUdDMTkq
 7250L8G+SrpDQiNxck2pOYIKNqQcRUeJU60fTlkQlljBIjKOTn9zUrEhYLpujD3g
 vKLBmpek67fHfXB/sBpFOALCYw7prRacIyZrDHUKgEhP85WnkXXoZ+NQL5edgZGC
 qZ+h5xeRc6eBFYSP30HYQYL4fhTYokvWSdu5AbWBdJlAoAHk1mQ=
 =fXzR
 -----END PGP SIGNATURE-----

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

Pull ARM SoC/dt fixes from Arnd Bergmann:
 "This round of fixes is almost exclusively device tree changes, with
  trivial defconfig fixes and one compiler warning fix added in.

  A number of patches are to fix dtc warnings, in particular on Amlogic,
  i.MX and Rockchips.

  Other notable changes include:

  Renesas:
   - Fix a wrong clock configuration on R-Mobile A1
   - Fix IOMMU support on R-Car V3H

  Allwinner
   - Multiple audio fixes

  Qualcomm
   - Use a safe CPU voltage on MSM8996
   - Fixes to match a late audio driver change

  Rockchip:
   - Some fixes for the newly added Pinebook Pro

  NXP i.MX:
   - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board
   - Fix imx6dl-yapp4-ursa board Ethernet connection

  OMAP:
   - A regression fix for non-existing can device on am534x-idk
   - Fix flakey wlan on droid4 where some devices would not connect at
     all because of internal pull being used with an external pull
   - Fix occasional missed wake-up events on droid4 modem uart"

* tag 'arm-soc-fixes-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (51 commits)
  ARM: dts: iwg20d-q7-dbcm-ca: Remove unneeded properties in hdmi@39
  ARM: dts: renesas: Make hdmi encoder nodes compliant with DT bindings
  arm64: dts: renesas: Make hdmi encoder nodes compliant with DT bindings
  arm64: defconfig: add MEDIA_PLATFORM_SUPPORT
  arm64: defconfig: ARCH_R8A7795: follow changed config symbol name
  arm64: defconfig: add DRM_DISPLAY_CONNECTOR
  arm64: defconfig: DRM_DUMB_VGA_DAC: follow changed config symbol name
  ARM: oxnas: make ox820_boot_secondary static
  ARM: dts: r8a7740: Add missing extal2 to CPG node
  ARM: dts: omap4-droid4: Fix occasional lost wakeirq for uart1
  ARM: dts: omap4-droid4: Fix flakey wlan by disabling internal pull for gpio
  arm64: dts: allwinner: a64: Remove unused SPDIF sound card
  arm64: dts: allwinner: a64: pinetab: Fix cpvdd supply name
  arm64: dts: meson-g12: remove spurious blank line
  arm64: dts: meson-g12b-khadas-vim3: add missing frddr_a status property
  arm64: dts: meson-g12-common: fix dwc2 clock names
  arm64: dts: meson-g12b-ugoos-am6: fix usb vbus-supply
  arm64: dts: freescale: imx8mp: update input_val for AUDIOMIX_BIT_STREAM
  ARM: dts: r7s9210: Remove bogus clock-names from OSTM nodes
  ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
  ...
2020-05-16 13:27:58 -07:00
Ulrich Hecht f0e5405b9e arm64: dts: mt8173: Add capacity-dmips-mhz attributes
Dhrystone benchmark on Acer Chromebook R13 CB5-312T:
A72: 15698587 dps @ 1807 MHz
A53:  7598784 dps @ 1703 MHz

Signed-off-by: Ulrich Hecht <uli-qwV78thtvt0@public.gmane.org>
Link: https://lore.kernel.org/r/1563529816-3992-1-git-send-email-uli@fpond.eu
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 18:36:40 +02:00
Chunfeng Yun f0210518aa arm64: dts: mt2712: use non-empty ranges for usb-phy
Use non-empty ranges for usb-phy to make the layout of
its registers clearer;
Replace deprecated compatible by generic

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 17:34:48 +02:00
Hsin-Yi Wang fff1257317 arm64: dts: mt8173: fix mdp aliases property name
Fix warning:
Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20200414030815.192104-1-hsinyi@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 17:09:06 +02:00
Manivannan Sadhasivam 1b118385de arm64: dts: mediatek: Switch to SPDX license identifier for MT6797 SoC
Switch to SPDX license identifier for MT6797 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200222162444.11590-5-manivannan.sadhasivam@linaro.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 17:03:30 +02:00
Manivannan Sadhasivam 1f3f87305e arm64: dts: mediatek: Enable I2C support for 96Boards X20 Development board
There are 7 I2C ports used on this board. Hence, enable all of them.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200222162444.11590-4-manivannan.sadhasivam@linaro.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 17:03:30 +02:00
Manivannan Sadhasivam d3c84299f2 arm64: dts: mediatek: Add I2C support for MT6797 SoC
Add I2C support for Mediatek MT6797 SoC. There are a total of 8 I2C
controllers in this SoC (2 being shared) and they are same as the
controllers present in MT6577 SoC. Hence, the driver support is added with
DT fallback method.

As per the datasheet, there are controllers with _imm prefix like i2c2_imm
and i2c3_imm. These appears to be in different memory regions but sharing
the same pins with i2c2 and i2c3 respectively. Since there is no clear
evidence of what they really are, I've adapted the numbering/naming scheme
from the downstream code by Mediatek.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200222162444.11590-3-manivannan.sadhasivam@linaro.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-16 17:03:30 +02:00
Marc Zyngier 5107000faa KVM: arm64: Make KVM_CAP_MAX_VCPUS compatible with the selected GIC version
KVM_CAP_MAX_VCPUS always return the maximum possible number of
VCPUs, irrespective of the selected interrupt controller. This
is pretty misleading for userspace that selects a GICv2 on a GICv3
system that supports v2 compat: It always gets a maximum of 512
VCPUs, even if the effective limit is 8. The 9th VCPU will fail
to be created, which is unexpected as far as userspace is concerned.

Fortunately, we already have the right information stashed in the
kvm structure, and we can return it as requested.

Reported-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20200427141507.284985-1-maz@kernel.org
2020-05-16 15:05:02 +01:00
Keqian Zhu c862626e19 KVM: arm64: Support enabling dirty log gradually in small chunks
There is already support of enabling dirty log gradually in small chunks
for x86 in commit 3c9bd4006b ("KVM: x86: enable dirty log gradually in
small chunks"). This adds support for arm64.

x86 still writes protect all huge pages when DIRTY_LOG_INITIALLY_ALL_SET
is enabled. However, for arm64, both huge pages and normal pages can be
write protected gradually by userspace.

Under the Huawei Kunpeng 920 2.6GHz platform, I did some tests on 128G
Linux VMs with different page size. The memory pressure is 127G in each
case. The time taken of memory_global_dirty_log_start in QEMU is listed
below:

Page Size      Before    After Optimization
  4K            650ms         1.8ms
  2M             4ms          1.8ms
  1G             2ms          1.8ms

Besides the time reduction, the biggest improvement is that we will minimize
the performance side effect (because of dissolving huge pages and marking
memslots dirty) on guest after enabling dirty log.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200413122023.52583-1-zhukeqian1@huawei.com
2020-05-16 15:05:02 +01:00
Suzuki K Poulose 0529c90212 KVM: arm64: Unify handling THP backed host memory
We support mapping host memory backed by PMD transparent hugepages
at stage2 as huge pages. However the checks are now spread across
two different places. Let us unify the handling of the THPs to
keep the code cleaner (and future proof for PUD THP support).
This patch moves transparent_hugepage_adjust() closer to the caller
to avoid a forward declaration for fault_supports_stage2_huge_mappings().

Also, since we already handle the case where the host VA and the guest
PA may not be aligned, the explicit VM_BUG_ON() is not required.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200507123546.1875-3-yuzenghui@huawei.com
2020-05-16 15:05:02 +01:00
Suzuki K Poulose 9f2836146b KVM: arm64: Clean up the checking for huge mapping
If we are checking whether the stage2 can map PAGE_SIZE,
we don't have to do the boundary checks as both the host
VMA and the guest memslots are page aligned. Bail the case
easily.

While we're at it, fixup a typo in the comment below.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200507123546.1875-2-yuzenghui@huawei.com
2020-05-16 15:05:02 +01:00
Jiang Yi 48c963e31b KVM: arm/arm64: Release kvm->mmu_lock in loop to prevent starvation
Do cond_resched_lock() in stage2_flush_memslot() like what is done in
unmap_stage2_range() and other places holding mmu_lock while processing
a possibly large range of memory.

Signed-off-by: Jiang Yi <giangyi@amazon.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20200415084229.29992-1-giangyi@amazon.com
2020-05-16 15:05:02 +01:00
Zenghui Yu 892713e97c KVM: arm64: Sidestep stage2_unmap_vm() on vcpu reset when S2FWB is supported
stage2_unmap_vm() was introduced to unmap user RAM region in the stage2
page table to make the caches coherent. E.g., a guest reboot with stage1
MMU disabled will access memory using non-cacheable attributes. If the
RAM and caches are not coherent at this stage, some evicted dirty cache
line may go and corrupt guest data in RAM.

Since ARMv8.4, S2FWB feature is mandatory and KVM will take advantage
of it to configure the stage2 page table and the attributes of memory
access. So we ensure that guests always access memory using cacheable
attributes and thus, the caches always be coherent.

So on CPUs that support S2FWB, we can safely reset the vcpu without a
heavy stage2 unmapping.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200415072835.1164-1-yuzenghui@huawei.com
2020-05-16 15:05:01 +01:00
Fuad Tabba 656012c731 KVM: Fix spelling in code comments
Fix spelling and typos (e.g., repeated words) in comments.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200401140310.29701-1-tabba@google.com
2020-05-16 15:05:01 +01:00
Marc Zyngier ce6f8f02f9 KVM: arm64: Use cpus_have_final_cap for has_vhe()
By the time we start using the has_vhe() helper, we have long
discovered whether we are running VHE or not. It thus makes
sense to use cpus_have_final_cap() instead of cpus_have_const_cap(),
which leads to a small text size reduction.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20200513103828.74580-1-maz@kernel.org
2020-05-16 15:04:51 +01:00
Marc Zyngier c6fe89ff8b KVM: arm64: Simplify __kvm_timer_set_cntvoff implementation
Now that this function isn't constrained by the 32bit PCS,
let's simplify it by taking a single 64bit offset instead
of two 32bit parameters.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2020-05-16 15:04:18 +01:00
Fuad Tabba 25357de01b KVM: arm64: Clean up kvm makefiles
Consolidate references to the CONFIG_KVM configuration item to encompass
entire folders rather than per line.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200505154520.194120-5-tabba@google.com
2020-05-16 15:04:18 +01:00
Will Deacon f26133624d KVM: arm64: Change CONFIG_KVM to a menuconfig entry
Changing CONFIG_KVM to be a 'menuconfig' entry in Kconfig mean that we
can straightforwardly enumerate optional features, such as the virtual
PMU device as dependent options.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200505154520.194120-4-tabba@google.com
2020-05-16 15:04:18 +01:00
Will Deacon bf7bc1df30 KVM: arm64: Update help text
arm64 KVM supports 16k pages since 02e0b7600f
("arm64: kvm: Add support for 16K pages"), so update the Kconfig help
text accordingly.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200505154520.194120-3-tabba@google.com
2020-05-16 15:04:18 +01:00
Will Deacon d82755b2e7 KVM: arm64: Kill off CONFIG_KVM_ARM_HOST
CONFIG_KVM_ARM_HOST is just a proxy for CONFIG_KVM, so remove it in favour
of the latter.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200505154520.194120-2-tabba@google.com
2020-05-16 15:04:18 +01:00
Marc Zyngier 9ed24f4b71 KVM: arm64: Move virt/kvm/arm to arch/arm64
Now that the 32bit KVM/arm host is a distant memory, let's move the
whole of the KVM/arm64 code into the arm64 tree.

As they said in the song: Welcome Home (Sanitarium).

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200513104034.74741-1-maz@kernel.org
2020-05-16 15:03:59 +01:00
Arnd Bergmann d5fef88ccb Renesas fixes for v5.7 (take two)
- Fix a wrong clock configuration on R-Mobile A1,
   - Minor fixes that are fast-tracked to avoid introducing regressions
     during conversion of DT bindings to json-schema.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXr5jTgAKCRCKwlD9ZEnx
 cKSMAQCGIyrVtXHISZSFlp3poR1bBMejfxvZWmLIBzIPSw28SQEAqGTxP7dONrXY
 JIbYmduRiRfWK6h0ghr769xp/KQPIAQ=
 =dl06
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v5.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes

Renesas fixes for v5.7 (take two)

  - Fix a wrong clock configuration on R-Mobile A1,
  - Minor fixes that are fast-tracked to avoid introducing regressions
    during conversion of DT bindings to json-schema.

* tag 'renesas-fixes-for-v5.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: dts: iwg20d-q7-dbcm-ca: Remove unneeded properties in hdmi@39
  ARM: dts: renesas: Make hdmi encoder nodes compliant with DT bindings
  arm64: dts: renesas: Make hdmi encoder nodes compliant with DT bindings
  ARM: dts: r8a7740: Add missing extal2 to CPG node

Link: https://lore.kernel.org/r/20200515125043.22811-1-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-15 23:14:36 +02:00
Arnd Bergmann 495e135643 Two fixes for the Allwinner SoCs, one to remove some inexistant sound card on
the A64, and one to fix the audio codec regulator on the pinetab.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXr7M6gAKCRDj7w1vZxhR
 xQxeAP4qE6EtWCAZoryxU3KMJGPRSDktuGFlzPkOL77svJvT9wEAkPvvgQtYk0UI
 7nCsv4YVvAZGCRVocUx2XUS/uFLhbA4=
 =BUW7
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

Two fixes for the Allwinner SoCs, one to remove some inexistant sound card on
the A64, and one to fix the audio codec regulator on the pinetab.

* tag 'sunxi-fixes-for-5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: a64: Remove unused SPDIF sound card
  arm64: dts: allwinner: a64: pinetab: Fix cpvdd supply name

Link: https://lore.kernel.org/r/f7a98a47-316d-4b1a-b5a5-0e1e330d5f52.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-15 23:13:45 +02:00
Arnd Bergmann a875e0e5a2 VExpress modularization
This series enables building various Versatile Express platform drivers
 as modules. The primary target is the Fast Model FVP which is supported
 in Android. As Android is moving towards their GKI, or generic kernel,
 the hardware support has to be in modules. Currently ARCH_VEXPRESS
 enables several built-in only drivers. Some of these are needed, but
 some are only needed for older 32-bit VExpress platforms and can just
 be disabled.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAl68MeUQHHJvYmhAa2Vy
 bmVsLm9yZwAKCRD6+121jbxhw/96EACb8MVXgss/RBPfcfKeb46tgdP6XfxlDqma
 /lWdd88KM3YZI0ym8uBQZX/XwUmuU1bcbxv9E/j0i+i/YER7qrdbsYfeU5CLhAbA
 vidC1fRuqXNPZRsnc5PnVP913PvRiNgNfGM4BUxz5i7aLfl9IGcujdY/uekEoo2i
 9nyAYxMmZBZsHU28y0nXuZaUK7mC7YDZFXM4z6u6Q0nnbS4r5C8b+cUCeTk0w8Ex
 pA1pTWjRFvnpT1wZZU65FRaxv33dO3MbReT84rbQvrRo/IDKFi+VfAw4/UJFWBoF
 Ck1cmEchjPcTf7ut/clET+LqCuCVESwmDGmOhJ78m7m8WxsdoaUSfJSsPNMF7dxE
 +ePIvl/jovqMnCCR+RKbpcIzQvOckk6zp1xnqQNDii46BSCayXQEYtoxRj0B0X3k
 c4izH58Z7NTUa+IbVf02bwqOl2qMlGSp2KocXNTrBqznRkmCiWB+HHmrX/TQusWL
 22sDHuxGRjOhD2yINOMQGeol7fXmIH7M2rjjpoGR1cWGRT/Xj7xU3Eme/VAE0nQv
 VHFoWW6YDVAfsuwJePgPrHysZcH96mhTCRVo9Gx1xC0IaZpcxFPQkk0LTKtu5CWY
 jYA1ml1vLDCl7l/yzfQjdtSm6lLg15ihZ+M6jbPdPacdBqmBL5UmPf30sW53XXAG
 BagmwNHCNQ==
 =c5eS
 -----END PGP SIGNATURE-----

Merge tag 'vexpress-modules-for-soc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into arm/soc

VExpress modularization

This series enables building various Versatile Express platform drivers
as modules. The primary target is the Fast Model FVP which is supported
in Android. As Android is moving towards their GKI, or generic kernel,
the hardware support has to be in modules. Currently ARCH_VEXPRESS
enables several built-in only drivers. Some of these are needed, but
some are only needed for older 32-bit VExpress platforms and can just
be disabled.

* tag 'vexpress-modules-for-soc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  ARM: vexpress: Don't select VEXPRESS_CONFIG
  bus: vexpress-config: Support building as module
  vexpress: Move setting master site to vexpress-config bus
  bus: vexpress-config: simplify config bus probing
  bus: vexpress-config: Merge vexpress-syscfg into vexpress-config
  mfd: vexpress-sysreg: Support building as a module
  mfd: vexpress-sysreg: Use devres API variants
  mfd: vexpress-sysreg: Drop unused syscon child devices
  mfd: vexpress-sysreg: Drop selecting CONFIG_CLKSRC_MMIO
  clk: vexpress-osc: Support building as a module
  clk: vexpress-osc: Use the devres clock API variants
  clk: versatile: Only enable SP810 on 32-bit by default
  clk: versatile: Rework kconfig structure
  amba: Retry adding deferred devices at late_initcall
  arm64: vexpress: Don't select CONFIG_POWER_RESET_VEXPRESS
  ARM: vexpress: Move vexpress_flags_set() into arch code

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-15 23:04:40 +02:00
David S. Miller da07f52d3c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Move the bpf verifier trace check into the new switch statement in
HEAD.

Resolve the overlapping changes in hinic, where bug fixes overlap
the addition of VF support.

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-15 13:48:59 -07:00
Linus Torvalds f85c1598dd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller:

 1) Fix sk_psock reference count leak on receive, from Xiyu Yang.

 2) CONFIG_HNS should be invisible, from Geert Uytterhoeven.

 3) Don't allow locking route MTUs in ipv6, RFCs actually forbid this,
    from Maciej Żenczykowski.

 4) ipv4 route redirect backoff wasn't actually enforced, from Paolo
    Abeni.

 5) Fix netprio cgroup v2 leak, from Zefan Li.

 6) Fix infinite loop on rmmod in conntrack, from Florian Westphal.

 7) Fix tcp SO_RCVLOWAT hangs, from Eric Dumazet.

 8) Various bpf probe handling fixes, from Daniel Borkmann.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (68 commits)
  selftests: mptcp: pm: rm the right tmp file
  dpaa2-eth: properly handle buffer size restrictions
  bpf: Restrict bpf_trace_printk()'s %s usage and add %pks, %pus specifier
  bpf: Add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range
  bpf: Restrict bpf_probe_read{, str}() only to archs where they work
  MAINTAINERS: Mark networking drivers as Maintained.
  ipmr: Add lockdep expression to ipmr_for_each_table macro
  ipmr: Fix RCU list debugging warning
  drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c
  net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810
  tcp: fix error recovery in tcp_zerocopy_receive()
  MAINTAINERS: Add Jakub to networking drivers.
  MAINTAINERS: another add of Karsten Graul for S390 networking
  drivers: ipa: fix typos for ipa_smp2p structure doc
  pppoe: only process PADT targeted at local interfaces
  selftests/bpf: Enforce returning 0 for fentry/fexit programs
  bpf: Enforce returning 0 for fentry/fexit progs
  net: stmmac: fix num_por initialization
  security: Fix the default value of secid_to_secctx hook
  libbpf: Fix register naming in PT_REGS s390 macros
  ...
2020-05-15 13:10:06 -07:00
Dinh Nguyen fa4aa8a530 arm64: defconfig: Add LEDS_TRIGGER_TIMER
Add support for LEDS_TRIGGER_TIMER.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2020-05-15 14:19:02 -05:00
Sharat Masetty 39f3d3bb05 arm64: dts: qcom: sc7180: Add A618 gpu dt blob
This patch adds the required dt nodes and properties
to enabled A618 GPU.

Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Link: https://lore.kernel.org/r/1588329036-18732-1-git-send-email-smasetty@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-15 12:03:49 -07:00
Linus Torvalds 01d8a74803 Fix flush_icache_range() second argument in machine_kexec() to be an
address rather than size.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAl6+z98ACgkQa9axLQDI
 XvFKOA//VFEAWOrCWS65DUn4TuonMG+foUp82zxaFZWK1epGCZoIEJQrSG6g5Png
 phL6Gx2oniqj+taLYZWqckMe+7k/yn9Xq+0DwDliMjaY9NB9bldE9J9ZGxpa4jBI
 qIrdaTgtRip1LQvm5BczmANGf86/p9E4nC6qHBJf9Stn9SYxoQuZlOGiwaK8XTe2
 QGn+NQ69ln7TkfUwEixhGI39dOHasrDAGgcUp/pTn2ki8mtpE2lG8+qSxxGTGTIT
 1SaJftER8JSc3VKjXKhOIaSwx1MqwTx0Cx4dTfAGhKzcQLdmXz0GDJjQCzU0weOP
 yHyH1gbJYUmB5X+CSA2OKssxsxcckVNMvTm7Jnn3Pb0f9oHVZQV4UR8cE/G40/hh
 c6OHAJXfmGla5GhNpRUXB5SGJyWDxaIrdZRXbDPCWGOqWxwIJyFWNz5h4kiVsyAe
 OJBtgzCqw3oUkr7KXgz0EECWV+T22+Y5cBbolptpqm7m6JbDQf/iviVJV5tkXnLF
 vkbZEx94Ajy4U4TZkQBWlJFN8M4Z+ttYuGYxebnurNI2Ottb0czGFypx+WXdGItp
 9rBaklIfzsCPoXZH0iHtaRxbDl4avwS46yKndtb2Y6tGoqqSNW4A6rf+S3YxvqBN
 bEBxMqxCuMxPWNPBb3bXpw4QlFo4LLkWQeAvbc59SROep35cPTo=
 =BoxO
 -----END PGP SIGNATURE-----

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

Pull arm64 fix from Catalin Marinas:
 "Fix flush_icache_range() second argument in machine_kexec() to be an
  address rather than size"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: fix the flush_icache_range arguments in machine_kexec
2020-05-15 11:08:46 -07:00
David Matlack cb953129bf kvm: add halt-polling cpu usage stats
Two new stats for exposing halt-polling cpu usage:
halt_poll_success_ns
halt_poll_fail_ns

Thus sum of these 2 stats is the total cpu time spent polling. "success"
means the VCPU polled until a virtual interrupt was delivered. "fail"
means the VCPU had to schedule out (either because the maximum poll time
was reached or it needed to yield the CPU).

To avoid touching every arch's kvm_vcpu_stat struct, only update and
export halt-polling cpu usage stats if we're on x86.

Exporting cpu usage as a u64 and in nanoseconds means we will overflow at
~500 years, which seems reasonably large.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Jon Cargille <jcargill@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>

Message-Id: <20200508182240.68440-1-jcargill@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-05-15 12:26:26 -04:00
Sami Tolvanen 439dc2a117 arm64: scs: Add shadow stacks for SDEI
This change adds per-CPU shadow call stacks for the SDEI handler.
Similarly to how the kernel stacks are handled, we add separate shadow
stacks for normal and critical events.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen 5287569a79 arm64: Implement Shadow Call Stack
This change implements shadow stack switching, initial SCS set-up,
and interrupt shadow stacks for arm64.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen 9654736891 arm64: Disable SCS for hypervisor code
Disable SCS for code that runs at a different exception level by
adding __noscs to __hyp_text.

Suggested-by: James Morse <james.morse@arm.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen cde5dec89e arm64: vdso: Disable Shadow Call Stack
Shadow stacks are only available in the kernel, so disable SCS
instrumentation for the vDSO.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen e73f02c6eb arm64: efi: Restore register x18 if it was corrupted
If we detect a corrupted x18, restore the register before jumping back
to potentially SCS instrumented code. This is safe, because the wrapper
is called with preemption disabled and a separate shadow stack is used
for interrupt handling.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen 6d37d81f44 arm64: Preserve register x18 when CPU is suspended
Don't lose the current task's shadow stack when the CPU is suspended.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:50 +01:00
Sami Tolvanen da64e9d1f8 arm64: Reserve register x18 from general allocation with SCS
Reserve the x18 register from general allocation when SCS is enabled,
because the compiler uses the register to store the current task's
shadow stack pointer. Note that all external kernel modules must also be
compiled with -ffixed-x18 if the kernel has SCS enabled.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-15 16:35:49 +01:00
Michael Kao 26af2884e4 arm64: dts: mt8173: fix cooling device range
When thermal reaches target temperature,it would be pinned to state 0
(max frequency and power).
Fix the throttling range to no limit.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Michael Kao <michael.kao@mediatek.com>
Link: https://lore.kernel.org/r/20200424082340.4127-1-michael.kao@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-15 17:32:24 +02:00
Hsin-Yi Wang 3b1f6c5e4d arm64: dts: mt8173: fix vcodec-enc clock
Fix the assigned-clock-parents to higher frequency clock to avoid h264
encode timeout:

[  134.763465] mtk_vpu 10020000.vpu: vpu ipi 4 ack time out !
[  134.769008] [MTK_VCODEC][ERROR][18]: vpu_enc_send_msg() vpu_ipi_send msg_id c002 len 32 fail -5
[  134.777707] [MTK_VCODEC][ERROR][18]: vpu_enc_encode() AP_IPIMSG_ENC_ENCODE 0 fail

venc_sel is the clock used by h264 encoder, and venclt_sel is the clock
used by vp8 encoder. Assign venc_sel to vcodecpll_ck and venclt_sel to
vcodecpll_370p5.

    vcodecpll                         1482000000
       vcodecpll_ck                    494000000
          venc_sel                     494000000
...
       vcodecpll_370p5                 370500000
          venclt_sel                   370500000

Fixes: fbbad0287c ("arm64: dts: Using standard CCF interface to set vcodec clk")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Link: https://lore.kernel.org/r/20200504124442.208004-1-hsinyi@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-05-15 17:27:38 +02:00
Daniel Borkmann 0ebeea8ca8 bpf: Restrict bpf_probe_read{, str}() only to archs where they work
Given the legacy bpf_probe_read{,str}() BPF helpers are broken on archs
with overlapping address ranges, we should really take the next step to
disable them from BPF use there.

To generally fix the situation, we've recently added new helper variants
bpf_probe_read_{user,kernel}() and bpf_probe_read_{user,kernel}_str().
For details on them, see 6ae08ae3de ("bpf: Add probe_read_{user, kernel}
and probe_read_{user,kernel}_str helpers").

Given bpf_probe_read{,str}() have been around for ~5 years by now, there
are plenty of users at least on x86 still relying on them today, so we
cannot remove them entirely w/o breaking the BPF tracing ecosystem.

However, their use should be restricted to archs with non-overlapping
address ranges where they are working in their current form. Therefore,
move this behind a CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE and
have x86, arm64, arm select it (other archs supporting it can follow-up
on it as well).

For the remaining archs, they can workaround easily by relying on the
feature probe from bpftool which spills out defines that can be used out
of BPF C code to implement the drop-in replacement for old/new kernels
via: bpftool feature probe macro

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/bpf/20200515101118.6508-2-daniel@iogearbox.net
2020-05-15 08:10:36 -07:00
Greg Kroah-Hartman f877a18c08 FPGA Manager changes for 5.8
Here's the first set of changes for the 5.8-rc1 merge window.
 
 Dominic's change adds support for accessing AFU regions with gdb.
 Gustavo's change is a cleanup patch regarding variable lenght arrays.
 Richard's changes update dt-bindings and add support for stratix and agilex.
 Sergiu's changes update spi transfers with the new delay field.
 Xu's change addresses an issue with a wrong return value.
 Shubhrajyoti's change makes the Zynq FPGA driver return -EPROBE_DEFER on
 check of devm_clk_get failure.
 Xu's change for DFL enables multiple opens.
 
 All of these patches have been reviewed, have appropriate Acked-by's and
 have been in the last few linux-next releases without issues.
 
 Signed-off-by: Moritz Fischer <mdf@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iIUEABYIAC0WIQS/ea/a56fFi9QbQeJ+E8eWOj6VqQUCXrbxaw8cbWRmQGtlcm5l
 bC5vcmcACgkQfhPHljo+lamnQAD/dQa0AzlcPyIbo6pcufwyeZPgjKEunXiCd0vc
 nb1caZEBAMV69oNK441+vYy911LuY6x/hdz0Ch4E4NQK0zjUrAcM
 =LWCH
 -----END PGP SIGNATURE-----

Merge tag 'fpga-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next

Moritz writes:

FPGA Manager changes for 5.8

Here's the first set of changes for the 5.8-rc1 merge window.

Dominic's change adds support for accessing AFU regions with gdb.
Gustavo's change is a cleanup patch regarding variable lenght arrays.
Richard's changes update dt-bindings and add support for stratix and agilex.
Sergiu's changes update spi transfers with the new delay field.
Xu's change addresses an issue with a wrong return value.
Shubhrajyoti's change makes the Zynq FPGA driver return -EPROBE_DEFER on
check of devm_clk_get failure.
Xu's change for DFL enables multiple opens.

All of these patches have been reviewed, have appropriate Acked-by's and
have been in the last few linux-next releases without issues.

Signed-off-by: Moritz Fischer <mdf@kernel.org>

* tag 'fpga-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga:
  fpga: dfl: afu: support debug access to memory-mapped afu regions
  fpga: dfl.h: Replace zero-length array with flexible-array member
  arm64: dts: agilex: correct service layer driver's compatible value
  dt-bindings, firmware: add compatible value Intel Stratix10 service layer binding
  fpga: stratix10-soc: add compatible property value for intel agilex
  arm64: dts: agilex: correct FPGA manager driver's compatible value
  dt-bindings: fpga: add compatible value to Stratix10 SoC FPGA manager binding
  fpga: machxo2-spi: Use new structure for SPI transfer delays
  fpga: ice40-spi: Use new structure for SPI transfer delays
  fpga: dfl: support multiple opens on feature device node.
2020-05-15 16:09:24 +02:00
Ricardo Cañuelo 72676ecfe1 arm64: dts: renesas: Make hdmi encoder nodes compliant with DT bindings
Small fixes to make these DTs compliant with the adi,adv7511w binding.

  r8a77970-eagle.dts,
  r8a77970-v3msk.dts,
  r8a77980-condor.dts,
  r8a77980-v3hsk.dts,
  r8a77990-ebisu.dts:
    Remove the adi,input-style and adi,input-justification properties.

  r8a77995-draak.dts:
    Reorder the I2C slave addresses of the hdmi-encoder@39 node and
    remove the adi,input-style and adi,input-justification properties.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20200511110611.3142-2-ricardo.canuelo@collabora.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2020-05-15 10:41:35 +02:00
Maxime Ripard b3a0a2f910
arm64: dts: allwinner: h6: Add IOMMU
Now that we have a driver for the IOMMU, let's start using it.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-05-15 09:35:39 +02:00
Zhou Wang 528443e32a arm64: defconfig: Enable UACCE/PCI PASID/SEC2/HPRE configs
Enable configs for UACCE, PCI PASID, HiSilicon SEC2 and HPRE drivers.

Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2020-05-15 09:29:47 +08:00
Bjorn Andersson 3f65d51e9e arm64: dts: qcom: msm8996: Make GPU node control GPU_GX GDSC
Presumably the GPU node needs to control both the GPU and GPU GX power
domains, but given that GPU GX now depends on the GPU GDSC both can
effectively be controlled by controlling GPU GX. So use this instead.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200417070044.1376212-5-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 17:09:53 -07:00
Rajendra Nayak 2317b87a2a arm64: dts: qcom: db820c: Add vdd_gfx and tie it into mmcc
Add the SPMI regulator node in the PMI8994, use it to give us VDD_GX
at a fixed max nominal voltage for the db820c and specify this as supply
for the MMSS GPU_GX GDSC.

With the introduction of CPR support the range for VDD_GX should be
expanded.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Link: https://lore.kernel.org/r/20200417070044.1376212-4-bjorn.andersson@linaro.org
[bjorn: Split between pmi8994 and db820c, changed voltage, rewrote commit message]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 17:09:41 -07:00
Stephan Gerhold 756d534b3e arm64: dts: qcom: apq8016-sbc: merge -pins.dtsi into main .dtsi
apq8016-sbc.dtsi is the only remaining device which takes up
4 files since it has its pinctrl split into separate files.

Actually this does not really make the device tree easier to read
(just harder to find nodes). For db820c the files were merged in
commit 88264f1f6b ("arm64: dts: qcom: db820c: Remove pin specific files").

Do the same for apq8016-sbc (db410c) and move the pinctrl definitions
into apq8016-sbc.dtsi.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200514112754.148919-3-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:29:34 -07:00
Stephan Gerhold 38a4d932f7 arm64: dts: qcom: msm8916: move gpu opp table to gpu node
In msm8916.dtsi the GPU OPP table is defined under the root node,
whereas in msm8996.dtsi/sdm845.dtsi it is a subnode of the gpu device
(which makes it easier to find).

Move it to the gpu device node to make this consistent.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200514112754.148919-2-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:29:31 -07:00
Stephan Gerhold e6717dbaef arm64: dts: qcom: msm8916: avoid using _ in node names
Many nodes in the MSM8916 device trees use '_' in node names
(especially pinctrl), even though (seemingly) '-' is preferred now.
Make this more consistent by replacing '_' with '-' where possible.

Similar naming is used for pinctrl in newer device trees (e.g. sdm845.dtsi).

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200514112754.148919-1-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:29:16 -07:00
Bjorn Andersson ece74ab227 arm64: defconfig: Enable Qualcomm SC7180 pinctrl and gcc
Enable the Qualcomm SC7180 pinctrl and gcc driver, in order to allow the
kernel to boot to console.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200116045457.2489704-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:28:28 -07:00
Bjorn Andersson 2536bedec6 arm64: dts: qcom: c630: Specify UFS device reset
On some device the reset line for the UFS memory needs to be tickled in
order for UFS to initialize properly, add this to the ufs_mem_hc node.

Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200406060049.227029-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:26:42 -07:00
Bjorn Andersson 3fb298d0b2 arm64: dts: qcom: c630: Add WiFi node
Specify regulators and enable the &wifi node. The firmware uses the 8
bit version of the host capability message, so specify this quirk.

Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191018055841.3729591-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:26:24 -07:00
Michael Srba 4b20d4705a arm64: dts: qcom: msm8916-samsung-a3u: add nodes for display panel
This patch wires up display support on Samsung Galaxy A3 2015.

Signed-off-by: Michael Srba <michael.srba@seznam.cz>

Link: https://lore.kernel.org/r/20200514170129.10902-1-michael.srba@seznam.cz
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 10:11:39 -07:00
Miklos Szeredi c8ffd8bcdd vfs: add faccessat2 syscall
POSIX defines faccessat() as having a fourth "flags" argument, while the
linux syscall doesn't have it.  Glibc tries to emulate AT_EACCESS and
AT_SYMLINK_NOFOLLOW, but AT_EACCESS emulation is broken.

Add a new faccessat(2) syscall with the added flags argument and implement
both flags.

The value of AT_EACCESS is defined in glibc headers to be the same as
AT_REMOVEDIR.  Use this value for the kernel interface as well, together
with the explanatory comment.

Also add AT_EMPTY_PATH support, which is not documented by POSIX, but can
be useful and is trivial to implement.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-05-14 16:44:25 +02:00
Bjorn Andersson 1cacdf5d3b arm64: dts: qcom: db820c: Fix invalid pm8994 supplies
It's uncertain where the "vreg_s8a_l3a_input" comes from, but the supply
for VDD_L3_L11 on PM8994 should be VREG_S3A_1P3, so correct this - and
drop the vreg_s8a_l3a_input.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Fixes: 83d9ed4342 ("arm64: dts: qcom: db820c: Use regulator names from schematics")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200417070712.1376355-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 06:47:32 -07:00
Bjorn Andersson 14a9f4c6ab arm64: dts: qcom: db820c: Add pmi8994 RPM regulators
The PMI8994 provides 3 SPMS regulators and one boost/bypass regulator.
Define s1 and the boot/bypass and update pm8994 to appropriately
describe the supply from PMI8994.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200417070303.1376290-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14 06:47:24 -07:00
Max Krummenacher 39572dd33b arm64: defconfig: add MEDIA_PLATFORM_SUPPORT
Commit 06b93644f4 ("media: Kconfig: add an option to filter in/out
platform drivers") adds a new Kconfig symbol which now hides drivers
currently enabled in the arm64 defconfig. Enable it to get those
drivers back.

Link: https://lore.kernel.org/r/20200427134003.45188-5-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:38 +02:00
Max Krummenacher c226669674 arm64: defconfig: ARCH_R8A7795: follow changed config symbol name
Completes commit b925adfceb ("soc: renesas: Add ARCH_R8A7795[01] for
existing R-Car H3") and commit 361c5dbb44 ("arm64: dts: renesas:
Remove use of ARCH_R8A7795").

CONFIG_ARCH_R8A7795 was split in CONFIG_ARCH_R8A77950 and
CONFIG_ARCH_R8A77951.

Link: https://lore.kernel.org/r/20200427134003.45188-4-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:24 +02:00
Max Krummenacher 50045c730d arm64: defconfig: add DRM_DISPLAY_CONNECTOR
Add DRM_DISPLAY_CONNECTOR. This got introduced with the bridge rework
Which renamed among others DRM_DUMB_VGA_DAC.

Link: https://lore.kernel.org/r/20200427134003.45188-3-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:07 +02:00
Max Krummenacher 5f450f6713 arm64: defconfig: DRM_DUMB_VGA_DAC: follow changed config symbol name
This occurrence wasn't changed in the original rename commit.

Fixes commit 0411374bdf ("drm/bridge: dumb-vga-dac: Rename driver to
simple-bridge").

Link: https://lore.kernel.org/r/20200427134003.45188-2-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:13:49 +02:00
Arnd Bergmann 43f3b777a6 arm64: dts: fixes for v5.7-rc
Misc arm64 DT-only fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl618H0ACgkQWTcYmtP7
 xmVJ3Q/+MpOYMznZERRxosRf5VAI+jqO9QX2gLGM/sVnlt/OPm16Py58pUjZC3/o
 liGtCKiLW7wCYb25+kKFvs4en8MoSane/OpNoxJSnh8kvhDflKQwAUd5PES1LhSH
 dvmj737fBjvyof+tVoGoV2E1+mfef32iCIEenhtqW93nHRMtCQF+fCKMk8W5O4zT
 JJGc9UHxiqa37APiZpenaKBTbntb4TvqURJnRgB8xiWF8LRMXpbRIL4XnddzrzbM
 cQWn4/FR/iBPMNtFHo17rlr+mXfJUMiXxZk/PiLy3YRkFCHo6qwaLCg3fBHZFDe5
 qT1rAgUXJkfBPms7YfjYCe1tnGSQgvR/XBrb2lTE2/b+PxQQlQJRGHJuwxres7O4
 O1PCYvSFsQPFD9oVzBtGk+AtagfXEa/7uUtuf25Qwb2WGJ46ShY4zvKehSSqvmrK
 pS9WQrJPya3EaQfMDeRQTl28jIgxIZRcQ2OcfKvrZsROfV8CHCUl/9emmaXB1kzL
 T1+VRsyJX89CPBwVTAj79GcI+Zag6TRE4hrKz4ubd1rxFa+4iO2ctgLO9FRHEeZO
 bV3TF8UOhes0fWT7qNWGcZeqErXjp2We3HJz3eS6hmZx3EA3eK2WefHmR0/mGKQo
 F7fC7E2KqCbalklsMPmvpE+PP7+6fUGYgpLMAagB59hcFoNpgjY=
 =KRNA
 -----END PGP SIGNATURE-----

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

arm64: dts: fixes for v5.7-rc

Misc arm64 DT-only fixes

* tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-g12: remove spurious blank line
  arm64: dts: meson-g12b-khadas-vim3: add missing frddr_a status property
  arm64: dts: meson-g12-common: fix dwc2 clock names
  arm64: dts: meson-g12b-ugoos-am6: fix usb vbus-supply

Link: https://lore.kernel.org/r/7hmu6iyoc5.fsf@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:07:36 +02:00
Arnd Bergmann 3b3e88e067 Some fixes for the newly added Pinebook Pro and other fixes to
make dtc and the new dtscheck against yaml bindings happy.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl6yA9QQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgeX0CACEwXPa8ChfXg+N4846D/wcwkpMVQqnTbMR
 WrnqVLUNHf71h7Yej/aXpBSgEq5er1Q/HVgbjvkAAYNw633MNWgaNMi9AFl03gTF
 uSOSUoiwauUUlvWt2aZ44IHxHS/WC0FB9/wIROpnD0SJvmYX9MJF8AVITNDsTDGv
 EsSswwAXiBxILDWWdBM2QgAZxEhan3MwBbHQrmPRePDAWylluT3tMGjEfLgIapcW
 9w44tw0kR8g7Zwgq+MYcfyHoNhUXOr1iMlCCA0LWOOtNBJAbXKM4XDp4cWwHLiI3
 nktZSWXN7B08dx4hi/++18izC6N/ZwoGycMN4wG9kvdaRnpwh3KN
 =vkl2
 -----END PGP SIGNATURE-----

Merge tag 'v5.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

Some fixes for the newly added Pinebook Pro and other fixes to
make dtc and the new dtscheck against yaml bindings happy.

* tag 'v5.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
  arm64: dts: rockchip: Fix Pinebook Pro FUSB302 interrupt
  ARM: dts: rockchip: swap clock-names of gpu nodes
  arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node
  arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts
  arm64: dts: rockchip: remove extra assigned-clocks property from &gmac2phy node in rk3328-evb.dts
  ARM: dts: rockchip: fix phy nodename for rk3229-xms6
  ARM: dts: rockchip: fix phy nodename for rk3228-evb
  arm64: dts: rockchip: Rename dwc3 device nodes on rk3399 to make dtc happy
  arm64: dts: rockchip: drop #address-cells, #size-cells from rk3399 pmugrf node
  arm64: dts: rockchip: drop #address-cells, #size-cells from rk3328 grf node
  arm64: dts: rockchip: drop non-existent gmac2phy pinmux options from rk3328
  arm64: dts: rockchip: Replace RK805 PMIC node name with "pmic" on rk3328 boards
  arm64: dts: rockchip: enable DC charger detection pullup on Pinebook Pro
  arm64: dts: rockchip: fix inverted headphone detection on Pinebook Pro
  arm64: dts: rockchip: Correct PMU compatibles for PX30 and RK3308

Link: https://lore.kernel.org/r/1738941.6LdaBJIBqS@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:02:56 +02:00
Arnd Bergmann 6d9ac5160d arm64: tegra: Default configuration fixes
This contains a single fix to reenable the Tegra194 PCIe host support by
 default that was inadvertently dropped as a result of the host/endpoint
 mode support that was added in v5.7-rc1.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl6qrkUTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoRoREACiEsfrfBcCltBdxNcSpguKj4OBwDny
 sAgl+hVivPe2n2EJzo7/35R63OEIaHczsqUnIyrpunYXEIiSuBQMkjkXPPfTQX/Y
 sL5kf9niYe2ZlXvrHxo/dgzpuwginrv79dOodYV0+ptVVUkMmC3/bttCRsDIGNJL
 +0pnFRxI4jiHMuhonEHFDJjqYk0D731FzmrpsP8b52w+s859nGY1zrP7FaGVl1/G
 cnt6ue7WpqT5f8rFHpcrkqkjM66luDRkDcDlJV46/nPBoDbbh4sUM9yK87BV4M3W
 0rIa1+qGi3+lTZdB+M9B59LRn6f3k2jhjZfjM+YDWO2085VPXMH3dImc6nHOhgzm
 ck+a8OtB9Y33k7XvbAVCxLjByGlqdZ9jPJKrhfpe40qZZev4+XMTbiwYBQIqD2fK
 LXHZlMl6kliYCXS3B0hchayRfr/jnBw5gibwNmOuYxFoUigW0n1VBB7bX7uMqdOz
 W2mZHu2ekXfhEmfukI6iDvlMR1OPGMSuNIKo/eDOLGNnMTb+n3L0mQ8Ac+U8oDIT
 Ppd7vtdkk+7l6+0DlMNh98PQOa04H3LDgvsqlsdwj3r8uKPeiD6YA3zCqRppm4nr
 Qre3aRWyvBPpNGo5RuAQe+i10zTcfPK/DN9+Nt1DgJxXVYm3GJEWSMM64z/Vpme5
 3A4E0Ms0CX/Shg==
 =DB0J
 -----END PGP SIGNATURE-----

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

arm64: tegra: Default configuration fixes

This contains a single fix to reenable the Tegra194 PCIe host support by
default that was inadvertently dropped as a result of the host/endpoint
mode support that was added in v5.7-rc1.

* tag 'tegra-for-5.7-arm64-defconfig-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Re-enable Tegra PCIe host driver

Link: https://lore.kernel.org/r/20200430105700.167199-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:01:44 +02:00
Arnd Bergmann 5258bba832 Renesas fixes for v5.7
- Fix IOMMU support on R-Car V3H,
   - Minor fixes that are fast-tracked to avoid introducing regressions
     during conversion of DT bindings to json-schema.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXqqEEQAKCRCKwlD9ZEnx
 cK6VAQDEYT5s4bzgLANPkTuvz3n5NgmS1nSC9tGrUX9co4OEUgD+OkwEnFJgLF1+
 LbwisW1fNfCz1looPeyyZTl9Q8o5Yg0=
 =cIRT
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes

Renesas fixes for v5.7

  - Fix IOMMU support on R-Car V3H,
  - Minor fixes that are fast-tracked to avoid introducing regressions
    during conversion of DT bindings to json-schema.

* tag 'renesas-fixes-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: dts: r7s9210: Remove bogus clock-names from OSTM nodes
  arm64: dts: renesas: r8a77980: Fix IPMMU VIP[01] nodes
  ARM: dts: r8a73a4: Add missing CMT1 interrupts

Link: https://lore.kernel.org/r/20200430084834.1384-1-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:01:07 +02:00
Arnd Bergmann 896e18f4dc i.MX fixes for 5.7:
- Set correct AHB clock for i.MX8MN SDMA1 device to fix a "Timeout
    waiting for CH0" error.
  - Fix a linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n,
    which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW
    are selected.
  - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board.
  - Fix i.MX8M  AIPS 'reg' properties to remove DTC simple_bus_reg
    warnings.
  - Add missing compatible "fsl,vf610-edma" for LS1028A EDMA device, so
    that bootloader can fix up the IOMMU entries there.  Otherwise, EDMA
    just doesn't work on LS1028A with shipped bootloader.
  - Fix imx6dl-yapp4-ursa board Ethernet connection.
  - Fix input_val for AUDIOMIX_BIT_STREAM pinctrl defines on i.MX8MP
    according to Reference Manual.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl6pHtIUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM69sAgAp/H4BASI7SAbrjYsFjCP+ymPVgeS
 Y9oeLm09Q2XEF6GiRhK4SDqN56BOUelRI6nqWx3k6sU5A7SuZMqGSaZZEhCtHhjl
 iixyxSccxh4prUWSEDQPHyIJ6yjBt+QkKhycOVLwq7FFLdlrSaRuameNQAkjEU4a
 YPSL0oBd1xNbz75RaqgmyI0lzOuQg1P+GMQqmVOYfrucK94bq62FMSezyEBQxKU+
 0MVG/hEkeLtxFgzE6OpkBs1p1m+KgXE7qvV0W84VyZOKgri1qJ74V1Pl/RJNNVA0
 p46c3PH66OATAU7+pbshC0x/hsN8ZVAoBhPit5oLF7ugDNpi377jT/zRrw==
 =z3sI
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 5.7:

 - Set correct AHB clock for i.MX8MN SDMA1 device to fix a "Timeout
   waiting for CH0" error.
 - Fix a linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n,
   which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW
   are selected.
 - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board.
 - Fix i.MX8M  AIPS 'reg' properties to remove DTC simple_bus_reg
   warnings.
 - Add missing compatible "fsl,vf610-edma" for LS1028A EDMA device, so
   that bootloader can fix up the IOMMU entries there.  Otherwise, EDMA
   just doesn't work on LS1028A with shipped bootloader.
 - Fix imx6dl-yapp4-ursa board Ethernet connection.
 - Fix input_val for AUDIOMIX_BIT_STREAM pinctrl defines on i.MX8MP
   according to Reference Manual.

* tag 'imx-fixes-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: freescale: imx8mp: update input_val for AUDIOMIX_BIT_STREAM
  arm64: dts: imx8m: Fix AIPS reg properties
  arm64: dts: imx8mn: Change SDMA1 ahb clock for imx8mn
  ARM: dts: imx27-phytec-phycard-s-rdk: Fix the I2C1 pinctrl entries
  ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
  ARM: dts: imx6dl-yapp4: Fix Ursa board Ethernet connection
  arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
  dt-bindings: dma: fsl-edma: fix ls1028a-edma compatible

Link: https://lore.kernel.org/r/20200429063226.GT32592@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:00:07 +02:00
Arnd Bergmann b130b0ad8a Qualcomm ARM64 DT fixes for v5.7
This reduces the (hard coded) CPU voltage to a safe level on MSM8996 and
 updates the audio nodes on db820c, db845c and c630 to reflect audio
 changes that landed late in the cycle.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl6pECQbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F9roQAKFCXXBcH3bnAUuBawpS
 vmHz2d22tEYfGRgjc5IDed/ix0eC8dAErNulSzN3UUhfAnEPZoe4X35Ij2USm3Ra
 4vvs4/Krzjw2ndYwgM22EtIvj4h95MfKvQz2SdJbZyFH+ITZId6sUfqcooGV2XZy
 MABVysd8tvK7v18QsawvkA+XZrEzL3jgw2W32kz2NSR5eI++98TPvArif0MsPAoa
 aHyGMBRvmTBXd6naDjkGQOsKCXzX7Uaw4a+XgaOMn/mH0489nYaRicRD4uYbi4uR
 toEbZsyPaVXYYSxqLbCIDPxDclHyvJuWA1nHrEtj3IdacFXrp/9VsmM6l4ckBdcN
 2u+8X6LIjySvJtmbUptz/6zufl9A7Vti0UY0VgdDUtOb0wkohivhOFmXcseLUuUH
 t9LGwvYidKVFqmyL0VUVFWOSoUgA1L9jcnIoiP3Was+WjYo3DYCgabnZaZgL3bhS
 XGM88s3u/HzkkbkhCQu5MtnuU2KXtEoxX7bcJCKH/UnFzH/wlkfP9ZJ2RZa2/4yY
 lYQdjvUpzYU9OBb6GZGEuspCWYdLCJFINLhJcQw0fN1d7Er0XzZXoMR7FEaCa3g7
 THonwbIw6c1MaTsLXOYpFJVvIBw2/RBP5mBGvvfP2XcCHv248nrIZ1qUoGfHxqns
 RCkV1UPEUfpR0KGUK8o8y3xn
 =AD+5
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm ARM64 DT fixes for v5.7

This reduces the (hard coded) CPU voltage to a safe level on MSM8996 and
updates the audio nodes on db820c, db845c and c630 to reflect audio
changes that landed late in the cycle.

* tag 'qcom-arm64-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: db820c: fix audio configuration
  arm64: dts: qcom: db845c: fix asm dai setup
  arm64: qcom: c630: fix asm dai setup
  arm64: dts: qcom: msm8996: Reduce vdd_apc voltage

Link: https://lore.kernel.org/r/20200429052932.GA2627045@builder.lan
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-13 23:59:58 +02:00
Michael Srba b3d6fd8f25 arm64: dts: qcom: msm8916: Disable coresight by default
On some msm8916 devices, attempts at initializing coresight cause the boot to
fail. This was fixed by disabling the coresight-related nodes in the board dts
files. However, a cleaner approach was chosen for fixing the same issue on
msm8998: disabling coresight by default, and enabling it in board dts files
where desired.

This patch implements the same solution for msm8916, removes now redundant
overwrites in board specific dts files and and enables coresight in db410c's
board dts in order to keep the current behavior.

Fixes: b1fcc5702a ("arm64: dts: qcom: msm8916: Add CTI options")
Signed-off-by: Michael Srba <michael.srba@seznam.cz>

Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lore.kernel.org/r/20200513184735.30104-1-michael.srba@seznam.cz
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-13 14:21:14 -07:00
Paolo Bonzini 4aef2ec902 Merge branch 'kvm-amd-fixes' into HEAD 2020-05-13 12:14:05 -04:00
Clément Péron 5961bdf2df
arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
Enable CPU opp tables for Tanix TX6.

Also add the fixed regulator that provided vdd-cpu-gpu required for
CPU opp tables.

This voltage has been found using a voltmeter and could be wrong.

Tested-by: Jernej Škrabec <jernej.skrabec@gmail.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-05-13 16:20:02 +02:00
Clément Péron c83e24e7bf
arm64: dts: allwinner: h6: add voltage range to OPP table
Some boards have a fixed regulator and can't reach the voltage set
by the OPP table.

Add a range where the minimal voltage is the target and the maximal
voltage is 1.2V.

Suggested-by: Ondřej Jirman <megous@megous.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-05-13 16:19:59 +02:00
Nagarjuna Kristam bc8788b2f3 arm64: tegra: Add XUDC node on Tegra194
Tegra194 has one XUSB device mode controller which can be operated in HS
and SS modes. Add a DT node for this XUSB device mode controller.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-13 12:59:42 +02:00
Rob Herring d3cd7d02e7 arm64: tegra: Kill off "simple-panel" compatibles
"simple-panel" is a Linux driver and has never been an accepted upstream
compatible string, so remove it.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-05-13 12:59:40 +02:00
Fabio Estevam e98ad55989 arm64: dts: imx8qxp-mek: Do not use underscore in node name
Underscores are not recommended to be used in node names, so change
the pinctrl IO expander node name.

This change also makes the pinctrl node names to follow the convention
used by other pinctrl group names.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-13 16:56:45 +08:00
Douglas Anderson 9fc18435d2 arm64: dts: qcom: sc7180: Add "no-map" to cmd_db reserved area
The example in the bindings and all the current users (except sc7180)
have "no-map".  I'm pretty sure we need it on sc7180 too.  Add it.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Fixes: e0abc5eb52 ("arm64: dts: qcom: sc7180: Add cmd_db reserved area")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200424085121.1.I9d1e84d30f488cdb5a957f582abaecd2c0b24d70@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 12:22:40 -07:00
Stephan Gerhold a4c2951274 arm64: dts: qcom: msm8916-samsung-a5u: Add touchscreen
A5U uses a Melfas MMS345L touchscreen that is connected to
blsp_i2c5. Add it to the device tree.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200426140642.204395-5-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 11:24:01 -07:00
Stephan Gerhold 16fb3e4226 arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator
A3U and A5U both use an extra touchscreen LDO regulator
that provides 3.3V for the touch screen controller.

Add it as fixed regulator to the common include.

Cc: Michael Srba <Michael.Srba@seznam.cz>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200426140642.204395-4-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 11:23:08 -07:00
Stephan Gerhold 246d19d2c2 arm64: dts: qcom: msm8916: Add blsp_i2c5
MSM8916 has another I2C QUP controller that can be enabled on
GPIO 18 and 19.

Add blsp_i2c5 to msm8916.dtsi and disable it by default.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200426140642.204395-3-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 11:22:10 -07:00
Stephan Gerhold 428384b535 arm64: dts: qcom: msm8916: Add blsp_i2c1
MSM8916 has another I2C QUP controller that can be enabled on
GPIO 2 and 3.

Add blsp_i2c1 to msm8916.dtsi and disable it by default.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200426140642.204395-2-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 11:22:08 -07:00
Sai Prakash Ranjan 0f1decaa83 arm64: dts: qcom: sc7180: Support ETMv4 power management
Now that deep idle states are properly supported on SC7180,
we need to add "coresight-loses-context-with-cpu" property
to avoid failure of trace session because of losing context
on entering deep idle states.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Link: https://lore.kernel.org/r/20200424111644.27970-1-saiprakash.ranjan@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12 11:10:08 -07:00
Mark Brown e4e9f6dfee arm64: bti: Fix support for userspace only BTI
When setting PTE_MAYBE_GP we check system_supports_bti() but this is
true for systems where only CONFIG_BTI is set causing us to enable BTI
on some kernel text. Add an extra check for the kernel mode option,
using an ifdef due to line length.

Fixes: c8027285e3 ("arm64: Set GP bit in kernel page tables to enable BTI for the kernel")
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200512113950.29996-1-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-12 18:45:17 +01:00
Geert Uytterhoeven 357dd8a2af arm64: cpufeature: Add "or" to mitigations for multiple errata
Several actions are not mitigations for a single erratum, but for
multiple errata.  However, printing a line like

    CPU features: detected: ARM errata 1165522, 1530923

may give the false impression that all three listed errata have been
detected.  This can confuse the user, who may think his Cortex-A55 is
suddenly affected by a Cortex-A76 erratum.

Add "or" to all descriptions for mitigations for multiple errata, to
make it clear that only one or more of the errata printed are
applicable, and not necessarily all of them.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200512145255.5520-1-geert+renesas@glider.be
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-12 18:37:13 +01:00
Will Deacon 3a88d7c5c9 arm64: kconfig: Update and comment GCC version check for kernel BTI
Some versions of GCC are known to suffer from a BTI code generation bug,
meaning that CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI cannot be solely used
to determine whether or not we can compile with kernel with BTI enabled.

Update the BTI Kconfig entry to refer to the relevant GCC bugzilla entry
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697) and update the check
now that the fix has been merged into GCC release 10.1.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-12 13:02:31 +01:00
Lad Prabhakar 0e36587c08 arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1
This patch adds support for AISTARVISION MIPI Adapter V2.1 board connected
to G2E board. Common file aistarvision-mipi-adapter-2.1.dtsi is created
which have the camera endpoint nodes for imx219 and ov5645 so that this can
be re-used with other G2x platforms.

r8a774c0-ek874-mipi-2.1.dts file enables the required VIN/CSI nodes and by
default ties ov5645 camera endpoint to CSI2.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/1587397794-11237-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2020-05-12 10:05:36 +02:00
Masahiro Yamada 1ca0c2f612 kbuild: remove unused AS assignment
$(AS) is not used anywhere in the kernel build, hence commit
aa824e0c96 ("kbuild: remove AS variable") killed it.

Remove the left-over code in arch/{arm,arm64}/Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Will Deacon <will@kernel.org>
2020-05-12 13:28:33 +09:00
Douglas Anderson 0d1ce0d14b arm64: dts: sdm845: Add "no-hpd" to sn65dsi86 on cheza
We don't have the HPD line hooked up to the bridge chip.  Add it as
suggested in the patch ("dt-bindings: drm/bridge: ti-sn65dsi86:
Document no-hpd").

NOTE: this patch isn't expected to have any effect but just keeps us
cleaner for the future.  Currently the driver in Linux just assumes
that nobody has HPD hooked up.  This change allows us to later
implement HPD support in the driver without messing up sdm845-cheza.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20200507143354.v5.6.I89df9b6094549b8149aa8b8347f7401c678055b0@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 18:20:27 -07:00
Loic Poulain 26bea4e42a arch: arm64: dts: msm8996: Add CCI node
Add CCI controller node, which can be used to communicate with
camera sensors (I2C subset). MSM8996 CCI offers two masters,
i2c-bus@0 and i2c-bus@1.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/1587470425-13726-2-git-send-email-loic.poulain@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 16:53:07 -07:00
Loic Poulain 4a4a26317e arm64: dts: msm8996: Fix CSI IRQ types
Each IRQ_TYPE_NONE interrupt causes a warning at boot.
Fix that by defining an appropriate type.

Fixes: e0531312e7 ("arm64: dts: qcom: msm8996: Add CAMSS support")
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/1587470425-13726-1-git-send-email-loic.poulain@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 16:52:51 -07:00
Sibi Sankar bec71ba243 arm64: dts: qcom: sc7180: Update Q6V5 MSS node
Add TCSR node and update MSS node to support MSA based Modem boot on
SC7180 SoCs.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200421143228.8981-8-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 12:31:51 -07:00
Sibi Sankar e14a15eba8 arm64: dts: qcom: sc7180: Add Q6V5 MSS node
This patch adds Q6V5 MSS PAS remoteproc node for SC7180 SoCs.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200421143228.8981-7-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 12:31:48 -07:00
Sibi Sankar 33c172b96a arm64: dts: qcom: sc7180: Update reserved memory map
Add missing regions and remove unused regions from the reserved memory
map, as described in version 5.

Tested-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200421143228.8981-6-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-11 12:28:38 -07:00
Amit Daniel Kachhap 203b1152d1 arm64/crash_core: Export KERNELPACMASK in vmcoreinfo
Recently arm64 linux kernel added support for Armv8.3-A Pointer
Authentication feature. If this feature is enabled in the kernel and the
hardware supports address authentication then the return addresses are
signed and stored in the stack to prevent ROP kind of attack. Kdump tool
will now dump the kernel with signed lr values in the stack.

Any user analysis tool for this kernel dump may need the kernel pac mask
information in vmcoreinfo to generate the correct return address for
stacktrace purpose as well as to resolve the symbol name.

This patch is similar to commit ec6e822d1a ("arm64: expose user PAC
bit positions via ptrace") which exposes pac mask information via ptrace
interfaces.

The config gaurd ARM64_PTR_AUTH is removed form asm/compiler.h so macros
like ptrauth_kernel_pac_mask can be used ungaurded. This config protection
is confusing as the pointer authentication feature may be missing at
runtime even though this config is present.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1589202116-18265-1-git-send-email-amit.kachhap@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-11 14:29:10 +01:00
Luke Nelson fd868f1481 bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates
The current code for BPF_{ADD,SUB} BPF_K loads the BPF immediate to a
temporary register before performing the addition/subtraction. Similarly,
BPF_JMP BPF_K cases load the immediate to a temporary register before
comparison.

This patch introduces optimizations that use arm64 immediate add, sub,
cmn, or cmp instructions when the BPF immediate fits. If the immediate
does not fit, it falls back to using a temporary register.

Example of generated code for BPF_ALU64_IMM(BPF_ADD, R0, 2):

without optimization:

  24: mov x10, #0x2
  28: add x7, x7, x10

with optimization:

  24: add x7, x7, #0x2

The code could use A64_{ADD,SUB}_I directly and check if it returns
AARCH64_BREAK_FAULT, similar to how logical immediates are handled.
However, aarch64_insn_gen_add_sub_imm from insn.c prints error messages
when the immediate does not fit, and it's simpler to check if the
immediate fits ahead of time.

Co-developed-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20200508181547.24783-4-luke.r.nels@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-11 12:21:39 +01:00
Luke Nelson fd49591cb4 bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 logical immediates
The current code for BPF_{AND,OR,XOR,JSET} BPF_K loads the immediate to
a temporary register before use.

This patch changes the code to avoid using a temporary register
when the BPF immediate is encodable using an arm64 logical immediate
instruction. If the encoding fails (due to the immediate not being
encodable), it falls back to using a temporary register.

Example of generated code for BPF_ALU32_IMM(BPF_AND, R0, 0x80000001):

without optimization:

  24: mov  w10, #0x8000ffff
  28: movk w10, #0x1
  2c: and  w7, w7, w10

with optimization:

  24: and  w7, w7, #0x80000001

Since the encoding process is quite complex, the JIT reuses existing
functionality in arch/arm64/kernel/insn.c for encoding logical immediates
rather than duplicate it in the JIT.

Co-developed-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20200508181547.24783-3-luke.r.nels@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-11 12:21:39 +01:00
Luke Nelson 579d1b3faa arm64: insn: Fix two bugs in encoding 32-bit logical immediates
This patch fixes two issues present in the current function for encoding
arm64 logical immediates when using the 32-bit variants of instructions.

First, the code does not correctly reject an all-ones 32-bit immediate,
and returns an undefined instruction encoding.

Second, the code incorrectly rejects some 32-bit immediates that are
actually encodable as logical immediates. The root cause is that the code
uses a default mask of 64-bit all-ones, even for 32-bit immediates.
This causes an issue later on when the default mask is used to fill the
top bits of the immediate with ones, shown here:

  /*
   * Pattern: 0..01..10..01..1
   *
   * Fill the unused top bits with ones, and check if
   * the result is a valid immediate (all ones with a
   * contiguous ranges of zeroes).
   */
  imm |= ~mask;
  if (!range_of_ones(~imm))
          return AARCH64_BREAK_FAULT;

To see the problem, consider an immediate of the form 0..01..10..01..1,
where the upper 32 bits are zero, such as 0x80000001. The code checks
if ~(imm | ~mask) contains a range of ones: the incorrect mask yields
1..10..01..10..0, which fails the check; the correct mask yields
0..01..10..0, which succeeds.

The fix for both issues is to generate a correct mask based on the
instruction immediate size, and use the mask to check for all-ones,
all-zeroes, and values wider than the mask.

Currently, arch/arm64/kvm/va_layout.c is the only user of this function,
which uses 64-bit immediates and therefore won't trigger these bugs.

We tested the new code against llvm-mc with all 1,302 encodable 32-bit
logical immediates and all 5,334 encodable 64-bit logical immediates.

Fixes: ef3935eeeb ("arm64: insn: Add encoder for bitwise operations using literals")
Suggested-by: Will Deacon <will@kernel.org>
Co-developed-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200508181547.24783-2-luke.r.nels@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-11 12:21:39 +01:00
Christoph Hellwig d51c214541 arm64: fix the flush_icache_range arguments in machine_kexec
The second argument is the end "pointer", not the length.

Fixes: d28f6df130 ("arm64/kexec: Add core kexec support")
Cc: <stable@vger.kernel.org> # 4.8.x-
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2020-05-11 12:02:14 +01:00
Eric Biggers 2aaba014b5 crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h
<linux/cryptohash.h> sounds very generic and important, like it's the
header to include if you're doing cryptographic hashing in the kernel.
But actually it only includes the library implementation of the SHA-1
compression function (not even the full SHA-1).  This should basically
never be used anymore; SHA-1 is no longer considered secure, and there
are much better ways to do cryptographic hashing in the kernel.

Most files that include this header don't actually need it.  So in
preparation for removing it, remove all these unneeded includes of it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-05-08 15:32:17 +10:00
Eric Biggers a221b33b65 crypto: arm64/aes-glue - use crypto_shash_tfm_digest()
Instead of manually allocating a 'struct shash_desc' on the stack and
calling crypto_shash_digest(), switch to using the new helper function
crypto_shash_tfm_digest() which does this for us.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-05-08 15:32:13 +10:00
Grygorii Strashko ef2d1363c5 arm64: dts: ti: k3-am65/j721e-mcu: update cpts node
Update CPTS node following DT binding update:
 - add reg and compatible properties
 - fix node name

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-07 17:51:03 -07:00
Bjorn Andersson 9cbcb81dc8 arm64: defconfig: Remove QCOM_GLINK_SSR
Remove the QCOM_GLINK_SSR option from the arm64 defconfig, as the module
is assimilated by QCOM_GLINK - which is selected by other means.

Acked-by: Chris Lew <clew@codeaurora.org>
Acked-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Link: https://lore.kernel.org/r/20200423003736.2027371-5-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-07 11:14:15 -07:00
Linus Torvalds 6e7f2eacf0 - Avoid potential NULL dereference in huge_pte_alloc() on pmd_alloc()
failure
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAl60Nq8ACgkQa9axLQDI
 XvHCvg/8CupwSce53iZE2NcUHjbyiUxrbKRG094PAnXCT87XSm7ubWeskh0hOjHq
 M/e1eKvD3NbXhe99/fMU//biRTwhCLc1e5zSYD/i19mXz0tkYaU+w6bvP2Nq96Ui
 Qd+N/sGMATl5fRvgQ7M70nbUARXmD9v0vwocDijRomq2vr4t4jHAzMeD1XrhS0JH
 2hmzMSQL2vaGQ0otC75qA0iaG4GRUS4tQJT78v03G5KzCdZsSyr9j4X8Ev2/FhPm
 agismE/5EqVM/8XF0iVlAv9hsRp8gmvD3w9mz1Bw6bqjcXcTT3vy8lC0OO9WkPdF
 8kGhzE+Xoge6Yb46hIJJnlVnm1btGAdRXQjjMyJXE26vaFkm1wxia+/oTr9AmSYm
 hxn3WIpAYxwCprF2qLsgOU1qcCs/JO05asYC6iPuNFz/ViJS8plTWPkXP+myvChU
 OOYgSElKURFrLVcMUExCLR38jAO0PecgIh2qmNsk2U6ZXTMPAPggGeB7mToBfSAx
 xxKrNERQZ0G8hlwweINAYJosccSi8YLzAO3zU9wAicf0rd/zB/zd27q75kjEvmY2
 Bt5Jjo1DvFRnick+Cf64ToBkfI+UPRqlr4a741NeVt6PBYmpWgqFm4vSHpAo45Z/
 3sDF20t7FctVOd4Akz0s9b3ZoZpzQxZ3rnxJXxzeptWIE3uU5J0=
 =wehO
 -----END PGP SIGNATURE-----

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

Pull arm64 fix from Catalin Marinas:
 "Avoid potential NULL dereference in huge_pte_alloc() on pmd_alloc()
  failure"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: hugetlb: avoid potential NULL dereference
2020-05-07 09:55:58 -07:00
Mark Brown bf740a905f arm64: vdso: Map the vDSO text with guarded pages when built for BTI
The kernel is responsible for mapping the vDSO into userspace processes,
including mapping the text section as executable. Handle the mapping of
the vDSO for BTI similarly, mapping the text section as guarded pages so
the BTI annotations in the vDSO become effective when they are present.

This will mean that we can have BTI active for the vDSO in processes that
do not otherwise support BTI. This should not be an issue for any expected
use of the vDSO.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-12-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 5e02a1887f arm64: vdso: Force the vDSO to be linked as BTI when built for BTI
When the kernel and hence vDSO are built with BTI enabled force the linker
to link the vDSO as BTI. This will cause the linker to warn if any of the
input files do not have the BTI annotation, ensuring that we don't silently
fail to provide a vDSO that is built and annotated for BTI when the
kernel is being built with BTI.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-11-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown a6aadc2827 arm64: vdso: Annotate for BTI
Generate BTI annotations for all assembly files included in the 64 bit
vDSO.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-10-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 3a9b136c99 arm64: asm: Provide a mechanism for generating ELF note for BTI
ELF files built for BTI should have a program property note section which
identifies them as such. The linker expects to find this note in all
object files it is linking into a BTI annotated output, the compiler will
ensure that this happens for C files but for assembler files we need to do
this in the source so provide a macro which can be used for this purpose.
To support likely future requirements for additional notes we split the
defininition of the flags to set for BTI code from the macro that creates
the note itself.

This is mainly for use in the vDSO which should be a normal ELF shared
library and should therefore include BTI annotations when built for BTI.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200506195138.22086-9-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 97fed779f2 arm64: bti: Provide Kconfig for kernel mode BTI
Now that all the code is in place provide a Kconfig option allowing users
to enable BTI for the kernel if their toolchain supports it, defaulting it
on since this has security benefits. This is a separate configuration
option since we currently don't support secondary CPUs that lack BTI if
the boot CPU supports it.

Code generation issues mean that current GCC 9 versions are not able to
produce usable BTI binaries so we disable support for building with GCC
versions prior to 10, once a fix is backported to GCC 9 the dependencies
will be updated.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-8-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 67d4a1cd09 arm64: mm: Mark executable text as guarded pages
When the kernel is built for BTI and running on a system which supports
make all executable text guarded pages to ensure that loadable module
and JITed BPF code is protected by BTI.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-7-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown fa76cfe65c arm64: bpf: Annotate JITed code for BTI
In order to extend the protection offered by BTI to all code executing in
kernel mode we need to annotate JITed BPF code appropriately for BTI. To
do this we need to add a landing pad to the start of each BPF function and
also immediately after the function prologue if we are emitting a function
which can be tail called. Jumps within BPF functions are all to immediate
offsets and therefore do not require landing pads.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-6-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown c8027285e3 arm64: Set GP bit in kernel page tables to enable BTI for the kernel
Now that the kernel is built with BTI annotations enable the feature by
setting the GP bit in the stage 1 translation tables.  This is done
based on the features supported by the boot CPU so that we do not need
to rewrite the translation tables.

In order to avoid potential issues on big.LITTLE systems when there are
a mix of BTI and non-BTI capable CPUs in the system when we have enabled
kernel mode BTI we change BTI to be a _STRICT_BOOT_CPU_FEATURE when we
have kernel BTI.  This will prevent any CPUs that don't support BTI
being started if the boot CPU supports BTI rather than simply not using
BTI as we do when supporting BTI only in userspace.  The main concern is
the possibility of BTYPE being preserved by a CPU that does not
implement BTI when a thread is migrated to it resulting in an incorrect
state which could generate an exception when the thread migrates back to
a CPU that does support BTI.  If we encounter practical systems which
mix BTI and non-BTI CPUs we will need to revisit this implementation.

Since we currently do not generate landing pads in the BPF JIT we only
map the base kernel text in this way.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-5-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 714a8d02ca arm64: asm: Override SYM_FUNC_START when building the kernel with BTI
When the kernel is built for BTI override SYM_FUNC_START and related macros
to add a BTI landing pad to the start of all global functions, ensuring that
they are BTI safe. The ; at the end of the BTI_x macros is for the
benefit of the macro-generated functions in xen-hypercall.S.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-4-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00
Mark Brown 92e2294d87 arm64: bti: Support building kernel C code using BTI
When running with BTI enabled we need to ask the compiler to enable
generation of BTI landing pads beyond those generated as a result of
pointer authentication instructions being landing pads. Since the two
features are practically speaking unlikely to be used separately we
will make kernel mode BTI depend on pointer authentication in order
to simplify the Makefile.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-3-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-05-07 17:53:20 +01:00