"Aneesh Kumar K.V" <aneesh.ku...@linux.ibm.com> writes: > diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h > index 255a1837e9f7..f5c7a17c198a 100644 > --- a/arch/powerpc/include/asm/mmu.h > +++ b/arch/powerpc/include/asm/mmu.h > @@ -28,6 +28,11 @@ > * Individual features below. > */ > > +/* > + * Supports KUAP (key 0 controlling userspace addresses) on radix > + */
That comment needs updating. I think this feature now means we have either key 0 controlling uaccess on radix OR we're using the AMR to manually implement KUAP. > +#define MMU_FTR_KUAP ASM_CONST(0x00000200) I agree with Christophe that this name is now too generic. With that name one would expect it to be enabled on the 32-bit CPUs that implement KUAP. Maybe MMU_FTR_BOOK3S_KUAP ? If in future the other MMUs want an MMU feature for KUAP then we could rename it to MMU_FTR_KUAP, but we'd need to be careful with ifdefs to make sure it guards the right things. cheers