Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08b6d290 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Ingo Molnar
Browse files

xen: fix section usage in xen-head.S and setup.c



additional section for .init.text appending a number.

A side effect of this was a section mismatch warning because modpost did
not recognize a .init.text section named .init.text.1: WARNING:
vmlinux.o(.text.head+0x247): Section mismatch: reference to
.init.text.1:start_kernel (between 'is386' and 'check_x87')

Fix this by hardcoding the "ax" in the pushsection.  Thanks to Torlaf for
reporting this.

Alan Modra provided the hint that made me able to locate the root cause of
this warning.  And Mike Frysinger told me how to properly fix it using
__INIT/__FINIT.

Fix following Section mismatch warning in addition:
WARNING: vmlinux.o(.text+0x14c8): Section mismatch: reference to .init.data:vsyscall_int80_start (between 'fiddle_vdso' and 'xen_setup_features')

fiddle_vdso was only used from a __init function - so declare it __init.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e68decb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ static void xen_idle(void)
/*
/*
 * Set the bit indicating "nosegneg" library variants should be used.
 * Set the bit indicating "nosegneg" library variants should be used.
 */
 */
static void fiddle_vdso(void)
static void __init fiddle_vdso(void)
{
{
	extern const char vdso32_default_start;
	extern const char vdso32_default_start;
	u32 *mask = VDSO32_SYMBOL(&vdso32_default_start, NOTE_MASK);
	u32 *mask = VDSO32_SYMBOL(&vdso32_default_start, NOTE_MASK);
+4 −2
Original line number Original line Diff line number Diff line
@@ -4,16 +4,18 @@
#ifdef CONFIG_XEN
#ifdef CONFIG_XEN


#include <linux/elfnote.h>
#include <linux/elfnote.h>
#include <linux/init.h>
#include <asm/boot.h>
#include <asm/boot.h>
#include <xen/interface/elfnote.h>
#include <xen/interface/elfnote.h>


.pushsection .init.text
	__INIT
ENTRY(startup_xen)
ENTRY(startup_xen)
	movl %esi,xen_start_info
	movl %esi,xen_start_info
	cld
	cld
	movl $(init_thread_union+THREAD_SIZE),%esp
	movl $(init_thread_union+THREAD_SIZE),%esp
	jmp xen_start_kernel
	jmp xen_start_kernel
.popsection

	__FINIT


.pushsection .bss.page_aligned
.pushsection .bss.page_aligned
	.align PAGE_SIZE_asm
	.align PAGE_SIZE_asm