16410 Commits

Author SHA1 Message Date
Arnd Bergmann
a36c9ff6a2 Merge branch 'dt-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/dt
* 'dt-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti:
  arm: dts: visconti: Add DT support for Toshiba Visconti5 GPIO driver

Link: https://lore.kernel.org/r/20210210173210.nnytfyrkkj6ylrtb@toshiba.co.jp
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-11 12:16:11 +01:00
David S. Miller
dc9d87581d Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-10 13:30:12 -08:00
Nobuhiro Iwamatsu
0109a17564 arm: dts: visconti: Add DT support for Toshiba Visconti5 GPIO driver
Add the GPIO node in Toshiba Visconti5 SoC-specific DT file.
And enable the GPIO node in TMPV7708 RM main board's board-specific DT file.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-02-11 02:01:16 +09:00
Ard Biesheuvel
fc754c024a crypto: arm64/crc-t10dif - move NEON yield to C code
Instead of yielding from the bowels of the asm routine if a reschedule
is needed, divide up the input into 4 KB chunks in the C glue. This
simplifies the code substantially, and avoids scheduling out the task
with the asm routine on the call stack, which is undesirable from a
CFI/instrumentation point of view.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:58 +11:00
Ard Biesheuvel
f0070f4a79 crypto: arm64/aes-ce-mac - simplify NEON yield
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:58 +11:00
Ard Biesheuvel
f5943ef456 crypto: arm64/aes-neonbs - remove NEON yield calls
There is no need for elaborate yield handling in the bit-sliced NEON
implementation of AES, given that skciphers are naturally bounded by the
size of the chunks returned by the skcipher_walk API. So remove the
yield calls from the asm code.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:58 +11:00
Ard Biesheuvel
5f6cb2e617 crypto: arm64/sha512-ce - simplify NEON yield
Instead of calling into kernel_neon_end() and kernel_neon_begin() (and
potentially into schedule()) from the assembler code when running in
task mode and a reschedule is pending, perform only the preempt count
check in assembler, but simply return early in this case, and let the C
code deal with the consequences.

This reverts commit 6caf7adc5e458f77f550b6c6ca8effa152d61b4a.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:58 +11:00
Ard Biesheuvel
9ecc9f31d0 crypto: arm64/sha3-ce - simplify NEON yield
Instead of calling into kernel_neon_end() and kernel_neon_begin() (and
potentially into schedule()) from the assembler code when running in
task mode and a reschedule is pending, perform only the preempt count
check in assembler, but simply return early in this case, and let the C
code deal with the consequences.

This reverts commit 7edc86cb1c18b4c274672232117586ea2bef1d9a.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:58 +11:00
Ard Biesheuvel
b2eadbf40e crypto: arm64/sha2-ce - simplify NEON yield
Instead of calling into kernel_neon_end() and kernel_neon_begin() (and
potentially into schedule()) from the assembler code when running in
task mode and a reschedule is pending, perform only the preempt count
check in assembler, but simply return early in this case, and let the C
code deal with the consequences.

This reverts commit d82f37ab5e2426287013eba38b1212e8b71e5be3.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:57 +11:00
Ard Biesheuvel
5a69e1b73d crypto: arm64/sha1-ce - simplify NEON yield
Instead of calling into kernel_neon_end() and kernel_neon_begin() (and
potentially into schedule()) from the assembler code when running in
task mode and a reschedule is pending, perform only the preempt count
check in assembler, but simply return early in this case, and let the C
code deal with the consequences.

This reverts commit 7df8d164753e6e6f229b72767595072bc6a71f48.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:55:57 +11:00
Herbert Xu
dc9ab9c69c Merge git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux for-next/crypto
Pull change from arm64 tree that's needed for crypto arm changes.
2021-02-10 17:20:35 +11:00
Arnd Bergmann
21e4675d93 arm64: soc: ZynqMP SoC changes for v5.12
- Enable clock driver for ZynqMP in defconfig
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYBqmugAKCRDKSWXLKUoM
 IYTKAJ4sM1dHR8WK2GOA7h6XfUHidAMg0QCfUQDDW74QBqpxaqsmwZ4KDgCYRMw=
 =Y8Hk
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-soc-for-v5.12' of https://github.com/Xilinx/linux-xlnx into arm/defconfig

arm64: soc: ZynqMP SoC changes for v5.12

- Enable clock driver for ZynqMP in defconfig

* tag 'zynqmp-soc-for-v5.12' of https://github.com/Xilinx/linux-xlnx:
  arm64: defconfig: enable clock driver for ZynqMP platforms

Link: https://lore.kernel.org/r/2b0f6314-13ba-375a-9231-925b0a07be82@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-10 00:08:06 +01:00
Arnd Bergmann
889231c6c8 New boards: Radxa Rock Pi E, NanoPi M4B
More fixed indices for mmc nodes; removal of obsolete amba bus nodes;
 nand-flash-controller nodes for px30 and rk3308; rk3399 pcie ranges fix;
 board-level fixes for Helios64, NanoPi and Rock960; more sound support
 for rock64 and rockpro64 and cleanups to make dt-bindings happier.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmAd2RcQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdge1kCAC0ospmQfbTke3+mJ+P2pTNakz6l30CDbzm
 EDNsE2t9g4PrMt4FgsdT1kPa3J5lFLvzNvPSIbIIMT4a5D/8DDyGY9WwJTu+a5EC
 YNcU5gcU2ugxCcFhy2FXHxYVe1MAsczF5jyiMcE+ONsCX0s18k1zzK22K/Xfd71g
 sv6G8NcuzcF5GxFbAPZu73laMGOEq6INLBKTvumB3GgrvEZOOstalKNwJPRuanZd
 HydXJf8H9zXmxk096brRl7LmksPi/zh6Tykhb53//jsf0Dffh9fd7fNnKkSe91nU
 M5yzALy9ln4saFu6TgNIVOPh3fbQcyfU9ItvhtgeDy/QDvnmOjQm
 =sbHZ
 -----END PGP SIGNATURE-----

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

