On Sat, Jan 27, 2018 at 11:12:23AM +0800, Huacai Chen wrote: > diff --git a/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h b/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h > index 3127391..4b7f58a 100644 > --- a/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h > +++ b/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h > @@ -26,12 +26,15 @@ > mfc0 t0, CP0_PAGEGRAIN > or t0, (0x1 << 29) > mtc0 t0, CP0_PAGEGRAIN > -#ifdef CONFIG_LOONGSON3_ENHANCEMENT > /* Enable STFill Buffer */ > + mfc0 t0, CP0_PRID > + andi t0, 0xffff Maybe worth including <asm/cpu.h and doing: andi t0, (PRID_IMP_MASK | PRID_REV_MASK) > + slti t0, 0x6308 and: slti t0, (PRID_IMP_LOONGSON_64 | PRID_REV_LOONGSON3A_R2) With something like that here and in the other place: Reviewed-by: James Hogan <jhogan@xxxxxxxxxx> Cheers James
Attachment:
signature.asc
Description: Digital signature