diff options
| author | Tony Luck <aegl@agluck-lia64.sc.intel.com> | 2004-09-03 05:40:50 +0000 |
|---|---|---|
| committer | Tony Luck <aegl@agluck-lia64.sc.intel.com> | 2004-09-03 05:40:50 +0000 |
| commit | d26e0b893f3e44d49712d16c0f083ee5bc78290f (patch) | |
| tree | c0905693a8379a5709a2d9a5cb7a0d26fa655741 /include | |
| parent | e3c14a190e1481acb10d24f357eca806cb509711 (diff) | |
| parent | 70e2700ae393d1c0579474717b7a8c151a1a19c7 (diff) | |
Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/work/ian
into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ia64/mmu_context.h | 39 | ||||
| -rw-r--r-- | include/asm-ia64/page.h | 7 | ||||
| -rw-r--r-- | include/asm-ia64/tlbflush.h | 7 |
3 files changed, 10 insertions, 43 deletions
diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h index 51558c0f0243..04ec302e9aa1 100644 --- a/include/asm-ia64/mmu_context.h +++ b/include/asm-ia64/mmu_context.h @@ -28,36 +28,6 @@ #include <asm/processor.h> -#define MMU_CONTEXT_DEBUG 0 - -#if MMU_CONTEXT_DEBUG - -#include <ia64intrin.h> - -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 @@ -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. diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 315a8631068f..b5b278f584d2 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h @@ -84,6 +84,13 @@ extern int ia64_pfn_valid (unsigned long pfn); #endif #ifndef CONFIG_DISCONTIGMEM +# ifdef CONFIG_VIRTUAL_MEM_MAP +extern struct page *vmem_map; +# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) +# define page_to_pfn(page) ((unsigned long) (page - vmem_map)) +# define pfn_to_page(pfn) (vmem_map + (pfn)) +# endif +#else /* !CONFIG_VIRTUAL_MEM_MAP */ #define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) #define page_to_pfn(page) ((unsigned long) (page - mem_map)) #define pfn_to_page(pfn) (mem_map + (pfn)) diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h index 049c69845b23..b65c62702724 100644 --- a/include/asm-ia64/tlbflush.h +++ b/include/asm-ia64/tlbflush.h @@ -48,22 +48,19 @@ local_finish_flush_tlb_mm (struct mm_struct *mm) static inline void flush_tlb_mm (struct mm_struct *mm) { - MMU_TRACE('F', smp_processor_id(), mm, mm->context); if (!mm) - goto out; + return; mm->context = 0; if (atomic_read(&mm->mm_users) == 0) - goto out; /* happens as a result of exit_mmap() */ + return; /* happens as a result of exit_mmap() */ #ifdef CONFIG_SMP smp_flush_tlb_mm(mm); #else local_finish_flush_tlb_mm(mm); #endif - out: - MMU_TRACE('f', smp_processor_id(), mm, mm->context); } extern void flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end); |