New boards: Radxa Rock Pi E, NanoPi M4B
More fixed indices for mmc nodes; removal of obsolete amba bus nodes;
nand-flash-controller nodes for px30 and rk3308; rk3399 pcie ranges fix;
board-level fixes for Helios64, NanoPi and Rock960; more sound support
for rock64 and rockpro64 and cleanups to make dt-bindings happier.

* tag 'v5.12-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (24 commits)
  arm64: dts: rockchip: more user friendly name of sound nodes
  arm64: dts: rockchip: rename pinctrl nodename to gmac2io for nanopi-r2s board
  arm64: dts: rockchip: assign a fixed index to mmc devices on rk3368 boards
  arm64: dts: rockchip: assign a fixed index to mmc devices on rk3308 boards
  arm64: dts: rockchip: assign a fixed index to mmc devices on px30 boards
  arm64: dts: rockchip: cleanup cpu_thermal node of rk3399-rock960.dts
  arm64: dts: rockchip: Remove bogus "amba" bus nodes
  arm64: dts: rockchip: Light "sys" LED on NanoPi R2S
  arm64: dts: rockchip: fix ranges property format for rk3399 pcie node
  arm64: dts: rockchip: Rely on SoC external pull up on pmic-int-l on Helios64
  arm64: dts: rockchip: Add NanoPi M4B board
  arm64: dts: rockchip: Move ep-gpios property to nanopc-t4 from nanopi4
  arm64: dts: rockchip: Add NFC node for PX30 SoC
  arm64: dts: rockchip: Add NFC node for RK3308 SoC
  arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
  dt-bindings: arm: rockchip: Add Radxa ROCK Pi E
  arm64: dts: rockchip: rk3328: Add clock_in_out property to gmac2phy node
  arm64: dts: rockchip: rename thermal subnodes for rk3399
  arm64: dts: rockchip: rename thermal subnodes for rk3368
  arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
  ...

Link: https://lore.kernel.org/r/12699743.uLZWGnKmhe@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 23:30:19 +01:00
Arnd Bergmann
60c9579a01 i.MX arm64 device tree update for 5.12:
- New board support: Beacon i.MX8M Nano development kit, i.MX8MM Nitrogen,
   Gateworks i.MX 8M Mini Development Kits, phyBOARD-Pollux-i.MX8MP,
   Librem5 Evergreen.
 - Update imx8mm-beacon to drop unused clock-names reference, and add
   more pinctrl states for USDHC1.
 - Support soc unique ID read with NVMEM on i.MX8M SoCs.
 - A series from Biwen Li to add interrupt line for RTC device on
   Layerscape SoCs.
 - A couple of patch sets to update imx8mq-librem5 support around
   regulators, RTC, charger, display, etc.
 - A series from Joakim Zhang to improve i.MX8M FEC device configuration.
 - A series from Kuldeep Singh to enable flexcan support for LX2160A and
   LS1028A.
 - A series from Lucas Stach to update ZII devices around audio, USB, I2C
   pin configuration and UCS1002 ALERT.
 - A series from Michael Walle to update Layerscape device trees to use
   constants in the clockgen phandle, add sl28 variant 1 and enable SATA.
 - A few patches from Russell King to improve support for a couple of
   LX2160A boards.
 - A series from Shengjiu Wang to add more audio support for imx8mn-evk.
 - Other small and random updates.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmAboLUUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7uogf8CiWlrW3nvc/IQczBsgqr0QpFFVY/
 z5Le9xqsIa7ZEdA2tVryi8IyH4BSrpwPANk2aGgb2L9Ktjs8N8KC+RnQ2OZrIyDk
 m3dY0lnAYcfYFVUyJDVQHz4AJLHHfbMRjT25NRrxrUVSXxaPbaFlLlk1bT+TCTNx
 lPavxy+ch60JYET85ZYgM9A1mqKfhAxNMr7JNJODWjoQTNDQy88K2zymVYYaZZ0p
 2xMJ7dnuNleAdU3ndaG3K7G9hv0SlfAlR+TdKzgYTE7S0e4W6phwH37Nu3XnT3SY
 ToBqv/qSx1Hv1LAuLTMAWIOZiKoOVq1kqdgMR7d1+gsKi6QlIPGC92BvFw==
 =ajVN
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree update for 5.12:

- New board support: Beacon i.MX8M Nano development kit, i.MX8MM Nitrogen,
  Gateworks i.MX 8M Mini Development Kits, phyBOARD-Pollux-i.MX8MP,
  Librem5 Evergreen.
- Update imx8mm-beacon to drop unused clock-names reference, and add
  more pinctrl states for USDHC1.
- Support soc unique ID read with NVMEM on i.MX8M SoCs.
- A series from Biwen Li to add interrupt line for RTC device on
  Layerscape SoCs.
- A couple of patch sets to update imx8mq-librem5 support around
  regulators, RTC, charger, display, etc.
- A series from Joakim Zhang to improve i.MX8M FEC device configuration.
- A series from Kuldeep Singh to enable flexcan support for LX2160A and
  LS1028A.
- A series from Lucas Stach to update ZII devices around audio, USB, I2C
  pin configuration and UCS1002 ALERT.
- A series from Michael Walle to update Layerscape device trees to use
  constants in the clockgen phandle, add sl28 variant 1 and enable SATA.
- A few patches from Russell King to improve support for a couple of
  LX2160A boards.
- A series from Shengjiu Wang to add more audio support for imx8mn-evk.
- Other small and random updates.

