Commit 80ef517b authored by Vasily Gorbik's avatar Vasily Gorbik

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: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent e991e5bb
......@@ -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
......
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