Commit graph

1,280,080 commits

Author SHA1 Message Date
Samuel Holland
daef19263f
riscv: mm: Always use an ASID to flush mm contexts
Even if multiple ASIDs are not supported, using the single-ASID variant
of the sfence.vma instruction preserves TLB entries for global (kernel)
pages. So it is always more efficient to use the single-ASID code path.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-14-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:36 -07:00
Samuel Holland
8fc21cc672
riscv: mm: Preserve global TLB entries when switching contexts
If the CPU does not support multiple ASIDs, all MM contexts use ASID 0.
In this case, it is still beneficial to flush the TLB by ASID, as the
single-ASID variant of the sfence.vma instruction preserves TLB entries
for global (kernel) pages.

This optimization is recommended by the RISC-V privileged specification:

  If the implementation does not provide ASIDs, or software chooses
  to always use ASID 0, then after every satp write, software should
  execute SFENCE.VMA with rs1=x0. In the common case that no global
  translations have been modified, rs2 should be set to a register
  other than x0 but which contains the value zero, so that global
  translations are not flushed.

It is not possible to apply this optimization when using the ASID
allocator, because that code must flush the TLB for all ASIDs at once
when incrementing the version number.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-13-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:35 -07:00
Samuel Holland
8d3e7613f9
riscv: mm: Make asid_bits a local variable
This variable is only used inside asids_init().

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-12-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:34 -07:00
Samuel Holland
f58e5dc45f
riscv: mm: Use a fixed layout for the MM context ID
Currently, the size of the ASID field in the MM context ID dynamically
depends on the number of hardware-supported ASID bits. This requires
reading a global variable to extract either field from the context ID.
Instead, allocate the maximum possible number of bits to the ASID field,
so the layout of the context ID is known at compile-time.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-11-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:33 -07:00
Samuel Holland
74cd17792d
riscv: mm: Introduce cntx2asid/cntx2version helper macros
When using the ASID allocator, the MM context ID contains two values:
the ASID in the lower bits, and the allocator version number in the
remaining bits. Use macros to make this separation more obvious.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-10-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:32 -07:00
Samuel Holland
d6dcdabafc
riscv: Avoid TLB flush loops when affected by SiFive CIP-1200
Implementations affected by SiFive errata CIP-1200 have a bug which
forces the kernel to always use the global variant of the sfence.vma
instruction. When affected by this errata, do not attempt to flush a
range of addresses; each iteration of the loop would actually flush the
whole TLB instead. Instead, minimize the overall number of sfence.vma
instructions.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Yunhui Cui <cuiyunhui@bytedance.com>
Link: https://lore.kernel.org/r/20240327045035.368512-9-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:31 -07:00
Samuel Holland
20e03d702e
riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma
commit 3f1e782998 ("riscv: add ASID-based tlbflushing methods") added
calls to the sfence.vma instruction with rs2 != x0. These single-ASID
instruction variants are also affected by SiFive errata CIP-1200.

Until now, the errata workaround was not needed for the single-ASID
sfence.vma variants, because they were only used when the ASID allocator
was enabled, and the affected SiFive platforms do not support multiple
ASIDs. However, we are going to start using those sfence.vma variants
regardless of ASID support, so now we need alternatives covering them.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-8-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:30 -07:00
Samuel Holland
c6026d35b6
riscv: mm: Combine the SMP and UP TLB flush code
In SMP configurations, all TLB flushing narrower than flush_tlb_all()
goes through __flush_tlb_range(). Do the same in UP configurations.

This allows UP configurations to take advantage of recent improvements
to the code in tlbflush.c, such as support for huge pages and flushing
multiple-page ranges.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Yunhui Cui <cuiyunhui@bytedance.com>
Link: https://lore.kernel.org/r/20240327045035.368512-7-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:29 -07:00
Samuel Holland
9546f00410
riscv: Only send remote fences when some other CPU is online
If no other CPU is online, a local cache or TLB flush is sufficient.
These checks can be constant-folded when SMP is disabled.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240327045035.368512-6-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:28 -07:00
Samuel Holland
038ac18aae
riscv: mm: Broadcast kernel TLB flushes only when needed
__flush_tlb_range() avoids broadcasting TLB flushes when an mm context
is only active on the local CPU. Apply this same optimization to TLB
flushes of kernel memory when only one CPU is online. This check can be
constant-folded when SMP is disabled.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-5-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:27 -07:00
Samuel Holland
dc892fb443
riscv: Use IPIs for remote cache/TLB flushes by default
An IPI backend is always required in an SMP configuration, but an SBI
implementation is not. For example, SBI will be unavailable when the
kernel runs in M mode. For this reason, consider IPI delivery of cache
and TLB flushes to be the base case, and any other implementation (such
as the SBI remote fence extension) to be an optimization.

Generally, if IPIs can be delivered without firmware assistance, they
are assumed to be faster than SBI calls due to the SBI context switch
overhead. However, when SBI is used as the IPI backend, then the context
switch cost must be paid anyway, and performing the cache/TLB flush
directly in the SBI implementation is more efficient than injecting an
interrupt to S-mode. This is the only existing scenario where
riscv_ipi_set_virq_range() is called with use_for_rfence set to false.

sbi_ipi_init() already checks riscv_ipi_have_virq_range(), so it only
calls riscv_ipi_set_virq_range() when no other IPI device is available.
This allows moving the static key and dropping the use_for_rfence
parameter. This decouples the static key from the irqchip driver probe
order.

Furthermore, the static branch only makes sense when CONFIG_RISCV_SBI is
enabled. Optherwise, IPIs must be used. Add a fallback definition of
riscv_use_sbi_for_rfence() which handles this case and removes the need
to check CONFIG_RISCV_SBI elsewhere, such as in cacheflush.c.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240327045035.368512-4-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:26 -07:00
Samuel Holland
aaa56c8f37
riscv: Factor out page table TLB synchronization
The logic is the same for all page table levels. See commit 69be3fb111
("riscv: enable MMU_GATHER_RCU_TABLE_FREE for SMP && MMU").

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240327045035.368512-3-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:25 -07:00
Samuel Holland
58661a30f1
riscv: Flush the instruction cache during SMP bringup
Instruction cache flush IPIs are sent only to CPUs in cpu_online_mask,
so they will not target a CPU until it calls set_cpu_online() earlier in
smp_callin(). As a result, if instruction memory is modified between the
CPU coming out of reset and that point, then its instruction cache may
contain stale data. Therefore, the instruction cache must be flushed
after the set_cpu_online() synchronization point.

Fixes: 08f051eda3 ("RISC-V: Flush I$ when making a dirty page executable")
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-2-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-29 10:49:24 -07:00
Chao Yu
48d180e2bf f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
Otherwise, it breaks pinfile's sematics.

Cc: Daeho Jeong <daeho43@gmail.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-29 17:41:17 +00:00
Chao Yu
20faaf30e5 f2fs: fix to do sanity check on i_xattr_nid in sanity_check_inode()
syzbot reports a kernel bug as below:

F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
==================================================================
BUG: KASAN: slab-out-of-bounds in f2fs_test_bit fs/f2fs/f2fs.h:2933 [inline]
BUG: KASAN: slab-out-of-bounds in current_nat_addr fs/f2fs/node.h:213 [inline]
BUG: KASAN: slab-out-of-bounds in f2fs_get_node_info+0xece/0x1200 fs/f2fs/node.c:600
Read of size 1 at addr ffff88807a58c76c by task syz-executor280/5076

