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

Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6-wd into devel-stable

+908 -2048
+9
arch/arm/include/asm/assembler.h
··· 293 293 .macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f 294 294 usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort 295 295 .endm 296 + 297 + /* Utility macro for declaring string literals */ 298 + .macro string name:req, string 299 + .type \name , #object 300 + \name: 301 + .asciz "\string" 302 + .size \name , . - \name 303 + .endm 304 + 296 305 #endif /* __ASM_ASSEMBLER_H__ */
+20 -16
arch/arm/include/asm/hwcap.h
··· 4 4 /* 5 5 * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP 6 6 */ 7 - #define HWCAP_SWP 1 8 - #define HWCAP_HALF 2 9 - #define HWCAP_THUMB 4 10 - #define HWCAP_26BIT 8 /* Play it safe */ 11 - #define HWCAP_FAST_MULT 16 12 - #define HWCAP_FPA 32 13 - #define HWCAP_VFP 64 14 - #define HWCAP_EDSP 128 15 - #define HWCAP_JAVA 256 16 - #define HWCAP_IWMMXT 512 17 - #define HWCAP_CRUNCH 1024 18 - #define HWCAP_THUMBEE 2048 19 - #define HWCAP_NEON 4096 20 - #define HWCAP_VFPv3 8192 21 - #define HWCAP_VFPv3D16 16384 22 - #define HWCAP_TLS 32768 7 + #define HWCAP_SWP (1 << 0) 8 + #define HWCAP_HALF (1 << 1) 9 + #define HWCAP_THUMB (1 << 2) 10 + #define HWCAP_26BIT (1 << 3) /* Play it safe */ 11 + #define HWCAP_FAST_MULT (1 << 4) 12 + #define HWCAP_FPA (1 << 5) 13 + #define HWCAP_VFP (1 << 6) 14 + #define HWCAP_EDSP (1 << 7) 15 + #define HWCAP_JAVA (1 << 8) 16 + #define HWCAP_IWMMXT (1 << 9) 17 + #define HWCAP_CRUNCH (1 << 10) 18 + #define HWCAP_THUMBEE (1 << 11) 19 + #define HWCAP_NEON (1 << 12) 20 + #define HWCAP_VFPv3 (1 << 13) 21 + #define HWCAP_VFPv3D16 (1 << 14) 22 + #define HWCAP_TLS (1 << 15) 23 + #define HWCAP_VFPv4 (1 << 16) 24 + #define HWCAP_IDIVA (1 << 17) 25 + #define HWCAP_IDIVT (1 << 18) 26 + #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) 23 27 24 28 #if defined(__KERNEL__) && !defined(__ASSEMBLY__) 25 29 /*
+2
arch/arm/include/asm/perf_event.h
··· 24 24 ARM_PERF_PMU_ID_V6MP, 25 25 ARM_PERF_PMU_ID_CA8, 26 26 ARM_PERF_PMU_ID_CA9, 27 + ARM_PERF_PMU_ID_CA5, 28 + ARM_PERF_PMU_ID_CA15, 27 29 ARM_NUM_PMU_IDS, 28 30 }; 29 31
+6
arch/arm/kernel/perf_event.c
··· 660 660 case 0xC090: /* Cortex-A9 */ 661 661 armpmu = armv7_a9_pmu_init(); 662 662 break; 663 + case 0xC050: /* Cortex-A5 */ 664 + armpmu = armv7_a5_pmu_init(); 665 + break; 666 + case 0xC0F0: /* Cortex-A15 */ 667 + armpmu = armv7_a15_pmu_init(); 668 + break; 663 669 } 664 670 /* Intel CPUs [xscale]. */ 665 671 } else if (0x69 == implementor) {
+324 -20
arch/arm/kernel/perf_event_v7.c
··· 17 17 */ 18 18 19 19 #ifdef CONFIG_CPU_V7 20 - /* Common ARMv7 event types */ 20 + /* 21 + * Common ARMv7 event types 22 + * 23 + * Note: An implementation may not be able to count all of these events 24 + * but the encodings are considered to be `reserved' in the case that 25 + * they are not available. 26 + */ 21 27 enum armv7_perf_types { 22 28 ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, 23 29 ARMV7_PERFCTR_IFETCH_MISS = 0x01, 24 30 ARMV7_PERFCTR_ITLB_MISS = 0x02, 25 - ARMV7_PERFCTR_DCACHE_REFILL = 0x03, 26 - ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, 31 + ARMV7_PERFCTR_DCACHE_REFILL = 0x03, /* L1 */ 32 + ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, /* L1 */ 27 33 ARMV7_PERFCTR_DTLB_REFILL = 0x05, 28 34 ARMV7_PERFCTR_DREAD = 0x06, 29 35 ARMV7_PERFCTR_DWRITE = 0x07, 30 - 36 + ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, 31 37 ARMV7_PERFCTR_EXC_TAKEN = 0x09, 32 38 ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, 33 39 ARMV7_PERFCTR_CID_WRITE = 0x0B, ··· 45 39 */ 46 40 ARMV7_PERFCTR_PC_WRITE = 0x0C, 47 41 ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, 42 + ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, 48 43 ARMV7_PERFCTR_UNALIGNED_ACCESS = 0x0F, 44 + 45 + /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ 49 46 ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, 50 47 ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, 51 - 52 - ARMV7_PERFCTR_PC_BRANCH_MIS_USED = 0x12, 48 + ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, 49 + ARMV7_PERFCTR_MEM_ACCESS = 0x13, 50 + ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, 51 + ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, 52 + ARMV7_PERFCTR_L2_DCACHE_ACCESS = 0x16, 53 + ARMV7_PERFCTR_L2_DCACHE_REFILL = 0x17, 54 + ARMV7_PERFCTR_L2_DCACHE_WB = 0x18, 55 + ARMV7_PERFCTR_BUS_ACCESS = 0x19, 56 + ARMV7_PERFCTR_MEMORY_ERROR = 0x1A, 57 + ARMV7_PERFCTR_INSTR_SPEC = 0x1B, 58 + ARMV7_PERFCTR_TTBR_WRITE = 0x1C, 59 + ARMV7_PERFCTR_BUS_CYCLES = 0x1D, 53 60 54 61 ARMV7_PERFCTR_CPU_CYCLES = 0xFF 55 62 }; 56 63 57 64 /* ARMv7 Cortex-A8 specific event types */ 58 65 enum armv7_a8_perf_types { 59 - ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, 60 - 61 - ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, 62 - 63 66 ARMV7_PERFCTR_WRITE_BUFFER_FULL = 0x40, 64 67 ARMV7_PERFCTR_L2_STORE_MERGED = 0x41, 65 68 ARMV7_PERFCTR_L2_STORE_BUFF = 0x42, ··· 153 138 ARMV7_PERFCTR_PLE_RQST_PROG = 0xA5 154 139 }; 155 140 141 + /* ARMv7 Cortex-A5 specific event types */ 142 + enum armv7_a5_perf_types { 143 + ARMV7_PERFCTR_IRQ_TAKEN = 0x86, 144 + ARMV7_PERFCTR_FIQ_TAKEN = 0x87, 145 + 146 + ARMV7_PERFCTR_EXT_MEM_RQST = 0xc0, 147 + ARMV7_PERFCTR_NC_EXT_MEM_RQST = 0xc1, 148 + ARMV7_PERFCTR_PREFETCH_LINEFILL = 0xc2, 149 + ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, 150 + ARMV7_PERFCTR_ENTER_READ_ALLOC = 0xc4, 151 + ARMV7_PERFCTR_READ_ALLOC = 0xc5, 152 + 153 + ARMV7_PERFCTR_STALL_SB_FULL = 0xc9, 154 + }; 155 + 156 + /* ARMv7 Cortex-A15 specific event types */ 157 + enum armv7_a15_perf_types { 158 + ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS = 0x40, 159 + ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS = 0x41, 160 + ARMV7_PERFCTR_L1_DCACHE_READ_REFILL = 0x42, 161 + ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL = 0x43, 162 + 163 + ARMV7_PERFCTR_L1_DTLB_READ_REFILL = 0x4C, 164 + ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL = 0x4D, 165 + 166 + ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS = 0x50, 167 + ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS = 0x51, 168 + ARMV7_PERFCTR_L2_DCACHE_READ_REFILL = 0x52, 169 + ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL = 0x53, 170 + 171 + ARMV7_PERFCTR_SPEC_PC_WRITE = 0x76, 172 + }; 173 + 156 174 /* 157 175 * Cortex-A8 HW events mapping 158 176 * ··· 255 207 }, 256 208 }, 257 209 [C(DTLB)] = { 258 - /* 259 - * Only ITLB misses and DTLB refills are supported. 260 - * If users want the DTLB refills misses a raw counter 261 - * must be used. 262 - */ 263 210 [C(OP_READ)] = { 264 211 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 265 212 [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, ··· 366 323 }, 367 324 }, 368 325 [C(DTLB)] = { 369 - /* 370 - * Only ITLB misses and DTLB refills are supported. 371 - * If users want the DTLB refills misses a raw counter 372 - * must be used. 373 - */ 374 326 [C(OP_READ)] = { 375 327 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 376 328 [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, ··· 401 363 }, 402 364 [C(OP_WRITE)] = { 403 365 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, 366 + [C(RESULT_MISS)] 367 + = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 368 + }, 369 + [C(OP_PREFETCH)] = { 370 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 371 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 372 + }, 373 + }, 374 + }; 375 + 376 + /* 377 + * Cortex-A5 HW events mapping 378 + */ 379 + static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { 380 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 381 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 382 + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 383 + [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 384 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 385 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 386 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 387 + }; 388 + 389 + static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] 390 + [PERF_COUNT_HW_CACHE_OP_MAX] 391 + [PERF_COUNT_HW_CACHE_RESULT_MAX] = { 392 + [C(L1D)] = { 393 + [C(OP_READ)] = { 394 + [C(RESULT_ACCESS)] 395 + = ARMV7_PERFCTR_DCACHE_ACCESS, 396 + [C(RESULT_MISS)] 397 + = ARMV7_PERFCTR_DCACHE_REFILL, 398 + }, 399 + [C(OP_WRITE)] = { 400 + [C(RESULT_ACCESS)] 401 + = ARMV7_PERFCTR_DCACHE_ACCESS, 402 + [C(RESULT_MISS)] 403 + = ARMV7_PERFCTR_DCACHE_REFILL, 404 + }, 405 + [C(OP_PREFETCH)] = { 406 + [C(RESULT_ACCESS)] 407 + = ARMV7_PERFCTR_PREFETCH_LINEFILL, 408 + [C(RESULT_MISS)] 409 + = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, 410 + }, 411 + }, 412 + [C(L1I)] = { 413 + [C(OP_READ)] = { 414 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 415 + [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 416 + }, 417 + [C(OP_WRITE)] = { 418 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 419 + [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 420 + }, 421 + /* 422 + * The prefetch counters don't differentiate between the I 423 + * side and the D side. 424 + */ 425 + [C(OP_PREFETCH)] = { 426 + [C(RESULT_ACCESS)] 427 + = ARMV7_PERFCTR_PREFETCH_LINEFILL, 428 + [C(RESULT_MISS)] 429 + = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, 430 + }, 431 + }, 432 + [C(LL)] = { 433 + [C(OP_READ)] = { 434 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 435 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 436 + }, 437 + [C(OP_WRITE)] = { 438 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 439 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 440 + }, 441 + [C(OP_PREFETCH)] = { 442 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 443 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 444 + }, 445 + }, 446 + [C(DTLB)] = { 447 + [C(OP_READ)] = { 448 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 449 + [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, 450 + }, 451 + [C(OP_WRITE)] = { 452 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 453 + [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, 454 + }, 455 + [C(OP_PREFETCH)] = { 456 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 457 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 458 + }, 459 + }, 460 + [C(ITLB)] = { 461 + [C(OP_READ)] = { 462 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 463 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 464 + }, 465 + [C(OP_WRITE)] = { 466 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 467 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 468 + }, 469 + [C(OP_PREFETCH)] = { 470 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 471 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 472 + }, 473 + }, 474 + [C(BPU)] = { 475 + [C(OP_READ)] = { 476 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 477 + [C(RESULT_MISS)] 478 + = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 479 + }, 480 + [C(OP_WRITE)] = { 481 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 482 + [C(RESULT_MISS)] 483 + = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 484 + }, 485 + [C(OP_PREFETCH)] = { 486 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 487 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 488 + }, 489 + }, 490 + }; 491 + 492 + /* 493 + * Cortex-A15 HW events mapping 494 + */ 495 + static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { 496 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 497 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 498 + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 499 + [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 500 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_SPEC_PC_WRITE, 501 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 502 + [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, 503 + }; 504 + 505 + static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] 506 + [PERF_COUNT_HW_CACHE_OP_MAX] 507 + [PERF_COUNT_HW_CACHE_RESULT_MAX] = { 508 + [C(L1D)] = { 509 + [C(OP_READ)] = { 510 + [C(RESULT_ACCESS)] 511 + = ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS, 512 + [C(RESULT_MISS)] 513 + = ARMV7_PERFCTR_L1_DCACHE_READ_REFILL, 514 + }, 515 + [C(OP_WRITE)] = { 516 + [C(RESULT_ACCESS)] 517 + = ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS, 518 + [C(RESULT_MISS)] 519 + = ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL, 520 + }, 521 + [C(OP_PREFETCH)] = { 522 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 523 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 524 + }, 525 + }, 526 + [C(L1I)] = { 527 + /* 528 + * Not all performance counters differentiate between read 529 + * and write accesses/misses so we're not always strictly 530 + * correct, but it's the best we can do. Writes and reads get 531 + * combined in these cases. 532 + */ 533 + [C(OP_READ)] = { 534 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 535 + [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 536 + }, 537 + [C(OP_WRITE)] = { 538 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 539 + [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 540 + }, 541 + [C(OP_PREFETCH)] = { 542 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 543 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 544 + }, 545 + }, 546 + [C(LL)] = { 547 + [C(OP_READ)] = { 548 + [C(RESULT_ACCESS)] 549 + = ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS, 550 + [C(RESULT_MISS)] 551 + = ARMV7_PERFCTR_L2_DCACHE_READ_REFILL, 552 + }, 553 + [C(OP_WRITE)] = { 554 + [C(RESULT_ACCESS)] 555 + = ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS, 556 + [C(RESULT_MISS)] 557 + = ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL, 558 + }, 559 + [C(OP_PREFETCH)] = { 560 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 561 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 562 + }, 563 + }, 564 + [C(DTLB)] = { 565 + [C(OP_READ)] = { 566 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 567 + [C(RESULT_MISS)] 568 + = ARMV7_PERFCTR_L1_DTLB_READ_REFILL, 569 + }, 570 + [C(OP_WRITE)] = { 571 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 572 + [C(RESULT_MISS)] 573 + = ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL, 574 + }, 575 + [C(OP_PREFETCH)] = { 576 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 577 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 578 + }, 579 + }, 580 + [C(ITLB)] = { 581 + [C(OP_READ)] = { 582 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 583 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 584 + }, 585 + [C(OP_WRITE)] = { 586 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 587 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 588 + }, 589 + [C(OP_PREFETCH)] = { 590 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 591 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 592 + }, 593 + }, 594 + [C(BPU)] = { 595 + [C(OP_READ)] = { 596 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 597 + [C(RESULT_MISS)] 598 + = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 599 + }, 600 + [C(OP_WRITE)] = { 601 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 404 602 [C(RESULT_MISS)] 405 603 = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 406 604 }, ··· 1179 905 armv7pmu.num_events = armv7_read_num_pmnc_events(); 1180 906 return &armv7pmu; 1181 907 } 908 + 909 + static const struct arm_pmu *__init armv7_a5_pmu_init(void) 910 + { 911 + armv7pmu.id = ARM_PERF_PMU_ID_CA5; 912 + armv7pmu.name = "ARMv7 Cortex-A5"; 913 + armv7pmu.cache_map = &armv7_a5_perf_cache_map; 914 + armv7pmu.event_map = &armv7_a5_perf_map; 915 + armv7pmu.num_events = armv7_read_num_pmnc_events(); 916 + return &armv7pmu; 917 + } 918 + 919 + static const struct arm_pmu *__init armv7_a15_pmu_init(void) 920 + { 921 + armv7pmu.id = ARM_PERF_PMU_ID_CA15; 922 + armv7pmu.name = "ARMv7 Cortex-A15"; 923 + armv7pmu.cache_map = &armv7_a15_perf_cache_map; 924 + armv7pmu.event_map = &armv7_a15_perf_map; 925 + armv7pmu.num_events = armv7_read_num_pmnc_events(); 926 + return &armv7pmu; 927 + } 1182 928 #else 1183 929 static const struct arm_pmu *__init armv7_a8_pmu_init(void) 1184 930 { ··· 1206 912 } 1207 913 1208 914 static const struct arm_pmu *__init armv7_a9_pmu_init(void) 915 + { 916 + return NULL; 917 + } 918 + 919 + static const struct arm_pmu *__init armv7_a5_pmu_init(void) 920 + { 921 + return NULL; 922 + } 923 + 924 + static const struct arm_pmu *__init armv7_a15_pmu_init(void) 1209 925 { 1210 926 return NULL; 1211 927 }
+4
arch/arm/kernel/setup.c
··· 977 977 "neon", 978 978 "vfpv3", 979 979 "vfpv3d16", 980 + "tls", 981 + "vfpv4", 982 + "idiva", 983 + "idivt", 980 984 NULL 981 985 }; 982 986
+2 -13
arch/arm/mm/cache-fa.S
··· 242 242 243 243 __INITDATA 244 244 245 - .type fa_cache_fns, #object 246 - ENTRY(fa_cache_fns) 247 - .long fa_flush_icache_all 248 - .long fa_flush_kern_cache_all 249 - .long fa_flush_user_cache_all 250 - .long fa_flush_user_cache_range 251 - .long fa_coherent_kern_range 252 - .long fa_coherent_user_range 253 - .long fa_flush_kern_dcache_area 254 - .long fa_dma_map_area 255 - .long fa_dma_unmap_area 256 - .long fa_dma_flush_range 257 - .size fa_cache_fns, . - fa_cache_fns 245 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 246 + define_cache_functions fa
+2 -13
arch/arm/mm/cache-v3.S
··· 129 129 130 130 __INITDATA 131 131 132 - .type v3_cache_fns, #object 133 - ENTRY(v3_cache_fns) 134 - .long v3_flush_icache_all 135 - .long v3_flush_kern_cache_all 136 - .long v3_flush_user_cache_all 137 - .long v3_flush_user_cache_range 138 - .long v3_coherent_kern_range 139 - .long v3_coherent_user_range 140 - .long v3_flush_kern_dcache_area 141 - .long v3_dma_map_area 142 - .long v3_dma_unmap_area 143 - .long v3_dma_flush_range 144 - .size v3_cache_fns, . - v3_cache_fns 132 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 133 + define_cache_functions v3
+2 -13
arch/arm/mm/cache-v4.S
··· 141 141 142 142 __INITDATA 143 143 144 - .type v4_cache_fns, #object 145 - ENTRY(v4_cache_fns) 146 - .long v4_flush_icache_all 147 - .long v4_flush_kern_cache_all 148 - .long v4_flush_user_cache_all 149 - .long v4_flush_user_cache_range 150 - .long v4_coherent_kern_range 151 - .long v4_coherent_user_range 152 - .long v4_flush_kern_dcache_area 153 - .long v4_dma_map_area 154 - .long v4_dma_unmap_area 155 - .long v4_dma_flush_range 156 - .size v4_cache_fns, . - v4_cache_fns 144 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 145 + define_cache_functions v4
+2 -13
arch/arm/mm/cache-v4wb.S
··· 253 253 254 254 __INITDATA 255 255 256 - .type v4wb_cache_fns, #object 257 - ENTRY(v4wb_cache_fns) 258 - .long v4wb_flush_icache_all 259 - .long v4wb_flush_kern_cache_all 260 - .long v4wb_flush_user_cache_all 261 - .long v4wb_flush_user_cache_range 262 - .long v4wb_coherent_kern_range 263 - .long v4wb_coherent_user_range 264 - .long v4wb_flush_kern_dcache_area 265 - .long v4wb_dma_map_area 266 - .long v4wb_dma_unmap_area 267 - .long v4wb_dma_flush_range 268 - .size v4wb_cache_fns, . - v4wb_cache_fns 256 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 257 + define_cache_functions v4wb
+2 -13
arch/arm/mm/cache-v4wt.S
··· 197 197 198 198 __INITDATA 199 199 200 - .type v4wt_cache_fns, #object 201 - ENTRY(v4wt_cache_fns) 202 - .long v4wt_flush_icache_all 203 - .long v4wt_flush_kern_cache_all 204 - .long v4wt_flush_user_cache_all 205 - .long v4wt_flush_user_cache_range 206 - .long v4wt_coherent_kern_range 207 - .long v4wt_coherent_user_range 208 - .long v4wt_flush_kern_dcache_area 209 - .long v4wt_dma_map_area 210 - .long v4wt_dma_unmap_area 211 - .long v4wt_dma_flush_range 212 - .size v4wt_cache_fns, . - v4wt_cache_fns 200 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 201 + define_cache_functions v4wt
+2 -13
arch/arm/mm/cache-v6.S
··· 330 330 331 331 __INITDATA 332 332 333 - .type v6_cache_fns, #object 334 - ENTRY(v6_cache_fns) 335 - .long v6_flush_icache_all 336 - .long v6_flush_kern_cache_all 337 - .long v6_flush_user_cache_all 338 - .long v6_flush_user_cache_range 339 - .long v6_coherent_kern_range 340 - .long v6_coherent_user_range 341 - .long v6_flush_kern_dcache_area 342 - .long v6_dma_map_area 343 - .long v6_dma_unmap_area 344 - .long v6_dma_flush_range 345 - .size v6_cache_fns, . - v6_cache_fns 333 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 334 + define_cache_functions v6
+2 -13
arch/arm/mm/cache-v7.S
··· 325 325 326 326 __INITDATA 327 327 328 - .type v7_cache_fns, #object 329 - ENTRY(v7_cache_fns) 330 - .long v7_flush_icache_all 331 - .long v7_flush_kern_cache_all 332 - .long v7_flush_user_cache_all 333 - .long v7_flush_user_cache_range 334 - .long v7_coherent_kern_range 335 - .long v7_coherent_user_range 336 - .long v7_flush_kern_dcache_area 337 - .long v7_dma_map_area 338 - .long v7_dma_unmap_area 339 - .long v7_dma_flush_range 340 - .size v7_cache_fns, . - v7_cache_fns 328 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 329 + define_cache_functions v7
+6 -39
arch/arm/mm/proc-arm1020.S
··· 364 364 mov pc, lr 365 365 ENDPROC(arm1020_dma_unmap_area) 366 366 367 - ENTRY(arm1020_cache_fns) 368 - .long arm1020_flush_icache_all 369 - .long arm1020_flush_kern_cache_all 370 - .long arm1020_flush_user_cache_all 371 - .long arm1020_flush_user_cache_range 372 - .long arm1020_coherent_kern_range 373 - .long arm1020_coherent_user_range 374 - .long arm1020_flush_kern_dcache_area 375 - .long arm1020_dma_map_area 376 - .long arm1020_dma_unmap_area 377 - .long arm1020_dma_flush_range 367 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 368 + define_cache_functions arm1020 378 369 379 370 .align 5 380 371 ENTRY(cpu_arm1020_dcache_clean_area) ··· 468 477 crval clear=0x0000593f, mmuset=0x00003935, ucset=0x00001930 469 478 470 479 __INITDATA 480 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 481 + define_processor_functions arm1020, dabort=v4t_early_abort, pabort=legacy_pabort 471 482 472 - /* 473 - * Purpose : Function pointers used to access above functions - all calls 474 - * come through these 475 - */ 476 - .type arm1020_processor_functions, #object 477 - arm1020_processor_functions: 478 - .word v4t_early_abort 479 - .word legacy_pabort 480 - .word cpu_arm1020_proc_init 481 - .word cpu_arm1020_proc_fin 482 - .word cpu_arm1020_reset 483 - .word cpu_arm1020_do_idle 484 - .word cpu_arm1020_dcache_clean_area 485 - .word cpu_arm1020_switch_mm 486 - .word cpu_arm1020_set_pte_ext 487 - .word 0 488 - .word 0 489 - .word 0 490 - .size arm1020_processor_functions, . - arm1020_processor_functions 491 483 492 484 .section ".rodata" 493 485 494 - .type cpu_arch_name, #object 495 - cpu_arch_name: 496 - .asciz "armv5t" 497 - .size cpu_arch_name, . - cpu_arch_name 498 - 499 - .type cpu_elf_name, #object 500 - cpu_elf_name: 501 - .asciz "v5" 502 - .size cpu_elf_name, . - cpu_elf_name 486 + string cpu_arch_name, "armv5t" 487 + string cpu_elf_name, "v5" 503 488 504 489 .type cpu_arm1020_name, #object 505 490 cpu_arm1020_name:
+7 -45
arch/arm/mm/proc-arm1020e.S
··· 350 350 mov pc, lr 351 351 ENDPROC(arm1020e_dma_unmap_area) 352 352 353 - ENTRY(arm1020e_cache_fns) 354 - .long arm1020e_flush_icache_all 355 - .long arm1020e_flush_kern_cache_all 356 - .long arm1020e_flush_user_cache_all 357 - .long arm1020e_flush_user_cache_range 358 - .long arm1020e_coherent_kern_range 359 - .long arm1020e_coherent_user_range 360 - .long arm1020e_flush_kern_dcache_area 361 - .long arm1020e_dma_map_area 362 - .long arm1020e_dma_unmap_area 363 - .long arm1020e_dma_flush_range 353 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 354 + define_cache_functions arm1020e 364 355 365 356 .align 5 366 357 ENTRY(cpu_arm1020e_dcache_clean_area) ··· 449 458 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 450 459 451 460 __INITDATA 452 - 453 - /* 454 - * Purpose : Function pointers used to access above functions - all calls 455 - * come through these 456 - */ 457 - .type arm1020e_processor_functions, #object 458 - arm1020e_processor_functions: 459 - .word v4t_early_abort 460 - .word legacy_pabort 461 - .word cpu_arm1020e_proc_init 462 - .word cpu_arm1020e_proc_fin 463 - .word cpu_arm1020e_reset 464 - .word cpu_arm1020e_do_idle 465 - .word cpu_arm1020e_dcache_clean_area 466 - .word cpu_arm1020e_switch_mm 467 - .word cpu_arm1020e_set_pte_ext 468 - .word 0 469 - .word 0 470 - .word 0 471 - .size arm1020e_processor_functions, . - arm1020e_processor_functions 461 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 462 + define_processor_functions arm1020e, dabort=v4t_early_abort, pabort=legacy_pabort 472 463 473 464 .section ".rodata" 474 465 475 - .type cpu_arch_name, #object 476 - cpu_arch_name: 477 - .asciz "armv5te" 478 - .size cpu_arch_name, . - cpu_arch_name 479 - 480 - .type cpu_elf_name, #object 481 - cpu_elf_name: 482 - .asciz "v5" 483 - .size cpu_elf_name, . - cpu_elf_name 484 - 485 - .type cpu_arm1020e_name, #object 486 - cpu_arm1020e_name: 487 - .asciz "ARM1020E" 488 - .size cpu_arm1020e_name, . - cpu_arm1020e_name 466 + string cpu_arch_name, "armv5te" 467 + string cpu_elf_name, "v5" 468 + string cpu_arm1020e_name, "ARM1020E" 489 469 490 470 .align 491 471
+7 -45
arch/arm/mm/proc-arm1022.S
··· 339 339 mov pc, lr 340 340 ENDPROC(arm1022_dma_unmap_area) 341 341 342 - ENTRY(arm1022_cache_fns) 343 - .long arm1022_flush_icache_all 344 - .long arm1022_flush_kern_cache_all 345 - .long arm1022_flush_user_cache_all 346 - .long arm1022_flush_user_cache_range 347 - .long arm1022_coherent_kern_range 348 - .long arm1022_coherent_user_range 349 - .long arm1022_flush_kern_dcache_area 350 - .long arm1022_dma_map_area 351 - .long arm1022_dma_unmap_area 352 - .long arm1022_dma_flush_range 342 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 343 + define_cache_functions arm1022 353 344 354 345 .align 5 355 346 ENTRY(cpu_arm1022_dcache_clean_area) ··· 432 441 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 433 442 434 443 __INITDATA 435 - 436 - /* 437 - * Purpose : Function pointers used to access above functions - all calls 438 - * come through these 439 - */ 440 - .type arm1022_processor_functions, #object 441 - arm1022_processor_functions: 442 - .word v4t_early_abort 443 - .word legacy_pabort 444 - .word cpu_arm1022_proc_init 445 - .word cpu_arm1022_proc_fin 446 - .word cpu_arm1022_reset 447 - .word cpu_arm1022_do_idle 448 - .word cpu_arm1022_dcache_clean_area 449 - .word cpu_arm1022_switch_mm 450 - .word cpu_arm1022_set_pte_ext 451 - .word 0 452 - .word 0 453 - .word 0 454 - .size arm1022_processor_functions, . - arm1022_processor_functions 444 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 445 + define_processor_functions arm1022, dabort=v4t_early_abort, pabort=legacy_pabort 455 446 456 447 .section ".rodata" 457 448 458 - .type cpu_arch_name, #object 459 - cpu_arch_name: 460 - .asciz "armv5te" 461 - .size cpu_arch_name, . - cpu_arch_name 462 - 463 - .type cpu_elf_name, #object 464 - cpu_elf_name: 465 - .asciz "v5" 466 - .size cpu_elf_name, . - cpu_elf_name 467 - 468 - .type cpu_arm1022_name, #object 469 - cpu_arm1022_name: 470 - .asciz "ARM1022" 471 - .size cpu_arm1022_name, . - cpu_arm1022_name 449 + string cpu_arch_name, "armv5te" 450 + string cpu_elf_name, "v5" 451 + string cpu_arm1022_name, "ARM1022" 472 452 473 453 .align 474 454
+7 -46
arch/arm/mm/proc-arm1026.S
··· 333 333 mov pc, lr 334 334 ENDPROC(arm1026_dma_unmap_area) 335 335 336 - ENTRY(arm1026_cache_fns) 337 - .long arm1026_flush_icache_all 338 - .long arm1026_flush_kern_cache_all 339 - .long arm1026_flush_user_cache_all 340 - .long arm1026_flush_user_cache_range 341 - .long arm1026_coherent_kern_range 342 - .long arm1026_coherent_user_range 343 - .long arm1026_flush_kern_dcache_area 344 - .long arm1026_dma_map_area 345 - .long arm1026_dma_unmap_area 346 - .long arm1026_dma_flush_range 336 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 337 + define_cache_functions arm1026 347 338 348 339 .align 5 349 340 ENTRY(cpu_arm1026_dcache_clean_area) ··· 427 436 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001934 428 437 429 438 __INITDATA 430 - 431 - /* 432 - * Purpose : Function pointers used to access above functions - all calls 433 - * come through these 434 - */ 435 - .type arm1026_processor_functions, #object 436 - arm1026_processor_functions: 437 - .word v5t_early_abort 438 - .word legacy_pabort 439 - .word cpu_arm1026_proc_init 440 - .word cpu_arm1026_proc_fin 441 - .word cpu_arm1026_reset 442 - .word cpu_arm1026_do_idle 443 - .word cpu_arm1026_dcache_clean_area 444 - .word cpu_arm1026_switch_mm 445 - .word cpu_arm1026_set_pte_ext 446 - .word 0 447 - .word 0 448 - .word 0 449 - .size arm1026_processor_functions, . - arm1026_processor_functions 439 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 440 + define_processor_functions arm1026, dabort=v5t_early_abort, pabort=legacy_pabort 450 441 451 442 .section .rodata 452 443 453 - .type cpu_arch_name, #object 454 - cpu_arch_name: 455 - .asciz "armv5tej" 456 - .size cpu_arch_name, . - cpu_arch_name 457 - 458 - .type cpu_elf_name, #object 459 - cpu_elf_name: 460 - .asciz "v5" 461 - .size cpu_elf_name, . - cpu_elf_name 444 + string cpu_arch_name, "armv5tej" 445 + string cpu_elf_name, "v5" 462 446 .align 463 - 464 - .type cpu_arm1026_name, #object 465 - cpu_arm1026_name: 466 - .asciz "ARM1026EJ-S" 467 - .size cpu_arm1026_name, . - cpu_arm1026_name 468 - 447 + string cpu_arm1026_name, "ARM1026EJ-S" 469 448 .align 470 449 471 450 .section ".proc.info.init", #alloc, #execinstr
+31 -133
arch/arm/mm/proc-arm6_7.S
··· 269 269 270 270 __INITDATA 271 271 272 - /* 273 - * Purpose : Function pointers used to access above functions - all calls 274 - * come through these 275 - */ 276 - .type arm6_processor_functions, #object 277 - ENTRY(arm6_processor_functions) 278 - .word cpu_arm6_data_abort 279 - .word legacy_pabort 280 - .word cpu_arm6_proc_init 281 - .word cpu_arm6_proc_fin 282 - .word cpu_arm6_reset 283 - .word cpu_arm6_do_idle 284 - .word cpu_arm6_dcache_clean_area 285 - .word cpu_arm6_switch_mm 286 - .word cpu_arm6_set_pte_ext 287 - .word 0 288 - .word 0 289 - .word 0 290 - .size arm6_processor_functions, . - arm6_processor_functions 291 - 292 - /* 293 - * Purpose : Function pointers used to access above functions - all calls 294 - * come through these 295 - */ 296 - .type arm7_processor_functions, #object 297 - ENTRY(arm7_processor_functions) 298 - .word cpu_arm7_data_abort 299 - .word legacy_pabort 300 - .word cpu_arm7_proc_init 301 - .word cpu_arm7_proc_fin 302 - .word cpu_arm7_reset 303 - .word cpu_arm7_do_idle 304 - .word cpu_arm7_dcache_clean_area 305 - .word cpu_arm7_switch_mm 306 - .word cpu_arm7_set_pte_ext 307 - .word 0 308 - .word 0 309 - .word 0 310 - .size arm7_processor_functions, . - arm7_processor_functions 272 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 273 + define_processor_functions arm6, dabort=cpu_arm6_data_abort, pabort=legacy_pabort 274 + define_processor_functions arm7, dabort=cpu_arm7_data_abort, pabort=legacy_pabort 311 275 312 276 .section ".rodata" 313 277 314 - .type cpu_arch_name, #object 315 - cpu_arch_name: .asciz "armv3" 316 - .size cpu_arch_name, . - cpu_arch_name 317 - 318 - .type cpu_elf_name, #object 319 - cpu_elf_name: .asciz "v3" 320 - .size cpu_elf_name, . - cpu_elf_name 321 - 322 - .type cpu_arm6_name, #object 323 - cpu_arm6_name: .asciz "ARM6" 324 - .size cpu_arm6_name, . - cpu_arm6_name 325 - 326 - .type cpu_arm610_name, #object 327 - cpu_arm610_name: 328 - .asciz "ARM610" 329 - .size cpu_arm610_name, . - cpu_arm610_name 330 - 331 - .type cpu_arm7_name, #object 332 - cpu_arm7_name: .asciz "ARM7" 333 - .size cpu_arm7_name, . - cpu_arm7_name 334 - 335 - .type cpu_arm710_name, #object 336 - cpu_arm710_name: 337 - .asciz "ARM710" 338 - .size cpu_arm710_name, . - cpu_arm710_name 278 + string cpu_arch_name, "armv3" 279 + string cpu_elf_name, "v3" 280 + string cpu_arm6_name, "ARM6" 281 + string cpu_arm610_name, "ARM610" 282 + string cpu_arm7_name, "ARM7" 283 + string cpu_arm710_name, "ARM710" 339 284 340 285 .align 341 286 342 287 .section ".proc.info.init", #alloc, #execinstr 343 288 344 - .type __arm6_proc_info, #object 345 - __arm6_proc_info: 346 - .long 0x41560600 347 - .long 0xfffffff0 348 - .long 0x00000c1e 289 + .macro arm67_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ 290 + cpu_mm_mmu_flags:req, cpu_flush:req, cpu_proc_funcs:req 291 + .type __\name\()_proc_info, #object 292 + __\name\()_proc_info: 293 + .long \cpu_val 294 + .long \cpu_mask 295 + .long \cpu_mm_mmu_flags 349 296 .long PMD_TYPE_SECT | \ 350 297 PMD_BIT4 | \ 351 298 PMD_SECT_AP_WRITE | \ 352 299 PMD_SECT_AP_READ 353 - b __arm6_setup 300 + b \cpu_flush 354 301 .long cpu_arch_name 355 302 .long cpu_elf_name 356 303 .long HWCAP_SWP | HWCAP_26BIT 357 - .long cpu_arm6_name 358 - .long arm6_processor_functions 304 + .long \cpu_name 305 + .long \cpu_proc_funcs 359 306 .long v3_tlb_fns 360 307 .long v3_user_fns 361 308 .long v3_cache_fns 362 - .size __arm6_proc_info, . - __arm6_proc_info 309 + .size __\name\()_proc_info, . - __\name\()_proc_info 310 + .endm 363 311 364 - .type __arm610_proc_info, #object 365 - __arm610_proc_info: 366 - .long 0x41560610 367 - .long 0xfffffff0 368 - .long 0x00000c1e 369 - .long PMD_TYPE_SECT | \ 370 - PMD_BIT4 | \ 371 - PMD_SECT_AP_WRITE | \ 372 - PMD_SECT_AP_READ 373 - b __arm6_setup 374 - .long cpu_arch_name 375 - .long cpu_elf_name 376 - .long HWCAP_SWP | HWCAP_26BIT 377 - .long cpu_arm610_name 378 - .long arm6_processor_functions 379 - .long v3_tlb_fns 380 - .long v3_user_fns 381 - .long v3_cache_fns 382 - .size __arm610_proc_info, . - __arm610_proc_info 383 - 384 - .type __arm7_proc_info, #object 385 - __arm7_proc_info: 386 - .long 0x41007000 387 - .long 0xffffff00 388 - .long 0x00000c1e 389 - .long PMD_TYPE_SECT | \ 390 - PMD_BIT4 | \ 391 - PMD_SECT_AP_WRITE | \ 392 - PMD_SECT_AP_READ 393 - b __arm7_setup 394 - .long cpu_arch_name 395 - .long cpu_elf_name 396 - .long HWCAP_SWP | HWCAP_26BIT 397 - .long cpu_arm7_name 398 - .long arm7_processor_functions 399 - .long v3_tlb_fns 400 - .long v3_user_fns 401 - .long v3_cache_fns 402 - .size __arm7_proc_info, . - __arm7_proc_info 403 - 404 - .type __arm710_proc_info, #object 405 - __arm710_proc_info: 406 - .long 0x41007100 407 - .long 0xfff8ff00 408 - .long PMD_TYPE_SECT | \ 312 + arm67_proc_info arm6, 0x41560600, 0xfffffff0, cpu_arm6_name, \ 313 + 0x00000c1e, __arm6_setup, arm6_processor_functions 314 + arm67_proc_info arm610, 0x41560610, 0xfffffff0, cpu_arm610_name, \ 315 + 0x00000c1e, __arm6_setup, arm6_processor_functions 316 + arm67_proc_info arm7, 0x41007000, 0xffffff00, cpu_arm7_name, \ 317 + 0x00000c1e, __arm7_setup, arm7_processor_functions 318 + arm67_proc_info arm710, 0x41007100, 0xfff8ff00, cpu_arm710_name, \ 319 + PMD_TYPE_SECT | \ 409 320 PMD_SECT_BUFFERABLE | \ 410 321 PMD_SECT_CACHEABLE | \ 411 322 PMD_BIT4 | \ 412 323 PMD_SECT_AP_WRITE | \ 413 - PMD_SECT_AP_READ 414 - .long PMD_TYPE_SECT | \ 415 - PMD_BIT4 | \ 416 - PMD_SECT_AP_WRITE | \ 417 - PMD_SECT_AP_READ 418 - b __arm7_setup 419 - .long cpu_arch_name 420 - .long cpu_elf_name 421 - .long HWCAP_SWP | HWCAP_26BIT 422 - .long cpu_arm710_name 423 - .long arm7_processor_functions 424 - .long v3_tlb_fns 425 - .long v3_user_fns 426 - .long v3_cache_fns 427 - .size __arm710_proc_info, . - __arm710_proc_info 324 + PMD_SECT_AP_READ, \ 325 + __arm7_setup, arm7_processor_functions
+17 -68
arch/arm/mm/proc-arm720.S
··· 169 169 crval clear=0x00002f3f, mmuset=0x0000213d, ucset=0x00000130 170 170 171 171 __INITDATA 172 - 173 - /* 174 - * Purpose : Function pointers used to access above functions - all calls 175 - * come through these 176 - */ 177 - .type arm720_processor_functions, #object 178 - ENTRY(arm720_processor_functions) 179 - .word v4t_late_abort 180 - .word legacy_pabort 181 - .word cpu_arm720_proc_init 182 - .word cpu_arm720_proc_fin 183 - .word cpu_arm720_reset 184 - .word cpu_arm720_do_idle 185 - .word cpu_arm720_dcache_clean_area 186 - .word cpu_arm720_switch_mm 187 - .word cpu_arm720_set_pte_ext 188 - .word 0 189 - .word 0 190 - .word 0 191 - .size arm720_processor_functions, . - arm720_processor_functions 172 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 173 + define_processor_functions arm720, dabort=v4t_late_abort, pabort=legacy_pabort 192 174 193 175 .section ".rodata" 194 176 195 - .type cpu_arch_name, #object 196 - cpu_arch_name: .asciz "armv4t" 197 - .size cpu_arch_name, . - cpu_arch_name 198 - 199 - .type cpu_elf_name, #object 200 - cpu_elf_name: .asciz "v4" 201 - .size cpu_elf_name, . - cpu_elf_name 202 - 203 - .type cpu_arm710_name, #object 204 - cpu_arm710_name: 205 - .asciz "ARM710T" 206 - .size cpu_arm710_name, . - cpu_arm710_name 207 - 208 - .type cpu_arm720_name, #object 209 - cpu_arm720_name: 210 - .asciz "ARM720T" 211 - .size cpu_arm720_name, . - cpu_arm720_name 177 + string cpu_arch_name, "armv4t" 178 + string cpu_elf_name, "v4" 179 + string cpu_arm710_name, "ARM710T" 180 + string cpu_arm720_name, "ARM720T" 212 181 213 182 .align 214 183 ··· 187 218 188 219 .section ".proc.info.init", #alloc, #execinstr 189 220 190 - .type __arm710_proc_info, #object 191 - __arm710_proc_info: 192 - .long 0x41807100 @ cpu_val 193 - .long 0xffffff00 @ cpu_mask 221 + .macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req 222 + .type __\name\()_proc_info,#object 223 + __\name\()_proc_info: 224 + .long \cpu_val 225 + .long \cpu_mask 194 226 .long PMD_TYPE_SECT | \ 195 227 PMD_SECT_BUFFERABLE | \ 196 228 PMD_SECT_CACHEABLE | \ ··· 202 232 PMD_BIT4 | \ 203 233 PMD_SECT_AP_WRITE | \ 204 234 PMD_SECT_AP_READ 205 - b __arm710_setup @ cpu_flush 235 + b \cpu_flush @ cpu_flush 206 236 .long cpu_arch_name @ arch_name 207 237 .long cpu_elf_name @ elf_name 208 238 .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB @ elf_hwcap 209 - .long cpu_arm710_name @ name 239 + .long \cpu_name 210 240 .long arm720_processor_functions 211 241 .long v4_tlb_fns 212 242 .long v4wt_user_fns 213 243 .long v4_cache_fns 214 - .size __arm710_proc_info, . - __arm710_proc_info 244 + .size __\name\()_proc_info, . - __\name\()_proc_info 245 + .endm 215 246 216 - .type __arm720_proc_info, #object 217 - __arm720_proc_info: 218 - .long 0x41807200 @ cpu_val 219 - .long 0xffffff00 @ cpu_mask 220 - .long PMD_TYPE_SECT | \ 221 - PMD_SECT_BUFFERABLE | \ 222 - PMD_SECT_CACHEABLE | \ 223 - PMD_BIT4 | \ 224 - PMD_SECT_AP_WRITE | \ 225 - PMD_SECT_AP_READ 226 - .long PMD_TYPE_SECT | \ 227 - PMD_BIT4 | \ 228 - PMD_SECT_AP_WRITE | \ 229 - PMD_SECT_AP_READ 230 - b __arm720_setup @ cpu_flush 231 - .long cpu_arch_name @ arch_name 232 - .long cpu_elf_name @ elf_name 233 - .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB @ elf_hwcap 234 - .long cpu_arm720_name @ name 235 - .long arm720_processor_functions 236 - .long v4_tlb_fns 237 - .long v4wt_user_fns 238 - .long v4_cache_fns 239 - .size __arm720_proc_info, . - __arm720_proc_info 247 + arm720_proc_info arm710, 0x41807100, 0xffffff00, cpu_arm710_name, __arm710_setup 248 + arm720_proc_info arm720, 0x41807200, 0xffffff00, cpu_arm720_name, __arm720_setup
+7 -35
arch/arm/mm/proc-arm740.S
··· 17 17 #include <asm/pgtable.h> 18 18 #include <asm/ptrace.h> 19 19 20 + #include "proc-macros.S" 21 + 20 22 .text 21 23 /* 22 24 * cpu_arm740_proc_init() ··· 117 115 118 116 __INITDATA 119 117 120 - /* 121 - * Purpose : Function pointers used to access above functions - all calls 122 - * come through these 123 - */ 124 - .type arm740_processor_functions, #object 125 - ENTRY(arm740_processor_functions) 126 - .word v4t_late_abort 127 - .word legacy_pabort 128 - .word cpu_arm740_proc_init 129 - .word cpu_arm740_proc_fin 130 - .word cpu_arm740_reset 131 - .word cpu_arm740_do_idle 132 - .word cpu_arm740_dcache_clean_area 133 - .word cpu_arm740_switch_mm 134 - .word 0 @ cpu_*_set_pte 135 - .word 0 136 - .word 0 137 - .word 0 138 - .size arm740_processor_functions, . - arm740_processor_functions 118 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 119 + define_processor_functions arm740, dabort=v4t_late_abort, pabort=legacy_pabort, nommu=1 139 120 140 121 .section ".rodata" 141 122 142 - .type cpu_arch_name, #object 143 - cpu_arch_name: 144 - .asciz "armv4" 145 - .size cpu_arch_name, . - cpu_arch_name 146 - 147 - .type cpu_elf_name, #object 148 - cpu_elf_name: 149 - .asciz "v4" 150 - .size cpu_elf_name, . - cpu_elf_name 151 - 152 - .type cpu_arm740_name, #object 153 - cpu_arm740_name: 154 - .ascii "ARM740T" 155 - .size cpu_arm740_name, . - cpu_arm740_name 123 + string cpu_arch_name, "armv4" 124 + string cpu_elf_name, "v4" 125 + string cpu_arm740_name, "ARM740T" 156 126 157 127 .align 158 128 ··· 144 170 .long 0 145 171 .long v3_cache_fns @ cache model 146 172 .size __arm740_proc_info, . - __arm740_proc_info 147 - 148 -
+38 -176
arch/arm/mm/proc-arm7tdmi.S
··· 17 17 #include <asm/pgtable.h> 18 18 #include <asm/ptrace.h> 19 19 20 + #include "proc-macros.S" 21 + 20 22 .text 21 23 /* 22 24 * cpu_arm7tdmi_proc_init() ··· 57 55 58 56 __INITDATA 59 57 60 - /* 61 - * Purpose : Function pointers used to access above functions - all calls 62 - * come through these 63 - */ 64 - .type arm7tdmi_processor_functions, #object 65 - ENTRY(arm7tdmi_processor_functions) 66 - .word v4t_late_abort 67 - .word legacy_pabort 68 - .word cpu_arm7tdmi_proc_init 69 - .word cpu_arm7tdmi_proc_fin 70 - .word cpu_arm7tdmi_reset 71 - .word cpu_arm7tdmi_do_idle 72 - .word cpu_arm7tdmi_dcache_clean_area 73 - .word cpu_arm7tdmi_switch_mm 74 - .word 0 @ cpu_*_set_pte 75 - .word 0 76 - .word 0 77 - .word 0 78 - .size arm7tdmi_processor_functions, . - arm7tdmi_processor_functions 58 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 59 + define_processor_functions arm7tdmi, dabort=v4t_late_abort, pabort=legacy_pabort, nommu=1 79 60 80 61 .section ".rodata" 81 62 82 - .type cpu_arch_name, #object 83 - cpu_arch_name: 84 - .asciz "armv4t" 85 - .size cpu_arch_name, . - cpu_arch_name 86 - 87 - .type cpu_elf_name, #object 88 - cpu_elf_name: 89 - .asciz "v4" 90 - .size cpu_elf_name, . - cpu_elf_name 91 - 92 - .type cpu_arm7tdmi_name, #object 93 - cpu_arm7tdmi_name: 94 - .asciz "ARM7TDMI" 95 - .size cpu_arm7tdmi_name, . - cpu_arm7tdmi_name 96 - 97 - .type cpu_triscenda7_name, #object 98 - cpu_triscenda7_name: 99 - .asciz "Triscend-A7x" 100 - .size cpu_triscenda7_name, . - cpu_triscenda7_name 101 - 102 - .type cpu_at91_name, #object 103 - cpu_at91_name: 104 - .asciz "Atmel-AT91M40xxx" 105 - .size cpu_at91_name, . - cpu_at91_name 106 - 107 - .type cpu_s3c3410_name, #object 108 - cpu_s3c3410_name: 109 - .asciz "Samsung-S3C3410" 110 - .size cpu_s3c3410_name, . - cpu_s3c3410_name 111 - 112 - .type cpu_s3c44b0x_name, #object 113 - cpu_s3c44b0x_name: 114 - .asciz "Samsung-S3C44B0x" 115 - .size cpu_s3c44b0x_name, . - cpu_s3c44b0x_name 116 - 117 - .type cpu_s3c4510b, #object 118 - cpu_s3c4510b_name: 119 - .asciz "Samsung-S3C4510B" 120 - .size cpu_s3c4510b_name, . - cpu_s3c4510b_name 121 - 122 - .type cpu_s3c4530_name, #object 123 - cpu_s3c4530_name: 124 - .asciz "Samsung-S3C4530" 125 - .size cpu_s3c4530_name, . - cpu_s3c4530_name 126 - 127 - .type cpu_netarm_name, #object 128 - cpu_netarm_name: 129 - .asciz "NETARM" 130 - .size cpu_netarm_name, . - cpu_netarm_name 63 + string cpu_arch_name, "armv4t" 64 + string cpu_elf_name, "v4" 65 + string cpu_arm7tdmi_name, "ARM7TDMI" 66 + string cpu_triscenda7_name, "Triscend-A7x" 67 + string cpu_at91_name, "Atmel-AT91M40xxx" 68 + string cpu_s3c3410_name, "Samsung-S3C3410" 69 + string cpu_s3c44b0x_name, "Samsung-S3C44B0x" 70 + string cpu_s3c4510b_name, "Samsung-S3C4510B" 71 + string cpu_s3c4530_name, "Samsung-S3C4530" 72 + string cpu_netarm_name, "NETARM" 131 73 132 74 .align 133 75 134 76 .section ".proc.info.init", #alloc, #execinstr 135 77 136 - .type __arm7tdmi_proc_info, #object 137 - __arm7tdmi_proc_info: 138 - .long 0x41007700 139 - .long 0xfff8ff00 78 + .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ 79 + extra_hwcaps=0 80 + .type __\name\()_proc_info, #object 81 + __\name\()_proc_info: 82 + .long \cpu_val 83 + .long \cpu_mask 140 84 .long 0 141 85 .long 0 142 86 b __arm7tdmi_setup 143 87 .long cpu_arch_name 144 88 .long cpu_elf_name 145 - .long HWCAP_SWP | HWCAP_26BIT 146 - .long cpu_arm7tdmi_name 89 + .long HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps ) 90 + .long \cpu_name 147 91 .long arm7tdmi_processor_functions 148 92 .long 0 149 93 .long 0 150 94 .long v4_cache_fns 151 - .size __arm7tdmi_proc_info, . - __arm7tdmi_proc_info 95 + .size __\name\()_proc_info, . - __\name\()_proc_info 96 + .endm 152 97 153 - .type __triscenda7_proc_info, #object 154 - __triscenda7_proc_info: 155 - .long 0x0001d2ff 156 - .long 0x0001ffff 157 - .long 0 158 - .long 0 159 - b __arm7tdmi_setup 160 - .long cpu_arch_name 161 - .long cpu_elf_name 162 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 163 - .long cpu_triscenda7_name 164 - .long arm7tdmi_processor_functions 165 - .long 0 166 - .long 0 167 - .long v4_cache_fns 168 - .size __triscenda7_proc_info, . - __triscenda7_proc_info 169 - 170 - .type __at91_proc_info, #object 171 - __at91_proc_info: 172 - .long 0x14000040 173 - .long 0xfff000e0 174 - .long 0 175 - .long 0 176 - b __arm7tdmi_setup 177 - .long cpu_arch_name 178 - .long cpu_elf_name 179 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 180 - .long cpu_at91_name 181 - .long arm7tdmi_processor_functions 182 - .long 0 183 - .long 0 184 - .long v4_cache_fns 185 - .size __at91_proc_info, . - __at91_proc_info 186 - 187 - .type __s3c4510b_proc_info, #object 188 - __s3c4510b_proc_info: 189 - .long 0x36365000 190 - .long 0xfffff000 191 - .long 0 192 - .long 0 193 - b __arm7tdmi_setup 194 - .long cpu_arch_name 195 - .long cpu_elf_name 196 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 197 - .long cpu_s3c4510b_name 198 - .long arm7tdmi_processor_functions 199 - .long 0 200 - .long 0 201 - .long v4_cache_fns 202 - .size __s3c4510b_proc_info, . - __s3c4510b_proc_info 203 - 204 - .type __s3c4530_proc_info, #object 205 - __s3c4530_proc_info: 206 - .long 0x4c000000 207 - .long 0xfff000e0 208 - .long 0 209 - .long 0 210 - b __arm7tdmi_setup 211 - .long cpu_arch_name 212 - .long cpu_elf_name 213 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 214 - .long cpu_s3c4530_name 215 - .long arm7tdmi_processor_functions 216 - .long 0 217 - .long 0 218 - .long v4_cache_fns 219 - .size __s3c4530_proc_info, . - __s3c4530_proc_info 220 - 221 - .type __s3c3410_proc_info, #object 222 - __s3c3410_proc_info: 223 - .long 0x34100000 224 - .long 0xffff0000 225 - .long 0 226 - .long 0 227 - b __arm7tdmi_setup 228 - .long cpu_arch_name 229 - .long cpu_elf_name 230 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 231 - .long cpu_s3c3410_name 232 - .long arm7tdmi_processor_functions 233 - .long 0 234 - .long 0 235 - .long v4_cache_fns 236 - .size __s3c3410_proc_info, . - __s3c3410_proc_info 237 - 238 - .type __s3c44b0x_proc_info, #object 239 - __s3c44b0x_proc_info: 240 - .long 0x44b00000 241 - .long 0xffff0000 242 - .long 0 243 - .long 0 244 - b __arm7tdmi_setup 245 - .long cpu_arch_name 246 - .long cpu_elf_name 247 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 248 - .long cpu_s3c44b0x_name 249 - .long arm7tdmi_processor_functions 250 - .long 0 251 - .long 0 252 - .long v4_cache_fns 253 - .size __s3c44b0x_proc_info, . - __s3c44b0x_proc_info 98 + arm7tdmi_proc_info arm7tdmi, 0x41007700, 0xfff8ff00, \ 99 + cpu_arm7tdmi_name 100 + arm7tdmi_proc_info triscenda7, 0x0001d2ff, 0x0001ffff, \ 101 + cpu_triscenda7_name, extra_hwcaps=HWCAP_THUMB 102 + arm7tdmi_proc_info at91, 0x14000040, 0xfff000e0, \ 103 + cpu_at91_name, extra_hwcaps=HWCAP_THUMB 104 + arm7tdmi_proc_info s3c4510b, 0x36365000, 0xfffff000, \ 105 + cpu_s3c4510b_name, extra_hwcaps=HWCAP_THUMB 106 + arm7tdmi_proc_info s3c4530, 0x4c000000, 0xfff000e0, \ 107 + cpu_s3c4530_name, extra_hwcaps=HWCAP_THUMB 108 + arm7tdmi_proc_info s3c3410, 0x34100000, 0xffff0000, \ 109 + cpu_s3c3410_name, extra_hwcaps=HWCAP_THUMB 110 + arm7tdmi_proc_info s3c44b0x, 0x44b00000, 0xffff0000, \ 111 + cpu_s3c44b0x_name, extra_hwcaps=HWCAP_THUMB
+7 -46
arch/arm/mm/proc-arm920.S
··· 315 315 mov pc, lr 316 316 ENDPROC(arm920_dma_unmap_area) 317 317 318 - ENTRY(arm920_cache_fns) 319 - .long arm920_flush_icache_all 320 - .long arm920_flush_kern_cache_all 321 - .long arm920_flush_user_cache_all 322 - .long arm920_flush_user_cache_range 323 - .long arm920_coherent_kern_range 324 - .long arm920_coherent_user_range 325 - .long arm920_flush_kern_dcache_area 326 - .long arm920_dma_map_area 327 - .long arm920_dma_unmap_area 328 - .long arm920_dma_flush_range 329 - 318 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 319 + define_cache_functions arm920 330 320 #endif 331 321 332 322 ··· 440 450 crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 441 451 442 452 __INITDATA 443 - 444 - /* 445 - * Purpose : Function pointers used to access above functions - all calls 446 - * come through these 447 - */ 448 - .type arm920_processor_functions, #object 449 - arm920_processor_functions: 450 - .word v4t_early_abort 451 - .word legacy_pabort 452 - .word cpu_arm920_proc_init 453 - .word cpu_arm920_proc_fin 454 - .word cpu_arm920_reset 455 - .word cpu_arm920_do_idle 456 - .word cpu_arm920_dcache_clean_area 457 - .word cpu_arm920_switch_mm 458 - .word cpu_arm920_set_pte_ext 459 - .word cpu_arm920_suspend_size 460 - .word cpu_arm920_do_suspend 461 - .word cpu_arm920_do_resume 462 - .size arm920_processor_functions, . - arm920_processor_functions 453 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 454 + define_processor_functions arm920, dabort=v4t_early_abort, pabort=legacy_pabort, suspend=1 463 455 464 456 .section ".rodata" 465 457 466 - .type cpu_arch_name, #object 467 - cpu_arch_name: 468 - .asciz "armv4t" 469 - .size cpu_arch_name, . - cpu_arch_name 470 - 471 - .type cpu_elf_name, #object 472 - cpu_elf_name: 473 - .asciz "v4" 474 - .size cpu_elf_name, . - cpu_elf_name 475 - 476 - .type cpu_arm920_name, #object 477 - cpu_arm920_name: 478 - .asciz "ARM920T" 479 - .size cpu_arm920_name, . - cpu_arm920_name 458 + string cpu_arch_name, "armv4t" 459 + string cpu_elf_name, "v4" 460 + string cpu_arm920_name, "ARM920T" 480 461 481 462 .align 482 463
+7 -46
arch/arm/mm/proc-arm922.S
··· 317 317 mov pc, lr 318 318 ENDPROC(arm922_dma_unmap_area) 319 319 320 - ENTRY(arm922_cache_fns) 321 - .long arm922_flush_icache_all 322 - .long arm922_flush_kern_cache_all 323 - .long arm922_flush_user_cache_all 324 - .long arm922_flush_user_cache_range 325 - .long arm922_coherent_kern_range 326 - .long arm922_coherent_user_range 327 - .long arm922_flush_kern_dcache_area 328 - .long arm922_dma_map_area 329 - .long arm922_dma_unmap_area 330 - .long arm922_dma_flush_range 331 - 320 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 321 + define_cache_functions arm922 332 322 #endif 333 323 334 324 ··· 410 420 crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 411 421 412 422 __INITDATA 413 - 414 - /* 415 - * Purpose : Function pointers used to access above functions - all calls 416 - * come through these 417 - */ 418 - .type arm922_processor_functions, #object 419 - arm922_processor_functions: 420 - .word v4t_early_abort 421 - .word legacy_pabort 422 - .word cpu_arm922_proc_init 423 - .word cpu_arm922_proc_fin 424 - .word cpu_arm922_reset 425 - .word cpu_arm922_do_idle 426 - .word cpu_arm922_dcache_clean_area 427 - .word cpu_arm922_switch_mm 428 - .word cpu_arm922_set_pte_ext 429 - .word 0 430 - .word 0 431 - .word 0 432 - .size arm922_processor_functions, . - arm922_processor_functions 423 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 424 + define_processor_functions arm922, dabort=v4t_early_abort, pabort=legacy_pabort 433 425 434 426 .section ".rodata" 435 427 436 - .type cpu_arch_name, #object 437 - cpu_arch_name: 438 - .asciz "armv4t" 439 - .size cpu_arch_name, . - cpu_arch_name 440 - 441 - .type cpu_elf_name, #object 442 - cpu_elf_name: 443 - .asciz "v4" 444 - .size cpu_elf_name, . - cpu_elf_name 445 - 446 - .type cpu_arm922_name, #object 447 - cpu_arm922_name: 448 - .asciz "ARM922T" 449 - .size cpu_arm922_name, . - cpu_arm922_name 428 + string cpu_arch_name, "armv4t" 429 + string cpu_elf_name, "v4" 430 + string cpu_arm922_name, "ARM922T" 450 431 451 432 .align 452 433
+16 -72
arch/arm/mm/proc-arm925.S
··· 372 372 mov pc, lr 373 373 ENDPROC(arm925_dma_unmap_area) 374 374 375 - ENTRY(arm925_cache_fns) 376 - .long arm925_flush_icache_all 377 - .long arm925_flush_kern_cache_all 378 - .long arm925_flush_user_cache_all 379 - .long arm925_flush_user_cache_range 380 - .long arm925_coherent_kern_range 381 - .long arm925_coherent_user_range 382 - .long arm925_flush_kern_dcache_area 383 - .long arm925_dma_map_area 384 - .long arm925_dma_unmap_area 385 - .long arm925_dma_flush_range 375 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 376 + define_cache_functions arm925 386 377 387 378 ENTRY(cpu_arm925_dcache_clean_area) 388 379 #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH ··· 478 487 crval clear=0x00007f3f, mmuset=0x0000313d, ucset=0x00001130 479 488 480 489 __INITDATA 481 - 482 - /* 483 - * Purpose : Function pointers used to access above functions - all calls 484 - * come through these 485 - */ 486 - .type arm925_processor_functions, #object 487 - arm925_processor_functions: 488 - .word v4t_early_abort 489 - .word legacy_pabort 490 - .word cpu_arm925_proc_init 491 - .word cpu_arm925_proc_fin 492 - .word cpu_arm925_reset 493 - .word cpu_arm925_do_idle 494 - .word cpu_arm925_dcache_clean_area 495 - .word cpu_arm925_switch_mm 496 - .word cpu_arm925_set_pte_ext 497 - .word 0 498 - .word 0 499 - .word 0 500 - .size arm925_processor_functions, . - arm925_processor_functions 490 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 491 + define_processor_functions arm925, dabort=v4t_early_abort, pabort=legacy_pabort 501 492 502 493 .section ".rodata" 503 494 504 - .type cpu_arch_name, #object 505 - cpu_arch_name: 506 - .asciz "armv4t" 507 - .size cpu_arch_name, . - cpu_arch_name 508 - 509 - .type cpu_elf_name, #object 510 - cpu_elf_name: 511 - .asciz "v4" 512 - .size cpu_elf_name, . - cpu_elf_name 513 - 514 - .type cpu_arm925_name, #object 515 - cpu_arm925_name: 516 - .asciz "ARM925T" 517 - .size cpu_arm925_name, . - cpu_arm925_name 495 + string cpu_arch_name, "armv4t" 496 + string cpu_elf_name, "v4" 497 + string cpu_arm925_name, "ARM925T" 518 498 519 499 .align 520 500 521 501 .section ".proc.info.init", #alloc, #execinstr 522 502 523 - .type __arm925_proc_info,#object 524 - __arm925_proc_info: 525 - .long 0x54029250 526 - .long 0xfffffff0 503 + .macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache 504 + .type __\name\()_proc_info,#object 505 + __\name\()_proc_info: 506 + .long \cpu_val 507 + .long \cpu_mask 527 508 .long PMD_TYPE_SECT | \ 528 509 PMD_BIT4 | \ 529 510 PMD_SECT_AP_WRITE | \ ··· 513 550 .long v4wbi_tlb_fns 514 551 .long v4wb_user_fns 515 552 .long arm925_cache_fns 516 - .size __arm925_proc_info, . - __arm925_proc_info 553 + .size __\name\()_proc_info, . - __\name\()_proc_info 554 + .endm 517 555 518 - .type __arm915_proc_info,#object 519 - __arm915_proc_info: 520 - .long 0x54029150 521 - .long 0xfffffff0 522 - .long PMD_TYPE_SECT | \ 523 - PMD_BIT4 | \ 524 - PMD_SECT_AP_WRITE | \ 525 - PMD_SECT_AP_READ 526 - .long PMD_TYPE_SECT | \ 527 - PMD_BIT4 | \ 528 - PMD_SECT_AP_WRITE | \ 529 - PMD_SECT_AP_READ 530 - b __arm925_setup 531 - .long cpu_arch_name 532 - .long cpu_elf_name 533 - .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB 534 - .long cpu_arm925_name 535 - .long arm925_processor_functions 536 - .long v4wbi_tlb_fns 537 - .long v4wb_user_fns 538 - .long arm925_cache_fns 539 - .size __arm925_proc_info, . - __arm925_proc_info 556 + arm925_proc_info arm925, 0x54029250, 0xfffffff0, cpu_arm925_name 557 + arm925_proc_info arm915, 0x54029150, 0xfffffff0, cpu_arm925_name
+7 -44
arch/arm/mm/proc-arm926.S
··· 335 335 mov pc, lr 336 336 ENDPROC(arm926_dma_unmap_area) 337 337 338 - ENTRY(arm926_cache_fns) 339 - .long arm926_flush_icache_all 340 - .long arm926_flush_kern_cache_all 341 - .long arm926_flush_user_cache_all 342 - .long arm926_flush_user_cache_range 343 - .long arm926_coherent_kern_range 344 - .long arm926_coherent_user_range 345 - .long arm926_flush_kern_dcache_area 346 - .long arm926_dma_map_area 347 - .long arm926_dma_unmap_area 348 - .long arm926_dma_flush_range 338 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 339 + define_cache_functions arm926 349 340 350 341 ENTRY(cpu_arm926_dcache_clean_area) 351 342 #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH ··· 466 475 467 476 __INITDATA 468 477 469 - /* 470 - * Purpose : Function pointers used to access above functions - all calls 471 - * come through these 472 - */ 473 - .type arm926_processor_functions, #object 474 - arm926_processor_functions: 475 - .word v5tj_early_abort 476 - .word legacy_pabort 477 - .word cpu_arm926_proc_init 478 - .word cpu_arm926_proc_fin 479 - .word cpu_arm926_reset 480 - .word cpu_arm926_do_idle 481 - .word cpu_arm926_dcache_clean_area 482 - .word cpu_arm926_switch_mm 483 - .word cpu_arm926_set_pte_ext 484 - .word cpu_arm926_suspend_size 485 - .word cpu_arm926_do_suspend 486 - .word cpu_arm926_do_resume 487 - .size arm926_processor_functions, . - arm926_processor_functions 478 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 479 + define_processor_functions arm926, dabort=v5tj_early_abort, pabort=legacy_pabort, suspend=1 488 480 489 481 .section ".rodata" 490 482 491 - .type cpu_arch_name, #object 492 - cpu_arch_name: 493 - .asciz "armv5tej" 494 - .size cpu_arch_name, . - cpu_arch_name 495 - 496 - .type cpu_elf_name, #object 497 - cpu_elf_name: 498 - .asciz "v5" 499 - .size cpu_elf_name, . - cpu_elf_name 500 - 501 - .type cpu_arm926_name, #object 502 - cpu_arm926_name: 503 - .asciz "ARM926EJ-S" 504 - .size cpu_arm926_name, . - cpu_arm926_name 483 + string cpu_arch_name, "armv5tej" 484 + string cpu_elf_name, "v5" 485 + string cpu_arm926_name, "ARM926EJ-S" 505 486 506 487 .align 507 488
+7 -44
arch/arm/mm/proc-arm940.S
··· 264 264 mov pc, lr 265 265 ENDPROC(arm940_dma_unmap_area) 266 266 267 - ENTRY(arm940_cache_fns) 268 - .long arm940_flush_icache_all 269 - .long arm940_flush_kern_cache_all 270 - .long arm940_flush_user_cache_all 271 - .long arm940_flush_user_cache_range 272 - .long arm940_coherent_kern_range 273 - .long arm940_coherent_user_range 274 - .long arm940_flush_kern_dcache_area 275 - .long arm940_dma_map_area 276 - .long arm940_dma_unmap_area 277 - .long arm940_dma_flush_range 267 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 268 + define_cache_functions arm940 278 269 279 270 __CPUINIT 280 271 ··· 339 348 340 349 __INITDATA 341 350 342 - /* 343 - * Purpose : Function pointers used to access above functions - all calls 344 - * come through these 345 - */ 346 - .type arm940_processor_functions, #object 347 - ENTRY(arm940_processor_functions) 348 - .word nommu_early_abort 349 - .word legacy_pabort 350 - .word cpu_arm940_proc_init 351 - .word cpu_arm940_proc_fin 352 - .word cpu_arm940_reset 353 - .word cpu_arm940_do_idle 354 - .word cpu_arm940_dcache_clean_area 355 - .word cpu_arm940_switch_mm 356 - .word 0 @ cpu_*_set_pte 357 - .word 0 358 - .word 0 359 - .word 0 360 - .size arm940_processor_functions, . - arm940_processor_functions 351 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 352 + define_processor_functions arm940, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1 361 353 362 354 .section ".rodata" 363 355 364 - .type cpu_arch_name, #object 365 - cpu_arch_name: 366 - .asciz "armv4t" 367 - .size cpu_arch_name, . - cpu_arch_name 368 - 369 - .type cpu_elf_name, #object 370 - cpu_elf_name: 371 - .asciz "v4" 372 - .size cpu_elf_name, . - cpu_elf_name 373 - 374 - .type cpu_arm940_name, #object 375 - cpu_arm940_name: 376 - .ascii "ARM940T" 377 - .size cpu_arm940_name, . - cpu_arm940_name 356 + string cpu_arch_name, "armv4t" 357 + string cpu_elf_name, "v4" 358 + string cpu_arm940_name, "ARM940T" 378 359 379 360 .align 380 361
+7 -46
arch/arm/mm/proc-arm946.S
··· 306 306 mov pc, lr 307 307 ENDPROC(arm946_dma_unmap_area) 308 308 309 - ENTRY(arm946_cache_fns) 310 - .long arm946_flush_icache_all 311 - .long arm946_flush_kern_cache_all 312 - .long arm946_flush_user_cache_all 313 - .long arm946_flush_user_cache_range 314 - .long arm946_coherent_kern_range 315 - .long arm946_coherent_user_range 316 - .long arm946_flush_kern_dcache_area 317 - .long arm946_dma_map_area 318 - .long arm946_dma_unmap_area 319 - .long arm946_dma_flush_range 320 - 309 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 310 + define_cache_functions arm946 321 311 322 312 ENTRY(cpu_arm946_dcache_clean_area) 323 313 #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH ··· 393 403 394 404 __INITDATA 395 405 396 - /* 397 - * Purpose : Function pointers used to access above functions - all calls 398 - * come through these 399 - */ 400 - .type arm946_processor_functions, #object 401 - ENTRY(arm946_processor_functions) 402 - .word nommu_early_abort 403 - .word legacy_pabort 404 - .word cpu_arm946_proc_init 405 - .word cpu_arm946_proc_fin 406 - .word cpu_arm946_reset 407 - .word cpu_arm946_do_idle 408 - 409 - .word cpu_arm946_dcache_clean_area 410 - .word cpu_arm946_switch_mm 411 - .word 0 @ cpu_*_set_pte 412 - .word 0 413 - .word 0 414 - .word 0 415 - .size arm946_processor_functions, . - arm946_processor_functions 406 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 407 + define_processor_functions arm946, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1 416 408 417 409 .section ".rodata" 418 410 419 - .type cpu_arch_name, #object 420 - cpu_arch_name: 421 - .asciz "armv5te" 422 - .size cpu_arch_name, . - cpu_arch_name 423 - 424 - .type cpu_elf_name, #object 425 - cpu_elf_name: 426 - .asciz "v5t" 427 - .size cpu_elf_name, . - cpu_elf_name 428 - 429 - .type cpu_arm946_name, #object 430 - cpu_arm946_name: 431 - .ascii "ARM946E-S" 432 - .size cpu_arm946_name, . - cpu_arm946_name 411 + string cpu_arch_name, "armv5te" 412 + string cpu_elf_name, "v5t" 413 + string cpu_arm946_name, "ARM946E-S" 433 414 434 415 .align 435 416
+18 -60
arch/arm/mm/proc-arm9tdmi.S
··· 17 17 #include <asm/pgtable.h> 18 18 #include <asm/ptrace.h> 19 19 20 + #include "proc-macros.S" 21 + 20 22 .text 21 23 /* 22 24 * cpu_arm9tdmi_proc_init() ··· 57 55 58 56 __INITDATA 59 57 60 - /* 61 - * Purpose : Function pointers used to access above functions - all calls 62 - * come through these 63 - */ 64 - .type arm9tdmi_processor_functions, #object 65 - ENTRY(arm9tdmi_processor_functions) 66 - .word nommu_early_abort 67 - .word legacy_pabort 68 - .word cpu_arm9tdmi_proc_init 69 - .word cpu_arm9tdmi_proc_fin 70 - .word cpu_arm9tdmi_reset 71 - .word cpu_arm9tdmi_do_idle 72 - .word cpu_arm9tdmi_dcache_clean_area 73 - .word cpu_arm9tdmi_switch_mm 74 - .word 0 @ cpu_*_set_pte 75 - .word 0 76 - .word 0 77 - .word 0 78 - .size arm9tdmi_processor_functions, . - arm9tdmi_processor_functions 58 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 59 + define_processor_functions arm9tdmi, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1 79 60 80 61 .section ".rodata" 81 62 82 - .type cpu_arch_name, #object 83 - cpu_arch_name: 84 - .asciz "armv4t" 85 - .size cpu_arch_name, . - cpu_arch_name 86 - 87 - .type cpu_elf_name, #object 88 - cpu_elf_name: 89 - .asciz "v4" 90 - .size cpu_elf_name, . - cpu_elf_name 91 - 92 - .type cpu_arm9tdmi_name, #object 93 - cpu_arm9tdmi_name: 94 - .asciz "ARM9TDMI" 95 - .size cpu_arm9tdmi_name, . - cpu_arm9tdmi_name 96 - 97 - .type cpu_p2001_name, #object 98 - cpu_p2001_name: 99 - .asciz "P2001" 100 - .size cpu_p2001_name, . - cpu_p2001_name 63 + string cpu_arch_name, "armv4t" 64 + string cpu_elf_name, "v4" 65 + string cpu_arm9tdmi_name, "ARM9TDMI" 66 + string cpu_p2001_name, "P2001" 101 67 102 68 .align 103 69 104 70 .section ".proc.info.init", #alloc, #execinstr 105 71 106 - .type __arm9tdmi_proc_info, #object 107 - __arm9tdmi_proc_info: 108 - .long 0x41009900 109 - .long 0xfff8ff00 72 + .macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req 73 + .type __\name\()_proc_info, #object 74 + __\name\()_proc_info: 75 + .long \cpu_val 76 + .long \cpu_mask 110 77 .long 0 111 78 .long 0 112 79 b __arm9tdmi_setup 113 80 .long cpu_arch_name 114 81 .long cpu_elf_name 115 82 .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 116 - .long cpu_arm9tdmi_name 83 + .long \cpu_name 117 84 .long arm9tdmi_processor_functions 118 85 .long 0 119 86 .long 0 120 87 .long v4_cache_fns 121 - .size __arm9tdmi_proc_info, . - __arm9tdmi_proc_info 88 + .size __\name\()_proc_info, . - __\name\()_proc_info 89 + .endm 122 90 123 - .type __p2001_proc_info, #object 124 - __p2001_proc_info: 125 - .long 0x41029000 126 - .long 0xffffffff 127 - .long 0 128 - .long 0 129 - b __arm9tdmi_setup 130 - .long cpu_arch_name 131 - .long cpu_elf_name 132 - .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT 133 - .long cpu_p2001_name 134 - .long arm9tdmi_processor_functions 135 - .long 0 136 - .long 0 137 - .long v4_cache_fns 138 - .size __p2001_proc_info, . - __p2001_proc_info 91 + arm9tdmi_proc_info arm9tdmi, 0x41009900, 0xfff8ff00, cpu_arm9tdmi_name 92 + arm9tdmi_proc_info p2001, 0x41029000, 0xffffffff, cpu_p2001_name
+5 -33
arch/arm/mm/proc-fa526.S
··· 180 180 181 181 __INITDATA 182 182 183 - /* 184 - * Purpose : Function pointers used to access above functions - all calls 185 - * come through these 186 - */ 187 - .type fa526_processor_functions, #object 188 - fa526_processor_functions: 189 - .word v4_early_abort 190 - .word legacy_pabort 191 - .word cpu_fa526_proc_init 192 - .word cpu_fa526_proc_fin 193 - .word cpu_fa526_reset 194 - .word cpu_fa526_do_idle 195 - .word cpu_fa526_dcache_clean_area 196 - .word cpu_fa526_switch_mm 197 - .word cpu_fa526_set_pte_ext 198 - .word 0 199 - .word 0 200 - .word 0 201 - .size fa526_processor_functions, . - fa526_processor_functions 183 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 184 + define_processor_functions fa526, dabort=v4_early_abort, pabort=legacy_pabort 202 185 203 186 .section ".rodata" 204 187 205 - .type cpu_arch_name, #object 206 - cpu_arch_name: 207 - .asciz "armv4" 208 - .size cpu_arch_name, . - cpu_arch_name 209 - 210 - .type cpu_elf_name, #object 211 - cpu_elf_name: 212 - .asciz "v4" 213 - .size cpu_elf_name, . - cpu_elf_name 214 - 215 - .type cpu_fa526_name, #object 216 - cpu_fa526_name: 217 - .asciz "FA526" 218 - .size cpu_fa526_name, . - cpu_fa526_name 188 + string cpu_arch_name, "armv4" 189 + string cpu_elf_name, "v4" 190 + string cpu_fa526_name, "FA526" 219 191 220 192 .align 221 193
+48 -152
arch/arm/mm/proc-feroceon.S
··· 411 411 mov pc, lr 412 412 ENDPROC(feroceon_dma_unmap_area) 413 413 414 - ENTRY(feroceon_cache_fns) 415 - .long feroceon_flush_icache_all 416 - .long feroceon_flush_kern_cache_all 417 - .long feroceon_flush_user_cache_all 418 - .long feroceon_flush_user_cache_range 419 - .long feroceon_coherent_kern_range 420 - .long feroceon_coherent_user_range 421 - .long feroceon_flush_kern_dcache_area 422 - .long feroceon_dma_map_area 423 - .long feroceon_dma_unmap_area 424 - .long feroceon_dma_flush_range 414 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 415 + define_cache_functions feroceon 425 416 426 - ENTRY(feroceon_range_cache_fns) 427 - .long feroceon_flush_icache_all 428 - .long feroceon_flush_kern_cache_all 429 - .long feroceon_flush_user_cache_all 430 - .long feroceon_flush_user_cache_range 431 - .long feroceon_coherent_kern_range 432 - .long feroceon_coherent_user_range 433 - .long feroceon_range_flush_kern_dcache_area 434 - .long feroceon_range_dma_map_area 435 - .long feroceon_dma_unmap_area 436 - .long feroceon_range_dma_flush_range 417 + .macro range_alias basename 418 + .globl feroceon_range_\basename 419 + .type feroceon_range_\basename , %function 420 + .equ feroceon_range_\basename , feroceon_\basename 421 + .endm 422 + 423 + /* 424 + * Most of the cache functions are unchanged for this case. 425 + * Export suitable alias symbols for the unchanged functions: 426 + */ 427 + range_alias flush_icache_all 428 + range_alias flush_user_cache_all 429 + range_alias flush_kern_cache_all 430 + range_alias flush_user_cache_range 431 + range_alias coherent_kern_range 432 + range_alias coherent_user_range 433 + range_alias dma_unmap_area 434 + 435 + define_cache_functions feroceon_range 437 436 438 437 .align 5 439 438 ENTRY(cpu_feroceon_dcache_clean_area) ··· 538 539 539 540 __INITDATA 540 541 541 - /* 542 - * Purpose : Function pointers used to access above functions - all calls 543 - * come through these 544 - */ 545 - .type feroceon_processor_functions, #object 546 - feroceon_processor_functions: 547 - .word v5t_early_abort 548 - .word legacy_pabort 549 - .word cpu_feroceon_proc_init 550 - .word cpu_feroceon_proc_fin 551 - .word cpu_feroceon_reset 552 - .word cpu_feroceon_do_idle 553 - .word cpu_feroceon_dcache_clean_area 554 - .word cpu_feroceon_switch_mm 555 - .word cpu_feroceon_set_pte_ext 556 - .word 0 557 - .word 0 558 - .word 0 559 - .size feroceon_processor_functions, . - feroceon_processor_functions 542 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 543 + define_processor_functions feroceon, dabort=v5t_early_abort, pabort=legacy_pabort 560 544 561 545 .section ".rodata" 562 546 563 - .type cpu_arch_name, #object 564 - cpu_arch_name: 565 - .asciz "armv5te" 566 - .size cpu_arch_name, . - cpu_arch_name 567 - 568 - .type cpu_elf_name, #object 569 - cpu_elf_name: 570 - .asciz "v5" 571 - .size cpu_elf_name, . - cpu_elf_name 572 - 573 - .type cpu_feroceon_name, #object 574 - cpu_feroceon_name: 575 - .asciz "Feroceon" 576 - .size cpu_feroceon_name, . - cpu_feroceon_name 577 - 578 - .type cpu_88fr531_name, #object 579 - cpu_88fr531_name: 580 - .asciz "Feroceon 88FR531-vd" 581 - .size cpu_88fr531_name, . - cpu_88fr531_name 582 - 583 - .type cpu_88fr571_name, #object 584 - cpu_88fr571_name: 585 - .asciz "Feroceon 88FR571-vd" 586 - .size cpu_88fr571_name, . - cpu_88fr571_name 587 - 588 - .type cpu_88fr131_name, #object 589 - cpu_88fr131_name: 590 - .asciz "Feroceon 88FR131" 591 - .size cpu_88fr131_name, . - cpu_88fr131_name 547 + string cpu_arch_name, "armv5te" 548 + string cpu_elf_name, "v5" 549 + string cpu_feroceon_name, "Feroceon" 550 + string cpu_88fr531_name, "Feroceon 88FR531-vd" 551 + string cpu_88fr571_name, "Feroceon 88FR571-vd" 552 + string cpu_88fr131_name, "Feroceon 88FR131" 592 553 593 554 .align 594 555 595 556 .section ".proc.info.init", #alloc, #execinstr 596 557 597 - #ifdef CONFIG_CPU_FEROCEON_OLD_ID 598 - .type __feroceon_old_id_proc_info,#object 599 - __feroceon_old_id_proc_info: 600 - .long 0x41009260 601 - .long 0xff00fff0 558 + .macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req 559 + .type __\name\()_proc_info,#object 560 + __\name\()_proc_info: 561 + .long \cpu_val 562 + .long \cpu_mask 602 563 .long PMD_TYPE_SECT | \ 603 564 PMD_SECT_BUFFERABLE | \ 604 565 PMD_SECT_CACHEABLE | \ ··· 573 614 .long cpu_arch_name 574 615 .long cpu_elf_name 575 616 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 576 - .long cpu_feroceon_name 617 + .long \cpu_name 577 618 .long feroceon_processor_functions 578 619 .long v4wbi_tlb_fns 579 620 .long feroceon_user_fns 580 - .long feroceon_cache_fns 581 - .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info 621 + .long \cache 622 + .size __\name\()_proc_info, . - __\name\()_proc_info 623 + .endm 624 + 625 + #ifdef CONFIG_CPU_FEROCEON_OLD_ID 626 + feroceon_proc_info feroceon_old_id, 0x41009260, 0xff00fff0, \ 627 + cpu_name=cpu_feroceon_name, cache=feroceon_cache_fns 582 628 #endif 583 629 584 - .type __88fr531_proc_info,#object 585 - __88fr531_proc_info: 586 - .long 0x56055310 587 - .long 0xfffffff0 588 - .long PMD_TYPE_SECT | \ 589 - PMD_SECT_BUFFERABLE | \ 590 - PMD_SECT_CACHEABLE | \ 591 - PMD_BIT4 | \ 592 - PMD_SECT_AP_WRITE | \ 593 - PMD_SECT_AP_READ 594 - .long PMD_TYPE_SECT | \ 595 - PMD_BIT4 | \ 596 - PMD_SECT_AP_WRITE | \ 597 - PMD_SECT_AP_READ 598 - b __feroceon_setup 599 - .long cpu_arch_name 600 - .long cpu_elf_name 601 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 602 - .long cpu_88fr531_name 603 - .long feroceon_processor_functions 604 - .long v4wbi_tlb_fns 605 - .long feroceon_user_fns 606 - .long feroceon_cache_fns 607 - .size __88fr531_proc_info, . - __88fr531_proc_info 608 - 609 - .type __88fr571_proc_info,#object 610 - __88fr571_proc_info: 611 - .long 0x56155710 612 - .long 0xfffffff0 613 - .long PMD_TYPE_SECT | \ 614 - PMD_SECT_BUFFERABLE | \ 615 - PMD_SECT_CACHEABLE | \ 616 - PMD_BIT4 | \ 617 - PMD_SECT_AP_WRITE | \ 618 - PMD_SECT_AP_READ 619 - .long PMD_TYPE_SECT | \ 620 - PMD_BIT4 | \ 621 - PMD_SECT_AP_WRITE | \ 622 - PMD_SECT_AP_READ 623 - b __feroceon_setup 624 - .long cpu_arch_name 625 - .long cpu_elf_name 626 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 627 - .long cpu_88fr571_name 628 - .long feroceon_processor_functions 629 - .long v4wbi_tlb_fns 630 - .long feroceon_user_fns 631 - .long feroceon_range_cache_fns 632 - .size __88fr571_proc_info, . - __88fr571_proc_info 633 - 634 - .type __88fr131_proc_info,#object 635 - __88fr131_proc_info: 636 - .long 0x56251310 637 - .long 0xfffffff0 638 - .long PMD_TYPE_SECT | \ 639 - PMD_SECT_BUFFERABLE | \ 640 - PMD_SECT_CACHEABLE | \ 641 - PMD_BIT4 | \ 642 - PMD_SECT_AP_WRITE | \ 643 - PMD_SECT_AP_READ 644 - .long PMD_TYPE_SECT | \ 645 - PMD_BIT4 | \ 646 - PMD_SECT_AP_WRITE | \ 647 - PMD_SECT_AP_READ 648 - b __feroceon_setup 649 - .long cpu_arch_name 650 - .long cpu_elf_name 651 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 652 - .long cpu_88fr131_name 653 - .long feroceon_processor_functions 654 - .long v4wbi_tlb_fns 655 - .long feroceon_user_fns 656 - .long feroceon_range_cache_fns 657 - .size __88fr131_proc_info, . - __88fr131_proc_info 630 + feroceon_proc_info 88fr531, 0x56055310, 0xfffffff0, cpu_88fr531_name, \ 631 + cache=feroceon_cache_fns 632 + feroceon_proc_info 88fr571, 0x56155710, 0xfffffff0, cpu_88fr571_name, \ 633 + cache=feroceon_range_cache_fns 634 + feroceon_proc_info 88fr131, 0x56251310, 0xfffffff0, cpu_88fr131_name, \ 635 + cache=feroceon_range_cache_fns
+63
arch/arm/mm/proc-macros.S
··· 254 254 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line 255 255 mcr p15, 0, ip, c7, c10, 4 @ data write barrier 256 256 .endm 257 + 258 + .macro define_processor_functions name:req, dabort:req, pabort:req, nommu=0, suspend=0 259 + .type \name\()_processor_functions, #object 260 + .align 2 261 + ENTRY(\name\()_processor_functions) 262 + .word \dabort 263 + .word \pabort 264 + .word cpu_\name\()_proc_init 265 + .word cpu_\name\()_proc_fin 266 + .word cpu_\name\()_reset 267 + .word cpu_\name\()_do_idle 268 + .word cpu_\name\()_dcache_clean_area 269 + .word cpu_\name\()_switch_mm 270 + 271 + .if \nommu 272 + .word 0 273 + .else 274 + .word cpu_\name\()_set_pte_ext 275 + .endif 276 + 277 + .if \suspend 278 + .word cpu_\name\()_suspend_size 279 + .word cpu_\name\()_do_suspend 280 + .word cpu_\name\()_do_resume 281 + .else 282 + .word 0 283 + .word 0 284 + .word 0 285 + .endif 286 + 287 + .size \name\()_processor_functions, . - \name\()_processor_functions 288 + .endm 289 + 290 + .macro define_cache_functions name:req 291 + .align 2 292 + .type \name\()_cache_fns, #object 293 + ENTRY(\name\()_cache_fns) 294 + .long \name\()_flush_icache_all 295 + .long \name\()_flush_kern_cache_all 296 + .long \name\()_flush_user_cache_all 297 + .long \name\()_flush_user_cache_range 298 + .long \name\()_coherent_kern_range 299 + .long \name\()_coherent_user_range 300 + .long \name\()_flush_kern_dcache_area 301 + .long \name\()_dma_map_area 302 + .long \name\()_dma_unmap_area 303 + .long \name\()_dma_flush_range 304 + .size \name\()_cache_fns, . - \name\()_cache_fns 305 + .endm 306 + 307 + .macro define_tlb_functions name:req, flags_up:req, flags_smp 308 + .type \name\()_tlb_fns, #object 309 + ENTRY(\name\()_tlb_fns) 310 + .long \name\()_flush_user_tlb_range 311 + .long \name\()_flush_kern_tlb_range 312 + .ifnb \flags_smp 313 + ALT_SMP(.long \flags_smp ) 314 + ALT_UP(.long \flags_up ) 315 + .else 316 + .long \flags_up 317 + .endif 318 + .size \name\()_tlb_fns, . - \name\()_tlb_fns 319 + .endm
+18 -43
arch/arm/mm/proc-mohawk.S
··· 93 93 mov pc, lr 94 94 95 95 /* 96 + * flush_icache_all() 97 + * 98 + * Unconditionally clean and invalidate the entire icache. 99 + */ 100 + ENTRY(mohawk_flush_icache_all) 101 + mov r0, #0 102 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache 103 + mov pc, lr 104 + ENDPROC(mohawk_flush_icache_all) 105 + 106 + /* 96 107 * flush_user_cache_all() 97 108 * 98 109 * Clean and invalidate all cache entries in a particular ··· 299 288 mov pc, lr 300 289 ENDPROC(mohawk_dma_unmap_area) 301 290 302 - ENTRY(mohawk_cache_fns) 303 - .long mohawk_flush_kern_cache_all 304 - .long mohawk_flush_user_cache_all 305 - .long mohawk_flush_user_cache_range 306 - .long mohawk_coherent_kern_range 307 - .long mohawk_coherent_user_range 308 - .long mohawk_flush_kern_dcache_area 309 - .long mohawk_dma_map_area 310 - .long mohawk_dma_unmap_area 311 - .long mohawk_dma_flush_range 291 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 292 + define_cache_functions mohawk 312 293 313 294 ENTRY(cpu_mohawk_dcache_clean_area) 314 295 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry ··· 376 373 377 374 __INITDATA 378 375 379 - /* 380 - * Purpose : Function pointers used to access above functions - all calls 381 - * come through these 382 - */ 383 - .type mohawk_processor_functions, #object 384 - mohawk_processor_functions: 385 - .word v5t_early_abort 386 - .word legacy_pabort 387 - .word cpu_mohawk_proc_init 388 - .word cpu_mohawk_proc_fin 389 - .word cpu_mohawk_reset 390 - .word cpu_mohawk_do_idle 391 - .word cpu_mohawk_dcache_clean_area 392 - .word cpu_mohawk_switch_mm 393 - .word cpu_mohawk_set_pte_ext 394 - .word 0 395 - .word 0 396 - .word 0 397 - .size mohawk_processor_functions, . - mohawk_processor_functions 376 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 377 + define_processor_functions mohawk, dabort=v5t_early_abort, pabort=legacy_pabort 398 378 399 379 .section ".rodata" 400 380 401 - .type cpu_arch_name, #object 402 - cpu_arch_name: 403 - .asciz "armv5te" 404 - .size cpu_arch_name, . - cpu_arch_name 405 - 406 - .type cpu_elf_name, #object 407 - cpu_elf_name: 408 - .asciz "v5" 409 - .size cpu_elf_name, . - cpu_elf_name 410 - 411 - .type cpu_mohawk_name, #object 412 - cpu_mohawk_name: 413 - .asciz "Marvell 88SV331x" 414 - .size cpu_mohawk_name, . - cpu_mohawk_name 381 + string cpu_arch_name, "armv5te" 382 + string cpu_elf_name, "v5" 383 + string cpu_mohawk_name, "Marvell 88SV331x" 415 384 416 385 .align 417 386
+5 -34
arch/arm/mm/proc-sa110.S
··· 187 187 188 188 __INITDATA 189 189 190 - /* 191 - * Purpose : Function pointers used to access above functions - all calls 192 - * come through these 193 - */ 194 - 195 - .type sa110_processor_functions, #object 196 - ENTRY(sa110_processor_functions) 197 - .word v4_early_abort 198 - .word legacy_pabort 199 - .word cpu_sa110_proc_init 200 - .word cpu_sa110_proc_fin 201 - .word cpu_sa110_reset 202 - .word cpu_sa110_do_idle 203 - .word cpu_sa110_dcache_clean_area 204 - .word cpu_sa110_switch_mm 205 - .word cpu_sa110_set_pte_ext 206 - .word 0 207 - .word 0 208 - .word 0 209 - .size sa110_processor_functions, . - sa110_processor_functions 190 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 191 + define_processor_functions sa110, dabort=v4_early_abort, pabort=legacy_pabort 210 192 211 193 .section ".rodata" 212 194 213 - .type cpu_arch_name, #object 214 - cpu_arch_name: 215 - .asciz "armv4" 216 - .size cpu_arch_name, . - cpu_arch_name 217 - 218 - .type cpu_elf_name, #object 219 - cpu_elf_name: 220 - .asciz "v4" 221 - .size cpu_elf_name, . - cpu_elf_name 222 - 223 - .type cpu_sa110_name, #object 224 - cpu_sa110_name: 225 - .asciz "StrongARM-110" 226 - .size cpu_sa110_name, . - cpu_sa110_name 195 + string cpu_arch_name, "armv4" 196 + string cpu_elf_name, "v4" 197 + string cpu_sa110_name, "StrongARM-110" 227 198 228 199 .align 229 200
+17 -67
arch/arm/mm/proc-sa1100.S
··· 236 236 __INITDATA 237 237 238 238 /* 239 - * Purpose : Function pointers used to access above functions - all calls 240 - * come through these 241 - */ 242 - 243 - /* 244 239 * SA1100 and SA1110 share the same function calls 245 240 */ 246 - .type sa1100_processor_functions, #object 247 - ENTRY(sa1100_processor_functions) 248 - .word v4_early_abort 249 - .word legacy_pabort 250 - .word cpu_sa1100_proc_init 251 - .word cpu_sa1100_proc_fin 252 - .word cpu_sa1100_reset 253 - .word cpu_sa1100_do_idle 254 - .word cpu_sa1100_dcache_clean_area 255 - .word cpu_sa1100_switch_mm 256 - .word cpu_sa1100_set_pte_ext 257 - .word cpu_sa1100_suspend_size 258 - .word cpu_sa1100_do_suspend 259 - .word cpu_sa1100_do_resume 260 - .size sa1100_processor_functions, . - sa1100_processor_functions 241 + 242 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 243 + define_processor_functions sa1100, dabort=v4_early_abort, pabort=legacy_pabort, suspend=1 261 244 262 245 .section ".rodata" 263 246 264 - .type cpu_arch_name, #object 265 - cpu_arch_name: 266 - .asciz "armv4" 267 - .size cpu_arch_name, . - cpu_arch_name 268 - 269 - .type cpu_elf_name, #object 270 - cpu_elf_name: 271 - .asciz "v4" 272 - .size cpu_elf_name, . - cpu_elf_name 273 - 274 - .type cpu_sa1100_name, #object 275 - cpu_sa1100_name: 276 - .asciz "StrongARM-1100" 277 - .size cpu_sa1100_name, . - cpu_sa1100_name 278 - 279 - .type cpu_sa1110_name, #object 280 - cpu_sa1110_name: 281 - .asciz "StrongARM-1110" 282 - .size cpu_sa1110_name, . - cpu_sa1110_name 247 + string cpu_arch_name, "armv4" 248 + string cpu_elf_name, "v4" 249 + string cpu_sa1100_name, "StrongARM-1100" 250 + string cpu_sa1110_name, "StrongARM-1110" 283 251 284 252 .align 285 253 286 254 .section ".proc.info.init", #alloc, #execinstr 287 255 288 - .type __sa1100_proc_info,#object 289 - __sa1100_proc_info: 290 - .long 0x4401a110 291 - .long 0xfffffff0 256 + .macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req 257 + .type __\name\()_proc_info,#object 258 + __\name\()_proc_info: 259 + .long \cpu_val 260 + .long \cpu_mask 292 261 .long PMD_TYPE_SECT | \ 293 262 PMD_SECT_BUFFERABLE | \ 294 263 PMD_SECT_CACHEABLE | \ ··· 270 301 .long cpu_arch_name 271 302 .long cpu_elf_name 272 303 .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT 273 - .long cpu_sa1100_name 304 + .long \cpu_name 274 305 .long sa1100_processor_functions 275 306 .long v4wb_tlb_fns 276 307 .long v4_mc_user_fns 277 308 .long v4wb_cache_fns 278 - .size __sa1100_proc_info, . - __sa1100_proc_info 309 + .size __\name\()_proc_info, . - __\name\()_proc_info 310 + .endm 279 311 280 - .type __sa1110_proc_info,#object 281 - __sa1110_proc_info: 282 - .long 0x6901b110 283 - .long 0xfffffff0 284 - .long PMD_TYPE_SECT | \ 285 - PMD_SECT_BUFFERABLE | \ 286 - PMD_SECT_CACHEABLE | \ 287 - PMD_SECT_AP_WRITE | \ 288 - PMD_SECT_AP_READ 289 - .long PMD_TYPE_SECT | \ 290 - PMD_SECT_AP_WRITE | \ 291 - PMD_SECT_AP_READ 292 - b __sa1100_setup 293 - .long cpu_arch_name 294 - .long cpu_elf_name 295 - .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT 296 - .long cpu_sa1110_name 297 - .long sa1100_processor_functions 298 - .long v4wb_tlb_fns 299 - .long v4_mc_user_fns 300 - .long v4wb_cache_fns 301 - .size __sa1110_proc_info, . - __sa1110_proc_info 312 + sa1100_proc_info sa1100, 0x4401a110, 0xfffffff0, cpu_sa1100_name 313 + sa1100_proc_info sa1110, 0x6901b110, 0xfffffff0, cpu_sa1110_name
+10 -29
arch/arm/mm/proc-v6.S
··· 56 56 */ 57 57 .align 5 58 58 ENTRY(cpu_v6_reset) 59 + mrc p15, 0, r1, c1, c0, 0 @ ctrl register 60 + bic r1, r1, #0x1 @ ...............m 61 + mcr p15, 0, r1, c1, c0, 0 @ disable MMU 62 + mov r1, #0 63 + mcr p15, 0, r1, c7, c5, 4 @ ISB 59 64 mov pc, r0 60 65 61 66 /* ··· 174 169 #define cpu_v6_do_resume 0 175 170 #endif 176 171 177 - 178 - .type cpu_v6_name, #object 179 - cpu_v6_name: 180 - .asciz "ARMv6-compatible processor" 181 - .size cpu_v6_name, . - cpu_v6_name 172 + string cpu_v6_name, "ARMv6-compatible processor" 182 173 183 174 .align 184 175 ··· 240 239 241 240 __INITDATA 242 241 243 - .type v6_processor_functions, #object 244 - ENTRY(v6_processor_functions) 245 - .word v6_early_abort 246 - .word v6_pabort 247 - .word cpu_v6_proc_init 248 - .word cpu_v6_proc_fin 249 - .word cpu_v6_reset 250 - .word cpu_v6_do_idle 251 - .word cpu_v6_dcache_clean_area 252 - .word cpu_v6_switch_mm 253 - .word cpu_v6_set_pte_ext 254 - .word cpu_v6_suspend_size 255 - .word cpu_v6_do_suspend 256 - .word cpu_v6_do_resume 257 - .size v6_processor_functions, . - v6_processor_functions 242 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 243 + define_processor_functions v6, dabort=v6_early_abort, pabort=v6_pabort, suspend=1 258 244 259 245 .section ".rodata" 260 246 261 - .type cpu_arch_name, #object 262 - cpu_arch_name: 263 - .asciz "armv6" 264 - .size cpu_arch_name, . - cpu_arch_name 265 - 266 - .type cpu_elf_name, #object 267 - cpu_elf_name: 268 - .asciz "v6" 269 - .size cpu_elf_name, . - cpu_elf_name 247 + string cpu_arch_name, "armv6" 248 + string cpu_elf_name, "v6" 270 249 .align 271 250 272 251 .section ".proc.info.init", #alloc, #execinstr
+65 -71
arch/arm/mm/proc-v7.S
··· 58 58 * to what would be the reset vector. 59 59 * 60 60 * - loc - location to jump to for soft reset 61 + * 62 + * This code must be executed using a flat identity mapping with 63 + * caches disabled. 61 64 */ 62 65 .align 5 63 66 ENTRY(cpu_v7_reset) 67 + mrc p15, 0, r1, c1, c0, 0 @ ctrl register 68 + bic r1, r1, #0x1 @ ...............m 69 + mcr p15, 0, r1, c1, c0, 0 @ disable MMU 70 + isb 64 71 mov pc, r0 65 72 ENDPROC(cpu_v7_reset) 66 73 ··· 180 173 mov pc, lr 181 174 ENDPROC(cpu_v7_set_pte_ext) 182 175 183 - cpu_v7_name: 184 - .ascii "ARMv7 Processor" 176 + string cpu_v7_name, "ARMv7 Processor" 185 177 .align 186 178 187 179 /* ··· 285 279 * It is assumed that: 286 280 * - cache type register is implemented 287 281 */ 282 + __v7_ca5mp_setup: 288 283 __v7_ca9mp_setup: 284 + mov r10, #(1 << 0) @ TLB ops broadcasting 285 + b 1f 286 + __v7_ca15mp_setup: 287 + mov r10, #0 288 + 1: 289 289 #ifdef CONFIG_SMP 290 290 ALT_SMP(mrc p15, 0, r0, c1, c0, 1) 291 291 ALT_UP(mov r0, #(1 << 6)) @ fake it for UP 292 292 tst r0, #(1 << 6) @ SMP/nAMP mode enabled? 293 - orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and 294 - mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting 293 + orreq r0, r0, #(1 << 6) @ Enable SMP/nAMP mode 294 + orreq r0, r0, r10 @ Enable CPU-specific SMP bits 295 + mcreq p15, 0, r0, c1, c0, 1 295 296 #endif 296 297 __v7_setup: 297 298 adr r12, __v7_setup_stack @ the local stack ··· 424 411 425 412 __INITDATA 426 413 427 - .type v7_processor_functions, #object 428 - ENTRY(v7_processor_functions) 429 - .word v7_early_abort 430 - .word v7_pabort 431 - .word cpu_v7_proc_init 432 - .word cpu_v7_proc_fin 433 - .word cpu_v7_reset 434 - .word cpu_v7_do_idle 435 - .word cpu_v7_dcache_clean_area 436 - .word cpu_v7_switch_mm 437 - .word cpu_v7_set_pte_ext 438 - .word cpu_v7_suspend_size 439 - .word cpu_v7_do_suspend 440 - .word cpu_v7_do_resume 441 - .size v7_processor_functions, . - v7_processor_functions 414 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 415 + define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 442 416 443 417 .section ".rodata" 444 418 445 - .type cpu_arch_name, #object 446 - cpu_arch_name: 447 - .asciz "armv7" 448 - .size cpu_arch_name, . - cpu_arch_name 449 - 450 - .type cpu_elf_name, #object 451 - cpu_elf_name: 452 - .asciz "v7" 453 - .size cpu_elf_name, . - cpu_elf_name 419 + string cpu_arch_name, "armv7" 420 + string cpu_elf_name, "v7" 454 421 .align 455 422 456 423 .section ".proc.info.init", #alloc, #execinstr 457 424 458 - .type __v7_ca9mp_proc_info, #object 459 - __v7_ca9mp_proc_info: 460 - .long 0x410fc090 @ Required ID value 461 - .long 0xff0ffff0 @ Mask for ID 462 - ALT_SMP(.long \ 463 - PMD_TYPE_SECT | \ 464 - PMD_SECT_AP_WRITE | \ 465 - PMD_SECT_AP_READ | \ 466 - PMD_FLAGS_SMP) 467 - ALT_UP(.long \ 468 - PMD_TYPE_SECT | \ 469 - PMD_SECT_AP_WRITE | \ 470 - PMD_SECT_AP_READ | \ 471 - PMD_FLAGS_UP) 472 - .long PMD_TYPE_SECT | \ 473 - PMD_SECT_XN | \ 474 - PMD_SECT_AP_WRITE | \ 475 - PMD_SECT_AP_READ 476 - W(b) __v7_ca9mp_setup 425 + /* 426 + * Standard v7 proc info content 427 + */ 428 + .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0 429 + ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ 430 + PMD_FLAGS_SMP | \mm_mmuflags) 431 + ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ 432 + PMD_FLAGS_UP | \mm_mmuflags) 433 + .long PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_AP_WRITE | \ 434 + PMD_SECT_AP_READ | \io_mmuflags 435 + W(b) \initfunc 477 436 .long cpu_arch_name 478 437 .long cpu_elf_name 479 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS 438 + .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT | \ 439 + HWCAP_EDSP | HWCAP_TLS | \hwcaps 480 440 .long cpu_v7_name 481 441 .long v7_processor_functions 482 442 .long v7wbi_tlb_fns 483 443 .long v6_user_fns 484 444 .long v7_cache_fns 445 + .endm 446 + 447 + /* 448 + * ARM Ltd. Cortex A5 processor. 449 + */ 450 + .type __v7_ca5mp_proc_info, #object 451 + __v7_ca5mp_proc_info: 452 + .long 0x410fc050 453 + .long 0xff0ffff0 454 + __v7_proc __v7_ca5mp_setup 455 + .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info 456 + 457 + /* 458 + * ARM Ltd. Cortex A9 processor. 459 + */ 460 + .type __v7_ca9mp_proc_info, #object 461 + __v7_ca9mp_proc_info: 462 + .long 0x410fc090 463 + .long 0xff0ffff0 464 + __v7_proc __v7_ca9mp_setup 485 465 .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info 466 + 467 + /* 468 + * ARM Ltd. Cortex A15 processor. 469 + */ 470 + .type __v7_ca15mp_proc_info, #object 471 + __v7_ca15mp_proc_info: 472 + .long 0x410fc0f0 473 + .long 0xff0ffff0 474 + __v7_proc __v7_ca15mp_setup, hwcaps = HWCAP_IDIV 475 + .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info 486 476 487 477 /* 488 478 * Match any ARMv7 processor core. ··· 494 478 __v7_proc_info: 495 479 .long 0x000f0000 @ Required ID value 496 480 .long 0x000f0000 @ Mask for ID 497 - ALT_SMP(.long \ 498 - PMD_TYPE_SECT | \ 499 - PMD_SECT_AP_WRITE | \ 500 - PMD_SECT_AP_READ | \ 501 - PMD_FLAGS_SMP) 502 - ALT_UP(.long \ 503 - PMD_TYPE_SECT | \ 504 - PMD_SECT_AP_WRITE | \ 505 - PMD_SECT_AP_READ | \ 506 - PMD_FLAGS_UP) 507 - .long PMD_TYPE_SECT | \ 508 - PMD_SECT_XN | \ 509 - PMD_SECT_AP_WRITE | \ 510 - PMD_SECT_AP_READ 511 - W(b) __v7_setup 512 - .long cpu_arch_name 513 - .long cpu_elf_name 514 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS 515 - .long cpu_v7_name 516 - .long v7_processor_functions 517 - .long v7wbi_tlb_fns 518 - .long v6_user_fns 519 - .long v7_cache_fns 481 + __v7_proc __v7_setup 520 482 .size __v7_proc_info, . - __v7_proc_info
+17 -73
arch/arm/mm/proc-xsc3.S
··· 335 335 mov pc, lr 336 336 ENDPROC(xsc3_dma_unmap_area) 337 337 338 - ENTRY(xsc3_cache_fns) 339 - .long xsc3_flush_icache_all 340 - .long xsc3_flush_kern_cache_all 341 - .long xsc3_flush_user_cache_all 342 - .long xsc3_flush_user_cache_range 343 - .long xsc3_coherent_kern_range 344 - .long xsc3_coherent_user_range 345 - .long xsc3_flush_kern_dcache_area 346 - .long xsc3_dma_map_area 347 - .long xsc3_dma_unmap_area 348 - .long xsc3_dma_flush_range 338 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 339 + define_cache_functions xsc3 349 340 350 341 ENTRY(cpu_xsc3_dcache_clean_area) 351 342 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line ··· 494 503 495 504 __INITDATA 496 505 497 - /* 498 - * Purpose : Function pointers used to access above functions - all calls 499 - * come through these 500 - */ 501 - 502 - .type xsc3_processor_functions, #object 503 - ENTRY(xsc3_processor_functions) 504 - .word v5t_early_abort 505 - .word legacy_pabort 506 - .word cpu_xsc3_proc_init 507 - .word cpu_xsc3_proc_fin 508 - .word cpu_xsc3_reset 509 - .word cpu_xsc3_do_idle 510 - .word cpu_xsc3_dcache_clean_area 511 - .word cpu_xsc3_switch_mm 512 - .word cpu_xsc3_set_pte_ext 513 - .word cpu_xsc3_suspend_size 514 - .word cpu_xsc3_do_suspend 515 - .word cpu_xsc3_do_resume 516 - .size xsc3_processor_functions, . - xsc3_processor_functions 506 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 507 + define_processor_functions xsc3, dabort=v5t_early_abort, pabort=legacy_pabort, suspend=1 517 508 518 509 .section ".rodata" 519 510 520 - .type cpu_arch_name, #object 521 - cpu_arch_name: 522 - .asciz "armv5te" 523 - .size cpu_arch_name, . - cpu_arch_name 524 - 525 - .type cpu_elf_name, #object 526 - cpu_elf_name: 527 - .asciz "v5" 528 - .size cpu_elf_name, . - cpu_elf_name 529 - 530 - .type cpu_xsc3_name, #object 531 - cpu_xsc3_name: 532 - .asciz "XScale-V3 based processor" 533 - .size cpu_xsc3_name, . - cpu_xsc3_name 511 + string cpu_arch_name, "armv5te" 512 + string cpu_elf_name, "v5" 513 + string cpu_xsc3_name, "XScale-V3 based processor" 534 514 535 515 .align 536 516 537 517 .section ".proc.info.init", #alloc, #execinstr 538 518 539 - .type __xsc3_proc_info,#object 540 - __xsc3_proc_info: 541 - .long 0x69056000 542 - .long 0xffffe000 519 + .macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req 520 + .type __\name\()_proc_info,#object 521 + __\name\()_proc_info: 522 + .long \cpu_val 523 + .long \cpu_mask 543 524 .long PMD_TYPE_SECT | \ 544 525 PMD_SECT_BUFFERABLE | \ 545 526 PMD_SECT_CACHEABLE | \ ··· 529 566 .long v4wbi_tlb_fns 530 567 .long xsc3_mc_user_fns 531 568 .long xsc3_cache_fns 532 - .size __xsc3_proc_info, . - __xsc3_proc_info 569 + .size __\name\()_proc_info, . - __\name\()_proc_info 570 + .endm 571 + 572 + xsc3_proc_info xsc3, 0x69056000, 0xffffe000 533 573 534 574 /* Note: PXA935 changed its implementor ID from Intel to Marvell */ 535 - 536 - .type __xsc3_pxa935_proc_info,#object 537 - __xsc3_pxa935_proc_info: 538 - .long 0x56056000 539 - .long 0xffffe000 540 - .long PMD_TYPE_SECT | \ 541 - PMD_SECT_BUFFERABLE | \ 542 - PMD_SECT_CACHEABLE | \ 543 - PMD_SECT_AP_WRITE | \ 544 - PMD_SECT_AP_READ 545 - .long PMD_TYPE_SECT | \ 546 - PMD_SECT_AP_WRITE | \ 547 - PMD_SECT_AP_READ 548 - b __xsc3_setup 549 - .long cpu_arch_name 550 - .long cpu_elf_name 551 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 552 - .long cpu_xsc3_name 553 - .long xsc3_processor_functions 554 - .long v4wbi_tlb_fns 555 - .long xsc3_mc_user_fns 556 - .long xsc3_cache_fns 557 - .size __xsc3_pxa935_proc_info, . - __xsc3_pxa935_proc_info 575 + xsc3_proc_info xsc3_pxa935, 0x56056000, 0xffffe000
+74 -429
arch/arm/mm/proc-xscale.S
··· 390 390 * - size - size of region 391 391 * - dir - DMA direction 392 392 */ 393 - ENTRY(xscale_dma_a0_map_area) 393 + ENTRY(xscale_80200_A0_A1_dma_map_area) 394 394 add r1, r1, r0 395 395 teq r2, #DMA_TO_DEVICE 396 396 beq xscale_dma_clean_range 397 397 b xscale_dma_flush_range 398 - ENDPROC(xscale_dma_a0_map_area) 398 + ENDPROC(xscale_80200_A0_A1_dma_map_area) 399 399 400 400 /* 401 401 * dma_unmap_area(start, size, dir) ··· 407 407 mov pc, lr 408 408 ENDPROC(xscale_dma_unmap_area) 409 409 410 - ENTRY(xscale_cache_fns) 411 - .long xscale_flush_icache_all 412 - .long xscale_flush_kern_cache_all 413 - .long xscale_flush_user_cache_all 414 - .long xscale_flush_user_cache_range 415 - .long xscale_coherent_kern_range 416 - .long xscale_coherent_user_range 417 - .long xscale_flush_kern_dcache_area 418 - .long xscale_dma_map_area 419 - .long xscale_dma_unmap_area 420 - .long xscale_dma_flush_range 410 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 411 + define_cache_functions xscale 421 412 422 413 /* 423 414 * On stepping A0/A1 of the 80200, invalidating D-cache by line doesn't ··· 423 432 * revision January 22, 2003, available at: 424 433 * http://www.intel.com/design/iio/specupdt/273415.htm 425 434 */ 426 - ENTRY(xscale_80200_A0_A1_cache_fns) 427 - .long xscale_flush_kern_cache_all 428 - .long xscale_flush_user_cache_all 429 - .long xscale_flush_user_cache_range 430 - .long xscale_coherent_kern_range 431 - .long xscale_coherent_user_range 432 - .long xscale_flush_kern_dcache_area 433 - .long xscale_dma_a0_map_area 434 - .long xscale_dma_unmap_area 435 - .long xscale_dma_flush_range 435 + .macro a0_alias basename 436 + .globl xscale_80200_A0_A1_\basename 437 + .type xscale_80200_A0_A1_\basename , %function 438 + .equ xscale_80200_A0_A1_\basename , xscale_\basename 439 + .endm 440 + 441 + /* 442 + * Most of the cache functions are unchanged for these processor revisions. 443 + * Export suitable alias symbols for the unchanged functions: 444 + */ 445 + a0_alias flush_icache_all 446 + a0_alias flush_user_cache_all 447 + a0_alias flush_kern_cache_all 448 + a0_alias flush_user_cache_range 449 + a0_alias coherent_kern_range 450 + a0_alias coherent_user_range 451 + a0_alias flush_kern_dcache_area 452 + a0_alias dma_flush_range 453 + a0_alias dma_unmap_area 454 + 455 + @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 456 + define_cache_functions xscale_80200_A0_A1 436 457 437 458 ENTRY(cpu_xscale_dcache_clean_area) 438 459 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry ··· 590 587 591 588 __INITDATA 592 589 593 - /* 594 - * Purpose : Function pointers used to access above functions - all calls 595 - * come through these 596 - */ 597 - 598 - .type xscale_processor_functions, #object 599 - ENTRY(xscale_processor_functions) 600 - .word v5t_early_abort 601 - .word legacy_pabort 602 - .word cpu_xscale_proc_init 603 - .word cpu_xscale_proc_fin 604 - .word cpu_xscale_reset 605 - .word cpu_xscale_do_idle 606 - .word cpu_xscale_dcache_clean_area 607 - .word cpu_xscale_switch_mm 608 - .word cpu_xscale_set_pte_ext 609 - .word cpu_xscale_suspend_size 610 - .word cpu_xscale_do_suspend 611 - .word cpu_xscale_do_resume 612 - .size xscale_processor_functions, . - xscale_processor_functions 590 + @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 591 + define_processor_functions xscale, dabort=v5t_early_abort, pabort=legacy_pabort, suspend=1 613 592 614 593 .section ".rodata" 615 594 616 - .type cpu_arch_name, #object 617 - cpu_arch_name: 618 - .asciz "armv5te" 619 - .size cpu_arch_name, . - cpu_arch_name 595 + string cpu_arch_name, "armv5te" 596 + string cpu_elf_name, "v5" 620 597 621 - .type cpu_elf_name, #object 622 - cpu_elf_name: 623 - .asciz "v5" 624 - .size cpu_elf_name, . - cpu_elf_name 625 - 626 - .type cpu_80200_A0_A1_name, #object 627 - cpu_80200_A0_A1_name: 628 - .asciz "XScale-80200 A0/A1" 629 - .size cpu_80200_A0_A1_name, . - cpu_80200_A0_A1_name 630 - 631 - .type cpu_80200_name, #object 632 - cpu_80200_name: 633 - .asciz "XScale-80200" 634 - .size cpu_80200_name, . - cpu_80200_name 635 - 636 - .type cpu_80219_name, #object 637 - cpu_80219_name: 638 - .asciz "XScale-80219" 639 - .size cpu_80219_name, . - cpu_80219_name 640 - 641 - .type cpu_8032x_name, #object 642 - cpu_8032x_name: 643 - .asciz "XScale-IOP8032x Family" 644 - .size cpu_8032x_name, . - cpu_8032x_name 645 - 646 - .type cpu_8033x_name, #object 647 - cpu_8033x_name: 648 - .asciz "XScale-IOP8033x Family" 649 - .size cpu_8033x_name, . - cpu_8033x_name 650 - 651 - .type cpu_pxa250_name, #object 652 - cpu_pxa250_name: 653 - .asciz "XScale-PXA250" 654 - .size cpu_pxa250_name, . - cpu_pxa250_name 655 - 656 - .type cpu_pxa210_name, #object 657 - cpu_pxa210_name: 658 - .asciz "XScale-PXA210" 659 - .size cpu_pxa210_name, . - cpu_pxa210_name 660 - 661 - .type cpu_ixp42x_name, #object 662 - cpu_ixp42x_name: 663 - .asciz "XScale-IXP42x Family" 664 - .size cpu_ixp42x_name, . - cpu_ixp42x_name 665 - 666 - .type cpu_ixp43x_name, #object 667 - cpu_ixp43x_name: 668 - .asciz "XScale-IXP43x Family" 669 - .size cpu_ixp43x_name, . - cpu_ixp43x_name 670 - 671 - .type cpu_ixp46x_name, #object 672 - cpu_ixp46x_name: 673 - .asciz "XScale-IXP46x Family" 674 - .size cpu_ixp46x_name, . - cpu_ixp46x_name 675 - 676 - .type cpu_ixp2400_name, #object 677 - cpu_ixp2400_name: 678 - .asciz "XScale-IXP2400" 679 - .size cpu_ixp2400_name, . - cpu_ixp2400_name 680 - 681 - .type cpu_ixp2800_name, #object 682 - cpu_ixp2800_name: 683 - .asciz "XScale-IXP2800" 684 - .size cpu_ixp2800_name, . - cpu_ixp2800_name 685 - 686 - .type cpu_pxa255_name, #object 687 - cpu_pxa255_name: 688 - .asciz "XScale-PXA255" 689 - .size cpu_pxa255_name, . - cpu_pxa255_name 690 - 691 - .type cpu_pxa270_name, #object 692 - cpu_pxa270_name: 693 - .asciz "XScale-PXA270" 694 - .size cpu_pxa270_name, . - cpu_pxa270_name 598 + string cpu_80200_A0_A1_name, "XScale-80200 A0/A1" 599 + string cpu_80200_name, "XScale-80200" 600 + string cpu_80219_name, "XScale-80219" 601 + string cpu_8032x_name, "XScale-IOP8032x Family" 602 + string cpu_8033x_name, "XScale-IOP8033x Family" 603 + string cpu_pxa250_name, "XScale-PXA250" 604 + string cpu_pxa210_name, "XScale-PXA210" 605 + string cpu_ixp42x_name, "XScale-IXP42x Family" 606 + string cpu_ixp43x_name, "XScale-IXP43x Family" 607 + string cpu_ixp46x_name, "XScale-IXP46x Family" 608 + string cpu_ixp2400_name, "XScale-IXP2400" 609 + string cpu_ixp2800_name, "XScale-IXP2800" 610 + string cpu_pxa255_name, "XScale-PXA255" 611 + string cpu_pxa270_name, "XScale-PXA270" 695 612 696 613 .align 697 614 698 615 .section ".proc.info.init", #alloc, #execinstr 699 616 700 - .type __80200_A0_A1_proc_info,#object 701 - __80200_A0_A1_proc_info: 702 - .long 0x69052000 703 - .long 0xfffffffe 704 - .long PMD_TYPE_SECT | \ 617 + .macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache 618 + .type __\name\()_proc_info,#object 619 + __\name\()_proc_info: 620 + .long \cpu_val 621 + .long \cpu_mask 622 + .long PMD_TYPE_SECT | \ 705 623 PMD_SECT_BUFFERABLE | \ 706 624 PMD_SECT_CACHEABLE | \ 707 625 PMD_SECT_AP_WRITE | \ 708 626 PMD_SECT_AP_READ 709 - .long PMD_TYPE_SECT | \ 627 + .long PMD_TYPE_SECT | \ 710 628 PMD_SECT_AP_WRITE | \ 711 629 PMD_SECT_AP_READ 712 630 b __xscale_setup 713 631 .long cpu_arch_name 714 632 .long cpu_elf_name 715 633 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 716 - .long cpu_80200_name 634 + .long \cpu_name 717 635 .long xscale_processor_functions 718 636 .long v4wbi_tlb_fns 719 637 .long xscale_mc_user_fns 720 - .long xscale_80200_A0_A1_cache_fns 721 - .size __80200_A0_A1_proc_info, . - __80200_A0_A1_proc_info 638 + .ifb \cache 639 + .long xscale_cache_fns 640 + .else 641 + .long \cache 642 + .endif 643 + .size __\name\()_proc_info, . - __\name\()_proc_info 644 + .endm 722 645 723 - .type __80200_proc_info,#object 724 - __80200_proc_info: 725 - .long 0x69052000 726 - .long 0xfffffff0 727 - .long PMD_TYPE_SECT | \ 728 - PMD_SECT_BUFFERABLE | \ 729 - PMD_SECT_CACHEABLE | \ 730 - PMD_SECT_AP_WRITE | \ 731 - PMD_SECT_AP_READ 732 - .long PMD_TYPE_SECT | \ 733 - PMD_SECT_AP_WRITE | \ 734 - PMD_SECT_AP_READ 735 - b __xscale_setup 736 - .long cpu_arch_name 737 - .long cpu_elf_name 738 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 739 - .long cpu_80200_name 740 - .long xscale_processor_functions 741 - .long v4wbi_tlb_fns 742 - .long xscale_mc_user_fns 743 - .long xscale_cache_fns 744 - .size __80200_proc_info, . - __80200_proc_info 745 - 746 - .type __80219_proc_info,#object 747 - __80219_proc_info: 748 - .long 0x69052e20 749 - .long 0xffffffe0 750 - .long PMD_TYPE_SECT | \ 751 - PMD_SECT_BUFFERABLE | \ 752 - PMD_SECT_CACHEABLE | \ 753 - PMD_SECT_AP_WRITE | \ 754 - PMD_SECT_AP_READ 755 - .long PMD_TYPE_SECT | \ 756 - PMD_SECT_AP_WRITE | \ 757 - PMD_SECT_AP_READ 758 - b __xscale_setup 759 - .long cpu_arch_name 760 - .long cpu_elf_name 761 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 762 - .long cpu_80219_name 763 - .long xscale_processor_functions 764 - .long v4wbi_tlb_fns 765 - .long xscale_mc_user_fns 766 - .long xscale_cache_fns 767 - .size __80219_proc_info, . - __80219_proc_info 768 - 769 - .type __8032x_proc_info,#object 770 - __8032x_proc_info: 771 - .long 0x69052420 772 - .long 0xfffff7e0 773 - .long PMD_TYPE_SECT | \ 774 - PMD_SECT_BUFFERABLE | \ 775 - PMD_SECT_CACHEABLE | \ 776 - PMD_SECT_AP_WRITE | \ 777 - PMD_SECT_AP_READ 778 - .long PMD_TYPE_SECT | \ 779 - PMD_SECT_AP_WRITE | \ 780 - PMD_SECT_AP_READ 781 - b __xscale_setup 782 - .long cpu_arch_name 783 - .long cpu_elf_name 784 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 785 - .long cpu_8032x_name 786 - .long xscale_processor_functions 787 - .long v4wbi_tlb_fns 788 - .long xscale_mc_user_fns 789 - .long xscale_cache_fns 790 - .size __8032x_proc_info, . - __8032x_proc_info 791 - 792 - .type __8033x_proc_info,#object 793 - __8033x_proc_info: 794 - .long 0x69054010 795 - .long 0xfffffd30 796 - .long PMD_TYPE_SECT | \ 797 - PMD_SECT_BUFFERABLE | \ 798 - PMD_SECT_CACHEABLE | \ 799 - PMD_SECT_AP_WRITE | \ 800 - PMD_SECT_AP_READ 801 - .long PMD_TYPE_SECT | \ 802 - PMD_SECT_AP_WRITE | \ 803 - PMD_SECT_AP_READ 804 - b __xscale_setup 805 - .long cpu_arch_name 806 - .long cpu_elf_name 807 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 808 - .long cpu_8033x_name 809 - .long xscale_processor_functions 810 - .long v4wbi_tlb_fns 811 - .long xscale_mc_user_fns 812 - .long xscale_cache_fns 813 - .size __8033x_proc_info, . - __8033x_proc_info 814 - 815 - .type __pxa250_proc_info,#object 816 - __pxa250_proc_info: 817 - .long 0x69052100 818 - .long 0xfffff7f0 819 - .long PMD_TYPE_SECT | \ 820 - PMD_SECT_BUFFERABLE | \ 821 - PMD_SECT_CACHEABLE | \ 822 - PMD_SECT_AP_WRITE | \ 823 - PMD_SECT_AP_READ 824 - .long PMD_TYPE_SECT | \ 825 - PMD_SECT_AP_WRITE | \ 826 - PMD_SECT_AP_READ 827 - b __xscale_setup 828 - .long cpu_arch_name 829 - .long cpu_elf_name 830 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 831 - .long cpu_pxa250_name 832 - .long xscale_processor_functions 833 - .long v4wbi_tlb_fns 834 - .long xscale_mc_user_fns 835 - .long xscale_cache_fns 836 - .size __pxa250_proc_info, . - __pxa250_proc_info 837 - 838 - .type __pxa210_proc_info,#object 839 - __pxa210_proc_info: 840 - .long 0x69052120 841 - .long 0xfffff3f0 842 - .long PMD_TYPE_SECT | \ 843 - PMD_SECT_BUFFERABLE | \ 844 - PMD_SECT_CACHEABLE | \ 845 - PMD_SECT_AP_WRITE | \ 846 - PMD_SECT_AP_READ 847 - .long PMD_TYPE_SECT | \ 848 - PMD_SECT_AP_WRITE | \ 849 - PMD_SECT_AP_READ 850 - b __xscale_setup 851 - .long cpu_arch_name 852 - .long cpu_elf_name 853 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 854 - .long cpu_pxa210_name 855 - .long xscale_processor_functions 856 - .long v4wbi_tlb_fns 857 - .long xscale_mc_user_fns 858 - .long xscale_cache_fns 859 - .size __pxa210_proc_info, . - __pxa210_proc_info 860 - 861 - .type __ixp2400_proc_info, #object 862 - __ixp2400_proc_info: 863 - .long 0x69054190 864 - .long 0xfffffff0 865 - .long PMD_TYPE_SECT | \ 866 - PMD_SECT_BUFFERABLE | \ 867 - PMD_SECT_CACHEABLE | \ 868 - PMD_SECT_AP_WRITE | \ 869 - PMD_SECT_AP_READ 870 - .long PMD_TYPE_SECT | \ 871 - PMD_SECT_AP_WRITE | \ 872 - PMD_SECT_AP_READ 873 - b __xscale_setup 874 - .long cpu_arch_name 875 - .long cpu_elf_name 876 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 877 - .long cpu_ixp2400_name 878 - .long xscale_processor_functions 879 - .long v4wbi_tlb_fns 880 - .long xscale_mc_user_fns 881 - .long xscale_cache_fns 882 - .size __ixp2400_proc_info, . - __ixp2400_proc_info 883 - 884 - .type __ixp2800_proc_info, #object 885 - __ixp2800_proc_info: 886 - .long 0x690541a0 887 - .long 0xfffffff0 888 - .long PMD_TYPE_SECT | \ 889 - PMD_SECT_BUFFERABLE | \ 890 - PMD_SECT_CACHEABLE | \ 891 - PMD_SECT_AP_WRITE | \ 892 - PMD_SECT_AP_READ 893 - .long PMD_TYPE_SECT | \ 894 - PMD_SECT_AP_WRITE | \ 895 - PMD_SECT_AP_READ 896 - b __xscale_setup 897 - .long cpu_arch_name 898 - .long cpu_elf_name 899 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 900 - .long cpu_ixp2800_name 901 - .long xscale_processor_functions 902 - .long v4wbi_tlb_fns 903 - .long xscale_mc_user_fns 904 - .long xscale_cache_fns 905 - .size __ixp2800_proc_info, . - __ixp2800_proc_info 906 - 907 - .type __ixp42x_proc_info, #object 908 - __ixp42x_proc_info: 909 - .long 0x690541c0 910 - .long 0xffffffc0 911 - .long PMD_TYPE_SECT | \ 912 - PMD_SECT_BUFFERABLE | \ 913 - PMD_SECT_CACHEABLE | \ 914 - PMD_SECT_AP_WRITE | \ 915 - PMD_SECT_AP_READ 916 - .long PMD_TYPE_SECT | \ 917 - PMD_SECT_AP_WRITE | \ 918 - PMD_SECT_AP_READ 919 - b __xscale_setup 920 - .long cpu_arch_name 921 - .long cpu_elf_name 922 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 923 - .long cpu_ixp42x_name 924 - .long xscale_processor_functions 925 - .long v4wbi_tlb_fns 926 - .long xscale_mc_user_fns 927 - .long xscale_cache_fns 928 - .size __ixp42x_proc_info, . - __ixp42x_proc_info 929 - 930 - .type __ixp43x_proc_info, #object 931 - __ixp43x_proc_info: 932 - .long 0x69054040 933 - .long 0xfffffff0 934 - .long PMD_TYPE_SECT | \ 935 - PMD_SECT_BUFFERABLE | \ 936 - PMD_SECT_CACHEABLE | \ 937 - PMD_SECT_AP_WRITE | \ 938 - PMD_SECT_AP_READ 939 - .long PMD_TYPE_SECT | \ 940 - PMD_SECT_AP_WRITE | \ 941 - PMD_SECT_AP_READ 942 - b __xscale_setup 943 - .long cpu_arch_name 944 - .long cpu_elf_name 945 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 946 - .long cpu_ixp43x_name 947 - .long xscale_processor_functions 948 - .long v4wbi_tlb_fns 949 - .long xscale_mc_user_fns 950 - .long xscale_cache_fns 951 - .size __ixp43x_proc_info, . - __ixp43x_proc_info 952 - 953 - .type __ixp46x_proc_info, #object 954 - __ixp46x_proc_info: 955 - .long 0x69054200 956 - .long 0xffffff00 957 - .long PMD_TYPE_SECT | \ 958 - PMD_SECT_BUFFERABLE | \ 959 - PMD_SECT_CACHEABLE | \ 960 - PMD_SECT_AP_WRITE | \ 961 - PMD_SECT_AP_READ 962 - .long PMD_TYPE_SECT | \ 963 - PMD_SECT_AP_WRITE | \ 964 - PMD_SECT_AP_READ 965 - b __xscale_setup 966 - .long cpu_arch_name 967 - .long cpu_elf_name 968 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 969 - .long cpu_ixp46x_name 970 - .long xscale_processor_functions 971 - .long v4wbi_tlb_fns 972 - .long xscale_mc_user_fns 973 - .long xscale_cache_fns 974 - .size __ixp46x_proc_info, . - __ixp46x_proc_info 975 - 976 - .type __pxa255_proc_info,#object 977 - __pxa255_proc_info: 978 - .long 0x69052d00 979 - .long 0xfffffff0 980 - .long PMD_TYPE_SECT | \ 981 - PMD_SECT_BUFFERABLE | \ 982 - PMD_SECT_CACHEABLE | \ 983 - PMD_SECT_AP_WRITE | \ 984 - PMD_SECT_AP_READ 985 - .long PMD_TYPE_SECT | \ 986 - PMD_SECT_AP_WRITE | \ 987 - PMD_SECT_AP_READ 988 - b __xscale_setup 989 - .long cpu_arch_name 990 - .long cpu_elf_name 991 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 992 - .long cpu_pxa255_name 993 - .long xscale_processor_functions 994 - .long v4wbi_tlb_fns 995 - .long xscale_mc_user_fns 996 - .long xscale_cache_fns 997 - .size __pxa255_proc_info, . - __pxa255_proc_info 998 - 999 - .type __pxa270_proc_info,#object 1000 - __pxa270_proc_info: 1001 - .long 0x69054110 1002 - .long 0xfffffff0 1003 - .long PMD_TYPE_SECT | \ 1004 - PMD_SECT_BUFFERABLE | \ 1005 - PMD_SECT_CACHEABLE | \ 1006 - PMD_SECT_AP_WRITE | \ 1007 - PMD_SECT_AP_READ 1008 - .long PMD_TYPE_SECT | \ 1009 - PMD_SECT_AP_WRITE | \ 1010 - PMD_SECT_AP_READ 1011 - b __xscale_setup 1012 - .long cpu_arch_name 1013 - .long cpu_elf_name 1014 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP 1015 - .long cpu_pxa270_name 1016 - .long xscale_processor_functions 1017 - .long v4wbi_tlb_fns 1018 - .long xscale_mc_user_fns 1019 - .long xscale_cache_fns 1020 - .size __pxa270_proc_info, . - __pxa270_proc_info 1021 - 646 + xscale_proc_info 80200_A0_A1, 0x69052000, 0xfffffffe, cpu_80200_name, \ 647 + cache=xscale_80200_A0_A1_cache_fns 648 + xscale_proc_info 80200, 0x69052000, 0xfffffff0, cpu_80200_name 649 + xscale_proc_info 80219, 0x69052e20, 0xffffffe0, cpu_80219_name 650 + xscale_proc_info 8032x, 0x69052420, 0xfffff7e0, cpu_8032x_name 651 + xscale_proc_info 8033x, 0x69054010, 0xfffffd30, cpu_8033x_name 652 + xscale_proc_info pxa250, 0x69052100, 0xfffff7f0, cpu_pxa250_name 653 + xscale_proc_info pxa210, 0x69052120, 0xfffff3f0, cpu_pxa210_name 654 + xscale_proc_info ixp2400, 0x69054190, 0xfffffff0, cpu_ixp2400_name 655 + xscale_proc_info ixp2800, 0x690541a0, 0xfffffff0, cpu_ixp2800_name 656 + xscale_proc_info ixp42x, 0x690541c0, 0xffffffc0, cpu_ixp42x_name 657 + xscale_proc_info ixp43x, 0x69054040, 0xfffffff0, cpu_ixp43x_name 658 + xscale_proc_info ixp46x, 0x69054200, 0xffffff00, cpu_ixp46x_name 659 + xscale_proc_info pxa255, 0x69052d00, 0xfffffff0, cpu_pxa255_name 660 + xscale_proc_info pxa270, 0x69054110, 0xfffffff0, cpu_pxa270_name
+2 -6
arch/arm/mm/tlb-fa.S
··· 67 67 68 68 __INITDATA 69 69 70 - .type fa_tlb_fns, #object 71 - ENTRY(fa_tlb_fns) 72 - .long fa_flush_user_tlb_range 73 - .long fa_flush_kern_tlb_range 74 - .long fa_tlb_flags 75 - .size fa_tlb_fns, . - fa_tlb_fns 70 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 71 + define_tlb_functions fa, fa_tlb_flags
+2 -6
arch/arm/mm/tlb-v3.S
··· 44 44 45 45 __INITDATA 46 46 47 - .type v3_tlb_fns, #object 48 - ENTRY(v3_tlb_fns) 49 - .long v3_flush_user_tlb_range 50 - .long v3_flush_kern_tlb_range 51 - .long v3_tlb_flags 52 - .size v3_tlb_fns, . - v3_tlb_fns 47 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 48 + define_tlb_functions v3, v3_tlb_flags
+2 -6
arch/arm/mm/tlb-v4.S
··· 57 57 58 58 __INITDATA 59 59 60 - .type v4_tlb_fns, #object 61 - ENTRY(v4_tlb_fns) 62 - .long v4_flush_user_tlb_range 63 - .long v4_flush_kern_tlb_range 64 - .long v4_tlb_flags 65 - .size v4_tlb_fns, . - v4_tlb_fns 60 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 61 + define_tlb_functions v4, v4_tlb_flags
+2 -6
arch/arm/mm/tlb-v4wb.S
··· 69 69 70 70 __INITDATA 71 71 72 - .type v4wb_tlb_fns, #object 73 - ENTRY(v4wb_tlb_fns) 74 - .long v4wb_flush_user_tlb_range 75 - .long v4wb_flush_kern_tlb_range 76 - .long v4wb_tlb_flags 77 - .size v4wb_tlb_fns, . - v4wb_tlb_fns 72 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 73 + define_tlb_functions v4wb, v4wb_tlb_flags
+2 -6
arch/arm/mm/tlb-v4wbi.S
··· 60 60 61 61 __INITDATA 62 62 63 - .type v4wbi_tlb_fns, #object 64 - ENTRY(v4wbi_tlb_fns) 65 - .long v4wbi_flush_user_tlb_range 66 - .long v4wbi_flush_kern_tlb_range 67 - .long v4wbi_tlb_flags 68 - .size v4wbi_tlb_fns, . - v4wbi_tlb_fns 63 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 64 + define_tlb_functions v4wbi, v4wbi_tlb_flags
+2 -6
arch/arm/mm/tlb-v6.S
··· 90 90 91 91 __INIT 92 92 93 - .type v6wbi_tlb_fns, #object 94 - ENTRY(v6wbi_tlb_fns) 95 - .long v6wbi_flush_user_tlb_range 96 - .long v6wbi_flush_kern_tlb_range 97 - .long v6wbi_tlb_flags 98 - .size v6wbi_tlb_fns, . - v6wbi_tlb_fns 93 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 94 + define_tlb_functions v6wbi, v6wbi_tlb_flags
+2 -7
arch/arm/mm/tlb-v7.S
··· 85 85 86 86 __INIT 87 87 88 - .type v7wbi_tlb_fns, #object 89 - ENTRY(v7wbi_tlb_fns) 90 - .long v7wbi_flush_user_tlb_range 91 - .long v7wbi_flush_kern_tlb_range 92 - ALT_SMP(.long v7wbi_tlb_flags_smp) 93 - ALT_UP(.long v7wbi_tlb_flags_up) 94 - .size v7wbi_tlb_fns, . - v7wbi_tlb_fns 88 + /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 89 + define_tlb_functions v7wbi, v7wbi_tlb_flags_up, flags_smp=v7wbi_tlb_flags_smp
+4 -2
arch/arm/vfp/vfpmodule.c
··· 582 582 elf_hwcap |= HWCAP_VFPv3D16; 583 583 } 584 584 #endif 585 - #ifdef CONFIG_NEON 586 585 /* 587 586 * Check for the presence of the Advanced SIMD 588 587 * load/store instructions, integer and single ··· 589 590 * for NEON if the hardware has the MVFR registers. 590 591 */ 591 592 if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { 593 + #ifdef CONFIG_NEON 592 594 if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) 593 595 elf_hwcap |= HWCAP_NEON; 594 - } 595 596 #endif 597 + if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) 598 + elf_hwcap |= HWCAP_VFPv4; 599 + } 596 600 } 597 601 return 0; 598 602 }