diff options
Diffstat (limited to 'arch/arm/boot')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index f9da41921c5..940b2017810 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -597,6 +597,8 @@ __common_mmu_cache_on: | |||
597 | sub pc, lr, r0, lsr #32 @ properly flush pipeline | 597 | sub pc, lr, r0, lsr #32 @ properly flush pipeline |
598 | #endif | 598 | #endif |
599 | 599 | ||
600 | #define PROC_ENTRY_SIZE (4*5) | ||
601 | |||
600 | /* | 602 | /* |
601 | * Here follow the relocatable cache support functions for the | 603 | * Here follow the relocatable cache support functions for the |
602 | * various processors. This is a generic hook for locating an | 604 | * various processors. This is a generic hook for locating an |
@@ -624,7 +626,7 @@ call_cache_fn: adr r12, proc_types | |||
624 | ARM( addeq pc, r12, r3 ) @ call cache function | 626 | ARM( addeq pc, r12, r3 ) @ call cache function |
625 | THUMB( addeq r12, r3 ) | 627 | THUMB( addeq r12, r3 ) |
626 | THUMB( moveq pc, r12 ) @ call cache function | 628 | THUMB( moveq pc, r12 ) @ call cache function |
627 | add r12, r12, #4*5 | 629 | add r12, r12, #PROC_ENTRY_SIZE |
628 | b 1b | 630 | b 1b |
629 | 631 | ||
630 | /* | 632 | /* |
@@ -691,9 +693,9 @@ proc_types: | |||
691 | 693 | ||
692 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) | 694 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) |
693 | .word 0xff0ffff0 | 695 | .word 0xff0ffff0 |
694 | b __arm926ejs_mmu_cache_on | 696 | W(b) __arm926ejs_mmu_cache_on |
695 | b __armv4_mmu_cache_off | 697 | W(b) __armv4_mmu_cache_off |
696 | b __armv5tej_mmu_cache_flush | 698 | W(b) __armv5tej_mmu_cache_flush |
697 | 699 | ||
698 | .word 0x00007000 @ ARM7 IDs | 700 | .word 0x00007000 @ ARM7 IDs |
699 | .word 0x0000f000 | 701 | .word 0x0000f000 |
@@ -794,6 +796,16 @@ proc_types: | |||
794 | 796 | ||
795 | .size proc_types, . - proc_types | 797 | .size proc_types, . - proc_types |
796 | 798 | ||
799 | /* | ||
800 | * If you get a "non-constant expression in ".if" statement" | ||
801 | * error from the assembler on this line, check that you have | ||
802 | * not accidentally written a "b" instruction where you should | ||
803 | * have written W(b). | ||
804 | */ | ||
805 | .if (. - proc_types) % PROC_ENTRY_SIZE != 0 | ||
806 | .error "The size of one or more proc_types entries is wrong." | ||
807 | .endif | ||
808 | |||
797 | /* | 809 | /* |
798 | * Turn off the Cache and MMU. ARMv3 does not support | 810 | * Turn off the Cache and MMU. ARMv3 does not support |
799 | * reading the control register, but ARMv4 does. | 811 | * reading the control register, but ARMv4 does. |