[SRU][Zesty][PATCH 1/3] powerpc/64s: Fix system reset vs general interrupt reentrancy
Mauricio Faria de Oliveira
mauricfo at linux.vnet.ibm.com
Mon Oct 9 15:11:37 UTC 2017
Hi Joseph,
> --- a/arch/powerpc/kernel/asm-offsets.c
> +++ b/arch/powerpc/kernel/asm-offsets.c
> @@ -224,6 +224,7 @@ int main(void)
> DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen));
> DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc));
> DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb));
> + OFFSET(PACA_EXNMI, paca_struct, exnmi);
> DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr));
> DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
> DEFINE(SLBSHADOW_STACKVSID,
I'd suggest to change it to use the DEFINE() convention as well;
for uniformity, and perhaps make future backports easier,
even though your construction with OFFSET() is equivalent to the DEFINE() structure used:
$ grep -A1 OFFSET include/linux/kbuild.h
#define OFFSET(sym, str, mem) \
DEFINE(sym, offsetof(struct str, mem))
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -122,7 +122,7 @@ EXC_REAL_BEGIN(system_reset, 0x100, 0x200)
> SET_SCRATCH0(r13)
> GET_PACA(r13)
> clrrdi r13,r13,1 /* Last bit of HSPRG0 is set if waking from winkle */
> - EXCEPTION_PROLOG_PSERIES_PACA(PACA_EXGEN, system_reset_common, EXC_STD,
> + EXCEPTION_PROLOG_PSERIES(PACA_EXNMI, system_reset_common, EXC_STD,
> IDLETEST, 0x100)
And here, it's OK to follow the patch semantics and just 's/PACA_EXGEN/PACA_EXNMI/'
using the existing EXCEPTION_PROLOG_PSERIES_PACA (with '_PACA' suffix), rather
than change it to without it, since 'GET_PACA(r13)' has already been called
(it's the difference between with/without '_PACA' suffix).
It doesn't hurt to have it that way, it just gets PACA into r13 two times,
but I'd suggest for maintaining the current code call and patch semantics.
Thanks,
Mauricio
More information about the kernel-team
mailing list