mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: linux-kernel@vger.kernel.org
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Huang, Ying" <ying.huang@intel.com>,
	"Andi Kleen" <andi@firstfloor.org>,
	"Borislav Petkov" <bp@alien8.de>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: [RFC 7/9] MCE: Pass registers to work handlers
Date: Mon, 23 May 2011 15:14:38 -0700	[thread overview]
Message-ID: <4ddadc4e1717078242@agluck-desktop.sc.intel.com> (raw)
In-Reply-To: <4ddad79317108eb33d@agluck-desktop.sc.intel.com>

From: Andi Kleen <andi@firstfloor.org>

Pass the register context to the task work handler.
Needed for the next patch

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 arch/x86/include/asm/mce.h       |    3 ++-
 arch/x86/kernel/cpu/mcheck/mce.c |    4 ++--
 arch/x86/kernel/signal.c         |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index eb16e94..66c41e0 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -195,7 +195,8 @@ enum mcp_flags {
 void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
 
 int mce_notify_irq(void);
-void mce_notify_process(void);
+struct pt_regs;
+void mce_notify_process(struct pt_regs *regs);
 
 DECLARE_PER_CPU(struct mce, injectm);
 extern struct file_operations mce_chrdev_ops;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index a9a0e25..6b2fa20 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1123,7 +1123,7 @@ void __attribute__((weak)) memory_failure(unsigned long pfn, int vector)
  * This is merely a fast path to expedite processing in some common
  * cases.
  */
-void mce_notify_process(void)
+void mce_notify_process(struct pt_regs *regs)
 {
 	unsigned long pfn;
 	mce_notify_irq();
@@ -1133,7 +1133,7 @@ void mce_notify_process(void)
 
 static void mce_process_work(struct work_struct *dummy)
 {
-	mce_notify_process();
+	mce_notify_process(NULL);
 }
 
 #ifdef CONFIG_X86_MCE_INTEL
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 4fd173c..3e6d421 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -841,7 +841,7 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
 #ifdef CONFIG_X86_MCE
 	/* notify userspace of pending MCEs */
 	if (thread_info_flags & _TIF_MCE_NOTIFY)
-		mce_notify_process();
+		mce_notify_process(regs);
 #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */
 
 	/* deal with pending signal delivery */
-- 
1.7.3.1


  parent reply	other threads:[~2011-05-23 22:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 21:54 [RFC 0/9] mce recovery for Sandy Bridge server Luck, Tony
2011-05-23 22:02 ` [RFC 1/9] mce: fixes for mce severity table Luck, Tony
2011-05-23 22:12 ` [RFC 2/9] mce: save most severe error information Luck, Tony
2011-05-23 22:13 ` [RFC 3/9] MCE: Always retrieve mce rip before calling no_way_out Luck, Tony
2011-05-23 22:13 ` [RFC 4/9] MCE: Move ADDR/MISC reading code into common function Luck, Tony
2011-05-23 22:13 ` [RFC 5/9] MCE: Mask out address mask bits below address granuality Luck, Tony
2011-05-23 22:14 ` [RFC 6/9] HWPOISON: Handle hwpoison in current process Luck, Tony
2011-05-23 22:14 ` Luck, Tony [this message]
2011-05-23 22:14 ` [RFC 8/9] mce: run through processors with more severe problems first Luck, Tony
2011-05-23 22:15 ` [RFC 9/9] MCE: Add Action-Required support Luck, Tony
2011-05-24  3:40 ` [RFC 0/9] mce recovery for Sandy Bridge server Ingo Molnar
2011-05-24  8:14   ` Borislav Petkov
2011-05-24 16:57   ` Luck, Tony
2011-05-24 17:33     ` Borislav Petkov
2011-05-24 17:56       ` Tony Luck
2011-05-24 21:04         ` Borislav Petkov
2011-05-24 21:24         ` Peter Zijlstra
2011-05-24 21:30           ` Linus Torvalds
2011-05-24 21:37             ` Peter Zijlstra
2011-05-24 21:41               ` Ingo Molnar
2011-05-24 21:48             ` Tony Luck
2011-05-25 10:02               ` Joerg Roedel
2011-05-25 13:44     ` Ingo Molnar
2011-05-25 21:43       ` Tony Luck
2011-05-25 21:47         ` Ingo Molnar
2011-05-25 23:53       ` Tony Luck
2011-05-26 20:16         ` Tony Luck
2011-05-25  6:03 ` Hidetoshi Seto
2011-05-25 16:44   ` Luck, Tony

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=4ddadc4e1717078242@agluck-desktop.sc.intel.com \
    --to=tony.luck@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.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

Powered by JetHome