summaryrefslogtreecommitdiff
path: root/include/asm-sh/mmu_context.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-27 22:16:47 (GMT)
committerJeff Garzik <jeff@garzik.org>2006-09-27 22:16:47 (GMT)
commit3b9f6cb8a1ec791be79c6c7595fea922f12d1e64 (patch)
tree2393a448add846e6c2ed12f68106c3018b72c6a9 /include/asm-sh/mmu_context.h
parentc38778c3a9aeadcd1ee319cfc8ea5a9cbf8cdafa (diff)
parenta77c64c1a641950626181b4857abb701d8f38ccc (diff)
downloadlinux-fsl-qoriq-3b9f6cb8a1ec791be79c6c7595fea922f12d1e64.tar.xz
Merge branch 'master' into upstream
Diffstat (limited to 'include/asm-sh/mmu_context.h')
-rw-r--r--include/asm-sh/mmu_context.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h
index 6760d06..c7088ef 100644
--- a/include/asm-sh/mmu_context.h
+++ b/include/asm-sh/mmu_context.h
@@ -49,7 +49,7 @@ get_mmu_context(struct mm_struct *mm)
unsigned long mc = mmu_context_cache;
/* Check if we have old version of context. */
- if (((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0)
+ if (((mm->context.id ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0)
/* It's up to date, do nothing */
return;
@@ -68,7 +68,7 @@ get_mmu_context(struct mm_struct *mm)
if (!mc)
mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION;
}
- mm->context = mc;
+ mm->context.id = mc;
}
/*
@@ -78,7 +78,7 @@ get_mmu_context(struct mm_struct *mm)
static __inline__ int init_new_context(struct task_struct *tsk,
struct mm_struct *mm)
{
- mm->context = NO_CONTEXT;
+ mm->context.id = NO_CONTEXT;
return 0;
}
@@ -123,7 +123,7 @@ static __inline__ unsigned long get_asid(void)
static __inline__ void activate_context(struct mm_struct *mm)
{
get_mmu_context(mm);
- set_asid(mm->context & MMU_CONTEXT_ASID_MASK);
+ set_asid(mm->context.id & MMU_CONTEXT_ASID_MASK);
}
/* MMU_TTB can be used for optimizing the fault handling.
@@ -174,9 +174,7 @@ static inline void enable_mmu(void)
{
/* Enable MMU */
ctrl_outl(MMU_CONTROL_INIT, MMUCR);
-
- /* The manual suggests doing some nops after turning on the MMU */
- __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop\n\t");
+ ctrl_barrier();
if (mmu_context_cache == NO_CONTEXT)
mmu_context_cache = MMU_CONTEXT_FIRST_VERSION;
@@ -191,7 +189,8 @@ static inline void disable_mmu(void)
cr = ctrl_inl(MMUCR);
cr &= ~MMU_CONTROL_INIT;
ctrl_outl(cr, MMUCR);
- __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop\n\t");
+
+ ctrl_barrier();
}
#else
/*