1
2
3
4
5
6
7
8
9
10#include <asm/page.h>
11
12struct mm_struct;
13
14
15
16
17
18extern struct processor {
19
20
21
22 void (*_data_abort)(unsigned long pc);
23
24
25
26 unsigned long (*_prefetch_abort)(unsigned long lr);
27
28
29
30 void (*_proc_init)(void);
31
32
33
34 void (*_proc_fin)(void);
35
36
37
38 void (*reset)(unsigned long addr) __attribute__((noreturn));
39
40
41
42 int (*_do_idle)(void);
43
44
45
46
47
48
49
50 void (*dcache_clean_area)(void *addr, int size);
51
52
53
54
55 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm);
56
57
58
59
60 void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext);
61} processor;
62
63#define cpu_proc_init() processor._proc_init()
64#define cpu_proc_fin() processor._proc_fin()
65#define cpu_reset(addr) processor.reset(addr)
66#define cpu_do_idle() processor._do_idle()
67#define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz)
68#define cpu_set_pte_ext(ptep,pte,ext) processor.set_pte_ext(ptep,pte,ext)
69#define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)
70