aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/epapr_hcalls.h
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2013-10-08 00:02:20 -0400
committerAlexander Graf <agraf@suse.de>2014-01-09 04:14:57 -0500
commitb1f0d94c26b64e814243b736f47e7ef40d96432c (patch)
treefb3c11ffb3def157664a2e0c9d90fa739202e4f7 /arch/powerpc/include/asm/epapr_hcalls.h
parent1820a8d2163554dcd0272cc095338499db4a4dc3 (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.h65
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
509static 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
521static 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
529static 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
538static 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
549static 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
561static 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 */