aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-23 13:15:51 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-27 17:23:00 +1000
commitba0dd617a3e23321a14cb38ff7ad6f796ba32c34 (patch)
tree22c600620587cc1927215bdf61b88d1613336066 /arch/powerpc/platforms
parent6b67f62cf655c80147435544a2f8f6f57e07ec87 (diff)
powerpc: Create arch/powerpc/platforms/iseries
I also move arch/ppc64/kernel/HvCall.c to arch/powerpc/platforms/iseries/hvcall.c. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/Makefile9
-rw-r--r--arch/powerpc/platforms/iseries/Makefile1
-rw-r--r--arch/powerpc/platforms/iseries/hvcall.c35
3 files changed, 41 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index dbc093759a8..697addea192 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,4 +1,5 @@
-obj-$(CONFIG_PPC_PMAC) += powermac/
-obj-$(CONFIG_4xx) += 4xx/
-obj-$(CONFIG_83xx) += 83xx/
-obj-$(CONFIG_85xx) += 85xx/
+obj-$(CONFIG_PPC_PMAC) += powermac/
+obj-$(CONFIG_4xx) += 4xx/
+obj-$(CONFIG_83xx) += 83xx/
+obj-$(CONFIG_85xx) += 85xx/
+obj-$(CONFIG_PPC_ISERIES) += iseries/
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile
new file mode 100644
index 00000000000..af0c7d97121
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_PPC_ISERIES) += hvcall.o
diff --git a/arch/powerpc/platforms/iseries/hvcall.c b/arch/powerpc/platforms/iseries/hvcall.c
new file mode 100644
index 00000000000..f61e2e9ac9e
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/hvcall.c
@@ -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;
+ }
+}