On Fri, Mar 02, 2018 at 08:44:25PM +0100, Andrey Konovalov wrote: > +#ifdef CONFIG_KASAN_TAGS > +#define TCR_TBI_FLAGS (TCR_TBI0 | TCR_TBI1) > +#else > +#define TCR_TBI_FLAGS TCR_TBI0 > +#endif Rather than pulling TBI0 into this, I think it'd make more sense to have: #ifdef CONFIG_KASAN_TAGS #define KASAN_TCR_FLAGS TCR_TBI1 #else #define KASAN_TCR_FLAGS #endif > + > #define MAIR(attr, mt) ((attr) << ((mt) * 8)) > > /* > @@ -432,7 +438,7 @@ ENTRY(__cpu_setup) > * both user and kernel. > */ > ldr x10, =TCR_TxSZ(VA_BITS) | TCR_CACHE_FLAGS | TCR_SMP_FLAGS | \ > - TCR_TG_FLAGS | TCR_ASID16 | TCR_TBI0 | TCR_A1 > + TCR_TG_FLAGS | TCR_ASID16 | TCR_TBI_FLAGS | TCR_A1 ... and just append KASAN_TCR_FLAGS to the flags here. That's roughtly what we do with ENDIAN_SET_EL1 for SCTLR_EL1. Thanks, Mark. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>