8e90b4b130
Currently s390 build is broken. SECTCMP .boot.data error: section .boot.data differs between vmlinux and arch/s390/boot/compressed/vmlinux make[2]: *** [arch/s390/boot/section_cmp.boot.data] Error 1 SECTCMP .boot.preserved.data error: section .boot.preserved.data differs between vmlinux and arch/s390/boot/compressed/vmlinux make[2]: *** [arch/s390/boot/section_cmp.boot.preserved.data] Error 1 make[1]: *** [bzImage] Error 2 Commit33def8498f
("treewide: Convert macro and uses of __section(foo) to __section("foo")") converted all __section(foo) to __section("foo"). This is wrong for __bootdata / __bootdata_preserved macros which want variable names to be a part of intermediate section names .boot.data.<var name> and .boot.preserved.data.<var name>. Those sections are later sorted by alignment + name and merged together into final .boot.data / .boot.preserved.data sections. Those sections must be identical in the decompressor and the decompressed kernel (that is checked during the build). Fixes:33def8498f
("treewide: Convert macro and uses of __section(foo) to __section("foo")") Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _S390_SECTIONS_H
|
|
#define _S390_SECTIONS_H
|
|
|
|
#define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed
|
|
|
|
#include <asm-generic/sections.h>
|
|
|
|
extern bool initmem_freed;
|
|
|
|
static inline int arch_is_kernel_initmem_freed(unsigned long addr)
|
|
{
|
|
if (!initmem_freed)
|
|
return 0;
|
|
return addr >= (unsigned long)__init_begin &&
|
|
addr < (unsigned long)__init_end;
|
|
}
|
|
|
|
/*
|
|
* .boot.data section contains variables "shared" between the decompressor and
|
|
* the decompressed kernel. The decompressor will store values in them, and
|
|
* copy over to the decompressed image before starting it.
|
|
*
|
|
* Each variable end up in its own intermediate section .boot.data.<var name>,
|
|
* those sections are later sorted by alignment + name and merged together into
|
|
* final .boot.data section, which should be identical in the decompressor and
|
|
* the decompressed kernel (that is checked during the build).
|
|
*/
|
|
#define __bootdata(var) __section(".boot.data." #var) var
|
|
|
|
/*
|
|
* .boot.preserved.data is similar to .boot.data, but it is not part of the
|
|
* .init section and thus will be preserved for later use in the decompressed
|
|
* kernel.
|
|
*/
|
|
#define __bootdata_preserved(var) __section(".boot.preserved.data." #var) var
|
|
|
|
extern unsigned long __sdma, __edma;
|
|
extern unsigned long __stext_dma, __etext_dma;
|
|
|
|
#endif
|