parisc: Fix alternative coding for PCX-U CPUs
Helge Deller
maintainerPATCH 1/1 parisc: Fix alternative coding for PCX-U CPUs
Sven Schnelle noticed a reproduceable kernel crash (HPMC) on his C240 machine due to the alternative coding infrastructure.
According to the documentation, data cache flushes and sync instructions are needed on the PCX-U (e.g. C200/C240) platforms, while PCX-W (e.g. C360) platforms don't need those syncs when changing the IO PDIR data structures.
So, let's not replace the fdc and sync assembler instructions by NOPS if we see a CPU < PA8500 (PCX-W).
Reported-by Sven Schnelle <[email protected]>
Tested-by Sven Schnelle <[email protected]>
Fixes 3847dab77421 ("parisc: Add alternative coding infrastructure")
Signed-off-by Helge Deller <[email protected]>
Cc [email protected] # 5.0+
arch/parisc/kernel/alternative.c +2 -1
@@ -56,7 +56,8 @@ void __init_or_module apply_alternatives(struct alt_instr *start,* time IO-PDIR is changed in Ike/Astro. */ if ((cond &ALT_COND_NO_IOC_FDC ) && - (boot_cpu_data.pdc.capabilities &PDC_MODEL_IOPDIR_FDC )) + ((boot_cpu_data.cpu_type < pcxw) || + (boot_cpu_data.pdc.capabilities &PDC_MODEL_IOPDIR_FDC )))continue ;/* Want to replace pdtlb by a pdtlb,l instruction? */