aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/paravirt_privop.h22
-rw-r--r--arch/ia64/include/asm/xen/privop.h2
-rw-r--r--arch/ia64/kernel/paravirt.c22
-rw-r--r--arch/ia64/kernel/patch.c2
-rw-r--r--arch/ia64/kvm/kvm-ia64.c2
-rw-r--r--arch/ia64/kvm/vcpu.c2
-rw-r--r--arch/ia64/xen/xen_pv_ops.c9
7 files changed, 47 insertions, 14 deletions
diff --git a/arch/ia64/include/asm/paravirt_privop.h b/arch/ia64/include/asm/paravirt_privop.h
index 4e40e62c4ab8..3d2951130b5f 100644
--- a/arch/ia64/include/asm/paravirt_privop.h
+++ b/arch/ia64/include/asm/paravirt_privop.h
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35struct pv_cpu_ops { 35struct pv_cpu_ops {
36 void (*fc)(unsigned long addr); 36 void (*fc)(void *addr);
37 unsigned long (*thash)(unsigned long addr); 37 unsigned long (*thash)(unsigned long addr);
38 unsigned long (*get_cpuid)(int index); 38 unsigned long (*get_cpuid)(int index);
39 unsigned long (*get_pmd)(int index); 39 unsigned long (*get_pmd)(int index);
@@ -248,7 +248,7 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
248 "r15", "r16", "r17" 248 "r15", "r16", "r17"
249 249
250#define PARAVIRT_REG_CLOBBERS1 \ 250#define PARAVIRT_REG_CLOBBERS1 \
251 "r2","r3", /*"r8",*/ "r9", "r10", "r11", "r14", \ 251 "r2","r3", /*"r8",*/ "r9", "r10", "r11", "r14", \
252 "r15", "r16", "r17" 252 "r15", "r16", "r17"
253 253
254#define PARAVIRT_REG_CLOBBERS2 \ 254#define PARAVIRT_REG_CLOBBERS2 \
@@ -330,6 +330,15 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
330 : PARAVIRT_OP(op), "0"(__##arg1) \ 330 : PARAVIRT_OP(op), "0"(__##arg1) \
331 : PARAVIRT_CLOBBERS1) 331 : PARAVIRT_CLOBBERS1)
332 332
333#define PARAVIRT_BR1_VOID(op, type, arg1) \
334 register void *__##arg1 asm ("r8") = arg1; \
335 register unsigned long ia64_clobber asm ("r8"); \
336 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
337 PARAVIRT_TYPE(type)) \
338 : "=r"(ia64_clobber) \
339 : PARAVIRT_OP(op), "0"(__##arg1) \
340 : PARAVIRT_CLOBBERS1)
341
333#define PARAVIRT_BR2(op, type, arg1, arg2) \ 342#define PARAVIRT_BR2(op, type, arg1, arg2) \
334 register unsigned long __##arg1 asm ("r8") = arg1; \ 343 register unsigned long __##arg1 asm ("r8") = arg1; \
335 register unsigned long __##arg2 asm ("r9") = arg2; \ 344 register unsigned long __##arg2 asm ("r9") = arg2; \
@@ -357,6 +366,13 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
357 return ia64_intri_res; \ 366 return ia64_intri_res; \
358 } 367 }
359 368
369#define PARAVIRT_DEFINE_CPU_OP1_VOID(op, type) \
370 static inline void \
371 paravirt_ ## op (void *arg1) \
372 { \
373 PARAVIRT_BR1_VOID(op, type, arg1); \
374 }
375
360#define PARAVIRT_DEFINE_CPU_OP1(op, type) \ 376#define PARAVIRT_DEFINE_CPU_OP1(op, type) \
361 static inline void \ 377 static inline void \
362 paravirt_ ## op (unsigned long arg1) \ 378 paravirt_ ## op (unsigned long arg1) \
@@ -381,7 +397,7 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
381 } 397 }
382 398
383 399
384PARAVIRT_DEFINE_CPU_OP1(fc, FC); 400PARAVIRT_DEFINE_CPU_OP1_VOID(fc, FC);
385PARAVIRT_DEFINE_CPU_OP1_RET(thash, THASH) 401PARAVIRT_DEFINE_CPU_OP1_RET(thash, THASH)
386PARAVIRT_DEFINE_CPU_OP1_RET(get_cpuid, GET_CPUID) 402PARAVIRT_DEFINE_CPU_OP1_RET(get_cpuid, GET_CPUID)
387PARAVIRT_DEFINE_CPU_OP1_RET(get_pmd, GET_PMD) 403PARAVIRT_DEFINE_CPU_OP1_RET(get_pmd, GET_PMD)
diff --git a/arch/ia64/include/asm/xen/privop.h b/arch/ia64/include/asm/xen/privop.h
index e5fbaeeb161a..fb4ec5e0b066 100644
--- a/arch/ia64/include/asm/xen/privop.h
+++ b/arch/ia64/include/asm/xen/privop.h
@@ -69,7 +69,7 @@
69 * may have different semantics depending on whether they are executed 69 * may have different semantics depending on whether they are executed
70 * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't 70 * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't
71 * be allowed to execute directly, lest incorrect semantics result. */ 71 * be allowed to execute directly, lest incorrect semantics result. */
72extern void xen_fc(unsigned long addr); 72extern void xen_fc(void *addr);
73extern unsigned long xen_thash(unsigned long addr); 73extern unsigned long xen_thash(unsigned long addr);
74 74
75/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag" 75/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag"
diff --git a/arch/ia64/kernel/paravirt.c b/arch/ia64/kernel/paravirt.c
index 158d52414e96..a21d7bb9c69c 100644
--- a/arch/ia64/kernel/paravirt.c
+++ b/arch/ia64/kernel/paravirt.c
@@ -70,7 +70,14 @@ struct pv_init_ops pv_init_ops =
70 ia64_native_ ## name ## _func(unsigned long arg) \ 70 ia64_native_ ## name ## _func(unsigned long arg) \
71 { \ 71 { \
72 ia64_native_ ## name(arg); \ 72 ia64_native_ ## name(arg); \
73 } \ 73 }
74
75#define DEFINE_VOID_FUNC1_VOID(name) \
76 static void \
77 ia64_native_ ## name ## _func(void *arg) \
78 { \
79 ia64_native_ ## name(arg); \
80 }
74 81
75#define DEFINE_VOID_FUNC2(name) \ 82#define DEFINE_VOID_FUNC2(name) \
76 static void \ 83 static void \
@@ -78,7 +85,7 @@ struct pv_init_ops pv_init_ops =
78 unsigned long arg1) \ 85 unsigned long arg1) \
79 { \ 86 { \
80 ia64_native_ ## name(arg0, arg1); \ 87 ia64_native_ ## name(arg0, arg1); \
81 } \ 88 }
82 89
83#define DEFINE_FUNC0(name) \ 90#define DEFINE_FUNC0(name) \
84 static unsigned long \ 91 static unsigned long \
@@ -94,7 +101,7 @@ struct pv_init_ops pv_init_ops =
94 return ia64_native_ ## name(arg); \ 101 return ia64_native_ ## name(arg); \
95 } \ 102 } \
96 103
97DEFINE_VOID_FUNC1(fc); 104DEFINE_VOID_FUNC1_VOID(fc);
98DEFINE_VOID_FUNC1(intrin_local_irq_restore); 105DEFINE_VOID_FUNC1(intrin_local_irq_restore);
99 106
100DEFINE_VOID_FUNC2(ptcga); 107DEFINE_VOID_FUNC2(ptcga);
@@ -308,6 +315,11 @@ ia64_native_setreg_func(int regnum, unsigned long val)
308 ia64_native_ ## name ## _func(unsigned long arg); \ 315 ia64_native_ ## name ## _func(unsigned long arg); \
309 __DEFINE_FUNC(name, code) 316 __DEFINE_FUNC(name, code)
310 317
318#define DEFINE_VOID_FUNC1_VOID(name, code) \
319 extern void \
320 ia64_native_ ## name ## _func(void *arg); \
321 __DEFINE_FUNC(name, code)
322
311#define DEFINE_VOID_FUNC2(name, code) \ 323#define DEFINE_VOID_FUNC2(name, code) \
312 extern void \ 324 extern void \
313 ia64_native_ ## name ## _func(unsigned long arg0, \ 325 ia64_native_ ## name ## _func(unsigned long arg0, \
@@ -324,8 +336,8 @@ ia64_native_setreg_func(int regnum, unsigned long val)
324 ia64_native_ ## name ## _func(type arg); \ 336 ia64_native_ ## name ## _func(type arg); \
325 __DEFINE_FUNC(name, code) 337 __DEFINE_FUNC(name, code)
326 338
327DEFINE_VOID_FUNC1(fc, 339DEFINE_VOID_FUNC1_VOID(fc,
328 "fc r8\n"); 340 "fc r8\n");
329DEFINE_VOID_FUNC1(intrin_local_irq_restore, 341DEFINE_VOID_FUNC1(intrin_local_irq_restore,
330 ";;\n" 342 ";;\n"
331 " cmp.ne p6, p7 = r8, r0\n" 343 " cmp.ne p6, p7 = r8, r0\n"
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index 64c6f95daa34..68a1311db806 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -249,7 +249,7 @@ void ia64_patch_phys_stack_reg(unsigned long val)
249 while (offp < end) { 249 while (offp < end) {
250 ip = (u64) offp + *offp; 250 ip = (u64) offp + *offp;
251 ia64_patch(ip, mask, imm); 251 ia64_patch(ip, mask, imm);
252 ia64_fc(ip); 252 ia64_fc((void *)ip);
253 ++offp; 253 ++offp;
254 } 254 }
255 ia64_sync_i(); 255 ia64_sync_i();
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 28f982045f29..0344c6664485 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -70,7 +70,7 @@ static void kvm_flush_icache(unsigned long start, unsigned long len)
70 int l; 70 int l;
71 71
72 for (l = 0; l < (len + 32); l += 32) 72 for (l = 0; l < (len + 32); l += 32)
73 ia64_fc(start + l); 73 ia64_fc((void *)(start + l));
74 74
75 ia64_sync_i(); 75 ia64_sync_i();
76 ia64_srlz_i(); 76 ia64_srlz_i();
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c
index ecd526b55323..6839a52f7a41 100644
--- a/arch/ia64/kvm/vcpu.c
+++ b/arch/ia64/kvm/vcpu.c
@@ -390,7 +390,7 @@ void set_rse_reg(struct kvm_pt_regs *regs, unsigned long r1,
390 else 390 else
391 *rnat_addr = (*rnat_addr) & (~nat_mask); 391 *rnat_addr = (*rnat_addr) & (~nat_mask);
392 392
393 ia64_setreg(_IA64_REG_AR_BSPSTORE, bspstore); 393 ia64_setreg(_IA64_REG_AR_BSPSTORE, (unsigned long)bspstore);
394 ia64_setreg(_IA64_REG_AR_RNAT, rnat); 394 ia64_setreg(_IA64_REG_AR_RNAT, rnat);
395 } 395 }
396 local_irq_restore(psr); 396 local_irq_restore(psr);
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c
index bf3c74cb150f..5e2270a999fa 100644
--- a/arch/ia64/xen/xen_pv_ops.c
+++ b/arch/ia64/xen/xen_pv_ops.c
@@ -416,6 +416,11 @@ xen_intrin_local_irq_restore(unsigned long mask)
416 xen_ ## name (unsigned long arg); \ 416 xen_ ## name (unsigned long arg); \
417 __DEFINE_FUNC(name, code) 417 __DEFINE_FUNC(name, code)
418 418
419#define DEFINE_VOID_FUNC1_VOID(name, code) \
420 extern void \
421 xen_ ## name (void *arg); \
422 __DEFINE_FUNC(name, code)
423
419#define DEFINE_VOID_FUNC2(name, code) \ 424#define DEFINE_VOID_FUNC2(name, code) \
420 extern void \ 425 extern void \
421 xen_ ## name (unsigned long arg0, \ 426 xen_ ## name (unsigned long arg0, \
@@ -530,8 +535,8 @@ DEFINE_FUNC0(get_itc,
530 "(p6) hint @pause\n" 535 "(p6) hint @pause\n"
531 "(p6) br.cond.spnt 888b\n"); 536 "(p6) br.cond.spnt 888b\n");
532 537
533DEFINE_VOID_FUNC1(fc, 538DEFINE_VOID_FUNC1_VOID(fc,
534 "break " __stringify(HYPERPRIVOP_FC) "\n"); 539 "break " __stringify(HYPERPRIVOP_FC) "\n");
535 540
536/* 541/*
537 * psr_i_addr_addr = XEN_PSR_I_ADDR_ADDR 542 * psr_i_addr_addr = XEN_PSR_I_ADDR_ADDR