ARM: decompressor: a minor optimization
PATCH 1/1 ARM: decompressor: a minor optimization
"ldr sp, [r0, #28]" can be squashed into the previous ldm instruction.
--- arch/arm/boot/compressed/head.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/compressed/head.S +1 -2
@@ -194,8 +194,7 @@ not_angel: blcs cache_on restart: adr r0, LC0 - ldmia r0, {r1, r2, r3, r6, r10, r11, r12} - ldr sp, [r0, #28] + ldmia r0, {r1, r2, r3, r6, r10, r11, r12, sp} /* * We might be running at a different address. We need
Signature · 1 line
1.9.1
PATCH 1/1 ARM: decompressor: a minor optimization
Quoted 1 line · Masahiro Yamada
"ldr sp, [r0, #28]" can be squashed into the previous ldm instruction.
See commit 77754410fb8ecd7cf307bcd75d60f3b22b8c3cd2
ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR"
Loading sp with LDMIA is not allowed in Thumb. For simpler code maintenance, the code was just made Thumb-compatible anyway by splitting out the sp load while fixing another issue. This isn't part of a core loop, so shouldn't have a significant impact on performance.
git blame can be useful for finding out how an odd-looking piece of code came into existence. Sometimes you have to dig through a few patches to find the answer.
Cheers
---Dave
Quoted 28 lines
Signed-off-by Masahiro Yamada <[email protected]>--- arch/arm/boot/compressed/head.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm/boot/compressed/head.S +1
-2@@ -194,8 +194,7 @@ not_angel: blcs cache_on restart: adr r0, LC0 - ldmia r0, {r1, r2, r3, r6, r10, r11, r12} - ldr sp, [r0, #28] + ldmia r0, {r1, r2, r3, r6, r10, r11, r12, sp} /* * We might be running at a different address. We needSignature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: decompressor: a minor optimization
Hi Dave,
Quoted 8 lines
Loading sp with LDMIA is not allowed in Thumb. For simpler code maintenance, the code was just made Thumb-compatible anyway by splitting out the sp load while fixing another issue. This isn't part of a core loop, so shouldn't have a significant impact on performance.
git blame can be useful for finding out how an odd-looking piece of code came into existence. Sometimes you have to dig through a few patches to find the answer.
Thank you for explaning this!
Please disregard this patch. Sorry for noise.
Best Regards
Masahiro Yamada