diff options
author | Liu Yu-B13201 <Yu.Liu@freescale.com> | 2012-07-03 01:48:56 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-05 17:38:38 -0400 |
commit | 8e525d59d024f54b88a038faac38f76b9094774e (patch) | |
tree | 50b1debb48264f66cb4c7110ba273fb51a7e2329 /arch/powerpc/include/asm | |
parent | 305bcf26128e380bb1296d2802387659ab8b038e (diff) |
PPC: Don't use hardcoded opcode for ePAPR hcall invocation
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/epapr_hcalls.h | 22 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_hcalls.h | 36 |
2 files changed, 29 insertions, 29 deletions
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h index 833ce2c2d505..b8d94459a929 100644 --- a/arch/powerpc/include/asm/epapr_hcalls.h +++ b/arch/powerpc/include/asm/epapr_hcalls.h | |||
@@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt, | |||
195 | r5 = priority; | 195 | r5 = priority; |
196 | r6 = destination; | 196 | r6 = destination; |
197 | 197 | ||
198 | __asm__ __volatile__ ("sc 1" | 198 | asm volatile("bl epapr_hypercall_start" |
199 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6) | 199 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6) |
200 | : : EV_HCALL_CLOBBERS4 | 200 | : : EV_HCALL_CLOBBERS4 |
201 | ); | 201 | ); |
@@ -224,7 +224,7 @@ static inline unsigned int ev_int_get_config(unsigned int interrupt, | |||
224 | r11 = EV_HCALL_TOKEN(EV_INT_GET_CONFIG); | 224 | r11 = EV_HCALL_TOKEN(EV_INT_GET_CONFIG); |
225 | r3 = interrupt; | 225 | r3 = interrupt; |
226 | 226 | ||
227 | __asm__ __volatile__ ("sc 1" | 227 | asm volatile("bl epapr_hypercall_start" |
228 | : "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5), "=r" (r6) | 228 | : "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5), "=r" (r6) |
229 | : : EV_HCALL_CLOBBERS4 | 229 | : : EV_HCALL_CLOBBERS4 |
230 | ); | 230 | ); |
@@ -254,7 +254,7 @@ static inline unsigned int ev_int_set_mask(unsigned int interrupt, | |||
254 | r3 = interrupt; | 254 | r3 = interrupt; |
255 | r4 = mask; | 255 | r4 = mask; |
256 | 256 | ||
257 | __asm__ __volatile__ ("sc 1" | 257 | asm volatile("bl epapr_hypercall_start" |
258 | : "+r" (r11), "+r" (r3), "+r" (r4) | 258 | : "+r" (r11), "+r" (r3), "+r" (r4) |
259 | : : EV_HCALL_CLOBBERS2 | 259 | : : EV_HCALL_CLOBBERS2 |
260 | ); | 260 | ); |
@@ -279,7 +279,7 @@ static inline unsigned int ev_int_get_mask(unsigned int interrupt, | |||
279 | r11 = EV_HCALL_TOKEN(EV_INT_GET_MASK); | 279 | r11 = EV_HCALL_TOKEN(EV_INT_GET_MASK); |
280 | r3 = interrupt; | 280 | r3 = interrupt; |
281 | 281 | ||
282 | __asm__ __volatile__ ("sc 1" | 282 | asm volatile("bl epapr_hypercall_start" |
283 | : "+r" (r11), "+r" (r3), "=r" (r4) | 283 | : "+r" (r11), "+r" (r3), "=r" (r4) |
284 | : : EV_HCALL_CLOBBERS2 | 284 | : : EV_HCALL_CLOBBERS2 |
285 | ); | 285 | ); |
@@ -307,7 +307,7 @@ static inline unsigned int ev_int_eoi(unsigned int interrupt) | |||
307 | r11 = EV_HCALL_TOKEN(EV_INT_EOI); | 307 | r11 = EV_HCALL_TOKEN(EV_INT_EOI); |
308 | r3 = interrupt; | 308 | r3 = interrupt; |
309 | 309 | ||
310 | __asm__ __volatile__ ("sc 1" | 310 | asm volatile("bl epapr_hypercall_start" |
311 | : "+r" (r11), "+r" (r3) | 311 | : "+r" (r11), "+r" (r3) |
312 | : : EV_HCALL_CLOBBERS1 | 312 | : : EV_HCALL_CLOBBERS1 |
313 | ); | 313 | ); |
@@ -346,7 +346,7 @@ static inline unsigned int ev_byte_channel_send(unsigned int handle, | |||
346 | r7 = be32_to_cpu(p[2]); | 346 | r7 = be32_to_cpu(p[2]); |
347 | r8 = be32_to_cpu(p[3]); | 347 | r8 = be32_to_cpu(p[3]); |
348 | 348 | ||
349 | __asm__ __volatile__ ("sc 1" | 349 | asm volatile("bl epapr_hypercall_start" |
350 | : "+r" (r11), "+r" (r3), | 350 | : "+r" (r11), "+r" (r3), |
351 | "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), "+r" (r8) | 351 | "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), "+r" (r8) |
352 | : : EV_HCALL_CLOBBERS6 | 352 | : : EV_HCALL_CLOBBERS6 |
@@ -385,7 +385,7 @@ static inline unsigned int ev_byte_channel_receive(unsigned int handle, | |||
385 | r3 = handle; | 385 | r3 = handle; |
386 | r4 = *count; | 386 | r4 = *count; |
387 | 387 | ||
388 | __asm__ __volatile__ ("sc 1" | 388 | asm volatile("bl epapr_hypercall_start" |
389 | : "+r" (r11), "+r" (r3), "+r" (r4), | 389 | : "+r" (r11), "+r" (r3), "+r" (r4), |
390 | "=r" (r5), "=r" (r6), "=r" (r7), "=r" (r8) | 390 | "=r" (r5), "=r" (r6), "=r" (r7), "=r" (r8) |
391 | : : EV_HCALL_CLOBBERS6 | 391 | : : EV_HCALL_CLOBBERS6 |
@@ -423,7 +423,7 @@ static inline unsigned int ev_byte_channel_poll(unsigned int handle, | |||
423 | r11 = EV_HCALL_TOKEN(EV_BYTE_CHANNEL_POLL); | 423 | r11 = EV_HCALL_TOKEN(EV_BYTE_CHANNEL_POLL); |
424 | r3 = handle; | 424 | r3 = handle; |
425 | 425 | ||
426 | __asm__ __volatile__ ("sc 1" | 426 | asm volatile("bl epapr_hypercall_start" |
427 | : "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5) | 427 | : "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5) |
428 | : : EV_HCALL_CLOBBERS3 | 428 | : : EV_HCALL_CLOBBERS3 |
429 | ); | 429 | ); |
@@ -456,7 +456,7 @@ static inline unsigned int ev_int_iack(unsigned int handle, | |||
456 | r11 = EV_HCALL_TOKEN(EV_INT_IACK); | 456 | r11 = EV_HCALL_TOKEN(EV_INT_IACK); |
457 | r3 = handle; | 457 | r3 = handle; |
458 | 458 | ||
459 | __asm__ __volatile__ ("sc 1" | 459 | asm volatile("bl epapr_hypercall_start" |
460 | : "+r" (r11), "+r" (r3), "=r" (r4) | 460 | : "+r" (r11), "+r" (r3), "=r" (r4) |
461 | : : EV_HCALL_CLOBBERS2 | 461 | : : EV_HCALL_CLOBBERS2 |
462 | ); | 462 | ); |
@@ -480,7 +480,7 @@ static inline unsigned int ev_doorbell_send(unsigned int handle) | |||
480 | r11 = EV_HCALL_TOKEN(EV_DOORBELL_SEND); | 480 | r11 = EV_HCALL_TOKEN(EV_DOORBELL_SEND); |
481 | r3 = handle; | 481 | r3 = handle; |
482 | 482 | ||
483 | __asm__ __volatile__ ("sc 1" | 483 | asm volatile("bl epapr_hypercall_start" |
484 | : "+r" (r11), "+r" (r3) | 484 | : "+r" (r11), "+r" (r3) |
485 | : : EV_HCALL_CLOBBERS1 | 485 | : : EV_HCALL_CLOBBERS1 |
486 | ); | 486 | ); |
@@ -500,7 +500,7 @@ static inline unsigned int ev_idle(void) | |||
500 | 500 | ||
501 | r11 = EV_HCALL_TOKEN(EV_IDLE); | 501 | r11 = EV_HCALL_TOKEN(EV_IDLE); |
502 | 502 | ||
503 | __asm__ __volatile__ ("sc 1" | 503 | asm volatile("bl epapr_hypercall_start" |
504 | : "+r" (r11), "=r" (r3) | 504 | : "+r" (r11), "=r" (r3) |
505 | : : EV_HCALL_CLOBBERS1 | 505 | : : EV_HCALL_CLOBBERS1 |
506 | ); | 506 | ); |
diff --git a/arch/powerpc/include/asm/fsl_hcalls.h b/arch/powerpc/include/asm/fsl_hcalls.h index 922d9b5fe3d5..3abb58394da4 100644 --- a/arch/powerpc/include/asm/fsl_hcalls.h +++ b/arch/powerpc/include/asm/fsl_hcalls.h | |||
@@ -96,7 +96,7 @@ static inline unsigned int fh_send_nmi(unsigned int vcpu_mask) | |||
96 | r11 = FH_HCALL_TOKEN(FH_SEND_NMI); | 96 | r11 = FH_HCALL_TOKEN(FH_SEND_NMI); |
97 | r3 = vcpu_mask; | 97 | r3 = vcpu_mask; |
98 | 98 | ||
99 | __asm__ __volatile__ ("sc 1" | 99 | asm volatile("bl epapr_hypercall_start" |
100 | : "+r" (r11), "+r" (r3) | 100 | : "+r" (r11), "+r" (r3) |
101 | : : EV_HCALL_CLOBBERS1 | 101 | : : EV_HCALL_CLOBBERS1 |
102 | ); | 102 | ); |
@@ -151,7 +151,7 @@ static inline unsigned int fh_partition_get_dtprop(int handle, | |||
151 | r9 = (uint32_t)propvalue_addr; | 151 | r9 = (uint32_t)propvalue_addr; |
152 | r10 = *propvalue_len; | 152 | r10 = *propvalue_len; |
153 | 153 | ||
154 | __asm__ __volatile__ ("sc 1" | 154 | asm volatile("bl epapr_hypercall_start" |
155 | : "+r" (r11), | 155 | : "+r" (r11), |
156 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), | 156 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), |
157 | "+r" (r8), "+r" (r9), "+r" (r10) | 157 | "+r" (r8), "+r" (r9), "+r" (r10) |
@@ -205,7 +205,7 @@ static inline unsigned int fh_partition_set_dtprop(int handle, | |||
205 | r9 = (uint32_t)propvalue_addr; | 205 | r9 = (uint32_t)propvalue_addr; |
206 | r10 = propvalue_len; | 206 | r10 = propvalue_len; |
207 | 207 | ||
208 | __asm__ __volatile__ ("sc 1" | 208 | asm volatile("bl epapr_hypercall_start" |
209 | : "+r" (r11), | 209 | : "+r" (r11), |
210 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), | 210 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), |
211 | "+r" (r8), "+r" (r9), "+r" (r10) | 211 | "+r" (r8), "+r" (r9), "+r" (r10) |
@@ -229,7 +229,7 @@ static inline unsigned int fh_partition_restart(unsigned int partition) | |||
229 | r11 = FH_HCALL_TOKEN(FH_PARTITION_RESTART); | 229 | r11 = FH_HCALL_TOKEN(FH_PARTITION_RESTART); |
230 | r3 = partition; | 230 | r3 = partition; |
231 | 231 | ||
232 | __asm__ __volatile__ ("sc 1" | 232 | asm volatile("bl epapr_hypercall_start" |
233 | : "+r" (r11), "+r" (r3) | 233 | : "+r" (r11), "+r" (r3) |
234 | : : EV_HCALL_CLOBBERS1 | 234 | : : EV_HCALL_CLOBBERS1 |
235 | ); | 235 | ); |
@@ -262,7 +262,7 @@ static inline unsigned int fh_partition_get_status(unsigned int partition, | |||
262 | r11 = FH_HCALL_TOKEN(FH_PARTITION_GET_STATUS); | 262 | r11 = FH_HCALL_TOKEN(FH_PARTITION_GET_STATUS); |
263 | r3 = partition; | 263 | r3 = partition; |
264 | 264 | ||
265 | __asm__ __volatile__ ("sc 1" | 265 | asm volatile("bl epapr_hypercall_start" |
266 | : "+r" (r11), "+r" (r3), "=r" (r4) | 266 | : "+r" (r11), "+r" (r3), "=r" (r4) |
267 | : : EV_HCALL_CLOBBERS2 | 267 | : : EV_HCALL_CLOBBERS2 |
268 | ); | 268 | ); |
@@ -295,7 +295,7 @@ static inline unsigned int fh_partition_start(unsigned int partition, | |||
295 | r4 = entry_point; | 295 | r4 = entry_point; |
296 | r5 = load; | 296 | r5 = load; |
297 | 297 | ||
298 | __asm__ __volatile__ ("sc 1" | 298 | asm volatile("bl epapr_hypercall_start" |
299 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5) | 299 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5) |
300 | : : EV_HCALL_CLOBBERS3 | 300 | : : EV_HCALL_CLOBBERS3 |
301 | ); | 301 | ); |
@@ -317,7 +317,7 @@ static inline unsigned int fh_partition_stop(unsigned int partition) | |||
317 | r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP); | 317 | r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP); |
318 | r3 = partition; | 318 | r3 = partition; |
319 | 319 | ||
320 | __asm__ __volatile__ ("sc 1" | 320 | asm volatile("bl epapr_hypercall_start" |
321 | : "+r" (r11), "+r" (r3) | 321 | : "+r" (r11), "+r" (r3) |
322 | : : EV_HCALL_CLOBBERS1 | 322 | : : EV_HCALL_CLOBBERS1 |
323 | ); | 323 | ); |
@@ -376,7 +376,7 @@ static inline unsigned int fh_partition_memcpy(unsigned int source, | |||
376 | #endif | 376 | #endif |
377 | r7 = count; | 377 | r7 = count; |
378 | 378 | ||
379 | __asm__ __volatile__ ("sc 1" | 379 | asm volatile("bl epapr_hypercall_start" |
380 | : "+r" (r11), | 380 | : "+r" (r11), |
381 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7) | 381 | "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7) |
382 | : : EV_HCALL_CLOBBERS5 | 382 | : : EV_HCALL_CLOBBERS5 |
@@ -399,7 +399,7 @@ static inline unsigned int fh_dma_enable(unsigned int liodn) | |||
399 | r11 = FH_HCALL_TOKEN(FH_DMA_ENABLE); | 399 | r11 = FH_HCALL_TOKEN(FH_DMA_ENABLE); |
400 | r3 = liodn; | 400 | r3 = liodn; |
401 | 401 | ||
402 | __asm__ __volatile__ ("sc 1" | 402 | asm volatile("bl epapr_hypercall_start" |
403 | : "+r" (r11), "+r" (r3) | 403 | : "+r" (r11), "+r" (r3) |
404 | : : EV_HCALL_CLOBBERS1 | 404 | : : EV_HCALL_CLOBBERS1 |
405 | ); | 405 | ); |
@@ -421,7 +421,7 @@ static inline unsigned int fh_dma_disable(unsigned int liodn) | |||
421 | r11 = FH_HCALL_TOKEN(FH_DMA_DISABLE); | 421 | r11 = FH_HCALL_TOKEN(FH_DMA_DISABLE); |
422 | r3 = liodn; | 422 | r3 = liodn; |
423 | 423 | ||
424 | __asm__ __volatile__ ("sc 1" | 424 | asm volatile("bl epapr_hypercall_start" |
425 | : "+r" (r11), "+r" (r3) | 425 | : "+r" (r11), "+r" (r3) |
426 | : : EV_HCALL_CLOBBERS1 | 426 | : : EV_HCALL_CLOBBERS1 |
427 | ); | 427 | ); |
@@ -447,7 +447,7 @@ static inline unsigned int fh_vmpic_get_msir(unsigned int interrupt, | |||
447 | r11 = FH_HCALL_TOKEN(FH_VMPIC_GET_MSIR); | 447 | r11 = FH_HCALL_TOKEN(FH_VMPIC_GET_MSIR); |
448 | r3 = interrupt; | 448 | r3 = interrupt; |
449 | 449 | ||
450 | __asm__ __volatile__ ("sc 1" | 450 | asm volatile("bl epapr_hypercall_start" |
451 | : "+r" (r11), "+r" (r3), "=r" (r4) | 451 | : "+r" (r11), "+r" (r3), "=r" (r4) |
452 | : : EV_HCALL_CLOBBERS2 | 452 | : : EV_HCALL_CLOBBERS2 |
453 | ); | 453 | ); |
@@ -469,7 +469,7 @@ static inline unsigned int fh_system_reset(void) | |||
469 | 469 | ||
470 | r11 = FH_HCALL_TOKEN(FH_SYSTEM_RESET); | 470 | r11 = FH_HCALL_TOKEN(FH_SYSTEM_RESET); |
471 | 471 | ||
472 | __asm__ __volatile__ ("sc 1" | 472 | asm volatile("bl epapr_hypercall_start" |
473 | : "+r" (r11), "=r" (r3) | 473 | : "+r" (r11), "=r" (r3) |
474 | : : EV_HCALL_CLOBBERS1 | 474 | : : EV_HCALL_CLOBBERS1 |
475 | ); | 475 | ); |
@@ -506,7 +506,7 @@ static inline unsigned int fh_err_get_info(int queue, uint32_t *bufsize, | |||
506 | r6 = addr_lo; | 506 | r6 = addr_lo; |
507 | r7 = peek; | 507 | r7 = peek; |
508 | 508 | ||
509 | __asm__ __volatile__ ("sc 1" | 509 | asm volatile("bl epapr_hypercall_start" |
510 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), | 510 | : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), |
511 | "+r" (r7) | 511 | "+r" (r7) |
512 | : : EV_HCALL_CLOBBERS5 | 512 | : : EV_HCALL_CLOBBERS5 |
@@ -542,7 +542,7 @@ static inline unsigned int fh_get_core_state(unsigned int handle, | |||
542 | r3 = handle; | 542 | r3 = handle; |
543 | r4 = vcpu; | 543 | r4 = vcpu; |
544 | 544 | ||
545 | __asm__ __volatile__ ("sc 1" | 545 | asm volatile("bl epapr_hypercall_start" |
546 | : "+r" (r11), "+r" (r3), "+r" (r4) | 546 | : "+r" (r11), "+r" (r3), "+r" (r4) |
547 | : : EV_HCALL_CLOBBERS2 | 547 | : : EV_HCALL_CLOBBERS2 |
548 | ); | 548 | ); |
@@ -572,7 +572,7 @@ static inline unsigned int fh_enter_nap(unsigned int handle, unsigned int vcpu) | |||
572 | r3 = handle; | 572 | r3 = handle; |
573 | r4 = vcpu; | 573 | r4 = vcpu; |
574 | 574 | ||
575 | __asm__ __volatile__ ("sc 1" | 575 | asm volatile("bl epapr_hypercall_start" |
576 | : "+r" (r11), "+r" (r3), "+r" (r4) | 576 | : "+r" (r11), "+r" (r3), "+r" (r4) |
577 | : : EV_HCALL_CLOBBERS2 | 577 | : : EV_HCALL_CLOBBERS2 |
578 | ); | 578 | ); |
@@ -597,7 +597,7 @@ static inline unsigned int fh_exit_nap(unsigned int handle, unsigned int vcpu) | |||
597 | r3 = handle; | 597 | r3 = handle; |
598 | r4 = vcpu; | 598 | r4 = vcpu; |
599 | 599 | ||
600 | __asm__ __volatile__ ("sc 1" | 600 | asm volatile("bl epapr_hypercall_start" |
601 | : "+r" (r11), "+r" (r3), "+r" (r4) | 601 | : "+r" (r11), "+r" (r3), "+r" (r4) |
602 | : : EV_HCALL_CLOBBERS2 | 602 | : : EV_HCALL_CLOBBERS2 |
603 | ); | 603 | ); |
@@ -618,7 +618,7 @@ static inline unsigned int fh_claim_device(unsigned int handle) | |||
618 | r11 = FH_HCALL_TOKEN(FH_CLAIM_DEVICE); | 618 | r11 = FH_HCALL_TOKEN(FH_CLAIM_DEVICE); |
619 | r3 = handle; | 619 | r3 = handle; |
620 | 620 | ||
621 | __asm__ __volatile__ ("sc 1" | 621 | asm volatile("bl epapr_hypercall_start" |
622 | : "+r" (r11), "+r" (r3) | 622 | : "+r" (r11), "+r" (r3) |
623 | : : EV_HCALL_CLOBBERS1 | 623 | : : EV_HCALL_CLOBBERS1 |
624 | ); | 624 | ); |
@@ -645,7 +645,7 @@ static inline unsigned int fh_partition_stop_dma(unsigned int handle) | |||
645 | r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP_DMA); | 645 | r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP_DMA); |
646 | r3 = handle; | 646 | r3 = handle; |
647 | 647 | ||
648 | __asm__ __volatile__ ("sc 1" | 648 | asm volatile("bl epapr_hypercall_start" |
649 | : "+r" (r11), "+r" (r3) | 649 | : "+r" (r11), "+r" (r3) |
650 | : : EV_HCALL_CLOBBERS1 | 650 | : : EV_HCALL_CLOBBERS1 |
651 | ); | 651 | ); |