* tag 'imx-dt64-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (71 commits)
  arm64: dts: imx: Add i.mx8mm nitrogen basic dts support
  arm64: dts: zii-rmb3: enable RMI4 reduced reporting
  arm64: dts: zii-ultra: only trigger IRQ on falling edge ucs1002 ALERT pin
  arm64: dts: zii-ultra: limit USB ports to USB2 speed
  arm64: dts: zii-ultra: fix i2c pin configuration
  arm64: dts: zii-ultra: add sound support
  arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS
  arm64: dts: ls1028a: Update flexcan properties
  arm64: dts: lx2160a: Add flexcan support
  arm64: dts: fsl-ls1012a-frdm: add spi-uart device
  arm64: dts: fsl-ls1012a-rdb: add i2c devices
  arm64: dts: imx8mn-beacon-som: Enable QSPI on SOM
  arm64: dts: imx8mn: Add fspi node
  arm64: dts: Add Librem5 Evergreen
  arm64: dts: imx8mq-librem5: set regulators boot-on
  arm64: dts: imx8mq-librem5: enable the LCD panel
  arm64: dts: imx8mq-librem5: Add LCD_1V8 regulator
  arm64: dts: imx8mq-librem5: Add usb-c chip as supplier for the charger
  arm64: dts: imx8mq-librem5: Don't mark buck3 as always on
  arm64: dts: imx8mq-librem5: Mark charger IRQ as High-Z
  ...

Link: https://lore.kernel.org/r/20210204120150.26186-5-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 18:03:39 +01:00
Arnd Bergmann
48a60549d2 i.MX device tree change for 5.12:
- A series from Oleksij Rempel to add i.MX6 based Plymovent, Protonic
   and Kverneland boards.
 - A series from Andreas Kemnade to improve UART support for ebook
   readers.
 - A series from Fabio Estevam to update imx6ul-14x14-evk device tree for
   adding GPIO expander and camera support.
 - A patch set from Lucas Stach to improve ZII RDU2 support, enabling
   WDOG, tuning I2C drive-strength, RMI4 and UCS1002 ALERT.
 - Other small and random updates on various boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmAbmf8UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM5xXwgAlGHKq/arFxIkQf0xUcJzLhJ9FcDl
 CpNz77cosCXERcoVpRgTYWGk1ElnYutyNMkUzSrhXdZ80ieL5UMF/RAZYaGJO38f
 NLCN5Rv5w1i4z/J8GGhqASgZ13Pized6jcEuvd8EYwVNkRX+ErcKszkmjWit42RL
 cgRtdBhqAmEwshNjtki5PbFRj7YxWuC6Tsf4OUyXmm4S/+sqcaTvLuQWq/AeEzqJ
 5vN1H6RFqfZR+C2vumW/Yq4bkRlFQllELcoTPPrixm2ZvvZbLs7I56HZub9yom9i
 c4GCfcSgMEXjmuB3h7NmMNyPCyvSVLN3bNseYADX9PnrBzP4HFRW1IsAhg==
 =DmjV
 -----END PGP SIGNATURE-----

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

i.MX device tree change for 5.12:

- A series from Oleksij Rempel to add i.MX6 based Plymovent, Protonic
  and Kverneland boards.
- A series from Andreas Kemnade to improve UART support for ebook
  readers.
- A series from Fabio Estevam to update imx6ul-14x14-evk device tree for
  adding GPIO expander and camera support.
- A patch set from Lucas Stach to improve ZII RDU2 support, enabling
  WDOG, tuning I2C drive-strength, RMI4 and UCS1002 ALERT.
- Other small and random updates on various boards.

* tag 'imx-dt-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (37 commits)
  ARM: dts: imx6: RDU2: adjust audio devices nomenclature
  ARM: dts: imx6: RDU2: only trigger IRQ on falling edge ucs1002 ALERT pin
  ARM: dts: imx6: RDU2: enable RMI4 reduced reporting
  ARM: dts: imx6: RDU2: reduce i2c drive-strength
  ARM: dts: imx6: rdu2: enable WDOG1
  ARM: dts: imx6-sr-som: increase at8035 PHY gigabit Tw parameter
  ARM: dts: imx6: add wakeup support via magic packet
  firmware: imx: select SOC_BUS to fix firmware build
  arm64: dts: imx8mp: Correct the gpio ranges of gpio3
  ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms
  ARM: dts: imx: e60k02: add second uart
  ARM: dts: imx6sl-tolino-shine3: correct console uart pinmux
  ARM: dts: imx6sl-tolino-shine2hd: add second uart
  ARM: dts: imx6sl-tolino-shine2hd: correct console uart pinmux
  ARM: imx: build suspend-imx6.S with arm instruction set
  ARM: dts: imx7d-flex-concentrator: fix pcf2127 reset
  ARM: dts: add Kverneland TGO board
  ARM: dts: add Kverneland UT1, UT1Q and UT1P
  ARM: dts: imx6ul-14x14-evk: Add camera support
  ARM: dts: imx6ul-14x14-evk: Describe the KSZ8081 reset
  ...

