Commit 92a8ee40 authored by Kamal Mostafa's avatar Kamal Mostafa

[4.2-stable only] Revert "arm64: mm: use correct mapping granularity under DEBUG_RODATA"

This reverts commit 22140f9f.

Not suitable for 4.2-stable (no SWAPPER_BLOCK_SIZE definition).
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent fd8985d3
...@@ -308,8 +308,8 @@ static void __init __map_memblock(phys_addr_t start, phys_addr_t end) ...@@ -308,8 +308,8 @@ static void __init __map_memblock(phys_addr_t start, phys_addr_t end)
* for now. This will get more fine grained later once all memory * for now. This will get more fine grained later once all memory
* is mapped * is mapped
*/ */
unsigned long kernel_x_start = round_down(__pa(_stext), SWAPPER_BLOCK_SIZE); unsigned long kernel_x_start = round_down(__pa(_stext), SECTION_SIZE);
unsigned long kernel_x_end = round_up(__pa(__init_end), SWAPPER_BLOCK_SIZE); unsigned long kernel_x_end = round_up(__pa(__init_end), SECTION_SIZE);
if (end < kernel_x_start) { if (end < kernel_x_start) {
create_mapping(start, __phys_to_virt(start), create_mapping(start, __phys_to_virt(start),
...@@ -397,18 +397,18 @@ void __init fixup_executable(void) ...@@ -397,18 +397,18 @@ void __init fixup_executable(void)
{ {
#ifdef CONFIG_DEBUG_RODATA #ifdef CONFIG_DEBUG_RODATA
/* now that we are actually fully mapped, make the start/end more fine grained */ /* now that we are actually fully mapped, make the start/end more fine grained */
if (!IS_ALIGNED((unsigned long)_stext, SWAPPER_BLOCK_SIZE)) { if (!IS_ALIGNED((unsigned long)_stext, SECTION_SIZE)) {
unsigned long aligned_start = round_down(__pa(_stext), unsigned long aligned_start = round_down(__pa(_stext),
SWAPPER_BLOCK_SIZE); SECTION_SIZE);
create_mapping(aligned_start, __phys_to_virt(aligned_start), create_mapping(aligned_start, __phys_to_virt(aligned_start),
__pa(_stext) - aligned_start, __pa(_stext) - aligned_start,
PAGE_KERNEL); PAGE_KERNEL);
} }
if (!IS_ALIGNED((unsigned long)__init_end, SWAPPER_BLOCK_SIZE)) { if (!IS_ALIGNED((unsigned long)__init_end, SECTION_SIZE)) {
unsigned long aligned_end = round_up(__pa(__init_end), unsigned long aligned_end = round_up(__pa(__init_end),
SWAPPER_BLOCK_SIZE); SECTION_SIZE);
create_mapping(__pa(__init_end), (unsigned long)__init_end, create_mapping(__pa(__init_end), (unsigned long)__init_end,
aligned_end - __pa(__init_end), aligned_end - __pa(__init_end),
PAGE_KERNEL); PAGE_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment