[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEN][POWERPC] New interface ATTN() to conact the HW probe



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID d6ec02744592b9e2668d9270cd1a54c2d455fb77
# Parent  96670c42df394193af6ee167e3f2e1a36de15b91
[XEN][POWERPC] New interface ATTN() to conact the HW probe
Sometimes it is useful to have your code contact the HW probe directly
rather than call BUG().
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/setup.c           |   12 ++++++++++--
 xen/include/asm-powerpc/debugger.h |    3 +++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff -r 96670c42df39 -r d6ec02744592 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Oct 10 09:09:38 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Tue Oct 10 09:11:32 2006 -0400
@@ -111,12 +111,20 @@ static void __init do_initcalls(void)
     }
 }
 
-static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+
+void noinline __attn(void)
 {
     /* To continue the probe will step over the ATTN instruction.  The
      * NOP is there to make sure there is something sane to "step
      * over" to. */
-    asm volatile(".long 0x00000200; nop");
+    console_start_sync();
+    asm volatile("attn");
+    console_end_sync();
+}
+
+static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+{
+    __attn();
 }
 
 static void percpu_init_areas(void)
diff -r 96670c42df39 -r d6ec02744592 xen/include/asm-powerpc/debugger.h
--- a/xen/include/asm-powerpc/debugger.h        Tue Oct 10 09:09:38 2006 -0400
+++ b/xen/include/asm-powerpc/debugger.h        Tue Oct 10 09:11:32 2006 -0400
@@ -68,6 +68,9 @@ extern void __warn(char *file, int line)
 #define WARN() __warn(__FILE__, __LINE__)
 #define WARN_ON(_p) do { if (_p) WARN(); } while ( 0 )
 
+extern void __attn(void);
+#define ATTN() __attn();
+
 #define FORCE_CRASH() __force_crash()
 
 #ifdef CRASH_DEBUG

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.