Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 9389/2: mm: Define prototypes for all per-processor calls

Each CPU type ("proc") has assembly calls for initializing and
setting up the MM context, idle and so forth.

These calls have the C form of e.g.:

void cpu_arm920_init(void);

However this prototype is not really specified, instead it is
generated by the glue code in <asm/glue-proc.h> and the prototype
is implicit from the generic prototype defined in <asm/proc-fns.h>
such as cpu_proc_init() in this case. (This is a bit similar to
the "interface" or inheritance concept in other languages.)

To be able to annotate these assembly calls for CFI, they all need
to have a proper C prototype per CPU call.

Define these in a new C file that is only compiled when we use
CFI, and add __ADDRESSABLE() to each so the compiler knows that
these will be addressed (they are not explicitly called in C, they
are called by way of cpu_proc_init() etc).

It is a bit of definitions, but we do not expect new ARM32 CPUs
to appear very much so it should be pretty static.

Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

authored by

Linus Walleij and committed by
Russell King (Oracle)
393999fa 51db13aa

+501
+1
arch/arm/mm/Makefile
··· 90 90 obj-$(CONFIG_CPU_V6K) += proc-v6.o 91 91 obj-$(CONFIG_CPU_V7) += proc-v7.o proc-v7-bugs.o 92 92 obj-$(CONFIG_CPU_V7M) += proc-v7m.o 93 + obj-$(CONFIG_CFI_CLANG) += proc.o 93 94 94 95 obj-$(CONFIG_OUTER_CACHE) += l2c-common.o 95 96 obj-$(CONFIG_CACHE_B15_RAC) += cache-b15-rac.o
+500
arch/arm/mm/proc.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * This file defines C prototypes for the low-level processor assembly functions 4 + * and creates a reference for CFI. This needs to be done for every assembly 5 + * processor ("proc") function that is called from C but does not have a 6 + * corresponding C implementation. 7 + * 8 + * Processors are listed in the order they appear in the Makefile. 9 + * 10 + * Functions are listed if and only if they see use on the target CPU, and in 11 + * the order they are defined in struct processor. 12 + */ 13 + #include <asm/proc-fns.h> 14 + 15 + #ifdef CONFIG_CPU_ARM7TDMI 16 + void cpu_arm7tdmi_proc_init(void); 17 + __ADDRESSABLE(cpu_arm7tdmi_proc_init); 18 + void cpu_arm7tdmi_proc_fin(void); 19 + __ADDRESSABLE(cpu_arm7tdmi_proc_fin); 20 + void cpu_arm7tdmi_reset(void); 21 + __ADDRESSABLE(cpu_arm7tdmi_reset); 22 + int cpu_arm7tdmi_do_idle(void); 23 + __ADDRESSABLE(cpu_arm7tdmi_do_idle); 24 + void cpu_arm7tdmi_dcache_clean_area(void *addr, int size); 25 + __ADDRESSABLE(cpu_arm7tdmi_dcache_clean_area); 26 + void cpu_arm7tdmi_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 27 + __ADDRESSABLE(cpu_arm7tdmi_switch_mm); 28 + #endif 29 + 30 + #ifdef CONFIG_CPU_ARM720T 31 + void cpu_arm720_proc_init(void); 32 + __ADDRESSABLE(cpu_arm720_proc_init); 33 + void cpu_arm720_proc_fin(void); 34 + __ADDRESSABLE(cpu_arm720_proc_fin); 35 + void cpu_arm720_reset(void); 36 + __ADDRESSABLE(cpu_arm720_reset); 37 + int cpu_arm720_do_idle(void); 38 + __ADDRESSABLE(cpu_arm720_do_idle); 39 + void cpu_arm720_dcache_clean_area(void *addr, int size); 40 + __ADDRESSABLE(cpu_arm720_dcache_clean_area); 41 + void cpu_arm720_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 42 + __ADDRESSABLE(cpu_arm720_switch_mm); 43 + void cpu_arm720_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 44 + __ADDRESSABLE(cpu_arm720_set_pte_ext); 45 + #endif 46 + 47 + #ifdef CONFIG_CPU_ARM740T 48 + void cpu_arm740_proc_init(void); 49 + __ADDRESSABLE(cpu_arm740_proc_init); 50 + void cpu_arm740_proc_fin(void); 51 + __ADDRESSABLE(cpu_arm740_proc_fin); 52 + void cpu_arm740_reset(void); 53 + __ADDRESSABLE(cpu_arm740_reset); 54 + int cpu_arm740_do_idle(void); 55 + __ADDRESSABLE(cpu_arm740_do_idle); 56 + void cpu_arm740_dcache_clean_area(void *addr, int size); 57 + __ADDRESSABLE(cpu_arm740_dcache_clean_area); 58 + void cpu_arm740_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 59 + __ADDRESSABLE(cpu_arm740_switch_mm); 60 + #endif 61 + 62 + #ifdef CONFIG_CPU_ARM9TDMI 63 + void cpu_arm9tdmi_proc_init(void); 64 + __ADDRESSABLE(cpu_arm9tdmi_proc_init); 65 + void cpu_arm9tdmi_proc_fin(void); 66 + __ADDRESSABLE(cpu_arm9tdmi_proc_fin); 67 + void cpu_arm9tdmi_reset(void); 68 + __ADDRESSABLE(cpu_arm9tdmi_reset); 69 + int cpu_arm9tdmi_do_idle(void); 70 + __ADDRESSABLE(cpu_arm9tdmi_do_idle); 71 + void cpu_arm9tdmi_dcache_clean_area(void *addr, int size); 72 + __ADDRESSABLE(cpu_arm9tdmi_dcache_clean_area); 73 + void cpu_arm9tdmi_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 74 + __ADDRESSABLE(cpu_arm9tdmi_switch_mm); 75 + #endif 76 + 77 + #ifdef CONFIG_CPU_ARM920T 78 + void cpu_arm920_proc_init(void); 79 + __ADDRESSABLE(cpu_arm920_proc_init); 80 + void cpu_arm920_proc_fin(void); 81 + __ADDRESSABLE(cpu_arm920_proc_fin); 82 + void cpu_arm920_reset(void); 83 + __ADDRESSABLE(cpu_arm920_reset); 84 + int cpu_arm920_do_idle(void); 85 + __ADDRESSABLE(cpu_arm920_do_idle); 86 + void cpu_arm920_dcache_clean_area(void *addr, int size); 87 + __ADDRESSABLE(cpu_arm920_dcache_clean_area); 88 + void cpu_arm920_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 89 + __ADDRESSABLE(cpu_arm920_switch_mm); 90 + void cpu_arm920_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 91 + __ADDRESSABLE(cpu_arm920_set_pte_ext); 92 + #ifdef CONFIG_ARM_CPU_SUSPEND 93 + void cpu_arm920_do_suspend(void *); 94 + __ADDRESSABLE(cpu_arm920_do_suspend); 95 + void cpu_arm920_do_resume(void *); 96 + __ADDRESSABLE(cpu_arm920_do_resume); 97 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 98 + #endif /* CONFIG_CPU_ARM920T */ 99 + 100 + #ifdef CONFIG_CPU_ARM922T 101 + void cpu_arm922_proc_init(void); 102 + __ADDRESSABLE(cpu_arm922_proc_init); 103 + void cpu_arm922_proc_fin(void); 104 + __ADDRESSABLE(cpu_arm922_proc_fin); 105 + void cpu_arm922_reset(void); 106 + __ADDRESSABLE(cpu_arm922_reset); 107 + int cpu_arm922_do_idle(void); 108 + __ADDRESSABLE(cpu_arm922_do_idle); 109 + void cpu_arm922_dcache_clean_area(void *addr, int size); 110 + __ADDRESSABLE(cpu_arm922_dcache_clean_area); 111 + void cpu_arm922_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 112 + __ADDRESSABLE(cpu_arm922_switch_mm); 113 + void cpu_arm922_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 114 + __ADDRESSABLE(cpu_arm922_set_pte_ext); 115 + #endif 116 + 117 + #ifdef CONFIG_CPU_ARM925T 118 + void cpu_arm925_proc_init(void); 119 + __ADDRESSABLE(cpu_arm925_proc_init); 120 + void cpu_arm925_proc_fin(void); 121 + __ADDRESSABLE(cpu_arm925_proc_fin); 122 + void cpu_arm925_reset(void); 123 + __ADDRESSABLE(cpu_arm925_reset); 124 + int cpu_arm925_do_idle(void); 125 + __ADDRESSABLE(cpu_arm925_do_idle); 126 + void cpu_arm925_dcache_clean_area(void *addr, int size); 127 + __ADDRESSABLE(cpu_arm925_dcache_clean_area); 128 + void cpu_arm925_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 129 + __ADDRESSABLE(cpu_arm925_switch_mm); 130 + void cpu_arm925_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 131 + __ADDRESSABLE(cpu_arm925_set_pte_ext); 132 + #endif 133 + 134 + #ifdef CONFIG_CPU_ARM926T 135 + void cpu_arm926_proc_init(void); 136 + __ADDRESSABLE(cpu_arm926_proc_init); 137 + void cpu_arm926_proc_fin(void); 138 + __ADDRESSABLE(cpu_arm926_proc_fin); 139 + void cpu_arm926_reset(unsigned long addr, bool hvc); 140 + __ADDRESSABLE(cpu_arm926_reset); 141 + int cpu_arm926_do_idle(void); 142 + __ADDRESSABLE(cpu_arm926_do_idle); 143 + void cpu_arm926_dcache_clean_area(void *addr, int size); 144 + __ADDRESSABLE(cpu_arm926_dcache_clean_area); 145 + void cpu_arm926_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 146 + __ADDRESSABLE(cpu_arm926_switch_mm); 147 + void cpu_arm926_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 148 + __ADDRESSABLE(cpu_arm926_set_pte_ext); 149 + #ifdef CONFIG_ARM_CPU_SUSPEND 150 + void cpu_arm926_do_suspend(void *); 151 + __ADDRESSABLE(cpu_arm926_do_suspend); 152 + void cpu_arm926_do_resume(void *); 153 + __ADDRESSABLE(cpu_arm926_do_resume); 154 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 155 + #endif /* CONFIG_CPU_ARM926T */ 156 + 157 + #ifdef CONFIG_CPU_ARM940T 158 + void cpu_arm940_proc_init(void); 159 + __ADDRESSABLE(cpu_arm940_proc_init); 160 + void cpu_arm940_proc_fin(void); 161 + __ADDRESSABLE(cpu_arm940_proc_fin); 162 + void cpu_arm940_reset(void); 163 + __ADDRESSABLE(cpu_arm940_reset); 164 + int cpu_arm940_do_idle(void); 165 + __ADDRESSABLE(cpu_arm940_do_idle); 166 + void cpu_arm940_dcache_clean_area(void *addr, int size); 167 + __ADDRESSABLE(cpu_arm940_dcache_clean_area); 168 + void cpu_arm940_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 169 + __ADDRESSABLE(cpu_arm940_switch_mm); 170 + #endif 171 + 172 + #ifdef CONFIG_CPU_ARM946E 173 + void cpu_arm946_proc_init(void); 174 + __ADDRESSABLE(cpu_arm946_proc_init); 175 + void cpu_arm946_proc_fin(void); 176 + __ADDRESSABLE(cpu_arm946_proc_fin); 177 + void cpu_arm946_reset(void); 178 + __ADDRESSABLE(cpu_arm946_reset); 179 + int cpu_arm946_do_idle(void); 180 + __ADDRESSABLE(cpu_arm946_do_idle); 181 + void cpu_arm946_dcache_clean_area(void *addr, int size); 182 + __ADDRESSABLE(cpu_arm946_dcache_clean_area); 183 + void cpu_arm946_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 184 + __ADDRESSABLE(cpu_arm946_switch_mm); 185 + #endif 186 + 187 + #ifdef CONFIG_CPU_FA526 188 + void cpu_fa526_proc_init(void); 189 + __ADDRESSABLE(cpu_fa526_proc_init); 190 + void cpu_fa526_proc_fin(void); 191 + __ADDRESSABLE(cpu_fa526_proc_fin); 192 + void cpu_fa526_reset(unsigned long addr, bool hvc); 193 + __ADDRESSABLE(cpu_fa526_reset); 194 + int cpu_fa526_do_idle(void); 195 + __ADDRESSABLE(cpu_fa526_do_idle); 196 + void cpu_fa526_dcache_clean_area(void *addr, int size); 197 + __ADDRESSABLE(cpu_fa526_dcache_clean_area); 198 + void cpu_fa526_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 199 + __ADDRESSABLE(cpu_fa526_switch_mm); 200 + void cpu_fa526_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 201 + __ADDRESSABLE(cpu_fa526_set_pte_ext); 202 + #endif 203 + 204 + #ifdef CONFIG_CPU_ARM1020 205 + void cpu_arm1020_proc_init(void); 206 + __ADDRESSABLE(cpu_arm1020_proc_init); 207 + void cpu_arm1020_proc_fin(void); 208 + __ADDRESSABLE(cpu_arm1020_proc_fin); 209 + void cpu_arm1020_reset(unsigned long addr, bool hvc); 210 + __ADDRESSABLE(cpu_arm1020_reset); 211 + int cpu_arm1020_do_idle(void); 212 + __ADDRESSABLE(cpu_arm1020_do_idle); 213 + void cpu_arm1020_dcache_clean_area(void *addr, int size); 214 + __ADDRESSABLE(cpu_arm1020_dcache_clean_area); 215 + void cpu_arm1020_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 216 + __ADDRESSABLE(cpu_arm1020_switch_mm); 217 + void cpu_arm1020_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 218 + __ADDRESSABLE(cpu_arm1020_set_pte_ext); 219 + #endif 220 + 221 + #ifdef CONFIG_CPU_ARM1020E 222 + void cpu_arm1020e_proc_init(void); 223 + __ADDRESSABLE(cpu_arm1020e_proc_init); 224 + void cpu_arm1020e_proc_fin(void); 225 + __ADDRESSABLE(cpu_arm1020e_proc_fin); 226 + void cpu_arm1020e_reset(unsigned long addr, bool hvc); 227 + __ADDRESSABLE(cpu_arm1020e_reset); 228 + int cpu_arm1020e_do_idle(void); 229 + __ADDRESSABLE(cpu_arm1020e_do_idle); 230 + void cpu_arm1020e_dcache_clean_area(void *addr, int size); 231 + __ADDRESSABLE(cpu_arm1020e_dcache_clean_area); 232 + void cpu_arm1020e_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 233 + __ADDRESSABLE(cpu_arm1020e_switch_mm); 234 + void cpu_arm1020e_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 235 + __ADDRESSABLE(cpu_arm1020e_set_pte_ext); 236 + #endif 237 + 238 + #ifdef CONFIG_CPU_ARM1022 239 + void cpu_arm1022_proc_init(void); 240 + __ADDRESSABLE(cpu_arm1022_proc_init); 241 + void cpu_arm1022_proc_fin(void); 242 + __ADDRESSABLE(cpu_arm1022_proc_fin); 243 + void cpu_arm1022_reset(unsigned long addr, bool hvc); 244 + __ADDRESSABLE(cpu_arm1022_reset); 245 + int cpu_arm1022_do_idle(void); 246 + __ADDRESSABLE(cpu_arm1022_do_idle); 247 + void cpu_arm1022_dcache_clean_area(void *addr, int size); 248 + __ADDRESSABLE(cpu_arm1022_dcache_clean_area); 249 + void cpu_arm1022_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 250 + __ADDRESSABLE(cpu_arm1022_switch_mm); 251 + void cpu_arm1022_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 252 + __ADDRESSABLE(cpu_arm1022_set_pte_ext); 253 + #endif 254 + 255 + #ifdef CONFIG_CPU_ARM1026 256 + void cpu_arm1026_proc_init(void); 257 + __ADDRESSABLE(cpu_arm1026_proc_init); 258 + void cpu_arm1026_proc_fin(void); 259 + __ADDRESSABLE(cpu_arm1026_proc_fin); 260 + void cpu_arm1026_reset(unsigned long addr, bool hvc); 261 + __ADDRESSABLE(cpu_arm1026_reset); 262 + int cpu_arm1026_do_idle(void); 263 + __ADDRESSABLE(cpu_arm1026_do_idle); 264 + void cpu_arm1026_dcache_clean_area(void *addr, int size); 265 + __ADDRESSABLE(cpu_arm1026_dcache_clean_area); 266 + void cpu_arm1026_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 267 + __ADDRESSABLE(cpu_arm1026_switch_mm); 268 + void cpu_arm1026_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 269 + __ADDRESSABLE(cpu_arm1026_set_pte_ext); 270 + #endif 271 + 272 + #ifdef CONFIG_CPU_SA110 273 + void cpu_sa110_proc_init(void); 274 + __ADDRESSABLE(cpu_sa110_proc_init); 275 + void cpu_sa110_proc_fin(void); 276 + __ADDRESSABLE(cpu_sa110_proc_fin); 277 + void cpu_sa110_reset(unsigned long addr, bool hvc); 278 + __ADDRESSABLE(cpu_sa110_reset); 279 + int cpu_sa110_do_idle(void); 280 + __ADDRESSABLE(cpu_sa110_do_idle); 281 + void cpu_sa110_dcache_clean_area(void *addr, int size); 282 + __ADDRESSABLE(cpu_sa110_dcache_clean_area); 283 + void cpu_sa110_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 284 + __ADDRESSABLE(cpu_sa110_switch_mm); 285 + void cpu_sa110_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 286 + __ADDRESSABLE(cpu_sa110_set_pte_ext); 287 + #endif 288 + 289 + #ifdef CONFIG_CPU_SA1100 290 + void cpu_sa1100_proc_init(void); 291 + __ADDRESSABLE(cpu_sa1100_proc_init); 292 + void cpu_sa1100_proc_fin(void); 293 + __ADDRESSABLE(cpu_sa1100_proc_fin); 294 + void cpu_sa1100_reset(unsigned long addr, bool hvc); 295 + __ADDRESSABLE(cpu_sa1100_reset); 296 + int cpu_sa1100_do_idle(void); 297 + __ADDRESSABLE(cpu_sa1100_do_idle); 298 + void cpu_sa1100_dcache_clean_area(void *addr, int size); 299 + __ADDRESSABLE(cpu_sa1100_dcache_clean_area); 300 + void cpu_sa1100_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 301 + __ADDRESSABLE(cpu_sa1100_switch_mm); 302 + void cpu_sa1100_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 303 + __ADDRESSABLE(cpu_sa1100_set_pte_ext); 304 + #ifdef CONFIG_ARM_CPU_SUSPEND 305 + void cpu_sa1100_do_suspend(void *); 306 + __ADDRESSABLE(cpu_sa1100_do_suspend); 307 + void cpu_sa1100_do_resume(void *); 308 + __ADDRESSABLE(cpu_sa1100_do_resume); 309 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 310 + #endif /* CONFIG_CPU_SA1100 */ 311 + 312 + #ifdef CONFIG_CPU_XSCALE 313 + void cpu_xscale_proc_init(void); 314 + __ADDRESSABLE(cpu_xscale_proc_init); 315 + void cpu_xscale_proc_fin(void); 316 + __ADDRESSABLE(cpu_xscale_proc_fin); 317 + void cpu_xscale_reset(unsigned long addr, bool hvc); 318 + __ADDRESSABLE(cpu_xscale_reset); 319 + int cpu_xscale_do_idle(void); 320 + __ADDRESSABLE(cpu_xscale_do_idle); 321 + void cpu_xscale_dcache_clean_area(void *addr, int size); 322 + __ADDRESSABLE(cpu_xscale_dcache_clean_area); 323 + void cpu_xscale_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 324 + __ADDRESSABLE(cpu_xscale_switch_mm); 325 + void cpu_xscale_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 326 + __ADDRESSABLE(cpu_xscale_set_pte_ext); 327 + #ifdef CONFIG_ARM_CPU_SUSPEND 328 + void cpu_xscale_do_suspend(void *); 329 + __ADDRESSABLE(cpu_xscale_do_suspend); 330 + void cpu_xscale_do_resume(void *); 331 + __ADDRESSABLE(cpu_xscale_do_resume); 332 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 333 + #endif /* CONFIG_CPU_XSCALE */ 334 + 335 + #ifdef CONFIG_CPU_XSC3 336 + void cpu_xsc3_proc_init(void); 337 + __ADDRESSABLE(cpu_xsc3_proc_init); 338 + void cpu_xsc3_proc_fin(void); 339 + __ADDRESSABLE(cpu_xsc3_proc_fin); 340 + void cpu_xsc3_reset(unsigned long addr, bool hvc); 341 + __ADDRESSABLE(cpu_xsc3_reset); 342 + int cpu_xsc3_do_idle(void); 343 + __ADDRESSABLE(cpu_xsc3_do_idle); 344 + void cpu_xsc3_dcache_clean_area(void *addr, int size); 345 + __ADDRESSABLE(cpu_xsc3_dcache_clean_area); 346 + void cpu_xsc3_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 347 + __ADDRESSABLE(cpu_xsc3_switch_mm); 348 + void cpu_xsc3_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 349 + __ADDRESSABLE(cpu_xsc3_set_pte_ext); 350 + #ifdef CONFIG_ARM_CPU_SUSPEND 351 + void cpu_xsc3_do_suspend(void *); 352 + __ADDRESSABLE(cpu_xsc3_do_suspend); 353 + void cpu_xsc3_do_resume(void *); 354 + __ADDRESSABLE(cpu_xsc3_do_resume); 355 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 356 + #endif /* CONFIG_CPU_XSC3 */ 357 + 358 + #ifdef CONFIG_CPU_MOHAWK 359 + void cpu_mohawk_proc_init(void); 360 + __ADDRESSABLE(cpu_mohawk_proc_init); 361 + void cpu_mohawk_proc_fin(void); 362 + __ADDRESSABLE(cpu_mohawk_proc_fin); 363 + void cpu_mohawk_reset(unsigned long addr, bool hvc); 364 + __ADDRESSABLE(cpu_mohawk_reset); 365 + int cpu_mohawk_do_idle(void); 366 + __ADDRESSABLE(cpu_mohawk_do_idle); 367 + void cpu_mohawk_dcache_clean_area(void *addr, int size); 368 + __ADDRESSABLE(cpu_mohawk_dcache_clean_area); 369 + void cpu_mohawk_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 370 + __ADDRESSABLE(cpu_mohawk_switch_mm); 371 + void cpu_mohawk_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 372 + __ADDRESSABLE(cpu_mohawk_set_pte_ext); 373 + #ifdef CONFIG_ARM_CPU_SUSPEND 374 + void cpu_mohawk_do_suspend(void *); 375 + __ADDRESSABLE(cpu_mohawk_do_suspend); 376 + void cpu_mohawk_do_resume(void *); 377 + __ADDRESSABLE(cpu_mohawk_do_resume); 378 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 379 + #endif /* CONFIG_CPU_MOHAWK */ 380 + 381 + #ifdef CONFIG_CPU_FEROCEON 382 + void cpu_feroceon_proc_init(void); 383 + __ADDRESSABLE(cpu_feroceon_proc_init); 384 + void cpu_feroceon_proc_fin(void); 385 + __ADDRESSABLE(cpu_feroceon_proc_fin); 386 + void cpu_feroceon_reset(unsigned long addr, bool hvc); 387 + __ADDRESSABLE(cpu_feroceon_reset); 388 + int cpu_feroceon_do_idle(void); 389 + __ADDRESSABLE(cpu_feroceon_do_idle); 390 + void cpu_feroceon_dcache_clean_area(void *addr, int size); 391 + __ADDRESSABLE(cpu_feroceon_dcache_clean_area); 392 + void cpu_feroceon_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 393 + __ADDRESSABLE(cpu_feroceon_switch_mm); 394 + void cpu_feroceon_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 395 + __ADDRESSABLE(cpu_feroceon_set_pte_ext); 396 + #ifdef CONFIG_ARM_CPU_SUSPEND 397 + void cpu_feroceon_do_suspend(void *); 398 + __ADDRESSABLE(cpu_feroceon_do_suspend); 399 + void cpu_feroceon_do_resume(void *); 400 + __ADDRESSABLE(cpu_feroceon_do_resume); 401 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 402 + #endif /* CONFIG_CPU_FEROCEON */ 403 + 404 + #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) 405 + void cpu_v6_proc_init(void); 406 + __ADDRESSABLE(cpu_v6_proc_init); 407 + void cpu_v6_proc_fin(void); 408 + __ADDRESSABLE(cpu_v6_proc_fin); 409 + void cpu_v6_reset(unsigned long addr, bool hvc); 410 + __ADDRESSABLE(cpu_v6_reset); 411 + int cpu_v6_do_idle(void); 412 + __ADDRESSABLE(cpu_v6_do_idle); 413 + void cpu_v6_dcache_clean_area(void *addr, int size); 414 + __ADDRESSABLE(cpu_v6_dcache_clean_area); 415 + void cpu_v6_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 416 + __ADDRESSABLE(cpu_v6_switch_mm); 417 + void cpu_v6_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 418 + __ADDRESSABLE(cpu_v6_set_pte_ext); 419 + #ifdef CONFIG_ARM_CPU_SUSPEND 420 + void cpu_v6_do_suspend(void *); 421 + __ADDRESSABLE(cpu_v6_do_suspend); 422 + void cpu_v6_do_resume(void *); 423 + __ADDRESSABLE(cpu_v6_do_resume); 424 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 425 + #endif /* CPU_V6 */ 426 + 427 + #ifdef CONFIG_CPU_V7 428 + void cpu_v7_proc_init(void); 429 + __ADDRESSABLE(cpu_v7_proc_init); 430 + void cpu_v7_proc_fin(void); 431 + __ADDRESSABLE(cpu_v7_proc_fin); 432 + void cpu_v7_reset(void); 433 + __ADDRESSABLE(cpu_v7_reset); 434 + int cpu_v7_do_idle(void); 435 + __ADDRESSABLE(cpu_v7_do_idle); 436 + #ifdef CONFIG_PJ4B_ERRATA_4742 437 + int cpu_pj4b_do_idle(void); 438 + __ADDRESSABLE(cpu_pj4b_do_idle); 439 + #endif 440 + void cpu_v7_dcache_clean_area(void *addr, int size); 441 + __ADDRESSABLE(cpu_v7_dcache_clean_area); 442 + void cpu_v7_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 443 + /* Special switch_mm() callbacks to work around bugs in v7 */ 444 + __ADDRESSABLE(cpu_v7_switch_mm); 445 + void cpu_v7_iciallu_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 446 + __ADDRESSABLE(cpu_v7_iciallu_switch_mm); 447 + void cpu_v7_bpiall_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 448 + __ADDRESSABLE(cpu_v7_bpiall_switch_mm); 449 + #ifdef CONFIG_ARM_LPAE 450 + void cpu_v7_set_pte_ext(pte_t *ptep, pte_t pte); 451 + #else 452 + void cpu_v7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 453 + #endif 454 + __ADDRESSABLE(cpu_v7_set_pte_ext); 455 + #ifdef CONFIG_ARM_CPU_SUSPEND 456 + void cpu_v7_do_suspend(void *); 457 + __ADDRESSABLE(cpu_v7_do_suspend); 458 + void cpu_v7_do_resume(void *); 459 + __ADDRESSABLE(cpu_v7_do_resume); 460 + /* Special versions of suspend and resume for the CA9MP cores */ 461 + void cpu_ca9mp_do_suspend(void *); 462 + __ADDRESSABLE(cpu_ca9mp_do_suspend); 463 + void cpu_ca9mp_do_resume(void *); 464 + __ADDRESSABLE(cpu_ca9mp_do_resume); 465 + /* Special versions of suspend and resume for the Marvell PJ4B cores */ 466 + #ifdef CONFIG_CPU_PJ4B 467 + void cpu_pj4b_do_suspend(void *); 468 + __ADDRESSABLE(cpu_pj4b_do_suspend); 469 + void cpu_pj4b_do_resume(void *); 470 + __ADDRESSABLE(cpu_pj4b_do_resume); 471 + #endif /* CONFIG_CPU_PJ4B */ 472 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 473 + #endif /* CONFIG_CPU_V7 */ 474 + 475 + #ifdef CONFIG_CPU_V7M 476 + void cpu_v7m_proc_init(void); 477 + __ADDRESSABLE(cpu_v7m_proc_init); 478 + void cpu_v7m_proc_fin(void); 479 + __ADDRESSABLE(cpu_v7m_proc_fin); 480 + void cpu_v7m_reset(unsigned long addr, bool hvc); 481 + __ADDRESSABLE(cpu_v7m_reset); 482 + int cpu_v7m_do_idle(void); 483 + __ADDRESSABLE(cpu_v7m_do_idle); 484 + void cpu_v7m_dcache_clean_area(void *addr, int size); 485 + __ADDRESSABLE(cpu_v7m_dcache_clean_area); 486 + void cpu_v7m_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm); 487 + __ADDRESSABLE(cpu_v7m_switch_mm); 488 + void cpu_v7m_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 489 + __ADDRESSABLE(cpu_v7m_set_pte_ext); 490 + #ifdef CONFIG_ARM_CPU_SUSPEND 491 + void cpu_v7m_do_suspend(void *); 492 + __ADDRESSABLE(cpu_v7m_do_suspend); 493 + void cpu_v7m_do_resume(void *); 494 + __ADDRESSABLE(cpu_v7m_do_resume); 495 + #endif /* CONFIG_ARM_CPU_SUSPEND */ 496 + void cpu_cm7_proc_fin(void); 497 + __ADDRESSABLE(cpu_cm7_proc_fin); 498 + void cpu_cm7_dcache_clean_area(void *addr, int size); 499 + __ADDRESSABLE(cpu_cm7_dcache_clean_area); 500 + #endif /* CONFIG_CPU_V7M */