5 /* forward-declare task_struct */
9 * Don't change this structure - ASM code
12 extern struct processor
{
14 * get data abort address/flags
16 void (*_data_abort
)(unsigned long pc
);
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
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
);
53 void (*_flush_ram_page
)(unsigned long page
);
58 void (*_flush_tlb_all
)(void);
60 * flush a specific TLB
62 void (*_flush_tlb_area
)(unsigned long address
, unsigned long end
, int flags
);
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
);
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
);
98 int (*_do_idle
)(void);
100 * flush I cache for a page
102 void (*_flush_icache_page
)(unsigned long address
);
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)))