aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-31arm64: Call ARCH_WORKAROUND_2 on transitions between EL0 and EL1Marc Zyngier2-0/+46
In order for the kernel to protect itself, let's call the SSBD mitigation implemented by the higher exception level (either hypervisor or firmware) on each transition between userspace and kernel. We must take the PSCI conduit into account in order to target the right exception level, hence the introduction of a runtime patching callback. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Julien Grall <julien.grall@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-05-31crypto: clarify licensing of OpenSSL asm codeAdam Langley3-6/+30
Several source files have been taken from OpenSSL. In some of them a comment that "permission to use under GPL terms is granted" was included below a contradictory license statement. In several cases, there was no indication that the license of the code was compatible with the GPLv2. This change clarifies the licensing for all of these files. I've confirmed with the author (Andy Polyakov) that a) he has licensed the files with the GPLv2 comment under that license and b) that he's also happy to license the other files under GPLv2 too. In one case, the file is already contained in his CRYPTOGAMS bundle, which has a GPLv2 option, and so no special measures are needed. In all cases, the license status of code has been clarified by making the GPLv2 license prominent. The .S files have been regenerated from the updated .pl files. This is a comment-only change. No code is changed. Signed-off-by: Adam Langley <agl@chromium.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-05-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller5-31/+83
Lots of easy overlapping changes in the confict resolutions here. Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-26Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-1/+0
Pull ARM SoC fixes from Olof Johansson: "A few more fixes for v4.17: - a fix for a crash in scm_call_atomic on qcom platforms - display fix for Allwinner A10 - a fix that re-enables ethernet on Allwinner H3 (C.H.I.P et al) - a fix for eMMC corruption on hikey - i2c-gpio descriptor tables for ixp4xx ... plus a small typo fix" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: Fix i2c-gpio GPIO descriptor tables arm64: dts: hikey: Fix eMMC corruption regression firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1() ARM: sun8i: v3s: fix spelling mistake: "disbaled" -> "disabled" ARM: dts: sun4i: Fix incorrect clocks for displays ARM: dts: sun8i: h3: Re-enable EMAC on Orange Pi One
2018-05-26Merge tag 'hisi-fixes-for-4.17v2' of git://github.com/hisilicon/linux-hisi into fixesOlof Johansson1-1/+0
ARM64: hisi fixes for 4.17 - Remove eMMC max-frequency property to fix eMMC corruption on hikey board * tag 'hisi-fixes-for-4.17v2' of git://github.com/hisilicon/linux-hisi: arm64: dts: hikey: Fix eMMC corruption regression Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-26Merge tag 'qcom-dts-for-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dtOlof Johansson2-12/+363
Qualcomm Device Tree Changes for v4.18 - Part 2 * Numerous updates for IPQ8074 and IPQ4019 based devices * Add support for Sony Xperia Z1 Compact * tag 'qcom-dts-for-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: ipq8074: Enable few peripherals for hk01 board ARM: dts: ipq8074: Add pcie nodes ARM: dts: ipq8074: Add peripheral nodes ARM: dts: ipq4019: Add qcom-ipq4019-ap.dk07.1-c2 board file ARM: dts: ipq4019: Add qcom-ipq4019-ap.dk07.1-c1 board file ARM: dts: ipq4019: Add ipq4019-ap.dk07.1 common data ARM: dts: ipq4019: Add qcom-ipq4019-ap.dk04.1-c3 board file ARM: dts: ipq4019: Add ipq4019-ap.dk04.1-c1 board file ARM: dts: ipq4019: Add ipq4019-ap.dk04.dtsi ARM: dts: ipq4019: Change the max opp frequency ARM: dts: ipq4019: Add a few peripheral nodes ARM: dts: ipq4019: Add a default chosen node ARM: dts: qcom: msm8974: Add Sony Xperia Z1 Compact Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-26Merge tag 'qcom-arm64-for-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dtOlof Johansson3-18/+4
Qualcomm ARM64 Updates for v4.18 Part 2 * Fix UFS GDSC on msm8996 * Remove unused BT node regulator * Correct WLAN PCIe regulator endpoint name * tag 'qcom-arm64-for-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: apq8096-db820c: Removed bt-en-1-8v regulator arm64: dts: fix regulator property name for wlan pcie endpoint arm64: dts: qcom: msm8996: Use UFS_GDSC for UFS Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-26Merge tag 'qcom-arm64-defconfig-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfigOlof Johansson1-0/+10
Qualcomm ARM64 Based defconfig Updates for v4.18 * Enable UFS and PCIe for Qualcomm msm8996/db820c * tag 'qcom-arm64-defconfig-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: Enable PCIe on msm8996 and db820c arm64: defconfig: Enable UFS on msm8996 Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-26arm64: dts: hikey: Fix eMMC corruption regressionJohn Stultz1-1/+0
This patch is a partial revert of commit abd7d0972a19 ("arm64: dts: hikey: Enable HS200 mode on eMMC") which has been causing eMMC corruption on my HiKey board. Symptoms usually looked like: mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) ... mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc0: new HS200 MMC card at address 0001 ... dwmmc_k3 f723d000.dwmmc0: Unexpected command timeout, state 3 mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) print_req_error: I/O error, dev mmcblk0, sector 8810504 Aborting journal on device mmcblk0p10-8. mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) EXT4-fs error (device mmcblk0p10): ext4_journal_check_start:61: Detected aborted journal EXT4-fs (mmcblk0p10): Remounting filesystem read-only And quite often this would result in a disk that wouldn't properly boot even with older kernels. It seems the max-frequency property added by the above patch is causing the problem, so remove it. Cc: Ryan Grachek <ryan@edited.us> Cc: Wei Xu <xuwei5@hisilicon.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: YongQin Liu <yongqin.liu@linaro.org> Cc: Leo Yan <leo.yan@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Wei Xu <xuwei04@gmail.com>
2018-05-25arm64: dts: sprd: whale2: Add the rtc enable clock for watchdogBaolin Wang1-2/+3
Add the rtc enable clock for watchdog controller to make it work well. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25arm64: dts: sprd: Add GPIO and GPIO keys device nodesBaolin Wang3-0/+91
This patch adds device nodes to enable one GPIO controller located on digital chip, 2 EIC (external interrupt controller) controllers loacted on PMIC and digital chip for Spreadtrum SC9860 platform. Moreover this patch adds 3 GPIO keys relied on EIC controller to support power key and volume up/down keys. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'hisi-defconfig-for-4.18v3' of git://github.com/hisilicon/linux-hisi into next/defconfigOlof Johansson1-0/+6
ARM64: hisilicon: defconfig updates for 4.18 - Enable the support of ethernet, eMMC, Combo/INNO phy and PCIe for Hi3798CV200 - Enable the LPC for hip06 and hip07 * tag 'hisi-defconfig-for-4.18v3' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: Enable HISILICON_LPC arm64: defconfig: enable drivers for Poplar support Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25arm64: dts: sprd: fix typo in 'remote-endpoint'Rob Herring1-1/+1
dtc now warns on incomplete OF graph endpoint connections: arch/arm64/boot/dts/sprd/sp9860g-1h10.dtb: Warning (graph_endpoint): /soc/stm@10006000/port/endpoint: graph connection to node '/soc/funnel@10001000/ports/port@2/endpoint' is not bidirectional The cause is a typo in 'remote-endpoint'. Cc: Orson Zhai <orsonzhai@gmail.com> Cc: Baolin Wang <baolin.wang@linaro.org> Cc: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'samsung-dt64-4.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dtOlof Johansson1-2/+12
Samsung DTS ARM64 changes for v4.18, part 2 1. Add clocks necessary for DECON hardware windows no 4 and 5 on Exynos5433. * tag 'samsung-dt64-4.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add more clocks to Exynos5433 Decon/DeconTV Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'berlin64-dt-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin into next/dtOlof Johansson8-174/+64
Berlin64 DT changes for v4.18 * tag 'berlin64-dt-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin: arm64: dts: move berlin SoC files from marvell dir to synaptics dir arm64: dts: berlin4ct-*.dts: use SPDX-License-Identifier arm64: dts: berlin4ct: use SPDX-License-Identifier Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'amlogic-dt64-3' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dtOlof Johansson3-6/+18
Amlogic 64-bit DT updates, round3 - AXG: add new clock driver * tag 'amlogic-dt64-3' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson: fix clock source of the pclk for UART_AO ARM64: dts: meson-axg: add AO clock driver dt-bindings: clock: reset: Add AXG AO Clock and Reset Bindings dt-bindings: clock: axg-aoclkc: New binding for Meson-AXG SoC clk: meson: gxbb: expose VDEC_1 and VDEC_HEVC clocks dt-bindings: clock: meson8b: export the NAND clock Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'amlogic-dt64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dtOlof Johansson2-23/+62
Amlogic 64-bit DT updates for v4.18, round 2 - AXG I2C fixups/cleanups * tag 'amlogic-dt64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-axg: enable i2c AO on the S400 board ARM64: dts: meson-axg: add i2c AO pins ARM64: dts: meson-axg: correct i2c AO clock ARM64: dts: meson-axg: clean-up i2c nodes Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'qcom-arm64-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dtOlof Johansson12-25/+1031
Qualcomm ARM64 Updates for v4.18 * Add support for SDM845 and associated peripherals * Fix gic_irq_domain_translation warnings on Qualcomm platforms * Add binding for GENI SE, Qualcomm bluetooth, and Command DB * Add support for SDHCI and ramoops on MSM8992 * Fixup qcom,pcie devices to pcie * Add wlan, bluetooth, and micro SD supplies on db820c * Add UFS related nodes on MSM8996 * tag 'qcom-arm64-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: qcom: msm8996: Add ufs related nodes arm64: dts: msm8996: fix gic_irq_domain_translate warnings arm64: dts: qcom: sdm845: Sort nodes in the soc by address arm64: dts: qcom: sdm845: Sort nodes in the reserved mem by address arm64: dts: sdm845: Add command DB node arm64: dts: sdm845: Fix xo_board clock name and speed arm64: dts: qcom: Add SDM845 SMEM nodes arm64: dts: qcom: Add APSS shared mailbox node to SDM845 arm64: dts: msm8916: fix gic_irq_domain_translate warnings dt-bindings: introduce Command DB for QCOM SoCs arm64: dts: apq8096-db820c: Add micro sd card supplies dt-bindings: soc: qcom: Add device tree binding for GENI SE dt-bindings: net: bluetooth: Add qualcomm-bluetooth arm64: dts: apq8096-db820c: enable bluetooth node arm64: dts: apq8096-db820c: Enable wlan and bt en pins arm64: dts: qcom: rename qcom,pcie devices to pcie arm64: dts: msm8992: add pstore-ramoops support arm64: dts: sdm845: Add minimal dts/dtsi files for sdm845 SoC and MTP arm64: dts: Enable onboard SDHCI on msm8992 Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25arm64: dts: apq8096-db820c: Removed bt-en-1-8v regulatorThierry Escande2-15/+1
This patch removes the unused bt-en-1-8v regulator and moves the bt_en_gios claim to the pm8994_gpios node. This bt_en_gpio could have been moved to the bluetooth serial node but instead this node declares an 'enable' gpio addressing the bt_en_gpio. This is needed by the Qualcomm QCA6174 WLAN/BT combo chip that needs to have the bt_en_gpio claimed even if only WLAN is used. Signed-off-by: Thierry Escande <thierry.escande@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25arm64: dts: fix regulator property name for wlan pcie endpointNiklas Cassel1-1/+1
The property name vddpe-supply is not included in Documentation/devicetree/bindings/pci/qcom,pcie.txt nor in the pcie-qcom PCIe Root Complex driver. This property name was used in an initial patchset for pcie-qcom, but was renamed in a later revision. Therefore, the regulator is currently never enabled, leaving us with unoperational wlan. Fix this by using the correct regulator property name, so that wlan comes up correctly. Fixes: 1c8ca74a2ea1 ("arm64: dts: apq8096-db820c: Enable wlan and bt en pins") Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25arm64: dts: qcom: msm8996: Use UFS_GDSC for UFSBjorn Andersson1-2/+2
The UFS host controller occationally (20%) fails to enable gcc_ufs_axi_clk because the UFS GDSC is not enabled. In most cases it's enabled through the UFS phy driver, but to make sure it's enabled let's enable it directly from the UFS host controller directly as well. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25Merge tag 'sunxi-dt64-for-4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dtOlof Johansson4-9/+97
Allwinner arm64 changes for 4.18 We mostly have some changes to support the H6, Allwinner latest SoC. We're still in the preliminary phase, with I2C, pinctrl and clock support. * tag 'sunxi-dt64-for-4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: h6: add PCF8563 RTC on Pine H64 board arm64: allwinner: h6: add R_I2C controller arm64: allwinner: h6: add R_INTC interrupt controller arm64: allwinner: h6: add node for R_PIO pin controller arm64: allwinner: h6: add PRCM CCU device node arm64: dts: allwinner: a64: bananapi-m64: add usb otg arm64: dts: allwinner: axp803: Add drivevbus regulator arm64: allwinner: h6: restore the usage of CCU slice macros Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'sunxi-h3-h5-for-4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dtOlof Johansson3-3/+18
Allwinner H3/H5 support for 4.18 Here is our usual bunch of changes for the H3 and H5 SoCs that share the same SoC design but with different CPUs. This time, most of the changes are about supporting CPUFreq on these SoCs, with voltage scaling being enabled for a number of boards. * tag 'sunxi-h3-h5-for-4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC arm64: dts: allwinner: Add dts file for Libre Computer Board ALL-H3-CC H5 ver. arm64: dts: allwinner: Sort dtb entries in Makefile arm64: dts: allwinner: h5: Add cpu0 label for first cpu ARM: dts: sun8i: h2+: Add Libre Computer Board ALL-H3-CC H2+ ver. ARM: dts: sun8i: h2-plus: Sort dtb entries in Makefile arm: dts: sun8i: h3: libretech-all-h3-cc: Move board definition to common dtsi ARM: dts: sun8i: h3: fix ALL-H3-CC H3 ver VCC-1V2 regulator voltage ARM: dts: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver ARM: dts: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage ARM: dts: sun8i: h3: add SY8113B regulator used by Orange Pi One board ARM: dts: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board ARM: dts: sun8i: h3: add operating-points-v2 table for CPU ARM: dts: sunxi: h3/h5: Add r_i2c I2C controller ARM: dts: sunxi: h3/h5: Add r_i2c pinmux node Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'imx-dt64-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dtOlof Johansson2-6/+6
Freescale arm64 device tree update for 4.18: - Add unit address for ls208xa-rdb SPI flash node matching 'reg' property to fix DTC warning unit_address_vs_reg. - Use hypen instead of underscore in aliases name for fsl-ls1012a to fix DTC warning alias_paths. * tag 'imx-dt64-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: fsl-ls1012a: Fix DTC aliases warnings arm64: dts: ls208xa-rdb: Pass unit name to SPI flash node Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25arm64: defconfig: Enable PCIe on msm8996 and db820cBjorn Andersson1-0/+5
The msm8996 PCIe sits behind the "agnoc0", which is represented as a simple-pm-bus, so enable support for this. Then enable the QMP phy driver. Also enable the atl1c ethernet driver and ath10k wlan driver to support these components on the DragonBoard820c. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25ARM: dts: ipq8074: Enable few peripherals for hk01 boardSricharan R1-0/+54
Reviewed-by: Abhishek Sahu <absahu@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sricharan R <sricharan@codeaurora.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25ARM: dts: ipq8074: Add pcie nodesSricharan R1-1/+156
The driver/phy support for ipq8074 is available now. So enabling the nodes in DT. Reviewed-by: Abhishek Sahu <absahu@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sricharan R <sricharan@codeaurora.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25ARM: dts: ipq8074: Add peripheral nodesSricharan R2-13/+155
Add serial, i2c, bam, spi, qpic peripheral nodes. While here, fix the PMU node's irq trigger to avoid the boot warnings from GIC. Reviewed-by: Abhishek Sahu <absahu@codeaurora.org> Signed-off-by: Sricharan R <sricharan@codeaurora.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-25arm64: defconfig: Enable HISILICON_LPCJohn Garry1-0/+1
Now that the driver has been merged for the HiSilicon LPC host, enable the relevant config. Turning on this config will also enable config INDIRECT_PIO, which would have not been enabled previously - see config info for more details. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-05-25arm64: defconfig: enable drivers for Poplar supportShawn Guo1-0/+5
It enables driver support of Ethernet, eMMC, Combo/INNO phy and PCIe for Hi3798CV200 Poplar platform. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-05-25Merge tag 'uniphier-dt64-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dtOlof Johansson3-2/+14
UniPhier ARM64 SoC DT updates for v4.18 - add more properties to ethernet nodes * tag 'uniphier-dt64-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add syscon-phy-mode property to each ethernet node arm64: dts: uniphier: add clock-names and reset-names to ethernet node Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'mvebu-dt64-4.18-1' of git://git.infradead.org/linux-mvebu into next/dtOlof Johansson6-0/+119
mvebu dt64 for 4.18 (part 1) - Allow using Armada 3700 gpio controller as interrupt one too - Describe SPI flash on the EspressoBin - Mark ahci as dma-coherent for Armada 7K/8K - Add 10G interface support Armada 7K/8K based boards (including MacBin) * tag 'mvebu-dt64-4.18-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: armada-37xx: mark the gpio controllers as irq controller arm64: dts: marvell: 7040-db: describe the 10G interface as fixed-link arm64: dts: marvell: 8040-db: describe the 10G interfaces as fixed-link arm64: dts: marvell: mcbin: enable the fourth network interface arm64: dts: marvell: mcbin: add 10G SFP support arm64: dts: marvell: mark CP110 ahci as dma-coherent arm64: dts: armada-3720-espressobin: wire up spi flash Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'mvebu-arm64-4.18-1' of git://git.infradead.org/linux-mvebu into next/defconfigOlof Johansson1-0/+2
mvebu arm64 for 4.18 (part 1) Adding thermal for Armada 7K/8K and SPI for Armada 3700 * tag 'mvebu-arm64-4.18-1' of git://git.infradead.org/linux-mvebu: arm64: defconfig: enable the Armada thermal driver arm64: defconfig: enable CONFIG_SPI_ARMADA_3700 Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'renesas-arm64-defconfig-for-v4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfigOlof Johansson1-2/+4
Renesas ARM64 Based SoC Defconfig Updates for v4.18 * Enable in ARM64 defconfig: - Recently mainlined support for R-Car E3 (r8a77990) SoC - HDMI sound and depdencies. HDMI sound is used by R-Car Gen 3. These options are enabled as modules to avoid unnecesesarily enlarging the kernel image. * tag 'renesas-arm64-defconfig-for-v4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable R8A77990 SoC arm64: defconfig: Enable CONFIG_SND_AUDIO_GRAPH_CARD arm64: defconfig: makes SND_SIMPLE_CARD to module Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dtOlof Johansson4-12/+466
Amlogic 64-bit DT updates for v4.18 - AXG family: support more peripherals (wifi, eMMC, clocks) - GX family: add/enable USB host support * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus dt-bindings: arm: amlogic: add support for the Meson8m2 SoC ARM64: dts: meson-axg: enable AP6255 wifi module ARM64: dts: meson: add MMC resets ARM64: dts: meson-axg: add an 32K alt aoclk ARM64: dts: meson-axg: add tdm pins ARM64: dts: meson-axg: add GPIO interrupt controller support ARM64: dts: meson-axg: enable the eMMC controller ARM64: dts: meson-gx: fix gxl clock controller compatible ARM64: dts: meson-axg: use hhi syscon for the clock controller ARM64: dts: meson-gx: sysctrl is the parent of the clock controller dt-bindings: clock: meson: update documentation with hhi syscon Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25Merge tag 'hisi-arm64-dt-for-4.18v2' of git://github.com/hisilicon/linux-hisi into next/dtOlof Johansson8-3/+532
ARM64: DT: Hisilicon SoC DT updates for 4.18v2 - Add mailbox, stub clock, CPU frequency scaling, thermal cooling management and pcie msi interruption support for hi3660 - Add LPC support for hip06 and hip07 - Add PCIe, usb and emmc support for hi3798cv200 * tag 'hisi-arm64-dt-for-4.18v2' of git://github.com/hisilicon/linux-hisi: arm64: dts: hi3798cv200: enable emmc support for poplar board arm64: dts: hi3798cv200: enable usb2 support for poplar board arm64: dts: hi3798cv200: enable PCIe support for poplar board arm64: dts: hisi: Enable Hisi LPC node for hip07 arm64: dts: hisi: Enable Hisi LPC node for hip06 arm64: dts: hi3660: Add pcie msi interrupt attribute arm64: dts: hi3660: Add thermal cooling management arm64: dts: hi3660: Add CPU frequency scaling support arm64: dts: hi3660: Add stub clock node arm64: dts: hi3660: Add mailbox node Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25KVM: arm/arm64: Add KVM_VGIC_V3_ADDR_TYPE_REDIST_REGIONEric Auger1-0/+1
This new attribute allows the userspace to set the base address of a reditributor region, relaxing the constraint of having all consecutive redistibutor frames contiguous. Signed-off-by: Eric Auger <eric.auger@redhat.com> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Invoke FPSIMD context switch trap from CDave Martin3-51/+13
The conversion of the FPSIMD context switch trap code to C has added some overhead to calling it, due to the need to save registers that the procedure call standard defines as caller-saved. So, perhaps it is no longer worth invoking this trap handler quite so early. Instead, we can invoke it from fixup_guest_exit(), with little likelihood of increasing the overhead much further. As a convenience, this patch gives __hyp_switch_fpsimd() the same return semantics fixup_guest_exit(). For now there is no possibility of a spurious FPSIMD trap, so the function always returns true, but this allows it to be tail-called with a single return statement. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Fold redundant exit code checks out of fixup_guest_exit()Dave Martin1-4/+8
The entire tail of fixup_guest_exit() is contained in if statements of the form if (x && *exit_code == ARM_EXCEPTION_TRAP). As a result, we can check just once and bail out of the function early, allowing the remaining if conditions to be simplified. The only awkward case is where *exit_code is changed to ARM_EXCEPTION_EL1_SERROR in the case of an illegal GICv2 CPU interface access: in that case, the GICv3 trap handling code is skipped using a goto. This avoids pointlessly evaluating the static branch check for the GICv3 case, even though we can't have vgic_v2_cpuif_trap and vgic_v3_cpuif_trap true simultaneously unless we have a GICv3 and GICv2 on the host: that sounds stupid, but I haven't satisfied myself that it can't happen. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Remove redundant *exit_code changes in fpsimd_guest_exit()Dave Martin1-12/+4
In fixup_guest_exit(), there are a couple of cases where after checking what the exit code was, we assign it explicitly with the value it already had. Assuming this is not indicative of a bug, these assignments are not needed. This patch removes the redundant assignments, and simplifies some if-nesting that becomes trivial as a result. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Remove eager host SVE state savingDave Martin2-31/+0
Now that the host SVE context can be saved on demand from Hyp, there is no longer any need to save this state in advance before entering the guest. This patch removes the relevant call to kvm_fpsimd_flush_cpu_state(). Since the problem that function was intended to solve now no longer exists, the function and its dependencies are also deleted. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Save host SVE context as appropriateDave Martin4-2/+39
This patch adds SVE context saving to the hyp FPSIMD context switch path. This means that it is no longer necessary to save the host SVE state in advance of entering the guest, when in use. In order to avoid adding pointless complexity to the code, VHE is assumed if SVE is in use. VHE is an architectural prerequisite for SVE, so there is no good reason to turn CONFIG_ARM64_VHE off in kernels that support both SVE and KVM. Historically, software models exist that can expose the architecturally invalid configuration of SVE without VHE, so if this situation is detected at kvm_init() time then KVM will be disabled. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64/sve: Move sve_pffr() to fpsimd.h and make inlineDave Martin3-13/+24
In order to make sve_save_state()/sve_load_state() more easily reusable and to get rid of a potential branch on context switch critical paths, this patch makes sve_pffr() inline and moves it to fpsimd.h. <asm/processor.h> must be included in fpsimd.h in order to make this work, and this creates an #include cycle that is tricky to avoid without modifying core code, due to the way the PR_SVE_*() prctl helpers are included in the core prctl implementation. Instead of breaking the cycle, this patch defers inclusion of <asm/fpsimd.h> in <asm/processor.h> until the point where it is actually needed: i.e., immediately before the prctl definitions. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64/sve: Switch sve_pffr() argument from task to threadDave Martin1-5/+5
sve_pffr(), which is used to derive the base address used for low-level SVE save/restore routines, currently takes the relevant task_struct as an argument. The only accessed fields are actually part of thread_struct, so this patch changes the argument type accordingly. This is done in preparation for moving this function to a header, where we do not want to have to include <linux/sched.h> due to the consequent circular #include problems. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64/sve: Move read_zcr_features() out of cpufeature.hDave Martin5-29/+32
Having read_zcr_features() inline in cpufeature.h results in that header requiring #includes which make it hard to include <asm/fpsimd.h> elsewhere without triggering header inclusion cycles. This is not a hot-path function and arguably should not be in cpufeature.h in the first place, so this patch moves it to fpsimd.c, compiled conditionally if CONFIG_ARM64_SVE=y. This allows some SVE-related #includes to be dropped from cpufeature.h, which will ease future maintenance. A couple of missing #includes of <asm/fpsimd.h> are exposed by this change under arch/arm64/. This patch adds the missing #includes as necessary. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashingDave Martin7-31/+180
This patch refactors KVM to align the host and guest FPSIMD save/restore logic with each other for arm64. This reduces the number of redundant save/restore operations that must occur, and reduces the common-case IRQ blackout time during guest exit storms by saving the host state lazily and optimising away the need to restore the host state before returning to the run loop. Four hooks are defined in order to enable this: * kvm_arch_vcpu_run_map_fp(): Called on PID change to map necessary bits of current to Hyp. * kvm_arch_vcpu_load_fp(): Set up FP/SIMD for entering the KVM run loop (parse as "vcpu_load fp"). * kvm_arch_vcpu_ctxsync_fp(): Get FP/SIMD into a safe state for re-enabling interrupts after a guest exit back to the run loop. For arm64 specifically, this involves updating the host kernel's FPSIMD context tracking metadata so that kernel-mode NEON use will cause the vcpu's FPSIMD state to be saved back correctly into the vcpu struct. This must be done before re-enabling interrupts because kernel-mode NEON may be used by softirqs. * kvm_arch_vcpu_put_fp(): Save guest FP/SIMD state back to memory and dissociate from the CPU ("vcpu_put fp"). Also, the arm64 FPSIMD context switch code is updated to enable it to save back FPSIMD state for a vcpu, not just current. A few helpers drive this: * fpsimd_bind_state_to_cpu(struct user_fpsimd_state *fp): mark this CPU as having context fp (which may belong to a vcpu) currently loaded in its registers. This is the non-task equivalent of the static function fpsimd_bind_to_cpu() in fpsimd.c. * task_fpsimd_save(): exported to allow KVM to save the guest's FPSIMD state back to memory on exit from the run loop. * fpsimd_flush_state(): invalidate any context's FPSIMD state that is currently loaded. Used to disassociate the vcpu from the CPU regs on run loop exit. These changes allow the run loop to enable interrupts (and thus softirqs that may use kernel-mode NEON) without having to save the guest's FPSIMD state eagerly. Some new vcpu_arch fields are added to make all this work. Because host FPSIMD state can now be saved back directly into current's thread_struct as appropriate, host_cpu_context is no longer used for preserving the FPSIMD state. However, it is still needed for preserving other things such as the host's system registers. To avoid ABI churn, the redundant storage space in host_cpu_context is not removed for now. arch/arm is not addressed by this patch and continues to use its current save/restore logic. It could provide implementations of the helpers later if desired. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flagsDave Martin6-19/+18
In struct vcpu_arch, the debug_flags field is used to store debug-related flags about the vcpu state. Since we are about to add some more flags related to FPSIMD and SVE, it makes sense to add them to the existing flags field rather than adding new fields. Since there is only one debug_flags flag defined so far, there is plenty of free space for expansion. In preparation for adding more flags, this patch renames the debug_flags field to simply "flags", and updates comments appropriately. The flag definitions are also moved to <asm/kvm_host.h>, since their presence in <asm/kvm_asm.h> was for purely historical reasons: these definitions are not used from asm any more, and not very likely to be as more Hyp asm is migrated to C. KVM_ARM64_DEBUG_DIRTY_SHIFT has not been used since commit 1ea66d27e7b0 ("arm64: KVM: Move away from the assembly version of the world switch"), so this patch gets rid of that too. No functional change. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christoffer Dall <christoffer.dall@arm.com> [maz: fixed minor conflict] Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64/sve: Refactor user SVE trap maintenance for external useDave Martin1-15/+15
In preparation for optimising the way KVM manages switching the guest and host FPSIMD state, it is necessary to provide a means for code outside arch/arm64/kernel/fpsimd.c to restore the user trap configuration for SVE correctly for the current task. Rather than requiring external code to duplicate the maintenance explicitly, this patch moves the trap maintenenace to fpsimd_bind_to_cpu(), since it is logically part of the work of associating the current task with the cpu. Because fpsimd_bind_to_cpu() is rather a cryptic name to publish alongside fpsimd_bind_state_to_cpu(), the former function is renamed to fpsimd_bind_task_to_cpu() to make its purpose more explicit. This patch makes appropriate changes to ensure that fpsimd_bind_task_to_cpu() is always called alongside task_fpsimd_load(), so that the trap maintenance continues to be done in every situation where it was done prior to this patch. As a side-effect, the metadata updates done by fpsimd_bind_task_to_cpu() now change from conditional to unconditional in the "already bound" case of sigreturn. This is harmless, and a couple of extra stores on this slow path will not impact performance. I consider this a reasonable price to pay for a slightly cleaner interface. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64: fpsimd: Eliminate task->mm checksDave Martin2-25/+19
Currently the FPSIMD handling code uses the condition task->mm == NULL as a hint that task has no FPSIMD register context. The ->mm check is only there to filter out tasks that cannot possibly have FPSIMD context loaded, for optimisation purposes. Also, TIF_FOREIGN_FPSTATE must always be checked anyway before saving FPSIMD context back to memory. For these reasons, the ->mm checks are not useful, providing that TIF_FOREIGN_FPSTATE is maintained in a consistent way for all threads. The context switch logic is already deliberately optimised to defer reloads of the regs until ret_to_user (or sigreturn as a special case), and save them only if they have been previously loaded. These paths are the only places where the wrong_task and wrong_cpu conditions can be made false, by calling fpsimd_bind_task_to_cpu(). Kernel threads by definition never reach these paths. As a result, the wrong_task and wrong_cpu tests in fpsimd_thread_switch() will always yield true for kernel threads. This patch removes the redundant checks and special-case code, ensuring that TIF_FOREIGN_FPSTATE is set whenever a kernel thread is scheduled in, and ensures that this flag is set for the init task. The fpsimd_flush_task_state() call already present in copy_thread() ensures the same for any new task. With TIF_FOREIGN_FPSTATE always set for kernel threads, this patch ensures that no extra context save work is added for kernel threads, and eliminates the redundant context saving that may currently occur for kernel threads that have acquired an mm via use_mm(). Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-05-25arm64: fpsimd: Avoid FPSIMD context leakage for the init taskDave Martin1-6/+7
The init task is started with thread_flags equal to 0, which means that TIF_FOREIGN_FPSTATE is initially clear. It is theoretically possible (if unlikely) that the init task could reach userspace without ever being scheduled out. If this occurs, data left in the FPSIMD registers by the kernel could be exposed. This patch fixes this anomaly by ensuring that the init task's initial TIF_FOREIGN_FPSTATE is set. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Fixes: 005f78cd8849 ("arm64: defer reloading a task's FPSIMD state to userland resume") Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>