summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2023-04-04s390: use init_thread_union aka initial stack for the first processHeiko Carstens
s390 is the only architecture which switches from the initial stack to a later on allocated different stack for the first process. This is (at least) problematic for the stackleak feature, which instruments functions to save the current stackpointer within the task structure of the running process. The stackleak code compares stack pointers of the current process - and doesn't expect that the kernel stack of a task can change. Even though the stackleak feature itself will not cause any harm, the assumption about kernel stacks being consistent is there, and only s390 doesn't follow that. Therefore switch back to use init_thread_union, just like all other architectures. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/stack: set lowcore kernel stack pointer earlyHeiko Carstens
Make sure the lowcore kernel stack pointer reflects the kernel stack of the current task as early as possible, instead of having a NULL pointer there. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/stack: use STACK_INIT_OFFSET where possibleHeiko Carstens
Make STACK_INIT_OFFSET also available for assembler code, and use it everywhere instead of open-coding it at several places. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/dumpstack: simplify in stack logic codeHeiko Carstens
The pattern for all in_<type>_stack() functions is the same; especially also the size of all stacks is the same. Simplify the code by passing only the stack address to the generic in_stack() helper, which then can assume a THREAD_SIZE sized stack. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390: make extables read-onlyVasily Gorbik
Currently, exception tables are marked as ro_after_init. However, since they are sorted during compile time using scripts/sorttable, they can be moved to RO_DATA using the RO_EXCEPTION_TABLE_ALIGN macro, which is specifically designed for this purpose. Suggested-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/entry: rely on long-displacement facilityVasily Gorbik
Since commit 4efd417f298b ("s390: raise minimum supported machine generation to z10"), the long-displacement facility is assumed and required for the kernel. Clean up a couple of places in the entry code, where long-displacement could be used directly instead of using a base register. However, there are still a few other places where a base register has to be used to extend short-displacement for the second lowcore page access. Notably, boot/head.S still has to be built for z900, and in mcck_int_handler, spt and lbear, which don't have long-displacements, but need to access save areas at the second lowcore page. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04Merge branch 'uaccess-inline-asm-cleanup' into featuresVasily Gorbik
Heiko Carstens says: =================== There are a couple of oddities within the s390 uaccess library functions. Therefore cleanup the whole uaccess.c file. There is no functional change, only improved readability. The output of "objdump -Dr" was always compared before/after each patch to make sure that the generated object file is identical, if that could be expected. Therefore the series also includes more patches than really required to cleanup the code. Furthermore the kunit usercopy tests also still pass. =================== Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: remove extra blank lineHeiko Carstens
In order to get uaccess.c (nearly) checkpatch warning free remove an extra blank line: CHECK: Blank lines aren't necessary before a close brace '}' + +} Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: get rid of not needed local variableHeiko Carstens
Get rid of the not needed val local variable and pass the constant value directly as operand value. In addition this turns the val operand into an input operand, since it is not changed within the inline assemblies. This in turn requires also to add the earlyclobber contraint modifier to all output operands, since the (former) val operand is used after all output variants have been modified. The usercopy kunit tests still pass after this change. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: rename tmp1 and tmp2 variablesHeiko Carstens
Rename tmp1 and tmp2 variables to more meaningful val (for value) and rem (for remainder). Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: sort EX_TABLE list for inline assembliesHeiko Carstens
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: rename/sort labels in inline assembliesHeiko Carstens
Rename and sort labels in uaccess inline assemblies to increase readability. In addition have only one EX_TABLE entry per line - also to increase readability. Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: remove unused label in inline assembliesHeiko Carstens
Remove an unused label in all three uaccess inline assemblies. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04s390/uaccess: use symbolic names for inline assembly operandsHeiko Carstens
Improve readability of the uaccess inline assemblies by using symbolic names for all input and output operands. Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-04arm64: tegra: Audio codec support on Jetson AGX OrinSameer Pujar
Jetson AGX Orin has onboard RT5640 audio codec. This patch adds the codec device node and the bindings to I2S1 interface. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMsFuad Tabba
The existing pKVM code attempts to advertise CSV2/3 using values initialized to 0, but never set. To advertise CSV2/3 to protected guests, pass the CSV2/3 values to hyp when initializing hyp's view of guests' ID_AA64PFR0_EL1. Similar to non-protected KVM, these are system-wide, rather than per cpu, for simplicity. Fixes: 6c30bfb18d0b ("KVM: arm64: Add handlers for protected VM System Registers") Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20230404152321.413064-1-tabba@google.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-04-04PCI: Introduce pci_dev_for_each_resource()Mika Westerberg
Instead of open-coding it everywhere introduce a tiny helper that can be used to iterate over each resource of a PCI device, and convert the most obvious users into it. While at it drop doubled empty line before pdev_sort_resources(). No functional changes intended. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230330162434.35055-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
2023-04-04ARM: oxnas: remove OXNAS supportNeil Armstrong
Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX810 and OX820 ARM support. Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'omap-for-v6.4/omap1-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm Clean-up for omap1 for v6.4 merge window Two clean-up patches to fix Kconfig indentation and to simplify the return path for ams_delta_modem_init(). * tag 'omap-for-v6.4/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap1: remove redundant variables err ARM: omap1: Kconfig: Fix indentation Link: https://lore.kernel.org/r/pull-1680180485-415954@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'omap-for-v6.4/cleanup-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm Clean-up for omaps for v6.4 Some clean-up changes for omaps mostly to use of_property_read_bool() and of_address_to_resource(). Also included is removal for an obsolete Kconfig option, a typo fix, a return path change for am33xx_suspend_init(), and a change to use kzalloc instead of kcalloc for a single element. * tag 'omap-for-v6.4/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element ARM: OMAP2+: Remove the unneeded result variable ARM: OMAP2+: fix repeated words in comments ARM: OMAP2+: remove obsolete config OMAP3_SDRC_AC_TIMING ARM: OMAP2+: Use of_address_to_resource() ARM: OMAP2+: Use of_property_read_bool() for boolean properties Link: https://lore.kernel.org/r/pull-1680180293-92168@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'amlogic-arm64-dt-for-v6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.4: - set of DT bindings check fixes - adjust order of some compatibles to match dt-schema migration - add support for BananaPi M2S variants - gxbb-kii-pro: add audio & bluetooth support - meson-a1: add gpio_intc node - gxl: use gxl mdio multiplexer - Add initial support for BPI-CM4 module with BPI-CM4IO baseboard * tag 'amlogic-arm64-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: amlogic: Add initial support for BPI-CM4 module with BPI-CM4IO baseboard dt-bindings: arm: amlogic: Document the boards with the BPI-CM4 connected arm64: dts: amlogic: gxl: use gxl mdio multiplexer arm64: dts: meson-a1: add gpio_intc node arm64: dts: meson: gxbb-kii-pro: add initial audio support arm64: dts: meson: gxbb-kii-pro: complete the bluetooth node arm64: dts: meson: gxbb-kii-pro: sort and tidy the dts arm64: dts: meson: adjust order of some compatibles arm64: dts: meson: add support for BananaPi M2S variants dt-bindings: arm: amlogic: add support for BananaPi M2S variants arm64: dts: amlogic: meson-gxm-s912-libretech-pc: remove unused pinctrl-names from phy node arm64: dts: amlogic: meson-sm1: use correct enable-gpios arm64: dts: amlogic: meson-s4: fix apb4 bus node name arm64: dts: amlogic: meson-g12b-odroid-go-ultra: rename keypad-gpio pinctrl node arm64: dts: amlogic: meson-g12b-radxa-zero2: fix pwm clock names arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: remove invalid #gpio-cells in onewire node arm64: dts: amlogic: meson-gxm-s912-libretech-pc: add simple connector node in fusb302 node arm64: dts: amlogic: meson-sm1-bananapi: correct usb-hub hog node name Link: https://lore.kernel.org/r/1b955bb7-1a35-8d67-beb6-dd289533ff6f@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'amlogic-arm-dt-for-v6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM DT changes for v6.4: - adjust order of some compatibles - meson8: add the xtal_32k_out pin - meson8: add the SDXC_A pins - mxiii-plus: Enable Bluetooth and WiFi support * tag 'amlogic-arm-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support ARM: dts: meson8: add the SDXC_A pins ARM: dts: meson8: add the xtal_32k_out pin arm: dts: meson: adjust order of some compatibles Link: https://lore.kernel.org/r/eb1f32f8-822d-9cfc-fca6-9e044bf4a5ab@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04ARM: dts: oxnas: remove obsolete device tree filesNeil Armstrong
Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX810 and OX820 devices. Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'at91-dt-6.4' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt AT91 device tree updates for 6.4: It contains: - Update to maximum frequency for QSPI on several boards thanks to the additon of the new spi-cs-setup-ns property. * tag 'at91-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60ek: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91: sama5d2_icp: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91-sama5d27_som1: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91-sama5d27_wlsom1: Set sst26vf064b SPI NOR flash at its maximum frequency Link: https://lore.kernel.org/r/20230331142751.41522-1-nicolas.ferre@microchip.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'omap-for-v6.4/dt-overlays-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree overlays for omaps for v6.4 Devicetree overlays for omaps to enable the optional LCD and touchscreen modules on am57xx-evm and am57xx-idk boards. * tag 'omap-for-v6.4/dt-overlays-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am57xx-idk: Add IDK displays and touchscreens ARM: dts: ti: Add AM57xx GP EVM Rev A3 board support ARM: dts: ti: Add AM57xx GP EVM board support Link: https://lore.kernel.org/r/pull-1680180448-508978@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'omap-for-v6.4/dt-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree changes for omaps for v6.4 Devicetree changes for omaps for gta04, Phytec am335x devices, and to drop a obsolete compatible property: - A non-urgent fix for gta04 to enable more dma channels for some audio configurations - Update the dts compatible and vendor prefixes for gta04 - A series of updates for Phytec am335x based boards to configure more devices like rtc and audio, and a few clean-up patches - A change to drop the usage of "ti,omap36xx" compatible, the driver code already checks for "ti,omap3630" that is also alread set in the dts files. This makes the yaml binding conversion a bit simpler. * tag 'omap-for-v6.4/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap: Drop ti,omap36xx compatible ARM: dts: am335x-phycore-som: Remove superseded/invalid GPMC NAND type. ARM: dts: am335x-pcm-953: Remove superseded/invalid LED trigger. ARM: dts: am335x-phycore-som: Remove underscore in node names. ARM: dts: am335x-regor: Remove underscore in node names. ARM: dts: am335x-pcm-935: Remove underscore in node names. ARM: dts: am335x-wega: Change node name of sound card, remove underscores. ARM: dts: am335x-wega: Fix audio codec by using simple-audio-card driver. ARM: dts: am335x-phycore-som: Add alias for TPS65910 RTC ARM: dts: omap3-gta04: fix compatible record for GTA04 board ARM: dts: gta04: fix excess dma channel usage Link: https://lore.kernel.org/r/pull-1680180389-756753@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'renesas-dts-for-v6.4-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.4 - Add USB3 support for the RZ/V2M SoC and the RZ/V2M Evaluation Kit 2.0, - Add uSD card and eMMC support for the RZ/V2M Evaluation Kit 2.0, - Add CAN-FD, thermal, GMSL2 video capture, and sound support for the R-Car V4H SoC and the White-Hawk development board, - Add PMU support for the RZ/G2UL, RZ/G2L{,C}, and RZ/V2L SoCs, - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC, - Add I2C EEPROM support for the Atmark Techno Armadillo-800-EVA, and the Renesas Condor and ULCB development boards, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (30 commits) arm64: dts: renesas: r8a779a0: Update CAN-FD to R-Car Gen4 compatible value arm64: dts: renesas: ulcb: Add I2C EEPROM for PMIC arm64: dts: renesas: condor: Add I2C EEPROM for PMIC ARM: dts: armadillo800eva: Add I2C EEPROM for MAC address arm64: dts: renesas: Remove R-Car H3 ES1.* devicetrees arm64: dts: renesas: white-hawk: Add R-Car Sound support arm64: dts: renesas: r8a779g0: R-Car Sound support arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g054: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels arm64: dts: renesas: r8a774c0: Remove bogus voltages from OPP table arm64: dts: renesas: r8a77990: Remove bogus voltages from OPP table arm64: dts: renesas: r9a07g054: Add Cortex-A55 PMU node arm64: dts: renesas: white-hawk-csi-dsi: Add and connect MAX96712 arm64: dts: renesas: r8a779g0: Add and connect all CSI-2, ISP and VIN nodes arm64: dts: renesas: r8a779f0: Use proper labels for thermal zones arm64: dts: renesas: r8a779g0: Add thermal nodes arm64: dts: renesas: rzv2mevk2: Add uart0 pins arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems arm64: dts: renesas: r9a07g044: Add Cortex-A55 PMU node ... Link: https://lore.kernel.org/r/cover.1679907064.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04ARM: configs: remove oxnas_v6_defconfigNeil Armstrong
Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX820 specific defconfig. Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04Merge tag 'renesas-arm-defconfig-for-v6.4-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.4 - Enable support for the Dialog Semiconductor DA7213 Codec, and the Renesas RZ/V2M xHCI and USB3.1 DRD controllers in the arm64 defconfig, - Disable support for the obsolete R-Car H3 ES1.* (R8A77950) SoC in the arm64 defconfig, - Refresh shmobile_defconfig for v6.3-rc1, - Enable additional support for RZ/N1 platforms in multi_v7_defconfig. * tag 'renesas-arm-defconfig-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable RZ/V2M xHCI and USB3.1 DRD controller support ARM: multi_v7_defconfig: Enable additional support for RZ/N1 platforms ARM: shmobile: defconfig: Refresh for v6.3-rc1 arm64: defconfig: Disable R-Car H3 ES1.* arm64: defconfig: Enable DA7213 Codec Link: https://lore.kernel.org/r/cover.1679907057.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-04ARM: tegra30: Use cpu* labelsMaxim Schwalm
Replace cpu paths with labels since those already exist in tree. Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04ARM: tegra30: peripherals: Add 266.5MHz nodesSvyatoslav Ryhel
LG Optimus Vu (p895) and Optimus 4X HD (p880) have 266.5MHz RAM clock and require this entry to work with it correctly. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04ARM: tegra: asus-tf101: Fix accelerometer mount matrixSvyatoslav Ryhel
Accelerometer mount matrix used in tf101 downstream is inverted. This new matrix was generated on actual device using calibration script, like on other transformers. Tested-by: Robert Eckelmann <longnoserob@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04powerpc/atomics: Remove unused functionNysal Jan K.A
Remove arch_atomic_try_cmpxchg_lock function as it is no longer used since commit 9f61521c7a28 ("powerpc/qspinlock: powerpc qspinlock implementation") Signed-off-by: Nysal Jan K.A <nysal@linux.ibm.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230224103940.1328725-1-nysal@linux.ibm.com
2023-04-04powerpc: Implement arch_within_stack_framesNicholas Miehlbradt
Walks the stack when copy_{to,from}_user address is in the stack to ensure that the object being copied is entirely a single stack frame and does not contain stack metadata. Substantially similar to the x86 implementation. The back chain is used to traverse the stack and identify stack frame boundaries. Signed-off-by: Nicholas Miehlbradt <nicholas@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230228054355.300628-1-nicholas@linux.ibm.com
2023-04-04powerpc: Use of_address_to_resource()Rob Herring
Replace open coded reading of "reg" or of_get_address()/ of_translate_address() calls with a single call to of_address_to_resource(). Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230329220337.141295-1-robh@kernel.org
2023-04-04powerpc/usbgecko: Use of_iomap()Rob Herring
Replace of_get_property()+of_translate_address()+ioremap() with a call to of_iomap() which does all those steps. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230327223109.820381-1-robh@kernel.org
2023-04-04powerpc/fsl_rio: Use of_iomap()Rob Herring
Replace of_address_to_resource()+ioremap() with a call to of_iomap() which does both of those steps. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230327223103.820229-1-robh@kernel.org
2023-04-04powerpc/xics: Use of_address_count()Rob Herring
icp_native_init_one_node() only needs the number of entries in "reg". Replace the open coded "reg" parsing with of_address_count() to get the number of "reg" entries. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230327223056.820086-1-robh@kernel.org
2023-04-04powerpc/isa-bridge: Remove open coded "ranges" parsingRob Herring
"ranges" is a standard property with common parsing functions. Users shouldn't be implementing their own parsing of it. Reimplement the ISA brige "ranges" parsing using the common ranges iterator functions. The common routines are flexible enough to work on PCI and non-PCI to ISA bridges, so refactor pci_process_ISA_OF_ranges() and isa_bridge_init_non_pci() into a single implementation. Signed-off-by: Rob Herring <robh@kernel.org> [mpe: Unsplit some strings and use pr_xxx()] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230327223045.819852-1-robh@kernel.org
2023-04-04Merge branch 'topic/ppc-kvm' into nextMichael Ellerman
Merge our KVM topic branch to bring some KVM commits into next for wider testing.
2023-04-04powerpc/papr_scm: Update the NUMA distance table for the target nodeAneesh Kumar K.V
Platform device helper routines won't update the NUMA distance table while creating a platform device, even if the device is present on a NUMA node that doesn't have memory or CPU. This is especially true for pmem devices. If the target node of the pmem device is not online, we find the nearest online node to the device and associate the pmem device with that online node. To find the nearest online node, we should have the numa distance table updated correctly. Update the distance information during the device probe. For a papr scm device on NUMA node 3 distance_lookup_table value for distance_ref_points_depth = 2 before and after fix is below: Before fix: node 3 distance depth 0 - 0 node 3 distance depth 1 - 0 node 4 distance depth 0 - 4 node 4 distance depth 1 - 2 node 5 distance depth 0 - 5 node 5 distance depth 1 - 1 After fix node 3 distance depth 0 - 3 node 3 distance depth 1 - 1 node 4 distance depth 0 - 4 node 4 distance depth 1 - 2 node 5 distance depth 0 - 5 node 5 distance depth 1 - 1 Without the fix, the nearest numa node to the pmem device (NUMA node 3) will be picked as 4. After the fix, we get the correct numa node which is 5. Fixes: da1115fdbd6e ("powerpc/nvdimm: Pick nearby online node if the device node is not online") Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230404041433.1781804-1-aneesh.kumar@linux.ibm.com
2023-04-04arm64: tegra: Support Jetson Orin NX reference platformThierry Reding
Add support for the combination of the NVIDIA Jetson Orin NX (P3767, SKU 0) module and the P3768 carrier board. Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04arm64: tegra: Support Jetson Orin NXThierry Reding
This adds a device tree for the Jetson Orin NX module, which is Jetson AGX Orin's little sibling with 6 or 8 ARM Cortex-A78AE cores, an Ampere GPU (1024 GPU and 32 tensor cores) and a number of accelerators for machine learning, image processing and more. The Jetson Orin NX comes with either 8 or 16 GiB of 128-bit LPDDR5 and supports NVME for mass storage. Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-04-04arm64: dts: renesas: r8a779a0: Revise renesas,ipmmu-mainGeert Uytterhoeven
Since IMSSTR register was undocumented on the latest datasheet and dt-bindings of renesas,ipmmu-vmsa was updated about the renesas,ipmmu-main property, revise the property on each cache IPMMU node. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/ed4c21150e42dd23412a8f4af7976f81edc1c9c2.1680592069.git.geert+renesas@glider.be
2023-04-04arm64: dts: renesas: falcon-csi-dsi: Set bus-type for MAX96712Niklas Söderlund
Specify the bus-type property for all three connected MAX96712. The default behavior when parsing a node without this property is to default to D-PHY. Making this explicit plays it safe and future proofs things as the default parsing comes from the V4L2 core and not the driver itself. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230331141431.3820311-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-04-04um: Only disable SSE on clang to work around old GCC bugsDavid Gow
As part of the Rust support for UML, we disable SSE (and similar flags) to match the normal x86 builds. This both makes sense (we ideally want a similar configuration to x86), and works around a crash bug with SSE generation under Rust with LLVM. However, this breaks compiling stdlib.h under gcc < 11, as the x86_64 ABI requires floating-point return values be stored in an SSE register. gcc 11 fixes this by only doing register allocation when a function is actually used, and since we never use atof(), it shouldn't be a problem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652 Nevertheless, only disable SSE on clang setups, as that's a simple way of working around everyone's bugs. Fixes: 884981867947 ("rust: arch/um: Disable FP/SIMD instruction to match x86") Reported-by: Roberto Sassu <roberto.sassu@huaweicloud.com> Link: https://lore.kernel.org/linux-um/6df2ecef9011d85654a82acd607fdcbc93ad593c.camel@huaweicloud.com/ Tested-by: Roberto Sassu <roberto.sassu@huaweicloud.com> Tested-by: SeongJae Park <sj@kernel.org> Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Tested-by: Arthur Grillo <arthurgrillo@riseup.net> Signed-off-by: Richard Weinberger <richard@nod.at>
2023-04-04arm64: dts: renesas: r8a779g0: Add iommus to MMC nodeYoshihiro Shimoda
Add iommus property to the MMC node for r8a779g0. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230123013448.1250991-6-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-04-04arm64: dts: renesas: r8a779g0: Add iommus to DMAC nodesYoshihiro Shimoda
Add iommus properties to the DMAC nodes for r8a779g0. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230123013448.1250991-5-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-04-04arm64: dts: renesas: r8a779g0: Add IPMMU nodesYoshihiro Shimoda
Add IPMMU nodes for r8a779g0. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20230123013448.1250991-4-yoshihiro.shimoda.uh@renesas.com [geert: Drop indices from renesas,ipmmu-main properties] [geert: s/hsc/hc/, s/vc0/vc/] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-04-04arm64: dts: renesas: r8a779f0: Revise renesas,ipmmu-mainYoshihiro Shimoda
Since IMSSTR register was undocumented on the latest datasheet and dt-bindings of renesas,ipmmu-vmsa was updated about the renesas,ipmmu-main property, revise the property on each cache IPMMU node. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20230123013448.1250991-2-yoshihiro.shimoda.uh@renesas.com [geert: Drop indices from renesas,ipmmu-main properties] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>