* [PATCH 0/6] powerpc: MVME5100 fixes and cleanups
@ 2026-11-02 15:29 Thorsten Blum
2026-11-02 15:29 ` [PATCH 1/6] powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node Thorsten Blum
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:29 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
Patch 1 removes a dtc warning, patch 2 prevents an out-of-bounds read,
and patch 3 fixes the function name in a log message.
Patch 4 replaces hard-coded function names with __func__, patch 5 marks
pci_membase as __initdata, and patch 6 removes redundant initializations.
Thorsten Blum (6):
powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node
powerpc/embedded6xx: Validate bus-range length in mvme5100_add_bridge()
powerpc/embedded6xx: Fix logged function name in mvme5100_add_bridge()
powerpc/embedded6xx: Use __func__ in mvme5100_pic_init()
powerpc/embedded6xx: Mark pci_membase as __initdata
powerpc/embedded6xx: Drop redundant initializations
arch/powerpc/boot/dts/mvme5100.dts | 1 -
arch/powerpc/platforms/embedded6xx/mvme5100.c | 19 +++++++++++--------
2 files changed, 11 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
@ 2026-11-02 15:29 ` Thorsten Blum
2026-11-02 15:30 ` [PATCH 2/6] powerpc/embedded6xx: Validate bus-range length in mvme5100_add_bridge() Thorsten Blum
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:29 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
The ISA node does not provide interrupts. Its interrupt-parent property
points to the i8259 controller, which already defines #interrupt-cells.
Remove the #interrupt-cells property from the ISA node to fix the
following dtc warning:
Warning (interrupt_provider): /pci@feff0000/isa:
'#interrupt-cells' found, but node is not an interrupt provider
Fixes: be2019816e4d ("powerpc/embedded6xx: Add support for Motorola/Emerson MVME5100")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/boot/dts/mvme5100.dts | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/boot/dts/mvme5100.dts b/arch/powerpc/boot/dts/mvme5100.dts
index a7eb6d25903d..b7e97d56c324 100644
--- a/arch/powerpc/boot/dts/mvme5100.dts
+++ b/arch/powerpc/boot/dts/mvme5100.dts
@@ -155,7 +155,6 @@ pci0: pci@feff0000 {
isa {
#address-cells = <2>;
#size-cells = <1>;
- #interrupt-cells = <2>;
device_type = "isa";
compatible = "isa";
ranges = <0x00000001 0 0x01000000 0 0x00000000 0x00001000>;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/6] powerpc/embedded6xx: Validate bus-range length in mvme5100_add_bridge()
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
2026-11-02 15:29 ` [PATCH 1/6] powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node Thorsten Blum
@ 2026-11-02 15:30 ` Thorsten Blum
2026-11-02 15:30 ` [PATCH 3/6] powerpc/embedded6xx: Fix logged function name " Thorsten Blum
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:30 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
mvme5100_add_bridge() reads two cells from the bus-range property
without checking its length, and a truncated property can cause an
out-of-bounds read.
Check the length before reading the bus numbers.
Fixes: be2019816e4d ("powerpc/embedded6xx: Add support for Motorola/Emerson MVME5100")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/embedded6xx/mvme5100.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index 5ca41972ef22..6a88abac047a 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -114,6 +114,10 @@ static int __init mvme5100_add_bridge(struct device_node *dev)
pr_info("Adding PCI host bridge %pOF\n", dev);
bus_range = of_get_property(dev, "bus-range", &len);
+ if (bus_range && len < 2 * sizeof(*bus_range)) {
+ pr_err("bus-range property is too short\n");
+ return -EINVAL;
+ }
hose = pcibios_alloc_controller(dev);
if (hose == NULL)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/6] powerpc/embedded6xx: Fix logged function name in mvme5100_add_bridge()
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
2026-11-02 15:29 ` [PATCH 1/6] powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node Thorsten Blum
2026-11-02 15:30 ` [PATCH 2/6] powerpc/embedded6xx: Validate bus-range length in mvme5100_add_bridge() Thorsten Blum
@ 2026-11-02 15:30 ` Thorsten Blum
2026-11-02 15:30 ` [PATCH 4/6] powerpc/embedded6xx: Use __func__ in mvme5100_pic_init() Thorsten Blum
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:30 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
Use __func__ to print the correct function name.
Fixes: be2019816e4d ("powerpc/embedded6xx: Add support for Motorola/Emerson MVME5100")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/embedded6xx/mvme5100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index 6a88abac047a..b2979a2a1721 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -144,7 +144,7 @@ static int __init mvme5100_add_bridge(struct device_node *dev)
return 0;
}
- pr_info("mvme5100_pic_init: pci_membase: %x\n", pci_membase);
+ pr_info("%s: pci_membase: %x\n", __func__, pci_membase);
return 0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/6] powerpc/embedded6xx: Use __func__ in mvme5100_pic_init()
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
` (2 preceding siblings ...)
2026-11-02 15:30 ` [PATCH 3/6] powerpc/embedded6xx: Fix logged function name " Thorsten Blum
@ 2026-11-02 15:30 ` Thorsten Blum
2026-11-02 15:30 ` [PATCH 5/6] powerpc/embedded6xx: Mark pci_membase as __initdata Thorsten Blum
2026-11-02 15:30 ` [PATCH 6/6] powerpc/embedded6xx: Drop redundant initializations Thorsten Blum
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:30 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
Replace the hard-coded function names with __func__.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/embedded6xx/mvme5100.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index b2979a2a1721..f22e10eb0c65 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -75,13 +75,13 @@ static void __init mvme5100_pic_init(void)
cp = of_find_compatible_node(NULL, NULL, "chrp,iic");
if (cp == NULL) {
- pr_warn("mvme5100_pic_init: couldn't find i8259\n");
+ pr_warn("%s: couldn't find i8259\n", __func__);
return;
}
cirq = irq_of_parse_and_map(cp, 0);
if (!cirq) {
- pr_warn("mvme5100_pic_init: no cascade interrupt?\n");
+ pr_warn("%s: no cascade interrupt?\n", __func__);
return;
}
@@ -96,8 +96,7 @@ static void __init mvme5100_pic_init(void)
}
if (intack)
- pr_debug("mvme5100_pic_init: PCI 8259 intack at 0x%016lx\n",
- intack);
+ pr_debug("%s: PCI 8259 intack at 0x%016lx\n", __func__, intack);
i8259_init(cp, intack);
of_node_put(cp);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/6] powerpc/embedded6xx: Mark pci_membase as __initdata
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
` (3 preceding siblings ...)
2026-11-02 15:30 ` [PATCH 4/6] powerpc/embedded6xx: Use __func__ in mvme5100_pic_init() Thorsten Blum
@ 2026-11-02 15:30 ` Thorsten Blum
2026-11-02 15:30 ` [PATCH 6/6] powerpc/embedded6xx: Drop redundant initializations Thorsten Blum
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:30 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
pci_membase is only accessed by mvme5100_add_bridge() and
mvme5100_pic_init(), both of which are __init functions.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/embedded6xx/mvme5100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index f22e10eb0c65..b6b4d0581fa9 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -35,7 +35,7 @@
#define BOARD_EXT_FEATURE1_REG 0xfef880f0
#define BOARD_EXT_FEATURE2_REG 0xfef88100
-static phys_addr_t pci_membase;
+static phys_addr_t pci_membase __initdata;
static u_char *restart;
static void mvme5100_8259_cascade(struct irq_desc *desc)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 6/6] powerpc/embedded6xx: Drop redundant initializations
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
` (4 preceding siblings ...)
2026-11-02 15:30 ` [PATCH 5/6] powerpc/embedded6xx: Mark pci_membase as __initdata Thorsten Blum
@ 2026-11-02 15:30 ` Thorsten Blum
5 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2026-11-02 15:30 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Scott Wood, Stephen Chivers
Cc: devicetree, linuxppc-dev, linux-kernel, Thorsten Blum
The variables are reassigned before their initial values are read. Drop
the redundant initializations.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/embedded6xx/mvme5100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index b6b4d0581fa9..b8a59e147dfa 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -53,10 +53,10 @@ static void __init mvme5100_pic_init(void)
{
struct mpic *mpic;
struct device_node *np;
- struct device_node *cp = NULL;
+ struct device_node *cp;
unsigned int cirq;
unsigned long intack = 0;
- const u32 *prop = NULL;
+ const u32 *prop;
np = of_find_node_by_type(NULL, "open-pic");
if (!np) {
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-02 15:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 15:29 [PATCH 0/6] powerpc: MVME5100 fixes and cleanups Thorsten Blum
2026-11-02 15:29 ` [PATCH 1/6] powerpc: dts: mvme5100: Drop #interrupt-cells from ISA node Thorsten Blum
2026-11-02 15:30 ` [PATCH 2/6] powerpc/embedded6xx: Validate bus-range length in mvme5100_add_bridge() Thorsten Blum
2026-11-02 15:30 ` [PATCH 3/6] powerpc/embedded6xx: Fix logged function name " Thorsten Blum
2026-11-02 15:30 ` [PATCH 4/6] powerpc/embedded6xx: Use __func__ in mvme5100_pic_init() Thorsten Blum
2026-11-02 15:30 ` [PATCH 5/6] powerpc/embedded6xx: Mark pci_membase as __initdata Thorsten Blum
2026-11-02 15:30 ` [PATCH 6/6] powerpc/embedded6xx: Drop redundant initializations Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®