mmu.c (93fbff1197474d7b65e598c6f48fa82a5c334539) mmu.c (2e8cff0a0eee87b27f0cf87ad8310eb41b5886ab)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Based on arch/arm/mm/mmu.c
4 *
5 * Copyright (C) 1995-2005 Russell King
6 * Copyright (C) 2012 ARM Ltd.
7 */
8

--- 628 unchanged lines hidden (view full) ---

637 vma->phys_addr = pa_start;
638 vma->size = size;
639 vma->flags = VM_MAP | vm_flags;
640 vma->caller = __builtin_return_address(0);
641
642 vm_area_add_early(vma);
643}
644
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Based on arch/arm/mm/mmu.c
4 *
5 * Copyright (C) 1995-2005 Russell King
6 * Copyright (C) 2012 ARM Ltd.
7 */
8

--- 628 unchanged lines hidden (view full) ---

637 vma->phys_addr = pa_start;
638 vma->size = size;
639 vma->flags = VM_MAP | vm_flags;
640 vma->caller = __builtin_return_address(0);
641
642 vm_area_add_early(vma);
643}
644
645static int __init parse_rodata(char *arg)
646{
647 int ret = strtobool(arg, &rodata_enabled);
648 if (!ret) {
649 rodata_full = false;
650 return 0;
651 }
652
653 /* permit 'full' in addition to boolean options */
654 if (strcmp(arg, "full"))
655 return -EINVAL;
656
657 rodata_enabled = true;
658 rodata_full = true;
659 return 0;
660}
661early_param("rodata", parse_rodata);
662
663#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
664static int __init map_entry_trampoline(void)
665{
666 int i;
667
668 pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
669 phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start);
670

--- 1057 unchanged lines hidden ---
645#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
646static int __init map_entry_trampoline(void)
647{
648 int i;
649
650 pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
651 phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start);
652

--- 1057 unchanged lines hidden ---