]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cover the .head.text section in the .text segment mapping
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 30 Mar 2016 15:43:08 +0000 (17:43 +0200)
committerWill Deacon <will.deacon@arm.com>
Thu, 14 Apr 2016 17:11:43 +0000 (18:11 +0100)
commit55872ebe2cfb5793ebb79228a38b018d05ecff48
treeca5d8423312aaa8454972bee2e38a11a33b9ece0
parent08732e8ce22803fc553aa2ef783c6fbb5d3eb6cd
arm64: cover the .head.text section in the .text segment mapping

Keeping .head.text out of the .text mapping buys us very little: its actual
payload is only 4 KB, most of which is padding, but the page alignment may
add up to 2 MB (in case of CONFIG_DEBUG_ALIGN_RODATA=y) of additional
padding to the uncompressed kernel Image.

Also, on 4 KB granule kernels, the 4 KB misalignment of .text forces us to
map the adjacent 56 KB of code without the PTE_CONT attribute, and since
this region contains things like the vector table and the GIC interrupt
handling entry point, this region is likely to benefit from the reduced TLB
pressure that results from PTE_CONT mappings.

So remove the alignment between the .head.text and .text sections, and use
the [_text, _etext) rather than the [_stext, _etext) interval for mapping
the .text segment.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/mmu.c