2 * linux/include/asm-arm/proc-armo/cache.h
4 * Copyright (C) 1999-2000 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Cache handling for 26-bit ARM processors.
12 #define flush_cache_all() do { } while (0)
13 #define flush_cache_mm(mm) do { } while (0)
14 #define flush_cache_range(mm,start,end) do { } while (0)
15 #define flush_cache_page(vma,vmaddr) do { } while (0)
16 #define flush_page_to_ram(page) do { } while (0)
18 #define invalidate_dcache_range(start,end) do { } while (0)
19 #define clean_dcache_range(start,end) do { } while (0)
20 #define flush_dcache_range(start,end) do { } while (0)
21 #define flush_dcache_page(page) do { } while (0)
22 #define clean_dcache_entry(_s) do { } while (0)
23 #define clean_cache_entry(_start) do { } while (0)
25 #define flush_icache_range(start,end) do { } while (0)
26 #define flush_icache_page(vma,page) do { } while (0)
28 /* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */
29 #define clean_cache_area(_start,_size) do { } while (0)
34 * - flush_tlb_all() flushes all processes TLBs
35 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
36 * - flush_tlb_page(vma, vmaddr) flushes one page
37 * - flush_tlb_range(mm, start, end) flushes a range of pages
39 #define flush_tlb_all() memc_update_all()
40 #define flush_tlb_mm(mm) do { } while (0)
41 #define flush_tlb_range(mm, start, end) do { (void)(start); (void)(end); } while (0)
42 #define flush_tlb_page(vma, vmaddr) do { } while (0)
45 * The following handle the weird MEMC chip
47 extern __inline__ void memc_update_all(void)
49 struct task_struct *p;
51 cpu_memc_update_all(init_mm.pgd);
55 cpu_memc_update_all(p->mm->pgd);
57 processor._set_pgd(current->active_mm->pgd);
60 extern __inline__ void memc_update_mm(struct mm_struct *mm)
62 cpu_memc_update_all(mm->pgd);
64 if (mm == current->active_mm)
65 processor._set_pgd(mm->pgd);
68 extern __inline__ void
69 memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr)
71 cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr);
73 if (mm == current->active_mm)
74 processor._set_pgd(mm->pgd);
77 extern __inline__ void
78 memc_clear(struct mm_struct *mm, struct page *page)
80 cpu_memc_update_entry(mm->pgd, (unsigned long) page_address(page), 0);
82 if (mm == current->active_mm)
83 processor._set_pgd(mm->pgd);