aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-27 23:28:01 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-27 23:28:01 -0400
commitc111d0bda8437d146ccf5101970801fe4ff23ed8 (patch)
tree3d4a3f0a5b11e2cddfa1f35560a720fe043440ec /arch/powerpc
parent7b875f4dc345dc5f6a2c3bd0e1f90bfee46b2258 (diff)
powerpc: move more iSeries code
Move the iSeries specific parts of misc.S and ppc_ksyms.c into powerpc/platforms/iseries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/iseries/Makefile3
-rw-r--r--arch/powerpc/platforms/iseries/ksyms.c27
-rw-r--r--arch/powerpc/platforms/iseries/misc.S55
3 files changed, 84 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile
index 5a27b888103c..18bf40077561 100644
--- a/arch/powerpc/platforms/iseries/Makefile
+++ b/arch/powerpc/platforms/iseries/Makefile
@@ -1,6 +1,7 @@
1obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ 1obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
2 hvcall.o proc.o htab.o iommu.o 2 hvcall.o proc.o htab.o iommu.o misc.o
3obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o 3obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
4obj-$(CONFIG_IBMVIO) += vio.o 4obj-$(CONFIG_IBMVIO) += vio.o
5obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_VIOPATH) += viopath.o 6obj-$(CONFIG_VIOPATH) += viopath.o
7obj-$(CONFIG_MODULES) += ksyms.o
diff --git a/arch/powerpc/platforms/iseries/ksyms.c b/arch/powerpc/platforms/iseries/ksyms.c
new file mode 100644
index 000000000000..f271b3539721
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/ksyms.c
@@ -0,0 +1,27 @@
1/*
2 * (C) 2001-2005 PPC 64 Team, IBM Corp
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9#include <linux/module.h>
10
11#include <asm/hw_irq.h>
12#include <asm/iSeries/HvCallSc.h>
13
14EXPORT_SYMBOL(HvCall0);
15EXPORT_SYMBOL(HvCall1);
16EXPORT_SYMBOL(HvCall2);
17EXPORT_SYMBOL(HvCall3);
18EXPORT_SYMBOL(HvCall4);
19EXPORT_SYMBOL(HvCall5);
20EXPORT_SYMBOL(HvCall6);
21EXPORT_SYMBOL(HvCall7);
22
23#ifdef CONFIG_SMP
24EXPORT_SYMBOL(local_get_flags);
25EXPORT_SYMBOL(local_irq_disable);
26EXPORT_SYMBOL(local_irq_restore);
27#endif
diff --git a/arch/powerpc/platforms/iseries/misc.S b/arch/powerpc/platforms/iseries/misc.S
new file mode 100644
index 000000000000..09f14522e176
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/misc.S
@@ -0,0 +1,55 @@
1/*
2 * This file contains miscellaneous low-level functions.
3 * Copyright (C) 1995-2005 IBM Corp
4 *
5 * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
6 * and Paul Mackerras.
7 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
8 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#include <asm/processor.h>
17#include <asm/asm-offsets.h>
18
19 .text
20
21/* unsigned long local_save_flags(void) */
22_GLOBAL(local_get_flags)
23 lbz r3,PACAPROCENABLED(r13)
24 blr
25
26/* unsigned long local_irq_disable(void) */
27_GLOBAL(local_irq_disable)
28 lbz r3,PACAPROCENABLED(r13)
29 li r4,0
30 stb r4,PACAPROCENABLED(r13)
31 blr /* Done */
32
33/* void local_irq_restore(unsigned long flags) */
34_GLOBAL(local_irq_restore)
35 lbz r5,PACAPROCENABLED(r13)
36 /* Check if things are setup the way we want _already_. */
37 cmpw 0,r3,r5
38 beqlr
39 /* are we enabling interrupts? */
40 cmpdi 0,r3,0
41 stb r3,PACAPROCENABLED(r13)
42 beqlr
43 /* Check pending interrupts */
44 /* A decrementer, IPI or PMC interrupt may have occurred
45 * while we were in the hypervisor (which enables) */
46 ld r4,PACALPPACA+LPPACAANYINT(r13)
47 cmpdi r4,0
48 beqlr
49
50 /*
51 * Handle pending interrupts in interrupt context
52 */
53 li r0,0x5555
54 sc
55 blr