From 0f7de3d0fc5922798ff5b68a28604527860b0dca Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 22 Dec 2008 12:29:02 -0500 Subject: [PATCH] --- yaml --- r: 128005 b: refs/heads/master c: a60715f58907d4e1db7be6c31fa050c993e119b5 h: refs/heads/master i: 128003: 53a3a937c521acba62257bc7f8b180692244c5d8 v: v3 --- [refs] | 2 +- trunk/arch/parisc/include/asm/mmu_context.h | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 92b620f99578..2f7645d949a2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ca5506da6795ebc700fd41cef2a7785613fbe28 +refs/heads/master: a60715f58907d4e1db7be6c31fa050c993e119b5 diff --git a/trunk/arch/parisc/include/asm/mmu_context.h b/trunk/arch/parisc/include/asm/mmu_context.h index 85856c74ad1d..93028975e2cf 100644 --- a/trunk/arch/parisc/include/asm/mmu_context.h +++ b/trunk/arch/parisc/include/asm/mmu_context.h @@ -34,16 +34,21 @@ destroy_context(struct mm_struct *mm) mm->context = 0; } -static inline void load_context(mm_context_t context) +static inline unsigned long __space_to_prot(mm_context_t ctx) { - mtsp(context, 3); #if SPACEID_SHIFT == 0 - mtctl(context << 1,8); + return context << 1; #else - mtctl(context >> (SPACEID_SHIFT - 1),8); + return context >> (SPACEID_SHIFT - 1); #endif } +static inline void load_context(mm_context_t context) +{ + mtsp(context, 3); + mtctl(__space_to_prot(context), 8); +} + static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) {