On Sat, 3 May 2008, Ralf Baechle wrote: > Slightly cleaner: > > return KSEGX(a) == KSEG0; You mean: return KSEGX(a) == KSEG0 || KSEGX(a) == KSEG1; right? > Unfortunately there is no such macro for the 64-bit segments nor does > the existing KSEGX() work correctly for non-CKSEGx 64-bit addresses. As I mentioned there is suitable code doing exactly this in arch/mips/lib/uncached.c and it can be extracted to an inline function to be put in <asm/addrspace.h> to be reused here and in the future possibly elsewhere. Maciej