Skip to content

Commit

Permalink
ARM: decompressor: move headroom variable out of LC0
Browse files Browse the repository at this point in the history
Before breaking up LC0 into different pieces, move out the variable
that is already place-relative (given that it subtracts 'restart' in
the expression) and so its value does not need to be added to the
runtime address of the LC0 symbol itself.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Nicolas Pitre <nico@fluxnic.net>
  • Loading branch information
Ard Biesheuvel committed May 19, 2020
1 parent a780e48 commit 691cbe5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ not_angel:
*/
mov r0, pc
cmp r0, r4
ldrcc r0, LC0+28
ldrcc r0, .Lheadroom
addcc r0, r0, pc
cmpcc r4, r0
orrcc r4, r4, #1 @ remember we skipped cache_on
Expand Down Expand Up @@ -664,9 +664,11 @@ LC0: .word LC0 @ r1
.word _got_start @ r11
.word _got_end @ ip
.word .L_user_stack_end @ sp
.word _end - restart + 16384 + 1024*1024
.size LC0, . - LC0

.Lheadroom:
.word _end - restart + 16384 + 1024*1024

.Linflated_image_size_offset:
.long (input_data_end - 4) - .

Expand Down

0 comments on commit 691cbe5

Please sign in to comment.