diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:24:11 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:24:11 -0500 |
commit | 91e013827c0bcbb187ecf02213c5446b6f62d445 (patch) | |
tree | 52ad3d0db856c50ab3a1a56da2bf3ae6ed8a8f48 /arch | |
parent | 988addf82e4c03739375279de73929580a2d4a6a (diff) | |
parent | 8d2b09f5b0de2c0e37f50d04980bc81098988239 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 50 | ||||
-rw-r--r-- | arch/arm/boot/compressed/vmlinux.lds.in | 3 | ||||
-rw-r--r-- | arch/arm/kernel/unwind.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/hardware.h | 8 |
4 files changed, 33 insertions, 32 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 99b75aa1c2ec..535a91daaa53 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -170,8 +170,8 @@ not_angel: | |||
170 | 170 | ||
171 | .text | 171 | .text |
172 | adr r0, LC0 | 172 | adr r0, LC0 |
173 | ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp} ) | 173 | ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) |
174 | THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, ip} ) | 174 | THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) |
175 | THUMB( ldr sp, [r0, #28] ) | 175 | THUMB( ldr sp, [r0, #28] ) |
176 | subs r0, r0, r1 @ calculate the delta offset | 176 | subs r0, r0, r1 @ calculate the delta offset |
177 | 177 | ||
@@ -182,12 +182,13 @@ not_angel: | |||
182 | /* | 182 | /* |
183 | * We're running at a different address. We need to fix | 183 | * We're running at a different address. We need to fix |
184 | * up various pointers: | 184 | * up various pointers: |
185 | * r5 - zImage base address | 185 | * r5 - zImage base address (_start) |
186 | * r6 - GOT start | 186 | * r6 - size of decompressed image |
187 | * r11 - GOT start | ||
187 | * ip - GOT end | 188 | * ip - GOT end |
188 | */ | 189 | */ |
189 | add r5, r5, r0 | 190 | add r5, r5, r0 |
190 | add r6, r6, r0 | 191 | add r11, r11, r0 |
191 | add ip, ip, r0 | 192 | add ip, ip, r0 |
192 | 193 | ||
193 | #ifndef CONFIG_ZBOOT_ROM | 194 | #ifndef CONFIG_ZBOOT_ROM |
@@ -205,10 +206,10 @@ not_angel: | |||
205 | /* | 206 | /* |
206 | * Relocate all entries in the GOT table. | 207 | * Relocate all entries in the GOT table. |
207 | */ | 208 | */ |
208 | 1: ldr r1, [r6, #0] @ relocate entries in the GOT | 209 | 1: ldr r1, [r11, #0] @ relocate entries in the GOT |
209 | add r1, r1, r0 @ table. This fixes up the | 210 | add r1, r1, r0 @ table. This fixes up the |
210 | str r1, [r6], #4 @ C references. | 211 | str r1, [r11], #4 @ C references. |
211 | cmp r6, ip | 212 | cmp r11, ip |
212 | blo 1b | 213 | blo 1b |
213 | #else | 214 | #else |
214 | 215 | ||
@@ -216,12 +217,12 @@ not_angel: | |||
216 | * Relocate entries in the GOT table. We only relocate | 217 | * Relocate entries in the GOT table. We only relocate |
217 | * the entries that are outside the (relocated) BSS region. | 218 | * the entries that are outside the (relocated) BSS region. |
218 | */ | 219 | */ |
219 | 1: ldr r1, [r6, #0] @ relocate entries in the GOT | 220 | 1: ldr r1, [r11, #0] @ relocate entries in the GOT |
220 | cmp r1, r2 @ entry < bss_start || | 221 | cmp r1, r2 @ entry < bss_start || |
221 | cmphs r3, r1 @ _end < entry | 222 | cmphs r3, r1 @ _end < entry |
222 | addlo r1, r1, r0 @ table. This fixes up the | 223 | addlo r1, r1, r0 @ table. This fixes up the |
223 | str r1, [r6], #4 @ C references. | 224 | str r1, [r11], #4 @ C references. |
224 | cmp r6, ip | 225 | cmp r11, ip |
225 | blo 1b | 226 | blo 1b |
226 | #endif | 227 | #endif |
227 | 228 | ||
@@ -247,6 +248,7 @@ not_relocated: mov r0, #0 | |||
247 | * Check to see if we will overwrite ourselves. | 248 | * Check to see if we will overwrite ourselves. |
248 | * r4 = final kernel address | 249 | * r4 = final kernel address |
249 | * r5 = start of this image | 250 | * r5 = start of this image |
251 | * r6 = size of decompressed image | ||
250 | * r2 = end of malloc space (and therefore this image) | 252 | * r2 = end of malloc space (and therefore this image) |
251 | * We basically want: | 253 | * We basically want: |
252 | * r4 >= r2 -> OK | 254 | * r4 >= r2 -> OK |
@@ -254,8 +256,7 @@ not_relocated: mov r0, #0 | |||
254 | */ | 256 | */ |
255 | cmp r4, r2 | 257 | cmp r4, r2 |
256 | bhs wont_overwrite | 258 | bhs wont_overwrite |
257 | sub r3, sp, r5 @ > compressed kernel size | 259 | add r0, r4, r6 |
258 | add r0, r4, r3, lsl #2 @ allow for 4x expansion | ||
259 | cmp r0, r5 | 260 | cmp r0, r5 |
260 | bls wont_overwrite | 261 | bls wont_overwrite |
261 | 262 | ||
@@ -271,7 +272,6 @@ not_relocated: mov r0, #0 | |||
271 | * r1-r3 = unused | 272 | * r1-r3 = unused |
272 | * r4 = kernel execution address | 273 | * r4 = kernel execution address |
273 | * r5 = decompressed kernel start | 274 | * r5 = decompressed kernel start |
274 | * r6 = processor ID | ||
275 | * r7 = architecture ID | 275 | * r7 = architecture ID |
276 | * r8 = atags pointer | 276 | * r8 = atags pointer |
277 | * r9-r12,r14 = corrupted | 277 | * r9-r12,r14 = corrupted |
@@ -312,7 +312,8 @@ LC0: .word LC0 @ r1 | |||
312 | .word _end @ r3 | 312 | .word _end @ r3 |
313 | .word zreladdr @ r4 | 313 | .word zreladdr @ r4 |
314 | .word _start @ r5 | 314 | .word _start @ r5 |
315 | .word _got_start @ r6 | 315 | .word _image_size @ r6 |
316 | .word _got_start @ r11 | ||
316 | .word _got_end @ ip | 317 | .word _got_end @ ip |
317 | .word user_stack+4096 @ sp | 318 | .word user_stack+4096 @ sp |
318 | LC1: .word reloc_end - reloc_start | 319 | LC1: .word reloc_end - reloc_start |
@@ -336,7 +337,6 @@ params: ldr r0, =params_phys | |||
336 | * | 337 | * |
337 | * On entry, | 338 | * On entry, |
338 | * r4 = kernel execution address | 339 | * r4 = kernel execution address |
339 | * r6 = processor ID | ||
340 | * r7 = architecture number | 340 | * r7 = architecture number |
341 | * r8 = atags pointer | 341 | * r8 = atags pointer |
342 | * r9 = run-time address of "start" (???) | 342 | * r9 = run-time address of "start" (???) |
@@ -542,7 +542,6 @@ __common_mmu_cache_on: | |||
542 | * r1-r3 = unused | 542 | * r1-r3 = unused |
543 | * r4 = kernel execution address | 543 | * r4 = kernel execution address |
544 | * r5 = decompressed kernel start | 544 | * r5 = decompressed kernel start |
545 | * r6 = processor ID | ||
546 | * r7 = architecture ID | 545 | * r7 = architecture ID |
547 | * r8 = atags pointer | 546 | * r8 = atags pointer |
548 | * r9-r12,r14 = corrupted | 547 | * r9-r12,r14 = corrupted |
@@ -581,19 +580,19 @@ call_kernel: bl cache_clean_flush | |||
581 | * r1 = corrupted | 580 | * r1 = corrupted |
582 | * r2 = corrupted | 581 | * r2 = corrupted |
583 | * r3 = block offset | 582 | * r3 = block offset |
584 | * r6 = corrupted | 583 | * r9 = corrupted |
585 | * r12 = corrupted | 584 | * r12 = corrupted |
586 | */ | 585 | */ |
587 | 586 | ||
588 | call_cache_fn: adr r12, proc_types | 587 | call_cache_fn: adr r12, proc_types |
589 | #ifdef CONFIG_CPU_CP15 | 588 | #ifdef CONFIG_CPU_CP15 |
590 | mrc p15, 0, r6, c0, c0 @ get processor ID | 589 | mrc p15, 0, r9, c0, c0 @ get processor ID |
591 | #else | 590 | #else |
592 | ldr r6, =CONFIG_PROCESSOR_ID | 591 | ldr r9, =CONFIG_PROCESSOR_ID |
593 | #endif | 592 | #endif |
594 | 1: ldr r1, [r12, #0] @ get value | 593 | 1: ldr r1, [r12, #0] @ get value |
595 | ldr r2, [r12, #4] @ get mask | 594 | ldr r2, [r12, #4] @ get mask |
596 | eor r1, r1, r6 @ (real ^ match) | 595 | eor r1, r1, r9 @ (real ^ match) |
597 | tst r1, r2 @ & mask | 596 | tst r1, r2 @ & mask |
598 | ARM( addeq pc, r12, r3 ) @ call cache function | 597 | ARM( addeq pc, r12, r3 ) @ call cache function |
599 | THUMB( addeq r12, r3 ) | 598 | THUMB( addeq r12, r3 ) |
@@ -778,8 +777,7 @@ proc_types: | |||
778 | * Turn off the Cache and MMU. ARMv3 does not support | 777 | * Turn off the Cache and MMU. ARMv3 does not support |
779 | * reading the control register, but ARMv4 does. | 778 | * reading the control register, but ARMv4 does. |
780 | * | 779 | * |
781 | * On entry, r6 = processor ID | 780 | * On exit, r0, r1, r2, r3, r9, r12 corrupted |
782 | * On exit, r0, r1, r2, r3, r12 corrupted | ||
783 | * This routine must preserve: r4, r6, r7 | 781 | * This routine must preserve: r4, r6, r7 |
784 | */ | 782 | */ |
785 | .align 5 | 783 | .align 5 |
@@ -852,10 +850,8 @@ __armv3_mmu_cache_off: | |||
852 | /* | 850 | /* |
853 | * Clean and flush the cache to maintain consistency. | 851 | * Clean and flush the cache to maintain consistency. |
854 | * | 852 | * |
855 | * On entry, | ||
856 | * r6 = processor ID | ||
857 | * On exit, | 853 | * On exit, |
858 | * r1, r2, r3, r11, r12 corrupted | 854 | * r1, r2, r3, r9, r11, r12 corrupted |
859 | * This routine must preserve: | 855 | * This routine must preserve: |
860 | * r0, r4, r5, r6, r7 | 856 | * r0, r4, r5, r6, r7 |
861 | */ | 857 | */ |
@@ -967,7 +963,7 @@ __armv4_mmu_cache_flush: | |||
967 | mov r2, #64*1024 @ default: 32K dcache size (*2) | 963 | mov r2, #64*1024 @ default: 32K dcache size (*2) |
968 | mov r11, #32 @ default: 32 byte line size | 964 | mov r11, #32 @ default: 32 byte line size |
969 | mrc p15, 0, r3, c0, c0, 1 @ read cache type | 965 | mrc p15, 0, r3, c0, c0, 1 @ read cache type |
970 | teq r3, r6 @ cache ID register present? | 966 | teq r3, r9 @ cache ID register present? |
971 | beq no_cache_id | 967 | beq no_cache_id |
972 | mov r1, r3, lsr #18 | 968 | mov r1, r3, lsr #18 |
973 | and r1, r1, #7 | 969 | and r1, r1, #7 |
diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.in index 7ca9ecff652f..d08168941bd6 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.in +++ b/arch/arm/boot/compressed/vmlinux.lds.in | |||
@@ -43,6 +43,9 @@ SECTIONS | |||
43 | 43 | ||
44 | _etext = .; | 44 | _etext = .; |
45 | 45 | ||
46 | /* Assume size of decompressed image is 4x the compressed image */ | ||
47 | _image_size = (_etext - _text) * 4; | ||
48 | |||
46 | _got_start = .; | 49 | _got_start = .; |
47 | .got : { *(.got) } | 50 | .got : { *(.got) } |
48 | _got_end = .; | 51 | _got_end = .; |
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 786ac2b6914a..50292cd9c120 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c | |||
@@ -359,7 +359,9 @@ void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk) | |||
359 | frame.fp = regs->ARM_fp; | 359 | frame.fp = regs->ARM_fp; |
360 | frame.sp = regs->ARM_sp; | 360 | frame.sp = regs->ARM_sp; |
361 | frame.lr = regs->ARM_lr; | 361 | frame.lr = regs->ARM_lr; |
362 | frame.pc = regs->ARM_pc; | 362 | /* PC might be corrupted, use LR in that case. */ |
363 | frame.pc = kernel_text_address(regs->ARM_pc) | ||
364 | ? regs->ARM_pc : regs->ARM_lr; | ||
363 | } else if (tsk == current) { | 365 | } else if (tsk == current) { |
364 | frame.fp = (unsigned long)__builtin_frame_address(0); | 366 | frame.fp = (unsigned long)__builtin_frame_address(0); |
365 | frame.sp = current_sp; | 367 | frame.sp = current_sp; |
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 6da650202dc7..04ea836969b3 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -68,12 +68,12 @@ | |||
68 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | 68 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) |
69 | #define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000) | 69 | #define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000) |
70 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | 70 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) |
71 | #define U8500_CLKRST6_BASE (U8500_PER7_BASE + 0xf000) | 71 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) |
72 | 72 | ||
73 | /* per5 base addressess */ | 73 | /* per5 base addressess */ |
74 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | 74 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) |
75 | #define U8500_GPIO5_BASE (U8500_PER5_BASE + 0x1e000) | 75 | #define U8500_GPIO5_BASE (U8500_PER5_BASE + 0x1e000) |
76 | #define U8500_CLKRST5_BASE (U8500_PER7_BASE + 0x1f000) | 76 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) |
77 | 77 | ||
78 | /* per4 base addressess */ | 78 | /* per4 base addressess */ |
79 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x0000) | 79 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x0000) |
@@ -95,7 +95,7 @@ | |||
95 | #define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000) | 95 | #define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000) |
96 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | 96 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) |
97 | #define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xe000) | 97 | #define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xe000) |
98 | #define U8500_CLKRST3_BASE (U8500_PER7_BASE + 0xf000) | 98 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) |
99 | 99 | ||
100 | /* per2 base addressess */ | 100 | /* per2 base addressess */ |
101 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | 101 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) |
@@ -123,7 +123,7 @@ | |||
123 | #define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000) | 123 | #define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000) |
124 | #define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xa000) | 124 | #define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xa000) |
125 | #define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xe000) | 125 | #define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xe000) |
126 | #define U8500_CLKRST1_BASE (U8500_PER2_BASE + 0xf000) | 126 | #define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000) |
127 | 127 | ||
128 | /* ST-Ericsson modified pl022 id */ | 128 | /* ST-Ericsson modified pl022 id */ |
129 | #define SSP_PER_ID 0x01080022 | 129 | #define SSP_PER_ID 0x01080022 |