diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-15 14:49:02 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-21 12:58:53 +0200 |
commit | 80ef517b018257220f14410004ede094c577c276 (patch) | |
tree | e2abc8076e9898ec5bd30a3a30b41600f9bf9659 /arch/s390 | |
parent | e991e5bb11d6eacf8a49867ff9d4ec6e1cde3718 (diff) |
s390/startup: adjust _sdma and _edma to page boundaries
Move .dma.text section alignment out of section description, otherwise
zeros used to align the section are included in the section itself (and
section is not really aligned by itself).
$ objdump -h arch/s390/boot/compressed/vmlinux
5 .dma.text 00001e38 000000000001b1c8 000000000001b1c8 0001c1c8 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
6 .dma.ex_table 00000018 000000000001d000 000000000001d000 0001e000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .dma.data 00000240 000000000001d080 000000000001d080 0001e080 2**7
CONTENTS, ALLOC, LOAD, DATA
$ cat /sys/kernel/debug/memblock/reserved
0: 0x0000000000000000..0x0000000000011fff
1: 0x000000000001b1c8..0x000000000001d2bf
...
Also add alignment before _edma linker symbol definition, so that entire
.dma* region is rounded up to page boundaries.
$ objdump -h arch/s390/boot/compressed/vmlinux
5 .dma.text 00001000 000000000001c000 000000000001c000 0001d000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
6 .dma.ex_table 00000018 000000000001d000 000000000001d000 0001e000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .dma.data 00000240 000000000001d080 000000000001d080 0001e080 2**7
CONTENTS, ALLOC, LOAD, DATA
$ cat /sys/kernel/debug/memblock/reserved
0: 0x0000000000000000..0x0000000000011fff
1: 0x000000000001c000..0x000000000001dfff
...
$ cat /sys/kernel/debug/kernel_page_tables
---[ Identity Mapping ]---
0x0000000000000000-0x000000000001c000 112K PTE RW NX
0x000000000001c000-0x000000000001d000 4K PTE RO X
0x000000000001d000-0x0000000000100000 908K PTE RW NX
...
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/boot/compressed/vmlinux.lds.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/boot/compressed/vmlinux.lds.S b/arch/s390/boot/compressed/vmlinux.lds.S index 635217eb3d91..44561b2c3712 100644 --- a/arch/s390/boot/compressed/vmlinux.lds.S +++ b/arch/s390/boot/compressed/vmlinux.lds.S @@ -37,9 +37,9 @@ SECTIONS * .dma section for code, data, ex_table that need to stay below 2 GB, * even when the kernel is relocate: above 2 GB. */ + . = ALIGN(PAGE_SIZE); _sdma = .; .dma.text : { - . = ALIGN(PAGE_SIZE); _stext_dma = .; *(.dma.text) . = ALIGN(PAGE_SIZE); @@ -52,6 +52,7 @@ SECTIONS _stop_dma_ex_table = .; } .dma.data : { *(.dma.data) } + . = ALIGN(PAGE_SIZE); _edma = .; BOOT_DATA |