ia64/xen-unstable
changeset 12947:d6ec02744592
[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@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Sometimes it is useful to have your code contact the HW probe directly
rather than call BUG().
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author | Jimi Xenidis <jimix@watson.ibm.com> |
---|---|
date | Tue Oct 10 09:11:32 2006 -0400 (2006-10-10) |
parents | 96670c42df39 |
children | 0ff8b14fb530 |
files | xen/arch/powerpc/setup.c xen/include/asm-powerpc/debugger.h |
line diff
1.1 --- a/xen/arch/powerpc/setup.c Tue Oct 10 09:09:38 2006 -0400 1.2 +++ b/xen/arch/powerpc/setup.c Tue Oct 10 09:11:32 2006 -0400 1.3 @@ -111,12 +111,20 @@ static void __init do_initcalls(void) 1.4 } 1.5 } 1.6 1.7 -static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs) 1.8 + 1.9 +void noinline __attn(void) 1.10 { 1.11 /* To continue the probe will step over the ATTN instruction. The 1.12 * NOP is there to make sure there is something sane to "step 1.13 * over" to. */ 1.14 - asm volatile(".long 0x00000200; nop"); 1.15 + console_start_sync(); 1.16 + asm volatile("attn"); 1.17 + console_end_sync(); 1.18 +} 1.19 + 1.20 +static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs) 1.21 +{ 1.22 + __attn(); 1.23 } 1.24 1.25 static void percpu_init_areas(void)
2.1 --- a/xen/include/asm-powerpc/debugger.h Tue Oct 10 09:09:38 2006 -0400 2.2 +++ b/xen/include/asm-powerpc/debugger.h Tue Oct 10 09:11:32 2006 -0400 2.3 @@ -68,6 +68,9 @@ extern void __warn(char *file, int line) 2.4 #define WARN() __warn(__FILE__, __LINE__) 2.5 #define WARN_ON(_p) do { if (_p) WARN(); } while ( 0 ) 2.6 2.7 +extern void __attn(void); 2.8 +#define ATTN() __attn(); 2.9 + 2.10 #define FORCE_CRASH() __force_crash() 2.11 2.12 #ifdef CRASH_DEBUG