powerpc: move hvCall.s to powerpc/platforms/iseries
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 14:17:40 +0000 (00:17 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 14:17:40 +0000 (00:17 +1000)
Rename it to hvcall.S and (so I can do that) rename hvcall.c
to hvlog.c - a more appropriate name.

Do some white space cleanups.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/platforms/iseries/Makefile
arch/powerpc/platforms/iseries/hvcall.S [new file with mode: 0644]
arch/powerpc/platforms/iseries/hvcall.c [deleted file]
arch/powerpc/platforms/iseries/hvlog.c [new file with mode: 0644]
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/hvCall.S [deleted file]

index a5e91c9db5c7f898d17cee6930eb4f6a7224ee02..3a9981a35e2ace3024ba63ddcbda93e1309bc846 100644 (file)
@@ -1 +1 @@
-obj-y += hvcall.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o
+obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o hvcall.o
diff --git a/arch/powerpc/platforms/iseries/hvcall.S b/arch/powerpc/platforms/iseries/hvcall.S
new file mode 100644 (file)
index 0000000..9901c0e
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * This file contains the code to perform calls to the
+ * iSeries LPAR hypervisor
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <asm/ppc_asm.h>
+#include <asm/processor.h>
+
+       .text
+
+/*
+ * Hypervisor call
+ *
+ * Invoke the iSeries hypervisor via the System Call instruction
+ * Parameters are passed to this routine in registers r3 - r10
+ *
+ * r3 contains the HV function to be called
+ * r4-r10 contain the operands to the hypervisor function
+ *
+ */
+
+_GLOBAL(HvCall)
+_GLOBAL(HvCall0)
+_GLOBAL(HvCall1)
+_GLOBAL(HvCall2)
+_GLOBAL(HvCall3)
+_GLOBAL(HvCall4)
+_GLOBAL(HvCall5)
+_GLOBAL(HvCall6)
+_GLOBAL(HvCall7)
+
+
+       mfcr    r0
+       std     r0,-8(r1)
+       stdu    r1,-(STACK_FRAME_OVERHEAD+16)(r1)
+
+       /* r0 = 0xffffffffffffffff indicates a hypervisor call */
+
+       li      r0,-1
+
+       /* Invoke the hypervisor */
+
+       sc
+
+       ld      r1,0(r1)
+       ld      r0,-8(r1)
+       mtcrf   0xff,r0
+
+       /*  return to caller, return value in r3 */
+
+       blr
+
+_GLOBAL(HvCall0Ret16)
+_GLOBAL(HvCall1Ret16)
+_GLOBAL(HvCall2Ret16)
+_GLOBAL(HvCall3Ret16)
+_GLOBAL(HvCall4Ret16)
+_GLOBAL(HvCall5Ret16)
+_GLOBAL(HvCall6Ret16)
+_GLOBAL(HvCall7Ret16)
+
+       mfcr    r0
+       std     r0,-8(r1)
+       std     r31,-16(r1)
+       stdu    r1,-(STACK_FRAME_OVERHEAD+32)(r1)
+
+       mr      r31,r4
+       li      r0,-1
+       mr      r4,r5
+       mr      r5,r6
+       mr      r6,r7
+       mr      r7,r8
+       mr      r8,r9
+       mr      r9,r10
+
+       sc
+
+       std     r3,0(r31)
+       std     r4,8(r31)
+
+       mr      r3,r5
+
+       ld      r1,0(r1)
+       ld      r0,-8(r1)
+       mtcrf   0xff,r0
+       ld      r31,-16(r1)
+
+       blr
diff --git a/arch/powerpc/platforms/iseries/hvcall.c b/arch/powerpc/platforms/iseries/hvcall.c
deleted file mode 100644 (file)
index f61e2e9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2001  Mike Corrigan IBM Corporation
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include <asm/page.h>
-#include <asm/abs_addr.h>
-#include <asm/iSeries/HvCall.h>
-#include <asm/iSeries/HvCallSc.h>
-#include <asm/iSeries/HvTypes.h>
-
-
-void HvCall_writeLogBuffer(const void *buffer, u64 len)
-{
-       struct HvLpBufferList hv_buf;
-       u64 left_this_page;
-       u64 cur = virt_to_abs(buffer);
-
-       while (len) {
-               hv_buf.addr = cur;
-               left_this_page = ((cur & PAGE_MASK) + PAGE_SIZE) - cur;
-               if (left_this_page > len)
-                       left_this_page = len;
-               hv_buf.len = left_this_page;
-               len -= left_this_page;
-               HvCall2(HvCallBaseWriteLogBuffer,
-                               virt_to_abs(&hv_buf),
-                               left_this_page);
-               cur = (cur & PAGE_MASK) + PAGE_SIZE;
-       }
-}
diff --git a/arch/powerpc/platforms/iseries/hvlog.c b/arch/powerpc/platforms/iseries/hvlog.c
new file mode 100644 (file)
index 0000000..f61e2e9
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2001  Mike Corrigan IBM Corporation
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <asm/page.h>
+#include <asm/abs_addr.h>
+#include <asm/iSeries/HvCall.h>
+#include <asm/iSeries/HvCallSc.h>
+#include <asm/iSeries/HvTypes.h>
+
+
+void HvCall_writeLogBuffer(const void *buffer, u64 len)
+{
+       struct HvLpBufferList hv_buf;
+       u64 left_this_page;
+       u64 cur = virt_to_abs(buffer);
+
+       while (len) {
+               hv_buf.addr = cur;
+               left_this_page = ((cur & PAGE_MASK) + PAGE_SIZE) - cur;
+               if (left_this_page > len)
+                       left_this_page = len;
+               hv_buf.len = left_this_page;
+               len -= left_this_page;
+               HvCall2(HvCallBaseWriteLogBuffer,
+                               virt_to_abs(&hv_buf),
+                               left_this_page);
+               cur = (cur & PAGE_MASK) + PAGE_SIZE;
+       }
+}
index e3bce4dda502d1bcc9880aca1c05d1c0487e8103..f84ae358db0a2f15cc5bd8e48289ef0a145af95d 100644 (file)
@@ -22,8 +22,7 @@ pci-obj-$(CONFIG_PPC_MULTIPLATFORM)   += pci_dn.o pci_direct_iommu.o
 
 obj-$(CONFIG_PCI)      += pci.o pci_iommu.o iomap.o $(pci-obj-y)
 
-obj-$(CONFIG_PPC_ISERIES) += hvCall.o \
-                            HvLpEvent.o iSeries_proc.o iSeries_htab.o \
+obj-$(CONFIG_PPC_ISERIES) += HvLpEvent.o iSeries_proc.o iSeries_htab.o \
                             iSeries_iommu.o
 
 obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o
diff --git a/arch/ppc64/kernel/hvCall.S b/arch/ppc64/kernel/hvCall.S
deleted file mode 100644 (file)
index 4c699ea..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * arch/ppc64/kernel/hvCall.S
- *
- *
- * This file contains the code to perform calls to the
- * iSeries LPAR hypervisor
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <asm/ppc_asm.h>
-#include <asm/processor.h>
-
-       .text
-
-/* 
- * Hypervisor call
- * 
- * Invoke the iSeries hypervisor via the System Call instruction
- * Parameters are passed to this routine in registers r3 - r10
- * 
- * r3 contains the HV function to be called
- * r4-r10 contain the operands to the hypervisor function
- *
- */
-
-_GLOBAL(HvCall)
-_GLOBAL(HvCall0)
-_GLOBAL(HvCall1)
-_GLOBAL(HvCall2)
-_GLOBAL(HvCall3)
-_GLOBAL(HvCall4)
-_GLOBAL(HvCall5)
-_GLOBAL(HvCall6)
-_GLOBAL(HvCall7)
-
-
-       mfcr    r0
-       std     r0,-8(r1)
-       stdu    r1,-(STACK_FRAME_OVERHEAD+16)(r1)
-       
-       /* r0 = 0xffffffffffffffff indicates a hypervisor call */
-       
-       li      r0,-1
-       
-       /* Invoke the hypervisor */
-
-       sc
-
-       ld      r1,0(r1)
-       ld      r0,-8(r1)
-       mtcrf   0xff,r0
-
-       /*  return to caller, return value in r3 */
-       
-       blr
-
-_GLOBAL(HvCall0Ret16)
-_GLOBAL(HvCall1Ret16)
-_GLOBAL(HvCall2Ret16)
-_GLOBAL(HvCall3Ret16)
-_GLOBAL(HvCall4Ret16)
-_GLOBAL(HvCall5Ret16)
-_GLOBAL(HvCall6Ret16)
-_GLOBAL(HvCall7Ret16)
-
-       mfcr    r0
-       std     r0,-8(r1)
-       std     r31,-16(r1)
-       stdu    r1,-(STACK_FRAME_OVERHEAD+32)(r1)
-
-       mr      r31,r4
-       li      r0,-1
-       mr      r4,r5
-       mr      r5,r6
-       mr      r6,r7
-       mr      r7,r8
-       mr      r8,r9
-       mr      r9,r10
-
-       sc
-
-       std     r3,0(r31)
-       std     r4,8(r31)
-
-       mr      r3,r5
-
-       ld      r1,0(r1)
-       ld      r0,-8(r1)
-       mtcrf   0xff,r0
-       ld      r31,-16(r1)
-       
-       blr
-
-