LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Zigotzky <chzigotzky@xenosoft.de>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	maddy@linux.ibm.com, mpe@ellerman.id.au
Cc: npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org,
	Christian Zigotzky A-EON Open Source <info@xenosoft.de>,
	Darren Stevens <darren@stevens-zone.net>,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	Damien Stewart <hypexed@yahoo.com.au>,
	mad skateman <madskateman@gmail.com>
Subject: Re: [PATCH] powerpc/pasemi: Defer Nemo IRQ initialization
Date: Mon, 2 Nov 2026 06:20:23 +0100	[thread overview]
Message-ID: <1f7cd06f-9364-e5da-b65d-7282fc9af03e@xenosoft.de> (raw)
In-Reply-To: <zevr6h46.ritesh.list@gmail.com>

On 11/02/2026 04:34 AM, Ritesh Harjani (IBM) wrote:
> chzigotzky@xenosoft.de writes:
>
>> From: Christian Zigotzky A-EON Open Source <info@xenosoft.de>
>>
>> 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.
>
> 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")
> Cc: stable@vger.kernel.org
>
> 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) <ritesh.list@gmail.com>
>
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

[1] 
https://raw.githubusercontent.com/chzigotzky/kernels/refs/heads/6_12/patches/X1000/pas_pci_init_v6.patch
>> Suggested-by: Darren Stevens <darren@stevens-zone.net>
>> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>> Signed-off-by: Christian Zigotzky A-EON Open Source <info@xenosoft.de>
>> ---
>>   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(-)
>>
>> diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
>> index 6f6743b8e48d..01bcfa258625 100644
>> --- a/arch/powerpc/platforms/pasemi/pasemi.h
>> +++ b/arch/powerpc/platforms/pasemi/pasemi.h
>> @@ -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);
>> diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
>> index 2df955274652..fb53782da7ec 100644
>> --- a/arch/powerpc/platforms/pasemi/pci.c
>> +++ b/arch/powerpc/platforms/pasemi/pci.c
>> @@ -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;
>>   }
>>   
>> diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
>> index 45792ecd5dfd..7a961f2a228f 100644
>> --- a/arch/powerpc/platforms/pasemi/setup.c
>> +++ b/arch/powerpc/platforms/pasemi/setup.c
>> @@ -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);
>>   }
>> -- 
>> 2.43.0


-- 
Sent with BrassMonkey 35.0.2 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_35.0.2)



  reply	other threads:[~2026-11-02  5:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24  7:55 [PATCH] powerpc/pasemi: Defer Nemo IRQ initialization chzigotzky
2026-10-28  3:53 ` Christian Zigotzky
2026-11-02  3:34 ` Ritesh Harjani
2026-11-02  5:20   ` Christian Zigotzky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-28 11:04 [PATCH 0/2] KVM: PPC: BookE: Fix boot hang on preemptible kernels Shrikanth Hegde
2026-09-28 11:04 ` [PATCH 1/2] KVM: PPC: BookE: Disable preemption before loading guest FP and Altivec Shrikanth Hegde
2026-10-01 11:26   ` Narayana Murty N
2026-10-01 11:53     ` Shrikanth Hegde
2026-10-30 16:21       ` Ritesh Harjani
2026-11-01 11:35         ` [PATCH] powerpc/pasemi: Defer Nemo IRQ initialization Christian Zigotzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f7cd06f-9364-e5da-b65d-7282fc9af03e@xenosoft.de \
    --to=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=hypexed@yahoo.com.au \
    --cc=info@xenosoft.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=madskateman@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=ritesh.list@gmail.com \
    --cc=rtd2@xtra.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox