Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0c827c0 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s: Avoid a branch in masked_[H]interrupt()



Interrupts which do not require EE to be cleared can all be tested
with a single bitwise test.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 3a2df379
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1370,10 +1370,8 @@ masked_##_H##interrupt: \
	ori	r10,r10,0xffff;				\
	mtspr	SPRN_DEC,r10;				\
	b	MASKED_DEC_HANDLER_LABEL;		\
1:	cmpwi	r10,PACA_IRQ_DBELL;			\
	beq	2f;					\
	cmpwi	r10,PACA_IRQ_HMI;			\
	beq	2f;					\
1:	andi.	r10,r10,(PACA_IRQ_DBELL|PACA_IRQ_HMI);	\
	bne	2f;					\
	mfspr	r10,SPRN_##_H##SRR1;			\
	rldicl	r10,r10,48,1; /* clear MSR_EE */	\
	rotldi	r10,r10,16;				\