arm64: Move some head.text functions to executable section
The code in the head.text section of the kernel exists in the
same section as the swapper_pg_dir which means it needs the
same page table permissions. The swapper_pg_dir needs to be
writeable but shouldn't be executable. The head.text section
is intended to be run at early bootup before any of the regular
kernel mappings have been setup so there is no issue at bootup.
The suspend/resume/hotplug code path requires some of these
head.S functions to run however which means they need to be
executable. We can't easily move all of the head.text to
an executable section, so split it into two parts: that which
is used only at early head.S bootup and that which is used
after bootup. There is a small bit of code duplication because
the early head.S functions cannot access the later head.S
functions but the functions that require this are only a few
instructions.
Change-Id: I0a8598b8e57ad736476733d9252f1280e9cb2271
Signed-off-by:
Laura Abbott <lauraa@codeaurora.org>
Loading
Please register or sign in to comment