mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
@ 2026-08-12 15:20 Mukesh Kumar Chaurasiya (IBM)
  2026-08-13  6:36 ` Venkat Rao Bagalkote
  2026-08-14  5:36 ` Shrikanth Hegde
  0 siblings, 2 replies; 7+ messages in thread
From: Mukesh Kumar Chaurasiya (IBM) @ 2026-08-12 15:20 UTC (permalink / raw)
  To: maddy, mpe, npiggin, chleroy, sshegde, mchauras, mkchauras,
	linuxppc-dev, linux-kernel
  Cc: Venkat Rao Bagalkote

commit 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
fixed a BUG in preempt_schedule_irq() by calling local_irq_disable()
unconditionally in arch_interrupt_exit_prepare() before irqentry_exit().
The fix is correct in intent but uses the wrong primitive for PPC64.

On PPC64, local_irq_disable() only sets the soft-mask
(irq_soft_mask = IRQS_DISABLED). It does not set PACA_IRQ_HARD_DIS in
irq_happened and does not clear MSR[EE].

This causes a continuous WARN_ON boot hang on Power11 pSeries LPARs
using the dedicated-cede cpuidle path. When the CPU wakes from H_CEDE,
interrupt_exit_kernel_prepare() calls replay_soft_interrupts(), which
dispatches pending async handlers (timer_interrupt, do_IRQ) using the
DEFINE_INTERRUPT_HANDLER_ASYNC macro. That macro calls
arch_interrupt_async_exit_prepare() -> arch_interrupt_exit_prepare()
before irqentry_exit(). With local_irq_disable(), PACA_IRQ_HARD_DIS
is not set, but next_interrupt() unconditionally asserts it:

  WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS));

This fires on every replayed interrupt, looping indefinitely and
preventing boot completion.

Fix this by replacing local_irq_disable() with hard_irq_disable().
On PPC64, hard_irq_disable() sets irq_soft_mask to IRQS_ALL_DISABLED,
sets PACA_IRQ_HARD_DIS in irq_happened, and clears MSR[EE] — satisfying
all of:

  - lockdep_assert_irqs_disabled() in irqentry_exit_to_kernel_mode()
  - next_interrupt()'s WARN_ON(!(irq_happened & PACA_IRQ_HARD_DIS))
  - preempt_schedule_irq()'s BUG_ON(!irqs_disabled())

On PPC32/non-64, hard_irq_disable() is equivalent to local_irq_disable(),
so there is no regression on those platforms.

Fixes: 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Closes: https://lore.kernel.org/all/6f9bfb0f-b14c-468e-bb9f-c157d120d0dc@linux.ibm.com/
Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
---
 arch/powerpc/include/asm/entry-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/include/asm/entry-common.h
index c5adb5006361..de64389b0815 100644
--- a/arch/powerpc/include/asm/entry-common.h
+++ b/arch/powerpc/include/asm/entry-common.h
@@ -270,7 +270,7 @@ static inline void arch_interrupt_exit_prepare(struct pt_regs *regs)
 	}
 
 	/* irqentry_exit expects to be called with interrupts disabled */
-	local_irq_disable();
+	hard_irq_disable();
 }
 
 static inline void arch_interrupt_async_enter_prepare(struct pt_regs *regs)
