ia64/xen-unstable
changeset 5801:a87242c44417
Add easy way to turn off all fast paths to rule them out when debugging
author | djm@kirby.fc.hp.com |
---|---|
date | Wed Jul 13 06:43:49 2005 -0700 (2005-07-13) |
parents | 9870485d4836 |
children | d4ecbd89d954 |
files | xen/arch/ia64/dom_fw.c xen/arch/ia64/hyperprivop.S |
line diff
1.1 --- a/xen/arch/ia64/dom_fw.c Tue Jul 12 08:13:06 2005 -0700 1.2 +++ b/xen/arch/ia64/dom_fw.c Wed Jul 13 06:43:49 2005 -0700 1.3 @@ -347,9 +347,11 @@ xen_pal_emulator(unsigned long index, un 1.4 unsigned long pm_buffer[16]; 1.5 status = ia64_pal_perf_mon_info(pm_buffer,&r9); 1.6 if (status != 0) break; 1.7 - if (copy_to_user((void __user *)in1,pm_buffer,128)) 1.8 + if (copy_to_user((void __user *)in1,pm_buffer,128)) { 1.9 printk("xen_pal_emulator: PAL_PERF_MON_INFO " 1.10 "can't copy to user!!!!\n"); 1.11 + status = -1; 1.12 + } 1.13 } 1.14 break; 1.15 case PAL_CACHE_INFO:
2.1 --- a/xen/arch/ia64/hyperprivop.S Tue Jul 12 08:13:06 2005 -0700 2.2 +++ b/xen/arch/ia64/hyperprivop.S Wed Jul 13 06:43:49 2005 -0700 2.3 @@ -14,8 +14,15 @@ 2.4 #include <asm/system.h> 2.5 #include <public/arch-ia64.h> 2.6 2.7 +#if 1 // change to 0 to turn off all fast paths 2.8 +#define FAST_HYPERPRIVOPS 2.9 #define FAST_HYPERPRIVOP_CNT 2.10 #define FAST_REFLECT_CNT 2.11 +#define FAST_TICK 2.12 +#define FAST_BREAK 2.13 +#define FAST_ACCESS_REFLECT 2.14 +#undef RFI_TO_INTERRUPT // not working yet 2.15 +#endif 2.16 2.17 // FIXME: This is defined in include/asm-ia64/hw_irq.h but this 2.18 // doesn't appear to be include'able from assembly? 2.19 @@ -45,6 +52,9 @@ 2.20 // r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits) 2.21 // r31 == pr 2.22 GLOBAL_ENTRY(fast_hyperprivop) 2.23 +#ifndef FAST_HYPERPRIVOPS // see beginning of file 2.24 + br.sptk.many dispatch_break_fault ;; 2.25 +#endif 2.26 // HYPERPRIVOP_SSM_I? 2.27 // assumes domain interrupts pending, so just do it 2.28 cmp.eq p7,p6=XEN_HYPER_SSM_I,r17 2.29 @@ -280,8 +290,7 @@ ENTRY(hyper_ssm_i) 2.30 // r30 == cr.ivr 2.31 // r29 == rp 2.32 GLOBAL_ENTRY(fast_tick_reflect) 2.33 -#define FAST_TICK 2.34 -#ifndef FAST_TICK 2.35 +#ifndef FAST_TICK // see beginning of file 2.36 br.cond.sptk.many rp;; 2.37 #endif 2.38 mov r28=IA64_TIMER_VECTOR;; 2.39 @@ -290,7 +299,7 @@ GLOBAL_ENTRY(fast_tick_reflect) 2.40 movl r20=(PERCPU_ADDR)+IA64_CPUINFO_ITM_NEXT_OFFSET;; 2.41 ld8 r26=[r20];; 2.42 mov r27=ar.itc;; 2.43 - adds r27=200,r27 // safety margin 2.44 + adds r27=200,r27;; // safety margin 2.45 cmp.ltu p6,p0=r26,r27 2.46 (p6) br.cond.spnt.few rp;; 2.47 mov r17=cr.ipsr;; 2.48 @@ -453,8 +462,7 @@ END(fast_tick_reflect) 2.49 // r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits) 2.50 // r31 == pr 2.51 GLOBAL_ENTRY(fast_break_reflect) 2.52 -#define FAST_BREAK 2.53 -#ifndef FAST_BREAK 2.54 +#ifndef FAST_BREAK // see beginning of file 2.55 br.sptk.many dispatch_break_fault ;; 2.56 #endif 2.57 mov r30=cr.ipsr;; 2.58 @@ -595,6 +603,9 @@ ENTRY(fast_reflect) 2.59 // r20 == offset into ivt 2.60 // r31 == pr 2.61 GLOBAL_ENTRY(fast_access_reflect) 2.62 +#ifndef FAST_ACCESS_REFLECT // see beginning of file 2.63 + br.spnt.few dispatch_reflection ;; 2.64 +#endif 2.65 mov r30=cr.ipsr;; 2.66 mov r29=cr.iip;; 2.67 extr.u r21=r30,IA64_PSR_BE_BIT,1 ;; 2.68 @@ -670,7 +681,7 @@ 1: 2.69 cmp.ltu p0,p7=r22,r23 ;; // if !(iip<low) && 2.70 (p7) cmp.geu p0,p7=r22,r24 ;; // !(iip>=high) 2.71 (p7) br.spnt.few dispatch_break_fault ;; 2.72 -#ifndef RFI_TO_INTERRUPT 2.73 +#ifndef RFI_TO_INTERRUPT // see beginning of file 2.74 cmp.ne p6,p0=r30,r0 2.75 (p6) br.cond.spnt.few dispatch_break_fault ;; 2.76 #endif