diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 23:28:01 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 23:28:01 -0400 |
commit | c111d0bda8437d146ccf5101970801fe4ff23ed8 (patch) | |
tree | 3d4a3f0a5b11e2cddfa1f35560a720fe043440ec /arch/powerpc | |
parent | 7b875f4dc345dc5f6a2c3bd0e1f90bfee46b2258 (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/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/ksyms.c | 27 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/misc.S | 55 |
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 @@ | |||
1 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ | 1 | obj-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 |
3 | obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o | 3 | obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o |
4 | obj-$(CONFIG_IBMVIO) += vio.o | 4 | obj-$(CONFIG_IBMVIO) += vio.o |
5 | obj-$(CONFIG_SMP) += smp.o | 5 | obj-$(CONFIG_SMP) += smp.o |
6 | obj-$(CONFIG_VIOPATH) += viopath.o | 6 | obj-$(CONFIG_VIOPATH) += viopath.o |
7 | obj-$(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 | |||
14 | EXPORT_SYMBOL(HvCall0); | ||
15 | EXPORT_SYMBOL(HvCall1); | ||
16 | EXPORT_SYMBOL(HvCall2); | ||
17 | EXPORT_SYMBOL(HvCall3); | ||
18 | EXPORT_SYMBOL(HvCall4); | ||
19 | EXPORT_SYMBOL(HvCall5); | ||
20 | EXPORT_SYMBOL(HvCall6); | ||
21 | EXPORT_SYMBOL(HvCall7); | ||
22 | |||
23 | #ifdef CONFIG_SMP | ||
24 | EXPORT_SYMBOL(local_get_flags); | ||
25 | EXPORT_SYMBOL(local_irq_disable); | ||
26 | EXPORT_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 | ||