diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/book3s/32/kup.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/book3s/32/kup.h b/arch/powerpc/include/asm/book3s/32/kup.h index 1670dfe9d4f1..c1f7c2e625a6 100644 --- a/arch/powerpc/include/asm/book3s/32/kup.h +++ b/arch/powerpc/include/asm/book3s/32/kup.h @@ -15,11 +15,13 @@ static inline void kuap_update_sr(u32 sr, u32 addr, u32 end) { addr &= 0xf0000000; /* align addr to start of segment */ barrier(); /* make sure thread.kuap is updated before playing with SRs */ - while (addr < end) { + for (;;) { mtsr(sr, addr); + addr += 0x10000000; /* address of next segment */ + if (addr >= end) + break; sr += 0x111; /* next VSID */ sr &= 0xf0ffffff; /* clear VSID overflow */ - addr += 0x10000000; /* address of next segment */ } isync(); /* Context sync required after mtsr() */ } |