-- 
2.55.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-12 15:20 [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare() Mukesh Kumar Chaurasiya (IBM)
@ 2026-08-13  6:36 ` Venkat Rao Bagalkote
  2026-08-13  6:42   ` Christophe Leroy (CS GROUP)
  2026-08-14  5:36 ` Shrikanth Hegde
  1 sibling, 1 reply; 7+ messages in thread
From: Venkat Rao Bagalkote @ 2026-08-13  6:36 UTC (permalink / raw)
  To: Mukesh Kumar Chaurasiya (IBM),
	maddy, mpe, npiggin, chleroy, sshegde, mchauras, linuxppc-dev,
	linux-kernel


On 12/08/26 8:50 pm, Mukesh Kumar Chaurasiya (IBM) wrote:
> commit 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
> fixed a BUG in preempt_schedule_irq() by calling local_irq_disable()
> unconditionally in arch_interrupt_exit_prepare() before irqentry_exit().
> The fix is correct in intent but uses the wrong primitive for PPC64.
>
> On PPC64, local_irq_disable() only sets the soft-mask
> (irq_soft_mask = IRQS_DISABLED). It does not set PACA_IRQ_HARD_DIS in
> irq_happened and does not clear MSR[EE].
>
> This causes a continuous WARN_ON boot hang on Power11 pSeries LPARs
> using the dedicated-cede cpuidle path. When the CPU wakes from H_CEDE,
> interrupt_exit_kernel_prepare() calls replay_soft_interrupts(), which
> dispatches pending async handlers (timer_interrupt, do_IRQ) using the
> DEFINE_INTERRUPT_HANDLER_ASYNC macro. That macro calls
> arch_interrupt_async_exit_prepare() -> arch_interrupt_exit_prepare()
> before irqentry_exit(). With local_irq_disable(), PACA_IRQ_HARD_DIS
> is not set, but next_interrupt() unconditionally asserts it:
>
>    WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS));
>
> This fires on every replayed interrupt, looping indefinitely and
> preventing boot completion.
>
> Fix this by replacing local_irq_disable() with hard_irq_disable().
> On PPC64, hard_irq_disable() sets irq_soft_mask to IRQS_ALL_DISABLED,
> sets PACA_IRQ_HARD_DIS in irq_happened, and clears MSR[EE] — satisfying
> all of:
>
>    - lockdep_assert_irqs_disabled() in irqentry_exit_to_kernel_mode()
>    - next_interrupt()'s WARN_ON(!(irq_happened & PACA_IRQ_HARD_DIS))
>    - preempt_schedule_irq()'s BUG_ON(!irqs_disabled())
>
> On PPC32/non-64, hard_irq_disable() is equivalent to local_irq_disable(),
> so there is no regression on those platforms.
>
> Fixes: 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
> Closes: https://lore.kernel.org/all/6f9bfb0f-b14c-468e-bb9f-c157d120d0dc@linux.ibm.com/
> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
> ---


Tested this, and it fixes the reported issue.

Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>


Regards,

Venkat.


>   arch/powerpc/include/asm/entry-common.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/include/asm/entry-common.h
> index c5adb5006361..de64389b0815 100644
> --- a/arch/powerpc/include/asm/entry-common.h
> +++ b/arch/powerpc/include/asm/entry-common.h
> @@ -270,7 +270,7 @@ static inline void arch_interrupt_exit_prepare(struct pt_regs *regs)
>   	}
>   
>   	/* irqentry_exit expects to be called with interrupts disabled */
> -	local_irq_disable();
> +	hard_irq_disable();
>   }
>   
>   static inline void arch_interrupt_async_enter_prepare(struct pt_regs *regs)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-13  6:36 ` Venkat Rao Bagalkote
@ 2026-08-13  6:42   ` Christophe Leroy (CS GROUP)
  2026-08-13  7:59     ` Venkat Rao Bagalkote
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-08-13  6:42 UTC (permalink / raw)
  To: Venkat Rao Bagalkote, Mukesh Kumar Chaurasiya (IBM),
	maddy, mpe, npiggin, sshegde, mchauras, linuxppc-dev,
	linux-kernel



Le 13/08/2026 à 08:36, Venkat Rao Bagalkote a écrit :
> 
> On 12/08/26 8:50 pm, Mukesh Kumar Chaurasiya (IBM) wrote:
>> commit 334f3f6d7a16 ("powerpc/entry: Disable interrupts before 
>> irqentry_exit")
>> fixed a BUG in preempt_schedule_irq() by calling local_irq_disable()
>> unconditionally in arch_interrupt_exit_prepare() before irqentry_exit().
>> The fix is correct in intent but uses the wrong primitive for PPC64.
>>
>> On PPC64, local_irq_disable() only sets the soft-mask
>> (irq_soft_mask = IRQS_DISABLED). It does not set PACA_IRQ_HARD_DIS in
>> irq_happened and does not clear MSR[EE].
>>
>> This causes a continuous WARN_ON boot hang on Power11 pSeries LPARs
>> using the dedicated-cede cpuidle path. When the CPU wakes from H_CEDE,
>> interrupt_exit_kernel_prepare() calls replay_soft_interrupts(), which
>> dispatches pending async handlers (timer_interrupt, do_IRQ) using the
>> DEFINE_INTERRUPT_HANDLER_ASYNC macro. That macro calls
>> arch_interrupt_async_exit_prepare() -> arch_interrupt_exit_prepare()
>> before irqentry_exit(). With local_irq_disable(), PACA_IRQ_HARD_DIS
>> is not set, but next_interrupt() unconditionally asserts it:
>>
>>    WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS));
>>
>> This fires on every replayed interrupt, looping indefinitely and
>> preventing boot completion.
>>
>> Fix this by replacing local_irq_disable() with hard_irq_disable().
>> On PPC64, hard_irq_disable() sets irq_soft_mask to IRQS_ALL_DISABLED,
>> sets PACA_IRQ_HARD_DIS in irq_happened, and clears MSR[EE] — satisfying
>> all of:
>>
>>    - lockdep_assert_irqs_disabled() in irqentry_exit_to_kernel_mode()
>>    - next_interrupt()'s WARN_ON(!(irq_happened & PACA_IRQ_HARD_DIS))
>>    - preempt_schedule_irq()'s BUG_ON(!irqs_disabled())
>>
>> On PPC32/non-64, hard_irq_disable() is equivalent to local_irq_disable(),
>> so there is no regression on those platforms.
>>
>> Fixes: 334f3f6d7a16 ("powerpc/entry: Disable interrupts before 
>> irqentry_exit")
>> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>> Closes: https://eur01.safelinks.protection.outlook.com/? 
>> url=https%3A%2F%2Flore.kernel.org%2Fall%2F6f9bfb0f-b14c-468e-bb9f- 
>> c157d120d0dc%40linux.ibm.com%2F&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cf780f6a2abcf425c875808def90533e4%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639221997929524168%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=kOer%2B610LkQs0ZKBn%2FutIB6j1bMoFasK4DmX4AEWOXA%3D&reserved=0
>> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
>> ---
> 
> 
> Tested this, and it fixes the reported issue.
> 
> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>

Didn't you say yesterday [1] that the change doesn't fix the issue ? Did 
I miss something ?

[1] 
https://lore.kernel.org/all/2f7e6c34-7258-4b20-a38e-cedebccb835f@linux.ibm.com/


> 
> 
> Regards,
> 
> Venkat.
> 
> 
>>   arch/powerpc/include/asm/entry-common.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/ 
>> include/asm/entry-common.h
>> index c5adb5006361..de64389b0815 100644
>> --- a/arch/powerpc/include/asm/entry-common.h
>> +++ b/arch/powerpc/include/asm/entry-common.h
>> @@ -270,7 +270,7 @@ static inline void 
>> arch_interrupt_exit_prepare(struct pt_regs *regs)
>>       }
>>       /* irqentry_exit expects to be called with interrupts disabled */
>> -    local_irq_disable();
>> +    hard_irq_disable();
>>   }
>>   static inline void arch_interrupt_async_enter_prepare(struct pt_regs 
>> *regs)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-13  6:42   ` Christophe Leroy (CS GROUP)
@ 2026-08-13  7:59     ` Venkat Rao Bagalkote
  0 siblings, 0 replies; 7+ messages in thread
