diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-10-08 00:02:20 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-01-09 04:14:57 -0500 |
commit | b1f0d94c26b64e814243b736f47e7ef40d96432c (patch) | |
tree | fb3c11ffb3def157664a2e0c9d90fa739202e4f7 /arch/powerpc/include/asm/epapr_hcalls.h | |
parent | 1820a8d2163554dcd0272cc095338499db4a4dc3 (diff) |
kvm/powerpc: move kvm_hypercall0() and friends to epapr_hypercall0()
kvm_hypercall0() and friends have nothing KVM specific so moved to
epapr_hypercall0() and friends. Also they are moved from
arch/powerpc/include/asm/kvm_para.h to arch/powerpc/include/asm/epapr_hcalls.h
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/epapr_hcalls.h')
-rw-r--r-- | arch/powerpc/include/asm/epapr_hcalls.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h index eec87f9494bc..334459ad145b 100644 --- a/arch/powerpc/include/asm/epapr_hcalls.h +++ b/arch/powerpc/include/asm/epapr_hcalls.h | |||
@@ -506,5 +506,70 @@ static unsigned long epapr_hypercall(unsigned long *in, | |||
506 | } | 506 | } |
507 | #endif | 507 | #endif |
508 | 508 | ||
509 | static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) | ||
510 | { | ||
511 | unsigned long in[8]; | ||
512 | unsigned long out[8]; | ||
513 | unsigned long r; | ||
514 | |||
515 | r = epapr_hypercall(in, out, nr); | ||
516 | *r2 = out[0]; | ||
517 | |||
518 | return r; | ||
519 | } | ||
520 | |||
521 | static inline long epapr_hypercall0(unsigned int nr) | ||
522 | { | ||
523 | unsigned long in[8]; | ||
524 | unsigned long out[8]; | ||
525 | |||
526 | return epapr_hypercall(in, out, nr); | ||
527 | } | ||
528 | |||
529 | static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) | ||
530 | { | ||
531 | unsigned long in[8]; | ||
532 | unsigned long out[8]; | ||
533 | |||
534 | in[0] = p1; | ||
535 | return epapr_hypercall(in, out, nr); | ||
536 | } | ||
537 | |||
538 | static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, | ||
539 | unsigned long p2) | ||
540 | { | ||
541 | unsigned long in[8]; | ||
542 | unsigned long out[8]; | ||
543 | |||
544 | in[0] = p1; | ||
545 | in[1] = p2; | ||
546 | return epapr_hypercall(in, out, nr); | ||
547 | } | ||
548 | |||
549 | static inline long epapr_hypercall3(unsigned int nr, unsigned long p1, | ||
550 | unsigned long p2, unsigned long p3) | ||
551 | { | ||
552 | unsigned long in[8]; | ||
553 | unsigned long out[8]; | ||
554 | |||
555 | in[0] = p1; | ||
556 | in[1] = p2; | ||
557 | in[2] = p3; | ||
558 | return epapr_hypercall(in, out, nr); | ||
559 | } | ||
560 | |||
561 | static inline long epapr_hypercall4(unsigned int nr, unsigned long p1, | ||
562 | unsigned long p2, unsigned long p3, | ||
563 | unsigned long p4) | ||
564 | { | ||
565 | unsigned long in[8]; | ||
566 | unsigned long out[8]; | ||
567 | |||
568 | in[0] = p1; | ||
569 | in[1] = p2; | ||
570 | in[2] = p3; | ||
571 | in[3] = p4; | ||
572 | return epapr_hypercall(in, out, nr); | ||
573 | } | ||
509 | #endif /* !__ASSEMBLY__ */ | 574 | #endif /* !__ASSEMBLY__ */ |
510 | #endif /* _EPAPR_HCALLS_H */ | 575 | #endif /* _EPAPR_HCALLS_H */ |