Commit e9cbde8c158629cc96a26b2323c4a243536c1951

Authored by Avi Kivity
1 parent c428dcc9b9

KVM: ia64: fix build failures due to ia64/unsigned long mismatches

Signed-off-by: Avi Kivity <avi@redhat.com>

Showing 3 changed files with 14 additions and 11 deletions Side-by-side Diff

arch/ia64/kvm/mmio.c
... ... @@ -247,7 +247,8 @@
247 247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v);
248 248 /* Write high word. FIXME: this is a kludge! */
249 249 v.u.bits[1] &= 0x3ffff;
250   - mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE);
  250 + mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1], 8,
  251 + ma, IOREQ_WRITE);
251 252 data = v.u.bits[0];
252 253 size = 3;
253 254 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) {
... ... @@ -265,7 +266,8 @@
265 266  
266 267 /* Write high word.FIXME: this is a kludge! */
267 268 v.u.bits[1] &= 0x3ffff;
268   - mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE);
  269 + mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1],
  270 + 8, ma, IOREQ_WRITE);
269 271 data = v.u.bits[0];
270 272 size = 3;
271 273 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) {
arch/ia64/kvm/vcpu.c
... ... @@ -461,7 +461,7 @@
461 461 u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
462 462 {
463 463 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
464   - u64 val;
  464 + unsigned long val;
465 465  
466 466 if (!reg)
467 467 return 0;
... ... @@ -469,7 +469,7 @@
469 469 return val;
470 470 }
471 471  
472   -void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 value, int nat)
  472 +void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg, u64 value, int nat)
473 473 {
474 474 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
475 475 long sof = (regs->cr_ifs) & 0x7f;
... ... @@ -1072,7 +1072,7 @@
1072 1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0);
1073 1073 }
1074 1074  
1075   -int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, u64 *padr)
  1075 +int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, unsigned long *padr)
1076 1076 {
1077 1077 struct thash_data *data;
1078 1078 union ia64_isr visr, pt_isr;
arch/ia64/kvm/vcpu.h
... ... @@ -686,14 +686,15 @@
686 686 return highest_bits((int *)&(VMX(vcpu, insvc[0])));
687 687 }
688 688  
689   -extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, u64 reg,
  689 +extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
690 690 struct ia64_fpreg *val);
691   -extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, u64 reg,
  691 +extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
692 692 struct ia64_fpreg *val);
693   -extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, u64 reg);
694   -extern void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 val, int nat);
695   -extern u64 vcpu_get_psr(struct kvm_vcpu *vcpu);
696   -extern void vcpu_set_psr(struct kvm_vcpu *vcpu, u64 val);
  693 +extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg);
  694 +extern void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg,
  695 + u64 val, int nat);
  696 +extern unsigned long vcpu_get_psr(struct kvm_vcpu *vcpu);
  697 +extern void vcpu_set_psr(struct kvm_vcpu *vcpu, unsigned long val);
697 698 extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr);
698 699 extern void vcpu_bsw0(struct kvm_vcpu *vcpu);
699 700 extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte,