Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-arm/cpu-multi32.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 | #include <asm/page.h> |
| 11 | |
| 12 | struct mm_struct; |
| 13 | |
| 14 | /* |
| 15 | * Don't change this structure - ASM code |
| 16 | * relies on it. |
| 17 | */ |
| 18 | extern struct processor { |
| 19 | /* MISC |
| 20 | * get data abort address/flags |
| 21 | */ |
| 22 | void (*_data_abort)(unsigned long pc); |
| 23 | /* |
Paul Brook | 48d7927 | 2008-04-18 22:43:07 +0100 | [diff] [blame] | 24 | * Retrieve prefetch fault address |
| 25 | */ |
| 26 | unsigned long (*_prefetch_abort)(unsigned long lr); |
| 27 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | * Set up any processor specifics |
| 29 | */ |
| 30 | void (*_proc_init)(void); |
| 31 | /* |
| 32 | * Disable any processor specifics |
| 33 | */ |
| 34 | void (*_proc_fin)(void); |
| 35 | /* |
| 36 | * Special stuff for a reset |
| 37 | */ |
Al Viro | 3321565 | 2005-08-23 22:47:52 +0100 | [diff] [blame] | 38 | void (*reset)(unsigned long addr) __attribute__((noreturn)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | /* |
| 40 | * Idle the processor |
| 41 | */ |
| 42 | int (*_do_idle)(void); |
| 43 | /* |
| 44 | * Processor architecture specific |
| 45 | */ |
| 46 | /* |
| 47 | * clean a virtual address range from the |
| 48 | * D-cache without flushing the cache. |
| 49 | */ |
| 50 | void (*dcache_clean_area)(void *addr, int size); |
| 51 | |
| 52 | /* |
| 53 | * Set the page table |
| 54 | */ |
| 55 | void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm); |
| 56 | /* |
Russell King | ad1ae2f | 2006-12-13 14:34:43 +0000 | [diff] [blame] | 57 | * Set a possibly extended PTE. Non-extended PTEs should |
| 58 | * ignore 'ext'. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | */ |
Russell King | ad1ae2f | 2006-12-13 14:34:43 +0000 | [diff] [blame] | 60 | void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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) |
Russell King | ad1ae2f | 2006-12-13 14:34:43 +0000 | [diff] [blame] | 68 | #define cpu_set_pte_ext(ptep,pte,ext) processor.set_pte_ext(ptep,pte,ext) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm) |