lkml.org 
[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 7/9] MCE: Pass registers to work handlers
Date
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


\
 
 \ /
  Last update: 2011-05-24 00:17    [W:1.922 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site