Loading arch/arm/Kconfig.debug +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ config DEBUG_USER 8 - SIGSEGV faults 16 - SIGBUS faults config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y depends on FORCE_PAGES config FORCE_PAGES bool "Force lowmem to be mapped with 4K pages" help Loading arch/arm/mm/pageattr.c +17 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * Copyright (c) 2014,2017-2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -98,3 +98,19 @@ int set_memory_x(unsigned long addr, int numpages) __pgprot(0), __pgprot(L_PTE_XN)); } #ifdef CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC void __kernel_map_pages(struct page *page, int numpages, int enable) { unsigned long addr; if (PageHighMem(page)) return; addr = (unsigned long) page_address(page); if (enable) set_memory_rw(addr, numpages); else set_memory_ro(addr, numpages); } #endif Loading
arch/arm/Kconfig.debug +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ config DEBUG_USER 8 - SIGSEGV faults 16 - SIGBUS faults config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y depends on FORCE_PAGES config FORCE_PAGES bool "Force lowmem to be mapped with 4K pages" help Loading
arch/arm/mm/pageattr.c +17 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * Copyright (c) 2014,2017-2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -98,3 +98,19 @@ int set_memory_x(unsigned long addr, int numpages) __pgprot(0), __pgprot(L_PTE_XN)); } #ifdef CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC void __kernel_map_pages(struct page *page, int numpages, int enable) { unsigned long addr; if (PageHighMem(page)) return; addr = (unsigned long) page_address(page); if (enable) set_memory_rw(addr, numpages); else set_memory_ro(addr, numpages); } #endif