X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-m32r%2Fmmu_context.h;h=542302eb6bcbf97d9e1bd87474c4ce3bbd6ee145;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=c16f81cd9a1484ff3242c40b91c10f197f5a7085;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index c16f81cd9..542302eb6 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h @@ -1,9 +1,8 @@ #ifndef _ASM_M32R_MMU_CONTEXT_H #define _ASM_M32R_MMU_CONTEXT_H -/* $Id */ +#ifdef __KERNEL__ -#include #include @@ -15,7 +14,6 @@ #ifndef __ASSEMBLY__ -#include #include #include #include @@ -34,13 +32,13 @@ extern unsigned long mmu_context_cache_dat[]; #define mm_context(mm) mm->context[smp_processor_id()] #endif /* not CONFIG_SMP */ -#define set_tlb_tag(entry, tag) (*entry = (tag & PAGE_MASK)|get_asid()) +#define set_tlb_tag(entry, tag) (*entry = (tag & PAGE_MASK)|get_asid()) #define set_tlb_data(entry, data) (*entry = (data | _PAGE_PRESENT)) #ifdef CONFIG_MMU #define enter_lazy_tlb(mm, tsk) do { } while (0) -static __inline__ void get_new_mmu_context(struct mm_struct *mm) +static inline void get_new_mmu_context(struct mm_struct *mm) { unsigned long mc = ++mmu_context_cache; @@ -59,7 +57,7 @@ static __inline__ void get_new_mmu_context(struct mm_struct *mm) /* * Get MMU context if needed. */ -static __inline__ void get_mmu_context(struct mm_struct *mm) +static inline void get_mmu_context(struct mm_struct *mm) { if (mm) { unsigned long mc = mmu_context_cache; @@ -75,7 +73,7 @@ static __inline__ void get_mmu_context(struct mm_struct *mm) * Initialize the context related info for a new mm_struct * instance. */ -static __inline__ int init_new_context(struct task_struct *tsk, +static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { #ifndef CONFIG_SMP @@ -97,12 +95,12 @@ static __inline__ int init_new_context(struct task_struct *tsk, */ #define destroy_context(mm) do { } while (0) -static __inline__ void set_asid(unsigned long asid) +static inline void set_asid(unsigned long asid) { *(volatile unsigned long *)MASID = (asid & MMU_CONTEXT_ASID_MASK); } -static __inline__ unsigned long get_asid(void) +static inline unsigned long get_asid(void) { unsigned long asid; @@ -116,13 +114,13 @@ static __inline__ unsigned long get_asid(void) * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ -static __inline__ void activate_context(struct mm_struct *mm) +static inline void activate_context(struct mm_struct *mm) { get_mmu_context(mm); set_asid(mm_context(mm) & MMU_CONTEXT_ASID_MASK); } -static __inline__ void switch_mm(struct mm_struct *prev, +static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { #ifdef CONFIG_SMP @@ -165,5 +163,6 @@ static __inline__ void switch_mm(struct mm_struct *prev, #endif /* not __ASSEMBLY__ */ -#endif /* _ASM_M32R_MMU_CONTEXT_H */ +#endif /* __KERNEL__ */ +#endif /* _ASM_M32R_MMU_CONTEXT_H */