5 #define __cpu_fn(name,x) cpu_##name##x
7 #define __cpu_fn(name,x) cpu_/**/name/**/x
9 #define cpu_fn(name,x) __cpu_fn(name,x)
12 * If we are supporting multiple CPUs, then
13 * we must use a table of function pointers
14 * for this lot. Otherwise, we can optimise
17 #define cpu_data_abort cpu_fn(CPU_NAME,_data_abort)
18 #define cpu_check_bugs cpu_fn(CPU_NAME,_check_bugs)
19 #define cpu_proc_init cpu_fn(CPU_NAME,_proc_init)
20 #define cpu_proc_fin cpu_fn(CPU_NAME,_proc_fin)
21 #define cpu_do_idle cpu_fn(CPU_NAME,_do_idle)
23 #define cpu_flush_cache_all cpu_fn(CPU_NAME,_flush_cache_all)
24 #define cpu_flush_cache_area cpu_fn(CPU_NAME,_flush_cache_area)
25 #define cpu_flush_cache_entry cpu_fn(CPU_NAME,_flush_cache_entry)
26 #define cpu_clean_cache_area cpu_fn(CPU_NAME,_clean_cache_area)
27 #define cpu_flush_ram_page cpu_fn(CPU_NAME,_flush_ram_page)
28 #define cpu_flush_tlb_all cpu_fn(CPU_NAME,_flush_tlb_all)
29 #define cpu_flush_tlb_area cpu_fn(CPU_NAME,_flush_tlb_area)
30 #define cpu_flush_tlb_page cpu_fn(CPU_NAME,_flush_tlb_page)
31 #define cpu_set_pgd cpu_fn(CPU_NAME,_set_pgd)
32 #define cpu_set_pmd cpu_fn(CPU_NAME,_set_pmd)
33 #define cpu_set_pte cpu_fn(CPU_NAME,_set_pte)
34 #define cpu_reset cpu_fn(CPU_NAME,_reset)
35 #define cpu_flush_icache_area cpu_fn(CPU_NAME,_flush_icache_area)
36 #define cpu_cache_wback_area cpu_fn(CPU_NAME,_cache_wback_area)
37 #define cpu_cache_purge_area cpu_fn(CPU_NAME,_cache_purge_area)
38 #define cpu_flush_icache_page cpu_fn(CPU_NAME,_flush_icache_page)
44 /* forward declare task_struct */
47 /* declare all the functions as extern */
48 extern void cpu_data_abort(unsigned long pc
);
49 extern void cpu_check_bugs(void);
50 extern void cpu_proc_init(void);
51 extern void cpu_proc_fin(void);
52 extern int cpu_do_idle(int mode
);
54 extern void cpu_flush_cache_all(void);
55 extern void cpu_flush_cache_area(unsigned long address
, unsigned long end
, int flags
);
56 extern void cpu_flush_cache_entry(unsigned long address
);
57 extern void cpu_clean_cache_area(unsigned long start
, unsigned long size
);
58 extern void cpu_flush_ram_page(unsigned long page
);
59 extern void cpu_flush_tlb_all(void);
60 extern void cpu_flush_tlb_area(unsigned long address
, unsigned long end
, int flags
);
61 extern void cpu_flush_tlb_page(unsigned long address
, int flags
);
62 extern void cpu_set_pgd(unsigned long pgd_phys
);
63 extern void cpu_set_pmd(pmd_t
*pmdp
, pmd_t pmd
);
64 extern void cpu_set_pte(pte_t
*ptep
, pte_t pte
);
65 extern volatile void cpu_reset(unsigned long addr
);
66 extern void cpu_flush_icache_area(unsigned long start
, unsigned long size
);
67 extern void cpu_cache_wback_area(unsigned long start
, unsigned long end
);
68 extern void cpu_cache_purge_area(unsigned long start
, unsigned long end
);
69 extern void cpu_flush_icache_page(unsigned long virt
);
71 #define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))