Link: https://lore.kernel.org/r/20210204120150.26186-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 18:01:42 +01:00
Arnd Bergmann
8a2b1ec170 Qualcomm ARM64 DT updates for 5.12
This introduces initial support for the new SM8350 platform, aka
 Snapdragon 888, and the MTP device for this.
 
 It adds PCIe, audio, display, GPU, HDMI watchdog, LLCC and PMIC ADC
 support to the SM8250 platform and RB5 in particular, as well as improve
 the definition of CPUs, thermal zones and fixes a few smaller issues.
 
 It introduces new Devicetree files for the Alcatel Idol 3, ASUS Zenfone
 2 Laser and BQ Aquaris X5, based on the MSM8916 platform.
 
 It contains an overhaul of the existing MSM8992 and MSM8994 platform
 files and introduces RPM power domains and SMP2P nodes. It adds
 touchscreen, additional regulators, microSD card support and adds the
 Sony Mobile Ivy, Karin, Suzuran and Satsuki devices. It joins the common
 parts of the Lumia 950 and 950XL and extend these with support for
 sensors, NFC, bluetooth, audio, microSD and Type-C mux pins.
 
 It introduces support for the OnePlus6 and 6t, adds the missing higher
 frequences for the SDM850 laptops, adds CPU cluster idle support on
 SM8150  and a few tweaks to the SC7180 platform.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmAbgxEbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FWIMP/1gLzNp/vtxtFA+7Wjud
 r6ozd10p6yRWRtw3bSpaa4kifhIY9zK/Ca45Oj+k8Mm3vIngtT6hZJ6kJmc0Y0J/
 cVKm65Th6Tn0RUTHTGhqX+2ug80RfKbr1NgPyY1n1ukH30dMJwC50qOMEwahFtyV
 IafH8j+AD1KgA/ceP1ENxtyywZGDaM5N2DAEPrzX8auTvO6VPLBrIhPMv63iupGU
 nBmExlAxYAPZXaNVG0fZUMmx6ciGqg1yBo31F5Pso5LaeFD79vg2AnRaCXs4i8ve
 mR1cM5s3TYMJpe9gJmoNBHN8ngkgbqsh+tnn2S3yQBSMT6QTdwyzvSkXpF8CNeRp
 6vXDpcJ2G1gJyxS0SmmYxKA2wTZEcpq4il/MZ2WSY8s71Z5jecSddsQdKVoYtSIg
 9W9V3aihjKX8NN+Ko2O4usuKTVmcrNHqwO5zQPQ9unxpG5FSXbRmIVAuEXJmN+3t
 doKXKdlUmvAV4tqkz39aHsRs8nGr5ZO6VEaKgB3OIgzxcd/aWL+pNTMN4QufCh9b
 umdCnWY6mtJCFcLEDjTxE3WdfzCK8Se/7E77Ohe1BS39NWB5UCw0PDfL12yOZg0q
 Spj93z2ZnzbkygkGtuKN+jxmnJ4Z6viykdcchy7c77VPvEIBfABlOc06sdAbfY6d
 GMNVvEE965FPI669C7NOd3Ly
 =ATeF
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT updates for 5.12

This introduces initial support for the new SM8350 platform, aka
Snapdragon 888, and the MTP device for this.

It adds PCIe, audio, display, GPU, HDMI watchdog, LLCC and PMIC ADC
support to the SM8250 platform and RB5 in particular, as well as improve
the definition of CPUs, thermal zones and fixes a few smaller issues.

It introduces new Devicetree files for the Alcatel Idol 3, ASUS Zenfone
2 Laser and BQ Aquaris X5, based on the MSM8916 platform.

It contains an overhaul of the existing MSM8992 and MSM8994 platform
files and introduces RPM power domains and SMP2P nodes. It adds
touchscreen, additional regulators, microSD card support and adds the
Sony Mobile Ivy, Karin, Suzuran and Satsuki devices. It joins the common
parts of the Lumia 950 and 950XL and extend these with support for
sensors, NFC, bluetooth, audio, microSD and Type-C mux pins.

It introduces support for the OnePlus6 and 6t, adds the missing higher
frequences for the SDM850 laptops, adds CPU cluster idle support on
SM8150  and a few tweaks to the SC7180 platform.

* tag 'qcom-arm64-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (100 commits)
  arm64: dts: qcom: msm8998: Use rpmpd definitions for opp table levels
  arm64: dts: qcom: msm8996: Add missing device_type under pcie[01]
  arm64: dts: qcom: sc7180: Add support for gpu fuse
  arm64: dts: qcom: msm8998: Disable some components by default
  arm64: dts: qcom: msm8998: Add capacity-dmips-mhz to CPU cores
  arm64: dts: qcom: msm8998: Add I2C pinctrl and fix BLSP2_I2C naming
  arm64: dts: qcom: msm8998: Add DMA to I2C hosts
  arm64: dts: qcom: msm8998: Merge in msm8998-pins.dtsi to msm8998.dtsi
  arm64: dts: msm8916: Fix reserved and rfsa nodes unit address
  arm64: dts: qcom: msm8994-octagon: Add AD7147 and APDS9930 sensors
  arm64: dts: qcom: msm8994-octagon: Add TAS2553 codec
  arm64: dts: qcom: msm8994-octagon: Add sensors on blsp1_i2c5
  arm64: dts: qcom: msm8994-octagon: Add NXP NFC node
  arm64: dts: qcom: msm8994-octagon: Add FM Radio and DDR regulator nodes
  arm64: dts: qcom: msm8994-octagon: Configure PON keys
  arm64: dts: qcom: msm8994-octagon: Configure Lattice iCE40 FPGA
  arm64: dts: qcom: msm8994-octagon: Add uSD card and disable HS400 on eMMC
  arm64: dts: qcom: msm8994-octagon: Configure HD3SS460 Type-C mux pins
  arm64: dts: qcom: msm8994-octagon: Add QCA6174 bluetooth
  arm64: dts: qcom: msm8994-octagon: Configure regulators
  ...

