Commit Graph

66225 Commits

Author SHA1 Message Date
Nathan Chancellor
36168e387f ARM: Do not use NOCROSSREFS directive with ld.lld
ld.lld does not support the NOCROSSREFS directive at the moment, which
breaks the build after commit b9baf5c8c5 ("ARM: Spectre-BHB
workaround"):

  ld.lld: error: ./arch/arm/kernel/vmlinux.lds:34: AT expected, but got NOCROSSREFS

Support for this directive will eventually be implemented, at which
point a version check can be added. To avoid breaking the build in the
meantime, just define NOCROSSREFS to nothing when using ld.lld, with a
link to the issue for tracking.

Cc: stable@vger.kernel.org
Fixes: b9baf5c8c5 ("ARM: Spectre-BHB workaround")
Link: https://github.com/ClangBuiltLinux/linux/issues/1609
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-09 14:14:16 -08:00
Russell King (Oracle)
33970b031d ARM: fix co-processor register typo
In the recent Spectre BHB patches, there was a typo that is only
exposed in certain configurations: mcr p15,0,XX,c7,r5,4 should have
been mcr p15,0,XX,c7,c5,4

Reported-by: kernel test robot <lkp@intel.com>
Fixes: b9baf5c8c5 ("ARM: Spectre-BHB workaround")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-09 12:23:28 -08:00
Emmanuel Gil Peyrot
330f4c53d3 ARM: fix build error when BPF_SYSCALL is disabled
It was missing a semicolon.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Fixes: 25875aa71d ("ARM: include unprivileged BPF status in Spectre V2 reporting").
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-08 12:53:05 -08:00
Linus Torvalds
fc55c23a73 Merge tag 'for-linus-bhb' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM spectre fixes from Russell King:
 "ARM Spectre BHB mitigations.

  These patches add Spectre BHB migitations for the following Arm CPUs
  to the 32-bit ARM kernels:
   - Cortex A15
   - Cortex A57
   - Cortex A72
   - Cortex A73
   - Cortex A75
   - Brahma B15
  for CVE-2022-23960"

* tag 'for-linus-bhb' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: include unprivileged BPF status in Spectre V2 reporting
  ARM: Spectre-BHB workaround
  ARM: use LOADADDR() to get load address of sections
  ARM: early traps initialisation
  ARM: report Spectre v2 status through sysfs
2022-03-08 09:08:06 -08:00
Arnd Bergmann
d3d009847a Merge tag 'at91-soc-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/drivers
AT91 SoC #2 for 5.18:

- SAMA5D29 variant to the SAMA5D2 family in SoC driver.

* tag 'at91-soc-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: at91: add support in soc driver for new SAMA5D29
  soc: add microchip polarfire soc system controller
  ARM: at91: Kconfig: select PM_OPP
  ARM: at91: PM: add cpu idle support for sama7g5
  ARM: at91: ddr: fix typo to align with datasheet naming
  ARM: at91: ddr: align macro definitions
  ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency

Link: https://lore.kernel.org/r/20220304144216.23340-1-nicolas.ferre@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 16:49:20 +01:00
Anders Roxell
42cc353b54 arm: multi_v5: enable configs for versatile
Make it possible to boot a versatile machine in qemu.

Boot command:
 /usr/bin/qemu-system-arm -cpu arm926 -machine versatilepb \
  -nographic -nic none -m 256M -monitor none -no-reboot \
  -kernel zImage -dtb versatile-pb.dtb \
  -append "console=ttyAMA0,115200 rootwait root=/dev/vda" \
  -drive armv5_rootfs.ext4,if=none,format=raw,id=hd0 \
  -device virtio-blk-pci,drive=hd0

When doing build and boot testing, it makes more sense to enable arch
vesatile, serial amba_pl011 and virtio (mmio|blk|pci) to
multi_v5_defconfig to make that boot out of the box, with a modern
virtio (mmio|blk|pci) driver. Using the above commandline. Another way
to build and boot would be to use tuxmake/tuxrun. Tuxmake [1] builds the
kernel, and Tuxrun [2] boots the kernel in qemu. Both projects uses
podman to do the build/tests inside.  This makes both project a good
tool to use when finding a regression that you would like someone else
to reproduce with the exact same setup.

tuxmake --runtime podman --target-arch arm \
        --toolchain gcc-11 --kconfig multi_v5_defconfig
tuxrun --tuxmake ~/.cache/tuxmake/builds/3072 --device qemu-armv5

[1] https://tuxmake.org/
[2] https://tuxrun.org/

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Link: https://lore.kernel.org/r/20220308121933.3967868-1-anders.roxell@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 16:48:20 +01:00
Arnd Bergmann
9a5872bab1 Merge tag 'at91-defconfig-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig
AT91: defconfig #2 for 5.18:

- Add EIC, remove DMATEST to sama7_defconfig

* tag 'at91-defconfig-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: configs: at91: sama7: Unselect CONFIG_DMATEST
  ARM: configs: at91: add eic

Link: https://lore.kernel.org/r/20220304144746.23779-1-nicolas.ferre@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 16:42:54 +01:00
Arnd Bergmann
dd5d787f48 Merge tag 'arm-soc/for-5.18/devicetree' of https://github.com/Broadcom/stblinux into arm/dt
This pull request contains Broadcom ARM-based SoCs Device Tree changes
for 5.18, please pull the following:

- Arinc defines the switch ports of the RTL8365MB switch on the Asus
  RT-AC88U

- Richard provides cache information for the BCM2835/36/37 and BCM2711
  SoCs such that tools like "lscpu -C" can report it when supported

- Stefan adds support for the Raspberry Pi Zero 2 W (wireless)

- Matthew defines the MAC address NVMEM cells for the Cisco Meraki
  MX64/MX65 devices, he also fixes the LED for these platforms.

- Rafal adds the MAC addres NVMEM cell for the Luxul XWR-3150

* tag 'arm-soc/for-5.18/devicetree' of https://github.com/Broadcom/stblinux:
  ARM: dts: BCM5301X: Add Ethernet MAC address to Luxul XWR-3150
  ARM: dts: NSP: MX6X: correct LED function types
  ARM: dts: NSP: MX6X: get mac-address from eeprom
  arm64: dts: broadcom: Add reference to RPi Zero 2 W
  ARM: dts: Add Raspberry Pi Zero 2 W
  dt-bindings: arm: bcm2835: Add Raspberry Pi Zero 2 W
  ARM: dts: bcm2835/6: Add the missing L1/L2 cache information
  ARM: dts: bcm2711: Add the missing L1/L2 cache information
  ARM: dts: bcm2837: Add the missing L1/L2 cache information
  ARM: dts: BCM5301X: define RTL8365MB switch on Asus RT-AC88U

Link: https://lore.kernel.org/r/20220307194817.3754107-2-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 16:25:37 +01:00
Arnd Bergmann
1a38f961c4 Merge tag 'at91-dt-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt
AT91 DT #2 for 5.18:

- Align one sam9x60ek regulator with reality at vdd_1v15
- Clean sama7g5 i2c nodes
- Add EIC and NAND nodes to sama7g5

* tag 'at91-dt-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama7g5: Add NAND support
  ARM: dts: at91: sama7g5: add eic node
  ARM: dts: at91: sama7g5: Remove unused properties in i2c nodes
  ARM: dts: at91: sam9x60ek: modify vdd_1v5 regulator to vdd_1v15

Link: https://lore.kernel.org/r/20220304160036.27392-1-nicolas.ferre@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 16:22:28 +01:00
Russell King (Oracle)
25875aa71d ARM: include unprivileged BPF status in Spectre V2 reporting
The mitigations for Spectre-BHB are only applied when an exception
is taken, but when unprivileged BPF is enabled, userspace can
load BPF programs that can be used to exploit the problem.

When unprivileged BPF is enabled, report the vulnerable status via
the spectre_v2 sysfs file.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-08 14:46:08 +00:00
Joel Stanley
2f6edb6bcb ARM: dts: aspeed: Fix AST2600 quad spi group
Requesting quad mode for the FMC resulted in an error:

  &fmc {
         status = "okay";
 +       pinctrl-names = "default";
 +       pinctrl-0 = <&pinctrl_fwqspi_default>'

[    0.742963] aspeed-g6-pinctrl 1e6e2000.syscon:pinctrl: invalid function FWQSPID in map table


This is because the quad mode pins are a group of pins, not a function.

After applying this patch we can request the pins and the QSPI data
lines are muxed:

 # cat /sys/kernel/debug/pinctrl/1e6e2000.syscon\:pinctrl-aspeed-g6-pinctrl/pinmux-pins |grep 1e620000.spi
 pin 196 (AE12): device 1e620000.spi function FWSPID group FWQSPID
 pin 197 (AF12): device 1e620000.spi function FWSPID group FWQSPID
 pin 240 (Y1): device 1e620000.spi function FWSPID group FWQSPID
 pin 241 (Y2): device 1e620000.spi function FWSPID group FWQSPID
 pin 242 (Y3): device 1e620000.spi function FWSPID group FWQSPID
 pin 243 (Y4): device 1e620000.spi function FWSPID group FWQSPID

Fixes: f510f04c8c ("ARM: dts: aspeed: Add AST2600 pinmux nodes")
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20220304011010.974863-1-joel@jms.id.au
Link: https://lore.kernel.org/r/20220304011010.974863-1-joel@jms.id.au'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 13:45:48 +01:00
Arnd Bergmann
60392db617 Merge tag 'tegra-for-5.17-arm-dt-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes
ARM: tegra: Device tree fixes for v5.17

One more patch to fix up eDP panels on Nyan FHD models.

* tag 'tegra-for-5.17-arm-dt-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  ARM: tegra: Move Nyan FHD panels to AUX bus
  ARM: tegra: Move panels to AUX bus

Link: https://lore.kernel.org/r/20220308084339.2199400-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-08 13:43:42 +01:00
Thierry Reding
7401b49c50 ARM: tegra: Move Nyan FHD panels to AUX bus
Similarly to what was earlier done for other Nyan variants, move the eDP
panel on the FHD models to the AUX bus as well.

Suggested-by: Dmitry Osipenko <digetx@gmail.com>
Fixes: ef6fb9875c ("ARM: tegra: Add device-tree for 1080p version of Nyan Big")
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-03-07 19:02:39 +01:00
Drew Fustini
bceaae3bac clocksource/drivers/timer-ti-dm: Fix regression from errata i940 fix
The existing fix for errata i940 causes a conflict for IPU2 which is
using timer 3 and 4. From arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi:

  &ipu2 {
          mboxes = <&mailbox6 &mbox_ipu2_ipc3x>;
          ti,timers = <&timer3>;
          ti,watchdog-timers = <&timer4>, <&timer9>;
  };

The conflict was noticed when booting mainline on the BeagleBoard X15
which has a TI AM5728 SoC:

  remoteproc remoteproc1: 55020000.ipu is available
  remoteproc remoteproc1: powering up 55020000.ipu
  remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4
  omap-rproc 55020000.ipu: could not get timer platform device
  omap-rproc 55020000.ipu: omap_rproc_enable_timers failed: -19
  remoteproc remoteproc1: can't start rproc 55020000.ipu: -19

This change modifies the errata fix to instead use timer 15 and 16 which
resolves the timer conflict.

It does not appear to introduce any latency regression. Results from
cyclictest with original errata fix using dmtimer 3 and 4:

  # cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0
  policy: fifo: loadavg: 0.02 0.03 0.05

  T: 0 ( 1449) P:80 I:200 C: 800368 Min:   0 Act:   32 Avg:   22 Max:  128
  T: 1 ( 1450) P:80 I:200 C: 800301 Min:   0 Act:   12 Avg:   23 Max:   70

The results after the change to dmtimer 15 and 16:

  # cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0
  policy: fifo: loadavg: 0.36 0.19 0.07

  T: 0 ( 1711) P:80 I:200 C: 759599 Min:   0 Act:    6 Avg:   22 Max:  108
  T: 1 ( 1712) P:80 I:200 C: 759539 Min:   0 Act:   19 Avg:   23 Max:   79

Fixes: 25de4ce5ed ("clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940")
Link: https://lore.kernel.org/linux-omap/YfWsG0p6to3IJuvE@x1/
Suggested-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Link: https://lore.kernel.org/r/20220204053503.1409162-1-dfustini@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2022-03-07 18:27:16 +01:00
Ard Biesheuvel
6845d64d51 ARM: 9184/1: return_address: disable again for CONFIG_ARM_UNWIND=y
Commit 41918ec82e ("ARM: ftrace: enable the graph tracer with the EABI
unwinder") removed the dummy version of return_address() that was
provided for the CONFIG_ARM_UNWIND=y case, on the assumption that the
removal of the kernel_text_address() call from unwind_frame() in the
preceding patch made it safe to do so.

However, this turns out not to be the case: Corentin reports warnings
about suspicious RCU usage and other strange behavior that seems to
originate in the stack unwinding that occurs in return_address().

Given that the function graph tracer (which is what these changes were
enabling for CONFIG_ARM_UNWIND=y builds) does not appear to care about
this distinction, let's revert return_address() to the old state.

Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
Fixes: 41918ec82e ("ARM: ftrace: enable the graph tracer with the EABI unwinder")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-07 11:43:12 +00:00
Ard Biesheuvel
8167937647 ARM: 9183/1: unwind: avoid spurious warnings on bogus code addresses
Corentin reports that since commit 538b9265c0 ("ARM: unwind: track
location of LR value in stack frame"), numerous spurious warnings are
emitted into the kernel log:

  [    0.000000] unwind: Index not found c0f0c440
  [    0.000000] unwind: Index not found 00000000
  [    0.000000] unwind: Index not found c0f0c440
  [    0.000000] unwind: Index not found 00000000

This is due to the fact that the commit in question removes a check
whether the PC value in the unwound frame is actually a kernel text
address, on the assumption that such an address will not be associated
with valid unwind data to begin with, which is checked right after.

The reason for removing this check was that unwind_frame() will be
called by the ftrace graph tracer code, which means that it can no
longer be safely instrumented itself, or any code that it calls, as it
could cause infinite recursion.

In order to prevent the spurious diagnostics, let's add back the call to
kernel_text_address(), but this time, only call it if no unwind data
could be found for the address in question. This is more efficient for
the common successful case, and should avoid any unintended recursion,
considering that kernel_text_address() will only be called if no unwind
data was found.

Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
Fixes: 538b9265c0 ("ARM: unwind: track location of LR value in stack frame")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-07 11:43:12 +00:00
Chris Morgan
c042639a70 ARM: dts: rockchip: Update regulator name for PX3
The regulator name of SWITCH_REG1 does not match any other board
with a rk818 PMIC, nor does it correspond to a regulator in the
rk808-regulator driver. Changing name to SWITCH_REG which is
consistent with other boards and is in the driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20220303203958.4904-4-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-03-05 18:17:08 +01:00
Chris Morgan
f188620d6f ARM: dts: rockchip: Add #clock-cells value for rk805
Based on a brief discussion on the mailing list it was determined that
clock-cells should be a required parameter in the event that a consumer
of the clock gets added in an overlay.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20220303203958.4904-3-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-03-05 18:17:07 +01:00
Russell King (Oracle)
b9baf5c8c5 ARM: Spectre-BHB workaround
Workaround the Spectre BHB issues for Cortex-A15, Cortex-A57,
Cortex-A72, Cortex-A73 and Cortex-A75. We also include Brahma B15 as
well to be safe, which is affected by Spectre V2 in the same ways as
Cortex-A15.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-05 10:42:07 +00:00
Russell King (Oracle)
8d9d651ff2 ARM: use LOADADDR() to get load address of sections
Use the linker's LOADADDR() macro to get the load address of the
sections, and provide a macro to set the start and end symbols.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-05 10:41:58 +00:00
Russell King (Oracle)
04e91b7324 ARM: early traps initialisation
Provide a couple of helpers to copy the vectors and stubs, and also
to flush the copied vectors and stubs.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-05 10:41:42 +00:00
Russell King (Oracle)
9dd78194a3 ARM: report Spectre v2 status through sysfs
As per other architectures, add support for reporting the Spectre
vulnerability status via sysfs CPU.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2022-03-05 10:41:22 +00:00
Tudor Ambarus
92499dec3a ARM: dts: at91: sama7g5: Add NAND support
Add NAND support. The sama7g5's SMC IP is the same as sama5d2's with
a slightly change: it provides a synchronous clock output (SMC clock)
that is dedicated to FPGA usage. Since this doesn't interfere with the SMC
NAND configuration, thus code will not be added in the current nand driver
to address the FPGA usage, use the sama5d2's compatible and choose not to
introduce dedicated compatibles for sama7g5.
Tested with Micron MT29F4G08ABAEAWP NAND flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
[nicolas.ferre@microchip.com: add the definition of PMC_MCK1 in
	include/dt-bindings/clock/at91.h from another patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220111130556.905978-1-tudor.ambarus@microchip.com
2022-03-04 15:03:53 +01:00
Tudor Ambarus
5f5399843c ARM: configs: at91: sama7: Unselect CONFIG_DMATEST
The DMA test client should be selected only when one is debugging a DMA
Device driver. There's no need to select the DMA test client by default,
unselect it.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220228085906.18508-1-tudor.ambarus@microchip.com
2022-03-04 12:53:15 +01:00
Claudiu Beznea
3759326db7 ARM: configs: at91: add eic
Add eic.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220228122326.1400954-3-claudiu.beznea@microchip.com
2022-03-04 12:50:49 +01:00
Claudiu Beznea
003e17e75a ARM: dts: at91: sama7g5: add eic node
Add EIC node.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220228122326.1400954-2-claudiu.beznea@microchip.com
2022-03-04 11:43:14 +01:00
Tudor Ambarus
cbb92a7717 ARM: dts: at91: sama7g5: Remove unused properties in i2c nodes
The "atmel,use-dma-rx", "atmel,use-dma-rx" dt properties are not used by
the i2c-at91 driver, nor they are defined in the bindings file, thus remove
them.

Cc: stable@vger.kernel.org
Fixes: 7540629e2f ("ARM: dts: at91: add sama7g5 SoC DT and sama7g5-ek")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220302161854.32177-1-tudor.ambarus@microchip.com
2022-03-04 11:39:06 +01:00
Mihai Sain
dd340570a6 ARM: dts: at91: sam9x60ek: modify vdd_1v5 regulator to vdd_1v15
This regulator is powering the vddcore pins from MPU.
Its real value on the board and in the MPU datasheet is 1.15V.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220302160235.28336-1-nicolas.ferre@microchip.com
2022-03-04 11:38:03 +01:00
Christoph Hellwig
f5ff79fddf dma-mapping: remove CONFIG_DMA_REMAP
CONFIG_DMA_REMAP is used to build a few helpers around the core
vmalloc code, and to use them in case there is a highmem page in
dma-direct, and to make dma coherent allocations be able to use
non-contiguous pages allocations for DMA allocations in the dma-iommu
layer.

Right now it needs to be explicitly selected by architectures, and
is only done so by architectures that require remapping to deal
with devices that are not DMA coherent.  Make it unconditional for
builds with CONFIG_MMU as it is very little extra code, but makes
it much more likely that large DMA allocations succeed on x86.

This fixes hot plugging a NVMe thunderbolt SSD for me, which tries
to allocate a 1MB buffer that is otherwise hard to obtain due to
memory fragmentation on a heavily used laptop.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
2022-03-03 14:00:57 +03:00
Linus Torvalds
7e3d76139b Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:

 - Fix kgdb breakpoint for Thumb2

 - Fix dependency for BITREVERSE kconfig

 - Fix nommu early_params and __setup returns

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions
  ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
  ARM: Fix kgdb breakpoint for Thumb2
2022-03-02 16:11:56 -08:00
Arnd Bergmann
4d558d4d88 Merge tag 'qcom-drivers-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
Qualcomm driver updates for v5.18

This refactors the Qualcomm mdt file loader, to partially decouple it
from the SCM peripheral-authentication-service. This is needed as newer
platforms, such as the Qualcomm SM8450, require the metadata to remain
accessible to TrustZone during a longer time. This is followed by the
introduction of remoteproc drivers for SM8450 (Snapdragon 8 Gen 1).

It changes the way hardware version differences are handled in the LLCC
driver and introduces support for Qualcomm SM8450. While updating the dt
binding for LLCC it also introduces the missing SM8350 compatible.

The ocmem and aoss drivers gains missing put_device() calls and rpmpd
gains a missing check for kcalloc() failure.

The SPM driver is updated to avoid instantiating the SPM cpuidle devices
if the CPUs aren't controlled by SPM, such as when Snapdragon 8916
operates in 32-bit mode without PSCI.

The RPM power-domain driver gains MSM8226 support.

Lastly the socinfo driver gains knowledge about a few new SoCs and
PMICs.

* tag 'qcom-drivers-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (37 commits)
  soc: qcom: rpmpd: Add MSM8226 support
  dt-bindings: power: rpmpd: Add MSM8226 to rpmpd binding
  soc: qcom: mdt_loader: Fix split-firmware condition
  dt-bindings: arm: msm: Add LLCC compatible for SM8450
  dt-bindings: arm: msm: Add LLCC compatible for SM8350
  soc: qcom: llcc: Add configuration data for SM8450 SoC
  soc: qcom: llcc: Update register offsets for newer LLCC HW
  soc: qcom: llcc: Add missing llcc configuration data
  soc: qcom: llcc: Add write-cache cacheable support
  soc: qcom: llcc: Update the logic for version info extraction
  soc: qcom: llcc: Add support for 16 ways of allocation
  soc: qcom: socinfo: Add some more PMICs and SoCs
  firmware: qcom: scm: Add support for MC boot address API
  firmware: qcom: scm: Drop cpumask parameter from set_boot_addr()
  firmware: qcom: scm: Simplify set_cold/warm_boot_addr()
  cpuidle: qcom-spm: Check if any CPU is managed by SPM
  remoteproc: qcom: pas: Add SM8450 remoteproc support
  dt-bindings: remoteproc: qcom: pas: Add SM8450 PAS compatibles
  remoteproc: qcom: pas: Carry PAS metadata context
  soc: qcom: mdt_loader: Extract PAS operations
  ...

Link: https://lore.kernel.org/r/20220301042055.1804859-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 19:24:21 +01:00
Arnd Bergmann
a483b1b232 Merge tag 'mvebu-arm-5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/soc
mvebu arm for 5.18 (part 1)

gpio clean-up for Orion

* tag 'mvebu-arm-5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  ARM: orion/gpio: Get rid of unused first parameter in orion_gpio_init()

Link: https://lore.kernel.org/r/87sfs1zrfn.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 15:58:19 +01:00
Arnd Bergmann
7d8e1702b5 Merge tag 'mvebu-dt-5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt
mvebu dt for 5.18 (part 1)

Add new 2 bays NAS:
 - Ctera C200 V1 (kirkwood based)
 - Ctera C200 V2 (armada-370 based)

Add support for PCIe legacy INTx interrupts on Armada 385

Add PCIe proprty to limit the power on miniPCIe slots in Turris Omnia

* tag 'mvebu-dt-5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  ARM: dts: turris-omnia: Set PCIe slot-power-limit-milliwatt properties
  ARM: dts: mvebu: Add Ctera C-200 V2 board
  ARM: dts: kirkwood: Add Ctera C-200 V1 board
  dt-bindings: vendor-prefixes: Add Ctera Networks
  ARM: dts: armada-385.dtsi: Add definitions for PCIe legacy INTx interrupts

Link: https://lore.kernel.org/r/87pmn5zrd0.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 15:56:35 +01:00
Arnd Bergmann
8a6ea4edcf Merge tag 'v5.17-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt
- add initial support for mt6582 and Prestigio PMT5008 3G tablet
- add basic support for Airoha EN7523

* tag 'v5.17-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  ARM: dts: add GPIO support for Airoha EN7523
  ARM: Add basic support for Airoha EN7523 SoC
  dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
  dt-bindings: Add vendor prefix for Airoha
  dt-bindings: mediatek: Adds a DT binding documentation for the MT6582 SoC
  ARM: dts: Add initial support for Prestigio PMT5008 3G tablet
  ARM: dts: Add initial support for Mediatek mt6582

Link: https://lore.kernel.org/r/3974dc7e-4185-4d88-ab5b-031a7d24214d@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 15:09:43 +01:00
Daniel Palmer
ea49432d18 ARM: mstar: Select HAVE_ARM_ARCH_TIMER
The mstar SoCs have an arch timer but HAVE_ARM_ARCH_TIMER wasn't
selected. If MSC313E_TIMER isn't selected then the kernel gets
stuck at boot because there are no timers available.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Link: https://lore.kernel.org/r/20220301104349.3040422-1-daniel@0x0f.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 13:26:32 +01:00
Pali Rohár
c4deb8344a ARM: dts: turris-omnia: Set PCIe slot-power-limit-milliwatt properties
All 3 miniPCIe slots in Turris Omnia are designed for 10 W.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-03-01 11:47:13 +01:00
Arnd Bergmann
c687cdc66f Merge tag 'v5.17-next-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/defconfig
- Enable Airoha SoC on armv7 config.
- Enable CPU freq for arm64 based SoCs.
- Enable PMIC based (mt6397) RTC for mt8173

* tag 'v5.17-next-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
  arm64: defconfig: Enable cpufreq for MediaTek
  arm64: defconfig: Enable MT6397 RTC

Link: https://lore.kernel.org/r/9b90b407-025b-ec78-a626-faccdbc7ab39@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 11:28:29 +01:00
Arnd Bergmann
c199a67c42 Merge tag 'qcom-defconfig-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig
Qualcomm defconfig updates for v5.18

The Qualcomm Snapdragon 8916 devices come in both 32- or 64-bit form,
and even though the typical case so far has been to 64-bit, it's
possible to run the Dragonboard 410c in either mode.

Enable the relevant drivers in multi_v7_defconfig to enable this, and
other Snapdragon 8916 devices to run the 32-bit kernel.

* tag 'qcom-defconfig-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  ARM: multi_v7_defconfig: Enable drivers for DragonBoard 410c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 11:27:40 +01:00
Arnd Bergmann
d9bdba0782 ARM: PXA: fix up decompressor code
The earlier removal of two boards caused a build regression,
fix it by removing the extraneous '||'.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 28f74201e3 ("ARM: pxa: remove Intel Imote2 and Stargate 2 boards")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 11:16:57 +01:00
Arnd Bergmann
40c13296f8 Merge tag 'qcom-dts-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt
Qualcomm dts updates for v5.18

The MSM8226 platform gains description of USB, SoC power-domains,
PMIC multi-purpose pins, SPMI regulators, the smbb battery charger and
the LG G Watch R, on this platform, gains description of Bluetooth,
WiFI, fuel gauge, SMBB battery charger and USB.

DeviceTree validation issues in APQ8060, APQ8064, MDM9615, MSM8960,
IPQ4019 and SDX55 are corrected.

* tag 'qcom-dts-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (27 commits)
  ARM: dts: qcom: msm8226: add power domains
  ARM: dts: qcom: apq8026-lg-lenok: Add Bluetooth
  ARM: dts: qcom: apq8026-lg-lenok: Add Wifi
  ARM: dts: qcom: msm8226: Add pinctrl for sdhci nodes
  ARM: dts: qcom: sdx55: Fix the address used for PCIe EP local addr space
  ARM: dts: qcom: apq8060-dragonboard: fix typo in eMMC
  ARM: dts: qcom: pm8226: Add node for the MPP
  ARM: dts: qcom: fill missing power-domain-cells for gcc controllers
  ARM: dts: qcom: msm8960: move vsdcc regulator out of simple-bus
  ARM: dts: qcom: add KPSS GCC compatible to clock nodes
  ARM: dts: qcom: fix gic_irq_domain_translate warnings for msm8960
  ARM: dts: qcom: rename eth node to ethernet
  ARM: dts: qcom: apq8060: correct mvs switch name
  ARM: dts: qcom: nexus7: remove vcss supply which never existed
  ARM: dts: qcom: apq8064: adjust dsi node name to match dt-schema
  ARM: dts: qcom: apq8064: make pci regs property dt-schema compliant
  ARM: dts: qcom: apq8064: correct ranges values
  ARM: dts: qcom: ipq4019: fix sleep clock
  ARM: dts: qcom: pm8226: Support SPMI regulators on PMIC sid 1
  ARM: dts: qcom: pm8226: Add vibration motor node
  ...

Link: https://lore.kernel.org/r/20220301042828.1805481-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-01 11:11:08 +01:00
John Crispin
b5d8378ff0 ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
This enables basic bootup support for the Airoha EN7523 SoC.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220130145116.88406-5-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-03-01 09:08:31 +01:00
John Crispin
ecd2a1c1d5 ARM: dts: add GPIO support for Airoha EN7523
Airoha's GPIO controller on their ARM EN7523 SoCs consists of two banks of 32
GPIOs

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220130145116.88406-14-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-03-01 09:04:45 +01:00
John Crispin
2cf1c348d0 ARM: Add basic support for Airoha EN7523 SoC
EN7523 is an armv8 based silicon used inside broadband access type devices
such as xPON and xDSL. It shares various silicon blocks with MediaTek
silicon such as the MT7622.

Add basic support for Airoha EN7523, enough for booting to console.

The UART is basically 8250-compatible, except for the clock selection.
A clock-frequency value is synthesized to get this to run at 115200 bps.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220130145116.88406-4-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-03-01 09:02:01 +01:00
Rafał Miłecki
c8442f0fb0 ARM: dts: BCM5301X: Add Ethernet MAC address to Luxul XWR-3150
Luxul XWR-3150 stores MAC as NVRAM variable. Add NVMEM cell for it and
reference it in the Ethernet interface node.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-02-28 13:28:32 -08:00
Pawel Dembicki
8cd235b216 ARM: dts: mvebu: Add Ctera C-200 V2 board
Ctera C200 V2 is armada-370 based 2-Bay NAS.

Hardware:
  - SoC: Marvell 88F6707-A1 ARMv7 Processor 1,2GHz (ARMADA 370 SoC)
  - Ram: 1GB (2x Nanya NT5CC512M8DN-D1)
  - NAND Flash: 256MB (ESMT F59L2G81A-25T)
  - Lan: 1x GBE (Marvell 88E1318-NNB2)
  - Storage: 2x SATA HDD 3.5" Slot
  - USB: 2x USB 3.0 port (Renesas uPD720202)
  - Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND)
  - LEDs: 13x GPIO controlled
  - Buttons: 2x GPIO controlled

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-02-28 17:30:06 +01:00
Pawel Dembicki
5fc74dbdf8 ARM: dts: kirkwood: Add Ctera C-200 V1 board
Ctera C200 V1 is kirkwood-based 2-Bay NAS.

Hardware:
  - SoC: Marvell 88F6281-A1 ARMv5TE Processor 1.2GHz
  - Ram: 512MB (4x Nanya NT5TU128M8GE-AC)
  - NAND Flash: 256MB (Samsung 216 K9F2G08U0C)
  - Lan: 1x GBE (Marvell 88E1116R-NNC1)
  - Storage: 2x SATA HDD 3.5" Slot
  - USB: 2x USB 2.0 port
  - Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND)
  - LEDs: 13x GPIO controlled
  - Buttons: 2x GPIO controlled

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-02-28 17:23:18 +01:00
Pali Rohár
d28ce6c7c1 ARM: dts: armada-385.dtsi: Add definitions for PCIe legacy INTx interrupts
With this change legacy INTA, INTB, INTC and INTD interrupts are reported
separately and not mixed into one Linux virq source anymore.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Tested-by: Luis Mendes <luis.p.mendes@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-02-28 17:09:07 +01:00
Arnd Bergmann
bb67752b50 Merge tag 'oxnas-arm-soc-dt-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas into arm/dt
- Add Ethernet node for OX810SE base board

* tag 'oxnas-arm-soc-dt-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas:
  ARM: dts: ox810se: Add Ethernet support

Link: https://lore.kernel.org/r/530fd72c-e28a-4d5e-cb8d-8b3fbc1df89a@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-28 15:20:50 +01:00
Arnd Bergmann
2d9f1dd1f2 Merge tag 'aspeed-5.18-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt
ASPEED device tree updates for 5.18

 - New machines

  * Quanta S6Q AST2600 BMC
  * ASRock ROMED8HM3 AST2500 BMC, a half-width, single-socket Epyc
    server board

 - Facebook's Bletchley has a large update for production hardware

 - Ampere's Mt Jade has a number of updates

 - Small clenaups and additions for Everest, Rainier and Tacoma, and the
   flash layout

* tag 'aspeed-5.18-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: (27 commits)
  ARM: dts: aspeed: p10bmc: Enable ftrace in ramoops buffer
  ARM: dts: aspeed: everest: Add RTC battery gpio name
  ARM: dts: aspeed: rainer: Add RTC battery gpio name
  ARM: dts: aspeed: Add ASRock ROMED8HM3 BMC
  ARM: dts: aspeed: rainier: Remove SPI NOR controllers
  ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node
  ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
  ARM: dts: aspeed: mtjade: Update host0-ready pin
  ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
  ARM: dts: aspeed: mtjade: Enable secondary flash
  ARM: dts: aspeed: tacoma: Remove CFAM reset GPIO
  ARM: dts: aspeed: rainier: Label reset-cause-pinhole GPIO
  ARM: dts: aspeed: everest: Label reset-cause-pinhole GPIO
  ARM: dts: aspeed: tacoma: Clean up KCS nodes
  ARM: dts: aspeed: Add device tree for Quanta S6Q BMC
  ARM: dts: aspeed: bletchley: Cleanup redundant nodes
  ARM: dts: aspeed: bletchley: Enable mdio3 bus
  ARM: dts: aspeed: bletchley: Add INA230 sensor on each sled
  ARM: dts: aspeed: bletchley: Add shunt-resistor for ADM1278
  ARM: dts: aspeed: bletchley: Add interrupt support for sled io expander
  ...

Link: https://lore.kernel.org/r/CACPK8XdUXy5cnEDKmNirtByNMBGCjXwZpdKqJ0ytc0f34vzbBA@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-28 15:19:55 +01:00
Arnd Bergmann
4216cd957b Merge tag 'samsung-dt-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt
Samsung DTS ARM changes for v5.18, part two

Various cleanups after introducing DT schema: adding missing HDMI
supplies and aligning PPMU event node names with DT schema.

* tag 'samsung-dt-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: dts: exynos: align PPMU event node names with dtschema
  ARM: dts: exynos: add missing HDMI supplies on SMDK5420
  ARM: dts: exynos: add missing HDMI supplies on SMDK5250

Link: https://lore.kernel.org/r/20220226220116.13452-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-28 15:17:58 +01:00