From: Venkat Rao Bagalkote @ 2026-08-13  7:59 UTC (permalink / raw)
  To: Christophe Leroy (CS GROUP), Mukesh Kumar Chaurasiya (IBM),
	maddy, mpe, npiggin, sshegde, mchauras, linuxppc-dev,
	linux-kernel


On 13/08/26 12:12 pm, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 13/08/2026 à 08:36, Venkat Rao Bagalkote a écrit :
>>
>> On 12/08/26 8:50 pm, Mukesh Kumar Chaurasiya (IBM) wrote:
>>> commit 334f3f6d7a16 ("powerpc/entry: Disable interrupts before 
>>> irqentry_exit")
>>> fixed a BUG in preempt_schedule_irq() by calling local_irq_disable()
>>> unconditionally in arch_interrupt_exit_prepare() before 
>>> irqentry_exit().
>>> The fix is correct in intent but uses the wrong primitive for PPC64.
>>>
>>> On PPC64, local_irq_disable() only sets the soft-mask
>>> (irq_soft_mask = IRQS_DISABLED). It does not set PACA_IRQ_HARD_DIS in
>>> irq_happened and does not clear MSR[EE].
>>>
>>> This causes a continuous WARN_ON boot hang on Power11 pSeries LPARs
>>> using the dedicated-cede cpuidle path. When the CPU wakes from H_CEDE,
>>> interrupt_exit_kernel_prepare() calls replay_soft_interrupts(), which
>>> dispatches pending async handlers (timer_interrupt, do_IRQ) using the
>>> DEFINE_INTERRUPT_HANDLER_ASYNC macro. That macro calls
>>> arch_interrupt_async_exit_prepare() -> arch_interrupt_exit_prepare()
>>> before irqentry_exit(). With local_irq_disable(), PACA_IRQ_HARD_DIS
>>> is not set, but next_interrupt() unconditionally asserts it:
>>>
>>>    WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS));
>>>
>>> This fires on every replayed interrupt, looping indefinitely and
>>> preventing boot completion.
>>>
>>> Fix this by replacing local_irq_disable() with hard_irq_disable().
>>> On PPC64, hard_irq_disable() sets irq_soft_mask to IRQS_ALL_DISABLED,
>>> sets PACA_IRQ_HARD_DIS in irq_happened, and clears MSR[EE] — satisfying
>>> all of:
>>>
>>>    - lockdep_assert_irqs_disabled() in irqentry_exit_to_kernel_mode()
>>>    - next_interrupt()'s WARN_ON(!(irq_happened & PACA_IRQ_HARD_DIS))
>>>    - preempt_schedule_irq()'s BUG_ON(!irqs_disabled())
>>>
>>> On PPC32/non-64, hard_irq_disable() is equivalent to 
>>> local_irq_disable(),
>>> so there is no regression on those platforms.
>>>
>>> Fixes: 334f3f6d7a16 ("powerpc/entry: Disable interrupts before 
>>> irqentry_exit")
>>> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>>> Closes: https://eur01.safelinks.protection.outlook.com/? 
>>> url=https%3A%2F%2Flore.kernel.org%2Fall%2F6f9bfb0f-b14c-468e-bb9f- 
>>> c157d120d0dc%40linux.ibm.com%2F&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7Cf780f6a2abcf425c875808def90533e4%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639221997929524168%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=kOer%2B610LkQs0ZKBn%2FutIB6j1bMoFasK4DmX4AEWOXA%3D&reserved=0 
>>>
>>> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
>>> ---
>>
>>
>> Tested this, and it fixes the reported issue.
>>
>> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>
> Didn't you say yesterday [1] that the change doesn't fix the issue ? 
> Did I miss something ?
>
> [1] 
> https://lore.kernel.org/all/2f7e6c34-7258-4b20-a38e-cedebccb835f@linux.ibm.com/ 
>
>
>
Hi Christophe,

I think there are two separate issues being mixed together here, both of 
which were reported by me.

The first issue is the early boot hang. I tested the patch in that 
context and reported that the boot hang still persisted.

The second issue is the WARN in __replay_soft_interrupts(). For that 
issue, the same patch fixes the problem, which is why I provided the 
Tested-by tag.

I believe the confusion comes from the fact that the same patch ended up 
being discussed in relation to both reports. My earlier comment that the 
patch did not fix the issue was referring to the boot hang, while my 
Tested-by was for the WARN in __replay_soft_interrupts().

So, to clarify:

Boot hang issue: not fixed by the patch.
WARN in __replay_soft_interrupts(): fixed by the patch.

Regards,
Venkat


>>
>>
>> Regards,
>>
>> Venkat.
>>
>>
>>> arch/powerpc/include/asm/entry-common.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/ 
>>> include/asm/entry-common.h
>>> index c5adb5006361..de64389b0815 100644
>>> --- a/arch/powerpc/include/asm/entry-common.h
>>> +++ b/arch/powerpc/include/asm/entry-common.h
>>> @@ -270,7 +270,7 @@ static inline void 
>>> arch_interrupt_exit_prepare(struct pt_regs *regs)
>>>       }
>>>       /* irqentry_exit expects to be called with interrupts disabled */
>>> -    local_irq_disable();
>>> +    hard_irq_disable();
>>>   }
>>>   static inline void arch_interrupt_async_enter_prepare(struct 
>>> pt_regs *regs)
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-12 15:20 [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare() Mukesh Kumar Chaurasiya (IBM)
  2026-08-13  6:36 ` Venkat Rao Bagalkote
@ 2026-08-14  5:36 ` Shrikanth Hegde
  2026-08-14  6:12   ` Mukesh Kumar Chaurasiya
  1 sibling, 1 reply; 7+ messages in thread
From: Shrikanth Hegde @ 2026-08-14  5:36 UTC (permalink / raw)
  To: Mukesh Kumar Chaurasiya (IBM),
	maddy, mpe, npiggin, chleroy, mchauras, linuxppc-dev,
	linux-kernel
  Cc: Venkat Rao Bagalkote



On 8/12/26 8:50 PM, Mukesh Kumar Chaurasiya (IBM) wrote:
> commit 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
> fixed a BUG in preempt_schedule_irq() by calling local_irq_disable()
> unconditionally in arch_interrupt_exit_prepare() before irqentry_exit().
> The fix is correct in intent but uses the wrong primitive for PPC64.
> 
> On PPC64, local_irq_disable() only sets the soft-mask
> (irq_soft_mask = IRQS_DISABLED). It does not set PACA_IRQ_HARD_DIS in
> irq_happened and does not clear MSR[EE].
> 
> This causes a continuous WARN_ON boot hang on Power11 pSeries LPARs
> using the dedicated-cede cpuidle path. When the CPU wakes from H_CEDE,
> interrupt_exit_kernel_prepare() calls replay_soft_interrupts(), which
> dispatches pending async handlers (timer_interrupt, do_IRQ) using the
> DEFINE_INTERRUPT_HANDLER_ASYNC macro. That macro calls
> arch_interrupt_async_exit_prepare() -> arch_interrupt_exit_prepare()
> before irqentry_exit(). With local_irq_disable(), PACA_IRQ_HARD_DIS
> is not set, but next_interrupt() unconditionally asserts it:
> 
>    WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS));
> 
> This fires on every replayed interrupt, looping indefinitely and
> preventing boot completion.
> 
> Fix this by replacing local_irq_disable() with hard_irq_disable().
> On PPC64, hard_irq_disable() sets irq_soft_mask to IRQS_ALL_DISABLED,
> sets PACA_IRQ_HARD_DIS in irq_happened, and clears MSR[EE] — satisfying
> all of:
> 
>    - lockdep_assert_irqs_disabled() in irqentry_exit_to_kernel_mode()
>    - next_interrupt()'s WARN_ON(!(irq_happened & PACA_IRQ_HARD_DIS))
>    - preempt_schedule_irq()'s BUG_ON(!irqs_disabled())
> 
> On PPC32/non-64, hard_irq_disable() is equivalent to local_irq_disable(),
> so there is no regression on those platforms.
> 

This is good explanation, but what i not understanding is,

why pattern of setting PACA_IRQ_HARD_DIS changed?
Previous code at interrupt_exit_kernel_prepare which did local_irq_disable too.

Please check where was PACA_IRQ_HARD_DIS set without GENERIC_ENTRY which was preventing
this from happening?


> Fixes: 334f3f6d7a16 ("powerpc/entry: Disable interrupts before irqentry_exit")
> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
> Closes: https://lore.kernel.org/all/6f9bfb0f-b14c-468e-bb9f-c157d120d0dc@linux.ibm.com/
> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
> ---
>   arch/powerpc/include/asm/entry-common.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/include/asm/entry-common.h
> index c5adb5006361..de64389b0815 100644
> --- a/arch/powerpc/include/asm/entry-common.h
> +++ b/arch/powerpc/include/asm/entry-common.h
> @@ -270,7 +270,7 @@ static inline void arch_interrupt_exit_prepare(struct pt_regs *regs)
>   	}
>   
>   	/* irqentry_exit expects to be called with interrupts disabled */
> -	local_irq_disable();
> +	hard_irq_disable();
>   }
>   
>   static inline void arch_interrupt_async_enter_prepare(struct pt_regs *regs)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-14  5:36 ` Shrikanth Hegde
@ 2026-08-14  6:12   ` Mukesh Kumar Chaurasiya
  2026-08-15  4:57     ` Mukesh Kumar Chaurasiya
  0 siblings, 1 reply; 7+ messages in thread
From: Mukesh Kumar Chaurasiya @ 2026-08-14  6:12 UTC (permalink / raw)
  To: Shrikanth Hegde
  Cc: maddy, mpe, npiggin, chleroy, mchauras, linuxppc-dev,
	linux-kernel, Venkat Rao Bagalkote

On Fri, Aug 14, 2026 at 11:06:43AM +0530, Shrikanth Hegde wrote:
[...]
> This is good explanation, but what i not understanding is,
> 
> why pattern of setting PACA_IRQ_HARD_DIS changed?
> Previous code at interrupt_exit_kernel_prepare which did local_irq_disable too.
> 
> Please check where was PACA_IRQ_HARD_DIS set without GENERIC_ENTRY which was preventing
> this from happening?

That's an excellent point. I think we are looking at this incorrectly,
If this is related to the nested soft replay interrupt than this whole 
dynamics changes, local_irq_disable will work for the actual interrupt
but when we go nested something is telling that the nested interrupt
that interrupts are enabled. Let me look at this more deeply.

Regards,
Mukesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare()
  2026-08-14  6:12   ` Mukesh Kumar Chaurasiya
@ 2026-08-15  4:57     ` Mukesh Kumar Chaurasiya
  0 siblings, 0 replies; 7+ messages in thread
From: Mukesh Kumar Chaurasiya @ 2026-08-15  4:57 UTC (permalink / raw)
  To: Shrikanth Hegde
  Cc: maddy, mpe, npiggin, chleroy, mchauras, linuxppc-dev,
	linux-kernel, Venkat Rao Bagalkote

On Fri, Aug 14, 2026 at 11:42:22AM +0530, Mukesh Kumar Chaurasiya wrote:
> On Fri, Aug 14, 2026 at 11:06:43AM +0530, Shrikanth Hegde wrote:
> [...]
> > This is good explanation, but what i not understanding is,
> > 
> > why pattern of setting PACA_IRQ_HARD_DIS changed?
> > Previous code at interrupt_exit_kernel_prepare which did local_irq_disable too.
> > 
> > Please check where was PACA_IRQ_HARD_DIS set without GENERIC_ENTRY which was preventing
> > this from happening?
> 
> That's an excellent point. I think we are looking at this incorrectly,
> If this is related to the nested soft replay interrupt than this whole 
> dynamics changes, local_irq_disable will work for the actual interrupt
> but when we go nested something is telling that the nested interrupt
> that interrupts are enabled. Let me look at this more deeply.
> 
> Regards,
> Mukesh

Hey Venkat,

Can you try this diff,

diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c
index d5c48d1b0a31..2fbfebef74fe 100644
--- a/arch/powerpc/kernel/irq_64.c
+++ b/arch/powerpc/kernel/irq_64.c
@@ -117,7 +117,7 @@ static __no_kcsan void __replay_soft_interrupts(void)
 	local_paca->irq_happened |= PACA_IRQ_REPLAYING;
 
 	ppc_save_regs(&regs);
-	regs.softe = IRQS_ENABLED;
+	regs.softe = IRQS_DISABLED;
 	regs.msr |= MSR_EE;
 
 	/*


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-15  4:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-12 15:20 [PATCH] powerpc/entry: Use hard_irq_disable() in arch_interrupt_exit_prepare() Mukesh Kumar Chaurasiya (IBM)
2026-08-13  6:36 ` Venkat Rao Bagalkote
2026-08-13  6:42   ` Christophe Leroy (CS GROUP)
2026-08-13  7:59     ` Venkat Rao Bagalkote
2026-08-14  5:36 ` Shrikanth Hegde
2026-08-14  6:12   ` Mukesh Kumar Chaurasiya
2026-08-15  4:57     ` Mukesh Kumar Chaurasiya

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®