CPU: 1 PID: 5076 Comm: syz-executor280 Not tainted 6.9.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 f2fs_test_bit fs/f2fs/f2fs.h:2933 [inline]
 current_nat_addr fs/f2fs/node.h:213 [inline]
 f2fs_get_node_info+0xece/0x1200 fs/f2fs/node.c:600
 f2fs_xattr_fiemap fs/f2fs/data.c:1848 [inline]
 f2fs_fiemap+0x55d/0x1ee0 fs/f2fs/data.c:1925
 ioctl_fiemap fs/ioctl.c:220 [inline]
 do_vfs_ioctl+0x1c07/0x2e50 fs/ioctl.c:838
 __do_sys_ioctl fs/ioctl.c:902 [inline]
 __se_sys_ioctl+0x81/0x170 fs/ioctl.c:890
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The root cause is we missed to do sanity check on i_xattr_nid during
f2fs_iget(), so that in fiemap() path, current_nat_addr() will access
nat_bitmap w/ offset from invalid i_xattr_nid, result in triggering
kasan bug report, fix it.

Reported-and-tested-by: syzbot+3694e283cf5c40df6d14@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-f2fs-devel/00000000000094036c0616e72a1d@google.com
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-29 17:41:17 +00:00
Chao Yu
a320b2f08b f2fs: fix to avoid allocating WARM_DATA segment for direct IO
If active_log is not 6, we never use WARM_DATA segment, let's
avoid allocating WARM_DATA segment for direct IO.

Signed-off-by: Yunlei He <heyunlei@oppo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-29 17:41:17 +00:00
Yifan Zhao
ecd69be71a f2fs: remove redundant parameter in is_next_segment_free()
is_next_segment_free() takes a redundant `type` parameter. Remove it.

Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-29 17:41:17 +00:00
Connor Abbott
0d80ac75cb arm64: dts: qcom: sm8650: Fix GPU cx_mem size
This is doubled compared to previous GPUs. We can't access the new
SW_FUSE_VALUE register without this.

Fixes: db33633b05 ("arm64: dts: qcom: sm8650: add GPU nodes")
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240426-a750-raytracing-v2-1-562ac9866d63@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-29 12:35:42 -05:00
Peter Griffin
6d1434a7d9 dt-bindings: soc: google: exynos-sysreg: add dedicated hsi2 sysreg compatible
Update dt schema to include the gs101 hsi2 sysreg compatible.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240429111537.2369227-2-peter.griffin@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:27:21 +02:00
André Draszik
b93b3140e8 arm64: dts: exynos: gs101-oriole: enable USB on this board
Pixel 6 (Oriole) has a USB-C connector that can act as host or device.

The USB role is detected dynamically using a MAX77759 TCPCI controller,
but since there is no driver for the MAX77759, the role is defaulted to
peripheral, without any endpoints / ports.

This allows Oriole to be configured as a gadget, e.g. using configfs.

As PMIC regulators are not implemented yet, we rely on USB LDOs being
enabled by the bootloader. A placeholder regulator is used for now.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-usb-dts-gs101-v2-2-7c1797c9db80@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:01 +02:00
André Draszik
14d15fcbe0 arm64: dts: exynos: gs101: add USB & USB-phy nodes
Add the USB 3.1 Dual Role Device (DRD) controller and USB-PHY nodes for
Google Tensor GS101.

The USB 3.1 DRD controller has the following features:
* compliant with both USB device 3.1 and USB device 2.0 standards
* compliant with USB host 3.1 and USB host 2.0 standards
* supports USB device 3.1 and USB device 2.0 interfaces
* supports USB host 3.1 and USB host 2.0 interfaces
* full-speed (12 Mbps) and high-speed (480 Mbps) modes with USB device
  2.0 interface
* super-speed (5 Gbps) mode with USB device 3.1 Gen1 interface
* super-speed plus (10 Gbps) mode with USB device 3.1 Gen2 interface
* single USB port which can be used for USB 3.1 or USB 2.0
* on-chip USB PHY transceiver
* DWC3 compatible
* supports up to 16 bi-directional endpoints
* compliant with xHCI 1.1 specification

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-usb-dts-gs101-v2-1-7c1797c9db80@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:00 +02:00
Peter Griffin
86124c7668 arm64: dts: exynos: gs101: enable cmu-hsi2 clock controller
Enable the cmu_hsi2 clock management unit. It feeds some of
the high speed interfaces such as PCIe and UFS.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-2-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:00 +02:00
Bui Quang Minh
da7c622cdd s390/cio: Ensure the copied buf is NUL terminated
Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from
userspace to that buffer. Later, we use scanf on this buffer but we don't
ensure that the string is terminated inside the buffer, this can lead to
OOB read when using scanf. Fix this issue by using memdup_user_nul instead.

Fixes: a4f17cc726 ("s390/cio: add CRW inject functionality")
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-5-f1f1b53a10f4@gmail.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 19:21:34 +02:00
André Draszik
f9c7447479 pinctrl: samsung: support a bus clock
On some Samsung-based SoCs there are separate bus clocks / gates each
for each pinctrl instance. To be able to access each pinctrl instance's
registers, this bus clock needs to be running, otherwise register
access will hang. Google Tensor gs101 is one example for such an
implementation.

Update the driver to handle this optional bus clock:
* handle an optional bus clock from DT
* prepare it during driver probe
* enclose all relevant register accesses with a clock enable & disable

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-samsung-pinctrl-busclock-v3-2-adb8664b8a7e@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:19:30 +02:00
André Draszik
dff9f3fb6b dt-bindings: pinctrl: samsung: google,gs101-pinctrl needs a clock
The pin controller on Google Tensor gs101 requires a bus clock for
register access to work. Add it.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-samsung-pinctrl-busclock-v3-1-adb8664b8a7e@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:18:37 +02:00
Peter Griffin
093c290084 clk: samsung: gs101: add support for cmu_hsi2
CMU_HSI2 is the clock management unit used for the hsi2 block.
HSI stands for High Speed Interface and as such it generates
clocks for PCIe, UFS and MMC card.

This patch adds support for the muxes, dividers, and gates in
cmu_hsi2.

The following clocks are marked CLK_IS_CRITICAL as disabling
them results in an immediate system hang.
CLK_GOUT_HSI2_HSI2_CMU_HSI2_PCLK
CLK_GOUT_HSI2_LHM_AXI_P_HSI2_I_CLK

The following clocks are marked CLK_IGNORE_UNUSED as they are
needed for UFS to be functional.
CLK_GOUT_HSI2_SSMT_HSI2_ACLK
CLK_GOUT_HSI2_SSMT_HSI2_PCLK
CLK_GOUT_HSI2_LHS_ACEL_D_HSI2_I_CLK
CLK_GOUT_HSI2_SYSMMU_HSI2_CLK_S2
CLK_GOUT_HSI2_XIU_D_HSI2_ACLK
CLK_GOUT_HSI2_XIU_P_HSI2_ACLK

CLK_GOUT_HSI2_GPIO_HSI2_PCLK is marked CLK_IGNORE_UNUSED until
the exynos pinctrl clock patches land then it can be removed.

