X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ia64%2Fmmu_context.h;h=0096e7e05012705baecbeaf4cbe654b76bbed767;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=51558c0f024368be9c623f4d281a9f5e90bbd1ad;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h index 51558c0f0..0096e7e05 100644 --- a/include/asm-ia64/mmu_context.h +++ b/include/asm-ia64/mmu_context.h @@ -28,36 +28,6 @@ #include -#define MMU_CONTEXT_DEBUG 0 - -#if MMU_CONTEXT_DEBUG - -#include - -extern struct mmu_trace_entry { - char op; - u8 cpu; - u32 context; - void *mm; -} mmu_tbuf[1024]; - -extern volatile int mmu_tbuf_index; - -# define MMU_TRACE(_op,_cpu,_mm,_ctx) \ -do { \ - int i = __sync_fetch_and_add(&mmu_tbuf_index, 1) % ARRAY_SIZE(mmu_tbuf); \ - struct mmu_trace_entry e; \ - e.op = (_op); \ - e.cpu = (_cpu); \ - e.mm = (_mm); \ - e.context = (_ctx); \ - mmu_tbuf[i] = e; \ -} while (0) - -#else -# define MMU_TRACE(op,cpu,mm,ctx) do { ; } while (0) -#endif - struct ia64_ctx { spinlock_t lock; unsigned int next; /* next context number to use */ @@ -123,7 +93,6 @@ get_mmu_context (struct mm_struct *mm) static inline int init_new_context (struct task_struct *p, struct mm_struct *mm) { - MMU_TRACE('N', smp_processor_id(), mm, 0); mm->context = 0; return 0; } @@ -132,7 +101,6 @@ static inline void destroy_context (struct mm_struct *mm) { /* Nothing to do. */ - MMU_TRACE('D', smp_processor_id(), mm, mm->context); } static inline void @@ -142,7 +110,7 @@ reload_context (mm_context_t context) unsigned long rid_incr = 0; unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; - old_rr4 = ia64_get_rr(0x8000000000000000); + old_rr4 = ia64_get_rr(0x8000000000000000UL); rid = context << 3; /* make space for encoding the region number */ rid_incr = 1 << 8; @@ -156,11 +124,11 @@ reload_context (mm_context_t context) rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc); #endif - ia64_set_rr(0x0000000000000000, rr0); - ia64_set_rr(0x2000000000000000, rr1); - ia64_set_rr(0x4000000000000000, rr2); - ia64_set_rr(0x6000000000000000, rr3); - ia64_set_rr(0x8000000000000000, rr4); + ia64_set_rr(0x0000000000000000UL, rr0); + ia64_set_rr(0x2000000000000000UL, rr1); + ia64_set_rr(0x4000000000000000UL, rr2); + ia64_set_rr(0x6000000000000000UL, rr3); + ia64_set_rr(0x8000000000000000UL, rr4); ia64_srlz_i(); /* srlz.i implies srlz.d */ } @@ -171,19 +139,14 @@ activate_context (struct mm_struct *mm) do { context = get_mmu_context(mm); - MMU_TRACE('A', smp_processor_id(), mm, context); if (!cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) cpu_set(smp_processor_id(), mm->cpu_vm_mask); reload_context(context); - MMU_TRACE('a', smp_processor_id(), mm, context); /* in the unlikely event of a TLB-flush by another thread, redo the load: */ } while (unlikely(context != mm->context)); } -#define deactivate_mm(tsk,mm) \ -do { \ - MMU_TRACE('d', smp_processor_id(), mm, mm->context); \ -} while (0) +#define deactivate_mm(tsk,mm) do { } while (0) /* * Switch from address space PREV to address space NEXT.