Import 2.3.1pre1
[davej-history.git] / include / asm-arm / proc-fns.h
blob75e97624434f9ebacccf995e6dab7f3cf9b9b1fd
1 /*
2 * linux/include/asm-arm/proc-fns.h
4 * Copyright (C) 1997 Russell King
5 */
6 #ifndef __ASM_PROCFNS_H
7 #define __ASM_PROCFNS_H
9 #include <asm/page.h>
11 #ifdef __KERNEL__
13 /* forward-declare task_struct */
14 struct task_struct;
17 * Don't change this structure
19 extern struct processor {
20 const char *name;
21 /* MISC
23 * flush caches for task switch
25 struct task_struct *(*_switch_to)(struct task_struct *prev, struct task_struct *next);
27 * get data abort address/flags
29 void (*_data_abort)(unsigned long pc);
31 * check for any bugs
33 void (*_check_bugs)(void);
35 * Set up any processor specifics
37 void (*_proc_init)(void);
39 * Disable any processor specifics
41 void (*_proc_fin)(void);
43 * Processor architecture specific
45 union {
46 struct {
47 /* CACHE
49 * flush all caches
51 void (*_flush_cache_all)(void);
53 * flush a specific page or pages
55 void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags);
57 * flush cache entry for an address
59 void (*_flush_cache_entry)(unsigned long address);
61 * clean a virtual address range from the
62 * D-cache without flushing the cache.
64 void (*_clean_cache_area)(unsigned long start, unsigned long size);
66 * flush a page to RAM
68 void (*_flush_ram_page)(unsigned long page);
69 /* TLB
71 * flush all TLBs
73 void (*_flush_tlb_all)(void);
75 * flush a specific TLB
77 void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags);
79 * Set a PMD (handling IMP bit 4)
81 void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd);
83 * Set a PTE
85 void (*_set_pte)(pte_t *ptep, pte_t pte);
87 * Special stuff for a reset
89 unsigned long (*reset)(void);
91 * flush an icached page
93 void (*_flush_icache_area)(unsigned long start, unsigned long size);
95 * write back dirty cached data
97 void (*_cache_wback_area)(unsigned long start, unsigned long end);
99 * purge cached data without (necessarily) writing it back
101 void (*_cache_purge_area)(unsigned long start, unsigned long end);
102 } armv3v4;
103 struct {
104 /* MEMC
106 * remap memc tables
108 void (*_remap_memc)(void *tsk);
110 * update task's idea of mmap
112 void (*_update_map)(void *tsk);
114 * update task's idea after abort
116 void (*_update_mmu_cache)(void *vma, unsigned long addr, pte_t pte);
117 /* XCHG
119 unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr);
120 unsigned long (*_xchg_2)(unsigned long x, volatile void *ptr);
121 unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr);
122 } armv2;
123 } u;
124 } processor;
125 #endif
126 #endif