Skip to content

Commit 4099b5a

Browse files
author
Ard Biesheuvel
committed
arm64: use 'segment' rather than 'chunk' to describe mapped kernel regions
Replace the poorly defined term chunk with segment, which is a term that is already used by the ELF spec to describe contiguous mappings with the same permission attributes of statically allocated ranges of an executable. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 2c09ec06bc39fc85a2b3856524348c301def27af) Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
1 parent 953adfd commit 4099b5a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

arch/arm64/mm/mmu.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ void fixup_init(void)
469469
unmap_kernel_range((u64)__init_begin, (u64)(__init_end - __init_begin));
470470
}
471471

472-
static void __init map_kernel_chunk(pgd_t *pgd, void *va_start, void *va_end,
473-
pgprot_t prot, struct vm_struct *vma)
472+
static void __init map_kernel_segment(pgd_t *pgd, void *va_start, void *va_end,
473+
pgprot_t prot, struct vm_struct *vma)
474474
{
475475
phys_addr_t pa_start = __pa(va_start);
476476
unsigned long size = va_end - va_start;
@@ -497,11 +497,11 @@ static void __init map_kernel(pgd_t *pgd)
497497
{
498498
static struct vm_struct vmlinux_text, vmlinux_rodata, vmlinux_init, vmlinux_data;
499499

500-
map_kernel_chunk(pgd, _stext, __start_rodata, PAGE_KERNEL_EXEC, &vmlinux_text);
501-
map_kernel_chunk(pgd, __start_rodata, _etext, PAGE_KERNEL, &vmlinux_rodata);
502-
map_kernel_chunk(pgd, __init_begin, __init_end, PAGE_KERNEL_EXEC,
503-
&vmlinux_init);
504-
map_kernel_chunk(pgd, _data, _end, PAGE_KERNEL, &vmlinux_data);
500+
map_kernel_segment(pgd, _stext, __start_rodata, PAGE_KERNEL_EXEC, &vmlinux_text);
501+
map_kernel_segment(pgd, __start_rodata, _etext, PAGE_KERNEL, &vmlinux_rodata);
502+
map_kernel_segment(pgd, __init_begin, __init_end, PAGE_KERNEL_EXEC,
503+
&vmlinux_init);
504+
map_kernel_segment(pgd, _data, _end, PAGE_KERNEL, &vmlinux_data);
505505

506506
if (!pgd_val(*pgd_offset_raw(pgd, FIXADDR_START))) {
507507
/*

0 commit comments

Comments
 (0)