Link: https://lore.kernel.org/r/20210204052043.388621-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 17:53:44 +01:00
Arnd Bergmann
79e3faa756 arm64: dts: amlogic updates for v5.12
- new board: Hardkernel ODROID-HC4 (SoC: SM1)
 - new board: Beelink GS-King-X (SoC: S922X)
 - shorten shorten audio card names for alsa compatibility
 - misc cleanups & fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAmAhb0cACgkQWTcYmtP7
 xmUaDxAAkTEf5HKBzM84v+medj4bYnG2hf4U45gxSiOsgMNSOrRn4kywcyhNigsr
 10WTJYCHfO2JNUiFPzm4SO/44+v/N7ClWrQVhoKe70+qFI3tcNxrFCvQAaHnvSRL
 GBHvfcUAIe0ZhDJxWYjnv26PehRmEaxYlSYUIbEvvqL0/RjV2HpYwqYtXdLeS50K
 eTP4iY0IVcabscgsTBunGzC7Q0BOpN5FPR/yknnLMsXDC31WKR1xwRw6kWiyv5Zs
 p0TLOjpzqXIDxzKnbkod3bTwLLh2Qjt7yZj5Q8llJuDy5Y+rUdNyj/JndhnYtJfs
 m4H5fYAhXcbFip5v/10NVVyNwg2keNKbg2XrCD0p7aO6SY8B4a83whDfWOhaAjQt
 wsCtW8tNwruH6hJZd9nHo67H1H83Bo/ymGzUbBw7dmD8gWDwCfeACSi9ZMSSyO+T
 8EWXS4G2dQnghnLcozfMI22YpD03hzQV6n2KFaOoPPmrhkZ+o3vfsBpOcu6mxw+r
 NS3gtMBBIay6Ca8zOBmIFjvIjZBbPKihCiMz1xNFlGLea6u1ILrFa0dAVWsiF43K
 MgFtvoBvOhfg3DbIpBfYTVSg+jPLKcOUhcEfMnJ2k6cDiWjxbkq9NFWYLJXou9EQ
 twZvdDwZwLQPAUknOLgUmolqVs3zXzRopBjlpFqzXxGZ8pXl5yo=
 =Hmzm
 -----END PGP SIGNATURE-----

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

arm64: dts: amlogic updates for v5.12
- new board: Hardkernel ODROID-HC4 (SoC: SM1)
- new board: Beelink GS-King-X (SoC: S922X)
- shorten shorten audio card names for alsa compatibility
- misc cleanups & fixes

* tag 'amlogic-dt64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson: add initial device-tree for ODROID-HC4
  dt-bindings: arm: amlogic: add ODROID-HC4 bindings
  arm64: dts: meson: convert meson-sm1-odroid-c4 to dtsi
  arm64: dts: meson: sort Amlogic dtb Makefile
  dt-bindings: arm: amlogic: sort SM1 bindings
  arm64: dts: meson: fix broken wifi node for Khadas VIM3L
  arm64: dts: meson: add i2c3/rtc nodes and rtc aliases to ODROID-N2 dtsi
  ARM: dts: meson: add the AO ARC remote processor
  dt-bindings: Amlogic: add the documentation for the SECBUS2 registers
  dt-bindings: sram: Add compatible strings for the Meson AO ARC SRAM
  arm64: dts: meson: shorten audio card names for alsa compatibility
  arm64: dts: meson: add initial Beelink GS-King-X device-tree
  dt-bindings: arm: amlogic: add support for the Beelink GS-King-X
  arm64: dts: meson: Fix schema warnings for pwm-leds
  arm64: dts: meson: vim3: whitespace fixups
  arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4
  Revert "arm64: dts: amlogic: add missing ethernet reset ID"
  arm64: dts: amlogic: meson-g12: Set FL-adj property value

Link: https://lore.kernel.org/soc/7heehq7ag3.fsf@baylibre.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 17:51:33 +01:00
Arnd Bergmann
638f79778d arm64: dts: ZynqMP DT changes for v5.12
- Wire clock chips present on boards
 - Enable reset, qspi, nand, watchdog and DP IPs
 - Enable phy driver for sata and DP
 - Add iommu description
 - Add support for zcu104 revC+ boards
 
 - Various small changes
   - Add missing labels
   - Fix typos in documentation
   - Add missing boards
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYBqk0gAKCRDKSWXLKUoM
 ITbRAKCO+l2ziOzd6ACzNEGAxFtdSPLp3ACfShjLzq0OiHdRFrYhen77PRPJ51Q=
 =nICr
 -----END PGP SIGNATURE-----

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

arm64: dts: ZynqMP DT changes for v5.12

- Wire clock chips present on boards
- Enable reset, qspi, nand, watchdog and DP IPs
- Enable phy driver for sata and DP
- Add iommu description
- Add support for zcu104 revC+ boards

- Various small changes
  - Add missing labels
  - Fix typos in documentation
  - Add missing boards

* tag 'zynqmp-dt-for-v5.12' of https://github.com/Xilinx/linux-xlnx:
  arm64: dts: zynqmp: Wire up the DisplayPort subsystem
  arm64: dts: zynqmp: Add DisplayPort subsystem
  arm64: dts: zynqmp: Add DPDMA node
  dt-bindings: arm: Fix typo in zcu111 board
  arm64: dts: zynqmp: Add description for zcu104 revC
  arm64: dts: zynqmp: Add missing iommu IDs
  arm64: dts: zynqmp: Add missing lpd watchdog node
  arm64: dts: zynqmp: Wire zynqmp qspi controller
  arm64: dts: zynqmp: Wire arasan nand controller
  arm64: dts: zynqmp: Add missing mio-bank properties to sdhcis
  arm64: dts: zynqmp: Add label for zynqmp_ipi
  arm64: dts: zynqmp: Enable phy driver for Sata on zcu102/zcu104/zcu106
  arm64: dts: zynqmp: Enable reset controller driver
  arm64: dts: zynqmp: Enable si5341 driver for zcu102/106/111
  arm64: dts: zynqmp: Add DT description for si5328 for zcu102/zcu106
  arm64: dts: zynqmp: Fix u48 si5382 chip on zcu111
  arm64: dts: zynqmp: Add address-cells property to interrupt controllers

