powerpc/pasemi: Defer Nemo IRQ initialization
PATCH 1/1 powerpc/pasemi: Defer Nemo IRQ initialization
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since pas_pci_init() is now called later during boot, the i8259 initialization in pas_init_IRQ() happens too early and accesses registers that are not yet mapped, preventing the board from booting.
Move the Nemo-specific i8259 initialization to pas_add_bridge(), after the ISA bridge has been discovered.
--- arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)
arch/powerpc/platforms/pasemi/pasemi.h +6 -0
@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );
arch/powerpc/platforms/pasemi/pci.c +5 -0
@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }
arch/powerpc/platforms/pasemi/setup.c +4 -8
@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );
@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )
@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); } -nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); }
Signature · 1 line
2.43.0
PATCH 1/1 powerpc/pasemi: Defer Nemo IRQ initialization
Hi all,
I have created a new patch. I hope it is OK. It works without any problems.
Thanks,
Christian
Quoted 94 lines · On 24/10/26 09:55, [email protected] wrote:
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.Suggested-by Darren Stevens <[email protected]>Tested-by Christian Zigotzky <[email protected]>Signed-off-by Christian Zigotzky A-EON Open Source <[email protected]>--- arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)arch/powerpc/platforms/pasemi/pasemi.h +6
-0@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );arch/powerpc/platforms/pasemi/pci.c +5
-0@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }arch/powerpc/platforms/pasemi/setup.c +4
-8@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); } -nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); }
Signature · 1 line
Sent with BrassMonkey 35.0.2 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_35.0.2)
Quoted 8 lines · [email protected] writes:
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.
That make sense to me. The patch looks good. However, shouldn't we also add Fixes tag and Cc: stable tag - so that this gets backported to older stable kernels.
I think the fixes tag should be above - but feel free to correct that.
Otherwise looks good to me. Feel free to add:
Quoted 88 lines
Suggested-by Darren Stevens <[email protected]>Tested-by Christian Zigotzky <[email protected]>Signed-off-by Christian Zigotzky A-EON Open Source <[email protected]>--- arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)arch/powerpc/platforms/pasemi/pasemi.h +6
-0@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );arch/powerpc/platforms/pasemi/pci.c +5
-0@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }arch/powerpc/platforms/pasemi/setup.c +4
-8@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); } -nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); }Signature · 1 line
2.43.0
Quoted 16 lines · Ritesh Harjani (IBM)
Quoted 8 lines · [email protected] writes:
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.That make sense to me. The patch looks good. However, shouldn't we also add Fixes tag and Cc: stable tag - so that this gets backported to older stable kernels.
Quoted 8 lines
Fixes c144bc719234 ("powerpc/pasemi: Move PHB discovery")I think the fixes tag should be above - but feel free to correct that.
Otherwise looks good to me. Feel free to add:
Reviewed-by Ritesh Harjani (IBM) <[email protected]>
Great! Just for info. I don't need this patch for the stable long-term kernel 5.10 but it is at least necessary for the stable long-term kernels 6.12 [1] and 6.18.
- Christian
Quoted 87 lines
Quoted 87 lines
Suggested-by Darren Stevens <[email protected]>Tested-by Christian Zigotzky <[email protected]>Signed-off-by Christian Zigotzky A-EON Open Source <[email protected]>--- arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)arch/powerpc/platforms/pasemi/pasemi.h +6
-0@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );arch/powerpc/platforms/pasemi/pci.c +5
-0@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }arch/powerpc/platforms/pasemi/setup.c +4
-8@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); } -nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); }Signature · 1 line
2.43.0
Signature · 1 line
Sent with BrassMonkey 35.0.2 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_35.0.2)
Quoted 111 lines · Ritesh Harjani
Quoted 8 lines · [email protected] writes:
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.That make sense to me. The patch looks good. However, shouldn't we also add Fixes tag and Cc: stable tag - so that this gets backported to older stable kernels.
Fixes c144bc719234 ("powerpc/pasemi: Move PHB discovery")I think the fixes tag should be above - but feel free to correct that.
Otherwise looks good to me. Feel free to add:
Reviewed-by Ritesh Harjani (IBM) <[email protected]>Quoted 81 lines
Suggested-by Darren Stevens <[email protected]>Tested-by Christian Zigotzky <[email protected]>Signed-off-by Christian Zigotzky A-EON Open Source <[email protected]>---
arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)arch/powerpc/platforms/pasemi/pasemi.h +6
-0@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );arch/powerpc/platforms/pasemi/pci.c +5
-0@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }arch/powerpc/platforms/pasemi/setup.c +4
-6@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); }
Quoted 7 lines
Quoted 7 lines
arch/powerpc/platforms/pasemi/setup.c +0
-3-nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); } --2.43.0
Hi Michael,
I would like to ask about the status of my patch.
The patch received a positive review from Ritesh Harjani.
This fix is important for our Nemo boards, otherwise fails to boot with recent kernels.
Thanks,
Christian
Madhavan Srinivasan
maintainerQuoted 117 lines · Christian Zigotzky
Quoted 108 lines · Ritesh Harjani
Quoted 8 lines · [email protected] writes:
From: Christian Zigotzky A-EON Open Source <[email protected]>
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.That make sense to me. The patch looks good. However, shouldn't we also add Fixes tag and Cc: stable tag - so that this gets backported to older stable kernels.
Fixes c144bc719234 ("powerpc/pasemi: Move PHB discovery")I think the fixes tag should be above - but feel free to correct that.
Otherwise looks good to me. Feel free to add:
Reviewed-by Ritesh Harjani (IBM) <[email protected]>Quoted 80 lines
Suggested-by Darren Stevens <[email protected]>Tested-by Christian Zigotzky <[email protected]>Signed-off-by Christian Zigotzky A-EON Open Source <[email protected]>---
arch/powerpc/platforms/pasemi/pasemi.h | 6 ++++++ arch/powerpc/platforms/pasemi/pci.c | 5 +++++ arch/powerpc/platforms/pasemi/setup.c | 12 ++++-------- 3 files changed, 15 insertions(+), 8 deletions(-)arch/powerpc/platforms/pasemi/pasemi.h +6
-0@@ -7,6 +7,12 @@ extern void pas_pci_init(void);struct pci_dev ;extern void pas_pci_dma_dev_setup (struct pci_dev *dev); +#ifdef CONFIG_PPC_PASEMI_NEMO +void __init nemo_init_IRQ (void ); +#else +static inline void __init nemo_init_IRQ (void ) { } +#endif +void __iomem *__init pasemi_pci_getcfgaddr (struct pci_dev *dev,int offset);extern void __init pasemi_map_registers (void );arch/powerpc/platforms/pasemi/pci.c +5
-0@@ -265,6 +265,11 @@ static int __init pas_add_bridge(struct device_node *dev)*/ isa_bridge_find_early (hose); +/* +* ISA bridge is now active, add the i8259 cascade (if needed) +*/ +nemo_init_IRQ (); +return 0 ; }arch/powerpc/platforms/pasemi/setup.c +4
-6@@ -216,10 +216,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) chip->irq_eoi (&desc->irq_data); } -static void __init nemo_init_IRQ (struct mpic *mpic) +void __init nemo_init_IRQ (void ) {struct device_node *np;int gpio_virq; +struct mpic *mpic; +/* Connect the SB600's legacy i8259 controller */ np =of_find_node_by_path ("/pxp@0,e0000000" );i8259_init (np,0 );@@ -230,14 +232,10 @@ static void __init nemo_init_IRQ(struct mpic *mpic)irq_set_chained_handler (gpio_virq, sb600_8259_cascade);mpic_unmask_irq (irq_get_irq_data (gpio_virq)); + mpic =irq_get_chip_data (gpio_virq); irq_set_default_domain(mpic->irqhost); } -#else - -static inline void nemo_init_IRQ (struct mpic *mpic) -{ -}#endif static __init void pas_init_IRQ (void )@@ -300,8 +298,6 @@ static __init void pas_init_IRQ(void)mpic_unmask_irq (irq_get_irq_data (nmi_virq)); }Quoted 7 lines
Quoted 7 lines
arch/powerpc/platforms/pasemi/setup.c +0
-3-nemo_init_IRQ (mpic); -of_node_put (mpic_node);of_node_put (root); } --2.43.0
Hi Michael,
Quoted 1 line
I would like to ask about the status of my patch.
Yes, this is parked for the fixes tree.
Maddy
Quoted 5 lines
The patch received a positive review from Ritesh Harjani.
This fix is important for our Nemo boards, otherwise fails to boot with recent kernels.Thanks,
Christian
Quoted 8 lines · On Sat, 24 Oct 2026 09:55:19 +0200, [email protected] wrote:
Since
pas_pci_init()is now called later during boot, the i8259 initialization inpas_init_IRQ()happens too early and accesses registers that are not yet mapped, preventing the board from booting.Move the Nemo-specific i8259 initialization to
pas_add_bridge(), after the ISA bridge has been discovered.[...]
Applied to powerpc/fixes.
[1/1] powerpc/pasemi: Defer Nemo IRQ initialization
https://git.kernel.org/powerpc/c/0a7ad2e55ff0de8c13dbe25aa87cecb0243b245e
cheers