ia64/xen-unstable
changeset 5812:db8a7f39df93
Syntactic changes to prepare for possible vcpu_info changes
author | djm@kirby.fc.hp.com |
---|---|
date | Wed Jul 27 12:57:05 2005 -0700 (2005-07-27) |
parents | 738ba414ce80 |
children | bb0eeb87bfca |
files | xen/arch/ia64/hypercall.c xen/arch/ia64/process.c xen/arch/ia64/regionreg.c xen/arch/ia64/vcpu.c xen/arch/ia64/xentime.c xen/include/asm-ia64/event.h xen/include/asm-ia64/vcpu.h |
line diff
1.1 --- a/xen/arch/ia64/hypercall.c Wed Jul 27 12:07:07 2005 -0700 1.2 +++ b/xen/arch/ia64/hypercall.c Wed Jul 27 12:57:05 2005 -0700 1.3 @@ -41,13 +41,13 @@ ia64_hypercall (struct pt_regs *regs) 1.4 // to a yet-to-be-found bug where pending_interruption 1.5 // is zero when it shouldn't be. Since PAL is called 1.6 // in the idle loop, this should resolve it 1.7 - v->vcpu_info->arch.pending_interruption = 1; 1.8 + VCPU(v,pending_interruption) = 1; 1.9 #endif 1.10 if (regs->r28 == PAL_HALT_LIGHT) { 1.11 #define SPURIOUS_VECTOR 15 1.12 pi = vcpu_check_pending_interrupts(v); 1.13 if (pi != SPURIOUS_VECTOR) { 1.14 - if (!v->vcpu_info->arch.pending_interruption) 1.15 + if (!VCPU(v,pending_interruption)) 1.16 idle_when_pending++; 1.17 vcpu_pend_unspecified_interrupt(v); 1.18 //printf("idle w/int#%d pending!\n",pi);
2.1 --- a/xen/arch/ia64/process.c Wed Jul 27 12:07:07 2005 -0700 2.2 +++ b/xen/arch/ia64/process.c Wed Jul 27 12:57:05 2005 -0700 2.3 @@ -50,7 +50,7 @@ extern unsigned long dom0_start, dom0_si 2.4 IA64_PSR_ID | IA64_PSR_DA | IA64_PSR_DD | \ 2.5 IA64_PSR_SS | IA64_PSR_RI | IA64_PSR_ED | IA64_PSR_IA) 2.6 2.7 -#define PSCB(x,y) x->vcpu_info->arch.y 2.8 +#define PSCB(x,y) VCPU(x,y) 2.9 #define PSCBX(x,y) x->arch.y 2.10 2.11 extern unsigned long vcpu_verbose;
3.1 --- a/xen/arch/ia64/regionreg.c Wed Jul 27 12:07:07 2005 -0700 3.2 +++ b/xen/arch/ia64/regionreg.c Wed Jul 27 12:57:05 2005 -0700 3.3 @@ -14,6 +14,7 @@ 3.4 #include <asm/page.h> 3.5 #include <asm/regionreg.h> 3.6 #include <asm/vhpt.h> 3.7 +#include <asm/vcpu.h> 3.8 3.9 3.10 #define IA64_MIN_IMPL_RID_BITS (IA64_MIN_IMPL_RID_MSB+1) 3.11 @@ -332,14 +333,14 @@ void init_all_rr(struct vcpu *v) 3.12 rrv.ps = PAGE_SHIFT; 3.13 rrv.ve = 1; 3.14 if (!v->vcpu_info) { printf("Stopping in init_all_rr\n"); dummy(); } 3.15 - v->vcpu_info->arch.rrs[0] = -1; 3.16 - v->vcpu_info->arch.rrs[1] = rrv.rrval; 3.17 - v->vcpu_info->arch.rrs[2] = rrv.rrval; 3.18 - v->vcpu_info->arch.rrs[3] = rrv.rrval; 3.19 - v->vcpu_info->arch.rrs[4] = rrv.rrval; 3.20 - v->vcpu_info->arch.rrs[5] = rrv.rrval; 3.21 + VCPU(v,rrs[0]) = -1; 3.22 + VCPU(v,rrs[1]) = rrv.rrval; 3.23 + VCPU(v,rrs[2]) = rrv.rrval; 3.24 + VCPU(v,rrs[3]) = rrv.rrval; 3.25 + VCPU(v,rrs[4]) = rrv.rrval; 3.26 + VCPU(v,rrs[5]) = rrv.rrval; 3.27 rrv.ve = 0; 3.28 - v->vcpu_info->arch.rrs[6] = rrv.rrval; 3.29 + VCPU(v,rrs[6]) = rrv.rrval; 3.30 // v->shared_info->arch.rrs[7] = rrv.rrval; 3.31 } 3.32 3.33 @@ -378,7 +379,7 @@ unsigned long load_region_regs(struct vc 3.34 // TODO: These probably should be validated 3.35 unsigned long bad = 0; 3.36 3.37 - if (v->vcpu_info->arch.metaphysical_mode) { 3.38 + if (VCPU(v,metaphysical_mode)) { 3.39 ia64_rr rrv; 3.40 3.41 rrv.rrval = 0; 3.42 @@ -390,16 +391,16 @@ unsigned long load_region_regs(struct vc 3.43 ia64_srlz_d(); 3.44 } 3.45 else { 3.46 - rr0 = v->vcpu_info->arch.rrs[0]; 3.47 + rr0 = VCPU(v,rrs[0]); 3.48 if (!set_one_rr(0x0000000000000000L, rr0)) bad |= 1; 3.49 } 3.50 - rr1 = v->vcpu_info->arch.rrs[1]; 3.51 - rr2 = v->vcpu_info->arch.rrs[2]; 3.52 - rr3 = v->vcpu_info->arch.rrs[3]; 3.53 - rr4 = v->vcpu_info->arch.rrs[4]; 3.54 - rr5 = v->vcpu_info->arch.rrs[5]; 3.55 - rr6 = v->vcpu_info->arch.rrs[6]; 3.56 - rr7 = v->vcpu_info->arch.rrs[7]; 3.57 + rr1 = VCPU(v,rrs[1]); 3.58 + rr2 = VCPU(v,rrs[2]); 3.59 + rr3 = VCPU(v,rrs[3]); 3.60 + rr4 = VCPU(v,rrs[4]); 3.61 + rr5 = VCPU(v,rrs[5]); 3.62 + rr6 = VCPU(v,rrs[6]); 3.63 + rr7 = VCPU(v,rrs[7]); 3.64 if (!set_one_rr(0x2000000000000000L, rr1)) bad |= 2; 3.65 if (!set_one_rr(0x4000000000000000L, rr2)) bad |= 4; 3.66 if (!set_one_rr(0x6000000000000000L, rr3)) bad |= 8; 3.67 @@ -410,4 +411,5 @@ unsigned long load_region_regs(struct vc 3.68 if (bad) { 3.69 panic_domain(0,"load_region_regs: can't set! bad=%lx\n",bad); 3.70 } 3.71 + return 0; 3.72 }
4.1 --- a/xen/arch/ia64/vcpu.c Wed Jul 27 12:07:07 2005 -0700 4.2 +++ b/xen/arch/ia64/vcpu.c Wed Jul 27 12:57:05 2005 -0700 4.3 @@ -28,7 +28,7 @@ typedef union { 4.4 4.5 // this def for vcpu_regs won't work if kernel stack is present 4.6 #define vcpu_regs(vcpu) ((struct pt_regs *) vcpu->arch.regs) 4.7 -#define PSCB(x,y) x->vcpu_info->arch.y 4.8 +#define PSCB(x,y) VCPU(x,y) 4.9 #define PSCBX(x,y) x->arch.y 4.10 4.11 #define TRUE 1
5.1 --- a/xen/arch/ia64/xentime.c Wed Jul 27 12:07:07 2005 -0700 5.2 +++ b/xen/arch/ia64/xentime.c Wed Jul 27 12:57:05 2005 -0700 5.3 @@ -27,6 +27,7 @@ 5.4 #include <asm/sections.h> 5.5 #include <asm/system.h> 5.6 #ifdef XEN 5.7 +#include <asm/vcpu.h> 5.8 #include <linux/jiffies.h> // not included by xen/sched.h 5.9 #endif 5.10 #include <xen/softirq.h> 5.11 @@ -143,8 +144,8 @@ xen_timer_interrupt (int irq, void *dev_ 5.12 if (!(++count & ((HEARTBEAT_FREQ*1024)-1))) { 5.13 printf("Heartbeat... iip=%p,psr.i=%d,pend=%d\n", 5.14 regs->cr_iip, 5.15 - current->vcpu_info->arch.interrupt_delivery_enabled, 5.16 - current->vcpu_info->arch.pending_interruption); 5.17 + VCPU(current,interrupt_delivery_enabled), 5.18 + VCPU(current,pending_interruption)); 5.19 count = 0; 5.20 } 5.21 #endif 5.22 @@ -159,7 +160,7 @@ xen_timer_interrupt (int irq, void *dev_ 5.23 // We have to ensure that domain0 is launched before we 5.24 // call vcpu_timer_expired on it 5.25 //domain0_ready = 1; // moved to xensetup.c 5.26 - current->vcpu_info->arch.pending_interruption = 1; 5.27 + VCPU(current,pending_interruption) = 1; 5.28 } 5.29 if (domain0_ready && vcpu_timer_expired(dom0->vcpu[0])) { 5.30 vcpu_pend_timer(dom0->vcpu[0]);
6.1 --- a/xen/include/asm-ia64/event.h Wed Jul 27 12:07:07 2005 -0700 6.2 +++ b/xen/include/asm-ia64/event.h Wed Jul 27 12:57:05 2005 -0700 6.3 @@ -9,9 +9,11 @@ 6.4 #ifndef __ASM_EVENT_H__ 6.5 #define __ASM_EVENT_H__ 6.6 6.7 +#include <asm/vcpu.h> 6.8 + 6.9 static inline void evtchn_notify(struct vcpu *v) 6.10 { 6.11 - vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector); 6.12 + vcpu_pend_interrupt(v, VCPU(v,evtchn_vector)); 6.13 } 6.14 6.15 #endif
7.1 --- a/xen/include/asm-ia64/vcpu.h Wed Jul 27 12:07:07 2005 -0700 7.2 +++ b/xen/include/asm-ia64/vcpu.h Wed Jul 27 12:57:05 2005 -0700 7.3 @@ -13,13 +13,9 @@ typedef int BOOLEAN; 7.4 struct vcpu; 7.5 typedef struct vcpu VCPU; 7.6 7.7 -// NOTE: The actual VCPU structure (struct virtualcpu) is defined in 7.8 -// thread.h. Moving it to here caused a lot of files to change, so 7.9 -// for now, we'll leave well enough alone. 7.10 typedef struct pt_regs REGS; 7.11 -//#define PSCB(vcpu) (((struct spk_thread_t *)vcpu)->pscb) 7.12 -//#define vcpu_regs(vcpu) &((struct spk_thread_t *)vcpu)->thread_regs 7.13 -//#define vcpu_thread(vcpu) ((struct spk_thread_t *)vcpu) 7.14 + 7.15 +#define VCPU(_v,_x) _v->vcpu_info->arch._x 7.16 7.17 #define PRIVOP_ADDR_COUNT 7.18 #ifdef PRIVOP_ADDR_COUNT