Import 2.3.47pre4
[davej-history.git] / include / asm-arm / cpu-multi32.h
blob500e473ca0179350e7f7dc0d862516f9168bedfd
1 #ifndef __ASSEMBLY__
3 #include <asm/page.h>
5 /* forward-declare task_struct */
6 struct task_struct;
8 /*
9 * Don't change this structure - ASM code
10 * relies on it.
12 extern struct processor {
13 /* MISC
14 * get data abort address/flags
16 void (*_data_abort)(unsigned long pc);
18 * check for any bugs
20 void (*_check_bugs)(void);
22 * Set up any processor specifics
24 void (*_proc_init)(void);
26 * Disable any processor specifics
28 void (*_proc_fin)(void);
30 * Processor architecture specific
32 /* CACHE
34 * flush all caches
36 void (*_flush_cache_all)(void);
38 * flush a specific page or pages
40 void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags);
42 * flush cache entry for an address
44 void (*_flush_cache_entry)(unsigned long address);
46 * clean a virtual address range from the
47 * D-cache without flushing the cache.
49 void (*_clean_cache_area)(unsigned long start, unsigned long size);
51 * flush a page to RAM
53 void (*_flush_ram_page)(unsigned long page);
54 /* TLB
56 * flush all TLBs
58 void (*_flush_tlb_all)(void);
60 * flush a specific TLB
62 void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags);
64 * Set the page table
66 void (*_set_pgd)(unsigned long pgd_phys);
68 * Set a PMD (handling IMP bit 4)
70 void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd);
72 * Set a PTE
74 void (*_set_pte)(pte_t *ptep, pte_t pte);
76 * Special stuff for a reset
78 unsigned long (*reset)(void);
80 * flush an icached page
82 void (*_flush_icache_area)(unsigned long start, unsigned long size);
84 * write back dirty cached data
86 void (*_cache_wback_area)(unsigned long start, unsigned long end);
88 * purge cached data without (necessarily) writing it back
90 void (*_cache_purge_area)(unsigned long start, unsigned long end);
92 * flush a specific TLB
94 void (*_flush_tlb_page)(unsigned long address, int flags);
96 * Idle the processor
98 int (*_do_idle)(void);
100 * flush I cache for a page
102 void (*_flush_icache_page)(unsigned long address);
103 } processor;
105 extern const struct processor arm6_processor_functions;
106 extern const struct processor arm7_processor_functions;
107 extern const struct processor sa110_processor_functions;
109 #define cpu_data_abort(pc) processor._data_abort(pc)
110 #define cpu_check_bugs() processor._check_bugs()
111 #define cpu_proc_init() processor._proc_init()
112 #define cpu_proc_fin() processor._proc_fin()
113 #define cpu_do_idle() processor._do_idle()
115 #define cpu_flush_cache_all() processor._flush_cache_all()
116 #define cpu_flush_cache_area(start,end,flags) processor._flush_cache_area(start,end,flags)
117 #define cpu_flush_cache_entry(addr) processor._flush_cache_entry(addr)
118 #define cpu_clean_cache_area(start,size) processor._clean_cache_area(start,size)
119 #define cpu_flush_ram_page(page) processor._flush_ram_page(page)
120 #define cpu_flush_tlb_all() processor._flush_tlb_all()
121 #define cpu_flush_tlb_area(start,end,flags) processor._flush_tlb_area(start,end,flags)
122 #define cpu_flush_tlb_page(addr,flags) processor._flush_tlb_page(addr,flags)
123 #define cpu_set_pgd(pgd) processor._set_pgd(pgd)
124 #define cpu_set_pmd(pmdp, pmd) processor._set_pmd(pmdp, pmd)
125 #define cpu_set_pte(ptep, pte) processor._set_pte(ptep, pte)
126 #define cpu_reset() processor.reset()
127 #define cpu_flush_icache_area(start,end) processor._flush_icache_area(start,end)
128 #define cpu_cache_wback_area(start,end) processor._cache_wback_area(start,end)
129 #define cpu_cache_purge_area(start,end) processor._cache_purge_area(start,end)
130 #define cpu_flush_icache_page(virt) processor._flush_icache_page(virt)
132 #define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
134 #endif