Some clocks in this unit have very long names. To help with this
the clock name mangling strategy was updated to include removing
the following sub-strings.
- G4X2_DWC_PCIE_CTL_
- G4X1_DWC_PCIE_CTL_
- PCIE_SUB_CTRL_
- INST_0_
- LN05LPE_
- TM_WRAPPER_
- SF_

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
[AD: resolve merge conflicts]
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-3-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:10:03 +02:00
André Draszik
1891e4d487 clk: samsung: gs101: add support for cmu_hsi0
CMU_HSI0 is the clock management unit for one of the high speed
interfaces, which is used (amongst others) for USB

Some notes about the clocks marked as CLK_IGNORE_UNUSED:
* CLK_GOUT_HSI0_PCLK
  CLK_GOUT_HSI0_LHM_AXI_P_HSI0_I_CLK
  CLK_GOUT_HSI0_XIU_P_HSI0_ACLK need to be kept running as
  otherwise the system becomes unresponsive and it doesn't complete
  booting.

* CLK_GOUT_HSI0_LHS_ACEL_D_HSI0_I_CLK
  CLK_GOUT_HSI0_SSMT_USB_ACLK
  CLK_GOUT_HSI0_SSMT_USB_PCLK
  CLK_GOUT_HSI0_SYSMMU_USB_CLK_S2
  CLK_GOUT_HSI0_XIU_D0_HSI0_ACLK
  CLK_GOUT_HSI0_XIU_D1_HSI0_ACLK are needed for USB to come up
  properly (SSMT is for (secure) memory tagging).

While at the moment we only support booting with the clk_ignore_unused
kernel command line paramenter, it's still worthwhile to explicitly
mark those clocks.

While the usual (sed) script has been used to derive the linux clock
names from the data sheet, one manual tweak was applied to fix a typo
coming from the data sheet which we don't want to carry:
    hsi0_uspdpdbg_user -> hsi0_usbdpdbg_user (note usb vs usp).

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-hsi0-gs101-v2-4-2157da8b63e3@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:09:25 +02:00
Krzysztof Kozlowski
822797560e Merge branch 'for-v6.10/clk-gs101-bindings' into next/clk 2024-04-29 19:09:18 +02:00
André Draszik
4982a4a209 arm64: dts: exynos: gs101: enable cmu-hsi0 clock controller
Enable the cmu-hsi0 clock controller. It feeds USB.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-hsi0-gs101-v2-2-2157da8b63e3@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:08:20 +02:00
Krzysztof Kozlowski
1414ca3eff Merge branch 'for-v6.10/clk-gs101-bindings' into next/dt64 2024-04-29 19:08:03 +02:00
Peter Griffin
01aea123b1 dt-bindings: clock: google,gs101-clock: add HSI2 clock management unit
Add dt schema documentation and clock IDs for the High Speed Interface
2 (HSI2) clock management unit. This CMU feeds high speed interfaces
such as PCIe and UFS.

