aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 11:16:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 11:16:57 -0500
commit7e4e574c391cdeef516411eb698ac6955f01d673 (patch)
treee9f3b05c464b82be608cef1a90688dd3719e1537
parenta4fc7ab1d065a9dd89ed0e74439ef87d4a16e980 (diff)
parent97b1b999748d3cde6a3f381e0839e0f1082323e6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
-rw-r--r--arch/powerpc/Kconfig83
-rw-r--r--arch/powerpc/Kconfig.debug42
-rw-r--r--arch/powerpc/boot/.gitignore20
-rw-r--r--arch/powerpc/boot/Makefile2
-rw-r--r--arch/powerpc/configs/ppc64_defconfig2
-rw-r--r--arch/powerpc/kernel/Makefile4
-rw-r--r--arch/powerpc/kernel/crash.c2
-rw-r--r--arch/powerpc/kernel/crash_dump.c2
-rw-r--r--arch/powerpc/kernel/machine_kexec.c6
-rw-r--r--arch/powerpc/kernel/pci_64.c3
-rw-r--r--arch/powerpc/kernel/rtas.c12
-rw-r--r--arch/powerpc/kernel/setup_64.c60
-rw-r--r--arch/powerpc/kernel/udbg.c25
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
-rw-r--r--arch/powerpc/kernel/vdso32/.gitignore1
-rw-r--r--arch/powerpc/kernel/vdso64/.gitignore1
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig26
-rw-r--r--arch/powerpc/platforms/83xx/Makefile4
-rw-r--r--arch/powerpc/platforms/Makefile1
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c34
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig18
-rw-r--r--arch/powerpc/platforms/iseries/setup.c37
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c2
-rw-r--r--arch/powerpc/sysdev/Makefile2
-rw-r--r--arch/ppc/Kconfig4
-rw-r--r--drivers/char/viocons.c11
-rw-r--r--include/asm-powerpc/paca.h1
-rw-r--r--include/asm-powerpc/page.h2
-rw-r--r--include/asm-powerpc/parport.h28
-rw-r--r--include/asm-powerpc/percpu.h56
-rw-r--r--include/asm-powerpc/rtas.h1
-rw-r--r--include/asm-powerpc/udbg.h9
32 files changed, 376 insertions, 127 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 935d96571515..01feed0e2a15 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -71,15 +71,39 @@ config ARCH_MAY_HAVE_PC_FDC
71 bool 71 bool
72 default y 72 default y
73 73
74config PPC_OF
75 def_bool y
76
77config PPC_UDBG_16550
78 bool
79 default n
80
81config CRASH_DUMP
82 bool "kernel crash dumps (EXPERIMENTAL)"
83 depends on PPC_MULTIPLATFORM
84 depends on EXPERIMENTAL
85 help
86 Build a kernel suitable for use as a kdump capture kernel.
87 The kernel will be linked at a different address than normal, and
88 so can only be used for Kdump.
89
90 Don't change this unless you know what you are doing.
91
92config GENERIC_TBSYNC
93 bool
94 default y if PPC32 && SMP
95 default n
96
74menu "Processor support" 97menu "Processor support"
75choice 98choice
76 prompt "Processor Type" 99 prompt "Processor Type"
77 depends on PPC32 100 depends on PPC32
78 default 6xx 101 default 6xx
79 102
80config 6xx 103config CLASSIC32
81 bool "6xx/7xx/74xx" 104 bool "6xx/7xx/74xx"
82 select PPC_FPU 105 select PPC_FPU
106 select 6xx
83 help 107 help
84 There are four families of PowerPC chips supported. The more common 108 There are four families of PowerPC chips supported. The more common
85 types (601, 603, 604, 740, 750, 7400), the Motorola embedded 109 types (601, 603, 604, 740, 750, 7400), the Motorola embedded
@@ -93,12 +117,20 @@ config 6xx
93 117
94config PPC_52xx 118config PPC_52xx
95 bool "Freescale 52xx" 119 bool "Freescale 52xx"
120 select 6xx
121 select PPC_FPU
96 122
97config PPC_82xx 123config PPC_82xx
98 bool "Freescale 82xx" 124 bool "Freescale 82xx"
125 select 6xx
126 select PPC_FPU
99 127
100config PPC_83xx 128config PPC_83xx
101 bool "Freescale 83xx" 129 bool "Freescale 83xx"
130 select 6xx
131 select FSL_SOC
132 select 83xx
133 select PPC_FPU
102 134
103config 40x 135config 40x
104 bool "AMCC 40x" 136 bool "AMCC 40x"
@@ -134,6 +166,13 @@ config POWER4
134 depends on PPC64 166 depends on PPC64
135 def_bool y 167 def_bool y
136 168
169config 6xx
170 bool
171
172# this is temp to handle compat with arch=ppc
173config 83xx
174 bool
175
137config PPC_FPU 176config PPC_FPU
138 bool 177 bool
139 default y if PPC64 178 default y if PPC64
@@ -166,7 +205,7 @@ config PHYS_64BIT
166 205
167config ALTIVEC 206config ALTIVEC
168 bool "AltiVec Support" 207 bool "AltiVec Support"
169 depends on 6xx || POWER4 208 depends on CLASSIC32 || POWER4
170 ---help--- 209 ---help---
171 This option enables kernel support for the Altivec extensions to the 210 This option enables kernel support for the Altivec extensions to the
172 PowerPC processor. The kernel currently supports saving and restoring 211 PowerPC processor. The kernel currently supports saving and restoring
@@ -239,7 +278,7 @@ endmenu
239source "init/Kconfig" 278source "init/Kconfig"
240 279
241menu "Platform support" 280menu "Platform support"
242 depends on PPC64 || 6xx 281 depends on PPC64 || CLASSIC32
243 282
244choice 283choice
245 prompt "Machine type" 284 prompt "Machine type"
@@ -330,9 +369,6 @@ config PPC_CELL
330 select MMIO_NVRAM 369 select MMIO_NVRAM
331 select PPC_UDBG_16550 370 select PPC_UDBG_16550
332 371
333config PPC_OF
334 def_bool y
335
336config XICS 372config XICS
337 depends on PPC_PSERIES 373 depends on PPC_PSERIES
338 bool 374 bool
@@ -375,26 +411,11 @@ config MPIC_BROKEN_U3
375 depends on PPC_MAPLE 411 depends on PPC_MAPLE
376 default y 412 default y
377 413
378config PPC_UDBG_16550
379 bool
380 default n
381
382config CELL_IIC 414config CELL_IIC
383 depends on PPC_CELL 415 depends on PPC_CELL
384 bool 416 bool
385 default y 417 default y
386 418
387config CRASH_DUMP
388 bool "kernel crash dumps (EXPERIMENTAL)"
389 depends on PPC_MULTIPLATFORM
390 depends on EXPERIMENTAL
391 help
392 Build a kernel suitable for use as a kdump capture kernel.
393 The kernel will be linked at a different address than normal, and
394 so can only be used for Kdump.
395
396 Don't change this unless you know what you are doing.
397
398config IBMVIO 419config IBMVIO
399 depends on PPC_PSERIES || PPC_ISERIES 420 depends on PPC_PSERIES || PPC_ISERIES
400 bool 421 bool
@@ -410,11 +431,6 @@ config PPC_MPC106
410 bool 431 bool
411 default n 432 default n
412 433
413config GENERIC_TBSYNC
414 bool
415 default y if PPC32 && SMP
416 default n
417
418source "drivers/cpufreq/Kconfig" 434source "drivers/cpufreq/Kconfig"
419 435
420config CPU_FREQ_PMAC 436config CPU_FREQ_PMAC
@@ -495,6 +511,7 @@ endmenu
495 511
496source arch/powerpc/platforms/embedded6xx/Kconfig 512source arch/powerpc/platforms/embedded6xx/Kconfig
497source arch/powerpc/platforms/4xx/Kconfig 513source arch/powerpc/platforms/4xx/Kconfig
514source arch/powerpc/platforms/83xx/Kconfig
498source arch/powerpc/platforms/85xx/Kconfig 515source arch/powerpc/platforms/85xx/Kconfig
499source arch/powerpc/platforms/8xx/Kconfig 516source arch/powerpc/platforms/8xx/Kconfig
500source arch/powerpc/platforms/cell/Kconfig 517source arch/powerpc/platforms/cell/Kconfig
@@ -718,7 +735,7 @@ config PPC_I8259
718config PPC_INDIRECT_PCI 735config PPC_INDIRECT_PCI
719 bool 736 bool
720 depends on PCI 737 depends on PCI
721 default y if 40x || 44x || 85xx || 83xx 738 default y if 40x || 44x || 85xx
722 default n 739 default n
723 740
724config EISA 741config EISA
@@ -727,13 +744,16 @@ config EISA
727config SBUS 744config SBUS
728 bool 745 bool
729 746
747config FSL_SOC
748 bool
749
730# Yes MCA RS/6000s exist but Linux-PPC does not currently support any 750# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
731config MCA 751config MCA
732 bool 752 bool
733 753
734config PCI 754config PCI
735 bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) 755 bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
736 default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx 756 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx
737 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS 757 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
738 default PCI_QSPAN if !4xx && !CPM2 && 8xx 758 default PCI_QSPAN if !4xx && !CPM2 && 8xx
739 help 759 help
@@ -746,11 +766,6 @@ config PCI_DOMAINS
746 bool 766 bool
747 default PCI 767 default PCI
748 768
749config MPC83xx_PCI2
750 bool " Supprt for 2nd PCI host controller"
751 depends on PCI && MPC834x
752 default y if MPC834x_SYS
753
754config PCI_QSPAN 769config PCI_QSPAN
755 bool "QSpan PCI" 770 bool "QSpan PCI"
756 depends on !4xx && !CPM2 && 8xx 771 depends on !4xx && !CPM2 && 8xx
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 30a30bf559ea..9254806f7032 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -115,4 +115,46 @@ config PPC_OCP
115 depends on IBM_OCP || XILINX_OCP 115 depends on IBM_OCP || XILINX_OCP
116 default y 116 default y
117 117
118choice
119 prompt "Early debugging (dangerous)"
120 bool
121 optional
122 help
123 Enable early debugging. Careful, if you enable debugging for the
124 wrong type of machine your kernel _will not boot_.
125
126config PPC_EARLY_DEBUG_LPAR
127 bool "LPAR HV Console"
128 depends on PPC_PSERIES
129 help
130 Select this to enable early debugging for a machine with a HVC
131 console on vterm 0.
132
133config PPC_EARLY_DEBUG_G5
134 bool "Apple G5"
135 depends on PPC_PMAC64
136 help
137 Select this to enable early debugging for Apple G5 machines.
138
139config PPC_EARLY_DEBUG_RTAS
140 bool "RTAS Panel"
141 depends on PPC_RTAS
142 help
143 Select this to enable early debugging via the RTAS panel.
144
145config PPC_EARLY_DEBUG_MAPLE
146 bool "Maple real mode"
147 depends on PPC_MAPLE
148 help
149 Select this to enable early debugging for Maple.
150
151config PPC_EARLY_DEBUG_ISERIES
152 bool "iSeries HV Console"
153 depends on PPC_ISERIES
154 help
155 Select this to enable early debugging for legacy iSeries. You need
156 to hit "Ctrl-x Ctrl-x" to see the messages on the console.
157
158endchoice
159
118endmenu 160endmenu
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
new file mode 100644
index 000000000000..45c9ad23526e
--- /dev/null
+++ b/arch/powerpc/boot/.gitignore
@@ -0,0 +1,20 @@
1addnote
2infblock.c
3infblock.h
4infcodes.c
5infcodes.h
6inffast.c
7inffast.h
8inflate.c
9inftrees.c
10inftrees.h
11infutil.c
12infutil.h
13kernel-vmlinux.strip.c
14kernel-vmlinux.strip.gz
15uImage
16zImage
17zImage.vmode
18zconf.h
19zlib.h
20zutil.h
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 22726aefc8ea..b53d677f6742 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -176,4 +176,4 @@ $(obj)/uImage: $(obj)/vmlinux.gz
176install: $(CONFIGURE) $(BOOTIMAGE) 176install: $(CONFIGURE) $(BOOTIMAGE)
177 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" 177 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"
178 178
179clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) 179clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip)
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 347f4391db8d..0b2b55a79c3c 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -878,7 +878,7 @@ CONFIG_HVCS=m
878# 878#
879# CONFIG_WATCHDOG is not set 879# CONFIG_WATCHDOG is not set
880# CONFIG_RTC is not set 880# CONFIG_RTC is not set
881# CONFIG_GEN_RTC is not set 881CONFIG_GEN_RTC=y
882# CONFIG_DTLK is not set 882# CONFIG_DTLK is not set
883# CONFIG_R3964 is not set 883# CONFIG_R3964 is not set
884# CONFIG_APPLICOM is not set 884# CONFIG_APPLICOM is not set
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 144e284d21dd..bbfa1bdceb4d 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -61,9 +61,9 @@ obj-$(CONFIG_MODULES) += $(module-y)
61pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ 61pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \
62 pci_direct_iommu.o iomap.o 62 pci_direct_iommu.o iomap.o
63obj-$(CONFIG_PCI) += $(pci64-y) 63obj-$(CONFIG_PCI) += $(pci64-y)
64kexec-$(CONFIG_PPC64) := machine_kexec_64.o 64kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o
65kexec-$(CONFIG_PPC32) := machine_kexec_32.o 65kexec-$(CONFIG_PPC32) := machine_kexec_32.o
66obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) 66obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y)
67 67
68ifeq ($(CONFIG_PPC_ISERIES),y) 68ifeq ($(CONFIG_PPC_ISERIES),y)
69$(obj)/head_64.o: $(obj)/lparmap.s 69$(obj)/head_64.o: $(obj)/lparmap.s
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 4681155121ef..5f248e3fdf82 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -18,7 +18,6 @@
18#include <linux/kexec.h> 18#include <linux/kexec.h>
19#include <linux/bootmem.h> 19#include <linux/bootmem.h>
20#include <linux/crash_dump.h> 20#include <linux/crash_dump.h>
21#include <linux/irq.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
23#include <linux/elf.h> 22#include <linux/elf.h>
24#include <linux/elfcore.h> 23#include <linux/elfcore.h>
@@ -30,6 +29,7 @@
30#include <asm/kdump.h> 29#include <asm/kdump.h>
31#include <asm/lmb.h> 30#include <asm/lmb.h>
32#include <asm/firmware.h> 31#include <asm/firmware.h>
32#include <asm/smp.h>
33 33
34#ifdef DEBUG 34#ifdef DEBUG
35#include <asm/udbg.h> 35#include <asm/udbg.h>
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 87effa3f21a7..211d72653ea6 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -55,6 +55,7 @@ void __init kdump_setup(void)
55 DBG(" <- kdump_setup()\n"); 55 DBG(" <- kdump_setup()\n");
56} 56}
57 57
58#ifdef CONFIG_PROC_VMCORE
58static int __init parse_elfcorehdr(char *p) 59static int __init parse_elfcorehdr(char *p)
59{ 60{
60 if (p) 61 if (p)
@@ -63,6 +64,7 @@ static int __init parse_elfcorehdr(char *p)
63 return 0; 64 return 0;
64} 65}
65__setup("elfcorehdr=", parse_elfcorehdr); 66__setup("elfcorehdr=", parse_elfcorehdr);
67#endif
66 68
67static int __init parse_savemaxmem(char *p) 69static int __init parse_savemaxmem(char *p)
68{ 70{
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index a91e40c9ae45..a81ca1b841ec 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -14,12 +14,6 @@
14#include <linux/threads.h> 14#include <linux/threads.h>
15#include <asm/machdep.h> 15#include <asm/machdep.h>
16 16
17/*
18 * Provide a dummy crash_notes definition until crash dump is implemented.
19 * This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
20 */
21note_buf_t crash_notes[NR_CPUS];
22
23void machine_crash_shutdown(struct pt_regs *regs) 17void machine_crash_shutdown(struct pt_regs *regs)
24{ 18{
25 if (ppc_md.machine_crash_shutdown) 19 if (ppc_md.machine_crash_shutdown)
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index ba21a6c4f467..24fe70f40b66 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -271,6 +271,9 @@ void __devinit pcibios_claim_one_bus(struct pci_bus *b)
271 list_for_each_entry(child_bus, &b->children, node) 271 list_for_each_entry(child_bus, &b->children, node)
272 pcibios_claim_one_bus(child_bus); 272 pcibios_claim_one_bus(child_bus);
273} 273}
274#ifdef CONFIG_HOTPLUG
275EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
276#endif
274 277
275#ifndef CONFIG_PPC_ISERIES 278#ifndef CONFIG_PPC_ISERIES
276static void __init pcibios_claim_of_setup(void) 279static void __init pcibios_claim_of_setup(void)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index ae2e2a31a705..68bcd2824bc6 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -29,6 +29,7 @@
29#include <asm/delay.h> 29#include <asm/delay.h>
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/lmb.h> 31#include <asm/lmb.h>
32#include <asm/udbg.h>
32 33
33struct rtas_t rtas = { 34struct rtas_t rtas = {
34 .lock = SPIN_LOCK_UNLOCKED 35 .lock = SPIN_LOCK_UNLOCKED
@@ -52,7 +53,7 @@ EXPORT_SYMBOL(rtas_flash_term_hook);
52 * are designed only for very early low-level debugging, which 53 * are designed only for very early low-level debugging, which
53 * is why the token is hard-coded to 10. 54 * is why the token is hard-coded to 10.
54 */ 55 */
55void call_rtas_display_status(unsigned char c) 56static void call_rtas_display_status(char c)
56{ 57{
57 struct rtas_args *args = &rtas.args; 58 struct rtas_args *args = &rtas.args;
58 unsigned long s; 59 unsigned long s;
@@ -65,14 +66,14 @@ void call_rtas_display_status(unsigned char c)
65 args->nargs = 1; 66 args->nargs = 1;
66 args->nret = 1; 67 args->nret = 1;
67 args->rets = (rtas_arg_t *)&(args->args[1]); 68 args->rets = (rtas_arg_t *)&(args->args[1]);
68 args->args[0] = (int)c; 69 args->args[0] = (unsigned char)c;
69 70
70 enter_rtas(__pa(args)); 71 enter_rtas(__pa(args));
71 72
72 spin_unlock_irqrestore(&rtas.lock, s); 73 spin_unlock_irqrestore(&rtas.lock, s);
73} 74}
74 75
75void call_rtas_display_status_delay(unsigned char c) 76static void call_rtas_display_status_delay(char c)
76{ 77{
77 static int pending_newline = 0; /* did last write end with unprinted newline? */ 78 static int pending_newline = 0; /* did last write end with unprinted newline? */
78 static int width = 16; 79 static int width = 16;
@@ -96,6 +97,11 @@ void call_rtas_display_status_delay(unsigned char c)
96 } 97 }
97} 98}
98 99
100void __init udbg_init_rtas(void)
101{
102 udbg_putc = call_rtas_display_status_delay;
103}
104
99void rtas_progress(char *s, unsigned short hex) 105void rtas_progress(char *s, unsigned short hex)
100{ 106{
101 struct device_node *root; 107 struct device_node *root;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index c4b76961d6de..e29b275e09e0 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -33,6 +33,7 @@
33#include <linux/unistd.h> 33#include <linux/unistd.h>
34#include <linux/serial.h> 34#include <linux/serial.h>
35#include <linux/serial_8250.h> 35#include <linux/serial_8250.h>
36#include <linux/bootmem.h>
36#include <asm/io.h> 37#include <asm/io.h>
37#include <asm/kdump.h> 38#include <asm/kdump.h>
38#include <asm/prom.h> 39#include <asm/prom.h>
@@ -70,33 +71,6 @@
70#define DBG(fmt...) 71#define DBG(fmt...)
71#endif 72#endif
72 73
73/*
74 * Here are some early debugging facilities. You can enable one
75 * but your kernel will not boot on anything else if you do so
76 */
77
78/* This one is for use on LPAR machines that support an HVC console
79 * on vterm 0
80 */
81extern void udbg_init_debug_lpar(void);
82/* This one is for use on Apple G5 machines
83 */
84extern void udbg_init_pmac_realmode(void);
85/* That's RTAS panel debug */
86extern void call_rtas_display_status_delay(unsigned char c);
87/* Here's maple real mode debug */
88extern void udbg_init_maple_realmode(void);
89
90#define EARLY_DEBUG_INIT() do {} while(0)
91
92#if 0
93#define EARLY_DEBUG_INIT() udbg_init_debug_lpar()
94#define EARLY_DEBUG_INIT() udbg_init_maple_realmode()
95#define EARLY_DEBUG_INIT() udbg_init_pmac_realmode()
96#define EARLY_DEBUG_INIT() \
97 do { udbg_putc = call_rtas_display_status_delay; } while(0)
98#endif
99
100int have_of = 1; 74int have_of = 1;
101int boot_cpuid = 0; 75int boot_cpuid = 0;
102int boot_cpuid_phys = 0; 76int boot_cpuid_phys = 0;
@@ -237,11 +211,8 @@ void __init early_setup(unsigned long dt_ptr)
237 struct paca_struct *lpaca = get_paca(); 211 struct paca_struct *lpaca = get_paca();
238 static struct machdep_calls **mach; 212 static struct machdep_calls **mach;
239 213
240 /* 214 /* Enable early debugging if any specified (see udbg.h) */
241 * Enable early debugging if any specified (see top of 215 udbg_early_init();
242 * this file)
243 */
244 EARLY_DEBUG_INIT();
245 216
246 DBG(" -> early_setup()\n"); 217 DBG(" -> early_setup()\n");
247 218
@@ -684,3 +655,28 @@ void cpu_die(void)
684 if (ppc_md.cpu_die) 655 if (ppc_md.cpu_die)
685 ppc_md.cpu_die(); 656 ppc_md.cpu_die();
686} 657}
658
659#ifdef CONFIG_SMP
660void __init setup_per_cpu_areas(void)
661{
662 int i;
663 unsigned long size;
664 char *ptr;
665
666 /* Copy section for each CPU (we discard the original) */
667 size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
668#ifdef CONFIG_MODULES
669 if (size < PERCPU_ENOUGH_ROOM)
670 size = PERCPU_ENOUGH_ROOM;
671#endif
672
673 for_each_cpu(i) {
674 ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
675 if (!ptr)
676 panic("Cannot allocate cpu data for CPU %d\n", i);
677
678 paca[i].data_offset = ptr - __per_cpu_start;
679 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
680 }
681}
682#endif
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 558c1ceb2b93..3774e80094f5 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -15,11 +15,36 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/console.h> 16#include <linux/console.h>
17#include <asm/processor.h> 17#include <asm/processor.h>
18#include <asm/udbg.h>
18 19
19void (*udbg_putc)(char c); 20void (*udbg_putc)(char c);
20int (*udbg_getc)(void); 21int (*udbg_getc)(void);
21int (*udbg_getc_poll)(void); 22int (*udbg_getc_poll)(void);
22 23
24/*
25 * Early debugging facilities. You can enable _one_ of these via .config,
26 * if you do so your kernel _will not boot_ on anything else. Be careful.
27 */
28void __init udbg_early_init(void)
29{
30#if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)
31 /* For LPAR machines that have an HVC console on vterm 0 */
32 udbg_init_debug_lpar();
33#elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
34 /* For use on Apple G5 machines */
35 udbg_init_pmac_realmode();
36#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS)
37 /* RTAS panel debug */
38 udbg_init_rtas();
39#elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
40 /* Maple real mode debug */
41 udbg_init_maple_realmode();
42#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
43 /* For iSeries - hit Ctrl-x Ctrl-x to see the output */
44 udbg_init_iseries();
45#endif
46}
47
23/* udbg library, used by xmon et al */ 48/* udbg library, used by xmon et al */
24void udbg_puts(const char *s) 49void udbg_puts(const char *s)
25{ 50{
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 7541bf44d2da..2da65a9c93f6 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -155,7 +155,7 @@ void udbg_maple_real_putc(unsigned char c)
155 } 155 }
156} 156}
157 157
158void udbg_init_maple_realmode(void) 158void __init udbg_init_maple_realmode(void)
159{ 159{
160 udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; 160 udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;
161 161
diff --git a/arch/powerpc/kernel/vdso32/.gitignore b/arch/powerpc/kernel/vdso32/.gitignore
new file mode 100644
index 000000000000..e45fba9d0ced
--- /dev/null
+++ b/arch/powerpc/kernel/vdso32/.gitignore
@@ -0,0 +1 @@
vdso32.lds
diff --git a/arch/powerpc/kernel/vdso64/.gitignore b/arch/powerpc/kernel/vdso64/.gitignore
new file mode 100644
index 000000000000..3fd18cf9fec2
--- /dev/null
+++ b/arch/powerpc/kernel/vdso64/.gitignore
@@ -0,0 +1 @@
vdso64.lds
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
new file mode 100644
index 000000000000..b20812d460e6
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -0,0 +1,26 @@
1menu "Platform support"
2 depends on PPC_83xx
3
4choice
5 prompt "Machine Type"
6 default MPC834x_SYS
7
8config MPC834x_SYS
9 bool "Freescale MPC834x SYS"
10 help
11 This option enables support for the MPC 834x SYS evaluation board.
12
13 Be aware that PCI buses can only function when SYS board is plugged
14 into the PIB (Platform IO Board) board from Freescale which provide
15 3 PCI slots. The PIBs PCI initialization is the bootloader's
16 responsiblilty.
17
18endchoice
19
20config MPC834x
21 bool
22 select PPC_UDBG_16550
23 select PPC_INDIRECT_PCI
24 default y if MPC834x_SYS
25
26endmenu
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
new file mode 100644
index 000000000000..9d8b28ef3343
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -0,0 +1,4 @@
1#
2# Makefile for the PowerPC 83xx linux kernel.
3#
4obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 8836b3a00668..04073fd987ec 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -7,6 +7,7 @@ endif
7endif 7endif
8obj-$(CONFIG_PPC_CHRP) += chrp/ 8obj-$(CONFIG_PPC_CHRP) += chrp/
9obj-$(CONFIG_4xx) += 4xx/ 9obj-$(CONFIG_4xx) += 4xx/
10obj-$(CONFIG_PPC_83xx) += 83xx/
10obj-$(CONFIG_85xx) += 85xx/ 11obj-$(CONFIG_85xx) += 85xx/
11obj-$(CONFIG_PPC_PSERIES) += pseries/ 12obj-$(CONFIG_PPC_PSERIES) += pseries/
12obj-$(CONFIG_PPC_ISERIES) += iseries/ 13obj-$(CONFIG_PPC_ISERIES) += iseries/
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 1061c12b2edb..212db28531fa 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -169,11 +169,33 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
169 struct spu_priv2 __iomem *priv2 = spu->priv2; 169 struct spu_priv2 __iomem *priv2 = spu->priv2;
170 170
171 /* Save, Step 8: 171 /* Save, Step 8:
172 * Read and save MFC_CNTL[Ss]. 172 * Suspend DMA and save MFC_CNTL.
173 */ 173 */
174 if (csa) { 174 switch (in_be64(&priv2->mfc_control_RW) &
175 csa->priv2.mfc_control_RW = in_be64(&priv2->mfc_control_RW) & 175 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) {
176 MFC_CNTL_SUSPEND_DMA_STATUS_MASK; 176 case MFC_CNTL_SUSPEND_IN_PROGRESS:
177 POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
178 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
179 MFC_CNTL_SUSPEND_COMPLETE);
180 /* fall through */
181 case MFC_CNTL_SUSPEND_COMPLETE:
182 if (csa) {
183 csa->priv2.mfc_control_RW =
184 in_be64(&priv2->mfc_control_RW) |
185 MFC_CNTL_SUSPEND_DMA_QUEUE;
186 }
187 break;
188 case MFC_CNTL_NORMAL_DMA_QUEUE_OPERATION:
189 out_be64(&priv2->mfc_control_RW, MFC_CNTL_SUSPEND_DMA_QUEUE);
190 POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
191 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
192 MFC_CNTL_SUSPEND_COMPLETE);
193 if (csa) {
194 csa->priv2.mfc_control_RW =
195 in_be64(&priv2->mfc_control_RW) &
196 ~MFC_CNTL_SUSPEND_DMA_QUEUE;
197 }
198 break;
177 } 199 }
178} 200}
179 201
@@ -237,6 +259,8 @@ static inline void save_mfc_decr(struct spu_state *csa, struct spu *spu)
237 eieio(); 259 eieio();
238 csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW); 260 csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW);
239 eieio(); 261 eieio();
262 } else {
263 csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
240 } 264 }
241} 265}
242 266
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 81250090f98d..4fdbc9ae876b 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -144,16 +144,6 @@ config LITE5200
144 much but it's only been tested on this board version. I think this 144 much but it's only been tested on this board version. I think this
145 board is also known as IceCube. 145 board is also known as IceCube.
146 146
147config MPC834x_SYS
148 bool "Freescale MPC834x SYS"
149 help
150 This option enables support for the MPC 834x SYS evaluation board.
151
152 Be aware that PCI buses can only function when SYS board is plugged
153 into the PIB (Platform IO Board) board from Freescale which provide
154 3 PCI slots. The PIBs PCI initialization is the bootloader's
155 responsiblilty.
156
157config EV64360 147config EV64360
158 bool "Marvell-EV64360BP" 148 bool "Marvell-EV64360BP"
159 help 149 help
@@ -192,14 +182,6 @@ config 8272
192 The MPC8272 CPM has a different internal dpram setup than other CPM2 182 The MPC8272 CPM has a different internal dpram setup than other CPM2
193 devices 183 devices
194 184
195config 83xx
196 bool
197 default y if MPC834x_SYS
198
199config MPC834x
200 bool
201 default y if MPC834x_SYS
202
203config CPM2 185config CPM2
204 bool 186 bool
205 depends on 8260 || MPC8560 || MPC8555 187 depends on 8260 || MPC8560 || MPC8555
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index ad5ef80500ce..c6bbe5c25107 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -52,6 +52,7 @@
52#include <asm/iseries/mf.h> 52#include <asm/iseries/mf.h>
53#include <asm/iseries/hv_lp_event.h> 53#include <asm/iseries/hv_lp_event.h>
54#include <asm/iseries/lpar_map.h> 54#include <asm/iseries/lpar_map.h>
55#include <asm/udbg.h>
55 56
56#include "naca.h" 57#include "naca.h"
57#include "setup.h" 58#include "setup.h"
@@ -62,10 +63,8 @@
62#include "call_sm.h" 63#include "call_sm.h"
63#include "call_hpt.h" 64#include "call_hpt.h"
64 65
65extern void hvlog(char *fmt, ...);
66
67#ifdef DEBUG 66#ifdef DEBUG
68#define DBG(fmt...) hvlog(fmt) 67#define DBG(fmt...) udbg_printf(fmt)
69#else 68#else
70#define DBG(fmt...) 69#define DBG(fmt...)
71#endif 70#endif
@@ -474,14 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void)
474 printk("HPT absolute addr = %016lx, size = %dK\n", 473 printk("HPT absolute addr = %016lx, size = %dK\n",
475 chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); 474 chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
476 475
477 ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE);
478
479 /*
480 * The actual hashed page table is in the hypervisor,
481 * we have no direct access
482 */
483 htab_address = NULL;
484
485 /* 476 /*
486 * Determine if absolute memory has any 477 * Determine if absolute memory has any
487 * holes so that we can interpret the 478 * holes so that we can interpret the
@@ -861,6 +852,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n)
861 dt_prop(dt, name, (char *)data, sizeof(u64) * n); 852 dt_prop(dt, name, (char *)data, sizeof(u64) * n);
862} 853}
863 854
855void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n)
856{
857 dt_prop(dt, name, (char *)data, sizeof(u32) * n);
858}
859
864void dt_prop_empty(struct iseries_flat_dt *dt, char *name) 860void dt_prop_empty(struct iseries_flat_dt *dt, char *name)
865{ 861{
866 dt_prop(dt, name, NULL, 0); 862 dt_prop(dt, name, NULL, 0);
@@ -872,6 +868,7 @@ void dt_cpus(struct iseries_flat_dt *dt)
872 unsigned char *p; 868 unsigned char *p;
873 unsigned int i, index; 869 unsigned int i, index;
874 struct IoHriProcessorVpd *d; 870 struct IoHriProcessorVpd *d;
871 u32 pft_size[2];
875 872
876 /* yuck */ 873 /* yuck */
877 snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); 874 snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name);
@@ -882,6 +879,9 @@ void dt_cpus(struct iseries_flat_dt *dt)
882 dt_prop_u32(dt, "#address-cells", 1); 879 dt_prop_u32(dt, "#address-cells", 1);
883 dt_prop_u32(dt, "#size-cells", 0); 880 dt_prop_u32(dt, "#size-cells", 0);
884 881
882 pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */
883 pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);
884
885 for (i = 0; i < NR_CPUS; i++) { 885 for (i = 0; i < NR_CPUS; i++) {
886 if (paca[i].lppaca.dyn_proc_status >= 2) 886 if (paca[i].lppaca.dyn_proc_status >= 2)
887 continue; 887 continue;
@@ -908,6 +908,8 @@ void dt_cpus(struct iseries_flat_dt *dt)
908 908
909 dt_prop_u32(dt, "reg", i); 909 dt_prop_u32(dt, "reg", i);
910 910
911 dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2);
912
911 dt_end_node(dt); 913 dt_end_node(dt);
912 } 914 }
913 915
@@ -984,3 +986,16 @@ static int __init early_parsemem(char *p)
984 return 0; 986 return 0;
985} 987}
986early_param("mem", early_parsemem); 988early_param("mem", early_parsemem);
989
990static void hvputc(char c)
991{
992 if (c == '\n')
993 hvputc('\r');
994
995 HvCall_writeLogBuffer(&c, 1);
996}
997
998void __init udbg_init_iseries(void)
999{
1000 udbg_putc = hvputc;
1001}
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index e87d53acfb61..c4352a8db644 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -153,7 +153,7 @@ static void udbg_real_scc_putc(char c)
153 udbg_real_scc_putc('\r'); 153 udbg_real_scc_putc('\r');
154} 154}
155 155
156void udbg_init_pmac_realmode(void) 156void __init udbg_init_pmac_realmode(void)
157{ 157{
158 sccc = (volatile u8 __iomem *)0x80013020ul; 158 sccc = (volatile u8 __iomem *)0x80013020ul;
159 sccd = (volatile u8 __iomem *)0x80013030ul; 159 sccd = (volatile u8 __iomem *)0x80013030ul;
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 14b9abde2d27..0ae841347a09 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -6,4 +6,4 @@ obj-$(CONFIG_BOOKE) += dcr.o
6obj-$(CONFIG_40x) += dcr.o 6obj-$(CONFIG_40x) += dcr.o
7obj-$(CONFIG_U3_DART) += dart_iommu.o 7obj-$(CONFIG_U3_DART) += dart_iommu.o
8obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 8obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
9obj-$(CONFIG_83xx) += ipic.o 9obj-$(CONFIG_PPC_83xx) += ipic.o
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index e396f4591d59..d65810108bc3 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -743,6 +743,10 @@ config MPC834x
743 bool 743 bool
744 default y if MPC834x_SYS 744 default y if MPC834x_SYS
745 745
746config PPC_83xx
747 bool
748 default y if 83xx
749
746config CPM1 750config CPM1
747 bool 751 bool
748 depends on 8xx 752 depends on 8xx
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index cb82ebf4cb07..faee5e7acaf7 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -131,7 +131,7 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp);
131 131
132static struct tty_driver *viotty_driver; 132static struct tty_driver *viotty_driver;
133 133
134void hvlog(char *fmt, ...) 134static void hvlog(char *fmt, ...)
135{ 135{
136 int i; 136 int i;
137 unsigned long flags; 137 unsigned long flags;
@@ -147,7 +147,7 @@ void hvlog(char *fmt, ...)
147 spin_unlock_irqrestore(&consoleloglock, flags); 147 spin_unlock_irqrestore(&consoleloglock, flags);
148} 148}
149 149
150void hvlogOutput(const char *buf, int count) 150static void hvlogOutput(const char *buf, int count)
151{ 151{
152 unsigned long flags; 152 unsigned long flags;
153 int begin; 153 int begin;
@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
904 struct viocharlpevent *cevent = (struct viocharlpevent *)event; 904 struct viocharlpevent *cevent = (struct viocharlpevent *)event;
905 struct port_info *pi; 905 struct port_info *pi;
906 int index; 906 int index;
907 int num_pushed;
907 u8 port = cevent->virtual_device; 908 u8 port = cevent->virtual_device;
908 909
909 if (port >= VTTY_PORTS) { 910 if (port >= VTTY_PORTS) {
@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event)
964 * functionality will only work if built into the kernel and 965 * functionality will only work if built into the kernel and
965 * then only if sysrq is enabled through the proc filesystem. 966 * then only if sysrq is enabled through the proc filesystem.
966 */ 967 */
968 num_pushed = 0;
967 for (index = 0; index < cevent->len; index++) { 969 for (index = 0; index < cevent->len; index++) {
968#ifdef CONFIG_MAGIC_SYSRQ 970#ifdef CONFIG_MAGIC_SYSRQ
969 if (sysrq_enabled) { 971 if (sysrq_enabled) {
@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event)
997 printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); 999 printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
998 break; 1000 break;
999 } 1001 }
1002 num_pushed++;
1000 } 1003 }
1001 1004
1002 /* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ 1005 if (num_pushed)
1003 if (tty->flip.count)
1004 /* The next call resets flip.count when the data is flushed. */
1005 tty_flip_buffer_push(tty); 1006 tty_flip_buffer_push(tty);
1006} 1007}
1007 1008
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index 3ae52d9dc9ff..a64b4d425dab 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -65,6 +65,7 @@ struct paca_struct {
65 u64 stab_real; /* Absolute address of segment table */ 65 u64 stab_real; /* Absolute address of segment table */
66 u64 stab_addr; /* Virtual address of segment table */ 66 u64 stab_addr; /* Virtual address of segment table */
67 void *emergency_sp; /* pointer to emergency stack */ 67 void *emergency_sp; /* pointer to emergency stack */
68 u64 data_offset; /* per cpu data offset */
68 s16 hw_cpu_id; /* Physical processor number */ 69 s16 hw_cpu_id; /* Physical processor number */
69 u8 cpu_start; /* At startup, processor spins until */ 70 u8 cpu_start; /* At startup, processor spins until */
70 /* this becomes non-zero. */ 71 /* this becomes non-zero. */
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
index 76d7cb4b4ffc..0b82df483f7f 100644
--- a/include/asm-powerpc/page.h
+++ b/include/asm-powerpc/page.h
@@ -178,7 +178,7 @@ typedef unsigned long pmd_t;
178#define pmd_val(x) (x) 178#define pmd_val(x) (x)
179#define __pmd(x) (x) 179#define __pmd(x) (x)
180 180
181#ifndef CONFIG_PPC_64K_PAGES 181#if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES)
182typedef unsigned long pud_t; 182typedef unsigned long pud_t;
183#define pud_val(x) (x) 183#define pud_val(x) (x)
184#define __pud(x) (x) 184#define __pud(x) (x)
diff --git a/include/asm-powerpc/parport.h b/include/asm-powerpc/parport.h
index 897e49a88a6b..3fca21ddf546 100644
--- a/include/asm-powerpc/parport.h
+++ b/include/asm-powerpc/parport.h
@@ -10,10 +10,34 @@
10#define _ASM_POWERPC_PARPORT_H 10#define _ASM_POWERPC_PARPORT_H
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12 12
13static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 13#include <asm/prom.h>
14
15extern struct parport *parport_pc_probe_port (unsigned long int base,
16 unsigned long int base_hi,
17 int irq, int dma,
18 struct pci_dev *dev);
19
14static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 20static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
15{ 21{
16 return parport_pc_find_isa_ports (autoirq, autodma); 22 struct device_node *np;
23 u32 *prop;
24 u32 io1, io2;
25 int propsize;
26 int count = 0;
27 for (np = NULL; (np = of_find_compatible_node(np,
28 "parallel",
29 "pnpPNP,400")) != NULL;) {
30 prop = (u32 *)get_property(np, "reg", &propsize);
31 if (!prop || propsize > 6*sizeof(u32))
32 continue;
33 io1 = prop[1]; io2 = prop[2];
34 prop = (u32 *)get_property(np, "interrupts", NULL);
35 if (!prop)
36 continue;
37 if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL)
38 count++;
39 }
40 return count;
17} 41}
18 42
19#endif /* __KERNEL__ */ 43#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h
index 06a959d67234..e31922c50e53 100644
--- a/include/asm-powerpc/percpu.h
+++ b/include/asm-powerpc/percpu.h
@@ -1 +1,57 @@
1#ifndef _ASM_POWERPC_PERCPU_H_
2#define _ASM_POWERPC_PERCPU_H_
3#ifdef __powerpc64__
4#include <linux/compiler.h>
5
6/*
7 * Same as asm-generic/percpu.h, except that we store the per cpu offset
8 * in the paca. Based on the x86-64 implementation.
9 */
10
11#ifdef CONFIG_SMP
12
13#include <asm/paca.h>
14
15#define __per_cpu_offset(cpu) (paca[cpu].data_offset)
16#define __my_cpu_offset() get_paca()->data_offset
17
18/* Separate out the type, so (int[3], foo) works. */
19#define DEFINE_PER_CPU(type, name) \
20 __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
21
22/* var is in discarded region: offset to particular copy we want */
23#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
24#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
25
26/* A macro to avoid #include hell... */
27#define percpu_modcopy(pcpudst, src, size) \
28do { \
29 unsigned int __i; \
30 for (__i = 0; __i < NR_CPUS; __i++) \
31 if (cpu_possible(__i)) \
32 memcpy((pcpudst)+__per_cpu_offset(__i), \
33 (src), (size)); \
34} while (0)
35
36extern void setup_per_cpu_areas(void);
37
38#else /* ! SMP */
39
40#define DEFINE_PER_CPU(type, name) \
41 __typeof__(type) per_cpu__##name
42
43#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
44#define __get_cpu_var(var) per_cpu__##var
45
46#endif /* SMP */
47
48#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
49
50#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
51#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
52
53#else
1#include <asm-generic/percpu.h> 54#include <asm-generic/percpu.h>
55#endif
56
57#endif /* _ASM_POWERPC_PERCPU_H_ */
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 3428889e27b7..f43c6835e62a 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -161,7 +161,6 @@ extern struct rtas_t rtas;
161extern void enter_rtas(unsigned long); 161extern void enter_rtas(unsigned long);
162extern int rtas_token(const char *service); 162extern int rtas_token(const char *service);
163extern int rtas_call(int token, int, int, int *, ...); 163extern int rtas_call(int token, int, int, int *, ...);
164extern void call_rtas_display_status(unsigned char);
165extern void rtas_restart(char *cmd); 164extern void rtas_restart(char *cmd);
166extern void rtas_power_off(void); 165extern void rtas_power_off(void);
167extern void rtas_halt(void); 166extern void rtas_halt(void);
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 479f2d8ff74a..5c4236c342bb 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * c 2001 PPC 64 Team, IBM Corp 2 * (c) 2001, 2006 IBM Corporation.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
@@ -36,5 +36,12 @@ extern void udbg_scc_init(int force_scc);
36extern int udbg_adb_init(int force_btext); 36extern int udbg_adb_init(int force_btext);
37extern void udbg_adb_init_early(void); 37extern void udbg_adb_init_early(void);
38 38
39extern void __init udbg_early_init(void);
40extern void __init udbg_init_debug_lpar(void);
41extern void __init udbg_init_pmac_realmode(void);
42extern void __init udbg_init_maple_realmode(void);
43extern void __init udbg_init_iseries(void);
44extern void __init udbg_init_rtas(void);
45
39#endif /* __KERNEL__ */ 46#endif /* __KERNEL__ */
40#endif /* _ASM_POWERPC_UDBG_H */ 47#endif /* _ASM_POWERPC_UDBG_H */