diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2015-06-16 12:03:37 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-06-18 13:45:46 (GMT) |
commit | 0c36b8ac7052eafed952ad3487ed8671dc9dc5f9 (patch) | |
tree | a21c1f42b85f175429f9da8365540f6f67e40a92 /arch/s390/kernel/setup.c | |
parent | d9a5c0c65bb93e6c0236c73fe560fe980c3a5d1c (diff) | |
download | linux-0c36b8ac7052eafed952ad3487ed8671dc9dc5f9.tar.xz |
s390/setup: fix DMA_API_DEBUG warnings
Addresses from the usable space in [_ehead, _stext] lead to false
positives in DMA_API_DEBUG code (which will complain when an address
is in [_text, _etext]).
Avoid these warnings by not using that memory in case of
CONFIG_DMA_API_DEBUG=y.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index bdde603..af4f41d 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -640,19 +640,24 @@ static void __init check_initrd(void) } /* - * Reserve all kernel text + * Reserve memory used for lowcore/command line/kernel image. */ static void __init reserve_kernel(void) { - unsigned long start_pfn; - start_pfn = PFN_UP(__pa(&_end)); + unsigned long start_pfn = PFN_UP(__pa(&_end)); +#ifdef CONFIG_DMA_API_DEBUG /* - * Reserve memory used for lowcore/command line/kernel image. + * DMA_API_DEBUG code stumbles over addresses from the + * range [_ehead, _stext]. Mark the memory as reserved + * so it is not used for CONFIG_DMA_API_DEBUG=y. */ + memblock_reserve(0, PFN_PHYS(start_pfn)); +#else memblock_reserve(0, (unsigned long)_ehead); memblock_reserve((unsigned long)_stext, PFN_PHYS(start_pfn) - (unsigned long)_stext); +#endif } static void __init reserve_elfcorehdr(void) |