Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-arm/cpu-single.h |
| 3 | * |
| 4 | * Copyright (C) 2000 Russell King |
| 5 | * |
| 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. |
| 9 | */ |
| 10 | /* |
| 11 | * Single CPU |
| 12 | */ |
| 13 | #ifdef __STDC__ |
| 14 | #define __catify_fn(name,x) name##x |
| 15 | #else |
| 16 | #define __catify_fn(name,x) name/**/x |
| 17 | #endif |
| 18 | #define __cpu_fn(name,x) __catify_fn(name,x) |
| 19 | |
| 20 | /* |
| 21 | * If we are supporting multiple CPUs, then we must use a table of |
| 22 | * function pointers for this lot. Otherwise, we can optimise the |
| 23 | * table away. |
| 24 | */ |
| 25 | #define cpu_proc_init __cpu_fn(CPU_NAME,_proc_init) |
| 26 | #define cpu_proc_fin __cpu_fn(CPU_NAME,_proc_fin) |
| 27 | #define cpu_reset __cpu_fn(CPU_NAME,_reset) |
| 28 | #define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle) |
| 29 | #define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area) |
| 30 | #define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm) |
Russell King | ad1ae2f | 2006-12-13 14:34:43 +0000 | [diff] [blame] | 31 | #define cpu_set_pte_ext __cpu_fn(CPU_NAME,_set_pte_ext) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
| 33 | #include <asm/page.h> |
| 34 | |
| 35 | struct mm_struct; |
| 36 | |
| 37 | /* declare all the functions as extern */ |
| 38 | extern void cpu_proc_init(void); |
| 39 | extern void cpu_proc_fin(void); |
| 40 | extern int cpu_do_idle(void); |
| 41 | extern void cpu_dcache_clean_area(void *, int); |
| 42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
Russell King | ad1ae2f | 2006-12-13 14:34:43 +0000 | [diff] [blame] | 43 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); |
Al Viro | 3321565 | 2005-08-23 22:47:52 +0100 | [diff] [blame] | 44 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); |