public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Ian Campbell <Ian.Campbell@eu.citrix.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	ian.campbell@citrix.com, Jeremy.Fitzhardinge@citrix.com,
	tglx@linutronix.de, Ian.Campbell@eu.citrix.com, mingo@elte.hu,
	xen-devel@lists.xensource.com
Subject: [tip:x86/xen] x86: use flush_tlb_others to implement flush_tlb_all, fix
Date: Mon, 11 May 2009 15:06:33 GMT	[thread overview]
Message-ID: <tip-c3f10fbccdb558dbc0652487502bbd7150231945@git.kernel.org> (raw)
In-Reply-To: <1241797927.15972.51.camel@zakaz.uk.xensource.com>

Commit-ID:  c3f10fbccdb558dbc0652487502bbd7150231945
Gitweb:     http://git.kernel.org/tip/c3f10fbccdb558dbc0652487502bbd7150231945
Author:     Ian Campbell <Ian.Campbell@eu.citrix.com>
AuthorDate: Fri, 8 May 2009 16:52:07 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 11 May 2009 17:03:02 +0200

x86: use flush_tlb_others to implement flush_tlb_all, fix

"use the flush_tlb_others() call to implement flush_tlb_all()"
causes:
         BUG: spinlock bad magic on CPU#0, swapper/0
          lock: c05b7588, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
         Pid: 0, comm: swapper Not tainted 2.6.30-rc3-x86_32p-xen0-tip-01797-g3db7847 #1054
         Call Trace:
          [<c023e656>] spin_bug+0x96/0xf0
          [<c023e90f>] _raw_spin_lock+0x6f/0x150

It can be called before the core_initcalls are run. Explicitly call
init_smp_flush early on.

Also there is no need for init_smp_flush to be __cpuinit.

[ Impact: fix boot crash/warning ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Acked-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
LKML-Reference: <1241797927.15972.51.camel@zakaz.uk.xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/include/asm/tlbflush.h |    2 ++
 arch/x86/kernel/setup.c         |    2 ++
 arch/x86/mm/tlb.c               |    3 +--
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 16a5c84..2a4848d 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -129,6 +129,8 @@ static inline void reset_lazy_tlbstate(void)
 
 #define local_flush_tlb() __flush_tlb()
 
+extern int init_smp_flush(void);
+
 extern void flush_tlb_all(void);
 extern void flush_tlb_current_task(void);
 extern void flush_tlb_mm(struct mm_struct *);
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index b415843..bde4baf 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -984,6 +984,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/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index e69bdad..0f030fb 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -229,7 +229,7 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
 	flush_tlb_others_ipi(cpumask, mm, va);
 }
 
-static int __cpuinit init_smp_flush(void)
+int __init init_smp_flush(void)
 {
 	int i;
 
@@ -238,7 +238,6 @@ static int __cpuinit init_smp_flush(void)
 
 	return 0;
 }
-core_initcall(init_smp_flush);
 
 void flush_tlb_current_task(void)
 {

  parent reply	other threads:[~2009-05-11 15:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 20:24 [GIT PULL] Xen core updates Jeremy Fitzhardinge
2009-05-07 20:24 ` [PATCH 1/8] xen/x86-64: fix breakpoints and hardware watchpoints Jeremy Fitzhardinge
2009-05-07 20:24 ` [PATCH 2/8] xen/x86-64: clean up warnings about IST-using traps Jeremy Fitzhardinge
2009-05-07 20:24 ` [PATCH 3/8] xen: cache cr0 value to avoid trap'n'emulate for read_cr0 Jeremy Fitzhardinge
2009-05-07 20:24 ` [PATCH 4/8] xen: deal with NMI's use of IST too Jeremy Fitzhardinge
2009-05-07 20:24 ` [PATCH 5/8] xen/i386: make sure initial VGA/ISA mappings are not overridden Jeremy Fitzhardinge
2009-05-08 10:57   ` Ingo Molnar
2009-05-08 15:08     ` Jeremy Fitzhardinge
2009-05-07 20:25 ` [PATCH 6/8] x86: use flush_tlb_others to implement flush_tlb_all Jeremy Fitzhardinge
2009-05-08 15:24   ` Ian Campbell
2009-05-08 15:49     ` Jeremy Fitzhardinge
2009-05-08 15:52       ` Ian Campbell
2009-05-11 13:09         ` [tip:x86/xen] x86: use flush_tlb_others to implement flush_tlb_all, fix tip-bot for Ian Campbell
2009-05-11 13:12           ` Ingo Molnar
2009-05-11 15:00             ` Ian Campbell
2009-05-11 15:11               ` Ingo Molnar
2009-05-11 15:39                 ` Ian Campbell
2009-05-11 15:42                   ` Ingo Molnar
2009-05-11 15:59                     ` Ian Campbell
2009-05-11 15:40                 ` Ingo Molnar
2009-05-11 15:06         ` tip-bot for Ian Campbell [this message]
2009-05-07 20:25 ` [PATCH 7/8] xen/i386: reserve Xen pagetables Jeremy Fitzhardinge
2009-05-07 20:25 ` [PATCH 8/8] xen: reserve Xen start_info rather than e820 reserving Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c3f10fbccdb558dbc0652487502bbd7150231945@git.kernel.org \
    --to=ian.campbell@eu.citrix.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=hpa@zytor.com \
    --cc=ian.campbell@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox