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 | |
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>
-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 | ||||
-rw-r--r-- | arch/ppc64/kernel/misc.S | 38 | ||||
-rw-r--r-- | arch/ppc64/kernel/ppc_ksyms.c | 20 |
5 files changed, 84 insertions, 59 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 | ||
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S index a25b59759ddb..d069bbd7f81f 100644 --- a/arch/ppc64/kernel/misc.S +++ b/arch/ppc64/kernel/misc.S | |||
@@ -64,44 +64,6 @@ _GLOBAL(get_srr1) | |||
64 | _GLOBAL(get_sp) | 64 | _GLOBAL(get_sp) |
65 | mr r3,r1 | 65 | mr r3,r1 |
66 | blr | 66 | blr |
67 | |||
68 | #ifdef CONFIG_PPC_ISERIES | ||
69 | /* unsigned long local_save_flags(void) */ | ||
70 | _GLOBAL(local_get_flags) | ||
71 | lbz r3,PACAPROCENABLED(r13) | ||
72 | blr | ||
73 | |||
74 | /* unsigned long local_irq_disable(void) */ | ||
75 | _GLOBAL(local_irq_disable) | ||
76 | lbz r3,PACAPROCENABLED(r13) | ||
77 | li r4,0 | ||
78 | stb r4,PACAPROCENABLED(r13) | ||
79 | blr /* Done */ | ||
80 | |||
81 | /* void local_irq_restore(unsigned long flags) */ | ||
82 | _GLOBAL(local_irq_restore) | ||
83 | lbz r5,PACAPROCENABLED(r13) | ||
84 | /* Check if things are setup the way we want _already_. */ | ||
85 | cmpw 0,r3,r5 | ||
86 | beqlr | ||
87 | /* are we enabling interrupts? */ | ||
88 | cmpdi 0,r3,0 | ||
89 | stb r3,PACAPROCENABLED(r13) | ||
90 | beqlr | ||
91 | /* Check pending interrupts */ | ||
92 | /* A decrementer, IPI or PMC interrupt may have occurred | ||
93 | * while we were in the hypervisor (which enables) */ | ||
94 | ld r4,PACALPPACA+LPPACAANYINT(r13) | ||
95 | cmpdi r4,0 | ||
96 | beqlr | ||
97 | |||
98 | /* | ||
99 | * Handle pending interrupts in interrupt context | ||
100 | */ | ||
101 | li r0,0x5555 | ||
102 | sc | ||
103 | blr | ||
104 | #endif /* CONFIG_PPC_ISERIES */ | ||
105 | 67 | ||
106 | #ifdef CONFIG_IRQSTACKS | 68 | #ifdef CONFIG_IRQSTACKS |
107 | _GLOBAL(call_do_softirq) | 69 | _GLOBAL(call_do_softirq) |
diff --git a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c index 705742f4eec6..84006e26342c 100644 --- a/arch/ppc64/kernel/ppc_ksyms.c +++ b/arch/ppc64/kernel/ppc_ksyms.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <asm/hw_irq.h> | 19 | #include <asm/hw_irq.h> |
20 | #include <asm/abs_addr.h> | 20 | #include <asm/abs_addr.h> |
21 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
22 | #include <asm/iSeries/HvCallSc.h> | ||
23 | 22 | ||
24 | EXPORT_SYMBOL(strcpy); | 23 | EXPORT_SYMBOL(strcpy); |
25 | EXPORT_SYMBOL(strncpy); | 24 | EXPORT_SYMBOL(strncpy); |
@@ -46,17 +45,6 @@ EXPORT_SYMBOL(__strnlen_user); | |||
46 | 45 | ||
47 | EXPORT_SYMBOL(reloc_offset); | 46 | EXPORT_SYMBOL(reloc_offset); |
48 | 47 | ||
49 | #ifdef CONFIG_PPC_ISERIES | ||
50 | EXPORT_SYMBOL(HvCall0); | ||
51 | EXPORT_SYMBOL(HvCall1); | ||
52 | EXPORT_SYMBOL(HvCall2); | ||
53 | EXPORT_SYMBOL(HvCall3); | ||
54 | EXPORT_SYMBOL(HvCall4); | ||
55 | EXPORT_SYMBOL(HvCall5); | ||
56 | EXPORT_SYMBOL(HvCall6); | ||
57 | EXPORT_SYMBOL(HvCall7); | ||
58 | #endif | ||
59 | |||
60 | EXPORT_SYMBOL(_insb); | 48 | EXPORT_SYMBOL(_insb); |
61 | EXPORT_SYMBOL(_outsb); | 49 | EXPORT_SYMBOL(_outsb); |
62 | EXPORT_SYMBOL(_insw); | 50 | EXPORT_SYMBOL(_insw); |
@@ -77,14 +65,6 @@ EXPORT_SYMBOL(giveup_altivec); | |||
77 | EXPORT_SYMBOL(__flush_icache_range); | 65 | EXPORT_SYMBOL(__flush_icache_range); |
78 | EXPORT_SYMBOL(flush_dcache_range); | 66 | EXPORT_SYMBOL(flush_dcache_range); |
79 | 67 | ||
80 | #ifdef CONFIG_SMP | ||
81 | #ifdef CONFIG_PPC_ISERIES | ||
82 | EXPORT_SYMBOL(local_get_flags); | ||
83 | EXPORT_SYMBOL(local_irq_disable); | ||
84 | EXPORT_SYMBOL(local_irq_restore); | ||
85 | #endif | ||
86 | #endif | ||
87 | |||
88 | EXPORT_SYMBOL(memcpy); | 68 | EXPORT_SYMBOL(memcpy); |
89 | EXPORT_SYMBOL(memset); | 69 | EXPORT_SYMBOL(memset); |
90 | EXPORT_SYMBOL(memmove); | 70 | EXPORT_SYMBOL(memmove); |