[PATCH v9 07/14] powerpc: Modify soft_enable from flag to mask
Nicholas Piggin
npiggin at gmail.com
Thu Aug 3 14:44:30 AEST 2017
Hi Maddy,
I've gone over this series a few times and it looks pretty good
to me. I'd like others to have a look before I do any more bike
shedding of it :)
Just with this one there are still a couple of places where this
is comparing the entire mask and not the LINUX bit:
> @@ -156,7 +156,7 @@ static inline void may_hard_irq_enable(void)
>
> static inline bool arch_irq_disabled_regs(struct pt_regs *regs)
> {
> - return (regs->softe == IRQ_DISABLED);
> + return (regs->softe == IRQ_DISABLE_MASK_LINUX);
> }
>
> extern bool prep_irq_for_idle(void);
> @@ -767,7 +766,7 @@ resume_kernel:
> lwz r8,TI_PREEMPT(r9)
> cmpwi cr1,r8,0
> ld r0,SOFTE(r1)
> - cmpdi r0,IRQ_DISABLED
> + cmpdi r0,IRQ_DISABLE_MASK_LINUX
> crandc eq,cr1*4+eq,eq
> bne restore
>
> @@ -807,11 +806,11 @@ restore:
> */
> ld r5,SOFTE(r1)
> lbz r6,PACASOFTIRQEN(r13)
> - cmpwi cr0,r5,IRQ_DISABLED
> - beq .Lrestore_irq_off
> + andi. r5,r5,IRQ_DISABLE_MASK_LINUX
> + bne .Lrestore_irq_off
>
> /* We are enabling, were we already enabled ? Yes, just return */
> - cmpwi cr0,r6,IRQ_ENABLED
> + cmpwi cr0,r6,IRQ_DISABLE_MASK_NONE
> beq cr0,.Ldo_restore
>
> /*
> @@ -207,7 +207,7 @@ notrace void arch_local_irq_restore(unsigned long en)
>
> /* Write the new soft-enabled value */
> soft_enabled_set(en);
> - if (en == IRQ_DISABLED)
> + if (en == IRQ_DISABLE_MASK_LINUX)
> return;
> /*
> * From this point onward, we can take interrupts, preempt,
^^ This one is fixed in patch 11, but that should be done here.
> @@ -322,7 +322,7 @@ static inline void perf_read_regs(struct pt_regs *regs)
> */
> static inline int perf_intr_is_nmi(struct pt_regs *regs)
> {
> - return (regs->softe == IRQ_DISABLED);
> + return (regs->softe == IRQ_DISABLE_MASK_LINUX);
> }
>
> /*
More information about the Linuxppc-dev
mailing list