Skip to content

arm64: clean up early boot function calls

Mark Rutland linux-arm-kernel 1 version New

Get series with b4
b4 am 20160830144803.GM1223@leverpostej

Versions newest first

  1. v2 Latest9 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/9arm64: kernel: fix style issues in sleep.S+0 -00 replies
3/9arm64: kernel: use ordinary return/argument register for el2_setup()+0 -00 replies
4/9arm64: head.S: move KASLR processing out of __enable_mmu()+0 -01 reply
4/9arm64: head.S: move KASLR processing out of __enable_mmu()+0 -01 reply
4/9arm64: head.S: move KASLR processing out of __enable_mmu()+0 -00 replies
4/9arm64: head.S: move KASLR processing out of __enable_mmu()+0 -00 replies
6/9arm64: call __enable_mmu as an ordinary function for secondary/resume+0 -00 replies
7/9arm64: kernel: drop use of x24 from primary boot path+0 -00 replies
8/9arm64: head.S: use ordinary stack frame for __primary_switched()+0 -00 replies
9/9arm64: head.S: document the use of callee saved registers+0 -00 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchMark Rutland
SeriesT-b
2/9R-b
3/9R-b
4/9R-b
4/9R-b
4/9R-b
4/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] arm64: clean up early boot function calls

Hi,

Quoted 12 lines · Ard Biesheuvel

This v2 series is a followup to the single patch #1, whose v1 I sent out about a week ago.

In a couple of places, the early boot code uses non-standard argument, return value or return address registers when calling functions. This makes the code more complicated than it needs to be, which was not a problem in the early days, but with all the recent changes for KASLR, hibernate etc, it makes sense to clean this up once and for all. This code removes all uses of callee saved registers on the secondary boot and resume paths, and on th primary boot path, it only leaves the necessary ones, and documents them explicitly in patch #9.

Quoted 3 lines

I will leave it to the honourable arm64 maintainers to decide if any of these improvements weigh up against the churn, given that this code has already been updated numerous times over the past couple of kernel versions.

Which ones are honourable? ;)

FWIW, I think that overall this is a nice improvement in legibility for the boot code.

Quoted 3 lines

Adding James to cc since patch #6 may conflict with this hibernate/ debug-pagealloc series [0], to which I replied that merging .idmap.text with .mmuoff.text would be a worthwhile simplification.

I'll leave it to you, James, and the honourable maintainers to figure out the details on that front.

I've given this a spin on Juno (R1) with KASAN and CONFIG_RANDOMIZE_BASE selected (though I have no entropy source, so I'm bailing out early). That all works, so for the series:

For patch 1, feel free to upgrade the Acked-by to a Reviewed-by to match the rest of the series.

Thanks,
Mark.