summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2023-01-31arm64: dts: qcom: Add base QDU1000/QRU1000 DTSIsMelody Olvera
Add the base DTSI files for QDU1000 and QRU1000 SoCs, including base descriptions of CPUs, GCC, RPMHCC, QUP, TLMM, and interrupt-controller to boot to shell with console on these SoCs. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230112210722.6234-2-quic_molvera@quicinc.com
2023-01-31arm64/mm: Intercept pfn changes in set_pte_at()Anshuman Khandual
Changing pfn on a user page table mapped entry, without first going through break-before-make (BBM) procedure is unsafe. This just updates set_pte_at() to intercept such changes, via an updated pgattr_change_is_safe(). This new check happens via __check_racy_pte_update(), which has now been renamed as __check_safe_pte_update(). Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20230130121457.1607675-1-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-31x86/microcode: Allow only "1" as a late reload trigger valueAshok Raj
Microcode gets reloaded late only if "1" is written to the reload file. However, the code silently treats any other unsigned integer as a successful write even though no actions are performed to load microcode. Make the loader more strict to accept only "1" as a trigger value and return an error otherwise. [ bp: Massage commit message. ] Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230130213955.6046-3-ashok.raj@intel.com
2023-01-31cacheinfo: Remove unused check in init_cache_level()Pierre Gondois
commit e75d18cecbb3 ("arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level") checks the fw_level value in init_cache_level() in case the value is negative. Remove this check as the error code is not returned through fw_level anymore, and reset fw_level if acpi_get_cache_info() failed. This allows to try fetching the cache information from clidr_el1. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Link: https://lore.kernel.org/r/20230124154053.355376-4-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31cacheinfo: Make default acpi_get_cache_info() return an errorPierre Gondois
commit bd500361a937 ("ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info()") updates the prototype of acpi_get_cache_info(). The cache 'levels' is update through a pointer and not the return value of the function. If CONFIG_ACPI_PPTT is not defined, acpi_get_cache_info() doesn't update its *levels and *split_levels parameters and returns 0. This can lead to a faulty behaviour. Make acpi_get_cache_info() return an error code if CONFIG_ACPI_PPTT is not defined. Also, In init_cache_level(), if no PPTT is present or CONFIG_ACPI_PPTT is not defined, instead of aborting if acpi_get_cache_info() returns an error code, just continue. This allows to try fetching the cache information from clidr_el1. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Link: https://lore.kernel.org/r/20230124154053.355376-3-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31ARM: dts: dove.dtsi: Move ethphy to fix schema errorMichał Grzelak
Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml gives following warnings: mdio-bus@72004: Unevaluated properties are not allowed ('ethernet-phy' was unexpected) arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-sbc-a510.dtb As every subnode of mdio is expected to have an @X, ethernet-phy subnode in dove.dtsi doesn't have one. Fix these errors by moving ethernet-phy into relevant .dts files with correct @<reg address>. Signed-off-by: Michał Grzelak <mig@semihalf.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2023-01-31x86/static_call: Add support for Jcc tail-callsPeter Zijlstra
Clang likes to create conditional tail calls like: 0000000000000350 <amd_pmu_add_event>: 350: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 351: R_X86_64_NONE __fentry__-0x4 355: 48 83 bf 20 01 00 00 00 cmpq $0x0,0x120(%rdi) 35d: 0f 85 00 00 00 00 jne 363 <amd_pmu_add_event+0x13> 35f: R_X86_64_PLT32 __SCT__amd_pmu_branch_add-0x4 363: e9 00 00 00 00 jmp 368 <amd_pmu_add_event+0x18> 364: R_X86_64_PLT32 __x86_return_thunk-0x4 Where 0x35d is a static call site that's turned into a conditional tail-call using the Jcc class of instructions. Teach the in-line static call text patching about this. Notably, since there is no conditional-ret, in that case patch the Jcc to point at an empty stub function that does the ret -- or the return thunk when needed. Reported-by: "Erhard F." <erhard_f@mailbox.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/r/Y9Kdg9QjHkr9G5b5@hirez.programming.kicks-ass.net
2023-01-31x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructionsPeter Zijlstra
In order to re-write Jcc.d32 instructions text_poke_bp() needs to be taught about them. The biggest hurdle is that the whole machinery is currently made for 5 byte instructions and extending this would grow struct text_poke_loc which is currently a nice 16 bytes and used in an array. However, since text_poke_loc contains a full copy of the (s32) displacement, it is possible to map the Jcc.d32 2 byte opcodes to Jcc.d8 1 byte opcode for the int3 emulation. This then leaves the replacement bytes; fudge that by only storing the last 5 bytes and adding the rule that 'length == 6' instruction will be prefixed with a 0x0f byte. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/r/20230123210607.115718513@infradead.org
2023-01-31x86/alternatives: Introduce int3_emulate_jcc()Peter Zijlstra
Move the kprobe Jcc emulation into int3_emulate_jcc() so it can be used by more code -- specifically static_call() will need this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/r/20230123210607.057678245@infradead.org
2023-01-31sched/clock/x86: Mark sched_clock() noinstrPeter Zijlstra
In order to use sched_clock() from noinstr code, mark it and all it's implenentations noinstr. The whole pvclock thing (used by KVM/Xen) is a bit of a pain, since it calls out to watchdogs, create a pvclock_clocksource_read_nowd() variant doesn't do that and can be noinstr. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230126151323.702003578@infradead.org
2023-01-31x86/pvclock: Improve atomic update of last_value in pvclock_clocksource_read()Uros Bizjak
Improve atomic update of last_value in pvclock_clocksource_read: - Atomic update can be skipped if the "last_value" is already equal to "ret". - The detection of atomic update failure is not correct. The value, returned by atomic64_cmpxchg should be compared to the old value from the location to be updated. If these two are the same, then atomic update succeeded and "last_value" location is updated to "ret" in an atomic way. Otherwise, the atomic update failed and it should be retried with the value from "last_value" - exactly what atomic64_try_cmpxchg does in a correct and more optimal way. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20230118202330.3740-1-ubizjak@gmail.com Link: https://lore.kernel.org/r/20230126151323.643408110@infradead.org
2023-01-31x86/atomics: Always inline arch_atomic64*()Peter Zijlstra
As already done for regular arch_atomic*(), always inline arch_atomic64*(). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230126151323.585115019@infradead.org
2023-01-31Merge tag 'v6.2-rc6' into sched/core, to pick up fixesIngo Molnar
Pick up fixes before merging another batch of cpuidle updates. Signed-off-by: Ingo Molnar <mingo@kernel.org>
2023-01-31x86/debug: Fix stack recursion caused by wrongly ordered DR7 accessesJoerg Roedel
In kernels compiled with CONFIG_PARAVIRT=n, the compiler re-orders the DR7 read in exc_nmi() to happen before the call to sev_es_ist_enter(). This is problematic when running as an SEV-ES guest because in this environment the DR7 read might cause a #VC exception, and taking #VC exceptions is not safe in exc_nmi() before sev_es_ist_enter() has run. The result is stack recursion if the NMI was caused on the #VC IST stack, because a subsequent #VC exception in the NMI handler will overwrite the stack frame of the interrupted #VC handler. As there are no compiler barriers affecting the ordering of DR7 reads/writes, make the accesses to this register volatile, forbidding the compiler to re-order them. [ bp: Massage text, make them volatile too, to make sure some aggressive compiler optimization pass doesn't discard them. ] Fixes: 315562c9af3d ("x86/sev-es: Adjust #VC IST Stack on entering NMI handler") Reported-by: Alexey Kardashevskiy <aik@amd.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230127035616.508966-1-aik@amd.com
2023-01-31arm64: dts: mt8192: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-sleep idle state is impossible! After some research in ATF, it emerged that the cpu-sleep state is in reality putting CPUs in retention state, while the cluster-sleep one is turning off the CPUs. Summarizing renaming: - cpu-sleep -> cpu-retention - cluster-sleep -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8186: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8195: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8186: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8186 features the ARM DynamIQ technology and combines both two Cortex-A76 (big) and six Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 2e78620b1350 ("arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8192: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8192 features the ARM DynamIQ technology and combines both four Cortex-A76 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 48489980e27e ("arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8195: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8195 features the ARM DynamIQ technology and combines both four Cortex-A78 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Link: https://lore.kernel.org/r/20230126103526.417039-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: defconfig: Enable DMA_RESTRICTED_POOLNícolas F. R. A. Prado
Enable support for restricted DMA pools which provide a level of DMA memory protection on systems with limited hardware protection capabilities, such as those lacking an IOMMU. For instance, mt8192-asurada-spherion makes use of this to provide a restricted DMA region for WiFi since its MT7921E WiFi card is connected through PCIe, and the MT8192 SoC doesn't have an IOMMU context for the PCIe controller. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20230130200820.82084-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: defconfig: Enable missing configs for mt8192-asuradaNícolas F. R. A. Prado
Enable missing configs in the arm64 defconfig to get all devices probing on mt8192-asurada based machines. The devices enabled are: MediaTek Bluetooth USB controller, MediaTek PCIe Gen3 MAC controller, MT7921E wireless adapter, Elan I2C Trackpad, MediaTek SPI NOR flash controller, Mediatek SPMI Controller, ChromeOS EC regulators, MT6315 PMIC, MediaTek Video Codec, MT8192 sound cards, ChromeOS EC rpmsg communication, all MT8192 clocks. REGULATOR_CROS_EC is enabled as builtin since it powers the MMC controller for the SD card, making it required for booting on some setups. The MT8192 clocks are enabled as builtin for now since their Kconfigs are bool, and will be changed to modules after those Kconfigs are reworked. Restricted DMA pool support is also required to get working WiFi, but it is enabled in a separate commit since it alters behavior of other platforms and devices. By enabling the support for all of this platform's devices on the defconfig we make it effortless to test the relevant hardware both by developers as well as CI systems like KernelCI. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20230130200820.82084-1-nfraprado@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31powerpc/64s/radix: Fix RWX mapping with relocated kernelMichael Ellerman
If a relocatable kernel is loaded at a non-zero address and told not to relocate to zero (kdump or RELOCATABLE_TEST), the mapping of the interrupt code at zero is left with RWX permissions. That is a security weakness, and leads to a warning at boot if CONFIG_DEBUG_WX is enabled: powerpc/mm: Found insecure W+X mapping at address 00000000056435bc/0xc000000000000000 WARNING: CPU: 1 PID: 1 at arch/powerpc/mm/ptdump/ptdump.c:193 note_page+0x484/0x4c0 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc1-00001-g8ae8e98aea82-dirty #175 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-dd0dca hv:linux,kvm pSeries NIP: c0000000004a1c34 LR: c0000000004a1c30 CTR: 0000000000000000 REGS: c000000003503770 TRAP: 0700 Not tainted (6.2.0-rc1-00001-g8ae8e98aea82-dirty) MSR: 8000000002029033 <SF,VEC,EE,ME,IR,DR,RI,LE> CR: 24000220 XER: 00000000 CFAR: c000000000545a58 IRQMASK: 0 ... NIP note_page+0x484/0x4c0 LR note_page+0x480/0x4c0 Call Trace: note_page+0x480/0x4c0 (unreliable) ptdump_pmd_entry+0xc8/0x100 walk_pgd_range+0x618/0xab0 walk_page_range_novma+0x74/0xc0 ptdump_walk_pgd+0x98/0x170 ptdump_check_wx+0x94/0x100 mark_rodata_ro+0x30/0x70 kernel_init+0x78/0x1a0 ret_from_kernel_thread+0x5c/0x64 The fix has two parts. Firstly the pages from zero up to the end of interrupts need to be marked read-only, so that they are left with R-X permissions. Secondly the mapping logic needs to be taught to ensure there is a page boundary at the end of the interrupt region, so that the permission change only applies to the interrupt text, and not the region following it. Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Reported-by: Sachin Sant <sachinp@linux.ibm.com> Tested-by: Sachin Sant <sachinp@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230110124753.1325426-2-mpe@ellerman.id.au
2023-01-31powerpc/64s/radix: Fix crash with unaligned relocated kernelMichael Ellerman
If a relocatable kernel is loaded at an address that is not 2MB aligned and told not to relocate to zero, the kernel can crash due to mark_rodata_ro() incorrectly changing some read-write data to read-only. Scenarios where the misalignment can occur are when the kernel is loaded by kdump or using the RELOCATABLE_TEST config option. Example crash with the kernel loaded at 5MB: Run /sbin/init as init process BUG: Unable to handle kernel data access on write at 0xc000000000452000 Faulting instruction address: 0xc0000000005b6730 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 1 PID: 1 Comm: init Not tainted 6.2.0-rc1-00011-g349188be4841 #166 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-5b4c5a hv:linux,kvm pSeries NIP: c0000000005b6730 LR: c000000000ae9ab8 CTR: 0000000000000380 REGS: c000000004503250 TRAP: 0300 Not tainted (6.2.0-rc1-00011-g349188be4841) MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44288480 XER: 00000000 CFAR: c0000000005b66ec DAR: c000000000452000 DSISR: 0a000000 IRQMASK: 0 ... NIP memset+0x68/0x104 LR zero_user_segments.constprop.0+0xa8/0xf0 Call Trace: ext4_mpage_readpages+0x7f8/0x830 ext4_readahead+0x48/0x60 read_pages+0xb8/0x380 page_cache_ra_unbounded+0x19c/0x250 filemap_fault+0x58c/0xae0 __do_fault+0x60/0x100 __handle_mm_fault+0x1230/0x1a40 handle_mm_fault+0x120/0x300 ___do_page_fault+0x20c/0xa80 do_page_fault+0x30/0xc0 data_access_common_virt+0x210/0x220 This happens because mark_rodata_ro() tries to change permissions on the range _stext..__end_rodata, but _stext sits in the middle of the 2MB page from 4MB to 6MB: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002400000 with 2.00 MiB pages (exec) The logic that changes the permissions assumes the linear mapping was split correctly at boot, so it marks the entire 2MB page read-only. That leads to the write fault above. To fix it, the boot time mapping logic needs to consider that if the kernel is running at a non-zero address then _stext is a boundary where it must split the mapping. That leads to the mapping being split correctly, allowing the rodata permission change to take happen correctly, with no spillover: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000000500000 with 64.0 KiB pages radix-mmu: Mapped 0x0000000000500000-0x0000000000600000 with 64.0 KiB pages (exec) radix-mmu: Mapped 0x0000000000600000-0x0000000002400000 with 2.00 MiB pages (exec) If the kernel is loaded at a 2MB aligned address, the mapping continues to use 2MB pages as before: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002c00000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000002c00000-0x0000000100000000 with 2.00 MiB pages Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230110124753.1325426-1-mpe@ellerman.id.au
2023-01-31powerpc/kexec_file: Fix division by zero in extra size estimationMichael Ellerman
In kexec_extra_fdt_size_ppc64() there's logic to estimate how much extra space will be needed in the device tree for some memory related properties. That logic uses the size of RAM divided by drmem_lmb_size() to do the estimation. However drmem_lmb_size() can be zero if the machine has no hotpluggable memory configured, which is the case when booting with qemu and no maxmem=x parameter is passed (the default). The division by zero is reported by UBSAN, and can also lead to an overflow and a warning from kvmalloc, and kdump kernel loading fails: WARNING: CPU: 0 PID: 133 at mm/util.c:596 kvmalloc_node+0x15c/0x160 Modules linked in: CPU: 0 PID: 133 Comm: kexec Not tainted 6.2.0-rc5-03455-g07358bd97810 #223 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1200 0xf000005 of:SLOF,git-dd0dca pSeries NIP: c00000000041ff4c LR: c00000000041fe58 CTR: 0000000000000000 REGS: c0000000096ef750 TRAP: 0700 Not tainted (6.2.0-rc5-03455-g07358bd97810) MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 24248242 XER: 2004011e CFAR: c00000000041fed0 IRQMASK: 0 ... NIP kvmalloc_node+0x15c/0x160 LR kvmalloc_node+0x68/0x160 Call Trace: kvmalloc_node+0x68/0x160 (unreliable) of_kexec_alloc_and_setup_fdt+0xb8/0x7d0 elf64_load+0x25c/0x4a0 kexec_image_load_default+0x58/0x80 sys_kexec_file_load+0x5c0/0x920 system_call_exception+0x128/0x330 system_call_vectored_common+0x15c/0x2ec To fix it, skip the calculation if drmem_lmb_size() is zero. Fixes: 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230130014707.541110-1-mpe@ellerman.id.au
2023-01-31ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newerNathan Chancellor
Commit 6a7ee50f8f56 ("ARM: disallow pre-ARMv5 builds with ld.lld") prevented v4 or v4t kernels when ld.lld will link the kernel due to inserting unsupported blx instructions. ld.lld has been fixed in current main (16.0.0) to avoid inserting these instructions by inserting position independent thunks instead. Allow these configurations to be enabled when ld.lld 16.0.0 is used to link the kernel. Additionally, add a link to the upstream LLVM issue so that the reason for this dependency is clearly documented. Link: https://github.com/ClangBuiltLinux/linux/issues/964 Link: https://github.com/llvm/llvm-project/commit/6f9ff1beee9d12aca0c9caa9ae0051dc6d0a718c Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-01-31ARM: 9288/1: Kconfigs: fix spelling & grammarRandy Dunlap
Fix spelling (reported by codespell) and grammar in Arm Kconfig files. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-01-31Merge tag 'imx-soc-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 6.3: - Call ida_simple_remove() to free up ID allocated by ida_simple_get() for MMDC driver. - Add i.MX6ULZ compatible string to match table. * tag 'imx-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: mach-imx6ul: add imx6ulz support ARM: imx: Call ida_simple_remove() for ida_simple_get Link: https://lore.kernel.org/r/20230130023947.11780-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'samsung-soc-6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v6.3 1. Correct s3c64xx_set_timer_source() prototype. 2. Re-work MIPI and DP phys as children of Exynos PMU system controller. This both better reflects actual device hierarchy and allows to remove later few warnings from dtc W=1 and dtbs_check. * tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-pmu: allow phys as child ARM: s3c: fix s3c64xx_set_timer_source prototype Link: https://lore.kernel.org/r/20230129143944.5104-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux into ↵Arnd Bergmann
arm/soc This pull request contains Broadcom ARM SoCs machine updates for 6.3, please pull the following: - Dario removes an useless goto in the BCM63xx SMP bring up code * tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux: ARM: BCM63xx: remove useless goto statement Link: https://lore.kernel.org/r/20230128193849.1628945-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'imx-defconfig-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.3: - Drop PROVE_LOCKING option from imx_v6_v7_defconfig. - Enable i.MX ICC and DEVFREQ driver as they are required by i.MX8MP boot. * tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING arm64: defconfig: select i.MX ICC and DEVFREQ Link: https://lore.kernel.org/r/20230130023947.11780-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'arm-soc/for-6.3/defconfig' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into soc/defconfig This pull request contains Broadcom ARM SoCs defconfig updates for 6.3, please pull the following: - Stefan enables the necessary configuration options to make use of the framebuffer on Raspberry Pi devices * tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Switch to SimpleDRM ARM: bcm2835_defconfig: Enable the framebuffer Link: https://lore.kernel.org/r/20230128193823.1628716-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'sunxi-config-for-6.3-1' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/defconfig - Enable Allwinner D1 platform and drivers * tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: defconfig: Enable the Allwinner D1 platform and drivers Link: https://lore.kernel.org/r/Y9Ra7dxkfMI9Xp3F@jernej-laptop Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30sh: checksum: add missing linux/uaccess.h includeJakub Kicinski
SuperH does not include uaccess.h, even tho it calls access_ok(). Fixes: 68f4eae781dd ("net: checksum: drop the linux/uaccess.h include") Reviewed-by: Simon Horman <simon.horman@corigine.com> Tested-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230128073108.1603095-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31powerpc/imc-pmu: Revert nest_init_lock to being a mutexMichael Ellerman
The recent commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") fixed warnings (and possible deadlocks) in the IMC PMU driver by converting the locking to use spinlocks. It also converted the init-time nest_init_lock to a spinlock, even though it's not used at runtime in IRQ disabled sections or while holding other spinlocks. This leads to warnings such as: BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 1, expected: 0 CPU: 7 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc2-14719-gf12cd06109f4-dirty #1 Hardware name: Mambo,Simulated-System POWER9 0x4e1203 opal:v6.6.6 PowerNV Call Trace: dump_stack_lvl+0x74/0xa8 (unreliable) __might_resched+0x178/0x1a0 __cpuhp_setup_state+0x64/0x1e0 init_imc_pmu+0xe48/0x1250 opal_imc_counters_probe+0x30c/0x6a0 platform_probe+0x78/0x110 really_probe+0x104/0x420 __driver_probe_device+0xb0/0x170 driver_probe_device+0x58/0x180 __driver_attach+0xd8/0x250 bus_for_each_dev+0xb4/0x140 driver_attach+0x34/0x50 bus_add_driver+0x1e8/0x2d0 driver_register+0xb4/0x1c0 __platform_driver_register+0x38/0x50 opal_imc_driver_init+0x2c/0x40 do_one_initcall+0x80/0x360 kernel_init_freeable+0x310/0x3b8 kernel_init+0x30/0x1a0 ret_from_kernel_thread+0x5c/0x64 Fix it by converting nest_init_lock back to a mutex, so that we can call sleeping functions while holding it. There is no interaction between nest_init_lock and the runtime spinlocks used by the actual PMU routines. Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Tested-by: Kajol Jain<kjain@linux.ibm.com> Reviewed-by: Kajol Jain<kjain@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230130014401.540543-1-mpe@ellerman.id.au
2023-01-30Merge tag 'amlogic-arm-dt-for-v6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM mach-meson changes for v6.3: - align OPP table names with DT schema - meson8/8b: Add more L2 (PL310) cache properties - align LED node names with dtschema * tag 'amlogic-arm-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson8: align OPP table names with DT schema ARM: dts: meson8b: Add more L2 (PL310) cache properties ARM: dts: meson8: Add more L2 (PL310) cache properties ARM: dts: meson: align LED node names with dtschema Link: https://lore.kernel.org/r/61700737-c226-1c07-fba7-6dca896fdab4@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'amlogic-arm64-dt-for-v6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changes for v6.3: - Merge of immutable bindings branch with Reset & power domain binding - New boards: - Odroid-N2L (Smaller version of Odroid-N2+) - BananaPi M2-Pro (Variant of BPI=M5 with on-board wifi) - Radxa Zero2 (New version of Radza Zero with A311D SoC) - Add DT node for the VIPNano-QI on the A311D - DT bindings fixups covering all SoC families - MAC address nodes - ethernet PHY node name - scpi & child node names - SD/SDIO node name - USB supply name - invalid clock-names - rng node name - rtc node name - ETH phy mux node name - button & adc keys node name - leds node names - RK818 pmic properties - remove CPU opps below 1GHz for G12A boards, like it was done for G12B/SM1 - Fix WiFi/Bt definition around P212 & Khadas VIM1 - Add audio node to P212 - Fix FAN trip definition to Odroid-HC4 - Fix gpio-fan gpios definition - Permit Radxa Zero OTG on USB1 - Fix VDDIO_C enable gpio by using OPEN DRAIN flag * tag 'amlogic-arm64-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: (43 commits) arm64: dts: meson: add support for Radxa Zero2 dt-bindings: arm: amlogic: add support for Radxa Zero2 arm64: dts: meson: add support for BananaPi M2-Pro dt-bindings: arm: amlogic: add support for BananaPi M2-Pro arm64: dts: meson: bananapi-m5: convert dts to dtsi arm64: dts: meson: bananapi-m5: remove redundant status from sound node arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN arm64: dts: meson: radxa-zero: allow usb otg mode arm64: dts: meson-gxm-khadas-vim2: use gpio-fan matrix instead of an array arm64: dts: meson-g12b-odroid: Add initial support for Hardkernel ODROID-N2L arm64: dts: meson-g12b: move common node into new odroid.dtsi dt-bindings: arm: amlogic: document Odroid-N2L arm64: dts: amlogic: meson-sm1-odroid-hc4: fix active fan thermal trip arm64: dts: meson: add audio playback to S905X-P212 dts arm64: dts: meson: remove WiFi/BT nodes from Khadas VIM1 arm64: dts: meson: move pwm_ef node in P212 dtsi arm64: dts: meson: add Broadcom WiFi to P212 dtsi arm64: dts: amlogic: meson-g12b-odroid-go-ultra: fix rk818 pmic properties arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name ... Link: https://lore.kernel.org/r/c1641ffd-71c9-9ac9-89d9-c22da4acea10@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'imx-dt64-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree change for 6.3: - New board support: i.MX8MP Beacon Kit, Debix Model A Board, Verdin Yavia boards. - Add Flexcan and ADC support for i.MX93. - A series from Krzysztof Kozlowski to align LED node names with dtschema and use generic node name for rave-sp. - Move PCIe controller clock setup from board dts to SoC dtsi. - Add clock-cells to i.MX8MP hsio-blk-ctrl device. - Add TMU phandle to calibration data in OCOTP for i.MX8M. - Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM. - Drop sd-vsel-gpios from i.MX8M Verdin SoM and DHCOM SoM. - A series from Peng Fan to improve iomuxc-gpr device for i.MX8M. - Declare IOMMU cache-coherent page table walk feature for LS1028A and LS1088A. - A few small corrections and random updates. * tag 'imx-dt64-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (50 commits) arm64: ls1046ardb: Use in-band-status for SFP module arm64: dts: imx8mp-verdin: Add yavia carrier board arm64: dts: imx8mm-verdin: Add yavia carrier board arm64: dts: imx8q: use generic node name for rave-sp arm64: dts: imx8mp-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mm-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus DHCOM SoM arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus Verdin SoM arm64: dts: imx8mm: Drop sd-vsel-gpios from i.MX8M Mini Verdin SoM arm64: dts: imx8mp: Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM arm64: dts: freescale: Introduce imx8mp-beacon-kit arm64: dts: imx8mm-evk: use correct gpio-expander compatible arm64: dts: imx93: add ADC support arm64: dts: imx8mp: Reorder clock to match fsl,imx6q-pcie.yaml arm64: dts: imx8mq: Deduplicate PCIe clock-names property arm64: dts: imx8mm: Deduplicate PCIe clock-names property arm64: dts: verdin-imx8mp: unify gpio-key node name arm64: dts: ls1028a: sl28: get MAC addresses from VPD arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL arm64: dts: imx8mp: Add LCDIF2 & LDB nodes ... Link: https://lore.kernel.org/r/20230130023947.11780-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'imx-dt-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm device tree change for 6.3: - New board support: SK-iMX53, DHCOM i.MX6ULL based boards. - Increase MMC maximum frequency for i.MXRT1050. - A series from Krzysztof Kozlowski to align LED node names with dtschema, and use use generic node name for rave-sp device. - Use new media bus type macros for i.MX device trees. - A series from Marcel Ziswiler to improve gpio-key for Colibri and Apalis device trees. - A series from Marek Vasut to drop interrupt-names from dma-apb device. - A series from Philippe Schenker to disable USB over-current for Colibri and Apalis boards. - A few other small corrections and random changes. * tag 'imx-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (29 commits) ARM: dts: imx6ull-dhcom: Add DHSOM based DRC02 board ARM: dts: imx6ull-dhcom: Add DHCOM based PicoITX board ARM: dts: imx6ull-dhcom: Add DH electronics DHCOM i.MX6ULL SoM and PDK2 board ARM: dts: imx7s: correct iomuxc gpr mux controller cells ARM: dts: imx: use generic node name for rave-sp ARM: dts: ls1021a: Disable CAN nodes by default ARM: dts: apalis/colibri-imx6/6ull/7: proper gpio-key node names ARM: dts: colibri-imx6ull: improve wake-up with gpio key ARM: dts: colibri-imx6: improve wake-up with gpio key ARM: dts: imx: e70k02: Add touchscreen ARM: dts: vfxxx: Swap SAI DMA order ARM: dts: freescale: Use new media bus type macros ARM: dts: tqma6ul + mba6ulx: Fix temperature sensor compatible ARM: dts: imx: Add support for SK-iMX53 board ARM: dts: imx7s: Drop dma-apb interrupt-names ARM: dts: imx6ul: Drop dma-apb interrupt-names ARM: dts: imx6sx: Drop dma-apb interrupt-names ARM: dts: imx6qdl: Drop dma-apb interrupt-names ARM: dts: mxs: Drop dma-apb interrupt-names ARM: dts: imx6qdl: use MAC-address from nvmem ... Link: https://lore.kernel.org/r/20230130023947.11780-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'dt-cleanup-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM DTS for v6.3, part two Align UART node names and OPP table names with bindings (alpine, arm boards, axm55xx, berlin, cx92755, dm814x, moxart, mstar, stih418). * tag 'dt-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: berlin: align UART node name with bindings ARM: dts: stih418: align OPP table names with DT schema ARM: dts: dm814x: align UART node name with bindings ARM: dts: moxart: align UART node name with bindings ARM: dts: axm55xx: align UART node name with bindings ARM: dts: alpine: align UART node name with bindings ARM: dts: arm: align UART node name with bindings ARM: dts: cx92755: align UART node name with bindings ARM: dts: mstar: align UART node name with bindings Link: https://lore.kernel.org/r/20230129144525.5802-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'dt64-cleanup-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM64 DTS for v6.3, part two 1. Drop deprecated "device_type" property from serial nodes (apm, amazon). 2. Align UART node names and OPP table names with bindings (hisilicon, realtek, synaptics). 3. Use "okay" for status, as expected by Devicetree specification and dtschema. * tag 'dt64-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: amd: use "okay" for status arm64: dts: apm: use "okay" for status arm64: dts: microchip: use "okay" for status arm64: dts: synaptics: align UART node name with bindings arm64: dts: hisilicon: align UART node name with bindings arm64: dts: realtek: align UART node name with bindings arm64: dts: amazon: drop deprecated serial device_type arm64: dts: apm: drop deprecated serial device_type Link: https://lore.kernel.org/r/20230129144525.5802-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'samsung-dt64-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v6.3, part two Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - drop or correct incorrect properties in several boards, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. * tag 'samsung-dt64-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos7 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos5433 arm64: dts: exynos: move exynos-bus nodes out of soc in Exynos5433 arm64: dts: exynos: use lowercase hex addresses arm64: dts: exynos: correct wlf,micd-dbtime on TM2 arm64: dts: exynos: add interrupt-controller to WM5110 on TM2 arm64: dts: exynos: add VPH_PWR regulator on TM2 arm64: dts: exynos: correct Bluetooth LED triger on E850-96 arm64: dts: exynos: add ADC supply on Exynos7 Espresso arm64: dts: exynos: disable non-working GPU on Exynos7 Espresso arm64: dts: exynos: drop unsupported UFS properties in ExynosAutov9 SADK Link: https://lore.kernel.org/r/20230129143944.5104-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'samsung-dt-6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v6.3 1. Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - align node names with the bindings, - drop or correct incorrect properties in several boards, - correct HDMI bridge ports nodes on Exynos4412 Midas, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. 2. Correct Exynos5420 MIPI DSI and phy compatibles. 3. Correct Exynos4210 and Exynos4412 HDMI phy compatibles. 4. Add Samsung Galaxy S5 (SM-G900H) board. * tag 'samsung-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (27 commits) ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos54xx ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos5250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4412 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4210 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos3250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos5420 ARM: dts: exynos: use lowercase hex addresses ARM: dts: exynos: use generic node names for phy ARM: dts: exynos: correct HDMI phy compatible in Exynos4 ARM: dts: exynos: Add Samsung Galaxy S5 (SM-G900H) board dt-bindings: arm: samsung: Add compatible for Samsung Galaxy S5 (SM-G900H) ARM: dts: exynos: Use Exynos5422 compatible for the DSI controller ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy ARM: dts: exynos: correct HSI2C properties in Exynos5410 Odroid XU ARM: dts: exynos: correct HS200 property in Exynos5260 ARM: dts: exynos: correct SATA clocks in Exynos5250 ARM: dts: exynos: align HSOTG/USB node names ARM: dts: exynos: add backlight supply in P4 Note ARM: dts: exynos: add panel supply in Tiny4412 ARM: dts: exynos: add ports in HDMI bridge in Exynos4412 Midas ... Link: https://lore.kernel.org/r/20230129143944.5104-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'arm-soc/for-6.3/devicetree-arm64' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64 SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the SMMMU Device Tree nodes to use the desired regular expression matched by the dtschema and he also removes the deprecated "device_type" property for serial node(s) * tag 'arm-soc/for-6.3/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: drop deprecated serial device_type arm64: dts: broadcom: align SMMU node names with DT schema Link: https://lore.kernel.org/r/20230128193834.1628831-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'arm-soc/for-6.3/devicetree' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the various Broadcom SoCs DTS UART nodes with the binding convention to use "serial" * tag 'arm-soc/for-6.3/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: align UART node name with bindings Link: https://lore.kernel.org/r/20230128193829.1628773-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'sunxi-dt-for-6.3-1' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt - introduce Allwinner D1 DTSI - add boards: Dongshan Nezha STU, MangoPi MQ (Pro), Sipeed Lichee RV, Nezha - add D1 power controller node - Add SATA regulator to Bananapi M3 - fix regulator reference for nanopi-duo2 - fix GPIO node names - align HDMI CEC node name for h3-beelink-x2 - add DPHY interrupt to A64 and A33 * tag 'sunxi-dt-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: dts: allwinner: d1: Add power controller node riscv: Add the Allwinner SoC family Kconfig option riscv: dts: allwinner: Add Dongshan Nezha STU devicetree riscv: dts: allwinner: Add MangoPi MQ Pro devicetree riscv: dts: allwinner: Add Sipeed Lichee RV devicetrees riscv: dts: allwinner: Add Allwinner D1 Nezha devicetree riscv: dts: allwinner: Add MangoPi MQ devicetree riscv: dts: allwinner: Add the D1/D1s SoC devicetree dt-bindings: riscv: Add Allwinner D1/D1s board compatibles dt-bindings: vendor-prefixes: Add Allwinner D1/D1s board vendors MAINTAINERS: Match the sun20i family of Allwinner SoCs ARM: dts: sun8i: a83t: bananapi-m3: describe SATA disk regulator ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference ARM: dts: sunxi: Fix GPIO LED node names ARM: dts: sun8i: h3-beelink-x2: align HDMI CEC node names with dtschema arm64: dts: allwinner: a64: Add DPHY interrupt ARM: dts: sun8i: a33: Add DPHY interrupt Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge branch 'iommu-memory-accounting' of ↵Jason Gunthorpe
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu intoiommufd/for-next Jason Gunthorpe says: ==================== iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the iommu_domain and these allocations are not tracked. This series is the first step in fixing it. The iommu driver contract already includes a 'gfp' argument to the map_pages op, allowing iommufd to specify GFP_KERNEL_ACCOUNT and then having the driver allocate the IOPTE tables with that flag will capture a significant amount of the allocations. Update the iommu_map() API to pass in the GFP argument, and fix all call sites. Replace iommu_map_atomic(). Audit the "enterprise" iommu drivers to make sure they do the right thing. Intel and S390 ignore the GFP argument and always use GFP_ATOMIC. This is problematic for iommufd anyhow, so fix it. AMD and ARM SMMUv2/3 are already correct. A follow up series will be needed to capture the allocations made when the iommu_domain itself is allocated, which will complete the job. ==================== * 'iommu-memory-accounting' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/s390: Use GFP_KERNEL in sleepable contexts iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s iommu/intel: Use GFP_KERNEL in sleepable contexts iommu/intel: Support the gfp argument to the map_pages op iommu/intel: Add a gfp parameter to alloc_pgtable_page() iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map() iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous() iommu: Add a gfp parameter to iommu_map_sg() iommu: Remove iommu_map_atomic() iommu: Add a gfp parameter to iommu_map() Link: https://lore.kernel.org/linux-iommu/0-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2023-01-30Merge tag 'tegra-for-6.3-arm64-dt' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v6.3-rc1 There are two big changes in this: one is to bump the #address-cells and the #size-cells properties to 2 so that bus address translations work correctly and another to sort nodes according to a scheme that we've been trying to follow, but where some inconsistencies have accumulated over the years. As for the rest, this adds mostly new things on Tegra234, such as USB host and device support and identification EEPROMs found on Jetson AGX Orin. Some cleanups are also included, such as the removal of unneeded properties or duplicated nodes. * tag 'tegra-for-6.3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Drop I2C iommus and dma-coherent properties arm64: tegra: Mark host1x as dma-coherent on Tegra194/234 arm64: tegra: Populate the XUDC node for Tegra234 arm64: tegra: Add dma-coherent property for Tegra194 XUDC arm64: tegra: Populate Jetson AGX Orin EEPROMs arm64: tegra: Populate address/size cells for Tegra234 I2C arm64: tegra: Enable XUSB host function on Jetson AGX Orin arm64: tegra: Sort nodes by unit-address, then alphabetically arm64: tegra: Bump #address-cells and #size-cells arm64: tegra: Sort includes arm64: tegra: Fix duplicate regulator on Jetson TX1 arm64: tegra: Fix typo in gpio-ranges property Link: https://lore.kernel.org/r/20230127163719.460954-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'tegra-for-6.3-arm-dt' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v6.3-rc1 Just a single patch to properly sort nodes and make the DTS files easier to read. * tag 'tegra-for-6.3-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Sort nodes by unit-address, then alphabetically Link: https://lore.kernel.org/r/20230127163719.460954-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'renesas-dts-for-v6.3-tag2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT updates for v6.3 (take two) - High Performance mode (1.8 GHz) support for the Cortex-A76 CPU cores on R-Car V4H, - GPIO interrupt support for the RZ/G2UL SoC and the RZ/G2UL SMARC EVK development board, - USB Function support for the RZ/N1D SoC, - Generic Sound Card driver examples for the Renesas R-Car Starter Kit Premier/Pro and Shimafugi Kingfisher development board stack, - Universal Flash Storage support for the Renesas Spider development board, - External Power Sequence Controller (PWC) support for the RZ/V2M SoC and the RZ/V2M Evaluation Kit 2.0, - IOMMU support for MMC on the R-Car S4-8 SoC, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (25 commits) arm64: dts: renesas: r8a779f0: Add iommus to MMC node arm64: dts: renesas: v2mevk2: Add PWC support arm64: dts: renesas: r9a09g011: Add PWC support arm64: dts: renesas: r9a09g011: Reword ethernet status arm64: dts: renesas: r8a774[be]1-beacon: Sync aliases with RZ/G2M arm64: dts: renesas: beacon-renesom: Fix audio clock rate arm64: dts: renesas: beacon-renesom: Update Ethernet PHY ID arm64: dts: renesas: beacon-renesom: Fix gpio expander reference arm64: dts: renesas: spider-cpu: Enable UFS device arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card dtsi arm64: dts: renesas: #sound-dai-cells is used when simple-card ARM: dts: renesas: #sound-dai-cells is used when simple-card arm64: dts: renesas: eagle: Add SCIF_CLK support ARM: dts: r9a06g032: Add the USBF controller node arm64: dts: renesas: rzg2ul-smarc-som: Add PHY interrupt support for ETH{0/1} ... Link: https://lore.kernel.org/r/cover.1674815099.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>