Link: https://lore.kernel.org/r/b1a6f89e-f6b4-757b-daf0-d2f1844b833d@xilinx.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-09 17:46:48 +01:00
Nathan Chancellor
e9c6deee00 arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+
Similar to commit 28187dc8ebd9 ("ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN
depends on !LD_IS_LLD"), ld.lld prior to 13.0.0 does not properly
support aarch64 big endian, leading to the following build error when
CONFIG_CPU_BIG_ENDIAN is selected:

ld.lld: error: unknown emulation: aarch64linuxb

This has been resolved in LLVM 13. To avoid errors like this, only allow
CONFIG_CPU_BIG_ENDIAN to be selected if using ld.bfd or ld.lld 13.0.0
and newer.

While we are here, the indentation of this symbol used spaces since its
introduction in commit a872013d6d03 ("arm64: kconfig: allow
CPU_BIG_ENDIAN to be selected"). Change it to tabs to be consistent with
kernel coding style.

Link: https://github.com/ClangBuiltLinux/linux/issues/380
Link: https://github.com/ClangBuiltLinux/linux/issues/1288
Link: 7605a9a009
Link: eea34aae2e
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20210209005719.803608-1-nathan@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 14:27:51 +00:00
Marc Zyngier
f8da5752fd arm64: cpufeatures: Allow disabling of Pointer Auth from the command-line
In order to be able to disable Pointer Authentication  at runtime,
whether it is for testing purposes, or to work around HW issues,
let's add support for overriding the ID_AA64ISAR1_EL1.{GPI,GPA,API,APA}
fields.

This is further mapped on the arm64.nopauth command-line alias.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Tested-by: Srinivas Ramana <sramana@codeaurora.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-23-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:57 +00:00
Srinivas Ramana
7f6240858c arm64: Defer enabling pointer authentication on boot core
Defer enabling pointer authentication on boot core until
after its required to be enabled by cpufeature framework.
This will help in controlling the feature dynamically
with a boot parameter.

Signed-off-by: Ajay Patil <pajay@qti.qualcomm.com>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1610152163-16554-2-git-send-email-sramana@codeaurora.org
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-22-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:57 +00:00
Marc Zyngier
93ad55b785 arm64: cpufeatures: Allow disabling of BTI from the command-line
In order to be able to disable BTI at runtime, whether it is
for testing purposes, or to work around HW issues, let's add
support for overriding the ID_AA64PFR1_EL1.BTI field.

This is further mapped on the arm64.nobti command-line alias.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Tested-by: Srinivas Ramana <sramana@codeaurora.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-21-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:57 +00:00
Marc Zyngier
a762f4ffc3 arm64: Move "nokaslr" over to the early cpufeature infrastructure
Given that the early cpufeature infrastructure has borrowed quite
a lot of code from the kaslr implementation, let's reimplement
the matching of the "nokaslr" option with it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-20-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:57 +00:00
Marc Zyngier
1945a067f3 arm64: Make kvm-arm.mode={nvhe, protected} an alias of id_aa64mmfr1.vh=0
Admitedly, passing id_aa64mmfr1.vh=0 on the command-line isn't
that easy to understand, and it is likely that users would much
prefer write "kvm-arm.mode=nvhe", or "...=protected".

So here you go. This has the added advantage that we can now
always honor the "kvm-arm.mode=protected" option, even when
booting on a VHE system.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-18-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:56 +00:00
Marc Zyngier
863ace77e9 arm64: Add an aliasing facility for the idreg override
In order to map the override of idregs to options that a user
can easily understand, let's introduce yet another option
array, which maps an option to the corresponding idreg options.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-17-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:56 +00:00
Marc Zyngier
41fac42c25 arm64: Honor VHE being disabled from the command-line
Finally we can check whether VHE is disabled on the command line,
and not enable it if that's the user's wish.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-16-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:56 +00:00
Marc Zyngier
361db0fca7 arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line
As we want to be able to disable VHE at runtime, let's match
"id_aa64mmfr1.vh=" from the command line as an override.
This doesn't have much effect yet as our boot code doesn't look
at the cpufeature, but only at the HW registers.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-15-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:56 +00:00
Marc Zyngier
3320030355 arm64: cpufeature: Add an early command-line cpufeature override facility
In order to be able to override CPU features at boot time,
let's add a command line parser that matches options of the
form "cpureg.feature=value", and store the corresponding
value into the override val/mask pair.

No features are currently defined, so no expected change in
functionality.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-14-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:50:52 +00:00
Marc Zyngier
f6f0c4362f arm64: Extract early FDT mapping from kaslr_early_init()
As we want to parse more options very early in the kernel lifetime,
let's always map the FDT early. This is achieved by moving that
code out of kaslr_early_init().

No functional change expected.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-13-maz@kernel.org
[will: Ensue KASAN is enabled before running C code]
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:50 +00:00
Marc Zyngier
b3341ae0ef arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()
__read_sysreg_by_encoding() is used by a bunch of cpufeature helpers,
which should take the feature override into account. Let's do that.

For a good measure (and because we are likely to need to further
down the line), make this helper available to the rest of the
non-modular kernel.

Code that needs to know the *real* features of a CPU can still
use read_sysreg_s(), and find the bare, ugly truth.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-12-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:12 +00:00
Marc Zyngier
8f266a5d87 arm64: cpufeature: Add global feature override facility
Add a facility to globally override a feature, no matter what
the HW says. Yes, this sounds dangerous, but we do respect the
"safe" value for a given feature. This doesn't mean the user
doesn't need to know what they are doing.

Nothing uses this yet, so we are pretty safe. For now.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-11-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:12 +00:00
Marc Zyngier
d077cb3cb9 arm64: Move SCTLR_EL1 initialisation to EL-agnostic code
We can now move the initial SCTLR_EL1 setup to be used for both
EL1 and EL2 setup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-10-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:12 +00:00
Marc Zyngier
e2df464173 arm64: Simplify init_el2_state to be non-VHE only
As init_el2_state is now nVHE only, let's simplify it and drop
the VHE setup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-9-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:11 +00:00
Marc Zyngier
19e87e1319 arm64: Move VHE-specific SPE setup to mutate_to_vhe()
There isn't much that a VHE kernel needs on top of whatever has
been done for nVHE, so let's move the little we need to the
VHE stub (the SPE setup), and drop the init_el2_state macro.

No expected functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-8-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:11 +00:00
Marc Zyngier
c6f8c92f3f arm64: Drop early setting of MDSCR_EL2.TPMS
When running VHE, we set MDSCR_EL2.TPMS very early on to force
the trapping of EL1 SPE accesses to EL2.

However:
- we are running with HCR_EL2.{E2H,TGE}={1,1}, meaning that there
  is no EL1 to trap from

- before entering a guest, we call kvm_arm_setup_debug(), which
  sets MDCR_EL2_TPMS in the per-vcpu shadow mdscr_el2, which gets
  applied on entry by __activate_traps_common().

The early setting of MDSCR_EL2.TPMS is therefore useless and can
be dropped.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-7-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:11 +00:00
Marc Zyngier
0c93df9622 arm64: Initialise as nVHE before switching to VHE
As we are aiming to be able to control whether we enable VHE or
not, let's always drop down to EL1 first, and only then upgrade
to VHE if at all possible.

This means that if the kernel is booted at EL2, we always start
with a nVHE init, drop to EL1 to initialise the the kernel, and
only then upgrade the kernel EL to EL2 if possible (the process
is obviously shortened for secondary CPUs).

The resume path is handled similarly to a secondary CPU boot.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-6-maz@kernel.org
[will: Avoid calling switch_to_vhe twice on kaslr path]
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-09 13:47:07 +00:00
Vitaly Kuznetsov
4fc096a99e KVM: Raise the maximum number of user memslots
Current KVM_USER_MEM_SLOTS limits are arch specific (512 on Power, 509 on x86,
32 on s390, 16 on MIPS) but they don't really need to be. Memory slots are
allocated dynamically in KVM when added so the only real limitation is
'id_to_index' array which is 'short'. We don't have any other
KVM_MEM_SLOTS_NUM/KVM_USER_MEM_SLOTS-sized statically defined structures.

Low KVM_USER_MEM_SLOTS can be a limiting factor for some configurations.
In particular, when QEMU tries to start a Windows guest with Hyper-V SynIC
enabled and e.g. 256 vCPUs the limit is hit as SynIC requires two pages per
vCPU and the guest is free to pick any GFN for each of them, this fragments
memslots as QEMU wants to have a separate memslot for each of these pages
(which are supposed to act as 'overlay' pages).

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210127175731.2020089-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-09 08:17:08 -05:00
Mark Rutland
6459b84697 arm64: entry: consolidate Cortex-A76 erratum 1463225 workaround
The workaround for Cortex-A76 erratum 1463225 is split across the
syscall and debug handlers in separate files. This structure currently
forces us to do some redundant work for debug exceptions from EL0, is a
little difficult to follow, and gets in the way of some future rework of
the exception entry code as it requires exceptions to be unmasked late
in the syscall handling path.

To simplify things, and as a preparatory step for future rework of
exception entry, this patch moves all the workaround logic into
entry-common.c. As the debug handler only needs to run for EL1 debug
exceptions, we no longer call it for EL0 debug exceptions, and no longer
need to check user_mode(regs) as this is always false. For clarity
cortex_a76_erratum_1463225_debug_handler() is changed to return bool.

In the SVC path, the workaround is applied earlier, but this should have
no functional impact as exceptions are still masked. In the debug path
we run the fixup before explicitly disabling preemption, but we will not
attempt to preempt before returning from the exception.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210202120341.28858-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 17:39:02 +00:00
Christian Hewitt
33b14f663d arm64: dts: meson: add initial device-tree for ODROID-HC4
ODROID-HC4 is a derivative of the C4 with minor differences:

- 16MB XT25F128B SPI-NOR flash
- 2x SATA ports via ASM1061 PCIe to SATA controller
- 7-pin header with SPI and I2C for 1-inch OLED display and RTC
- 1x USB 2.0 host port

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210202021021.11068-6-christianshewitt@gmail.com
2021-02-08 09:03:30 -08:00
Christian Hewitt
88d537bc92 arm64: dts: meson: convert meson-sm1-odroid-c4 to dtsi
Convert the ODROID-C4 dts to meson-sm1-odroid.dtsi and C4 board dts in
preparation for adding additional C4 family boards.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210202021021.11068-4-christianshewitt@gmail.com
2021-02-08 09:03:09 -08:00
Arnd Bergmann
7b9f5793e1 Enable REGULATOR_MP8859 - the main power supply for one Rockchip board.
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmAd1GIQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgVktB/9L6zZzqTK7IIPn9XLXVYEP8Am6+nfsK1pZ
 YGE5xrOaLhE3t5Kpq202xBDBkBId0poU5o6TW+QZHnSbS2uUEh88RpqE0O/Ozagz
 cES+owdGcF+rPaRzghD91ESyumH9ys2rEoy8PFxl6BeHPggGwTRlCeCu2UPaUqbz
 pxdoT6ySkc61Waf1K8dMgMl4Up3Tkx2u8kMSxvsru3GoO7K+43nB/6WyTsfD/y2b
 q1gZUN2x9/HHFjPH76AFVVJ97DU7KtW3z9X4utn41uxSGspQWJXp/6Y5FbdahMRp
 dEvy4AyAMMuzkgQgmlpmGKSpk9ZKPKuRb9n2DKTJWwia94SHEbqx
 =0bTQ
 -----END PGP SIGNATURE-----

Merge tag 'v5.12-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/defconfig

Enable REGULATOR_MP8859 - the main power supply for one Rockchip board.

* tag 'v5.12-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: defconfig: Enable REGULATOR_MP8859

Link: https://lore.kernel.org/r/4622596.31r3eYUQgx@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-02-08 16:40:20 +01:00
Marc Zyngier
f359182291 arm64: Provide an 'upgrade to VHE' stub hypercall
As we are about to change the way a VHE system boots, let's
provide the core helper, in the form of a stub hypercall that
enables VHE and replicates the full EL1 context at EL2, thanks
to EL1 and VHE-EL2 being extremely similar.

On exception return, the kernel carries on at EL2. Fancy!

Nothing calls this new hypercall yet, so no functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-5-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 12:51:26 +00:00
Marc Zyngier
8cc8a32415 arm64: Turn the MMU-on sequence into a macro
Turning the MMU on is a popular sport in the arm64 kernel, and
we do it more than once, or even twice. As we are about to add
even more, let's turn it into a macro.

No expected functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-4-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 12:51:26 +00:00
Marc Zyngier
b161f92482 arm64: Fix outdated TCR setup comment
The arm64 kernel has long be able to use more than 39bit VAs.
Since day one, actually. Let's rewrite the offending comment.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-3-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 12:51:26 +00:00
Marc Zyngier
114945d84a arm64: Fix labels in el2_setup macros
If someone happens to write the following code:

	b	1f
	init_el2_state	vhe
1:
	[...]

they will be in for a long debugging session, as the label "1f"
will be resolved *inside* the init_el2_state macro instead of
after it. Not really what one expects.

Instead, rewite the EL2 setup macros to use unambiguous labels,
thanks to the usual macro counter trick.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-2-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 12:51:26 +00:00
Suzuki K Poulose
c0b15c25d2 arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55
The erratum 1024718 affects Cortex-A55 r0p0 to r2p0. However
we apply the work around for r0p0 - r1p0. Unfortunately this
won't be fixed for the future revisions for the CPU. Thus
extend the work around for all versions of A55, to cover
for r2p0 and any future revisions.

Cc: stable@vger.kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20210203230057.3961239-1-suzuki.poulose@arm.com
[will: Update Kconfig help text]
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-08 12:30:53 +00:00
Greg Kroah-Hartman
d8c849037d Merge 5.11-rc7 into usb-next
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-08 09:09:27 +01:00
Miaohe Lin
abd4737f67 mm/arm64: Correct obsolete comment in do_page_fault()
commit d8ed45c5dcd4 ("mmap locking API: use coccinelle to convert mmap_sem
rwsem call sites") has convertd down_read_trylock() to mmap_read_trylock().
But it forgot to update the relevant comment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20210205090919.63382-1-linmiaohe@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-05 18:43:47 +00:00
Linus Torvalds
6157ce59bf x86 has lots of small bugfixes, mostly one liners. It's quite late in
5.11-rc but none of them are related to this merge window; it's just
 bugs coming in at the wrong time.  Of note among the others:
 - "KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off"
   (live migration failure seen on distros that hadn't switched to tsx=off
   right away)
 
 ARM:
 - Avoid clobbering extra registers on initialisation
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmAc+3QUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMgkAf+MdqY5F+wIOZgNMS8XfKah56hGLw0
 l7lRMrdHdDtCIoe+H8iElyIvr5+NOn7KIW48Bxtl5w3VK68h/X1+h/s+Bo0kjf5B
 Pbm0Zh5+l2tO7ocz/G1TsqDkEfWFxQI+QHcKxg1f443ZTzV1k/qM6BCNH5Pk3LFE
 kYtyOIa+YjrP0u9Bl2jZ+DCrXXRFDtDidXeHyPszErVMH90/DiGClLu5/xzCVQRD
 a+6IKLzlGc+nBj5gMXTB8dxyrZ3XrgARF/4/CCFeMLYVtwvkUHaW/ukIXTTiu8wY
 I7IGzA7lX4TZOtGVrsbEjtSaYVxd14n4KuaxvSPIHDZo3b+z0AEtcFzHtA==
 =pmlS
 -----END PGP SIGNATURE-----

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

Pull KVM fixes from Paolo Bonzini:
 "x86 has lots of small bugfixes, mostly one liners. It's quite late in
  5.11-rc but none of them are related to this merge window; it's just
  bugs coming in at the wrong time.

  Of note among the others is "KVM: x86: Allow guests to see
  MSR_IA32_TSX_CTRL even if tsx=off" that fixes a live migration failure
  seen on distros that hadn't switched to tsx=off right away.

  ARM:
  - Avoid clobbering extra registers on initialisation"

[ Sean Christopherson notes that commit 943dea8af21b ("KVM: x86: Update
  emulator context mode if SYSENTER xfers to 64-bit mode") should have
  had authorship credited to Jonny Barker, not to him.  - Linus ]

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset
  KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs
  KVM: x86: cleanup CR3 reserved bits checks
  KVM: SVM: Treat SVM as unsupported when running as an SEV guest
  KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode
  KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check
  KVM/x86: assign hva with the right value to vm_munmap the pages
  KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off
  Fix unsynchronized access to sev members through svm_register_enc_region
  KVM: Documentation: Fix documentation for nested.
  KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl
  KVM: arm64: Don't clobber x4 in __do_hyp_init
2021-02-05 10:03:01 -08:00
Dinh Nguyen
b7ff3a447d arm64: dts: agilex: fix phy interface bit shift for gmac1 and gmac2
The shift for the phy_intf_sel bit in the system manager for gmac1 and
gmac2 should be 0.

Fixes: 2f804ba7aa9ee ("arm64: dts: agilex: Add SysMgr to Ethernet nodes")
Cc: stable@vger.kernel.org
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2021-02-04 22:29:00 -06:00