aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig42
-rw-r--r--arch/powerpc/Makefile2
-rw-r--r--arch/powerpc/boot/crt0.S5
-rw-r--r--arch/powerpc/boot/install.sh2
-rw-r--r--arch/powerpc/boot/main.c4
-rw-r--r--arch/powerpc/configs/cell_defconfig94
-rw-r--r--arch/powerpc/configs/iseries_defconfig96
-rw-r--r--arch/powerpc/configs/maple_defconfig50
-rw-r--r--arch/powerpc/configs/mpc834x_sys_defconfig32
-rw-r--r--arch/powerpc/configs/mpc8540_ads_defconfig721
-rw-r--r--arch/powerpc/configs/pmac32_defconfig77
-rw-r--r--arch/powerpc/configs/ppc64_defconfig2
-rw-r--r--arch/powerpc/kernel/asm-offsets.c4
-rw-r--r--arch/powerpc/kernel/cputable.c21
-rw-r--r--arch/powerpc/kernel/entry_32.S95
-rw-r--r--arch/powerpc/kernel/entry_64.S105
-rw-r--r--arch/powerpc/kernel/firmware.c25
-rw-r--r--arch/powerpc/kernel/head_44x.S2
-rw-r--r--arch/powerpc/kernel/head_64.S14
-rw-r--r--arch/powerpc/kernel/head_8xx.S2
-rw-r--r--arch/powerpc/kernel/head_booke.h363
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S6
-rw-r--r--arch/powerpc/kernel/iomap.c2
-rw-r--r--arch/powerpc/kernel/iommu.c1
-rw-r--r--arch/powerpc/kernel/irq.c32
-rw-r--r--arch/powerpc/kernel/kprobes.c1
-rw-r--r--arch/powerpc/kernel/of_device.c5
-rw-r--r--arch/powerpc/kernel/pci_64.c5
-rw-r--r--arch/powerpc/kernel/pci_iommu.c1
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c11
-rw-r--r--arch/powerpc/kernel/process.c9
-rw-r--r--arch/powerpc/kernel/prom.c58
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/kernel/ptrace-common.h2
-rw-r--r--arch/powerpc/kernel/ptrace.c5
-rw-r--r--arch/powerpc/kernel/rtas-proc.c1
-rw-r--r--arch/powerpc/kernel/rtas-rtc.c2
-rw-r--r--arch/powerpc/kernel/rtas_pci.c26
-rw-r--r--arch/powerpc/kernel/setup_64.c2
-rw-r--r--arch/powerpc/kernel/signal_32.c19
-rw-r--r--arch/powerpc/kernel/signal_64.c11
-rw-r--r--arch/powerpc/kernel/smp.c4
-rw-r--r--arch/powerpc/kernel/systbl.S2
-rw-r--r--arch/powerpc/kernel/time.c289
-rw-r--r--arch/powerpc/kernel/traps.c2
-rw-r--r--arch/powerpc/kernel/vdso.c6
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S4
-rw-r--r--arch/powerpc/lib/copypage_64.S2
-rw-r--r--arch/powerpc/lib/copyuser_64.S2
-rw-r--r--arch/powerpc/lib/e2a.c14
-rw-r--r--arch/powerpc/lib/memcpy_64.S2
-rw-r--r--arch/powerpc/lib/rheap.c2
-rw-r--r--arch/powerpc/mm/fault.c2
-rw-r--r--arch/powerpc/mm/hash_low_32.S2
-rw-r--r--arch/powerpc/mm/hash_utils_64.c32
-rw-r--r--arch/powerpc/mm/hugetlbpage.c15
-rw-r--r--arch/powerpc/mm/init_32.c4
-rw-r--r--arch/powerpc/mm/init_64.c52
-rw-r--r--arch/powerpc/mm/lmb.c16
-rw-r--r--arch/powerpc/mm/mem.c9
-rw-r--r--arch/powerpc/mm/mmap.c2
-rw-r--r--arch/powerpc/mm/numa.c160
-rw-r--r--arch/powerpc/mm/pgtable_32.c5
-rw-r--r--arch/powerpc/mm/slb_low.S2
-rw-r--r--arch/powerpc/mm/stab.c4
-rw-r--r--arch/powerpc/mm/tlb_64.c2
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c3
-rw-r--r--arch/powerpc/platforms/83xx/Makefile4
-rw-r--r--arch/powerpc/platforms/83xx/misc.c55
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.c89
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.h2
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h5
-rw-r--r--arch/powerpc/platforms/83xx/pci.c21
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig74
-rw-r--r--arch/powerpc/platforms/85xx/Makefile6
-rw-r--r--arch/powerpc/platforms/85xx/misc.c31
-rw-r--r--arch/powerpc/platforms/85xx/mpc8540_ads.h36
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx.h18
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c244
-rw-r--r--arch/powerpc/platforms/85xx/pci.c96
-rw-r--r--arch/powerpc/platforms/Makefile2
-rw-r--r--arch/powerpc/platforms/cell/setup.c2
-rw-r--r--arch/powerpc/platforms/chrp/pegasos_eth.c2
-rw-r--r--arch/powerpc/platforms/chrp/setup.c2
-rw-r--r--arch/powerpc/platforms/chrp/time.c2
-rw-r--r--arch/powerpc/platforms/iseries/mf.c112
-rw-r--r--arch/powerpc/platforms/iseries/setup.c72
-rw-r--r--arch/powerpc/platforms/maple/time.c2
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c2
-rw-r--r--arch/powerpc/platforms/powermac/feature.c11
-rw-r--r--arch/powerpc/platforms/powermac/nvram.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c5
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c6
-rw-r--r--arch/powerpc/platforms/powermac/setup.c12
-rw-r--r--arch/powerpc/platforms/powermac/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/Makefile3
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c14
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c2
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c103
-rw-r--r--arch/powerpc/platforms/pseries/firmware.h17
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c4
-rw-r--r--arch/powerpc/platforms/pseries/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c64
-rw-r--r--arch/powerpc/platforms/pseries/setup.c67
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c3
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c2
-rw-r--r--arch/powerpc/sysdev/dcr.S2
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c292
-rw-r--r--arch/powerpc/sysdev/ipic.h2
-rw-r--r--arch/powerpc/xmon/xmon.c30
113 files changed, 3049 insertions, 1079 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 80d114a3a837..fae42da7468d 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -127,6 +127,12 @@ config PPC_83xx
127 select 83xx 127 select 83xx
128 select PPC_FPU 128 select PPC_FPU
129 129
130config PPC_85xx
131 bool "Freescale 85xx"
132 select E500
133 select FSL_SOC
134 select 85xx
135
130config 40x 136config 40x
131 bool "AMCC 40x" 137 bool "AMCC 40x"
132 138
@@ -139,8 +145,6 @@ config 8xx
139config E200 145config E200
140 bool "Freescale e200" 146 bool "Freescale e200"
141 147
142config E500
143 bool "Freescale e500"
144endchoice 148endchoice
145 149
146config POWER4_ONLY 150config POWER4_ONLY
@@ -168,6 +172,13 @@ config 6xx
168config 83xx 172config 83xx
169 bool 173 bool
170 174
175# this is temp to handle compat with arch=ppc
176config 85xx
177 bool
178
179config E500
180 bool
181
171config PPC_FPU 182config PPC_FPU
172 bool 183 bool
173 default y if PPC64 184 default y if PPC64
@@ -217,6 +228,7 @@ config ALTIVEC
217config SPE 228config SPE
218 bool "SPE Support" 229 bool "SPE Support"
219 depends on E200 || E500 230 depends on E200 || E500
231 default y
220 ---help--- 232 ---help---
221 This option enables kernel support for the Signal Processing 233 This option enables kernel support for the Signal Processing
222 Extensions (SPE) to the PowerPC processor. The kernel currently 234 Extensions (SPE) to the PowerPC processor. The kernel currently
@@ -238,6 +250,21 @@ config PPC_STD_MMU_32
238 def_bool y 250 def_bool y
239 depends on PPC_STD_MMU && PPC32 251 depends on PPC_STD_MMU && PPC32
240 252
253config VIRT_CPU_ACCOUNTING
254 bool "Deterministic task and CPU time accounting"
255 depends on PPC64
256 default y
257 help
258 Select this option to enable more accurate task and CPU time
259 accounting. This is done by reading a CPU counter on each
260 kernel entry and exit and on transitions within the kernel
261 between system, softirq and hardirq state, so there is a
262 small performance impact. This also enables accounting of
263 stolen time on logically-partitioned systems running on
264 IBM POWER5-based machines.
265
266 If in doubt, say Y here.
267
241config SMP 268config SMP
242 depends on PPC_STD_MMU 269 depends on PPC_STD_MMU
243 bool "Symmetric multi-processing support" 270 bool "Symmetric multi-processing support"
@@ -580,7 +607,7 @@ config KEXEC
580 strongly in flux, so no good recommendation can be made. 607 strongly in flux, so no good recommendation can be made.
581 608
582config CRASH_DUMP 609config CRASH_DUMP
583 bool "kernel crash dumps (EXPERIMENTAL)" 610 bool "Build a kdump crash kernel (EXPERIMENTAL)"
584 depends on PPC_MULTIPLATFORM && PPC64 && EXPERIMENTAL 611 depends on PPC_MULTIPLATFORM && PPC64 && EXPERIMENTAL
585 help 612 help
586 Build a kernel suitable for use as a kdump capture kernel. 613 Build a kernel suitable for use as a kdump capture kernel.
@@ -734,13 +761,12 @@ config GENERIC_ISA_DMA
734 761
735config PPC_I8259 762config PPC_I8259
736 bool 763 bool
737 default y if 85xx
738 default n 764 default n
739 765
740config PPC_INDIRECT_PCI 766config PPC_INDIRECT_PCI
741 bool 767 bool
742 depends on PCI 768 depends on PCI
743 default y if 40x || 44x || 85xx 769 default y if 40x || 44x
744 default n 770 default n
745 771
746config EISA 772config EISA
@@ -757,8 +783,8 @@ config MCA
757 bool 783 bool
758 784
759config PCI 785config PCI
760 bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) 786 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
761 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx 787 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx
762 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS 788 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
763 default PCI_QSPAN if !4xx && !CPM2 && 8xx 789 default PCI_QSPAN if !4xx && !CPM2 && 8xx
764 help 790 help
@@ -963,7 +989,7 @@ source "arch/powerpc/oprofile/Kconfig"
963 989
964config KPROBES 990config KPROBES
965 bool "Kprobes (EXPERIMENTAL)" 991 bool "Kprobes (EXPERIMENTAL)"
966 depends on PPC64 992 depends on PPC64 && EXPERIMENTAL && MODULES
967 help 993 help
968 Kprobes allows you to trap at almost any kernel address and 994 Kprobes allows you to trap at almost any kernel address and
969 execute a callback function. register_kprobe() establishes 995 execute a callback function. register_kprobe() establishes
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 5500ab55d042..a3fc7a23158f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
148 148
149CPPFLAGS_vmlinux.lds := -Upowerpc 149CPPFLAGS_vmlinux.lds := -Upowerpc
150 150
151BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage 151BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin
152 152
153.PHONY: $(BOOT_TARGETS) 153.PHONY: $(BOOT_TARGETS)
154 154
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S
index e0192c26037b..70e65b13e033 100644
--- a/arch/powerpc/boot/crt0.S
+++ b/arch/powerpc/boot/crt0.S
@@ -45,7 +45,8 @@ _zimage_start:
45 bdnz 2b 45 bdnz 2b
46 46
47 /* Do a cache flush for our text, in case OF didn't */ 47 /* Do a cache flush for our text, in case OF didn't */
483: lis r9,_start@h 483: lis r9,_start@ha
49 addi r9,r9,_start@l
49 add r9,r0,r9 50 add r9,r0,r9
50 lis r8,_etext@ha 51 lis r8,_etext@ha
51 addi r8,r8,_etext@l 52 addi r8,r8,_etext@l
@@ -53,7 +54,7 @@ _zimage_start:
534: dcbf r0,r9 544: dcbf r0,r9
54 icbi r0,r9 55 icbi r0,r9
55 addi r9,r9,0x20 56 addi r9,r9,0x20
56 cmplwi 0,r9,8 57 cmplw cr0,r9,r8
57 blt 4b 58 blt 4b
58 sync 59 sync
59 isync 60 isync
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh
index eacce9590816..b002bfd56786 100644
--- a/arch/powerpc/boot/install.sh
+++ b/arch/powerpc/boot/install.sh
@@ -1,7 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# arch/ppc64/boot/install.sh
4#
5# This file is subject to the terms and conditions of the GNU General Public 3# This file is subject to the terms and conditions of the GNU General Public
6# License. See the file "COPYING" in the main directory of this archive 4# License. See the file "COPYING" in the main directory of this archive
7# for more details. 5# for more details.
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 55ec59867250..816446f0e497 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr)
152 elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + 152 elf64ph = (Elf64_Phdr *)((unsigned long)elf64 +
153 (unsigned long)elf64->e_phoff); 153 (unsigned long)elf64->e_phoff);
154 for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) 154 for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++)
155 if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) 155 if (elf64ph->p_type == PT_LOAD)
156 break; 156 break;
157 if (i >= (unsigned int)elf64->e_phnum) 157 if (i >= (unsigned int)elf64->e_phnum)
158 return 0; 158 return 0;
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr)
193 elf32 = (Elf32_Ehdr *)elfheader; 193 elf32 = (Elf32_Ehdr *)elfheader;
194 elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); 194 elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff);
195 for (i = 0; i < elf32->e_phnum; i++, elf32ph++) 195 for (i = 0; i < elf32->e_phnum; i++, elf32ph++)
196 if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0) 196 if (elf32ph->p_type == PT_LOAD)
197 break; 197 break;
198 if (i >= elf32->e_phnum) 198 if (i >= elf32->e_phnum)
199 return 0; 199 return 0;
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 063b84f2cbea..3c2acab63736 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc5 3# Linux kernel version: 2.6.16-rc6
4# Tue Dec 20 15:59:26 2005 4# Wed Mar 15 16:19:48 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -16,6 +16,10 @@ CONFIG_COMPAT=y
16CONFIG_SYSVIPC_COMPAT=y 16CONFIG_SYSVIPC_COMPAT=y
17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
18CONFIG_ARCH_MAY_HAVE_PC_FDC=y 18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_PPC_OF=y
20CONFIG_PPC_UDBG_16550=y
21# CONFIG_GENERIC_TBSYNC is not set
22# CONFIG_DEFAULT_UIMAGE is not set
19 23
20# 24#
21# Processor support 25# Processor support
@@ -33,7 +37,6 @@ CONFIG_NR_CPUS=4
33# Code maturity level options 37# Code maturity level options
34# 38#
35CONFIG_EXPERIMENTAL=y 39CONFIG_EXPERIMENTAL=y
36CONFIG_CLEAN_COMPILE=y
37CONFIG_LOCK_KERNEL=y 40CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39 42
@@ -48,8 +51,6 @@ CONFIG_SYSVIPC=y
48# CONFIG_BSD_PROCESS_ACCT is not set 51# CONFIG_BSD_PROCESS_ACCT is not set
49CONFIG_SYSCTL=y 52CONFIG_SYSCTL=y
50# CONFIG_AUDIT is not set 53# CONFIG_AUDIT is not set
51CONFIG_HOTPLUG=y
52CONFIG_KOBJECT_UEVENT=y
53# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
54# CONFIG_CPUSETS is not set 55# CONFIG_CPUSETS is not set
55CONFIG_INITRAMFS_SOURCE="" 56CONFIG_INITRAMFS_SOURCE=""
@@ -58,8 +59,10 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_KALLSYMS=y 59CONFIG_KALLSYMS=y
59# CONFIG_KALLSYMS_ALL is not set 60# CONFIG_KALLSYMS_ALL is not set
60# CONFIG_KALLSYMS_EXTRA_PASS is not set 61# CONFIG_KALLSYMS_EXTRA_PASS is not set
62CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y 63CONFIG_PRINTK=y
62CONFIG_BUG=y 64CONFIG_BUG=y
65CONFIG_ELF_CORE=y
63CONFIG_BASE_FULL=y 66CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 67CONFIG_FUTEX=y
65CONFIG_EPOLL=y 68CONFIG_EPOLL=y
@@ -68,8 +71,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
68CONFIG_CC_ALIGN_LABELS=0 71CONFIG_CC_ALIGN_LABELS=0
69CONFIG_CC_ALIGN_LOOPS=0 72CONFIG_CC_ALIGN_LOOPS=0
70CONFIG_CC_ALIGN_JUMPS=0 73CONFIG_CC_ALIGN_JUMPS=0
74CONFIG_SLAB=y
71# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
72CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
77# CONFIG_SLOB is not set
73 78
74# 79#
75# Loadable module support 80# Loadable module support
@@ -111,7 +116,6 @@ CONFIG_PPC_MULTIPLATFORM=y
111# CONFIG_PPC_PMAC is not set 116# CONFIG_PPC_PMAC is not set
112# CONFIG_PPC_MAPLE is not set 117# CONFIG_PPC_MAPLE is not set
113CONFIG_PPC_CELL=y 118CONFIG_PPC_CELL=y
114CONFIG_PPC_OF=y
115# CONFIG_U3_DART is not set 119# CONFIG_U3_DART is not set
116CONFIG_PPC_RTAS=y 120CONFIG_PPC_RTAS=y
117# CONFIG_RTAS_ERROR_LOGGING is not set 121# CONFIG_RTAS_ERROR_LOGGING is not set
@@ -120,11 +124,15 @@ CONFIG_RTAS_FLASH=y
120CONFIG_MMIO_NVRAM=y 124CONFIG_MMIO_NVRAM=y
121CONFIG_CELL_IIC=y 125CONFIG_CELL_IIC=y
122# CONFIG_PPC_MPC106 is not set 126# CONFIG_PPC_MPC106 is not set
123# CONFIG_GENERIC_TBSYNC is not set
124# CONFIG_CPU_FREQ is not set 127# CONFIG_CPU_FREQ is not set
125# CONFIG_WANT_EARLY_SERIAL is not set 128# CONFIG_WANT_EARLY_SERIAL is not set
126 129
127# 130#
131# Cell Broadband Engine options
132#
133CONFIG_SPU_FS=y
134
135#
128# Kernel options 136# Kernel options
129# 137#
130# CONFIG_HZ_100 is not set 138# CONFIG_HZ_100 is not set
@@ -140,6 +148,7 @@ CONFIG_BINFMT_ELF=y
140CONFIG_FORCE_MAX_ZONEORDER=13 148CONFIG_FORCE_MAX_ZONEORDER=13
141# CONFIG_IOMMU_VMERGE is not set 149# CONFIG_IOMMU_VMERGE is not set
142CONFIG_KEXEC=y 150CONFIG_KEXEC=y
151# CONFIG_CRASH_DUMP is not set
143CONFIG_IRQ_ALL_CPUS=y 152CONFIG_IRQ_ALL_CPUS=y
144# CONFIG_NUMA is not set 153# CONFIG_NUMA is not set
145CONFIG_ARCH_SELECT_MEMORY_MODEL=y 154CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -191,6 +200,7 @@ CONFIG_NET=y
191# 200#
192# Networking options 201# Networking options
193# 202#
203# CONFIG_NETDEBUG is not set
194CONFIG_PACKET=y 204CONFIG_PACKET=y
195# CONFIG_PACKET_MMAP is not set 205# CONFIG_PACKET_MMAP is not set
196CONFIG_UNIX=y 206CONFIG_UNIX=y
@@ -234,6 +244,25 @@ CONFIG_NETFILTER=y
234# Core Netfilter Configuration 244# Core Netfilter Configuration
235# 245#
236# CONFIG_NETFILTER_NETLINK is not set 246# CONFIG_NETFILTER_NETLINK is not set
247CONFIG_NETFILTER_XTABLES=m
248CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
249CONFIG_NETFILTER_XT_TARGET_MARK=m
250CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
251CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
252CONFIG_NETFILTER_XT_MATCH_COMMENT=m
253CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
254# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
255CONFIG_NETFILTER_XT_MATCH_HELPER=m
256CONFIG_NETFILTER_XT_MATCH_LENGTH=m
257CONFIG_NETFILTER_XT_MATCH_LIMIT=m
258CONFIG_NETFILTER_XT_MATCH_MAC=m
259CONFIG_NETFILTER_XT_MATCH_MARK=m
260CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
261CONFIG_NETFILTER_XT_MATCH_REALM=m
262CONFIG_NETFILTER_XT_MATCH_SCTP=m
263CONFIG_NETFILTER_XT_MATCH_STATE=m
264CONFIG_NETFILTER_XT_MATCH_STRING=m
265CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
237 266
238# 267#
239# IP: Netfilter Configuration 268# IP: Netfilter Configuration
@@ -251,37 +280,23 @@ CONFIG_IP_NF_AMANDA=m
251# CONFIG_IP_NF_PPTP is not set 280# CONFIG_IP_NF_PPTP is not set
252CONFIG_IP_NF_QUEUE=m 281CONFIG_IP_NF_QUEUE=m
253CONFIG_IP_NF_IPTABLES=m 282CONFIG_IP_NF_IPTABLES=m
254CONFIG_IP_NF_MATCH_LIMIT=m
255CONFIG_IP_NF_MATCH_IPRANGE=m 283CONFIG_IP_NF_MATCH_IPRANGE=m
256CONFIG_IP_NF_MATCH_MAC=m
257CONFIG_IP_NF_MATCH_PKTTYPE=m
258CONFIG_IP_NF_MATCH_MARK=m
259CONFIG_IP_NF_MATCH_MULTIPORT=m 284CONFIG_IP_NF_MATCH_MULTIPORT=m
260CONFIG_IP_NF_MATCH_TOS=m 285CONFIG_IP_NF_MATCH_TOS=m
261CONFIG_IP_NF_MATCH_RECENT=m 286CONFIG_IP_NF_MATCH_RECENT=m
262CONFIG_IP_NF_MATCH_ECN=m 287CONFIG_IP_NF_MATCH_ECN=m
263CONFIG_IP_NF_MATCH_DSCP=m 288CONFIG_IP_NF_MATCH_DSCP=m
264CONFIG_IP_NF_MATCH_AH_ESP=m 289CONFIG_IP_NF_MATCH_AH_ESP=m
265CONFIG_IP_NF_MATCH_LENGTH=m
266CONFIG_IP_NF_MATCH_TTL=m 290CONFIG_IP_NF_MATCH_TTL=m
267CONFIG_IP_NF_MATCH_TCPMSS=m
268CONFIG_IP_NF_MATCH_HELPER=m
269CONFIG_IP_NF_MATCH_STATE=m
270CONFIG_IP_NF_MATCH_CONNTRACK=m
271CONFIG_IP_NF_MATCH_OWNER=m 291CONFIG_IP_NF_MATCH_OWNER=m
272CONFIG_IP_NF_MATCH_ADDRTYPE=m 292CONFIG_IP_NF_MATCH_ADDRTYPE=m
273CONFIG_IP_NF_MATCH_REALM=m
274CONFIG_IP_NF_MATCH_SCTP=m
275# CONFIG_IP_NF_MATCH_DCCP is not set
276CONFIG_IP_NF_MATCH_COMMENT=m
277CONFIG_IP_NF_MATCH_HASHLIMIT=m 293CONFIG_IP_NF_MATCH_HASHLIMIT=m
278CONFIG_IP_NF_MATCH_STRING=m 294CONFIG_IP_NF_MATCH_POLICY=m
279CONFIG_IP_NF_FILTER=m 295CONFIG_IP_NF_FILTER=m
280CONFIG_IP_NF_TARGET_REJECT=m 296CONFIG_IP_NF_TARGET_REJECT=m
281CONFIG_IP_NF_TARGET_LOG=m 297CONFIG_IP_NF_TARGET_LOG=m
282CONFIG_IP_NF_TARGET_ULOG=m 298CONFIG_IP_NF_TARGET_ULOG=m
283CONFIG_IP_NF_TARGET_TCPMSS=m 299CONFIG_IP_NF_TARGET_TCPMSS=m
284CONFIG_IP_NF_TARGET_NFQUEUE=m
285CONFIG_IP_NF_NAT=m 300CONFIG_IP_NF_NAT=m
286CONFIG_IP_NF_NAT_NEEDED=y 301CONFIG_IP_NF_NAT_NEEDED=y
287CONFIG_IP_NF_TARGET_MASQUERADE=m 302CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -297,11 +312,8 @@ CONFIG_IP_NF_MANGLE=m
297CONFIG_IP_NF_TARGET_TOS=m 312CONFIG_IP_NF_TARGET_TOS=m
298CONFIG_IP_NF_TARGET_ECN=m 313CONFIG_IP_NF_TARGET_ECN=m
299CONFIG_IP_NF_TARGET_DSCP=m 314CONFIG_IP_NF_TARGET_DSCP=m
300CONFIG_IP_NF_TARGET_MARK=m
301CONFIG_IP_NF_TARGET_CLASSIFY=m
302CONFIG_IP_NF_TARGET_TTL=m 315CONFIG_IP_NF_TARGET_TTL=m
303CONFIG_IP_NF_RAW=m 316CONFIG_IP_NF_RAW=m
304CONFIG_IP_NF_TARGET_NOTRACK=m
305CONFIG_IP_NF_ARPTABLES=m 317CONFIG_IP_NF_ARPTABLES=m
306CONFIG_IP_NF_ARPFILTER=m 318CONFIG_IP_NF_ARPFILTER=m
307CONFIG_IP_NF_ARP_MANGLE=m 319CONFIG_IP_NF_ARP_MANGLE=m
@@ -311,7 +323,6 @@ CONFIG_IP_NF_ARP_MANGLE=m
311# 323#
312# CONFIG_IP6_NF_QUEUE is not set 324# CONFIG_IP6_NF_QUEUE is not set
313# CONFIG_IP6_NF_IPTABLES is not set 325# CONFIG_IP6_NF_IPTABLES is not set
314# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
315 326
316# 327#
317# DCCP Configuration (EXPERIMENTAL) 328# DCCP Configuration (EXPERIMENTAL)
@@ -322,6 +333,11 @@ CONFIG_IP_NF_ARP_MANGLE=m
322# SCTP Configuration (EXPERIMENTAL) 333# SCTP Configuration (EXPERIMENTAL)
323# 334#
324# CONFIG_IP_SCTP is not set 335# CONFIG_IP_SCTP is not set
336
337#
338# TIPC Configuration (EXPERIMENTAL)
339#
340# CONFIG_TIPC is not set
325# CONFIG_ATM is not set 341# CONFIG_ATM is not set
326# CONFIG_BRIDGE is not set 342# CONFIG_BRIDGE is not set
327# CONFIG_VLAN_8021Q is not set 343# CONFIG_VLAN_8021Q is not set
@@ -540,9 +556,11 @@ CONFIG_E1000=m
540# CONFIG_R8169 is not set 556# CONFIG_R8169 is not set
541# CONFIG_SIS190 is not set 557# CONFIG_SIS190 is not set
542CONFIG_SKGE=m 558CONFIG_SKGE=m
559# CONFIG_SKY2 is not set
543# CONFIG_SK98LIN is not set 560# CONFIG_SK98LIN is not set
544# CONFIG_TIGON3 is not set 561# CONFIG_TIGON3 is not set
545# CONFIG_BNX2 is not set 562# CONFIG_BNX2 is not set
563CONFIG_SPIDER_NET=y
546# CONFIG_MV643XX_ETH is not set 564# CONFIG_MV643XX_ETH is not set
547 565
548# 566#
@@ -628,13 +646,16 @@ CONFIG_VT=y
628CONFIG_VT_CONSOLE=y 646CONFIG_VT_CONSOLE=y
629CONFIG_HW_CONSOLE=y 647CONFIG_HW_CONSOLE=y
630CONFIG_SERIAL_NONSTANDARD=y 648CONFIG_SERIAL_NONSTANDARD=y
649# CONFIG_COMPUTONE is not set
631# CONFIG_ROCKETPORT is not set 650# CONFIG_ROCKETPORT is not set
632# CONFIG_CYCLADES is not set 651# CONFIG_CYCLADES is not set
633# CONFIG_DIGIEPCA is not set 652# CONFIG_DIGIEPCA is not set
653# CONFIG_MOXA_INTELLIO is not set
634# CONFIG_MOXA_SMARTIO is not set 654# CONFIG_MOXA_SMARTIO is not set
635# CONFIG_ISI is not set 655# CONFIG_ISI is not set
636# CONFIG_SYNCLINK is not set 656# CONFIG_SYNCLINK is not set
637# CONFIG_SYNCLINKMP is not set 657# CONFIG_SYNCLINKMP is not set
658# CONFIG_SYNCLINK_GT is not set
638# CONFIG_N_HDLC is not set 659# CONFIG_N_HDLC is not set
639# CONFIG_SPECIALIX is not set 660# CONFIG_SPECIALIX is not set
640# CONFIG_SX is not set 661# CONFIG_SX is not set
@@ -646,6 +667,7 @@ CONFIG_SERIAL_NONSTANDARD=y
646CONFIG_SERIAL_8250=y 667CONFIG_SERIAL_8250=y
647CONFIG_SERIAL_8250_CONSOLE=y 668CONFIG_SERIAL_8250_CONSOLE=y
648CONFIG_SERIAL_8250_NR_UARTS=4 669CONFIG_SERIAL_8250_NR_UARTS=4
670CONFIG_SERIAL_8250_RUNTIME_UARTS=4
649# CONFIG_SERIAL_8250_EXTENDED is not set 671# CONFIG_SERIAL_8250_EXTENDED is not set
650 672
651# 673#
@@ -756,6 +778,12 @@ CONFIG_I2C_ALGOBIT=y
756# CONFIG_I2C_DEBUG_CHIP is not set 778# CONFIG_I2C_DEBUG_CHIP is not set
757 779
758# 780#
781# SPI support
782#
783# CONFIG_SPI is not set
784# CONFIG_SPI_MASTER is not set
785
786#
759# Dallas's 1-wire bus 787# Dallas's 1-wire bus
760# 788#
761# CONFIG_W1 is not set 789# CONFIG_W1 is not set
@@ -827,7 +855,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
827# CONFIG_INFINIBAND is not set 855# CONFIG_INFINIBAND is not set
828 856
829# 857#
830# SN Devices 858# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
831# 859#
832 860
833# 861#
@@ -847,6 +875,7 @@ CONFIG_FS_MBCACHE=y
847# CONFIG_JFS_FS is not set 875# CONFIG_JFS_FS is not set
848CONFIG_FS_POSIX_ACL=y 876CONFIG_FS_POSIX_ACL=y
849# CONFIG_XFS_FS is not set 877# CONFIG_XFS_FS is not set
878# CONFIG_OCFS2_FS is not set
850# CONFIG_MINIX_FS is not set 879# CONFIG_MINIX_FS is not set
851# CONFIG_ROMFS_FS is not set 880# CONFIG_ROMFS_FS is not set
852CONFIG_INOTIFY=y 881CONFIG_INOTIFY=y
@@ -886,6 +915,7 @@ CONFIG_HUGETLBFS=y
886CONFIG_HUGETLB_PAGE=y 915CONFIG_HUGETLB_PAGE=y
887CONFIG_RAMFS=y 916CONFIG_RAMFS=y
888# CONFIG_RELAYFS_FS is not set 917# CONFIG_RELAYFS_FS is not set
918# CONFIG_CONFIGFS_FS is not set
889 919
890# 920#
891# Miscellaneous filesystems 921# Miscellaneous filesystems
@@ -951,6 +981,7 @@ CONFIG_MSDOS_PARTITION=y
951# CONFIG_SGI_PARTITION is not set 981# CONFIG_SGI_PARTITION is not set
952# CONFIG_ULTRIX_PARTITION is not set 982# CONFIG_ULTRIX_PARTITION is not set
953# CONFIG_SUN_PARTITION is not set 983# CONFIG_SUN_PARTITION is not set
984# CONFIG_KARMA_PARTITION is not set
954CONFIG_EFI_PARTITION=y 985CONFIG_EFI_PARTITION=y
955 986
956# 987#
@@ -1021,18 +1052,20 @@ CONFIG_TEXTSEARCH_FSM=m
1021# Kernel hacking 1052# Kernel hacking
1022# 1053#
1023# CONFIG_PRINTK_TIME is not set 1054# CONFIG_PRINTK_TIME is not set
1024CONFIG_DEBUG_KERNEL=y
1025CONFIG_MAGIC_SYSRQ=y 1055CONFIG_MAGIC_SYSRQ=y
1056CONFIG_DEBUG_KERNEL=y
1026CONFIG_LOG_BUF_SHIFT=15 1057CONFIG_LOG_BUF_SHIFT=15
1027CONFIG_DETECT_SOFTLOCKUP=y 1058CONFIG_DETECT_SOFTLOCKUP=y
1028# CONFIG_SCHEDSTATS is not set 1059# CONFIG_SCHEDSTATS is not set
1029# CONFIG_DEBUG_SLAB is not set 1060# CONFIG_DEBUG_SLAB is not set
1061# CONFIG_DEBUG_MUTEXES is not set
1030# CONFIG_DEBUG_SPINLOCK is not set 1062# CONFIG_DEBUG_SPINLOCK is not set
1031CONFIG_DEBUG_SPINLOCK_SLEEP=y 1063CONFIG_DEBUG_SPINLOCK_SLEEP=y
1032# CONFIG_DEBUG_KOBJECT is not set 1064# CONFIG_DEBUG_KOBJECT is not set
1033# CONFIG_DEBUG_INFO is not set 1065# CONFIG_DEBUG_INFO is not set
1034CONFIG_DEBUG_FS=y 1066CONFIG_DEBUG_FS=y
1035# CONFIG_DEBUG_VM is not set 1067# CONFIG_DEBUG_VM is not set
1068# CONFIG_FORCED_INLINING is not set
1036# CONFIG_RCU_TORTURE_TEST is not set 1069# CONFIG_RCU_TORTURE_TEST is not set
1037# CONFIG_DEBUG_STACKOVERFLOW is not set 1070# CONFIG_DEBUG_STACKOVERFLOW is not set
1038# CONFIG_DEBUG_STACK_USAGE is not set 1071# CONFIG_DEBUG_STACK_USAGE is not set
@@ -1040,6 +1073,11 @@ CONFIG_DEBUGGER=y
1040# CONFIG_XMON is not set 1073# CONFIG_XMON is not set
1041CONFIG_IRQSTACKS=y 1074CONFIG_IRQSTACKS=y
1042# CONFIG_BOOTX_TEXT is not set 1075# CONFIG_BOOTX_TEXT is not set
1076# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1077# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1078# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
1079# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1080# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1043 1081
1044# 1082#
1045# Security options 1083# Security options
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index c775027947f9..1816a46742f6 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc5 3# Linux kernel version: 2.6.16-rc6
4# Tue Dec 20 15:59:32 2005 4# Wed Mar 15 16:19:52 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -16,6 +16,10 @@ CONFIG_COMPAT=y
16CONFIG_SYSVIPC_COMPAT=y 16CONFIG_SYSVIPC_COMPAT=y
17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
18CONFIG_ARCH_MAY_HAVE_PC_FDC=y 18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_PPC_OF=y
20# CONFIG_PPC_UDBG_16550 is not set
21# CONFIG_GENERIC_TBSYNC is not set
22# CONFIG_DEFAULT_UIMAGE is not set
19 23
20# 24#
21# Processor support 25# Processor support
@@ -33,7 +37,6 @@ CONFIG_NR_CPUS=32
33# Code maturity level options 37# Code maturity level options
34# 38#
35CONFIG_EXPERIMENTAL=y 39CONFIG_EXPERIMENTAL=y
36CONFIG_CLEAN_COMPILE=y
37CONFIG_LOCK_KERNEL=y 40CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39 42
@@ -49,8 +52,6 @@ CONFIG_POSIX_MQUEUE=y
49CONFIG_SYSCTL=y 52CONFIG_SYSCTL=y
50CONFIG_AUDIT=y 53CONFIG_AUDIT=y
51CONFIG_AUDITSYSCALL=y 54CONFIG_AUDITSYSCALL=y
52CONFIG_HOTPLUG=y
53CONFIG_KOBJECT_UEVENT=y
54CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
55CONFIG_IKCONFIG_PROC=y 56CONFIG_IKCONFIG_PROC=y
56# CONFIG_CPUSETS is not set 57# CONFIG_CPUSETS is not set
@@ -60,8 +61,10 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60CONFIG_KALLSYMS=y 61CONFIG_KALLSYMS=y
61# CONFIG_KALLSYMS_ALL is not set 62# CONFIG_KALLSYMS_ALL is not set
62# CONFIG_KALLSYMS_EXTRA_PASS is not set 63# CONFIG_KALLSYMS_EXTRA_PASS is not set
64CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 65CONFIG_PRINTK=y
64CONFIG_BUG=y 66CONFIG_BUG=y
67CONFIG_ELF_CORE=y
65CONFIG_BASE_FULL=y 68CONFIG_BASE_FULL=y
66CONFIG_FUTEX=y 69CONFIG_FUTEX=y
67CONFIG_EPOLL=y 70CONFIG_EPOLL=y
@@ -70,8 +73,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
70CONFIG_CC_ALIGN_LABELS=0 73CONFIG_CC_ALIGN_LABELS=0
71CONFIG_CC_ALIGN_LOOPS=0 74CONFIG_CC_ALIGN_LOOPS=0
72CONFIG_CC_ALIGN_JUMPS=0 75CONFIG_CC_ALIGN_JUMPS=0
76CONFIG_SLAB=y
73# CONFIG_TINY_SHMEM is not set 77# CONFIG_TINY_SHMEM is not set
74CONFIG_BASE_SMALL=0 78CONFIG_BASE_SMALL=0
79# CONFIG_SLOB is not set
75 80
76# 81#
77# Loadable module support 82# Loadable module support
@@ -113,7 +118,6 @@ CONFIG_PPC_ISERIES=y
113# CONFIG_MMIO_NVRAM is not set 118# CONFIG_MMIO_NVRAM is not set
114CONFIG_IBMVIO=y 119CONFIG_IBMVIO=y
115# CONFIG_PPC_MPC106 is not set 120# CONFIG_PPC_MPC106 is not set
116# CONFIG_GENERIC_TBSYNC is not set
117# CONFIG_CPU_FREQ is not set 121# CONFIG_CPU_FREQ is not set
118# CONFIG_WANT_EARLY_SERIAL is not set 122# CONFIG_WANT_EARLY_SERIAL is not set
119 123
@@ -183,6 +187,7 @@ CONFIG_NET=y
183# 187#
184# Networking options 188# Networking options
185# 189#
190# CONFIG_NETDEBUG is not set
186CONFIG_PACKET=y 191CONFIG_PACKET=y
187# CONFIG_PACKET_MMAP is not set 192# CONFIG_PACKET_MMAP is not set
188CONFIG_UNIX=y 193CONFIG_UNIX=y
@@ -220,6 +225,28 @@ CONFIG_NETFILTER=y
220# Core Netfilter Configuration 225# Core Netfilter Configuration
221# 226#
222# CONFIG_NETFILTER_NETLINK is not set 227# CONFIG_NETFILTER_NETLINK is not set
228CONFIG_NETFILTER_XTABLES=m
229CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
230CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
231CONFIG_NETFILTER_XT_TARGET_MARK=m
232CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
233CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
234CONFIG_NETFILTER_XT_MATCH_COMMENT=m
235CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
236CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
237CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
238# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
239CONFIG_NETFILTER_XT_MATCH_HELPER=m
240CONFIG_NETFILTER_XT_MATCH_LENGTH=m
241CONFIG_NETFILTER_XT_MATCH_LIMIT=m
242CONFIG_NETFILTER_XT_MATCH_MAC=m
243CONFIG_NETFILTER_XT_MATCH_MARK=m
244CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
245CONFIG_NETFILTER_XT_MATCH_REALM=m
246CONFIG_NETFILTER_XT_MATCH_SCTP=m
247CONFIG_NETFILTER_XT_MATCH_STATE=m
248CONFIG_NETFILTER_XT_MATCH_STRING=m
249CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
223 250
224# 251#
225# IP: Netfilter Configuration 252# IP: Netfilter Configuration
@@ -237,39 +264,23 @@ CONFIG_IP_NF_AMANDA=m
237# CONFIG_IP_NF_PPTP is not set 264# CONFIG_IP_NF_PPTP is not set
238CONFIG_IP_NF_QUEUE=m 265CONFIG_IP_NF_QUEUE=m
239CONFIG_IP_NF_IPTABLES=m 266CONFIG_IP_NF_IPTABLES=m
240CONFIG_IP_NF_MATCH_LIMIT=m
241CONFIG_IP_NF_MATCH_IPRANGE=m 267CONFIG_IP_NF_MATCH_IPRANGE=m
242CONFIG_IP_NF_MATCH_MAC=m
243CONFIG_IP_NF_MATCH_PKTTYPE=m
244CONFIG_IP_NF_MATCH_MARK=m
245CONFIG_IP_NF_MATCH_MULTIPORT=m 268CONFIG_IP_NF_MATCH_MULTIPORT=m
246CONFIG_IP_NF_MATCH_TOS=m 269CONFIG_IP_NF_MATCH_TOS=m
247CONFIG_IP_NF_MATCH_RECENT=m 270CONFIG_IP_NF_MATCH_RECENT=m
248CONFIG_IP_NF_MATCH_ECN=m 271CONFIG_IP_NF_MATCH_ECN=m
249CONFIG_IP_NF_MATCH_DSCP=m 272CONFIG_IP_NF_MATCH_DSCP=m
250CONFIG_IP_NF_MATCH_AH_ESP=m 273CONFIG_IP_NF_MATCH_AH_ESP=m
251CONFIG_IP_NF_MATCH_LENGTH=m
252CONFIG_IP_NF_MATCH_TTL=m 274CONFIG_IP_NF_MATCH_TTL=m
253CONFIG_IP_NF_MATCH_TCPMSS=m
254CONFIG_IP_NF_MATCH_HELPER=m
255CONFIG_IP_NF_MATCH_STATE=m
256CONFIG_IP_NF_MATCH_CONNTRACK=m
257CONFIG_IP_NF_MATCH_OWNER=m 275CONFIG_IP_NF_MATCH_OWNER=m
258CONFIG_IP_NF_MATCH_ADDRTYPE=m 276CONFIG_IP_NF_MATCH_ADDRTYPE=m
259CONFIG_IP_NF_MATCH_REALM=m
260CONFIG_IP_NF_MATCH_SCTP=m
261# CONFIG_IP_NF_MATCH_DCCP is not set
262CONFIG_IP_NF_MATCH_COMMENT=m
263CONFIG_IP_NF_MATCH_CONNMARK=m
264CONFIG_IP_NF_MATCH_CONNBYTES=m
265CONFIG_IP_NF_MATCH_HASHLIMIT=m 277CONFIG_IP_NF_MATCH_HASHLIMIT=m
266CONFIG_IP_NF_MATCH_STRING=m 278CONFIG_IP_NF_MATCH_POLICY=m
267CONFIG_IP_NF_FILTER=m 279CONFIG_IP_NF_FILTER=m
268CONFIG_IP_NF_TARGET_REJECT=m 280CONFIG_IP_NF_TARGET_REJECT=m
269CONFIG_IP_NF_TARGET_LOG=m 281CONFIG_IP_NF_TARGET_LOG=m
270CONFIG_IP_NF_TARGET_ULOG=m 282CONFIG_IP_NF_TARGET_ULOG=m
271CONFIG_IP_NF_TARGET_TCPMSS=m 283CONFIG_IP_NF_TARGET_TCPMSS=m
272CONFIG_IP_NF_TARGET_NFQUEUE=m
273CONFIG_IP_NF_NAT=m 284CONFIG_IP_NF_NAT=m
274CONFIG_IP_NF_NAT_NEEDED=y 285CONFIG_IP_NF_NAT_NEEDED=y
275CONFIG_IP_NF_TARGET_MASQUERADE=m 286CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -285,13 +296,9 @@ CONFIG_IP_NF_MANGLE=m
285CONFIG_IP_NF_TARGET_TOS=m 296CONFIG_IP_NF_TARGET_TOS=m
286CONFIG_IP_NF_TARGET_ECN=m 297CONFIG_IP_NF_TARGET_ECN=m
287CONFIG_IP_NF_TARGET_DSCP=m 298CONFIG_IP_NF_TARGET_DSCP=m
288CONFIG_IP_NF_TARGET_MARK=m
289CONFIG_IP_NF_TARGET_CLASSIFY=m
290CONFIG_IP_NF_TARGET_TTL=m 299CONFIG_IP_NF_TARGET_TTL=m
291CONFIG_IP_NF_TARGET_CONNMARK=m
292CONFIG_IP_NF_TARGET_CLUSTERIP=m 300CONFIG_IP_NF_TARGET_CLUSTERIP=m
293CONFIG_IP_NF_RAW=m 301CONFIG_IP_NF_RAW=m
294CONFIG_IP_NF_TARGET_NOTRACK=m
295CONFIG_IP_NF_ARPTABLES=m 302CONFIG_IP_NF_ARPTABLES=m
296CONFIG_IP_NF_ARPFILTER=m 303CONFIG_IP_NF_ARPFILTER=m
297CONFIG_IP_NF_ARP_MANGLE=m 304CONFIG_IP_NF_ARP_MANGLE=m
@@ -305,6 +312,11 @@ CONFIG_IP_NF_ARP_MANGLE=m
305# SCTP Configuration (EXPERIMENTAL) 312# SCTP Configuration (EXPERIMENTAL)
306# 313#
307# CONFIG_IP_SCTP is not set 314# CONFIG_IP_SCTP is not set
315
316#
317# TIPC Configuration (EXPERIMENTAL)
318#
319# CONFIG_TIPC is not set
308# CONFIG_ATM is not set 320# CONFIG_ATM is not set
309# CONFIG_BRIDGE is not set 321# CONFIG_BRIDGE is not set
310# CONFIG_VLAN_8021Q is not set 322# CONFIG_VLAN_8021Q is not set
@@ -451,13 +463,7 @@ CONFIG_SCSI_IBMVSCSI=m
451# CONFIG_SCSI_IPR is not set 463# CONFIG_SCSI_IPR is not set
452# CONFIG_SCSI_QLOGIC_FC is not set 464# CONFIG_SCSI_QLOGIC_FC is not set
453# CONFIG_SCSI_QLOGIC_1280 is not set 465# CONFIG_SCSI_QLOGIC_1280 is not set
454CONFIG_SCSI_QLA2XXX=y 466# CONFIG_SCSI_QLA_FC is not set
455# CONFIG_SCSI_QLA21XX is not set
456# CONFIG_SCSI_QLA22XX is not set
457# CONFIG_SCSI_QLA2300 is not set
458# CONFIG_SCSI_QLA2322 is not set
459# CONFIG_SCSI_QLA6312 is not set
460# CONFIG_SCSI_QLA24XX is not set
461# CONFIG_SCSI_LPFC is not set 467# CONFIG_SCSI_LPFC is not set
462# CONFIG_SCSI_DC395x is not set 468# CONFIG_SCSI_DC395x is not set
463# CONFIG_SCSI_DC390T is not set 469# CONFIG_SCSI_DC390T is not set
@@ -574,6 +580,7 @@ CONFIG_E1000=m
574# CONFIG_R8169 is not set 580# CONFIG_R8169 is not set
575# CONFIG_SIS190 is not set 581# CONFIG_SIS190 is not set
576# CONFIG_SKGE is not set 582# CONFIG_SKGE is not set
583# CONFIG_SKY2 is not set
577# CONFIG_SK98LIN is not set 584# CONFIG_SK98LIN is not set
578# CONFIG_VIA_VELOCITY is not set 585# CONFIG_VIA_VELOCITY is not set
579# CONFIG_TIGON3 is not set 586# CONFIG_TIGON3 is not set
@@ -723,6 +730,12 @@ CONFIG_MAX_RAW_DEVS=256
723# CONFIG_I2C is not set 730# CONFIG_I2C is not set
724 731
725# 732#
733# SPI support
734#
735# CONFIG_SPI is not set
736# CONFIG_SPI_MASTER is not set
737
738#
726# Dallas's 1-wire bus 739# Dallas's 1-wire bus
727# 740#
728# CONFIG_W1 is not set 741# CONFIG_W1 is not set
@@ -788,7 +801,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
788# CONFIG_INFINIBAND is not set 801# CONFIG_INFINIBAND is not set
789 802
790# 803#
791# SN Devices 804# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
792# 805#
793 806
794# 807#
@@ -825,6 +838,7 @@ CONFIG_XFS_EXPORT=y
825CONFIG_XFS_SECURITY=y 838CONFIG_XFS_SECURITY=y
826CONFIG_XFS_POSIX_ACL=y 839CONFIG_XFS_POSIX_ACL=y
827# CONFIG_XFS_RT is not set 840# CONFIG_XFS_RT is not set
841# CONFIG_OCFS2_FS is not set
828# CONFIG_MINIX_FS is not set 842# CONFIG_MINIX_FS is not set
829# CONFIG_ROMFS_FS is not set 843# CONFIG_ROMFS_FS is not set
830CONFIG_INOTIFY=y 844CONFIG_INOTIFY=y
@@ -865,6 +879,7 @@ CONFIG_TMPFS=y
865# CONFIG_HUGETLB_PAGE is not set 879# CONFIG_HUGETLB_PAGE is not set
866CONFIG_RAMFS=y 880CONFIG_RAMFS=y
867# CONFIG_RELAYFS_FS is not set 881# CONFIG_RELAYFS_FS is not set
882# CONFIG_CONFIGFS_FS is not set
868 883
869# 884#
870# Miscellaneous filesystems 885# Miscellaneous filesystems
@@ -993,31 +1008,36 @@ CONFIG_TEXTSEARCH_FSM=m
993# 1008#
994# Instrumentation Support 1009# Instrumentation Support
995# 1010#
996CONFIG_PROFILING=y
997CONFIG_OPROFILE=y
998# CONFIG_KPROBES is not set 1011# CONFIG_KPROBES is not set
999 1012
1000# 1013#
1001# Kernel hacking 1014# Kernel hacking
1002# 1015#
1003# CONFIG_PRINTK_TIME is not set 1016# CONFIG_PRINTK_TIME is not set
1004CONFIG_DEBUG_KERNEL=y
1005CONFIG_MAGIC_SYSRQ=y 1017CONFIG_MAGIC_SYSRQ=y
1018CONFIG_DEBUG_KERNEL=y
1006CONFIG_LOG_BUF_SHIFT=17 1019CONFIG_LOG_BUF_SHIFT=17
1007CONFIG_DETECT_SOFTLOCKUP=y 1020CONFIG_DETECT_SOFTLOCKUP=y
1008# CONFIG_SCHEDSTATS is not set 1021# CONFIG_SCHEDSTATS is not set
1009# CONFIG_DEBUG_SLAB is not set 1022# CONFIG_DEBUG_SLAB is not set
1023# CONFIG_DEBUG_MUTEXES is not set
1010# CONFIG_DEBUG_SPINLOCK is not set 1024# CONFIG_DEBUG_SPINLOCK is not set
1011# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1025# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1012# CONFIG_DEBUG_KOBJECT is not set 1026# CONFIG_DEBUG_KOBJECT is not set
1013# CONFIG_DEBUG_INFO is not set 1027# CONFIG_DEBUG_INFO is not set
1014CONFIG_DEBUG_FS=y 1028CONFIG_DEBUG_FS=y
1015# CONFIG_DEBUG_VM is not set 1029# CONFIG_DEBUG_VM is not set
1030# CONFIG_FORCED_INLINING is not set
1016# CONFIG_RCU_TORTURE_TEST is not set 1031# CONFIG_RCU_TORTURE_TEST is not set
1017CONFIG_DEBUG_STACKOVERFLOW=y 1032CONFIG_DEBUG_STACKOVERFLOW=y
1018CONFIG_DEBUG_STACK_USAGE=y 1033CONFIG_DEBUG_STACK_USAGE=y
1019# CONFIG_DEBUGGER is not set 1034# CONFIG_DEBUGGER is not set
1020CONFIG_IRQSTACKS=y 1035CONFIG_IRQSTACKS=y
1036# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1037# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1038# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
1039# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1040# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1021 1041
1022# 1042#
1023# Security options 1043# Security options
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 68194c03f6d1..80a0db43aeb7 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc5 3# Linux kernel version: 2.6.16-rc6
4# Tue Dec 20 15:59:36 2005 4# Wed Mar 15 16:19:54 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -16,6 +16,10 @@ CONFIG_COMPAT=y
16CONFIG_SYSVIPC_COMPAT=y 16CONFIG_SYSVIPC_COMPAT=y
17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
18CONFIG_ARCH_MAY_HAVE_PC_FDC=y 18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_PPC_OF=y
20CONFIG_PPC_UDBG_16550=y
21CONFIG_GENERIC_TBSYNC=y
22# CONFIG_DEFAULT_UIMAGE is not set
19 23
20# 24#
21# Processor support 25# Processor support
@@ -32,7 +36,6 @@ CONFIG_NR_CPUS=2
32# Code maturity level options 36# Code maturity level options
33# 37#
34CONFIG_EXPERIMENTAL=y 38CONFIG_EXPERIMENTAL=y
35CONFIG_CLEAN_COMPILE=y
36CONFIG_LOCK_KERNEL=y 39CONFIG_LOCK_KERNEL=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38 41
@@ -47,8 +50,6 @@ CONFIG_POSIX_MQUEUE=y
47# CONFIG_BSD_PROCESS_ACCT is not set 50# CONFIG_BSD_PROCESS_ACCT is not set
48CONFIG_SYSCTL=y 51CONFIG_SYSCTL=y
49# CONFIG_AUDIT is not set 52# CONFIG_AUDIT is not set
50# CONFIG_HOTPLUG is not set
51CONFIG_KOBJECT_UEVENT=y
52CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
53CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
54# CONFIG_CPUSETS is not set 55# CONFIG_CPUSETS is not set
@@ -58,8 +59,10 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_KALLSYMS=y 59CONFIG_KALLSYMS=y
59CONFIG_KALLSYMS_ALL=y 60CONFIG_KALLSYMS_ALL=y
60# CONFIG_KALLSYMS_EXTRA_PASS is not set 61# CONFIG_KALLSYMS_EXTRA_PASS is not set
62CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y 63CONFIG_PRINTK=y
62CONFIG_BUG=y 64CONFIG_BUG=y
65CONFIG_ELF_CORE=y
63CONFIG_BASE_FULL=y 66CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 67CONFIG_FUTEX=y
65CONFIG_EPOLL=y 68CONFIG_EPOLL=y
@@ -68,8 +71,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
68CONFIG_CC_ALIGN_LABELS=0 71CONFIG_CC_ALIGN_LABELS=0
69CONFIG_CC_ALIGN_LOOPS=0 72CONFIG_CC_ALIGN_LOOPS=0
70CONFIG_CC_ALIGN_JUMPS=0 73CONFIG_CC_ALIGN_JUMPS=0
74CONFIG_SLAB=y
71# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
72CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
77# CONFIG_SLOB is not set
73 78
74# 79#
75# Loadable module support 80# Loadable module support
@@ -111,14 +116,12 @@ CONFIG_PPC_MULTIPLATFORM=y
111# CONFIG_PPC_PMAC is not set 116# CONFIG_PPC_PMAC is not set
112CONFIG_PPC_MAPLE=y 117CONFIG_PPC_MAPLE=y
113# CONFIG_PPC_CELL is not set 118# CONFIG_PPC_CELL is not set
114CONFIG_PPC_OF=y
115CONFIG_U3_DART=y 119CONFIG_U3_DART=y
116CONFIG_MPIC=y 120CONFIG_MPIC=y
117# CONFIG_PPC_RTAS is not set 121# CONFIG_PPC_RTAS is not set
118# CONFIG_MMIO_NVRAM is not set 122# CONFIG_MMIO_NVRAM is not set
119CONFIG_MPIC_BROKEN_U3=y 123CONFIG_MPIC_BROKEN_U3=y
120# CONFIG_PPC_MPC106 is not set 124# CONFIG_PPC_MPC106 is not set
121CONFIG_GENERIC_TBSYNC=y
122# CONFIG_CPU_FREQ is not set 125# CONFIG_CPU_FREQ is not set
123# CONFIG_WANT_EARLY_SERIAL is not set 126# CONFIG_WANT_EARLY_SERIAL is not set
124 127
@@ -138,6 +141,7 @@ CONFIG_BINFMT_ELF=y
138CONFIG_FORCE_MAX_ZONEORDER=13 141CONFIG_FORCE_MAX_ZONEORDER=13
139CONFIG_IOMMU_VMERGE=y 142CONFIG_IOMMU_VMERGE=y
140CONFIG_KEXEC=y 143CONFIG_KEXEC=y
144# CONFIG_CRASH_DUMP is not set
141CONFIG_IRQ_ALL_CPUS=y 145CONFIG_IRQ_ALL_CPUS=y
142# CONFIG_NUMA is not set 146# CONFIG_NUMA is not set
143CONFIG_ARCH_SELECT_MEMORY_MODEL=y 147CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -189,6 +193,7 @@ CONFIG_NET=y
189# 193#
190# Networking options 194# Networking options
191# 195#
196# CONFIG_NETDEBUG is not set
192CONFIG_PACKET=y 197CONFIG_PACKET=y
193CONFIG_PACKET_MMAP=y 198CONFIG_PACKET_MMAP=y
194CONFIG_UNIX=y 199CONFIG_UNIX=y
@@ -226,6 +231,11 @@ CONFIG_TCP_CONG_BIC=y
226# SCTP Configuration (EXPERIMENTAL) 231# SCTP Configuration (EXPERIMENTAL)
227# 232#
228# CONFIG_IP_SCTP is not set 233# CONFIG_IP_SCTP is not set
234
235#
236# TIPC Configuration (EXPERIMENTAL)
237#
238# CONFIG_TIPC is not set
229# CONFIG_ATM is not set 239# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set 240# CONFIG_BRIDGE is not set
231# CONFIG_VLAN_8021Q is not set 241# CONFIG_VLAN_8021Q is not set
@@ -461,6 +471,7 @@ CONFIG_E1000=y
461# CONFIG_R8169 is not set 471# CONFIG_R8169 is not set
462# CONFIG_SIS190 is not set 472# CONFIG_SIS190 is not set
463# CONFIG_SKGE is not set 473# CONFIG_SKGE is not set
474# CONFIG_SKY2 is not set
464# CONFIG_SK98LIN is not set 475# CONFIG_SK98LIN is not set
465# CONFIG_VIA_VELOCITY is not set 476# CONFIG_VIA_VELOCITY is not set
466# CONFIG_TIGON3 is not set 477# CONFIG_TIGON3 is not set
@@ -553,6 +564,7 @@ CONFIG_HW_CONSOLE=y
553CONFIG_SERIAL_8250=y 564CONFIG_SERIAL_8250=y
554CONFIG_SERIAL_8250_CONSOLE=y 565CONFIG_SERIAL_8250_CONSOLE=y
555CONFIG_SERIAL_8250_NR_UARTS=4 566CONFIG_SERIAL_8250_NR_UARTS=4
567CONFIG_SERIAL_8250_RUNTIME_UARTS=4
556# CONFIG_SERIAL_8250_EXTENDED is not set 568# CONFIG_SERIAL_8250_EXTENDED is not set
557 569
558# 570#
@@ -651,6 +663,12 @@ CONFIG_I2C_AMD8111=y
651# CONFIG_I2C_DEBUG_CHIP is not set 663# CONFIG_I2C_DEBUG_CHIP is not set
652 664
653# 665#
666# SPI support
667#
668# CONFIG_SPI is not set
669# CONFIG_SPI_MASTER is not set
670
671#
654# Dallas's 1-wire bus 672# Dallas's 1-wire bus
655# 673#
656# CONFIG_W1 is not set 674# CONFIG_W1 is not set
@@ -738,12 +756,14 @@ CONFIG_USB_UHCI_HCD=y
738# may also be needed; see USB_STORAGE Help for more information 756# may also be needed; see USB_STORAGE Help for more information
739# 757#
740# CONFIG_USB_STORAGE is not set 758# CONFIG_USB_STORAGE is not set
759# CONFIG_USB_LIBUSUAL is not set
741 760
742# 761#
743# USB Input Devices 762# USB Input Devices
744# 763#
745CONFIG_USB_HID=y 764CONFIG_USB_HID=y
746CONFIG_USB_HIDINPUT=y 765CONFIG_USB_HIDINPUT=y
766# CONFIG_USB_HIDINPUT_POWERBOOK is not set
747# CONFIG_HID_FF is not set 767# CONFIG_HID_FF is not set
748# CONFIG_USB_HIDDEV is not set 768# CONFIG_USB_HIDDEV is not set
749# CONFIG_USB_AIPTEK is not set 769# CONFIG_USB_AIPTEK is not set
@@ -757,6 +777,7 @@ CONFIG_USB_HIDINPUT=y
757# CONFIG_USB_YEALINK is not set 777# CONFIG_USB_YEALINK is not set
758# CONFIG_USB_XPAD is not set 778# CONFIG_USB_XPAD is not set
759# CONFIG_USB_ATI_REMOTE is not set 779# CONFIG_USB_ATI_REMOTE is not set
780# CONFIG_USB_ATI_REMOTE2 is not set
760# CONFIG_USB_KEYSPAN_REMOTE is not set 781# CONFIG_USB_KEYSPAN_REMOTE is not set
761# CONFIG_USB_APPLETOUCH is not set 782# CONFIG_USB_APPLETOUCH is not set
762 783
@@ -797,6 +818,7 @@ CONFIG_USB_SERIAL_GENERIC=y
797# CONFIG_USB_SERIAL_AIRPRIME is not set 818# CONFIG_USB_SERIAL_AIRPRIME is not set
798# CONFIG_USB_SERIAL_ANYDATA is not set 819# CONFIG_USB_SERIAL_ANYDATA is not set
799# CONFIG_USB_SERIAL_BELKIN is not set 820# CONFIG_USB_SERIAL_BELKIN is not set
821# CONFIG_USB_SERIAL_WHITEHEAT is not set
800# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 822# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
801# CONFIG_USB_SERIAL_CP2101 is not set 823# CONFIG_USB_SERIAL_CP2101 is not set
802CONFIG_USB_SERIAL_CYPRESS_M8=m 824CONFIG_USB_SERIAL_CYPRESS_M8=m
@@ -873,7 +895,7 @@ CONFIG_USB_EZUSB=y
873# CONFIG_INFINIBAND is not set 895# CONFIG_INFINIBAND is not set
874 896
875# 897#
876# SN Devices 898# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
877# 899#
878 900
879# 901#
@@ -891,6 +913,7 @@ CONFIG_JBD=y
891# CONFIG_JFS_FS is not set 913# CONFIG_JFS_FS is not set
892CONFIG_FS_POSIX_ACL=y 914CONFIG_FS_POSIX_ACL=y
893# CONFIG_XFS_FS is not set 915# CONFIG_XFS_FS is not set
916# CONFIG_OCFS2_FS is not set
894# CONFIG_MINIX_FS is not set 917# CONFIG_MINIX_FS is not set
895# CONFIG_ROMFS_FS is not set 918# CONFIG_ROMFS_FS is not set
896CONFIG_INOTIFY=y 919CONFIG_INOTIFY=y
@@ -927,6 +950,7 @@ CONFIG_HUGETLBFS=y
927CONFIG_HUGETLB_PAGE=y 950CONFIG_HUGETLB_PAGE=y
928CONFIG_RAMFS=y 951CONFIG_RAMFS=y
929# CONFIG_RELAYFS_FS is not set 952# CONFIG_RELAYFS_FS is not set
953# CONFIG_CONFIGFS_FS is not set
930 954
931# 955#
932# Miscellaneous filesystems 956# Miscellaneous filesystems
@@ -988,6 +1012,7 @@ CONFIG_MSDOS_PARTITION=y
988# CONFIG_SGI_PARTITION is not set 1012# CONFIG_SGI_PARTITION is not set
989# CONFIG_ULTRIX_PARTITION is not set 1013# CONFIG_ULTRIX_PARTITION is not set
990# CONFIG_SUN_PARTITION is not set 1014# CONFIG_SUN_PARTITION is not set
1015# CONFIG_KARMA_PARTITION is not set
991# CONFIG_EFI_PARTITION is not set 1016# CONFIG_EFI_PARTITION is not set
992 1017
993# 1018#
@@ -1053,18 +1078,20 @@ CONFIG_ZLIB_INFLATE=y
1053# Kernel hacking 1078# Kernel hacking
1054# 1079#
1055# CONFIG_PRINTK_TIME is not set 1080# CONFIG_PRINTK_TIME is not set
1056CONFIG_DEBUG_KERNEL=y
1057CONFIG_MAGIC_SYSRQ=y 1081CONFIG_MAGIC_SYSRQ=y
1082CONFIG_DEBUG_KERNEL=y
1058CONFIG_LOG_BUF_SHIFT=17 1083CONFIG_LOG_BUF_SHIFT=17
1059CONFIG_DETECT_SOFTLOCKUP=y 1084CONFIG_DETECT_SOFTLOCKUP=y
1060# CONFIG_SCHEDSTATS is not set 1085# CONFIG_SCHEDSTATS is not set
1061CONFIG_DEBUG_SLAB=y 1086CONFIG_DEBUG_SLAB=y
1087# CONFIG_DEBUG_MUTEXES is not set
1062# CONFIG_DEBUG_SPINLOCK is not set 1088# CONFIG_DEBUG_SPINLOCK is not set
1063CONFIG_DEBUG_SPINLOCK_SLEEP=y 1089CONFIG_DEBUG_SPINLOCK_SLEEP=y
1064# CONFIG_DEBUG_KOBJECT is not set 1090# CONFIG_DEBUG_KOBJECT is not set
1065# CONFIG_DEBUG_INFO is not set 1091# CONFIG_DEBUG_INFO is not set
1066CONFIG_DEBUG_FS=y 1092CONFIG_DEBUG_FS=y
1067# CONFIG_DEBUG_VM is not set 1093# CONFIG_DEBUG_VM is not set
1094# CONFIG_FORCED_INLINING is not set
1068# CONFIG_RCU_TORTURE_TEST is not set 1095# CONFIG_RCU_TORTURE_TEST is not set
1069CONFIG_DEBUG_STACKOVERFLOW=y 1096CONFIG_DEBUG_STACKOVERFLOW=y
1070CONFIG_DEBUG_STACK_USAGE=y 1097CONFIG_DEBUG_STACK_USAGE=y
@@ -1073,6 +1100,11 @@ CONFIG_XMON=y
1073CONFIG_XMON_DEFAULT=y 1100CONFIG_XMON_DEFAULT=y
1074# CONFIG_IRQSTACKS is not set 1101# CONFIG_IRQSTACKS is not set
1075CONFIG_BOOTX_TEXT=y 1102CONFIG_BOOTX_TEXT=y
1103# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1104# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1105# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
1106# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1107# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1076 1108
1077# 1109#
1078# Security options 1110# Security options
diff --git a/arch/powerpc/configs/mpc834x_sys_defconfig b/arch/powerpc/configs/mpc834x_sys_defconfig
index 3bff761965c2..5078b0441d61 100644
--- a/arch/powerpc/configs/mpc834x_sys_defconfig
+++ b/arch/powerpc/configs/mpc834x_sys_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-g461d4edf-dirty 3# Linux kernel version: 2.6.16-rc6
4# Fri Jan 13 11:01:47 2006 4# Wed Mar 15 16:19:56 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -43,7 +43,6 @@ CONFIG_PPC_STD_MMU_32=y
43# Code maturity level options 43# Code maturity level options
44# 44#
45CONFIG_EXPERIMENTAL=y 45CONFIG_EXPERIMENTAL=y
46CONFIG_CLEAN_COMPILE=y
47CONFIG_BROKEN_ON_SMP=y 46CONFIG_BROKEN_ON_SMP=y
48CONFIG_INIT_ENV_ARG_LIMIT=32 47CONFIG_INIT_ENV_ARG_LIMIT=32
49 48
@@ -189,6 +188,7 @@ CONFIG_NET=y
189# 188#
190# Networking options 189# Networking options
191# 190#
191# CONFIG_NETDEBUG is not set
192CONFIG_PACKET=y 192CONFIG_PACKET=y
193# CONFIG_PACKET_MMAP is not set 193# CONFIG_PACKET_MMAP is not set
194CONFIG_UNIX=y 194CONFIG_UNIX=y
@@ -226,6 +226,11 @@ CONFIG_TCP_CONG_BIC=y
226# SCTP Configuration (EXPERIMENTAL) 226# SCTP Configuration (EXPERIMENTAL)
227# 227#
228# CONFIG_IP_SCTP is not set 228# CONFIG_IP_SCTP is not set
229
230#
231# TIPC Configuration (EXPERIMENTAL)
232#
233# CONFIG_TIPC is not set
229# CONFIG_ATM is not set 234# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set 235# CONFIG_BRIDGE is not set
231# CONFIG_VLAN_8021Q is not set 236# CONFIG_VLAN_8021Q is not set
@@ -511,6 +516,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
511# 516#
512CONFIG_SERIAL_CORE=y 517CONFIG_SERIAL_CORE=y
513CONFIG_SERIAL_CORE_CONSOLE=y 518CONFIG_SERIAL_CORE_CONSOLE=y
519# CONFIG_SERIAL_JSM is not set
514CONFIG_UNIX98_PTYS=y 520CONFIG_UNIX98_PTYS=y
515CONFIG_LEGACY_PTYS=y 521CONFIG_LEGACY_PTYS=y
516CONFIG_LEGACY_PTY_COUNT=256 522CONFIG_LEGACY_PTY_COUNT=256
@@ -615,6 +621,12 @@ CONFIG_I2C_MPC=y
615# CONFIG_I2C_DEBUG_CHIP is not set 621# CONFIG_I2C_DEBUG_CHIP is not set
616 622
617# 623#
624# SPI support
625#
626# CONFIG_SPI is not set
627# CONFIG_SPI_MASTER is not set
628
629#
618# Dallas's 1-wire bus 630# Dallas's 1-wire bus
619# 631#
620# CONFIG_W1 is not set 632# CONFIG_W1 is not set
@@ -632,6 +644,7 @@ CONFIG_HWMON=y
632# CONFIG_SENSORS_ASB100 is not set 644# CONFIG_SENSORS_ASB100 is not set
633# CONFIG_SENSORS_ATXP1 is not set 645# CONFIG_SENSORS_ATXP1 is not set
634# CONFIG_SENSORS_DS1621 is not set 646# CONFIG_SENSORS_DS1621 is not set
647# CONFIG_SENSORS_F71805F is not set
635# CONFIG_SENSORS_FSCHER is not set 648# CONFIG_SENSORS_FSCHER is not set
636# CONFIG_SENSORS_FSCPOS is not set 649# CONFIG_SENSORS_FSCPOS is not set
637# CONFIG_SENSORS_GL518SM is not set 650# CONFIG_SENSORS_GL518SM is not set
@@ -716,7 +729,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
716# CONFIG_INFINIBAND is not set 729# CONFIG_INFINIBAND is not set
717 730
718# 731#
719# SN Devices 732# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
720# 733#
721 734
722# 735#
@@ -826,6 +839,7 @@ CONFIG_PARTITION_ADVANCED=y
826# CONFIG_SGI_PARTITION is not set 839# CONFIG_SGI_PARTITION is not set
827# CONFIG_ULTRIX_PARTITION is not set 840# CONFIG_ULTRIX_PARTITION is not set
828# CONFIG_SUN_PARTITION is not set 841# CONFIG_SUN_PARTITION is not set
842# CONFIG_KARMA_PARTITION is not set
829# CONFIG_EFI_PARTITION is not set 843# CONFIG_EFI_PARTITION is not set
830 844
831# 845#
@@ -899,13 +913,3 @@ CONFIG_CRYPTO_DES=y
899# 913#
900# Hardware crypto devices 914# Hardware crypto devices
901# 915#
902
903#
904# SEC2.x Options
905#
906CONFIG_MPC8349E_SEC2x=y
907
908#
909# SEC2.x Test Options
910#
911CONFIG_MPC8349E_SEC2xTEST=y
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
new file mode 100644
index 000000000000..2a8290ee15c6
--- /dev/null
+++ b/arch/powerpc/configs/mpc8540_ads_defconfig
@@ -0,0 +1,721 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version:
4# Sat Jan 14 15:57:54 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y
15CONFIG_GENERIC_NVRAM=y
16CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
17CONFIG_ARCH_MAY_HAVE_PC_FDC=y
18CONFIG_PPC_OF=y
19CONFIG_PPC_UDBG_16550=y
20# CONFIG_GENERIC_TBSYNC is not set
21
22#
23# Processor support
24#
25# CONFIG_CLASSIC32 is not set
26# CONFIG_PPC_52xx is not set
27# CONFIG_PPC_82xx is not set
28# CONFIG_PPC_83xx is not set
29CONFIG_PPC_85xx=y
30# CONFIG_40x is not set
31# CONFIG_44x is not set
32# CONFIG_8xx is not set
33# CONFIG_E200 is not set
34CONFIG_85xx=y
35CONFIG_E500=y
36CONFIG_BOOKE=y
37CONFIG_FSL_BOOKE=y
38# CONFIG_PHYS_64BIT is not set
39CONFIG_SPE=y
40
41#
42# Code maturity level options
43#
44CONFIG_EXPERIMENTAL=y
45CONFIG_CLEAN_COMPILE=y
46CONFIG_BROKEN_ON_SMP=y
47CONFIG_INIT_ENV_ARG_LIMIT=32
48
49#
50# General setup
51#
52CONFIG_LOCALVERSION=""
53CONFIG_LOCALVERSION_AUTO=y
54CONFIG_SWAP=y
55CONFIG_SYSVIPC=y
56# CONFIG_POSIX_MQUEUE is not set
57# CONFIG_BSD_PROCESS_ACCT is not set
58CONFIG_SYSCTL=y
59# CONFIG_AUDIT is not set
60# CONFIG_IKCONFIG is not set
61CONFIG_INITRAMFS_SOURCE=""
62# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
63CONFIG_EMBEDDED=y
64CONFIG_KALLSYMS=y
65# CONFIG_KALLSYMS_ALL is not set
66# CONFIG_KALLSYMS_EXTRA_PASS is not set
67CONFIG_HOTPLUG=y
68CONFIG_PRINTK=y
69CONFIG_BUG=y
70CONFIG_ELF_CORE=y
71CONFIG_BASE_FULL=y
72CONFIG_FUTEX=y
73CONFIG_EPOLL=y
74CONFIG_SHMEM=y
75CONFIG_CC_ALIGN_FUNCTIONS=0
76CONFIG_CC_ALIGN_LABELS=0
77CONFIG_CC_ALIGN_LOOPS=0
78CONFIG_CC_ALIGN_JUMPS=0
79CONFIG_SLAB=y
80# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0
82# CONFIG_SLOB is not set
83
84#
85# Loadable module support
86#
87# CONFIG_MODULES is not set
88
89#
90# Block layer
91#
92# CONFIG_LBD is not set
93
94#
95# IO Schedulers
96#
97CONFIG_IOSCHED_NOOP=y
98CONFIG_IOSCHED_AS=y
99CONFIG_IOSCHED_DEADLINE=y
100CONFIG_IOSCHED_CFQ=y
101CONFIG_DEFAULT_AS=y
102# CONFIG_DEFAULT_DEADLINE is not set
103# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_MPIC=y
107# CONFIG_WANT_EARLY_SERIAL is not set
108
109#
110# Platform support
111#
112CONFIG_MPC8540_ADS=y
113CONFIG_MPC8540=y
114CONFIG_PPC_INDIRECT_PCI_BE=y
115
116#
117# Kernel options
118#
119# CONFIG_HIGHMEM is not set
120# CONFIG_HZ_100 is not set
121CONFIG_HZ_250=y
122# CONFIG_HZ_1000 is not set
123CONFIG_HZ=250
124CONFIG_PREEMPT_NONE=y
125# CONFIG_PREEMPT_VOLUNTARY is not set
126# CONFIG_PREEMPT is not set
127CONFIG_BINFMT_ELF=y
128CONFIG_BINFMT_MISC=y
129CONFIG_MATH_EMULATION=y
130CONFIG_ARCH_FLATMEM_ENABLE=y
131CONFIG_SELECT_MEMORY_MODEL=y
132CONFIG_FLATMEM_MANUAL=y
133# CONFIG_DISCONTIGMEM_MANUAL is not set
134# CONFIG_SPARSEMEM_MANUAL is not set
135CONFIG_FLATMEM=y
136CONFIG_FLAT_NODE_MEM_MAP=y
137# CONFIG_SPARSEMEM_STATIC is not set
138CONFIG_SPLIT_PTLOCK_CPUS=4
139CONFIG_PROC_DEVICETREE=y
140# CONFIG_CMDLINE_BOOL is not set
141# CONFIG_PM is not set
142# CONFIG_SOFTWARE_SUSPEND is not set
143# CONFIG_SECCOMP is not set
144CONFIG_ISA_DMA_API=y
145
146#
147# Bus options
148#
149# CONFIG_PPC_I8259 is not set
150CONFIG_PPC_INDIRECT_PCI=y
151CONFIG_FSL_SOC=y
152# CONFIG_PCI is not set
153# CONFIG_PCI_DOMAINS is not set
154
155#
156# PCCARD (PCMCIA/CardBus) support
157#
158# CONFIG_PCCARD is not set
159
160#
161# PCI Hotplug Support
162#
163
164#
165# Advanced setup
166#
167# CONFIG_ADVANCED_OPTIONS is not set
168
169#
170# Default settings for advanced configuration options are used
171#
172CONFIG_HIGHMEM_START=0xfe000000
173CONFIG_LOWMEM_SIZE=0x30000000
174CONFIG_KERNEL_START=0xc0000000
175CONFIG_TASK_SIZE=0x80000000
176CONFIG_BOOT_LOAD=0x00800000
177
178#
179# Networking
180#
181CONFIG_NET=y
182
183#
184# Networking options
185#
186CONFIG_PACKET=y
187# CONFIG_PACKET_MMAP is not set
188CONFIG_UNIX=y
189# CONFIG_NET_KEY is not set
190CONFIG_INET=y
191CONFIG_IP_MULTICAST=y
192# CONFIG_IP_ADVANCED_ROUTER is not set
193CONFIG_IP_FIB_HASH=y
194CONFIG_IP_PNP=y
195CONFIG_IP_PNP_DHCP=y
196CONFIG_IP_PNP_BOOTP=y
197# CONFIG_IP_PNP_RARP is not set
198# CONFIG_NET_IPIP is not set
199# CONFIG_NET_IPGRE is not set
200# CONFIG_IP_MROUTE is not set
201# CONFIG_ARPD is not set
202CONFIG_SYN_COOKIES=y
203# CONFIG_INET_AH is not set
204# CONFIG_INET_ESP is not set
205# CONFIG_INET_IPCOMP is not set
206# CONFIG_INET_TUNNEL is not set
207CONFIG_INET_DIAG=y
208CONFIG_INET_TCP_DIAG=y
209# CONFIG_TCP_CONG_ADVANCED is not set
210CONFIG_TCP_CONG_BIC=y
211# CONFIG_IPV6 is not set
212# CONFIG_NETFILTER is not set
213
214#
215# DCCP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_DCCP is not set
218
219#
220# SCTP Configuration (EXPERIMENTAL)
221#
222# CONFIG_IP_SCTP is not set
223# CONFIG_ATM is not set
224# CONFIG_BRIDGE is not set
225# CONFIG_VLAN_8021Q is not set
226# CONFIG_DECNET is not set
227# CONFIG_LLC2 is not set
228# CONFIG_IPX is not set
229# CONFIG_ATALK is not set
230# CONFIG_X25 is not set
231# CONFIG_LAPB is not set
232
233#
234# TIPC Configuration (EXPERIMENTAL)
235#
236# CONFIG_TIPC is not set
237# CONFIG_NET_DIVERT is not set
238# CONFIG_ECONET is not set
239# CONFIG_WAN_ROUTER is not set
240
241#
242# QoS and/or fair queueing
243#
244# CONFIG_NET_SCHED is not set
245
246#
247# Network testing
248#
249# CONFIG_NET_PKTGEN is not set
250# CONFIG_HAMRADIO is not set
251# CONFIG_IRDA is not set
252# CONFIG_BT is not set
253# CONFIG_IEEE80211 is not set
254
255#
256# Device Drivers
257#
258
259#
260# Generic Driver Options
261#
262CONFIG_STANDALONE=y
263CONFIG_PREVENT_FIRMWARE_BUILD=y
264# CONFIG_FW_LOADER is not set
265# CONFIG_DEBUG_DRIVER is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set
271
272#
273# Memory Technology Devices (MTD)
274#
275# CONFIG_MTD is not set
276
277#
278# Parallel port support
279#
280# CONFIG_PARPORT is not set
281
282#
283# Plug and Play support
284#
285
286#
287# Block devices
288#
289# CONFIG_BLK_DEV_FD is not set
290# CONFIG_BLK_DEV_COW_COMMON is not set
291CONFIG_BLK_DEV_LOOP=y
292# CONFIG_BLK_DEV_CRYPTOLOOP is not set
293# CONFIG_BLK_DEV_NBD is not set
294CONFIG_BLK_DEV_RAM=y
295CONFIG_BLK_DEV_RAM_COUNT=16
296CONFIG_BLK_DEV_RAM_SIZE=32768
297CONFIG_BLK_DEV_INITRD=y
298# CONFIG_CDROM_PKTCDVD is not set
299# CONFIG_ATA_OVER_ETH is not set
300
301#
302# ATA/ATAPI/MFM/RLL support
303#
304# CONFIG_IDE is not set
305
306#
307# SCSI device support
308#
309# CONFIG_RAID_ATTRS is not set
310# CONFIG_SCSI is not set
311
312#
313# Multi-device support (RAID and LVM)
314#
315# CONFIG_MD is not set
316
317#
318# Fusion MPT device support
319#
320# CONFIG_FUSION is not set
321
322#
323# IEEE 1394 (FireWire) support
324#
325
326#
327# I2O device support
328#
329
330#
331# Macintosh device drivers
332#
333# CONFIG_WINDFARM is not set
334
335#
336# Network device support
337#
338CONFIG_NETDEVICES=y
339# CONFIG_DUMMY is not set
340# CONFIG_BONDING is not set
341# CONFIG_EQUALIZER is not set
342# CONFIG_TUN is not set
343
344#
345# PHY device support
346#
347CONFIG_PHYLIB=y
348
349#
350# MII PHY device drivers
351#
352# CONFIG_MARVELL_PHY is not set
353# CONFIG_DAVICOM_PHY is not set
354# CONFIG_QSEMI_PHY is not set
355# CONFIG_LXT_PHY is not set
356# CONFIG_CICADA_PHY is not set
357
358#
359# Ethernet (10 or 100Mbit)
360#
361CONFIG_NET_ETHERNET=y
362CONFIG_MII=y
363
364#
365# Ethernet (1000 Mbit)
366#
367CONFIG_GIANFAR=y
368CONFIG_GFAR_NAPI=y
369
370#
371# Ethernet (10000 Mbit)
372#
373
374#
375# Token Ring devices
376#
377
378#
379# Wireless LAN (non-hamradio)
380#
381# CONFIG_NET_RADIO is not set
382
383#
384# Wan interfaces
385#
386# CONFIG_WAN is not set
387# CONFIG_PPP is not set
388# CONFIG_SLIP is not set
389# CONFIG_SHAPER is not set
390# CONFIG_NETCONSOLE is not set
391# CONFIG_NETPOLL is not set
392# CONFIG_NET_POLL_CONTROLLER is not set
393
394#
395# ISDN subsystem
396#
397# CONFIG_ISDN is not set
398
399#
400# Telephony Support
401#
402# CONFIG_PHONE is not set
403
404#
405# Input device support
406#
407CONFIG_INPUT=y
408
409#
410# Userland interfaces
411#
412# CONFIG_INPUT_MOUSEDEV is not set
413# CONFIG_INPUT_JOYDEV is not set
414# CONFIG_INPUT_TSDEV is not set
415# CONFIG_INPUT_EVDEV is not set
416# CONFIG_INPUT_EVBUG is not set
417
418#
419# Input Device Drivers
420#
421# CONFIG_INPUT_KEYBOARD is not set
422# CONFIG_INPUT_MOUSE is not set
423# CONFIG_INPUT_JOYSTICK is not set
424# CONFIG_INPUT_TOUCHSCREEN is not set
425# CONFIG_INPUT_MISC is not set
426
427#
428# Hardware I/O ports
429#
430# CONFIG_SERIO is not set
431# CONFIG_GAMEPORT is not set
432
433#
434# Character devices
435#
436# CONFIG_VT is not set
437# CONFIG_SERIAL_NONSTANDARD is not set
438
439#
440# Serial drivers
441#
442CONFIG_SERIAL_8250=y
443CONFIG_SERIAL_8250_CONSOLE=y
444CONFIG_SERIAL_8250_NR_UARTS=4
445CONFIG_SERIAL_8250_RUNTIME_UARTS=4
446# CONFIG_SERIAL_8250_EXTENDED is not set
447
448#
449# Non-8250 serial port support
450#
451CONFIG_SERIAL_CORE=y
452CONFIG_SERIAL_CORE_CONSOLE=y
453CONFIG_UNIX98_PTYS=y
454CONFIG_LEGACY_PTYS=y
455CONFIG_LEGACY_PTY_COUNT=256
456
457#
458# IPMI
459#
460# CONFIG_IPMI_HANDLER is not set
461
462#
463# Watchdog Cards
464#
465# CONFIG_WATCHDOG is not set
466# CONFIG_NVRAM is not set
467CONFIG_GEN_RTC=y
468# CONFIG_GEN_RTC_X is not set
469# CONFIG_DTLK is not set
470# CONFIG_R3964 is not set
471
472#
473# Ftape, the floppy tape device driver
474#
475# CONFIG_AGP is not set
476# CONFIG_RAW_DRIVER is not set
477
478#
479# TPM devices
480#
481# CONFIG_TCG_TPM is not set
482# CONFIG_TELCLOCK is not set
483
484#
485# I2C support
486#
487# CONFIG_I2C is not set
488
489#
490# Dallas's 1-wire bus
491#
492# CONFIG_W1 is not set
493
494#
495# Hardware Monitoring support
496#
497CONFIG_HWMON=y
498# CONFIG_HWMON_VID is not set
499# CONFIG_HWMON_DEBUG_CHIP is not set
500
501#
502# Misc devices
503#
504
505#
506# Multimedia Capabilities Port drivers
507#
508
509#
510# Multimedia devices
511#
512# CONFIG_VIDEO_DEV is not set
513
514#
515# Digital Video Broadcasting Devices
516#
517# CONFIG_DVB is not set
518
519#
520# Graphics support
521#
522# CONFIG_FB is not set
523
524#
525# Sound
526#
527# CONFIG_SOUND is not set
528
529#
530# USB support
531#
532# CONFIG_USB_ARCH_HAS_HCD is not set
533# CONFIG_USB_ARCH_HAS_OHCI is not set
534
535#
536# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
537#
538
539#
540# USB Gadget Support
541#
542# CONFIG_USB_GADGET is not set
543
544#
545# MMC/SD Card support
546#
547# CONFIG_MMC is not set
548
549#
550# InfiniBand support
551#
552
553#
554# SN Devices
555#
556
557#
558# File systems
559#
560CONFIG_EXT2_FS=y
561# CONFIG_EXT2_FS_XATTR is not set
562# CONFIG_EXT2_FS_XIP is not set
563CONFIG_EXT3_FS=y
564CONFIG_EXT3_FS_XATTR=y
565# CONFIG_EXT3_FS_POSIX_ACL is not set
566# CONFIG_EXT3_FS_SECURITY is not set
567CONFIG_JBD=y
568# CONFIG_JBD_DEBUG is not set
569CONFIG_FS_MBCACHE=y
570# CONFIG_REISERFS_FS is not set
571# CONFIG_JFS_FS is not set
572# CONFIG_FS_POSIX_ACL is not set
573# CONFIG_XFS_FS is not set
574# CONFIG_OCFS2_FS is not set
575# CONFIG_MINIX_FS is not set
576# CONFIG_ROMFS_FS is not set
577CONFIG_INOTIFY=y
578# CONFIG_QUOTA is not set
579CONFIG_DNOTIFY=y
580# CONFIG_AUTOFS_FS is not set
581# CONFIG_AUTOFS4_FS is not set
582# CONFIG_FUSE_FS is not set
583
584#
585# CD-ROM/DVD Filesystems
586#
587# CONFIG_ISO9660_FS is not set
588# CONFIG_UDF_FS is not set
589
590#
591# DOS/FAT/NT Filesystems
592#
593# CONFIG_MSDOS_FS is not set
594# CONFIG_VFAT_FS is not set
595# CONFIG_NTFS_FS is not set
596
597#
598# Pseudo filesystems
599#
600CONFIG_PROC_FS=y
601CONFIG_PROC_KCORE=y
602CONFIG_SYSFS=y
603CONFIG_TMPFS=y
604# CONFIG_HUGETLB_PAGE is not set
605CONFIG_RAMFS=y
606# CONFIG_RELAYFS_FS is not set
607# CONFIG_CONFIGFS_FS is not set
608
609#
610# Miscellaneous filesystems
611#
612# CONFIG_ADFS_FS is not set
613# CONFIG_AFFS_FS is not set
614# CONFIG_HFS_FS is not set
615# CONFIG_HFSPLUS_FS is not set
616# CONFIG_BEFS_FS is not set
617# CONFIG_BFS_FS is not set
618# CONFIG_EFS_FS is not set
619# CONFIG_CRAMFS is not set
620# CONFIG_VXFS_FS is not set
621# CONFIG_HPFS_FS is not set
622# CONFIG_QNX4FS_FS is not set
623# CONFIG_SYSV_FS is not set
624# CONFIG_UFS_FS is not set
625
626#
627# Network File Systems
628#
629CONFIG_NFS_FS=y
630# CONFIG_NFS_V3 is not set
631# CONFIG_NFS_V4 is not set
632# CONFIG_NFS_DIRECTIO is not set
633# CONFIG_NFSD is not set
634CONFIG_ROOT_NFS=y
635CONFIG_LOCKD=y
636CONFIG_NFS_COMMON=y
637CONFIG_SUNRPC=y
638# CONFIG_RPCSEC_GSS_KRB5 is not set
639# CONFIG_RPCSEC_GSS_SPKM3 is not set
640# CONFIG_SMB_FS is not set
641# CONFIG_CIFS is not set
642# CONFIG_NCP_FS is not set
643# CONFIG_CODA_FS is not set
644# CONFIG_AFS_FS is not set
645# CONFIG_9P_FS is not set
646
647#
648# Partition Types
649#
650CONFIG_PARTITION_ADVANCED=y
651# CONFIG_ACORN_PARTITION is not set
652# CONFIG_OSF_PARTITION is not set
653# CONFIG_AMIGA_PARTITION is not set
654# CONFIG_ATARI_PARTITION is not set
655# CONFIG_MAC_PARTITION is not set
656# CONFIG_MSDOS_PARTITION is not set
657# CONFIG_LDM_PARTITION is not set
658# CONFIG_SGI_PARTITION is not set
659# CONFIG_ULTRIX_PARTITION is not set
660# CONFIG_SUN_PARTITION is not set
661# CONFIG_EFI_PARTITION is not set
662
663#
664# Native Language Support
665#
666# CONFIG_NLS is not set
667
668#
669# Library routines
670#
671# CONFIG_CRC_CCITT is not set
672# CONFIG_CRC16 is not set
673CONFIG_CRC32=y
674# CONFIG_LIBCRC32C is not set
675
676#
677# Instrumentation Support
678#
679# CONFIG_PROFILING is not set
680
681#
682# Kernel hacking
683#
684# CONFIG_PRINTK_TIME is not set
685# CONFIG_MAGIC_SYSRQ is not set
686CONFIG_DEBUG_KERNEL=y
687CONFIG_LOG_BUF_SHIFT=14
688CONFIG_DETECT_SOFTLOCKUP=y
689# CONFIG_SCHEDSTATS is not set
690# CONFIG_DEBUG_SLAB is not set
691CONFIG_DEBUG_MUTEXES=y
692# CONFIG_DEBUG_SPINLOCK is not set
693# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
694# CONFIG_DEBUG_KOBJECT is not set
695# CONFIG_DEBUG_INFO is not set
696# CONFIG_DEBUG_FS is not set
697# CONFIG_DEBUG_VM is not set
698# CONFIG_RCU_TORTURE_TEST is not set
699# CONFIG_DEBUGGER is not set
700# CONFIG_BDI_SWITCH is not set
701# CONFIG_BOOTX_TEXT is not set
702# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
703# CONFIG_PPC_EARLY_DEBUG_G5 is not set
704# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
705# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
706# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
707
708#
709# Security options
710#
711# CONFIG_KEYS is not set
712# CONFIG_SECURITY is not set
713
714#
715# Cryptographic options
716#
717# CONFIG_CRYPTO is not set
718
719#
720# Hardware crypto devices
721#
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 2ace57d1e333..57a027971d67 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15 3# Linux kernel version: 2.6.16-rc6
4# Sat Jan 14 16:26:08 2006 4# Wed Mar 15 16:21:32 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -17,8 +17,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
17CONFIG_ARCH_MAY_HAVE_PC_FDC=y 17CONFIG_ARCH_MAY_HAVE_PC_FDC=y
18CONFIG_PPC_OF=y 18CONFIG_PPC_OF=y
19# CONFIG_PPC_UDBG_16550 is not set 19# CONFIG_PPC_UDBG_16550 is not set
20# CONFIG_CRASH_DUMP is not set
21# CONFIG_GENERIC_TBSYNC is not set 20# CONFIG_GENERIC_TBSYNC is not set
21# CONFIG_DEFAULT_UIMAGE is not set
22 22
23# 23#
24# Processor support 24# Processor support
@@ -43,7 +43,6 @@ CONFIG_PPC_STD_MMU_32=y
43# Code maturity level options 43# Code maturity level options
44# 44#
45CONFIG_EXPERIMENTAL=y 45CONFIG_EXPERIMENTAL=y
46CONFIG_CLEAN_COMPILE=y
47CONFIG_BROKEN_ON_SMP=y 46CONFIG_BROKEN_ON_SMP=y
48CONFIG_INIT_ENV_ARG_LIMIT=32 47CONFIG_INIT_ENV_ARG_LIMIT=32
49 48
@@ -236,6 +235,7 @@ CONFIG_NET=y
236# 235#
237# Networking options 236# Networking options
238# 237#
238# CONFIG_NETDEBUG is not set
239CONFIG_PACKET=y 239CONFIG_PACKET=y
240# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
241CONFIG_UNIX=y 241CONFIG_UNIX=y
@@ -271,6 +271,25 @@ CONFIG_NETFILTER=y
271# Core Netfilter Configuration 271# Core Netfilter Configuration
272# 272#
273# CONFIG_NETFILTER_NETLINK is not set 273# CONFIG_NETFILTER_NETLINK is not set
274CONFIG_NETFILTER_XTABLES=m
275CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
276CONFIG_NETFILTER_XT_TARGET_MARK=m
277CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
278CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
279CONFIG_NETFILTER_XT_MATCH_COMMENT=m
280CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
281# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
282CONFIG_NETFILTER_XT_MATCH_HELPER=m
283CONFIG_NETFILTER_XT_MATCH_LENGTH=m
284CONFIG_NETFILTER_XT_MATCH_LIMIT=m
285CONFIG_NETFILTER_XT_MATCH_MAC=m
286CONFIG_NETFILTER_XT_MATCH_MARK=m
287CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
288CONFIG_NETFILTER_XT_MATCH_REALM=m
289CONFIG_NETFILTER_XT_MATCH_SCTP=m
290CONFIG_NETFILTER_XT_MATCH_STATE=m
291CONFIG_NETFILTER_XT_MATCH_STRING=m
292CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
274 293
275# 294#
276# IP: Netfilter Configuration 295# IP: Netfilter Configuration
@@ -288,37 +307,22 @@ CONFIG_IP_NF_AMANDA=m
288CONFIG_IP_NF_PPTP=m 307CONFIG_IP_NF_PPTP=m
289# CONFIG_IP_NF_QUEUE is not set 308# CONFIG_IP_NF_QUEUE is not set
290CONFIG_IP_NF_IPTABLES=m 309CONFIG_IP_NF_IPTABLES=m
291CONFIG_IP_NF_MATCH_LIMIT=m
292CONFIG_IP_NF_MATCH_IPRANGE=m 310CONFIG_IP_NF_MATCH_IPRANGE=m
293CONFIG_IP_NF_MATCH_MAC=m
294CONFIG_IP_NF_MATCH_PKTTYPE=m
295CONFIG_IP_NF_MATCH_MARK=m
296CONFIG_IP_NF_MATCH_MULTIPORT=m 311CONFIG_IP_NF_MATCH_MULTIPORT=m
297CONFIG_IP_NF_MATCH_TOS=m 312CONFIG_IP_NF_MATCH_TOS=m
298CONFIG_IP_NF_MATCH_RECENT=m 313CONFIG_IP_NF_MATCH_RECENT=m
299CONFIG_IP_NF_MATCH_ECN=m 314CONFIG_IP_NF_MATCH_ECN=m
300CONFIG_IP_NF_MATCH_DSCP=m 315CONFIG_IP_NF_MATCH_DSCP=m
301CONFIG_IP_NF_MATCH_AH_ESP=m 316CONFIG_IP_NF_MATCH_AH_ESP=m
302CONFIG_IP_NF_MATCH_LENGTH=m
303CONFIG_IP_NF_MATCH_TTL=m 317CONFIG_IP_NF_MATCH_TTL=m
304CONFIG_IP_NF_MATCH_TCPMSS=m
305CONFIG_IP_NF_MATCH_HELPER=m
306CONFIG_IP_NF_MATCH_STATE=m
307CONFIG_IP_NF_MATCH_CONNTRACK=m
308CONFIG_IP_NF_MATCH_OWNER=m 318CONFIG_IP_NF_MATCH_OWNER=m
309# CONFIG_IP_NF_MATCH_ADDRTYPE is not set 319CONFIG_IP_NF_MATCH_ADDRTYPE=m
310# CONFIG_IP_NF_MATCH_REALM is not set 320CONFIG_IP_NF_MATCH_HASHLIMIT=m
311# CONFIG_IP_NF_MATCH_SCTP is not set
312CONFIG_IP_NF_MATCH_DCCP=m
313# CONFIG_IP_NF_MATCH_COMMENT is not set
314# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
315CONFIG_IP_NF_MATCH_STRING=m
316CONFIG_IP_NF_FILTER=m 321CONFIG_IP_NF_FILTER=m
317CONFIG_IP_NF_TARGET_REJECT=m 322CONFIG_IP_NF_TARGET_REJECT=m
318# CONFIG_IP_NF_TARGET_LOG is not set 323CONFIG_IP_NF_TARGET_LOG=m
319CONFIG_IP_NF_TARGET_ULOG=m 324CONFIG_IP_NF_TARGET_ULOG=m
320CONFIG_IP_NF_TARGET_TCPMSS=m 325CONFIG_IP_NF_TARGET_TCPMSS=m
321# CONFIG_IP_NF_TARGET_NFQUEUE is not set
322CONFIG_IP_NF_NAT=m 326CONFIG_IP_NF_NAT=m
323CONFIG_IP_NF_NAT_NEEDED=y 327CONFIG_IP_NF_NAT_NEEDED=y
324CONFIG_IP_NF_TARGET_MASQUERADE=m 328CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -331,9 +335,12 @@ CONFIG_IP_NF_NAT_FTP=m
331CONFIG_IP_NF_NAT_TFTP=m 335CONFIG_IP_NF_NAT_TFTP=m
332CONFIG_IP_NF_NAT_AMANDA=m 336CONFIG_IP_NF_NAT_AMANDA=m
333CONFIG_IP_NF_NAT_PPTP=m 337CONFIG_IP_NF_NAT_PPTP=m
334# CONFIG_IP_NF_MANGLE is not set 338CONFIG_IP_NF_MANGLE=m
339CONFIG_IP_NF_TARGET_TOS=m
340CONFIG_IP_NF_TARGET_ECN=m
341CONFIG_IP_NF_TARGET_DSCP=m
342CONFIG_IP_NF_TARGET_TTL=m
335CONFIG_IP_NF_RAW=m 343CONFIG_IP_NF_RAW=m
336CONFIG_IP_NF_TARGET_NOTRACK=m
337CONFIG_IP_NF_ARPTABLES=m 344CONFIG_IP_NF_ARPTABLES=m
338CONFIG_IP_NF_ARPFILTER=m 345CONFIG_IP_NF_ARPFILTER=m
339CONFIG_IP_NF_ARP_MANGLE=m 346CONFIG_IP_NF_ARP_MANGLE=m
@@ -360,6 +367,11 @@ CONFIG_IP_DCCP_TFRC_LIB=m
360# SCTP Configuration (EXPERIMENTAL) 367# SCTP Configuration (EXPERIMENTAL)
361# 368#
362# CONFIG_IP_SCTP is not set 369# CONFIG_IP_SCTP is not set
370
371#
372# TIPC Configuration (EXPERIMENTAL)
373#
374# CONFIG_TIPC is not set
363# CONFIG_ATM is not set 375# CONFIG_ATM is not set
364# CONFIG_BRIDGE is not set 376# CONFIG_BRIDGE is not set
365# CONFIG_VLAN_8021Q is not set 377# CONFIG_VLAN_8021Q is not set
@@ -377,6 +389,7 @@ CONFIG_IP_DCCP_TFRC_LIB=m
377# QoS and/or fair queueing 389# QoS and/or fair queueing
378# 390#
379# CONFIG_NET_SCHED is not set 391# CONFIG_NET_SCHED is not set
392CONFIG_NET_CLS_ROUTE=y
380 393
381# 394#
382# Network testing 395# Network testing
@@ -568,7 +581,6 @@ CONFIG_IDEDMA_PCI_AUTO=y
568# CONFIG_BLK_DEV_NS87415 is not set 581# CONFIG_BLK_DEV_NS87415 is not set
569# CONFIG_BLK_DEV_PDC202XX_OLD is not set 582# CONFIG_BLK_DEV_PDC202XX_OLD is not set
570CONFIG_BLK_DEV_PDC202XX_NEW=y 583CONFIG_BLK_DEV_PDC202XX_NEW=y
571# CONFIG_PDC202XX_FORCE is not set
572# CONFIG_BLK_DEV_SVWKS is not set 584# CONFIG_BLK_DEV_SVWKS is not set
573# CONFIG_BLK_DEV_SIIMAGE is not set 585# CONFIG_BLK_DEV_SIIMAGE is not set
574# CONFIG_BLK_DEV_SLC90E66 is not set 586# CONFIG_BLK_DEV_SLC90E66 is not set
@@ -654,8 +666,7 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
654# CONFIG_SCSI_IPR is not set 666# CONFIG_SCSI_IPR is not set
655# CONFIG_SCSI_QLOGIC_FC is not set 667# CONFIG_SCSI_QLOGIC_FC is not set
656# CONFIG_SCSI_QLOGIC_1280 is not set 668# CONFIG_SCSI_QLOGIC_1280 is not set
657CONFIG_SCSI_QLA2XXX=y 669# CONFIG_SCSI_QLA_FC is not set
658# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
659# CONFIG_SCSI_LPFC is not set 670# CONFIG_SCSI_LPFC is not set
660# CONFIG_SCSI_DC395x is not set 671# CONFIG_SCSI_DC395x is not set
661# CONFIG_SCSI_DC390T is not set 672# CONFIG_SCSI_DC390T is not set
@@ -991,6 +1002,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
991# 1002#
992CONFIG_SERIAL_CORE=m 1003CONFIG_SERIAL_CORE=m
993CONFIG_SERIAL_PMACZILOG=m 1004CONFIG_SERIAL_PMACZILOG=m
1005# CONFIG_SERIAL_JSM is not set
994CONFIG_UNIX98_PTYS=y 1006CONFIG_UNIX98_PTYS=y
995CONFIG_LEGACY_PTYS=y 1007CONFIG_LEGACY_PTYS=y
996CONFIG_LEGACY_PTY_COUNT=256 1008CONFIG_LEGACY_PTY_COUNT=256
@@ -1098,6 +1110,12 @@ CONFIG_I2C_POWERMAC=y
1098# CONFIG_I2C_DEBUG_CHIP is not set 1110# CONFIG_I2C_DEBUG_CHIP is not set
1099 1111
1100# 1112#
1113# SPI support
1114#
1115# CONFIG_SPI is not set
1116# CONFIG_SPI_MASTER is not set
1117
1118#
1101# Dallas's 1-wire bus 1119# Dallas's 1-wire bus
1102# 1120#
1103# CONFIG_W1 is not set 1121# CONFIG_W1 is not set
@@ -1348,6 +1366,7 @@ CONFIG_USB_PRINTER=m
1348# 1366#
1349CONFIG_USB_HID=y 1367CONFIG_USB_HID=y
1350CONFIG_USB_HIDINPUT=y 1368CONFIG_USB_HIDINPUT=y
1369CONFIG_USB_HIDINPUT_POWERBOOK=y
1351# CONFIG_HID_FF is not set 1370# CONFIG_HID_FF is not set
1352# CONFIG_USB_HIDDEV is not set 1371# CONFIG_USB_HIDDEV is not set
1353# CONFIG_USB_AIPTEK is not set 1372# CONFIG_USB_AIPTEK is not set
@@ -1488,7 +1507,7 @@ CONFIG_USB_EZUSB=y
1488# CONFIG_INFINIBAND is not set 1507# CONFIG_INFINIBAND is not set
1489 1508
1490# 1509#
1491# SN Devices 1510# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1492# 1511#
1493 1512
1494# 1513#
@@ -1609,6 +1628,7 @@ CONFIG_MSDOS_PARTITION=y
1609# CONFIG_SGI_PARTITION is not set 1628# CONFIG_SGI_PARTITION is not set
1610# CONFIG_ULTRIX_PARTITION is not set 1629# CONFIG_ULTRIX_PARTITION is not set
1611# CONFIG_SUN_PARTITION is not set 1630# CONFIG_SUN_PARTITION is not set
1631# CONFIG_KARMA_PARTITION is not set
1612# CONFIG_EFI_PARTITION is not set 1632# CONFIG_EFI_PARTITION is not set
1613 1633
1614# 1634#
@@ -1692,6 +1712,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1692# CONFIG_DEBUG_INFO is not set 1712# CONFIG_DEBUG_INFO is not set
1693# CONFIG_DEBUG_FS is not set 1713# CONFIG_DEBUG_FS is not set
1694# CONFIG_DEBUG_VM is not set 1714# CONFIG_DEBUG_VM is not set
1715# CONFIG_FORCED_INLINING is not set
1695# CONFIG_RCU_TORTURE_TEST is not set 1716# CONFIG_RCU_TORTURE_TEST is not set
1696CONFIG_DEBUGGER=y 1717CONFIG_DEBUGGER=y
1697CONFIG_XMON=y 1718CONFIG_XMON=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 0362a70aa97c..395e49847788 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -407,7 +407,7 @@ CONFIG_IDEPCI_SHARE_IRQ=y
407# CONFIG_BLK_DEV_OFFBOARD is not set 407# CONFIG_BLK_DEV_OFFBOARD is not set
408CONFIG_BLK_DEV_GENERIC=y 408CONFIG_BLK_DEV_GENERIC=y
409# CONFIG_BLK_DEV_OPTI621 is not set 409# CONFIG_BLK_DEV_OPTI621 is not set
410# CONFIG_BLK_DEV_SL82C105 is not set 410CONFIG_BLK_DEV_SL82C105=y
411CONFIG_BLK_DEV_IDEDMA_PCI=y 411CONFIG_BLK_DEV_IDEDMA_PCI=y
412# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 412# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
413CONFIG_IDEDMA_PCI_AUTO=y 413CONFIG_IDEDMA_PCI_AUTO=y
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 840aad43a98b..882889b15926 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -92,7 +92,6 @@ int main(void)
92 92
93 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); 93 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
94 DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); 94 DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
95 DEFINE(TI_SIGFRAME, offsetof(struct thread_info, nvgprs_frame));
96 DEFINE(TI_TASK, offsetof(struct thread_info, task)); 95 DEFINE(TI_TASK, offsetof(struct thread_info, task));
97#ifdef CONFIG_PPC32 96#ifdef CONFIG_PPC32
98 DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); 97 DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
@@ -137,6 +136,9 @@ int main(void)
137 DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); 136 DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
138 DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); 137 DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr));
139 DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); 138 DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
139 DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
140 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
141 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
140 142
141 DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); 143 DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0));
142 DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); 144 DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1));
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 10696456a4c6..39e348a3ade2 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -53,8 +53,10 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
53 PPC_FEATURE_HAS_MMU) 53 PPC_FEATURE_HAS_MMU)
54#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) 54#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
55#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) 55#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
56#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5) 56#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
57#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS) 57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
58#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
58#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 60#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
59 PPC_FEATURE_BOOKE) 61 PPC_FEATURE_BOOKE)
60 62
@@ -267,7 +269,8 @@ struct cpu_spec cpu_specs[] = {
267 .cpu_name = "Cell Broadband Engine", 269 .cpu_name = "Cell Broadband Engine",
268 .cpu_features = CPU_FTRS_CELL, 270 .cpu_features = CPU_FTRS_CELL,
269 .cpu_user_features = COMMON_USER_PPC64 | 271 .cpu_user_features = COMMON_USER_PPC64 |
270 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP, 272 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
273 PPC_FEATURE_SMT,
271 .icache_bsize = 128, 274 .icache_bsize = 128,
272 .dcache_bsize = 128, 275 .dcache_bsize = 128,
273 .cpu_setup = __setup_cpu_be, 276 .cpu_setup = __setup_cpu_be,
@@ -891,7 +894,7 @@ struct cpu_spec cpu_specs[] = {
891 .platform = "ppc405", 894 .platform = "ppc405",
892 }, 895 },
893 { /* Xilinx Virtex-II Pro */ 896 { /* Xilinx Virtex-II Pro */
894 .pvr_mask = 0xffff0000, 897 .pvr_mask = 0xfffff000,
895 .pvr_value = 0x20010000, 898 .pvr_value = 0x20010000,
896 .cpu_name = "Virtex-II Pro", 899 .cpu_name = "Virtex-II Pro",
897 .cpu_features = CPU_FTRS_40X, 900 .cpu_features = CPU_FTRS_40X,
@@ -901,6 +904,16 @@ struct cpu_spec cpu_specs[] = {
901 .dcache_bsize = 32, 904 .dcache_bsize = 32,
902 .platform = "ppc405", 905 .platform = "ppc405",
903 }, 906 },
907 { /* Xilinx Virtex-4 FX */
908 .pvr_mask = 0xfffff000,
909 .pvr_value = 0x20011000,
910 .cpu_name = "Virtex-4 FX",
911 .cpu_features = CPU_FTRS_40X,
912 .cpu_user_features = PPC_FEATURE_32 |
913 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
914 .icache_bsize = 32,
915 .dcache_bsize = 32,
916 },
904 { /* 405EP */ 917 { /* 405EP */
905 .pvr_mask = 0xffff0000, 918 .pvr_mask = 0xffff0000,
906 .pvr_value = 0x51210000, 919 .pvr_value = 0x51210000,
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index f20a67261ec7..4827ca1ec89b 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -227,7 +227,7 @@ ret_from_syscall:
227 MTMSRD(r10) 227 MTMSRD(r10)
228 lwz r9,TI_FLAGS(r12) 228 lwz r9,TI_FLAGS(r12)
229 li r8,-_LAST_ERRNO 229 li r8,-_LAST_ERRNO
230 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL|_TIF_RESTORE_SIGMASK) 230 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
231 bne- syscall_exit_work 231 bne- syscall_exit_work
232 cmplw 0,r3,r8 232 cmplw 0,r3,r8
233 blt+ syscall_exit_cont 233 blt+ syscall_exit_cont
@@ -287,8 +287,10 @@ syscall_dotrace:
287 287
288syscall_exit_work: 288syscall_exit_work:
289 andi. r0,r9,_TIF_RESTOREALL 289 andi. r0,r9,_TIF_RESTOREALL
290 bne- 2f 290 beq+ 0f
291 cmplw 0,r3,r8 291 REST_NVGPRS(r1)
292 b 2f
2930: cmplw 0,r3,r8
292 blt+ 1f 294 blt+ 1f
293 andi. r0,r9,_TIF_NOERROR 295 andi. r0,r9,_TIF_NOERROR
294 bne- 1f 296 bne- 1f
@@ -302,9 +304,7 @@ syscall_exit_work:
3022: andi. r0,r9,(_TIF_PERSYSCALL_MASK) 3042: andi. r0,r9,(_TIF_PERSYSCALL_MASK)
303 beq 4f 305 beq 4f
304 306
305 /* Clear per-syscall TIF flags if any are set, but _leave_ 307 /* Clear per-syscall TIF flags if any are set. */
306 _TIF_SAVE_NVGPRS set in r9 since we haven't dealt with that
307 yet. */
308 308
309 li r11,_TIF_PERSYSCALL_MASK 309 li r11,_TIF_PERSYSCALL_MASK
310 addi r12,r12,TI_FLAGS 310 addi r12,r12,TI_FLAGS
@@ -318,8 +318,13 @@ syscall_exit_work:
318 subi r12,r12,TI_FLAGS 318 subi r12,r12,TI_FLAGS
319 319
3204: /* Anything which requires enabling interrupts? */ 3204: /* Anything which requires enabling interrupts? */
321 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SAVE_NVGPRS) 321 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
322 beq 7f 322 beq ret_from_except
323
324 /* Re-enable interrupts */
325 ori r10,r10,MSR_EE
326 SYNC
327 MTMSRD(r10)
323 328
324 /* Save NVGPRS if they're not saved already */ 329 /* Save NVGPRS if they're not saved already */
325 lwz r4,_TRAP(r1) 330 lwz r4,_TRAP(r1)
@@ -328,71 +333,11 @@ syscall_exit_work:
328 SAVE_NVGPRS(r1) 333 SAVE_NVGPRS(r1)
329 li r4,0xc00 334 li r4,0xc00
330 stw r4,_TRAP(r1) 335 stw r4,_TRAP(r1)
331 3365:
332 /* Re-enable interrupts */
3335: ori r10,r10,MSR_EE
334 SYNC
335 MTMSRD(r10)
336
337 andi. r0,r9,_TIF_SAVE_NVGPRS
338 bne save_user_nvgprs
339
340save_user_nvgprs_cont:
341 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
342 beq 7f
343
344 addi r3,r1,STACK_FRAME_OVERHEAD 337 addi r3,r1,STACK_FRAME_OVERHEAD
345 bl do_syscall_trace_leave 338 bl do_syscall_trace_leave
346 REST_NVGPRS(r1) 339 b ret_from_except_full
347
3486: lwz r3,GPR3(r1)
349 LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */
350 SYNC
351 MTMSRD(r10) /* disable interrupts again */
352 rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */
353 lwz r9,TI_FLAGS(r12)
3547:
355 andi. r0,r9,_TIF_NEED_RESCHED
356 bne 8f
357 lwz r5,_MSR(r1)
358 andi. r5,r5,MSR_PR
359 beq ret_from_except
360 andi. r0,r9,_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK
361 beq ret_from_except
362 b do_user_signal
3638:
364 ori r10,r10,MSR_EE
365 SYNC
366 MTMSRD(r10) /* re-enable interrupts */
367 bl schedule
368 b 6b
369
370save_user_nvgprs:
371 lwz r8,TI_SIGFRAME(r12)
372
373.macro savewords start, end
374 1: stw \start,4*(\start)(r8)
375 .section __ex_table,"a"
376 .align 2
377 .long 1b,save_user_nvgprs_fault
378 .previous
379 .if \end - \start
380 savewords "(\start+1)",\end
381 .endif
382.endm
383 savewords 14,31
384 b save_user_nvgprs_cont
385
386
387save_user_nvgprs_fault:
388 li r3,11 /* SIGSEGV */
389 lwz r4,TI_TASK(r12)
390 bl force_sigsegv
391 340
392 rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */
393 lwz r9,TI_FLAGS(r12)
394 b save_user_nvgprs_cont
395
396#ifdef SHOW_SYSCALLS 341#ifdef SHOW_SYSCALLS
397do_show_syscall: 342do_show_syscall:
398#ifdef SHOW_SYSCALLS_TASK 343#ifdef SHOW_SYSCALLS_TASK
@@ -490,6 +435,14 @@ ppc_clone:
490 stw r0,_TRAP(r1) /* register set saved */ 435 stw r0,_TRAP(r1) /* register set saved */
491 b sys_clone 436 b sys_clone
492 437
438 .globl ppc_swapcontext
439ppc_swapcontext:
440 SAVE_NVGPRS(r1)
441 lwz r0,_TRAP(r1)
442 rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
443 stw r0,_TRAP(r1) /* register set saved */
444 b sys_swapcontext
445
493/* 446/*
494 * Top-level page fault handling. 447 * Top-level page fault handling.
495 * This is in assembler because if do_page_fault tells us that 448 * This is in assembler because if do_page_fault tells us that
@@ -683,7 +636,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
683 /* Check current_thread_info()->flags */ 636 /* Check current_thread_info()->flags */
684 rlwinm r9,r1,0,0,(31-THREAD_SHIFT) 637 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
685 lwz r9,TI_FLAGS(r9) 638 lwz r9,TI_FLAGS(r9)
686 andi. r0,r9,(_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL|_TIF_RESTORE_SIGMASK) 639 andi. r0,r9,(_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NEED_RESCHED)
687 bne do_work 640 bne do_work
688 641
689restore_user: 642restore_user:
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 388f861b8ed1..1060155d84c3 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/entry.S
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP 4 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
@@ -63,6 +61,7 @@ system_call_common:
63 std r12,_MSR(r1) 61 std r12,_MSR(r1)
64 std r0,GPR0(r1) 62 std r0,GPR0(r1)
65 std r10,GPR1(r1) 63 std r10,GPR1(r1)
64 ACCOUNT_CPU_USER_ENTRY(r10, r11)
66 std r2,GPR2(r1) 65 std r2,GPR2(r1)
67 std r3,GPR3(r1) 66 std r3,GPR3(r1)
68 std r4,GPR4(r1) 67 std r4,GPR4(r1)
@@ -160,7 +159,7 @@ syscall_exit:
160 mtmsrd r10,1 159 mtmsrd r10,1
161 ld r9,TI_FLAGS(r12) 160 ld r9,TI_FLAGS(r12)
162 li r11,-_LAST_ERRNO 161 li r11,-_LAST_ERRNO
163 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL|_TIF_SAVE_NVGPRS|_TIF_NOERROR|_TIF_RESTORE_SIGMASK) 162 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
164 bne- syscall_exit_work 163 bne- syscall_exit_work
165 cmpld r3,r11 164 cmpld r3,r11
166 ld r5,_CCR(r1) 165 ld r5,_CCR(r1)
@@ -170,8 +169,9 @@ syscall_error_cont:
170 stdcx. r0,0,r1 /* to clear the reservation */ 169 stdcx. r0,0,r1 /* to clear the reservation */
171 andi. r6,r8,MSR_PR 170 andi. r6,r8,MSR_PR
172 ld r4,_LINK(r1) 171 ld r4,_LINK(r1)
173 beq- 1f /* only restore r13 if */ 172 beq- 1f
174 ld r13,GPR13(r1) /* returning to usermode */ 173 ACCOUNT_CPU_USER_EXIT(r11, r12)
174 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */
1751: ld r2,GPR2(r1) 1751: ld r2,GPR2(r1)
176 li r12,MSR_RI 176 li r12,MSR_RI
177 andc r11,r10,r12 177 andc r11,r10,r12
@@ -216,8 +216,10 @@ syscall_exit_work:
216 If TIF_NOERROR is set, just save r3 as it is. */ 216 If TIF_NOERROR is set, just save r3 as it is. */
217 217
218 andi. r0,r9,_TIF_RESTOREALL 218 andi. r0,r9,_TIF_RESTOREALL
219 bne- 2f 219 beq+ 0f
220 cmpld r3,r11 /* r10 is -LAST_ERRNO */ 220 REST_NVGPRS(r1)
221 b 2f
2220: cmpld r3,r11 /* r10 is -LAST_ERRNO */
221 blt+ 1f 223 blt+ 1f
222 andi. r0,r9,_TIF_NOERROR 224 andi. r0,r9,_TIF_NOERROR
223 bne- 1f 225 bne- 1f
@@ -229,9 +231,7 @@ syscall_exit_work:
2292: andi. r0,r9,(_TIF_PERSYSCALL_MASK) 2312: andi. r0,r9,(_TIF_PERSYSCALL_MASK)
230 beq 4f 232 beq 4f
231 233
232 /* Clear per-syscall TIF flags if any are set, but _leave_ 234 /* Clear per-syscall TIF flags if any are set. */
233 _TIF_SAVE_NVGPRS set in r9 since we haven't dealt with that
234 yet. */
235 235
236 li r11,_TIF_PERSYSCALL_MASK 236 li r11,_TIF_PERSYSCALL_MASK
237 addi r12,r12,TI_FLAGS 237 addi r12,r12,TI_FLAGS
@@ -240,10 +240,9 @@ syscall_exit_work:
240 stdcx. r10,0,r12 240 stdcx. r10,0,r12
241 bne- 3b 241 bne- 3b
242 subi r12,r12,TI_FLAGS 242 subi r12,r12,TI_FLAGS
243 243
2444: bl .save_nvgprs 2444: /* Anything else left to do? */
245 /* Anything else left to do? */ 245 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
246 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SAVE_NVGPRS)
247 beq .ret_from_except_lite 246 beq .ret_from_except_lite
248 247
249 /* Re-enable interrupts */ 248 /* Re-enable interrupts */
@@ -251,26 +250,10 @@ syscall_exit_work:
251 ori r10,r10,MSR_EE 250 ori r10,r10,MSR_EE
252 mtmsrd r10,1 251 mtmsrd r10,1
253 252
254 andi. r0,r9,_TIF_SAVE_NVGPRS 253 bl .save_nvgprs
255 bne save_user_nvgprs
256
257 /* If tracing, re-enable interrupts and do it */
258save_user_nvgprs_cont:
259 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
260 beq 5f
261
262 addi r3,r1,STACK_FRAME_OVERHEAD 254 addi r3,r1,STACK_FRAME_OVERHEAD
263 bl .do_syscall_trace_leave 255 bl .do_syscall_trace_leave
264 REST_NVGPRS(r1) 256 b .ret_from_except
265 clrrdi r12,r1,THREAD_SHIFT
266
267 /* Disable interrupts again and handle other work if any */
2685: mfmsr r10
269 rldicl r10,r10,48,1
270 rotldi r10,r10,16
271 mtmsrd r10,1
272
273 b .ret_from_except_lite
274 257
275/* Save non-volatile GPRs, if not already saved. */ 258/* Save non-volatile GPRs, if not already saved. */
276_GLOBAL(save_nvgprs) 259_GLOBAL(save_nvgprs)
@@ -282,51 +265,6 @@ _GLOBAL(save_nvgprs)
282 std r0,_TRAP(r1) 265 std r0,_TRAP(r1)
283 blr 266 blr
284 267
285
286save_user_nvgprs:
287 ld r10,TI_SIGFRAME(r12)
288 andi. r0,r9,_TIF_32BIT
289 beq- save_user_nvgprs_64
290
291 /* 32-bit save to userspace */
292
293.macro savewords start, end
294 1: stw \start,4*(\start)(r10)
295 .section __ex_table,"a"
296 .align 3
297 .llong 1b,save_user_nvgprs_fault
298 .previous
299 .if \end - \start
300 savewords "(\start+1)",\end
301 .endif
302.endm
303 savewords 14,31
304 b save_user_nvgprs_cont
305
306save_user_nvgprs_64:
307 /* 64-bit save to userspace */
308
309.macro savelongs start, end
310 1: std \start,8*(\start)(r10)
311 .section __ex_table,"a"
312 .align 3
313 .llong 1b,save_user_nvgprs_fault
314 .previous
315 .if \end - \start
316 savelongs "(\start+1)",\end
317 .endif
318.endm
319 savelongs 14,31
320 b save_user_nvgprs_cont
321
322save_user_nvgprs_fault:
323 li r3,11 /* SIGSEGV */
324 ld r4,TI_TASK(r12)
325 bl .force_sigsegv
326
327 clrrdi r12,r1,THREAD_SHIFT
328 ld r9,TI_FLAGS(r12)
329 b save_user_nvgprs_cont
330 268
331/* 269/*
332 * The sigsuspend and rt_sigsuspend system calls can call do_signal 270 * The sigsuspend and rt_sigsuspend system calls can call do_signal
@@ -352,6 +290,16 @@ _GLOBAL(ppc_clone)
352 bl .sys_clone 290 bl .sys_clone
353 b syscall_exit 291 b syscall_exit
354 292
293_GLOBAL(ppc32_swapcontext)
294 bl .save_nvgprs
295 bl .compat_sys_swapcontext
296 b syscall_exit
297
298_GLOBAL(ppc64_swapcontext)
299 bl .save_nvgprs
300 bl .sys_swapcontext
301 b syscall_exit
302
355_GLOBAL(ret_from_fork) 303_GLOBAL(ret_from_fork)
356 bl .schedule_tail 304 bl .schedule_tail
357 REST_NVGPRS(r1) 305 REST_NVGPRS(r1)
@@ -374,7 +322,7 @@ _GLOBAL(ret_from_fork)
374 * the fork code also. 322 * the fork code also.
375 * 323 *
376 * The code which creates the new task context is in 'copy_thread' 324 * The code which creates the new task context is in 'copy_thread'
377 * in arch/ppc64/kernel/process.c 325 * in arch/powerpc/kernel/process.c
378 */ 326 */
379 .align 7 327 .align 7
380_GLOBAL(_switch) 328_GLOBAL(_switch)
@@ -538,6 +486,7 @@ restore:
538 * userspace 486 * userspace
539 */ 487 */
540 beq 1f 488 beq 1f
489 ACCOUNT_CPU_USER_EXIT(r3, r4)
541 REST_GPR(13, r1) 490 REST_GPR(13, r1)
5421: 4911:
543 ld r3,_CTR(r1) 492 ld r3,_CTR(r1)
diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c
index 65eae752a527..4d37a3cb80f6 100644
--- a/arch/powerpc/kernel/firmware.c
+++ b/arch/powerpc/kernel/firmware.c
@@ -18,28 +18,3 @@
18#include <asm/firmware.h> 18#include <asm/firmware.h>
19 19
20unsigned long ppc64_firmware_features; 20unsigned long ppc64_firmware_features;
21
22#ifdef CONFIG_PPC_PSERIES
23firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = {
24 {FW_FEATURE_PFT, "hcall-pft"},
25 {FW_FEATURE_TCE, "hcall-tce"},
26 {FW_FEATURE_SPRG0, "hcall-sprg0"},
27 {FW_FEATURE_DABR, "hcall-dabr"},
28 {FW_FEATURE_COPY, "hcall-copy"},
29 {FW_FEATURE_ASR, "hcall-asr"},
30 {FW_FEATURE_DEBUG, "hcall-debug"},
31 {FW_FEATURE_PERF, "hcall-perf"},
32 {FW_FEATURE_DUMP, "hcall-dump"},
33 {FW_FEATURE_INTERRUPT, "hcall-interrupt"},
34 {FW_FEATURE_MIGRATE, "hcall-migrate"},
35 {FW_FEATURE_PERFMON, "hcall-perfmon"},
36 {FW_FEATURE_CRQ, "hcall-crq"},
37 {FW_FEATURE_VIO, "hcall-vio"},
38 {FW_FEATURE_RDMA, "hcall-rdma"},
39 {FW_FEATURE_LLAN, "hcall-lLAN"},
40 {FW_FEATURE_BULK, "hcall-bulk"},
41 {FW_FEATURE_XDABR, "hcall-xdabr"},
42 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
43 {FW_FEATURE_SPLPAR, "hcall-splpar"},
44};
45#endif
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 8b49679fad54..47c7fa148c9a 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/head_44x.S
3 *
4 * Kernel execution entry point code. 2 * Kernel execution entry point code.
5 * 3 *
6 * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> 4 * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 11f2cd5af7dc..35084f3a841b 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/head.S
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * 4 *
@@ -279,6 +277,7 @@ exception_marker:
279 std r10,0(r1); /* make stack chain pointer */ \ 277 std r10,0(r1); /* make stack chain pointer */ \
280 std r0,GPR0(r1); /* save r0 in stackframe */ \ 278 std r0,GPR0(r1); /* save r0 in stackframe */ \
281 std r10,GPR1(r1); /* save r1 in stackframe */ \ 279 std r10,GPR1(r1); /* save r1 in stackframe */ \
280 ACCOUNT_CPU_USER_ENTRY(r9, r10); \
282 std r2,GPR2(r1); /* save r2 in stackframe */ \ 281 std r2,GPR2(r1); /* save r2 in stackframe */ \
283 SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ 282 SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \
284 SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ 283 SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \
@@ -846,6 +845,14 @@ fast_exception_return:
846 ld r11,_NIP(r1) 845 ld r11,_NIP(r1)
847 andi. r3,r12,MSR_RI /* check if RI is set */ 846 andi. r3,r12,MSR_RI /* check if RI is set */
848 beq- unrecov_fer 847 beq- unrecov_fer
848
849#ifdef CONFIG_VIRT_CPU_ACCOUNTING
850 andi. r3,r12,MSR_PR
851 beq 2f
852 ACCOUNT_CPU_USER_EXIT(r3, r4)
8532:
854#endif
855
849 ld r3,_CCR(r1) 856 ld r3,_CCR(r1)
850 ld r4,_LINK(r1) 857 ld r4,_LINK(r1)
851 ld r5,_CTR(r1) 858 ld r5,_CTR(r1)
@@ -1537,6 +1544,9 @@ _STATIC(__boot_from_prom)
1537 mr r28,r6 1544 mr r28,r6
1538 mr r27,r7 1545 mr r27,r7
1539 1546
1547 /* Align the stack to 16-byte boundary for broken yaboot */
1548 rldicr r1,r1,0,59
1549
1540 /* Make sure we are running in 64 bits mode */ 1550 /* Make sure we are running in 64 bits mode */
1541 bl .enable_64b_mode 1551 bl .enable_64b_mode
1542 1552
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index bc6d1ac55235..28941f5ce673 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/except_8xx.S
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP 4 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
new file mode 100644
index 000000000000..8536e7676160
--- /dev/null
+++ b/arch/powerpc/kernel/head_booke.h
@@ -0,0 +1,363 @@
1#ifndef __HEAD_BOOKE_H__
2#define __HEAD_BOOKE_H__
3
4/*
5 * Macros used for common Book-e exception handling
6 */
7
8#define SET_IVOR(vector_number, vector_label) \
9 li r26,vector_label@l; \
10 mtspr SPRN_IVOR##vector_number,r26; \
11 sync
12
13#define NORMAL_EXCEPTION_PROLOG \
14 mtspr SPRN_SPRG0,r10; /* save two registers to work with */\
15 mtspr SPRN_SPRG1,r11; \
16 mtspr SPRN_SPRG4W,r1; \
17 mfcr r10; /* save CR in r10 for now */\
18 mfspr r11,SPRN_SRR1; /* check whether user or kernel */\
19 andi. r11,r11,MSR_PR; \
20 beq 1f; \
21 mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\
22 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\
23 addi r1,r1,THREAD_SIZE; \
241: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\
25 mr r11,r1; \
26 stw r10,_CCR(r11); /* save various registers */\
27 stw r12,GPR12(r11); \
28 stw r9,GPR9(r11); \
29 mfspr r10,SPRN_SPRG0; \
30 stw r10,GPR10(r11); \
31 mfspr r12,SPRN_SPRG1; \
32 stw r12,GPR11(r11); \
33 mflr r10; \
34 stw r10,_LINK(r11); \
35 mfspr r10,SPRN_SPRG4R; \
36 mfspr r12,SPRN_SRR0; \
37 stw r10,GPR1(r11); \
38 mfspr r9,SPRN_SRR1; \
39 stw r10,0(r11); \
40 rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
41 stw r0,GPR0(r11); \
42 SAVE_4GPRS(3, r11); \
43 SAVE_2GPRS(7, r11)
44
45/* To handle the additional exception priority levels on 40x and Book-E
46 * processors we allocate a 4k stack per additional priority level. The various
47 * head_xxx.S files allocate space (exception_stack_top) for each priority's
48 * stack times the number of CPUs
49 *
50 * On 40x critical is the only additional level
51 * On 44x/e500 we have critical and machine check
52 * On e200 we have critical and debug (machine check occurs via critical)
53 *
54 * Additionally we reserve a SPRG for each priority level so we can free up a
55 * GPR to use as the base for indirect access to the exception stacks. This
56 * is necessary since the MMU is always on, for Book-E parts, and the stacks
57 * are offset from KERNELBASE.
58 *
59 */
60#define BOOKE_EXCEPTION_STACK_SIZE (8192)
61
62/* CRIT_SPRG only used in critical exception handling */
63#define CRIT_SPRG SPRN_SPRG2
64/* MCHECK_SPRG only used in machine check exception handling */
65#define MCHECK_SPRG SPRN_SPRG6W
66
67#define MCHECK_STACK_TOP (exception_stack_top - 4096)
68#define CRIT_STACK_TOP (exception_stack_top)
69
70/* only on e200 for now */
71#define DEBUG_STACK_TOP (exception_stack_top - 4096)
72#define DEBUG_SPRG SPRN_SPRG6W
73
74#ifdef CONFIG_SMP
75#define BOOKE_LOAD_EXC_LEVEL_STACK(level) \
76 mfspr r8,SPRN_PIR; \
77 mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \
78 neg r8,r8; \
79 addis r8,r8,level##_STACK_TOP@ha; \
80 addi r8,r8,level##_STACK_TOP@l
81#else
82#define BOOKE_LOAD_EXC_LEVEL_STACK(level) \
83 lis r8,level##_STACK_TOP@h; \
84 ori r8,r8,level##_STACK_TOP@l
85#endif
86
87/*
88 * Exception prolog for critical/machine check exceptions. This is a
89 * little different from the normal exception prolog above since a
90 * critical/machine check exception can potentially occur at any point
91 * during normal exception processing. Thus we cannot use the same SPRG
92 * registers as the normal prolog above. Instead we use a portion of the
93 * critical/machine check exception stack at low physical addresses.
94 */
95#define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \
96 mtspr exc_level##_SPRG,r8; \
97 BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \
98 stw r10,GPR10-INT_FRAME_SIZE(r8); \
99 stw r11,GPR11-INT_FRAME_SIZE(r8); \
100 mfcr r10; /* save CR in r10 for now */\
101 mfspr r11,exc_level_srr1; /* check whether user or kernel */\
102 andi. r11,r11,MSR_PR; \
103 mr r11,r8; \
104 mfspr r8,exc_level##_SPRG; \
105 beq 1f; \
106 /* COMING FROM USER MODE */ \
107 mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\
108 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
109 addi r11,r11,THREAD_SIZE; \
1101: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\
111 stw r10,_CCR(r11); /* save various registers */\
112 stw r12,GPR12(r11); \
113 stw r9,GPR9(r11); \
114 mflr r10; \
115 stw r10,_LINK(r11); \
116 mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\
117 stw r12,_DEAR(r11); /* since they may have had stuff */\
118 mfspr r9,SPRN_ESR; /* in them at the point where the */\
119 stw r9,_ESR(r11); /* exception was taken */\
120 mfspr r12,exc_level_srr0; \
121 stw r1,GPR1(r11); \
122 mfspr r9,exc_level_srr1; \
123 stw r1,0(r11); \
124 mr r1,r11; \
125 rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
126 stw r0,GPR0(r11); \
127 SAVE_4GPRS(3, r11); \
128 SAVE_2GPRS(7, r11)
129
130#define CRITICAL_EXCEPTION_PROLOG \
131 EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1)
132#define DEBUG_EXCEPTION_PROLOG \
133 EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1)
134#define MCHECK_EXCEPTION_PROLOG \
135 EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1)
136
137/*
138 * Exception vectors.
139 */
140#define START_EXCEPTION(label) \
141 .align 5; \
142label:
143
144#define FINISH_EXCEPTION(func) \
145 bl transfer_to_handler_full; \
146 .long func; \
147 .long ret_from_except_full
148
149#define EXCEPTION(n, label, hdlr, xfer) \
150 START_EXCEPTION(label); \
151 NORMAL_EXCEPTION_PROLOG; \
152 addi r3,r1,STACK_FRAME_OVERHEAD; \
153 xfer(n, hdlr)
154
155#define CRITICAL_EXCEPTION(n, label, hdlr) \
156 START_EXCEPTION(label); \
157 CRITICAL_EXCEPTION_PROLOG; \
158 addi r3,r1,STACK_FRAME_OVERHEAD; \
159 EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
160 NOCOPY, crit_transfer_to_handler, \
161 ret_from_crit_exc)
162
163#define MCHECK_EXCEPTION(n, label, hdlr) \
164 START_EXCEPTION(label); \
165 MCHECK_EXCEPTION_PROLOG; \
166 mfspr r5,SPRN_ESR; \
167 stw r5,_ESR(r11); \
168 addi r3,r1,STACK_FRAME_OVERHEAD; \
169 EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
170 NOCOPY, mcheck_transfer_to_handler, \
171 ret_from_mcheck_exc)
172
173#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \
174 li r10,trap; \
175 stw r10,_TRAP(r11); \
176 lis r10,msr@h; \
177 ori r10,r10,msr@l; \
178 copyee(r10, r9); \
179 bl tfer; \
180 .long hdlr; \
181 .long ret
182
183#define COPY_EE(d, s) rlwimi d,s,0,16,16
184#define NOCOPY(d, s)
185
186#define EXC_XFER_STD(n, hdlr) \
187 EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
188 ret_from_except_full)
189
190#define EXC_XFER_LITE(n, hdlr) \
191 EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
192 ret_from_except)
193
194#define EXC_XFER_EE(n, hdlr) \
195 EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \
196 ret_from_except_full)
197
198#define EXC_XFER_EE_LITE(n, hdlr) \
199 EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \
200 ret_from_except)
201
202/* Check for a single step debug exception while in an exception
203 * handler before state has been saved. This is to catch the case
204 * where an instruction that we are trying to single step causes
205 * an exception (eg ITLB/DTLB miss) and thus the first instruction of
206 * the exception handler generates a single step debug exception.
207 *
208 * If we get a debug trap on the first instruction of an exception handler,
209 * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is
210 * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR).
211 * The exception handler was handling a non-critical interrupt, so it will
212 * save (and later restore) the MSR via SPRN_CSRR1, which will still have
213 * the MSR_DE bit set.
214 */
215#ifdef CONFIG_E200
216#define DEBUG_EXCEPTION \
217 START_EXCEPTION(Debug); \
218 DEBUG_EXCEPTION_PROLOG; \
219 \
220 /* \
221 * If there is a single step or branch-taken exception in an \
222 * exception entry sequence, it was probably meant to apply to \
223 * the code where the exception occurred (since exception entry \
224 * doesn't turn off DE automatically). We simulate the effect \
225 * of turning off DE on entry to an exception handler by turning \
226 * off DE in the CSRR1 value and clearing the debug status. \
227 */ \
228 mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
229 andis. r10,r10,DBSR_IC@h; \
230 beq+ 2f; \
231 \
232 lis r10,KERNELBASE@h; /* check if exception in vectors */ \
233 ori r10,r10,KERNELBASE@l; \
234 cmplw r12,r10; \
235 blt+ 2f; /* addr below exception vectors */ \
236 \
237 lis r10,Debug@h; \
238 ori r10,r10,Debug@l; \
239 cmplw r12,r10; \
240 bgt+ 2f; /* addr above exception vectors */ \
241 \
242 /* here it looks like we got an inappropriate debug exception. */ \
2431: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \
244 lis r10,DBSR_IC@h; /* clear the IC event */ \
245 mtspr SPRN_DBSR,r10; \
246 /* restore state and get out */ \
247 lwz r10,_CCR(r11); \
248 lwz r0,GPR0(r11); \
249 lwz r1,GPR1(r11); \
250 mtcrf 0x80,r10; \
251 mtspr SPRN_DSRR0,r12; \
252 mtspr SPRN_DSRR1,r9; \
253 lwz r9,GPR9(r11); \
254 lwz r12,GPR12(r11); \
255 mtspr DEBUG_SPRG,r8; \
256 BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \
257 lwz r10,GPR10-INT_FRAME_SIZE(r8); \
258 lwz r11,GPR11-INT_FRAME_SIZE(r8); \
259 mfspr r8,DEBUG_SPRG; \
260 \
261 RFDI; \
262 b .; \
263 \
264 /* continue normal handling for a critical exception... */ \
2652: mfspr r4,SPRN_DBSR; \
266 addi r3,r1,STACK_FRAME_OVERHEAD; \
267 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
268#else
269#define DEBUG_EXCEPTION \
270 START_EXCEPTION(Debug); \
271 CRITICAL_EXCEPTION_PROLOG; \
272 \
273 /* \
274 * If there is a single step or branch-taken exception in an \
275 * exception entry sequence, it was probably meant to apply to \
276 * the code where the exception occurred (since exception entry \
277 * doesn't turn off DE automatically). We simulate the effect \
278 * of turning off DE on entry to an exception handler by turning \
279 * off DE in the CSRR1 value and clearing the debug status. \
280 */ \
281 mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
282 andis. r10,r10,DBSR_IC@h; \
283 beq+ 2f; \
284 \
285 lis r10,KERNELBASE@h; /* check if exception in vectors */ \
286 ori r10,r10,KERNELBASE@l; \
287 cmplw r12,r10; \
288 blt+ 2f; /* addr below exception vectors */ \
289 \
290 lis r10,Debug@h; \
291 ori r10,r10,Debug@l; \
292 cmplw r12,r10; \
293 bgt+ 2f; /* addr above exception vectors */ \
294 \
295 /* here it looks like we got an inappropriate debug exception. */ \
2961: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \
297 lis r10,DBSR_IC@h; /* clear the IC event */ \
298 mtspr SPRN_DBSR,r10; \
299 /* restore state and get out */ \
300 lwz r10,_CCR(r11); \
301 lwz r0,GPR0(r11); \
302 lwz r1,GPR1(r11); \
303 mtcrf 0x80,r10; \
304 mtspr SPRN_CSRR0,r12; \
305 mtspr SPRN_CSRR1,r9; \
306 lwz r9,GPR9(r11); \
307 lwz r12,GPR12(r11); \
308 mtspr CRIT_SPRG,r8; \
309 BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \
310 lwz r10,GPR10-INT_FRAME_SIZE(r8); \
311 lwz r11,GPR11-INT_FRAME_SIZE(r8); \
312 mfspr r8,CRIT_SPRG; \
313 \
314 rfci; \
315 b .; \
316 \
317 /* continue normal handling for a critical exception... */ \
3182: mfspr r4,SPRN_DBSR; \
319 addi r3,r1,STACK_FRAME_OVERHEAD; \
320 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
321#endif
322
323#define INSTRUCTION_STORAGE_EXCEPTION \
324 START_EXCEPTION(InstructionStorage) \
325 NORMAL_EXCEPTION_PROLOG; \
326 mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \
327 stw r5,_ESR(r11); \
328 mr r4,r12; /* Pass SRR0 as arg2 */ \
329 li r5,0; /* Pass zero as arg3 */ \
330 EXC_XFER_EE_LITE(0x0400, handle_page_fault)
331
332#define ALIGNMENT_EXCEPTION \
333 START_EXCEPTION(Alignment) \
334 NORMAL_EXCEPTION_PROLOG; \
335 mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \
336 stw r4,_DEAR(r11); \
337 addi r3,r1,STACK_FRAME_OVERHEAD; \
338 EXC_XFER_EE(0x0600, alignment_exception)
339
340#define PROGRAM_EXCEPTION \
341 START_EXCEPTION(Program) \
342 NORMAL_EXCEPTION_PROLOG; \
343 mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \
344 stw r4,_ESR(r11); \
345 addi r3,r1,STACK_FRAME_OVERHEAD; \
346 EXC_XFER_STD(0x0700, program_check_exception)
347
348#define DECREMENTER_EXCEPTION \
349 START_EXCEPTION(Decrementer) \
350 NORMAL_EXCEPTION_PROLOG; \
351 lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \
352 mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \
353 addi r3,r1,STACK_FRAME_OVERHEAD; \
354 EXC_XFER_LITE(0x0900, timer_interrupt)
355
356#define FP_UNAVAILABLE_EXCEPTION \
357 START_EXCEPTION(FloatingPointUnavailable) \
358 NORMAL_EXCEPTION_PROLOG; \
359 bne load_up_fpu; /* if from user, just load it up */ \
360 addi r3,r1,STACK_FRAME_OVERHEAD; \
361 EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
362
363#endif /* __HEAD_BOOKE_H__ */
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 8d60fa99fc4b..dd86bbed7627 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/head_fsl_booke.S
3 *
4 * Kernel execution entry point code. 2 * Kernel execution entry point code.
5 * 3 *
6 * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> 4 * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */
316 */ 314 */
317 lis r2,DBCR0_IDM@h 315 lis r2,DBCR0_IDM@h
318 mtspr SPRN_DBCR0,r2 316 mtspr SPRN_DBCR0,r2
317 isync
319 /* clear any residual debug events */ 318 /* clear any residual debug events */
320 li r2,-1 319 li r2,-1
321 mtspr SPRN_DBSR,r2 320 mtspr SPRN_DBSR,r2
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu)
1002_GLOBAL(abort) 1001_GLOBAL(abort)
1003 li r13,0 1002 li r13,0
1004 mtspr SPRN_DBCR0,r13 /* disable all debug events */ 1003 mtspr SPRN_DBCR0,r13 /* disable all debug events */
1004 isync
1005 mfmsr r13 1005 mfmsr r13
1006 ori r13,r13,MSR_DE@l /* Enable Debug Events */ 1006 ori r13,r13,MSR_DE@l /* Enable Debug Events */
1007 mtmsr r13 1007 mtmsr r13
1008 isync
1008 mfspr r13,SPRN_DBCR0 1009 mfspr r13,SPRN_DBCR0
1009 lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h 1010 lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h
1010 mtspr SPRN_DBCR0,r13 1011 mtspr SPRN_DBCR0,r13
1012 isync
1011 1013
1012_GLOBAL(set_context) 1014_GLOBAL(set_context)
1013 1015
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 6160c8dbb7c5..fd8214caedee 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/iomap.c
3 *
4 * ppc64 "iomap" interface implementation. 2 * ppc64 "iomap" interface implementation.
5 * 3 *
6 * (C) Copyright 2004 Linus Torvalds 4 * (C) Copyright 2004 Linus Torvalds
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 946f3219fd29..d9a7fdef59b9 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/iommu.c
3 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
4 * 3 *
5 * Rewrite, cleanup, new allocation schemes, virtual merging: 4 * Rewrite, cleanup, new allocation schemes, virtual merging:
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index d1fffce86df9..24dc8117b822 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/irq.c
3 *
4 * Derived from arch/i386/kernel/irq.c 2 * Derived from arch/i386/kernel/irq.c
5 * Copyright (C) 1992 Linus Torvalds 3 * Copyright (C) 1992 Linus Torvalds
6 * Adapted from arch/i386 by Gary Thomas 4 * Adapted from arch/i386 by Gary Thomas
@@ -371,6 +369,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq)
371 return NO_IRQ; 369 return NO_IRQ;
372 370
373} 371}
372#endif /* CONFIG_PPC64 */
374 373
375#ifdef CONFIG_IRQSTACKS 374#ifdef CONFIG_IRQSTACKS
376struct thread_info *softirq_ctx[NR_CPUS]; 375struct thread_info *softirq_ctx[NR_CPUS];
@@ -394,10 +393,24 @@ void irq_ctx_init(void)
394 } 393 }
395} 394}
396 395
396static inline void do_softirq_onstack(void)
397{
398 struct thread_info *curtp, *irqtp;
399
400 curtp = current_thread_info();
401 irqtp = softirq_ctx[smp_processor_id()];
402 irqtp->task = curtp->task;
403 call_do_softirq(irqtp);
404 irqtp->task = NULL;
405}
406
407#else
408#define do_softirq_onstack() __do_softirq()
409#endif /* CONFIG_IRQSTACKS */
410
397void do_softirq(void) 411void do_softirq(void)
398{ 412{
399 unsigned long flags; 413 unsigned long flags;
400 struct thread_info *curtp, *irqtp;
401 414
402 if (in_interrupt()) 415 if (in_interrupt())
403 return; 416 return;
@@ -405,19 +418,18 @@ void do_softirq(void)
405 local_irq_save(flags); 418 local_irq_save(flags);
406 419
407 if (local_softirq_pending()) { 420 if (local_softirq_pending()) {
408 curtp = current_thread_info(); 421 account_system_vtime(current);
409 irqtp = softirq_ctx[smp_processor_id()]; 422 local_bh_disable();
410 irqtp->task = curtp->task; 423 do_softirq_onstack();
411 call_do_softirq(irqtp); 424 account_system_vtime(current);
412 irqtp->task = NULL; 425 __local_bh_enable();
413 } 426 }
414 427
415 local_irq_restore(flags); 428 local_irq_restore(flags);
416} 429}
417EXPORT_SYMBOL(do_softirq); 430EXPORT_SYMBOL(do_softirq);
418 431
419#endif /* CONFIG_IRQSTACKS */ 432#ifdef CONFIG_PPC64
420
421static int __init setup_noirqdistrib(char *str) 433static int __init setup_noirqdistrib(char *str)
422{ 434{
423 distribute_irqs = 0; 435 distribute_irqs = 0;
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index cfab48566db1..258039fb3016 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -1,6 +1,5 @@
1/* 1/*
2 * Kernel Probes (KProbes) 2 * Kernel Probes (KProbes)
3 * arch/ppc64/kernel/kprobes.c
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 22d83d4d1af5..9feeeef5a875 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init);
147 147
148int of_register_driver(struct of_platform_driver *drv) 148int of_register_driver(struct of_platform_driver *drv)
149{ 149{
150 int count = 0;
151
152 /* initialize common driver fields */ 150 /* initialize common driver fields */
153 drv->driver.name = drv->name; 151 drv->driver.name = drv->name;
154 drv->driver.bus = &of_platform_bus_type; 152 drv->driver.bus = &of_platform_bus_type;
155 153
156 /* register with core */ 154 /* register with core */
157 count = driver_register(&drv->driver); 155 return driver_register(&drv->driver);
158 return count ? count : 1;
159} 156}
160 157
161void of_unregister_driver(struct of_platform_driver *drv) 158void of_unregister_driver(struct of_platform_driver *drv)
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index c367520bc1c3..ba92bab7cc2c 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -589,7 +589,6 @@ void __devinit scan_phb(struct pci_controller *hose)
589#endif /* CONFIG_PPC_MULTIPLATFORM */ 589#endif /* CONFIG_PPC_MULTIPLATFORM */
590 if (mode == PCI_PROBE_NORMAL) 590 if (mode == PCI_PROBE_NORMAL)
591 hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); 591 hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
592 pci_bus_add_devices(bus);
593} 592}
594 593
595static int __init pcibios_init(void) 594static int __init pcibios_init(void)
@@ -608,8 +607,10 @@ static int __init pcibios_init(void)
608 printk("PCI: Probing PCI hardware\n"); 607 printk("PCI: Probing PCI hardware\n");
609 608
610 /* Scan all of the recorded PCI controllers. */ 609 /* Scan all of the recorded PCI controllers. */
611 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) 610 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
612 scan_phb(hose); 611 scan_phb(hose);
612 pci_bus_add_devices(hose->bus);
613 }
613 614
614#ifndef CONFIG_PPC_ISERIES 615#ifndef CONFIG_PPC_ISERIES
615 if (pci_probe_only) 616 if (pci_probe_only)
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c
index bdf15dbbf4f0..c336f3e31cff 100644
--- a/arch/powerpc/kernel/pci_iommu.c
+++ b/arch/powerpc/kernel/pci_iommu.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/pci_iommu.c
3 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
4 * 3 *
5 * Rewrite, cleanup, new allocation schemes: 4 * Rewrite, cleanup, new allocation schemes:
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 8a731ea877b7..dfa5398ab3c8 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs);
57extern void alignment_exception(struct pt_regs *regs); 57extern void alignment_exception(struct pt_regs *regs);
58extern void program_check_exception(struct pt_regs *regs); 58extern void program_check_exception(struct pt_regs *regs);
59extern void single_step_exception(struct pt_regs *regs); 59extern void single_step_exception(struct pt_regs *regs);
60extern int pmac_newworld;
61extern int sys_sigreturn(struct pt_regs *regs); 60extern int sys_sigreturn(struct pt_regs *regs);
62 61
63EXPORT_SYMBOL(clear_pages); 62EXPORT_SYMBOL(clear_pages);
@@ -110,15 +109,6 @@ EXPORT_SYMBOL(_insw_ns);
110EXPORT_SYMBOL(_outsw_ns); 109EXPORT_SYMBOL(_outsw_ns);
111EXPORT_SYMBOL(_insl_ns); 110EXPORT_SYMBOL(_insl_ns);
112EXPORT_SYMBOL(_outsl_ns); 111EXPORT_SYMBOL(_outsl_ns);
113EXPORT_SYMBOL(ioremap);
114#ifdef CONFIG_44x
115EXPORT_SYMBOL(ioremap64);
116#endif
117EXPORT_SYMBOL(__ioremap);
118EXPORT_SYMBOL(iounmap);
119#ifdef CONFIG_PPC32
120EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
121#endif
122 112
123#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)) 113#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE))
124EXPORT_SYMBOL(ppc_ide_md); 114EXPORT_SYMBOL(ppc_ide_md);
@@ -161,7 +151,6 @@ EXPORT_SYMBOL(__flush_icache_range);
161EXPORT_SYMBOL(flush_dcache_range); 151EXPORT_SYMBOL(flush_dcache_range);
162 152
163#ifdef CONFIG_SMP 153#ifdef CONFIG_SMP
164EXPORT_SYMBOL(smp_call_function);
165#ifdef CONFIG_PPC32 154#ifdef CONFIG_PPC32
166EXPORT_SYMBOL(smp_hw_index); 155EXPORT_SYMBOL(smp_hw_index);
167#endif 156#endif
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index c225cf154bfe..1770a066c217 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/process.c
3 *
4 * Derived from "arch/i386/kernel/process.c" 2 * Derived from "arch/i386/kernel/process.c"
5 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 1995 Linus Torvalds
6 * 4 *
@@ -47,9 +45,9 @@
47#include <asm/mmu.h> 45#include <asm/mmu.h>
48#include <asm/prom.h> 46#include <asm/prom.h>
49#include <asm/machdep.h> 47#include <asm/machdep.h>
48#include <asm/time.h>
50#ifdef CONFIG_PPC64 49#ifdef CONFIG_PPC64
51#include <asm/firmware.h> 50#include <asm/firmware.h>
52#include <asm/time.h>
53#endif 51#endif
54 52
55extern unsigned long _get_SP(void); 53extern unsigned long _get_SP(void);
@@ -330,6 +328,11 @@ struct task_struct *__switch_to(struct task_struct *prev,
330#endif 328#endif
331 329
332 local_irq_save(flags); 330 local_irq_save(flags);
331
332 account_system_vtime(current);
333 account_process_vtime(current);
334 calculate_steal_time();
335
333 last = _switch(old_thread, new_thread); 336 last = _switch(old_thread, new_thread);
334 337
335 local_irq_restore(flags); 338 local_irq_restore(flags);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 294832a7e0a6..d63cd562d9d5 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -816,8 +816,6 @@ void __init unflatten_device_tree(void)
816{ 816{
817 unsigned long start, mem, size; 817 unsigned long start, mem, size;
818 struct device_node **allnextp = &allnodes; 818 struct device_node **allnextp = &allnodes;
819 char *p = NULL;
820 int l = 0;
821 819
822 DBG(" -> unflatten_device_tree()\n"); 820 DBG(" -> unflatten_device_tree()\n");
823 821
@@ -831,10 +829,6 @@ void __init unflatten_device_tree(void)
831 829
832 /* Allocate memory for the expanded device tree */ 830 /* Allocate memory for the expanded device tree */
833 mem = lmb_alloc(size + 4, __alignof__(struct device_node)); 831 mem = lmb_alloc(size + 4, __alignof__(struct device_node));
834 if (!mem) {
835 DBG("Couldn't allocate memory with lmb_alloc()!\n");
836 panic("Couldn't allocate memory with lmb_alloc()!\n");
837 }
838 mem = (unsigned long) __va(mem); 832 mem = (unsigned long) __va(mem);
839 833
840 ((u32 *)mem)[size / 4] = 0xdeadbeef; 834 ((u32 *)mem)[size / 4] = 0xdeadbeef;
@@ -857,19 +851,6 @@ void __init unflatten_device_tree(void)
857 if (of_chosen == NULL) 851 if (of_chosen == NULL)
858 of_chosen = of_find_node_by_path("/chosen@0"); 852 of_chosen = of_find_node_by_path("/chosen@0");
859 853
860 /* Retreive command line */
861 if (of_chosen != NULL) {
862 p = (char *)get_property(of_chosen, "bootargs", &l);
863 if (p != NULL && l > 0)
864 strlcpy(cmd_line, p, min(l, COMMAND_LINE_SIZE));
865 }
866#ifdef CONFIG_CMDLINE
867 if (l == 0 || (l == 1 && (*p) == 0))
868 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
869#endif /* CONFIG_CMDLINE */
870
871 DBG("Command line is: %s\n", cmd_line);
872
873 DBG(" <- unflatten_device_tree()\n"); 854 DBG(" <- unflatten_device_tree()\n");
874} 855}
875 856
@@ -940,6 +921,8 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
940{ 921{
941 u32 *prop; 922 u32 *prop;
942 unsigned long *lprop; 923 unsigned long *lprop;
924 unsigned long l;
925 char *p;
943 926
944 DBG("search \"chosen\", depth: %d, uname: %s\n", depth, uname); 927 DBG("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
945 928
@@ -1004,6 +987,41 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
1004 crashk_res.end = crashk_res.start + *lprop - 1; 987 crashk_res.end = crashk_res.start + *lprop - 1;
1005#endif 988#endif
1006 989
990 /* Retreive command line */
991 p = of_get_flat_dt_prop(node, "bootargs", &l);
992 if (p != NULL && l > 0)
993 strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
994
995#ifdef CONFIG_CMDLINE
996 if (l == 0 || (l == 1 && (*p) == 0))
997 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
998#endif /* CONFIG_CMDLINE */
999
1000 DBG("Command line is: %s\n", cmd_line);
1001
1002 if (strstr(cmd_line, "mem=")) {
1003 char *p, *q;
1004 unsigned long maxmem = 0;
1005
1006 for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) {
1007 q = p + 4;
1008 if (p > cmd_line && p[-1] != ' ')
1009 continue;
1010 maxmem = simple_strtoul(q, &q, 0);
1011 if (*q == 'k' || *q == 'K') {
1012 maxmem <<= 10;
1013 ++q;
1014 } else if (*q == 'm' || *q == 'M') {
1015 maxmem <<= 20;
1016 ++q;
1017 } else if (*q == 'g' || *q == 'G') {
1018 maxmem <<= 30;
1019 ++q;
1020 }
1021 }
1022 memory_limit = maxmem;
1023 }
1024
1007 /* break now */ 1025 /* break now */
1008 return 1; 1026 return 1;
1009} 1027}
@@ -1124,7 +1142,7 @@ static void __init early_reserve_mem(void)
1124 size_32 = *(reserve_map_32++); 1142 size_32 = *(reserve_map_32++);
1125 if (size_32 == 0) 1143 if (size_32 == 0)
1126 break; 1144 break;
1127 DBG("reserving: %lx -> %lx\n", base_32, size_32); 1145 DBG("reserving: %x -> %x\n", base_32, size_32);
1128 lmb_reserve(base_32, size_32); 1146 lmb_reserve(base_32, size_32);
1129 } 1147 }
1130 return; 1148 return;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index d34fe537400e..813c2cd194c2 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -978,7 +978,7 @@ static void __init prom_init_mem(void)
978 if (size == 0) 978 if (size == 0)
979 continue; 979 continue;
980 prom_debug(" %x %x\n", base, size); 980 prom_debug(" %x %x\n", base, size);
981 if (base == 0) 981 if (base == 0 && (RELOC(of_platform) & PLATFORM_LPAR))
982 RELOC(rmo_top) = size; 982 RELOC(rmo_top) = size;
983 if ((base + size) > RELOC(ram_top)) 983 if ((base + size) > RELOC(ram_top))
984 RELOC(ram_top) = base + size; 984 RELOC(ram_top) = base + size;
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h
index 5ccbdbe0d5c9..c42a860c8d25 100644
--- a/arch/powerpc/kernel/ptrace-common.h
+++ b/arch/powerpc/kernel/ptrace-common.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/ppc64/kernel/ptrace-common.h
3 *
4 * Copyright (c) 2002 Stephen Rothwell, IBM Coproration 2 * Copyright (c) 2002 Stephen Rothwell, IBM Coproration
5 * Extracted from ptrace.c and ptrace32.c 3 * Extracted from ptrace.c and ptrace32.c
6 * 4 *
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 400793c71304..bcb83574335b 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -561,10 +561,7 @@ void do_syscall_trace_leave(struct pt_regs *regs)
561 regs->result); 561 regs->result);
562 562
563 if ((test_thread_flag(TIF_SYSCALL_TRACE) 563 if ((test_thread_flag(TIF_SYSCALL_TRACE)
564#ifdef CONFIG_PPC64 564 || test_thread_flag(TIF_SINGLESTEP))
565 || test_thread_flag(TIF_SINGLESTEP)
566#endif
567 )
568 && (current->ptrace & PT_PTRACED)) 565 && (current->ptrace & PT_PTRACED))
569 do_syscall_trace(); 566 do_syscall_trace();
570} 567}
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 7a95b8a28354..1f03fb28cc0a 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/rtas-proc.c
3 * Copyright (C) 2000 Tilmann Bitterberg 2 * Copyright (C) 2000 Tilmann Bitterberg
4 * (tilmann@bitterberg.de) 3 * (tilmann@bitterberg.de)
5 * 4 *
diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c
index 635d3b9a8811..34d073fb6091 100644
--- a/arch/powerpc/kernel/rtas-rtc.c
+++ b/arch/powerpc/kernel/rtas-rtc.c
@@ -52,7 +52,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
52 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); 52 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
53 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { 53 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
54 if (in_interrupt() && printk_ratelimit()) { 54 if (in_interrupt() && printk_ratelimit()) {
55 memset(&rtc_tm, 0, sizeof(struct rtc_time)); 55 memset(rtc_tm, 0, sizeof(struct rtc_time));
56 printk(KERN_WARNING "error: reading clock" 56 printk(KERN_WARNING "error: reading clock"
57 " would delay interrupt\n"); 57 " would delay interrupt\n");
58 return; /* delay not allowed */ 58 return; /* delay not allowed */
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 5579f6559912..57b539a03fa9 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/rtas_pci.c
3 *
4 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
5 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM 3 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
6 * 4 *
@@ -280,8 +278,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
280 return 0; 278 return 0;
281} 279}
282 280
283static int __devinit setup_phb(struct device_node *dev, 281int __devinit setup_phb(struct device_node *dev, struct pci_controller *phb)
284 struct pci_controller *phb)
285{ 282{
286 if (is_python(dev)) 283 if (is_python(dev))
287 python_countermeasures(dev); 284 python_countermeasures(dev);
@@ -359,27 +356,6 @@ unsigned long __init find_and_init_phbs(void)
359 return 0; 356 return 0;
360} 357}
361 358
362struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
363{
364 struct pci_controller *phb;
365 int primary;
366
367 primary = list_empty(&hose_list);
368 phb = pcibios_alloc_controller(dn);
369 if (!phb)
370 return NULL;
371 setup_phb(dn, phb);
372 pci_process_bridge_OF_ranges(phb, dn, primary);
373
374 pci_setup_phb_io_dynamic(phb, primary);
375
376 pci_devs_phb_init_dynamic(phb);
377 scan_phb(phb);
378
379 return phb;
380}
381EXPORT_SYMBOL(init_phb_dynamic);
382
383/* RPA-specific bits for removing PHBs */ 359/* RPA-specific bits for removing PHBs */
384int pcibios_remove_root_bus(struct pci_controller *phb) 360int pcibios_remove_root_bus(struct pci_controller *phb)
385{ 361{
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index f96c49b03ba0..2f3fdad35594 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -497,8 +497,6 @@ void __init setup_system(void)
497#endif 497#endif
498 printk("-----------------------------------------------------\n"); 498 printk("-----------------------------------------------------\n");
499 499
500 mm_init_ppc64();
501
502 DBG(" <- setup_system()\n"); 500 DBG(" <- setup_system()\n");
503} 501}
504 502
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index bd837b5dbf06..d7a4e814974d 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -151,10 +151,7 @@ static inline int save_general_regs(struct pt_regs *regs,
151 elf_greg_t64 *gregs = (elf_greg_t64 *)regs; 151 elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
152 int i; 152 int i;
153 153
154 if (!FULL_REGS(regs)) { 154 WARN_ON(!FULL_REGS(regs));
155 set_thread_flag(TIF_SAVE_NVGPRS);
156 current_thread_info()->nvgprs_frame = frame->mc_gregs;
157 }
158 155
159 for (i = 0; i <= PT_RESULT; i ++) { 156 for (i = 0; i <= PT_RESULT; i ++) {
160 if (i == 14 && !FULL_REGS(regs)) 157 if (i == 14 && !FULL_REGS(regs))
@@ -215,15 +212,7 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka,
215static inline int save_general_regs(struct pt_regs *regs, 212static inline int save_general_regs(struct pt_regs *regs,
216 struct mcontext __user *frame) 213 struct mcontext __user *frame)
217{ 214{
218 if (!FULL_REGS(regs)) { 215 WARN_ON(!FULL_REGS(regs));
219 /* Zero out the unsaved GPRs to avoid information
220 leak, and set TIF_SAVE_NVGPRS to ensure that the
221 registers do actually get saved later. */
222 memset(&regs->gpr[14], 0, 18 * sizeof(unsigned long));
223 current_thread_info()->nvgprs_frame = &frame->mc_gregs;
224 set_thread_flag(TIF_SAVE_NVGPRS);
225 }
226
227 return __copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE); 216 return __copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE);
228} 217}
229 218
@@ -826,8 +815,8 @@ static int do_setcontext(struct ucontext __user *ucp, struct pt_regs *regs, int
826} 815}
827 816
828long sys_swapcontext(struct ucontext __user *old_ctx, 817long sys_swapcontext(struct ucontext __user *old_ctx,
829 struct ucontext __user *new_ctx, 818 struct ucontext __user *new_ctx,
830 int ctx_size, int r6, int r7, int r8, struct pt_regs *regs) 819 int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
831{ 820{
832 unsigned char tmp; 821 unsigned char tmp;
833 822
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 497a5d3df359..47f910380a6a 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/ppc64/kernel/signal.c
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * 4 *
@@ -118,14 +116,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
118 err |= __put_user(0, &sc->v_regs); 116 err |= __put_user(0, &sc->v_regs);
119#endif /* CONFIG_ALTIVEC */ 117#endif /* CONFIG_ALTIVEC */
120 err |= __put_user(&sc->gp_regs, &sc->regs); 118 err |= __put_user(&sc->gp_regs, &sc->regs);
121 if (!FULL_REGS(regs)) { 119 WARN_ON(!FULL_REGS(regs));
122 /* Zero out the unsaved GPRs to avoid information
123 leak, and set TIF_SAVE_NVGPRS to ensure that the
124 registers do actually get saved later. */
125 memset(&regs->gpr[14], 0, 18 * sizeof(unsigned long));
126 set_thread_flag(TIF_SAVE_NVGPRS);
127 current_thread_info()->nvgprs_frame = &sc->gp_regs;
128 }
129 err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); 120 err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE);
130 err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE); 121 err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE);
131 err |= __put_user(signr, &sc->signal); 122 err |= __put_user(signr, &sc->signal);
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 13595a64f013..805eaedbc308 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -541,7 +541,7 @@ int __devinit start_secondary(void *unused)
541 smp_ops->take_timebase(); 541 smp_ops->take_timebase();
542 542
543 if (system_state > SYSTEM_BOOTING) 543 if (system_state > SYSTEM_BOOTING)
544 per_cpu(last_jiffy, cpu) = get_tb(); 544 snapshot_timebase();
545 545
546 spin_lock(&call_lock); 546 spin_lock(&call_lock);
547 cpu_set(cpu, cpu_online_map); 547 cpu_set(cpu, cpu_online_map);
@@ -573,6 +573,8 @@ void __init smp_cpus_done(unsigned int max_cpus)
573 573
574 set_cpus_allowed(current, old_mask); 574 set_cpus_allowed(current, old_mask);
575 575
576 snapshot_timebases();
577
576 dump_numa_cpu_topology(); 578 dump_numa_cpu_topology();
577} 579}
578 580
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 8a9f994ed917..1ad55f0466fd 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -288,7 +288,7 @@ COMPAT_SYS(clock_settime)
288COMPAT_SYS(clock_gettime) 288COMPAT_SYS(clock_gettime)
289COMPAT_SYS(clock_getres) 289COMPAT_SYS(clock_getres)
290COMPAT_SYS(clock_nanosleep) 290COMPAT_SYS(clock_nanosleep)
291COMPAT_SYS(swapcontext) 291SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
292COMPAT_SYS(tgkill) 292COMPAT_SYS(tgkill)
293COMPAT_SYS(utimes) 293COMPAT_SYS(utimes)
294COMPAT_SYS(statfs64) 294COMPAT_SYS(statfs64)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 2a7ddc579379..4a27218a086c 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -51,6 +51,7 @@
51#include <linux/percpu.h> 51#include <linux/percpu.h>
52#include <linux/rtc.h> 52#include <linux/rtc.h>
53#include <linux/jiffies.h> 53#include <linux/jiffies.h>
54#include <linux/posix-timers.h>
54 55
55#include <asm/io.h> 56#include <asm/io.h>
56#include <asm/processor.h> 57#include <asm/processor.h>
@@ -98,6 +99,7 @@ unsigned long tb_ticks_per_jiffy;
98unsigned long tb_ticks_per_usec = 100; /* sane default */ 99unsigned long tb_ticks_per_usec = 100; /* sane default */
99EXPORT_SYMBOL(tb_ticks_per_usec); 100EXPORT_SYMBOL(tb_ticks_per_usec);
100unsigned long tb_ticks_per_sec; 101unsigned long tb_ticks_per_sec;
102EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */
101u64 tb_to_xs; 103u64 tb_to_xs;
102unsigned tb_to_us; 104unsigned tb_to_us;
103 105
@@ -135,6 +137,224 @@ unsigned long tb_last_stamp;
135 */ 137 */
136DEFINE_PER_CPU(unsigned long, last_jiffy); 138DEFINE_PER_CPU(unsigned long, last_jiffy);
137 139
140#ifdef CONFIG_VIRT_CPU_ACCOUNTING
141/*
142 * Factors for converting from cputime_t (timebase ticks) to
143 * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds).
144 * These are all stored as 0.64 fixed-point binary fractions.
145 */
146u64 __cputime_jiffies_factor;
147EXPORT_SYMBOL(__cputime_jiffies_factor);
148u64 __cputime_msec_factor;
149EXPORT_SYMBOL(__cputime_msec_factor);
150u64 __cputime_sec_factor;
151EXPORT_SYMBOL(__cputime_sec_factor);
152u64 __cputime_clockt_factor;
153EXPORT_SYMBOL(__cputime_clockt_factor);
154
155static void calc_cputime_factors(void)
156{
157 struct div_result res;
158
159 div128_by_32(HZ, 0, tb_ticks_per_sec, &res);
160 __cputime_jiffies_factor = res.result_low;
161 div128_by_32(1000, 0, tb_ticks_per_sec, &res);
162 __cputime_msec_factor = res.result_low;
163 div128_by_32(1, 0, tb_ticks_per_sec, &res);
164 __cputime_sec_factor = res.result_low;
165 div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res);
166 __cputime_clockt_factor = res.result_low;
167}
168
169/*
170 * Read the PURR on systems that have it, otherwise the timebase.
171 */
172static u64 read_purr(void)
173{
174 if (cpu_has_feature(CPU_FTR_PURR))
175 return mfspr(SPRN_PURR);
176 return mftb();
177}
178
179/*
180 * Account time for a transition between system, hard irq
181 * or soft irq state.
182 */
183void account_system_vtime(struct task_struct *tsk)
184{
185 u64 now, delta;
186 unsigned long flags;
187
188 local_irq_save(flags);
189 now = read_purr();
190 delta = now - get_paca()->startpurr;
191 get_paca()->startpurr = now;
192 if (!in_interrupt()) {
193 delta += get_paca()->system_time;
194 get_paca()->system_time = 0;
195 }
196 account_system_time(tsk, 0, delta);
197 local_irq_restore(flags);
198}
199
200/*
201 * Transfer the user and system times accumulated in the paca
202 * by the exception entry and exit code to the generic process
203 * user and system time records.
204 * Must be called with interrupts disabled.
205 */
206void account_process_vtime(struct task_struct *tsk)
207{
208 cputime_t utime;
209
210 utime = get_paca()->user_time;
211 get_paca()->user_time = 0;
212 account_user_time(tsk, utime);
213}
214
215static void account_process_time(struct pt_regs *regs)
216{
217 int cpu = smp_processor_id();
218
219 account_process_vtime(current);
220 run_local_timers();
221 if (rcu_pending(cpu))
222 rcu_check_callbacks(cpu, user_mode(regs));
223 scheduler_tick();
224 run_posix_cpu_timers(current);
225}
226
227#ifdef CONFIG_PPC_SPLPAR
228/*
229 * Stuff for accounting stolen time.
230 */
231struct cpu_purr_data {
232 int initialized; /* thread is running */
233 u64 tb0; /* timebase at origin time */
234 u64 purr0; /* PURR at origin time */
235 u64 tb; /* last TB value read */
236 u64 purr; /* last PURR value read */
237 u64 stolen; /* stolen time so far */
238 spinlock_t lock;
239};
240
241static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data);
242
243static void snapshot_tb_and_purr(void *data)
244{
245 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
246
247 p->tb0 = mftb();
248 p->purr0 = mfspr(SPRN_PURR);
249 p->tb = p->tb0;
250 p->purr = 0;
251 wmb();
252 p->initialized = 1;
253}
254
255/*
256 * Called during boot when all cpus have come up.
257 */
258void snapshot_timebases(void)
259{
260 int cpu;
261
262 if (!cpu_has_feature(CPU_FTR_PURR))
263 return;
264 for_each_cpu(cpu)
265 spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock);
266 on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1);
267}
268
269void calculate_steal_time(void)
270{
271 u64 tb, purr, t0;
272 s64 stolen;
273 struct cpu_purr_data *p0, *pme, *phim;
274 int cpu;
275
276 if (!cpu_has_feature(CPU_FTR_PURR))
277 return;
278 cpu = smp_processor_id();
279 pme = &per_cpu(cpu_purr_data, cpu);
280 if (!pme->initialized)
281 return; /* this can happen in early boot */
282 p0 = &per_cpu(cpu_purr_data, cpu & ~1);
283 phim = &per_cpu(cpu_purr_data, cpu ^ 1);
284 spin_lock(&p0->lock);
285 tb = mftb();
286 purr = mfspr(SPRN_PURR) - pme->purr0;
287 if (!phim->initialized || !cpu_online(cpu ^ 1)) {
288 stolen = (tb - pme->tb) - (purr - pme->purr);
289 } else {
290 t0 = pme->tb0;
291 if (phim->tb0 < t0)
292 t0 = phim->tb0;
293 stolen = phim->tb - t0 - phim->purr - purr - p0->stolen;
294 }
295 if (stolen > 0) {
296 account_steal_time(current, stolen);
297 p0->stolen += stolen;
298 }
299 pme->tb = tb;
300 pme->purr = purr;
301 spin_unlock(&p0->lock);
302}
303
304/*
305 * Must be called before the cpu is added to the online map when
306 * a cpu is being brought up at runtime.
307 */
308static void snapshot_purr(void)
309{
310 int cpu;
311 u64 purr;
312 struct cpu_purr_data *p0, *pme, *phim;
313 unsigned long flags;
314
315 if (!cpu_has_feature(CPU_FTR_PURR))
316 return;
317 cpu = smp_processor_id();
318 pme = &per_cpu(cpu_purr_data, cpu);
319 p0 = &per_cpu(cpu_purr_data, cpu & ~1);
320 phim = &per_cpu(cpu_purr_data, cpu ^ 1);
321 spin_lock_irqsave(&p0->lock, flags);
322 pme->tb = pme->tb0 = mftb();
323 purr = mfspr(SPRN_PURR);
324 if (!phim->initialized) {
325 pme->purr = 0;
326 pme->purr0 = purr;
327 } else {
328 /* set p->purr and p->purr0 for no change in p0->stolen */
329 pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen;
330 pme->purr0 = purr - pme->purr;
331 }
332 pme->initialized = 1;
333 spin_unlock_irqrestore(&p0->lock, flags);
334}
335
336#endif /* CONFIG_PPC_SPLPAR */
337
338#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
339#define calc_cputime_factors()
340#define account_process_time(regs) update_process_times(user_mode(regs))
341#define calculate_steal_time() do { } while (0)
342#endif
343
344#if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR))
345#define snapshot_purr() do { } while (0)
346#endif
347
348/*
349 * Called when a cpu comes up after the system has finished booting,
350 * i.e. as a result of a hotplug cpu action.
351 */
352void snapshot_timebase(void)
353{
354 __get_cpu_var(last_jiffy) = get_tb();
355 snapshot_purr();
356}
357
138void __delay(unsigned long loops) 358void __delay(unsigned long loops)
139{ 359{
140 unsigned long start; 360 unsigned long start;
@@ -283,9 +503,9 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
283 * the two values of tb_update_count match and are even then the 503 * the two values of tb_update_count match and are even then the
284 * tb_to_xs and stamp_xsec values are consistent. If not, then it 504 * tb_to_xs and stamp_xsec values are consistent. If not, then it
285 * loops back and reads them again until this criteria is met. 505 * loops back and reads them again until this criteria is met.
506 * We expect the caller to have done the first increment of
507 * vdso_data->tb_update_count already.
286 */ 508 */
287 ++(vdso_data->tb_update_count);
288 smp_wmb();
289 vdso_data->tb_orig_stamp = new_tb_stamp; 509 vdso_data->tb_orig_stamp = new_tb_stamp;
290 vdso_data->stamp_xsec = new_stamp_xsec; 510 vdso_data->stamp_xsec = new_stamp_xsec;
291 vdso_data->tb_to_xs = new_tb_to_xs; 511 vdso_data->tb_to_xs = new_tb_to_xs;
@@ -310,20 +530,15 @@ static __inline__ void timer_recalc_offset(u64 cur_tb)
310 unsigned long offset; 530 unsigned long offset;
311 u64 new_stamp_xsec; 531 u64 new_stamp_xsec;
312 u64 tlen, t2x; 532 u64 tlen, t2x;
533 u64 tb, xsec_old, xsec_new;
534 struct gettimeofday_vars *varp;
313 535
314 if (__USE_RTC()) 536 if (__USE_RTC())
315 return; 537 return;
316 tlen = current_tick_length(); 538 tlen = current_tick_length();
317 offset = cur_tb - do_gtod.varp->tb_orig_stamp; 539 offset = cur_tb - do_gtod.varp->tb_orig_stamp;
318 if (tlen == last_tick_len && offset < 0x80000000u) { 540 if (tlen == last_tick_len && offset < 0x80000000u)
319 /* check that we're still in sync; if not, resync */ 541 return;
320 struct timeval tv;
321 __do_gettimeofday(&tv, cur_tb);
322 if (tv.tv_sec <= xtime.tv_sec &&
323 (tv.tv_sec < xtime.tv_sec ||
324 tv.tv_usec * 1000 <= xtime.tv_nsec))
325 return;
326 }
327 if (tlen != last_tick_len) { 542 if (tlen != last_tick_len) {
328 t2x = mulhdu(tlen << TICKLEN_SHIFT, ticklen_to_xs); 543 t2x = mulhdu(tlen << TICKLEN_SHIFT, ticklen_to_xs);
329 last_tick_len = tlen; 544 last_tick_len = tlen;
@@ -332,6 +547,21 @@ static __inline__ void timer_recalc_offset(u64 cur_tb)
332 new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; 547 new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
333 do_div(new_stamp_xsec, 1000000000); 548 do_div(new_stamp_xsec, 1000000000);
334 new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; 549 new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
550
551 ++vdso_data->tb_update_count;
552 smp_mb();
553
554 /*
555 * Make sure time doesn't go backwards for userspace gettimeofday.
556 */
557 tb = get_tb();
558 varp = do_gtod.varp;
559 xsec_old = mulhdu(tb - varp->tb_orig_stamp, varp->tb_to_xs)
560 + varp->stamp_xsec;
561 xsec_new = mulhdu(tb - cur_tb, t2x) + new_stamp_xsec;
562 if (xsec_new < xsec_old)
563 new_stamp_xsec += xsec_old - xsec_new;
564
335 update_gtod(cur_tb, new_stamp_xsec, t2x); 565 update_gtod(cur_tb, new_stamp_xsec, t2x);
336} 566}
337 567
@@ -382,6 +612,7 @@ static void iSeries_tb_recal(void)
382 new_tb_ticks_per_jiffy, sign, tick_diff ); 612 new_tb_ticks_per_jiffy, sign, tick_diff );
383 tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; 613 tb_ticks_per_jiffy = new_tb_ticks_per_jiffy;
384 tb_ticks_per_sec = new_tb_ticks_per_sec; 614 tb_ticks_per_sec = new_tb_ticks_per_sec;
615 calc_cputime_factors();
385 div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); 616 div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres );
386 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; 617 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
387 tb_to_xs = divres.result_low; 618 tb_to_xs = divres.result_low;
@@ -430,6 +661,7 @@ void timer_interrupt(struct pt_regs * regs)
430 irq_enter(); 661 irq_enter();
431 662
432 profile_tick(CPU_PROFILING, regs); 663 profile_tick(CPU_PROFILING, regs);
664 calculate_steal_time();
433 665
434#ifdef CONFIG_PPC_ISERIES 666#ifdef CONFIG_PPC_ISERIES
435 get_lppaca()->int_dword.fields.decr_int = 0; 667 get_lppaca()->int_dword.fields.decr_int = 0;
@@ -451,7 +683,7 @@ void timer_interrupt(struct pt_regs * regs)
451 * is the case. 683 * is the case.
452 */ 684 */
453 if (!cpu_is_offline(cpu)) 685 if (!cpu_is_offline(cpu))
454 update_process_times(user_mode(regs)); 686 account_process_time(regs);
455 687
456 /* 688 /*
457 * No need to check whether cpu is offline here; boot_cpuid 689 * No need to check whether cpu is offline here; boot_cpuid
@@ -508,13 +740,27 @@ void wakeup_decrementer(void)
508void __init smp_space_timers(unsigned int max_cpus) 740void __init smp_space_timers(unsigned int max_cpus)
509{ 741{
510 int i; 742 int i;
743 unsigned long half = tb_ticks_per_jiffy / 2;
511 unsigned long offset = tb_ticks_per_jiffy / max_cpus; 744 unsigned long offset = tb_ticks_per_jiffy / max_cpus;
512 unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); 745 unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid);
513 746
514 /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ 747 /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
515 previous_tb -= tb_ticks_per_jiffy; 748 previous_tb -= tb_ticks_per_jiffy;
749 /*
750 * The stolen time calculation for POWER5 shared-processor LPAR
751 * systems works better if the two threads' timebase interrupts
752 * are staggered by half a jiffy with respect to each other.
753 */
516 for_each_cpu(i) { 754 for_each_cpu(i) {
517 if (i != boot_cpuid) { 755 if (i == boot_cpuid)
756 continue;
757 if (i == (boot_cpuid ^ 1))
758 per_cpu(last_jiffy, i) =
759 per_cpu(last_jiffy, boot_cpuid) - half;
760 else if (i & 1)
761 per_cpu(last_jiffy, i) =
762 per_cpu(last_jiffy, i ^ 1) + half;
763 else {
518 previous_tb += offset; 764 previous_tb += offset;
519 per_cpu(last_jiffy, i) = previous_tb; 765 per_cpu(last_jiffy, i) = previous_tb;
520 } 766 }
@@ -564,6 +810,10 @@ int do_settimeofday(struct timespec *tv)
564 } 810 }
565#endif 811#endif
566 812
813 /* Make userspace gettimeofday spin until we're done. */
814 ++vdso_data->tb_update_count;
815 smp_mb();
816
567 /* 817 /*
568 * Subtract off the number of nanoseconds since the 818 * Subtract off the number of nanoseconds since the
569 * beginning of the last tick. 819 * beginning of the last tick.
@@ -706,6 +956,7 @@ void __init time_init(void)
706 tb_ticks_per_sec = ppc_tb_freq; 956 tb_ticks_per_sec = ppc_tb_freq;
707 tb_ticks_per_usec = ppc_tb_freq / 1000000; 957 tb_ticks_per_usec = ppc_tb_freq / 1000000;
708 tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); 958 tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
959 calc_cputime_factors();
709 960
710 /* 961 /*
711 * Calculate the length of each tick in ns. It will not be 962 * Calculate the length of each tick in ns. It will not be
@@ -724,10 +975,16 @@ void __init time_init(void)
724 * It is computed as: 975 * It is computed as:
725 * ticklen_to_xs = 2^N / (tb_ticks_per_jiffy * 1e9) 976 * ticklen_to_xs = 2^N / (tb_ticks_per_jiffy * 1e9)
726 * where N = 64 + 20 - TICKLEN_SCALE - TICKLEN_SHIFT 977 * where N = 64 + 20 - TICKLEN_SCALE - TICKLEN_SHIFT
727 * so as to give the result as a 0.64 fixed-point fraction. 978 * which turns out to be N = 51 - SHIFT_HZ.
979 * This gives the result as a 0.64 fixed-point fraction.
980 * That value is reduced by an offset amounting to 1 xsec per
981 * 2^31 timebase ticks to avoid problems with time going backwards
982 * by 1 xsec when we do timer_recalc_offset due to losing the
983 * fractional xsec. That offset is equal to ppc_tb_freq/2^51
984 * since there are 2^20 xsec in a second.
728 */ 985 */
729 div128_by_32(1ULL << (64 + 20 - TICKLEN_SCALE - TICKLEN_SHIFT), 0, 986 div128_by_32((1ULL << 51) - ppc_tb_freq, 0,
730 tb_ticks_per_jiffy, &res); 987 tb_ticks_per_jiffy << SHIFT_HZ, &res);
731 div128_by_32(res.result_high, res.result_low, NSEC_PER_SEC, &res); 988 div128_by_32(res.result_high, res.result_low, NSEC_PER_SEC, &res);
732 ticklen_to_xs = res.result_low; 989 ticklen_to_xs = res.result_low;
733 990
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7509aa6474f2..98660aedeeb7 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -814,6 +814,8 @@ void __kprobes program_check_exception(struct pt_regs *regs)
814 return; 814 return;
815 } 815 }
816 816
817 local_irq_enable();
818
817 /* Try to emulate it if we should. */ 819 /* Try to emulate it if we should. */
818 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) { 820 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
819 switch (emulate_instruction(regs)) { 821 switch (emulate_instruction(regs)) {
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index f0c47dab0903..ec8370368423 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/ppc64/kernel/vdso.c
3 *
4 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 2 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org> 3 * <benh@kernel.crashing.org>
6 * 4 *
@@ -182,8 +180,8 @@ static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
182 unsigned long offset = address - vma->vm_start; 180 unsigned long offset = address - vma->vm_start;
183 struct page *pg; 181 struct page *pg;
184#ifdef CONFIG_PPC64 182#ifdef CONFIG_PPC64
185 void *vbase = test_thread_flag(TIF_32BIT) ? 183 void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ?
186 vdso32_kbase : vdso64_kbase; 184 vdso64_kbase : vdso32_kbase;
187#else 185#else
188 void *vbase = vdso32_kbase; 186 void *vbase = vdso32_kbase;
189#endif 187#endif
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index ccaeda5136d1..4ee871f1cadb 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -225,9 +225,9 @@ V_FUNCTION_BEGIN(__do_get_xsec)
225 .cfi_startproc 225 .cfi_startproc
226 /* check for update count & load values */ 226 /* check for update count & load values */
2271: ld r8,CFG_TB_UPDATE_COUNT(r3) 2271: ld r8,CFG_TB_UPDATE_COUNT(r3)
228 andi. r0,r4,1 /* pending update ? loop */ 228 andi. r0,r8,1 /* pending update ? loop */
229 bne- 1b 229 bne- 1b
230 xor r0,r4,r4 /* create dependency */ 230 xor r0,r8,r8 /* create dependency */
231 add r3,r3,r0 231 add r3,r3,r0
232 232
233 /* Get TB & offset it */ 233 /* Get TB & offset it */
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S
index 40523b140109..f9837f44ac0b 100644
--- a/arch/powerpc/lib/copypage_64.S
+++ b/arch/powerpc/lib/copypage_64.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/lib/copypage.S
3 *
4 * Copyright (C) 2002 Paul Mackerras, IBM Corp. 2 * Copyright (C) 2002 Paul Mackerras, IBM Corp.
5 * 3 *
6 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S
index 6d69ef39b7df..a6b54cb97c49 100644
--- a/arch/powerpc/lib/copyuser_64.S
+++ b/arch/powerpc/lib/copyuser_64.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/lib/copyuser.S
3 *
4 * Copyright (C) 2002 Paul Mackerras, IBM Corp. 2 * Copyright (C) 2002 Paul Mackerras, IBM Corp.
5 * 3 *
6 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c
index d2b834887920..4b72ed8fd50e 100644
--- a/arch/powerpc/lib/e2a.c
+++ b/arch/powerpc/lib/e2a.c
@@ -1,9 +1,7 @@
1/* 1/*
2 * arch/ppc64/lib/e2a.c
3 *
4 * EBCDIC to ASCII conversion 2 * EBCDIC to ASCII conversion
5 * 3 *
6 * This function moved here from arch/ppc64/kernel/viopath.c 4 * This function moved here from arch/powerpc/platforms/iseries/viopath.c
7 * 5 *
8 * (C) Copyright 2000-2004 IBM Corporation 6 * (C) Copyright 2000-2004 IBM Corporation
9 * 7 *
@@ -105,4 +103,14 @@ unsigned char e2a(unsigned char x)
105} 103}
106EXPORT_SYMBOL(e2a); 104EXPORT_SYMBOL(e2a);
107 105
106unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n)
107{
108 int i;
109
110 n = strnlen(src, n);
108 111
112 for (i = 0; i < n; i++)
113 dest[i] = e2a(src[i]);
114
115 return dest;
116}
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
index 9ccacdf5bcb9..fd66acfd3e3e 100644
--- a/arch/powerpc/lib/memcpy_64.S
+++ b/arch/powerpc/lib/memcpy_64.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/lib/memcpy.S
3 *
4 * Copyright (C) 2002 Paul Mackerras, IBM Corp. 2 * Copyright (C) 2002 Paul Mackerras, IBM Corp.
5 * 3 *
6 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 42c5de2c898f..31e511856dc5 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/syslib/rheap.c
3 *
4 * A Remote Heap. Remote means that we don't touch the memory that the 2 * A Remote Heap. Remote means that we don't touch the memory that the
5 * heap points to. Normal heap implementations use the memory they manage 3 * heap points to. Normal heap implementations use the memory they manage
6 * to place their list. We cannot do that because the memory we manage may 4 * to place their list. We cannot do that because the memory we manage may
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a4815d316722..ec4adcb4bc28 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/mm/fault.c
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * 4 *
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index 12ccd7155bac..ea469eefa146 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/hashtable.S
3 *
4 * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ 2 * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $
5 * 3 *
6 * PowerPC version 4 * PowerPC version
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index b1f614c612dd..89b35c181314 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
169#ifdef CONFIG_PPC_ISERIES 169#ifdef CONFIG_PPC_ISERIES
170 if (_machine == PLATFORM_ISERIES_LPAR) 170 if (_machine == PLATFORM_ISERIES_LPAR)
171 ret = iSeries_hpte_insert(hpteg, va, 171 ret = iSeries_hpte_insert(hpteg, va,
172 virt_to_abs(paddr), 172 paddr,
173 tmp_mode, 173 tmp_mode,
174 HPTE_V_BOLTED, 174 HPTE_V_BOLTED,
175 psize); 175 psize);
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
178#ifdef CONFIG_PPC_PSERIES 178#ifdef CONFIG_PPC_PSERIES
179 if (_machine & PLATFORM_LPAR) 179 if (_machine & PLATFORM_LPAR)
180 ret = pSeries_lpar_hpte_insert(hpteg, va, 180 ret = pSeries_lpar_hpte_insert(hpteg, va,
181 virt_to_abs(paddr), 181 paddr,
182 tmp_mode, 182 tmp_mode,
183 HPTE_V_BOLTED, 183 HPTE_V_BOLTED,
184 psize); 184 psize);
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
186#endif 186#endif
187#ifdef CONFIG_PPC_MULTIPLATFORM 187#ifdef CONFIG_PPC_MULTIPLATFORM
188 ret = native_hpte_insert(hpteg, va, 188 ret = native_hpte_insert(hpteg, va,
189 virt_to_abs(paddr), 189 paddr,
190 tmp_mode, HPTE_V_BOLTED, 190 tmp_mode, HPTE_V_BOLTED,
191 psize); 191 psize);
192#endif 192#endif
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void)
392#ifdef CONFIG_MEMORY_HOTPLUG 392#ifdef CONFIG_MEMORY_HOTPLUG
393void create_section_mapping(unsigned long start, unsigned long end) 393void create_section_mapping(unsigned long start, unsigned long end)
394{ 394{
395 BUG_ON(htab_bolt_mapping(start, end, start, 395 BUG_ON(htab_bolt_mapping(start, end, __pa(start),
396 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, 396 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
397 mmu_linear_psize)); 397 mmu_linear_psize));
398} 398}
@@ -422,7 +422,7 @@ void __init htab_initialize(void)
422 422
423 htab_hash_mask = pteg_count - 1; 423 htab_hash_mask = pteg_count - 1;
424 424
425 if (platform_is_lpar()) { 425 if (firmware_has_feature(FW_FEATURE_LPAR)) {
426 /* Using a hypervisor which owns the htab */ 426 /* Using a hypervisor which owns the htab */
427 htab_address = NULL; 427 htab_address = NULL;
428 _SDR1 = 0; 428 _SDR1 = 0;
@@ -431,7 +431,6 @@ void __init htab_initialize(void)
431 * the absolute address space. 431 * the absolute address space.
432 */ 432 */
433 table = lmb_alloc(htab_size_bytes, htab_size_bytes); 433 table = lmb_alloc(htab_size_bytes, htab_size_bytes);
434 BUG_ON(table == 0);
435 434
436 DBG("Hash table allocated at %lx, size: %lx\n", table, 435 DBG("Hash table allocated at %lx, size: %lx\n", table,
437 htab_size_bytes); 436 htab_size_bytes);
@@ -474,21 +473,22 @@ void __init htab_initialize(void)
474 473
475 if (dart_tablebase != 0 && dart_tablebase >= base 474 if (dart_tablebase != 0 && dart_tablebase >= base
476 && dart_tablebase < (base + size)) { 475 && dart_tablebase < (base + size)) {
476 unsigned long dart_table_end = dart_tablebase + 16 * MB;
477 if (base != dart_tablebase) 477 if (base != dart_tablebase)
478 BUG_ON(htab_bolt_mapping(base, dart_tablebase, 478 BUG_ON(htab_bolt_mapping(base, dart_tablebase,
479 base, mode_rw, 479 __pa(base), mode_rw,
480 mmu_linear_psize)); 480 mmu_linear_psize));
481 if ((base + size) > (dart_tablebase + 16*MB)) 481 if ((base + size) > dart_table_end)
482 BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, 482 BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
483 base + size, 483 base + size,
484 dart_tablebase+16*MB, 484 __pa(dart_table_end),
485 mode_rw, 485 mode_rw,
486 mmu_linear_psize)); 486 mmu_linear_psize));
487 continue; 487 continue;
488 } 488 }
489#endif /* CONFIG_U3_DART */ 489#endif /* CONFIG_U3_DART */
490 BUG_ON(htab_bolt_mapping(base, base + size, base, 490 BUG_ON(htab_bolt_mapping(base, base + size, __pa(base),
491 mode_rw, mmu_linear_psize)); 491 mode_rw, mmu_linear_psize));
492 } 492 }
493 493
494 /* 494 /*
@@ -505,8 +505,8 @@ void __init htab_initialize(void)
505 if (base + size >= tce_alloc_start) 505 if (base + size >= tce_alloc_start)
506 tce_alloc_start = base + size + 1; 506 tce_alloc_start = base + size + 1;
507 507
508 BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, 508 BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
509 tce_alloc_start, mode_rw, 509 __pa(tce_alloc_start), mode_rw,
510 mmu_linear_psize)); 510 mmu_linear_psize));
511 } 511 }
512 512
@@ -517,7 +517,7 @@ void __init htab_initialize(void)
517 517
518void htab_initialize_secondary(void) 518void htab_initialize_secondary(void)
519{ 519{
520 if (!platform_is_lpar()) 520 if (!firmware_has_feature(FW_FEATURE_LPAR))
521 mtspr(SPRN_SDR1, _SDR1); 521 mtspr(SPRN_SDR1, _SDR1);
522} 522}
523 523
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index b51bb28c054b..7370f9f33e29 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -133,21 +133,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
133 return __pte(old); 133 return __pte(old);
134} 134}
135 135
136/*
137 * This function checks for proper alignment of input addr and len parameters.
138 */
139int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
140{
141 if (len & ~HPAGE_MASK)
142 return -EINVAL;
143 if (addr & ~HPAGE_MASK)
144 return -EINVAL;
145 if (! (within_hugepage_low_range(addr, len)
146 || within_hugepage_high_range(addr, len)) )
147 return -EINVAL;
148 return 0;
149}
150
151struct slb_flush_info { 136struct slb_flush_info {
152 struct mm_struct *mm; 137 struct mm_struct *mm;
153 u16 newareas; 138 u16 newareas;
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 7d0d75c11848..b57fb3a2b7bb 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -216,7 +216,7 @@ static void free_sec(unsigned long start, unsigned long end, const char *name)
216 216
217 while (start < end) { 217 while (start < end) {
218 ClearPageReserved(virt_to_page(start)); 218 ClearPageReserved(virt_to_page(start));
219 set_page_count(virt_to_page(start), 1); 219 init_page_count(virt_to_page(start));
220 free_page(start); 220 free_page(start);
221 cnt++; 221 cnt++;
222 start += PAGE_SIZE; 222 start += PAGE_SIZE;
@@ -248,7 +248,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
248 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 248 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
249 for (; start < end; start += PAGE_SIZE) { 249 for (; start < end; start += PAGE_SIZE) {
250 ClearPageReserved(virt_to_page(start)); 250 ClearPageReserved(virt_to_page(start));
251 set_page_count(virt_to_page(start), 1); 251 init_page_count(virt_to_page(start));
252 free_page(start); 252 free_page(start);
253 totalram_pages++; 253 totalram_pages++;
254 } 254 }
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 81cfb0c2ec58..babebd15bdc4 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -84,54 +84,6 @@
84/* max amount of RAM to use */ 84/* max amount of RAM to use */
85unsigned long __max_memory; 85unsigned long __max_memory;
86 86
87/* info on what we think the IO hole is */
88unsigned long io_hole_start;
89unsigned long io_hole_size;
90
91/*
92 * Do very early mm setup.
93 */
94void __init mm_init_ppc64(void)
95{
96#ifndef CONFIG_PPC_ISERIES
97 unsigned long i;
98#endif
99
100 ppc64_boot_msg(0x100, "MM Init");
101
102 /* This is the story of the IO hole... please, keep seated,
103 * unfortunately, we are out of oxygen masks at the moment.
104 * So we need some rough way to tell where your big IO hole
105 * is. On pmac, it's between 2G and 4G, on POWER3, it's around
106 * that area as well, on POWER4 we don't have one, etc...
107 * We need that as a "hint" when sizing the TCE table on POWER3
108 * So far, the simplest way that seem work well enough for us it
109 * to just assume that the first discontinuity in our physical
110 * RAM layout is the IO hole. That may not be correct in the future
111 * (and isn't on iSeries but then we don't care ;)
112 */
113
114#ifndef CONFIG_PPC_ISERIES
115 for (i = 1; i < lmb.memory.cnt; i++) {
116 unsigned long base, prevbase, prevsize;
117
118 prevbase = lmb.memory.region[i-1].base;
119 prevsize = lmb.memory.region[i-1].size;
120 base = lmb.memory.region[i].base;
121 if (base > (prevbase + prevsize)) {
122 io_hole_start = prevbase + prevsize;
123 io_hole_size = base - (prevbase + prevsize);
124 break;
125 }
126 }
127#endif /* CONFIG_PPC_ISERIES */
128 if (io_hole_start)
129 printk("IO Hole assumed to be %lx -> %lx\n",
130 io_hole_start, io_hole_start + io_hole_size - 1);
131
132 ppc64_boot_msg(0x100, "MM Init Done");
133}
134
135void free_initmem(void) 87void free_initmem(void)
136{ 88{
137 unsigned long addr; 89 unsigned long addr;
@@ -140,7 +92,7 @@ void free_initmem(void)
140 for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { 92 for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) {
141 memset((void *)addr, 0xcc, PAGE_SIZE); 93 memset((void *)addr, 0xcc, PAGE_SIZE);
142 ClearPageReserved(virt_to_page(addr)); 94 ClearPageReserved(virt_to_page(addr));
143 set_page_count(virt_to_page(addr), 1); 95 init_page_count(virt_to_page(addr));
144 free_page(addr); 96 free_page(addr);
145 totalram_pages++; 97 totalram_pages++;
146 } 98 }
@@ -155,7 +107,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
155 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 107 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
156 for (; start < end; start += PAGE_SIZE) { 108 for (; start < end; start += PAGE_SIZE) {
157 ClearPageReserved(virt_to_page(start)); 109 ClearPageReserved(virt_to_page(start));
158 set_page_count(virt_to_page(start), 1); 110 init_page_count(virt_to_page(start));
159 free_page(start); 111 free_page(start);
160 totalram_pages++; 112 totalram_pages++;
161 } 113 }
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index bbe3eac918e8..417d58518558 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -31,6 +31,8 @@
31#define DBG(fmt...) 31#define DBG(fmt...)
32#endif 32#endif
33 33
34#define LMB_ALLOC_ANYWHERE 0
35
34struct lmb lmb; 36struct lmb lmb;
35 37
36void lmb_dump_all(void) 38void lmb_dump_all(void)
@@ -226,6 +228,20 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align)
226unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, 228unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
227 unsigned long max_addr) 229 unsigned long max_addr)
228{ 230{
231 unsigned long alloc;
232
233 alloc = __lmb_alloc_base(size, align, max_addr);
234
235 if (alloc == 0)
236 panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n",
237 size, max_addr);
238
239 return alloc;
240}
241
242unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align,
243 unsigned long max_addr)
244{
229 long i, j; 245 long i, j;
230 unsigned long base = 0; 246 unsigned long base = 0;
231 247
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 550517c2dd42..badac10d700c 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -108,8 +108,8 @@ EXPORT_SYMBOL(phys_mem_access_prot);
108void online_page(struct page *page) 108void online_page(struct page *page)
109{ 109{
110 ClearPageReserved(page); 110 ClearPageReserved(page);
111 set_page_count(page, 0); 111 init_page_count(page);
112 free_cold_page(page); 112 __free_page(page);
113 totalram_pages++; 113 totalram_pages++;
114 num_physpages++; 114 num_physpages++;
115} 115}
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size)
125 nid = hot_add_scn_to_nid(start); 125 nid = hot_add_scn_to_nid(start);
126 pgdata = NODE_DATA(nid); 126 pgdata = NODE_DATA(nid);
127 127
128 start = __va(start); 128 start = (unsigned long)__va(start);
129 create_section_mapping(start, start + size); 129 create_section_mapping(start, start + size);
130 130
131 /* this should work for most non-highmem platforms */ 131 /* this should work for most non-highmem platforms */
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void)
249 bootmap_pages = bootmem_bootmap_pages(total_pages); 249 bootmap_pages = bootmem_bootmap_pages(total_pages);
250 250
251 start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); 251 start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
252 BUG_ON(!start);
253 252
254 boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); 253 boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages);
255 254
@@ -376,7 +375,7 @@ void __init mem_init(void)
376 struct page *page = pfn_to_page(pfn); 375 struct page *page = pfn_to_page(pfn);
377 376
378 ClearPageReserved(page); 377 ClearPageReserved(page);
379 set_page_count(page, 1); 378 init_page_count(page);
380 __free_page(page); 379 __free_page(page);
381 totalhigh_pages++; 380 totalhigh_pages++;
382 } 381 }
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c
index fe65f522aff3..972a8e884b9a 100644
--- a/arch/powerpc/mm/mmap.c
+++ b/arch/powerpc/mm/mmap.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/ppc64/mm/mmap.c
3 *
4 * flexible mmap layout support 2 * flexible mmap layout support
5 * 3 *
6 * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. 4 * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 2863a912bcd0..e89b22aa539e 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -129,10 +129,12 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn,
129 *start_pfn = 0; 129 *start_pfn = 0;
130} 130}
131 131
132static inline void map_cpu_to_node(int cpu, int node) 132static void __cpuinit map_cpu_to_node(int cpu, int node)
133{ 133{
134 numa_cpu_lookup_table[cpu] = node; 134 numa_cpu_lookup_table[cpu] = node;
135 135
136 dbg("adding cpu %d to node %d\n", cpu, node);
137
136 if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) 138 if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node])))
137 cpu_set(cpu, numa_cpumask_lookup_table[node]); 139 cpu_set(cpu, numa_cpumask_lookup_table[node]);
138} 140}
@@ -153,7 +155,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
153} 155}
154#endif /* CONFIG_HOTPLUG_CPU */ 156#endif /* CONFIG_HOTPLUG_CPU */
155 157
156static struct device_node *find_cpu_node(unsigned int cpu) 158static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
157{ 159{
158 unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); 160 unsigned int hw_cpuid = get_hard_smp_processor_id(cpu);
159 struct device_node *cpu_node = NULL; 161 struct device_node *cpu_node = NULL;
@@ -189,23 +191,29 @@ static int *of_get_associativity(struct device_node *dev)
189 return (unsigned int *)get_property(dev, "ibm,associativity", NULL); 191 return (unsigned int *)get_property(dev, "ibm,associativity", NULL);
190} 192}
191 193
192static int of_node_numa_domain(struct device_node *device) 194/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
195 * info is found.
196 */
197static int of_node_to_nid(struct device_node *device)
193{ 198{
194 int numa_domain; 199 int nid = -1;
195 unsigned int *tmp; 200 unsigned int *tmp;
196 201
197 if (min_common_depth == -1) 202 if (min_common_depth == -1)
198 return 0; 203 goto out;
199 204
200 tmp = of_get_associativity(device); 205 tmp = of_get_associativity(device);
201 if (tmp && (tmp[0] >= min_common_depth)) { 206 if (!tmp)
202 numa_domain = tmp[min_common_depth]; 207 goto out;
203 } else { 208
204 dbg("WARNING: no NUMA information for %s\n", 209 if (tmp[0] >= min_common_depth)
205 device->full_name); 210 nid = tmp[min_common_depth];
206 numa_domain = 0; 211
207 } 212 /* POWER4 LPAR uses 0xffff as invalid node */
208 return numa_domain; 213 if (nid == 0xffff || nid >= MAX_NUMNODES)
214 nid = -1;
215out:
216 return nid;
209} 217}
210 218
211/* 219/*
@@ -246,8 +254,7 @@ static int __init find_min_common_depth(void)
246 if ((len >= 1) && ref_points) { 254 if ((len >= 1) && ref_points) {
247 depth = ref_points[1]; 255 depth = ref_points[1];
248 } else { 256 } else {
249 dbg("WARNING: could not find NUMA " 257 dbg("NUMA: ibm,associativity-reference-points not found.\n");
250 "associativity reference point\n");
251 depth = -1; 258 depth = -1;
252 } 259 }
253 of_node_put(rtas_root); 260 of_node_put(rtas_root);
@@ -283,9 +290,9 @@ static unsigned long __devinit read_n_cells(int n, unsigned int **buf)
283 * Figure out to which domain a cpu belongs and stick it there. 290 * Figure out to which domain a cpu belongs and stick it there.
284 * Return the id of the domain used. 291 * Return the id of the domain used.
285 */ 292 */
286static int numa_setup_cpu(unsigned long lcpu) 293static int __cpuinit numa_setup_cpu(unsigned long lcpu)
287{ 294{
288 int numa_domain = 0; 295 int nid = 0;
289 struct device_node *cpu = find_cpu_node(lcpu); 296 struct device_node *cpu = find_cpu_node(lcpu);
290 297
291 if (!cpu) { 298 if (!cpu) {
@@ -293,27 +300,16 @@ static int numa_setup_cpu(unsigned long lcpu)
293 goto out; 300 goto out;
294 } 301 }
295 302
296 numa_domain = of_node_numa_domain(cpu); 303 nid = of_node_to_nid(cpu);
297 304
298 if (numa_domain >= num_online_nodes()) { 305 if (nid < 0 || !node_online(nid))
299 /* 306 nid = any_online_node(NODE_MASK_ALL);
300 * POWER4 LPAR uses 0xffff as invalid node,
301 * dont warn in this case.
302 */
303 if (numa_domain != 0xffff)
304 printk(KERN_ERR "WARNING: cpu %ld "
305 "maps to invalid NUMA node %d\n",
306 lcpu, numa_domain);
307 numa_domain = 0;
308 }
309out: 307out:
310 node_set_online(numa_domain); 308 map_cpu_to_node(lcpu, nid);
311
312 map_cpu_to_node(lcpu, numa_domain);
313 309
314 of_node_put(cpu); 310 of_node_put(cpu);
315 311
316 return numa_domain; 312 return nid;
317} 313}
318 314
319static int cpu_numa_callback(struct notifier_block *nfb, 315static int cpu_numa_callback(struct notifier_block *nfb,
@@ -325,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb,
325 321
326 switch (action) { 322 switch (action) {
327 case CPU_UP_PREPARE: 323 case CPU_UP_PREPARE:
328 if (min_common_depth == -1 || !numa_enabled) 324 numa_setup_cpu(lcpu);
329 map_cpu_to_node(lcpu, 0);
330 else
331 numa_setup_cpu(lcpu);
332 ret = NOTIFY_OK; 325 ret = NOTIFY_OK;
333 break; 326 break;
334#ifdef CONFIG_HOTPLUG_CPU 327#ifdef CONFIG_HOTPLUG_CPU
@@ -375,7 +368,7 @@ static int __init parse_numa_properties(void)
375{ 368{
376 struct device_node *cpu = NULL; 369 struct device_node *cpu = NULL;
377 struct device_node *memory = NULL; 370 struct device_node *memory = NULL;
378 int max_domain; 371 int default_nid = 0;
379 unsigned long i; 372 unsigned long i;
380 373
381 if (numa_enabled == 0) { 374 if (numa_enabled == 0) {
@@ -385,32 +378,32 @@ static int __init parse_numa_properties(void)
385 378
386 min_common_depth = find_min_common_depth(); 379 min_common_depth = find_min_common_depth();
387 380
388 dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
389 if (min_common_depth < 0) 381 if (min_common_depth < 0)
390 return min_common_depth; 382 return min_common_depth;
391 383
392 max_domain = numa_setup_cpu(boot_cpuid); 384 dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
393 385
394 /* 386 /*
395 * Even though we connect cpus to numa domains later in SMP init, 387 * Even though we connect cpus to numa domains later in SMP
396 * we need to know the maximum node id now. This is because each 388 * init, we need to know the node ids now. This is because
397 * node id must have NODE_DATA etc backing it. 389 * each node to be onlined must have NODE_DATA etc backing it.
398 * As a result of hotplug we could still have cpus appear later on
399 * with larger node ids. In that case we force the cpu into node 0.
400 */ 390 */
401 for_each_cpu(i) { 391 for_each_present_cpu(i) {
402 int numa_domain; 392 int nid;
403 393
404 cpu = find_cpu_node(i); 394 cpu = find_cpu_node(i);
395 BUG_ON(!cpu);
396 nid = of_node_to_nid(cpu);
397 of_node_put(cpu);
405 398
406 if (cpu) { 399 /*
407 numa_domain = of_node_numa_domain(cpu); 400 * Don't fall back to default_nid yet -- we will plug
408 of_node_put(cpu); 401 * cpus into nodes once the memory scan has discovered
409 402 * the topology.
410 if (numa_domain < MAX_NUMNODES && 403 */
411 max_domain < numa_domain) 404 if (nid < 0)
412 max_domain = numa_domain; 405 continue;
413 } 406 node_set_online(nid);
414 } 407 }
415 408
416 get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); 409 get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
@@ -418,7 +411,7 @@ static int __init parse_numa_properties(void)
418 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { 411 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
419 unsigned long start; 412 unsigned long start;
420 unsigned long size; 413 unsigned long size;
421 int numa_domain; 414 int nid;
422 int ranges; 415 int ranges;
423 unsigned int *memcell_buf; 416 unsigned int *memcell_buf;
424 unsigned int len; 417 unsigned int len;
@@ -439,18 +432,15 @@ new_range:
439 start = read_n_cells(n_mem_addr_cells, &memcell_buf); 432 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
440 size = read_n_cells(n_mem_size_cells, &memcell_buf); 433 size = read_n_cells(n_mem_size_cells, &memcell_buf);
441 434
442 numa_domain = of_node_numa_domain(memory); 435 /*
443 436 * Assumption: either all memory nodes or none will
444 if (numa_domain >= MAX_NUMNODES) { 437 * have associativity properties. If none, then
445 if (numa_domain != 0xffff) 438 * everything goes to default_nid.
446 printk(KERN_ERR "WARNING: memory at %lx maps " 439 */
447 "to invalid NUMA node %d\n", start, 440 nid = of_node_to_nid(memory);
448 numa_domain); 441 if (nid < 0)
449 numa_domain = 0; 442 nid = default_nid;
450 } 443 node_set_online(nid);
451
452 if (max_domain < numa_domain)
453 max_domain = numa_domain;
454 444
455 if (!(size = numa_enforce_memory_limit(start, size))) { 445 if (!(size = numa_enforce_memory_limit(start, size))) {
456 if (--ranges) 446 if (--ranges)
@@ -459,16 +449,13 @@ new_range:
459 continue; 449 continue;
460 } 450 }
461 451
462 add_region(numa_domain, start >> PAGE_SHIFT, 452 add_region(nid, start >> PAGE_SHIFT,
463 size >> PAGE_SHIFT); 453 size >> PAGE_SHIFT);
464 454
465 if (--ranges) 455 if (--ranges)
466 goto new_range; 456 goto new_range;
467 } 457 }
468 458
469 for (i = 0; i <= max_domain; i++)
470 node_set_online(i);
471
472 return 0; 459 return 0;
473} 460}
474 461
@@ -483,7 +470,6 @@ static void __init setup_nonnuma(void)
483 printk(KERN_INFO "Memory hole size: %ldMB\n", 470 printk(KERN_INFO "Memory hole size: %ldMB\n",
484 (top_of_ram - total_ram) >> 20); 471 (top_of_ram - total_ram) >> 20);
485 472
486 map_cpu_to_node(boot_cpuid, 0);
487 for (i = 0; i < lmb.memory.cnt; ++i) 473 for (i = 0; i < lmb.memory.cnt; ++i)
488 add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, 474 add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT,
489 lmb_size_pages(&lmb.memory, i)); 475 lmb_size_pages(&lmb.memory, i));
@@ -570,11 +556,11 @@ static void __init *careful_allocation(int nid, unsigned long size,
570 unsigned long end_pfn) 556 unsigned long end_pfn)
571{ 557{
572 int new_nid; 558 int new_nid;
573 unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); 559 unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT);
574 560
575 /* retry over all memory */ 561 /* retry over all memory */
576 if (!ret) 562 if (!ret)
577 ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); 563 ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM());
578 564
579 if (!ret) 565 if (!ret)
580 panic("numa.c: cannot allocate %lu bytes on node %d", 566 panic("numa.c: cannot allocate %lu bytes on node %d",
@@ -620,6 +606,8 @@ void __init do_init_bootmem(void)
620 dump_numa_memory_topology(); 606 dump_numa_memory_topology();
621 607
622 register_cpu_notifier(&ppc64_numa_nb); 608 register_cpu_notifier(&ppc64_numa_nb);
609 cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE,
610 (void *)(unsigned long)boot_cpuid);
623 611
624 for_each_online_node(nid) { 612 for_each_online_node(nid) {
625 unsigned long start_pfn, end_pfn, pages_present; 613 unsigned long start_pfn, end_pfn, pages_present;
@@ -767,10 +755,10 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
767{ 755{
768 struct device_node *memory = NULL; 756 struct device_node *memory = NULL;
769 nodemask_t nodes; 757 nodemask_t nodes;
770 int numa_domain = 0; 758 int default_nid = any_online_node(NODE_MASK_ALL);
771 759
772 if (!numa_enabled || (min_common_depth < 0)) 760 if (!numa_enabled || (min_common_depth < 0))
773 return numa_domain; 761 return default_nid;
774 762
775 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { 763 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
776 unsigned long start, size; 764 unsigned long start, size;
@@ -787,15 +775,15 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
787ha_new_range: 775ha_new_range:
788 start = read_n_cells(n_mem_addr_cells, &memcell_buf); 776 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
789 size = read_n_cells(n_mem_size_cells, &memcell_buf); 777 size = read_n_cells(n_mem_size_cells, &memcell_buf);
790 numa_domain = of_node_numa_domain(memory); 778 nid = of_node_to_nid(memory);
791 779
792 /* Domains not present at boot default to 0 */ 780 /* Domains not present at boot default to 0 */
793 if (!node_online(numa_domain)) 781 if (nid < 0 || !node_online(nid))
794 numa_domain = any_online_node(NODE_MASK_ALL); 782 nid = default_nid;
795 783
796 if ((scn_addr >= start) && (scn_addr < (start + size))) { 784 if ((scn_addr >= start) && (scn_addr < (start + size))) {
797 of_node_put(memory); 785 of_node_put(memory);
798 goto got_numa_domain; 786 goto got_nid;
799 } 787 }
800 788
801 if (--ranges) /* process all ranges in cell */ 789 if (--ranges) /* process all ranges in cell */
@@ -804,12 +792,12 @@ ha_new_range:
804 BUG(); /* section address should be found above */ 792 BUG(); /* section address should be found above */
805 793
806 /* Temporary code to ensure that returned node is not empty */ 794 /* Temporary code to ensure that returned node is not empty */
807got_numa_domain: 795got_nid:
808 nodes_setall(nodes); 796 nodes_setall(nodes);
809 while (NODE_DATA(numa_domain)->node_spanned_pages == 0) { 797 while (NODE_DATA(nid)->node_spanned_pages == 0) {
810 node_clear(numa_domain, nodes); 798 node_clear(nid, nodes);
811 numa_domain = any_online_node(nodes); 799 nid = any_online_node(nodes);
812 } 800 }
813 return numa_domain; 801 return nid;
814} 802}
815#endif /* CONFIG_MEMORY_HOTPLUG */ 803#endif /* CONFIG_MEMORY_HOTPLUG */
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index f4e5ac122615..d296eb6b4545 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -37,6 +37,7 @@
37 37
38unsigned long ioremap_base; 38unsigned long ioremap_base;
39unsigned long ioremap_bot; 39unsigned long ioremap_bot;
40EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
40int io_bat_index; 41int io_bat_index;
41 42
42#if defined(CONFIG_6xx) || defined(CONFIG_POWER3) 43#if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
@@ -153,6 +154,7 @@ ioremap64(unsigned long long addr, unsigned long size)
153{ 154{
154 return __ioremap(addr, size, _PAGE_NO_CACHE); 155 return __ioremap(addr, size, _PAGE_NO_CACHE);
155} 156}
157EXPORT_SYMBOL(ioremap64);
156 158
157void __iomem * 159void __iomem *
158ioremap(phys_addr_t addr, unsigned long size) 160ioremap(phys_addr_t addr, unsigned long size)
@@ -162,6 +164,7 @@ ioremap(phys_addr_t addr, unsigned long size)
162 return ioremap64(addr64, size); 164 return ioremap64(addr64, size);
163} 165}
164#endif /* CONFIG_PHYS_64BIT */ 166#endif /* CONFIG_PHYS_64BIT */
167EXPORT_SYMBOL(ioremap);
165 168
166void __iomem * 169void __iomem *
167__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) 170__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
@@ -247,6 +250,7 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
247out: 250out:
248 return (void __iomem *) (v + ((unsigned long)addr & ~PAGE_MASK)); 251 return (void __iomem *) (v + ((unsigned long)addr & ~PAGE_MASK));
249} 252}
253EXPORT_SYMBOL(__ioremap);
250 254
251void iounmap(volatile void __iomem *addr) 255void iounmap(volatile void __iomem *addr)
252{ 256{
@@ -259,6 +263,7 @@ void iounmap(volatile void __iomem *addr)
259 if (addr > high_memory && (unsigned long) addr < ioremap_bot) 263 if (addr > high_memory && (unsigned long) addr < ioremap_bot)
260 vunmap((void *) (PAGE_MASK & (unsigned long)addr)); 264 vunmap((void *) (PAGE_MASK & (unsigned long)addr));
261} 265}
266EXPORT_SYMBOL(iounmap);
262 267
263void __iomem *ioport_map(unsigned long port, unsigned int len) 268void __iomem *ioport_map(unsigned long port, unsigned int len)
264{ 269{
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index d1acee38f163..abfaabf667bf 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/mm/slb_low.S
3 *
4 * Low-level SLB routines 2 * Low-level SLB routines
5 * 3 *
6 * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM 4 * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 82e4951826bc..91d25fb27f89 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -247,10 +247,6 @@ void stabs_alloc(void)
247 247
248 newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, 248 newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
249 1<<SID_SHIFT); 249 1<<SID_SHIFT);
250 if (! newstab)
251 panic("Unable to allocate segment table for CPU %d.\n",
252 cpu);
253
254 newstab = (unsigned long)__va(newstab); 250 newstab = (unsigned long)__va(newstab);
255 251
256 memset((void *)newstab, 0, HW_PAGE_SIZE); 252 memset((void *)newstab, 0, HW_PAGE_SIZE);
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index bb3afb6e6317..f734b11566c2 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -36,7 +36,7 @@
36DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); 36DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
37 37
38/* This is declared as we are using the more or less generic 38/* This is declared as we are using the more or less generic
39 * include/asm-ppc64/tlb.h file -- tgall 39 * include/asm-powerpc/tlb.h file -- tgall
40 */ 40 */
41DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 41DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
42DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); 42DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index 659a021da0c7..4b06e53eb9b4 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -10,6 +10,7 @@
10#include <linux/oprofile.h> 10#include <linux/oprofile.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <asm/firmware.h>
13#include <asm/ptrace.h> 14#include <asm/ptrace.h>
14#include <asm/system.h> 15#include <asm/system.h>
15#include <asm/processor.h> 16#include <asm/processor.h>
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs)
232 mmcra = mfspr(SPRN_MMCRA); 233 mmcra = mfspr(SPRN_MMCRA);
233 234
234 /* Were we in the hypervisor? */ 235 /* Were we in the hypervisor? */
235 if (platform_is_lpar() && (mmcra & MMCRA_SIHV)) 236 if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV))
236 /* function descriptor madness */ 237 /* function descriptor madness */
237 return *((unsigned long *)hypervisor_bucket); 238 return *((unsigned long *)hypervisor_bucket);
238 239
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 9d8b28ef3343..5c72367441a8 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -1,4 +1,6 @@
1# 1#
2# Makefile for the PowerPC 83xx linux kernel. 2# Makefile for the PowerPC 83xx linux kernel.
3# 3#
4obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o 4obj-y := misc.o
5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
new file mode 100644
index 000000000000..1455bcef4892
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -0,0 +1,55 @@
1/*
2 * misc setup functions for MPC83xx
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#include <linux/config.h>
13#include <linux/stddef.h>
14#include <linux/kernel.h>
15
16#include <asm/io.h>
17#include <asm/hw_irq.h>
18#include <sysdev/fsl_soc.h>
19
20#include "mpc83xx.h"
21
22void mpc83xx_restart(char *cmd)
23{
24#define RST_OFFSET 0x00000900
25#define RST_PROT_REG 0x00000018
26#define RST_CTRL_REG 0x0000001c
27 __be32 __iomem *reg;
28
29 /* map reset register space */
30 reg = ioremap(get_immrbase() + 0x900, 0xff);
31
32 local_irq_disable();
33
34 /* enable software reset "RSTE" */
35 out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
36
37 /* set software hard reset */
38 out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
39 for (;;) ;
40}
41
42long __init mpc83xx_time_init(void)
43{
44#define SPCR_OFFSET 0x00000110
45#define SPCR_TBEN 0x00400000
46 __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4);
47 __be32 tmp;
48
49 tmp = in_be32(spcr);
50 out_be32(spcr, tmp | SPCR_TBEN);
51
52 iounmap(spcr);
53
54 return 0;
55}
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c
index 2098dd05a773..7c18b4cd5db4 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c
@@ -24,22 +24,15 @@
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/seq_file.h> 25#include <linux/seq_file.h>
26#include <linux/root_dev.h> 26#include <linux/root_dev.h>
27#include <linux/module.h>
28#include <linux/fsl_devices.h>
29 27
30#include <asm/system.h> 28#include <asm/system.h>
31#include <asm/pgtable.h>
32#include <asm/page.h>
33#include <asm/atomic.h> 29#include <asm/atomic.h>
34#include <asm/time.h> 30#include <asm/time.h>
35#include <asm/io.h> 31#include <asm/io.h>
36#include <asm/machdep.h> 32#include <asm/machdep.h>
37#include <asm/ipic.h> 33#include <asm/ipic.h>
38#include <asm/bootinfo.h> 34#include <asm/bootinfo.h>
39#include <asm/pci-bridge.h>
40#include <asm/mpc83xx.h>
41#include <asm/irq.h> 35#include <asm/irq.h>
42#include <mm/mmu_decl.h>
43#include <asm/prom.h> 36#include <asm/prom.h>
44#include <asm/udbg.h> 37#include <asm/udbg.h>
45#include <sysdev/fsl_soc.h> 38#include <sysdev/fsl_soc.h>
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0;
52#endif 45#endif
53 46
54#ifdef CONFIG_PCI 47#ifdef CONFIG_PCI
55extern int mpc83xx_pci2_busno;
56
57static int 48static int
58mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) 49mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
59{ 50{
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
78 const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; 69 const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4;
79 return PCI_IRQ_TABLE_LOOKUP; 70 return PCI_IRQ_TABLE_LOOKUP;
80} 71}
81 72#endif /* CONFIG_PCI */
82static int
83mpc83xx_exclude_device(u_char bus, u_char devfn)
84{
85 if (bus == 0 && PCI_SLOT(devfn) == 0)
86 return PCIBIOS_DEVICE_NOT_FOUND;
87 if (mpc83xx_pci2_busno)
88 if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
89 return PCIBIOS_DEVICE_NOT_FOUND;
90 return PCIBIOS_SUCCESSFUL;
91}
92#endif /* CONFIG_PCI */
93 73
94/* ************************************************************************ 74/* ************************************************************************
95 * 75 *
96 * Setup the architecture 76 * Setup the architecture
97 * 77 *
98 */ 78 */
99static void __init 79static void __init mpc834x_sys_setup_arch(void)
100mpc834x_sys_setup_arch(void)
101{ 80{
102 struct device_node *np; 81 struct device_node *np;
103 82
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void)
106 85
107 np = of_find_node_by_type(NULL, "cpu"); 86 np = of_find_node_by_type(NULL, "cpu");
108 if (np != 0) { 87 if (np != 0) {
109 unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); 88 unsigned int *fp =
89 (int *)get_property(np, "clock-frequency", NULL);
110 if (fp != 0) 90 if (fp != 0)
111 loops_per_jiffy = *fp / HZ; 91 loops_per_jiffy = *fp / HZ;
112 else 92 else
113 loops_per_jiffy = 50000000 / HZ; 93 loops_per_jiffy = 50000000 / HZ;
114 of_node_put(np); 94 of_node_put(np);
115 } 95 }
116
117#ifdef CONFIG_PCI 96#ifdef CONFIG_PCI
118 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 97 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
119 add_bridge(np); 98 add_bridge(np);
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void)
124#endif 103#endif
125 104
126#ifdef CONFIG_ROOT_NFS 105#ifdef CONFIG_ROOT_NFS
127 ROOT_DEV = Root_NFS; 106 ROOT_DEV = Root_NFS;
128#else 107#else
129 ROOT_DEV = Root_HDA1; 108 ROOT_DEV = Root_HDA1;
130#endif 109#endif
131} 110}
132 111
133void __init 112void __init mpc834x_sys_init_IRQ(void)
134mpc834x_sys_init_IRQ(void)
135{ 113{
136 u8 senses[8] = { 114 u8 senses[8] = {
137 0, /* EXT 0 */ 115 0, /* EXT 0 */
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void)
160} 138}
161 139
162#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) 140#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
163extern ulong ds1374_get_rtc_time(void); 141extern ulong ds1374_get_rtc_time(void);
164extern int ds1374_set_rtc_time(ulong); 142extern int ds1374_set_rtc_time(ulong);
165 143
166static int __init 144static int __init mpc834x_rtc_hookup(void)
167mpc834x_rtc_hookup(void)
168{ 145{
169 struct timespec tv; 146 struct timespec tv;
170 147
171 ppc_md.get_rtc_time = ds1374_get_rtc_time; 148 ppc_md.get_rtc_time = ds1374_get_rtc_time;
172 ppc_md.set_rtc_time = ds1374_set_rtc_time; 149 ppc_md.set_rtc_time = ds1374_set_rtc_time;
173 150
174 tv.tv_nsec = 0; 151 tv.tv_nsec = 0;
175 tv.tv_sec = (ppc_md.get_rtc_time)(); 152 tv.tv_sec = (ppc_md.get_rtc_time) ();
176 do_settimeofday(&tv); 153 do_settimeofday(&tv);
177 154
178 return 0; 155 return 0;
179} 156}
157
180late_initcall(mpc834x_rtc_hookup); 158late_initcall(mpc834x_rtc_hookup);
181#endif 159#endif
182 160
183static void 161void __init platform_init(void)
184mpc83xx_restart(char *cmd)
185{
186#define RST_OFFSET 0x00000900
187#define RST_PROT_REG 0x00000018
188#define RST_CTRL_REG 0x0000001c
189 __be32 __iomem *reg;
190
191 // map reset register space
192 reg = ioremap(get_immrbase() + 0x900, 0xff);
193
194 local_irq_disable();
195
196 /* enable software reset "RSTE" */
197 out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
198
199 /* set software hard reset */
200 out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445);
201 for(;;);
202}
203
204static long __init
205mpc83xx_time_init(void)
206{
207#define SPCR_OFFSET 0x00000110
208#define SPCR_TBEN 0x00400000
209 __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4);
210 __be32 tmp;
211
212 tmp = in_be32(spcr);
213 out_be32(spcr, tmp|SPCR_TBEN);
214
215 iounmap(spcr);
216
217 return 0;
218}
219void __init
220platform_init(void)
221{ 162{
222 /* setup the PowerPC module struct */ 163 /* setup the PowerPC module struct */
223 ppc_md.setup_arch = mpc834x_sys_setup_arch; 164 ppc_md.setup_arch = mpc834x_sys_setup_arch;
@@ -239,5 +180,3 @@ platform_init(void)
239 180
240 return; 181 return;
241} 182}
242
243
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h
index e4ca39f6a862..fedecb73f7ff 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.h
+++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h
@@ -20,4 +20,4 @@
20#define PIRQC MPC83xx_IRQ_EXT6 20#define PIRQC MPC83xx_IRQ_EXT6
21#define PIRQD MPC83xx_IRQ_EXT7 21#define PIRQD MPC83xx_IRQ_EXT7
22 22
23#endif /* __MACH_MPC83XX_SYS_H__ */ 23#endif /* __MACH_MPC83XX_SYS_H__ */
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index ce9e66abef24..01cae106912b 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -10,5 +10,8 @@
10 */ 10 */
11 11
12extern int add_bridge(struct device_node *dev); 12extern int add_bridge(struct device_node *dev);
13extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
14extern void mpc83xx_restart(char *cmd);
15extern long mpc83xx_time_init(void);
13 16
14#endif /* __MPC83XX_H__ */ 17#endif /* __MPC83XX_H__ */
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 469cdacc5bd4..16f7d3b30e1d 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -36,7 +36,16 @@
36 36
37int mpc83xx_pci2_busno; 37int mpc83xx_pci2_busno;
38 38
39#ifdef CONFIG_PCI 39int mpc83xx_exclude_device(u_char bus, u_char devfn)
40{
41 if (bus == 0 && PCI_SLOT(devfn) == 0)
42 return PCIBIOS_DEVICE_NOT_FOUND;
43 if (mpc83xx_pci2_busno)
44 if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
45 return PCIBIOS_DEVICE_NOT_FOUND;
46 return PCIBIOS_SUCCESSFUL;
47}
48
40int __init add_bridge(struct device_node *dev) 49int __init add_bridge(struct device_node *dev)
41{ 50{
42 int len; 51 int len;
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev)
52 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 61 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
53 62
54 /* Get bus range if any */ 63 /* Get bus range if any */
55 bus_range = (int *) get_property(dev, "bus-range", &len); 64 bus_range = (int *)get_property(dev, "bus-range", &len);
56 if (bus_range == NULL || len < 2 * sizeof(int)) { 65 if (bus_range == NULL || len < 2 * sizeof(int)) {
57 printk(KERN_WARNING "Can't get bus-range for %s, assume" 66 printk(KERN_WARNING "Can't get bus-range for %s, assume"
58 " bus 0\n", dev->full_name); 67 " bus 0\n", dev->full_name);
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev)
74 if ((rsrc.start & 0xfffff) == 0x8500) { 83 if ((rsrc.start & 0xfffff) == 0x8500) {
75 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); 84 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304);
76 } 85 }
77 /* PCI 2*/ 86 /* PCI 2 */
78 if ((rsrc.start & 0xfffff) == 0x8600) { 87 if ((rsrc.start & 0xfffff) == 0x8600) {
79 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); 88 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384);
80 primary = 0; 89 primary = 0;
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev)
84 93
85 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " 94 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. "
86 "Firmware bus number: %d->%d\n", 95 "Firmware bus number: %d->%d\n",
87 rsrc.start, hose->first_busno, hose->last_busno); 96 rsrc.start, hose->first_busno, hose->last_busno);
88 97
89 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 98 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
90 hose, hose->cfg_addr, hose->cfg_data); 99 hose, hose->cfg_addr, hose->cfg_data);
91 100
92 /* Interpret the "ranges" property */ 101 /* Interpret the "ranges" property */
93 /* This also maps the I/O region and sets isa_io/mem_base */ 102 /* This also maps the I/O region and sets isa_io/mem_base */
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev)
95 104
96 return 0; 105 return 0;
97} 106}
98
99#endif
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index c5bc2821d991..d3d0ff745e84 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -1,86 +1,30 @@
1config 85xx 1menu "Platform support"
2 bool 2 depends on PPC_85xx
3 depends on E500
4 default y
5
6config PPC_INDIRECT_PCI_BE
7 bool
8 depends on 85xx
9 default y
10
11menu "Freescale 85xx options"
12 depends on E500
13 3
14choice 4choice
15 prompt "Machine Type" 5 prompt "Machine Type"
16 depends on 85xx
17 default MPC8540_ADS 6 default MPC8540_ADS
18 7
19config MPC8540_ADS 8config MPC8540_ADS
20 bool "Freescale MPC8540 ADS" 9 bool "Freescale MPC8540 ADS"
21 help 10 help
22 This option enables support for the MPC 8540 ADS evaluation board. 11 This option enables support for the MPC 8540 ADS board
23
24config MPC8548_CDS
25 bool "Freescale MPC8548 CDS"
26 help
27 This option enablese support for the MPC8548 CDS evaluation board.
28
29config MPC8555_CDS
30 bool "Freescale MPC8555 CDS"
31 help
32 This option enablese support for the MPC8555 CDS evaluation board.
33
34config MPC8560_ADS
35 bool "Freescale MPC8560 ADS"
36 help
37 This option enables support for the MPC 8560 ADS evaluation board.
38
39config SBC8560
40 bool "WindRiver PowerQUICC III SBC8560"
41 help
42 This option enables support for the WindRiver PowerQUICC III
43 SBC8560 board.
44
45config STX_GP3
46 bool "Silicon Turnkey Express GP3"
47 help
48 This option enables support for the Silicon Turnkey Express GP3
49 board.
50 12
51endchoice 13endchoice
52 14
53# It's often necessary to know the specific 85xx processor type.
54# Fortunately, it is implied (so far) from the board type, so we
55# don't need to ask more redundant questions.
56config MPC8540 15config MPC8540
57 bool 16 bool
58 depends on MPC8540_ADS 17 select PPC_UDBG_16550
59 default y 18 select PPC_INDIRECT_PCI
60 19 default y if MPC8540_ADS
61config MPC8548
62 bool
63 depends on MPC8548_CDS
64 default y
65 20
66config MPC8555 21config PPC_INDIRECT_PCI_BE
67 bool
68 depends on MPC8555_CDS
69 default y
70
71config MPC8560
72 bool 22 bool
73 depends on SBC8560 || MPC8560_ADS || STX_GP3 23 depends on PPC_85xx
74 default y
75
76config 85xx_PCI2
77 bool "Supprt for 2nd PCI host controller"
78 depends on MPC8555_CDS
79 default y 24 default y
80 25
81config PPC_GEN550 26config MPIC
82 bool 27 bool
83 depends on MPC8540 || SBC8560 || MPC8555
84 default y 28 default y
85 29
86endmenu 30endmenu
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 6407197ffd89..ffc4139cb214 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -1 +1,5 @@
1# empty makefile so make clean works 1#
2# Makefile for the PowerPC 85xx linux kernel.
3#
4obj-$(CONFIG_PPC_85xx) += misc.o pci.o
5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c
new file mode 100644
index 000000000000..26c5e822c7c8
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/misc.c
@@ -0,0 +1,31 @@
1/*
2 * MPC85xx generic code.
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13#include <linux/irq.h>
14#include <linux/module.h>
15#include <asm/irq.h>
16
17extern void abort(void);
18
19void mpc85xx_restart(char *cmd)
20{
21 local_irq_disable();
22 abort();
23}
24
25/* For now this is a pass through */
26phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
27{
28 return addr;
29};
30
31EXPORT_SYMBOL(fixup_bigphys_addr);
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h
new file mode 100644
index 000000000000..f770cadb2080
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h
@@ -0,0 +1,36 @@
1/*
2 * arch/ppc/platforms/85xx/mpc8540_ads.h
3 *
4 * MPC8540ADS board definitions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2004 Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#ifndef __MACH_MPC8540ADS_H__
18#define __MACH_MPC8540ADS_H__
19
20#include <linux/config.h>
21#include <linux/initrd.h>
22
23#define BOARD_CCSRBAR ((uint)0xe0000000)
24#define BCSR_ADDR ((uint)0xf8000000)
25#define BCSR_SIZE ((uint)(32 * 1024))
26
27/* PCI interrupt controller */
28#define PIRQA MPC85xx_IRQ_EXT1
29#define PIRQB MPC85xx_IRQ_EXT2
30#define PIRQC MPC85xx_IRQ_EXT3
31#define PIRQD MPC85xx_IRQ_EXT4
32
33/* Offset of CPM register space */
34#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
35
36#endif /* __MACH_MPC8540ADS_H__ */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
new file mode 100644
index 000000000000..b44db6268f3d
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -0,0 +1,18 @@
1/*
2 * arch/ppc/platforms/85xx/mpc85xx.h
3 *
4 * MPC85xx soc definitions/function decls
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2005 Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17extern void mpc85xx_restart(char *);
18extern int add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
new file mode 100644
index 000000000000..b7821dbae00d
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -0,0 +1,244 @@
1/*
2 * MPC85xx setup and early boot code plus other random bits.
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13
14#include <linux/config.h>
15#include <linux/stddef.h>
16#include <linux/kernel.h>
17#include <linux/pci.h>
18#include <linux/kdev_t.h>
19#include <linux/delay.h>
20#include <linux/seq_file.h>
21#include <linux/root_dev.h>
22
23#include <asm/system.h>
24#include <asm/time.h>
25#include <asm/machdep.h>
26#include <asm/pci-bridge.h>
27#include <asm/mpc85xx.h>
28#include <asm/prom.h>
29#include <asm/mpic.h>
30#include <mm/mmu_decl.h>
31#include <asm/udbg.h>
32
33#include <sysdev/fsl_soc.h>
34#include "mpc85xx.h"
35
36#ifndef CONFIG_PCI
37unsigned long isa_io_base = 0;
38unsigned long isa_mem_base = 0;
39#endif
40
41/*
42 * Internal interrupts are all Level Sensitive, and Positive Polarity
43 *
44 * Note: Likely, this table and the following function should be
45 * obtained and derived from the OF Device Tree.
46 */
47static u_char mpc85xx_ads_openpic_initsenses[] __initdata = {
48 MPC85XX_INTERNAL_IRQ_SENSES,
49 0x0, /* External 0: */
50#if defined(CONFIG_PCI)
51 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 0 */
52 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 1 */
53 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 2 */
54 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 4: PCI slot 3 */
55#else
56 0x0, /* External 1: */
57 0x0, /* External 2: */
58 0x0, /* External 3: */
59 0x0, /* External 4: */
60#endif
61 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */
62 0x0, /* External 6: */
63 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */
64 0x0, /* External 8: */
65 0x0, /* External 9: */
66 0x0, /* External 10: */
67 0x0, /* External 11: */
68};
69
70#ifdef CONFIG_PCI
71/*
72 * interrupt routing
73 */
74
75int
76mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
77{
78 static char pci_irq_table[][4] =
79 /*
80 * This is little evil, but works around the fact
81 * that revA boards have IDSEL starting at 18
82 * and others boards (older) start at 12
83 *
84 * PCI IDSEL/INTPIN->INTLINE
85 * A B C D
86 */
87 {
88 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */
89 {PIRQD, PIRQA, PIRQB, PIRQC},
90 {PIRQC, PIRQD, PIRQA, PIRQB},
91 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */
92 {0, 0, 0, 0}, /* -- */
93 {0, 0, 0, 0}, /* -- */
94 {0, 0, 0, 0}, /* -- */
95 {0, 0, 0, 0}, /* -- */
96 {0, 0, 0, 0}, /* -- */
97 {0, 0, 0, 0}, /* -- */
98 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */
99 {PIRQD, PIRQA, PIRQB, PIRQC},
100 {PIRQC, PIRQD, PIRQA, PIRQB},
101 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */
102 {0, 0, 0, 0}, /* -- */
103 {0, 0, 0, 0}, /* -- */
104 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */
105 {PIRQD, PIRQA, PIRQB, PIRQC},
106 {PIRQC, PIRQD, PIRQA, PIRQB},
107 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */
108 };
109
110 const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4;
111 return PCI_IRQ_TABLE_LOOKUP;
112}
113
114int
115mpc85xx_exclude_device(u_char bus, u_char devfn)
116{
117 if (bus == 0 && PCI_SLOT(devfn) == 0)
118 return PCIBIOS_DEVICE_NOT_FOUND;
119 else
120 return PCIBIOS_SUCCESSFUL;
121}
122
123#endif /* CONFIG_PCI */
124
125
126void __init mpc85xx_ads_pic_init(void)
127{
128 struct mpic *mpic1;
129 phys_addr_t OpenPIC_PAddr;
130
131 /* Determine the Physical Address of the OpenPIC regs */
132 OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET;
133
134 mpic1 = mpic_alloc(OpenPIC_PAddr,
135 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
136 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250,
137 mpc85xx_ads_openpic_initsenses,
138 sizeof(mpc85xx_ads_openpic_initsenses),
139 " OpenPIC ");
140 BUG_ON(mpic1 == NULL);
141 mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200);
142 mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280);
143 mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300);
144 mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380);
145 mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400);
146 mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480);
147 mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500);
148 mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580);
149
150 /* dummy mappings to get to 48 */
151 mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600);
152 mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680);
153 mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700);
154 mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780);
155
156 /* External ints */
157 mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000);
158 mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080);
159 mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100);
160 mpic_init(mpic1);
161}
162
163/*
164 * Setup the architecture
165 */
166static void __init mpc85xx_ads_setup_arch(void)
167{
168 struct device_node *cpu;
169 struct device_node *np;
170
171 if (ppc_md.progress)
172 ppc_md.progress("mpc85xx_ads_setup_arch()", 0);
173
174 cpu = of_find_node_by_type(NULL, "cpu");
175 if (cpu != 0) {
176 unsigned int *fp;
177
178 fp = (int *)get_property(cpu, "clock-frequency", NULL);
179 if (fp != 0)
180 loops_per_jiffy = *fp / HZ;
181 else
182 loops_per_jiffy = 50000000 / HZ;
183 of_node_put(cpu);
184 }
185
186#ifdef CONFIG_PCI
187 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
188 add_bridge(np);
189
190 ppc_md.pci_swizzle = common_swizzle;
191 ppc_md.pci_map_irq = mpc85xx_map_irq;
192 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
193#endif
194
195#ifdef CONFIG_ROOT_NFS
196 ROOT_DEV = Root_NFS;
197#else
198 ROOT_DEV = Root_HDA1;
199#endif
200}
201
202void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
203{
204 uint pvid, svid, phid1;
205 uint memsize = total_memory;
206
207 pvid = mfspr(SPRN_PVR);
208 svid = mfspr(SPRN_SVR);
209
210 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
211 seq_printf(m, "Machine\t\t: mpc85xx\n");
212 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
213 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
214
215 /* Display cpu Pll setting */
216 phid1 = mfspr(SPRN_HID1);
217 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
218
219 /* Display the amount of memory */
220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
221}
222
223void __init platform_init(void)
224{
225 ppc_md.setup_arch = mpc85xx_ads_setup_arch;
226 ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
227
228 ppc_md.init_IRQ = mpc85xx_ads_pic_init;
229 ppc_md.get_irq = mpic_get_irq;
230
231 ppc_md.restart = mpc85xx_restart;
232 ppc_md.power_off = NULL;
233 ppc_md.halt = NULL;
234
235 ppc_md.time_init = NULL;
236 ppc_md.set_rtc_time = NULL;
237 ppc_md.get_rtc_time = NULL;
238 ppc_md.calibrate_decr = generic_calibrate_decr;
239
240 ppc_md.progress = udbg_progress;
241
242 if (ppc_md.progress)
243 ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
244}
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
new file mode 100644
index 000000000000..bad290110ed1
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -0,0 +1,96 @@
1/*
2 * FSL SoC setup code
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#include <linux/config.h>
13#include <linux/stddef.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/errno.h>
17#include <linux/pci.h>
18#include <linux/delay.h>
19#include <linux/irq.h>
20#include <linux/module.h>
21
22#include <asm/system.h>
23#include <asm/atomic.h>
24#include <asm/io.h>
25#include <asm/pci-bridge.h>
26#include <asm/prom.h>
27#include <sysdev/fsl_soc.h>
28
29#undef DEBUG
30
31#ifdef DEBUG
32#define DBG(x...) printk(x)
33#else
34#define DBG(x...)
35#endif
36
37int mpc85xx_pci2_busno = 0;
38
39#ifdef CONFIG_PCI
40int __init add_bridge(struct device_node *dev)
41{
42 int len;
43 struct pci_controller *hose;
44 struct resource rsrc;
45 int *bus_range;
46 int primary = 1, has_address = 0;
47 phys_addr_t immr = get_immrbase();
48
49 DBG("Adding PCI host bridge %s\n", dev->full_name);
50
51 /* Fetch host bridge registers address */
52 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
53
54 /* Get bus range if any */
55 bus_range = (int *) get_property(dev, "bus-range", &len);
56 if (bus_range == NULL || len < 2 * sizeof(int)) {
57 printk(KERN_WARNING "Can't get bus-range for %s, assume"
58 " bus 0\n", dev->full_name);
59 }
60
61 hose = pcibios_alloc_controller();
62 if (!hose)
63 return -ENOMEM;
64 hose->arch_data = dev;
65 hose->set_cfg_type = 1;
66
67 hose->first_busno = bus_range ? bus_range[0] : 0;
68 hose->last_busno = bus_range ? bus_range[1] : 0xff;
69
70 /* PCI 1 */
71 if ((rsrc.start & 0xfffff) == 0x8000) {
72 setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004);
73 }
74 /* PCI 2 */
75 if ((rsrc.start & 0xfffff) == 0x9000) {
76 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
77 primary = 0;
78 hose->bus_offset = hose->first_busno;
79 mpc85xx_pci2_busno = hose->first_busno;
80 }
81
82 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. "
83 "Firmware bus number: %d->%d\n",
84 rsrc.start, hose->first_busno, hose->last_busno);
85
86 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
87 hose, hose->cfg_addr, hose->cfg_data);
88
89 /* Interpret the "ranges" property */
90 /* This also maps the I/O region and sets isa_io/mem_base */
91 pci_process_bridge_OF_ranges(hose, dev, primary);
92
93 return 0;
94}
95
96#endif
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 04073fd987ec..c4f6b0d2d140 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -8,7 +8,7 @@ endif
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_PPC_83xx) += 83xx/
11obj-$(CONFIG_85xx) += 85xx/ 11obj-$(CONFIG_PPC_85xx) += 85xx/
12obj-$(CONFIG_PPC_PSERIES) += pseries/ 12obj-$(CONFIG_PPC_PSERIES) += pseries/
13obj-$(CONFIG_PPC_ISERIES) += iseries/ 13obj-$(CONFIG_PPC_ISERIES) += iseries/
14obj-$(CONFIG_PPC_MAPLE) += maple/ 14obj-$(CONFIG_PPC_MAPLE) += maple/
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index b33a4443f5a9..fec8e65b36ea 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -115,7 +115,7 @@ static void __init cell_spuprop_present(struct device_node *spe,
115 for (pfn = start_pfn; pfn < end_pfn; pfn++) { 115 for (pfn = start_pfn; pfn < end_pfn; pfn++) {
116 struct page *page = pfn_to_page(pfn); 116 struct page *page = pfn_to_page(pfn);
117 set_page_links(page, ZONE_DMA, node_id, pfn); 117 set_page_links(page, ZONE_DMA, node_id, pfn);
118 set_page_count(page, 1); 118 init_page_count(page);
119 reset_page_mapcount(page); 119 reset_page_mapcount(page);
120 SetPageReserved(page); 120 SetPageReserved(page);
121 INIT_LIST_HEAD(&page->lru); 121 INIT_LIST_HEAD(&page->lru);
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 29c86781c493..6ad4b1a72c96 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/chrp_pegasos_eth.c
3 *
4 * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> 2 * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
5 * Thanks to : 3 * Thanks to :
6 * Dale Farnsworth <dale@farnsworth.org> 4 * Dale Farnsworth <dale@farnsworth.org>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index e1fadbf49150..8bf4307e323d 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/setup.c
3 *
4 * Copyright (C) 1995 Linus Torvalds 2 * Copyright (C) 1995 Linus Torvalds
5 * Adapted from 'alpha' version by Gary Thomas 3 * Adapted from 'alpha' version by Gary Thomas
6 * Modified by Cort Dougan (cort@cs.nmt.edu) 4 * Modified by Cort Dougan (cort@cs.nmt.edu)
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c
index 78df2e7ca88a..12c6f689b1aa 100644
--- a/arch/powerpc/platforms/chrp/time.c
+++ b/arch/powerpc/platforms/chrp/time.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/chrp_time.c
3 *
4 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 2 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
5 * 3 *
6 * Adapted for PowerPC (PReP) by Gary Thomas 4 * Adapted for PowerPC (PReP) by Gary Thomas
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index a41d8b78c0cd..d771b8ee857d 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -46,6 +46,7 @@
46#include "setup.h" 46#include "setup.h"
47 47
48extern int piranha_simulator; 48extern int piranha_simulator;
49static int mf_initialized;
49 50
50/* 51/*
51 * This is the structure layout for the Machine Facilites LPAR event 52 * This is the structure layout for the Machine Facilites LPAR event
@@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock;
143static struct pending_event *pending_event_head; 144static struct pending_event *pending_event_head;
144static struct pending_event *pending_event_tail; 145static struct pending_event *pending_event_tail;
145static struct pending_event *pending_event_avail; 146static struct pending_event *pending_event_avail;
146static struct pending_event pending_event_prealloc[16]; 147#define PENDING_EVENT_PREALLOC_LEN 16
148static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN];
147 149
148/* 150/*
149 * Put a pending event onto the available queue, so it can get reused. 151 * Put a pending event onto the available queue, so it can get reused.
@@ -597,7 +599,7 @@ void mf_power_off(void)
597 * Global kernel interface to tell the VSP object in the primary 599 * Global kernel interface to tell the VSP object in the primary
598 * partition to reboot this partition. 600 * partition to reboot this partition.
599 */ 601 */
600void mf_reboot(void) 602void mf_reboot(char *cmd)
601{ 603{
602 printk(KERN_INFO "mf.c: Preparing to bounce...\n"); 604 printk(KERN_INFO "mf.c: Preparing to bounce...\n");
603 signal_ce_msg_simple(0x4e, NULL); 605 signal_ce_msg_simple(0x4e, NULL);
@@ -625,7 +627,7 @@ void mf_display_src(u32 word)
625/* 627/*
626 * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. 628 * Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
627 */ 629 */
628void mf_display_progress(u16 value) 630static __init void mf_display_progress_src(u16 value)
629{ 631{
630 u8 ce[12]; 632 u8 ce[12];
631 u8 src[72]; 633 u8 src[72];
@@ -649,30 +651,42 @@ void mf_display_progress(u16 value)
649 * Clear the VSP control panel. Used to "erase" an SRC that was 651 * Clear the VSP control panel. Used to "erase" an SRC that was
650 * previously displayed. 652 * previously displayed.
651 */ 653 */
652void mf_clear_src(void) 654static void mf_clear_src(void)
653{ 655{
654 signal_ce_msg_simple(0x4b, NULL); 656 signal_ce_msg_simple(0x4b, NULL);
655} 657}
656 658
659void __init mf_display_progress(u16 value)
660{
661 if (piranha_simulator || !mf_initialized)
662 return;
663
664 if (0xFFFF == value)
665 mf_clear_src();
666 else
667 mf_display_progress_src(value);
668}
669
657/* 670/*
658 * Initialization code here. 671 * Initialization code here.
659 */ 672 */
660void mf_init(void) 673void __init mf_init(void)
661{ 674{
662 int i; 675 int i;
663 676
664 /* initialize */
665 spin_lock_init(&pending_event_spinlock); 677 spin_lock_init(&pending_event_spinlock);
666 for (i = 0; 678
667 i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc); 679 for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++)
668 ++i)
669 free_pending_event(&pending_event_prealloc[i]); 680 free_pending_event(&pending_event_prealloc[i]);
681
670 HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); 682 HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler);
671 683
672 /* virtual continue ack */ 684 /* virtual continue ack */
673 signal_ce_msg_simple(0x57, NULL); 685 signal_ce_msg_simple(0x57, NULL);
674 686
675 /* initialization complete */ 687 mf_initialized = 1;
688 mb();
689
676 printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " 690 printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities "
677 "initialized\n"); 691 "initialized\n");
678} 692}
@@ -692,6 +706,43 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg)
692 complete(&rtc->com); 706 complete(&rtc->com);
693} 707}
694 708
709static int mf_set_rtc(struct rtc_time *tm)
710{
711 char ce_time[12];
712 u8 day, mon, hour, min, sec, y1, y2;
713 unsigned year;
714
715 year = 1900 + tm->tm_year;
716 y1 = year / 100;
717 y2 = year % 100;
718
719 sec = tm->tm_sec;
720 min = tm->tm_min;
721 hour = tm->tm_hour;
722 day = tm->tm_mday;
723 mon = tm->tm_mon + 1;
724
725 BIN_TO_BCD(sec);
726 BIN_TO_BCD(min);
727 BIN_TO_BCD(hour);
728 BIN_TO_BCD(mon);
729 BIN_TO_BCD(day);
730 BIN_TO_BCD(y1);
731 BIN_TO_BCD(y2);
732
733 memset(ce_time, 0, sizeof(ce_time));
734 ce_time[3] = 0x41;
735 ce_time[4] = y1;
736 ce_time[5] = y2;
737 ce_time[6] = sec;
738 ce_time[7] = min;
739 ce_time[8] = hour;
740 ce_time[10] = day;
741 ce_time[11] = mon;
742
743 return signal_ce_msg(ce_time, NULL);
744}
745
695static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) 746static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm)
696{ 747{
697 tm->tm_wday = 0; 748 tm->tm_wday = 0;
@@ -747,7 +798,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm)
747 return 0; 798 return 0;
748} 799}
749 800
750int mf_get_rtc(struct rtc_time *tm) 801static int mf_get_rtc(struct rtc_time *tm)
751{ 802{
752 struct ce_msg_comp_data ce_complete; 803 struct ce_msg_comp_data ce_complete;
753 struct rtc_time_data rtc_data; 804 struct rtc_time_data rtc_data;
@@ -780,7 +831,7 @@ static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg)
780 rtc->busy = 0; 831 rtc->busy = 0;
781} 832}
782 833
783int mf_get_boot_rtc(struct rtc_time *tm) 834static int mf_get_boot_rtc(struct rtc_time *tm)
784{ 835{
785 struct ce_msg_comp_data ce_complete; 836 struct ce_msg_comp_data ce_complete;
786 struct boot_rtc_time_data rtc_data; 837 struct boot_rtc_time_data rtc_data;
@@ -802,43 +853,6 @@ int mf_get_boot_rtc(struct rtc_time *tm)
802 return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); 853 return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
803} 854}
804 855
805int mf_set_rtc(struct rtc_time *tm)
806{
807 char ce_time[12];
808 u8 day, mon, hour, min, sec, y1, y2;
809 unsigned year;
810
811 year = 1900 + tm->tm_year;
812 y1 = year / 100;
813 y2 = year % 100;
814
815 sec = tm->tm_sec;
816 min = tm->tm_min;
817 hour = tm->tm_hour;
818 day = tm->tm_mday;
819 mon = tm->tm_mon + 1;
820
821 BIN_TO_BCD(sec);
822 BIN_TO_BCD(min);
823 BIN_TO_BCD(hour);
824 BIN_TO_BCD(mon);
825 BIN_TO_BCD(day);
826 BIN_TO_BCD(y1);
827 BIN_TO_BCD(y2);
828
829 memset(ce_time, 0, sizeof(ce_time));
830 ce_time[3] = 0x41;
831 ce_time[4] = y1;
832 ce_time[5] = y2;
833 ce_time[6] = sec;
834 ce_time[7] = min;
835 ce_time[8] = hour;
836 ce_time[10] = day;
837 ce_time[11] = mon;
838
839 return signal_ce_msg(ce_time, NULL);
840}
841
842#ifdef CONFIG_PROC_FS 856#ifdef CONFIG_PROC_FS
843 857
844static int proc_mf_dump_cmdline(char *page, char **start, off_t off, 858static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 3ecc4a652d82..fa4550611c11 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -50,6 +50,7 @@
50#include <asm/iseries/hv_call_xm.h> 50#include <asm/iseries/hv_call_xm.h>
51#include <asm/iseries/it_lp_queue.h> 51#include <asm/iseries/it_lp_queue.h>
52#include <asm/iseries/mf.h> 52#include <asm/iseries/mf.h>
53#include <asm/iseries/it_exp_vpd_panel.h>
53#include <asm/iseries/hv_lp_event.h> 54#include <asm/iseries/hv_lp_event.h>
54#include <asm/iseries/lpar_map.h> 55#include <asm/iseries/lpar_map.h>
55#include <asm/udbg.h> 56#include <asm/udbg.h>
@@ -89,8 +90,6 @@ extern unsigned long embedded_sysmap_end;
89extern unsigned long iSeries_recal_tb; 90extern unsigned long iSeries_recal_tb;
90extern unsigned long iSeries_recal_titan; 91extern unsigned long iSeries_recal_titan;
91 92
92static int mf_initialized;
93
94static unsigned long cmd_mem_limit; 93static unsigned long cmd_mem_limit;
95 94
96struct MemoryBlock { 95struct MemoryBlock {
@@ -303,8 +302,6 @@ static void __init iSeries_init_early(void)
303{ 302{
304 DBG(" -> iSeries_init_early()\n"); 303 DBG(" -> iSeries_init_early()\n");
305 304
306 ppc64_firmware_features = FW_FEATURE_ISERIES;
307
308 ppc64_interrupt_controller = IC_ISERIES; 305 ppc64_interrupt_controller = IC_ISERIES;
309 306
310#if defined(CONFIG_BLK_DEV_INITRD) 307#if defined(CONFIG_BLK_DEV_INITRD)
@@ -349,8 +346,6 @@ static void __init iSeries_init_early(void)
349 HvCallEvent_setLpEventQueueInterruptProc(0, 0); 346 HvCallEvent_setLpEventQueueInterruptProc(0, 0);
350 347
351 mf_init(); 348 mf_init();
352 mf_initialized = 1;
353 mb();
354 349
355 /* If we were passed an initrd, set the ROOT_DEV properly if the values 350 /* If we were passed an initrd, set the ROOT_DEV properly if the values
356 * look sensible. If not, clear initrd reference. 351 * look sensible. If not, clear initrd reference.
@@ -560,39 +555,10 @@ static void iSeries_show_cpuinfo(struct seq_file *m)
560 seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); 555 seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n");
561} 556}
562 557
563/*
564 * Document me.
565 */
566static void iSeries_restart(char *cmd)
567{
568 mf_reboot();
569}
570
571/*
572 * Document me.
573 */
574static void iSeries_power_off(void)
575{
576 mf_power_off();
577}
578
579/*
580 * Document me.
581 */
582static void iSeries_halt(void)
583{
584 mf_power_off();
585}
586
587static void __init iSeries_progress(char * st, unsigned short code) 558static void __init iSeries_progress(char * st, unsigned short code)
588{ 559{
589 printk("Progress: [%04x] - %s\n", (unsigned)code, st); 560 printk("Progress: [%04x] - %s\n", (unsigned)code, st);
590 if (!piranha_simulator && mf_initialized) { 561 mf_display_progress(code);
591 if (code != 0xffff)
592 mf_display_progress(code);
593 else
594 mf_clear_src();
595 }
596} 562}
597 563
598static void __init iSeries_fixup_klimit(void) 564static void __init iSeries_fixup_klimit(void)
@@ -711,7 +677,13 @@ void __init iSeries_init_IRQ(void) { }
711 677
712static int __init iseries_probe(int platform) 678static int __init iseries_probe(int platform)
713{ 679{
714 return PLATFORM_ISERIES_LPAR == platform; 680 if (PLATFORM_ISERIES_LPAR != platform)
681 return 0;
682
683 ppc64_firmware_features |= FW_FEATURE_ISERIES;
684 ppc64_firmware_features |= FW_FEATURE_LPAR;
685
686 return 1;
715} 687}
716 688
717struct machdep_calls __initdata iseries_md = { 689struct machdep_calls __initdata iseries_md = {
@@ -721,9 +693,9 @@ struct machdep_calls __initdata iseries_md = {
721 .get_irq = iSeries_get_irq, 693 .get_irq = iSeries_get_irq,
722 .init_early = iSeries_init_early, 694 .init_early = iSeries_init_early,
723 .pcibios_fixup = iSeries_pci_final_fixup, 695 .pcibios_fixup = iSeries_pci_final_fixup,
724 .restart = iSeries_restart, 696 .restart = mf_reboot,
725 .power_off = iSeries_power_off, 697 .power_off = mf_power_off,
726 .halt = iSeries_halt, 698 .halt = mf_power_off,
727 .get_boot_time = iSeries_get_boot_time, 699 .get_boot_time = iSeries_get_boot_time,
728 .set_rtc_time = iSeries_set_rtc_time, 700 .set_rtc_time = iSeries_set_rtc_time,
729 .get_rtc_time = iSeries_get_rtc_time, 701 .get_rtc_time = iSeries_get_rtc_time,
@@ -917,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt)
917 dt_end_node(dt); 889 dt_end_node(dt);
918} 890}
919 891
892void dt_model(struct iseries_flat_dt *dt)
893{
894 char buf[16] = "IBM,";
895
896 /* "IBM," + mfgId[2:3] + systemSerial[1:5] */
897 strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2);
898 strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5);
899 buf[11] = '\0';
900 dt_prop_str(dt, "system-id", buf);
901
902 /* "IBM," + machineType[0:4] */
903 strne2a(buf + 4, xItExtVpdPanel.machineType, 4);
904 buf[8] = '\0';
905 dt_prop_str(dt, "model", buf);
906
907 dt_prop_str(dt, "compatible", "IBM,iSeries");
908}
909
920void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) 910void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
921{ 911{
922 u64 tmp[2]; 912 u64 tmp[2];
@@ -927,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
927 917
928 dt_prop_u32(dt, "#address-cells", 2); 918 dt_prop_u32(dt, "#address-cells", 2);
929 dt_prop_u32(dt, "#size-cells", 2); 919 dt_prop_u32(dt, "#size-cells", 2);
920 dt_model(dt);
930 921
931 /* /memory */ 922 /* /memory */
932 dt_start_node(dt, "memory@0"); 923 dt_start_node(dt, "memory@0");
@@ -940,6 +931,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
940 /* /chosen */ 931 /* /chosen */
941 dt_start_node(dt, "chosen"); 932 dt_start_node(dt, "chosen");
942 dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); 933 dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR);
934 dt_prop_str(dt, "bootargs", cmd_line);
943 if (cmd_mem_limit) 935 if (cmd_mem_limit)
944 dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); 936 dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit);
945 dt_end_node(dt); 937 dt_end_node(dt);
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c
index 50bc4eb85353..5e6981d17379 100644
--- a/arch/powerpc/platforms/maple/time.c
+++ b/arch/powerpc/platforms/maple/time.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/maple_time.c
3 *
4 * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), 2 * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org),
5 * IBM Corp. 3 * IBM Corp.
6 * 4 *
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 56fd4e05fede..cfd6527a0d7e 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/pmac_cpufreq.c
3 *
4 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> 2 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> 3 * Copyright (C) 2004 John Steele Scott <toojays@toojays.net>
6 * 4 *
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 34714d3ea69a..e49eddd5042d 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/pmac_feature.c
3 *
4 * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) 2 * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au)
5 * Ben. Herrenschmidt (benh@kernel.crashing.org) 3 * Ben. Herrenschmidt (benh@kernel.crashing.org)
6 * 4 *
@@ -2491,9 +2489,7 @@ found:
2491 pmac_mb.model_id = PMAC_TYPE_COMET; 2489 pmac_mb.model_id = PMAC_TYPE_COMET;
2492 iounmap(mach_id_ptr); 2490 iounmap(mach_id_ptr);
2493 } 2491 }
2494#endif /* CONFIG_POWER4 */
2495 2492
2496#ifdef CONFIG_6xx
2497 /* Set default value of powersave_nap on machines that support it. 2493 /* Set default value of powersave_nap on machines that support it.
2498 * It appears that uninorth rev 3 has a problem with it, we don't 2494 * It appears that uninorth rev 3 has a problem with it, we don't
2499 * enable it on those. In theory, the flush-on-lock property is 2495 * enable it on those. In theory, the flush-on-lock property is
@@ -2522,10 +2518,11 @@ found:
2522 * NAP mode 2518 * NAP mode
2523 */ 2519 */
2524 powersave_lowspeed = 1; 2520 powersave_lowspeed = 1;
2525#endif /* CONFIG_6xx */ 2521
2526#ifdef CONFIG_POWER4 2522#else /* CONFIG_POWER4 */
2527 powersave_nap = 1; 2523 powersave_nap = 1;
2528#endif 2524#endif /* CONFIG_POWER4 */
2525
2529 /* Check for "mobile" machine */ 2526 /* Check for "mobile" machine */
2530 if (model && (strncmp(model, "PowerBook", 9) == 0 2527 if (model && (strncmp(model, "PowerBook", 9) == 0
2531 || strncmp(model, "iBook", 5) == 0)) 2528 || strncmp(model, "iBook", 5) == 0))
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c
index 3ebd045a3350..5fd28995c74c 100644
--- a/arch/powerpc/platforms/powermac/nvram.c
+++ b/arch/powerpc/platforms/powermac/nvram.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/platforms/pmac_nvram.c
3 *
4 * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) 2 * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org)
5 * 3 *
6 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 4ffd2a9832a0..9b7150f10414 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -9,7 +9,12 @@
9#include <asm/pmac_feature.h> 9#include <asm/pmac_feature.h>
10#include <asm/pmac_pfunc.h> 10#include <asm/pmac_pfunc.h>
11 11
12#undef DEBUG
13#ifdef DEBUG
12#define DBG(fmt...) printk(fmt) 14#define DBG(fmt...) printk(fmt)
15#else
16#define DBG(fmt...)
17#endif
13 18
14static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs) 19static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs)
15{ 20{
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 356a739e52b2..4baa75b1d36f 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -20,7 +20,13 @@
20#define LOG_PARSE(fmt...) 20#define LOG_PARSE(fmt...)
21#define LOG_ERROR(fmt...) printk(fmt) 21#define LOG_ERROR(fmt...) printk(fmt)
22#define LOG_BLOB(t,b,c) 22#define LOG_BLOB(t,b,c)
23
24#undef DEBUG
25#ifdef DEBUG
23#define DBG(fmt...) printk(fmt) 26#define DBG(fmt...) printk(fmt)
27#else
28#define DBG(fmt...)
29#endif
24 30
25/* Command numbers */ 31/* Command numbers */
26#define PMF_CMD_LIST 0 32#define PMF_CMD_LIST 0
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 1955462f4082..385aab90c4d2 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -86,11 +86,10 @@ int ppc_override_l2cr = 0;
86int ppc_override_l2cr_value; 86int ppc_override_l2cr_value;
87int has_l2cache = 0; 87int has_l2cache = 0;
88 88
89int pmac_newworld = 1; 89int pmac_newworld;
90 90
91static int current_root_goodness = -1; 91static int current_root_goodness = -1;
92 92
93extern int pmac_newworld;
94extern struct machdep_calls pmac_md; 93extern struct machdep_calls pmac_md;
95 94
96#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ 95#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
@@ -308,9 +307,10 @@ static void __init pmac_setup_arch(void)
308 for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) 307 for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
309 if (get_property(ic, "interrupt-controller", NULL)) 308 if (get_property(ic, "interrupt-controller", NULL))
310 break; 309 break;
311 pmac_newworld = (ic != NULL); 310 if (ic) {
312 if (ic) 311 pmac_newworld = 1;
313 of_node_put(ic); 312 of_node_put(ic);
313 }
314 314
315 /* Lookup PCI hosts */ 315 /* Lookup PCI hosts */
316 pmac_pci_init(); 316 pmac_pci_init();
@@ -621,10 +621,6 @@ static void __init pmac_init_early(void)
621 /* Probe motherboard chipset */ 621 /* Probe motherboard chipset */
622 pmac_feature_init(); 622 pmac_feature_init();
623 623
624 /* We can NAP */
625 powersave_nap = 1;
626 printk(KERN_INFO "Using native/NAP idle loop\n");
627
628 /* Initialize debug stuff */ 624 /* Initialize debug stuff */
629 udbg_scc_init(!!strstr(cmd_line, "sccdbg")); 625 udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
630 udbg_adb_init(!!strstr(cmd_line, "btextdbg")); 626 udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 0df2cdcd805c..6d64a9bf3474 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -435,7 +435,7 @@ struct smp_ops_t psurge_smp_ops = {
435 */ 435 */
436 436
437static void (*pmac_tb_freeze)(int freeze); 437static void (*pmac_tb_freeze)(int freeze);
438static unsigned long timebase; 438static u64 timebase;
439static int tb_req; 439static int tb_req;
440 440
441static void smp_core99_give_timebase(void) 441static void smp_core99_give_timebase(void)
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 4e5c8f8d869d..a57032cf6f1b 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -19,7 +19,7 @@ config SCANLOG
19 depends on RTAS_PROC && PPC_PSERIES 19 depends on RTAS_PROC && PPC_PSERIES
20 20
21config LPARCFG 21config LPARCFG
22 tristate "LPAR Configuration Data" 22 bool "LPAR Configuration Data"
23 depends on PPC_PSERIES || PPC_ISERIES 23 depends on PPC_PSERIES || PPC_ISERIES
24 help 24 help
25 Provide system capacity information via human readable 25 Provide system capacity information via human readable
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 61616d144072..930898635c9f 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -1,5 +1,6 @@
1obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ 1obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \
2 setup.o iommu.o ras.o rtasd.o pci_dlpar.o 2 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
3 firmware.o
3obj-$(CONFIG_SMP) += smp.o 4obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_IBMVIO) += vio.o 5obj-$(CONFIG_IBMVIO) += vio.o
5obj-$(CONFIG_XICS) += xics.o 6obj-$(CONFIG_XICS) += xics.o
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 83578313ee7e..2ab9dcdfb415 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -893,6 +893,20 @@ void eeh_add_device_tree_early(struct device_node *dn)
893} 893}
894EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); 894EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
895 895
896void eeh_add_device_tree_late(struct pci_bus *bus)
897{
898 struct pci_dev *dev;
899
900 list_for_each_entry(dev, &bus->devices, bus_list) {
901 eeh_add_device_late(dev);
902 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
903 struct pci_bus *subbus = dev->subordinate;
904 if (subbus)
905 eeh_add_device_tree_late(subbus);
906 }
907 }
908}
909
896/** 910/**
897 * eeh_add_device_late - perform EEH initialization for the indicated pci device 911 * eeh_add_device_late - perform EEH initialization for the indicated pci device
898 * @dev: pci device for which to set up EEH 912 * @dev: pci device for which to set up EEH
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index e3cbba49fd6e..b811d5ff92fe 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -37,7 +37,7 @@
37 37
38static inline const char * pcid_name (struct pci_dev *pdev) 38static inline const char * pcid_name (struct pci_dev *pdev)
39{ 39{
40 if (pdev->dev.driver) 40 if (pdev && pdev->dev.driver)
41 return pdev->dev.driver->name; 41 return pdev->dev.driver->name;
42 return ""; 42 return "";
43} 43}
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
new file mode 100644
index 000000000000..989f4bc136cb
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -0,0 +1,103 @@
1/*
2 * pSeries firmware setup code.
3 *
4 * Portions from arch/powerpc/platforms/pseries/setup.c:
5 * Copyright (C) 1995 Linus Torvalds
6 * Adapted from 'alpha' version by Gary Thomas
7 * Modified by Cort Dougan (cort@cs.nmt.edu)
8 * Modified by PPC64 Team, IBM Corp
9 *
10 * Portions from arch/powerpc/kernel/firmware.c
11 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
12 * Modifications for ppc64:
13 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
14 * Copyright (C) 2005 Stephen Rothwell, IBM Corporation
15 *
16 * Copyright 2006 IBM Corporation.
17 *
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version
21 * 2 of the License, or (at your option) any later version.
22 */
23
24#undef DEBUG
25
26#include <asm/firmware.h>
27#include <asm/prom.h>
28
29#ifdef DEBUG
30#define DBG(fmt...) udbg_printf(fmt)
31#else
32#define DBG(fmt...)
33#endif
34
35typedef struct {
36 unsigned long val;
37 char * name;
38} firmware_feature_t;
39
40static __initdata firmware_feature_t
41firmware_features_table[FIRMWARE_MAX_FEATURES] = {
42 {FW_FEATURE_PFT, "hcall-pft"},
43 {FW_FEATURE_TCE, "hcall-tce"},
44 {FW_FEATURE_SPRG0, "hcall-sprg0"},
45 {FW_FEATURE_DABR, "hcall-dabr"},
46 {FW_FEATURE_COPY, "hcall-copy"},
47 {FW_FEATURE_ASR, "hcall-asr"},
48 {FW_FEATURE_DEBUG, "hcall-debug"},
49 {FW_FEATURE_PERF, "hcall-perf"},
50 {FW_FEATURE_DUMP, "hcall-dump"},
51 {FW_FEATURE_INTERRUPT, "hcall-interrupt"},
52 {FW_FEATURE_MIGRATE, "hcall-migrate"},
53 {FW_FEATURE_PERFMON, "hcall-perfmon"},
54 {FW_FEATURE_CRQ, "hcall-crq"},
55 {FW_FEATURE_VIO, "hcall-vio"},
56 {FW_FEATURE_RDMA, "hcall-rdma"},
57 {FW_FEATURE_LLAN, "hcall-lLAN"},
58 {FW_FEATURE_BULK, "hcall-bulk"},
59 {FW_FEATURE_XDABR, "hcall-xdabr"},
60 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
61 {FW_FEATURE_SPLPAR, "hcall-splpar"},
62};
63
64/* Build up the firmware features bitmask using the contents of
65 * device-tree/ibm,hypertas-functions. Ultimately this functionality may
66 * be moved into prom.c prom_init().
67 */
68void __init fw_feature_init(void)
69{
70 struct device_node *dn;
71 char *hypertas, *s;
72 int len, i;
73
74 DBG(" -> fw_feature_init()\n");
75
76 dn = of_find_node_by_path("/rtas");
77 if (dn == NULL) {
78 printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
79 goto out;
80 }
81
82 hypertas = get_property(dn, "ibm,hypertas-functions", &len);
83 if (hypertas == NULL)
84 goto out;
85
86 for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
87 for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
88 /* check value against table of strings */
89 if (!firmware_features_table[i].name ||
90 strcmp(firmware_features_table[i].name, s))
91 continue;
92
93 /* we have a match */
94 ppc64_firmware_features |=
95 firmware_features_table[i].val;
96 break;
97 }
98 }
99
100out:
101 of_node_put(dn);
102 DBG(" <- fw_feature_init()\n");
103}
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h
new file mode 100644
index 000000000000..714f56f55362
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/firmware.h
@@ -0,0 +1,17 @@
1/*
2 * Copyright 2006 IBM Corporation.
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
10#ifndef _PSERIES_FIRMWARE_H
11#define _PSERIES_FIRMWARE_H
12
13#include <asm/firmware.h>
14
15extern void __init fw_feature_init(void);
16
17#endif /* _PSERIES_FIRMWARE_H */
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index 176e8da76466..db7c19fe9297 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/pSeries_hvCall.S
3 *
4 * This file contains the generic code to perform a call to the 2 * This file contains the generic code to perform a call to the
5 * pSeries LPAR hypervisor. 3 * pSeries LPAR hypervisor.
6 * NOTE: this file will go away when we move to inline this work. 4 * NOTE: this file will go away when we move to inline this work.
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 48cfbfc43f99..2643078433f0 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/pSeries_iommu.c
3 *
4 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
5 * 3 *
6 * Rewrite, cleanup: 4 * Rewrite, cleanup:
@@ -582,7 +580,7 @@ void iommu_init_early_pSeries(void)
582 return; 580 return;
583 } 581 }
584 582
585 if (platform_is_lpar()) { 583 if (firmware_has_feature(FW_FEATURE_LPAR)) {
586 if (firmware_has_feature(FW_FEATURE_MULTITCE)) { 584 if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
587 ppc_md.tce_build = tce_buildmulti_pSeriesLP; 585 ppc_md.tce_build = tce_buildmulti_pSeriesLP;
588 ppc_md.tce_free = tce_freemulti_pSeriesLP; 586 ppc_md.tce_free = tce_freemulti_pSeriesLP;
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 999a9620b5ce..946ad59e3352 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc64/kernel/pSeries_pci.c
3 *
4 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
5 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM 3 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
6 * 4 *
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index bdaa8aabdaa6..44abdeb9ca03 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -27,6 +27,7 @@
27 27
28#include <linux/pci.h> 28#include <linux/pci.h>
29#include <asm/pci-bridge.h> 29#include <asm/pci-bridge.h>
30#include <asm/ppc-pci.h>
30 31
31static struct pci_bus * 32static struct pci_bus *
32find_bus_among_children(struct pci_bus *bus, 33find_bus_among_children(struct pci_bus *bus,
@@ -106,6 +107,8 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
106 } 107 }
107 } 108 }
108 } 109 }
110
111 eeh_add_device_tree_late(bus);
109} 112}
110EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); 113EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
111 114
@@ -114,7 +117,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
114{ 117{
115 u8 sec_busno; 118 u8 sec_busno;
116 struct pci_bus *child_bus; 119 struct pci_bus *child_bus;
117 struct pci_dev *child_dev;
118 120
119 /* Get busno of downstream bus */ 121 /* Get busno of downstream bus */
120 pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno); 122 pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
@@ -129,10 +131,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
129 131
130 pci_scan_child_bus(child_bus); 132 pci_scan_child_bus(child_bus);
131 133
132 list_for_each_entry(child_dev, &child_bus->devices, bus_list) {
133 eeh_add_device_late(child_dev);
134 }
135
136 /* Fixup new pci devices without touching bus struct */ 134 /* Fixup new pci devices without touching bus struct */
137 pcibios_fixup_new_pci_devices(child_bus, 0); 135 pcibios_fixup_new_pci_devices(child_bus, 0);
138 136
@@ -160,18 +158,52 @@ pcibios_add_pci_devices(struct pci_bus * bus)
160 158
161 eeh_add_device_tree_early(dn); 159 eeh_add_device_tree_early(dn);
162 160
163 /* pci_scan_slot should find all children */ 161 if (_machine == PLATFORM_PSERIES_LPAR) {
164 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); 162 /* use ofdt-based probe */
165 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); 163 of_scan_bus(dn, bus);
166 if (num) { 164 if (!list_empty(&bus->devices)) {
167 pcibios_fixup_new_pci_devices(bus, 1); 165 pcibios_fixup_new_pci_devices(bus, 0);
168 pci_bus_add_devices(bus); 166 pci_bus_add_devices(bus);
169 } 167 }
168 } else {
169 /* use legacy probe */
170 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
171 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
172 if (num) {
173 pcibios_fixup_new_pci_devices(bus, 1);
174 pci_bus_add_devices(bus);
175 }
170 176
171 list_for_each_entry(dev, &bus->devices, bus_list) { 177 list_for_each_entry(dev, &bus->devices, bus_list)
172 eeh_add_device_late (dev); 178 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
173 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 179 pcibios_pci_config_bridge(dev);
174 pcibios_pci_config_bridge(dev);
175 } 180 }
176} 181}
177EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); 182EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
183
184struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
185{
186 struct pci_controller *phb;
187 int primary;
188
189 primary = list_empty(&hose_list);
190 phb = pcibios_alloc_controller(dn);
191 if (!phb)
192 return NULL;
193 setup_phb(dn, phb);
194 pci_process_bridge_OF_ranges(phb, dn, 0);
195
196 pci_setup_phb_io_dynamic(phb, primary);
197
198 pci_devs_phb_init_dynamic(phb);
199
200 if (dn->child)
201 eeh_add_device_tree_early(dn);
202
203 scan_phb(phb);
204 pcibios_fixup_new_pci_devices(phb->bus, 0);
205 pci_bus_add_devices(phb->bus);
206
207 return phb;
208}
209EXPORT_SYMBOL_GPL(init_phb_dynamic);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 9edeca83f434..44d5c7fdcd97 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -60,7 +60,6 @@
60#include <asm/time.h> 60#include <asm/time.h>
61#include <asm/nvram.h> 61#include <asm/nvram.h>
62#include "xics.h" 62#include "xics.h"
63#include <asm/firmware.h>
64#include <asm/pmc.h> 63#include <asm/pmc.h>
65#include <asm/mpic.h> 64#include <asm/mpic.h>
66#include <asm/ppc-pci.h> 65#include <asm/ppc-pci.h>
@@ -70,6 +69,7 @@
70 69
71#include "plpar_wrappers.h" 70#include "plpar_wrappers.h"
72#include "ras.h" 71#include "ras.h"
72#include "firmware.h"
73 73
74#ifdef DEBUG 74#ifdef DEBUG
75#define DBG(fmt...) udbg_printf(fmt) 75#define DBG(fmt...) udbg_printf(fmt)
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void)
246 ppc_md.idle_loop = default_idle; 246 ppc_md.idle_loop = default_idle;
247 } 247 }
248 248
249 if (platform_is_lpar()) 249 if (firmware_has_feature(FW_FEATURE_LPAR))
250 ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; 250 ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
251 else 251 else
252 ppc_md.enable_pmcs = power4_enable_pmcs; 252 ppc_md.enable_pmcs = power4_enable_pmcs;
@@ -262,53 +262,6 @@ static int __init pSeries_init_panel(void)
262} 262}
263arch_initcall(pSeries_init_panel); 263arch_initcall(pSeries_init_panel);
264 264
265
266/* Build up the ppc64_firmware_features bitmask field
267 * using contents of device-tree/ibm,hypertas-functions.
268 * Ultimately this functionality may be moved into prom.c prom_init().
269 */
270static void __init fw_feature_init(void)
271{
272 struct device_node * dn;
273 char * hypertas;
274 unsigned int len;
275
276 DBG(" -> fw_feature_init()\n");
277
278 ppc64_firmware_features = 0;
279 dn = of_find_node_by_path("/rtas");
280 if (dn == NULL) {
281 printk(KERN_ERR "WARNING ! Cannot find RTAS in device-tree !\n");
282 goto no_rtas;
283 }
284
285 hypertas = get_property(dn, "ibm,hypertas-functions", &len);
286 if (hypertas) {
287 while (len > 0){
288 int i, hypertas_len;
289 /* check value against table of strings */
290 for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
291 if ((firmware_features_table[i].name) &&
292 (strcmp(firmware_features_table[i].name,hypertas))==0) {
293 /* we have a match */
294 ppc64_firmware_features |=
295 (firmware_features_table[i].val);
296 break;
297 }
298 }
299 hypertas_len = strlen(hypertas);
300 len -= hypertas_len +1;
301 hypertas+= hypertas_len +1;
302 }
303 }
304
305 of_node_put(dn);
306no_rtas:
307
308 DBG(" <- fw_feature_init()\n");
309}
310
311
312static void __init pSeries_discover_pic(void) 265static void __init pSeries_discover_pic(void)
313{ 266{
314 struct device_node *np; 267 struct device_node *np;
@@ -367,21 +320,16 @@ static int pseries_set_xdabr(unsigned long dabr)
367 */ 320 */
368static void __init pSeries_init_early(void) 321static void __init pSeries_init_early(void)
369{ 322{
370 int iommu_off = 0;
371
372 DBG(" -> pSeries_init_early()\n"); 323 DBG(" -> pSeries_init_early()\n");
373 324
374 fw_feature_init(); 325 fw_feature_init();
375 326
376 if (platform_is_lpar()) 327 if (firmware_has_feature(FW_FEATURE_LPAR))
377 hpte_init_lpar(); 328 hpte_init_lpar();
378 else { 329 else
379 hpte_init_native(); 330 hpte_init_native();
380 iommu_off = (of_chosen &&
381 get_property(of_chosen, "linux,iommu-off", NULL));
382 }
383 331
384 if (platform_is_lpar()) 332 if (firmware_has_feature(FW_FEATURE_LPAR))
385 find_udbg_vterm(); 333 find_udbg_vterm();
386 334
387 if (firmware_has_feature(FW_FEATURE_DABR)) 335 if (firmware_has_feature(FW_FEATURE_DABR))
@@ -437,6 +385,9 @@ static int __init pSeries_probe(int platform)
437 * it here ... 385 * it here ...
438 */ 386 */
439 387
388 if (platform == PLATFORM_PSERIES_LPAR)
389 ppc64_firmware_features |= FW_FEATURE_LPAR;
390
440 return 1; 391 return 1;
441} 392}
442 393
@@ -576,7 +527,7 @@ static void pseries_shared_idle(void)
576 527
577static int pSeries_pci_probe_mode(struct pci_bus *bus) 528static int pSeries_pci_probe_mode(struct pci_bus *bus)
578{ 529{
579 if (platform_is_lpar()) 530 if (firmware_has_feature(FW_FEATURE_LPAR))
580 return PCI_PROBE_DEVTREE; 531 return PCI_PROBE_DEVTREE;
581 return PCI_PROBE_NORMAL; 532 return PCI_PROBE_NORMAL;
582} 533}
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 8d710af50756..3cf78a6cd27c 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -443,7 +443,7 @@ void __init smp_init_pSeries(void)
443 smp_ops->cpu_die = pSeries_cpu_die; 443 smp_ops->cpu_die = pSeries_cpu_die;
444 444
445 /* Processors can be added/removed only on LPAR */ 445 /* Processors can be added/removed only on LPAR */
446 if (platform_is_lpar()) 446 if (firmware_has_feature(FW_FEATURE_LPAR))
447 pSeries_reconfig_notifier_register(&pSeries_smp_nb); 447 pSeries_reconfig_notifier_register(&pSeries_smp_nb);
448#endif 448#endif
449 449
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index fd823c7c9ac8..eb86cdb9b802 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -20,6 +20,7 @@
20#include <linux/gfp.h> 20#include <linux/gfp.h>
21#include <linux/radix-tree.h> 21#include <linux/radix-tree.h>
22#include <linux/cpu.h> 22#include <linux/cpu.h>
23#include <asm/firmware.h>
23#include <asm/prom.h> 24#include <asm/prom.h>
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/pgtable.h> 26#include <asm/pgtable.h>
@@ -536,7 +537,7 @@ nextnode:
536 of_node_put(np); 537 of_node_put(np);
537 } 538 }
538 539
539 if (platform_is_lpar()) 540 if (firmware_has_feature(FW_FEATURE_LPAR))
540 ops = &pSeriesLP_ops; 541 ops = &pSeriesLP_ops;
541 else { 542 else {
542#ifdef CONFIG_SMP 543#ifdef CONFIG_SMP
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 6298264efe36..61d317428610 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node)
194 * prefetching into invalid pages and corrupting data 194 * prefetching into invalid pages and corrupting data
195 */ 195 */
196 tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); 196 tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE);
197 if (!tmp)
198 panic("DART: Cannot allocate spare page!");
199 dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & 197 dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) &
200 DARTMAP_RPNMASK); 198 DARTMAP_RPNMASK);
201 199
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S
index 895f10243a43..2078f39e2f17 100644
--- a/arch/powerpc/sysdev/dcr.S
+++ b/arch/powerpc/sysdev/dcr.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/syslib/dcr.S
3 *
4 * "Indirect" DCR access 2 * "Indirect" DCR access
5 * 3 *
6 * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> 4 * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net>
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 064c9de47732..ceb584682fa3 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void)
40 return immrbase; 40 return immrbase;
41 41
42 soc = of_find_node_by_type(NULL, "soc"); 42 soc = of_find_node_by_type(NULL, "soc");
43 if (soc != 0) { 43 if (soc) {
44 unsigned int size; 44 unsigned int size;
45 void *prop = get_property(soc, "reg", &size); 45 void *prop = get_property(soc, "reg", &size);
46 immrbase = of_translate_address(soc, prop); 46 immrbase = of_translate_address(soc, prop);
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void)
49 49
50 return immrbase; 50 return immrbase;
51} 51}
52EXPORT_SYMBOL(get_immrbase);
53 52
54static const char * gfar_tx_intr = "tx"; 53EXPORT_SYMBOL(get_immrbase);
55static const char * gfar_rx_intr = "rx";
56static const char * gfar_err_intr = "error";
57 54
58static int __init gfar_of_init(void) 55static int __init gfar_mdio_of_init(void)
59{ 56{
60 struct device_node *np; 57 struct device_node *np;
61 unsigned int i; 58 unsigned int i;
62 struct platform_device *mdio_dev, *gfar_dev; 59 struct platform_device *mdio_dev;
63 struct resource res; 60 struct resource res;
64 int ret; 61 int ret;
65 62
66 for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) { 63 for (np = NULL, i = 0;
64 (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
65 i++) {
67 int k; 66 int k;
68 struct device_node *child = NULL; 67 struct device_node *child = NULL;
69 struct gianfar_mdio_data mdio_data; 68 struct gianfar_mdio_data mdio_data;
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void)
73 72
74 ret = of_address_to_resource(np, 0, &res); 73 ret = of_address_to_resource(np, 0, &res);
75 if (ret) 74 if (ret)
76 goto mdio_err; 75 goto err;
77 76
78 mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1); 77 mdio_dev =
78 platform_device_register_simple("fsl-gianfar_mdio",
79 res.start, &res, 1);
79 if (IS_ERR(mdio_dev)) { 80 if (IS_ERR(mdio_dev)) {
80 ret = PTR_ERR(mdio_dev); 81 ret = PTR_ERR(mdio_dev);
81 goto mdio_err; 82 goto err;
82 } 83 }
83 84
84 for (k = 0; k < 32; k++) 85 for (k = 0; k < 32; k++)
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void)
86 87
87 while ((child = of_get_next_child(np, child)) != NULL) { 88 while ((child = of_get_next_child(np, child)) != NULL) {
88 if (child->n_intrs) { 89 if (child->n_intrs) {
89 u32 *id = (u32 *) get_property(child, "reg", NULL); 90 u32 *id =
91 (u32 *) get_property(child, "reg", NULL);
90 mdio_data.irq[*id] = child->intrs[0].line; 92 mdio_data.irq[*id] = child->intrs[0].line;
91 } 93 }
92 } 94 }
93 95
94 ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data)); 96 ret =
97 platform_device_add_data(mdio_dev, &mdio_data,
98 sizeof(struct gianfar_mdio_data));
95 if (ret) 99 if (ret)
96 goto mdio_unreg; 100 goto unreg;
97 } 101 }
98 102
99 for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) { 103 return 0;
104
105unreg:
106 platform_device_unregister(mdio_dev);
107err:
108 return ret;
109}
110
111arch_initcall(gfar_mdio_of_init);
112
113static const char *gfar_tx_intr = "tx";
114static const char *gfar_rx_intr = "rx";
115static const char *gfar_err_intr = "error";
116
117static int __init gfar_of_init(void)
118{
119 struct device_node *np;
120 unsigned int i;
121 struct platform_device *gfar_dev;
122 struct resource res;
123 int ret;
124
125 for (np = NULL, i = 0;
126 (np = of_find_compatible_node(np, "network", "gianfar")) != NULL;
127 i++) {
100 struct resource r[4]; 128 struct resource r[4];
101 struct device_node *phy, *mdio; 129 struct device_node *phy, *mdio;
102 struct gianfar_platform_data gfar_data; 130 struct gianfar_platform_data gfar_data;
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void)
110 138
111 ret = of_address_to_resource(np, 0, &r[0]); 139 ret = of_address_to_resource(np, 0, &r[0]);
112 if (ret) 140 if (ret)
113 goto gfar_err; 141 goto err;
114 142
115 r[1].start = np->intrs[0].line; 143 r[1].start = np->intrs[0].line;
116 r[1].end = np->intrs[0].line; 144 r[1].end = np->intrs[0].line;
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void)
133 r[3].flags = IORESOURCE_IRQ; 161 r[3].flags = IORESOURCE_IRQ;
134 } 162 }
135 163
136 gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1); 164 gfar_dev =
165 platform_device_register_simple("fsl-gianfar", i, &r[0],
166 np->n_intrs + 1);
137 167
138 if (IS_ERR(gfar_dev)) { 168 if (IS_ERR(gfar_dev)) {
139 ret = PTR_ERR(gfar_dev); 169 ret = PTR_ERR(gfar_dev);
140 goto gfar_err; 170 goto err;
141 } 171 }
142 172
143 mac_addr = get_property(np, "address", NULL); 173 mac_addr = get_property(np, "address", NULL);
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void)
145 175
146 if (model && !strcasecmp(model, "TSEC")) 176 if (model && !strcasecmp(model, "TSEC"))
147 gfar_data.device_flags = 177 gfar_data.device_flags =
148 FSL_GIANFAR_DEV_HAS_GIGABIT | 178 FSL_GIANFAR_DEV_HAS_GIGABIT |
149 FSL_GIANFAR_DEV_HAS_COALESCE | 179 FSL_GIANFAR_DEV_HAS_COALESCE |
150 FSL_GIANFAR_DEV_HAS_RMON | 180 FSL_GIANFAR_DEV_HAS_RMON |
151 FSL_GIANFAR_DEV_HAS_MULTI_INTR; 181 FSL_GIANFAR_DEV_HAS_MULTI_INTR;
152 if (model && !strcasecmp(model, "eTSEC")) 182 if (model && !strcasecmp(model, "eTSEC"))
153 gfar_data.device_flags = 183 gfar_data.device_flags =
154 FSL_GIANFAR_DEV_HAS_GIGABIT | 184 FSL_GIANFAR_DEV_HAS_GIGABIT |
155 FSL_GIANFAR_DEV_HAS_COALESCE | 185 FSL_GIANFAR_DEV_HAS_COALESCE |
156 FSL_GIANFAR_DEV_HAS_RMON | 186 FSL_GIANFAR_DEV_HAS_RMON |
157 FSL_GIANFAR_DEV_HAS_MULTI_INTR | 187 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
158 FSL_GIANFAR_DEV_HAS_CSUM | 188 FSL_GIANFAR_DEV_HAS_CSUM |
159 FSL_GIANFAR_DEV_HAS_VLAN | 189 FSL_GIANFAR_DEV_HAS_VLAN |
160 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; 190 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
161 191
162 ph = (phandle *) get_property(np, "phy-handle", NULL); 192 ph = (phandle *) get_property(np, "phy-handle", NULL);
163 phy = of_find_node_by_phandle(*ph); 193 phy = of_find_node_by_phandle(*ph);
164 194
165 if (phy == NULL) { 195 if (phy == NULL) {
166 ret = -ENODEV; 196 ret = -ENODEV;
167 goto gfar_unreg; 197 goto unreg;
168 } 198 }
169 199
170 mdio = of_get_parent(phy); 200 mdio = of_get_parent(phy);
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void)
174 if (ret) { 204 if (ret) {
175 of_node_put(phy); 205 of_node_put(phy);
176 of_node_put(mdio); 206 of_node_put(mdio);
177 goto gfar_unreg; 207 goto unreg;
178 } 208 }
179 209
180 gfar_data.phy_id = *id; 210 gfar_data.phy_id = *id;
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void)
183 of_node_put(phy); 213 of_node_put(phy);
184 of_node_put(mdio); 214 of_node_put(mdio);
185 215
186 ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data)); 216 ret =
217 platform_device_add_data(gfar_dev, &gfar_data,
218 sizeof(struct
219 gianfar_platform_data));
187 if (ret) 220 if (ret)
188 goto gfar_unreg; 221 goto unreg;
189 } 222 }
190 223
191 return 0; 224 return 0;
192 225
193mdio_unreg: 226unreg:
194 platform_device_unregister(mdio_dev);
195mdio_err:
196 return ret;
197
198gfar_unreg:
199 platform_device_unregister(gfar_dev); 227 platform_device_unregister(gfar_dev);
200gfar_err: 228err:
201 return ret; 229 return ret;
202} 230}
231
203arch_initcall(gfar_of_init); 232arch_initcall(gfar_of_init);
204 233
205static int __init fsl_i2c_of_init(void) 234static int __init fsl_i2c_of_init(void)
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void)
209 struct platform_device *i2c_dev; 238 struct platform_device *i2c_dev;
210 int ret; 239 int ret;
211 240
212 for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) { 241 for (np = NULL, i = 0;
242 (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
243 i++) {
213 struct resource r[2]; 244 struct resource r[2];
214 struct fsl_i2c_platform_data i2c_data; 245 struct fsl_i2c_platform_data i2c_data;
215 unsigned char * flags = NULL; 246 unsigned char *flags = NULL;
216 247
217 memset(&r, 0, sizeof(r)); 248 memset(&r, 0, sizeof(r));
218 memset(&i2c_data, 0, sizeof(i2c_data)); 249 memset(&i2c_data, 0, sizeof(i2c_data));
219 250
220 ret = of_address_to_resource(np, 0, &r[0]); 251 ret = of_address_to_resource(np, 0, &r[0]);
221 if (ret) 252 if (ret)
222 goto i2c_err; 253 goto err;
223 254
224 r[1].start = np->intrs[0].line; 255 r[1].start = np->intrs[0].line;
225 r[1].end = np->intrs[0].line; 256 r[1].end = np->intrs[0].line;
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void)
228 i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); 259 i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2);
229 if (IS_ERR(i2c_dev)) { 260 if (IS_ERR(i2c_dev)) {
230 ret = PTR_ERR(i2c_dev); 261 ret = PTR_ERR(i2c_dev);
231 goto i2c_err; 262 goto err;
232 } 263 }
233 264
234 i2c_data.device_flags = 0; 265 i2c_data.device_flags = 0;
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void)
240 if (flags) 271 if (flags)
241 i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; 272 i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200;
242 273
243 ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data)); 274 ret =
275 platform_device_add_data(i2c_dev, &i2c_data,
276 sizeof(struct
277 fsl_i2c_platform_data));
244 if (ret) 278 if (ret)
245 goto i2c_unreg; 279 goto unreg;
246 } 280 }
247 281
248 return 0; 282 return 0;
249 283
250i2c_unreg: 284unreg:
251 platform_device_unregister(i2c_dev); 285 platform_device_unregister(i2c_dev);
252i2c_err: 286err:
253 return ret; 287 return ret;
254} 288}
289
255arch_initcall(fsl_i2c_of_init); 290arch_initcall(fsl_i2c_of_init);
256 291
257#ifdef CONFIG_PPC_83xx 292#ifdef CONFIG_PPC_83xx
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void)
267 302
268 if (!np) { 303 if (!np) {
269 ret = -ENODEV; 304 ret = -ENODEV;
270 goto mpc83xx_wdt_nodev; 305 goto nodev;
271 } 306 }
272 307
273 soc = of_find_node_by_type(NULL, "soc"); 308 soc = of_find_node_by_type(NULL, "soc");
274 309
275 if (!soc) { 310 if (!soc) {
276 ret = -ENODEV; 311 ret = -ENODEV;
277 goto mpc83xx_wdt_nosoc; 312 goto nosoc;
278 } 313 }
279 314
280 freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); 315 freq = (unsigned int *)get_property(soc, "bus-frequency", NULL);
281 if (!freq) { 316 if (!freq) {
282 ret = -ENODEV; 317 ret = -ENODEV;
283 goto mpc83xx_wdt_err; 318 goto err;
284 } 319 }
285 320
286 memset(&r, 0, sizeof(r)); 321 memset(&r, 0, sizeof(r));
287 322
288 ret = of_address_to_resource(np, 0, &r); 323 ret = of_address_to_resource(np, 0, &r);
289 if (ret) 324 if (ret)
290 goto mpc83xx_wdt_err; 325 goto err;
291 326
292 dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); 327 dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1);
293 if (IS_ERR(dev)) { 328 if (IS_ERR(dev)) {
294 ret = PTR_ERR(dev); 329 ret = PTR_ERR(dev);
295 goto mpc83xx_wdt_err; 330 goto err;
296 } 331 }
297 332
298 ret = platform_device_add_data(dev, freq, sizeof(int)); 333 ret = platform_device_add_data(dev, freq, sizeof(int));
299 if (ret) 334 if (ret)
300 goto mpc83xx_wdt_unreg; 335 goto unreg;
301 336
302 of_node_put(soc); 337 of_node_put(soc);
303 of_node_put(np); 338 of_node_put(np);
304 339
305 return 0; 340 return 0;
306 341
307mpc83xx_wdt_unreg: 342unreg:
308 platform_device_unregister(dev); 343 platform_device_unregister(dev);
309mpc83xx_wdt_err: 344err:
310 of_node_put(soc); 345 of_node_put(soc);
311mpc83xx_wdt_nosoc: 346nosoc:
312 of_node_put(np); 347 of_node_put(np);
313mpc83xx_wdt_nodev: 348nodev:
314 return ret; 349 return ret;
315} 350}
351
316arch_initcall(mpc83xx_wdt_init); 352arch_initcall(mpc83xx_wdt_init);
317#endif 353#endif
354
355static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type)
356{
357 if (!phy_type)
358 return FSL_USB2_PHY_NONE;
359 if (!strcasecmp(phy_type, "ulpi"))
360 return FSL_USB2_PHY_ULPI;
361 if (!strcasecmp(phy_type, "utmi"))
362 return FSL_USB2_PHY_UTMI;
363 if (!strcasecmp(phy_type, "utmi_wide"))
364 return FSL_USB2_PHY_UTMI_WIDE;
365 if (!strcasecmp(phy_type, "serial"))
366 return FSL_USB2_PHY_SERIAL;
367
368 return FSL_USB2_PHY_NONE;
369}
370
371static int __init fsl_usb_of_init(void)
372{
373 struct device_node *np;
374 unsigned int i;
375 struct platform_device *usb_dev;
376 int ret;
377
378 for (np = NULL, i = 0;
379 (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
380 i++) {
381 struct resource r[2];
382 struct fsl_usb2_platform_data usb_data;
383 unsigned char *prop = NULL;
384
385 memset(&r, 0, sizeof(r));
386 memset(&usb_data, 0, sizeof(usb_data));
387
388 ret = of_address_to_resource(np, 0, &r[0]);
389 if (ret)
390 goto err;
391
392 r[1].start = np->intrs[0].line;
393 r[1].end = np->intrs[0].line;
394 r[1].flags = IORESOURCE_IRQ;
395
396 usb_dev =
397 platform_device_register_simple("fsl-usb2-mph", i, r, 2);
398 if (IS_ERR(usb_dev)) {
399 ret = PTR_ERR(usb_dev);
400 goto err;
401 }
402
403 usb_dev->dev.coherent_dma_mask = 0xffffffffUL;
404 usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask;
405
406 usb_data.operating_mode = FSL_USB2_MPH_HOST;
407
408 prop = get_property(np, "port0", NULL);
409 if (prop)
410 usb_data.port_enables |= FSL_USB2_PORT0_ENABLED;
411
412 prop = get_property(np, "port1", NULL);
413 if (prop)
414 usb_data.port_enables |= FSL_USB2_PORT1_ENABLED;
415
416 prop = get_property(np, "phy_type", NULL);
417 usb_data.phy_mode = determine_usb_phy(prop);
418
419 ret =
420 platform_device_add_data(usb_dev, &usb_data,
421 sizeof(struct
422 fsl_usb2_platform_data));
423 if (ret)
424 goto unreg;
425 }
426
427 return 0;
428
429unreg:
430 platform_device_unregister(usb_dev);
431err:
432 return ret;
433}
434
435arch_initcall(fsl_usb_of_init);
436
437static int __init fsl_usb_dr_of_init(void)
438{
439 struct device_node *np;
440 unsigned int i;
441 struct platform_device *usb_dev;
442 int ret;
443
444 for (np = NULL, i = 0;
445 (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
446 i++) {
447 struct resource r[2];
448 struct fsl_usb2_platform_data usb_data;
449 unsigned char *prop = NULL;
450
451 memset(&r, 0, sizeof(r));
452 memset(&usb_data, 0, sizeof(usb_data));
453
454 ret = of_address_to_resource(np, 0, &r[0]);
455 if (ret)
456 goto err;
457
458 r[1].start = np->intrs[0].line;
459 r[1].end = np->intrs[0].line;
460 r[1].flags = IORESOURCE_IRQ;
461
462 usb_dev =
463 platform_device_register_simple("fsl-usb2-dr", i, r, 2);
464 if (IS_ERR(usb_dev)) {
465 ret = PTR_ERR(usb_dev);
466 goto err;
467 }
468
469 usb_dev->dev.coherent_dma_mask = 0xffffffffUL;
470 usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask;
471
472 usb_data.operating_mode = FSL_USB2_DR_HOST;
473
474 prop = get_property(np, "phy_type", NULL);
475 usb_data.phy_mode = determine_usb_phy(prop);
476
477 ret =
478 platform_device_add_data(usb_dev, &usb_data,
479 sizeof(struct
480 fsl_usb2_platform_data));
481 if (ret)
482 goto unreg;
483 }
484
485 return 0;
486
487unreg:
488 platform_device_unregister(usb_dev);
489err:
490 return ret;
491}
492
493arch_initcall(fsl_usb_dr_of_init);
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h
index a7ce7da8785c..a60c9d18bb7f 100644
--- a/arch/powerpc/sysdev/ipic.h
+++ b/arch/powerpc/sysdev/ipic.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/ipic.h
3 *
4 * IPIC private definitions and structure. 2 * IPIC private definitions and structure.
5 * 3 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org> 4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 7d02fa2a8990..4735b41c113c 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -191,6 +191,7 @@ Commands:\n\
191 di dump instructions\n\ 191 di dump instructions\n\
192 df dump float values\n\ 192 df dump float values\n\
193 dd dump double values\n\ 193 dd dump double values\n\
194 dr dump stream of raw bytes\n\
194 e print exception information\n\ 195 e print exception information\n\
195 f flush cache\n\ 196 f flush cache\n\
196 la lookup symbol+offset of specified address\n\ 197 la lookup symbol+offset of specified address\n\
@@ -1938,6 +1939,28 @@ bsesc(void)
1938 return c; 1939 return c;
1939} 1940}
1940 1941
1942static void xmon_rawdump (unsigned long adrs, long ndump)
1943{
1944 long n, m, r, nr;
1945 unsigned char temp[16];
1946
1947 for (n = ndump; n > 0;) {
1948 r = n < 16? n: 16;
1949 nr = mread(adrs, temp, r);
1950 adrs += nr;
1951 for (m = 0; m < r; ++m) {
1952 if (m < nr)
1953 printf("%.2x", temp[m]);
1954 else
1955 printf("%s", fault_chars[fault_type]);
1956 }
1957 n -= r;
1958 if (nr < r)
1959 break;
1960 }
1961 printf("\n");
1962}
1963
1941#define isxdigit(c) (('0' <= (c) && (c) <= '9') \ 1964#define isxdigit(c) (('0' <= (c) && (c) <= '9') \
1942 || ('a' <= (c) && (c) <= 'f') \ 1965 || ('a' <= (c) && (c) <= 'f') \
1943 || ('A' <= (c) && (c) <= 'F')) 1966 || ('A' <= (c) && (c) <= 'F'))
@@ -1960,6 +1983,13 @@ dump(void)
1960 nidump = MAX_DUMP; 1983 nidump = MAX_DUMP;
1961 adrs += ppc_inst_dump(adrs, nidump, 1); 1984 adrs += ppc_inst_dump(adrs, nidump, 1);
1962 last_cmd = "di\n"; 1985 last_cmd = "di\n";
1986 } else if (c == 'r') {
1987 scanhex(&ndump);
1988 if (ndump == 0)
1989 ndump = 64;
1990 xmon_rawdump(adrs, ndump);
1991 adrs += ndump;
1992 last_cmd = "dr\n";
1963 } else { 1993 } else {
1964 scanhex(&ndump); 1994 scanhex(&ndump);
1965 if (ndump == 0) 1995 if (ndump == 0)