Re: [tip:x86/xen] x86: use flush_tlb_others to implementflush_tlb_all, fix

From: Ian Campbell
Date: Mon May 11 2009 - 11:01:29 EST


On Mon, 2009-05-11 at 09:12 -0400, Ingo Molnar wrote:

> which then does:
>
> init/main.c:728: error: implicit declaration of function âinit_smp_flushâ

Er, yeah, that change is pretty bogus for !x86 (I guess you were
compiling for some other $ARCH?)

You could either take the original patch which made it an early initcall
instead (http://marc.info/?l=linux-kernel&m=124179652227660&w=2) or we
could move it much earlier into setup arch, as per:

Subject: Call init_smp_flush() from arch code

init_smp_flush() is x86 specific so call it from arch code rather than
generic code.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 1b1c851..aade391 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -985,6 +985,8 @@ void __init setup_arch(char **cmdline_p)

e820_setup_gap();

+ init_smp_flush();
+
#ifdef CONFIG_VT
#if defined(CONFIG_VGA_CONSOLE)
if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
diff --git a/init/main.c b/init/main.c
index f798501..33ce929 100644
--- a/init/main.c
+++ b/init/main.c
@@ -651,7 +651,6 @@ asmlinkage void __init start_kernel(void)
vfs_caches_init_early();
cpuset_init_early();
page_cgroup_init();
- init_smp_flush();
mem_init();
enable_debug_pagealloc();
cpu_hotplug_init();


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/