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.
12 #include <asm/memory.h>
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);
27 * Set up any processor specifics
29 void (*_proc_init)(void);
31 * Disable any processor specifics
33 void (*_proc_fin)(void);
35 * Special stuff for a reset
37 volatile void (*reset)(unsigned long addr);
41 int (*_do_idle)(void);
43 * Processor architecture specific
46 * clean a virtual address range from the
47 * D-cache without flushing the cache.
49 void (*dcache_clean_area)(void *addr, int size);
54 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm);
58 void (*set_pte)(pte_t *ptep, pte_t pte);
61 #define cpu_proc_init() processor._proc_init()
62 #define cpu_proc_fin() processor._proc_fin()
63 #define cpu_reset(addr) processor.reset(addr)
64 #define cpu_do_idle() processor._do_idle()
65 #define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz)
66 #define cpu_set_pte(ptep, pte) processor.set_pte(ptep, pte)
68 #define cpu_switch_mm(pgd,mm) processor.switch_mm(__virt_to_phys((unsigned long)(pgd)),mm)
70 #define cpu_get_pgd() \
73 __asm__("mrc p15, 0, %0, c2, c0, 0" \
74 : "=r" (pg) : : "cc"); \
76 (pgd_t *)phys_to_virt(pg); \