From: Rob Herring robh@kernel.org
[ Upstream commit 857d423c74228cfa064f79ff3a16b163fdb8d542 ]
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more.
Signed-off-by: Rob Herring robh@kernel.org [mpe: Drop change in ppc4xx_probe_pci_bridge(), formatting] Signed-off-by: Michael Ellerman mpe@ellerman.id.au Link: https://msgid.link/20230310144657.1541039-1-robh@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org --- arch/powerpc/kernel/legacy_serial.c | 8 ++++---- arch/powerpc/platforms/44x/iss4xx.c | 2 +- arch/powerpc/platforms/44x/ppc476.c | 2 +- arch/powerpc/platforms/cell/spu_manage.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 3 +-- arch/powerpc/platforms/powernv/opal-lpc.c | 2 +- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- arch/powerpc/platforms/pseries/vio.c | 2 +- arch/powerpc/sysdev/mpic_msgr.c | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index f048c424c525b..1a3b7f3513b40 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -171,11 +171,11 @@ static int __init add_legacy_soc_port(struct device_node *np, /* We only support ports that have a clock frequency properly * encoded in the device-tree. */ - if (of_get_property(np, "clock-frequency", NULL) == NULL) + if (!of_property_present(np, "clock-frequency")) return -1;
/* if reg-offset don't try to use it */ - if ((of_get_property(np, "reg-offset", NULL) != NULL)) + if (of_property_present(np, "reg-offset")) return -1;
/* if rtas uses this device, don't try to use it as well */ @@ -237,7 +237,7 @@ static int __init add_legacy_isa_port(struct device_node *np, * Note: Don't even try on P8 lpc, we know it's not directly mapped */ if (!of_device_is_compatible(isa_brg, "ibm,power8-lpc") || - of_get_property(isa_brg, "ranges", NULL)) { + of_property_present(isa_brg, "ranges")) { taddr = of_translate_address(np, reg); if (taddr == OF_BAD_ADDR) taddr = 0; @@ -268,7 +268,7 @@ static int __init add_legacy_pci_port(struct device_node *np, * compatible UARTs on PCI need all sort of quirks (port offsets * etc...) that this code doesn't know about */ - if (of_get_property(np, "clock-frequency", NULL) == NULL) + if (!of_property_present(np, "clock-frequency")) return -1;
/* Get the PCI address. Assume BAR 0 */ diff --git a/arch/powerpc/platforms/44x/iss4xx.c b/arch/powerpc/platforms/44x/iss4xx.c index c5f82591408c1..812765cf06324 100644 --- a/arch/powerpc/platforms/44x/iss4xx.c +++ b/arch/powerpc/platforms/44x/iss4xx.c @@ -52,7 +52,7 @@ static void __init iss4xx_init_irq(void)
/* Find top level interrupt controller */ for_each_node_with_property(np, "interrupt-controller") { - if (of_get_property(np, "interrupts", NULL) == NULL) + if (!of_property_present(np, "interrupts")) break; } if (np == NULL) diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c index 7c91ac5a5241b..70556fd10f6b4 100644 --- a/arch/powerpc/platforms/44x/ppc476.c +++ b/arch/powerpc/platforms/44x/ppc476.c @@ -122,7 +122,7 @@ static void __init ppc47x_init_irq(void)
/* Find top level interrupt controller */ for_each_node_with_property(np, "interrupt-controller") { - if (of_get_property(np, "interrupts", NULL) == NULL) + if (!of_property_present(np, "interrupts")) break; } if (np == NULL) diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index f1ac4c7420690..74567b32c48c2 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c @@ -402,7 +402,7 @@ static int __init of_has_vicinity(void) struct device_node *dn;
for_each_node_by_type(dn, "spe") { - if (of_find_property(dn, "vicinity", NULL)) { + if (of_property_present(dn, "vicinity")) { of_node_put(dn); return 1; } diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 8c8d8e0a7d137..7425f94e271e5 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -475,8 +475,7 @@ static int __init pmac_pic_probe_mpic(void)
/* We can have up to 2 MPICs cascaded */ for_each_node_by_type(np, "open-pic") { - if (master == NULL && - of_get_property(np, "interrupts", NULL) == NULL) + if (master == NULL && !of_property_present(np, "interrupts")) master = of_node_get(np); else if (slave == NULL) slave = of_node_get(np); diff --git a/arch/powerpc/platforms/powernv/opal-lpc.c b/arch/powerpc/platforms/powernv/opal-lpc.c index d129d6d45a500..a16f07cdab267 100644 --- a/arch/powerpc/platforms/powernv/opal-lpc.c +++ b/arch/powerpc/platforms/powernv/opal-lpc.c @@ -403,7 +403,7 @@ void __init opal_lpc_init(void) return;
/* Does it support direct mapping ? */ - if (of_get_property(np, "ranges", NULL)) { + if (of_property_present(np, "ranges")) { pr_info("OPAL: Found memory mapped LPC bus on chip %d\n", opal_lpc_chip_id); isa_bridge_init_non_pci(np); diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 982e5e4b5e065..1a3cb313976a4 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -493,7 +493,7 @@ static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) bool found = false; int rc, index;
- if (of_find_property(parent, "ibm,drc-info", NULL)) + if (of_property_present(parent, "ibm,drc-info")) return drc_info_valid_index(parent, drc_index);
/* Note that the format of the ibm,drc-indexes array is diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c index 770df9351aaa9..d54306a936d55 100644 --- a/arch/powerpc/platforms/pseries/vio.c +++ b/arch/powerpc/platforms/pseries/vio.c @@ -1440,7 +1440,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->dev.bus = &vio_bus_type; viodev->dev.release = vio_dev_release;
- if (of_get_property(viodev->dev.of_node, "ibm,my-dma-window", NULL)) { + if (of_property_present(viodev->dev.of_node, "ibm,my-dma-window")) { if (firmware_has_feature(FW_FEATURE_CMO)) vio_cmo_set_dma_ops(viodev); else diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c index d75064fb7d12f..1a3ac0b5dd89c 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c @@ -116,7 +116,7 @@ static unsigned int mpic_msgr_number_of_blocks(void)
for (;;) { snprintf(buf, sizeof(buf), "mpic-msgr-block%d", count); - if (!of_find_property(aliases, buf, NULL)) + if (!of_property_present(aliases, buf)) break;
count += 1;
From: Josh Poimboeuf jpoimboe@kernel.org
[ Upstream commit e0b081d17a9f4e5c0cbb0e5fbeb1abe3de0f7e4e ]
With KCSAN enabled, end_of_stack() can get out-of-lined. Force it inline.
Fixes the following warnings:
vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b: call to end_of_stack() leaves .noinstr.text section
Signed-off-by: Josh Poimboeuf jpoimboe@kernel.org Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Link: https://lore.kernel.org/r/cc1b4d73d3a428a00d206242a68fdf99a934ca7b.168132002... Signed-off-by: Sasha Levin sashal@kernel.org --- include/linux/sched/task_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h index 5e799a47431e8..f158b025c1750 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h @@ -23,7 +23,7 @@ static __always_inline void *task_stack_page(const struct task_struct *task)
#define setup_thread_stack(new,old) do { } while(0)
-static inline unsigned long *end_of_stack(const struct task_struct *task) +static __always_inline unsigned long *end_of_stack(const struct task_struct *task) { #ifdef CONFIG_STACK_GROWSUP return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1;
From: Josh Poimboeuf jpoimboe@kernel.org
[ Upstream commit f571da059f86fd9d432aea32c9c7e5aaa53245d8 ]
Fixes the following warning:
vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b6: call to _printk() leaves .noinstr.text section
Signed-off-by: Josh Poimboeuf jpoimboe@kernel.org Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Link: https://lore.kernel.org/r/ee5209f53aa0a62aea58be18f2b78b17606779a6.168132002... Signed-off-by: Sasha Levin sashal@kernel.org --- drivers/misc/lkdtm/stackleak.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/misc/lkdtm/stackleak.c b/drivers/misc/lkdtm/stackleak.c index 025b133297a6b..f1d0221609138 100644 --- a/drivers/misc/lkdtm/stackleak.c +++ b/drivers/misc/lkdtm/stackleak.c @@ -43,12 +43,14 @@ static void noinstr check_stackleak_irqoff(void) * STACK_END_MAGIC, and in either casee something is seriously wrong. */ if (current_sp < task_stack_low || current_sp >= task_stack_high) { + instrumentation_begin(); pr_err("FAIL: current_stack_pointer (0x%lx) outside of task stack bounds [0x%lx..0x%lx]\n", current_sp, task_stack_low, task_stack_high - 1); test_failed = true; goto out; } if (lowest_sp < task_stack_low || lowest_sp >= task_stack_high) { + instrumentation_begin(); pr_err("FAIL: current->lowest_stack (0x%lx) outside of task stack bounds [0x%lx..0x%lx]\n", lowest_sp, task_stack_low, task_stack_high - 1); test_failed = true; @@ -86,11 +88,14 @@ static void noinstr check_stackleak_irqoff(void) if (*(unsigned long *)poison_low == STACKLEAK_POISON) continue;
+ instrumentation_begin(); pr_err("FAIL: non-poison value %lu bytes below poison boundary: 0x%lx\n", poison_high - poison_low, *(unsigned long *)poison_low); test_failed = true; + goto out; }
+ instrumentation_begin(); pr_info("stackleak stack usage:\n" " high offset: %lu bytes\n" " current: %lu bytes\n" @@ -113,6 +118,7 @@ static void noinstr check_stackleak_irqoff(void) } else { pr_info("OK: the rest of the thread stack is properly erased\n"); } + instrumentation_end(); }
static void lkdtm_STACKLEAK_ERASING(void)
From: Alexandre Ghiti alexghiti@rivosinc.com
[ Upstream commit 617955ca6e275c4dd0dcf5316fca7fc04a8f2fe6 ]
The EFI stub must not use any KASAN instrumented code as the kernel proper did not initialize the thread pointer and the mapping for the KASAN shadow region.
Avoid using the generic strcmp function, instead use the one in drivers/firmware/efi/libstub/string.c.
Signed-off-by: Alexandre Ghiti alexghiti@rivosinc.com Acked-by: Ard Biesheuvel ardb@kernel.org Reviewed-by: Atish Patra atishp@rivosinc.com Link: https://lore.kernel.org/r/20230203075232.274282-5-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt palmer@rivosinc.com Signed-off-by: Sasha Levin sashal@kernel.org --- arch/riscv/kernel/image-vars.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/arch/riscv/kernel/image-vars.h b/arch/riscv/kernel/image-vars.h index 7e2962ef73f92..15616155008cc 100644 --- a/arch/riscv/kernel/image-vars.h +++ b/arch/riscv/kernel/image-vars.h @@ -23,8 +23,6 @@ * linked at. The routines below are all implemented in assembler in a * position independent manner */ -__efistub_strcmp = strcmp; - __efistub__start = _start; __efistub__start_kernel = _start_kernel; __efistub__end = _end;
From: Alexandre Ghiti alexghiti@rivosinc.com
[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
Signed-off-by: Alexandre Ghiti alexghiti@rivosinc.com Reviewed-by: Björn Töpel bjorn@rivosinc.com Link: https://lore.kernel.org/r/20230203075232.274282-7-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt palmer@rivosinc.com Signed-off-by: Sasha Levin sashal@kernel.org --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index eb7f29a412f87..d6aad84efb95e 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -118,6 +118,7 @@ config RISCV select HAVE_SYSCALL_TRACEPOINTS select IRQ_DOMAIN select IRQ_FORCED_THREADING + select KASAN_VMALLOC if KASAN select MODULES_USE_ELF_RELA if MODULES select MODULE_SECTIONS if MODULES select OF
Hi Sasha,
On 5/9/23 05:54, Sasha Levin wrote:
From: Alexandre Ghiti alexghiti@rivosinc.com
[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
Signed-off-by: Alexandre Ghiti alexghiti@rivosinc.com Reviewed-by: Björn Töpel bjorn@rivosinc.com Link: https://lore.kernel.org/r/20230203075232.274282-7-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt palmer@rivosinc.com Signed-off-by: Sasha Levin sashal@kernel.org
arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index eb7f29a412f87..d6aad84efb95e 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -118,6 +118,7 @@ config RISCV select HAVE_SYSCALL_TRACEPOINTS select IRQ_DOMAIN select IRQ_FORCED_THREADING
- select KASAN_VMALLOC if KASAN select MODULES_USE_ELF_RELA if MODULES select MODULE_SECTIONS if MODULES select OF
KASAN_VMALLOC is broken for any kernel < 6.4, so this one should not be backported to any kernel (5.15, 6.1, 6.2, 6.3).
Thanks,
Alex
On Fri, May 12, 2023 at 11:51:03AM +0200, Alexandre Ghiti wrote:
Hi Sasha,
On 5/9/23 05:54, Sasha Levin wrote:
From: Alexandre Ghiti alexghiti@rivosinc.com
[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
Signed-off-by: Alexandre Ghiti alexghiti@rivosinc.com Reviewed-by: Björn Töpel bjorn@rivosinc.com Link: https://lore.kernel.org/r/20230203075232.274282-7-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt palmer@rivosinc.com Signed-off-by: Sasha Levin sashal@kernel.org
arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index eb7f29a412f87..d6aad84efb95e 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -118,6 +118,7 @@ config RISCV select HAVE_SYSCALL_TRACEPOINTS select IRQ_DOMAIN select IRQ_FORCED_THREADING
- select KASAN_VMALLOC if KASAN select MODULES_USE_ELF_RELA if MODULES select MODULE_SECTIONS if MODULES select OF
KASAN_VMALLOC is broken for any kernel < 6.4, so this one should not be backported to any kernel (5.15, 6.1, 6.2, 6.3).
Ack, dropped. Thanks!
From: Pali Rohár pali@kernel.org
[ Upstream commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 ]
ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile.
Signed-off-by: Pali Rohár pali@kernel.org Signed-off-by: Michael Ellerman mpe@ellerman.id.au Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org --- arch/powerpc/platforms/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de84..608ac0290e3aa 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,9 @@ config CPM2 on it (826x, 827x, 8560).
config FSL_ULI1575 - bool + bool "ULI1575 PCIe south bridge support" + depends on FSL_SOC_BOOKE || PPC_86xx + select FSL_PCI select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some
Hi--
Just a heads up. This patch can cause build errors. I sent a patch for these on 2023-APR-28: https://lore.kernel.org/linuxppc-dev/20230429043519.19807-1-rdunlap@infradea...
Michael, I think this is your area if I'm not mistaken.
On 5/8/23 20:54, Sasha Levin wrote:
From: Pali Rohár pali@kernel.org
[ Upstream commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 ]
ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile.
Signed-off-by: Pali Rohár pali@kernel.org Signed-off-by: Michael Ellerman mpe@ellerman.id.au Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org
arch/powerpc/platforms/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de84..608ac0290e3aa 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,9 @@ config CPM2 on it (826x, 827x, 8560). config FSL_ULI1575
- bool
- bool "ULI1575 PCIe south bridge support"
- depends on FSL_SOC_BOOKE || PPC_86xx
- select FSL_PCI select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some
Randy Dunlap rdunlap@infradead.org writes:
Hi--
Just a heads up. This patch can cause build errors. I sent a patch for these on 2023-APR-28: https://lore.kernel.org/linuxppc-dev/20230429043519.19807-1-rdunlap@infradea...
Michael, I think this is your area if I'm not mistaken.
Yes. The fix is in my fixes branch as: 536d948a8dee ("powerpc/fsl_uli1575: fix kconfig warnings and build errors")
But I don't think this commit (22fdf79171e8) really warrants going to stable, it's a nice-to-have but doesn't fix any pressing bugs.
cheers
On 5/8/23 20:54, Sasha Levin wrote:
From: Pali Rohár pali@kernel.org
[ Upstream commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 ]
ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile.
Signed-off-by: Pali Rohár pali@kernel.org Signed-off-by: Michael Ellerman mpe@ellerman.id.au Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org
arch/powerpc/platforms/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de84..608ac0290e3aa 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,9 @@ config CPM2 on it (826x, 827x, 8560). config FSL_ULI1575
- bool
- bool "ULI1575 PCIe south bridge support"
- depends on FSL_SOC_BOOKE || PPC_86xx
- select FSL_PCI select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some
-- ~Randy
On Tuesday 09 May 2023 17:14:48 Michael Ellerman wrote:
Randy Dunlap rdunlap@infradead.org writes:
Hi--
Just a heads up. This patch can cause build errors. I sent a patch for these on 2023-APR-28: https://lore.kernel.org/linuxppc-dev/20230429043519.19807-1-rdunlap@infradea...
Michael, I think this is your area if I'm not mistaken.
Yes. The fix is in my fixes branch as: 536d948a8dee ("powerpc/fsl_uli1575: fix kconfig warnings and build errors")
But I don't think this commit (22fdf79171e8) really warrants going to stable, it's a nice-to-have but doesn't fix any pressing bugs.
Exactly. And also this patch alone without 1/8 would not work as in 1/8 https://lore.kernel.org/all/20230409000812.18904-2-pali@kernel.org/ was added static inline variant of function which is used when ULI is disabled.
cheers
On 5/8/23 20:54, Sasha Levin wrote:
From: Pali Rohár pali@kernel.org
[ Upstream commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 ]
ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile.
Signed-off-by: Pali Rohár pali@kernel.org Signed-off-by: Michael Ellerman mpe@ellerman.id.au Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org
arch/powerpc/platforms/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de84..608ac0290e3aa 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,9 @@ config CPM2 on it (826x, 827x, 8560). config FSL_ULI1575
- bool
- bool "ULI1575 PCIe south bridge support"
- depends on FSL_SOC_BOOKE || PPC_86xx
- select FSL_PCI select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some
-- ~Randy
On Tue, May 09, 2023 at 09:18:35AM +0200, Pali Rohár wrote:
On Tuesday 09 May 2023 17:14:48 Michael Ellerman wrote:
Randy Dunlap rdunlap@infradead.org writes:
Hi--
Just a heads up. This patch can cause build errors. I sent a patch for these on 2023-APR-28: https://lore.kernel.org/linuxppc-dev/20230429043519.19807-1-rdunlap@infradea...
Michael, I think this is your area if I'm not mistaken.
Yes. The fix is in my fixes branch as: 536d948a8dee ("powerpc/fsl_uli1575: fix kconfig warnings and build errors")
But I don't think this commit (22fdf79171e8) really warrants going to stable, it's a nice-to-have but doesn't fix any pressing bugs.
Exactly. And also this patch alone without 1/8 would not work as in 1/8 https://lore.kernel.org/all/20230409000812.18904-2-pali@kernel.org/ was added static inline variant of function which is used when ULI is disabled.
I'll drop it, thanks!
From: Hao Zeng zenghao@kylinos.cn
[ Upstream commit fa359d068574d29e7d2f0fdd0ebe4c6a12b5cfb9 ]
Common realloc mistake: 'file_append' nulled but not freed upon failure
Link: https://lkml.kernel.org/r/20230426010527.703093-1-zenghao@kylinos.cn
Signed-off-by: Hao Zeng zenghao@kylinos.cn Suggested-by: Steven Rostedt rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) rostedt@goodmis.org Signed-off-by: Sasha Levin sashal@kernel.org --- scripts/recordmcount.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index e30216525325b..40ae6b2c7a6da 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -110,6 +110,7 @@ static ssize_t uwrite(void const *const buf, size_t const count) { size_t cnt = count; off_t idx = 0; + void *p = NULL;
file_updated = 1;
@@ -117,7 +118,10 @@ static ssize_t uwrite(void const *const buf, size_t const count) off_t aoffset = (file_ptr + count) - file_end;
if (aoffset > file_append_size) { - file_append = realloc(file_append, aoffset); + p = realloc(file_append, aoffset); + if (!p) + free(file_append); + file_append = p; file_append_size = aoffset; } if (!file_append) {
linux-stable-mirror@lists.linaro.org