[AD: * keep CMUs in google,gs101.h sorted alphabetically
     * resolve minor merge conflicts in google,gs101-clock.yaml
     * s/ufs_embd/ufs    s/mmc_card/mmc

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-1-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:06:57 +02:00
Nikita Zhandarovich
b6dd09b3da wifi: carl9170: add a proper sanity check for endpoints
Syzkaller reports [1] hitting a warning which is caused by presence
of a wrong endpoint type at the URB sumbitting stage. While there
was a check for a specific 4th endpoint, since it can switch types
between bulk and interrupt, other endpoints are trusted implicitly.
Similar warning is triggered in a couple of other syzbot issues [2].

Fix the issue by doing a comprehensive check of all endpoints
taking into account difference between high- and full-speed
configuration.

[1] Syzkaller report:
...
WARNING: CPU: 0 PID: 4721 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504
...
Call Trace:
 <TASK>
 carl9170_usb_send_rx_irq_urb+0x273/0x340 drivers/net/wireless/ath/carl9170/usb.c:504
 carl9170_usb_init_device drivers/net/wireless/ath/carl9170/usb.c:939 [inline]
 carl9170_usb_firmware_finish drivers/net/wireless/ath/carl9170/usb.c:999 [inline]
 carl9170_usb_firmware_step2+0x175/0x240 drivers/net/wireless/ath/carl9170/usb.c:1028
 request_firmware_work_func+0x130/0x240 drivers/base/firmware_loader/main.c:1107
 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289
 worker_thread+0x669/0x1090 kernel/workqueue.c:2436
 kthread+0x2e8/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

[2] Related syzkaller crashes:
Link: https://syzkaller.appspot.com/bug?extid=e394db78ae0b0032cb4d
Link: https://syzkaller.appspot.com/bug?extid=9468df99cb63a4a4c4e1

Reported-and-tested-by: syzbot+0ae4804973be759fa420@syzkaller.appspotmail.com
Fixes: a84fab3cbf ("carl9170: 802.11 rx/tx processing and usb backend")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Acked-By: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240422183355.3785-1-n.zhandarovich@fintech.ru
2024-04-29 20:06:47 +03:00
Arnd Bergmann
cc5dc7e7f9 Microchip ARM64 device tree updates for v6.10
It contains:
 - dtbs_check and dtc W=1 warning fixes
 - mdio2 and serdes address fixes for sparx5
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCZi9XfwAKCRCejrg/N2X7
 /YwsAP4jNIf3ynUDyOnrsCXxI2t1gf00Y1lzcryqWpHPl3MP2AD/d3vRYb21uSrB
 sr/lv8ec5jfZoO/1s6zCV/sRPsj4xQc=
 =5V+V
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvx3IACgkQYKtH/8kJ
 Uie6ORAAtAb5oRlXHb4Tge2Jth0ALcdJd5DWYXEfVpfoKcjN+rJqLpH6my0aKseE
 0uzQlKlVoTlry7tVf4qvK09W1ZmAvOVuXev9A9/zLvMwyYaNZuwkuxlRevJFwYMC
 eDfrJ3hX5YLJgcms5l1VRKky4ODWUKGzHNUidUv7XWGC/iP/F2K5Ao4i2yC62TSz
 tmpEgmD5iaB3vrDaSfORzKr7NP9ufT+bJ3dENBNtgia2c+YfMTvuHfK7dcQmiK9m
 8hRWXHOLSh5C64KymTIIoZTFppLXU1E/TRpJjNs7iIKmkrlfPgqBZuQm4p2MrBYH
 LsKgDB2Orpaudb/QYrmKvO9mCVuO5A6qnD3CxtslahdrDLuoMmO4A3m3VPKWxrhB
 LBzgXqcM40GmQpc2RQUj0yZuca6RArH0wlI6y0fST3J9HedHbtu2In88a+u9wm8K
 x0hGvUVAA7+Y2CZLcxjjSTtPBTndfwsG7OH/X0lk/SRagMAdXDU+YETOU/jrRfZW
 CD+6munnh7dTjUlK7LXw7f2doxRp+kE7nFyGVArxXpBjsytkwt4CsLNGrRMA217/
 dLUuERTIAdEsCRREoYkaoNQt1KCjKUX1trbDae+aOBkU4b6sQE/+MNrbmoCg9laf
 xm7x3ITL7beuvu7+pcrNM7bCtxl0nQR9+gUHySBE7JqTChK7NJM=
 =oVqS
 -----END PGP SIGNATURE-----

Merge tag 'microchip-dt64-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt

Microchip ARM64 device tree updates for v6.10

It contains:
- dtbs_check and dtc W=1 warning fixes
- mdio2 and serdes address fixes for sparx5

* tag 'microchip-dt64-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  arm64: dts: microchip: sparx5_pcb135: drop duplicated NOR flash
  arm64: dts: microchip: sparx5_pcb134: drop duplicated NOR flash
  arm64: dts: microchip: sparx5_pcb135: drop LED unit addresses
  arm64: dts: microchip: sparx5_pcb134: drop LED unit addresses
  arm64: dts: microchip: sparx5_pcb135: align I2C mux node name with bindings
  arm64: dts: microchip: sparx5_pcb134: align I2C mux node name with bindings
  arm64: dts: microchip: sparx5_pcb135: add missing I2C mux unit addresses
  arm64: dts: microchip: sparx5_pcb134: add missing I2C mux unit addresses
  arm64: dts: microchip: sparx5: correct serdes unit address
  arm64: dts: microchip: sparx5: fix mdio reg

Link: https://lore.kernel.org/r/20240429121429.1941241-1-claudiu.beznea@tuxon.dev
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:14:41 +02:00
Arnd Bergmann
e8325e3396 Minor improvements in ARM DTS for v6.10
1. TI: add missing white-spaces for code readability.
 2. Aspeed: add vendor prefix to compatibles, to properly describe
    hardware, even though Linux drivers match by device name.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmYud58QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD10wOEACTZg2LEJoa54P2Ie6RpuNtcTXFWKD4NKTe
 dBqJoHKUvo7vdtnf1izPWn3LHs0vo9mll7JSTKt8jUBa56GsAFCrCrqoEmC70Tyx
 ZfvJONBT1s8Zs15GlAycUyYkBCM93KKt0S5b54vXJl3oyrGOi5OfQ0jQwdzmWOns
 jpf9PD/F7Ha2DKL1VrdEt54tkykX6kF2Rdfg7Wqbjy+qg6SyuOsJntI0qMhS8W9z
 82bI/R74z8ux3MpKfKSrht96MLDHBOhDoMQesFzOI/TIJUJNXJ8ZNh6KZKb7eTX2
 8i9MebCk2MEti8R8qvNk2KeiTybBc0n46aY/pNJIwp00ZU0oouuERXzE1koqIHfM
 BbsH/c2LbIMLPVk3VGCdEUiF67c9Elgv+sP1mUwzGgDc2os7MusCdhwE2YPSpAyW
 tQDXiTLnqhGBhT9P4kozrG25mhTQQ1E34ImQ9R9TmAopjm9z2KgaSsOYtOmaspdU
 8mUP93hw1S5yCB1za/pHTP2AehZPRBLMKpMcxRAeiF2AZYkz6w2jmcabTwFbSJlf
 zOQUe4XoUDbBao2Pb19LQ1m14rlKvFqra+58I+Vaa6qSmqv/YoYbprT/Yo5wg/Vy
 C51J59suYBHemrVFgwdkDKSVXtmQIGS7MPhfOWNLifVbnQG0QsgzdWIrhGgdEJC4
 2nhP0mBdlA==
 =IBkV
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvx0wACgkQYKtH/8kJ
 UidAJQ/9FvjPy9uBoZ87kSbjk5FnzpMZr+LCC5ul+WfeyR1qJTjWi4HLEw+FIiAF
 yT4dotKhGwkF/0JY3KyZKGk5eL8nkztO+yRDkXHUgx7sgj7ObGVsHzFP4QIpoAjB
 JNCVA+GiesgW+mMW6NqtVPlh0bhDeIBHKy3Ow442/RVOyY3i1sKSf04CKbbuntWO
 5lO684fZzBcOAdtOLyZsElbNnhxc8w3oMjnyqaUf/dGTcvXSlzWhEu9kvbvBVCa5
 HNBHSi4XlbJc2UVYHCetnQk5+nnVqutWOAUq/8WlggA5Zh/t8+8TjiLft2Alsc/K
 paIkFMnBj7+Lv72ZGSqY3YifqBzArooR9Jk+X9jPKVh2RfgiQqzRdiI+uVvvWhu+
 U+0+ndCJQf/4dcovw4Yqqhvee+iq7/jfiCY/Q8uyN2adKhz+awCCdgqmthmObTTs
 hWeg7vcVLGbIAKybymyc9p/mfYAsp4/BcL31Aq6h1zfD4Th93V1n/GvIDRFOUeNH
 bdUXlj5WGhXLrHUuaIozgO5Oyk98X5Dv9sishjE85s5d8TEYPPjG3oR+IyGCYeCH
 4R00QhMwI4vG626Ynq4KoONXe9qoHld7w/a09wm4DwfwCH+OP0vZ0u0/u5lugeVf
 XQLP1T0rsfPSlZwPRiReaSUBoEeN3lCykkSScfUnsd+O3CMmjsY=
 =cHxl
 -----END PGP SIGNATURE-----

Merge tag 'dt-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM DTS for v6.10

1. TI: add missing white-spaces for code readability.
2. Aspeed: add vendor prefix to compatibles, to properly describe
   hardware, even though Linux drivers match by device name.

* tag 'dt-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  ARM: dts: aspeed: Add vendor prefixes to lm25066 compat strings
  ARM: dts: ti: omap: minor whitespace cleanup

Link: https://lore.kernel.org/r/20240428163316.28955-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:14:04 +02:00
Arnd Bergmann
631ec37483 Minor improvements in ARM64 DTS for v6.10
Fixes, which might have practical impact, however things were broken for
 long enough to justify pushing it regular path:
 1. ARM Juno: shorten node names for thermal zones, because Linux drivers
    have strict limit of 20 characters.
 2. HiSilicon: correct size of GIC GICC address space and add missing
    GICH and GICV spaces, add cache info to properly describe cache
    topology and solve kernel boot warning.
 
 Several cleanups:
 1. Use capital "OR" for multiple licenses in SPDX.
 2. Correct white-spaces for code readability.
 3. Fix W=1 dtc compiler warnings, which should not have practical
    impact for Amazon, APM, Cavium, Realtek, Socionext Uniphier and
    Spreadtrum like:
     - missing unit addresses,
     - nodes not belonging to soc node,
     - not using generic node names,
     - few incorrect unit addresses.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmYuegkQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wj5D/0dGKg45vt6kJeZXQ4wAfBlxzc5qw6VrIP3
 mHdpNQ4V1pS5d0x8U4dDi33TISVxsixpWrkKa5yz8FCzFRZNsXoGQd35SKRRuiSS
 cH/4K+IaY7gKGHRhowdJjfab2ddyEoa8448pk5Ne/TFEPHvhAz5ay/kr4MjtazOP
 1hc9fI0xY2Pnh8afBxsi43pwTxqoBA1QVPEzpYlb1bw3ak5ErVVVYqz7gpexA139
 MiXJlwlrcPDC/eUSJxSLR2FxgbYojXac6lmNY5Ic6cCDIhNaq5a4DqjFUYKUmXSy
 ob+K9y+81HvKDPNYao4sZLWFRyiPTXdnfCYTmRNj8Y6gVw0bfD9BaFbQHIVV/ni8
 8pkK6PnwSK2AmX4B5+ehHnrSlsrVrqbBQGpxCE7/NLWI4728wBbDvyLntizlmKRI
 oDrAEcOXGJGCEgKpoDWqWJtVPvJo5eiM59+LPW/zxdpzORArCvB+IaWs+JHBajIM
 CRCZjoE/9BiezHIgH56TzfvNYGxAqx+oTVrD/mWn2dajHFsA55LJSM/JEgSUUwXG
 Ymp1OG/vKWce7A4CnEI7gGKSincJCW3GRiIzfQSfKmeBTc1ui8itD2v5LfSdyzQ0
 eT4g00LjW0hJY3Eroc3Fg3ras5eFTf6+oAQeNqZCYQrhkxFt9Q9dMpfpLEg0n0cq
 9StXCDsosw==
 =+DRC
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM64 DTS for v6.10

Fixes, which might have practical impact, however things were broken for
long enough to justify pushing it regular path:
1. ARM Juno: shorten node names for thermal zones, because Linux drivers
   have strict limit of 20 characters.
2. HiSilicon: correct size of GIC GICC address space and add missing
   GICH and GICV spaces, add cache info to properly describe cache
   topology and solve kernel boot warning.

Several cleanups:
1. Use capital "OR" for multiple licenses in SPDX.
2. Correct white-spaces for code readability.
3. Fix W=1 dtc compiler warnings, which should not have practical
   impact for Amazon, APM, Cavium, Realtek, Socionext Uniphier and
   Spreadtrum like:
    - missing unit addresses,
    - nodes not belonging to soc node,
    - not using generic node names,
    - few incorrect unit addresses.

* tag 'dt64-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: (28 commits)
  arm64: dts: cavium: thunder2-99xx: drop redundant reg-names
  arm64: dts: amazon: alpine-v3: correct gic unit addresses
  arm64: dts: amazon: alpine-v3: drop cache nodes unit addresses
  arm64: dts: amazon: alpine-v3: add missing io-fabric unit addresses
  arm64: dts: amazon: alpine-v2: move non-MMIO node out of soc
  arm64: dts: amazon: alpine-v2: add missing io-fabric unit addresses
  arm64: dts: apm: shadowcat: move non-MMIO node out of soc
  arm64: dts: apm: storm: move non-MMIO node out of soc
  arm64: dts: cavium: correct unit addresses
  arm64: dts: cavium: move non-MMIO node out of soc
  arm64: dts: realtek: rtc16xx: add missing unit address to soc node
  arm64: dts: realtek: rtd139x: add missing unit address to soc node
  arm64: dts: realtek: rtd129x: add missing unit address to soc node
  arm64: dts: uniphier: ld20-global: drop audio codec port unit address
  arm64: dts: uniphier: ld20-global: use generic node name for audio-codec
  arm64: dts: uniphier: ld11-global: drop audio codec port unit address
  arm64: dts: uniphier: ld11-global: use generic node name for audio-codec
  arm64: dts: sharkl3: add missing unit addresses
  arm64: dts: whale2: add missing ap-apb unit address
  arm64: dts: sc9860: move GIC to soc node
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:12:53 +02:00
Dave Jiang
5d211c7090 cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH
Robert reported the following when booting a CXL host with Restricted CXL
Host (RCH) topology:
 [   39.815379] cxl_acpi ACPI0017:00: not a cxl_port device
 [   39.827123] WARNING: CPU: 46 PID: 1754 at drivers/cxl/core/port.c:592 to_cxl_port+0x56/0x70 [cxl_core]

... plus some related subsequent NULL pointer dereference:

 [   40.718708] BUG: kernel NULL pointer dereference, address: 00000000000002d8

The iterator to walk the PCIe path did not account for RCH topology.
However RCH does not support hotplug and the memory exported by the
Restricted CXL Device (RCD) should be covered by HMAT and therefore no
access_coordinate is needed. Add check to see if the endpoint device is
RCD and skip calculation.

Also add a call to cxl_endpoint_get_perf_coordinates() in cxl_test in order
to exercise the topology iterator. The dev_is_pci() check added is to help
with this test and should be harmless for normal operation.

Reported-by: Robert Richter <rrichter@amd.com>
Closes: https://lore.kernel.org/all/Ziv8GfSMSbvlBB0h@rric.localdomain/
Fixes: 592780b839 ("cxl: Fix retrieving of access_coordinates in PCIe path")
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/20240426224913.1027420-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2024-04-29 09:03:26 -07:00
Arnd Bergmann
f71b3cf82e i.MX arm64 device tree for 6.10:
- New board support: Emcraft Systems NavQ+ Kit, Toradex Colibri iMX8DX,
   and S32G-VNP-RDB3 board.
 - A series from Alexander Stein that adds empty DSI output endpoint to
   simplify DSI connection description at board level.
 - Add pinmux and I2C GPIOs to support bus recovery for LX2160A.
 - Add cm40 subsystem description for i.MX8 SoCs.
 - A series from Frank Li that adds ADC, LPSPI and FlexSPI devices for
   imx8qm-mek board.
 - Add audio devices ASRC, ESAI, SPDIF and SAI for i.MX8QXP and correct
   audio LPCG index.
 - A couple of changes from Ghennadi Procopciuc that add SCMI firmware
   and uSDHC nodes for S32G SoC.
 - A couple of imx8mp-msc-sm2s updates from Ian Ray improving I2C pad
   drive strength and adding SDA/SCL GPIOs for I2C devices.
 - Add PCA9451A PMIC and PCF2131 RTC support for imx93-11x11-evk board.
 - A series from Lucas Stach to enable HDMI display support for i.MX8MP.
 - A series from Peng Fan to improve i.MX93 support for LPI2C, LPSPI, FEC
   and eQoS.
 - A couple of LS1028A changes from Rob Herring to improve PCI device
   description.
 - A series from Shengjiu Wang adding HDMI and PDM mic sound support for
   imx8mp-evk board.
 - A number of i.MX8M Venice device improvements from Stefan Eichenberger,
   Tim Harvey and Vitor Soares.
 - A series from Xu Yang that enables USB support for imx8ulp-evk and
   imx93-11x11-evk board.
 - Other small and random updates on various boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuN8MUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM6f/wgAnMgs3ufQH3CVnG3bBJ3DO14atmR9
 zbt1hBrxhsPjfwJ+e6XJEgG0HWh/q1CkLsnUECGdNXfWN7m1z/paimPNS3Gz0EaJ
 YfQcnbOqAXwoef+0yEIZQ2kmoNX2r64T5bgetUNd0JbPEjOwWnvbuGehTyNWUL5Z
 OkokSJQe+tWbEaZ2V14DzGoFJeydFEexfM/YrXx+98wt6+6cneYL9LX39OK8Kmy4
 Thlex11nXtXhmJhQ5C2MfiJsl28fpmXVEBF7IEwnJxkLr51b5XfwOSiuTZDzJLuf
 i5LcXIcckZrnoSsR6tYmUG0gmnlFQHzopLi1Jzz838edEOA/QmJf/fwdig==
 =e1vc
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvw/AACgkQYKtH/8kJ
 UiflZxAAhKLbu3Z6wEROKRiDtOgNCtgE/50oksXLjoPcnp0Xkp8mOgQesErVkCUe
 Dsyizykf7wt2fD8bZOtT/xZn3v9MIHY2lY5vO7NGAG2xjKp42LO2b9t5IRrAirhU
 eyaroUzRn2pPPSsutYSmO04VuJsajf6d3/Q9lPbPpRuCVoE8XmkADjIyWANjuo3c
 7CfDBkO22/1mKNG26SDXEbLi4+RTga+mXyq8IWu7AbHWjX50ormAaucCMVYKH4By
 Y42Mo8Y4b0MPGdN7EWF/zMYbWL/uq8cYWEAEwtH23xJZ2Rkchlk+NuKkoaosobOP
 rBwcJTiki7htej+wkRHa7c7DetC6kGtI26gaq7mziSB+JanYkqZ+ZuE0Q4nNXT3E
 0h8rlDP+CL3GSkliV/KzMmiXvQoVzFWGH2zxQpYkWijEaqZD6nLBmThVpSL8+Flk
 LmY30JH86vgiIIX19w1Jnv9v+I2Apheqd7Zt1L5AqIieQqUHbQo8GPv+7Ty7YcDp
 h5iY+XvOpPCXZ76zQ3skrXOezxMTZmbEpxzSrsRGxiURtstZwZayyeOEWiFRA3Rw
 oIhtQhqqznbTgsT3RcC9KodoJmrQVuC7dMzvMqHDxBhPh5dc2TcdcQ7zhJkq0Yn8
 5balZWgwhWnRGkvPvotciF6tMNEZs/GW4YoLFMOZK1I25nKBNA8=
 =yDAu
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree for 6.10:

- New board support: Emcraft Systems NavQ+ Kit, Toradex Colibri iMX8DX,
  and S32G-VNP-RDB3 board.
- A series from Alexander Stein that adds empty DSI output endpoint to
  simplify DSI connection description at board level.
- Add pinmux and I2C GPIOs to support bus recovery for LX2160A.
- Add cm40 subsystem description for i.MX8 SoCs.
- A series from Frank Li that adds ADC, LPSPI and FlexSPI devices for
  imx8qm-mek board.
- Add audio devices ASRC, ESAI, SPDIF and SAI for i.MX8QXP and correct
  audio LPCG index.
- A couple of changes from Ghennadi Procopciuc that add SCMI firmware
  and uSDHC nodes for S32G SoC.
- A couple of imx8mp-msc-sm2s updates from Ian Ray improving I2C pad
  drive strength and adding SDA/SCL GPIOs for I2C devices.
- Add PCA9451A PMIC and PCF2131 RTC support for imx93-11x11-evk board.
- A series from Lucas Stach to enable HDMI display support for i.MX8MP.
- A series from Peng Fan to improve i.MX93 support for LPI2C, LPSPI, FEC
  and eQoS.
- A couple of LS1028A changes from Rob Herring to improve PCI device
  description.
- A series from Shengjiu Wang adding HDMI and PDM mic sound support for
  imx8mp-evk board.
- A number of i.MX8M Venice device improvements from Stefan Eichenberger,
  Tim Harvey and Vitor Soares.
- A series from Xu Yang that enables USB support for imx8ulp-evk and
  imx93-11x11-evk board.
- Other small and random updates on various boards.

* tag 'imx-dt64-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (78 commits)
  arm64: dts: imx93-11x11-evk: add RTC PCF2131 support
  arm64: dts: imx93-11x11-evk: add reset gpios for ethernet PHYs
  arm64: dts: imx93-11x11-evk: add sleep pinctrl for sdhc2
  arm64: dts: imx93-11x11-evk: add different usdhc pinctrl for different timing usage
  arm64: dts: imx93-11x11-evk: add sleep pinctrl for eqos and fec
  arm64: dts: imx93-11x11-evk: update resource table address
  arm64: dts: imx93: add nvmem property for eqos
  arm64: dts: imx93: add nvmem property for fec1
  arm64: dts: imx93: assign usdhc[1..3] root clock to 400MHz
  arm64: dts: imx93: add dma support for lpspi[1..8]
  arm64: dts: imx93: add dma support for lpi2c[1..8]
  arm64: dts: imx93: use FSL_EDMA_RX for rx channel
  arm64: dts: freescale: ls1028a: Add standard PCI device compatible strings to ENETC
  arm64: dts: freescale: ls1028a: Fix embedded PCI interrupt mapping
  arm64: dts: imx8qxp-mek: add cm40_i2c, wm8960 and sai[0,1,4,5]
  arm64: dts: imx8mp: Align both CSI2 pixel clock
  arm64: dts: freescale: imx8m[mp]-verdin: Update audio card name
  arm64: dts: imx8mp: Enable HDMI on TQMa8MPxL/MBa8MPxL
  arm64: dts: imx8ulp: add caam jr
  arm64: dts: imx8mp-msc-sm2s: Add i2c{1,6} sda-/scl-gpios
  ...

Link: https://lore.kernel.org/r/20240428121247.10370-4-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:59:44 +02:00
Linus Torvalds
b947cc5bf6 Changes since last update:
- Better error message when prepare_ondemand_read failed;
 
  - Fix unmount of bdev-based mode if CONFIG_EROFS_FS_ONDEMAND is on.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmYvafURHHhpYW5nQGtl
 cm5lbC5vcmcACgkQUXZn5Zlu5qrgAg/+PK6WKc2t5SiLpG+dSLgQLhWfebJXhf3+
 IWr4hT04JcFJgmxBJAcgh7uoJFrxjTxGDX0vtiLhAAOqRCXb9rDlpqbu+PXfURa1
 YyiBAEuqnwqKCm3BixVixV8JCSLHu+UzJ72mZGw+wtSdhInXS/ddBAc8WNVbfjyU
 cUJb30+N5vjYVRYtDQG5qP0dbpstm1cTjNJIhjStcSpk9LQkQ9degYctjJj1mk8B
 ilplRIyy0bEBVbupUHPtmrHzpDZYe4QXFTtQaEGst1uDw/Cxw8I8zpwO4wavdxVz
 DZwDF6bcKGsaCFIV4UuJvowU7syEDkBHk5JvJoyNEhRuZQYOIvMdYRxl6AxAp1Jk
 vV5sn/LbWaqF7uR2Lw4NJBapulcDjEMfHuP2FyzzRqMmPO/4BiGrLnK+IRu3cSTH
 0/bh6oRdplx8Q7faylMnSTXxYigXfu6vjPXuIZ95Wisk9L+URzhmdwkhnnu8MRPn
 DSQfD2VvRrRr52uFiR+LppspPrb8ru6EqORW9ShpugM0V9XPiGyYnNFlCMtoCpgf
 fYx5p2F23fXNq461dB6UwZfIM9jvMvrNsb3h3+pvpN/y5UbsW6kMUD38MwZxlSPT
 z18P87HKHXGNc6+pQK7zI89I7g+2W5TCZVg0/w5DGTXkOlDQPi9X9woaOYcJIPYJ
 LcDG0uM18kI=
 =v0WH
 -----END PGP SIGNATURE-----

Merge tag 'erofs-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:
 "Three fixes related to EROFS fscache mode. The most important two
  patches fix calling kill_block_super() in bdev-based mode instead of
  kill_anon_super(). The remaining patch is an informative one.

  Summary:

   - Better error message when prepare_ondemand_read failed

   - Fix unmount of bdev-based mode if CONFIG_EROFS_FS_ONDEMAND is on"

* tag 'erofs-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: reliably distinguish block based and fscache mode
  erofs: get rid of erofs_fs_context
  erofs: modify the error message when prepare_ondemand_read failed
2024-04-29 08:52:08 -07:00
Arnd Bergmann
7194048ccf i.MX ARM device tree for 6.10:
- New board support: Seeed Studio NPi dev board, UNI-T UTi260B thermal
   camera board.
 - A couple of IRQ config correction for touchscreen and RC5T619 on
   tolino-shine2hd device.
 - Add snvs-poweroff support for i.MX7.
 - A couple of dtb_check warning fixes on i.MX6SX and i.MX6QDL ESAI.
 - Enable USB support for imx6qdl-udoo and imx27-phytec.
 - A big series from Uwe Kleine-König to adopt #pwm-cells = <3> for i.MX
   devices.
 - Other small changes and clean-ups.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuFjsUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7KlAf9F7zMgK6bpLSm8HxJcNcwvc8ABImm
 hJcUMeNAzXjN+vK85gBiUrjXGcWYC4fxPBAB2gASTxmmsdg2NsVWJmTzeFRfMpbs
 J/QzAkmhEeZUsB8OBeewqFVk2Uq1N+enxheeNEjqzXYcMhJU+dhnAAa+4g0q6uVS
 OSK11W3AR0r+RwWOV0Dw0koUhkyQT37S0BgfryKvcRX+qtON3vuOwqYj4QesOPMS
 Kpyf75jmxEtom7eh1/T0UMqLh2lxnraxx15QiXZcxPMS5wxk9QAYvOTaXmFgz7Z4
 RDgu6NToVIqAthnQUjUU6IPU34hxpjxBQwlhVPHTqVf4PQn8K6mP8cRXjw==
 =/0Ag
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvwd0ACgkQYKtH/8kJ
 UifWRRAApkko9eBq6mGi3Itx4wFyMFxuxLb37Z930uNJTszM1ALLNIhIX7fbU3GJ
 uDajeEI1vCwBSQyNxJd+J3I+8g38Psx5z6UP0VM8W/TuAMs8OqeCcn5i1atWr/ep
 Hfx/BnbxhxPDOslu0vuUUfxNam0ljcWJut2QADtxk61nWCTorN/JrZbgsGrIFab9
 ZfAdT+3hE7lq6X7cMJcffylPIOEbsB1/X+iUkdtpYM0l/ZiG1x/YCYh1/DspLVGz
 svRB/y55/k1QZYF9o4I5TnFlHBOMxLt8suohTeHhy6QDYlVV21MtTwHMmtNieOFa
 xNovDomGfwBj9h7FSCHrARV4Yc2lTdnf0EY8DBkLCy/rlA9HPRR30KRxqtDMD/EW
 HQQvyUfScJ5BYwol533BgrqYvrla+GDwVhMWjb6NDew8SYYTJDvrmMe7G0nyFZ2Y
 NC3M5XihZ27xD2sp+Cn0WPRXS5YCk1dgJ3y6vJZcJ9DOoVp+l39aQSo/1f35rNc7
 86XvrViydHRpl2RD+ThfmqNeZT/6fqP4vW+UcV7/oWIrpMzNqsTQDbBbLgQlS1uU
 LH3cYFXwoD8poIDUnwgWu827Rdr4cNp1NpEyO6SgFr89LkhLmdWNdlD4ot7C6JyU
 uxSD1FCk5MnqCnVv25Dr9qZPHYBLIKhKe5wDmQOWCl99UliX2tI=
 =6tZF
 -----END PGP SIGNATURE-----

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

i.MX ARM device tree for 6.10:

- New board support: Seeed Studio NPi dev board, UNI-T UTi260B thermal
  camera board.
- A couple of IRQ config correction for touchscreen and RC5T619 on
  tolino-shine2hd device.
- Add snvs-poweroff support for i.MX7.
- A couple of dtb_check warning fixes on i.MX6SX and i.MX6QDL ESAI.
- Enable USB support for imx6qdl-udoo and imx27-phytec.
- A big series from Uwe Kleine-König to adopt #pwm-cells = <3> for i.MX
  devices.
- Other small changes and clean-ups.

* tag 'imx-dt-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (64 commits)
  ARM: dts: imx6ul-pico: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-kontron-bl-common: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-kontron-bl-43: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-isiot: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-imx6ull-opos6uldev: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-geam: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-ccimx6ulsbcpro: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-14x14-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-softing-vining-2000: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-sdb: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-nitrogen6sx: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sll-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sl-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-var-dt6customboard: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-prti6q: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-pistachio: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-novena: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-kp: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6qdl-skov-cpu: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6qdl-savageboard: Use #pwm-cells = <3> for imx27-pwm device
  ...

Link: https://lore.kernel.org/r/20240428121247.10370-3-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:50:53 +02:00
Arnd Bergmann
3fdb967e68 i.MX DT bindings for 6.10:
- Add vendor prefix for Emcraft Systems
 - Add compatible for new boards: Emcraft Systems i.MX8M Plus NavQ+ Kit,
   Colibri iMX8DX, Seeed studio NPi base board, NXP S32G3 board
 - Drop reduntant toradex,colibri-imx8x from fsl.yaml
 - Add usbmisc compatible for i.MX8ULP
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuDi0UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4N+gf/QZUrTCupA+qb6V25FJMOW4mUOOMR
 BlINyRhVDm0AFZx+r7qkxBRbZhS7cSrhYINo/LUOYgxy2Zm447L0ZwiZEZnbgyER
 btNkBX3cA7JjCmYFKctl/17wuoV11xR5JqQDZpe3/18nSdxD9lbQ+9pfNvajtng9
 bKPFvevFGKz5LW5dR1X8r0GsSppzrP3t2/WrC7yfgCGruplbpaR0VMByLdrCAEz6
 uvY2Am7CQ7f1AHqen00EfkBNMlCO3CmqO1UuI5qBSUcKJIJO/pEWEU/gxpWSTvoj
 rS2jZTIE9kkv8+ywxLGwvJ+vw2b59W8CSNuuqU884nI1GClMi7jgXJHxJQ==
 =jOXd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvwagACgkQYKtH/8kJ
 Uie+0g//bvlQMesclVRdpC/MimF5ZQg3jHwhuEm6CFLmqmFUKoS1BpRLJ5ah46I8
 S1SQVLIUMavRdXQA3w1o1FDnl0HrabDLhoA3X9nOMv1nIUlTcIa5CN5Kcjs0XIeh
 9i/pKOFWe4j3Me05ixeSCyW16QT0JhWazJYkefULuAs24WkkamBBM9Hozow3PLpu
 +pI9KJ+MRVBT1IOt0iGzXFyy2hhHqYWBTKbrcgSYuLu5mA3G/fyORmSWZdnS1zqK
 BzxCjem2Zj5DSxV8JfL9nEYOxM5IJZdGC59Ifju+zFdOgG7giHLepagTFPidf795
 SJVFnrbOA0hmw/hNcnXOP3tputyZ7JvnYi5ygZX54BeJkMBgAyt97SfDVDb9RM2A
 Ab/HV8vtMCKsu5cmgRZlxyWuxvLkN7/lgmZM/EdUBt3/eFFaVLgy7Lb2Sn6TR2Rq
 lWqv6hiZ83h681r44t4dn2n9t28JNoGwKg6arHkAB/z4vLv1lQaDQv6+3PL5bPg1
 LXvmslQlbmrEEpGcPGrNiN96hEHF/FqDsxL3kjrZgtjQo4tLeMBmehd3GXH/ciau
 fqd2tDnCqB3s6OKvi1hny6gzmT7bNWZLDCe+4MMimElHMyySlmhwnoHNWdQ0BK6J
 spIuUy5VFLHy0kMhzETMRyzYvVKZkK+Gise60Oega9khahpynHY=
 =5uZ/
 -----END PGP SIGNATURE-----

Merge tag 'imx-bindings-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt

i.MX DT bindings for 6.10:

- Add vendor prefix for Emcraft Systems
- Add compatible for new boards: Emcraft Systems i.MX8M Plus NavQ+ Kit,
  Colibri iMX8DX, Seeed studio NPi base board, NXP S32G3 board
- Drop reduntant toradex,colibri-imx8x from fsl.yaml
- Add usbmisc compatible for i.MX8ULP

* tag 'imx-bindings-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible
  dt-bindings: arm: fsl: Add Colibri iMX8DX
  dt-bindings: arm: fsl: remove reduntant toradex,colibri-imx8x
  dt-bindings: arm: Add Emcraft Systems i.MX8M Plus NavQ+ Kit
  dt-bindings: vendor-prefixes: Add Emcraft Systems
  dt-bindings: arm: fsl: add NXP S32G3 board
  dt-bindings: arm: fsl: Add Seeed studio NPi based boards

Link: https://lore.kernel.org/r/20240428121247.10370-2-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:50:00 +02:00
Hagar Hemdan
4b2543f7e1 efi: libstub: only free priv.runtime_map when allocated
priv.runtime_map is only allocated when efi_novamap is not set.
Otherwise, it is an uninitialized value.  In the error path, it is freed
unconditionally.  Avoid passing an uninitialized value to free_pool.
Free priv.runtime_map only when it was allocated.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Fixes: f80d26043a ("efi: libstub: avoid efi_get_memory_map() for allocating the virt map")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-04-29 17:47:32 +02:00
Ilpo Järvinen
4c407392c1 PCI: Clean up accessor macro formatting
Clean up formatting of PCI accessor macros:

  - Put return statements on own line

  - Add a few empty lines for better readability

  - Align macro continuation backslashes

  - Correct function call argument indentation level

  - Reorder variable declarations to order of use

  - Drop unnecessary variable initialization

Link: https://lore.kernel.org/r/20240429094707.2529-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: drop initialization, tweak variables to order of use]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2024-04-29 10:43:58 -05:00
Michael Walle
c84b3925c7 mtd: spi-nor: replace unnecessary div64_u64() with div_u64()
Both occurrences of div64_u64() just have a u8 or u32 divisor. Use
div_u64() instead. Many 32 bit architectures can optimize this variant
better than a full 64 bit divide.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9ba7f4e6-2b8b-44a3-9cac-9ed6e50f1700@moroto.mountain/
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
[pratyush@kernel.org: touched up commit message]
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240429121113.803703-1-mwalle@kernel.org
2024-04-29 17:36:48 +02:00
Sumanth Korikkar
00cda11d3b s390: Compile kernel with -fPIC and link with -no-pie
When the kernel is built with CONFIG_PIE_BUILD option enabled it
uses dynamic symbols, for which the linker does not allow more
than 64K number of entries. This can break features like kpatch.

Hence, whenever possible the kernel is built with CONFIG_PIE_BUILD
option disabled. For that support of unaligned symbols generated by
linker scripts in the compiler is necessary.

However, older compilers might lack such support. In that case the
build process resorts to CONFIG_PIE_BUILD option-enabled build.

Compile object files with -fPIC option and then link the kernel
binary with -no-pie linker option.

As result, the dynamic symbols are not generated and not only kpatch
feature succeeds, but also the whole CONFIG_PIE_BUILD option-enabled
code could be dropped.

[ agordeev: Reworded the commit message ]

Suggested-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Sumanth Korikkar
5f90003f09 s390: vmlinux.lds.S: Drop .hash and .gnu.hash for !CONFIG_PIE_BUILD
Sections .hash and .gnu.hash are only created when CONFIG_PIE_BUILD
option is enabled. Drop these for the case CONFIG_PIE_BUILD is disabled.

[ agordeev: Reworded the commit message ]

Fixes: 778666df60 ("s390: compile relocatable kernel without -fPIE")
Suggested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Sven Schnelle
cae74ba8c2 s390/ftrace: Use unwinder instead of __builtin_return_address()
Using __builtin_return_address(n) might return undefined values
when used with values of n outside of the stack. This was noticed
when __builtin_return_address() was called in ftrace on top level
functions like the interrupt handlers.

As this behaviour cannot be fixed, use the s390 stack unwinder and
remove the ftrace compilation flags for unwind_bc.c and stacktrace.c
to prevent the unwinding function polluting function traces.

Another advantage is that this also works with clang.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Jean Delvare
9679fec2ca s390/pci: Drop unneeded reference to CONFIG_DMI
The S/390 architecture doesn't support SMBIOS, so CONFIG_DMI will
never be defined there. So we can simply omit these preprocessing
directives and speed up the build a bit.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20240423162724.3966265a@endymion.delvare
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Ilpo Järvinen
c9758cc45c PCI/ERR: Cleanup misleading indentation inside if conditions
A few if conditions align misleadingly with the following code block.  The
checks are really cascading NULL checks that fit into 80 chars so remove
newlines in between and realign to the if condition indent.

Link: https://lore.kernel.org/r/20240429094707.2529-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2024-04-29 10:33:29 -05:00
Sven Schnelle
fe742c08f3 s390/os_info: Fix array size in struct os_info
gcc's -Warray-bounds warned about an out-of-bounds access to
the entry array contained in struct os_info. This doesn't trigger
a bug right now because there's a large reserved space after the
array. Nevertheless fix this, and also add a BUILD_BUG_ON to make
sure struct os_info is always exactly on page in size.

Fixes: f4cac27dc0 ("s390/crash: Use old os_info to create PT_LOAD headers")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:29 +02:00
Alexander Egorenkov
a2269a66ee s390/os_info: Initialize old os_info in standalone dump kernel
The commit be42660d0c13 ("s390/crash: use old os_info to create PT_LOAD headers")
introduced use of the old os_info into standalone dump kernel.
Before this change os_info_old_init() expected to be called only from
a regular kdump kernel although the function itself is able to work
in standalone dump kernels as well (because copy_oldmem_kernel() is able
to handle both use cases). Therefore, fix the expectation of os_info_old_init()
and enable it to be called from a standalone dump kernel.

Fixes: f4cac27dc0 ("s390/crash: Use old os_info to create PT_LOAD headers")
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:29 +02:00