2 * linux/include/asm-arm/cpu-multi32.h
4 * Copyright (C) 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.
14 /* forward-declare task_struct */
18 * Don't change this structure - ASM code
21 extern struct processor
{
23 * get data abort address/flags
25 void (*_data_abort
)(unsigned long pc
);
29 void (*_check_bugs
)(void);
31 * Set up any processor specifics
33 void (*_proc_init
)(void);
35 * Disable any processor specifics
37 void (*_proc_fin
)(void);
39 * Special stuff for a reset
41 volatile void (*reset
)(unsigned long addr
);
45 int (*_do_idle
)(int mode
);
47 * Processor architecture specific
53 void (*clean_invalidate_all
)(void);
55 * flush a specific page or pages
57 void (*clean_invalidate_range
)(unsigned long address
, unsigned long end
, int flags
);
61 void (*_flush_ram_page
)(void *virt_page
);
64 struct { /* D-cache */
66 * invalidate the specified data range
68 void (*invalidate_range
)(unsigned long start
, unsigned long end
);
70 * clean specified data range
72 void (*clean_range
)(unsigned long start
, unsigned long end
);
74 * obsolete flush cache entry
76 void (*clean_page
)(void *virt_page
);
78 * clean a virtual address range from the
79 * D-cache without flushing the cache.
81 void (*clean_entry
)(unsigned long start
);
84 struct { /* I-cache */
86 * invalidate the I-cache for the specified range
88 void (*invalidate_range
)(unsigned long start
, unsigned long end
);
90 * invalidate the I-cache for the specified virtual page
92 void (*invalidate_page
)(void *virt_page
);
99 void (*invalidate_all
)(void);
101 * flush a specific TLB
103 void (*invalidate_range
)(unsigned long address
, unsigned long end
);
105 * flush a specific TLB
107 void (*invalidate_page
)(unsigned long address
, int flags
);
110 struct { /* PageTable */
114 void (*set_pgd
)(unsigned long pgd_phys
);
116 * Set a PMD (handling IMP bit 4)
118 void (*set_pmd
)(pmd_t
*pmdp
, pmd_t pmd
);
122 void (*set_pte
)(pte_t
*ptep
, pte_t pte
);
126 extern const struct processor arm6_processor_functions
;
127 extern const struct processor arm7_processor_functions
;
128 extern const struct processor sa110_processor_functions
;
130 #define cpu_data_abort(pc) processor._data_abort(pc)
131 #define cpu_check_bugs() processor._check_bugs()
132 #define cpu_proc_init() processor._proc_init()
133 #define cpu_proc_fin() processor._proc_fin()
134 #define cpu_reset(addr) processor.reset(addr)
135 #define cpu_do_idle(mode) processor._do_idle(mode)
137 #define cpu_cache_clean_invalidate_all() processor.cache.clean_invalidate_all()
138 #define cpu_cache_clean_invalidate_range(s,e,f) processor.cache.clean_invalidate_range(s,e,f)
139 #define cpu_flush_ram_page(vp) processor.cache._flush_ram_page(vp)
141 #define cpu_dcache_clean_page(vp) processor.dcache.clean_page(vp)
142 #define cpu_dcache_clean_entry(addr) processor.dcache.clean_entry(addr)
143 #define cpu_dcache_clean_range(s,e) processor.dcache.clean_range(s,e)
144 #define cpu_dcache_invalidate_range(s,e) processor.dcache.invalidate_range(s,e)
146 #define cpu_icache_invalidate_range(s,e) processor.icache.invalidate_range(s,e)
147 #define cpu_icache_invalidate_page(vp) processor.icache.invalidate_page(vp)
149 #define cpu_tlb_invalidate_all() processor.tlb.invalidate_all()
150 #define cpu_tlb_invalidate_range(s,e) processor.tlb.invalidate_range(s,e)
151 #define cpu_tlb_invalidate_page(vp,f) processor.tlb.invalidate_page(vp,f)
153 #define cpu_set_pgd(pgd) processor.pgtable.set_pgd(pgd)
154 #define cpu_set_pmd(pmdp, pmd) processor.pgtable.set_pmd(pmdp, pmd)
155 #define cpu_set_pte(ptep, pte) processor.pgtable.set_pte(ptep, pte)
157 #define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))