aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-04 19:27:50 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-04 19:27:50 -0500
commit602d4a7e2f4b843d1a67375d4d7104073495b758 (patch)
tree0b9f184e54fa693c27bd5986c114bdcf6949f788
parent0bbacc402e67abca8794a8401c1621dc0c0202e9 (diff)
parentc51e3a417bb0f295e13a5bad86302b5212eafdf3 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge
-rw-r--r--arch/powerpc/Kconfig29
-rw-r--r--arch/powerpc/Makefile5
-rw-r--r--arch/powerpc/configs/cell_defconfig1024
-rw-r--r--arch/powerpc/configs/g5_defconfig1392
-rw-r--r--arch/powerpc/configs/iseries_defconfig998
-rw-r--r--arch/powerpc/configs/maple_defconfig1062
-rw-r--r--arch/powerpc/configs/pseries_defconfig1371
-rw-r--r--arch/powerpc/kernel/Makefile9
-rw-r--r--arch/powerpc/kernel/asm-offsets.c2
-rw-r--r--arch/powerpc/kernel/head_64.S20
-rw-r--r--arch/powerpc/kernel/lparmap.c2
-rw-r--r--arch/powerpc/kernel/ppc32.h (renamed from include/asm-ppc64/ppc32.h)16
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c9
-rw-r--r--arch/powerpc/kernel/process.c22
-rw-r--r--arch/powerpc/kernel/prom.c2
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/kernel/rtas-proc.c (renamed from arch/ppc64/kernel/rtas-proc.c)0
-rw-r--r--arch/powerpc/kernel/rtas.c19
-rw-r--r--arch/powerpc/kernel/rtas_flash.c (renamed from arch/ppc64/kernel/rtas_flash.c)113
-rw-r--r--arch/powerpc/kernel/setup-common.c123
-rw-r--r--arch/powerpc/kernel/setup_32.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c168
-rw-r--r--arch/powerpc/kernel/signal_32.c2
-rw-r--r--arch/powerpc/kernel/signal_64.c (renamed from arch/ppc64/kernel/signal.c)0
-rw-r--r--arch/powerpc/kernel/smp-tbsync.c (renamed from arch/ppc64/kernel/smp-tbsync.c)112
-rw-r--r--arch/powerpc/kernel/smp.c (renamed from arch/ppc64/kernel/smp.c)61
-rw-r--r--arch/powerpc/kernel/time.c4
-rw-r--r--arch/powerpc/kernel/traps.c12
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S29
-rw-r--r--arch/powerpc/lib/Makefile9
-rw-r--r--arch/powerpc/lib/bitops.c (renamed from arch/ppc64/kernel/bitops.c)97
-rw-r--r--arch/powerpc/lib/locks.c2
-rw-r--r--arch/powerpc/platforms/Makefile1
-rw-r--r--arch/powerpc/platforms/cell/Makefile2
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c (renamed from arch/ppc64/kernel/bpa_iic.c)8
-rw-r--r--arch/powerpc/platforms/cell/interrupt.h (renamed from arch/ppc64/kernel/bpa_iic.h)8
-rw-r--r--arch/powerpc/platforms/cell/iommu.c (renamed from arch/ppc64/kernel/bpa_iommu.c)44
-rw-r--r--arch/powerpc/platforms/cell/iommu.h (renamed from arch/ppc64/kernel/bpa_iommu.h)10
-rw-r--r--arch/powerpc/platforms/cell/setup.c (renamed from arch/ppc64/kernel/bpa_setup.c)46
-rw-r--r--arch/powerpc/platforms/cell/smp.c230
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c (renamed from arch/ppc64/kernel/spider-pic.c)2
-rw-r--r--arch/powerpc/platforms/chrp/nvram.c13
-rw-r--r--arch/powerpc/platforms/chrp/pegasos_eth.c1
-rw-r--r--arch/powerpc/platforms/chrp/smp.c39
-rw-r--r--arch/powerpc/platforms/iseries/call_hpt.h4
-rw-r--r--arch/powerpc/platforms/iseries/call_pci.h4
-rw-r--r--arch/powerpc/platforms/iseries/call_sm.h4
-rw-r--r--arch/powerpc/platforms/iseries/hvlog.c6
-rw-r--r--arch/powerpc/platforms/iseries/hvlpconfig.c2
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c2
-rw-r--r--arch/powerpc/platforms/iseries/irq.c6
-rw-r--r--arch/powerpc/platforms/iseries/ksyms.c2
-rw-r--r--arch/powerpc/platforms/iseries/lpardata.c12
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c8
-rw-r--r--arch/powerpc/platforms/iseries/mf.c8
-rw-r--r--arch/powerpc/platforms/iseries/naca.h (renamed from include/asm-ppc64/naca.h)8
-rw-r--r--arch/powerpc/platforms/iseries/pci.c4
-rw-r--r--arch/powerpc/platforms/iseries/proc.c4
-rw-r--r--arch/powerpc/platforms/iseries/release_data.h2
-rw-r--r--arch/powerpc/platforms/iseries/setup.c60
-rw-r--r--arch/powerpc/platforms/iseries/smp.c2
-rw-r--r--arch/powerpc/platforms/iseries/vio.c8
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c12
-rw-r--r--arch/powerpc/platforms/iseries/vpdinfo.c2
-rw-r--r--arch/powerpc/platforms/powermac/pic.c8
-rw-r--r--arch/powerpc/platforms/powermac/setup.c3
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig9
-rw-r--r--arch/powerpc/platforms/pseries/Makefile2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c5
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c13
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h120
-rw-r--r--arch/powerpc/platforms/pseries/rtas-fw.c138
-rw-r--r--arch/powerpc/platforms/pseries/rtas-fw.h3
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c (renamed from arch/ppc64/kernel/rtasd.c)0
-rw-r--r--arch/powerpc/platforms/pseries/setup.c21
-rw-r--r--arch/powerpc/platforms/pseries/smp.c3
-rw-r--r--arch/powerpc/sysdev/Makefile1
-rw-r--r--arch/powerpc/sysdev/dart.h (renamed from include/asm-ppc64/dart.h)6
-rw-r--r--arch/powerpc/sysdev/mmio_nvram.c (renamed from arch/ppc64/kernel/bpa_nvram.c)60
-rw-r--r--arch/powerpc/sysdev/u3_iommu.c5
-rw-r--r--arch/ppc/8xx_io/commproc.c5
-rw-r--r--arch/ppc/Makefile3
-rw-r--r--arch/ppc/kernel/Makefile1
-rw-r--r--arch/ppc/kernel/bitops.c126
-rw-r--r--arch/ppc/kernel/irq.c2
-rw-r--r--arch/ppc/kernel/machine_kexec.c2
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c5
-rw-r--r--arch/ppc/kernel/traps.c8
-rw-r--r--arch/ppc/syslib/m8xx_setup.c1
-rw-r--r--arch/ppc64/Kconfig5
-rw-r--r--arch/ppc64/Makefile1
-rw-r--r--arch/ppc64/kernel/Makefile16
-rw-r--r--arch/ppc64/kernel/asm-offsets.c2
-rw-r--r--arch/ppc64/kernel/head.S20
-rw-r--r--arch/ppc64/kernel/irq.c4
-rw-r--r--arch/ppc64/kernel/lparcfg.c4
-rw-r--r--arch/ppc64/kernel/machine_kexec.c1
-rw-r--r--arch/ppc64/kernel/pacaData.c2
-rw-r--r--arch/ppc64/kernel/pci_dn.c5
-rw-r--r--arch/ppc64/kernel/proc_ppc64.c2
-rw-r--r--arch/ppc64/kernel/prom_init.c4
-rw-r--r--arch/ppc64/kernel/udbg_scc.c1
-rw-r--r--arch/ppc64/lib/Makefile5
-rw-r--r--arch/ppc64/lib/string.S179
-rw-r--r--drivers/block/viodasd.c8
-rw-r--r--drivers/cdrom/viocd.c6
-rw-r--r--drivers/char/viocons.c10
-rw-r--r--drivers/char/viotape.c10
-rw-r--r--drivers/macintosh/via-pmu.c29
-rw-r--r--drivers/net/iseries_veth.c8
-rw-r--r--drivers/scsi/ibmvscsi/iseries_vscsi.c8
-rw-r--r--include/asm-powerpc/bitops.h437
-rw-r--r--include/asm-powerpc/bug.h34
-rw-r--r--include/asm-powerpc/elf.h22
-rw-r--r--include/asm-powerpc/futex.h (renamed from include/asm-ppc64/futex.h)45
-rw-r--r--include/asm-powerpc/ioctls.h3
-rw-r--r--include/asm-powerpc/ipcbuf.h34
-rw-r--r--include/asm-powerpc/irq.h2
-rw-r--r--include/asm-powerpc/iseries/hv_call.h (renamed from include/asm-ppc64/iSeries/HvCall.h)10
-rw-r--r--include/asm-powerpc/iseries/hv_call_event.h (renamed from include/asm-ppc64/iSeries/HvCallEvent.h)10
-rw-r--r--include/asm-powerpc/iseries/hv_call_sc.h (renamed from include/asm-ppc64/iSeries/HvCallSc.h)6
-rw-r--r--include/asm-powerpc/iseries/hv_call_xm.h (renamed from include/asm-ppc64/iSeries/HvCallXm.h)10
-rw-r--r--include/asm-powerpc/iseries/hv_lp_config.h (renamed from include/asm-ppc64/iSeries/HvLpConfig.h)12
-rw-r--r--include/asm-powerpc/iseries/hv_lp_event.h (renamed from include/asm-ppc64/iSeries/HvLpEvent.h)10
-rw-r--r--include/asm-powerpc/iseries/hv_types.h (renamed from include/asm-ppc64/iSeries/HvTypes.h)6
-rw-r--r--include/asm-powerpc/iseries/iseries_io.h (renamed from include/asm-ppc64/iSeries/iSeries_io.h)6
-rw-r--r--include/asm-powerpc/iseries/it_exp_vpd_panel.h (renamed from include/asm-ppc64/iSeries/ItExtVpdPanel.h)6
-rw-r--r--include/asm-powerpc/iseries/it_lp_naca.h (renamed from include/asm-ppc64/iSeries/ItLpNaca.h)6
-rw-r--r--include/asm-powerpc/iseries/it_lp_queue.h (renamed from include/asm-ppc64/iSeries/ItLpQueue.h)6
-rw-r--r--include/asm-powerpc/iseries/it_lp_reg_save.h (renamed from include/asm-ppc64/iSeries/ItLpRegSave.h)4
-rw-r--r--include/asm-powerpc/iseries/lpar_map.h (renamed from include/asm-ppc64/iSeries/LparMap.h)6
-rw-r--r--include/asm-powerpc/iseries/mf.h (renamed from include/asm-ppc64/iSeries/mf.h)10
-rw-r--r--include/asm-powerpc/iseries/vio.h (renamed from include/asm-ppc64/iSeries/vio.h)10
-rw-r--r--include/asm-powerpc/kexec.h49
-rw-r--r--include/asm-powerpc/machdep.h1
-rw-r--r--include/asm-powerpc/numnodes.h7
-rw-r--r--include/asm-powerpc/ppc_asm.h7
-rw-r--r--include/asm-powerpc/processor.h2
-rw-r--r--include/asm-powerpc/ptrace.h (renamed from include/asm-ppc64/ptrace.h)143
-rw-r--r--include/asm-powerpc/rtas.h25
-rw-r--r--include/asm-powerpc/sigcontext.h (renamed from include/asm-ppc64/sigcontext.h)41
-rw-r--r--include/asm-powerpc/smp.h (renamed from include/asm-ppc64/smp.h)45
-rw-r--r--include/asm-powerpc/sparsemem.h (renamed from include/asm-ppc64/sparsemem.h)6
-rw-r--r--include/asm-powerpc/stat.h81
-rw-r--r--include/asm-powerpc/system.h48
-rw-r--r--include/asm-powerpc/termios.h135
-rw-r--r--include/asm-powerpc/time.h2
-rw-r--r--include/asm-powerpc/tlb.h (renamed from include/asm-ppc/tlb.h)59
-rw-r--r--include/asm-powerpc/tlbflush.h146
-rw-r--r--include/asm-powerpc/uaccess.h468
-rw-r--r--include/asm-powerpc/ucontext.h40
-rw-r--r--include/asm-ppc/bitops.h460
-rw-r--r--include/asm-ppc/commproc.h2
-rw-r--r--include/asm-ppc/futex.h53
-rw-r--r--include/asm-ppc/ipcbuf.h29
-rw-r--r--include/asm-ppc/kexec.h40
-rw-r--r--include/asm-ppc/ptrace.h152
-rw-r--r--include/asm-ppc/sigcontext.h15
-rw-r--r--include/asm-ppc/stat.h69
-rw-r--r--include/asm-ppc/tlbflush.h115
-rw-r--r--include/asm-ppc/uaccess.h393
-rw-r--r--include/asm-ppc/ucontext.h27
-rw-r--r--include/asm-ppc64/bitops.h360
-rw-r--r--include/asm-ppc64/io.h2
-rw-r--r--include/asm-ppc64/ipcbuf.h28
-rw-r--r--include/asm-ppc64/kexec.h41
-rw-r--r--include/asm-ppc64/mmu_context.h15
-rw-r--r--include/asm-ppc64/numnodes.h7
-rw-r--r--include/asm-ppc64/nvram.h2
-rw-r--r--include/asm-ppc64/paca.h2
-rw-r--r--include/asm-ppc64/plpar_wrappers.h120
-rw-r--r--include/asm-ppc64/spinlock.h2
-rw-r--r--include/asm-ppc64/stat.h60
-rw-r--r--include/asm-ppc64/tlb.h39
-rw-r--r--include/asm-ppc64/tlbflush.h52
-rw-r--r--include/asm-ppc64/uaccess.h341
-rw-r--r--include/asm-ppc64/ucontext.h22
177 files changed, 8618 insertions, 3992 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 967ecf92d6a7..f4e25c648fbb 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -300,6 +300,7 @@ config PPC_PMAC64
300 bool 300 bool
301 depends on PPC_PMAC && POWER4 301 depends on PPC_PMAC && POWER4
302 select U3_DART 302 select U3_DART
303 select GENERIC_TBSYNC
303 default y 304 default y
304 305
305config PPC_PREP 306config PPC_PREP
@@ -314,15 +315,17 @@ config PPC_MAPLE
314 bool " Maple 970FX Evaluation Board" 315 bool " Maple 970FX Evaluation Board"
315 select U3_DART 316 select U3_DART
316 select MPIC_BROKEN_U3 317 select MPIC_BROKEN_U3
318 select GENERIC_TBSYNC
317 default n 319 default n
318 help 320 help
319 This option enables support for the Maple 970FX Evaluation Board. 321 This option enables support for the Maple 970FX Evaluation Board.
320 For more informations, refer to <http://www.970eval.com> 322 For more informations, refer to <http://www.970eval.com>
321 323
322config PPC_BPA 324config PPC_CELL
323 bool " Broadband Processor Architecture" 325 bool " Cell Broadband Processor Architecture"
324 depends on PPC_MULTIPLATFORM && PPC64 326 depends on PPC_MULTIPLATFORM && PPC64
325 select PPC_RTAS 327 select PPC_RTAS
328 select MMIO_NVRAM
326 329
327config PPC_OF 330config PPC_OF
328 bool 331 bool
@@ -353,13 +356,26 @@ config RTAS_ERROR_LOGGING
353 depends on PPC_RTAS 356 depends on PPC_RTAS
354 default n 357 default n
355 358
359config RTAS_PROC
360 bool "Proc interface to RTAS"
361 depends on PPC_RTAS
362 default y
363
364config RTAS_FLASH
365 tristate "Firmware flash interface"
366 depends on PPC64 && RTAS_PROC
367
368config MMIO_NVRAM
369 bool
370 default n
371
356config MPIC_BROKEN_U3 372config MPIC_BROKEN_U3
357 bool 373 bool
358 depends on PPC_MAPLE 374 depends on PPC_MAPLE
359 default y 375 default y
360 376
361config BPA_IIC 377config CELL_IIC
362 depends on PPC_BPA 378 depends on PPC_CELL
363 bool 379 bool
364 default y 380 default y
365 381
@@ -372,6 +388,11 @@ config PPC_MPC106
372 bool 388 bool
373 default n 389 default n
374 390
391config GENERIC_TBSYNC
392 bool
393 default y if CONFIG_PPC32 && CONFIG_SMP
394 default n
395
375source "drivers/cpufreq/Kconfig" 396source "drivers/cpufreq/Kconfig"
376 397
377config CPU_FREQ_PMAC 398config CPU_FREQ_PMAC
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 2f4cce06a7e5..5bc11bd36c1f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -12,9 +12,6 @@
12# Rewritten by Cort Dougan and Paul Mackerras 12# Rewritten by Cort Dougan and Paul Mackerras
13# 13#
14 14
15# This must match PAGE_OFFSET in include/asm-powerpc/page.h.
16KERNELLOAD := $(CONFIG_KERNEL_START)
17
18HAS_BIARCH := $(call cc-option-yn, -m32) 15HAS_BIARCH := $(call cc-option-yn, -m32)
19 16
20ifeq ($(CONFIG_PPC64),y) 17ifeq ($(CONFIG_PPC64),y)
@@ -59,7 +56,7 @@ override LD += -m elf$(SZ)ppc
59override CC += -m$(SZ) 56override CC += -m$(SZ)
60endif 57endif
61 58
62LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic -e $(KERNELLOAD) 59LDFLAGS_vmlinux := -Bstatic
63 60
64# The -Iarch/$(ARCH)/include is temporary while we are merging 61# The -Iarch/$(ARCH)/include is temporary while we are merging
65CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 62CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
new file mode 100644
index 000000000000..67ffecbc05cb
--- /dev/null
+++ b/arch/powerpc/configs/cell_defconfig
@@ -0,0 +1,1024 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4
4# Thu Oct 20 08:29:10 2005
5#
6CONFIG_64BIT=y
7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13
16
17#
18# Code maturity level options
19#
20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
24
25#
26# General setup
27#
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SWAP=y
31CONFIG_SYSVIPC=y
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34CONFIG_SYSCTL=y
35# CONFIG_AUDIT is not set
36CONFIG_HOTPLUG=y
37CONFIG_KOBJECT_UEVENT=y
38# CONFIG_IKCONFIG is not set
39# CONFIG_CPUSETS is not set
40CONFIG_INITRAMFS_SOURCE=""
41# CONFIG_EMBEDDED is not set
42CONFIG_KALLSYMS=y
43# CONFIG_KALLSYMS_ALL is not set
44# CONFIG_KALLSYMS_EXTRA_PASS is not set
45CONFIG_PRINTK=y
46CONFIG_BUG=y
47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y
49CONFIG_EPOLL=y
50CONFIG_SHMEM=y
51CONFIG_CC_ALIGN_FUNCTIONS=0
52CONFIG_CC_ALIGN_LABELS=0
53CONFIG_CC_ALIGN_LOOPS=0
54CONFIG_CC_ALIGN_JUMPS=0
55# CONFIG_TINY_SHMEM is not set
56CONFIG_BASE_SMALL=0
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set
64CONFIG_OBSOLETE_MODPARM=y
65# CONFIG_MODVERSIONS is not set
66# CONFIG_MODULE_SRCVERSION_ALL is not set
67# CONFIG_KMOD is not set
68CONFIG_STOP_MACHINE=y
69CONFIG_SYSVIPC_COMPAT=y
70
71#
72# Platform support
73#
74# CONFIG_PPC_ISERIES is not set
75CONFIG_PPC_MULTIPLATFORM=y
76# CONFIG_PPC_PSERIES is not set
77CONFIG_PPC_BPA=y
78# CONFIG_PPC_PMAC is not set
79# CONFIG_PPC_MAPLE is not set
80CONFIG_PPC=y
81CONFIG_PPC64=y
82CONFIG_PPC_OF=y
83CONFIG_BPA_IIC=y
84CONFIG_ALTIVEC=y
85CONFIG_KEXEC=y
86# CONFIG_U3_DART is not set
87# CONFIG_BOOTX_TEXT is not set
88# CONFIG_POWER4_ONLY is not set
89# CONFIG_IOMMU_VMERGE is not set
90CONFIG_SMP=y
91CONFIG_NR_CPUS=4
92CONFIG_ARCH_SELECT_MEMORY_MODEL=y
93CONFIG_ARCH_FLATMEM_ENABLE=y
94CONFIG_SELECT_MEMORY_MODEL=y
95CONFIG_FLATMEM_MANUAL=y
96# CONFIG_DISCONTIGMEM_MANUAL is not set
97# CONFIG_SPARSEMEM_MANUAL is not set
98CONFIG_FLATMEM=y
99CONFIG_FLAT_NODE_MEM_MAP=y
100# CONFIG_SPARSEMEM_STATIC is not set
101# CONFIG_NUMA is not set
102CONFIG_SCHED_SMT=y
103CONFIG_PREEMPT_NONE=y
104# CONFIG_PREEMPT_VOLUNTARY is not set
105# CONFIG_PREEMPT is not set
106CONFIG_PREEMPT_BKL=y
107# CONFIG_HZ_100 is not set
108CONFIG_HZ_250=y
109# CONFIG_HZ_1000 is not set
110CONFIG_HZ=250
111CONFIG_GENERIC_HARDIRQS=y
112CONFIG_PPC_RTAS=y
113CONFIG_RTAS_PROC=y
114CONFIG_RTAS_FLASH=y
115CONFIG_SECCOMP=y
116CONFIG_BINFMT_ELF=y
117# CONFIG_BINFMT_MISC is not set
118CONFIG_PROC_DEVICETREE=y
119# CONFIG_CMDLINE_BOOL is not set
120CONFIG_ISA_DMA_API=y
121
122#
123# Bus Options
124#
125CONFIG_PCI=y
126CONFIG_PCI_DOMAINS=y
127CONFIG_PCI_LEGACY_PROC=y
128# CONFIG_PCI_DEBUG is not set
129
130#
131# PCCARD (PCMCIA/CardBus) support
132#
133# CONFIG_PCCARD is not set
134
135#
136# PCI Hotplug Support
137#
138# CONFIG_HOTPLUG_PCI is not set
139
140#
141# Networking
142#
143CONFIG_NET=y
144
145#
146# Networking options
147#
148CONFIG_PACKET=y
149# CONFIG_PACKET_MMAP is not set
150CONFIG_UNIX=y
151CONFIG_XFRM=y
152# CONFIG_XFRM_USER is not set
153# CONFIG_NET_KEY is not set
154CONFIG_INET=y
155CONFIG_IP_MULTICAST=y
156# CONFIG_IP_ADVANCED_ROUTER is not set
157CONFIG_IP_FIB_HASH=y
158# CONFIG_IP_PNP is not set
159CONFIG_NET_IPIP=y
160# CONFIG_NET_IPGRE is not set
161# CONFIG_IP_MROUTE is not set
162# CONFIG_ARPD is not set
163CONFIG_SYN_COOKIES=y
164# CONFIG_INET_AH is not set
165# CONFIG_INET_ESP is not set
166# CONFIG_INET_IPCOMP is not set
167CONFIG_INET_TUNNEL=y
168CONFIG_INET_DIAG=y
169CONFIG_INET_TCP_DIAG=y
170# CONFIG_TCP_CONG_ADVANCED is not set
171CONFIG_TCP_CONG_BIC=y
172
173#
174# IP: Virtual Server Configuration
175#
176# CONFIG_IP_VS is not set
177CONFIG_IPV6=y
178# CONFIG_IPV6_PRIVACY is not set
179CONFIG_INET6_AH=m
180CONFIG_INET6_ESP=m
181CONFIG_INET6_IPCOMP=m
182CONFIG_INET6_TUNNEL=m
183CONFIG_IPV6_TUNNEL=m
184CONFIG_NETFILTER=y
185# CONFIG_NETFILTER_DEBUG is not set
186# CONFIG_NETFILTER_NETLINK is not set
187
188#
189# IP: Netfilter Configuration
190#
191CONFIG_IP_NF_CONNTRACK=y
192# CONFIG_IP_NF_CT_ACCT is not set
193# CONFIG_IP_NF_CONNTRACK_MARK is not set
194# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
195CONFIG_IP_NF_CT_PROTO_SCTP=y
196CONFIG_IP_NF_FTP=m
197CONFIG_IP_NF_IRC=m
198# CONFIG_IP_NF_NETBIOS_NS is not set
199CONFIG_IP_NF_TFTP=m
200CONFIG_IP_NF_AMANDA=m
201# CONFIG_IP_NF_PPTP is not set
202CONFIG_IP_NF_QUEUE=m
203CONFIG_IP_NF_IPTABLES=m
204CONFIG_IP_NF_MATCH_LIMIT=m
205CONFIG_IP_NF_MATCH_IPRANGE=m
206CONFIG_IP_NF_MATCH_MAC=m
207CONFIG_IP_NF_MATCH_PKTTYPE=m
208CONFIG_IP_NF_MATCH_MARK=m
209CONFIG_IP_NF_MATCH_MULTIPORT=m
210CONFIG_IP_NF_MATCH_TOS=m
211CONFIG_IP_NF_MATCH_RECENT=m
212CONFIG_IP_NF_MATCH_ECN=m
213CONFIG_IP_NF_MATCH_DSCP=m
214CONFIG_IP_NF_MATCH_AH_ESP=m
215CONFIG_IP_NF_MATCH_LENGTH=m
216CONFIG_IP_NF_MATCH_TTL=m
217CONFIG_IP_NF_MATCH_TCPMSS=m
218CONFIG_IP_NF_MATCH_HELPER=m
219CONFIG_IP_NF_MATCH_STATE=m
220CONFIG_IP_NF_MATCH_CONNTRACK=m
221CONFIG_IP_NF_MATCH_OWNER=m
222CONFIG_IP_NF_MATCH_ADDRTYPE=m
223CONFIG_IP_NF_MATCH_REALM=m
224CONFIG_IP_NF_MATCH_SCTP=m
225# CONFIG_IP_NF_MATCH_DCCP is not set
226CONFIG_IP_NF_MATCH_COMMENT=m
227CONFIG_IP_NF_MATCH_HASHLIMIT=m
228CONFIG_IP_NF_MATCH_STRING=m
229CONFIG_IP_NF_FILTER=m
230CONFIG_IP_NF_TARGET_REJECT=m
231CONFIG_IP_NF_TARGET_LOG=m
232CONFIG_IP_NF_TARGET_ULOG=m
233CONFIG_IP_NF_TARGET_TCPMSS=m
234CONFIG_IP_NF_TARGET_NFQUEUE=m
235CONFIG_IP_NF_NAT=m
236CONFIG_IP_NF_NAT_NEEDED=y
237CONFIG_IP_NF_TARGET_MASQUERADE=m
238CONFIG_IP_NF_TARGET_REDIRECT=m
239CONFIG_IP_NF_TARGET_NETMAP=m
240CONFIG_IP_NF_TARGET_SAME=m
241CONFIG_IP_NF_NAT_SNMP_BASIC=m
242CONFIG_IP_NF_NAT_IRC=m
243CONFIG_IP_NF_NAT_FTP=m
244CONFIG_IP_NF_NAT_TFTP=m
245CONFIG_IP_NF_NAT_AMANDA=m
246CONFIG_IP_NF_MANGLE=m
247CONFIG_IP_NF_TARGET_TOS=m
248CONFIG_IP_NF_TARGET_ECN=m
249CONFIG_IP_NF_TARGET_DSCP=m
250CONFIG_IP_NF_TARGET_MARK=m
251CONFIG_IP_NF_TARGET_CLASSIFY=m
252CONFIG_IP_NF_TARGET_TTL=m
253CONFIG_IP_NF_RAW=m
254CONFIG_IP_NF_TARGET_NOTRACK=m
255CONFIG_IP_NF_ARPTABLES=m
256CONFIG_IP_NF_ARPFILTER=m
257CONFIG_IP_NF_ARP_MANGLE=m
258
259#
260# IPv6: Netfilter Configuration (EXPERIMENTAL)
261#
262# CONFIG_IP6_NF_QUEUE is not set
263# CONFIG_IP6_NF_IPTABLES is not set
264# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
265
266#
267# DCCP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_DCCP is not set
270
271#
272# SCTP Configuration (EXPERIMENTAL)
273#
274# CONFIG_IP_SCTP is not set
275# CONFIG_ATM is not set
276# CONFIG_BRIDGE is not set
277# CONFIG_VLAN_8021Q is not set
278# CONFIG_DECNET is not set
279# CONFIG_LLC2 is not set
280# CONFIG_IPX is not set
281# CONFIG_ATALK is not set
282# CONFIG_X25 is not set
283# CONFIG_LAPB is not set
284# CONFIG_NET_DIVERT is not set
285# CONFIG_ECONET is not set
286# CONFIG_WAN_ROUTER is not set
287# CONFIG_NET_SCHED is not set
288CONFIG_NET_CLS_ROUTE=y
289
290#
291# Network testing
292#
293# CONFIG_NET_PKTGEN is not set
294# CONFIG_HAMRADIO is not set
295# CONFIG_IRDA is not set
296# CONFIG_BT is not set
297# CONFIG_IEEE80211 is not set
298
299#
300# Device Drivers
301#
302
303#
304# Generic Driver Options
305#
306CONFIG_STANDALONE=y
307CONFIG_PREVENT_FIRMWARE_BUILD=y
308CONFIG_FW_LOADER=y
309# CONFIG_DEBUG_DRIVER is not set
310
311#
312# Connector - unified userspace <-> kernelspace linker
313#
314# CONFIG_CONNECTOR is not set
315
316#
317# Memory Technology Devices (MTD)
318#
319# CONFIG_MTD is not set
320
321#
322# Parallel port support
323#
324# CONFIG_PARPORT is not set
325
326#
327# Plug and Play support
328#
329
330#
331# Block devices
332#
333# CONFIG_BLK_DEV_FD is not set
334# CONFIG_BLK_CPQ_DA is not set
335# CONFIG_BLK_CPQ_CISS_DA is not set
336# CONFIG_BLK_DEV_DAC960 is not set
337# CONFIG_BLK_DEV_UMEM is not set
338# CONFIG_BLK_DEV_COW_COMMON is not set
339CONFIG_BLK_DEV_LOOP=y
340# CONFIG_BLK_DEV_CRYPTOLOOP is not set
341CONFIG_BLK_DEV_NBD=y
342# CONFIG_BLK_DEV_SX8 is not set
343CONFIG_BLK_DEV_RAM=y
344CONFIG_BLK_DEV_RAM_COUNT=16
345CONFIG_BLK_DEV_RAM_SIZE=131072
346CONFIG_BLK_DEV_INITRD=y
347# CONFIG_CDROM_PKTCDVD is not set
348
349#
350# IO Schedulers
351#
352CONFIG_IOSCHED_NOOP=y
353CONFIG_IOSCHED_AS=y
354CONFIG_IOSCHED_DEADLINE=y
355CONFIG_IOSCHED_CFQ=y
356# CONFIG_ATA_OVER_ETH is not set
357
358#
359# ATA/ATAPI/MFM/RLL support
360#
361CONFIG_IDE=y
362CONFIG_BLK_DEV_IDE=y
363
364#
365# Please see Documentation/ide.txt for help/info on IDE drives
366#
367# CONFIG_BLK_DEV_IDE_SATA is not set
368CONFIG_BLK_DEV_IDEDISK=y
369CONFIG_IDEDISK_MULTI_MODE=y
370# CONFIG_BLK_DEV_IDECD is not set
371# CONFIG_BLK_DEV_IDETAPE is not set
372# CONFIG_BLK_DEV_IDEFLOPPY is not set
373# CONFIG_IDE_TASK_IOCTL is not set
374
375#
376# IDE chipset support/bugfixes
377#
378CONFIG_IDE_GENERIC=y
379CONFIG_BLK_DEV_IDEPCI=y
380CONFIG_IDEPCI_SHARE_IRQ=y
381# CONFIG_BLK_DEV_OFFBOARD is not set
382CONFIG_BLK_DEV_GENERIC=y
383# CONFIG_BLK_DEV_OPTI621 is not set
384# CONFIG_BLK_DEV_SL82C105 is not set
385CONFIG_BLK_DEV_IDEDMA_PCI=y
386# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
387CONFIG_IDEDMA_PCI_AUTO=y
388# CONFIG_IDEDMA_ONLYDISK is not set
389CONFIG_BLK_DEV_AEC62XX=y
390# CONFIG_BLK_DEV_ALI15X3 is not set
391# CONFIG_BLK_DEV_AMD74XX is not set
392# CONFIG_BLK_DEV_CMD64X is not set
393# CONFIG_BLK_DEV_TRIFLEX is not set
394# CONFIG_BLK_DEV_CY82C693 is not set
395# CONFIG_BLK_DEV_CS5520 is not set
396# CONFIG_BLK_DEV_CS5530 is not set
397# CONFIG_BLK_DEV_HPT34X is not set
398# CONFIG_BLK_DEV_HPT366 is not set
399# CONFIG_BLK_DEV_SC1200 is not set
400# CONFIG_BLK_DEV_PIIX is not set
401# CONFIG_BLK_DEV_IT821X is not set
402# CONFIG_BLK_DEV_NS87415 is not set
403# CONFIG_BLK_DEV_PDC202XX_OLD is not set
404# CONFIG_BLK_DEV_PDC202XX_NEW is not set
405# CONFIG_BLK_DEV_SVWKS is not set
406CONFIG_BLK_DEV_SIIMAGE=y
407# CONFIG_BLK_DEV_SLC90E66 is not set
408# CONFIG_BLK_DEV_TRM290 is not set
409# CONFIG_BLK_DEV_VIA82CXXX is not set
410# CONFIG_IDE_ARM is not set
411CONFIG_BLK_DEV_IDEDMA=y
412# CONFIG_IDEDMA_IVB is not set
413CONFIG_IDEDMA_AUTO=y
414# CONFIG_BLK_DEV_HD is not set
415
416#
417# SCSI device support
418#
419# CONFIG_RAID_ATTRS is not set
420# CONFIG_SCSI is not set
421
422#
423# Multi-device support (RAID and LVM)
424#
425# CONFIG_MD is not set
426
427#
428# Fusion MPT device support
429#
430# CONFIG_FUSION is not set
431
432#
433# IEEE 1394 (FireWire) support
434#
435# CONFIG_IEEE1394 is not set
436
437#
438# I2O device support
439#
440# CONFIG_I2O is not set
441
442#
443# Macintosh device drivers
444#
445
446#
447# Network device support
448#
449CONFIG_NETDEVICES=y
450# CONFIG_DUMMY is not set
451# CONFIG_BONDING is not set
452# CONFIG_EQUALIZER is not set
453# CONFIG_TUN is not set
454
455#
456# ARCnet devices
457#
458# CONFIG_ARCNET is not set
459
460#
461# PHY device support
462#
463# CONFIG_PHYLIB is not set
464
465#
466# Ethernet (10 or 100Mbit)
467#
468CONFIG_NET_ETHERNET=y
469CONFIG_MII=y
470# CONFIG_HAPPYMEAL is not set
471# CONFIG_SUNGEM is not set
472# CONFIG_CASSINI is not set
473# CONFIG_NET_VENDOR_3COM is not set
474
475#
476# Tulip family network device support
477#
478# CONFIG_NET_TULIP is not set
479# CONFIG_HP100 is not set
480# CONFIG_NET_PCI is not set
481
482#
483# Ethernet (1000 Mbit)
484#
485# CONFIG_ACENIC is not set
486# CONFIG_DL2K is not set
487CONFIG_E1000=m
488# CONFIG_E1000_NAPI is not set
489# CONFIG_NS83820 is not set
490# CONFIG_HAMACHI is not set
491# CONFIG_YELLOWFIN is not set
492# CONFIG_R8169 is not set
493# CONFIG_SIS190 is not set
494CONFIG_SKGE=m
495# CONFIG_SK98LIN is not set
496# CONFIG_TIGON3 is not set
497# CONFIG_BNX2 is not set
498# CONFIG_SPIDER_NET is not set
499# CONFIG_MV643XX_ETH is not set
500
501#
502# Ethernet (10000 Mbit)
503#
504# CONFIG_CHELSIO_T1 is not set
505# CONFIG_IXGB is not set
506# CONFIG_S2IO is not set
507
508#
509# Token Ring devices
510#
511# CONFIG_TR is not set
512
513#
514# Wireless LAN (non-hamradio)
515#
516# CONFIG_NET_RADIO is not set
517
518#
519# Wan interfaces
520#
521# CONFIG_WAN is not set
522# CONFIG_FDDI is not set
523# CONFIG_HIPPI is not set
524# CONFIG_PPP is not set
525# CONFIG_SLIP is not set
526# CONFIG_SHAPER is not set
527# CONFIG_NETCONSOLE is not set
528# CONFIG_NETPOLL is not set
529# CONFIG_NET_POLL_CONTROLLER is not set
530
531#
532# ISDN subsystem
533#
534# CONFIG_ISDN is not set
535
536#
537# Telephony Support
538#
539# CONFIG_PHONE is not set
540
541#
542# Input device support
543#
544CONFIG_INPUT=y
545
546#
547# Userland interfaces
548#
549CONFIG_INPUT_MOUSEDEV=y
550# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
551CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
552CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
553# CONFIG_INPUT_JOYDEV is not set
554# CONFIG_INPUT_TSDEV is not set
555# CONFIG_INPUT_EVDEV is not set
556# CONFIG_INPUT_EVBUG is not set
557
558#
559# Input Device Drivers
560#
561# CONFIG_INPUT_KEYBOARD is not set
562# CONFIG_INPUT_MOUSE is not set
563# CONFIG_INPUT_JOYSTICK is not set
564# CONFIG_INPUT_TOUCHSCREEN is not set
565# CONFIG_INPUT_MISC is not set
566
567#
568# Hardware I/O ports
569#
570CONFIG_SERIO=y
571# CONFIG_SERIO_I8042 is not set
572CONFIG_SERIO_SERPORT=y
573# CONFIG_SERIO_PCIPS2 is not set
574# CONFIG_SERIO_RAW is not set
575# CONFIG_GAMEPORT is not set
576
577#
578# Character devices
579#
580CONFIG_VT=y
581CONFIG_VT_CONSOLE=y
582CONFIG_HW_CONSOLE=y
583CONFIG_SERIAL_NONSTANDARD=y
584# CONFIG_ROCKETPORT is not set
585# CONFIG_CYCLADES is not set
586# CONFIG_DIGIEPCA is not set
587# CONFIG_MOXA_SMARTIO is not set
588# CONFIG_ISI is not set
589# CONFIG_SYNCLINK is not set
590# CONFIG_SYNCLINKMP is not set
591# CONFIG_N_HDLC is not set
592# CONFIG_SPECIALIX is not set
593# CONFIG_SX is not set
594# CONFIG_STALDRV is not set
595
596#
597# Serial drivers
598#
599CONFIG_SERIAL_8250=y
600CONFIG_SERIAL_8250_CONSOLE=y
601CONFIG_SERIAL_8250_NR_UARTS=4
602# CONFIG_SERIAL_8250_EXTENDED is not set
603
604#
605# Non-8250 serial port support
606#
607CONFIG_SERIAL_CORE=y
608CONFIG_SERIAL_CORE_CONSOLE=y
609# CONFIG_SERIAL_JSM is not set
610CONFIG_UNIX98_PTYS=y
611# CONFIG_LEGACY_PTYS is not set
612
613#
614# IPMI
615#
616# CONFIG_IPMI_HANDLER is not set
617
618#
619# Watchdog Cards
620#
621CONFIG_WATCHDOG=y
622# CONFIG_WATCHDOG_NOWAYOUT is not set
623
624#
625# Watchdog Device Drivers
626#
627# CONFIG_SOFT_WATCHDOG is not set
628CONFIG_WATCHDOG_RTAS=y
629
630#
631# PCI-based Watchdog Cards
632#
633# CONFIG_PCIPCWATCHDOG is not set
634# CONFIG_WDTPCI is not set
635# CONFIG_RTC is not set
636# CONFIG_DTLK is not set
637# CONFIG_R3964 is not set
638# CONFIG_APPLICOM is not set
639
640#
641# Ftape, the floppy tape device driver
642#
643# CONFIG_AGP is not set
644# CONFIG_DRM is not set
645# CONFIG_RAW_DRIVER is not set
646# CONFIG_HANGCHECK_TIMER is not set
647
648#
649# TPM devices
650#
651# CONFIG_TCG_TPM is not set
652
653#
654# I2C support
655#
656CONFIG_I2C=y
657# CONFIG_I2C_CHARDEV is not set
658
659#
660# I2C Algorithms
661#
662CONFIG_I2C_ALGOBIT=y
663# CONFIG_I2C_ALGOPCF is not set
664# CONFIG_I2C_ALGOPCA is not set
665
666#
667# I2C Hardware Bus support
668#
669# CONFIG_I2C_ALI1535 is not set
670# CONFIG_I2C_ALI1563 is not set
671# CONFIG_I2C_ALI15X3 is not set
672# CONFIG_I2C_AMD756 is not set
673# CONFIG_I2C_AMD8111 is not set
674# CONFIG_I2C_I801 is not set
675# CONFIG_I2C_I810 is not set
676# CONFIG_I2C_PIIX4 is not set
677# CONFIG_I2C_NFORCE2 is not set
678# CONFIG_I2C_PARPORT_LIGHT is not set
679# CONFIG_I2C_PROSAVAGE is not set
680# CONFIG_I2C_SAVAGE4 is not set
681# CONFIG_SCx200_ACB is not set
682# CONFIG_I2C_SIS5595 is not set
683# CONFIG_I2C_SIS630 is not set
684# CONFIG_I2C_SIS96X is not set
685# CONFIG_I2C_STUB is not set
686# CONFIG_I2C_VIA is not set
687# CONFIG_I2C_VIAPRO is not set
688# CONFIG_I2C_VOODOO3 is not set
689# CONFIG_I2C_PCA_ISA is not set
690
691#
692# Miscellaneous I2C Chip support
693#
694# CONFIG_SENSORS_DS1337 is not set
695# CONFIG_SENSORS_DS1374 is not set
696# CONFIG_SENSORS_EEPROM is not set
697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_PCF8591 is not set
700# CONFIG_SENSORS_RTC8564 is not set
701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_I2C_DEBUG_CORE is not set
703# CONFIG_I2C_DEBUG_ALGO is not set
704# CONFIG_I2C_DEBUG_BUS is not set
705# CONFIG_I2C_DEBUG_CHIP is not set
706
707#
708# Dallas's 1-wire bus
709#
710# CONFIG_W1 is not set
711
712#
713# Hardware Monitoring support
714#
715# CONFIG_HWMON is not set
716# CONFIG_HWMON_VID is not set
717
718#
719# Misc devices
720#
721
722#
723# Multimedia Capabilities Port drivers
724#
725
726#
727# Multimedia devices
728#
729# CONFIG_VIDEO_DEV is not set
730
731#
732# Digital Video Broadcasting Devices
733#
734# CONFIG_DVB is not set
735
736#
737# Graphics support
738#
739# CONFIG_FB is not set
740
741#
742# Console display driver support
743#
744# CONFIG_VGA_CONSOLE is not set
745CONFIG_DUMMY_CONSOLE=y
746
747#
748# Sound
749#
750# CONFIG_SOUND is not set
751
752#
753# USB support
754#
755CONFIG_USB_ARCH_HAS_HCD=y
756CONFIG_USB_ARCH_HAS_OHCI=y
757# CONFIG_USB is not set
758
759#
760# USB Gadget Support
761#
762# CONFIG_USB_GADGET is not set
763
764#
765# MMC/SD Card support
766#
767# CONFIG_MMC is not set
768
769#
770# InfiniBand support
771#
772# CONFIG_INFINIBAND is not set
773
774#
775# SN Devices
776#
777
778#
779# File systems
780#
781CONFIG_EXT2_FS=y
782# CONFIG_EXT2_FS_XATTR is not set
783# CONFIG_EXT2_FS_XIP is not set
784CONFIG_EXT3_FS=y
785CONFIG_EXT3_FS_XATTR=y
786# CONFIG_EXT3_FS_POSIX_ACL is not set
787# CONFIG_EXT3_FS_SECURITY is not set
788CONFIG_JBD=y
789# CONFIG_JBD_DEBUG is not set
790CONFIG_FS_MBCACHE=y
791# CONFIG_REISERFS_FS is not set
792# CONFIG_JFS_FS is not set
793CONFIG_FS_POSIX_ACL=y
794# CONFIG_XFS_FS is not set
795# CONFIG_MINIX_FS is not set
796# CONFIG_ROMFS_FS is not set
797CONFIG_INOTIFY=y
798# CONFIG_QUOTA is not set
799CONFIG_DNOTIFY=y
800# CONFIG_AUTOFS_FS is not set
801# CONFIG_AUTOFS4_FS is not set
802# CONFIG_FUSE_FS is not set
803
804#
805# CD-ROM/DVD Filesystems
806#
807CONFIG_ISO9660_FS=m
808CONFIG_JOLIET=y
809# CONFIG_ZISOFS is not set
810CONFIG_UDF_FS=m
811CONFIG_UDF_NLS=y
812
813#
814# DOS/FAT/NT Filesystems
815#
816CONFIG_FAT_FS=m
817CONFIG_MSDOS_FS=m
818CONFIG_VFAT_FS=m
819CONFIG_FAT_DEFAULT_CODEPAGE=437
820CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
821# CONFIG_NTFS_FS is not set
822
823#
824# Pseudo filesystems
825#
826CONFIG_PROC_FS=y
827CONFIG_PROC_KCORE=y
828CONFIG_SYSFS=y
829CONFIG_TMPFS=y
830CONFIG_HUGETLBFS=y
831CONFIG_HUGETLB_PAGE=y
832CONFIG_RAMFS=y
833# CONFIG_RELAYFS_FS is not set
834
835#
836# Miscellaneous filesystems
837#
838# CONFIG_ADFS_FS is not set
839# CONFIG_AFFS_FS is not set
840# CONFIG_HFS_FS is not set
841# CONFIG_HFSPLUS_FS is not set
842# CONFIG_BEFS_FS is not set
843# CONFIG_BFS_FS is not set
844# CONFIG_EFS_FS is not set
845# CONFIG_CRAMFS is not set
846# CONFIG_VXFS_FS is not set
847# CONFIG_HPFS_FS is not set
848# CONFIG_QNX4FS_FS is not set
849# CONFIG_SYSV_FS is not set
850# CONFIG_UFS_FS is not set
851
852#
853# Network File Systems
854#
855CONFIG_NFS_FS=m
856CONFIG_NFS_V3=y
857CONFIG_NFS_V3_ACL=y
858# CONFIG_NFS_V4 is not set
859# CONFIG_NFS_DIRECTIO is not set
860CONFIG_NFSD=m
861CONFIG_NFSD_V2_ACL=y
862CONFIG_NFSD_V3=y
863CONFIG_NFSD_V3_ACL=y
864# CONFIG_NFSD_V4 is not set
865CONFIG_NFSD_TCP=y
866CONFIG_LOCKD=m
867CONFIG_LOCKD_V4=y
868CONFIG_EXPORTFS=m
869CONFIG_NFS_ACL_SUPPORT=m
870CONFIG_NFS_COMMON=y
871CONFIG_SUNRPC=m
872# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set
875# CONFIG_CIFS is not set
876# CONFIG_NCP_FS is not set
877# CONFIG_CODA_FS is not set
878# CONFIG_AFS_FS is not set
879# CONFIG_9P_FS is not set
880
881#
882# Partition Types
883#
884CONFIG_PARTITION_ADVANCED=y
885# CONFIG_ACORN_PARTITION is not set
886# CONFIG_OSF_PARTITION is not set
887# CONFIG_AMIGA_PARTITION is not set
888# CONFIG_ATARI_PARTITION is not set
889# CONFIG_MAC_PARTITION is not set
890CONFIG_MSDOS_PARTITION=y
891# CONFIG_BSD_DISKLABEL is not set
892# CONFIG_MINIX_SUBPARTITION is not set
893# CONFIG_SOLARIS_X86_PARTITION is not set
894# CONFIG_UNIXWARE_DISKLABEL is not set
895# CONFIG_LDM_PARTITION is not set
896# CONFIG_SGI_PARTITION is not set
897# CONFIG_ULTRIX_PARTITION is not set
898# CONFIG_SUN_PARTITION is not set
899CONFIG_EFI_PARTITION=y
900
901#
902# Native Language Support
903#
904CONFIG_NLS=m
905CONFIG_NLS_DEFAULT="iso8859-1"
906# CONFIG_NLS_CODEPAGE_437 is not set
907# CONFIG_NLS_CODEPAGE_737 is not set
908# CONFIG_NLS_CODEPAGE_775 is not set
909# CONFIG_NLS_CODEPAGE_850 is not set
910# CONFIG_NLS_CODEPAGE_852 is not set
911# CONFIG_NLS_CODEPAGE_855 is not set
912# CONFIG_NLS_CODEPAGE_857 is not set
913# CONFIG_NLS_CODEPAGE_860 is not set
914# CONFIG_NLS_CODEPAGE_861 is not set
915# CONFIG_NLS_CODEPAGE_862 is not set
916# CONFIG_NLS_CODEPAGE_863 is not set
917# CONFIG_NLS_CODEPAGE_864 is not set
918# CONFIG_NLS_CODEPAGE_865 is not set
919# CONFIG_NLS_CODEPAGE_866 is not set
920# CONFIG_NLS_CODEPAGE_869 is not set
921# CONFIG_NLS_CODEPAGE_936 is not set
922# CONFIG_NLS_CODEPAGE_950 is not set
923# CONFIG_NLS_CODEPAGE_932 is not set
924# CONFIG_NLS_CODEPAGE_949 is not set
925# CONFIG_NLS_CODEPAGE_874 is not set
926# CONFIG_NLS_ISO8859_8 is not set
927# CONFIG_NLS_CODEPAGE_1250 is not set
928# CONFIG_NLS_CODEPAGE_1251 is not set
929# CONFIG_NLS_ASCII is not set
930CONFIG_NLS_ISO8859_1=m
931CONFIG_NLS_ISO8859_2=m
932CONFIG_NLS_ISO8859_3=m
933CONFIG_NLS_ISO8859_4=m
934CONFIG_NLS_ISO8859_5=m
935CONFIG_NLS_ISO8859_6=m
936CONFIG_NLS_ISO8859_7=m
937CONFIG_NLS_ISO8859_9=m
938CONFIG_NLS_ISO8859_13=m
939CONFIG_NLS_ISO8859_14=m
940CONFIG_NLS_ISO8859_15=m
941# CONFIG_NLS_KOI8_R is not set
942# CONFIG_NLS_KOI8_U is not set
943# CONFIG_NLS_UTF8 is not set
944
945#
946# Profiling support
947#
948# CONFIG_PROFILING is not set
949
950#
951# Kernel hacking
952#
953# CONFIG_PRINTK_TIME is not set
954CONFIG_DEBUG_KERNEL=y
955CONFIG_MAGIC_SYSRQ=y
956CONFIG_LOG_BUF_SHIFT=15
957CONFIG_DETECT_SOFTLOCKUP=y
958# CONFIG_SCHEDSTATS is not set
959# CONFIG_DEBUG_SLAB is not set
960# CONFIG_DEBUG_SPINLOCK is not set
961CONFIG_DEBUG_SPINLOCK_SLEEP=y
962# CONFIG_DEBUG_KOBJECT is not set
963# CONFIG_DEBUG_INFO is not set
964CONFIG_DEBUG_FS=y
965# CONFIG_DEBUG_STACKOVERFLOW is not set
966# CONFIG_KPROBES is not set
967# CONFIG_DEBUG_STACK_USAGE is not set
968CONFIG_DEBUGGER=y
969# CONFIG_XMON is not set
970# CONFIG_PPCDBG is not set
971CONFIG_IRQSTACKS=y
972
973#
974# Security options
975#
976# CONFIG_KEYS is not set
977# CONFIG_SECURITY is not set
978
979#
980# Cryptographic options
981#
982CONFIG_CRYPTO=y
983CONFIG_CRYPTO_HMAC=y
984# CONFIG_CRYPTO_NULL is not set
985# CONFIG_CRYPTO_MD4 is not set
986CONFIG_CRYPTO_MD5=m
987CONFIG_CRYPTO_SHA1=m
988# CONFIG_CRYPTO_SHA256 is not set
989# CONFIG_CRYPTO_SHA512 is not set
990# CONFIG_CRYPTO_WP512 is not set
991# CONFIG_CRYPTO_TGR192 is not set
992CONFIG_CRYPTO_DES=m
993# CONFIG_CRYPTO_BLOWFISH is not set
994# CONFIG_CRYPTO_TWOFISH is not set
995# CONFIG_CRYPTO_SERPENT is not set
996# CONFIG_CRYPTO_AES is not set
997# CONFIG_CRYPTO_CAST5 is not set
998# CONFIG_CRYPTO_CAST6 is not set
999# CONFIG_CRYPTO_TEA is not set
1000# CONFIG_CRYPTO_ARC4 is not set
1001# CONFIG_CRYPTO_KHAZAD is not set
1002# CONFIG_CRYPTO_ANUBIS is not set
1003CONFIG_CRYPTO_DEFLATE=m
1004# CONFIG_CRYPTO_MICHAEL_MIC is not set
1005# CONFIG_CRYPTO_CRC32C is not set
1006# CONFIG_CRYPTO_TEST is not set
1007
1008#
1009# Hardware crypto devices
1010#
1011
1012#
1013# Library routines
1014#
1015# CONFIG_CRC_CCITT is not set
1016# CONFIG_CRC16 is not set
1017CONFIG_CRC32=y
1018# CONFIG_LIBCRC32C is not set
1019CONFIG_ZLIB_INFLATE=m
1020CONFIG_ZLIB_DEFLATE=m
1021CONFIG_TEXTSEARCH=y
1022CONFIG_TEXTSEARCH_KMP=m
1023CONFIG_TEXTSEARCH_BM=m
1024CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
new file mode 100644
index 000000000000..6323065fbf2c
--- /dev/null
+++ b/arch/powerpc/configs/g5_defconfig
@@ -0,0 +1,1392 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4
4# Thu Oct 20 08:30:23 2005
5#
6CONFIG_64BIT=y
7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13
16
17#
18# Code maturity level options
19#
20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
24
25#
26# General setup
27#
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SWAP=y
31CONFIG_SYSVIPC=y
32CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set
34CONFIG_SYSCTL=y
35# CONFIG_AUDIT is not set
36CONFIG_HOTPLUG=y
37CONFIG_KOBJECT_UEVENT=y
38CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y
40# CONFIG_CPUSETS is not set
41CONFIG_INITRAMFS_SOURCE=""
42# CONFIG_EMBEDDED is not set
43CONFIG_KALLSYMS=y
44# CONFIG_KALLSYMS_ALL is not set
45# CONFIG_KALLSYMS_EXTRA_PASS is not set
46CONFIG_PRINTK=y
47CONFIG_BUG=y
48CONFIG_BASE_FULL=y
49CONFIG_FUTEX=y
50CONFIG_EPOLL=y
51CONFIG_SHMEM=y
52CONFIG_CC_ALIGN_FUNCTIONS=0
53CONFIG_CC_ALIGN_LABELS=0
54CONFIG_CC_ALIGN_LOOPS=0
55CONFIG_CC_ALIGN_JUMPS=0
56# CONFIG_TINY_SHMEM is not set
57CONFIG_BASE_SMALL=0
58
59#
60# Loadable module support
61#
62CONFIG_MODULES=y
63CONFIG_MODULE_UNLOAD=y
64# CONFIG_MODULE_FORCE_UNLOAD is not set
65CONFIG_OBSOLETE_MODPARM=y
66CONFIG_MODVERSIONS=y
67CONFIG_MODULE_SRCVERSION_ALL=y
68CONFIG_KMOD=y
69CONFIG_STOP_MACHINE=y
70CONFIG_SYSVIPC_COMPAT=y
71
72#
73# Platform support
74#
75# CONFIG_PPC_ISERIES is not set
76CONFIG_PPC_MULTIPLATFORM=y
77# CONFIG_PPC_PSERIES is not set
78# CONFIG_PPC_BPA is not set
79CONFIG_PPC_PMAC=y
80# CONFIG_PPC_MAPLE is not set
81CONFIG_PPC=y
82CONFIG_PPC64=y
83CONFIG_PPC_OF=y
84CONFIG_MPIC=y
85CONFIG_ALTIVEC=y
86CONFIG_KEXEC=y
87CONFIG_U3_DART=y
88CONFIG_PPC_PMAC64=y
89CONFIG_BOOTX_TEXT=y
90CONFIG_POWER4_ONLY=y
91CONFIG_IOMMU_VMERGE=y
92CONFIG_SMP=y
93CONFIG_NR_CPUS=2
94CONFIG_ARCH_SELECT_MEMORY_MODEL=y
95CONFIG_ARCH_FLATMEM_ENABLE=y
96CONFIG_SELECT_MEMORY_MODEL=y
97CONFIG_FLATMEM_MANUAL=y
98# CONFIG_DISCONTIGMEM_MANUAL is not set
99# CONFIG_SPARSEMEM_MANUAL is not set
100CONFIG_FLATMEM=y
101CONFIG_FLAT_NODE_MEM_MAP=y
102# CONFIG_SPARSEMEM_STATIC is not set
103# CONFIG_NUMA is not set
104# CONFIG_SCHED_SMT is not set
105CONFIG_PREEMPT_NONE=y
106# CONFIG_PREEMPT_VOLUNTARY is not set
107# CONFIG_PREEMPT is not set
108# CONFIG_PREEMPT_BKL is not set
109# CONFIG_HZ_100 is not set
110CONFIG_HZ_250=y
111# CONFIG_HZ_1000 is not set
112CONFIG_HZ=250
113CONFIG_GENERIC_HARDIRQS=y
114CONFIG_SECCOMP=y
115CONFIG_BINFMT_ELF=y
116# CONFIG_BINFMT_MISC is not set
117# CONFIG_HOTPLUG_CPU is not set
118CONFIG_PROC_DEVICETREE=y
119# CONFIG_CMDLINE_BOOL is not set
120CONFIG_ISA_DMA_API=y
121
122#
123# Bus Options
124#
125CONFIG_PCI=y
126CONFIG_PCI_DOMAINS=y
127CONFIG_PCI_LEGACY_PROC=y
128# CONFIG_PCI_DEBUG is not set
129
130#
131# PCCARD (PCMCIA/CardBus) support
132#
133# CONFIG_PCCARD is not set
134
135#
136# PCI Hotplug Support
137#
138# CONFIG_HOTPLUG_PCI is not set
139
140#
141# Networking
142#
143CONFIG_NET=y
144
145#
146# Networking options
147#
148CONFIG_PACKET=y
149# CONFIG_PACKET_MMAP is not set
150CONFIG_UNIX=y
151CONFIG_XFRM=y
152CONFIG_XFRM_USER=m
153CONFIG_NET_KEY=m
154CONFIG_INET=y
155CONFIG_IP_MULTICAST=y
156# CONFIG_IP_ADVANCED_ROUTER is not set
157CONFIG_IP_FIB_HASH=y
158# CONFIG_IP_PNP is not set
159CONFIG_NET_IPIP=y
160# CONFIG_NET_IPGRE is not set
161# CONFIG_IP_MROUTE is not set
162# CONFIG_ARPD is not set
163CONFIG_SYN_COOKIES=y
164CONFIG_INET_AH=m
165CONFIG_INET_ESP=m
166CONFIG_INET_IPCOMP=m
167CONFIG_INET_TUNNEL=y
168CONFIG_INET_DIAG=y
169CONFIG_INET_TCP_DIAG=y
170# CONFIG_TCP_CONG_ADVANCED is not set
171CONFIG_TCP_CONG_BIC=y
172
173#
174# IP: Virtual Server Configuration
175#
176# CONFIG_IP_VS is not set
177# CONFIG_IPV6 is not set
178CONFIG_NETFILTER=y
179# CONFIG_NETFILTER_DEBUG is not set
180# CONFIG_NETFILTER_NETLINK is not set
181
182#
183# IP: Netfilter Configuration
184#
185CONFIG_IP_NF_CONNTRACK=m
186CONFIG_IP_NF_CT_ACCT=y
187CONFIG_IP_NF_CONNTRACK_MARK=y
188CONFIG_IP_NF_CONNTRACK_EVENTS=y
189CONFIG_IP_NF_CT_PROTO_SCTP=m
190CONFIG_IP_NF_FTP=m
191CONFIG_IP_NF_IRC=m
192# CONFIG_IP_NF_NETBIOS_NS is not set
193CONFIG_IP_NF_TFTP=m
194CONFIG_IP_NF_AMANDA=m
195# CONFIG_IP_NF_PPTP is not set
196CONFIG_IP_NF_QUEUE=m
197CONFIG_IP_NF_IPTABLES=m
198CONFIG_IP_NF_MATCH_LIMIT=m
199CONFIG_IP_NF_MATCH_IPRANGE=m
200CONFIG_IP_NF_MATCH_MAC=m
201CONFIG_IP_NF_MATCH_PKTTYPE=m
202CONFIG_IP_NF_MATCH_MARK=m
203CONFIG_IP_NF_MATCH_MULTIPORT=m
204CONFIG_IP_NF_MATCH_TOS=m
205CONFIG_IP_NF_MATCH_RECENT=m
206CONFIG_IP_NF_MATCH_ECN=m
207CONFIG_IP_NF_MATCH_DSCP=m
208CONFIG_IP_NF_MATCH_AH_ESP=m
209CONFIG_IP_NF_MATCH_LENGTH=m
210CONFIG_IP_NF_MATCH_TTL=m
211CONFIG_IP_NF_MATCH_TCPMSS=m
212CONFIG_IP_NF_MATCH_HELPER=m
213CONFIG_IP_NF_MATCH_STATE=m
214CONFIG_IP_NF_MATCH_CONNTRACK=m
215CONFIG_IP_NF_MATCH_OWNER=m
216CONFIG_IP_NF_MATCH_ADDRTYPE=m
217CONFIG_IP_NF_MATCH_REALM=m
218CONFIG_IP_NF_MATCH_SCTP=m
219# CONFIG_IP_NF_MATCH_DCCP is not set
220CONFIG_IP_NF_MATCH_COMMENT=m
221CONFIG_IP_NF_MATCH_CONNMARK=m
222CONFIG_IP_NF_MATCH_CONNBYTES=m
223CONFIG_IP_NF_MATCH_HASHLIMIT=m
224CONFIG_IP_NF_MATCH_STRING=m
225CONFIG_IP_NF_FILTER=m
226CONFIG_IP_NF_TARGET_REJECT=m
227CONFIG_IP_NF_TARGET_LOG=m
228CONFIG_IP_NF_TARGET_ULOG=m
229CONFIG_IP_NF_TARGET_TCPMSS=m
230CONFIG_IP_NF_TARGET_NFQUEUE=m
231CONFIG_IP_NF_NAT=m
232CONFIG_IP_NF_NAT_NEEDED=y
233CONFIG_IP_NF_TARGET_MASQUERADE=m
234CONFIG_IP_NF_TARGET_REDIRECT=m
235CONFIG_IP_NF_TARGET_NETMAP=m
236CONFIG_IP_NF_TARGET_SAME=m
237CONFIG_IP_NF_NAT_SNMP_BASIC=m
238CONFIG_IP_NF_NAT_IRC=m
239CONFIG_IP_NF_NAT_FTP=m
240CONFIG_IP_NF_NAT_TFTP=m
241CONFIG_IP_NF_NAT_AMANDA=m
242CONFIG_IP_NF_MANGLE=m
243CONFIG_IP_NF_TARGET_TOS=m
244CONFIG_IP_NF_TARGET_ECN=m
245CONFIG_IP_NF_TARGET_DSCP=m
246CONFIG_IP_NF_TARGET_MARK=m
247CONFIG_IP_NF_TARGET_CLASSIFY=m
248CONFIG_IP_NF_TARGET_TTL=m
249CONFIG_IP_NF_TARGET_CONNMARK=m
250CONFIG_IP_NF_TARGET_CLUSTERIP=m
251CONFIG_IP_NF_RAW=m
252CONFIG_IP_NF_TARGET_NOTRACK=m
253CONFIG_IP_NF_ARPTABLES=m
254CONFIG_IP_NF_ARPFILTER=m
255CONFIG_IP_NF_ARP_MANGLE=m
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set
266# CONFIG_ATM is not set
267# CONFIG_BRIDGE is not set
268# CONFIG_VLAN_8021Q is not set
269# CONFIG_DECNET is not set
270CONFIG_LLC=y
271# CONFIG_LLC2 is not set
272# CONFIG_IPX is not set
273# CONFIG_ATALK is not set
274# CONFIG_X25 is not set
275# CONFIG_LAPB is not set
276# CONFIG_NET_DIVERT is not set
277# CONFIG_ECONET is not set
278# CONFIG_WAN_ROUTER is not set
279# CONFIG_NET_SCHED is not set
280CONFIG_NET_CLS_ROUTE=y
281
282#
283# Network testing
284#
285# CONFIG_NET_PKTGEN is not set
286# CONFIG_HAMRADIO is not set
287# CONFIG_IRDA is not set
288# CONFIG_BT is not set
289# CONFIG_IEEE80211 is not set
290
291#
292# Device Drivers
293#
294
295#
296# Generic Driver Options
297#
298CONFIG_STANDALONE=y
299CONFIG_PREVENT_FIRMWARE_BUILD=y
300CONFIG_FW_LOADER=y
301# CONFIG_DEBUG_DRIVER is not set
302
303#
304# Connector - unified userspace <-> kernelspace linker
305#
306# CONFIG_CONNECTOR is not set
307
308#
309# Memory Technology Devices (MTD)
310#
311# CONFIG_MTD is not set
312
313#
314# Parallel port support
315#
316# CONFIG_PARPORT is not set
317
318#
319# Plug and Play support
320#
321
322#
323# Block devices
324#
325# CONFIG_BLK_DEV_FD is not set
326# CONFIG_BLK_CPQ_DA is not set
327# CONFIG_BLK_CPQ_CISS_DA is not set
328# CONFIG_BLK_DEV_DAC960 is not set
329# CONFIG_BLK_DEV_UMEM is not set
330# CONFIG_BLK_DEV_COW_COMMON is not set
331CONFIG_BLK_DEV_LOOP=y
332# CONFIG_BLK_DEV_CRYPTOLOOP is not set
333CONFIG_BLK_DEV_NBD=m
334# CONFIG_BLK_DEV_SX8 is not set
335# CONFIG_BLK_DEV_UB is not set
336CONFIG_BLK_DEV_RAM=y
337CONFIG_BLK_DEV_RAM_COUNT=16
338CONFIG_BLK_DEV_RAM_SIZE=65536
339CONFIG_BLK_DEV_INITRD=y
340CONFIG_CDROM_PKTCDVD=m
341CONFIG_CDROM_PKTCDVD_BUFFERS=8
342# CONFIG_CDROM_PKTCDVD_WCACHE is not set
343
344#
345# IO Schedulers
346#
347CONFIG_IOSCHED_NOOP=y
348CONFIG_IOSCHED_AS=y
349CONFIG_IOSCHED_DEADLINE=y
350CONFIG_IOSCHED_CFQ=y
351# CONFIG_ATA_OVER_ETH is not set
352
353#
354# ATA/ATAPI/MFM/RLL support
355#
356CONFIG_IDE=y
357CONFIG_BLK_DEV_IDE=y
358
359#
360# Please see Documentation/ide.txt for help/info on IDE drives
361#
362# CONFIG_BLK_DEV_IDE_SATA is not set
363CONFIG_BLK_DEV_IDEDISK=y
364# CONFIG_IDEDISK_MULTI_MODE is not set
365CONFIG_BLK_DEV_IDECD=y
366# CONFIG_BLK_DEV_IDETAPE is not set
367# CONFIG_BLK_DEV_IDEFLOPPY is not set
368# CONFIG_BLK_DEV_IDESCSI is not set
369# CONFIG_IDE_TASK_IOCTL is not set
370
371#
372# IDE chipset support/bugfixes
373#
374CONFIG_IDE_GENERIC=y
375CONFIG_BLK_DEV_IDEPCI=y
376# CONFIG_IDEPCI_SHARE_IRQ is not set
377# CONFIG_BLK_DEV_OFFBOARD is not set
378# CONFIG_BLK_DEV_GENERIC is not set
379# CONFIG_BLK_DEV_OPTI621 is not set
380# CONFIG_BLK_DEV_SL82C105 is not set
381CONFIG_BLK_DEV_IDEDMA_PCI=y
382# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
383CONFIG_IDEDMA_PCI_AUTO=y
384# CONFIG_IDEDMA_ONLYDISK is not set
385# CONFIG_BLK_DEV_AEC62XX is not set
386# CONFIG_BLK_DEV_ALI15X3 is not set
387# CONFIG_BLK_DEV_AMD74XX is not set
388# CONFIG_BLK_DEV_CMD64X is not set
389# CONFIG_BLK_DEV_TRIFLEX is not set
390# CONFIG_BLK_DEV_CY82C693 is not set
391# CONFIG_BLK_DEV_CS5520 is not set
392# CONFIG_BLK_DEV_CS5530 is not set
393# CONFIG_BLK_DEV_HPT34X is not set
394# CONFIG_BLK_DEV_HPT366 is not set
395# CONFIG_BLK_DEV_SC1200 is not set
396# CONFIG_BLK_DEV_PIIX is not set
397# CONFIG_BLK_DEV_IT821X is not set
398# CONFIG_BLK_DEV_NS87415 is not set
399# CONFIG_BLK_DEV_PDC202XX_OLD is not set
400# CONFIG_BLK_DEV_PDC202XX_NEW is not set
401# CONFIG_BLK_DEV_SVWKS is not set
402# CONFIG_BLK_DEV_SIIMAGE is not set
403# CONFIG_BLK_DEV_SLC90E66 is not set
404# CONFIG_BLK_DEV_TRM290 is not set
405# CONFIG_BLK_DEV_VIA82CXXX is not set
406CONFIG_BLK_DEV_IDE_PMAC=y
407CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
408CONFIG_BLK_DEV_IDEDMA_PMAC=y
409# CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set
410# CONFIG_IDE_ARM is not set
411CONFIG_BLK_DEV_IDEDMA=y
412# CONFIG_IDEDMA_IVB is not set
413CONFIG_IDEDMA_AUTO=y
414# CONFIG_BLK_DEV_HD is not set
415
416#
417# SCSI device support
418#
419# CONFIG_RAID_ATTRS is not set
420CONFIG_SCSI=y
421CONFIG_SCSI_PROC_FS=y
422
423#
424# SCSI support type (disk, tape, CD-ROM)
425#
426CONFIG_BLK_DEV_SD=y
427CONFIG_CHR_DEV_ST=y
428# CONFIG_CHR_DEV_OSST is not set
429CONFIG_BLK_DEV_SR=y
430CONFIG_BLK_DEV_SR_VENDOR=y
431CONFIG_CHR_DEV_SG=y
432# CONFIG_CHR_DEV_SCH is not set
433
434#
435# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
436#
437CONFIG_SCSI_MULTI_LUN=y
438CONFIG_SCSI_CONSTANTS=y
439# CONFIG_SCSI_LOGGING is not set
440
441#
442# SCSI Transport Attributes
443#
444CONFIG_SCSI_SPI_ATTRS=y
445# CONFIG_SCSI_FC_ATTRS is not set
446# CONFIG_SCSI_ISCSI_ATTRS is not set
447# CONFIG_SCSI_SAS_ATTRS is not set
448
449#
450# SCSI low-level drivers
451#
452# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
453# CONFIG_SCSI_3W_9XXX is not set
454# CONFIG_SCSI_ACARD is not set
455# CONFIG_SCSI_AACRAID is not set
456# CONFIG_SCSI_AIC7XXX is not set
457# CONFIG_SCSI_AIC7XXX_OLD is not set
458# CONFIG_SCSI_AIC79XX is not set
459# CONFIG_MEGARAID_NEWGEN is not set
460# CONFIG_MEGARAID_LEGACY is not set
461# CONFIG_MEGARAID_SAS is not set
462CONFIG_SCSI_SATA=y
463# CONFIG_SCSI_SATA_AHCI is not set
464CONFIG_SCSI_SATA_SVW=y
465# CONFIG_SCSI_ATA_PIIX is not set
466# CONFIG_SCSI_SATA_MV is not set
467# CONFIG_SCSI_SATA_NV is not set
468# CONFIG_SCSI_SATA_PROMISE is not set
469# CONFIG_SCSI_SATA_QSTOR is not set
470# CONFIG_SCSI_SATA_SX4 is not set
471# CONFIG_SCSI_SATA_SIL is not set
472# CONFIG_SCSI_SATA_SIS is not set
473# CONFIG_SCSI_SATA_ULI is not set
474# CONFIG_SCSI_SATA_VIA is not set
475# CONFIG_SCSI_SATA_VITESSE is not set
476# CONFIG_SCSI_BUSLOGIC is not set
477# CONFIG_SCSI_DMX3191D is not set
478# CONFIG_SCSI_EATA is not set
479# CONFIG_SCSI_FUTURE_DOMAIN is not set
480# CONFIG_SCSI_GDTH is not set
481# CONFIG_SCSI_IPS is not set
482# CONFIG_SCSI_INITIO is not set
483# CONFIG_SCSI_INIA100 is not set
484# CONFIG_SCSI_SYM53C8XX_2 is not set
485# CONFIG_SCSI_IPR is not set
486# CONFIG_SCSI_QLOGIC_FC is not set
487# CONFIG_SCSI_QLOGIC_1280 is not set
488CONFIG_SCSI_QLA2XXX=y
489# CONFIG_SCSI_QLA21XX is not set
490# CONFIG_SCSI_QLA22XX is not set
491# CONFIG_SCSI_QLA2300 is not set
492# CONFIG_SCSI_QLA2322 is not set
493# CONFIG_SCSI_QLA6312 is not set
494# CONFIG_SCSI_QLA24XX is not set
495# CONFIG_SCSI_LPFC is not set
496# CONFIG_SCSI_DC395x is not set
497# CONFIG_SCSI_DC390T is not set
498# CONFIG_SCSI_DEBUG is not set
499
500#
501# Multi-device support (RAID and LVM)
502#
503CONFIG_MD=y
504CONFIG_BLK_DEV_MD=y
505CONFIG_MD_LINEAR=y
506CONFIG_MD_RAID0=y
507CONFIG_MD_RAID1=y
508CONFIG_MD_RAID10=m
509CONFIG_MD_RAID5=y
510CONFIG_MD_RAID6=m
511CONFIG_MD_MULTIPATH=m
512CONFIG_MD_FAULTY=m
513CONFIG_BLK_DEV_DM=y
514CONFIG_DM_CRYPT=m
515CONFIG_DM_SNAPSHOT=m
516CONFIG_DM_MIRROR=m
517CONFIG_DM_ZERO=m
518# CONFIG_DM_MULTIPATH is not set
519
520#
521# Fusion MPT device support
522#
523# CONFIG_FUSION is not set
524# CONFIG_FUSION_SPI is not set
525# CONFIG_FUSION_FC is not set
526# CONFIG_FUSION_SAS is not set
527
528#
529# IEEE 1394 (FireWire) support
530#
531CONFIG_IEEE1394=y
532
533#
534# Subsystem Options
535#
536# CONFIG_IEEE1394_VERBOSEDEBUG is not set
537CONFIG_IEEE1394_OUI_DB=y
538CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
539CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
540# CONFIG_IEEE1394_EXPORT_FULL_API is not set
541
542#
543# Device Drivers
544#
545# CONFIG_IEEE1394_PCILYNX is not set
546CONFIG_IEEE1394_OHCI1394=y
547
548#
549# Protocol Drivers
550#
551CONFIG_IEEE1394_VIDEO1394=m
552CONFIG_IEEE1394_SBP2=m
553# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
554CONFIG_IEEE1394_ETH1394=m
555CONFIG_IEEE1394_DV1394=m
556CONFIG_IEEE1394_RAWIO=y
557# CONFIG_IEEE1394_CMP is not set
558
559#
560# I2O device support
561#
562# CONFIG_I2O is not set
563
564#
565# Macintosh device drivers
566#
567CONFIG_ADB_PMU=y
568CONFIG_PMAC_SMU=y
569CONFIG_THERM_PM72=y
570
571#
572# Network device support
573#
574CONFIG_NETDEVICES=y
575CONFIG_DUMMY=m
576CONFIG_BONDING=m
577# CONFIG_EQUALIZER is not set
578CONFIG_TUN=m
579
580#
581# ARCnet devices
582#
583# CONFIG_ARCNET is not set
584
585#
586# PHY device support
587#
588# CONFIG_PHYLIB is not set
589
590#
591# Ethernet (10 or 100Mbit)
592#
593CONFIG_NET_ETHERNET=y
594CONFIG_MII=y
595# CONFIG_HAPPYMEAL is not set
596CONFIG_SUNGEM=y
597# CONFIG_CASSINI is not set
598# CONFIG_NET_VENDOR_3COM is not set
599
600#
601# Tulip family network device support
602#
603# CONFIG_NET_TULIP is not set
604# CONFIG_HP100 is not set
605# CONFIG_NET_PCI is not set
606
607#
608# Ethernet (1000 Mbit)
609#
610CONFIG_ACENIC=y
611CONFIG_ACENIC_OMIT_TIGON_I=y
612# CONFIG_DL2K is not set
613CONFIG_E1000=y
614# CONFIG_E1000_NAPI is not set
615# CONFIG_NS83820 is not set
616# CONFIG_HAMACHI is not set
617# CONFIG_YELLOWFIN is not set
618# CONFIG_R8169 is not set
619# CONFIG_SIS190 is not set
620# CONFIG_SKGE is not set
621# CONFIG_SK98LIN is not set
622CONFIG_TIGON3=m
623# CONFIG_BNX2 is not set
624# CONFIG_MV643XX_ETH is not set
625
626#
627# Ethernet (10000 Mbit)
628#
629# CONFIG_CHELSIO_T1 is not set
630# CONFIG_IXGB is not set
631# CONFIG_S2IO is not set
632
633#
634# Token Ring devices
635#
636CONFIG_TR=y
637CONFIG_IBMOL=y
638# CONFIG_3C359 is not set
639# CONFIG_TMS380TR is not set
640
641#
642# Wireless LAN (non-hamradio)
643#
644# CONFIG_NET_RADIO is not set
645
646#
647# Wan interfaces
648#
649# CONFIG_WAN is not set
650# CONFIG_FDDI is not set
651# CONFIG_HIPPI is not set
652CONFIG_PPP=m
653# CONFIG_PPP_MULTILINK is not set
654# CONFIG_PPP_FILTER is not set
655CONFIG_PPP_ASYNC=m
656CONFIG_PPP_SYNC_TTY=m
657CONFIG_PPP_DEFLATE=m
658CONFIG_PPP_BSDCOMP=m
659CONFIG_PPPOE=m
660# CONFIG_SLIP is not set
661# CONFIG_NET_FC is not set
662# CONFIG_SHAPER is not set
663# CONFIG_NETCONSOLE is not set
664# CONFIG_NETPOLL is not set
665# CONFIG_NET_POLL_CONTROLLER is not set
666
667#
668# ISDN subsystem
669#
670# CONFIG_ISDN is not set
671
672#
673# Telephony Support
674#
675# CONFIG_PHONE is not set
676
677#
678# Input device support
679#
680CONFIG_INPUT=y
681
682#
683# Userland interfaces
684#
685CONFIG_INPUT_MOUSEDEV=y
686# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
687CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
688CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
689CONFIG_INPUT_JOYDEV=m
690# CONFIG_INPUT_TSDEV is not set
691CONFIG_INPUT_EVDEV=y
692# CONFIG_INPUT_EVBUG is not set
693
694#
695# Input Device Drivers
696#
697CONFIG_INPUT_KEYBOARD=y
698# CONFIG_KEYBOARD_ATKBD is not set
699# CONFIG_KEYBOARD_SUNKBD is not set
700# CONFIG_KEYBOARD_LKKBD is not set
701# CONFIG_KEYBOARD_XTKBD is not set
702# CONFIG_KEYBOARD_NEWTON is not set
703CONFIG_INPUT_MOUSE=y
704# CONFIG_MOUSE_PS2 is not set
705# CONFIG_MOUSE_SERIAL is not set
706# CONFIG_MOUSE_VSXXXAA is not set
707# CONFIG_INPUT_JOYSTICK is not set
708# CONFIG_INPUT_TOUCHSCREEN is not set
709# CONFIG_INPUT_MISC is not set
710
711#
712# Hardware I/O ports
713#
714CONFIG_SERIO=y
715# CONFIG_SERIO_I8042 is not set
716# CONFIG_SERIO_SERPORT is not set
717# CONFIG_SERIO_PCIPS2 is not set
718# CONFIG_SERIO_RAW is not set
719# CONFIG_GAMEPORT is not set
720
721#
722# Character devices
723#
724CONFIG_VT=y
725CONFIG_VT_CONSOLE=y
726CONFIG_HW_CONSOLE=y
727# CONFIG_SERIAL_NONSTANDARD is not set
728
729#
730# Serial drivers
731#
732# CONFIG_SERIAL_8250 is not set
733
734#
735# Non-8250 serial port support
736#
737# CONFIG_SERIAL_PMACZILOG is not set
738# CONFIG_SERIAL_JSM is not set
739CONFIG_UNIX98_PTYS=y
740CONFIG_LEGACY_PTYS=y
741CONFIG_LEGACY_PTY_COUNT=256
742
743#
744# IPMI
745#
746# CONFIG_IPMI_HANDLER is not set
747
748#
749# Watchdog Cards
750#
751# CONFIG_WATCHDOG is not set
752# CONFIG_RTC is not set
753# CONFIG_DTLK is not set
754# CONFIG_R3964 is not set
755# CONFIG_APPLICOM is not set
756
757#
758# Ftape, the floppy tape device driver
759#
760CONFIG_AGP=m
761CONFIG_AGP_UNINORTH=m
762# CONFIG_DRM is not set
763CONFIG_RAW_DRIVER=y
764CONFIG_MAX_RAW_DEVS=256
765# CONFIG_HANGCHECK_TIMER is not set
766
767#
768# TPM devices
769#
770# CONFIG_TCG_TPM is not set
771
772#
773# I2C support
774#
775CONFIG_I2C=y
776CONFIG_I2C_CHARDEV=y
777
778#
779# I2C Algorithms
780#
781CONFIG_I2C_ALGOBIT=y
782# CONFIG_I2C_ALGOPCF is not set
783# CONFIG_I2C_ALGOPCA is not set
784
785#
786# I2C Hardware Bus support
787#
788# CONFIG_I2C_ALI1535 is not set
789# CONFIG_I2C_ALI1563 is not set
790# CONFIG_I2C_ALI15X3 is not set
791# CONFIG_I2C_AMD756 is not set
792# CONFIG_I2C_AMD8111 is not set
793# CONFIG_I2C_I801 is not set
794# CONFIG_I2C_I810 is not set
795# CONFIG_I2C_PIIX4 is not set
796CONFIG_I2C_KEYWEST=y
797CONFIG_I2C_PMAC_SMU=y
798# CONFIG_I2C_NFORCE2 is not set
799# CONFIG_I2C_PARPORT_LIGHT is not set
800# CONFIG_I2C_PROSAVAGE is not set
801# CONFIG_I2C_SAVAGE4 is not set
802# CONFIG_SCx200_ACB is not set
803# CONFIG_I2C_SIS5595 is not set
804# CONFIG_I2C_SIS630 is not set
805# CONFIG_I2C_SIS96X is not set
806# CONFIG_I2C_STUB is not set
807# CONFIG_I2C_VIA is not set
808# CONFIG_I2C_VIAPRO is not set
809# CONFIG_I2C_VOODOO3 is not set
810# CONFIG_I2C_PCA_ISA is not set
811
812#
813# Miscellaneous I2C Chip support
814#
815# CONFIG_SENSORS_DS1337 is not set
816# CONFIG_SENSORS_DS1374 is not set
817# CONFIG_SENSORS_EEPROM is not set
818# CONFIG_SENSORS_PCF8574 is not set
819# CONFIG_SENSORS_PCA9539 is not set
820# CONFIG_SENSORS_PCF8591 is not set
821# CONFIG_SENSORS_RTC8564 is not set
822# CONFIG_SENSORS_MAX6875 is not set
823# CONFIG_I2C_DEBUG_CORE is not set
824# CONFIG_I2C_DEBUG_ALGO is not set
825# CONFIG_I2C_DEBUG_BUS is not set
826# CONFIG_I2C_DEBUG_CHIP is not set
827
828#
829# Dallas's 1-wire bus
830#
831# CONFIG_W1 is not set
832
833#
834# Hardware Monitoring support
835#
836# CONFIG_HWMON is not set
837# CONFIG_HWMON_VID is not set
838
839#
840# Misc devices
841#
842
843#
844# Multimedia Capabilities Port drivers
845#
846
847#
848# Multimedia devices
849#
850# CONFIG_VIDEO_DEV is not set
851
852#
853# Digital Video Broadcasting Devices
854#
855# CONFIG_DVB is not set
856
857#
858# Graphics support
859#
860CONFIG_FB=y
861CONFIG_FB_CFB_FILLRECT=y
862CONFIG_FB_CFB_COPYAREA=y
863CONFIG_FB_CFB_IMAGEBLIT=y
864CONFIG_FB_SOFT_CURSOR=y
865CONFIG_FB_MACMODES=y
866CONFIG_FB_MODE_HELPERS=y
867CONFIG_FB_TILEBLITTING=y
868# CONFIG_FB_CIRRUS is not set
869# CONFIG_FB_PM2 is not set
870# CONFIG_FB_CYBER2000 is not set
871CONFIG_FB_OF=y
872# CONFIG_FB_CONTROL is not set
873# CONFIG_FB_PLATINUM is not set
874# CONFIG_FB_VALKYRIE is not set
875# CONFIG_FB_CT65550 is not set
876# CONFIG_FB_ASILIANT is not set
877# CONFIG_FB_IMSTT is not set
878# CONFIG_FB_VGA16 is not set
879# CONFIG_FB_NVIDIA is not set
880CONFIG_FB_RIVA=y
881# CONFIG_FB_RIVA_I2C is not set
882# CONFIG_FB_RIVA_DEBUG is not set
883# CONFIG_FB_MATROX is not set
884# CONFIG_FB_RADEON_OLD is not set
885CONFIG_FB_RADEON=y
886CONFIG_FB_RADEON_I2C=y
887# CONFIG_FB_RADEON_DEBUG is not set
888# CONFIG_FB_ATY128 is not set
889# CONFIG_FB_ATY is not set
890# CONFIG_FB_SAVAGE is not set
891# CONFIG_FB_SIS is not set
892# CONFIG_FB_NEOMAGIC is not set
893# CONFIG_FB_KYRO is not set
894# CONFIG_FB_3DFX is not set
895# CONFIG_FB_VOODOO1 is not set
896# CONFIG_FB_CYBLA is not set
897# CONFIG_FB_TRIDENT is not set
898# CONFIG_FB_S1D13XXX is not set
899# CONFIG_FB_VIRTUAL is not set
900
901#
902# Console display driver support
903#
904# CONFIG_VGA_CONSOLE is not set
905CONFIG_DUMMY_CONSOLE=y
906CONFIG_FRAMEBUFFER_CONSOLE=y
907# CONFIG_FONTS is not set
908CONFIG_FONT_8x8=y
909CONFIG_FONT_8x16=y
910
911#
912# Logo configuration
913#
914CONFIG_LOGO=y
915CONFIG_LOGO_LINUX_MONO=y
916CONFIG_LOGO_LINUX_VGA16=y
917CONFIG_LOGO_LINUX_CLUT224=y
918CONFIG_BACKLIGHT_LCD_SUPPORT=y
919CONFIG_BACKLIGHT_CLASS_DEVICE=m
920CONFIG_BACKLIGHT_DEVICE=y
921CONFIG_LCD_CLASS_DEVICE=m
922CONFIG_LCD_DEVICE=y
923
924#
925# Sound
926#
927# CONFIG_SOUND is not set
928
929#
930# USB support
931#
932CONFIG_USB_ARCH_HAS_HCD=y
933CONFIG_USB_ARCH_HAS_OHCI=y
934CONFIG_USB=y
935# CONFIG_USB_DEBUG is not set
936
937#
938# Miscellaneous USB options
939#
940CONFIG_USB_DEVICEFS=y
941# CONFIG_USB_BANDWIDTH is not set
942# CONFIG_USB_DYNAMIC_MINORS is not set
943# CONFIG_USB_OTG is not set
944
945#
946# USB Host Controller Drivers
947#
948CONFIG_USB_EHCI_HCD=y
949# CONFIG_USB_EHCI_SPLIT_ISO is not set
950# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
951# CONFIG_USB_ISP116X_HCD is not set
952CONFIG_USB_OHCI_HCD=y
953# CONFIG_USB_OHCI_BIG_ENDIAN is not set
954CONFIG_USB_OHCI_LITTLE_ENDIAN=y
955# CONFIG_USB_UHCI_HCD is not set
956# CONFIG_USB_SL811_HCD is not set
957
958#
959# USB Device Class drivers
960#
961# CONFIG_USB_BLUETOOTH_TTY is not set
962CONFIG_USB_ACM=m
963CONFIG_USB_PRINTER=y
964
965#
966# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
967#
968CONFIG_USB_STORAGE=y
969# CONFIG_USB_STORAGE_DEBUG is not set
970CONFIG_USB_STORAGE_DATAFAB=y
971CONFIG_USB_STORAGE_FREECOM=y
972CONFIG_USB_STORAGE_ISD200=y
973CONFIG_USB_STORAGE_DPCM=y
974# CONFIG_USB_STORAGE_USBAT is not set
975CONFIG_USB_STORAGE_SDDR09=y
976CONFIG_USB_STORAGE_SDDR55=y
977CONFIG_USB_STORAGE_JUMPSHOT=y
978# CONFIG_USB_STORAGE_ONETOUCH is not set
979
980#
981# USB Input Devices
982#
983CONFIG_USB_HID=y
984CONFIG_USB_HIDINPUT=y
985CONFIG_HID_FF=y
986CONFIG_HID_PID=y
987CONFIG_LOGITECH_FF=y
988CONFIG_THRUSTMASTER_FF=y
989CONFIG_USB_HIDDEV=y
990# CONFIG_USB_AIPTEK is not set
991# CONFIG_USB_WACOM is not set
992# CONFIG_USB_ACECAD is not set
993# CONFIG_USB_KBTAB is not set
994# CONFIG_USB_POWERMATE is not set
995# CONFIG_USB_MTOUCH is not set
996# CONFIG_USB_ITMTOUCH is not set
997# CONFIG_USB_EGALAX is not set
998# CONFIG_USB_YEALINK is not set
999# CONFIG_USB_XPAD is not set
1000# CONFIG_USB_ATI_REMOTE is not set
1001# CONFIG_USB_KEYSPAN_REMOTE is not set
1002# CONFIG_USB_APPLETOUCH is not set
1003
1004#
1005# USB Imaging devices
1006#
1007# CONFIG_USB_MDC800 is not set
1008# CONFIG_USB_MICROTEK is not set
1009
1010#
1011# USB Multimedia devices
1012#
1013# CONFIG_USB_DABUSB is not set
1014
1015#
1016# Video4Linux support is needed for USB Multimedia device support
1017#
1018
1019#
1020# USB Network Adapters
1021#
1022CONFIG_USB_CATC=m
1023CONFIG_USB_KAWETH=m
1024CONFIG_USB_PEGASUS=m
1025CONFIG_USB_RTL8150=m
1026CONFIG_USB_USBNET=m
1027# CONFIG_USB_NET_AX8817X is not set
1028CONFIG_USB_NET_CDCETHER=m
1029# CONFIG_USB_NET_GL620A is not set
1030# CONFIG_USB_NET_NET1080 is not set
1031# CONFIG_USB_NET_PLUSB is not set
1032# CONFIG_USB_NET_RNDIS_HOST is not set
1033# CONFIG_USB_NET_CDC_SUBSET is not set
1034# CONFIG_USB_NET_ZAURUS is not set
1035CONFIG_USB_MON=y
1036
1037#
1038# USB port drivers
1039#
1040
1041#
1042# USB Serial Converter support
1043#
1044CONFIG_USB_SERIAL=m
1045CONFIG_USB_SERIAL_GENERIC=y
1046# CONFIG_USB_SERIAL_AIRPRIME is not set
1047CONFIG_USB_SERIAL_BELKIN=m
1048CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1049# CONFIG_USB_SERIAL_CP2101 is not set
1050CONFIG_USB_SERIAL_CYPRESS_M8=m
1051CONFIG_USB_SERIAL_EMPEG=m
1052CONFIG_USB_SERIAL_FTDI_SIO=m
1053CONFIG_USB_SERIAL_VISOR=m
1054CONFIG_USB_SERIAL_IPAQ=m
1055CONFIG_USB_SERIAL_IR=m
1056CONFIG_USB_SERIAL_EDGEPORT=m
1057CONFIG_USB_SERIAL_EDGEPORT_TI=m
1058CONFIG_USB_SERIAL_GARMIN=m
1059CONFIG_USB_SERIAL_IPW=m
1060CONFIG_USB_SERIAL_KEYSPAN_PDA=m
1061CONFIG_USB_SERIAL_KEYSPAN=m
1062CONFIG_USB_SERIAL_KEYSPAN_MPR=y
1063CONFIG_USB_SERIAL_KEYSPAN_USA28=y
1064CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
1065CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
1066CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
1067CONFIG_USB_SERIAL_KEYSPAN_USA19=y
1068CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
1069CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
1070CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
1071CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
1072CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
1073CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1074CONFIG_USB_SERIAL_KLSI=m
1075CONFIG_USB_SERIAL_KOBIL_SCT=m
1076CONFIG_USB_SERIAL_MCT_U232=m
1077CONFIG_USB_SERIAL_PL2303=m
1078# CONFIG_USB_SERIAL_HP4X is not set
1079CONFIG_USB_SERIAL_SAFE=m
1080CONFIG_USB_SERIAL_SAFE_PADDED=y
1081CONFIG_USB_SERIAL_TI=m
1082CONFIG_USB_SERIAL_CYBERJACK=m
1083CONFIG_USB_SERIAL_XIRCOM=m
1084CONFIG_USB_SERIAL_OMNINET=m
1085CONFIG_USB_EZUSB=y
1086
1087#
1088# USB Miscellaneous drivers
1089#
1090# CONFIG_USB_EMI62 is not set
1091# CONFIG_USB_EMI26 is not set
1092# CONFIG_USB_AUERSWALD is not set
1093# CONFIG_USB_RIO500 is not set
1094# CONFIG_USB_LEGOTOWER is not set
1095# CONFIG_USB_LCD is not set
1096# CONFIG_USB_LED is not set
1097# CONFIG_USB_CYTHERM is not set
1098# CONFIG_USB_PHIDGETKIT is not set
1099# CONFIG_USB_PHIDGETSERVO is not set
1100# CONFIG_USB_IDMOUSE is not set
1101# CONFIG_USB_SISUSBVGA is not set
1102# CONFIG_USB_LD is not set
1103# CONFIG_USB_TEST is not set
1104
1105#
1106# USB DSL modem support
1107#
1108
1109#
1110# USB Gadget Support
1111#
1112# CONFIG_USB_GADGET is not set
1113
1114#
1115# MMC/SD Card support
1116#
1117# CONFIG_MMC is not set
1118
1119#
1120# InfiniBand support
1121#
1122# CONFIG_INFINIBAND is not set
1123
1124#
1125# SN Devices
1126#
1127
1128#
1129# File systems
1130#
1131CONFIG_EXT2_FS=y
1132CONFIG_EXT2_FS_XATTR=y
1133CONFIG_EXT2_FS_POSIX_ACL=y
1134CONFIG_EXT2_FS_SECURITY=y
1135CONFIG_EXT2_FS_XIP=y
1136CONFIG_FS_XIP=y
1137CONFIG_EXT3_FS=y
1138CONFIG_EXT3_FS_XATTR=y
1139CONFIG_EXT3_FS_POSIX_ACL=y
1140CONFIG_EXT3_FS_SECURITY=y
1141CONFIG_JBD=y
1142# CONFIG_JBD_DEBUG is not set
1143CONFIG_FS_MBCACHE=y
1144CONFIG_REISERFS_FS=y
1145# CONFIG_REISERFS_CHECK is not set
1146# CONFIG_REISERFS_PROC_INFO is not set
1147CONFIG_REISERFS_FS_XATTR=y
1148CONFIG_REISERFS_FS_POSIX_ACL=y
1149CONFIG_REISERFS_FS_SECURITY=y
1150# CONFIG_JFS_FS is not set
1151CONFIG_FS_POSIX_ACL=y
1152CONFIG_XFS_FS=m
1153CONFIG_XFS_EXPORT=y
1154# CONFIG_XFS_QUOTA is not set
1155CONFIG_XFS_SECURITY=y
1156CONFIG_XFS_POSIX_ACL=y
1157# CONFIG_XFS_RT is not set
1158# CONFIG_MINIX_FS is not set
1159# CONFIG_ROMFS_FS is not set
1160CONFIG_INOTIFY=y
1161# CONFIG_QUOTA is not set
1162CONFIG_DNOTIFY=y
1163CONFIG_AUTOFS_FS=m
1164# CONFIG_AUTOFS4_FS is not set
1165# CONFIG_FUSE_FS is not set
1166
1167#
1168# CD-ROM/DVD Filesystems
1169#
1170CONFIG_ISO9660_FS=y
1171CONFIG_JOLIET=y
1172CONFIG_ZISOFS=y
1173CONFIG_ZISOFS_FS=y
1174CONFIG_UDF_FS=m
1175CONFIG_UDF_NLS=y
1176
1177#
1178# DOS/FAT/NT Filesystems
1179#
1180CONFIG_FAT_FS=y
1181CONFIG_MSDOS_FS=y
1182CONFIG_VFAT_FS=y
1183CONFIG_FAT_DEFAULT_CODEPAGE=437
1184CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1185# CONFIG_NTFS_FS is not set
1186
1187#
1188# Pseudo filesystems
1189#
1190CONFIG_PROC_FS=y
1191CONFIG_PROC_KCORE=y
1192CONFIG_SYSFS=y
1193CONFIG_TMPFS=y
1194CONFIG_HUGETLBFS=y
1195CONFIG_HUGETLB_PAGE=y
1196CONFIG_RAMFS=y
1197# CONFIG_RELAYFS_FS is not set
1198
1199#
1200# Miscellaneous filesystems
1201#
1202# CONFIG_ADFS_FS is not set
1203# CONFIG_AFFS_FS is not set
1204CONFIG_HFS_FS=m
1205CONFIG_HFSPLUS_FS=m
1206# CONFIG_BEFS_FS is not set
1207# CONFIG_BFS_FS is not set
1208# CONFIG_EFS_FS is not set
1209CONFIG_CRAMFS=y
1210# CONFIG_VXFS_FS is not set
1211# CONFIG_HPFS_FS is not set
1212# CONFIG_QNX4FS_FS is not set
1213# CONFIG_SYSV_FS is not set
1214# CONFIG_UFS_FS is not set
1215
1216#
1217# Network File Systems
1218#
1219CONFIG_NFS_FS=y
1220CONFIG_NFS_V3=y
1221CONFIG_NFS_V3_ACL=y
1222CONFIG_NFS_V4=y
1223# CONFIG_NFS_DIRECTIO is not set
1224CONFIG_NFSD=y
1225CONFIG_NFSD_V2_ACL=y
1226CONFIG_NFSD_V3=y
1227CONFIG_NFSD_V3_ACL=y
1228CONFIG_NFSD_V4=y
1229CONFIG_NFSD_TCP=y
1230CONFIG_LOCKD=y
1231CONFIG_LOCKD_V4=y
1232CONFIG_EXPORTFS=y
1233CONFIG_NFS_ACL_SUPPORT=y
1234CONFIG_NFS_COMMON=y
1235CONFIG_SUNRPC=y
1236CONFIG_SUNRPC_GSS=y
1237CONFIG_RPCSEC_GSS_KRB5=y
1238# CONFIG_RPCSEC_GSS_SPKM3 is not set
1239# CONFIG_SMB_FS is not set
1240CONFIG_CIFS=m
1241# CONFIG_CIFS_STATS is not set
1242# CONFIG_CIFS_XATTR is not set
1243# CONFIG_CIFS_EXPERIMENTAL is not set
1244# CONFIG_NCP_FS is not set
1245# CONFIG_CODA_FS is not set
1246# CONFIG_AFS_FS is not set
1247# CONFIG_9P_FS is not set
1248
1249#
1250# Partition Types
1251#
1252CONFIG_PARTITION_ADVANCED=y
1253# CONFIG_ACORN_PARTITION is not set
1254# CONFIG_OSF_PARTITION is not set
1255# CONFIG_AMIGA_PARTITION is not set
1256# CONFIG_ATARI_PARTITION is not set
1257CONFIG_MAC_PARTITION=y
1258CONFIG_MSDOS_PARTITION=y
1259# CONFIG_BSD_DISKLABEL is not set
1260# CONFIG_MINIX_SUBPARTITION is not set
1261# CONFIG_SOLARIS_X86_PARTITION is not set
1262# CONFIG_UNIXWARE_DISKLABEL is not set
1263# CONFIG_LDM_PARTITION is not set
1264# CONFIG_SGI_PARTITION is not set
1265# CONFIG_ULTRIX_PARTITION is not set
1266# CONFIG_SUN_PARTITION is not set
1267# CONFIG_EFI_PARTITION is not set
1268
1269#
1270# Native Language Support
1271#
1272CONFIG_NLS=y
1273CONFIG_NLS_DEFAULT="iso8859-1"
1274CONFIG_NLS_CODEPAGE_437=y
1275# CONFIG_NLS_CODEPAGE_737 is not set
1276# CONFIG_NLS_CODEPAGE_775 is not set
1277# CONFIG_NLS_CODEPAGE_850 is not set
1278# CONFIG_NLS_CODEPAGE_852 is not set
1279# CONFIG_NLS_CODEPAGE_855 is not set
1280# CONFIG_NLS_CODEPAGE_857 is not set
1281# CONFIG_NLS_CODEPAGE_860 is not set
1282# CONFIG_NLS_CODEPAGE_861 is not set
1283# CONFIG_NLS_CODEPAGE_862 is not set
1284# CONFIG_NLS_CODEPAGE_863 is not set
1285# CONFIG_NLS_CODEPAGE_864 is not set
1286# CONFIG_NLS_CODEPAGE_865 is not set
1287# CONFIG_NLS_CODEPAGE_866 is not set
1288# CONFIG_NLS_CODEPAGE_869 is not set
1289# CONFIG_NLS_CODEPAGE_936 is not set
1290# CONFIG_NLS_CODEPAGE_950 is not set
1291# CONFIG_NLS_CODEPAGE_932 is not set
1292# CONFIG_NLS_CODEPAGE_949 is not set
1293# CONFIG_NLS_CODEPAGE_874 is not set
1294# CONFIG_NLS_ISO8859_8 is not set
1295CONFIG_NLS_CODEPAGE_1250=y
1296CONFIG_NLS_CODEPAGE_1251=y
1297CONFIG_NLS_ASCII=y
1298CONFIG_NLS_ISO8859_1=y
1299# CONFIG_NLS_ISO8859_2 is not set
1300# CONFIG_NLS_ISO8859_3 is not set
1301# CONFIG_NLS_ISO8859_4 is not set
1302# CONFIG_NLS_ISO8859_5 is not set
1303# CONFIG_NLS_ISO8859_6 is not set
1304# CONFIG_NLS_ISO8859_7 is not set
1305# CONFIG_NLS_ISO8859_9 is not set
1306# CONFIG_NLS_ISO8859_13 is not set
1307# CONFIG_NLS_ISO8859_14 is not set
1308CONFIG_NLS_ISO8859_15=y
1309# CONFIG_NLS_KOI8_R is not set
1310# CONFIG_NLS_KOI8_U is not set
1311CONFIG_NLS_UTF8=y
1312
1313#
1314# Profiling support
1315#
1316CONFIG_PROFILING=y
1317CONFIG_OPROFILE=y
1318
1319#
1320# Kernel hacking
1321#
1322# CONFIG_PRINTK_TIME is not set
1323CONFIG_DEBUG_KERNEL=y
1324CONFIG_MAGIC_SYSRQ=y
1325CONFIG_LOG_BUF_SHIFT=17
1326CONFIG_DETECT_SOFTLOCKUP=y
1327# CONFIG_SCHEDSTATS is not set
1328# CONFIG_DEBUG_SLAB is not set
1329# CONFIG_DEBUG_SPINLOCK is not set
1330# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1331# CONFIG_DEBUG_KOBJECT is not set
1332# CONFIG_DEBUG_INFO is not set
1333CONFIG_DEBUG_FS=y
1334# CONFIG_DEBUG_STACKOVERFLOW is not set
1335# CONFIG_KPROBES is not set
1336# CONFIG_DEBUG_STACK_USAGE is not set
1337# CONFIG_DEBUGGER is not set
1338# CONFIG_PPCDBG is not set
1339CONFIG_IRQSTACKS=y
1340
1341#
1342# Security options
1343#
1344# CONFIG_KEYS is not set
1345# CONFIG_SECURITY is not set
1346
1347#
1348# Cryptographic options
1349#
1350CONFIG_CRYPTO=y
1351CONFIG_CRYPTO_HMAC=y
1352CONFIG_CRYPTO_NULL=m
1353CONFIG_CRYPTO_MD4=m
1354CONFIG_CRYPTO_MD5=y
1355CONFIG_CRYPTO_SHA1=m
1356CONFIG_CRYPTO_SHA256=m
1357CONFIG_CRYPTO_SHA512=m
1358CONFIG_CRYPTO_WP512=m
1359# CONFIG_CRYPTO_TGR192 is not set
1360CONFIG_CRYPTO_DES=y
1361CONFIG_CRYPTO_BLOWFISH=m
1362CONFIG_CRYPTO_TWOFISH=m
1363CONFIG_CRYPTO_SERPENT=m
1364CONFIG_CRYPTO_AES=m
1365CONFIG_CRYPTO_CAST5=m
1366CONFIG_CRYPTO_CAST6=m
1367CONFIG_CRYPTO_TEA=m
1368CONFIG_CRYPTO_ARC4=m
1369CONFIG_CRYPTO_KHAZAD=m
1370CONFIG_CRYPTO_ANUBIS=m
1371CONFIG_CRYPTO_DEFLATE=m
1372CONFIG_CRYPTO_MICHAEL_MIC=m
1373CONFIG_CRYPTO_CRC32C=m
1374CONFIG_CRYPTO_TEST=m
1375
1376#
1377# Hardware crypto devices
1378#
1379
1380#
1381# Library routines
1382#
1383CONFIG_CRC_CCITT=m
1384# CONFIG_CRC16 is not set
1385CONFIG_CRC32=y
1386CONFIG_LIBCRC32C=m
1387CONFIG_ZLIB_INFLATE=y
1388CONFIG_ZLIB_DEFLATE=m
1389CONFIG_TEXTSEARCH=y
1390CONFIG_TEXTSEARCH_KMP=m
1391CONFIG_TEXTSEARCH_BM=m
1392CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
new file mode 100644
index 000000000000..62e92c7e9e27
--- /dev/null
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -0,0 +1,998 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4
4# Thu Oct 20 08:30:56 2005
5#
6CONFIG_64BIT=y
7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13
16
17#
18# Code maturity level options
19#
20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
24
25#
26# General setup
27#
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SWAP=y
31CONFIG_SYSVIPC=y
32CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set
34CONFIG_SYSCTL=y
35CONFIG_AUDIT=y
36CONFIG_AUDITSYSCALL=y
37CONFIG_HOTPLUG=y
38CONFIG_KOBJECT_UEVENT=y
39CONFIG_IKCONFIG=y
40CONFIG_IKCONFIG_PROC=y
41# CONFIG_CPUSETS is not set
42CONFIG_INITRAMFS_SOURCE=""
43# CONFIG_EMBEDDED is not set
44CONFIG_KALLSYMS=y
45# CONFIG_KALLSYMS_ALL is not set
46# CONFIG_KALLSYMS_EXTRA_PASS is not set
47CONFIG_PRINTK=y
48CONFIG_BUG=y
49CONFIG_BASE_FULL=y
50CONFIG_FUTEX=y
51CONFIG_EPOLL=y
52CONFIG_SHMEM=y
53CONFIG_CC_ALIGN_FUNCTIONS=0
54CONFIG_CC_ALIGN_LABELS=0
55CONFIG_CC_ALIGN_LOOPS=0
56CONFIG_CC_ALIGN_JUMPS=0
57# CONFIG_TINY_SHMEM is not set
58CONFIG_BASE_SMALL=0
59
60#
61# Loadable module support
62#
63CONFIG_MODULES=y
64CONFIG_MODULE_UNLOAD=y
65# CONFIG_MODULE_FORCE_UNLOAD is not set
66CONFIG_OBSOLETE_MODPARM=y
67CONFIG_MODVERSIONS=y
68CONFIG_MODULE_SRCVERSION_ALL=y
69CONFIG_KMOD=y
70CONFIG_STOP_MACHINE=y
71CONFIG_SYSVIPC_COMPAT=y
72
73#
74# Platform support
75#
76CONFIG_PPC_ISERIES=y
77# CONFIG_PPC_MULTIPLATFORM is not set
78CONFIG_PPC=y
79CONFIG_PPC64=y
80CONFIG_IBMVIO=y
81# CONFIG_POWER4_ONLY is not set
82CONFIG_IOMMU_VMERGE=y
83CONFIG_SMP=y
84CONFIG_NR_CPUS=32
85CONFIG_ARCH_SELECT_MEMORY_MODEL=y
86CONFIG_ARCH_FLATMEM_ENABLE=y
87CONFIG_SELECT_MEMORY_MODEL=y
88CONFIG_FLATMEM_MANUAL=y
89# CONFIG_DISCONTIGMEM_MANUAL is not set
90# CONFIG_SPARSEMEM_MANUAL is not set
91CONFIG_FLATMEM=y
92CONFIG_FLAT_NODE_MEM_MAP=y
93# CONFIG_SPARSEMEM_STATIC is not set
94# CONFIG_NUMA is not set
95# CONFIG_SCHED_SMT is not set
96CONFIG_PREEMPT_NONE=y
97# CONFIG_PREEMPT_VOLUNTARY is not set
98# CONFIG_PREEMPT is not set
99# CONFIG_PREEMPT_BKL is not set
100# CONFIG_HZ_100 is not set
101CONFIG_HZ_250=y
102# CONFIG_HZ_1000 is not set
103CONFIG_HZ=250
104CONFIG_GENERIC_HARDIRQS=y
105CONFIG_LPARCFG=y
106CONFIG_SECCOMP=y
107CONFIG_BINFMT_ELF=y
108# CONFIG_BINFMT_MISC is not set
109CONFIG_ISA_DMA_API=y
110
111#
112# Bus Options
113#
114CONFIG_PCI=y
115CONFIG_PCI_DOMAINS=y
116CONFIG_PCI_LEGACY_PROC=y
117# CONFIG_PCI_DEBUG is not set
118
119#
120# PCCARD (PCMCIA/CardBus) support
121#
122# CONFIG_PCCARD is not set
123
124#
125# PCI Hotplug Support
126#
127# CONFIG_HOTPLUG_PCI is not set
128
129#
130# Networking
131#
132CONFIG_NET=y
133
134#
135# Networking options
136#
137CONFIG_PACKET=y
138# CONFIG_PACKET_MMAP is not set
139CONFIG_UNIX=y
140CONFIG_XFRM=y
141CONFIG_XFRM_USER=m
142CONFIG_NET_KEY=m
143CONFIG_INET=y
144CONFIG_IP_MULTICAST=y
145# CONFIG_IP_ADVANCED_ROUTER is not set
146CONFIG_IP_FIB_HASH=y
147# CONFIG_IP_PNP is not set
148CONFIG_NET_IPIP=y
149# CONFIG_NET_IPGRE is not set
150# CONFIG_IP_MROUTE is not set
151# CONFIG_ARPD is not set
152CONFIG_SYN_COOKIES=y
153CONFIG_INET_AH=m
154CONFIG_INET_ESP=m
155CONFIG_INET_IPCOMP=m
156CONFIG_INET_TUNNEL=y
157CONFIG_INET_DIAG=y
158CONFIG_INET_TCP_DIAG=y
159# CONFIG_TCP_CONG_ADVANCED is not set
160CONFIG_TCP_CONG_BIC=y
161
162#
163# IP: Virtual Server Configuration
164#
165# CONFIG_IP_VS is not set
166# CONFIG_IPV6 is not set
167CONFIG_NETFILTER=y
168# CONFIG_NETFILTER_DEBUG is not set
169# CONFIG_NETFILTER_NETLINK is not set
170
171#
172# IP: Netfilter Configuration
173#
174CONFIG_IP_NF_CONNTRACK=m
175CONFIG_IP_NF_CT_ACCT=y
176CONFIG_IP_NF_CONNTRACK_MARK=y
177CONFIG_IP_NF_CONNTRACK_EVENTS=y
178CONFIG_IP_NF_CT_PROTO_SCTP=m
179CONFIG_IP_NF_FTP=m
180CONFIG_IP_NF_IRC=m
181# CONFIG_IP_NF_NETBIOS_NS is not set
182CONFIG_IP_NF_TFTP=m
183CONFIG_IP_NF_AMANDA=m
184# CONFIG_IP_NF_PPTP is not set
185CONFIG_IP_NF_QUEUE=m
186CONFIG_IP_NF_IPTABLES=m
187CONFIG_IP_NF_MATCH_LIMIT=m
188CONFIG_IP_NF_MATCH_IPRANGE=m
189CONFIG_IP_NF_MATCH_MAC=m
190CONFIG_IP_NF_MATCH_PKTTYPE=m
191CONFIG_IP_NF_MATCH_MARK=m
192CONFIG_IP_NF_MATCH_MULTIPORT=m
193CONFIG_IP_NF_MATCH_TOS=m
194CONFIG_IP_NF_MATCH_RECENT=m
195CONFIG_IP_NF_MATCH_ECN=m
196CONFIG_IP_NF_MATCH_DSCP=m
197CONFIG_IP_NF_MATCH_AH_ESP=m
198CONFIG_IP_NF_MATCH_LENGTH=m
199CONFIG_IP_NF_MATCH_TTL=m
200CONFIG_IP_NF_MATCH_TCPMSS=m
201CONFIG_IP_NF_MATCH_HELPER=m
202CONFIG_IP_NF_MATCH_STATE=m
203CONFIG_IP_NF_MATCH_CONNTRACK=m
204CONFIG_IP_NF_MATCH_OWNER=m
205CONFIG_IP_NF_MATCH_ADDRTYPE=m
206CONFIG_IP_NF_MATCH_REALM=m
207CONFIG_IP_NF_MATCH_SCTP=m
208# CONFIG_IP_NF_MATCH_DCCP is not set
209CONFIG_IP_NF_MATCH_COMMENT=m
210CONFIG_IP_NF_MATCH_CONNMARK=m
211CONFIG_IP_NF_MATCH_CONNBYTES=m
212CONFIG_IP_NF_MATCH_HASHLIMIT=m
213CONFIG_IP_NF_MATCH_STRING=m
214CONFIG_IP_NF_FILTER=m
215CONFIG_IP_NF_TARGET_REJECT=m
216CONFIG_IP_NF_TARGET_LOG=m
217CONFIG_IP_NF_TARGET_ULOG=m
218CONFIG_IP_NF_TARGET_TCPMSS=m
219CONFIG_IP_NF_TARGET_NFQUEUE=m
220CONFIG_IP_NF_NAT=m
221CONFIG_IP_NF_NAT_NEEDED=y
222CONFIG_IP_NF_TARGET_MASQUERADE=m
223CONFIG_IP_NF_TARGET_REDIRECT=m
224CONFIG_IP_NF_TARGET_NETMAP=m
225CONFIG_IP_NF_TARGET_SAME=m
226CONFIG_IP_NF_NAT_SNMP_BASIC=m
227CONFIG_IP_NF_NAT_IRC=m
228CONFIG_IP_NF_NAT_FTP=m
229CONFIG_IP_NF_NAT_TFTP=m
230CONFIG_IP_NF_NAT_AMANDA=m
231CONFIG_IP_NF_MANGLE=m
232CONFIG_IP_NF_TARGET_TOS=m
233CONFIG_IP_NF_TARGET_ECN=m
234CONFIG_IP_NF_TARGET_DSCP=m
235CONFIG_IP_NF_TARGET_MARK=m
236CONFIG_IP_NF_TARGET_CLASSIFY=m
237CONFIG_IP_NF_TARGET_TTL=m
238CONFIG_IP_NF_TARGET_CONNMARK=m
239CONFIG_IP_NF_TARGET_CLUSTERIP=m
240CONFIG_IP_NF_RAW=m
241CONFIG_IP_NF_TARGET_NOTRACK=m
242CONFIG_IP_NF_ARPTABLES=m
243CONFIG_IP_NF_ARPFILTER=m
244CONFIG_IP_NF_ARP_MANGLE=m
245
246#
247# DCCP Configuration (EXPERIMENTAL)
248#
249# CONFIG_IP_DCCP is not set
250
251#
252# SCTP Configuration (EXPERIMENTAL)
253#
254# CONFIG_IP_SCTP is not set
255# CONFIG_ATM is not set
256# CONFIG_BRIDGE is not set
257# CONFIG_VLAN_8021Q is not set
258# CONFIG_DECNET is not set
259CONFIG_LLC=y
260# CONFIG_LLC2 is not set
261# CONFIG_IPX is not set
262# CONFIG_ATALK is not set
263# CONFIG_X25 is not set
264# CONFIG_LAPB is not set
265# CONFIG_NET_DIVERT is not set
266# CONFIG_ECONET is not set
267# CONFIG_WAN_ROUTER is not set
268# CONFIG_NET_SCHED is not set
269CONFIG_NET_CLS_ROUTE=y
270
271#
272# Network testing
273#
274# CONFIG_NET_PKTGEN is not set
275# CONFIG_HAMRADIO is not set
276# CONFIG_IRDA is not set
277# CONFIG_BT is not set
278# CONFIG_IEEE80211 is not set
279
280#
281# Device Drivers
282#
283
284#
285# Generic Driver Options
286#
287CONFIG_STANDALONE=y
288CONFIG_PREVENT_FIRMWARE_BUILD=y
289CONFIG_FW_LOADER=m
290# CONFIG_DEBUG_DRIVER is not set
291
292#
293# Connector - unified userspace <-> kernelspace linker
294#
295# CONFIG_CONNECTOR is not set
296
297#
298# Memory Technology Devices (MTD)
299#
300# CONFIG_MTD is not set
301
302#
303# Parallel port support
304#
305# CONFIG_PARPORT is not set
306
307#
308# Plug and Play support
309#
310
311#
312# Block devices
313#
314# CONFIG_BLK_DEV_FD is not set
315# CONFIG_BLK_CPQ_DA is not set
316# CONFIG_BLK_CPQ_CISS_DA is not set
317# CONFIG_BLK_DEV_DAC960 is not set
318# CONFIG_BLK_DEV_UMEM is not set
319# CONFIG_BLK_DEV_COW_COMMON is not set
320CONFIG_BLK_DEV_LOOP=y
321# CONFIG_BLK_DEV_CRYPTOLOOP is not set
322CONFIG_BLK_DEV_NBD=m
323# CONFIG_BLK_DEV_SX8 is not set
324CONFIG_BLK_DEV_RAM=y
325CONFIG_BLK_DEV_RAM_COUNT=16
326CONFIG_BLK_DEV_RAM_SIZE=65536
327CONFIG_BLK_DEV_INITRD=y
328# CONFIG_CDROM_PKTCDVD is not set
329
330#
331# IO Schedulers
332#
333CONFIG_IOSCHED_NOOP=y
334CONFIG_IOSCHED_AS=y
335CONFIG_IOSCHED_DEADLINE=y
336CONFIG_IOSCHED_CFQ=y
337# CONFIG_ATA_OVER_ETH is not set
338
339#
340# ATA/ATAPI/MFM/RLL support
341#
342# CONFIG_IDE is not set
343
344#
345# SCSI device support
346#
347# CONFIG_RAID_ATTRS is not set
348CONFIG_SCSI=y
349CONFIG_SCSI_PROC_FS=y
350
351#
352# SCSI support type (disk, tape, CD-ROM)
353#
354CONFIG_BLK_DEV_SD=y
355CONFIG_CHR_DEV_ST=y
356# CONFIG_CHR_DEV_OSST is not set
357CONFIG_BLK_DEV_SR=y
358CONFIG_BLK_DEV_SR_VENDOR=y
359CONFIG_CHR_DEV_SG=y
360# CONFIG_CHR_DEV_SCH is not set
361
362#
363# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
364#
365CONFIG_SCSI_MULTI_LUN=y
366CONFIG_SCSI_CONSTANTS=y
367# CONFIG_SCSI_LOGGING is not set
368
369#
370# SCSI Transport Attributes
371#
372CONFIG_SCSI_SPI_ATTRS=y
373CONFIG_SCSI_FC_ATTRS=y
374# CONFIG_SCSI_ISCSI_ATTRS is not set
375# CONFIG_SCSI_SAS_ATTRS is not set
376
377#
378# SCSI low-level drivers
379#
380# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
381# CONFIG_SCSI_3W_9XXX is not set
382# CONFIG_SCSI_ACARD is not set
383# CONFIG_SCSI_AACRAID is not set
384# CONFIG_SCSI_AIC7XXX is not set
385# CONFIG_SCSI_AIC7XXX_OLD is not set
386# CONFIG_SCSI_AIC79XX is not set
387# CONFIG_MEGARAID_NEWGEN is not set
388# CONFIG_MEGARAID_LEGACY is not set
389# CONFIG_MEGARAID_SAS is not set
390# CONFIG_SCSI_SATA is not set
391# CONFIG_SCSI_BUSLOGIC is not set
392# CONFIG_SCSI_DMX3191D is not set
393# CONFIG_SCSI_EATA is not set
394# CONFIG_SCSI_FUTURE_DOMAIN is not set
395# CONFIG_SCSI_GDTH is not set
396# CONFIG_SCSI_IPS is not set
397CONFIG_SCSI_IBMVSCSI=m
398# CONFIG_SCSI_INITIO is not set
399# CONFIG_SCSI_INIA100 is not set
400# CONFIG_SCSI_SYM53C8XX_2 is not set
401# CONFIG_SCSI_IPR is not set
402# CONFIG_SCSI_QLOGIC_FC is not set
403# CONFIG_SCSI_QLOGIC_1280 is not set
404CONFIG_SCSI_QLA2XXX=y
405# CONFIG_SCSI_QLA21XX is not set
406# CONFIG_SCSI_QLA22XX is not set
407# CONFIG_SCSI_QLA2300 is not set
408# CONFIG_SCSI_QLA2322 is not set
409# CONFIG_SCSI_QLA6312 is not set
410# CONFIG_SCSI_QLA24XX is not set
411# CONFIG_SCSI_LPFC is not set
412# CONFIG_SCSI_DC395x is not set
413# CONFIG_SCSI_DC390T is not set
414# CONFIG_SCSI_DEBUG is not set
415
416#
417# Multi-device support (RAID and LVM)
418#
419CONFIG_MD=y
420CONFIG_BLK_DEV_MD=y
421CONFIG_MD_LINEAR=y
422CONFIG_MD_RAID0=y
423CONFIG_MD_RAID1=y
424CONFIG_MD_RAID10=m
425CONFIG_MD_RAID5=y
426CONFIG_MD_RAID6=m
427CONFIG_MD_MULTIPATH=m
428CONFIG_MD_FAULTY=m
429CONFIG_BLK_DEV_DM=y
430CONFIG_DM_CRYPT=m
431CONFIG_DM_SNAPSHOT=m
432CONFIG_DM_MIRROR=m
433CONFIG_DM_ZERO=m
434# CONFIG_DM_MULTIPATH is not set
435
436#
437# Fusion MPT device support
438#
439# CONFIG_FUSION is not set
440# CONFIG_FUSION_SPI is not set
441# CONFIG_FUSION_FC is not set
442# CONFIG_FUSION_SAS is not set
443
444#
445# IEEE 1394 (FireWire) support
446#
447# CONFIG_IEEE1394 is not set
448
449#
450# I2O device support
451#
452# CONFIG_I2O is not set
453
454#
455# Macintosh device drivers
456#
457
458#
459# Network device support
460#
461CONFIG_NETDEVICES=y
462CONFIG_DUMMY=m
463CONFIG_BONDING=m
464# CONFIG_EQUALIZER is not set
465CONFIG_TUN=m
466
467#
468# ARCnet devices
469#
470# CONFIG_ARCNET is not set
471
472#
473# PHY device support
474#
475# CONFIG_PHYLIB is not set
476
477#
478# Ethernet (10 or 100Mbit)
479#
480CONFIG_NET_ETHERNET=y
481CONFIG_MII=y
482# CONFIG_HAPPYMEAL is not set
483# CONFIG_SUNGEM is not set
484# CONFIG_CASSINI is not set
485# CONFIG_NET_VENDOR_3COM is not set
486
487#
488# Tulip family network device support
489#
490# CONFIG_NET_TULIP is not set
491# CONFIG_HP100 is not set
492CONFIG_NET_PCI=y
493CONFIG_PCNET32=y
494# CONFIG_AMD8111_ETH is not set
495# CONFIG_ADAPTEC_STARFIRE is not set
496# CONFIG_B44 is not set
497# CONFIG_FORCEDETH is not set
498# CONFIG_DGRS is not set
499# CONFIG_EEPRO100 is not set
500CONFIG_E100=y
501# CONFIG_FEALNX is not set
502# CONFIG_NATSEMI is not set
503# CONFIG_NE2K_PCI is not set
504# CONFIG_8139CP is not set
505# CONFIG_8139TOO is not set
506# CONFIG_SIS900 is not set
507# CONFIG_EPIC100 is not set
508# CONFIG_SUNDANCE is not set
509# CONFIG_VIA_RHINE is not set
510
511#
512# Ethernet (1000 Mbit)
513#
514CONFIG_ACENIC=m
515# CONFIG_ACENIC_OMIT_TIGON_I is not set
516# CONFIG_DL2K is not set
517CONFIG_E1000=m
518# CONFIG_E1000_NAPI is not set
519# CONFIG_NS83820 is not set
520# CONFIG_HAMACHI is not set
521# CONFIG_YELLOWFIN is not set
522# CONFIG_R8169 is not set
523# CONFIG_SIS190 is not set
524# CONFIG_SKGE is not set
525# CONFIG_SK98LIN is not set
526# CONFIG_VIA_VELOCITY is not set
527# CONFIG_TIGON3 is not set
528# CONFIG_BNX2 is not set
529
530#
531# Ethernet (10000 Mbit)
532#
533# CONFIG_CHELSIO_T1 is not set
534# CONFIG_IXGB is not set
535# CONFIG_S2IO is not set
536
537#
538# Token Ring devices
539#
540CONFIG_TR=y
541CONFIG_IBMOL=y
542# CONFIG_3C359 is not set
543# CONFIG_TMS380TR is not set
544
545#
546# Wireless LAN (non-hamradio)
547#
548# CONFIG_NET_RADIO is not set
549
550#
551# Wan interfaces
552#
553# CONFIG_WAN is not set
554CONFIG_ISERIES_VETH=y
555# CONFIG_FDDI is not set
556# CONFIG_HIPPI is not set
557CONFIG_PPP=m
558# CONFIG_PPP_MULTILINK is not set
559# CONFIG_PPP_FILTER is not set
560CONFIG_PPP_ASYNC=m
561CONFIG_PPP_SYNC_TTY=m
562CONFIG_PPP_DEFLATE=m
563CONFIG_PPP_BSDCOMP=m
564CONFIG_PPPOE=m
565# CONFIG_SLIP is not set
566# CONFIG_NET_FC is not set
567# CONFIG_SHAPER is not set
568CONFIG_NETCONSOLE=y
569CONFIG_NETPOLL=y
570CONFIG_NETPOLL_RX=y
571CONFIG_NETPOLL_TRAP=y
572CONFIG_NET_POLL_CONTROLLER=y
573
574#
575# ISDN subsystem
576#
577# CONFIG_ISDN is not set
578
579#
580# Telephony Support
581#
582# CONFIG_PHONE is not set
583
584#
585# Input device support
586#
587CONFIG_INPUT=y
588
589#
590# Userland interfaces
591#
592CONFIG_INPUT_MOUSEDEV=y
593# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
594CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
595CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
596# CONFIG_INPUT_JOYDEV is not set
597# CONFIG_INPUT_TSDEV is not set
598# CONFIG_INPUT_EVDEV is not set
599# CONFIG_INPUT_EVBUG is not set
600
601#
602# Input Device Drivers
603#
604# CONFIG_INPUT_KEYBOARD is not set
605# CONFIG_INPUT_MOUSE is not set
606# CONFIG_INPUT_JOYSTICK is not set
607# CONFIG_INPUT_TOUCHSCREEN is not set
608# CONFIG_INPUT_MISC is not set
609
610#
611# Hardware I/O ports
612#
613# CONFIG_SERIO is not set
614# CONFIG_GAMEPORT is not set
615
616#
617# Character devices
618#
619# CONFIG_SERIAL_NONSTANDARD is not set
620
621#
622# Serial drivers
623#
624# CONFIG_SERIAL_8250 is not set
625
626#
627# Non-8250 serial port support
628#
629CONFIG_SERIAL_CORE=m
630CONFIG_SERIAL_ICOM=m
631# CONFIG_SERIAL_JSM is not set
632CONFIG_UNIX98_PTYS=y
633CONFIG_LEGACY_PTYS=y
634CONFIG_LEGACY_PTY_COUNT=256
635
636#
637# IPMI
638#
639# CONFIG_IPMI_HANDLER is not set
640
641#
642# Watchdog Cards
643#
644# CONFIG_WATCHDOG is not set
645# CONFIG_RTC is not set
646# CONFIG_DTLK is not set
647# CONFIG_R3964 is not set
648# CONFIG_APPLICOM is not set
649
650#
651# Ftape, the floppy tape device driver
652#
653# CONFIG_AGP is not set
654# CONFIG_DRM is not set
655CONFIG_RAW_DRIVER=y
656CONFIG_MAX_RAW_DEVS=256
657# CONFIG_HANGCHECK_TIMER is not set
658
659#
660# TPM devices
661#
662# CONFIG_TCG_TPM is not set
663
664#
665# I2C support
666#
667# CONFIG_I2C is not set
668
669#
670# Dallas's 1-wire bus
671#
672# CONFIG_W1 is not set
673
674#
675# Hardware Monitoring support
676#
677# CONFIG_HWMON is not set
678# CONFIG_HWMON_VID is not set
679
680#
681# Misc devices
682#
683
684#
685# Multimedia Capabilities Port drivers
686#
687
688#
689# Multimedia devices
690#
691# CONFIG_VIDEO_DEV is not set
692
693#
694# Digital Video Broadcasting Devices
695#
696# CONFIG_DVB is not set
697
698#
699# Graphics support
700#
701# CONFIG_FB is not set
702
703#
704# Sound
705#
706# CONFIG_SOUND is not set
707
708#
709# USB support
710#
711CONFIG_USB_ARCH_HAS_HCD=y
712CONFIG_USB_ARCH_HAS_OHCI=y
713# CONFIG_USB is not set
714
715#
716# USB Gadget Support
717#
718# CONFIG_USB_GADGET is not set
719
720#
721# MMC/SD Card support
722#
723# CONFIG_MMC is not set
724
725#
726# InfiniBand support
727#
728# CONFIG_INFINIBAND is not set
729
730#
731# SN Devices
732#
733
734#
735# File systems
736#
737CONFIG_EXT2_FS=y
738CONFIG_EXT2_FS_XATTR=y
739CONFIG_EXT2_FS_POSIX_ACL=y
740CONFIG_EXT2_FS_SECURITY=y
741CONFIG_EXT2_FS_XIP=y
742CONFIG_FS_XIP=y
743CONFIG_EXT3_FS=y
744CONFIG_EXT3_FS_XATTR=y
745CONFIG_EXT3_FS_POSIX_ACL=y
746CONFIG_EXT3_FS_SECURITY=y
747CONFIG_JBD=y
748# CONFIG_JBD_DEBUG is not set
749CONFIG_FS_MBCACHE=y
750CONFIG_REISERFS_FS=y
751# CONFIG_REISERFS_CHECK is not set
752# CONFIG_REISERFS_PROC_INFO is not set
753CONFIG_REISERFS_FS_XATTR=y
754CONFIG_REISERFS_FS_POSIX_ACL=y
755CONFIG_REISERFS_FS_SECURITY=y
756CONFIG_JFS_FS=m
757CONFIG_JFS_POSIX_ACL=y
758CONFIG_JFS_SECURITY=y
759# CONFIG_JFS_DEBUG is not set
760# CONFIG_JFS_STATISTICS is not set
761CONFIG_FS_POSIX_ACL=y
762CONFIG_XFS_FS=m
763CONFIG_XFS_EXPORT=y
764# CONFIG_XFS_QUOTA is not set
765CONFIG_XFS_SECURITY=y
766CONFIG_XFS_POSIX_ACL=y
767# CONFIG_XFS_RT is not set
768# CONFIG_MINIX_FS is not set
769# CONFIG_ROMFS_FS is not set
770CONFIG_INOTIFY=y
771# CONFIG_QUOTA is not set
772CONFIG_DNOTIFY=y
773CONFIG_AUTOFS_FS=m
774# CONFIG_AUTOFS4_FS is not set
775# CONFIG_FUSE_FS is not set
776
777#
778# CD-ROM/DVD Filesystems
779#
780CONFIG_ISO9660_FS=y
781CONFIG_JOLIET=y
782CONFIG_ZISOFS=y
783CONFIG_ZISOFS_FS=y
784CONFIG_UDF_FS=m
785CONFIG_UDF_NLS=y
786
787#
788# DOS/FAT/NT Filesystems
789#
790CONFIG_FAT_FS=y
791CONFIG_MSDOS_FS=y
792CONFIG_VFAT_FS=y
793CONFIG_FAT_DEFAULT_CODEPAGE=437
794CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
795# CONFIG_NTFS_FS is not set
796
797#
798# Pseudo filesystems
799#
800CONFIG_PROC_FS=y
801CONFIG_PROC_KCORE=y
802CONFIG_SYSFS=y
803CONFIG_TMPFS=y
804# CONFIG_HUGETLBFS is not set
805# CONFIG_HUGETLB_PAGE is not set
806CONFIG_RAMFS=y
807# CONFIG_RELAYFS_FS is not set
808
809#
810# Miscellaneous filesystems
811#
812# CONFIG_ADFS_FS is not set
813# CONFIG_AFFS_FS is not set
814# CONFIG_HFS_FS is not set
815# CONFIG_HFSPLUS_FS is not set
816# CONFIG_BEFS_FS is not set
817# CONFIG_BFS_FS is not set
818# CONFIG_EFS_FS is not set
819CONFIG_CRAMFS=y
820# CONFIG_VXFS_FS is not set
821# CONFIG_HPFS_FS is not set
822# CONFIG_QNX4FS_FS is not set
823# CONFIG_SYSV_FS is not set
824# CONFIG_UFS_FS is not set
825
826#
827# Network File Systems
828#
829CONFIG_NFS_FS=y
830CONFIG_NFS_V3=y
831CONFIG_NFS_V3_ACL=y
832CONFIG_NFS_V4=y
833# CONFIG_NFS_DIRECTIO is not set
834CONFIG_NFSD=m
835CONFIG_NFSD_V2_ACL=y
836CONFIG_NFSD_V3=y
837CONFIG_NFSD_V3_ACL=y
838CONFIG_NFSD_V4=y
839CONFIG_NFSD_TCP=y
840CONFIG_LOCKD=y
841CONFIG_LOCKD_V4=y
842CONFIG_EXPORTFS=m
843CONFIG_NFS_ACL_SUPPORT=y
844CONFIG_NFS_COMMON=y
845CONFIG_SUNRPC=y
846CONFIG_SUNRPC_GSS=y
847CONFIG_RPCSEC_GSS_KRB5=y
848CONFIG_RPCSEC_GSS_SPKM3=m
849# CONFIG_SMB_FS is not set
850CONFIG_CIFS=m
851# CONFIG_CIFS_STATS is not set
852CONFIG_CIFS_XATTR=y
853CONFIG_CIFS_POSIX=y
854# CONFIG_CIFS_EXPERIMENTAL is not set
855# CONFIG_NCP_FS is not set
856# CONFIG_CODA_FS is not set
857# CONFIG_AFS_FS is not set
858# CONFIG_9P_FS is not set
859
860#
861# Partition Types
862#
863# CONFIG_PARTITION_ADVANCED is not set
864CONFIG_MSDOS_PARTITION=y
865
866#
867# Native Language Support
868#
869CONFIG_NLS=y
870CONFIG_NLS_DEFAULT="iso8859-1"
871CONFIG_NLS_CODEPAGE_437=y
872# CONFIG_NLS_CODEPAGE_737 is not set
873# CONFIG_NLS_CODEPAGE_775 is not set
874# CONFIG_NLS_CODEPAGE_850 is not set
875# CONFIG_NLS_CODEPAGE_852 is not set
876# CONFIG_NLS_CODEPAGE_855 is not set
877# CONFIG_NLS_CODEPAGE_857 is not set
878# CONFIG_NLS_CODEPAGE_860 is not set
879# CONFIG_NLS_CODEPAGE_861 is not set
880# CONFIG_NLS_CODEPAGE_862 is not set
881# CONFIG_NLS_CODEPAGE_863 is not set
882# CONFIG_NLS_CODEPAGE_864 is not set
883# CONFIG_NLS_CODEPAGE_865 is not set
884# CONFIG_NLS_CODEPAGE_866 is not set
885# CONFIG_NLS_CODEPAGE_869 is not set
886# CONFIG_NLS_CODEPAGE_936 is not set
887# CONFIG_NLS_CODEPAGE_950 is not set
888# CONFIG_NLS_CODEPAGE_932 is not set
889# CONFIG_NLS_CODEPAGE_949 is not set
890# CONFIG_NLS_CODEPAGE_874 is not set
891# CONFIG_NLS_ISO8859_8 is not set
892# CONFIG_NLS_CODEPAGE_1250 is not set
893# CONFIG_NLS_CODEPAGE_1251 is not set
894CONFIG_NLS_ASCII=y
895CONFIG_NLS_ISO8859_1=y
896# CONFIG_NLS_ISO8859_2 is not set
897# CONFIG_NLS_ISO8859_3 is not set
898# CONFIG_NLS_ISO8859_4 is not set
899# CONFIG_NLS_ISO8859_5 is not set
900# CONFIG_NLS_ISO8859_6 is not set
901# CONFIG_NLS_ISO8859_7 is not set
902# CONFIG_NLS_ISO8859_9 is not set
903# CONFIG_NLS_ISO8859_13 is not set
904# CONFIG_NLS_ISO8859_14 is not set
905# CONFIG_NLS_ISO8859_15 is not set
906# CONFIG_NLS_KOI8_R is not set
907# CONFIG_NLS_KOI8_U is not set
908# CONFIG_NLS_UTF8 is not set
909
910#
911# iSeries device drivers
912#
913CONFIG_VIOCONS=y
914CONFIG_VIODASD=y
915CONFIG_VIOCD=m
916CONFIG_VIOTAPE=m
917CONFIG_VIOPATH=y
918
919#
920# Profiling support
921#
922CONFIG_PROFILING=y
923CONFIG_OPROFILE=y
924
925#
926# Kernel hacking
927#
928# CONFIG_PRINTK_TIME is not set
929CONFIG_DEBUG_KERNEL=y
930CONFIG_MAGIC_SYSRQ=y
931CONFIG_LOG_BUF_SHIFT=17
932CONFIG_DETECT_SOFTLOCKUP=y
933# CONFIG_SCHEDSTATS is not set
934# CONFIG_DEBUG_SLAB is not set
935# CONFIG_DEBUG_SPINLOCK is not set
936# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
937# CONFIG_DEBUG_KOBJECT is not set
938# CONFIG_DEBUG_INFO is not set
939CONFIG_DEBUG_FS=y
940CONFIG_DEBUG_STACKOVERFLOW=y
941# CONFIG_KPROBES is not set
942CONFIG_DEBUG_STACK_USAGE=y
943# CONFIG_DEBUGGER is not set
944# CONFIG_PPCDBG is not set
945CONFIG_IRQSTACKS=y
946
947#
948# Security options
949#
950# CONFIG_KEYS is not set
951# CONFIG_SECURITY is not set
952
953#
954# Cryptographic options
955#
956CONFIG_CRYPTO=y
957CONFIG_CRYPTO_HMAC=y
958CONFIG_CRYPTO_NULL=m
959CONFIG_CRYPTO_MD4=m
960CONFIG_CRYPTO_MD5=y
961CONFIG_CRYPTO_SHA1=m
962CONFIG_CRYPTO_SHA256=m
963CONFIG_CRYPTO_SHA512=m
964CONFIG_CRYPTO_WP512=m
965CONFIG_CRYPTO_TGR192=m
966CONFIG_CRYPTO_DES=y
967CONFIG_CRYPTO_BLOWFISH=m
968CONFIG_CRYPTO_TWOFISH=m
969CONFIG_CRYPTO_SERPENT=m
970CONFIG_CRYPTO_AES=m
971CONFIG_CRYPTO_CAST5=m
972CONFIG_CRYPTO_CAST6=m
973CONFIG_CRYPTO_TEA=m
974CONFIG_CRYPTO_ARC4=m
975CONFIG_CRYPTO_KHAZAD=m
976CONFIG_CRYPTO_ANUBIS=m
977CONFIG_CRYPTO_DEFLATE=m
978CONFIG_CRYPTO_MICHAEL_MIC=m
979CONFIG_CRYPTO_CRC32C=m
980CONFIG_CRYPTO_TEST=m
981
982#
983# Hardware crypto devices
984#
985
986#
987# Library routines
988#
989CONFIG_CRC_CCITT=m
990# CONFIG_CRC16 is not set
991CONFIG_CRC32=y
992CONFIG_LIBCRC32C=m
993CONFIG_ZLIB_INFLATE=y
994CONFIG_ZLIB_DEFLATE=m
995CONFIG_TEXTSEARCH=y
996CONFIG_TEXTSEARCH_KMP=m
997CONFIG_TEXTSEARCH_BM=m
998CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
new file mode 100644
index 000000000000..7b480f3d1406
--- /dev/null
+++ b/arch/powerpc/configs/maple_defconfig
@@ -0,0 +1,1062 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4
4# Thu Oct 20 08:31:24 2005
5#
6CONFIG_64BIT=y
7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13
16
17#
18# Code maturity level options
19#
20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
24
25#
26# General setup
27#
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SWAP=y
31CONFIG_SYSVIPC=y
32CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set
34CONFIG_SYSCTL=y
35# CONFIG_AUDIT is not set
36# CONFIG_HOTPLUG is not set
37CONFIG_KOBJECT_UEVENT=y
38CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y
40# CONFIG_CPUSETS is not set
41CONFIG_INITRAMFS_SOURCE=""
42# CONFIG_EMBEDDED is not set
43CONFIG_KALLSYMS=y
44CONFIG_KALLSYMS_ALL=y
45# CONFIG_KALLSYMS_EXTRA_PASS is not set
46CONFIG_PRINTK=y
47CONFIG_BUG=y
48CONFIG_BASE_FULL=y
49CONFIG_FUTEX=y
50CONFIG_EPOLL=y
51CONFIG_SHMEM=y
52CONFIG_CC_ALIGN_FUNCTIONS=0
53CONFIG_CC_ALIGN_LABELS=0
54CONFIG_CC_ALIGN_LOOPS=0
55CONFIG_CC_ALIGN_JUMPS=0
56# CONFIG_TINY_SHMEM is not set
57CONFIG_BASE_SMALL=0
58
59#
60# Loadable module support
61#
62CONFIG_MODULES=y
63CONFIG_MODULE_UNLOAD=y
64# CONFIG_MODULE_FORCE_UNLOAD is not set
65CONFIG_OBSOLETE_MODPARM=y
66CONFIG_MODVERSIONS=y
67CONFIG_MODULE_SRCVERSION_ALL=y
68CONFIG_KMOD=y
69CONFIG_STOP_MACHINE=y
70CONFIG_SYSVIPC_COMPAT=y
71
72#
73# Platform support
74#
75# CONFIG_PPC_ISERIES is not set
76CONFIG_PPC_MULTIPLATFORM=y
77# CONFIG_PPC_PSERIES is not set
78# CONFIG_PPC_BPA is not set
79# CONFIG_PPC_PMAC is not set
80CONFIG_PPC_MAPLE=y
81CONFIG_PPC=y
82CONFIG_PPC64=y
83CONFIG_PPC_OF=y
84CONFIG_MPIC=y
85# CONFIG_ALTIVEC is not set
86CONFIG_KEXEC=y
87CONFIG_U3_DART=y
88CONFIG_MPIC_BROKEN_U3=y
89CONFIG_BOOTX_TEXT=y
90CONFIG_POWER4_ONLY=y
91CONFIG_IOMMU_VMERGE=y
92CONFIG_SMP=y
93CONFIG_NR_CPUS=2
94CONFIG_ARCH_SELECT_MEMORY_MODEL=y
95CONFIG_ARCH_FLATMEM_ENABLE=y
96CONFIG_SELECT_MEMORY_MODEL=y
97CONFIG_FLATMEM_MANUAL=y
98# CONFIG_DISCONTIGMEM_MANUAL is not set
99# CONFIG_SPARSEMEM_MANUAL is not set
100CONFIG_FLATMEM=y
101CONFIG_FLAT_NODE_MEM_MAP=y
102# CONFIG_SPARSEMEM_STATIC is not set
103# CONFIG_NUMA is not set
104# CONFIG_SCHED_SMT is not set
105CONFIG_PREEMPT_NONE=y
106# CONFIG_PREEMPT_VOLUNTARY is not set
107# CONFIG_PREEMPT is not set
108# CONFIG_PREEMPT_BKL is not set
109# CONFIG_HZ_100 is not set
110CONFIG_HZ_250=y
111# CONFIG_HZ_1000 is not set
112CONFIG_HZ=250
113CONFIG_GENERIC_HARDIRQS=y
114CONFIG_SECCOMP=y
115CONFIG_BINFMT_ELF=y
116# CONFIG_BINFMT_MISC is not set
117CONFIG_PROC_DEVICETREE=y
118# CONFIG_CMDLINE_BOOL is not set
119CONFIG_ISA_DMA_API=y
120
121#
122# Bus Options
123#
124CONFIG_PCI=y
125CONFIG_PCI_DOMAINS=y
126CONFIG_PCI_LEGACY_PROC=y
127# CONFIG_PCI_DEBUG is not set
128
129#
130# PCCARD (PCMCIA/CardBus) support
131#
132# CONFIG_PCCARD is not set
133
134#
135# PCI Hotplug Support
136#
137# CONFIG_HOTPLUG_PCI is not set
138
139#
140# Networking
141#
142CONFIG_NET=y
143
144#
145# Networking options
146#
147CONFIG_PACKET=y
148CONFIG_PACKET_MMAP=y
149CONFIG_UNIX=y
150# CONFIG_NET_KEY is not set
151CONFIG_INET=y
152CONFIG_IP_MULTICAST=y
153# CONFIG_IP_ADVANCED_ROUTER is not set
154CONFIG_IP_FIB_HASH=y
155CONFIG_IP_PNP=y
156CONFIG_IP_PNP_DHCP=y
157# CONFIG_IP_PNP_BOOTP is not set
158# CONFIG_IP_PNP_RARP is not set
159# CONFIG_NET_IPIP is not set
160# CONFIG_NET_IPGRE is not set
161# CONFIG_IP_MROUTE is not set
162# CONFIG_ARPD is not set
163# CONFIG_SYN_COOKIES is not set
164# CONFIG_INET_AH is not set
165# CONFIG_INET_ESP is not set
166# CONFIG_INET_IPCOMP is not set
167# CONFIG_INET_TUNNEL is not set
168CONFIG_INET_DIAG=y
169CONFIG_INET_TCP_DIAG=y
170# CONFIG_TCP_CONG_ADVANCED is not set
171CONFIG_TCP_CONG_BIC=y
172# CONFIG_IPV6 is not set
173# CONFIG_NETFILTER is not set
174
175#
176# DCCP Configuration (EXPERIMENTAL)
177#
178# CONFIG_IP_DCCP is not set
179
180#
181# SCTP Configuration (EXPERIMENTAL)
182#
183# CONFIG_IP_SCTP is not set
184# CONFIG_ATM is not set
185# CONFIG_BRIDGE is not set
186# CONFIG_VLAN_8021Q is not set
187# CONFIG_DECNET is not set
188# CONFIG_LLC2 is not set
189# CONFIG_IPX is not set
190# CONFIG_ATALK is not set
191# CONFIG_X25 is not set
192# CONFIG_LAPB is not set
193# CONFIG_NET_DIVERT is not set
194# CONFIG_ECONET is not set
195# CONFIG_WAN_ROUTER is not set
196# CONFIG_NET_SCHED is not set
197# CONFIG_NET_CLS_ROUTE is not set
198
199#
200# Network testing
201#
202# CONFIG_NET_PKTGEN is not set
203# CONFIG_HAMRADIO is not set
204# CONFIG_IRDA is not set
205# CONFIG_BT is not set
206# CONFIG_IEEE80211 is not set
207
208#
209# Device Drivers
210#
211
212#
213# Generic Driver Options
214#
215CONFIG_STANDALONE=y
216CONFIG_PREVENT_FIRMWARE_BUILD=y
217# CONFIG_FW_LOADER is not set
218# CONFIG_DEBUG_DRIVER is not set
219
220#
221# Connector - unified userspace <-> kernelspace linker
222#
223# CONFIG_CONNECTOR is not set
224
225#
226# Memory Technology Devices (MTD)
227#
228# CONFIG_MTD is not set
229
230#
231# Parallel port support
232#
233# CONFIG_PARPORT is not set
234
235#
236# Plug and Play support
237#
238
239#
240# Block devices
241#
242# CONFIG_BLK_DEV_FD is not set
243# CONFIG_BLK_CPQ_DA is not set
244# CONFIG_BLK_CPQ_CISS_DA is not set
245# CONFIG_BLK_DEV_DAC960 is not set
246# CONFIG_BLK_DEV_UMEM is not set
247# CONFIG_BLK_DEV_COW_COMMON is not set
248# CONFIG_BLK_DEV_LOOP is not set
249# CONFIG_BLK_DEV_NBD is not set
250# CONFIG_BLK_DEV_SX8 is not set
251# CONFIG_BLK_DEV_UB is not set
252CONFIG_BLK_DEV_RAM=y
253CONFIG_BLK_DEV_RAM_COUNT=16
254CONFIG_BLK_DEV_RAM_SIZE=8192
255# CONFIG_BLK_DEV_INITRD is not set
256# CONFIG_CDROM_PKTCDVD is not set
257
258#
259# IO Schedulers
260#
261CONFIG_IOSCHED_NOOP=y
262CONFIG_IOSCHED_AS=y
263CONFIG_IOSCHED_DEADLINE=y
264CONFIG_IOSCHED_CFQ=y
265# CONFIG_ATA_OVER_ETH is not set
266
267#
268# ATA/ATAPI/MFM/RLL support
269#
270CONFIG_IDE=y
271CONFIG_BLK_DEV_IDE=y
272
273#
274# Please see Documentation/ide.txt for help/info on IDE drives
275#
276# CONFIG_BLK_DEV_IDE_SATA is not set
277CONFIG_BLK_DEV_IDEDISK=y
278# CONFIG_IDEDISK_MULTI_MODE is not set
279CONFIG_BLK_DEV_IDECD=y
280# CONFIG_BLK_DEV_IDETAPE is not set
281# CONFIG_BLK_DEV_IDEFLOPPY is not set
282CONFIG_IDE_TASK_IOCTL=y
283
284#
285# IDE chipset support/bugfixes
286#
287CONFIG_IDE_GENERIC=y
288CONFIG_BLK_DEV_IDEPCI=y
289CONFIG_IDEPCI_SHARE_IRQ=y
290# CONFIG_BLK_DEV_OFFBOARD is not set
291CONFIG_BLK_DEV_GENERIC=y
292# CONFIG_BLK_DEV_OPTI621 is not set
293# CONFIG_BLK_DEV_SL82C105 is not set
294CONFIG_BLK_DEV_IDEDMA_PCI=y
295# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
296CONFIG_IDEDMA_PCI_AUTO=y
297# CONFIG_IDEDMA_ONLYDISK is not set
298# CONFIG_BLK_DEV_AEC62XX is not set
299# CONFIG_BLK_DEV_ALI15X3 is not set
300CONFIG_BLK_DEV_AMD74XX=y
301# CONFIG_BLK_DEV_CMD64X is not set
302# CONFIG_BLK_DEV_TRIFLEX is not set
303# CONFIG_BLK_DEV_CY82C693 is not set
304# CONFIG_BLK_DEV_CS5520 is not set
305# CONFIG_BLK_DEV_CS5530 is not set
306# CONFIG_BLK_DEV_HPT34X is not set
307# CONFIG_BLK_DEV_HPT366 is not set
308# CONFIG_BLK_DEV_SC1200 is not set
309# CONFIG_BLK_DEV_PIIX is not set
310# CONFIG_BLK_DEV_IT821X is not set
311# CONFIG_BLK_DEV_NS87415 is not set
312# CONFIG_BLK_DEV_PDC202XX_OLD is not set
313# CONFIG_BLK_DEV_PDC202XX_NEW is not set
314# CONFIG_BLK_DEV_SVWKS is not set
315# CONFIG_BLK_DEV_SIIMAGE is not set
316# CONFIG_BLK_DEV_SLC90E66 is not set
317# CONFIG_BLK_DEV_TRM290 is not set
318# CONFIG_BLK_DEV_VIA82CXXX is not set
319# CONFIG_IDE_ARM is not set
320CONFIG_BLK_DEV_IDEDMA=y
321# CONFIG_IDEDMA_IVB is not set
322CONFIG_IDEDMA_AUTO=y
323# CONFIG_BLK_DEV_HD is not set
324
325#
326# SCSI device support
327#
328# CONFIG_RAID_ATTRS is not set
329# CONFIG_SCSI is not set
330
331#
332# Multi-device support (RAID and LVM)
333#
334# CONFIG_MD is not set
335
336#
337# Fusion MPT device support
338#
339# CONFIG_FUSION is not set
340
341#
342# IEEE 1394 (FireWire) support
343#
344# CONFIG_IEEE1394 is not set
345
346#
347# I2O device support
348#
349# CONFIG_I2O is not set
350
351#
352# Macintosh device drivers
353#
354
355#
356# Network device support
357#
358CONFIG_NETDEVICES=y
359# CONFIG_DUMMY is not set
360# CONFIG_BONDING is not set
361# CONFIG_EQUALIZER is not set
362# CONFIG_TUN is not set
363
364#
365# ARCnet devices
366#
367# CONFIG_ARCNET is not set
368
369#
370# PHY device support
371#
372# CONFIG_PHYLIB is not set
373
374#
375# Ethernet (10 or 100Mbit)
376#
377CONFIG_NET_ETHERNET=y
378CONFIG_MII=y
379# CONFIG_HAPPYMEAL is not set
380# CONFIG_SUNGEM is not set
381# CONFIG_CASSINI is not set
382# CONFIG_NET_VENDOR_3COM is not set
383
384#
385# Tulip family network device support
386#
387# CONFIG_NET_TULIP is not set
388# CONFIG_HP100 is not set
389CONFIG_NET_PCI=y
390# CONFIG_PCNET32 is not set
391CONFIG_AMD8111_ETH=y
392# CONFIG_AMD8111E_NAPI is not set
393# CONFIG_ADAPTEC_STARFIRE is not set
394# CONFIG_B44 is not set
395# CONFIG_FORCEDETH is not set
396# CONFIG_DGRS is not set
397# CONFIG_EEPRO100 is not set
398# CONFIG_E100 is not set
399# CONFIG_FEALNX is not set
400# CONFIG_NATSEMI is not set
401# CONFIG_NE2K_PCI is not set
402# CONFIG_8139CP is not set
403# CONFIG_8139TOO is not set
404# CONFIG_SIS900 is not set
405# CONFIG_EPIC100 is not set
406# CONFIG_SUNDANCE is not set
407# CONFIG_VIA_RHINE is not set
408
409#
410# Ethernet (1000 Mbit)
411#
412# CONFIG_ACENIC is not set
413# CONFIG_DL2K is not set
414CONFIG_E1000=y
415# CONFIG_E1000_NAPI is not set
416# CONFIG_NS83820 is not set
417# CONFIG_HAMACHI is not set
418# CONFIG_YELLOWFIN is not set
419# CONFIG_R8169 is not set
420# CONFIG_SIS190 is not set
421# CONFIG_SKGE is not set
422# CONFIG_SK98LIN is not set
423# CONFIG_VIA_VELOCITY is not set
424# CONFIG_TIGON3 is not set
425# CONFIG_BNX2 is not set
426# CONFIG_MV643XX_ETH is not set
427
428#
429# Ethernet (10000 Mbit)
430#
431# CONFIG_CHELSIO_T1 is not set
432# CONFIG_IXGB is not set
433# CONFIG_S2IO is not set
434
435#
436# Token Ring devices
437#
438# CONFIG_TR is not set
439
440#
441# Wireless LAN (non-hamradio)
442#
443# CONFIG_NET_RADIO is not set
444
445#
446# Wan interfaces
447#
448# CONFIG_WAN is not set
449# CONFIG_FDDI is not set
450# CONFIG_HIPPI is not set
451# CONFIG_PPP is not set
452# CONFIG_SLIP is not set
453# CONFIG_SHAPER is not set
454# CONFIG_NETCONSOLE is not set
455# CONFIG_NETPOLL is not set
456# CONFIG_NET_POLL_CONTROLLER is not set
457
458#
459# ISDN subsystem
460#
461# CONFIG_ISDN is not set
462
463#
464# Telephony Support
465#
466# CONFIG_PHONE is not set
467
468#
469# Input device support
470#
471CONFIG_INPUT=y
472
473#
474# Userland interfaces
475#
476CONFIG_INPUT_MOUSEDEV=y
477# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
478CONFIG_INPUT_MOUSEDEV_SCREEN_X=1600
479CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
480# CONFIG_INPUT_JOYDEV is not set
481# CONFIG_INPUT_TSDEV is not set
482# CONFIG_INPUT_EVDEV is not set
483# CONFIG_INPUT_EVBUG is not set
484
485#
486# Input Device Drivers
487#
488# CONFIG_INPUT_KEYBOARD is not set
489# CONFIG_INPUT_MOUSE is not set
490# CONFIG_INPUT_JOYSTICK is not set
491# CONFIG_INPUT_TOUCHSCREEN is not set
492# CONFIG_INPUT_MISC is not set
493
494#
495# Hardware I/O ports
496#
497# CONFIG_SERIO is not set
498# CONFIG_GAMEPORT is not set
499
500#
501# Character devices
502#
503CONFIG_VT=y
504CONFIG_VT_CONSOLE=y
505CONFIG_HW_CONSOLE=y
506# CONFIG_SERIAL_NONSTANDARD is not set
507
508#
509# Serial drivers
510#
511CONFIG_SERIAL_8250=y
512CONFIG_SERIAL_8250_CONSOLE=y
513CONFIG_SERIAL_8250_NR_UARTS=4
514# CONFIG_SERIAL_8250_EXTENDED is not set
515
516#
517# Non-8250 serial port support
518#
519CONFIG_SERIAL_CORE=y
520CONFIG_SERIAL_CORE_CONSOLE=y
521# CONFIG_SERIAL_JSM is not set
522CONFIG_UNIX98_PTYS=y
523CONFIG_LEGACY_PTYS=y
524CONFIG_LEGACY_PTY_COUNT=256
525
526#
527# IPMI
528#
529# CONFIG_IPMI_HANDLER is not set
530
531#
532# Watchdog Cards
533#
534# CONFIG_WATCHDOG is not set
535# CONFIG_RTC is not set
536# CONFIG_DTLK is not set
537# CONFIG_R3964 is not set
538# CONFIG_APPLICOM is not set
539
540#
541# Ftape, the floppy tape device driver
542#
543# CONFIG_AGP is not set
544# CONFIG_DRM is not set
545# CONFIG_RAW_DRIVER is not set
546# CONFIG_HANGCHECK_TIMER is not set
547
548#
549# TPM devices
550#
551# CONFIG_TCG_TPM is not set
552
553#
554# I2C support
555#
556CONFIG_I2C=y
557CONFIG_I2C_CHARDEV=y
558
559#
560# I2C Algorithms
561#
562CONFIG_I2C_ALGOBIT=y
563# CONFIG_I2C_ALGOPCF is not set
564# CONFIG_I2C_ALGOPCA is not set
565
566#
567# I2C Hardware Bus support
568#
569# CONFIG_I2C_ALI1535 is not set
570# CONFIG_I2C_ALI1563 is not set
571# CONFIG_I2C_ALI15X3 is not set
572# CONFIG_I2C_AMD756 is not set
573CONFIG_I2C_AMD8111=y
574# CONFIG_I2C_I801 is not set
575# CONFIG_I2C_I810 is not set
576# CONFIG_I2C_PIIX4 is not set
577# CONFIG_I2C_NFORCE2 is not set
578# CONFIG_I2C_PARPORT_LIGHT is not set
579# CONFIG_I2C_PROSAVAGE is not set
580# CONFIG_I2C_SAVAGE4 is not set
581# CONFIG_SCx200_ACB is not set
582# CONFIG_I2C_SIS5595 is not set
583# CONFIG_I2C_SIS630 is not set
584# CONFIG_I2C_SIS96X is not set
585# CONFIG_I2C_STUB is not set
586# CONFIG_I2C_VIA is not set
587# CONFIG_I2C_VIAPRO is not set
588# CONFIG_I2C_VOODOO3 is not set
589# CONFIG_I2C_PCA_ISA is not set
590
591#
592# Miscellaneous I2C Chip support
593#
594# CONFIG_SENSORS_DS1337 is not set
595# CONFIG_SENSORS_DS1374 is not set
596# CONFIG_SENSORS_EEPROM is not set
597# CONFIG_SENSORS_PCF8574 is not set
598# CONFIG_SENSORS_PCA9539 is not set
599# CONFIG_SENSORS_PCF8591 is not set
600# CONFIG_SENSORS_RTC8564 is not set
601# CONFIG_SENSORS_MAX6875 is not set
602# CONFIG_I2C_DEBUG_CORE is not set
603# CONFIG_I2C_DEBUG_ALGO is not set
604# CONFIG_I2C_DEBUG_BUS is not set
605# CONFIG_I2C_DEBUG_CHIP is not set
606
607#
608# Dallas's 1-wire bus
609#
610# CONFIG_W1 is not set
611
612#
613# Hardware Monitoring support
614#
615# CONFIG_HWMON is not set
616# CONFIG_HWMON_VID is not set
617
618#
619# Misc devices
620#
621
622#
623# Multimedia Capabilities Port drivers
624#
625
626#
627# Multimedia devices
628#
629# CONFIG_VIDEO_DEV is not set
630
631#
632# Digital Video Broadcasting Devices
633#
634# CONFIG_DVB is not set
635
636#
637# Graphics support
638#
639# CONFIG_FB is not set
640
641#
642# Console display driver support
643#
644# CONFIG_VGA_CONSOLE is not set
645CONFIG_DUMMY_CONSOLE=y
646
647#
648# Sound
649#
650# CONFIG_SOUND is not set
651
652#
653# USB support
654#
655CONFIG_USB_ARCH_HAS_HCD=y
656CONFIG_USB_ARCH_HAS_OHCI=y
657CONFIG_USB=y
658# CONFIG_USB_DEBUG is not set
659
660#
661# Miscellaneous USB options
662#
663CONFIG_USB_DEVICEFS=y
664# CONFIG_USB_BANDWIDTH is not set
665# CONFIG_USB_DYNAMIC_MINORS is not set
666# CONFIG_USB_OTG is not set
667
668#
669# USB Host Controller Drivers
670#
671CONFIG_USB_EHCI_HCD=y
672CONFIG_USB_EHCI_SPLIT_ISO=y
673CONFIG_USB_EHCI_ROOT_HUB_TT=y
674# CONFIG_USB_ISP116X_HCD is not set
675CONFIG_USB_OHCI_HCD=y
676# CONFIG_USB_OHCI_BIG_ENDIAN is not set
677CONFIG_USB_OHCI_LITTLE_ENDIAN=y
678CONFIG_USB_UHCI_HCD=y
679# CONFIG_USB_SL811_HCD is not set
680
681#
682# USB Device Class drivers
683#
684# CONFIG_USB_BLUETOOTH_TTY is not set
685# CONFIG_USB_ACM is not set
686# CONFIG_USB_PRINTER is not set
687
688#
689# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
690#
691# CONFIG_USB_STORAGE is not set
692
693#
694# USB Input Devices
695#
696CONFIG_USB_HID=y
697CONFIG_USB_HIDINPUT=y
698# CONFIG_HID_FF is not set
699# CONFIG_USB_HIDDEV is not set
700# CONFIG_USB_AIPTEK is not set
701# CONFIG_USB_WACOM is not set
702# CONFIG_USB_ACECAD is not set
703# CONFIG_USB_KBTAB is not set
704# CONFIG_USB_POWERMATE is not set
705# CONFIG_USB_MTOUCH is not set
706# CONFIG_USB_ITMTOUCH is not set
707# CONFIG_USB_EGALAX is not set
708# CONFIG_USB_YEALINK is not set
709# CONFIG_USB_XPAD is not set
710# CONFIG_USB_ATI_REMOTE is not set
711# CONFIG_USB_KEYSPAN_REMOTE is not set
712# CONFIG_USB_APPLETOUCH is not set
713
714#
715# USB Imaging devices
716#
717# CONFIG_USB_MDC800 is not set
718
719#
720# USB Multimedia devices
721#
722# CONFIG_USB_DABUSB is not set
723
724#
725# Video4Linux support is needed for USB Multimedia device support
726#
727
728#
729# USB Network Adapters
730#
731# CONFIG_USB_CATC is not set
732# CONFIG_USB_KAWETH is not set
733CONFIG_USB_PEGASUS=y
734# CONFIG_USB_RTL8150 is not set
735# CONFIG_USB_USBNET is not set
736CONFIG_USB_MON=y
737
738#
739# USB port drivers
740#
741
742#
743# USB Serial Converter support
744#
745CONFIG_USB_SERIAL=y
746# CONFIG_USB_SERIAL_CONSOLE is not set
747CONFIG_USB_SERIAL_GENERIC=y
748# CONFIG_USB_SERIAL_AIRPRIME is not set
749# CONFIG_USB_SERIAL_BELKIN is not set
750# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
751# CONFIG_USB_SERIAL_CP2101 is not set
752CONFIG_USB_SERIAL_CYPRESS_M8=m
753# CONFIG_USB_SERIAL_EMPEG is not set
754# CONFIG_USB_SERIAL_FTDI_SIO is not set
755# CONFIG_USB_SERIAL_VISOR is not set
756# CONFIG_USB_SERIAL_IPAQ is not set
757# CONFIG_USB_SERIAL_IR is not set
758# CONFIG_USB_SERIAL_EDGEPORT is not set
759# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
760CONFIG_USB_SERIAL_GARMIN=m
761CONFIG_USB_SERIAL_IPW=m
762# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
763CONFIG_USB_SERIAL_KEYSPAN=y
764CONFIG_USB_SERIAL_KEYSPAN_MPR=y
765CONFIG_USB_SERIAL_KEYSPAN_USA28=y
766CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
767CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
768CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
769CONFIG_USB_SERIAL_KEYSPAN_USA19=y
770CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
771CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
772CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
773CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
774CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
775CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
776# CONFIG_USB_SERIAL_KLSI is not set
777# CONFIG_USB_SERIAL_KOBIL_SCT is not set
778# CONFIG_USB_SERIAL_MCT_U232 is not set
779# CONFIG_USB_SERIAL_PL2303 is not set
780# CONFIG_USB_SERIAL_HP4X is not set
781# CONFIG_USB_SERIAL_SAFE is not set
782CONFIG_USB_SERIAL_TI=m
783# CONFIG_USB_SERIAL_CYBERJACK is not set
784# CONFIG_USB_SERIAL_XIRCOM is not set
785# CONFIG_USB_SERIAL_OMNINET is not set
786CONFIG_USB_EZUSB=y
787
788#
789# USB Miscellaneous drivers
790#
791# CONFIG_USB_EMI62 is not set
792# CONFIG_USB_EMI26 is not set
793# CONFIG_USB_AUERSWALD is not set
794# CONFIG_USB_RIO500 is not set
795# CONFIG_USB_LEGOTOWER is not set
796# CONFIG_USB_LCD is not set
797# CONFIG_USB_LED is not set
798# CONFIG_USB_CYTHERM is not set
799# CONFIG_USB_PHIDGETKIT is not set
800# CONFIG_USB_PHIDGETSERVO is not set
801# CONFIG_USB_IDMOUSE is not set
802# CONFIG_USB_SISUSBVGA is not set
803# CONFIG_USB_LD is not set
804# CONFIG_USB_TEST is not set
805
806#
807# USB DSL modem support
808#
809
810#
811# USB Gadget Support
812#
813# CONFIG_USB_GADGET is not set
814
815#
816# MMC/SD Card support
817#
818# CONFIG_MMC is not set
819
820#
821# InfiniBand support
822#
823# CONFIG_INFINIBAND is not set
824
825#
826# SN Devices
827#
828
829#
830# File systems
831#
832CONFIG_EXT2_FS=y
833# CONFIG_EXT2_FS_XATTR is not set
834CONFIG_EXT2_FS_XIP=y
835CONFIG_FS_XIP=y
836CONFIG_EXT3_FS=y
837# CONFIG_EXT3_FS_XATTR is not set
838CONFIG_JBD=y
839# CONFIG_JBD_DEBUG is not set
840# CONFIG_REISERFS_FS is not set
841# CONFIG_JFS_FS is not set
842CONFIG_FS_POSIX_ACL=y
843# CONFIG_XFS_FS is not set
844# CONFIG_MINIX_FS is not set
845# CONFIG_ROMFS_FS is not set
846CONFIG_INOTIFY=y
847# CONFIG_QUOTA is not set
848CONFIG_DNOTIFY=y
849# CONFIG_AUTOFS_FS is not set
850# CONFIG_AUTOFS4_FS is not set
851# CONFIG_FUSE_FS is not set
852
853#
854# CD-ROM/DVD Filesystems
855#
856# CONFIG_ISO9660_FS is not set
857# CONFIG_UDF_FS is not set
858
859#
860# DOS/FAT/NT Filesystems
861#
862CONFIG_FAT_FS=y
863CONFIG_MSDOS_FS=y
864CONFIG_VFAT_FS=y
865CONFIG_FAT_DEFAULT_CODEPAGE=437
866CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
867# CONFIG_NTFS_FS is not set
868
869#
870# Pseudo filesystems
871#
872CONFIG_PROC_FS=y
873CONFIG_PROC_KCORE=y
874CONFIG_SYSFS=y
875CONFIG_TMPFS=y
876CONFIG_HUGETLBFS=y
877CONFIG_HUGETLB_PAGE=y
878CONFIG_RAMFS=y
879# CONFIG_RELAYFS_FS is not set
880
881#
882# Miscellaneous filesystems
883#
884# CONFIG_ADFS_FS is not set
885# CONFIG_AFFS_FS is not set
886# CONFIG_HFS_FS is not set
887# CONFIG_HFSPLUS_FS is not set
888# CONFIG_BEFS_FS is not set
889# CONFIG_BFS_FS is not set
890# CONFIG_EFS_FS is not set
891CONFIG_CRAMFS=y
892# CONFIG_VXFS_FS is not set
893# CONFIG_HPFS_FS is not set
894# CONFIG_QNX4FS_FS is not set
895# CONFIG_SYSV_FS is not set
896# CONFIG_UFS_FS is not set
897
898#
899# Network File Systems
900#
901CONFIG_NFS_FS=y
902CONFIG_NFS_V3=y
903CONFIG_NFS_V3_ACL=y
904CONFIG_NFS_V4=y
905# CONFIG_NFS_DIRECTIO is not set
906# CONFIG_NFSD is not set
907CONFIG_ROOT_NFS=y
908CONFIG_LOCKD=y
909CONFIG_LOCKD_V4=y
910CONFIG_NFS_ACL_SUPPORT=y
911CONFIG_NFS_COMMON=y
912CONFIG_SUNRPC=y
913CONFIG_SUNRPC_GSS=y
914CONFIG_RPCSEC_GSS_KRB5=y
915# CONFIG_RPCSEC_GSS_SPKM3 is not set
916# CONFIG_SMB_FS is not set
917# CONFIG_CIFS is not set
918# CONFIG_NCP_FS is not set
919# CONFIG_CODA_FS is not set
920# CONFIG_AFS_FS is not set
921# CONFIG_9P_FS is not set
922
923#
924# Partition Types
925#
926CONFIG_PARTITION_ADVANCED=y
927# CONFIG_ACORN_PARTITION is not set
928# CONFIG_OSF_PARTITION is not set
929# CONFIG_AMIGA_PARTITION is not set
930# CONFIG_ATARI_PARTITION is not set
931CONFIG_MAC_PARTITION=y
932CONFIG_MSDOS_PARTITION=y
933# CONFIG_BSD_DISKLABEL is not set
934# CONFIG_MINIX_SUBPARTITION is not set
935# CONFIG_SOLARIS_X86_PARTITION is not set
936# CONFIG_UNIXWARE_DISKLABEL is not set
937# CONFIG_LDM_PARTITION is not set
938# CONFIG_SGI_PARTITION is not set
939# CONFIG_ULTRIX_PARTITION is not set
940# CONFIG_SUN_PARTITION is not set
941# CONFIG_EFI_PARTITION is not set
942
943#
944# Native Language Support
945#
946CONFIG_NLS=y
947CONFIG_NLS_DEFAULT="utf-8"
948# CONFIG_NLS_CODEPAGE_437 is not set
949# CONFIG_NLS_CODEPAGE_737 is not set
950# CONFIG_NLS_CODEPAGE_775 is not set
951# CONFIG_NLS_CODEPAGE_850 is not set
952# CONFIG_NLS_CODEPAGE_852 is not set
953# CONFIG_NLS_CODEPAGE_855 is not set
954# CONFIG_NLS_CODEPAGE_857 is not set
955# CONFIG_NLS_CODEPAGE_860 is not set
956# CONFIG_NLS_CODEPAGE_861 is not set
957# CONFIG_NLS_CODEPAGE_862 is not set
958# CONFIG_NLS_CODEPAGE_863 is not set
959# CONFIG_NLS_CODEPAGE_864 is not set
960# CONFIG_NLS_CODEPAGE_865 is not set
961# CONFIG_NLS_CODEPAGE_866 is not set
962# CONFIG_NLS_CODEPAGE_869 is not set
963# CONFIG_NLS_CODEPAGE_936 is not set
964# CONFIG_NLS_CODEPAGE_950 is not set
965# CONFIG_NLS_CODEPAGE_932 is not set
966# CONFIG_NLS_CODEPAGE_949 is not set
967# CONFIG_NLS_CODEPAGE_874 is not set
968# CONFIG_NLS_ISO8859_8 is not set
969# CONFIG_NLS_CODEPAGE_1250 is not set
970# CONFIG_NLS_CODEPAGE_1251 is not set
971# CONFIG_NLS_ASCII is not set
972# CONFIG_NLS_ISO8859_1 is not set
973# CONFIG_NLS_ISO8859_2 is not set
974# CONFIG_NLS_ISO8859_3 is not set
975# CONFIG_NLS_ISO8859_4 is not set
976# CONFIG_NLS_ISO8859_5 is not set
977# CONFIG_NLS_ISO8859_6 is not set
978# CONFIG_NLS_ISO8859_7 is not set
979# CONFIG_NLS_ISO8859_9 is not set
980# CONFIG_NLS_ISO8859_13 is not set
981# CONFIG_NLS_ISO8859_14 is not set
982# CONFIG_NLS_ISO8859_15 is not set
983# CONFIG_NLS_KOI8_R is not set
984# CONFIG_NLS_KOI8_U is not set
985CONFIG_NLS_UTF8=y
986
987#
988# Profiling support
989#
990# CONFIG_PROFILING is not set
991
992#
993# Kernel hacking
994#
995# CONFIG_PRINTK_TIME is not set
996CONFIG_DEBUG_KERNEL=y
997CONFIG_MAGIC_SYSRQ=y
998CONFIG_LOG_BUF_SHIFT=17
999CONFIG_DETECT_SOFTLOCKUP=y
1000# CONFIG_SCHEDSTATS is not set
1001CONFIG_DEBUG_SLAB=y
1002# CONFIG_DEBUG_SPINLOCK is not set
1003CONFIG_DEBUG_SPINLOCK_SLEEP=y
1004# CONFIG_DEBUG_KOBJECT is not set
1005# CONFIG_DEBUG_INFO is not set
1006CONFIG_DEBUG_FS=y
1007CONFIG_DEBUG_STACKOVERFLOW=y
1008# CONFIG_KPROBES is not set
1009CONFIG_DEBUG_STACK_USAGE=y
1010CONFIG_DEBUGGER=y
1011CONFIG_XMON=y
1012CONFIG_XMON_DEFAULT=y
1013# CONFIG_PPCDBG is not set
1014# CONFIG_IRQSTACKS is not set
1015
1016#
1017# Security options
1018#
1019# CONFIG_KEYS is not set
1020# CONFIG_SECURITY is not set
1021
1022#
1023# Cryptographic options
1024#
1025CONFIG_CRYPTO=y
1026# CONFIG_CRYPTO_HMAC is not set
1027# CONFIG_CRYPTO_NULL is not set
1028# CONFIG_CRYPTO_MD4 is not set
1029CONFIG_CRYPTO_MD5=y
1030# CONFIG_CRYPTO_SHA1 is not set
1031# CONFIG_CRYPTO_SHA256 is not set
1032# CONFIG_CRYPTO_SHA512 is not set
1033# CONFIG_CRYPTO_WP512 is not set
1034# CONFIG_CRYPTO_TGR192 is not set
1035CONFIG_CRYPTO_DES=y
1036# CONFIG_CRYPTO_BLOWFISH is not set
1037# CONFIG_CRYPTO_TWOFISH is not set
1038# CONFIG_CRYPTO_SERPENT is not set
1039# CONFIG_CRYPTO_AES is not set
1040# CONFIG_CRYPTO_CAST5 is not set
1041# CONFIG_CRYPTO_CAST6 is not set
1042# CONFIG_CRYPTO_TEA is not set
1043# CONFIG_CRYPTO_ARC4 is not set
1044# CONFIG_CRYPTO_KHAZAD is not set
1045# CONFIG_CRYPTO_ANUBIS is not set
1046# CONFIG_CRYPTO_DEFLATE is not set
1047# CONFIG_CRYPTO_MICHAEL_MIC is not set
1048# CONFIG_CRYPTO_CRC32C is not set
1049# CONFIG_CRYPTO_TEST is not set
1050
1051#
1052# Hardware crypto devices
1053#
1054
1055#
1056# Library routines
1057#
1058CONFIG_CRC_CCITT=y
1059# CONFIG_CRC16 is not set
1060CONFIG_CRC32=y
1061# CONFIG_LIBCRC32C is not set
1062CONFIG_ZLIB_INFLATE=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
new file mode 100644
index 000000000000..9f09dff9e11a
--- /dev/null
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -0,0 +1,1371 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4
4# Thu Oct 20 08:32:17 2005
5#
6CONFIG_64BIT=y
7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13
16
17#
18# Code maturity level options
19#
20CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_LOCK_KERNEL=y
23CONFIG_INIT_ENV_ARG_LIMIT=32
24
25#
26# General setup
27#
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SWAP=y
31CONFIG_SYSVIPC=y
32CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set
34CONFIG_SYSCTL=y
35CONFIG_AUDIT=y
36CONFIG_AUDITSYSCALL=y
37CONFIG_HOTPLUG=y
38CONFIG_KOBJECT_UEVENT=y
39CONFIG_IKCONFIG=y
40CONFIG_IKCONFIG_PROC=y
41CONFIG_CPUSETS=y
42CONFIG_INITRAMFS_SOURCE=""
43# CONFIG_EMBEDDED is not set
44CONFIG_KALLSYMS=y
45CONFIG_KALLSYMS_ALL=y
46# CONFIG_KALLSYMS_EXTRA_PASS is not set
47CONFIG_PRINTK=y
48CONFIG_BUG=y
49CONFIG_BASE_FULL=y
50CONFIG_FUTEX=y
51CONFIG_EPOLL=y
52CONFIG_SHMEM=y
53CONFIG_CC_ALIGN_FUNCTIONS=0
54CONFIG_CC_ALIGN_LABELS=0
55CONFIG_CC_ALIGN_LOOPS=0
56CONFIG_CC_ALIGN_JUMPS=0
57# CONFIG_TINY_SHMEM is not set
58CONFIG_BASE_SMALL=0
59
60#
61# Loadable module support
62#
63CONFIG_MODULES=y
64CONFIG_MODULE_UNLOAD=y
65# CONFIG_MODULE_FORCE_UNLOAD is not set
66CONFIG_OBSOLETE_MODPARM=y
67CONFIG_MODVERSIONS=y
68CONFIG_MODULE_SRCVERSION_ALL=y
69CONFIG_KMOD=y
70CONFIG_STOP_MACHINE=y
71CONFIG_SYSVIPC_COMPAT=y
72
73#
74# Platform support
75#
76# CONFIG_PPC_ISERIES is not set
77CONFIG_PPC_MULTIPLATFORM=y
78CONFIG_PPC_PSERIES=y
79# CONFIG_PPC_BPA is not set
80# CONFIG_PPC_PMAC is not set
81# CONFIG_PPC_MAPLE is not set
82CONFIG_PPC=y
83CONFIG_PPC64=y
84CONFIG_PPC_OF=y
85CONFIG_XICS=y
86CONFIG_MPIC=y
87CONFIG_ALTIVEC=y
88CONFIG_PPC_SPLPAR=y
89CONFIG_KEXEC=y
90CONFIG_IBMVIO=y
91# CONFIG_U3_DART is not set
92# CONFIG_BOOTX_TEXT is not set
93# CONFIG_POWER4_ONLY is not set
94CONFIG_IOMMU_VMERGE=y
95CONFIG_SMP=y
96CONFIG_NR_CPUS=128
97CONFIG_ARCH_SELECT_MEMORY_MODEL=y
98CONFIG_ARCH_FLATMEM_ENABLE=y
99CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
100CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
101CONFIG_ARCH_SPARSEMEM_ENABLE=y
102CONFIG_SELECT_MEMORY_MODEL=y
103# CONFIG_FLATMEM_MANUAL is not set
104CONFIG_DISCONTIGMEM_MANUAL=y
105# CONFIG_SPARSEMEM_MANUAL is not set
106CONFIG_DISCONTIGMEM=y
107CONFIG_FLAT_NODE_MEM_MAP=y
108CONFIG_NEED_MULTIPLE_NODES=y
109# CONFIG_SPARSEMEM_STATIC is not set
110CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
111CONFIG_NODES_SPAN_OTHER_NODES=y
112CONFIG_NUMA=y
113CONFIG_SCHED_SMT=y
114CONFIG_PREEMPT_NONE=y
115# CONFIG_PREEMPT_VOLUNTARY is not set
116# CONFIG_PREEMPT is not set
117# CONFIG_PREEMPT_BKL is not set
118# CONFIG_HZ_100 is not set
119CONFIG_HZ_250=y
120# CONFIG_HZ_1000 is not set
121CONFIG_HZ=250
122CONFIG_EEH=y
123CONFIG_GENERIC_HARDIRQS=y
124CONFIG_PPC_RTAS=y
125CONFIG_RTAS_PROC=y
126CONFIG_RTAS_FLASH=m
127CONFIG_SCANLOG=m
128CONFIG_LPARCFG=y
129CONFIG_SECCOMP=y
130CONFIG_BINFMT_ELF=y
131# CONFIG_BINFMT_MISC is not set
132CONFIG_HOTPLUG_CPU=y
133CONFIG_PROC_DEVICETREE=y
134# CONFIG_CMDLINE_BOOL is not set
135CONFIG_ISA_DMA_API=y
136
137#
138# Bus Options
139#
140CONFIG_PCI=y
141CONFIG_PCI_DOMAINS=y
142CONFIG_PCI_LEGACY_PROC=y
143# CONFIG_PCI_DEBUG is not set
144
145#
146# PCCARD (PCMCIA/CardBus) support
147#
148# CONFIG_PCCARD is not set
149
150#
151# PCI Hotplug Support
152#
153CONFIG_HOTPLUG_PCI=m
154# CONFIG_HOTPLUG_PCI_FAKE is not set
155# CONFIG_HOTPLUG_PCI_CPCI is not set
156# CONFIG_HOTPLUG_PCI_SHPC is not set
157CONFIG_HOTPLUG_PCI_RPA=m
158CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
159
160#
161# Networking
162#
163CONFIG_NET=y
164
165#
166# Networking options
167#
168CONFIG_PACKET=y
169# CONFIG_PACKET_MMAP is not set
170CONFIG_UNIX=y
171CONFIG_XFRM=y
172CONFIG_XFRM_USER=m
173CONFIG_NET_KEY=m
174CONFIG_INET=y
175CONFIG_IP_MULTICAST=y
176# CONFIG_IP_ADVANCED_ROUTER is not set
177CONFIG_IP_FIB_HASH=y
178# CONFIG_IP_PNP is not set
179CONFIG_NET_IPIP=y
180# CONFIG_NET_IPGRE is not set
181# CONFIG_IP_MROUTE is not set
182# CONFIG_ARPD is not set
183CONFIG_SYN_COOKIES=y
184CONFIG_INET_AH=m
185CONFIG_INET_ESP=m
186CONFIG_INET_IPCOMP=m
187CONFIG_INET_TUNNEL=y
188CONFIG_INET_DIAG=y
189CONFIG_INET_TCP_DIAG=y
190# CONFIG_TCP_CONG_ADVANCED is not set
191CONFIG_TCP_CONG_BIC=y
192
193#
194# IP: Virtual Server Configuration
195#
196# CONFIG_IP_VS is not set
197# CONFIG_IPV6 is not set
198CONFIG_NETFILTER=y
199# CONFIG_NETFILTER_DEBUG is not set
200CONFIG_NETFILTER_NETLINK=y
201CONFIG_NETFILTER_NETLINK_QUEUE=m
202CONFIG_NETFILTER_NETLINK_LOG=m
203
204#
205# IP: Netfilter Configuration
206#
207CONFIG_IP_NF_CONNTRACK=m
208CONFIG_IP_NF_CT_ACCT=y
209CONFIG_IP_NF_CONNTRACK_MARK=y
210CONFIG_IP_NF_CONNTRACK_EVENTS=y
211CONFIG_IP_NF_CONNTRACK_NETLINK=m
212CONFIG_IP_NF_CT_PROTO_SCTP=m
213CONFIG_IP_NF_FTP=m
214CONFIG_IP_NF_IRC=m
215# CONFIG_IP_NF_NETBIOS_NS is not set
216CONFIG_IP_NF_TFTP=m
217CONFIG_IP_NF_AMANDA=m
218# CONFIG_IP_NF_PPTP is not set
219CONFIG_IP_NF_QUEUE=m
220CONFIG_IP_NF_IPTABLES=m
221CONFIG_IP_NF_MATCH_LIMIT=m
222CONFIG_IP_NF_MATCH_IPRANGE=m
223CONFIG_IP_NF_MATCH_MAC=m
224CONFIG_IP_NF_MATCH_PKTTYPE=m
225CONFIG_IP_NF_MATCH_MARK=m
226CONFIG_IP_NF_MATCH_MULTIPORT=m
227CONFIG_IP_NF_MATCH_TOS=m
228CONFIG_IP_NF_MATCH_RECENT=m
229CONFIG_IP_NF_MATCH_ECN=m
230CONFIG_IP_NF_MATCH_DSCP=m
231CONFIG_IP_NF_MATCH_AH_ESP=m
232CONFIG_IP_NF_MATCH_LENGTH=m
233CONFIG_IP_NF_MATCH_TTL=m
234CONFIG_IP_NF_MATCH_TCPMSS=m
235CONFIG_IP_NF_MATCH_HELPER=m
236CONFIG_IP_NF_MATCH_STATE=m
237CONFIG_IP_NF_MATCH_CONNTRACK=m
238CONFIG_IP_NF_MATCH_OWNER=m
239CONFIG_IP_NF_MATCH_ADDRTYPE=m
240CONFIG_IP_NF_MATCH_REALM=m
241CONFIG_IP_NF_MATCH_SCTP=m
242# CONFIG_IP_NF_MATCH_DCCP is not set
243CONFIG_IP_NF_MATCH_COMMENT=m
244CONFIG_IP_NF_MATCH_CONNMARK=m
245CONFIG_IP_NF_MATCH_CONNBYTES=m
246CONFIG_IP_NF_MATCH_HASHLIMIT=m
247CONFIG_IP_NF_MATCH_STRING=m
248CONFIG_IP_NF_FILTER=m
249CONFIG_IP_NF_TARGET_REJECT=m
250CONFIG_IP_NF_TARGET_LOG=m
251CONFIG_IP_NF_TARGET_ULOG=m
252CONFIG_IP_NF_TARGET_TCPMSS=m
253CONFIG_IP_NF_TARGET_NFQUEUE=m
254CONFIG_IP_NF_NAT=m
255CONFIG_IP_NF_NAT_NEEDED=y
256CONFIG_IP_NF_TARGET_MASQUERADE=m
257CONFIG_IP_NF_TARGET_REDIRECT=m
258CONFIG_IP_NF_TARGET_NETMAP=m
259CONFIG_IP_NF_TARGET_SAME=m
260CONFIG_IP_NF_NAT_SNMP_BASIC=m
261CONFIG_IP_NF_NAT_IRC=m
262CONFIG_IP_NF_NAT_FTP=m
263CONFIG_IP_NF_NAT_TFTP=m
264CONFIG_IP_NF_NAT_AMANDA=m
265CONFIG_IP_NF_MANGLE=m
266CONFIG_IP_NF_TARGET_TOS=m
267CONFIG_IP_NF_TARGET_ECN=m
268CONFIG_IP_NF_TARGET_DSCP=m
269CONFIG_IP_NF_TARGET_MARK=m
270CONFIG_IP_NF_TARGET_CLASSIFY=m
271CONFIG_IP_NF_TARGET_TTL=m
272CONFIG_IP_NF_TARGET_CONNMARK=m
273CONFIG_IP_NF_TARGET_CLUSTERIP=m
274CONFIG_IP_NF_RAW=m
275CONFIG_IP_NF_TARGET_NOTRACK=m
276CONFIG_IP_NF_ARPTABLES=m
277CONFIG_IP_NF_ARPFILTER=m
278CONFIG_IP_NF_ARP_MANGLE=m
279
280#
281# DCCP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_DCCP is not set
284
285#
286# SCTP Configuration (EXPERIMENTAL)
287#
288# CONFIG_IP_SCTP is not set
289# CONFIG_ATM is not set
290# CONFIG_BRIDGE is not set
291# CONFIG_VLAN_8021Q is not set
292# CONFIG_DECNET is not set
293CONFIG_LLC=y
294# CONFIG_LLC2 is not set
295# CONFIG_IPX is not set
296# CONFIG_ATALK is not set
297# CONFIG_X25 is not set
298# CONFIG_LAPB is not set
299# CONFIG_NET_DIVERT is not set
300# CONFIG_ECONET is not set
301# CONFIG_WAN_ROUTER is not set
302# CONFIG_NET_SCHED is not set
303CONFIG_NET_CLS_ROUTE=y
304
305#
306# Network testing
307#
308# CONFIG_NET_PKTGEN is not set
309# CONFIG_HAMRADIO is not set
310# CONFIG_IRDA is not set
311# CONFIG_BT is not set
312# CONFIG_IEEE80211 is not set
313
314#
315# Device Drivers
316#
317
318#
319# Generic Driver Options
320#
321CONFIG_STANDALONE=y
322CONFIG_PREVENT_FIRMWARE_BUILD=y
323CONFIG_FW_LOADER=y
324# CONFIG_DEBUG_DRIVER is not set
325
326#
327# Connector - unified userspace <-> kernelspace linker
328#
329# CONFIG_CONNECTOR is not set
330
331#
332# Memory Technology Devices (MTD)
333#
334# CONFIG_MTD is not set
335
336#
337# Parallel port support
338#
339CONFIG_PARPORT=m
340CONFIG_PARPORT_PC=m
341# CONFIG_PARPORT_SERIAL is not set
342# CONFIG_PARPORT_PC_FIFO is not set
343# CONFIG_PARPORT_PC_SUPERIO is not set
344# CONFIG_PARPORT_GSC is not set
345# CONFIG_PARPORT_1284 is not set
346
347#
348# Plug and Play support
349#
350
351#
352# Block devices
353#
354CONFIG_BLK_DEV_FD=m
355# CONFIG_PARIDE is not set
356# CONFIG_BLK_CPQ_DA is not set
357# CONFIG_BLK_CPQ_CISS_DA is not set
358# CONFIG_BLK_DEV_DAC960 is not set
359# CONFIG_BLK_DEV_UMEM is not set
360# CONFIG_BLK_DEV_COW_COMMON is not set
361CONFIG_BLK_DEV_LOOP=y
362# CONFIG_BLK_DEV_CRYPTOLOOP is not set
363CONFIG_BLK_DEV_NBD=m
364# CONFIG_BLK_DEV_SX8 is not set
365# CONFIG_BLK_DEV_UB is not set
366CONFIG_BLK_DEV_RAM=y
367CONFIG_BLK_DEV_RAM_COUNT=16
368CONFIG_BLK_DEV_RAM_SIZE=65536
369CONFIG_BLK_DEV_INITRD=y
370# CONFIG_CDROM_PKTCDVD is not set
371
372#
373# IO Schedulers
374#
375CONFIG_IOSCHED_NOOP=y
376CONFIG_IOSCHED_AS=y
377CONFIG_IOSCHED_DEADLINE=y
378CONFIG_IOSCHED_CFQ=y
379# CONFIG_ATA_OVER_ETH is not set
380
381#
382# ATA/ATAPI/MFM/RLL support
383#
384CONFIG_IDE=y
385CONFIG_BLK_DEV_IDE=y
386
387#
388# Please see Documentation/ide.txt for help/info on IDE drives
389#
390# CONFIG_BLK_DEV_IDE_SATA is not set
391CONFIG_BLK_DEV_IDEDISK=y
392# CONFIG_IDEDISK_MULTI_MODE is not set
393CONFIG_BLK_DEV_IDECD=y
394# CONFIG_BLK_DEV_IDETAPE is not set
395# CONFIG_BLK_DEV_IDEFLOPPY is not set
396# CONFIG_BLK_DEV_IDESCSI is not set
397# CONFIG_IDE_TASK_IOCTL is not set
398
399#
400# IDE chipset support/bugfixes
401#
402CONFIG_IDE_GENERIC=y
403CONFIG_BLK_DEV_IDEPCI=y
404CONFIG_IDEPCI_SHARE_IRQ=y
405# CONFIG_BLK_DEV_OFFBOARD is not set
406CONFIG_BLK_DEV_GENERIC=y
407# CONFIG_BLK_DEV_OPTI621 is not set
408CONFIG_BLK_DEV_SL82C105=y
409CONFIG_BLK_DEV_IDEDMA_PCI=y
410# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
411CONFIG_IDEDMA_PCI_AUTO=y
412# CONFIG_IDEDMA_ONLYDISK is not set
413# CONFIG_BLK_DEV_AEC62XX is not set
414# CONFIG_BLK_DEV_ALI15X3 is not set
415CONFIG_BLK_DEV_AMD74XX=y
416# CONFIG_BLK_DEV_CMD64X is not set
417# CONFIG_BLK_DEV_TRIFLEX is not set
418# CONFIG_BLK_DEV_CY82C693 is not set
419# CONFIG_BLK_DEV_CS5520 is not set
420# CONFIG_BLK_DEV_CS5530 is not set
421# CONFIG_BLK_DEV_HPT34X is not set
422# CONFIG_BLK_DEV_HPT366 is not set
423# CONFIG_BLK_DEV_SC1200 is not set
424# CONFIG_BLK_DEV_PIIX is not set
425# CONFIG_BLK_DEV_IT821X is not set
426# CONFIG_BLK_DEV_NS87415 is not set
427# CONFIG_BLK_DEV_PDC202XX_OLD is not set
428# CONFIG_BLK_DEV_PDC202XX_NEW is not set
429# CONFIG_BLK_DEV_SVWKS is not set
430# CONFIG_BLK_DEV_SIIMAGE is not set
431# CONFIG_BLK_DEV_SLC90E66 is not set
432# CONFIG_BLK_DEV_TRM290 is not set
433# CONFIG_BLK_DEV_VIA82CXXX is not set
434# CONFIG_IDE_ARM is not set
435CONFIG_BLK_DEV_IDEDMA=y
436# CONFIG_IDEDMA_IVB is not set
437CONFIG_IDEDMA_AUTO=y
438# CONFIG_BLK_DEV_HD is not set
439
440#
441# SCSI device support
442#
443# CONFIG_RAID_ATTRS is not set
444CONFIG_SCSI=y
445CONFIG_SCSI_PROC_FS=y
446
447#
448# SCSI support type (disk, tape, CD-ROM)
449#
450CONFIG_BLK_DEV_SD=y
451CONFIG_CHR_DEV_ST=y
452# CONFIG_CHR_DEV_OSST is not set
453CONFIG_BLK_DEV_SR=y
454CONFIG_BLK_DEV_SR_VENDOR=y
455CONFIG_CHR_DEV_SG=y
456# CONFIG_CHR_DEV_SCH is not set
457
458#
459# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
460#
461CONFIG_SCSI_MULTI_LUN=y
462CONFIG_SCSI_CONSTANTS=y
463# CONFIG_SCSI_LOGGING is not set
464
465#
466# SCSI Transport Attributes
467#
468CONFIG_SCSI_SPI_ATTRS=y
469CONFIG_SCSI_FC_ATTRS=y
470CONFIG_SCSI_ISCSI_ATTRS=m
471# CONFIG_SCSI_SAS_ATTRS is not set
472
473#
474# SCSI low-level drivers
475#
476# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
477# CONFIG_SCSI_3W_9XXX is not set
478# CONFIG_SCSI_ACARD is not set
479# CONFIG_SCSI_AACRAID is not set
480# CONFIG_SCSI_AIC7XXX is not set
481# CONFIG_SCSI_AIC7XXX_OLD is not set
482# CONFIG_SCSI_AIC79XX is not set
483# CONFIG_MEGARAID_NEWGEN is not set
484# CONFIG_MEGARAID_LEGACY is not set
485# CONFIG_MEGARAID_SAS is not set
486# CONFIG_SCSI_SATA is not set
487# CONFIG_SCSI_BUSLOGIC is not set
488# CONFIG_SCSI_DMX3191D is not set
489# CONFIG_SCSI_EATA is not set
490# CONFIG_SCSI_FUTURE_DOMAIN is not set
491# CONFIG_SCSI_GDTH is not set
492# CONFIG_SCSI_IPS is not set
493CONFIG_SCSI_IBMVSCSI=y
494# CONFIG_SCSI_INITIO is not set
495# CONFIG_SCSI_INIA100 is not set
496# CONFIG_SCSI_PPA is not set
497# CONFIG_SCSI_IMM is not set
498CONFIG_SCSI_SYM53C8XX_2=y
499CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
500CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
501CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
502# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
503CONFIG_SCSI_IPR=y
504CONFIG_SCSI_IPR_TRACE=y
505CONFIG_SCSI_IPR_DUMP=y
506# CONFIG_SCSI_QLOGIC_FC is not set
507# CONFIG_SCSI_QLOGIC_1280 is not set
508CONFIG_SCSI_QLA2XXX=y
509CONFIG_SCSI_QLA21XX=m
510CONFIG_SCSI_QLA22XX=m
511CONFIG_SCSI_QLA2300=m
512CONFIG_SCSI_QLA2322=m
513CONFIG_SCSI_QLA6312=m
514CONFIG_SCSI_QLA24XX=m
515CONFIG_SCSI_LPFC=m
516# CONFIG_SCSI_DC395x is not set
517# CONFIG_SCSI_DC390T is not set
518# CONFIG_SCSI_DEBUG is not set
519
520#
521# Multi-device support (RAID and LVM)
522#
523CONFIG_MD=y
524CONFIG_BLK_DEV_MD=y
525CONFIG_MD_LINEAR=y
526CONFIG_MD_RAID0=y
527CONFIG_MD_RAID1=y
528CONFIG_MD_RAID10=m
529CONFIG_MD_RAID5=y
530CONFIG_MD_RAID6=m
531CONFIG_MD_MULTIPATH=m
532CONFIG_MD_FAULTY=m
533CONFIG_BLK_DEV_DM=y
534CONFIG_DM_CRYPT=m
535CONFIG_DM_SNAPSHOT=m
536CONFIG_DM_MIRROR=m
537CONFIG_DM_ZERO=m
538CONFIG_DM_MULTIPATH=m
539CONFIG_DM_MULTIPATH_EMC=m
540
541#
542# Fusion MPT device support
543#
544# CONFIG_FUSION is not set
545# CONFIG_FUSION_SPI is not set
546# CONFIG_FUSION_FC is not set
547# CONFIG_FUSION_SAS is not set
548
549#
550# IEEE 1394 (FireWire) support
551#
552# CONFIG_IEEE1394 is not set
553
554#
555# I2O device support
556#
557# CONFIG_I2O is not set
558
559#
560# Macintosh device drivers
561#
562
563#
564# Network device support
565#
566CONFIG_NETDEVICES=y
567CONFIG_DUMMY=m
568CONFIG_BONDING=m
569# CONFIG_EQUALIZER is not set
570CONFIG_TUN=m
571
572#
573# ARCnet devices
574#
575# CONFIG_ARCNET is not set
576
577#
578# PHY device support
579#
580# CONFIG_PHYLIB is not set
581
582#
583# Ethernet (10 or 100Mbit)
584#
585CONFIG_NET_ETHERNET=y
586CONFIG_MII=y
587# CONFIG_HAPPYMEAL is not set
588# CONFIG_SUNGEM is not set
589# CONFIG_CASSINI is not set
590CONFIG_NET_VENDOR_3COM=y
591CONFIG_VORTEX=y
592# CONFIG_TYPHOON is not set
593
594#
595# Tulip family network device support
596#
597# CONFIG_NET_TULIP is not set
598# CONFIG_HP100 is not set
599CONFIG_IBMVETH=y
600CONFIG_NET_PCI=y
601CONFIG_PCNET32=y
602# CONFIG_AMD8111_ETH is not set
603# CONFIG_ADAPTEC_STARFIRE is not set
604# CONFIG_B44 is not set
605# CONFIG_FORCEDETH is not set
606# CONFIG_DGRS is not set
607# CONFIG_EEPRO100 is not set
608CONFIG_E100=y
609# CONFIG_FEALNX is not set
610# CONFIG_NATSEMI is not set
611# CONFIG_NE2K_PCI is not set
612# CONFIG_8139CP is not set
613# CONFIG_8139TOO is not set
614# CONFIG_SIS900 is not set
615# CONFIG_EPIC100 is not set
616# CONFIG_SUNDANCE is not set
617# CONFIG_VIA_RHINE is not set
618# CONFIG_NET_POCKET is not set
619
620#
621# Ethernet (1000 Mbit)
622#
623CONFIG_ACENIC=y
624CONFIG_ACENIC_OMIT_TIGON_I=y
625# CONFIG_DL2K is not set
626CONFIG_E1000=y
627# CONFIG_E1000_NAPI is not set
628# CONFIG_NS83820 is not set
629# CONFIG_HAMACHI is not set
630# CONFIG_YELLOWFIN is not set
631# CONFIG_R8169 is not set
632# CONFIG_SIS190 is not set
633# CONFIG_SKGE is not set
634# CONFIG_SK98LIN is not set
635# CONFIG_VIA_VELOCITY is not set
636CONFIG_TIGON3=y
637# CONFIG_BNX2 is not set
638# CONFIG_MV643XX_ETH is not set
639
640#
641# Ethernet (10000 Mbit)
642#
643# CONFIG_CHELSIO_T1 is not set
644CONFIG_IXGB=m
645# CONFIG_IXGB_NAPI is not set
646CONFIG_S2IO=m
647# CONFIG_S2IO_NAPI is not set
648# CONFIG_2BUFF_MODE is not set
649
650#
651# Token Ring devices
652#
653CONFIG_TR=y
654CONFIG_IBMOL=y
655# CONFIG_3C359 is not set
656# CONFIG_TMS380TR is not set
657
658#
659# Wireless LAN (non-hamradio)
660#
661# CONFIG_NET_RADIO is not set
662
663#
664# Wan interfaces
665#
666# CONFIG_WAN is not set
667# CONFIG_FDDI is not set
668# CONFIG_HIPPI is not set
669# CONFIG_PLIP is not set
670CONFIG_PPP=m
671# CONFIG_PPP_MULTILINK is not set
672# CONFIG_PPP_FILTER is not set
673CONFIG_PPP_ASYNC=m
674CONFIG_PPP_SYNC_TTY=m
675CONFIG_PPP_DEFLATE=m
676CONFIG_PPP_BSDCOMP=m
677CONFIG_PPPOE=m
678# CONFIG_SLIP is not set
679# CONFIG_NET_FC is not set
680# CONFIG_SHAPER is not set
681CONFIG_NETCONSOLE=y
682CONFIG_NETPOLL=y
683CONFIG_NETPOLL_RX=y
684CONFIG_NETPOLL_TRAP=y
685CONFIG_NET_POLL_CONTROLLER=y
686
687#
688# ISDN subsystem
689#
690# CONFIG_ISDN is not set
691
692#
693# Telephony Support
694#
695# CONFIG_PHONE is not set
696
697#
698# Input device support
699#
700CONFIG_INPUT=y
701
702#
703# Userland interfaces
704#
705CONFIG_INPUT_MOUSEDEV=y
706# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
707CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
708CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
709# CONFIG_INPUT_JOYDEV is not set
710# CONFIG_INPUT_TSDEV is not set
711# CONFIG_INPUT_EVDEV is not set
712# CONFIG_INPUT_EVBUG is not set
713
714#
715# Input Device Drivers
716#
717CONFIG_INPUT_KEYBOARD=y
718CONFIG_KEYBOARD_ATKBD=y
719# CONFIG_KEYBOARD_SUNKBD is not set
720# CONFIG_KEYBOARD_LKKBD is not set
721# CONFIG_KEYBOARD_XTKBD is not set
722# CONFIG_KEYBOARD_NEWTON is not set
723CONFIG_INPUT_MOUSE=y
724CONFIG_MOUSE_PS2=y
725# CONFIG_MOUSE_SERIAL is not set
726# CONFIG_MOUSE_VSXXXAA is not set
727# CONFIG_INPUT_JOYSTICK is not set
728# CONFIG_INPUT_TOUCHSCREEN is not set
729CONFIG_INPUT_MISC=y
730CONFIG_INPUT_PCSPKR=m
731# CONFIG_INPUT_UINPUT is not set
732
733#
734# Hardware I/O ports
735#
736CONFIG_SERIO=y
737CONFIG_SERIO_I8042=y
738# CONFIG_SERIO_SERPORT is not set
739# CONFIG_SERIO_PARKBD is not set
740# CONFIG_SERIO_PCIPS2 is not set
741CONFIG_SERIO_LIBPS2=y
742# CONFIG_SERIO_RAW is not set
743# CONFIG_GAMEPORT is not set
744
745#
746# Character devices
747#
748CONFIG_VT=y
749CONFIG_VT_CONSOLE=y
750CONFIG_HW_CONSOLE=y
751# CONFIG_SERIAL_NONSTANDARD is not set
752
753#
754# Serial drivers
755#
756CONFIG_SERIAL_8250=y
757CONFIG_SERIAL_8250_CONSOLE=y
758CONFIG_SERIAL_8250_NR_UARTS=4
759# CONFIG_SERIAL_8250_EXTENDED is not set
760
761#
762# Non-8250 serial port support
763#
764CONFIG_SERIAL_CORE=y
765CONFIG_SERIAL_CORE_CONSOLE=y
766CONFIG_SERIAL_ICOM=m
767# CONFIG_SERIAL_JSM is not set
768CONFIG_UNIX98_PTYS=y
769CONFIG_LEGACY_PTYS=y
770CONFIG_LEGACY_PTY_COUNT=256
771# CONFIG_PRINTER is not set
772# CONFIG_PPDEV is not set
773# CONFIG_TIPAR is not set
774CONFIG_HVC_CONSOLE=y
775CONFIG_HVCS=m
776
777#
778# IPMI
779#
780# CONFIG_IPMI_HANDLER is not set
781
782#
783# Watchdog Cards
784#
785# CONFIG_WATCHDOG is not set
786# CONFIG_RTC is not set
787# CONFIG_DTLK is not set
788# CONFIG_R3964 is not set
789# CONFIG_APPLICOM is not set
790
791#
792# Ftape, the floppy tape device driver
793#
794# CONFIG_AGP is not set
795# CONFIG_DRM is not set
796CONFIG_RAW_DRIVER=y
797CONFIG_MAX_RAW_DEVS=1024
798# CONFIG_HANGCHECK_TIMER is not set
799
800#
801# TPM devices
802#
803# CONFIG_TCG_TPM is not set
804
805#
806# I2C support
807#
808CONFIG_I2C=y
809# CONFIG_I2C_CHARDEV is not set
810
811#
812# I2C Algorithms
813#
814CONFIG_I2C_ALGOBIT=y
815# CONFIG_I2C_ALGOPCF is not set
816# CONFIG_I2C_ALGOPCA is not set
817
818#
819# I2C Hardware Bus support
820#
821# CONFIG_I2C_ALI1535 is not set
822# CONFIG_I2C_ALI1563 is not set
823# CONFIG_I2C_ALI15X3 is not set
824# CONFIG_I2C_AMD756 is not set
825# CONFIG_I2C_AMD8111 is not set
826# CONFIG_I2C_I801 is not set
827# CONFIG_I2C_I810 is not set
828# CONFIG_I2C_PIIX4 is not set
829# CONFIG_I2C_NFORCE2 is not set
830# CONFIG_I2C_PARPORT is not set
831# CONFIG_I2C_PARPORT_LIGHT is not set
832# CONFIG_I2C_PROSAVAGE is not set
833# CONFIG_I2C_SAVAGE4 is not set
834# CONFIG_SCx200_ACB is not set
835# CONFIG_I2C_SIS5595 is not set
836# CONFIG_I2C_SIS630 is not set
837# CONFIG_I2C_SIS96X is not set
838# CONFIG_I2C_STUB is not set
839# CONFIG_I2C_VIA is not set
840# CONFIG_I2C_VIAPRO is not set
841# CONFIG_I2C_VOODOO3 is not set
842# CONFIG_I2C_PCA_ISA is not set
843
844#
845# Miscellaneous I2C Chip support
846#
847# CONFIG_SENSORS_DS1337 is not set
848# CONFIG_SENSORS_DS1374 is not set
849# CONFIG_SENSORS_EEPROM is not set
850# CONFIG_SENSORS_PCF8574 is not set
851# CONFIG_SENSORS_PCA9539 is not set
852# CONFIG_SENSORS_PCF8591 is not set
853# CONFIG_SENSORS_RTC8564 is not set
854# CONFIG_SENSORS_MAX6875 is not set
855# CONFIG_I2C_DEBUG_CORE is not set
856# CONFIG_I2C_DEBUG_ALGO is not set
857# CONFIG_I2C_DEBUG_BUS is not set
858# CONFIG_I2C_DEBUG_CHIP is not set
859
860#
861# Dallas's 1-wire bus
862#
863# CONFIG_W1 is not set
864
865#
866# Hardware Monitoring support
867#
868# CONFIG_HWMON is not set
869# CONFIG_HWMON_VID is not set
870
871#
872# Misc devices
873#
874
875#
876# Multimedia Capabilities Port drivers
877#
878
879#
880# Multimedia devices
881#
882# CONFIG_VIDEO_DEV is not set
883
884#
885# Digital Video Broadcasting Devices
886#
887# CONFIG_DVB is not set
888
889#
890# Graphics support
891#
892CONFIG_FB=y
893CONFIG_FB_CFB_FILLRECT=y
894CONFIG_FB_CFB_COPYAREA=y
895CONFIG_FB_CFB_IMAGEBLIT=y
896CONFIG_FB_SOFT_CURSOR=y
897CONFIG_FB_MACMODES=y
898CONFIG_FB_MODE_HELPERS=y
899CONFIG_FB_TILEBLITTING=y
900# CONFIG_FB_CIRRUS is not set
901# CONFIG_FB_PM2 is not set
902# CONFIG_FB_CYBER2000 is not set
903CONFIG_FB_OF=y
904# CONFIG_FB_CT65550 is not set
905# CONFIG_FB_ASILIANT is not set
906# CONFIG_FB_IMSTT is not set
907# CONFIG_FB_VGA16 is not set
908# CONFIG_FB_NVIDIA is not set
909# CONFIG_FB_RIVA is not set
910CONFIG_FB_MATROX=y
911CONFIG_FB_MATROX_MILLENIUM=y
912CONFIG_FB_MATROX_MYSTIQUE=y
913CONFIG_FB_MATROX_G=y
914# CONFIG_FB_MATROX_I2C is not set
915CONFIG_FB_MATROX_MULTIHEAD=y
916# CONFIG_FB_RADEON_OLD is not set
917CONFIG_FB_RADEON=y
918CONFIG_FB_RADEON_I2C=y
919# CONFIG_FB_RADEON_DEBUG is not set
920# CONFIG_FB_ATY128 is not set
921# CONFIG_FB_ATY is not set
922# CONFIG_FB_SAVAGE is not set
923# CONFIG_FB_SIS is not set
924# CONFIG_FB_NEOMAGIC is not set
925# CONFIG_FB_KYRO is not set
926# CONFIG_FB_3DFX is not set
927# CONFIG_FB_VOODOO1 is not set
928# CONFIG_FB_CYBLA is not set
929# CONFIG_FB_TRIDENT is not set
930# CONFIG_FB_S1D13XXX is not set
931# CONFIG_FB_VIRTUAL is not set
932
933#
934# Console display driver support
935#
936# CONFIG_VGA_CONSOLE is not set
937CONFIG_DUMMY_CONSOLE=y
938CONFIG_FRAMEBUFFER_CONSOLE=y
939# CONFIG_FONTS is not set
940CONFIG_FONT_8x8=y
941CONFIG_FONT_8x16=y
942
943#
944# Logo configuration
945#
946CONFIG_LOGO=y
947CONFIG_LOGO_LINUX_MONO=y
948CONFIG_LOGO_LINUX_VGA16=y
949CONFIG_LOGO_LINUX_CLUT224=y
950CONFIG_BACKLIGHT_LCD_SUPPORT=y
951CONFIG_BACKLIGHT_CLASS_DEVICE=m
952CONFIG_BACKLIGHT_DEVICE=y
953CONFIG_LCD_CLASS_DEVICE=m
954CONFIG_LCD_DEVICE=y
955
956#
957# Sound
958#
959# CONFIG_SOUND is not set
960
961#
962# USB support
963#
964CONFIG_USB_ARCH_HAS_HCD=y
965CONFIG_USB_ARCH_HAS_OHCI=y
966CONFIG_USB=y
967# CONFIG_USB_DEBUG is not set
968
969#
970# Miscellaneous USB options
971#
972CONFIG_USB_DEVICEFS=y
973# CONFIG_USB_BANDWIDTH is not set
974# CONFIG_USB_DYNAMIC_MINORS is not set
975# CONFIG_USB_OTG is not set
976
977#
978# USB Host Controller Drivers
979#
980CONFIG_USB_EHCI_HCD=y
981# CONFIG_USB_EHCI_SPLIT_ISO is not set
982# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
983# CONFIG_USB_ISP116X_HCD is not set
984CONFIG_USB_OHCI_HCD=y
985# CONFIG_USB_OHCI_BIG_ENDIAN is not set
986CONFIG_USB_OHCI_LITTLE_ENDIAN=y
987# CONFIG_USB_UHCI_HCD is not set
988# CONFIG_USB_SL811_HCD is not set
989
990#
991# USB Device Class drivers
992#
993# CONFIG_USB_BLUETOOTH_TTY is not set
994# CONFIG_USB_ACM is not set
995# CONFIG_USB_PRINTER is not set
996
997#
998# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
999#
1000CONFIG_USB_STORAGE=y
1001# CONFIG_USB_STORAGE_DEBUG is not set
1002# CONFIG_USB_STORAGE_DATAFAB is not set
1003# CONFIG_USB_STORAGE_FREECOM is not set
1004# CONFIG_USB_STORAGE_ISD200 is not set
1005# CONFIG_USB_STORAGE_DPCM is not set
1006# CONFIG_USB_STORAGE_USBAT is not set
1007# CONFIG_USB_STORAGE_SDDR09 is not set
1008# CONFIG_USB_STORAGE_SDDR55 is not set
1009# CONFIG_USB_STORAGE_JUMPSHOT is not set
1010
1011#
1012# USB Input Devices
1013#
1014CONFIG_USB_HID=y
1015CONFIG_USB_HIDINPUT=y
1016# CONFIG_HID_FF is not set
1017CONFIG_USB_HIDDEV=y
1018# CONFIG_USB_AIPTEK is not set
1019# CONFIG_USB_WACOM is not set
1020# CONFIG_USB_ACECAD is not set
1021# CONFIG_USB_KBTAB is not set
1022# CONFIG_USB_POWERMATE is not set
1023# CONFIG_USB_MTOUCH is not set
1024# CONFIG_USB_ITMTOUCH is not set
1025# CONFIG_USB_EGALAX is not set
1026# CONFIG_USB_YEALINK is not set
1027# CONFIG_USB_XPAD is not set
1028# CONFIG_USB_ATI_REMOTE is not set
1029# CONFIG_USB_KEYSPAN_REMOTE is not set
1030# CONFIG_USB_APPLETOUCH is not set
1031
1032#
1033# USB Imaging devices
1034#
1035# CONFIG_USB_MDC800 is not set
1036# CONFIG_USB_MICROTEK is not set
1037
1038#
1039# USB Multimedia devices
1040#
1041# CONFIG_USB_DABUSB is not set
1042
1043#
1044# Video4Linux support is needed for USB Multimedia device support
1045#
1046
1047#
1048# USB Network Adapters
1049#
1050# CONFIG_USB_CATC is not set
1051# CONFIG_USB_KAWETH is not set
1052# CONFIG_USB_PEGASUS is not set
1053# CONFIG_USB_RTL8150 is not set
1054# CONFIG_USB_USBNET is not set
1055CONFIG_USB_MON=y
1056
1057#
1058# USB port drivers
1059#
1060# CONFIG_USB_USS720 is not set
1061
1062#
1063# USB Serial Converter support
1064#
1065# CONFIG_USB_SERIAL is not set
1066
1067#
1068# USB Miscellaneous drivers
1069#
1070# CONFIG_USB_EMI62 is not set
1071# CONFIG_USB_EMI26 is not set
1072# CONFIG_USB_AUERSWALD is not set
1073# CONFIG_USB_RIO500 is not set
1074# CONFIG_USB_LEGOTOWER is not set
1075# CONFIG_USB_LCD is not set
1076# CONFIG_USB_LED is not set
1077# CONFIG_USB_CYTHERM is not set
1078# CONFIG_USB_PHIDGETKIT is not set
1079# CONFIG_USB_PHIDGETSERVO is not set
1080# CONFIG_USB_IDMOUSE is not set
1081# CONFIG_USB_SISUSBVGA is not set
1082# CONFIG_USB_LD is not set
1083# CONFIG_USB_TEST is not set
1084
1085#
1086# USB DSL modem support
1087#
1088
1089#
1090# USB Gadget Support
1091#
1092# CONFIG_USB_GADGET is not set
1093
1094#
1095# MMC/SD Card support
1096#
1097# CONFIG_MMC is not set
1098
1099#
1100# InfiniBand support
1101#
1102CONFIG_INFINIBAND=m
1103# CONFIG_INFINIBAND_USER_MAD is not set
1104# CONFIG_INFINIBAND_USER_ACCESS is not set
1105CONFIG_INFINIBAND_MTHCA=m
1106# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1107CONFIG_INFINIBAND_IPOIB=m
1108# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
1109
1110#
1111# SN Devices
1112#
1113
1114#
1115# File systems
1116#
1117CONFIG_EXT2_FS=y
1118CONFIG_EXT2_FS_XATTR=y
1119CONFIG_EXT2_FS_POSIX_ACL=y
1120CONFIG_EXT2_FS_SECURITY=y
1121CONFIG_EXT2_FS_XIP=y
1122CONFIG_FS_XIP=y
1123CONFIG_EXT3_FS=y
1124CONFIG_EXT3_FS_XATTR=y
1125CONFIG_EXT3_FS_POSIX_ACL=y
1126CONFIG_EXT3_FS_SECURITY=y
1127CONFIG_JBD=y
1128# CONFIG_JBD_DEBUG is not set
1129CONFIG_FS_MBCACHE=y
1130CONFIG_REISERFS_FS=y
1131# CONFIG_REISERFS_CHECK is not set
1132# CONFIG_REISERFS_PROC_INFO is not set
1133CONFIG_REISERFS_FS_XATTR=y
1134CONFIG_REISERFS_FS_POSIX_ACL=y
1135CONFIG_REISERFS_FS_SECURITY=y
1136CONFIG_JFS_FS=m
1137CONFIG_JFS_POSIX_ACL=y
1138CONFIG_JFS_SECURITY=y
1139# CONFIG_JFS_DEBUG is not set
1140# CONFIG_JFS_STATISTICS is not set
1141CONFIG_FS_POSIX_ACL=y
1142CONFIG_XFS_FS=m
1143CONFIG_XFS_EXPORT=y
1144# CONFIG_XFS_QUOTA is not set
1145CONFIG_XFS_SECURITY=y
1146CONFIG_XFS_POSIX_ACL=y
1147# CONFIG_XFS_RT is not set
1148# CONFIG_MINIX_FS is not set
1149# CONFIG_ROMFS_FS is not set
1150CONFIG_INOTIFY=y
1151# CONFIG_QUOTA is not set
1152CONFIG_DNOTIFY=y
1153CONFIG_AUTOFS_FS=m
1154# CONFIG_AUTOFS4_FS is not set
1155# CONFIG_FUSE_FS is not set
1156
1157#
1158# CD-ROM/DVD Filesystems
1159#
1160CONFIG_ISO9660_FS=y
1161CONFIG_JOLIET=y
1162CONFIG_ZISOFS=y
1163CONFIG_ZISOFS_FS=y
1164CONFIG_UDF_FS=m
1165CONFIG_UDF_NLS=y
1166
1167#
1168# DOS/FAT/NT Filesystems
1169#
1170CONFIG_FAT_FS=y
1171CONFIG_MSDOS_FS=y
1172CONFIG_VFAT_FS=y
1173CONFIG_FAT_DEFAULT_CODEPAGE=437
1174CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1175# CONFIG_NTFS_FS is not set
1176
1177#
1178# Pseudo filesystems
1179#
1180CONFIG_PROC_FS=y
1181CONFIG_PROC_KCORE=y
1182CONFIG_SYSFS=y
1183CONFIG_TMPFS=y
1184CONFIG_HUGETLBFS=y
1185CONFIG_HUGETLB_PAGE=y
1186CONFIG_RAMFS=y
1187# CONFIG_RELAYFS_FS is not set
1188
1189#
1190# Miscellaneous filesystems
1191#
1192# CONFIG_ADFS_FS is not set
1193# CONFIG_AFFS_FS is not set
1194# CONFIG_HFS_FS is not set
1195# CONFIG_HFSPLUS_FS is not set
1196# CONFIG_BEFS_FS is not set
1197# CONFIG_BFS_FS is not set
1198# CONFIG_EFS_FS is not set
1199CONFIG_CRAMFS=y
1200# CONFIG_VXFS_FS is not set
1201# CONFIG_HPFS_FS is not set
1202# CONFIG_QNX4FS_FS is not set
1203# CONFIG_SYSV_FS is not set
1204# CONFIG_UFS_FS is not set
1205
1206#
1207# Network File Systems
1208#
1209CONFIG_NFS_FS=y
1210CONFIG_NFS_V3=y
1211CONFIG_NFS_V3_ACL=y
1212CONFIG_NFS_V4=y
1213# CONFIG_NFS_DIRECTIO is not set
1214CONFIG_NFSD=y
1215CONFIG_NFSD_V2_ACL=y
1216CONFIG_NFSD_V3=y
1217CONFIG_NFSD_V3_ACL=y
1218CONFIG_NFSD_V4=y
1219CONFIG_NFSD_TCP=y
1220CONFIG_LOCKD=y
1221CONFIG_LOCKD_V4=y
1222CONFIG_EXPORTFS=y
1223CONFIG_NFS_ACL_SUPPORT=y
1224CONFIG_NFS_COMMON=y
1225CONFIG_SUNRPC=y
1226CONFIG_SUNRPC_GSS=y
1227CONFIG_RPCSEC_GSS_KRB5=y
1228CONFIG_RPCSEC_GSS_SPKM3=m
1229# CONFIG_SMB_FS is not set
1230CONFIG_CIFS=m
1231# CONFIG_CIFS_STATS is not set
1232CONFIG_CIFS_XATTR=y
1233CONFIG_CIFS_POSIX=y
1234# CONFIG_CIFS_EXPERIMENTAL is not set
1235# CONFIG_NCP_FS is not set
1236# CONFIG_CODA_FS is not set
1237# CONFIG_AFS_FS is not set
1238# CONFIG_9P_FS is not set
1239
1240#
1241# Partition Types
1242#
1243# CONFIG_PARTITION_ADVANCED is not set
1244CONFIG_MSDOS_PARTITION=y
1245
1246#
1247# Native Language Support
1248#
1249CONFIG_NLS=y
1250CONFIG_NLS_DEFAULT="iso8859-1"
1251CONFIG_NLS_CODEPAGE_437=y
1252# CONFIG_NLS_CODEPAGE_737 is not set
1253# CONFIG_NLS_CODEPAGE_775 is not set
1254# CONFIG_NLS_CODEPAGE_850 is not set
1255# CONFIG_NLS_CODEPAGE_852 is not set
1256# CONFIG_NLS_CODEPAGE_855 is not set
1257# CONFIG_NLS_CODEPAGE_857 is not set
1258# CONFIG_NLS_CODEPAGE_860 is not set
1259# CONFIG_NLS_CODEPAGE_861 is not set
1260# CONFIG_NLS_CODEPAGE_862 is not set
1261# CONFIG_NLS_CODEPAGE_863 is not set
1262# CONFIG_NLS_CODEPAGE_864 is not set
1263# CONFIG_NLS_CODEPAGE_865 is not set
1264# CONFIG_NLS_CODEPAGE_866 is not set
1265# CONFIG_NLS_CODEPAGE_869 is not set
1266# CONFIG_NLS_CODEPAGE_936 is not set
1267# CONFIG_NLS_CODEPAGE_950 is not set
1268# CONFIG_NLS_CODEPAGE_932 is not set
1269# CONFIG_NLS_CODEPAGE_949 is not set
1270# CONFIG_NLS_CODEPAGE_874 is not set
1271# CONFIG_NLS_ISO8859_8 is not set
1272# CONFIG_NLS_CODEPAGE_1250 is not set
1273# CONFIG_NLS_CODEPAGE_1251 is not set
1274CONFIG_NLS_ASCII=y
1275CONFIG_NLS_ISO8859_1=y
1276# CONFIG_NLS_ISO8859_2 is not set
1277# CONFIG_NLS_ISO8859_3 is not set
1278# CONFIG_NLS_ISO8859_4 is not set
1279# CONFIG_NLS_ISO8859_5 is not set
1280# CONFIG_NLS_ISO8859_6 is not set
1281# CONFIG_NLS_ISO8859_7 is not set
1282# CONFIG_NLS_ISO8859_9 is not set
1283# CONFIG_NLS_ISO8859_13 is not set
1284# CONFIG_NLS_ISO8859_14 is not set
1285# CONFIG_NLS_ISO8859_15 is not set
1286# CONFIG_NLS_KOI8_R is not set
1287# CONFIG_NLS_KOI8_U is not set
1288# CONFIG_NLS_UTF8 is not set
1289
1290#
1291# Profiling support
1292#
1293CONFIG_PROFILING=y
1294CONFIG_OPROFILE=y
1295
1296#
1297# Kernel hacking
1298#
1299# CONFIG_PRINTK_TIME is not set
1300CONFIG_DEBUG_KERNEL=y
1301CONFIG_MAGIC_SYSRQ=y
1302CONFIG_LOG_BUF_SHIFT=17
1303CONFIG_DETECT_SOFTLOCKUP=y
1304# CONFIG_SCHEDSTATS is not set
1305# CONFIG_DEBUG_SLAB is not set
1306# CONFIG_DEBUG_SPINLOCK is not set
1307# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1308# CONFIG_DEBUG_KOBJECT is not set
1309# CONFIG_DEBUG_INFO is not set
1310CONFIG_DEBUG_FS=y
1311CONFIG_DEBUG_STACKOVERFLOW=y
1312# CONFIG_KPROBES is not set
1313CONFIG_DEBUG_STACK_USAGE=y
1314CONFIG_DEBUGGER=y
1315CONFIG_XMON=y
1316CONFIG_XMON_DEFAULT=y
1317# CONFIG_PPCDBG is not set
1318CONFIG_IRQSTACKS=y
1319
1320#
1321# Security options
1322#
1323# CONFIG_KEYS is not set
1324# CONFIG_SECURITY is not set
1325
1326#
1327# Cryptographic options
1328#
1329CONFIG_CRYPTO=y
1330CONFIG_CRYPTO_HMAC=y
1331CONFIG_CRYPTO_NULL=m
1332CONFIG_CRYPTO_MD4=m
1333CONFIG_CRYPTO_MD5=y
1334CONFIG_CRYPTO_SHA1=m
1335CONFIG_CRYPTO_SHA256=m
1336CONFIG_CRYPTO_SHA512=m
1337CONFIG_CRYPTO_WP512=m
1338CONFIG_CRYPTO_TGR192=m
1339CONFIG_CRYPTO_DES=y
1340CONFIG_CRYPTO_BLOWFISH=m
1341CONFIG_CRYPTO_TWOFISH=m
1342CONFIG_CRYPTO_SERPENT=m
1343CONFIG_CRYPTO_AES=m
1344CONFIG_CRYPTO_CAST5=m
1345CONFIG_CRYPTO_CAST6=m
1346CONFIG_CRYPTO_TEA=m
1347CONFIG_CRYPTO_ARC4=m
1348CONFIG_CRYPTO_KHAZAD=m
1349CONFIG_CRYPTO_ANUBIS=m
1350CONFIG_CRYPTO_DEFLATE=m
1351CONFIG_CRYPTO_MICHAEL_MIC=m
1352CONFIG_CRYPTO_CRC32C=m
1353CONFIG_CRYPTO_TEST=m
1354
1355#
1356# Hardware crypto devices
1357#
1358
1359#
1360# Library routines
1361#
1362CONFIG_CRC_CCITT=m
1363# CONFIG_CRC16 is not set
1364CONFIG_CRC32=y
1365CONFIG_LIBCRC32C=m
1366CONFIG_ZLIB_INFLATE=y
1367CONFIG_ZLIB_DEFLATE=m
1368CONFIG_TEXTSEARCH=y
1369CONFIG_TEXTSEARCH_KMP=m
1370CONFIG_TEXTSEARCH_BM=m
1371CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 572d4f5eaacb..b3ae2993efb8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -13,12 +13,15 @@ endif
13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ 13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
14 signal_32.o pmc.o 14 signal_32.o pmc.o
15obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 15obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
16 ptrace32.o systbl.o 16 signal_64.o ptrace32.o systbl.o
17obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 17obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
18obj-$(CONFIG_POWER4) += idle_power4.o 18obj-$(CONFIG_POWER4) += idle_power4.o
19obj-$(CONFIG_PPC_OF) += of_device.o 19obj-$(CONFIG_PPC_OF) += of_device.o
20obj-$(CONFIG_PPC_RTAS) += rtas.o 20obj-$(CONFIG_PPC_RTAS) += rtas.o
21obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
22obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
21obj-$(CONFIG_IBMVIO) += vio.o 23obj-$(CONFIG_IBMVIO) += vio.o
24obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
22 25
23ifeq ($(CONFIG_PPC_MERGE),y) 26ifeq ($(CONFIG_PPC_MERGE),y)
24 27
@@ -38,6 +41,7 @@ obj-$(CONFIG_PPC_OF) += prom_init.o
38obj-$(CONFIG_MODULES) += ppc_ksyms.o 41obj-$(CONFIG_MODULES) += ppc_ksyms.o
39obj-$(CONFIG_BOOTX_TEXT) += btext.o 42obj-$(CONFIG_BOOTX_TEXT) += btext.o
40obj-$(CONFIG_6xx) += idle_6xx.o 43obj-$(CONFIG_6xx) += idle_6xx.o
44obj-$(CONFIG_SMP) += smp.o
41 45
42ifeq ($(CONFIG_PPC_ISERIES),y) 46ifeq ($(CONFIG_PPC_ISERIES),y)
43$(obj)/head_64.o: $(obj)/lparmap.s 47$(obj)/head_64.o: $(obj)/lparmap.s
@@ -46,8 +50,9 @@ endif
46 50
47else 51else
48# stuff used from here for ARCH=ppc or ARCH=ppc64 52# stuff used from here for ARCH=ppc or ARCH=ppc64
53smpobj-$(CONFIG_SMP) += smp.o
49obj-$(CONFIG_PPC64) += traps.o process.o init_task.o time.o \ 54obj-$(CONFIG_PPC64) += traps.o process.o init_task.o time.o \
50 setup-common.o 55 setup-common.o $(smpobj-y)
51 56
52 57
53endif 58endif
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 330cd783206f..bc5a3689cc05 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -40,7 +40,7 @@
40#ifdef CONFIG_PPC64 40#ifdef CONFIG_PPC64
41#include <asm/paca.h> 41#include <asm/paca.h>
42#include <asm/lppaca.h> 42#include <asm/lppaca.h>
43#include <asm/iSeries/HvLpEvent.h> 43#include <asm/iseries/hv_lp_event.h>
44#include <asm/cache.h> 44#include <asm/cache.h>
45#include <asm/systemcfg.h> 45#include <asm/systemcfg.h>
46#include <asm/compat.h> 46#include <asm/compat.h>
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 147215a0d6c0..45d81976987f 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -35,7 +35,7 @@
35#include <asm/cputable.h> 35#include <asm/cputable.h>
36#include <asm/setup.h> 36#include <asm/setup.h>
37#include <asm/hvcall.h> 37#include <asm/hvcall.h>
38#include <asm/iSeries/LparMap.h> 38#include <asm/iseries/lpar_map.h>
39#include <asm/thread_info.h> 39#include <asm/thread_info.h>
40 40
41#ifdef CONFIG_PPC_ISERIES 41#ifdef CONFIG_PPC_ISERIES
@@ -1914,24 +1914,6 @@ _GLOBAL(hmt_start_secondary)
1914 blr 1914 blr
1915#endif 1915#endif
1916 1916
1917#if defined(CONFIG_KEXEC) || defined(CONFIG_SMP)
1918_GLOBAL(smp_release_cpus)
1919 /* All secondary cpus are spinning on a common
1920 * spinloop, release them all now so they can start
1921 * to spin on their individual paca spinloops.
1922 * For non SMP kernels, the secondary cpus never
1923 * get out of the common spinloop.
1924 * XXX This does nothing useful on iSeries, secondaries are
1925 * already waiting on their paca.
1926 */
1927 li r3,1
1928 LOADADDR(r5,__secondary_hold_spinloop)
1929 std r3,0(r5)
1930 sync
1931 blr
1932#endif /* CONFIG_SMP */
1933
1934
1935/* 1917/*
1936 * We put a few things here that have to be page-aligned. 1918 * We put a few things here that have to be page-aligned.
1937 * This stuff goes at the beginning of the bss, which is page-aligned. 1919 * This stuff goes at the beginning of the bss, which is page-aligned.
diff --git a/arch/powerpc/kernel/lparmap.c b/arch/powerpc/kernel/lparmap.c
index b81de286df5e..eded971d1bf9 100644
--- a/arch/powerpc/kernel/lparmap.c
+++ b/arch/powerpc/kernel/lparmap.c
@@ -8,7 +8,7 @@
8 */ 8 */
9#include <asm/mmu.h> 9#include <asm/mmu.h>
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/iSeries/LparMap.h> 11#include <asm/iseries/lpar_map.h>
12 12
13const struct LparMap __attribute__((__section__(".text"))) xLparMap = { 13const struct LparMap __attribute__((__section__(".text"))) xLparMap = {
14 .xNumberEsids = HvEsidsToMap, 14 .xNumberEsids = HvEsidsToMap,
diff --git a/include/asm-ppc64/ppc32.h b/arch/powerpc/kernel/ppc32.h
index 3945a55d112a..90e562771791 100644
--- a/include/asm-ppc64/ppc32.h
+++ b/arch/powerpc/kernel/ppc32.h
@@ -91,6 +91,22 @@ typedef struct sigaltstack_32 {
91 compat_size_t ss_size; 91 compat_size_t ss_size;
92} stack_32_t; 92} stack_32_t;
93 93
94struct pt_regs32 {
95 unsigned int gpr[32];
96 unsigned int nip;
97 unsigned int msr;
98 unsigned int orig_gpr3; /* Used for restarting system calls */
99 unsigned int ctr;
100 unsigned int link;
101 unsigned int xer;
102 unsigned int ccr;
103 unsigned int mq; /* 601 only (not used at present) */
104 unsigned int trap; /* Reason for being here */
105 unsigned int dar; /* Fault registers */
106 unsigned int dsisr;
107 unsigned int result; /* Result of a system call */
108};
109
94struct sigcontext32 { 110struct sigcontext32 {
95 unsigned int _unused[4]; 111 unsigned int _unused[4];
96 int signal; 112 int signal;
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 8bc540337ba0..47d6f7e2ea9f 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -81,15 +81,6 @@ EXPORT_SYMBOL(_prep_type);
81EXPORT_SYMBOL(ucSystemType); 81EXPORT_SYMBOL(ucSystemType);
82#endif 82#endif
83 83
84#if !defined(__INLINE_BITOPS)
85EXPORT_SYMBOL(set_bit);
86EXPORT_SYMBOL(clear_bit);
87EXPORT_SYMBOL(change_bit);
88EXPORT_SYMBOL(test_and_set_bit);
89EXPORT_SYMBOL(test_and_clear_bit);
90EXPORT_SYMBOL(test_and_change_bit);
91#endif /* __INLINE_BITOPS */
92
93EXPORT_SYMBOL(strcpy); 84EXPORT_SYMBOL(strcpy);
94EXPORT_SYMBOL(strncpy); 85EXPORT_SYMBOL(strncpy);
95EXPORT_SYMBOL(strcat); 86EXPORT_SYMBOL(strcat);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 8f85dabe4df3..96843211cc5c 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -48,8 +48,8 @@
48#include <asm/prom.h> 48#include <asm/prom.h>
49#ifdef CONFIG_PPC64 49#ifdef CONFIG_PPC64
50#include <asm/firmware.h> 50#include <asm/firmware.h>
51#include <asm/plpar_wrappers.h>
52#include <asm/time.h> 51#include <asm/time.h>
52#include <asm/machdep.h>
53#endif 53#endif
54 54
55extern unsigned long _get_SP(void); 55extern unsigned long _get_SP(void);
@@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
201} 201}
202#endif /* CONFIG_SPE */ 202#endif /* CONFIG_SPE */
203 203
204static void set_dabr_spr(unsigned long val)
205{
206 mtspr(SPRN_DABR, val);
207}
208
209int set_dabr(unsigned long dabr) 204int set_dabr(unsigned long dabr)
210{ 205{
211 int ret = 0;
212
213#ifdef CONFIG_PPC64 206#ifdef CONFIG_PPC64
214 if (firmware_has_feature(FW_FEATURE_XDABR)) { 207 if (ppc_md.set_dabr)
215 /* We want to catch accesses from kernel and userspace */ 208 return ppc_md.set_dabr(dabr);
216 unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER;
217 ret = plpar_set_xdabr(dabr, flags);
218 } else if (firmware_has_feature(FW_FEATURE_DABR)) {
219 ret = plpar_set_dabr(dabr);
220 } else
221#endif 209#endif
222 set_dabr_spr(dabr);
223 210
224 return ret; 211 mtspr(SPRN_DABR, dabr);
212 return 0;
225} 213}
226 214
227#ifdef CONFIG_PPC64 215#ifdef CONFIG_PPC64
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 2eccd0e159e3..eec2da695508 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1285,7 +1285,7 @@ static int __init early_init_dt_scan_memory(unsigned long node,
1285 1285
1286 endp = reg + (l / sizeof(cell_t)); 1286 endp = reg + (l / sizeof(cell_t));
1287 1287
1288 DBG("memory scan node %s ..., reg size %ld, data: %x %x %x %x, ...\n", 1288 DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
1289 uname, l, reg[0], reg[1], reg[2], reg[3]); 1289 uname, l, reg[0], reg[1], reg[2], reg[3]);
1290 1290
1291 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { 1291 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 9750b3cd8ecd..c758b6624d7b 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2000,7 +2000,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2000#endif 2000#endif
2001 2001
2002 /* 2002 /*
2003 * On pSeries and BPA, copy the CPU hold code 2003 * Copy the CPU hold code
2004 */ 2004 */
2005 if (RELOC(of_platform) != PLATFORM_POWERMAC) 2005 if (RELOC(of_platform) != PLATFORM_POWERMAC)
2006 copy_and_flush(0, KERNELBASE + offset, 0x100, 0); 2006 copy_and_flush(0, KERNELBASE + offset, 0x100, 0);
diff --git a/arch/ppc64/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 5bdd5b079d96..5bdd5b079d96 100644
--- a/arch/ppc64/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 4d22eeeeb91d..b7fc2d884950 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -43,6 +43,13 @@ char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
43unsigned long rtas_rmo_buf; 43unsigned long rtas_rmo_buf;
44 44
45/* 45/*
46 * If non-NULL, this gets called when the kernel terminates.
47 * This is done like this so rtas_flash can be a module.
48 */
49void (*rtas_flash_term_hook)(int);
50EXPORT_SYMBOL(rtas_flash_term_hook);
51
52/*
46 * call_rtas_display_status and call_rtas_display_status_delay 53 * call_rtas_display_status and call_rtas_display_status_delay
47 * are designed only for very early low-level debugging, which 54 * are designed only for very early low-level debugging, which
48 * is why the token is hard-coded to 10. 55 * is why the token is hard-coded to 10.
@@ -206,6 +213,7 @@ void rtas_progress(char *s, unsigned short hex)
206 213
207 spin_unlock(&progress_lock); 214 spin_unlock(&progress_lock);
208} 215}
216EXPORT_SYMBOL(rtas_progress); /* needed by rtas_flash module */
209 217
210int rtas_token(const char *service) 218int rtas_token(const char *service)
211{ 219{
@@ -492,6 +500,8 @@ int rtas_set_indicator(int indicator, int index, int new_value)
492 500
493void rtas_restart(char *cmd) 501void rtas_restart(char *cmd)
494{ 502{
503 if (rtas_flash_term_hook)
504 rtas_flash_term_hook(SYS_RESTART);
495 printk("RTAS system-reboot returned %d\n", 505 printk("RTAS system-reboot returned %d\n",
496 rtas_call(rtas_token("system-reboot"), 0, 1, NULL)); 506 rtas_call(rtas_token("system-reboot"), 0, 1, NULL));
497 for (;;); 507 for (;;);
@@ -499,6 +509,8 @@ void rtas_restart(char *cmd)
499 509
500void rtas_power_off(void) 510void rtas_power_off(void)
501{ 511{
512 if (rtas_flash_term_hook)
513 rtas_flash_term_hook(SYS_POWER_OFF);
502 /* allow power on only with power button press */ 514 /* allow power on only with power button press */
503 printk("RTAS power-off returned %d\n", 515 printk("RTAS power-off returned %d\n",
504 rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1)); 516 rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
@@ -507,7 +519,12 @@ void rtas_power_off(void)
507 519
508void rtas_halt(void) 520void rtas_halt(void)
509{ 521{
510 rtas_power_off(); 522 if (rtas_flash_term_hook)
523 rtas_flash_term_hook(SYS_HALT);
524 /* allow power on only with power button press */
525 printk("RTAS power-off returned %d\n",
526 rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
527 for (;;);
511} 528}
512 529
513/* Must be in the RMO region, so we place it here */ 530/* Must be in the RMO region, so we place it here */
diff --git a/arch/ppc64/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 923e2e201a70..50500093c97f 100644
--- a/arch/ppc64/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -19,6 +19,7 @@
19#include <asm/delay.h> 19#include <asm/delay.h>
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include <asm/rtas.h> 21#include <asm/rtas.h>
22#include <asm/abs_addr.h>
22 23
23#define MODULE_VERS "1.0" 24#define MODULE_VERS "1.0"
24#define MODULE_NAME "rtas_flash" 25#define MODULE_NAME "rtas_flash"
@@ -71,10 +72,36 @@
71#define VALIDATE_BUF_SIZE 4096 72#define VALIDATE_BUF_SIZE 4096
72#define RTAS_MSG_MAXLEN 64 73#define RTAS_MSG_MAXLEN 64
73 74
75struct flash_block {
76 char *data;
77 unsigned long length;
78};
79
80/* This struct is very similar but not identical to
81 * that needed by the rtas flash update.
82 * All we need to do for rtas is rewrite num_blocks
83 * into a version/length and translate the pointers
84 * to absolute.
85 */
86#define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block))
87struct flash_block_list {
88 unsigned long num_blocks;
89 struct flash_block_list *next;
90 struct flash_block blocks[FLASH_BLOCKS_PER_NODE];
91};
92struct flash_block_list_header { /* just the header of flash_block_list */
93 unsigned long num_blocks;
94 struct flash_block_list *next;
95};
96
97static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
98
99#define FLASH_BLOCK_LIST_VERSION (1UL)
100
74/* Local copy of the flash block list. 101/* Local copy of the flash block list.
75 * We only allow one open of the flash proc file and create this 102 * We only allow one open of the flash proc file and create this
76 * list as we go. This list will be put in the kernel's 103 * list as we go. This list will be put in the
77 * rtas_firmware_flash_list global var once it is fully read. 104 * rtas_firmware_flash_list var once it is fully read.
78 * 105 *
79 * For convenience as we build the list we use virtual addrs, 106 * For convenience as we build the list we use virtual addrs,
80 * we do not fill in the version number, and the length field 107 * we do not fill in the version number, and the length field
@@ -562,6 +589,86 @@ static int validate_flash_release(struct inode *inode, struct file *file)
562 return 0; 589 return 0;
563} 590}
564 591
592static void rtas_flash_firmware(int reboot_type)
593{
594 unsigned long image_size;
595 struct flash_block_list *f, *next, *flist;
596 unsigned long rtas_block_list;
597 int i, status, update_token;
598
599 if (rtas_firmware_flash_list.next == NULL)
600 return; /* nothing to do */
601
602 if (reboot_type != SYS_RESTART) {
603 printk(KERN_ALERT "FLASH: firmware flash requires a reboot\n");
604 printk(KERN_ALERT "FLASH: the firmware image will NOT be flashed\n");
605 return;
606 }
607
608 update_token = rtas_token("ibm,update-flash-64-and-reboot");
609 if (update_token == RTAS_UNKNOWN_SERVICE) {
610 printk(KERN_ALERT "FLASH: ibm,update-flash-64-and-reboot "
611 "is not available -- not a service partition?\n");
612 printk(KERN_ALERT "FLASH: firmware will not be flashed\n");
613 return;
614 }
615
616 /* NOTE: the "first" block list is a global var with no data
617 * blocks in the kernel data segment. We do this because
618 * we want to ensure this block_list addr is under 4GB.
619 */
620 rtas_firmware_flash_list.num_blocks = 0;
621 flist = (struct flash_block_list *)&rtas_firmware_flash_list;
622 rtas_block_list = virt_to_abs(flist);
623 if (rtas_block_list >= 4UL*1024*1024*1024) {
624 printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
625 return;
626 }
627
628 printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n");
629 /* Update the block_list in place. */
630 image_size = 0;
631 for (f = flist; f; f = next) {
632 /* Translate data addrs to absolute */
633 for (i = 0; i < f->num_blocks; i++) {
634 f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data);
635 image_size += f->blocks[i].length;
636 }
637 next = f->next;
638 /* Don't translate NULL pointer for last entry */
639 if (f->next)
640 f->next = (struct flash_block_list *)virt_to_abs(f->next);
641 else
642 f->next = NULL;
643 /* make num_blocks into the version/length field */
644 f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
645 }
646
647 printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size);
648 printk(KERN_ALERT "FLASH: performing flash and reboot\n");
649 rtas_progress("Flashing \n", 0x0);
650 rtas_progress("Please Wait... ", 0x0);
651 printk(KERN_ALERT "FLASH: this will take several minutes. Do not power off!\n");
652 status = rtas_call(update_token, 1, 1, NULL, rtas_block_list);
653 switch (status) { /* should only get "bad" status */
654 case 0:
655 printk(KERN_ALERT "FLASH: success\n");
656 break;
657 case -1:
658 printk(KERN_ALERT "FLASH: hardware error. Firmware may not be not flashed\n");
659 break;
660 case -3:
661 printk(KERN_ALERT "FLASH: image is corrupt or not correct for this platform. Firmware not flashed\n");
662 break;
663 case -4:
664 printk(KERN_ALERT "FLASH: flash failed when partially complete. System may not reboot\n");
665 break;
666 default:
667 printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status);
668 break;
669 }
670}
671
565static void remove_flash_pde(struct proc_dir_entry *dp) 672static void remove_flash_pde(struct proc_dir_entry *dp)
566{ 673{
567 if (dp) { 674 if (dp) {
@@ -701,6 +808,7 @@ int __init rtas_flash_init(void)
701 if (rc != 0) 808 if (rc != 0)
702 goto cleanup; 809 goto cleanup;
703 810
811 rtas_flash_term_hook = rtas_flash_firmware;
704 return 0; 812 return 0;
705 813
706cleanup: 814cleanup:
@@ -714,6 +822,7 @@ cleanup:
714 822
715void __exit rtas_flash_cleanup(void) 823void __exit rtas_flash_cleanup(void)
716{ 824{
825 rtas_flash_term_hook = NULL;
717 remove_flash_pde(firmware_flash_pde); 826 remove_flash_pde(firmware_flash_pde);
718 remove_flash_pde(firmware_update_pde); 827 remove_flash_pde(firmware_update_pde);
719 remove_flash_pde(validate_pde); 828 remove_flash_pde(validate_pde);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 1292460fcde2..d43fa8c0e5ac 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -170,12 +170,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
170 } 170 }
171 171
172#ifdef CONFIG_SMP 172#ifdef CONFIG_SMP
173#ifdef CONFIG_PPC64 /* XXX for now */
174 pvr = per_cpu(pvr, cpu_id); 173 pvr = per_cpu(pvr, cpu_id);
175#else 174#else
176 pvr = cpu_data[cpu_id].pvr;
177#endif
178#else
179 pvr = mfspr(SPRN_PVR); 175 pvr = mfspr(SPRN_PVR);
180#endif 176#endif
181 maj = (pvr >> 8) & 0xFF; 177 maj = (pvr >> 8) & 0xFF;
@@ -201,11 +197,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
201#ifdef CONFIG_TAU_AVERAGE 197#ifdef CONFIG_TAU_AVERAGE
202 /* more straightforward, but potentially misleading */ 198 /* more straightforward, but potentially misleading */
203 seq_printf(m, "temperature \t: %u C (uncalibrated)\n", 199 seq_printf(m, "temperature \t: %u C (uncalibrated)\n",
204 cpu_temp(i)); 200 cpu_temp(cpu_id));
205#else 201#else
206 /* show the actual temp sensor range */ 202 /* show the actual temp sensor range */
207 u32 temp; 203 u32 temp;
208 temp = cpu_temp_both(i); 204 temp = cpu_temp_both(cpu_id);
209 seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n", 205 seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n",
210 temp & 0xff, temp >> 16); 206 temp & 0xff, temp >> 16);
211#endif 207#endif
@@ -408,3 +404,118 @@ static int __init set_preferred_console(void)
408} 404}
409console_initcall(set_preferred_console); 405console_initcall(set_preferred_console);
410#endif /* CONFIG_PPC_MULTIPLATFORM */ 406#endif /* CONFIG_PPC_MULTIPLATFORM */
407
408#ifdef CONFIG_SMP
409
410/**
411 * setup_cpu_maps - initialize the following cpu maps:
412 * cpu_possible_map
413 * cpu_present_map
414 * cpu_sibling_map
415 *
416 * Having the possible map set up early allows us to restrict allocations
417 * of things like irqstacks to num_possible_cpus() rather than NR_CPUS.
418 *
419 * We do not initialize the online map here; cpus set their own bits in
420 * cpu_online_map as they come up.
421 *
422 * This function is valid only for Open Firmware systems. finish_device_tree
423 * must be called before using this.
424 *
425 * While we're here, we may as well set the "physical" cpu ids in the paca.
426 */
427void __init smp_setup_cpu_maps(void)
428{
429 struct device_node *dn = NULL;
430 int cpu = 0;
431 int swap_cpuid = 0;
432
433 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
434 int *intserv;
435 int j, len = sizeof(u32), nthreads = 1;
436
437 intserv = (int *)get_property(dn, "ibm,ppc-interrupt-server#s",
438 &len);
439 if (intserv)
440 nthreads = len / sizeof(int);
441 else {
442 intserv = (int *) get_property(dn, "reg", NULL);
443 if (!intserv)
444 intserv = &cpu; /* assume logical == phys */
445 }
446
447 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
448 cpu_set(cpu, cpu_present_map);
449 set_hard_smp_processor_id(cpu, intserv[j]);
450
451 if (intserv[j] == boot_cpuid_phys)
452 swap_cpuid = cpu;
453 cpu_set(cpu, cpu_possible_map);
454 cpu++;
455 }
456 }
457
458 /* Swap CPU id 0 with boot_cpuid_phys, so we can always assume that
459 * boot cpu is logical 0.
460 */
461 if (boot_cpuid_phys != get_hard_smp_processor_id(0)) {
462 u32 tmp;
463 tmp = get_hard_smp_processor_id(0);
464 set_hard_smp_processor_id(0, boot_cpuid_phys);
465 set_hard_smp_processor_id(swap_cpuid, tmp);
466 }
467
468#ifdef CONFIG_PPC64
469 /*
470 * On pSeries LPAR, we need to know how many cpus
471 * could possibly be added to this partition.
472 */
473 if (systemcfg->platform == PLATFORM_PSERIES_LPAR &&
474 (dn = of_find_node_by_path("/rtas"))) {
475 int num_addr_cell, num_size_cell, maxcpus;
476 unsigned int *ireg;
477
478 num_addr_cell = prom_n_addr_cells(dn);
479 num_size_cell = prom_n_size_cells(dn);
480
481 ireg = (unsigned int *)
482 get_property(dn, "ibm,lrdr-capacity", NULL);
483
484 if (!ireg)
485 goto out;
486
487 maxcpus = ireg[num_addr_cell + num_size_cell];
488
489 /* Double maxcpus for processors which have SMT capability */
490 if (cpu_has_feature(CPU_FTR_SMT))
491 maxcpus *= 2;
492
493 if (maxcpus > NR_CPUS) {
494 printk(KERN_WARNING
495 "Partition configured for %d cpus, "
496 "operating system maximum is %d.\n",
497 maxcpus, NR_CPUS);
498 maxcpus = NR_CPUS;
499 } else
500 printk(KERN_INFO "Partition configured for %d cpus.\n",
501 maxcpus);
502
503 for (cpu = 0; cpu < maxcpus; cpu++)
504 cpu_set(cpu, cpu_possible_map);
505 out:
506 of_node_put(dn);
507 }
508
509 /*
510 * Do the sibling map; assume only two threads per processor.
511 */
512 for_each_cpu(cpu) {
513 cpu_set(cpu, cpu_sibling_map[cpu]);
514 if (cpu_has_feature(CPU_FTR_SMT))
515 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
516 }
517
518 systemcfg->processorCount = num_present_cpus();
519#endif /* CONFIG_PPC64 */
520}
521#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 9680ae99b084..b45eedbb4b3a 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -288,6 +288,8 @@ void __init setup_arch(char **cmdline_p)
288 unflatten_device_tree(); 288 unflatten_device_tree();
289 finish_device_tree(); 289 finish_device_tree();
290 290
291 smp_setup_cpu_maps();
292
291#ifdef CONFIG_BOOTX_TEXT 293#ifdef CONFIG_BOOTX_TEXT
292 init_boot_display(); 294 init_boot_display();
293#endif 295#endif
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 40c48100bf1b..6b52cce872be 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -56,7 +56,7 @@
56#include <asm/page.h> 56#include <asm/page.h>
57#include <asm/mmu.h> 57#include <asm/mmu.h>
58#include <asm/lmb.h> 58#include <asm/lmb.h>
59#include <asm/iSeries/ItLpNaca.h> 59#include <asm/iseries/it_lp_naca.h>
60#include <asm/firmware.h> 60#include <asm/firmware.h>
61#include <asm/systemcfg.h> 61#include <asm/systemcfg.h>
62#include <asm/xmon.h> 62#include <asm/xmon.h>
@@ -103,8 +103,6 @@ extern void htab_initialize(void);
103extern void early_init_devtree(void *flat_dt); 103extern void early_init_devtree(void *flat_dt);
104extern void unflatten_device_tree(void); 104extern void unflatten_device_tree(void);
105 105
106extern void smp_release_cpus(void);
107
108int have_of = 1; 106int have_of = 1;
109int boot_cpuid = 0; 107int boot_cpuid = 0;
110int boot_cpuid_phys = 0; 108int boot_cpuid_phys = 0;
@@ -183,120 +181,14 @@ static int __init early_smt_enabled(char *p)
183} 181}
184early_param("smt-enabled", early_smt_enabled); 182early_param("smt-enabled", early_smt_enabled);
185 183
186/** 184#else
187 * setup_cpu_maps - initialize the following cpu maps: 185#define check_smt_enabled()
188 * cpu_possible_map
189 * cpu_present_map
190 * cpu_sibling_map
191 *
192 * Having the possible map set up early allows us to restrict allocations
193 * of things like irqstacks to num_possible_cpus() rather than NR_CPUS.
194 *
195 * We do not initialize the online map here; cpus set their own bits in
196 * cpu_online_map as they come up.
197 *
198 * This function is valid only for Open Firmware systems. finish_device_tree
199 * must be called before using this.
200 *
201 * While we're here, we may as well set the "physical" cpu ids in the paca.
202 */
203static void __init setup_cpu_maps(void)
204{
205 struct device_node *dn = NULL;
206 int cpu = 0;
207 int swap_cpuid = 0;
208
209 check_smt_enabled();
210
211 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
212 u32 *intserv;
213 int j, len = sizeof(u32), nthreads;
214
215 intserv = (u32 *)get_property(dn, "ibm,ppc-interrupt-server#s",
216 &len);
217 if (!intserv)
218 intserv = (u32 *)get_property(dn, "reg", NULL);
219
220 nthreads = len / sizeof(u32);
221
222 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
223 cpu_set(cpu, cpu_present_map);
224 set_hard_smp_processor_id(cpu, intserv[j]);
225
226 if (intserv[j] == boot_cpuid_phys)
227 swap_cpuid = cpu;
228 cpu_set(cpu, cpu_possible_map);
229 cpu++;
230 }
231 }
232
233 /* Swap CPU id 0 with boot_cpuid_phys, so we can always assume that
234 * boot cpu is logical 0.
235 */
236 if (boot_cpuid_phys != get_hard_smp_processor_id(0)) {
237 u32 tmp;
238 tmp = get_hard_smp_processor_id(0);
239 set_hard_smp_processor_id(0, boot_cpuid_phys);
240 set_hard_smp_processor_id(swap_cpuid, tmp);
241 }
242
243 /*
244 * On pSeries LPAR, we need to know how many cpus
245 * could possibly be added to this partition.
246 */
247 if (systemcfg->platform == PLATFORM_PSERIES_LPAR &&
248 (dn = of_find_node_by_path("/rtas"))) {
249 int num_addr_cell, num_size_cell, maxcpus;
250 unsigned int *ireg;
251
252 num_addr_cell = prom_n_addr_cells(dn);
253 num_size_cell = prom_n_size_cells(dn);
254
255 ireg = (unsigned int *)
256 get_property(dn, "ibm,lrdr-capacity", NULL);
257
258 if (!ireg)
259 goto out;
260
261 maxcpus = ireg[num_addr_cell + num_size_cell];
262
263 /* Double maxcpus for processors which have SMT capability */
264 if (cpu_has_feature(CPU_FTR_SMT))
265 maxcpus *= 2;
266
267 if (maxcpus > NR_CPUS) {
268 printk(KERN_WARNING
269 "Partition configured for %d cpus, "
270 "operating system maximum is %d.\n",
271 maxcpus, NR_CPUS);
272 maxcpus = NR_CPUS;
273 } else
274 printk(KERN_INFO "Partition configured for %d cpus.\n",
275 maxcpus);
276
277 for (cpu = 0; cpu < maxcpus; cpu++)
278 cpu_set(cpu, cpu_possible_map);
279 out:
280 of_node_put(dn);
281 }
282
283 /*
284 * Do the sibling map; assume only two threads per processor.
285 */
286 for_each_cpu(cpu) {
287 cpu_set(cpu, cpu_sibling_map[cpu]);
288 if (cpu_has_feature(CPU_FTR_SMT))
289 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
290 }
291
292 systemcfg->processorCount = num_present_cpus();
293}
294#endif /* CONFIG_SMP */ 186#endif /* CONFIG_SMP */
295 187
296extern struct machdep_calls pSeries_md; 188extern struct machdep_calls pSeries_md;
297extern struct machdep_calls pmac_md; 189extern struct machdep_calls pmac_md;
298extern struct machdep_calls maple_md; 190extern struct machdep_calls maple_md;
299extern struct machdep_calls bpa_md; 191extern struct machdep_calls cell_md;
300extern struct machdep_calls iseries_md; 192extern struct machdep_calls iseries_md;
301 193
302/* Ultimately, stuff them in an elf section like initcalls... */ 194/* Ultimately, stuff them in an elf section like initcalls... */
@@ -310,8 +202,8 @@ static struct machdep_calls __initdata *machines[] = {
310#ifdef CONFIG_PPC_MAPLE 202#ifdef CONFIG_PPC_MAPLE
311 &maple_md, 203 &maple_md,
312#endif /* CONFIG_PPC_MAPLE */ 204#endif /* CONFIG_PPC_MAPLE */
313#ifdef CONFIG_PPC_BPA 205#ifdef CONFIG_PPC_CELL
314 &bpa_md, 206 &cell_md,
315#endif 207#endif
316#ifdef CONFIG_PPC_ISERIES 208#ifdef CONFIG_PPC_ISERIES
317 &iseries_md, 209 &iseries_md,
@@ -400,6 +292,29 @@ void __init early_setup(unsigned long dt_ptr)
400} 292}
401 293
402 294
295#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
296void smp_release_cpus(void)
297{
298 extern unsigned long __secondary_hold_spinloop;
299
300 DBG(" -> smp_release_cpus()\n");
301
302 /* All secondary cpus are spinning on a common spinloop, release them
303 * all now so they can start to spin on their individual paca
304 * spinloops. For non SMP kernels, the secondary cpus never get out
305 * of the common spinloop.
306 * This is useless but harmless on iSeries, secondaries are already
307 * waiting on their paca spinloops. */
308
309 __secondary_hold_spinloop = 1;
310 mb();
311
312 DBG(" <- smp_release_cpus()\n");
313}
314#else
315#define smp_release_cpus()
316#endif /* CONFIG_SMP || CONFIG_KEXEC */
317
403/* 318/*
404 * Initialize some remaining members of the ppc64_caches and systemcfg structures 319 * Initialize some remaining members of the ppc64_caches and systemcfg structures
405 * (at least until we get rid of them completely). This is mostly some 320 * (at least until we get rid of them completely). This is mostly some
@@ -589,17 +504,13 @@ void __init setup_system(void)
589 504
590 parse_early_param(); 505 parse_early_param();
591 506
592#ifdef CONFIG_SMP 507 check_smt_enabled();
593 /* 508 smp_setup_cpu_maps();
594 * iSeries has already initialized the cpu maps at this point.
595 */
596 setup_cpu_maps();
597 509
598 /* Release secondary cpus out of their spinloops at 0x60 now that 510 /* Release secondary cpus out of their spinloops at 0x60 now that
599 * we can map physical -> logical CPU ids 511 * we can map physical -> logical CPU ids
600 */ 512 */
601 smp_release_cpus(); 513 smp_release_cpus();
602#endif
603 514
604 printk("Starting Linux PPC64 %s\n", system_utsname.version); 515 printk("Starting Linux PPC64 %s\n", system_utsname.version);
605 516
@@ -631,23 +542,6 @@ static int ppc64_panic_event(struct notifier_block *this,
631 return NOTIFY_DONE; 542 return NOTIFY_DONE;
632} 543}
633 544
634#ifdef CONFIG_PPC_ISERIES
635/*
636 * On iSeries we just parse the mem=X option from the command line.
637 * On pSeries it's a bit more complicated, see prom_init_mem()
638 */
639static int __init early_parsemem(char *p)
640{
641 if (!p)
642 return 0;
643
644 memory_limit = ALIGN(memparse(p, &p), PAGE_SIZE);
645
646 return 0;
647}
648early_param("mem", early_parsemem);
649#endif /* CONFIG_PPC_ISERIES */
650
651#ifdef CONFIG_IRQSTACKS 545#ifdef CONFIG_IRQSTACKS
652static void __init irqstack_early_init(void) 546static void __init irqstack_early_init(void)
653{ 547{
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index 444c3e81884c..876c57c11365 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -43,7 +43,7 @@
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
45#ifdef CONFIG_PPC64 45#ifdef CONFIG_PPC64
46#include <asm/ppc32.h> 46#include "ppc32.h"
47#include <asm/ppcdebug.h> 47#include <asm/ppcdebug.h>
48#include <asm/unistd.h> 48#include <asm/unistd.h>
49#include <asm/vdso.h> 49#include <asm/vdso.h>
diff --git a/arch/ppc64/kernel/signal.c b/arch/powerpc/kernel/signal_64.c
index ec9d0984b6a0..ec9d0984b6a0 100644
--- a/arch/ppc64/kernel/signal.c
+++ b/arch/powerpc/kernel/signal_64.c
diff --git a/arch/ppc64/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index 7d8ec9996b3e..9adef3bddad4 100644
--- a/arch/ppc64/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -22,11 +22,11 @@ enum {
22}; 22};
23 23
24static struct { 24static struct {
25 volatile long tb; 25 volatile u64 tb;
26 volatile long mark; 26 volatile u64 mark;
27 volatile int cmd; 27 volatile int cmd;
28 volatile int handshake; 28 volatile int handshake;
29 int filler[3]; 29 int filler[2];
30 30
31 volatile int ack; 31 volatile int ack;
32 int filler2[7]; 32 int filler2[7];
@@ -36,89 +36,80 @@ static struct {
36 36
37static volatile int running; 37static volatile int running;
38 38
39static void __devinit 39static void __devinit enter_contest(u64 mark, long add)
40enter_contest( long mark, long add )
41{ 40{
42 while( (long)(mftb() - mark) < 0 ) 41 while (get_tb() < mark)
43 tbsync->race_result = add; 42 tbsync->race_result = add;
44} 43}
45 44
46void __devinit 45void __devinit smp_generic_take_timebase(void)
47smp_generic_take_timebase( void )
48{ 46{
49 int cmd; 47 int cmd;
50 long tb; 48 u64 tb;
51 49
52 local_irq_disable(); 50 local_irq_disable();
53 while( !running ) 51 while (!running)
54 ; 52 barrier();
55 rmb(); 53 rmb();
56 54
57 for( ;; ) { 55 for (;;) {
58 tbsync->ack = 1; 56 tbsync->ack = 1;
59 while( !tbsync->handshake ) 57 while (!tbsync->handshake)
60 ; 58 barrier();
61 rmb(); 59 rmb();
62 60
63 cmd = tbsync->cmd; 61 cmd = tbsync->cmd;
64 tb = tbsync->tb; 62 tb = tbsync->tb;
63 mb();
65 tbsync->ack = 0; 64 tbsync->ack = 0;
66 if( cmd == kExit ) 65 if (cmd == kExit)
67 return; 66 break;
68 67
69 if( cmd == kSetAndTest ) { 68 while (tbsync->handshake)
70 while( tbsync->handshake ) 69 barrier();
71 ; 70 if (cmd == kSetAndTest)
72 asm volatile ("mttbl %0" :: "r" (tb & 0xfffffffful) ); 71 set_tb(tb >> 32, tb & 0xfffffffful);
73 asm volatile ("mttbu %0" :: "r" (tb >> 32) ); 72 enter_contest(tbsync->mark, -1);
74 } else {
75 while( tbsync->handshake )
76 ;
77 }
78 enter_contest( tbsync->mark, -1 );
79 } 73 }
80 local_irq_enable(); 74 local_irq_enable();
81} 75}
82 76
83static int __devinit 77static int __devinit start_contest(int cmd, long offset, int num)
84start_contest( int cmd, long offset, long num )
85{ 78{
86 int i, score=0; 79 int i, score=0;
87 long tb, mark; 80 u64 tb;
81 long mark;
88 82
89 tbsync->cmd = cmd; 83 tbsync->cmd = cmd;
90 84
91 local_irq_disable(); 85 local_irq_disable();
92 for( i=-3; i<num; ) { 86 for (i = -3; i < num; ) {
93 tb = (long)mftb() + 400; 87 tb = get_tb() + 400;
94 tbsync->tb = tb + offset; 88 tbsync->tb = tb + offset;
95 tbsync->mark = mark = tb + 400; 89 tbsync->mark = mark = tb + 400;
96 90
97 wmb(); 91 wmb();
98 92
99 tbsync->handshake = 1; 93 tbsync->handshake = 1;
100 while( tbsync->ack ) 94 while (tbsync->ack)
101 ; 95 barrier();
102 96
103 while( (long)(mftb() - tb) <= 0 ) 97 while (get_tb() <= tb)
104 ; 98 barrier();
105 tbsync->handshake = 0; 99 tbsync->handshake = 0;
106 enter_contest( mark, 1 ); 100 enter_contest(mark, 1);
107 101
108 while( !tbsync->ack ) 102 while (!tbsync->ack)
109 ; 103 barrier();
110 104
111 if ((tbsync->tb ^ (long)mftb()) & 0x8000000000000000ul) 105 if (i++ > 0)
112 continue;
113 if( i++ > 0 )
114 score += tbsync->race_result; 106 score += tbsync->race_result;
115 } 107 }
116 local_irq_enable(); 108 local_irq_enable();
117 return score; 109 return score;
118} 110}
119 111
120void __devinit 112void __devinit smp_generic_give_timebase(void)
121smp_generic_give_timebase( void )
122{ 113{
123 int i, score, score2, old, min=0, max=5000, offset=1000; 114 int i, score, score2, old, min=0, max=5000, offset=1000;
124 115
@@ -130,14 +121,14 @@ smp_generic_give_timebase( void )
130 mb(); 121 mb();
131 running = 1; 122 running = 1;
132 123
133 while( !tbsync->ack ) 124 while (!tbsync->ack)
134 ; 125 barrier();
135 126
136 printk("Got ack\n"); 127 printk("Got ack\n");
137 128
138 /* binary search */ 129 /* binary search */
139 for( old=-1 ; old != offset ; offset=(min+max)/2 ) { 130 for (old = -1; old != offset ; offset = (min+max) / 2) {
140 score = start_contest( kSetAndTest, offset, NUM_ITER ); 131 score = start_contest(kSetAndTest, offset, NUM_ITER);
141 132
142 printk("score %d, offset %d\n", score, offset ); 133 printk("score %d, offset %d\n", score, offset );
143 134
@@ -147,21 +138,22 @@ smp_generic_give_timebase( void )
147 min = offset; 138 min = offset;
148 old = offset; 139 old = offset;
149 } 140 }
150 score = start_contest( kSetAndTest, min, NUM_ITER ); 141 score = start_contest(kSetAndTest, min, NUM_ITER);
151 score2 = start_contest( kSetAndTest, max, NUM_ITER ); 142 score2 = start_contest(kSetAndTest, max, NUM_ITER);
152 143
153 printk( "Min %d (score %d), Max %d (score %d)\n", min, score, max, score2 ); 144 printk("Min %d (score %d), Max %d (score %d)\n",
154 score = abs( score ); 145 min, score, max, score2);
155 score2 = abs( score2 ); 146 score = abs(score);
147 score2 = abs(score2);
156 offset = (score < score2) ? min : max; 148 offset = (score < score2) ? min : max;
157 149
158 /* guard against inaccurate mttb */ 150 /* guard against inaccurate mttb */
159 for( i=0; i<10; i++ ) { 151 for (i = 0; i < 10; i++) {
160 start_contest( kSetAndTest, offset, NUM_ITER/10 ); 152 start_contest(kSetAndTest, offset, NUM_ITER/10);
161 153
162 if( (score2=start_contest(kTest, offset, NUM_ITER)) < 0 ) 154 if ((score2 = start_contest(kTest, offset, NUM_ITER)) < 0)
163 score2 = -score2; 155 score2 = -score2;
164 if( score2 <= score || score2 < 20 ) 156 if (score2 <= score || score2 < 20)
165 break; 157 break;
166 } 158 }
167 printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER ); 159 printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
@@ -170,10 +162,10 @@ smp_generic_give_timebase( void )
170 tbsync->cmd = kExit; 162 tbsync->cmd = kExit;
171 wmb(); 163 wmb();
172 tbsync->handshake = 1; 164 tbsync->handshake = 1;
173 while( tbsync->ack ) 165 while (tbsync->ack)
174 ; 166 barrier();
175 tbsync->handshake = 0; 167 tbsync->handshake = 0;
176 kfree( tbsync ); 168 kfree(tbsync);
177 tbsync = NULL; 169 tbsync = NULL;
178 running = 0; 170 running = 0;
179} 171}
diff --git a/arch/ppc64/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 017c12919832..1794a694a928 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -39,13 +39,18 @@
39#include <asm/pgtable.h> 39#include <asm/pgtable.h>
40#include <asm/prom.h> 40#include <asm/prom.h>
41#include <asm/smp.h> 41#include <asm/smp.h>
42#include <asm/paca.h>
43#include <asm/time.h> 42#include <asm/time.h>
43#include <asm/xmon.h>
44#include <asm/machdep.h> 44#include <asm/machdep.h>
45#include <asm/cputable.h> 45#include <asm/cputable.h>
46#include <asm/system.h> 46#include <asm/system.h>
47#include <asm/abs_addr.h>
48#include <asm/mpic.h> 47#include <asm/mpic.h>
48#ifdef CONFIG_PPC64
49#include <asm/paca.h>
50#endif
51
52int smp_hw_index[NR_CPUS];
53struct thread_info *secondary_ti;
49 54
50#ifdef DEBUG 55#ifdef DEBUG
51#define DBG(fmt...) udbg_printf(fmt) 56#define DBG(fmt...) udbg_printf(fmt)
@@ -60,6 +65,7 @@ cpumask_t cpu_sibling_map[NR_CPUS] = { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
60EXPORT_SYMBOL(cpu_online_map); 65EXPORT_SYMBOL(cpu_online_map);
61EXPORT_SYMBOL(cpu_possible_map); 66EXPORT_SYMBOL(cpu_possible_map);
62 67
68/* SMP operations for this machine */
63struct smp_ops_t *smp_ops; 69struct smp_ops_t *smp_ops;
64 70
65static volatile unsigned int cpu_callin_map[NR_CPUS]; 71static volatile unsigned int cpu_callin_map[NR_CPUS];
@@ -89,7 +95,9 @@ void __devinit smp_mpic_setup_cpu(int cpu)
89{ 95{
90 mpic_setup_this_cpu(); 96 mpic_setup_this_cpu();
91} 97}
98#endif /* CONFIG_MPIC */
92 99
100#ifdef CONFIG_PPC64
93void __devinit smp_generic_kick_cpu(int nr) 101void __devinit smp_generic_kick_cpu(int nr)
94{ 102{
95 BUG_ON(nr < 0 || nr >= NR_CPUS); 103 BUG_ON(nr < 0 || nr >= NR_CPUS);
@@ -102,8 +110,7 @@ void __devinit smp_generic_kick_cpu(int nr)
102 paca[nr].cpu_start = 1; 110 paca[nr].cpu_start = 1;
103 smp_mb(); 111 smp_mb();
104} 112}
105 113#endif
106#endif /* CONFIG_MPIC */
107 114
108void smp_message_recv(int msg, struct pt_regs *regs) 115void smp_message_recv(int msg, struct pt_regs *regs)
109{ 116{
@@ -111,15 +118,10 @@ void smp_message_recv(int msg, struct pt_regs *regs)
111 case PPC_MSG_CALL_FUNCTION: 118 case PPC_MSG_CALL_FUNCTION:
112 smp_call_function_interrupt(); 119 smp_call_function_interrupt();
113 break; 120 break;
114 case PPC_MSG_RESCHEDULE: 121 case PPC_MSG_RESCHEDULE:
115 /* XXX Do we have to do this? */ 122 /* XXX Do we have to do this? */
116 set_need_resched(); 123 set_need_resched();
117 break; 124 break;
118#if 0
119 case PPC_MSG_MIGRATE_TASK:
120 /* spare */
121 break;
122#endif
123#ifdef CONFIG_DEBUGGER 125#ifdef CONFIG_DEBUGGER
124 case PPC_MSG_DEBUGGER_BREAK: 126 case PPC_MSG_DEBUGGER_BREAK:
125 debugger_ipi(regs); 127 debugger_ipi(regs);
@@ -171,8 +173,8 @@ static struct call_data_struct {
171 int wait; 173 int wait;
172} *call_data; 174} *call_data;
173 175
174/* delay of at least 8 seconds on 1GHz cpu */ 176/* delay of at least 8 seconds */
175#define SMP_CALL_TIMEOUT (1UL << (30 + 3)) 177#define SMP_CALL_TIMEOUT 8
176 178
177/* 179/*
178 * This function sends a 'generic call function' IPI to all other CPUs 180 * This function sends a 'generic call function' IPI to all other CPUs
@@ -194,7 +196,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
194{ 196{
195 struct call_data_struct data; 197 struct call_data_struct data;
196 int ret = -1, cpus; 198 int ret = -1, cpus;
197 unsigned long timeout; 199 u64 timeout;
198 200
199 /* Can deadlock when called with interrupts disabled */ 201 /* Can deadlock when called with interrupts disabled */
200 WARN_ON(irqs_disabled()); 202 WARN_ON(irqs_disabled());
@@ -220,11 +222,12 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
220 /* Send a message to all other CPUs and wait for them to respond */ 222 /* Send a message to all other CPUs and wait for them to respond */
221 smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION); 223 smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION);
222 224
225 timeout = get_tb() + (u64) SMP_CALL_TIMEOUT * tb_ticks_per_sec;
226
223 /* Wait for response */ 227 /* Wait for response */
224 timeout = SMP_CALL_TIMEOUT;
225 while (atomic_read(&data.started) != cpus) { 228 while (atomic_read(&data.started) != cpus) {
226 HMT_low(); 229 HMT_low();
227 if (--timeout == 0) { 230 if (get_tb() >= timeout) {
228 printk("smp_call_function on cpu %d: other cpus not " 231 printk("smp_call_function on cpu %d: other cpus not "
229 "responding (%d)\n", smp_processor_id(), 232 "responding (%d)\n", smp_processor_id(),
230 atomic_read(&data.started)); 233 atomic_read(&data.started));
@@ -234,10 +237,9 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
234 } 237 }
235 238
236 if (wait) { 239 if (wait) {
237 timeout = SMP_CALL_TIMEOUT;
238 while (atomic_read(&data.finished) != cpus) { 240 while (atomic_read(&data.finished) != cpus) {
239 HMT_low(); 241 HMT_low();
240 if (--timeout == 0) { 242 if (get_tb() >= timeout) {
241 printk("smp_call_function on cpu %d: other " 243 printk("smp_call_function on cpu %d: other "
242 "cpus not finishing (%d/%d)\n", 244 "cpus not finishing (%d/%d)\n",
243 smp_processor_id(), 245 smp_processor_id(),
@@ -251,7 +253,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
251 253
252 ret = 0; 254 ret = 0;
253 255
254out: 256 out:
255 call_data = NULL; 257 call_data = NULL;
256 HMT_medium(); 258 HMT_medium();
257 spin_unlock(&call_lock); 259 spin_unlock(&call_lock);
@@ -313,8 +315,11 @@ static void __init smp_create_idle(unsigned int cpu)
313 p = fork_idle(cpu); 315 p = fork_idle(cpu);
314 if (IS_ERR(p)) 316 if (IS_ERR(p))
315 panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); 317 panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
318#ifdef CONFIG_PPC64
316 paca[cpu].__current = p; 319 paca[cpu].__current = p;
320#endif
317 current_set[cpu] = p->thread_info; 321 current_set[cpu] = p->thread_info;
322 p->thread_info->cpu = cpu;
318} 323}
319 324
320void __init smp_prepare_cpus(unsigned int max_cpus) 325void __init smp_prepare_cpus(unsigned int max_cpus)
@@ -333,18 +338,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
333 smp_store_cpu_info(boot_cpuid); 338 smp_store_cpu_info(boot_cpuid);
334 cpu_callin_map[boot_cpuid] = 1; 339 cpu_callin_map[boot_cpuid] = 1;
335 340
336#ifndef CONFIG_PPC_ISERIES
337 paca[boot_cpuid].next_jiffy_update_tb = tb_last_stamp = get_tb();
338
339 /*
340 * Should update do_gtod.stamp_xsec.
341 * For now we leave it which means the time can be some
342 * number of msecs off until someone does a settimeofday()
343 */
344 do_gtod.varp->tb_orig_stamp = tb_last_stamp;
345 systemcfg->tb_orig_stamp = tb_last_stamp;
346#endif
347
348 max_cpus = smp_ops->probe(); 341 max_cpus = smp_ops->probe();
349 342
350 smp_space_timers(max_cpus); 343 smp_space_timers(max_cpus);
@@ -359,8 +352,9 @@ void __devinit smp_prepare_boot_cpu(void)
359 BUG_ON(smp_processor_id() != boot_cpuid); 352 BUG_ON(smp_processor_id() != boot_cpuid);
360 353
361 cpu_set(boot_cpuid, cpu_online_map); 354 cpu_set(boot_cpuid, cpu_online_map);
362 355#ifdef CONFIG_PPC64
363 paca[boot_cpuid].__current = current; 356 paca[boot_cpuid].__current = current;
357#endif
364 current_set[boot_cpuid] = current->thread_info; 358 current_set[boot_cpuid] = current->thread_info;
365} 359}
366 360
@@ -444,13 +438,16 @@ int __devinit __cpu_up(unsigned int cpu)
444{ 438{
445 int c; 439 int c;
446 440
441 secondary_ti = current_set[cpu];
447 if (!cpu_enable(cpu)) 442 if (!cpu_enable(cpu))
448 return 0; 443 return 0;
449 444
450 if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) 445 if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))
451 return -EINVAL; 446 return -EINVAL;
452 447
448#ifdef CONFIG_PPC64
453 paca[cpu].default_decr = tb_ticks_per_jiffy; 449 paca[cpu].default_decr = tb_ticks_per_jiffy;
450#endif
454 451
455 /* Make sure callin-map entry is 0 (can be leftover a CPU 452 /* Make sure callin-map entry is 0 (can be leftover a CPU
456 * hotplug 453 * hotplug
@@ -513,7 +510,7 @@ int __devinit start_secondary(void *unused)
513 current->active_mm = &init_mm; 510 current->active_mm = &init_mm;
514 511
515 smp_store_cpu_info(cpu); 512 smp_store_cpu_info(cpu);
516 set_dec(paca[cpu].default_decr); 513 set_dec(tb_ticks_per_jiffy);
517 cpu_callin_map[cpu] = 1; 514 cpu_callin_map[cpu] = 1;
518 515
519 smp_ops->setup_cpu(cpu); 516 smp_ops->setup_cpu(cpu);
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 23436b6c1881..6996a593dcb3 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -66,8 +66,8 @@
66#include <asm/firmware.h> 66#include <asm/firmware.h>
67#endif 67#endif
68#ifdef CONFIG_PPC_ISERIES 68#ifdef CONFIG_PPC_ISERIES
69#include <asm/iSeries/ItLpQueue.h> 69#include <asm/iseries/it_lp_queue.h>
70#include <asm/iSeries/HvCallXm.h> 70#include <asm/iseries/hv_call_xm.h>
71#endif 71#endif
72 72
73/* keep track of when we need to update the rtc */ 73/* keep track of when we need to update the rtc */
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 5d638ecddbd0..07e5ee40b870 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -147,8 +147,8 @@ int die(const char *str, struct pt_regs *regs, long err)
147 printk("POWERMAC "); 147 printk("POWERMAC ");
148 nl = 1; 148 nl = 1;
149 break; 149 break;
150 case PLATFORM_BPA: 150 case PLATFORM_CELL:
151 printk("BPA "); 151 printk("CELL ");
152 nl = 1; 152 nl = 1;
153 break; 153 break;
154 } 154 }
@@ -749,22 +749,22 @@ static int check_bug_trap(struct pt_regs *regs)
749 if (bug->line & BUG_WARNING_TRAP) { 749 if (bug->line & BUG_WARNING_TRAP) {
750 /* this is a WARN_ON rather than BUG/BUG_ON */ 750 /* this is a WARN_ON rather than BUG/BUG_ON */
751#ifdef CONFIG_XMON 751#ifdef CONFIG_XMON
752 xmon_printf(KERN_ERR "Badness in %s at %s:%d\n", 752 xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n",
753 bug->function, bug->file, 753 bug->function, bug->file,
754 bug->line & ~BUG_WARNING_TRAP); 754 bug->line & ~BUG_WARNING_TRAP);
755#endif /* CONFIG_XMON */ 755#endif /* CONFIG_XMON */
756 printk(KERN_ERR "Badness in %s at %s:%d\n", 756 printk(KERN_ERR "Badness in %s at %s:%ld\n",
757 bug->function, bug->file, 757 bug->function, bug->file,
758 bug->line & ~BUG_WARNING_TRAP); 758 bug->line & ~BUG_WARNING_TRAP);
759 dump_stack(); 759 dump_stack();
760 return 1; 760 return 1;
761 } 761 }
762#ifdef CONFIG_XMON 762#ifdef CONFIG_XMON
763 xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%d!\n", 763 xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
764 bug->function, bug->file, bug->line); 764 bug->function, bug->file, bug->line);
765 xmon(regs); 765 xmon(regs);
766#endif /* CONFIG_XMON */ 766#endif /* CONFIG_XMON */
767 printk(KERN_CRIT "kernel BUG in %s at %s:%d!\n", 767 printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
768 bug->function, bug->file, bug->line); 768 bug->function, bug->file, bug->line);
769 769
770 return 0; 770 return 0;
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index d4dfcfbce272..7fa7b15fd8e6 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -3,9 +3,12 @@
3#include <asm/page.h> 3#include <asm/page.h>
4#else 4#else
5#define PAGE_SIZE 4096 5#define PAGE_SIZE 4096
6#define KERNELBASE CONFIG_KERNEL_START
6#endif 7#endif
7#include <asm-generic/vmlinux.lds.h> 8#include <asm-generic/vmlinux.lds.h>
8 9
10ENTRY(_stext)
11
9#ifdef CONFIG_PPC64 12#ifdef CONFIG_PPC64
10OUTPUT_ARCH(powerpc:common64) 13OUTPUT_ARCH(powerpc:common64)
11jiffies = jiffies_64; 14jiffies = jiffies_64;
@@ -21,33 +24,9 @@ SECTIONS
21 *(.exit.data) 24 *(.exit.data)
22 } 25 }
23 26
27 . = KERNELBASE;
24 28
25 /* Read-only sections, merged into text segment: */ 29 /* Read-only sections, merged into text segment: */
26#ifdef CONFIG_PPC32
27 . = + SIZEOF_HEADERS;
28 .interp : { *(.interp) }
29 .hash : { *(.hash) }
30 .dynsym : { *(.dynsym) }
31 .dynstr : { *(.dynstr) }
32 .rel.text : { *(.rel.text) }
33 .rela.text : { *(.rela.text) }
34 .rel.data : { *(.rel.data) }
35 .rela.data : { *(.rela.data) }
36 .rel.rodata : { *(.rel.rodata) }
37 .rela.rodata : { *(.rela.rodata) }
38 .rel.got : { *(.rel.got) }
39 .rela.got : { *(.rela.got) }
40 .rel.ctors : { *(.rel.ctors) }
41 .rela.ctors : { *(.rela.ctors) }
42 .rel.dtors : { *(.rel.dtors) }
43 .rela.dtors : { *(.rela.dtors) }
44 .rel.bss : { *(.rel.bss) }
45 .rela.bss : { *(.rela.bss) }
46 .rel.plt : { *(.rel.plt) }
47 .rela.plt : { *(.rela.plt) }
48/* .init : { *(.init) } =0*/
49 .plt : { *(.plt) }
50#endif
51 .text : { 30 .text : {
52 *(.text .text.*) 31 *(.text .text.*)
53 SCHED_TEXT 32 SCHED_TEXT
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index e6b2be3bcec1..34f5c2e074c9 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -3,13 +3,14 @@
3# 3#
4 4
5ifeq ($(CONFIG_PPC_MERGE),y) 5ifeq ($(CONFIG_PPC_MERGE),y)
6obj-y := string.o 6obj-y := string.o strcase.o
7obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
7endif 8endif
8 9
9obj-y += strcase.o 10obj-y += bitops.o
10obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
11obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ 11obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
12 memcpy_64.o usercopy_64.o mem_64.o 12 memcpy_64.o usercopy_64.o mem_64.o string.o \
13 strcase.o
13obj-$(CONFIG_PPC_ISERIES) += e2a.o 14obj-$(CONFIG_PPC_ISERIES) += e2a.o
14obj-$(CONFIG_XMON) += sstep.o 15obj-$(CONFIG_XMON) += sstep.o
15 16
diff --git a/arch/ppc64/kernel/bitops.c b/arch/powerpc/lib/bitops.c
index ae329e8b4acb..b67ce3004ebf 100644
--- a/arch/ppc64/kernel/bitops.c
+++ b/arch/powerpc/lib/bitops.c
@@ -1,93 +1,97 @@
1/* 1#include <linux/types.h>
2 * These are too big to be inlined.
3 */
4
5#include <linux/kernel.h>
6#include <linux/module.h> 2#include <linux/module.h>
7#include <linux/bitops.h>
8#include <asm/byteorder.h> 3#include <asm/byteorder.h>
4#include <asm/bitops.h>
9 5
10unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, 6/**
11 unsigned long offset) 7 * find_next_bit - find the next set bit in a memory region
8 * @addr: The address to base the search on
9 * @offset: The bitnumber to start searching at
10 * @size: The maximum size to search
11 */
12unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
13 unsigned long offset)
12{ 14{
13 const unsigned long *p = addr + (offset >> 6); 15 const unsigned long *p = addr + BITOP_WORD(offset);
14 unsigned long result = offset & ~63UL; 16 unsigned long result = offset & ~(BITS_PER_LONG-1);
15 unsigned long tmp; 17 unsigned long tmp;
16 18
17 if (offset >= size) 19 if (offset >= size)
18 return size; 20 return size;
19 size -= result; 21 size -= result;
20 offset &= 63UL; 22 offset %= BITS_PER_LONG;
21 if (offset) { 23 if (offset) {
22 tmp = *(p++); 24 tmp = *(p++);
23 tmp |= ~0UL >> (64 - offset); 25 tmp &= (~0UL << offset);
24 if (size < 64) 26 if (size < BITS_PER_LONG)
25 goto found_first; 27 goto found_first;
26 if (~tmp) 28 if (tmp)
27 goto found_middle; 29 goto found_middle;
28 size -= 64; 30 size -= BITS_PER_LONG;
29 result += 64; 31 result += BITS_PER_LONG;
30 } 32 }
31 while (size & ~63UL) { 33 while (size & ~(BITS_PER_LONG-1)) {
32 if (~(tmp = *(p++))) 34 if ((tmp = *(p++)))
33 goto found_middle; 35 goto found_middle;
34 result += 64; 36 result += BITS_PER_LONG;
35 size -= 64; 37 size -= BITS_PER_LONG;
36 } 38 }
37 if (!size) 39 if (!size)
38 return result; 40 return result;
39 tmp = *p; 41 tmp = *p;
40 42
41found_first: 43found_first:
42 tmp |= ~0UL << size; 44 tmp &= (~0UL >> (64 - size));
43 if (tmp == ~0UL) /* Are any bits zero? */ 45 if (tmp == 0UL) /* Are any bits set? */
44 return result + size; /* Nope. */ 46 return result + size; /* Nope. */
45found_middle: 47found_middle:
46 return result + ffz(tmp); 48 return result + __ffs(tmp);
47} 49}
50EXPORT_SYMBOL(find_next_bit);
48 51
49EXPORT_SYMBOL(find_next_zero_bit); 52/*
50 53 * This implementation of find_{first,next}_zero_bit was stolen from
51unsigned long find_next_bit(const unsigned long *addr, unsigned long size, 54 * Linus' asm-alpha/bitops.h.
52 unsigned long offset) 55 */
56unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
57 unsigned long offset)
53{ 58{
54 const unsigned long *p = addr + (offset >> 6); 59 const unsigned long *p = addr + BITOP_WORD(offset);
55 unsigned long result = offset & ~63UL; 60 unsigned long result = offset & ~(BITS_PER_LONG-1);
56 unsigned long tmp; 61 unsigned long tmp;
57 62
58 if (offset >= size) 63 if (offset >= size)
59 return size; 64 return size;
60 size -= result; 65 size -= result;
61 offset &= 63UL; 66 offset %= BITS_PER_LONG;
62 if (offset) { 67 if (offset) {
63 tmp = *(p++); 68 tmp = *(p++);
64 tmp &= (~0UL << offset); 69 tmp |= ~0UL >> (BITS_PER_LONG - offset);
65 if (size < 64) 70 if (size < BITS_PER_LONG)
66 goto found_first; 71 goto found_first;
67 if (tmp) 72 if (~tmp)
68 goto found_middle; 73 goto found_middle;
69 size -= 64; 74 size -= BITS_PER_LONG;
70 result += 64; 75 result += BITS_PER_LONG;
71 } 76 }
72 while (size & ~63UL) { 77 while (size & ~(BITS_PER_LONG-1)) {
73 if ((tmp = *(p++))) 78 if (~(tmp = *(p++)))
74 goto found_middle; 79 goto found_middle;
75 result += 64; 80 result += BITS_PER_LONG;
76 size -= 64; 81 size -= BITS_PER_LONG;
77 } 82 }
78 if (!size) 83 if (!size)
79 return result; 84 return result;
80 tmp = *p; 85 tmp = *p;
81 86
82found_first: 87found_first:
83 tmp &= (~0UL >> (64 - size)); 88 tmp |= ~0UL << size;
84 if (tmp == 0UL) /* Are any bits set? */ 89 if (tmp == ~0UL) /* Are any bits zero? */
85 return result + size; /* Nope. */ 90 return result + size; /* Nope. */
86found_middle: 91found_middle:
87 return result + __ffs(tmp); 92 return result + ffz(tmp);
88} 93}
89 94EXPORT_SYMBOL(find_next_zero_bit);
90EXPORT_SYMBOL(find_next_bit);
91 95
92static inline unsigned int ext2_ilog2(unsigned int x) 96static inline unsigned int ext2_ilog2(unsigned int x)
93{ 97{
@@ -106,8 +110,8 @@ static inline unsigned int ext2_ffz(unsigned int x)
106 return rc; 110 return rc;
107} 111}
108 112
109unsigned long find_next_zero_le_bit(const unsigned long *addr, unsigned long size, 113unsigned long find_next_zero_le_bit(const unsigned long *addr,
110 unsigned long offset) 114 unsigned long size, unsigned long offset)
111{ 115{
112 const unsigned int *p = ((const unsigned int *)addr) + (offset >> 5); 116 const unsigned int *p = ((const unsigned int *)addr) + (offset >> 5);
113 unsigned int result = offset & ~31; 117 unsigned int result = offset & ~31;
@@ -143,5 +147,4 @@ found_first:
143found_middle: 147found_middle:
144 return result + ext2_ffz(tmp); 148 return result + ext2_ffz(tmp);
145} 149}
146
147EXPORT_SYMBOL(find_next_zero_le_bit); 150EXPORT_SYMBOL(find_next_zero_le_bit);
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index 3794715b2972..2a912f411eb4 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -22,7 +22,7 @@
22/* waiting for a spinlock... */ 22/* waiting for a spinlock... */
23#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) 23#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
24#include <asm/hvcall.h> 24#include <asm/hvcall.h>
25#include <asm/iSeries/HvCall.h> 25#include <asm/iseries/hv_call.h>
26 26
27void __spin_yield(raw_spinlock_t *lock) 27void __spin_yield(raw_spinlock_t *lock)
28{ 28{
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 172c0db63504..8836b3a00668 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_85xx) += 85xx/
11obj-$(CONFIG_PPC_PSERIES) += pseries/ 11obj-$(CONFIG_PPC_PSERIES) += pseries/
12obj-$(CONFIG_PPC_ISERIES) += iseries/ 12obj-$(CONFIG_PPC_ISERIES) += iseries/
13obj-$(CONFIG_PPC_MAPLE) += maple/ 13obj-$(CONFIG_PPC_MAPLE) += maple/
14obj-$(CONFIG_PPC_CELL) += cell/
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
new file mode 100644
index 000000000000..55e094b96bc0
--- /dev/null
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -0,0 +1,2 @@
1obj-y += interrupt.o iommu.o setup.o spider-pic.o
2obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/ppc64/kernel/bpa_iic.c b/arch/powerpc/platforms/cell/interrupt.c
index 0aaa878e19d3..7fbe78a9327d 100644
--- a/arch/ppc64/kernel/bpa_iic.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * BPA Internal Interrupt Controller 2 * Cell Internal Interrupt Controller
3 * 3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 * 5 *
@@ -31,7 +31,7 @@
31#include <asm/prom.h> 31#include <asm/prom.h>
32#include <asm/ptrace.h> 32#include <asm/ptrace.h>
33 33
34#include "bpa_iic.h" 34#include "interrupt.h"
35 35
36struct iic_pending_bits { 36struct iic_pending_bits {
37 u32 data; 37 u32 data;
@@ -89,7 +89,7 @@ static void iic_end(unsigned int irq)
89} 89}
90 90
91static struct hw_interrupt_type iic_pic = { 91static struct hw_interrupt_type iic_pic = {
92 .typename = " BPA-IIC ", 92 .typename = " CELL-IIC ",
93 .startup = iic_startup, 93 .startup = iic_startup,
94 .enable = iic_enable, 94 .enable = iic_enable,
95 .disable = iic_disable, 95 .disable = iic_disable,
@@ -106,7 +106,7 @@ static int iic_external_get_irq(struct iic_pending_bits pending)
106 irq = -1; 106 irq = -1;
107 107
108 /* 108 /*
109 * This mapping is specific to the Broadband 109 * This mapping is specific to the Cell Broadband
110 * Engine. We might need to get the numbers 110 * Engine. We might need to get the numbers
111 * from the device tree to support future CPUs. 111 * from the device tree to support future CPUs.
112 */ 112 */
diff --git a/arch/ppc64/kernel/bpa_iic.h b/arch/powerpc/platforms/cell/interrupt.h
index 6833c3022166..37d58e6fd0c6 100644
--- a/arch/ppc64/kernel/bpa_iic.h
+++ b/arch/powerpc/platforms/cell/interrupt.h
@@ -1,5 +1,5 @@
1#ifndef ASM_BPA_IIC_H 1#ifndef ASM_CELL_PIC_H
2#define ASM_BPA_IIC_H 2#define ASM_CELL_PIC_H
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4/* 4/*
5 * Mapping of IIC pending bits into per-node 5 * Mapping of IIC pending bits into per-node
@@ -21,7 +21,7 @@
21 * + node number 21 * + node number
22 * * don't care 22 * * don't care
23 * 23 *
24 * A node consists of a Broadband Engine and an optional 24 * A node consists of a Cell Broadband Engine and an optional
25 * south bridge device providing a maximum of 64 IRQs. 25 * south bridge device providing a maximum of 64 IRQs.
26 * The south bridge may be connected to either IOIF0 26 * The south bridge may be connected to either IOIF0
27 * or IOIF1. 27 * or IOIF1.
@@ -59,4 +59,4 @@ extern void spider_init_IRQ(void);
59extern int spider_get_irq(unsigned long int_pending); 59extern int spider_get_irq(unsigned long int_pending);
60 60
61#endif 61#endif
62#endif /* ASM_BPA_IIC_H */ 62#endif /* ASM_CELL_PIC_H */
diff --git a/arch/ppc64/kernel/bpa_iommu.c b/arch/powerpc/platforms/cell/iommu.c
index da1b4b7a3269..74f999b4ac9e 100644
--- a/arch/ppc64/kernel/bpa_iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * IOMMU implementation for Broadband Processor Architecture 2 * IOMMU implementation for Cell Broadband Processor Architecture
3 * We just establish a linear mapping at boot by setting all the 3 * We just establish a linear mapping at boot by setting all the
4 * IOPT cache entries in the CPU. 4 * IOPT cache entries in the CPU.
5 * The mapping functions should be identical to pci_direct_iommu, 5 * The mapping functions should be identical to pci_direct_iommu,
@@ -41,7 +41,7 @@
41#include <asm/system.h> 41#include <asm/system.h>
42#include <asm/ppc-pci.h> 42#include <asm/ppc-pci.h>
43 43
44#include "bpa_iommu.h" 44#include "iommu.h"
45 45
46static inline unsigned long 46static inline unsigned long
47get_iopt_entry(unsigned long real_address, unsigned long ioid, 47get_iopt_entry(unsigned long real_address, unsigned long ioid,
@@ -276,7 +276,7 @@ static void iommu_dev_setup_null(struct pci_dev *d) { }
276 * for each DMA window used by any device. For now, we 276 * for each DMA window used by any device. For now, we
277 * happen to know that there is only one DMA window in use, 277 * happen to know that there is only one DMA window in use,
278 * starting at iopt_phys_offset. */ 278 * starting at iopt_phys_offset. */
279static void bpa_map_iommu(void) 279static void cell_map_iommu(void)
280{ 280{
281 unsigned long address; 281 unsigned long address;
282 void __iomem *base; 282 void __iomem *base;
@@ -309,7 +309,7 @@ static void bpa_map_iommu(void)
309} 309}
310 310
311 311
312static void *bpa_alloc_coherent(struct device *hwdev, size_t size, 312static void *cell_alloc_coherent(struct device *hwdev, size_t size,
313 dma_addr_t *dma_handle, gfp_t flag) 313 dma_addr_t *dma_handle, gfp_t flag)
314{ 314{
315 void *ret; 315 void *ret;
@@ -317,65 +317,65 @@ static void *bpa_alloc_coherent(struct device *hwdev, size_t size,
317 ret = (void *)__get_free_pages(flag, get_order(size)); 317 ret = (void *)__get_free_pages(flag, get_order(size));
318 if (ret != NULL) { 318 if (ret != NULL) {
319 memset(ret, 0, size); 319 memset(ret, 0, size);
320 *dma_handle = virt_to_abs(ret) | BPA_DMA_VALID; 320 *dma_handle = virt_to_abs(ret) | CELL_DMA_VALID;
321 } 321 }
322 return ret; 322 return ret;
323} 323}
324 324
325static void bpa_free_coherent(struct device *hwdev, size_t size, 325static void cell_free_coherent(struct device *hwdev, size_t size,
326 void *vaddr, dma_addr_t dma_handle) 326 void *vaddr, dma_addr_t dma_handle)
327{ 327{
328 free_pages((unsigned long)vaddr, get_order(size)); 328 free_pages((unsigned long)vaddr, get_order(size));
329} 329}
330 330
331static dma_addr_t bpa_map_single(struct device *hwdev, void *ptr, 331static dma_addr_t cell_map_single(struct device *hwdev, void *ptr,
332 size_t size, enum dma_data_direction direction) 332 size_t size, enum dma_data_direction direction)
333{ 333{
334 return virt_to_abs(ptr) | BPA_DMA_VALID; 334 return virt_to_abs(ptr) | CELL_DMA_VALID;
335} 335}
336 336
337static void bpa_unmap_single(struct device *hwdev, dma_addr_t dma_addr, 337static void cell_unmap_single(struct device *hwdev, dma_addr_t dma_addr,
338 size_t size, enum dma_data_direction direction) 338 size_t size, enum dma_data_direction direction)
339{ 339{
340} 340}
341 341
342static int bpa_map_sg(struct device *hwdev, struct scatterlist *sg, 342static int cell_map_sg(struct device *hwdev, struct scatterlist *sg,
343 int nents, enum dma_data_direction direction) 343 int nents, enum dma_data_direction direction)
344{ 344{
345 int i; 345 int i;
346 346
347 for (i = 0; i < nents; i++, sg++) { 347 for (i = 0; i < nents; i++, sg++) {
348 sg->dma_address = (page_to_phys(sg->page) + sg->offset) 348 sg->dma_address = (page_to_phys(sg->page) + sg->offset)
349 | BPA_DMA_VALID; 349 | CELL_DMA_VALID;
350 sg->dma_length = sg->length; 350 sg->dma_length = sg->length;
351 } 351 }
352 352
353 return nents; 353 return nents;
354} 354}
355 355
356static void bpa_unmap_sg(struct device *hwdev, struct scatterlist *sg, 356static void cell_unmap_sg(struct device *hwdev, struct scatterlist *sg,
357 int nents, enum dma_data_direction direction) 357 int nents, enum dma_data_direction direction)
358{ 358{
359} 359}
360 360
361static int bpa_dma_supported(struct device *dev, u64 mask) 361static int cell_dma_supported(struct device *dev, u64 mask)
362{ 362{
363 return mask < 0x100000000ull; 363 return mask < 0x100000000ull;
364} 364}
365 365
366void bpa_init_iommu(void) 366void cell_init_iommu(void)
367{ 367{
368 bpa_map_iommu(); 368 cell_map_iommu();
369 369
370 /* Direct I/O, IOMMU off */ 370 /* Direct I/O, IOMMU off */
371 ppc_md.iommu_dev_setup = iommu_dev_setup_null; 371 ppc_md.iommu_dev_setup = iommu_dev_setup_null;
372 ppc_md.iommu_bus_setup = iommu_bus_setup_null; 372 ppc_md.iommu_bus_setup = iommu_bus_setup_null;
373 373
374 pci_dma_ops.alloc_coherent = bpa_alloc_coherent; 374 pci_dma_ops.alloc_coherent = cell_alloc_coherent;
375 pci_dma_ops.free_coherent = bpa_free_coherent; 375 pci_dma_ops.free_coherent = cell_free_coherent;
376 pci_dma_ops.map_single = bpa_map_single; 376 pci_dma_ops.map_single = cell_map_single;
377 pci_dma_ops.unmap_single = bpa_unmap_single; 377 pci_dma_ops.unmap_single = cell_unmap_single;
378 pci_dma_ops.map_sg = bpa_map_sg; 378 pci_dma_ops.map_sg = cell_map_sg;
379 pci_dma_ops.unmap_sg = bpa_unmap_sg; 379 pci_dma_ops.unmap_sg = cell_unmap_sg;
380 pci_dma_ops.dma_supported = bpa_dma_supported; 380 pci_dma_ops.dma_supported = cell_dma_supported;
381} 381}
diff --git a/arch/ppc64/kernel/bpa_iommu.h b/arch/powerpc/platforms/cell/iommu.h
index e547d77dfa04..490d77abfe85 100644
--- a/arch/ppc64/kernel/bpa_iommu.h
+++ b/arch/powerpc/platforms/cell/iommu.h
@@ -1,5 +1,5 @@
1#ifndef BPA_IOMMU_H 1#ifndef CELL_IOMMU_H
2#define BPA_IOMMU_H 2#define CELL_IOMMU_H
3 3
4/* some constants */ 4/* some constants */
5enum { 5enum {
@@ -55,11 +55,11 @@ enum {
55 55
56 /* The high bit needs to be set on every DMA address, 56 /* The high bit needs to be set on every DMA address,
57 only 2GB are addressable */ 57 only 2GB are addressable */
58 BPA_DMA_VALID = 0x80000000, 58 CELL_DMA_VALID = 0x80000000,
59 BPA_DMA_MASK = 0x7fffffff, 59 CELL_DMA_MASK = 0x7fffffff,
60}; 60};
61 61
62 62
63void bpa_init_iommu(void); 63void cell_init_iommu(void);
64 64
65#endif 65#endif
diff --git a/arch/ppc64/kernel/bpa_setup.c b/arch/powerpc/platforms/cell/setup.c
index c2dc8f282eb8..9a495634d0c2 100644
--- a/arch/ppc64/kernel/bpa_setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -1,11 +1,11 @@
1/* 1/*
2 * linux/arch/ppc/kernel/bpa_setup.c 2 * linux/arch/powerpc/platforms/cell/cell_setup.c
3 * 3 *
4 * Copyright (C) 1995 Linus Torvalds 4 * Copyright (C) 1995 Linus Torvalds
5 * Adapted from 'alpha' version by Gary Thomas 5 * Adapted from 'alpha' version by Gary Thomas
6 * Modified by Cort Dougan (cort@cs.nmt.edu) 6 * Modified by Cort Dougan (cort@cs.nmt.edu)
7 * Modified by PPC64 Team, IBM Corp 7 * Modified by PPC64 Team, IBM Corp
8 * Modified by BPA Team, IBM Deutschland Entwicklung GmbH 8 * Modified by Cell Team, IBM Deutschland Entwicklung GmbH
9 * 9 *
10 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License 11 * modify it under the terms of the GNU General Public License
@@ -46,8 +46,8 @@
46#include <asm/ppc-pci.h> 46#include <asm/ppc-pci.h>
47#include <asm/irq.h> 47#include <asm/irq.h>
48 48
49#include "bpa_iic.h" 49#include "interrupt.h"
50#include "bpa_iommu.h" 50#include "iommu.h"
51 51
52#ifdef DEBUG 52#ifdef DEBUG
53#define DBG(fmt...) udbg_printf(fmt) 53#define DBG(fmt...) udbg_printf(fmt)
@@ -55,7 +55,7 @@
55#define DBG(fmt...) 55#define DBG(fmt...)
56#endif 56#endif
57 57
58void bpa_show_cpuinfo(struct seq_file *m) 58void cell_show_cpuinfo(struct seq_file *m)
59{ 59{
60 struct device_node *root; 60 struct device_node *root;
61 const char *model = ""; 61 const char *model = "";
@@ -63,22 +63,22 @@ void bpa_show_cpuinfo(struct seq_file *m)
63 root = of_find_node_by_path("/"); 63 root = of_find_node_by_path("/");
64 if (root) 64 if (root)
65 model = get_property(root, "model", NULL); 65 model = get_property(root, "model", NULL);
66 seq_printf(m, "machine\t\t: BPA %s\n", model); 66 seq_printf(m, "machine\t\t: CHRP %s\n", model);
67 of_node_put(root); 67 of_node_put(root);
68} 68}
69 69
70static void bpa_progress(char *s, unsigned short hex) 70static void cell_progress(char *s, unsigned short hex)
71{ 71{
72 printk("*** %04x : %s\n", hex, s ? s : ""); 72 printk("*** %04x : %s\n", hex, s ? s : "");
73} 73}
74 74
75static void __init bpa_setup_arch(void) 75static void __init cell_setup_arch(void)
76{ 76{
77 ppc_md.init_IRQ = iic_init_IRQ; 77 ppc_md.init_IRQ = iic_init_IRQ;
78 ppc_md.get_irq = iic_get_irq; 78 ppc_md.get_irq = iic_get_irq;
79 79
80#ifdef CONFIG_SMP 80#ifdef CONFIG_SMP
81 smp_init_pSeries(); 81 smp_init_cell();
82#endif 82#endif
83 83
84 /* init to some ~sane value until calibrate_delay() runs */ 84 /* init to some ~sane value until calibrate_delay() runs */
@@ -97,39 +97,39 @@ static void __init bpa_setup_arch(void)
97 conswitchp = &dummy_con; 97 conswitchp = &dummy_con;
98#endif 98#endif
99 99
100 bpa_nvram_init(); 100 mmio_nvram_init();
101} 101}
102 102
103/* 103/*
104 * Early initialization. Relocation is on but do not reference unbolted pages 104 * Early initialization. Relocation is on but do not reference unbolted pages
105 */ 105 */
106static void __init bpa_init_early(void) 106static void __init cell_init_early(void)
107{ 107{
108 DBG(" -> bpa_init_early()\n"); 108 DBG(" -> cell_init_early()\n");
109 109
110 hpte_init_native(); 110 hpte_init_native();
111 111
112 bpa_init_iommu(); 112 cell_init_iommu();
113 113
114 ppc64_interrupt_controller = IC_BPA_IIC; 114 ppc64_interrupt_controller = IC_CELL_PIC;
115 115
116 DBG(" <- bpa_init_early()\n"); 116 DBG(" <- cell_init_early()\n");
117} 117}
118 118
119 119
120static int __init bpa_probe(int platform) 120static int __init cell_probe(int platform)
121{ 121{
122 if (platform != PLATFORM_BPA) 122 if (platform != PLATFORM_CELL)
123 return 0; 123 return 0;
124 124
125 return 1; 125 return 1;
126} 126}
127 127
128struct machdep_calls __initdata bpa_md = { 128struct machdep_calls __initdata cell_md = {
129 .probe = bpa_probe, 129 .probe = cell_probe,
130 .setup_arch = bpa_setup_arch, 130 .setup_arch = cell_setup_arch,
131 .init_early = bpa_init_early, 131 .init_early = cell_init_early,
132 .show_cpuinfo = bpa_show_cpuinfo, 132 .show_cpuinfo = cell_show_cpuinfo,
133 .restart = rtas_restart, 133 .restart = rtas_restart,
134 .power_off = rtas_power_off, 134 .power_off = rtas_power_off,
135 .halt = rtas_halt, 135 .halt = rtas_halt,
@@ -137,5 +137,5 @@ struct machdep_calls __initdata bpa_md = {
137 .get_rtc_time = rtas_get_rtc_time, 137 .get_rtc_time = rtas_get_rtc_time,
138 .set_rtc_time = rtas_set_rtc_time, 138 .set_rtc_time = rtas_set_rtc_time,
139 .calibrate_decr = generic_calibrate_decr, 139 .calibrate_decr = generic_calibrate_decr,
140 .progress = bpa_progress, 140 .progress = cell_progress,
141}; 141};
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
new file mode 100644
index 000000000000..de96eadf419d
--- /dev/null
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -0,0 +1,230 @@
1/*
2 * SMP support for BPA machines.
3 *
4 * Dave Engebretsen, Peter Bergner, and
5 * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
6 *
7 * Plus various changes from other IBM teams...
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 */
14
15#undef DEBUG
16
17#include <linux/config.h>
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/sched.h>
21#include <linux/smp.h>
22#include <linux/interrupt.h>
23#include <linux/delay.h>
24#include <linux/init.h>
25#include <linux/spinlock.h>
26#include <linux/cache.h>
27#include <linux/err.h>
28#include <linux/sysdev.h>
29#include <linux/cpu.h>
30
31#include <asm/ptrace.h>
32#include <asm/atomic.h>
33#include <asm/irq.h>
34#include <asm/page.h>
35#include <asm/pgtable.h>
36#include <asm/io.h>
37#include <asm/prom.h>
38#include <asm/smp.h>
39#include <asm/paca.h>
40#include <asm/time.h>
41#include <asm/machdep.h>
42#include <asm/cputable.h>
43#include <asm/firmware.h>
44#include <asm/system.h>
45#include <asm/rtas.h>
46
47#include "interrupt.h"
48
49#ifdef DEBUG
50#define DBG(fmt...) udbg_printf(fmt)
51#else
52#define DBG(fmt...)
53#endif
54
55/*
56 * The primary thread of each non-boot processor is recorded here before
57 * smp init.
58 */
59static cpumask_t of_spin_map;
60
61extern void pSeries_secondary_smp_init(unsigned long);
62
63/**
64 * smp_startup_cpu() - start the given cpu
65 *
66 * At boot time, there is nothing to do for primary threads which were
67 * started from Open Firmware. For anything else, call RTAS with the
68 * appropriate start location.
69 *
70 * Returns:
71 * 0 - failure
72 * 1 - success
73 */
74static inline int __devinit smp_startup_cpu(unsigned int lcpu)
75{
76 int status;
77 unsigned long start_here = __pa((u32)*((unsigned long *)
78 pSeries_secondary_smp_init));
79 unsigned int pcpu;
80 int start_cpu;
81
82 if (cpu_isset(lcpu, of_spin_map))
83 /* Already started by OF and sitting in spin loop */
84 return 1;
85
86 pcpu = get_hard_smp_processor_id(lcpu);
87
88 /* Fixup atomic count: it exited inside IRQ handler. */
89 paca[lcpu].__current->thread_info->preempt_count = 0;
90
91 /*
92 * If the RTAS start-cpu token does not exist then presume the
93 * cpu is already spinning.
94 */
95 start_cpu = rtas_token("start-cpu");
96 if (start_cpu == RTAS_UNKNOWN_SERVICE)
97 return 1;
98
99 status = rtas_call(start_cpu, 3, 1, NULL, pcpu, start_here, lcpu);
100 if (status != 0) {
101 printk(KERN_ERR "start-cpu failed: %i\n", status);
102 return 0;
103 }
104
105 return 1;
106}
107
108static void smp_iic_message_pass(int target, int msg)
109{
110 unsigned int i;
111
112 if (target < NR_CPUS) {
113 iic_cause_IPI(target, msg);
114 } else {
115 for_each_online_cpu(i) {
116 if (target == MSG_ALL_BUT_SELF
117 && i == smp_processor_id())
118 continue;
119 iic_cause_IPI(i, msg);
120 }
121 }
122}
123
124static int __init smp_iic_probe(void)
125{
126 iic_request_IPIs();
127
128 return cpus_weight(cpu_possible_map);
129}
130
131static void __devinit smp_iic_setup_cpu(int cpu)
132{
133 if (cpu != boot_cpuid)
134 iic_setup_cpu();
135}
136
137static DEFINE_SPINLOCK(timebase_lock);
138static unsigned long timebase = 0;
139
140static void __devinit cell_give_timebase(void)
141{
142 spin_lock(&timebase_lock);
143 rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL);
144 timebase = get_tb();
145 spin_unlock(&timebase_lock);
146
147 while (timebase)
148 barrier();
149 rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL);
150}
151
152static void __devinit cell_take_timebase(void)
153{
154 while (!timebase)
155 barrier();
156 spin_lock(&timebase_lock);
157 set_tb(timebase >> 32, timebase & 0xffffffff);
158 timebase = 0;
159 spin_unlock(&timebase_lock);
160}
161
162static void __devinit smp_cell_kick_cpu(int nr)
163{
164 BUG_ON(nr < 0 || nr >= NR_CPUS);
165
166 if (!smp_startup_cpu(nr))
167 return;
168
169 /*
170 * The processor is currently spinning, waiting for the
171 * cpu_start field to become non-zero After we set cpu_start,
172 * the processor will continue on to secondary_start
173 */
174 paca[nr].cpu_start = 1;
175}
176
177static int smp_cell_cpu_bootable(unsigned int nr)
178{
179 /* Special case - we inhibit secondary thread startup
180 * during boot if the user requests it. Odd-numbered
181 * cpus are assumed to be secondary threads.
182 */
183 if (system_state < SYSTEM_RUNNING &&
184 cpu_has_feature(CPU_FTR_SMT) &&
185 !smt_enabled_at_boot && nr % 2 != 0)
186 return 0;
187
188 return 1;
189}
190static struct smp_ops_t bpa_iic_smp_ops = {
191 .message_pass = smp_iic_message_pass,
192 .probe = smp_iic_probe,
193 .kick_cpu = smp_cell_kick_cpu,
194 .setup_cpu = smp_iic_setup_cpu,
195 .cpu_bootable = smp_cell_cpu_bootable,
196};
197
198/* This is called very early */
199void __init smp_init_cell(void)
200{
201 int i;
202
203 DBG(" -> smp_init_cell()\n");
204
205 smp_ops = &bpa_iic_smp_ops;
206
207 /* Mark threads which are still spinning in hold loops. */
208 if (cpu_has_feature(CPU_FTR_SMT)) {
209 for_each_present_cpu(i) {
210 if (i % 2 == 0)
211 /*
212 * Even-numbered logical cpus correspond to
213 * primary threads.
214 */
215 cpu_set(i, of_spin_map);
216 }
217 } else {
218 of_spin_map = cpu_present_map;
219 }
220
221 cpu_clear(boot_cpuid, of_spin_map);
222
223 /* Non-lpar has additional take/give timebase */
224 if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) {
225 smp_ops->give_timebase = cell_give_timebase;
226 smp_ops->take_timebase = cell_take_timebase;
227 }
228
229 DBG(" <- smp_init_cell()\n");
230}
diff --git a/arch/ppc64/kernel/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index d5c9a02fb119..e74132188bdf 100644
--- a/arch/ppc64/kernel/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -27,7 +27,7 @@
27#include <asm/prom.h> 27#include <asm/prom.h>
28#include <asm/io.h> 28#include <asm/io.h>
29 29
30#include "bpa_iic.h" 30#include "interrupt.h"
31 31
32/* register layout taken from Spider spec, table 7.4-4 */ 32/* register layout taken from Spider spec, table 7.4-4 */
33enum { 33enum {
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c
index 4ac7125aa09c..150f67d6f90c 100644
--- a/arch/powerpc/platforms/chrp/nvram.c
+++ b/arch/powerpc/platforms/chrp/nvram.c
@@ -17,6 +17,7 @@
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
19#include <asm/machdep.h> 19#include <asm/machdep.h>
20#include <asm/rtas.h>
20#include "chrp.h" 21#include "chrp.h"
21 22
22static unsigned int nvram_size; 23static unsigned int nvram_size;
@@ -25,7 +26,8 @@ static DEFINE_SPINLOCK(nvram_lock);
25 26
26static unsigned char chrp_nvram_read(int addr) 27static unsigned char chrp_nvram_read(int addr)
27{ 28{
28 unsigned long done, flags; 29 unsigned int done;
30 unsigned long flags;
29 unsigned char ret; 31 unsigned char ret;
30 32
31 if (addr >= nvram_size) { 33 if (addr >= nvram_size) {
@@ -34,7 +36,8 @@ static unsigned char chrp_nvram_read(int addr)
34 return 0xff; 36 return 0xff;
35 } 37 }
36 spin_lock_irqsave(&nvram_lock, flags); 38 spin_lock_irqsave(&nvram_lock, flags);
37 if ((call_rtas("nvram-fetch", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) 39 if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr,
40 __pa(nvram_buf), 1) != 0) || 1 != done)
38 ret = 0xff; 41 ret = 0xff;
39 else 42 else
40 ret = nvram_buf[0]; 43 ret = nvram_buf[0];
@@ -45,7 +48,8 @@ static unsigned char chrp_nvram_read(int addr)
45 48
46static void chrp_nvram_write(int addr, unsigned char val) 49static void chrp_nvram_write(int addr, unsigned char val)
47{ 50{
48 unsigned long done, flags; 51 unsigned int done;
52 unsigned long flags;
49 53
50 if (addr >= nvram_size) { 54 if (addr >= nvram_size) {
51 printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n", 55 printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n",
@@ -54,7 +58,8 @@ static void chrp_nvram_write(int addr, unsigned char val)
54 } 58 }
55 spin_lock_irqsave(&nvram_lock, flags); 59 spin_lock_irqsave(&nvram_lock, flags);
56 nvram_buf[0] = val; 60 nvram_buf[0] = val;
57 if ((call_rtas("nvram-store", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) 61 if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr,
62 __pa(nvram_buf), 1) != 0) || 1 != done)
58 printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr); 63 printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr);
59 spin_unlock_irqrestore(&nvram_lock, flags); 64 spin_unlock_irqrestore(&nvram_lock, flags);
60} 65}
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index a9052305c35d..29c86781c493 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/ioport.h> 15#include <linux/ioport.h>
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/platform_device.h>
17#include <linux/mv643xx.h> 18#include <linux/mv643xx.h>
18#include <linux/pci.h> 19#include <linux/pci.h>
19 20
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index 31ee49c25014..bb2315997d45 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -35,43 +35,6 @@
35#include <asm/smp.h> 35#include <asm/smp.h>
36#include <asm/mpic.h> 36#include <asm/mpic.h>
37 37
38extern unsigned long smp_chrp_cpu_nr;
39
40static int __init smp_chrp_probe(void)
41{
42 struct device_node *cpus = NULL;
43 unsigned int *reg;
44 int reglen;
45 int ncpus = 0;
46 int cpuid;
47 unsigned int phys;
48
49 /* Count CPUs in the device-tree */
50 cpuid = 1; /* the boot cpu is logical cpu 0 */
51 while ((cpus = of_find_node_by_type(cpus, "cpu")) != NULL) {
52 phys = ncpus;
53 reg = (unsigned int *) get_property(cpus, "reg", &reglen);
54 if (reg && reglen >= sizeof(unsigned int))
55 /* hmmm, not having a reg property would be bad */
56 phys = *reg;
57 if (phys != boot_cpuid_phys) {
58 set_hard_smp_processor_id(cpuid, phys);
59 ++cpuid;
60 }
61 ++ncpus;
62 }
63
64 printk(KERN_INFO "CHRP SMP probe found %d cpus\n", ncpus);
65
66 /* Nothing more to do if less than 2 of them */
67 if (ncpus <= 1)
68 return 1;
69
70 mpic_request_ipis();
71
72 return ncpus;
73}
74
75static void __devinit smp_chrp_kick_cpu(int nr) 38static void __devinit smp_chrp_kick_cpu(int nr)
76{ 39{
77 *(unsigned long *)KERNELBASE = nr; 40 *(unsigned long *)KERNELBASE = nr;
@@ -114,7 +77,7 @@ void __devinit smp_chrp_take_timebase(void)
114/* CHRP with openpic */ 77/* CHRP with openpic */
115struct smp_ops_t chrp_smp_ops = { 78struct smp_ops_t chrp_smp_ops = {
116 .message_pass = smp_mpic_message_pass, 79 .message_pass = smp_mpic_message_pass,
117 .probe = smp_chrp_probe, 80 .probe = smp_mpic_probe,
118 .kick_cpu = smp_chrp_kick_cpu, 81 .kick_cpu = smp_chrp_kick_cpu,
119 .setup_cpu = smp_chrp_setup_cpu, 82 .setup_cpu = smp_chrp_setup_cpu,
120 .give_timebase = smp_chrp_give_timebase, 83 .give_timebase = smp_chrp_give_timebase,
diff --git a/arch/powerpc/platforms/iseries/call_hpt.h b/arch/powerpc/platforms/iseries/call_hpt.h
index 321f3bb7a8f5..a843b0f87b72 100644
--- a/arch/powerpc/platforms/iseries/call_hpt.h
+++ b/arch/powerpc/platforms/iseries/call_hpt.h
@@ -23,8 +23,8 @@
23 * drive the hypervisor from the OS. 23 * drive the hypervisor from the OS.
24 */ 24 */
25 25
26#include <asm/iSeries/HvCallSc.h> 26#include <asm/iseries/hv_call_sc.h>
27#include <asm/iSeries/HvTypes.h> 27#include <asm/iseries/hv_types.h>
28#include <asm/mmu.h> 28#include <asm/mmu.h>
29 29
30#define HvCallHptGetHptAddress HvCallHpt + 0 30#define HvCallHptGetHptAddress HvCallHpt + 0
diff --git a/arch/powerpc/platforms/iseries/call_pci.h b/arch/powerpc/platforms/iseries/call_pci.h
index a86e065b9577..59d4e0ad5cf3 100644
--- a/arch/powerpc/platforms/iseries/call_pci.h
+++ b/arch/powerpc/platforms/iseries/call_pci.h
@@ -25,8 +25,8 @@
25#ifndef _PLATFORMS_ISERIES_CALL_PCI_H 25#ifndef _PLATFORMS_ISERIES_CALL_PCI_H
26#define _PLATFORMS_ISERIES_CALL_PCI_H 26#define _PLATFORMS_ISERIES_CALL_PCI_H
27 27
28#include <asm/iSeries/HvCallSc.h> 28#include <asm/iseries/hv_call_sc.h>
29#include <asm/iSeries/HvTypes.h> 29#include <asm/iseries/hv_types.h>
30 30
31/* 31/*
32 * DSA == Direct Select Address 32 * DSA == Direct Select Address
diff --git a/arch/powerpc/platforms/iseries/call_sm.h b/arch/powerpc/platforms/iseries/call_sm.h
index ef223166cf22..c7e251619f48 100644
--- a/arch/powerpc/platforms/iseries/call_sm.h
+++ b/arch/powerpc/platforms/iseries/call_sm.h
@@ -23,8 +23,8 @@
23 * drive the hypervisor from the OS. 23 * drive the hypervisor from the OS.
24 */ 24 */
25 25
26#include <asm/iSeries/HvCallSc.h> 26#include <asm/iseries/hv_call_sc.h>
27#include <asm/iSeries/HvTypes.h> 27#include <asm/iseries/hv_types.h>
28 28
29#define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 29#define HvCallSmGet64BitsOfAccessMap HvCallSm + 11
30 30
diff --git a/arch/powerpc/platforms/iseries/hvlog.c b/arch/powerpc/platforms/iseries/hvlog.c
index f61e2e9ac9ec..62ec73479687 100644
--- a/arch/powerpc/platforms/iseries/hvlog.c
+++ b/arch/powerpc/platforms/iseries/hvlog.c
@@ -9,9 +9,9 @@
9 9
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/abs_addr.h> 11#include <asm/abs_addr.h>
12#include <asm/iSeries/HvCall.h> 12#include <asm/iseries/hv_call.h>
13#include <asm/iSeries/HvCallSc.h> 13#include <asm/iseries/hv_call_sc.h>
14#include <asm/iSeries/HvTypes.h> 14#include <asm/iseries/hv_types.h>
15 15
16 16
17void HvCall_writeLogBuffer(const void *buffer, u64 len) 17void HvCall_writeLogBuffer(const void *buffer, u64 len)
diff --git a/arch/powerpc/platforms/iseries/hvlpconfig.c b/arch/powerpc/platforms/iseries/hvlpconfig.c
index dc28621aea0d..663a1affb4bb 100644
--- a/arch/powerpc/platforms/iseries/hvlpconfig.c
+++ b/arch/powerpc/platforms/iseries/hvlpconfig.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/iSeries/HvLpConfig.h> 20#include <asm/iseries/hv_lp_config.h>
21 21
22HvLpIndex HvLpConfig_getLpIndex_outline(void) 22HvLpIndex HvLpConfig_getLpIndex_outline(void)
23{ 23{
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 1db26d8be640..1a6845b5c5a4 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -32,7 +32,7 @@
32#include <asm/machdep.h> 32#include <asm/machdep.h>
33#include <asm/abs_addr.h> 33#include <asm/abs_addr.h>
34#include <asm/pci-bridge.h> 34#include <asm/pci-bridge.h>
35#include <asm/iSeries/HvCallXm.h> 35#include <asm/iseries/hv_call_xm.h>
36 36
37extern struct list_head iSeries_Global_Device_List; 37extern struct list_head iSeries_Global_Device_List;
38 38
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index 937ac99b9d33..c1135912cc05 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -36,9 +36,9 @@
36#include <linux/spinlock.h> 36#include <linux/spinlock.h>
37 37
38#include <asm/ppcdebug.h> 38#include <asm/ppcdebug.h>
39#include <asm/iSeries/HvTypes.h> 39#include <asm/iseries/hv_types.h>
40#include <asm/iSeries/HvLpEvent.h> 40#include <asm/iseries/hv_lp_event.h>
41#include <asm/iSeries/HvCallXm.h> 41#include <asm/iseries/hv_call_xm.h>
42 42
43#include "irq.h" 43#include "irq.h"
44#include "call_pci.h" 44#include "call_pci.h"
diff --git a/arch/powerpc/platforms/iseries/ksyms.c b/arch/powerpc/platforms/iseries/ksyms.c
index f271b3539721..a2200842f4e5 100644
--- a/arch/powerpc/platforms/iseries/ksyms.c
+++ b/arch/powerpc/platforms/iseries/ksyms.c
@@ -9,7 +9,7 @@
9#include <linux/module.h> 9#include <linux/module.h>
10 10
11#include <asm/hw_irq.h> 11#include <asm/hw_irq.h>
12#include <asm/iSeries/HvCallSc.h> 12#include <asm/iseries/hv_call_sc.h>
13 13
14EXPORT_SYMBOL(HvCall0); 14EXPORT_SYMBOL(HvCall0);
15EXPORT_SYMBOL(HvCall1); 15EXPORT_SYMBOL(HvCall1);
diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c
index ed2ffee6f731..bb8c91537f35 100644
--- a/arch/powerpc/platforms/iseries/lpardata.c
+++ b/arch/powerpc/platforms/iseries/lpardata.c
@@ -13,16 +13,16 @@
13#include <linux/bitops.h> 13#include <linux/bitops.h>
14#include <asm/processor.h> 14#include <asm/processor.h>
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16#include <asm/naca.h>
17#include <asm/abs_addr.h> 16#include <asm/abs_addr.h>
18#include <asm/iSeries/ItLpNaca.h> 17#include <asm/iseries/it_lp_naca.h>
19#include <asm/lppaca.h> 18#include <asm/lppaca.h>
20#include <asm/iSeries/ItLpRegSave.h> 19#include <asm/iseries/it_lp_reg_save.h>
21#include <asm/paca.h> 20#include <asm/paca.h>
22#include <asm/iSeries/LparMap.h> 21#include <asm/iseries/lpar_map.h>
23#include <asm/iSeries/ItExtVpdPanel.h> 22#include <asm/iseries/it_exp_vpd_panel.h>
24#include <asm/iSeries/ItLpQueue.h> 23#include <asm/iseries/it_lp_queue.h>
25 24
25#include "naca.h"
26#include "vpd_areas.h" 26#include "vpd_areas.h"
27#include "spcomm_area.h" 27#include "spcomm_area.h"
28#include "ipl_parms.h" 28#include "ipl_parms.h"
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index 54c7753dbe05..e9fb98bf895f 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -17,10 +17,10 @@
17 17
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/paca.h> 19#include <asm/paca.h>
20#include <asm/iSeries/ItLpQueue.h> 20#include <asm/iseries/it_lp_queue.h>
21#include <asm/iSeries/HvLpEvent.h> 21#include <asm/iseries/hv_lp_event.h>
22#include <asm/iSeries/HvCallEvent.h> 22#include <asm/iseries/hv_call_event.h>
23#include <asm/iSeries/ItLpNaca.h> 23#include <asm/iseries/it_lp_naca.h>
24 24
25/* 25/*
26 * The LpQueue is used to pass event data from the hypervisor to 26 * The LpQueue is used to pass event data from the hypervisor to
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index e5de31aa0015..49e7e4b85847 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -38,10 +38,10 @@
38#include <asm/uaccess.h> 38#include <asm/uaccess.h>
39#include <asm/paca.h> 39#include <asm/paca.h>
40#include <asm/abs_addr.h> 40#include <asm/abs_addr.h>
41#include <asm/iSeries/vio.h> 41#include <asm/iseries/vio.h>
42#include <asm/iSeries/mf.h> 42#include <asm/iseries/mf.h>
43#include <asm/iSeries/HvLpConfig.h> 43#include <asm/iseries/hv_lp_config.h>
44#include <asm/iSeries/ItLpQueue.h> 44#include <asm/iseries/it_lp_queue.h>
45 45
46#include "setup.h" 46#include "setup.h"
47 47
diff --git a/include/asm-ppc64/naca.h b/arch/powerpc/platforms/iseries/naca.h
index d2afe6447597..ab2372eb8d2e 100644
--- a/include/asm-ppc64/naca.h
+++ b/arch/powerpc/platforms/iseries/naca.h
@@ -1,7 +1,7 @@
1#ifndef _NACA_H 1#ifndef _PLATFORMS_ISERIES_NACA_H
2#define _NACA_H 2#define _PLATFORMS_ISERIES_NACA_H
3 3
4/* 4/*
5 * c 2001 PPC 64 Team, IBM Corp 5 * c 2001 PPC 64 Team, IBM Corp
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
@@ -21,4 +21,4 @@ struct naca_struct {
21 21
22extern struct naca_struct naca; 22extern struct naca_struct naca;
23 23
24#endif /* _NACA_H */ 24#endif /* _PLATFORMS_ISERIES_NACA_H */
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 959e59fd9c11..7d7d5884343f 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -36,8 +36,8 @@
36#include <asm/iommu.h> 36#include <asm/iommu.h>
37#include <asm/abs_addr.h> 37#include <asm/abs_addr.h>
38 38
39#include <asm/iSeries/HvCallXm.h> 39#include <asm/iseries/hv_call_xm.h>
40#include <asm/iSeries/mf.h> 40#include <asm/iseries/mf.h>
41 41
42#include <asm/ppc-pci.h> 42#include <asm/ppc-pci.h>
43 43
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index 6f1929cac66b..e68b6b5fa89f 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -24,8 +24,8 @@
24#include <asm/processor.h> 24#include <asm/processor.h>
25#include <asm/time.h> 25#include <asm/time.h>
26#include <asm/lppaca.h> 26#include <asm/lppaca.h>
27#include <asm/iSeries/ItLpQueue.h> 27#include <asm/iseries/it_lp_queue.h>
28#include <asm/iSeries/HvCallXm.h> 28#include <asm/iseries/hv_call_xm.h>
29 29
30#include "processor_vpd.h" 30#include "processor_vpd.h"
31#include "main_store.h" 31#include "main_store.h"
diff --git a/arch/powerpc/platforms/iseries/release_data.h b/arch/powerpc/platforms/iseries/release_data.h
index c68b9c3e5caf..66189fd2e32d 100644
--- a/arch/powerpc/platforms/iseries/release_data.h
+++ b/arch/powerpc/platforms/iseries/release_data.h
@@ -24,7 +24,7 @@
24 * address of the OS's NACA). 24 * address of the OS's NACA).
25 */ 25 */
26#include <asm/types.h> 26#include <asm/types.h>
27#include <asm/naca.h> 27#include "naca.h"
28 28
29/* 29/*
30 * When we IPL a secondary partition, we will check if if the 30 * When we IPL a secondary partition, we will check if if the
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 1544c6f10a38..fda712b42168 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -27,6 +27,7 @@
27#include <linux/kdev_t.h> 27#include <linux/kdev_t.h>
28#include <linux/major.h> 28#include <linux/major.h>
29#include <linux/root_dev.h> 29#include <linux/root_dev.h>
30#include <linux/kernel.h>
30 31
31#include <asm/processor.h> 32#include <asm/processor.h>
32#include <asm/machdep.h> 33#include <asm/machdep.h>
@@ -40,19 +41,19 @@
40#include <asm/firmware.h> 41#include <asm/firmware.h>
41 42
42#include <asm/time.h> 43#include <asm/time.h>
43#include <asm/naca.h>
44#include <asm/paca.h> 44#include <asm/paca.h>
45#include <asm/cache.h> 45#include <asm/cache.h>
46#include <asm/sections.h> 46#include <asm/sections.h>
47#include <asm/abs_addr.h> 47#include <asm/abs_addr.h>
48#include <asm/iSeries/HvLpConfig.h> 48#include <asm/iseries/hv_lp_config.h>
49#include <asm/iSeries/HvCallEvent.h> 49#include <asm/iseries/hv_call_event.h>
50#include <asm/iSeries/HvCallXm.h> 50#include <asm/iseries/hv_call_xm.h>
51#include <asm/iSeries/ItLpQueue.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/HvLpEvent.h> 53#include <asm/iseries/hv_lp_event.h>
54#include <asm/iSeries/LparMap.h> 54#include <asm/iseries/lpar_map.h>
55 55
56#include "naca.h"
56#include "setup.h" 57#include "setup.h"
57#include "irq.h" 58#include "irq.h"
58#include "vpd_areas.h" 59#include "vpd_areas.h"
@@ -94,6 +95,8 @@ extern unsigned long iSeries_recal_titan;
94 95
95static int mf_initialized; 96static int mf_initialized;
96 97
98static unsigned long cmd_mem_limit;
99
97struct MemoryBlock { 100struct MemoryBlock {
98 unsigned long absStart; 101 unsigned long absStart;
99 unsigned long absEnd; 102 unsigned long absEnd;
@@ -341,23 +344,6 @@ static void __init iSeries_init_early(void)
341 */ 344 */
342 iommu_init_early_iSeries(); 345 iommu_init_early_iSeries();
343 346
344 iSeries_get_cmdline();
345
346 /* Save unparsed command line copy for /proc/cmdline */
347 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
348
349 /* Parse early parameters, in particular mem=x */
350 parse_early_param();
351
352 if (memory_limit) {
353 if (memory_limit < systemcfg->physicalMemorySize)
354 systemcfg->physicalMemorySize = memory_limit;
355 else {
356 printk("Ignoring mem=%lu >= ram_top.\n", memory_limit);
357 memory_limit = 0;
358 }
359 }
360
361 /* Initialize machine-dependency vectors */ 347 /* Initialize machine-dependency vectors */
362#ifdef CONFIG_SMP 348#ifdef CONFIG_SMP
363 smp_init_iSeries(); 349 smp_init_iSeries();
@@ -971,6 +957,8 @@ void build_flat_dt(struct iseries_flat_dt *dt)
971 /* /chosen */ 957 /* /chosen */
972 dt_start_node(dt, "chosen"); 958 dt_start_node(dt, "chosen");
973 dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); 959 dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR);
960 if (cmd_mem_limit)
961 dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit);
974 dt_end_node(dt); 962 dt_end_node(dt);
975 963
976 dt_cpus(dt); 964 dt_cpus(dt);
@@ -990,7 +978,27 @@ void * __init iSeries_early_setup(void)
990 */ 978 */
991 build_iSeries_Memory_Map(); 979 build_iSeries_Memory_Map();
992 980
981 iSeries_get_cmdline();
982
983 /* Save unparsed command line copy for /proc/cmdline */
984 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
985
986 /* Parse early parameters, in particular mem=x */
987 parse_early_param();
988
993 build_flat_dt(&iseries_dt); 989 build_flat_dt(&iseries_dt);
994 990
995 return (void *) __pa(&iseries_dt); 991 return (void *) __pa(&iseries_dt);
996} 992}
993
994/*
995 * On iSeries we just parse the mem=X option from the command line.
996 * On pSeries it's a bit more complicated, see prom_init_mem()
997 */
998static int __init early_parsemem(char *p)
999{
1000 if (p)
1001 cmd_mem_limit = ALIGN(memparse(p, &p), PAGE_SIZE);
1002 return 0;
1003}
1004early_param("mem", early_parsemem);
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c
index f720916682f6..3336bad67724 100644
--- a/arch/powerpc/platforms/iseries/smp.c
+++ b/arch/powerpc/platforms/iseries/smp.c
@@ -38,7 +38,7 @@
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/smp.h> 39#include <asm/smp.h>
40#include <asm/paca.h> 40#include <asm/paca.h>
41#include <asm/iSeries/HvCall.h> 41#include <asm/iseries/hv_call.h>
42#include <asm/time.h> 42#include <asm/time.h>
43#include <asm/ppcdebug.h> 43#include <asm/ppcdebug.h>
44#include <asm/machdep.h> 44#include <asm/machdep.h>
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c
index c0f7d2e9153f..c27a66876c2c 100644
--- a/arch/powerpc/platforms/iseries/vio.c
+++ b/arch/powerpc/platforms/iseries/vio.c
@@ -17,10 +17,10 @@
17#include <asm/tce.h> 17#include <asm/tce.h>
18#include <asm/abs_addr.h> 18#include <asm/abs_addr.h>
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/iSeries/vio.h> 20#include <asm/iseries/vio.h>
21#include <asm/iSeries/HvTypes.h> 21#include <asm/iseries/hv_types.h>
22#include <asm/iSeries/HvLpConfig.h> 22#include <asm/iseries/hv_lp_config.h>
23#include <asm/iSeries/HvCallXm.h> 23#include <asm/iseries/hv_call_xm.h>
24 24
25struct device *iSeries_vio_dev = &vio_bus_device.dev; 25struct device *iSeries_vio_dev = &vio_bus_device.dev;
26EXPORT_SYMBOL(iSeries_vio_dev); 26EXPORT_SYMBOL(iSeries_vio_dev);
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index c0c767bd37f1..fe97bfbf7463 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -41,12 +41,12 @@
41 41
42#include <asm/system.h> 42#include <asm/system.h>
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44#include <asm/iSeries/HvTypes.h> 44#include <asm/iseries/hv_types.h>
45#include <asm/iSeries/ItExtVpdPanel.h> 45#include <asm/iseries/it_exp_vpd_panel.h>
46#include <asm/iSeries/HvLpEvent.h> 46#include <asm/iseries/hv_lp_event.h>
47#include <asm/iSeries/HvLpConfig.h> 47#include <asm/iseries/hv_lp_config.h>
48#include <asm/iSeries/mf.h> 48#include <asm/iseries/mf.h>
49#include <asm/iSeries/vio.h> 49#include <asm/iseries/vio.h>
50 50
51/* Status of the path to each other partition in the system. 51/* Status of the path to each other partition in the system.
52 * This is overkill, since we will only ever establish connections 52 * This is overkill, since we will only ever establish connections
diff --git a/arch/powerpc/platforms/iseries/vpdinfo.c b/arch/powerpc/platforms/iseries/vpdinfo.c
index 9c318849dee7..23a6d1e5b429 100644
--- a/arch/powerpc/platforms/iseries/vpdinfo.c
+++ b/arch/powerpc/platforms/iseries/vpdinfo.c
@@ -32,7 +32,7 @@
32#include <asm/resource.h> 32#include <asm/resource.h>
33#include <asm/abs_addr.h> 33#include <asm/abs_addr.h>
34#include <asm/pci-bridge.h> 34#include <asm/pci-bridge.h>
35#include <asm/iSeries/HvTypes.h> 35#include <asm/iseries/hv_types.h>
36 36
37#include "pci.h" 37#include "pci.h"
38#include "call_pci.h" 38#include "call_pci.h"
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 0037a8c8c81f..83a49e80ac29 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -576,7 +576,7 @@ void __init pmac_pic_init(void)
576#endif /* CONFIG_PPC32 */ 576#endif /* CONFIG_PPC32 */
577} 577}
578 578
579#ifdef CONFIG_PM 579#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
580/* 580/*
581 * These procedures are used in implementing sleep on the powerbooks. 581 * These procedures are used in implementing sleep on the powerbooks.
582 * sleep_save_intrs() saves the states of all interrupt enables 582 * sleep_save_intrs() saves the states of all interrupt enables
@@ -643,7 +643,7 @@ static int pmacpic_resume(struct sys_device *sysdev)
643 return 0; 643 return 0;
644} 644}
645 645
646#endif /* CONFIG_PM */ 646#endif /* CONFIG_PM && CONFIG_PPC32 */
647 647
648static struct sysdev_class pmacpic_sysclass = { 648static struct sysdev_class pmacpic_sysclass = {
649 set_kset_name("pmac_pic"), 649 set_kset_name("pmac_pic"),
@@ -655,10 +655,10 @@ static struct sys_device device_pmacpic = {
655}; 655};
656 656
657static struct sysdev_driver driver_pmacpic = { 657static struct sysdev_driver driver_pmacpic = {
658#ifdef CONFIG_PM 658#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
659 .suspend = &pmacpic_suspend, 659 .suspend = &pmacpic_suspend,
660 .resume = &pmacpic_resume, 660 .resume = &pmacpic_resume,
661#endif /* CONFIG_PM */ 661#endif /* CONFIG_PM && CONFIG_PPC32 */
662}; 662};
663 663
664static int __init init_pmacpic_sysfs(void) 664static int __init init_pmacpic_sysfs(void)
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 6f62af597291..80b58c1ec412 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -75,6 +75,7 @@
75#include <asm/smu.h> 75#include <asm/smu.h>
76#include <asm/pmc.h> 76#include <asm/pmc.h>
77#include <asm/mpic.h> 77#include <asm/mpic.h>
78#include <asm/lmb.h>
78 79
79#include "pmac.h" 80#include "pmac.h"
80 81
@@ -350,7 +351,7 @@ void __init pmac_setup_arch(void)
350 find_via_pmu(); 351 find_via_pmu();
351 smu_init(); 352 smu_init();
352 353
353#ifdef CONFIG_NVRAM 354#if defined(CONFIG_NVRAM) || defined(CONFIG_PPC64)
354 pmac_nvram_init(); 355 pmac_nvram_init();
355#endif 356#endif
356 357
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 2d57f588151d..e3fc3407bb1f 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -21,15 +21,6 @@ config EEH
21 depends on PPC_PSERIES 21 depends on PPC_PSERIES
22 default y if !EMBEDDED 22 default y if !EMBEDDED
23 23
24config RTAS_PROC
25 bool "Proc interface to RTAS"
26 depends on PPC_RTAS
27 default y
28
29config RTAS_FLASH
30 tristate "Firmware flash interface"
31 depends on PPC64 && RTAS_PROC
32
33config SCANLOG 24config SCANLOG
34 tristate "Scanlog dump interface" 25 tristate "Scanlog dump interface"
35 depends on RTAS_PROC && PPC_PSERIES 26 depends on RTAS_PROC && PPC_PSERIES
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 5ef494e3a70f..b9938fece781 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -1,5 +1,5 @@
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 rtas-fw.o ras.o 2 setup.o iommu.o ras.o rtasd.o
3obj-$(CONFIG_SMP) += smp.o 3obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_IBMVIO) += vio.o 4obj-$(CONFIG_IBMVIO) += vio.o
5obj-$(CONFIG_XICS) += xics.o 5obj-$(CONFIG_XICS) += xics.o
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9e90d41131d8..513e27231493 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -42,13 +42,14 @@
42#include <asm/pci-bridge.h> 42#include <asm/pci-bridge.h>
43#include <asm/machdep.h> 43#include <asm/machdep.h>
44#include <asm/abs_addr.h> 44#include <asm/abs_addr.h>
45#include <asm/plpar_wrappers.h>
46#include <asm/pSeries_reconfig.h> 45#include <asm/pSeries_reconfig.h>
47#include <asm/systemcfg.h> 46#include <asm/systemcfg.h>
48#include <asm/firmware.h> 47#include <asm/firmware.h>
49#include <asm/tce.h> 48#include <asm/tce.h>
50#include <asm/ppc-pci.h> 49#include <asm/ppc-pci.h>
51 50
51#include "plpar_wrappers.h"
52
52#define DBG(fmt...) 53#define DBG(fmt...)
53 54
54extern int is_python(struct device_node *); 55extern int is_python(struct device_node *);
@@ -498,7 +499,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
498 499
499 switch (action) { 500 switch (action) {
500 case PSERIES_RECONFIG_REMOVE: 501 case PSERIES_RECONFIG_REMOVE:
501 if (pci->iommu_table && 502 if (pci && pci->iommu_table &&
502 get_property(np, "ibm,dma-window", NULL)) 503 get_property(np, "ibm,dma-window", NULL))
503 iommu_free_table(np); 504 iommu_free_table(np);
504 break; 505 break;
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 268d8362dde7..e384a5a91796 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -38,7 +38,8 @@
38#include <asm/prom.h> 38#include <asm/prom.h>
39#include <asm/abs_addr.h> 39#include <asm/abs_addr.h>
40#include <asm/cputable.h> 40#include <asm/cputable.h>
41#include <asm/plpar_wrappers.h> 41
42#include "plpar_wrappers.h"
42 43
43#ifdef DEBUG 44#ifdef DEBUG
44#define DBG(fmt...) udbg_printf(fmt) 45#define DBG(fmt...) udbg_printf(fmt)
@@ -260,22 +261,18 @@ out:
260void vpa_init(int cpu) 261void vpa_init(int cpu)
261{ 262{
262 int hwcpu = get_hard_smp_processor_id(cpu); 263 int hwcpu = get_hard_smp_processor_id(cpu);
263 unsigned long vpa = (unsigned long)&(paca[cpu].lppaca); 264 unsigned long vpa = __pa(&paca[cpu].lppaca);
264 long ret; 265 long ret;
265 unsigned long flags;
266
267 /* Register the Virtual Processor Area (VPA) */
268 flags = 1UL << (63 - 18);
269 266
270 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 267 if (cpu_has_feature(CPU_FTR_ALTIVEC))
271 paca[cpu].lppaca.vmxregs_in_use = 1; 268 paca[cpu].lppaca.vmxregs_in_use = 1;
272 269
273 ret = register_vpa(flags, hwcpu, __pa(vpa)); 270 ret = register_vpa(hwcpu, vpa);
274 271
275 if (ret) 272 if (ret)
276 printk(KERN_ERR "WARNING: vpa_init: VPA registration for " 273 printk(KERN_ERR "WARNING: vpa_init: VPA registration for "
277 "cpu %d (hw %d) of area %lx returns %ld\n", 274 "cpu %d (hw %d) of area %lx returns %ld\n",
278 cpu, hwcpu, __pa(vpa), ret); 275 cpu, hwcpu, vpa, ret);
279} 276}
280 277
281long pSeries_lpar_hpte_insert(unsigned long hpte_group, 278long pSeries_lpar_hpte_insert(unsigned long hpte_group,
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
new file mode 100644
index 000000000000..382f8c5b0e7c
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -0,0 +1,120 @@
1#ifndef _PSERIES_PLPAR_WRAPPERS_H
2#define _PSERIES_PLPAR_WRAPPERS_H
3
4#include <asm/hvcall.h>
5
6static inline long poll_pending(void)
7{
8 unsigned long dummy;
9 return plpar_hcall(H_POLL_PENDING, 0, 0, 0, 0, &dummy, &dummy, &dummy);
10}
11
12static inline long prod_processor(void)
13{
14 plpar_hcall_norets(H_PROD);
15 return 0;
16}
17
18static inline long cede_processor(void)
19{
20 plpar_hcall_norets(H_CEDE);
21 return 0;
22}
23
24static inline long vpa_call(unsigned long flags, unsigned long cpu,
25 unsigned long vpa)
26{
27 /* flags are in bits 16-18 (counting from most significant bit) */
28 flags = flags << (63 - 18);
29
30 return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa);
31}
32
33static inline long unregister_vpa(unsigned long cpu, unsigned long vpa)
34{
35 return vpa_call(0x5, cpu, vpa);
36}
37
38static inline long register_vpa(unsigned long cpu, unsigned long vpa)
39{
40 return vpa_call(0x1, cpu, vpa);
41}
42
43extern void vpa_init(int cpu);
44
45static inline long plpar_pte_remove(unsigned long flags, unsigned long ptex,
46 unsigned long avpn, unsigned long *old_pteh_ret,
47 unsigned long *old_ptel_ret)
48{
49 unsigned long dummy;
50 return plpar_hcall(H_REMOVE, flags, ptex, avpn, 0, old_pteh_ret,
51 old_ptel_ret, &dummy);
52}
53
54static inline long plpar_pte_read(unsigned long flags, unsigned long ptex,
55 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
56{
57 unsigned long dummy;
58 return plpar_hcall(H_READ, flags, ptex, 0, 0, old_pteh_ret,
59 old_ptel_ret, &dummy);
60}
61
62static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
63 unsigned long avpn)
64{
65 return plpar_hcall_norets(H_PROTECT, flags, ptex, avpn);
66}
67
68static inline long plpar_tce_get(unsigned long liobn, unsigned long ioba,
69 unsigned long *tce_ret)
70{
71 unsigned long dummy;
72 return plpar_hcall(H_GET_TCE, liobn, ioba, 0, 0, tce_ret, &dummy,
73 &dummy);
74}
75
76static inline long plpar_tce_put(unsigned long liobn, unsigned long ioba,
77 unsigned long tceval)
78{
79 return plpar_hcall_norets(H_PUT_TCE, liobn, ioba, tceval);
80}
81
82static inline long plpar_tce_put_indirect(unsigned long liobn,
83 unsigned long ioba, unsigned long page, unsigned long count)
84{
85 return plpar_hcall_norets(H_PUT_TCE_INDIRECT, liobn, ioba, page, count);
86}
87
88static inline long plpar_tce_stuff(unsigned long liobn, unsigned long ioba,
89 unsigned long tceval, unsigned long count)
90{
91 return plpar_hcall_norets(H_STUFF_TCE, liobn, ioba, tceval, count);
92}
93
94static inline long plpar_get_term_char(unsigned long termno,
95 unsigned long *len_ret, char *buf_ret)
96{
97 unsigned long *lbuf = (unsigned long *)buf_ret; /* TODO: alignment? */
98 return plpar_hcall(H_GET_TERM_CHAR, termno, 0, 0, 0, len_ret,
99 lbuf + 0, lbuf + 1);
100}
101
102static inline long plpar_put_term_char(unsigned long termno, unsigned long len,
103 const char *buffer)
104{
105 unsigned long *lbuf = (unsigned long *)buffer; /* TODO: alignment? */
106 return plpar_hcall_norets(H_PUT_TERM_CHAR, termno, len, lbuf[0],
107 lbuf[1]);
108}
109
110static inline long plpar_set_xdabr(unsigned long address, unsigned long flags)
111{
112 return plpar_hcall_norets(H_SET_XDABR, address, flags);
113}
114
115static inline long plpar_set_dabr(unsigned long val)
116{
117 return plpar_hcall_norets(H_SET_DABR, val);
118}
119
120#endif /* _PSERIES_PLPAR_WRAPPERS_H */
diff --git a/arch/powerpc/platforms/pseries/rtas-fw.c b/arch/powerpc/platforms/pseries/rtas-fw.c
deleted file mode 100644
index 15d81d758ca0..000000000000
--- a/arch/powerpc/platforms/pseries/rtas-fw.c
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 *
3 * Procedures for firmware flash updates on pSeries systems.
4 *
5 * Peter Bergner, IBM March 2001.
6 * Copyright (C) 2001 IBM.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14#include <stdarg.h>
15#include <linux/kernel.h>
16#include <linux/types.h>
17#include <linux/spinlock.h>
18#include <linux/module.h>
19#include <linux/init.h>
20
21#include <asm/prom.h>
22#include <asm/rtas.h>
23#include <asm/semaphore.h>
24#include <asm/machdep.h>
25#include <asm/page.h>
26#include <asm/param.h>
27#include <asm/system.h>
28#include <asm/abs_addr.h>
29#include <asm/udbg.h>
30#include <asm/delay.h>
31#include <asm/uaccess.h>
32#include <asm/systemcfg.h>
33
34#include "rtas-fw.h"
35
36struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
37
38#define FLASH_BLOCK_LIST_VERSION (1UL)
39
40static void rtas_flash_firmware(void)
41{
42 unsigned long image_size;
43 struct flash_block_list *f, *next, *flist;
44 unsigned long rtas_block_list;
45 int i, status, update_token;
46
47 update_token = rtas_token("ibm,update-flash-64-and-reboot");
48 if (update_token == RTAS_UNKNOWN_SERVICE) {
49 printk(KERN_ALERT "FLASH: ibm,update-flash-64-and-reboot is not available -- not a service partition?\n");
50 printk(KERN_ALERT "FLASH: firmware will not be flashed\n");
51 return;
52 }
53
54 /* NOTE: the "first" block list is a global var with no data
55 * blocks in the kernel data segment. We do this because
56 * we want to ensure this block_list addr is under 4GB.
57 */
58 rtas_firmware_flash_list.num_blocks = 0;
59 flist = (struct flash_block_list *)&rtas_firmware_flash_list;
60 rtas_block_list = virt_to_abs(flist);
61 if (rtas_block_list >= 4UL*1024*1024*1024) {
62 printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
63 return;
64 }
65
66 printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n");
67 /* Update the block_list in place. */
68 image_size = 0;
69 for (f = flist; f; f = next) {
70 /* Translate data addrs to absolute */
71 for (i = 0; i < f->num_blocks; i++) {
72 f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data);
73 image_size += f->blocks[i].length;
74 }
75 next = f->next;
76 /* Don't translate NULL pointer for last entry */
77 if (f->next)
78 f->next = (struct flash_block_list *)virt_to_abs(f->next);
79 else
80 f->next = NULL;
81 /* make num_blocks into the version/length field */
82 f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
83 }
84
85 printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size);
86 printk(KERN_ALERT "FLASH: performing flash and reboot\n");
87 rtas_progress("Flashing \n", 0x0);
88 rtas_progress("Please Wait... ", 0x0);
89 printk(KERN_ALERT "FLASH: this will take several minutes. Do not power off!\n");
90 status = rtas_call(update_token, 1, 1, NULL, rtas_block_list);
91 switch (status) { /* should only get "bad" status */
92 case 0:
93 printk(KERN_ALERT "FLASH: success\n");
94 break;
95 case -1:
96 printk(KERN_ALERT "FLASH: hardware error. Firmware may not be not flashed\n");
97 break;
98 case -3:
99 printk(KERN_ALERT "FLASH: image is corrupt or not correct for this platform. Firmware not flashed\n");
100 break;
101 case -4:
102 printk(KERN_ALERT "FLASH: flash failed when partially complete. System may not reboot\n");
103 break;
104 default:
105 printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status);
106 break;
107 }
108}
109
110void rtas_flash_bypass_warning(void)
111{
112 printk(KERN_ALERT "FLASH: firmware flash requires a reboot\n");
113 printk(KERN_ALERT "FLASH: the firmware image will NOT be flashed\n");
114}
115
116
117void rtas_fw_restart(char *cmd)
118{
119 if (rtas_firmware_flash_list.next)
120 rtas_flash_firmware();
121 rtas_restart(cmd);
122}
123
124void rtas_fw_power_off(void)
125{
126 if (rtas_firmware_flash_list.next)
127 rtas_flash_bypass_warning();
128 rtas_power_off();
129}
130
131void rtas_fw_halt(void)
132{
133 if (rtas_firmware_flash_list.next)
134 rtas_flash_bypass_warning();
135 rtas_halt();
136}
137
138EXPORT_SYMBOL(rtas_firmware_flash_list);
diff --git a/arch/powerpc/platforms/pseries/rtas-fw.h b/arch/powerpc/platforms/pseries/rtas-fw.h
deleted file mode 100644
index e70fa69974a3..000000000000
--- a/arch/powerpc/platforms/pseries/rtas-fw.h
+++ /dev/null
@@ -1,3 +0,0 @@
1void rtas_fw_restart(char *cmd);
2void rtas_fw_power_off(void);
3void rtas_fw_halt(void);
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index e26b0420b6dd..e26b0420b6dd 100644
--- a/arch/ppc64/kernel/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 10cb0f2d9b5b..65bee939eecc 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -58,7 +58,6 @@
58#include <asm/irq.h> 58#include <asm/irq.h>
59#include <asm/time.h> 59#include <asm/time.h>
60#include <asm/nvram.h> 60#include <asm/nvram.h>
61#include <asm/plpar_wrappers.h>
62#include "xics.h" 61#include "xics.h"
63#include <asm/firmware.h> 62#include <asm/firmware.h>
64#include <asm/pmc.h> 63#include <asm/pmc.h>
@@ -67,7 +66,7 @@
67#include <asm/i8259.h> 66#include <asm/i8259.h>
68#include <asm/udbg.h> 67#include <asm/udbg.h>
69 68
70#include "rtas-fw.h" 69#include "plpar_wrappers.h"
71 70
72#ifdef DEBUG 71#ifdef DEBUG
73#define DBG(fmt...) udbg_printf(fmt) 72#define DBG(fmt...) udbg_printf(fmt)
@@ -352,6 +351,16 @@ static void pSeries_mach_cpu_die(void)
352 for(;;); 351 for(;;);
353} 352}
354 353
354static int pseries_set_dabr(unsigned long dabr)
355{
356 if (firmware_has_feature(FW_FEATURE_XDABR)) {
357 /* We want to catch accesses from kernel and userspace */
358 return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER);
359 }
360
361 return plpar_set_dabr(dabr);
362}
363
355 364
356/* 365/*
357 * Early initialization. Relocation is on but do not reference unbolted pages 366 * Early initialization. Relocation is on but do not reference unbolted pages
@@ -387,6 +396,8 @@ static void __init pSeries_init_early(void)
387 DBG("Hello World !\n"); 396 DBG("Hello World !\n");
388 } 397 }
389 398
399 if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR))
400 ppc_md.set_dabr = pseries_set_dabr;
390 401
391 iommu_init_early_pSeries(); 402 iommu_init_early_pSeries();
392 403
@@ -591,9 +602,9 @@ struct machdep_calls __initdata pSeries_md = {
591 .pcibios_fixup = pSeries_final_fixup, 602 .pcibios_fixup = pSeries_final_fixup,
592 .pci_probe_mode = pSeries_pci_probe_mode, 603 .pci_probe_mode = pSeries_pci_probe_mode,
593 .irq_bus_setup = pSeries_irq_bus_setup, 604 .irq_bus_setup = pSeries_irq_bus_setup,
594 .restart = rtas_fw_restart, 605 .restart = rtas_restart,
595 .power_off = rtas_fw_power_off, 606 .power_off = rtas_power_off,
596 .halt = rtas_fw_halt, 607 .halt = rtas_halt,
597 .panic = rtas_os_term, 608 .panic = rtas_os_term,
598 .cpu_die = pSeries_mach_cpu_die, 609 .cpu_die = pSeries_mach_cpu_die,
599 .get_boot_time = rtas_get_boot_time, 610 .get_boot_time = rtas_get_boot_time,
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 9c9458ddfc25..7a243e8ccd7e 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -44,10 +44,11 @@
44#include <asm/firmware.h> 44#include <asm/firmware.h>
45#include <asm/system.h> 45#include <asm/system.h>
46#include <asm/rtas.h> 46#include <asm/rtas.h>
47#include <asm/plpar_wrappers.h>
48#include <asm/pSeries_reconfig.h> 47#include <asm/pSeries_reconfig.h>
49#include <asm/mpic.h> 48#include <asm/mpic.h>
50 49
50#include "plpar_wrappers.h"
51
51#ifdef DEBUG 52#ifdef DEBUG
52#define DBG(fmt...) udbg_printf(fmt) 53#define DBG(fmt...) udbg_printf(fmt)
53#else 54#else
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 8acd21dee05d..6b7efcfc352a 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_MPC106) += grackle.o
5obj-$(CONFIG_BOOKE) += dcr.o 5obj-$(CONFIG_BOOKE) += dcr.o
6obj-$(CONFIG_40x) += dcr.o 6obj-$(CONFIG_40x) += dcr.o
7obj-$(CONFIG_U3_DART) += u3_iommu.o 7obj-$(CONFIG_U3_DART) += u3_iommu.o
8obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
diff --git a/include/asm-ppc64/dart.h b/arch/powerpc/sysdev/dart.h
index cdf8a2dec05f..ea8f0d9eed8a 100644
--- a/include/asm-ppc64/dart.h
+++ b/arch/powerpc/sysdev/dart.h
@@ -16,8 +16,8 @@
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18 18
19#ifndef _ASM_DART_H 19#ifndef _POWERPC_SYSDEV_DART_H
20#define _ASM_DART_H 20#define _POWERPC_SYSDEV_DART_H
21 21
22 22
23/* physical base of DART registers */ 23/* physical base of DART registers */
@@ -56,4 +56,4 @@
56#define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT) 56#define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT)
57 57
58 58
59#endif 59#endif /* _POWERPC_SYSDEV_DART_H */
diff --git a/arch/ppc64/kernel/bpa_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c
index 06a119cfceb5..74e0d31a3559 100644
--- a/arch/ppc64/kernel/bpa_nvram.c
+++ b/arch/powerpc/sysdev/mmio_nvram.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * NVRAM for CPBW 2 * memory mapped NVRAM
3 * 3 *
4 * (C) Copyright IBM Corp. 2005 4 * (C) Copyright IBM Corp. 2005
5 * 5 *
@@ -30,54 +30,54 @@
30#include <asm/nvram.h> 30#include <asm/nvram.h>
31#include <asm/prom.h> 31#include <asm/prom.h>
32 32
33static void __iomem *bpa_nvram_start; 33static void __iomem *mmio_nvram_start;
34static long bpa_nvram_len; 34static long mmio_nvram_len;
35static spinlock_t bpa_nvram_lock = SPIN_LOCK_UNLOCKED; 35static spinlock_t mmio_nvram_lock = SPIN_LOCK_UNLOCKED;
36 36
37static ssize_t bpa_nvram_read(char *buf, size_t count, loff_t *index) 37static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index)
38{ 38{
39 unsigned long flags; 39 unsigned long flags;
40 40
41 if (*index >= bpa_nvram_len) 41 if (*index >= mmio_nvram_len)
42 return 0; 42 return 0;
43 if (*index + count > bpa_nvram_len) 43 if (*index + count > mmio_nvram_len)
44 count = bpa_nvram_len - *index; 44 count = mmio_nvram_len - *index;
45 45
46 spin_lock_irqsave(&bpa_nvram_lock, flags); 46 spin_lock_irqsave(&mmio_nvram_lock, flags);
47 47
48 memcpy_fromio(buf, bpa_nvram_start + *index, count); 48 memcpy_fromio(buf, mmio_nvram_start + *index, count);
49 49
50 spin_unlock_irqrestore(&bpa_nvram_lock, flags); 50 spin_unlock_irqrestore(&mmio_nvram_lock, flags);
51 51
52 *index += count; 52 *index += count;
53 return count; 53 return count;
54} 54}
55 55
56static ssize_t bpa_nvram_write(char *buf, size_t count, loff_t *index) 56static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index)
57{ 57{
58 unsigned long flags; 58 unsigned long flags;
59 59
60 if (*index >= bpa_nvram_len) 60 if (*index >= mmio_nvram_len)
61 return 0; 61 return 0;
62 if (*index + count > bpa_nvram_len) 62 if (*index + count > mmio_nvram_len)
63 count = bpa_nvram_len - *index; 63 count = mmio_nvram_len - *index;
64 64
65 spin_lock_irqsave(&bpa_nvram_lock, flags); 65 spin_lock_irqsave(&mmio_nvram_lock, flags);
66 66
67 memcpy_toio(bpa_nvram_start + *index, buf, count); 67 memcpy_toio(mmio_nvram_start + *index, buf, count);
68 68
69 spin_unlock_irqrestore(&bpa_nvram_lock, flags); 69 spin_unlock_irqrestore(&mmio_nvram_lock, flags);
70 70
71 *index += count; 71 *index += count;
72 return count; 72 return count;
73} 73}
74 74
75static ssize_t bpa_nvram_get_size(void) 75static ssize_t mmio_nvram_get_size(void)
76{ 76{
77 return bpa_nvram_len; 77 return mmio_nvram_len;
78} 78}
79 79
80int __init bpa_nvram_init(void) 80int __init mmio_nvram_init(void)
81{ 81{
82 struct device_node *nvram_node; 82 struct device_node *nvram_node;
83 unsigned long *buffer; 83 unsigned long *buffer;
@@ -97,20 +97,20 @@ int __init bpa_nvram_init(void)
97 97
98 ret = -ENODEV; 98 ret = -ENODEV;
99 nvram_addr = buffer[0]; 99 nvram_addr = buffer[0];
100 bpa_nvram_len = buffer[1]; 100 mmio_nvram_len = buffer[1];
101 if ( (!bpa_nvram_len) || (!nvram_addr) ) 101 if ( (!mmio_nvram_len) || (!nvram_addr) )
102 goto out; 102 goto out;
103 103
104 bpa_nvram_start = ioremap(nvram_addr, bpa_nvram_len); 104 mmio_nvram_start = ioremap(nvram_addr, mmio_nvram_len);
105 if (!bpa_nvram_start) 105 if (!mmio_nvram_start)
106 goto out; 106 goto out;
107 107
108 printk(KERN_INFO "BPA NVRAM, %luk mapped to %p\n", 108 printk(KERN_INFO "mmio NVRAM, %luk mapped to %p\n",
109 bpa_nvram_len >> 10, bpa_nvram_start); 109 mmio_nvram_len >> 10, mmio_nvram_start);
110 110
111 ppc_md.nvram_read = bpa_nvram_read; 111 ppc_md.nvram_read = mmio_nvram_read;
112 ppc_md.nvram_write = bpa_nvram_write; 112 ppc_md.nvram_write = mmio_nvram_write;
113 ppc_md.nvram_size = bpa_nvram_get_size; 113 ppc_md.nvram_size = mmio_nvram_get_size;
114 114
115out: 115out:
116 of_node_put(nvram_node); 116 of_node_put(nvram_node);
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c
index fba871a1bda5..607722178c1a 100644
--- a/arch/powerpc/sysdev/u3_iommu.c
+++ b/arch/powerpc/sysdev/u3_iommu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/ppc64/kernel/u3_iommu.c 2 * arch/powerpc/sysdev/u3_iommu.c
3 * 3 *
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
5 * 5 *
@@ -44,9 +44,10 @@
44#include <asm/abs_addr.h> 44#include <asm/abs_addr.h>
45#include <asm/cacheflush.h> 45#include <asm/cacheflush.h>
46#include <asm/lmb.h> 46#include <asm/lmb.h>
47#include <asm/dart.h>
48#include <asm/ppc-pci.h> 47#include <asm/ppc-pci.h>
49 48
49#include "dart.h"
50
50extern int iommu_force_on; 51extern int iommu_force_on;
51 52
52/* Physical base address and size of the DART table */ 53/* Physical base address and size of the DART table */
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index b42789f8eb76..579cd40258b9 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -388,9 +388,8 @@ void m8xx_cpm_dpinit(void)
388 388
389/* 389/*
390 * Allocate the requested size worth of DP memory. 390 * Allocate the requested size worth of DP memory.
391 * This function used to return an index into the DPRAM area. 391 * This function returns an offset into the DPRAM area.
392 * Now it returns the actuall physical address of that area. 392 * Use cpm_dpram_addr() to get the virtual address of the area.
393 * use m8xx_cpm_dpram_offset() to get the index
394 */ 393 */
395uint cpm_dpalloc(uint size, uint align) 394uint cpm_dpalloc(uint size, uint align)
396{ 395{
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 94d5716fa7c3..e719a4933af1 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -66,7 +66,8 @@ head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
66core-y += arch/ppc/kernel/ arch/powerpc/kernel/ \ 66core-y += arch/ppc/kernel/ arch/powerpc/kernel/ \
67 arch/ppc/platforms/ \ 67 arch/ppc/platforms/ \
68 arch/ppc/mm/ arch/ppc/lib/ \ 68 arch/ppc/mm/ arch/ppc/lib/ \
69 arch/ppc/syslib/ arch/powerpc/sysdev/ 69 arch/ppc/syslib/ arch/powerpc/sysdev/ \
70 arch/powerpc/lib/
70core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ 71core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
71core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ 72core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/
72core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/ 73core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index b35346df1e37..c610ca933a25 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -45,7 +45,6 @@ obj-$(CONFIG_MODULES) += module.o
45obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o 45obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o
46obj-$(CONFIG_PCI) += pci.o 46obj-$(CONFIG_PCI) += pci.o
47obj-$(CONFIG_KGDB) += ppc-stub.o 47obj-$(CONFIG_KGDB) += ppc-stub.o
48obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
49obj-$(CONFIG_TAU) += temp.o 48obj-$(CONFIG_TAU) += temp.o
50ifndef CONFIG_E200 49ifndef CONFIG_E200
51obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o 50obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o
diff --git a/arch/ppc/kernel/bitops.c b/arch/ppc/kernel/bitops.c
deleted file mode 100644
index 7f53d193968b..000000000000
--- a/arch/ppc/kernel/bitops.c
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 * Copyright (C) 1996 Paul Mackerras.
3 */
4
5#include <linux/kernel.h>
6#include <linux/bitops.h>
7
8/*
9 * If the bitops are not inlined in bitops.h, they are defined here.
10 * -- paulus
11 */
12#if !__INLINE_BITOPS
13void set_bit(int nr, volatile void * addr)
14{
15 unsigned long old;
16 unsigned long mask = 1 << (nr & 0x1f);
17 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
18
19 __asm__ __volatile__(SMP_WMB "\n\
201: lwarx %0,0,%3 \n\
21 or %0,%0,%2 \n"
22 PPC405_ERR77(0,%3)
23" stwcx. %0,0,%3 \n\
24 bne 1b"
25 SMP_MB
26 : "=&r" (old), "=m" (*p)
27 : "r" (mask), "r" (p), "m" (*p)
28 : "cc" );
29}
30
31void clear_bit(int nr, volatile void *addr)
32{
33 unsigned long old;
34 unsigned long mask = 1 << (nr & 0x1f);
35 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
36
37 __asm__ __volatile__(SMP_WMB "\n\
381: lwarx %0,0,%3 \n\
39 andc %0,%0,%2 \n"
40 PPC405_ERR77(0,%3)
41" stwcx. %0,0,%3 \n\
42 bne 1b"
43 SMP_MB
44 : "=&r" (old), "=m" (*p)
45 : "r" (mask), "r" (p), "m" (*p)
46 : "cc");
47}
48
49void change_bit(int nr, volatile void *addr)
50{
51 unsigned long old;
52 unsigned long mask = 1 << (nr & 0x1f);
53 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
54
55 __asm__ __volatile__(SMP_WMB "\n\
561: lwarx %0,0,%3 \n\
57 xor %0,%0,%2 \n"
58 PPC405_ERR77(0,%3)
59" stwcx. %0,0,%3 \n\
60 bne 1b"
61 SMP_MB
62 : "=&r" (old), "=m" (*p)
63 : "r" (mask), "r" (p), "m" (*p)
64 : "cc");
65}
66
67int test_and_set_bit(int nr, volatile void *addr)
68{
69 unsigned int old, t;
70 unsigned int mask = 1 << (nr & 0x1f);
71 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
72
73 __asm__ __volatile__(SMP_WMB "\n\
741: lwarx %0,0,%4 \n\
75 or %1,%0,%3 \n"
76 PPC405_ERR77(0,%4)
77" stwcx. %1,0,%4 \n\
78 bne 1b"
79 SMP_MB
80 : "=&r" (old), "=&r" (t), "=m" (*p)
81 : "r" (mask), "r" (p), "m" (*p)
82 : "cc");
83
84 return (old & mask) != 0;
85}
86
87int test_and_clear_bit(int nr, volatile void *addr)
88{
89 unsigned int old, t;
90 unsigned int mask = 1 << (nr & 0x1f);
91 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
92
93 __asm__ __volatile__(SMP_WMB "\n\
941: lwarx %0,0,%4 \n\
95 andc %1,%0,%3 \n"
96 PPC405_ERR77(0,%4)
97" stwcx. %1,0,%4 \n\
98 bne 1b"
99 SMP_MB
100 : "=&r" (old), "=&r" (t), "=m" (*p)
101 : "r" (mask), "r" (p), "m" (*p)
102 : "cc");
103
104 return (old & mask) != 0;
105}
106
107int test_and_change_bit(int nr, volatile void *addr)
108{
109 unsigned int old, t;
110 unsigned int mask = 1 << (nr & 0x1f);
111 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
112
113 __asm__ __volatile__(SMP_WMB "\n\
1141: lwarx %0,0,%4 \n\
115 xor %1,%0,%3 \n"
116 PPC405_ERR77(0,%4)
117" stwcx. %1,0,%4 \n\
118 bne 1b"
119 SMP_MB
120 : "=&r" (old), "=&r" (t), "=m" (*p)
121 : "r" (mask), "r" (p), "m" (*p)
122 : "cc");
123
124 return (old & mask) != 0;
125}
126#endif /* !__INLINE_BITOPS */
diff --git a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c
index 772e428aaa59..fbb2b9f8922c 100644
--- a/arch/ppc/kernel/irq.c
+++ b/arch/ppc/kernel/irq.c
@@ -126,7 +126,7 @@ skip:
126 seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); 126 seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
127 } 127 }
128#endif 128#endif
129#ifdef CONFIG_SMP 129#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE)
130 /* should this be per processor send/receive? */ 130 /* should this be per processor send/receive? */
131 seq_printf(p, "IPI (recv/sent): %10u/%u\n", 131 seq_printf(p, "IPI (recv/sent): %10u/%u\n",
132 atomic_read(&ipi_recv), atomic_read(&ipi_sent)); 132 atomic_read(&ipi_recv), atomic_read(&ipi_sent));
diff --git a/arch/ppc/kernel/machine_kexec.c b/arch/ppc/kernel/machine_kexec.c
index a72787747df7..a882b0dbe8de 100644
--- a/arch/ppc/kernel/machine_kexec.c
+++ b/arch/ppc/kernel/machine_kexec.c
@@ -32,7 +32,7 @@ const extern unsigned int relocate_new_kernel_size;
32 * Provide a dummy crash_notes definition while crash dump arrives to ppc. 32 * Provide a dummy crash_notes definition while crash dump arrives to ppc.
33 * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. 33 * This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
34 */ 34 */
35void *crash_notes = NULL; 35note_buf_t crash_notes[NR_CPUS];
36 36
37void machine_shutdown(void) 37void machine_shutdown(void)
38{ 38{
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index ae24196d78f6..e0ca61b37f4f 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -131,6 +131,11 @@ EXPORT_SYMBOL(outw);
131EXPORT_SYMBOL(outl); 131EXPORT_SYMBOL(outl);
132EXPORT_SYMBOL(outsl);*/ 132EXPORT_SYMBOL(outsl);*/
133 133
134EXPORT_SYMBOL(__ide_mm_insl);
135EXPORT_SYMBOL(__ide_mm_outsw);
136EXPORT_SYMBOL(__ide_mm_insw);
137EXPORT_SYMBOL(__ide_mm_outsl);
138
134EXPORT_SYMBOL(_insb); 139EXPORT_SYMBOL(_insb);
135EXPORT_SYMBOL(_outsb); 140EXPORT_SYMBOL(_outsb);
136EXPORT_SYMBOL(_insw); 141EXPORT_SYMBOL(_insw);
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index f265b81e7008..16adde6b429d 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -606,22 +606,22 @@ int check_bug_trap(struct pt_regs *regs)
606 if (bug->line & BUG_WARNING_TRAP) { 606 if (bug->line & BUG_WARNING_TRAP) {
607 /* this is a WARN_ON rather than BUG/BUG_ON */ 607 /* this is a WARN_ON rather than BUG/BUG_ON */
608#ifdef CONFIG_XMON 608#ifdef CONFIG_XMON
609 xmon_printf(KERN_ERR "Badness in %s at %s:%d\n", 609 xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n",
610 bug->function, bug->file, 610 bug->function, bug->file,
611 bug->line & ~BUG_WARNING_TRAP); 611 bug->line & ~BUG_WARNING_TRAP);
612#endif /* CONFIG_XMON */ 612#endif /* CONFIG_XMON */
613 printk(KERN_ERR "Badness in %s at %s:%d\n", 613 printk(KERN_ERR "Badness in %s at %s:%ld\n",
614 bug->function, bug->file, 614 bug->function, bug->file,
615 bug->line & ~BUG_WARNING_TRAP); 615 bug->line & ~BUG_WARNING_TRAP);
616 dump_stack(); 616 dump_stack();
617 return 1; 617 return 1;
618 } 618 }
619#ifdef CONFIG_XMON 619#ifdef CONFIG_XMON
620 xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%d!\n", 620 xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
621 bug->function, bug->file, bug->line); 621 bug->function, bug->file, bug->line);
622 xmon(regs); 622 xmon(regs);
623#endif /* CONFIG_XMON */ 623#endif /* CONFIG_XMON */
624 printk(KERN_CRIT "kernel BUG in %s at %s:%d!\n", 624 printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
625 bug->function, bug->file, bug->line); 625 bug->function, bug->file, bug->line);
626 626
627 return 0; 627 return 0;
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 97ffbc70574f..1cc3abe6fa43 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -45,6 +45,7 @@
45#include <asm/bootinfo.h> 45#include <asm/bootinfo.h>
46#include <asm/time.h> 46#include <asm/time.h>
47#include <asm/xmon.h> 47#include <asm/xmon.h>
48#include <asm/ppc_sys.h>
48 49
49#include "ppc8xx_pic.h" 50#include "ppc8xx_pic.h"
50 51
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index 42677cc96508..b987164fca4c 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -89,12 +89,14 @@ config PPC_PMAC
89 bool " Apple G5 based machines" 89 bool " Apple G5 based machines"
90 default y 90 default y
91 select U3_DART 91 select U3_DART
92 select GENERIC_TBSYNC
92 93
93config PPC_MAPLE 94config PPC_MAPLE
94 depends on PPC_MULTIPLATFORM 95 depends on PPC_MULTIPLATFORM
95 bool " Maple 970FX Evaluation Board" 96 bool " Maple 970FX Evaluation Board"
96 select U3_DART 97 select U3_DART
97 select MPIC_BROKEN_U3 98 select MPIC_BROKEN_U3
99 select GENERIC_TBSYNC
98 default n 100 default n
99 help 101 help
100 This option enables support for the Maple 970FX Evaluation Board. 102 This option enables support for the Maple 970FX Evaluation Board.
@@ -182,6 +184,9 @@ config MPIC_BROKEN_U3
182 depends on PPC_MAPLE 184 depends on PPC_MAPLE
183 default y 185 default y
184 186
187config GENERIC_TBSYNC
188 def_bool n
189
185config PPC_PMAC64 190config PPC_PMAC64
186 bool 191 bool
187 depends on PPC_PMAC 192 depends on PPC_PMAC
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile
index fdbd6f44adc0..a55a82d145d4 100644
--- a/arch/ppc64/Makefile
+++ b/arch/ppc64/Makefile
@@ -86,7 +86,6 @@ head-y := arch/ppc64/kernel/head.o
86head-y += arch/powerpc/kernel/fpu.o 86head-y += arch/powerpc/kernel/fpu.o
87head-y += arch/powerpc/kernel/entry_64.o 87head-y += arch/powerpc/kernel/entry_64.o
88 88
89libs-y += arch/ppc64/lib/
90core-y += arch/ppc64/kernel/ arch/powerpc/kernel/ 89core-y += arch/ppc64/kernel/ arch/powerpc/kernel/
91core-y += arch/powerpc/mm/ 90core-y += arch/powerpc/mm/
92core-y += arch/powerpc/sysdev/ 91core-y += arch/powerpc/sysdev/
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index 327c08ce4291..c441aebe7648 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -12,8 +12,7 @@ obj-y := misc.o prom.o
12endif 12endif
13 13
14obj-y += irq.o idle.o dma.o \ 14obj-y += irq.o idle.o dma.o \
15 signal.o \ 15 align.o pacaData.o \
16 align.o bitops.o pacaData.o \
17 udbg.o ioctl32.o \ 16 udbg.o ioctl32.o \
18 rtc.o \ 17 rtc.o \
19 cpu_setup_power4.o \ 18 cpu_setup_power4.o \
@@ -29,22 +28,16 @@ ifneq ($(CONFIG_PPC_MERGE),y)
29obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o 28obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
30endif 29endif
31 30
32obj-$(CONFIG_PPC_PSERIES) += rtasd.o udbg_16550.o 31obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
33
34obj-$(CONFIG_PPC_BPA) += bpa_setup.o bpa_iommu.o bpa_nvram.o \
35 bpa_iic.o spider-pic.o
36 32
37obj-$(CONFIG_KEXEC) += machine_kexec.o 33obj-$(CONFIG_KEXEC) += machine_kexec.o
38obj-$(CONFIG_EEH) += eeh.o 34obj-$(CONFIG_EEH) += eeh.o
39obj-$(CONFIG_PROC_FS) += proc_ppc64.o 35obj-$(CONFIG_PROC_FS) += proc_ppc64.o
40obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
41obj-$(CONFIG_SMP) += smp.o
42obj-$(CONFIG_MODULES) += module.o 36obj-$(CONFIG_MODULES) += module.o
43ifneq ($(CONFIG_PPC_MERGE),y) 37ifneq ($(CONFIG_PPC_MERGE),y)
44obj-$(CONFIG_MODULES) += ppc_ksyms.o 38obj-$(CONFIG_MODULES) += ppc_ksyms.o
45endif 39endif
46obj-$(CONFIG_PPC_RTAS) += rtas_pci.o 40obj-$(CONFIG_PPC_RTAS) += rtas_pci.o
47obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
48obj-$(CONFIG_SCANLOG) += scanlog.o 41obj-$(CONFIG_SCANLOG) += scanlog.o
49obj-$(CONFIG_LPARCFG) += lparcfg.o 42obj-$(CONFIG_LPARCFG) += lparcfg.o
50obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o 43obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o
@@ -57,11 +50,6 @@ obj-$(CONFIG_PPC_PMAC) += udbg_scc.o
57 50
58obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o 51obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
59 52
60ifdef CONFIG_SMP
61obj-$(CONFIG_PPC_PMAC) += smp-tbsync.o
62obj-$(CONFIG_PPC_MAPLE) += smp-tbsync.o
63endif
64
65obj-$(CONFIG_KPROBES) += kprobes.o 53obj-$(CONFIG_KPROBES) += kprobes.o
66 54
67CFLAGS_ioctl32.o += -Ifs/ 55CFLAGS_ioctl32.o += -Ifs/
diff --git a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c
index 5e6046cb414e..504dee836d29 100644
--- a/arch/ppc64/kernel/asm-offsets.c
+++ b/arch/ppc64/kernel/asm-offsets.c
@@ -31,7 +31,7 @@
31 31
32#include <asm/paca.h> 32#include <asm/paca.h>
33#include <asm/lppaca.h> 33#include <asm/lppaca.h>
34#include <asm/iSeries/HvLpEvent.h> 34#include <asm/iseries/hv_lp_event.h>
35#include <asm/rtas.h> 35#include <asm/rtas.h>
36#include <asm/cputable.h> 36#include <asm/cputable.h>
37#include <asm/cache.h> 37#include <asm/cache.h>
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index 929f9f42cf7a..db1cf397be2d 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -35,7 +35,7 @@
35#include <asm/cputable.h> 35#include <asm/cputable.h>
36#include <asm/setup.h> 36#include <asm/setup.h>
37#include <asm/hvcall.h> 37#include <asm/hvcall.h>
38#include <asm/iSeries/LparMap.h> 38#include <asm/iseries/lpar_map.h>
39#include <asm/thread_info.h> 39#include <asm/thread_info.h>
40 40
41#ifdef CONFIG_PPC_ISERIES 41#ifdef CONFIG_PPC_ISERIES
@@ -1914,24 +1914,6 @@ _GLOBAL(hmt_start_secondary)
1914 blr 1914 blr
1915#endif 1915#endif
1916 1916
1917#if defined(CONFIG_KEXEC) || defined(CONFIG_SMP)
1918_GLOBAL(smp_release_cpus)
1919 /* All secondary cpus are spinning on a common
1920 * spinloop, release them all now so they can start
1921 * to spin on their individual paca spinloops.
1922 * For non SMP kernels, the secondary cpus never
1923 * get out of the common spinloop.
1924 * XXX This does nothing useful on iSeries, secondaries are
1925 * already waiting on their paca.
1926 */
1927 li r3,1
1928 LOADADDR(r5,__secondary_hold_spinloop)
1929 std r3,0(r5)
1930 sync
1931 blr
1932#endif /* CONFIG_SMP */
1933
1934
1935/* 1917/*
1936 * We put a few things here that have to be page-aligned. 1918 * We put a few things here that have to be page-aligned.
1937 * This stuff goes at the beginning of the bss, which is page-aligned. 1919 * This stuff goes at the beginning of the bss, which is page-aligned.
diff --git a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c
index f41afe545045..87474584033f 100644
--- a/arch/ppc64/kernel/irq.c
+++ b/arch/ppc64/kernel/irq.c
@@ -52,7 +52,7 @@
52#include <asm/cache.h> 52#include <asm/cache.h>
53#include <asm/prom.h> 53#include <asm/prom.h>
54#include <asm/ptrace.h> 54#include <asm/ptrace.h>
55#include <asm/iSeries/ItLpQueue.h> 55#include <asm/iseries/it_lp_queue.h>
56#include <asm/machdep.h> 56#include <asm/machdep.h>
57#include <asm/paca.h> 57#include <asm/paca.h>
58 58
@@ -392,7 +392,7 @@ int virt_irq_create_mapping(unsigned int real_irq)
392 if (ppc64_interrupt_controller == IC_OPEN_PIC) 392 if (ppc64_interrupt_controller == IC_OPEN_PIC)
393 return real_irq; /* no mapping for openpic (for now) */ 393 return real_irq; /* no mapping for openpic (for now) */
394 394
395 if (ppc64_interrupt_controller == IC_BPA_IIC) 395 if (ppc64_interrupt_controller == IC_CELL_PIC)
396 return real_irq; /* no mapping for iic either */ 396 return real_irq; /* no mapping for iic either */
397 397
398 /* don't map interrupts < MIN_VIRT_IRQ */ 398 /* don't map interrupts < MIN_VIRT_IRQ */
diff --git a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c
index cae19bbd5acd..e86155770bbc 100644
--- a/arch/ppc64/kernel/lparcfg.c
+++ b/arch/ppc64/kernel/lparcfg.c
@@ -26,14 +26,14 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/seq_file.h> 27#include <linux/seq_file.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/iSeries/HvLpConfig.h> 29#include <asm/iseries/hv_lp_config.h>
30#include <asm/lppaca.h> 30#include <asm/lppaca.h>
31#include <asm/hvcall.h> 31#include <asm/hvcall.h>
32#include <asm/firmware.h> 32#include <asm/firmware.h>
33#include <asm/rtas.h> 33#include <asm/rtas.h>
34#include <asm/system.h> 34#include <asm/system.h>
35#include <asm/time.h> 35#include <asm/time.h>
36#include <asm/iSeries/ItExtVpdPanel.h> 36#include <asm/iseries/it_exp_vpd_panel.h>
37#include <asm/prom.h> 37#include <asm/prom.h>
38 38
39#define MODULE_VERS "1.6" 39#define MODULE_VERS "1.6"
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c
index bf7cc4f8210f..ff8679f260f3 100644
--- a/arch/ppc64/kernel/machine_kexec.c
+++ b/arch/ppc64/kernel/machine_kexec.c
@@ -244,7 +244,6 @@ static void kexec_prepare_cpus(void)
244 244
245static void kexec_prepare_cpus(void) 245static void kexec_prepare_cpus(void)
246{ 246{
247 extern void smp_release_cpus(void);
248 /* 247 /*
249 * move the secondarys to us so that we can copy 248 * move the secondarys to us so that we can copy
250 * the new kernel 0-0x100 safely 249 * the new kernel 0-0x100 safely
diff --git a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c
index 33a2d8db3f21..5e27e5a6a35d 100644
--- a/arch/ppc64/kernel/pacaData.c
+++ b/arch/ppc64/kernel/pacaData.c
@@ -17,7 +17,7 @@
17#include <asm/page.h> 17#include <asm/page.h>
18 18
19#include <asm/lppaca.h> 19#include <asm/lppaca.h>
20#include <asm/iSeries/ItLpQueue.h> 20#include <asm/iseries/it_lp_queue.h>
21#include <asm/paca.h> 21#include <asm/paca.h>
22 22
23static union { 23static union {
diff --git a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c
index 493bbe43f5b4..1a443a7ada4c 100644
--- a/arch/ppc64/kernel/pci_dn.c
+++ b/arch/ppc64/kernel/pci_dn.c
@@ -181,13 +181,14 @@ EXPORT_SYMBOL(fetch_dev_dn);
181static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) 181static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
182{ 182{
183 struct device_node *np = node; 183 struct device_node *np = node;
184 struct pci_dn *pci; 184 struct pci_dn *pci = NULL;
185 int err = NOTIFY_OK; 185 int err = NOTIFY_OK;
186 186
187 switch (action) { 187 switch (action) {
188 case PSERIES_RECONFIG_ADD: 188 case PSERIES_RECONFIG_ADD:
189 pci = np->parent->data; 189 pci = np->parent->data;
190 update_dn_pci_info(np, pci->phb); 190 if (pci)
191 update_dn_pci_info(np, pci->phb);
191 break; 192 break;
192 default: 193 default:
193 err = NOTIFY_DONE; 194 err = NOTIFY_DONE;
diff --git a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c
index a87c66a9652a..24e955ee9487 100644
--- a/arch/ppc64/kernel/proc_ppc64.c
+++ b/arch/ppc64/kernel/proc_ppc64.c
@@ -53,7 +53,7 @@ static int __init proc_ppc64_create(void)
53 if (!root) 53 if (!root)
54 return 1; 54 return 1;
55 55
56 if (!(systemcfg->platform & (PLATFORM_PSERIES | PLATFORM_BPA))) 56 if (!(systemcfg->platform & (PLATFORM_PSERIES | PLATFORM_CELL)))
57 return 0; 57 return 0;
58 58
59 if (!proc_mkdir("rtas", root)) 59 if (!proc_mkdir("rtas", root))
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c
index 69924ba4d7d9..a4bbca6dbb8b 100644
--- a/arch/ppc64/kernel/prom_init.c
+++ b/arch/ppc64/kernel/prom_init.c
@@ -1939,9 +1939,9 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, unsigned long
1939 prom_send_capabilities(); 1939 prom_send_capabilities();
1940 1940
1941 /* 1941 /*
1942 * On pSeries and BPA, copy the CPU hold code 1942 * On pSeries and Cell, copy the CPU hold code
1943 */ 1943 */
1944 if (RELOC(of_platform) & (PLATFORM_PSERIES | PLATFORM_BPA)) 1944 if (RELOC(of_platform) & (PLATFORM_PSERIES | PLATFORM_CELL))
1945 copy_and_flush(0, KERNELBASE - offset, 0x100, 0); 1945 copy_and_flush(0, KERNELBASE - offset, 0x100, 0);
1946 1946
1947 /* 1947 /*
diff --git a/arch/ppc64/kernel/udbg_scc.c b/arch/ppc64/kernel/udbg_scc.c
index c47fd6c63531..820c53551507 100644
--- a/arch/ppc64/kernel/udbg_scc.c
+++ b/arch/ppc64/kernel/udbg_scc.c
@@ -12,7 +12,6 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/udbg.h> 13#include <asm/udbg.h>
14#include <asm/processor.h> 14#include <asm/processor.h>
15#include <asm/naca.h>
16#include <asm/io.h> 15#include <asm/io.h>
17#include <asm/prom.h> 16#include <asm/prom.h>
18#include <asm/pmac_feature.h> 17#include <asm/pmac_feature.h>
diff --git a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile
deleted file mode 100644
index 42d5295bf345..000000000000
--- a/arch/ppc64/lib/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for ppc64-specific library files..
3#
4
5lib-y := string.o
diff --git a/arch/ppc64/lib/string.S b/arch/ppc64/lib/string.S
deleted file mode 100644
index e21a0038a4d6..000000000000
--- a/arch/ppc64/lib/string.S
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 * String handling functions for PowerPC.
3 *
4 * Copyright (C) 1996 Paul Mackerras.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#include <asm/processor.h>
12#include <asm/errno.h>
13#include <asm/ppc_asm.h>
14
15_GLOBAL(strcpy)
16 addi r5,r3,-1
17 addi r4,r4,-1
181: lbzu r0,1(r4)
19 cmpwi 0,r0,0
20 stbu r0,1(r5)
21 bne 1b
22 blr
23
24_GLOBAL(strncpy)
25 cmpwi 0,r5,0
26 beqlr
27 mtctr r5
28 addi r6,r3,-1
29 addi r4,r4,-1
301: lbzu r0,1(r4)
31 cmpwi 0,r0,0
32 stbu r0,1(r6)
33 bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */
34 blr
35
36_GLOBAL(strcat)
37 addi r5,r3,-1
38 addi r4,r4,-1
391: lbzu r0,1(r5)
40 cmpwi 0,r0,0
41 bne 1b
42 addi r5,r5,-1
431: lbzu r0,1(r4)
44 cmpwi 0,r0,0
45 stbu r0,1(r5)
46 bne 1b
47 blr
48
49_GLOBAL(strcmp)
50 addi r5,r3,-1
51 addi r4,r4,-1
521: lbzu r3,1(r5)
53 cmpwi 1,r3,0
54 lbzu r0,1(r4)
55 subf. r3,r0,r3
56 beqlr 1
57 beq 1b
58 blr
59
60_GLOBAL(strlen)
61 addi r4,r3,-1
621: lbzu r0,1(r4)
63 cmpwi 0,r0,0
64 bne 1b
65 subf r3,r3,r4
66 blr
67
68_GLOBAL(memcmp)
69 cmpwi 0,r5,0
70 ble- 2f
71 mtctr r5
72 addi r6,r3,-1
73 addi r4,r4,-1
741: lbzu r3,1(r6)
75 lbzu r0,1(r4)
76 subf. r3,r0,r3
77 bdnzt 2,1b
78 blr
792: li r3,0
80 blr
81
82_GLOBAL(memchr)
83 cmpwi 0,r5,0
84 ble- 2f
85 mtctr r5
86 addi r3,r3,-1
871: lbzu r0,1(r3)
88 cmpw 0,r0,r4
89 bdnzf 2,1b
90 beqlr
912: li r3,0
92 blr
93
94_GLOBAL(__clear_user)
95 addi r6,r3,-4
96 li r3,0
97 li r5,0
98 cmplwi 0,r4,4
99 blt 7f
100 /* clear a single word */
10111: stwu r5,4(r6)
102 beqlr
103 /* clear word sized chunks */
104 andi. r0,r6,3
105 add r4,r0,r4
106 subf r6,r0,r6
107 srwi r0,r4,2
108 andi. r4,r4,3
109 mtctr r0
110 bdz 7f
1111: stwu r5,4(r6)
112 bdnz 1b
113 /* clear byte sized chunks */
1147: cmpwi 0,r4,0
115 beqlr
116 mtctr r4
117 addi r6,r6,3
1188: stbu r5,1(r6)
119 bdnz 8b
120 blr
12190: mr r3,r4
122 blr
12391: mfctr r3
124 slwi r3,r3,2
125 add r3,r3,r4
126 blr
12792: mfctr r3
128 blr
129
130 .section __ex_table,"a"
131 .align 3
132 .llong 11b,90b
133 .llong 1b,91b
134 .llong 8b,92b
135 .text
136
137/* r3 = dst, r4 = src, r5 = count */
138_GLOBAL(__strncpy_from_user)
139 addi r6,r3,-1
140 addi r4,r4,-1
141 cmpwi 0,r5,0
142 beq 2f
143 mtctr r5
1441: lbzu r0,1(r4)
145 cmpwi 0,r0,0
146 stbu r0,1(r6)
147 bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */
148 beq 3f
1492: addi r6,r6,1
1503: subf r3,r3,r6
151 blr
15299: li r3,-EFAULT
153 blr
154
155 .section __ex_table,"a"
156 .align 3
157 .llong 1b,99b
158 .text
159
160/* r3 = str, r4 = len (> 0) */
161_GLOBAL(__strnlen_user)
162 addi r7,r3,-1
163 mtctr r4 /* ctr = len */
1641: lbzu r0,1(r7) /* get next byte */
165 cmpwi 0,r0,0
166 bdnzf 2,1b /* loop if --ctr != 0 && byte != 0 */
167 addi r7,r7,1
168 subf r3,r3,r7 /* number of bytes we have looked at */
169 beqlr /* return if we found a 0 byte */
170 cmpw 0,r3,r4 /* did we look at all len bytes? */
171 blt 99f /* if not, must have hit top */
172 addi r3,r4,1 /* return len + 1 to indicate no null found */
173 blr
17499: li r3,0 /* bad address, return 0 */
175 blr
176
177 .section __ex_table,"a"
178 .align 3
179 .llong 1b,99b
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index 709f809f79f1..2d518aa2720a 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -45,10 +45,10 @@
45 45
46#include <asm/uaccess.h> 46#include <asm/uaccess.h>
47#include <asm/vio.h> 47#include <asm/vio.h>
48#include <asm/iSeries/HvTypes.h> 48#include <asm/iseries/hv_types.h>
49#include <asm/iSeries/HvLpEvent.h> 49#include <asm/iseries/hv_lp_event.h>
50#include <asm/iSeries/HvLpConfig.h> 50#include <asm/iseries/hv_lp_config.h>
51#include <asm/iSeries/vio.h> 51#include <asm/iseries/vio.h>
52 52
53MODULE_DESCRIPTION("iSeries Virtual DASD"); 53MODULE_DESCRIPTION("iSeries Virtual DASD");
54MODULE_AUTHOR("Dave Boutcher"); 54MODULE_AUTHOR("Dave Boutcher");
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 36f31d202223..b5191780ecca 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -46,9 +46,9 @@
46 46
47#include <asm/vio.h> 47#include <asm/vio.h>
48#include <asm/scatterlist.h> 48#include <asm/scatterlist.h>
49#include <asm/iSeries/HvTypes.h> 49#include <asm/iseries/hv_types.h>
50#include <asm/iSeries/HvLpEvent.h> 50#include <asm/iseries/hv_lp_event.h>
51#include <asm/iSeries/vio.h> 51#include <asm/iseries/vio.h>
52 52
53#define VIOCD_DEVICE "iseries/vcd" 53#define VIOCD_DEVICE "iseries/vcd"
54#define VIOCD_DEVICE_DEVFS "iseries/vcd" 54#define VIOCD_DEVICE_DEVFS "iseries/vcd"
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 44f5fb4a46ef..98601c7d04a9 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -44,12 +44,12 @@
44#include <linux/tty_flip.h> 44#include <linux/tty_flip.h>
45#include <linux/sysrq.h> 45#include <linux/sysrq.h>
46 46
47#include <asm/iSeries/vio.h> 47#include <asm/iseries/vio.h>
48 48
49#include <asm/iSeries/HvLpEvent.h> 49#include <asm/iseries/hv_lp_event.h>
50#include <asm/iSeries/HvCallEvent.h> 50#include <asm/iseries/hv_call_event.h>
51#include <asm/iSeries/HvLpConfig.h> 51#include <asm/iseries/hv_lp_config.h>
52#include <asm/iSeries/HvCall.h> 52#include <asm/iseries/hv_call.h>
53 53
54#ifdef CONFIG_VT 54#ifdef CONFIG_VT
55#error You must turn off CONFIG_VT to use CONFIG_VIOCONS 55#error You must turn off CONFIG_VT to use CONFIG_VIOCONS
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 51abd3defc1c..867cc4e418c7 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -29,7 +29,7 @@
29 * 29 *
30 * All tape operations are performed by sending messages back and forth to 30 * All tape operations are performed by sending messages back and forth to
31 * the OS/400 partition. The format of the messages is defined in 31 * the OS/400 partition. The format of the messages is defined in
32 * iSeries/vio.h 32 * iseries/vio.h
33 */ 33 */
34#include <linux/config.h> 34#include <linux/config.h>
35#include <linux/version.h> 35#include <linux/version.h>
@@ -54,10 +54,10 @@
54#include <asm/ioctls.h> 54#include <asm/ioctls.h>
55 55
56#include <asm/vio.h> 56#include <asm/vio.h>
57#include <asm/iSeries/vio.h> 57#include <asm/iseries/vio.h>
58#include <asm/iSeries/HvLpEvent.h> 58#include <asm/iseries/hv_lp_event.h>
59#include <asm/iSeries/HvCallEvent.h> 59#include <asm/iseries/hv_call_event.h>
60#include <asm/iSeries/HvLpConfig.h> 60#include <asm/iseries/hv_lp_config.h>
61 61
62#define VIOTAPE_VERSION "1.2" 62#define VIOTAPE_VERSION "1.2"
63#define VIOTAPE_MAXREQ 1 63#define VIOTAPE_MAXREQ 1
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 91920a1140fa..9bc6cc6e3845 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -155,10 +155,10 @@ static spinlock_t pmu_lock;
155static u8 pmu_intr_mask; 155static u8 pmu_intr_mask;
156static int pmu_version; 156static int pmu_version;
157static int drop_interrupts; 157static int drop_interrupts;
158#ifdef CONFIG_PM 158#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
159static int option_lid_wakeup = 1; 159static int option_lid_wakeup = 1;
160static int sleep_in_progress; 160static int sleep_in_progress;
161#endif /* CONFIG_PM */ 161#endif /* CONFIG_PM && CONFIG_PPC32 */
162static unsigned long async_req_locks; 162static unsigned long async_req_locks;
163static unsigned int pmu_irq_stats[11]; 163static unsigned int pmu_irq_stats[11];
164 164
@@ -865,7 +865,7 @@ proc_read_options(char *page, char **start, off_t off,
865{ 865{
866 char *p = page; 866 char *p = page;
867 867
868#ifdef CONFIG_PM 868#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
869 if (pmu_kind == PMU_KEYLARGO_BASED && 869 if (pmu_kind == PMU_KEYLARGO_BASED &&
870 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) 870 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
871 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup); 871 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup);
@@ -906,7 +906,7 @@ proc_write_options(struct file *file, const char __user *buffer,
906 *(val++) = 0; 906 *(val++) = 0;
907 while(*val == ' ') 907 while(*val == ' ')
908 val++; 908 val++;
909#ifdef CONFIG_PM 909#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
910 if (pmu_kind == PMU_KEYLARGO_BASED && 910 if (pmu_kind == PMU_KEYLARGO_BASED &&
911 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) 911 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
912 if (!strcmp(label, "lid_wakeup")) 912 if (!strcmp(label, "lid_wakeup"))
@@ -2063,6 +2063,9 @@ pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
2063 n->list.next = NULL; 2063 n->list.next = NULL;
2064 return 0; 2064 return 0;
2065} 2065}
2066#endif /* CONFIG_PM */
2067
2068#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
2066 2069
2067/* Sleep is broadcast last-to-first */ 2070/* Sleep is broadcast last-to-first */
2068static int 2071static int
@@ -2687,7 +2690,7 @@ powerbook_sleep_3400(void)
2687 return 0; 2690 return 0;
2688} 2691}
2689 2692
2690#endif /* CONFIG_PM */ 2693#endif /* CONFIG_PM && CONFIG_PPC32 */
2691 2694
2692/* 2695/*
2693 * Support for /dev/pmu device 2696 * Support for /dev/pmu device
@@ -2871,7 +2874,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2871 int error = -EINVAL; 2874 int error = -EINVAL;
2872 2875
2873 switch (cmd) { 2876 switch (cmd) {
2874#ifdef CONFIG_PM 2877#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
2875 case PMU_IOC_SLEEP: 2878 case PMU_IOC_SLEEP:
2876 if (!capable(CAP_SYS_ADMIN)) 2879 if (!capable(CAP_SYS_ADMIN))
2877 return -EACCES; 2880 return -EACCES;
@@ -2899,7 +2902,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2899 return put_user(0, argp); 2902 return put_user(0, argp);
2900 else 2903 else
2901 return put_user(1, argp); 2904 return put_user(1, argp);
2902#endif /* CONFIG_PM */ 2905#endif /* CONFIG_PM && CONFIG_PPC32 */
2903 2906
2904#ifdef CONFIG_PMAC_BACKLIGHT 2907#ifdef CONFIG_PMAC_BACKLIGHT
2905 /* Backlight should have its own device or go via 2908 /* Backlight should have its own device or go via
@@ -3047,7 +3050,7 @@ pmu_polled_request(struct adb_request *req)
3047 * to do suspend-to-disk. 3050 * to do suspend-to-disk.
3048 */ 3051 */
3049 3052
3050#ifdef CONFIG_PM 3053#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
3051 3054
3052static int pmu_sys_suspended = 0; 3055static int pmu_sys_suspended = 0;
3053 3056
@@ -3082,7 +3085,7 @@ static int pmu_sys_resume(struct sys_device *sysdev)
3082 return 0; 3085 return 0;
3083} 3086}
3084 3087
3085#endif /* CONFIG_PM */ 3088#endif /* CONFIG_PM && CONFIG_PPC32 */
3086 3089
3087static struct sysdev_class pmu_sysclass = { 3090static struct sysdev_class pmu_sysclass = {
3088 set_kset_name("pmu"), 3091 set_kset_name("pmu"),
@@ -3094,10 +3097,10 @@ static struct sys_device device_pmu = {
3094}; 3097};
3095 3098
3096static struct sysdev_driver driver_pmu = { 3099static struct sysdev_driver driver_pmu = {
3097#ifdef CONFIG_PM 3100#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
3098 .suspend = &pmu_sys_suspend, 3101 .suspend = &pmu_sys_suspend,
3099 .resume = &pmu_sys_resume, 3102 .resume = &pmu_sys_resume,
3100#endif /* CONFIG_PM */ 3103#endif /* CONFIG_PM && CONFIG_PPC32 */
3101}; 3104};
3102 3105
3103static int __init init_pmu_sysfs(void) 3106static int __init init_pmu_sysfs(void)
@@ -3135,12 +3138,12 @@ EXPORT_SYMBOL(pmu_i2c_combined_read);
3135EXPORT_SYMBOL(pmu_i2c_stdsub_write); 3138EXPORT_SYMBOL(pmu_i2c_stdsub_write);
3136EXPORT_SYMBOL(pmu_i2c_simple_read); 3139EXPORT_SYMBOL(pmu_i2c_simple_read);
3137EXPORT_SYMBOL(pmu_i2c_simple_write); 3140EXPORT_SYMBOL(pmu_i2c_simple_write);
3138#ifdef CONFIG_PM 3141#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
3139EXPORT_SYMBOL(pmu_register_sleep_notifier); 3142EXPORT_SYMBOL(pmu_register_sleep_notifier);
3140EXPORT_SYMBOL(pmu_unregister_sleep_notifier); 3143EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
3141EXPORT_SYMBOL(pmu_enable_irled); 3144EXPORT_SYMBOL(pmu_enable_irled);
3142EXPORT_SYMBOL(pmu_battery_count); 3145EXPORT_SYMBOL(pmu_battery_count);
3143EXPORT_SYMBOL(pmu_batteries); 3146EXPORT_SYMBOL(pmu_batteries);
3144EXPORT_SYMBOL(pmu_power_flags); 3147EXPORT_SYMBOL(pmu_power_flags);
3145#endif /* CONFIG_PM */ 3148#endif /* CONFIG_PM && CONFIG_PPC32 */
3146 3149
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index f5ea39ff1017..d86d8f055a6c 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -72,12 +72,12 @@
72#include <linux/ethtool.h> 72#include <linux/ethtool.h>
73 73
74#include <asm/abs_addr.h> 74#include <asm/abs_addr.h>
75#include <asm/iSeries/mf.h> 75#include <asm/iseries/mf.h>
76#include <asm/uaccess.h> 76#include <asm/uaccess.h>
77 77
78#include <asm/iSeries/HvLpConfig.h> 78#include <asm/iseries/hv_lp_config.h>
79#include <asm/iSeries/HvTypes.h> 79#include <asm/iseries/hv_types.h>
80#include <asm/iSeries/HvLpEvent.h> 80#include <asm/iseries/hv_lp_event.h>
81#include <asm/iommu.h> 81#include <asm/iommu.h>
82#include <asm/vio.h> 82#include <asm/vio.h>
83 83
diff --git a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c
index e9202f2a8276..1045872b0175 100644
--- a/drivers/scsi/ibmvscsi/iseries_vscsi.c
+++ b/drivers/scsi/ibmvscsi/iseries_vscsi.c
@@ -28,10 +28,10 @@
28 * hypervisor system or a converged hypervisor system. 28 * hypervisor system or a converged hypervisor system.
29 */ 29 */
30 30
31#include <asm/iSeries/vio.h> 31#include <asm/iseries/vio.h>
32#include <asm/iSeries/HvLpEvent.h> 32#include <asm/iseries/hv_lp_event.h>
33#include <asm/iSeries/HvTypes.h> 33#include <asm/iseries/hv_types.h>
34#include <asm/iSeries/HvLpConfig.h> 34#include <asm/iseries/hv_lp_config.h>
35#include <asm/vio.h> 35#include <asm/vio.h>
36#include <linux/device.h> 36#include <linux/device.h>
37#include "ibmvscsi.h" 37#include "ibmvscsi.h"
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h
new file mode 100644
index 000000000000..dc25c53704d5
--- /dev/null
+++ b/include/asm-powerpc/bitops.h
@@ -0,0 +1,437 @@
1/*
2 * PowerPC atomic bit operations.
3 *
4 * Merged version by David Gibson <david@gibson.dropbear.id.au>.
5 * Based on ppc64 versions by: Dave Engebretsen, Todd Inglett, Don
6 * Reed, Pat McCarthy, Peter Bergner, Anton Blanchard. They
7 * originally took it from the ppc32 code.
8 *
9 * Within a word, bits are numbered LSB first. Lot's of places make
10 * this assumption by directly testing bits with (val & (1<<nr)).
11 * This can cause confusion for large (> 1 word) bitmaps on a
12 * big-endian system because, unlike little endian, the number of each
13 * bit depends on the word size.
14 *
15 * The bitop functions are defined to work on unsigned longs, so for a
16 * ppc64 system the bits end up numbered:
17 * |63..............0|127............64|191...........128|255...........196|
18 * and on ppc32:
19 * |31.....0|63....31|95....64|127...96|159..128|191..160|223..192|255..224|
20 *
21 * There are a few little-endian macros used mostly for filesystem
22 * bitmaps, these work on similar bit arrays layouts, but
23 * byte-oriented:
24 * |7...0|15...8|23...16|31...24|39...32|47...40|55...48|63...56|
25 *
26 * The main difference is that bit 3-5 (64b) or 3-4 (32b) in the bit
27 * number field needs to be reversed compared to the big-endian bit
28 * fields. This can be achieved by XOR with 0x38 (64b) or 0x18 (32b).
29 *
30 * This program is free software; you can redistribute it and/or
31 * modify it under the terms of the GNU General Public License
32 * as published by the Free Software Foundation; either version
33 * 2 of the License, or (at your option) any later version.
34 */
35
36#ifndef _ASM_POWERPC_BITOPS_H
37#define _ASM_POWERPC_BITOPS_H
38
39#ifdef __KERNEL__
40
41#include <linux/compiler.h>
42#include <asm/atomic.h>
43#include <asm/synch.h>
44
45/*
46 * clear_bit doesn't imply a memory barrier
47 */
48#define smp_mb__before_clear_bit() smp_mb()
49#define smp_mb__after_clear_bit() smp_mb()
50
51#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
52#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
53#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
54
55#ifdef CONFIG_PPC64
56#define LARXL "ldarx"
57#define STCXL "stdcx."
58#define CNTLZL "cntlzd"
59#else
60#define LARXL "lwarx"
61#define STCXL "stwcx."
62#define CNTLZL "cntlzw"
63#endif
64
65static __inline__ void set_bit(int nr, volatile unsigned long *addr)
66{
67 unsigned long old;
68 unsigned long mask = BITOP_MASK(nr);
69 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
70
71 __asm__ __volatile__(
72"1:" LARXL " %0,0,%3 # set_bit\n"
73 "or %0,%0,%2\n"
74 PPC405_ERR77(0,%3)
75 STCXL " %0,0,%3\n"
76 "bne- 1b"
77 : "=&r"(old), "=m"(*p)
78 : "r"(mask), "r"(p), "m"(*p)
79 : "cc" );
80}
81
82static __inline__ void clear_bit(int nr, volatile unsigned long *addr)
83{
84 unsigned long old;
85 unsigned long mask = BITOP_MASK(nr);
86 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
87
88 __asm__ __volatile__(
89"1:" LARXL " %0,0,%3 # set_bit\n"
90 "andc %0,%0,%2\n"
91 PPC405_ERR77(0,%3)
92 STCXL " %0,0,%3\n"
93 "bne- 1b"
94 : "=&r"(old), "=m"(*p)
95 : "r"(mask), "r"(p), "m"(*p)
96 : "cc" );
97}
98
99static __inline__ void change_bit(int nr, volatile unsigned long *addr)
100{
101 unsigned long old;
102 unsigned long mask = BITOP_MASK(nr);
103 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
104
105 __asm__ __volatile__(
106"1:" LARXL " %0,0,%3 # set_bit\n"
107 "xor %0,%0,%2\n"
108 PPC405_ERR77(0,%3)
109 STCXL " %0,0,%3\n"
110 "bne- 1b"
111 : "=&r"(old), "=m"(*p)
112 : "r"(mask), "r"(p), "m"(*p)
113 : "cc" );
114}
115
116static __inline__ int test_and_set_bit(unsigned long nr,
117 volatile unsigned long *addr)
118{
119 unsigned long old, t;
120 unsigned long mask = BITOP_MASK(nr);
121 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
122
123 __asm__ __volatile__(
124 EIEIO_ON_SMP
125"1:" LARXL " %0,0,%3 # test_and_set_bit\n"
126 "or %1,%0,%2 \n"
127 PPC405_ERR77(0,%3)
128 STCXL " %1,0,%3 \n"
129 "bne- 1b"
130 ISYNC_ON_SMP
131 : "=&r" (old), "=&r" (t)
132 : "r" (mask), "r" (p)
133 : "cc", "memory");
134
135 return (old & mask) != 0;
136}
137
138static __inline__ int test_and_clear_bit(unsigned long nr,
139 volatile unsigned long *addr)
140{
141 unsigned long old, t;
142 unsigned long mask = BITOP_MASK(nr);
143 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
144
145 __asm__ __volatile__(
146 EIEIO_ON_SMP
147"1:" LARXL " %0,0,%3 # test_and_clear_bit\n"
148 "andc %1,%0,%2 \n"
149 PPC405_ERR77(0,%3)
150 STCXL " %1,0,%3 \n"
151 "bne- 1b"
152 ISYNC_ON_SMP
153 : "=&r" (old), "=&r" (t)
154 : "r" (mask), "r" (p)
155 : "cc", "memory");
156
157 return (old & mask) != 0;
158}
159
160static __inline__ int test_and_change_bit(unsigned long nr,
161 volatile unsigned long *addr)
162{
163 unsigned long old, t;
164 unsigned long mask = BITOP_MASK(nr);
165 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
166
167 __asm__ __volatile__(
168 EIEIO_ON_SMP
169"1:" LARXL " %0,0,%3 # test_and_change_bit\n"
170 "xor %1,%0,%2 \n"
171 PPC405_ERR77(0,%3)
172 STCXL " %1,0,%3 \n"
173 "bne- 1b"
174 ISYNC_ON_SMP
175 : "=&r" (old), "=&r" (t)
176 : "r" (mask), "r" (p)
177 : "cc", "memory");
178
179 return (old & mask) != 0;
180}
181
182static __inline__ void set_bits(unsigned long mask, unsigned long *addr)
183{
184 unsigned long old;
185
186 __asm__ __volatile__(
187"1:" LARXL " %0,0,%3 # set_bit\n"
188 "or %0,%0,%2\n"
189 STCXL " %0,0,%3\n"
190 "bne- 1b"
191 : "=&r" (old), "=m" (*addr)
192 : "r" (mask), "r" (addr), "m" (*addr)
193 : "cc");
194}
195
196/* Non-atomic versions */
197static __inline__ int test_bit(unsigned long nr,
198 __const__ volatile unsigned long *addr)
199{
200 return 1UL & (addr[BITOP_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
201}
202
203static __inline__ void __set_bit(unsigned long nr,
204 volatile unsigned long *addr)
205{
206 unsigned long mask = BITOP_MASK(nr);
207 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
208
209 *p |= mask;
210}
211
212static __inline__ void __clear_bit(unsigned long nr,
213 volatile unsigned long *addr)
214{
215 unsigned long mask = BITOP_MASK(nr);
216 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
217
218 *p &= ~mask;
219}
220
221static __inline__ void __change_bit(unsigned long nr,
222 volatile unsigned long *addr)
223{
224 unsigned long mask = BITOP_MASK(nr);
225 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
226
227 *p ^= mask;
228}
229
230static __inline__ int __test_and_set_bit(unsigned long nr,
231 volatile unsigned long *addr)
232{
233 unsigned long mask = BITOP_MASK(nr);
234 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
235 unsigned long old = *p;
236
237 *p = old | mask;
238 return (old & mask) != 0;
239}
240
241static __inline__ int __test_and_clear_bit(unsigned long nr,
242 volatile unsigned long *addr)
243{
244 unsigned long mask = BITOP_MASK(nr);
245 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
246 unsigned long old = *p;
247
248 *p = old & ~mask;
249 return (old & mask) != 0;
250}
251
252static __inline__ int __test_and_change_bit(unsigned long nr,
253 volatile unsigned long *addr)
254{
255 unsigned long mask = BITOP_MASK(nr);
256 unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
257 unsigned long old = *p;
258
259 *p = old ^ mask;
260 return (old & mask) != 0;
261}
262
263/*
264 * Return the zero-based bit position (LE, not IBM bit numbering) of
265 * the most significant 1-bit in a double word.
266 */
267static __inline__ int __ilog2(unsigned long x)
268{
269 int lz;
270
271 asm (CNTLZL " %0,%1" : "=r" (lz) : "r" (x));
272 return BITS_PER_LONG - 1 - lz;
273}
274
275/*
276 * Determines the bit position of the least significant 0 bit in the
277 * specified double word. The returned bit position will be
278 * zero-based, starting from the right side (63/31 - 0).
279 */
280static __inline__ unsigned long ffz(unsigned long x)
281{
282 /* no zero exists anywhere in the 8 byte area. */
283 if ((x = ~x) == 0)
284 return BITS_PER_LONG;
285
286 /*
287 * Calculate the bit position of the least signficant '1' bit in x
288 * (since x has been changed this will actually be the least signficant
289 * '0' bit in * the original x). Note: (x & -x) gives us a mask that
290 * is the least significant * (RIGHT-most) 1-bit of the value in x.
291 */
292 return __ilog2(x & -x);
293}
294
295static __inline__ int __ffs(unsigned long x)
296{
297 return __ilog2(x & -x);
298}
299
300/*
301 * ffs: find first bit set. This is defined the same way as
302 * the libc and compiler builtin ffs routines, therefore
303 * differs in spirit from the above ffz (man ffs).
304 */
305static __inline__ int ffs(int x)
306{
307 unsigned long i = (unsigned long)x;
308 return __ilog2(i & -i) + 1;
309}
310
311/*
312 * fls: find last (most-significant) bit set.
313 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
314 */
315static __inline__ int fls(unsigned int x)
316{
317 int lz;
318
319 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
320 return 32 - lz;
321}
322
323/*
324 * hweightN: returns the hamming weight (i.e. the number
325 * of bits set) of a N-bit word
326 */
327#define hweight64(x) generic_hweight64(x)
328#define hweight32(x) generic_hweight32(x)
329#define hweight16(x) generic_hweight16(x)
330#define hweight8(x) generic_hweight8(x)
331
332#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
333unsigned long find_next_zero_bit(const unsigned long *addr,
334 unsigned long size, unsigned long offset);
335/**
336 * find_first_bit - find the first set bit in a memory region
337 * @addr: The address to start the search at
338 * @size: The maximum size to search
339 *
340 * Returns the bit-number of the first set bit, not the number of the byte
341 * containing a bit.
342 */
343#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
344unsigned long find_next_bit(const unsigned long *addr,
345 unsigned long size, unsigned long offset);
346
347/* Little-endian versions */
348
349static __inline__ int test_le_bit(unsigned long nr,
350 __const__ unsigned long *addr)
351{
352 __const__ unsigned char *tmp = (__const__ unsigned char *) addr;
353 return (tmp[nr >> 3] >> (nr & 7)) & 1;
354}
355
356#define __set_le_bit(nr, addr) \
357 __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
358#define __clear_le_bit(nr, addr) \
359 __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
360
361#define test_and_set_le_bit(nr, addr) \
362 test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
363#define test_and_clear_le_bit(nr, addr) \
364 test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
365
366#define __test_and_set_le_bit(nr, addr) \
367 __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
368#define __test_and_clear_le_bit(nr, addr) \
369 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
370
371#define find_first_zero_le_bit(addr, size) find_next_zero_le_bit((addr), (size), 0)
372unsigned long find_next_zero_le_bit(const unsigned long *addr,
373 unsigned long size, unsigned long offset);
374
375/* Bitmap functions for the ext2 filesystem */
376
377#define ext2_set_bit(nr,addr) \
378 __test_and_set_le_bit((nr), (unsigned long*)addr)
379#define ext2_clear_bit(nr, addr) \
380 __test_and_clear_le_bit((nr), (unsigned long*)addr)
381
382#define ext2_set_bit_atomic(lock, nr, addr) \
383 test_and_set_le_bit((nr), (unsigned long*)addr)
384#define ext2_clear_bit_atomic(lock, nr, addr) \
385 test_and_clear_le_bit((nr), (unsigned long*)addr)
386
387#define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr)
388
389#define ext2_find_first_zero_bit(addr, size) \
390 find_first_zero_le_bit((unsigned long*)addr, size)
391#define ext2_find_next_zero_bit(addr, size, off) \
392 find_next_zero_le_bit((unsigned long*)addr, size, off)
393
394/* Bitmap functions for the minix filesystem. */
395
396#define minix_test_and_set_bit(nr,addr) \
397 __test_and_set_le_bit(nr, (unsigned long *)addr)
398#define minix_set_bit(nr,addr) \
399 __set_le_bit(nr, (unsigned long *)addr)
400#define minix_test_and_clear_bit(nr,addr) \
401 __test_and_clear_le_bit(nr, (unsigned long *)addr)
402#define minix_test_bit(nr,addr) \
403 test_le_bit(nr, (unsigned long *)addr)
404
405#define minix_find_first_zero_bit(addr,size) \
406 find_first_zero_le_bit((unsigned long *)addr, size)
407
408/*
409 * Every architecture must define this function. It's the fastest
410 * way of searching a 140-bit bitmap where the first 100 bits are
411 * unlikely to be set. It's guaranteed that at least one of the 140
412 * bits is cleared.
413 */
414static inline int sched_find_first_bit(const unsigned long *b)
415{
416#ifdef CONFIG_PPC64
417 if (unlikely(b[0]))
418 return __ffs(b[0]);
419 if (unlikely(b[1]))
420 return __ffs(b[1]) + 64;
421 return __ffs(b[2]) + 128;
422#else
423 if (unlikely(b[0]))
424 return __ffs(b[0]);
425 if (unlikely(b[1]))
426 return __ffs(b[1]) + 32;
427 if (unlikely(b[2]))
428 return __ffs(b[2]) + 64;
429 if (b[3])
430 return __ffs(b[3]) + 96;
431 return __ffs(b[4]) + 128;
432#endif
433}
434
435#endif /* __KERNEL__ */
436
437#endif /* _ASM_POWERPC_BITOPS_H */
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h
index e4d028e87020..d625ee55f957 100644
--- a/include/asm-powerpc/bug.h
+++ b/include/asm-powerpc/bug.h
@@ -12,20 +12,16 @@
12#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
13 13
14#ifdef __powerpc64__ 14#ifdef __powerpc64__
15#define BUG_TABLE_ENTRY(label, line, file, func) \ 15#define BUG_TABLE_ENTRY ".llong"
16 ".llong " #label "\n .long " #line "\n .llong " #file ", " #func "\n" 16#define BUG_TRAP_OP "tdnei"
17#define TRAP_OP(ra, rb) "1: tdnei " #ra ", " #rb "\n"
18#define DATA_TYPE long long
19#else 17#else
20#define BUG_TABLE_ENTRY(label, line, file, func) \ 18#define BUG_TABLE_ENTRY ".long"
21 ".long " #label ", " #line ", " #file ", " #func "\n" 19#define BUG_TRAP_OP "twnei"
22#define TRAP_OP(ra, rb) "1: twnei " #ra ", " #rb "\n"
23#define DATA_TYPE int
24#endif /* __powerpc64__ */ 20#endif /* __powerpc64__ */
25 21
26struct bug_entry { 22struct bug_entry {
27 unsigned long bug_addr; 23 unsigned long bug_addr;
28 int line; 24 long line;
29 const char *file; 25 const char *file;
30 const char *function; 26 const char *function;
31}; 27};
@@ -43,29 +39,29 @@ struct bug_entry *find_bug(unsigned long bugaddr);
43#define BUG() do { \ 39#define BUG() do { \
44 __asm__ __volatile__( \ 40 __asm__ __volatile__( \
45 "1: twi 31,0,0\n" \ 41 "1: twi 31,0,0\n" \
46 ".section __bug_table,\"a\"\n\t" \ 42 ".section __bug_table,\"a\"\n" \
47 BUG_TABLE_ENTRY(1b,%0,%1,%2) \ 43 "\t"BUG_TABLE_ENTRY" 1b,%0,%1,%2\n" \
48 ".previous" \ 44 ".previous" \
49 : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \ 45 : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \
50} while (0) 46} while (0)
51 47
52#define BUG_ON(x) do { \ 48#define BUG_ON(x) do { \
53 __asm__ __volatile__( \ 49 __asm__ __volatile__( \
54 TRAP_OP(%0,0) \ 50 "1: "BUG_TRAP_OP" %0,0\n" \
55 ".section __bug_table,\"a\"\n\t" \ 51 ".section __bug_table,\"a\"\n" \
56 BUG_TABLE_ENTRY(1b,%1,%2,%3) \ 52 "\t"BUG_TABLE_ENTRY" 1b,%1,%2,%3\n" \
57 ".previous" \ 53 ".previous" \
58 : : "r" ((DATA_TYPE)(x)), "i" (__LINE__), \ 54 : : "r" ((long)(x)), "i" (__LINE__), \
59 "i" (__FILE__), "i" (__FUNCTION__)); \ 55 "i" (__FILE__), "i" (__FUNCTION__)); \
60} while (0) 56} while (0)
61 57
62#define WARN_ON(x) do { \ 58#define WARN_ON(x) do { \
63 __asm__ __volatile__( \ 59 __asm__ __volatile__( \
64 TRAP_OP(%0,0) \ 60 "1: "BUG_TRAP_OP" %0,0\n" \
65 ".section __bug_table,\"a\"\n\t" \ 61 ".section __bug_table,\"a\"\n" \
66 BUG_TABLE_ENTRY(1b,%1,%2,%3) \ 62 "\t"BUG_TABLE_ENTRY" 1b,%1,%2,%3\n" \
67 ".previous" \ 63 ".previous" \
68 : : "r" ((DATA_TYPE)(x)), \ 64 : : "r" ((long)(x)), \
69 "i" (__LINE__ + BUG_WARNING_TRAP), \ 65 "i" (__LINE__ + BUG_WARNING_TRAP), \
70 "i" (__FILE__), "i" (__FUNCTION__)); \ 66 "i" (__FILE__), "i" (__FUNCTION__)); \
71} while (0) 67} while (0)
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h
index d22b10021b5d..d140577d0a05 100644
--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -178,18 +178,22 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
178static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, 178static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
179 struct pt_regs *regs) 179 struct pt_regs *regs)
180{ 180{
181 int i; 181 int i, nregs;
182 int gprs = sizeof(struct pt_regs)/sizeof(ELF_GREG_TYPE);
183 182
184 if (gprs > ELF_NGREG) 183 memset((void *)elf_regs, 0, sizeof(elf_gregset_t));
185 gprs = ELF_NGREG;
186 184
187 for (i=0; i < gprs; i++) 185 /* Our registers are always unsigned longs, whether we're a 32 bit
188 elf_regs[i] = (elf_greg_t)((ELF_GREG_TYPE *)regs)[i]; 186 * process or 64 bit, on either a 64 bit or 32 bit kernel.
189 187 * Don't use ELF_GREG_TYPE here. */
190 memset((char *)(elf_regs) + sizeof(struct pt_regs), 0, \ 188 nregs = sizeof(struct pt_regs) / sizeof(unsigned long);
191 sizeof(elf_gregset_t) - sizeof(struct pt_regs)); 189 if (nregs > ELF_NGREG)
190 nregs = ELF_NGREG;
192 191
192 for (i = 0; i < nregs; i++) {
193 /* This will correctly truncate 64 bit registers to 32 bits
194 * for a 32 bit process on a 64 bit kernel. */
195 elf_regs[i] = (elf_greg_t)((ELF_GREG_TYPE *)regs)[i];
196 }
193} 197}
194#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs); 198#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
195 199
diff --git a/include/asm-ppc64/futex.h b/include/asm-powerpc/futex.h
index 266b460de44e..37c94e52ab6d 100644
--- a/include/asm-ppc64/futex.h
+++ b/include/asm-powerpc/futex.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_FUTEX_H 1#ifndef _ASM_POWERPC_FUTEX_H
2#define _ASM_FUTEX_H 2#define _ASM_POWERPC_FUTEX_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
@@ -7,28 +7,29 @@
7#include <asm/errno.h> 7#include <asm/errno.h>
8#include <asm/synch.h> 8#include <asm/synch.h>
9#include <asm/uaccess.h> 9#include <asm/uaccess.h>
10#include <asm/ppc_asm.h>
10 11
11#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ 12#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
12 __asm__ __volatile (SYNC_ON_SMP \ 13 __asm__ __volatile ( \
13"1: lwarx %0,0,%2\n" \ 14 SYNC_ON_SMP \
14 insn \ 15"1: lwarx %0,0,%2\n" \
15"2: stwcx. %1,0,%2\n\ 16 insn \
16 bne- 1b\n\ 17"2: stwcx. %1,0,%2\n" \
17 li %1,0\n\ 18 "bne- 1b\n" \
183: .section .fixup,\"ax\"\n\ 19 "li %1,0\n" \
194: li %1,%3\n\ 20"3: .section .fixup,\"ax\"\n" \
20 b 3b\n\ 21"4: li %1,%3\n" \
21 .previous\n\ 22 "b 3b\n" \
22 .section __ex_table,\"a\"\n\ 23 ".previous\n" \
23 .align 3\n\ 24 ".section __ex_table,\"a\"\n" \
24 .llong 1b,4b,2b,4b\n\ 25 ".align 3\n" \
25 .previous" \ 26 DATAL " 1b,4b,2b,4b\n" \
26 : "=&r" (oldval), "=&r" (ret) \ 27 ".previous" \
27 : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \ 28 : "=&r" (oldval), "=&r" (ret) \
29 : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \
28 : "cr0", "memory") 30 : "cr0", "memory")
29 31
30static inline int 32static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
31futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
32{ 33{
33 int op = (encoded_op >> 28) & 7; 34 int op = (encoded_op >> 28) & 7;
34 int cmp = (encoded_op >> 24) & 15; 35 int cmp = (encoded_op >> 24) & 15;
@@ -79,5 +80,5 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
79 return ret; 80 return ret;
80} 81}
81 82
82#endif 83#endif /* __KERNEL__ */
83#endif 84#endif /* _ASM_POWERPC_FUTEX_H */
diff --git a/include/asm-powerpc/ioctls.h b/include/asm-powerpc/ioctls.h
index 5b94ff489b8b..279a6229584b 100644
--- a/include/asm-powerpc/ioctls.h
+++ b/include/asm-powerpc/ioctls.h
@@ -62,6 +62,9 @@
62# define TIOCM_DSR 0x100 62# define TIOCM_DSR 0x100
63# define TIOCM_CD TIOCM_CAR 63# define TIOCM_CD TIOCM_CAR
64# define TIOCM_RI TIOCM_RNG 64# define TIOCM_RI TIOCM_RNG
65#define TIOCM_OUT1 0x2000
66#define TIOCM_OUT2 0x4000
67#define TIOCM_LOOP 0x8000
65 68
66#define TIOCGSOFTCAR 0x5419 69#define TIOCGSOFTCAR 0x5419
67#define TIOCSSOFTCAR 0x541A 70#define TIOCSSOFTCAR 0x541A
diff --git a/include/asm-powerpc/ipcbuf.h b/include/asm-powerpc/ipcbuf.h
new file mode 100644
index 000000000000..2c3e1d94db1d
--- /dev/null
+++ b/include/asm-powerpc/ipcbuf.h
@@ -0,0 +1,34 @@
1#ifndef _ASM_POWERPC_IPCBUF_H
2#define _ASM_POWERPC_IPCBUF_H
3
4/*
5 * The ipc64_perm structure for the powerpc is identical to
6 * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the
7 * kernel. Note extra padding because this structure is passed back
8 * and forth between kernel and user space. Pad space is left for:
9 * - 1 32-bit value to fill up for 8-byte alignment
10 * - 2 miscellaneous 64-bit values
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
16 */
17
18#include <linux/types.h>
19
20struct ipc64_perm
21{
22 __kernel_key_t key;
23 __kernel_uid_t uid;
24 __kernel_gid_t gid;
25 __kernel_uid_t cuid;
26 __kernel_gid_t cgid;
27 __kernel_mode_t mode;
28 unsigned int seq;
29 unsigned int __pad1;
30 unsigned long long __unused1;
31 unsigned long long __unused2;
32};
33
34#endif /* _ASM_POWERPC_IPCBUF_H */
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index c7c3f912a3c2..b3935ea28fff 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -73,7 +73,7 @@ extern unsigned int real_irq_to_virt_slowpath(unsigned int real_irq);
73#define IC_INVALID 0 73#define IC_INVALID 0
74#define IC_OPEN_PIC 1 74#define IC_OPEN_PIC 1
75#define IC_PPC_XIC 2 75#define IC_PPC_XIC 2
76#define IC_BPA_IIC 3 76#define IC_CELL_PIC 3
77#define IC_ISERIES 4 77#define IC_ISERIES 4
78 78
79extern u64 ppc64_interrupt_controller; 79extern u64 ppc64_interrupt_controller;
diff --git a/include/asm-ppc64/iSeries/HvCall.h b/include/asm-powerpc/iseries/hv_call.h
index c3f19475c0d9..e9f831c9a5e5 100644
--- a/include/asm-ppc64/iSeries/HvCall.h
+++ b/include/asm-powerpc/iseries/hv_call.h
@@ -20,11 +20,11 @@
20 * This file contains the "hypervisor call" interface which is used to 20 * This file contains the "hypervisor call" interface which is used to
21 * drive the hypervisor from the OS. 21 * drive the hypervisor from the OS.
22 */ 22 */
23#ifndef _HVCALL_H 23#ifndef _ASM_POWERPC_ISERIES_HV_CALL_H
24#define _HVCALL_H 24#define _ASM_POWERPC_ISERIES_HV_CALL_H
25 25
26#include <asm/iSeries/HvCallSc.h> 26#include <asm/iseries/hv_call_sc.h>
27#include <asm/iSeries/HvTypes.h> 27#include <asm/iseries/hv_types.h>
28#include <asm/paca.h> 28#include <asm/paca.h>
29 29
30/* Type of yield for HvCallBaseYieldProcessor */ 30/* Type of yield for HvCallBaseYieldProcessor */
@@ -110,4 +110,4 @@ static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
110 HvCall1(HvCallBaseSendIPI, targetPaca->paca_index); 110 HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
111} 111}
112 112
113#endif /* _HVCALL_H */ 113#endif /* _ASM_POWERPC_ISERIES_HV_CALL_H */
diff --git a/include/asm-ppc64/iSeries/HvCallEvent.h b/include/asm-powerpc/iseries/hv_call_event.h
index 5d9a327d0122..46763a30590a 100644
--- a/include/asm-ppc64/iSeries/HvCallEvent.h
+++ b/include/asm-powerpc/iseries/hv_call_event.h
@@ -20,11 +20,11 @@
20 * This file contains the "hypervisor call" interface which is used to 20 * This file contains the "hypervisor call" interface which is used to
21 * drive the hypervisor from the OS. 21 * drive the hypervisor from the OS.
22 */ 22 */
23#ifndef _HVCALLEVENT_H 23#ifndef _ASM_POWERPC_ISERIES_HV_CALL_EVENT_H
24#define _HVCALLEVENT_H 24#define _ASM_POWERPC_ISERIES_HV_CALL_EVENT_H
25 25
26#include <asm/iSeries/HvCallSc.h> 26#include <asm/iseries/hv_call_sc.h>
27#include <asm/iSeries/HvTypes.h> 27#include <asm/iseries/hv_types.h>
28#include <asm/abs_addr.h> 28#include <asm/abs_addr.h>
29 29
30struct HvLpEvent; 30struct HvLpEvent;
@@ -250,4 +250,4 @@ static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
250 return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir); 250 return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir);
251} 251}
252 252
253#endif /* _HVCALLEVENT_H */ 253#endif /* _ASM_POWERPC_ISERIES_HV_CALL_EVENT_H */
diff --git a/include/asm-ppc64/iSeries/HvCallSc.h b/include/asm-powerpc/iseries/hv_call_sc.h
index a62cef3822f9..dec7e9d9ab78 100644
--- a/include/asm-ppc64/iSeries/HvCallSc.h
+++ b/include/asm-powerpc/iseries/hv_call_sc.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _HVCALLSC_H 19#ifndef _ASM_POWERPC_ISERIES_HV_CALL_SC_H
20#define _HVCALLSC_H 20#define _ASM_POWERPC_ISERIES_HV_CALL_SC_H
21 21
22#include <linux/types.h> 22#include <linux/types.h>
23 23
@@ -48,4 +48,4 @@ extern u64 HvCall5Ret16(u64, void *, u64, u64, u64, u64, u64);
48extern u64 HvCall6Ret16(u64, void *, u64, u64, u64, u64, u64, u64); 48extern u64 HvCall6Ret16(u64, void *, u64, u64, u64, u64, u64, u64);
49extern u64 HvCall7Ret16(u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64); 49extern u64 HvCall7Ret16(u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64);
50 50
51#endif /* _HVCALLSC_H */ 51#endif /* _ASM_POWERPC_ISERIES_HV_CALL_SC_H */
diff --git a/include/asm-ppc64/iSeries/HvCallXm.h b/include/asm-powerpc/iseries/hv_call_xm.h
index 8b9ba608daaf..ca9202cb01ed 100644
--- a/include/asm-ppc64/iSeries/HvCallXm.h
+++ b/include/asm-powerpc/iseries/hv_call_xm.h
@@ -2,11 +2,11 @@
2 * This file contains the "hypervisor call" interface which is used to 2 * This file contains the "hypervisor call" interface which is used to
3 * drive the hypervisor from SLIC. 3 * drive the hypervisor from SLIC.
4 */ 4 */
5#ifndef _HVCALLXM_H 5#ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
6#define _HVCALLXM_H 6#define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
7 7
8#include <asm/iSeries/HvCallSc.h> 8#include <asm/iseries/hv_call_sc.h>
9#include <asm/iSeries/HvTypes.h> 9#include <asm/iseries/hv_types.h>
10 10
11#define HvCallXmGetTceTableParms HvCallXm + 0 11#define HvCallXmGetTceTableParms HvCallXm + 0
12#define HvCallXmTestBus HvCallXm + 1 12#define HvCallXmTestBus HvCallXm + 1
@@ -75,4 +75,4 @@ static inline u64 HvCallXm_loadTod(void)
75 return HvCall0(HvCallXmLoadTod); 75 return HvCall0(HvCallXmLoadTod);
76} 76}
77 77
78#endif /* _HVCALLXM_H */ 78#endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-powerpc/iseries/hv_lp_config.h
index f1cf1e70ca3c..bc00f036bca0 100644
--- a/include/asm-ppc64/iSeries/HvLpConfig.h
+++ b/include/asm-powerpc/iseries/hv_lp_config.h
@@ -16,17 +16,17 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _HVLPCONFIG_H 19#ifndef _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H
20#define _HVLPCONFIG_H 20#define _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H
21 21
22/* 22/*
23 * This file contains the interface to the LPAR configuration data 23 * This file contains the interface to the LPAR configuration data
24 * to determine which resources should be allocated to each partition. 24 * to determine which resources should be allocated to each partition.
25 */ 25 */
26 26
27#include <asm/iSeries/HvCallSc.h> 27#include <asm/iseries/hv_call_sc.h>
28#include <asm/iSeries/HvTypes.h> 28#include <asm/iseries/hv_types.h>
29#include <asm/iSeries/ItLpNaca.h> 29#include <asm/iseries/it_lp_naca.h>
30 30
31enum { 31enum {
32 HvCallCfg_Cur = 0, 32 HvCallCfg_Cur = 0,
@@ -135,4 +135,4 @@ static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp)
135 return HvCall1(HvCallCfgGetHostingLpIndex, lp); 135 return HvCall1(HvCallCfgGetHostingLpIndex, lp);
136} 136}
137 137
138#endif /* _HVLPCONFIG_H */ 138#endif /* _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H */
diff --git a/include/asm-ppc64/iSeries/HvLpEvent.h b/include/asm-powerpc/iseries/hv_lp_event.h
index 865000de79b6..499ab1ad0185 100644
--- a/include/asm-ppc64/iSeries/HvLpEvent.h
+++ b/include/asm-powerpc/iseries/hv_lp_event.h
@@ -19,13 +19,13 @@
19 19
20/* This file contains the class for HV events in the system. */ 20/* This file contains the class for HV events in the system. */
21 21
22#ifndef _HVLPEVENT_H 22#ifndef _ASM_POWERPC_ISERIES_HV_LP_EVENT_H
23#define _HVLPEVENT_H 23#define _ASM_POWERPC_ISERIES_HV_LP_EVENT_H
24 24
25#include <asm/types.h> 25#include <asm/types.h>
26#include <asm/ptrace.h> 26#include <asm/ptrace.h>
27#include <asm/iSeries/HvTypes.h> 27#include <asm/iseries/hv_types.h>
28#include <asm/iSeries/HvCallEvent.h> 28#include <asm/iseries/hv_call_event.h>
29 29
30/* 30/*
31 * HvLpEvent is the structure for Lp Event messages passed between 31 * HvLpEvent is the structure for Lp Event messages passed between
@@ -139,4 +139,4 @@ extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
139#define HvLpDma_Rc_InvalidAddress 4 139#define HvLpDma_Rc_InvalidAddress 4
140#define HvLpDma_Rc_InvalidLength 5 140#define HvLpDma_Rc_InvalidLength 5
141 141
142#endif /* _HVLPEVENT_H */ 142#endif /* _ASM_POWERPC_ISERIES_HV_LP_EVENT_H */
diff --git a/include/asm-ppc64/iSeries/HvTypes.h b/include/asm-powerpc/iseries/hv_types.h
index b1ef2b4cb3e3..c38f7e3d01dc 100644
--- a/include/asm-ppc64/iSeries/HvTypes.h
+++ b/include/asm-powerpc/iseries/hv_types.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _HVTYPES_H 19#ifndef _ASM_POWERPC_ISERIES_HV_TYPES_H
20#define _HVTYPES_H 20#define _ASM_POWERPC_ISERIES_HV_TYPES_H
21 21
22/* 22/*
23 * General typedefs for the hypervisor. 23 * General typedefs for the hypervisor.
@@ -110,4 +110,4 @@ struct HvLpBufferList {
110 u64 len; 110 u64 len;
111}; 111};
112 112
113#endif /* _HVTYPES_H */ 113#endif /* _ASM_POWERPC_ISERIES_HV_TYPES_H */
diff --git a/include/asm-ppc64/iSeries/iSeries_io.h b/include/asm-powerpc/iseries/iseries_io.h
index 9f79413342b3..56b2113ff0f5 100644
--- a/include/asm-ppc64/iSeries/iSeries_io.h
+++ b/include/asm-powerpc/iseries/iseries_io.h
@@ -1,5 +1,5 @@
1#ifndef _ISERIES_IO_H 1#ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H
2#define _ISERIES_IO_H 2#define _ASM_POWERPC_ISERIES_ISERIES_IO_H
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
@@ -46,4 +46,4 @@ extern void iSeries_memcpy_fromio(void *dest,
46 const volatile void __iomem *source, size_t n); 46 const volatile void __iomem *source, size_t n);
47 47
48#endif /* CONFIG_PPC_ISERIES */ 48#endif /* CONFIG_PPC_ISERIES */
49#endif /* _ISERIES_IO_H */ 49#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */
diff --git a/include/asm-ppc64/iSeries/ItExtVpdPanel.h b/include/asm-powerpc/iseries/it_exp_vpd_panel.h
index 4c546a8802b4..66a17a230c52 100644
--- a/include/asm-ppc64/iSeries/ItExtVpdPanel.h
+++ b/include/asm-powerpc/iseries/it_exp_vpd_panel.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _ITEXTVPDPANEL_H 19#ifndef _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H
20#define _ITEXTVPDPANEL_H 20#define _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H
21 21
22/* 22/*
23 * This struct maps the panel information 23 * This struct maps the panel information
@@ -49,4 +49,4 @@ struct ItExtVpdPanel {
49 49
50extern struct ItExtVpdPanel xItExtVpdPanel; 50extern struct ItExtVpdPanel xItExtVpdPanel;
51 51
52#endif /* _ITEXTVPDPANEL_H */ 52#endif /* _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H */
diff --git a/include/asm-ppc64/iSeries/ItLpNaca.h b/include/asm-powerpc/iseries/it_lp_naca.h
index 225d0176779d..c3ef1de45d82 100644
--- a/include/asm-ppc64/iSeries/ItLpNaca.h
+++ b/include/asm-powerpc/iseries/it_lp_naca.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _ITLPNACA_H 19#ifndef _ASM_POWERPC_ISERIES_IT_LP_NACA_H
20#define _ITLPNACA_H 20#define _ASM_POWERPC_ISERIES_IT_LP_NACA_H
21 21
22#include <linux/types.h> 22#include <linux/types.h>
23 23
@@ -77,4 +77,4 @@ struct ItLpNaca {
77 77
78extern struct ItLpNaca itLpNaca; 78extern struct ItLpNaca itLpNaca;
79 79
80#endif /* _ITLPNACA_H */ 80#endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */
diff --git a/include/asm-ppc64/iSeries/ItLpQueue.h b/include/asm-powerpc/iseries/it_lp_queue.h
index 69b26ad74135..a60d03afbf95 100644
--- a/include/asm-ppc64/iSeries/ItLpQueue.h
+++ b/include/asm-powerpc/iseries/it_lp_queue.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _ITLPQUEUE_H 19#ifndef _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H
20#define _ITLPQUEUE_H 20#define _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H
21 21
22/* 22/*
23 * This control block defines the simple LP queue structure that is 23 * This control block defines the simple LP queue structure that is
@@ -78,4 +78,4 @@ extern int hvlpevent_is_pending(void);
78extern void process_hvlpevents(struct pt_regs *); 78extern void process_hvlpevents(struct pt_regs *);
79extern void setup_hvlpevent_queue(void); 79extern void setup_hvlpevent_queue(void);
80 80
81#endif /* _ITLPQUEUE_H */ 81#endif /* _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H */
diff --git a/include/asm-ppc64/iSeries/ItLpRegSave.h b/include/asm-powerpc/iseries/it_lp_reg_save.h
index 1b3087e76205..288044b702de 100644
--- a/include/asm-ppc64/iSeries/ItLpRegSave.h
+++ b/include/asm-powerpc/iseries/it_lp_reg_save.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _ITLPREGSAVE_H 19#ifndef _ASM_POWERPC_ISERIES_IT_LP_REG_SAVE_H
20#define _ITLPREGSAVE_H 20#define _ASM_POWERPC_ISERIES_IT_LP_REG_SAVE_H
21 21
22/* 22/*
23 * This control block contains the data that is shared between PLIC 23 * This control block contains the data that is shared between PLIC
diff --git a/include/asm-ppc64/iSeries/LparMap.h b/include/asm-powerpc/iseries/lpar_map.h
index a6840b186d03..84fc321615bf 100644
--- a/include/asm-ppc64/iSeries/LparMap.h
+++ b/include/asm-powerpc/iseries/lpar_map.h
@@ -16,8 +16,8 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#ifndef _LPARMAP_H 19#ifndef _ASM_POWERPC_ISERIES_LPAR_MAP_H
20#define _LPARMAP_H 20#define _ASM_POWERPC_ISERIES_LPAR_MAP_H
21 21
22#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
23 23
@@ -80,4 +80,4 @@ extern const struct LparMap xLparMap;
80/* the fixed address where the LparMap exists */ 80/* the fixed address where the LparMap exists */
81#define LPARMAP_PHYS 0x7000 81#define LPARMAP_PHYS 0x7000
82 82
83#endif /* _LPARMAP_H */ 83#endif /* _ASM_POWERPC_ISERIES_LPAR_MAP_H */
diff --git a/include/asm-ppc64/iSeries/mf.h b/include/asm-powerpc/iseries/mf.h
index 7e6a0d936999..e7bd57a03fb1 100644
--- a/include/asm-ppc64/iSeries/mf.h
+++ b/include/asm-powerpc/iseries/mf.h
@@ -23,13 +23,13 @@
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26#ifndef _ASM_PPC64_ISERIES_MF_H 26#ifndef _ASM_POWERPC_ISERIES_MF_H
27#define _ASM_PPC64_ISERIES_MF_H 27#define _ASM_POWERPC_ISERIES_MF_H
28 28
29#include <linux/types.h> 29#include <linux/types.h>
30 30
31#include <asm/iSeries/HvTypes.h> 31#include <asm/iseries/hv_types.h>
32#include <asm/iSeries/HvCallEvent.h> 32#include <asm/iseries/hv_call_event.h>
33 33
34struct rtc_time; 34struct rtc_time;
35 35
@@ -54,4 +54,4 @@ extern int mf_get_rtc(struct rtc_time *tm);
54extern int mf_get_boot_rtc(struct rtc_time *tm); 54extern int mf_get_boot_rtc(struct rtc_time *tm);
55extern int mf_set_rtc(struct rtc_time *tm); 55extern int mf_set_rtc(struct rtc_time *tm);
56 56
57#endif /* _ASM_PPC64_ISERIES_MF_H */ 57#endif /* _ASM_POWERPC_ISERIES_MF_H */
diff --git a/include/asm-ppc64/iSeries/vio.h b/include/asm-powerpc/iseries/vio.h
index 6c05e6257f53..7e3a469420dd 100644
--- a/include/asm-ppc64/iSeries/vio.h
+++ b/include/asm-powerpc/iseries/vio.h
@@ -38,11 +38,11 @@
38 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 38 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 * 39 *
40 */ 40 */
41#ifndef _ISERIES_VIO_H 41#ifndef _ASM_POWERPC_ISERIES_VIO_H
42#define _ISERIES_VIO_H 42#define _ASM_POWERPC_ISERIES_VIO_H
43 43
44#include <asm/iSeries/HvTypes.h> 44#include <asm/iseries/hv_types.h>
45#include <asm/iSeries/HvLpEvent.h> 45#include <asm/iseries/hv_lp_event.h>
46 46
47/* 47/*
48 * iSeries virtual I/O events use the subtype field in 48 * iSeries virtual I/O events use the subtype field in
@@ -127,4 +127,4 @@ struct device;
127 127
128extern struct device *iSeries_vio_dev; 128extern struct device *iSeries_vio_dev;
129 129
130#endif /* _ISERIES_VIO_H */ 130#endif /* _ASM_POWERPC_ISERIES_VIO_H */
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
new file mode 100644
index 000000000000..062ab9ba68eb
--- /dev/null
+++ b/include/asm-powerpc/kexec.h
@@ -0,0 +1,49 @@
1#ifndef _ASM_POWERPC_KEXEC_H
2#define _ASM_POWERPC_KEXEC_H
3
4/*
5 * Maximum page that is mapped directly into kernel memory.
6 * XXX: Since we copy virt we can use any page we allocate
7 */
8#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
9
10/*
11 * Maximum address we can reach in physical address mode.
12 * XXX: I want to allow initrd in highmem. Otherwise set to rmo on LPAR.
13 */
14#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
15
16/* Maximum address we can use for the control code buffer */
17#ifdef __powerpc64__
18#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
19#else
20/* TASK_SIZE, probably left over from use_mm ?? */
21#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
22#endif
23
24#define KEXEC_CONTROL_CODE_SIZE 4096
25
26/* The native architecture */
27#ifdef __powerpc64__
28#define KEXEC_ARCH KEXEC_ARCH_PPC64
29#else
30#define KEXEC_ARCH KEXEC_ARCH_PPC
31#endif
32
33#ifndef __ASSEMBLY__
34
35#define MAX_NOTE_BYTES 1024
36typedef u32 note_buf_t[MAX_NOTE_BYTES / sizeof(u32)];
37
38extern note_buf_t crash_notes[];
39
40#ifdef __powerpc64__
41extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
42 master to copy new code to 0 */
43#else
44struct kimage;
45extern void machine_kexec_simple(struct kimage *image);
46#endif
47
48#endif /* ! __ASSEMBLY__ */
49#endif /* _ASM_POWERPC_KEXEC_H */
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 451b345cfc78..629ca964b974 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -80,6 +80,7 @@ struct machdep_calls {
80 void (*iommu_dev_setup)(struct pci_dev *dev); 80 void (*iommu_dev_setup)(struct pci_dev *dev);
81 void (*iommu_bus_setup)(struct pci_bus *bus); 81 void (*iommu_bus_setup)(struct pci_bus *bus);
82 void (*irq_bus_setup)(struct pci_bus *bus); 82 void (*irq_bus_setup)(struct pci_bus *bus);
83 int (*set_dabr)(unsigned long dabr);
83#endif 84#endif
84 85
85 int (*probe)(int platform); 86 int (*probe)(int platform);
diff --git a/include/asm-powerpc/numnodes.h b/include/asm-powerpc/numnodes.h
new file mode 100644
index 000000000000..795533aca095
--- /dev/null
+++ b/include/asm-powerpc/numnodes.h
@@ -0,0 +1,7 @@
1#ifndef _ASM_POWERPC_MAX_NUMNODES_H
2#define _ASM_POWERPC_MAX_NUMNODES_H
3
4/* Max 16 Nodes */
5#define NODES_SHIFT 4
6
7#endif /* _ASM_POWERPC_MAX_NUMNODES_H */
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index f99f2af82ca5..c534ca41224b 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -506,6 +506,13 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
506#else 506#else
507 #define __ASM_CONST(x) x##UL 507 #define __ASM_CONST(x) x##UL
508 #define ASM_CONST(x) __ASM_CONST(x) 508 #define ASM_CONST(x) __ASM_CONST(x)
509
510#ifdef CONFIG_PPC64
511#define DATAL ".llong"
512#else
513#define DATAL ".long"
514#endif
515
509#endif /* __ASSEMBLY__ */ 516#endif /* __ASSEMBLY__ */
510 517
511#endif /* _ASM_POWERPC_PPC_ASM_H */ 518#endif /* _ASM_POWERPC_PPC_ASM_H */
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h
index eee954a001fd..1dc4bf7b52b3 100644
--- a/include/asm-powerpc/processor.h
+++ b/include/asm-powerpc/processor.h
@@ -70,7 +70,7 @@ extern unsigned char ucBoardRevMaj, ucBoardRevMin;
70#define PLATFORM_LPAR 0x0001 70#define PLATFORM_LPAR 0x0001
71#define PLATFORM_POWERMAC 0x0400 71#define PLATFORM_POWERMAC 0x0400
72#define PLATFORM_MAPLE 0x0500 72#define PLATFORM_MAPLE 0x0500
73#define PLATFORM_BPA 0x1000 73#define PLATFORM_CELL 0x1000
74 74
75/* Compatibility with drivers coming from PPC32 world */ 75/* Compatibility with drivers coming from PPC32 world */
76#define _machine (systemcfg->platform) 76#define _machine (systemcfg->platform)
diff --git a/include/asm-ppc64/ptrace.h b/include/asm-powerpc/ptrace.h
index 3a55377f1fd3..1f7ecdb0b6ce 100644
--- a/include/asm-ppc64/ptrace.h
+++ b/include/asm-powerpc/ptrace.h
@@ -1,5 +1,5 @@
1#ifndef _PPC64_PTRACE_H 1#ifndef _ASM_POWERPC_PTRACE_H
2#define _PPC64_PTRACE_H 2#define _ASM_POWERPC_PTRACE_H
3 3
4/* 4/*
5 * Copyright (C) 2001 PPC64 Team, IBM Corp 5 * Copyright (C) 2001 PPC64 Team, IBM Corp
@@ -16,7 +16,7 @@
16 * that the overall structure is a multiple of 16 bytes in length. 16 * that the overall structure is a multiple of 16 bytes in length.
17 * 17 *
18 * Note that the offsets of the fields in this struct correspond with 18 * Note that the offsets of the fields in this struct correspond with
19 * the PT_* values below. This simplifies arch/ppc64/kernel/ptrace.c. 19 * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c.
20 * 20 *
21 * This program is free software; you can redistribute it and/or 21 * This program is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU General Public License 22 * modify it under the terms of the GNU General Public License
@@ -30,70 +30,96 @@ struct pt_regs {
30 unsigned long gpr[32]; 30 unsigned long gpr[32];
31 unsigned long nip; 31 unsigned long nip;
32 unsigned long msr; 32 unsigned long msr;
33 unsigned long orig_gpr3; /* Used for restarting system calls */ 33 unsigned long orig_gpr3; /* Used for restarting system calls */
34 unsigned long ctr; 34 unsigned long ctr;
35 unsigned long link; 35 unsigned long link;
36 unsigned long xer; 36 unsigned long xer;
37 unsigned long ccr; 37 unsigned long ccr;
38 unsigned long softe; /* Soft enabled/disabled */ 38#ifdef __powerpc64__
39 unsigned long trap; /* Reason for being here */ 39 unsigned long softe; /* Soft enabled/disabled */
40 unsigned long dar; /* Fault registers */ 40#else
41 unsigned long dsisr; 41 unsigned long mq; /* 601 only (not used at present) */
42 unsigned long result; /* Result of a system call */ 42 /* Used on APUS to hold IPL value. */
43#endif
44 unsigned long trap; /* Reason for being here */
45 /* N.B. for critical exceptions on 4xx, the dar and dsisr
46 fields are overloaded to hold srr0 and srr1. */
47 unsigned long dar; /* Fault registers */
48 unsigned long dsisr; /* on 4xx/Book-E used for ESR */
49 unsigned long result; /* Result of a system call */
43}; 50};
44 51
45struct pt_regs32 { 52#endif /* __ASSEMBLY__ */
46 unsigned int gpr[32];
47 unsigned int nip;
48 unsigned int msr;
49 unsigned int orig_gpr3; /* Used for restarting system calls */
50 unsigned int ctr;
51 unsigned int link;
52 unsigned int xer;
53 unsigned int ccr;
54 unsigned int mq; /* 601 only (not used at present) */
55 unsigned int trap; /* Reason for being here */
56 unsigned int dar; /* Fault registers */
57 unsigned int dsisr;
58 unsigned int result; /* Result of a system call */
59};
60 53
61#ifdef __KERNEL__ 54#ifdef __KERNEL__
62 55
63#define instruction_pointer(regs) ((regs)->nip) 56#ifdef __powerpc64__
57
58#define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */
59
60/* Size of dummy stack frame allocated when calling signal handler. */
61#define __SIGNAL_FRAMESIZE 128
62#define __SIGNAL_FRAMESIZE32 64
63
64#else /* __powerpc64__ */
65
66#define STACK_FRAME_OVERHEAD 16 /* size of minimum stack frame */
67
68/* Size of stack frame allocated when calling signal handler. */
69#define __SIGNAL_FRAMESIZE 64
70
71#endif /* __powerpc64__ */
64 72
73#ifndef __ASSEMBLY__
74
75#define instruction_pointer(regs) ((regs)->nip)
65#ifdef CONFIG_SMP 76#ifdef CONFIG_SMP
66extern unsigned long profile_pc(struct pt_regs *regs); 77extern unsigned long profile_pc(struct pt_regs *regs);
67#else 78#else
68#define profile_pc(regs) instruction_pointer(regs) 79#define profile_pc(regs) instruction_pointer(regs)
69#endif 80#endif
70 81
82#ifdef __powerpc64__
71#define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) 83#define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1)
84#else
85#define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
86#endif
72 87
73#define force_successful_syscall_return() \ 88#define force_successful_syscall_return() \
74 (current_thread_info()->syscall_noerror = 1) 89 do { \
90 current_thread_info()->syscall_noerror = 1; \
91 } while(0)
75 92
76/* 93/*
77 * We use the least-significant bit of the trap field to indicate 94 * We use the least-significant bit of the trap field to indicate
78 * whether we have saved the full set of registers, or only a 95 * whether we have saved the full set of registers, or only a
79 * partial set. A 1 there means the partial set. 96 * partial set. A 1 there means the partial set.
97 * On 4xx we use the next bit to indicate whether the exception
98 * is a critical exception (1 means it is).
80 */ 99 */
81#define FULL_REGS(regs) (((regs)->trap & 1) == 0) 100#define FULL_REGS(regs) (((regs)->trap & 1) == 0)
101#ifndef __powerpc64__
102#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) == 0)
103#endif /* ! __powerpc64__ */
82#define TRAP(regs) ((regs)->trap & ~0xF) 104#define TRAP(regs) ((regs)->trap & ~0xF)
105#ifdef __powerpc64__
83#define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) 106#define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1)
84 107#else
85#endif /* __KERNEL__ */ 108#define CHECK_FULL_REGS(regs) \
109do { \
110 if ((regs)->trap & 1) \
111 printk(KERN_CRIT "%s: partial register set\n", __FUNCTION__); \
112} while (0)
113#endif /* __powerpc64__ */
86 114
87#endif /* __ASSEMBLY__ */ 115#endif /* __ASSEMBLY__ */
88 116
89#define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ 117#endif /* __KERNEL__ */
90
91/* Size of dummy stack frame allocated when calling signal handler. */
92#define __SIGNAL_FRAMESIZE 128
93#define __SIGNAL_FRAMESIZE32 64
94 118
95/* 119/*
96 * Offsets used by 'ptrace' system call interface. 120 * Offsets used by 'ptrace' system call interface.
121 * These can't be changed without breaking binary compatibility
122 * with MkLinux, etc.
97 */ 123 */
98#define PT_R0 0 124#define PT_R0 0
99#define PT_R1 1 125#define PT_R1 1
@@ -137,18 +163,25 @@ extern unsigned long profile_pc(struct pt_regs *regs);
137#define PT_LNK 36 163#define PT_LNK 36
138#define PT_XER 37 164#define PT_XER 37
139#define PT_CCR 38 165#define PT_CCR 38
166#ifndef __powerpc64__
167#define PT_MQ 39
168#else
140#define PT_SOFTE 39 169#define PT_SOFTE 39
141#define PT_TRAP 40 170#define PT_TRAP 40
142#define PT_DAR 41 171#define PT_DAR 41
143#define PT_DSISR 42 172#define PT_DSISR 42
144#define PT_RESULT 43 173#define PT_RESULT 43
174#endif
145 175
146#define PT_FPR0 48 176#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */
177
178#ifndef __powerpc64__
179
180#define PT_FPR31 (PT_FPR0 + 2*31)
181#define PT_FPSCR (PT_FPR0 + 2*32 + 1)
182
183#else /* __powerpc64__ */
147 184
148/*
149 * Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will
150 * have visibility to the asm-ppc/ptrace.h header instead of this one.
151 */
152#define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ 185#define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */
153 186
154#ifdef __KERNEL__ 187#ifdef __KERNEL__
@@ -165,29 +198,29 @@ extern unsigned long profile_pc(struct pt_regs *regs);
165#define PT_VRSAVE_32 (PT_VR0 + 33*4) 198#define PT_VRSAVE_32 (PT_VR0 + 33*4)
166#endif 199#endif
167 200
201#endif /* __powerpc64__ */
202
168/* 203/*
169 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. 204 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
170 * The transfer totals 34 quadword. Quadwords 0-31 contain the 205 * The transfer totals 34 quadword. Quadwords 0-31 contain the
171 * corresponding vector registers. Quadword 32 contains the vscr as the 206 * corresponding vector registers. Quadword 32 contains the vscr as the
172 * last word (offset 12) within that quadword. Quadword 33 contains the 207 * last word (offset 12) within that quadword. Quadword 33 contains the
173 * vrsave as the first word (offset 0) within the quadword. 208 * vrsave as the first word (offset 0) within the quadword.
174 * 209 *
175 * This definition of the VMX state is compatible with the current PPC32 210 * This definition of the VMX state is compatible with the current PPC32
176 * ptrace interface. This allows signal handling and ptrace to use the same 211 * ptrace interface. This allows signal handling and ptrace to use the same
177 * structures. This also simplifies the implementation of a bi-arch 212 * structures. This also simplifies the implementation of a bi-arch
178 * (combined (32- and 64-bit) gdb. 213 * (combined (32- and 64-bit) gdb.
179 */ 214 */
180#define PTRACE_GETVRREGS 18 215#define PTRACE_GETVRREGS 18
181#define PTRACE_SETVRREGS 19 216#define PTRACE_SETVRREGS 19
182 217
183/* 218#ifndef __powerpc64__
184 * While we dont have 64bit book E processors, we need to reserve the 219/* Get/set all the upper 32-bits of the SPE registers, accumulator, and
185 * relevant ptrace calls for 32bit compatibility. 220 * spefscr, in one go */
186 */ 221#define PTRACE_GETEVRREGS 20
187#if 0 222#define PTRACE_SETEVRREGS 21
188#define PTRACE_GETEVRREGS 20 223#endif /* __powerpc64__ */
189#define PTRACE_SETEVRREGS 21
190#endif
191 224
192/* 225/*
193 * Get or set a debug register. The first 16 are DABR registers and the 226 * Get or set a debug register. The first 16 are DABR registers and the
@@ -196,6 +229,7 @@ extern unsigned long profile_pc(struct pt_regs *regs);
196#define PTRACE_GET_DEBUGREG 25 229#define PTRACE_GET_DEBUGREG 25
197#define PTRACE_SET_DEBUGREG 26 230#define PTRACE_SET_DEBUGREG 26
198 231
232#ifdef __powerpc64__
199/* Additional PTRACE requests implemented on PowerPC. */ 233/* Additional PTRACE requests implemented on PowerPC. */
200#define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ 234#define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */
201#define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ 235#define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */
@@ -209,5 +243,6 @@ extern unsigned long profile_pc(struct pt_regs *regs);
209#define PPC_PTRACE_POKEDATA_3264 0x92 243#define PPC_PTRACE_POKEDATA_3264 0x92
210#define PPC_PTRACE_PEEKUSR_3264 0x91 244#define PPC_PTRACE_PEEKUSR_3264 0x91
211#define PPC_PTRACE_POKEUSR_3264 0x90 245#define PPC_PTRACE_POKEUSR_3264 0x90
246#endif /* __powerpc64__ */
212 247
213#endif /* _PPC64_PTRACE_H */ 248#endif /* _ASM_POWERPC_PTRACE_H */
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 2c050332471d..d1bb611ea626 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -149,28 +149,11 @@ struct rtas_error_log {
149 unsigned char buffer[1]; 149 unsigned char buffer[1];
150}; 150};
151 151
152struct flash_block { 152/*
153 char *data; 153 * This can be set by the rtas_flash module so that it can get called
154 unsigned long length; 154 * as the absolutely last thing before the kernel terminates.
155};
156
157/* This struct is very similar but not identical to
158 * that needed by the rtas flash update.
159 * All we need to do for rtas is rewrite num_blocks
160 * into a version/length and translate the pointers
161 * to absolute.
162 */ 155 */
163#define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block)) 156extern void (*rtas_flash_term_hook)(int);
164struct flash_block_list {
165 unsigned long num_blocks;
166 struct flash_block_list *next;
167 struct flash_block blocks[FLASH_BLOCKS_PER_NODE];
168};
169struct flash_block_list_header { /* just the header of flash_block_list */
170 unsigned long num_blocks;
171 struct flash_block_list *next;
172};
173extern struct flash_block_list_header rtas_firmware_flash_list;
174 157
175extern struct rtas_t rtas; 158extern struct rtas_t rtas;
176 159
diff --git a/include/asm-ppc64/sigcontext.h b/include/asm-powerpc/sigcontext.h
index 6f8aee768c5e..165d630e1cf3 100644
--- a/include/asm-ppc64/sigcontext.h
+++ b/include/asm-powerpc/sigcontext.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_PPC64_SIGCONTEXT_H 1#ifndef _ASM_POWERPC_SIGCONTEXT_H
2#define _ASM_PPC64_SIGCONTEXT_H 2#define _ASM_POWERPC_SIGCONTEXT_H
3 3
4/* 4/*
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
@@ -9,39 +9,44 @@
9 */ 9 */
10#include <linux/compiler.h> 10#include <linux/compiler.h>
11#include <asm/ptrace.h> 11#include <asm/ptrace.h>
12#ifdef __powerpc64__
12#include <asm/elf.h> 13#include <asm/elf.h>
13 14#endif
14 15
15struct sigcontext { 16struct sigcontext {
16 unsigned long _unused[4]; 17 unsigned long _unused[4];
17 int signal; 18 int signal;
19#ifdef __powerpc64__
18 int _pad0; 20 int _pad0;
21#endif
19 unsigned long handler; 22 unsigned long handler;
20 unsigned long oldmask; 23 unsigned long oldmask;
21 struct pt_regs __user *regs; 24 struct pt_regs __user *regs;
25#ifdef __powerpc64__
22 elf_gregset_t gp_regs; 26 elf_gregset_t gp_regs;
23 elf_fpregset_t fp_regs; 27 elf_fpregset_t fp_regs;
24/* 28/*
25 * To maintain compatibility with current implementations the sigcontext is 29 * To maintain compatibility with current implementations the sigcontext is
26 * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) 30 * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t)
27 * followed by an unstructured (vmx_reserve) field of 69 doublewords. This 31 * followed by an unstructured (vmx_reserve) field of 69 doublewords. This
28 * allows the array of vector registers to be quadword aligned independent of 32 * allows the array of vector registers to be quadword aligned independent of
29 * the alignment of the containing sigcontext or ucontext. It is the 33 * the alignment of the containing sigcontext or ucontext. It is the
30 * responsibility of the code setting the sigcontext to set this pointer to 34 * responsibility of the code setting the sigcontext to set this pointer to
31 * either NULL (if this processor does not support the VMX feature) or the 35 * either NULL (if this processor does not support the VMX feature) or the
32 * address of the first quadword within the allocated (vmx_reserve) area. 36 * address of the first quadword within the allocated (vmx_reserve) area.
33 * 37 *
34 * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with 38 * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with
35 * an array of 34 quadword entries (elf_vrregset_t). The entries with 39 * an array of 34 quadword entries (elf_vrregset_t). The entries with
36 * indexes 0-31 contain the corresponding vector registers. The entry with 40 * indexes 0-31 contain the corresponding vector registers. The entry with
37 * index 32 contains the vscr as the last word (offset 12) within the 41 * index 32 contains the vscr as the last word (offset 12) within the
38 * quadword. This allows the vscr to be stored as either a quadword (since 42 * quadword. This allows the vscr to be stored as either a quadword (since
39 * it must be copied via a vector register to/from storage) or as a word. 43 * it must be copied via a vector register to/from storage) or as a word.
40 * The entry with index 33 contains the vrsave as the first word (offset 0) 44 * The entry with index 33 contains the vrsave as the first word (offset 0)
41 * within the quadword. 45 * within the quadword.
42 */ 46 */
43 elf_vrreg_t __user *v_regs; 47 elf_vrreg_t __user *v_regs;
44 long vmx_reserve[ELF_NVRREG+ELF_NVRREG+1]; 48 long vmx_reserve[ELF_NVRREG+ELF_NVRREG+1];
49#endif
45}; 50};
46 51
47#endif /* _ASM_PPC64_SIGCONTEXT_H */ 52#endif /* _ASM_POWERPC_SIGCONTEXT_H */
diff --git a/include/asm-ppc64/smp.h b/include/asm-powerpc/smp.h
index c5e9052e7967..8bcdd0faefea 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * smp.h: PPC64 specific SMP code. 2 * smp.h: PowerPC-specific SMP code.
3 * 3 *
4 * Original was a copy of sparc smp.h. Now heavily modified 4 * Original was a copy of sparc smp.h. Now heavily modified
5 * for PPC. 5 * for PPC.
@@ -13,9 +13,9 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#ifndef _ASM_POWERPC_SMP_H
17#define _ASM_POWERPC_SMP_H
16#ifdef __KERNEL__ 18#ifdef __KERNEL__
17#ifndef _PPC64_SMP_H
18#define _PPC64_SMP_H
19 19
20#include <linux/config.h> 20#include <linux/config.h>
21#include <linux/threads.h> 21#include <linux/threads.h>
@@ -24,7 +24,9 @@
24 24
25#ifndef __ASSEMBLY__ 25#ifndef __ASSEMBLY__
26 26
27#ifdef CONFIG_PPC64
27#include <asm/paca.h> 28#include <asm/paca.h>
29#endif
28 30
29extern int boot_cpuid; 31extern int boot_cpuid;
30extern int boot_cpuid_phys; 32extern int boot_cpuid_phys;
@@ -45,8 +47,19 @@ void generic_cpu_die(unsigned int cpu);
45void generic_mach_cpu_die(void); 47void generic_mach_cpu_die(void);
46#endif 48#endif
47 49
50#ifdef CONFIG_PPC64
48#define raw_smp_processor_id() (get_paca()->paca_index) 51#define raw_smp_processor_id() (get_paca()->paca_index)
49#define hard_smp_processor_id() (get_paca()->hw_cpu_id) 52#define hard_smp_processor_id() (get_paca()->hw_cpu_id)
53#else
54/* 32-bit */
55extern int smp_hw_index[];
56
57#define raw_smp_processor_id() (current_thread_info()->cpu)
58#define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
59#define get_hard_smp_processor_id(cpu) (smp_hw_index[(cpu)])
60#define set_hard_smp_processor_id(cpu, phys)\
61 (smp_hw_index[(cpu)] = (phys))
62#endif
50 63
51extern cpumask_t cpu_sibling_map[NR_CPUS]; 64extern cpumask_t cpu_sibling_map[NR_CPUS];
52 65
@@ -64,14 +77,30 @@ extern cpumask_t cpu_sibling_map[NR_CPUS];
64 77
65void smp_init_iSeries(void); 78void smp_init_iSeries(void);
66void smp_init_pSeries(void); 79void smp_init_pSeries(void);
80void smp_init_cell(void);
81void smp_setup_cpu_maps(void);
67 82
68extern int __cpu_disable(void); 83extern int __cpu_disable(void);
69extern void __cpu_die(unsigned int cpu); 84extern void __cpu_die(unsigned int cpu);
85
86#else
87/* for UP */
88#define smp_setup_cpu_maps()
89#define smp_release_cpus()
90
70#endif /* CONFIG_SMP */ 91#endif /* CONFIG_SMP */
71 92
93#ifdef CONFIG_PPC64
72#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id) 94#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id)
73#define set_hard_smp_processor_id(CPU, VAL) \ 95#define set_hard_smp_processor_id(CPU, VAL) \
74 do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0) 96 do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0)
97#else
98/* 32-bit */
99#ifndef CONFIG_SMP
100#define get_hard_smp_processor_id(cpu) boot_cpuid_phys
101#define set_hard_smp_processor_id(cpu, phys)
102#endif
103#endif
75 104
76extern int smt_enabled_at_boot; 105extern int smt_enabled_at_boot;
77 106
@@ -84,15 +113,7 @@ extern void smp_generic_take_timebase(void);
84 113
85extern struct smp_ops_t *smp_ops; 114extern struct smp_ops_t *smp_ops;
86 115
87#ifdef CONFIG_PPC_PSERIES
88void vpa_init(int cpu);
89#else
90static inline void vpa_init(int cpu)
91{
92}
93#endif /* CONFIG_PPC_PSERIES */
94
95#endif /* __ASSEMBLY__ */ 116#endif /* __ASSEMBLY__ */
96 117
97#endif /* !(_PPC64_SMP_H) */
98#endif /* __KERNEL__ */ 118#endif /* __KERNEL__ */
119#endif /* _ASM_POWERPC_SMP_H) */
diff --git a/include/asm-ppc64/sparsemem.h b/include/asm-powerpc/sparsemem.h
index c5bd47e57f17..1c95ab99deb3 100644
--- a/include/asm-ppc64/sparsemem.h
+++ b/include/asm-powerpc/sparsemem.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_PPC64_SPARSEMEM_H 1#ifndef _ASM_POWERPC_SPARSEMEM_H
2#define _ASM_PPC64_SPARSEMEM_H 1 2#define _ASM_POWERPC_SPARSEMEM_H 1
3 3
4#ifdef CONFIG_SPARSEMEM 4#ifdef CONFIG_SPARSEMEM
5/* 5/*
@@ -13,4 +13,4 @@
13 13
14#endif /* CONFIG_SPARSEMEM */ 14#endif /* CONFIG_SPARSEMEM */
15 15
16#endif /* _ASM_PPC64_SPARSEMEM_H */ 16#endif /* _ASM_POWERPC_SPARSEMEM_H */
diff --git a/include/asm-powerpc/stat.h b/include/asm-powerpc/stat.h
new file mode 100644
index 000000000000..e4edc510b530
--- /dev/null
+++ b/include/asm-powerpc/stat.h
@@ -0,0 +1,81 @@
1#ifndef _ASM_POWERPC_STAT_H
2#define _ASM_POWERPC_STAT_H
3/*
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9#include <linux/types.h>
10
11#define STAT_HAVE_NSEC 1
12
13#ifndef __powerpc64__
14struct __old_kernel_stat {
15 unsigned short st_dev;
16 unsigned short st_ino;
17 unsigned short st_mode;
18 unsigned short st_nlink;
19 unsigned short st_uid;
20 unsigned short st_gid;
21 unsigned short st_rdev;
22 unsigned long st_size;
23 unsigned long st_atime;
24 unsigned long st_mtime;
25 unsigned long st_ctime;
26};
27#endif /* !__powerpc64__ */
28
29struct stat {
30 unsigned long st_dev;
31 ino_t st_ino;
32#ifdef __powerpc64__
33 nlink_t st_nlink;
34 mode_t st_mode;
35#else
36 mode_t st_mode;
37 nlink_t st_nlink;
38#endif
39 uid_t st_uid;
40 gid_t st_gid;
41 unsigned long st_rdev;
42 off_t st_size;
43 unsigned long st_blksize;
44 unsigned long st_blocks;
45 unsigned long st_atime;
46 unsigned long st_atime_nsec;
47 unsigned long st_mtime;
48 unsigned long st_mtime_nsec;
49 unsigned long st_ctime;
50 unsigned long st_ctime_nsec;
51 unsigned long __unused4;
52 unsigned long __unused5;
53#ifdef __powerpc64__
54 unsigned long __unused6;
55#endif
56};
57
58/* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
59struct stat64 {
60 unsigned long long st_dev; /* Device. */
61 unsigned long long st_ino; /* File serial number. */
62 unsigned int st_mode; /* File mode. */
63 unsigned int st_nlink; /* Link count. */
64 unsigned int st_uid; /* User ID of the file's owner. */
65 unsigned int st_gid; /* Group ID of the file's group. */
66 unsigned long long st_rdev; /* Device number, if device. */
67 unsigned short __pad2;
68 long long st_size; /* Size of file, in bytes. */
69 int st_blksize; /* Optimal block size for I/O. */
70 long long st_blocks; /* Number 512-byte blocks allocated. */
71 int st_atime; /* Time of last access. */
72 unsigned int st_atime_nsec;
73 int st_mtime; /* Time of last modification. */
74 unsigned int st_mtime_nsec;
75 int st_ctime; /* Time of last status change. */
76 unsigned int st_ctime_nsec;
77 unsigned int __unused4;
78 unsigned int __unused5;
79};
80
81#endif /* _ASM_POWERPC_STAT_H */
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index 5b2ecbc47907..b5da0b851e02 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -359,5 +359,53 @@ extern void reloc_got2(unsigned long);
359 359
360#define PTRRELOC(x) ((typeof(x)) add_reloc_offset((unsigned long)(x))) 360#define PTRRELOC(x) ((typeof(x)) add_reloc_offset((unsigned long)(x)))
361 361
362static inline void create_instruction(unsigned long addr, unsigned int instr)
363{
364 unsigned int *p;
365 p = (unsigned int *)addr;
366 *p = instr;
367 asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (p));
368}
369
370/* Flags for create_branch:
371 * "b" == create_branch(addr, target, 0);
372 * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE);
373 * "bl" == create_branch(addr, target, BRANCH_SET_LINK);
374 * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK);
375 */
376#define BRANCH_SET_LINK 0x1
377#define BRANCH_ABSOLUTE 0x2
378
379static inline void create_branch(unsigned long addr,
380 unsigned long target, int flags)
381{
382 unsigned int instruction;
383
384 if (! (flags & BRANCH_ABSOLUTE))
385 target = target - addr;
386
387 /* Mask out the flags and target, so they don't step on each other. */
388 instruction = 0x48000000 | (flags & 0x3) | (target & 0x03FFFFFC);
389
390 create_instruction(addr, instruction);
391}
392
393static inline void create_function_call(unsigned long addr, void * func)
394{
395 unsigned long func_addr;
396
397#ifdef CONFIG_PPC64
398 /*
399 * On PPC64 the function pointer actually points to the function's
400 * descriptor. The first entry in the descriptor is the address
401 * of the function text.
402 */
403 func_addr = *(unsigned long *)func;
404#else
405 func_addr = (unsigned long)func;
406#endif
407 create_branch(addr, func_addr, BRANCH_SET_LINK);
408}
409
362#endif /* __KERNEL__ */ 410#endif /* __KERNEL__ */
363#endif /* _ASM_POWERPC_SYSTEM_H */ 411#endif /* _ASM_POWERPC_SYSTEM_H */
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h
index c5b8e5358f83..7f80a019b6a0 100644
--- a/include/asm-powerpc/termios.h
+++ b/include/asm-powerpc/termios.h
@@ -94,142 +94,9 @@ struct termio {
94#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 94#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
95#endif 95#endif
96 96
97#define FIOCLEX _IO('f', 1)
98#define FIONCLEX _IO('f', 2)
99#define FIOASYNC _IOW('f', 125, int)
100#define FIONBIO _IOW('f', 126, int)
101#define FIONREAD _IOR('f', 127, int)
102#define TIOCINQ FIONREAD
103
104#define TIOCGETP _IOR('t', 8, struct sgttyb)
105#define TIOCSETP _IOW('t', 9, struct sgttyb)
106#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
107
108#define TIOCSETC _IOW('t', 17, struct tchars)
109#define TIOCGETC _IOR('t', 18, struct tchars)
110#define TCGETS _IOR('t', 19, struct termios)
111#define TCSETS _IOW('t', 20, struct termios)
112#define TCSETSW _IOW('t', 21, struct termios)
113#define TCSETSF _IOW('t', 22, struct termios)
114
115#define TCGETA _IOR('t', 23, struct termio)
116#define TCSETA _IOW('t', 24, struct termio)
117#define TCSETAW _IOW('t', 25, struct termio)
118#define TCSETAF _IOW('t', 28, struct termio)
119
120#define TCSBRK _IO('t', 29)
121#define TCXONC _IO('t', 30)
122#define TCFLSH _IO('t', 31)
123
124#define TIOCSWINSZ _IOW('t', 103, struct winsize)
125#define TIOCGWINSZ _IOR('t', 104, struct winsize)
126#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
127#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
128#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
129
130#define TIOCGLTC _IOR('t', 116, struct ltchars)
131#define TIOCSLTC _IOW('t', 117, struct ltchars)
132#define TIOCSPGRP _IOW('t', 118, int)
133#define TIOCGPGRP _IOR('t', 119, int)
134
135#define TIOCEXCL 0x540C
136#define TIOCNXCL 0x540D
137#define TIOCSCTTY 0x540E
138
139#define TIOCSTI 0x5412
140#define TIOCMGET 0x5415
141#define TIOCMBIS 0x5416
142#define TIOCMBIC 0x5417
143#define TIOCMSET 0x5418
144#define TIOCGSOFTCAR 0x5419
145#define TIOCSSOFTCAR 0x541A
146#define TIOCLINUX 0x541C
147#define TIOCCONS 0x541D
148#define TIOCGSERIAL 0x541E
149#define TIOCSSERIAL 0x541F
150#define TIOCPKT 0x5420
151
152#define TIOCNOTTY 0x5422
153#define TIOCSETD 0x5423
154#define TIOCGETD 0x5424
155#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
156
157#define TIOCSERCONFIG 0x5453
158#define TIOCSERGWILD 0x5454
159#define TIOCSERSWILD 0x5455
160#define TIOCGLCKTRMIOS 0x5456
161#define TIOCSLCKTRMIOS 0x5457
162#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
163#define TIOCSERGETLSR 0x5459 /* Get line status register */
164#define TIOCSERGETMULTI 0x545A /* Get multiport config */
165#define TIOCSERSETMULTI 0x545B /* Set multiport config */
166
167#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
168#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
169
170/* Used for packet mode */
171#define TIOCPKT_DATA 0
172#define TIOCPKT_FLUSHREAD 1
173#define TIOCPKT_FLUSHWRITE 2
174#define TIOCPKT_STOP 4
175#define TIOCPKT_START 8
176#define TIOCPKT_NOSTOP 16
177#define TIOCPKT_DOSTOP 32
178
179/* modem lines */
180#define TIOCM_LE 0x001
181#define TIOCM_DTR 0x002
182#define TIOCM_RTS 0x004
183#define TIOCM_ST 0x008
184#define TIOCM_SR 0x010
185#define TIOCM_CTS 0x020
186#define TIOCM_CAR 0x040
187#define TIOCM_RNG 0x080
188#define TIOCM_DSR 0x100
189#define TIOCM_CD TIOCM_CAR
190#define TIOCM_RI TIOCM_RNG
191#define TIOCM_OUT1 0x2000
192#define TIOCM_OUT2 0x4000
193#define TIOCM_LOOP 0x8000
194
195/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
196#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
197
198#ifdef __KERNEL__ 97#ifdef __KERNEL__
199 98
200/* 99#include <asm-generic/termios.h>
201 * Translate a "termio" structure into a "termios". Ugh.
202 */
203#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
204 unsigned short __tmp; \
205 get_user(__tmp,&(termio)->x); \
206 (termios)->x = (0xffff0000 & (termios)->x) | __tmp; \
207}
208
209#define user_termio_to_kernel_termios(termios, termio) \
210({ \
211 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
212 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
213 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
214 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
215 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
216})
217
218/*
219 * Translate a "termios" structure into a "termio". Ugh.
220 */
221#define kernel_termios_to_user_termio(termio, termios) \
222({ \
223 put_user((termios)->c_iflag, &(termio)->c_iflag); \
224 put_user((termios)->c_oflag, &(termio)->c_oflag); \
225 put_user((termios)->c_cflag, &(termio)->c_cflag); \
226 put_user((termios)->c_lflag, &(termio)->c_lflag); \
227 put_user((termios)->c_line, &(termio)->c_line); \
228 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
229})
230
231#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
232#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
233 100
234#endif /* __KERNEL__ */ 101#endif /* __KERNEL__ */
235 102
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index 410e795f7d43..d9b86a17271b 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -21,7 +21,7 @@
21#include <asm/processor.h> 21#include <asm/processor.h>
22#ifdef CONFIG_PPC64 22#ifdef CONFIG_PPC64
23#include <asm/paca.h> 23#include <asm/paca.h>
24#include <asm/iSeries/HvCall.h> 24#include <asm/iseries/hv_call.h>
25#endif 25#endif
26 26
27/* time.c */ 27/* time.c */
diff --git a/include/asm-ppc/tlb.h b/include/asm-powerpc/tlb.h
index 2c142c5d8584..56659f121779 100644
--- a/include/asm-ppc/tlb.h
+++ b/include/asm-powerpc/tlb.h
@@ -1,6 +1,7 @@
1/* 1/*
2 * TLB shootdown specifics for PPC 2 * TLB shootdown specifics for powerpc
3 * 3 *
4 * Copyright (C) 2002 Anton Blanchard, IBM Corp.
4 * Copyright (C) 2002 Paul Mackerras, IBM Corp. 5 * Copyright (C) 2002 Paul Mackerras, IBM Corp.
5 * 6 *
6 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
@@ -8,29 +9,53 @@
8 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
10 */ 11 */
11#ifndef _PPC_TLB_H 12#ifndef _ASM_POWERPC_TLB_H
12#define _PPC_TLB_H 13#define _ASM_POWERPC_TLB_H
13 14
14#include <linux/config.h> 15#include <linux/config.h>
16#ifndef __powerpc64__
15#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#endif
16#include <asm/pgalloc.h> 19#include <asm/pgalloc.h>
17#include <asm/tlbflush.h> 20#include <asm/tlbflush.h>
21#ifndef __powerpc64__
18#include <asm/page.h> 22#include <asm/page.h>
19#include <asm/mmu.h> 23#include <asm/mmu.h>
20 24#endif
21#ifdef CONFIG_PPC_STD_MMU
22/* Classic PPC with hash-table based MMU... */
23 25
24struct mmu_gather; 26struct mmu_gather;
27
28#define tlb_start_vma(tlb, vma) do { } while (0)
29#define tlb_end_vma(tlb, vma) do { } while (0)
30
31#if !defined(CONFIG_PPC_STD_MMU)
32
33#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
34
35#elif defined(__powerpc64__)
36
37extern void pte_free_finish(void);
38
39static inline void tlb_flush(struct mmu_gather *tlb)
40{
41 flush_tlb_pending();
42 pte_free_finish();
43}
44
45#else
46
25extern void tlb_flush(struct mmu_gather *tlb); 47extern void tlb_flush(struct mmu_gather *tlb);
26 48
49#endif
50
27/* Get the generic bits... */ 51/* Get the generic bits... */
28#include <asm-generic/tlb.h> 52#include <asm-generic/tlb.h>
29 53
30/* Nothing needed here in fact... */ 54#if !defined(CONFIG_PPC_STD_MMU) || defined(__powerpc64__)
31#define tlb_start_vma(tlb, vma) do { } while (0) 55
32#define tlb_end_vma(tlb, vma) do { } while (0) 56#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0)
33 57
58#else
34extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, 59extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep,
35 unsigned long address); 60 unsigned long address);
36 61
@@ -41,17 +66,5 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
41 flush_hash_entry(tlb->mm, ptep, address); 66 flush_hash_entry(tlb->mm, ptep, address);
42} 67}
43 68
44#else 69#endif
45/* Embedded PPC with software-loaded TLB, very simple... */ 70#endif /* __ASM_POWERPC_TLB_H */
46
47#define tlb_start_vma(tlb, vma) do { } while (0)
48#define tlb_end_vma(tlb, vma) do { } while (0)
49#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0)
50#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
51
52/* Get the generic bits... */
53#include <asm-generic/tlb.h>
54
55#endif /* CONFIG_PPC_STD_MMU */
56
57#endif /* __PPC_TLB_H */
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h
new file mode 100644
index 000000000000..ca3655672bbc
--- /dev/null
+++ b/include/asm-powerpc/tlbflush.h
@@ -0,0 +1,146 @@
1#ifndef _ASM_POWERPC_TLBFLUSH_H
2#define _ASM_POWERPC_TLBFLUSH_H
3/*
4 * TLB flushing:
5 *
6 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
7 * - flush_tlb_page(vma, vmaddr) flushes one page
8 * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB
9 * - flush_tlb_range(vma, start, end) flushes a range of pages
10 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
11 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18#ifdef __KERNEL__
19
20#include <linux/config.h>
21
22struct mm_struct;
23
24#ifdef CONFIG_PPC64
25
26#include <linux/percpu.h>
27#include <asm/page.h>
28
29#define PPC64_TLB_BATCH_NR 192
30
31struct ppc64_tlb_batch {
32 unsigned long index;
33 struct mm_struct *mm;
34 pte_t pte[PPC64_TLB_BATCH_NR];
35 unsigned long vaddr[PPC64_TLB_BATCH_NR];
36 unsigned int large;
37};
38DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
39
40extern void __flush_tlb_pending(struct ppc64_tlb_batch *batch);
41
42static inline void flush_tlb_pending(void)
43{
44 struct ppc64_tlb_batch *batch = &get_cpu_var(ppc64_tlb_batch);
45
46 if (batch->index)
47 __flush_tlb_pending(batch);
48 put_cpu_var(ppc64_tlb_batch);
49}
50
51extern void flush_hash_page(unsigned long va, pte_t pte, int local);
52void flush_hash_range(unsigned long number, int local);
53
54#else /* CONFIG_PPC64 */
55
56#include <linux/mm.h>
57
58extern void _tlbie(unsigned long address);
59extern void _tlbia(void);
60
61/*
62 * TODO: (CONFIG_FSL_BOOKE) determine if flush_tlb_range &
63 * flush_tlb_kernel_range are best implemented as tlbia vs
64 * specific tlbie's
65 */
66
67#if (defined(CONFIG_4xx) && !defined(CONFIG_44x)) || defined(CONFIG_8xx)
68#define flush_tlb_pending() asm volatile ("tlbia; sync" : : : "memory")
69#elif defined(CONFIG_4xx) || defined(CONFIG_FSL_BOOKE)
70#define flush_tlb_pending() _tlbia()
71#endif
72
73/*
74 * This gets called at the end of handling a page fault, when
75 * the kernel has put a new PTE into the page table for the process.
76 * We use it to ensure coherency between the i-cache and d-cache
77 * for the page which has just been mapped in.
78 * On machines which use an MMU hash table, we use this to put a
79 * corresponding HPTE into the hash table ahead of time, instead of
80 * waiting for the inevitable extra hash-table miss exception.
81 */
82extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
83
84#endif /* CONFIG_PPC64 */
85
86#if defined(CONFIG_PPC64) || defined(CONFIG_4xx) || \
87 defined(CONFIG_FSL_BOOKE) || defined(CONFIG_8xx)
88
89static inline void flush_tlb_mm(struct mm_struct *mm)
90{
91 flush_tlb_pending();
92}
93
94static inline void flush_tlb_page(struct vm_area_struct *vma,
95 unsigned long vmaddr)
96{
97#ifdef CONFIG_PPC64
98 flush_tlb_pending();
99#else
100 _tlbie(vmaddr);
101#endif
102}
103
104static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
105 unsigned long vmaddr)
106{
107#ifndef CONFIG_PPC64
108 _tlbie(vmaddr);
109#endif
110}
111
112static inline void flush_tlb_range(struct vm_area_struct *vma,
113 unsigned long start, unsigned long end)
114{
115 flush_tlb_pending();
116}
117
118static inline void flush_tlb_kernel_range(unsigned long start,
119 unsigned long end)
120{
121 flush_tlb_pending();
122}
123
124#else /* 6xx, 7xx, 7xxx cpus */
125
126extern void flush_tlb_mm(struct mm_struct *mm);
127extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
128extern void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long addr);
129extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
130 unsigned long end);
131extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
132
133#endif
134
135/*
136 * This is called in munmap when we have freed up some page-table
137 * pages. We don't need to do anything here, there's nothing special
138 * about our page-table pages. -- paulus
139 */
140static inline void flush_tlb_pgtables(struct mm_struct *mm,
141 unsigned long start, unsigned long end)
142{
143}
144
145#endif /*__KERNEL__ */
146#endif /* _ASM_POWERPC_TLBFLUSH_H */
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h
new file mode 100644
index 000000000000..33af730f0d19
--- /dev/null
+++ b/include/asm-powerpc/uaccess.h
@@ -0,0 +1,468 @@
1#ifndef _ARCH_POWERPC_UACCESS_H
2#define _ARCH_POWERPC_UACCESS_H
3
4#ifdef __KERNEL__
5#ifndef __ASSEMBLY__
6
7#include <linux/sched.h>
8#include <linux/errno.h>
9#include <asm/processor.h>
10
11#define VERIFY_READ 0
12#define VERIFY_WRITE 1
13
14/*
15 * The fs value determines whether argument validity checking should be
16 * performed or not. If get_fs() == USER_DS, checking is performed, with
17 * get_fs() == KERNEL_DS, checking is bypassed.
18 *
19 * For historical reasons, these macros are grossly misnamed.
20 *
21 * The fs/ds values are now the highest legal address in the "segment".
22 * This simplifies the checking in the routines below.
23 */
24
25#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
26
27#define KERNEL_DS MAKE_MM_SEG(~0UL)
28#ifdef __powerpc64__
29/* We use TASK_SIZE_USER64 as TASK_SIZE is not constant */
30#define USER_DS MAKE_MM_SEG(TASK_SIZE_USER64 - 1)
31#else
32#define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
33#endif
34
35#define get_ds() (KERNEL_DS)
36#define get_fs() (current->thread.fs)
37#define set_fs(val) (current->thread.fs = (val))
38
39#define segment_eq(a, b) ((a).seg == (b).seg)
40
41#ifdef __powerpc64__
42/*
43 * This check is sufficient because there is a large enough
44 * gap between user addresses and the kernel addresses
45 */
46#define __access_ok(addr, size, segment) \
47 (((addr) <= (segment).seg) && ((size) <= (segment).seg))
48
49#else
50
51#define __access_ok(addr, size, segment) \
52 (((addr) <= (segment).seg) && \
53 (((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
54
55#endif
56
57#define access_ok(type, addr, size) \
58 (__chk_user_ptr(addr), \
59 __access_ok((__force unsigned long)(addr), (size), get_fs()))
60
61/*
62 * The exception table consists of pairs of addresses: the first is the
63 * address of an instruction that is allowed to fault, and the second is
64 * the address at which the program should continue. No registers are
65 * modified, so it is entirely up to the continuation code to figure out
66 * what to do.
67 *
68 * All the routines below use bits of fixup code that are out of line
69 * with the main instruction path. This means when everything is well,
70 * we don't even have to jump over them. Further, they do not intrude
71 * on our cache or tlb entries.
72 */
73
74struct exception_table_entry {
75 unsigned long insn;
76 unsigned long fixup;
77};
78
79/*
80 * These are the main single-value transfer routines. They automatically
81 * use the right size if we just have the right pointer type.
82 *
83 * This gets kind of ugly. We want to return _two_ values in "get_user()"
84 * and yet we don't want to do any pointers, because that is too much
85 * of a performance impact. Thus we have a few rather ugly macros here,
86 * and hide all the ugliness from the user.
87 *
88 * The "__xxx" versions of the user access functions are versions that
89 * do not verify the address space, that must have been done previously
90 * with a separate "access_ok()" call (this is used when we do multiple
91 * accesses to the same area of user memory).
92 *
93 * As we use the same address space for kernel and user data on the
94 * PowerPC, we can just do these as direct assignments. (Of course, the
95 * exception handling means that it's no longer "just"...)
96 *
97 * The "user64" versions of the user access functions are versions that
98 * allow access of 64-bit data. The "get_user" functions do not
99 * properly handle 64-bit data because the value gets down cast to a long.
100 * The "put_user" functions already handle 64-bit data properly but we add
101 * "user64" versions for completeness
102 */
103#define get_user(x, ptr) \
104 __get_user_check((x), (ptr), sizeof(*(ptr)))
105#define put_user(x, ptr) \
106 __put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
107
108#define __get_user(x, ptr) \
109 __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
110#define __put_user(x, ptr) \
111 __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
112#ifndef __powerpc64__
113#define __get_user64(x, ptr) \
114 __get_user64_nocheck((x), (ptr), sizeof(*(ptr)))
115#define __put_user64(x, ptr) __put_user(x, ptr)
116#endif
117
118#define __get_user_unaligned __get_user
119#define __put_user_unaligned __put_user
120
121extern long __put_user_bad(void);
122
123#ifdef __powerpc64__
124#define __EX_TABLE_ALIGN "3"
125#define __EX_TABLE_TYPE "llong"
126#else
127#define __EX_TABLE_ALIGN "2"
128#define __EX_TABLE_TYPE "long"
129#endif
130
131/*
132 * We don't tell gcc that we are accessing memory, but this is OK
133 * because we do not write to any memory gcc knows about, so there
134 * are no aliasing issues.
135 */
136#define __put_user_asm(x, addr, err, op) \
137 __asm__ __volatile__( \
138 "1: " op " %1,0(%2) # put_user\n" \
139 "2:\n" \
140 ".section .fixup,\"ax\"\n" \
141 "3: li %0,%3\n" \
142 " b 2b\n" \
143 ".previous\n" \
144 ".section __ex_table,\"a\"\n" \
145 " .align " __EX_TABLE_ALIGN "\n" \
146 " ."__EX_TABLE_TYPE" 1b,3b\n" \
147 ".previous" \
148 : "=r" (err) \
149 : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err))
150
151#ifdef __powerpc64__
152#define __put_user_asm2(x, ptr, retval) \
153 __put_user_asm(x, ptr, retval, "std")
154#else /* __powerpc64__ */
155#define __put_user_asm2(x, addr, err) \
156 __asm__ __volatile__( \
157 "1: stw %1,0(%2)\n" \
158 "2: stw %1+1,4(%2)\n" \
159 "3:\n" \
160 ".section .fixup,\"ax\"\n" \
161 "4: li %0,%3\n" \
162 " b 3b\n" \
163 ".previous\n" \
164 ".section __ex_table,\"a\"\n" \
165 " .align " __EX_TABLE_ALIGN "\n" \
166 " ." __EX_TABLE_TYPE " 1b,4b\n" \
167 " ." __EX_TABLE_TYPE " 2b,4b\n" \
168 ".previous" \
169 : "=r" (err) \
170 : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err))
171#endif /* __powerpc64__ */
172
173#define __put_user_size(x, ptr, size, retval) \
174do { \
175 retval = 0; \
176 switch (size) { \
177 case 1: __put_user_asm(x, ptr, retval, "stb"); break; \
178 case 2: __put_user_asm(x, ptr, retval, "sth"); break; \
179 case 4: __put_user_asm(x, ptr, retval, "stw"); break; \
180 case 8: __put_user_asm2(x, ptr, retval); break; \
181 default: __put_user_bad(); \
182 } \
183} while (0)
184
185#define __put_user_nocheck(x, ptr, size) \
186({ \
187 long __pu_err; \
188 might_sleep(); \
189 __chk_user_ptr(ptr); \
190 __put_user_size((x), (ptr), (size), __pu_err); \
191 __pu_err; \
192})
193
194#define __put_user_check(x, ptr, size) \
195({ \
196 long __pu_err = -EFAULT; \
197 __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
198 might_sleep(); \
199 if (access_ok(VERIFY_WRITE, __pu_addr, size)) \
200 __put_user_size((x), __pu_addr, (size), __pu_err); \
201 __pu_err; \
202})
203
204extern long __get_user_bad(void);
205
206#define __get_user_asm(x, addr, err, op) \
207 __asm__ __volatile__( \
208 "1: "op" %1,0(%2) # get_user\n" \
209 "2:\n" \
210 ".section .fixup,\"ax\"\n" \
211 "3: li %0,%3\n" \
212 " li %1,0\n" \
213 " b 2b\n" \
214 ".previous\n" \
215 ".section __ex_table,\"a\"\n" \
216 " .align "__EX_TABLE_ALIGN "\n" \
217 " ." __EX_TABLE_TYPE " 1b,3b\n" \
218 ".previous" \
219 : "=r" (err), "=r" (x) \
220 : "b" (addr), "i" (-EFAULT), "0" (err))
221
222#ifdef __powerpc64__
223#define __get_user_asm2(x, addr, err) \
224 __get_user_asm(x, addr, err, "ld")
225#else /* __powerpc64__ */
226#define __get_user_asm2(x, addr, err) \
227 __asm__ __volatile__( \
228 "1: lwz %1,0(%2)\n" \
229 "2: lwz %1+1,4(%2)\n" \
230 "3:\n" \
231 ".section .fixup,\"ax\"\n" \
232 "4: li %0,%3\n" \
233 " li %1,0\n" \
234 " li %1+1,0\n" \
235 " b 3b\n" \
236 ".previous\n" \
237 ".section __ex_table,\"a\"\n" \
238 " .align " __EX_TABLE_ALIGN "\n" \
239 " ." __EX_TABLE_TYPE " 1b,4b\n" \
240 " ." __EX_TABLE_TYPE " 2b,4b\n" \
241 ".previous" \
242 : "=r" (err), "=&r" (x) \
243 : "b" (addr), "i" (-EFAULT), "0" (err))
244#endif /* __powerpc64__ */
245
246#define __get_user_size(x, ptr, size, retval) \
247do { \
248 retval = 0; \
249 __chk_user_ptr(ptr); \
250 if (size > sizeof(x)) \
251 (x) = __get_user_bad(); \
252 switch (size) { \
253 case 1: __get_user_asm(x, ptr, retval, "lbz"); break; \
254 case 2: __get_user_asm(x, ptr, retval, "lhz"); break; \
255 case 4: __get_user_asm(x, ptr, retval, "lwz"); break; \
256 case 8: __get_user_asm2(x, ptr, retval); break; \
257 default: (x) = __get_user_bad(); \
258 } \
259} while (0)
260
261#define __get_user_nocheck(x, ptr, size) \
262({ \
263 long __gu_err; \
264 unsigned long __gu_val; \
265 __chk_user_ptr(ptr); \
266 might_sleep(); \
267 __get_user_size(__gu_val, (ptr), (size), __gu_err); \
268 (x) = (__typeof__(*(ptr)))__gu_val; \
269 __gu_err; \
270})
271
272#ifndef __powerpc64__
273#define __get_user64_nocheck(x, ptr, size) \
274({ \
275 long __gu_err; \
276 long long __gu_val; \
277 __chk_user_ptr(ptr); \
278 might_sleep(); \
279 __get_user_size(__gu_val, (ptr), (size), __gu_err); \
280 (x) = (__typeof__(*(ptr)))__gu_val; \
281 __gu_err; \
282})
283#endif /* __powerpc64__ */
284
285#define __get_user_check(x, ptr, size) \
286({ \
287 long __gu_err = -EFAULT; \
288 unsigned long __gu_val = 0; \
289 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
290 might_sleep(); \
291 if (access_ok(VERIFY_READ, __gu_addr, (size))) \
292 __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
293 (x) = (__typeof__(*(ptr)))__gu_val; \
294 __gu_err; \
295})
296
297/* more complex routines */
298
299extern unsigned long __copy_tofrom_user(void __user *to,
300 const void __user *from, unsigned long size);
301
302#ifndef __powerpc64__
303
304extern inline unsigned long copy_from_user(void *to,
305 const void __user *from, unsigned long n)
306{
307 unsigned long over;
308
309 if (access_ok(VERIFY_READ, from, n))
310 return __copy_tofrom_user((__force void __user *)to, from, n);
311 if ((unsigned long)from < TASK_SIZE) {
312 over = (unsigned long)from + n - TASK_SIZE;
313 return __copy_tofrom_user((__force void __user *)to, from,
314 n - over) + over;
315 }
316 return n;
317}
318
319extern inline unsigned long copy_to_user(void __user *to,
320 const void *from, unsigned long n)
321{
322 unsigned long over;
323
324 if (access_ok(VERIFY_WRITE, to, n))
325 return __copy_tofrom_user(to, (__force void __user *)from, n);
326 if ((unsigned long)to < TASK_SIZE) {
327 over = (unsigned long)to + n - TASK_SIZE;
328 return __copy_tofrom_user(to, (__force void __user *)from,
329 n - over) + over;
330 }
331 return n;
332}
333
334#else /* __powerpc64__ */
335
336#define __copy_in_user(to, from, size) \
337 __copy_tofrom_user((to), (from), (size))
338
339extern unsigned long copy_from_user(void *to, const void __user *from,
340 unsigned long n);
341extern unsigned long copy_to_user(void __user *to, const void *from,
342 unsigned long n);
343extern unsigned long copy_in_user(void __user *to, const void __user *from,
344 unsigned long n);
345
346#endif /* __powerpc64__ */
347
348static inline unsigned long __copy_from_user_inatomic(void *to,
349 const void __user *from, unsigned long n)
350{
351 if (__builtin_constant_p(n) && (n <= 8)) {
352 unsigned long ret;
353
354 switch (n) {
355 case 1:
356 __get_user_size(*(u8 *)to, from, 1, ret);
357 break;
358 case 2:
359 __get_user_size(*(u16 *)to, from, 2, ret);
360 break;
361 case 4:
362 __get_user_size(*(u32 *)to, from, 4, ret);
363 break;
364 case 8:
365 __get_user_size(*(u64 *)to, from, 8, ret);
366 break;
367 }
368 if (ret == 0)
369 return 0;
370 }
371 return __copy_tofrom_user((__force void __user *)to, from, n);
372}
373
374static inline unsigned long __copy_to_user_inatomic(void __user *to,
375 const void *from, unsigned long n)
376{
377 if (__builtin_constant_p(n) && (n <= 8)) {
378 unsigned long ret;
379
380 switch (n) {
381 case 1:
382 __put_user_size(*(u8 *)from, (u8 __user *)to, 1, ret);
383 break;
384 case 2:
385 __put_user_size(*(u16 *)from, (u16 __user *)to, 2, ret);
386 break;
387 case 4:
388 __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret);
389 break;
390 case 8:
391 __put_user_size(*(u64 *)from, (u64 __user *)to, 8, ret);
392 break;
393 }
394 if (ret == 0)
395 return 0;
396 }
397 return __copy_tofrom_user(to, (__force const void __user *)from, n);
398}
399
400static inline unsigned long __copy_from_user(void *to,
401 const void __user *from, unsigned long size)
402{
403 might_sleep();
404 return __copy_from_user_inatomic(to, from, size);
405}
406
407static inline unsigned long __copy_to_user(void __user *to,
408 const void *from, unsigned long size)
409{
410 might_sleep();
411 return __copy_to_user_inatomic(to, from, size);
412}
413
414extern unsigned long __clear_user(void __user *addr, unsigned long size);
415
416static inline unsigned long clear_user(void __user *addr, unsigned long size)
417{
418 might_sleep();
419 if (likely(access_ok(VERIFY_WRITE, addr, size)))
420 return __clear_user(addr, size);
421 if ((unsigned long)addr < TASK_SIZE) {
422 unsigned long over = (unsigned long)addr + size - TASK_SIZE;
423 return __clear_user(addr, size - over) + over;
424 }
425 return size;
426}
427
428extern int __strncpy_from_user(char *dst, const char __user *src, long count);
429
430static inline long strncpy_from_user(char *dst, const char __user *src,
431 long count)
432{
433 might_sleep();
434 if (likely(access_ok(VERIFY_READ, src, 1)))
435 return __strncpy_from_user(dst, src, count);
436 return -EFAULT;
437}
438
439/*
440 * Return the size of a string (including the ending 0)
441 *
442 * Return 0 for error
443 */
444extern int __strnlen_user(const char __user *str, long len, unsigned long top);
445
446/*
447 * Returns the length of the string at str (including the null byte),
448 * or 0 if we hit a page we can't access,
449 * or something > len if we didn't find a null byte.
450 *
451 * The `top' parameter to __strnlen_user is to make sure that
452 * we can never overflow from the user area into kernel space.
453 */
454static inline int strnlen_user(const char __user *str, long len)
455{
456 unsigned long top = current->thread.fs.seg;
457
458 if ((unsigned long)str > top)
459 return 0;
460 return __strnlen_user(str, len, top);
461}
462
463#define strlen_user(str) strnlen_user((str), 0x7ffffffe)
464
465#endif /* __ASSEMBLY__ */
466#endif /* __KERNEL__ */
467
468#endif /* _ARCH_POWERPC_UACCESS_H */
diff --git a/include/asm-powerpc/ucontext.h b/include/asm-powerpc/ucontext.h
new file mode 100644
index 000000000000..d9a4ddf0cc86
--- /dev/null
+++ b/include/asm-powerpc/ucontext.h
@@ -0,0 +1,40 @@
1#ifndef _ASM_POWERPC_UCONTEXT_H
2#define _ASM_POWERPC_UCONTEXT_H
3
4#ifdef __powerpc64__
5#include <asm/sigcontext.h>
6#else
7#include <asm/elf.h>
8#endif
9#include <asm/signal.h>
10
11#ifndef __powerpc64__
12struct mcontext {
13 elf_gregset_t mc_gregs;
14 elf_fpregset_t mc_fregs;
15 unsigned long mc_pad[2];
16 elf_vrregset_t mc_vregs __attribute__((__aligned__(16)));
17};
18#endif
19
20struct ucontext {
21 unsigned long uc_flags;
22 struct ucontext __user *uc_link;
23 stack_t uc_stack;
24#ifndef __powerpc64__
25 int uc_pad[7];
26 struct mcontext __user *uc_regs;/* points to uc_mcontext field */
27#endif
28 sigset_t uc_sigmask;
29 /* glibc has 1024-bit signal masks, ours are 64-bit */
30#ifdef __powerpc64__
31 sigset_t __unused[15]; /* Allow for uc_sigmask growth */
32 struct sigcontext uc_mcontext; /* last for extensibility */
33#else
34 int uc_maskext[30];
35 int uc_pad2[3];
36 struct mcontext uc_mcontext;
37#endif
38};
39
40#endif /* _ASM_POWERPC_UCONTEXT_H */
diff --git a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h
deleted file mode 100644
index e30f536fd830..000000000000
--- a/include/asm-ppc/bitops.h
+++ /dev/null
@@ -1,460 +0,0 @@
1/*
2 * bitops.h: Bit string operations on the ppc
3 */
4
5#ifdef __KERNEL__
6#ifndef _PPC_BITOPS_H
7#define _PPC_BITOPS_H
8
9#include <linux/config.h>
10#include <linux/compiler.h>
11#include <asm/byteorder.h>
12#include <asm/atomic.h>
13
14/*
15 * The test_and_*_bit operations are taken to imply a memory barrier
16 * on SMP systems.
17 */
18#ifdef CONFIG_SMP
19#define SMP_WMB "eieio\n"
20#define SMP_MB "\nsync"
21#else
22#define SMP_WMB
23#define SMP_MB
24#endif /* CONFIG_SMP */
25
26static __inline__ void set_bit(int nr, volatile unsigned long * addr)
27{
28 unsigned long old;
29 unsigned long mask = 1 << (nr & 0x1f);
30 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
31
32 __asm__ __volatile__("\n\
331: lwarx %0,0,%3 \n\
34 or %0,%0,%2 \n"
35 PPC405_ERR77(0,%3)
36" stwcx. %0,0,%3 \n\
37 bne- 1b"
38 : "=&r" (old), "=m" (*p)
39 : "r" (mask), "r" (p), "m" (*p)
40 : "cc" );
41}
42
43/*
44 * non-atomic version
45 */
46static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
47{
48 unsigned long mask = 1 << (nr & 0x1f);
49 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
50
51 *p |= mask;
52}
53
54/*
55 * clear_bit doesn't imply a memory barrier
56 */
57#define smp_mb__before_clear_bit() smp_mb()
58#define smp_mb__after_clear_bit() smp_mb()
59
60static __inline__ void clear_bit(int nr, volatile unsigned long *addr)
61{
62 unsigned long old;
63 unsigned long mask = 1 << (nr & 0x1f);
64 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
65
66 __asm__ __volatile__("\n\
671: lwarx %0,0,%3 \n\
68 andc %0,%0,%2 \n"
69 PPC405_ERR77(0,%3)
70" stwcx. %0,0,%3 \n\
71 bne- 1b"
72 : "=&r" (old), "=m" (*p)
73 : "r" (mask), "r" (p), "m" (*p)
74 : "cc");
75}
76
77/*
78 * non-atomic version
79 */
80static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
81{
82 unsigned long mask = 1 << (nr & 0x1f);
83 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
84
85 *p &= ~mask;
86}
87
88static __inline__ void change_bit(int nr, volatile unsigned long *addr)
89{
90 unsigned long old;
91 unsigned long mask = 1 << (nr & 0x1f);
92 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
93
94 __asm__ __volatile__("\n\
951: lwarx %0,0,%3 \n\
96 xor %0,%0,%2 \n"
97 PPC405_ERR77(0,%3)
98" stwcx. %0,0,%3 \n\
99 bne- 1b"
100 : "=&r" (old), "=m" (*p)
101 : "r" (mask), "r" (p), "m" (*p)
102 : "cc");
103}
104
105/*
106 * non-atomic version
107 */
108static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
109{
110 unsigned long mask = 1 << (nr & 0x1f);
111 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
112
113 *p ^= mask;
114}
115
116/*
117 * test_and_*_bit do imply a memory barrier (?)
118 */
119static __inline__ int test_and_set_bit(int nr, volatile unsigned long *addr)
120{
121 unsigned int old, t;
122 unsigned int mask = 1 << (nr & 0x1f);
123 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
124
125 __asm__ __volatile__(SMP_WMB "\n\
1261: lwarx %0,0,%4 \n\
127 or %1,%0,%3 \n"
128 PPC405_ERR77(0,%4)
129" stwcx. %1,0,%4 \n\
130 bne 1b"
131 SMP_MB
132 : "=&r" (old), "=&r" (t), "=m" (*p)
133 : "r" (mask), "r" (p), "m" (*p)
134 : "cc", "memory");
135
136 return (old & mask) != 0;
137}
138
139/*
140 * non-atomic version
141 */
142static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
143{
144 unsigned long mask = 1 << (nr & 0x1f);
145 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
146 unsigned long old = *p;
147
148 *p = old | mask;
149 return (old & mask) != 0;
150}
151
152static __inline__ int test_and_clear_bit(int nr, volatile unsigned long *addr)
153{
154 unsigned int old, t;
155 unsigned int mask = 1 << (nr & 0x1f);
156 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
157
158 __asm__ __volatile__(SMP_WMB "\n\
1591: lwarx %0,0,%4 \n\
160 andc %1,%0,%3 \n"
161 PPC405_ERR77(0,%4)
162" stwcx. %1,0,%4 \n\
163 bne 1b"
164 SMP_MB
165 : "=&r" (old), "=&r" (t), "=m" (*p)
166 : "r" (mask), "r" (p), "m" (*p)
167 : "cc", "memory");
168
169 return (old & mask) != 0;
170}
171
172/*
173 * non-atomic version
174 */
175static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
176{
177 unsigned long mask = 1 << (nr & 0x1f);
178 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
179 unsigned long old = *p;
180
181 *p = old & ~mask;
182 return (old & mask) != 0;
183}
184
185static __inline__ int test_and_change_bit(int nr, volatile unsigned long *addr)
186{
187 unsigned int old, t;
188 unsigned int mask = 1 << (nr & 0x1f);
189 volatile unsigned int *p = ((volatile unsigned int *)addr) + (nr >> 5);
190
191 __asm__ __volatile__(SMP_WMB "\n\
1921: lwarx %0,0,%4 \n\
193 xor %1,%0,%3 \n"
194 PPC405_ERR77(0,%4)
195" stwcx. %1,0,%4 \n\
196 bne 1b"
197 SMP_MB
198 : "=&r" (old), "=&r" (t), "=m" (*p)
199 : "r" (mask), "r" (p), "m" (*p)
200 : "cc", "memory");
201
202 return (old & mask) != 0;
203}
204
205/*
206 * non-atomic version
207 */
208static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
209{
210 unsigned long mask = 1 << (nr & 0x1f);
211 unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
212 unsigned long old = *p;
213
214 *p = old ^ mask;
215 return (old & mask) != 0;
216}
217
218static __inline__ int test_bit(int nr, __const__ volatile unsigned long *addr)
219{
220 return ((addr[nr >> 5] >> (nr & 0x1f)) & 1) != 0;
221}
222
223/* Return the bit position of the most significant 1 bit in a word */
224static __inline__ int __ilog2(unsigned long x)
225{
226 int lz;
227
228 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
229 return 31 - lz;
230}
231
232static __inline__ int ffz(unsigned long x)
233{
234 if ((x = ~x) == 0)
235 return 32;
236 return __ilog2(x & -x);
237}
238
239static inline int __ffs(unsigned long x)
240{
241 return __ilog2(x & -x);
242}
243
244/*
245 * ffs: find first bit set. This is defined the same way as
246 * the libc and compiler builtin ffs routines, therefore
247 * differs in spirit from the above ffz (man ffs).
248 */
249static __inline__ int ffs(int x)
250{
251 return __ilog2(x & -x) + 1;
252}
253
254/*
255 * fls: find last (most-significant) bit set.
256 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
257 */
258static __inline__ int fls(unsigned int x)
259{
260 int lz;
261
262 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
263 return 32 - lz;
264}
265
266/*
267 * hweightN: returns the hamming weight (i.e. the number
268 * of bits set) of a N-bit word
269 */
270
271#define hweight32(x) generic_hweight32(x)
272#define hweight16(x) generic_hweight16(x)
273#define hweight8(x) generic_hweight8(x)
274
275/*
276 * Find the first bit set in a 140-bit bitmap.
277 * The first 100 bits are unlikely to be set.
278 */
279static inline int sched_find_first_bit(const unsigned long *b)
280{
281 if (unlikely(b[0]))
282 return __ffs(b[0]);
283 if (unlikely(b[1]))
284 return __ffs(b[1]) + 32;
285 if (unlikely(b[2]))
286 return __ffs(b[2]) + 64;
287 if (b[3])
288 return __ffs(b[3]) + 96;
289 return __ffs(b[4]) + 128;
290}
291
292/**
293 * find_next_bit - find the next set bit in a memory region
294 * @addr: The address to base the search on
295 * @offset: The bitnumber to start searching at
296 * @size: The maximum size to search
297 */
298static __inline__ unsigned long find_next_bit(const unsigned long *addr,
299 unsigned long size, unsigned long offset)
300{
301 unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
302 unsigned int result = offset & ~31UL;
303 unsigned int tmp;
304
305 if (offset >= size)
306 return size;
307 size -= result;
308 offset &= 31UL;
309 if (offset) {
310 tmp = *p++;
311 tmp &= ~0UL << offset;
312 if (size < 32)
313 goto found_first;
314 if (tmp)
315 goto found_middle;
316 size -= 32;
317 result += 32;
318 }
319 while (size >= 32) {
320 if ((tmp = *p++) != 0)
321 goto found_middle;
322 result += 32;
323 size -= 32;
324 }
325 if (!size)
326 return result;
327 tmp = *p;
328
329found_first:
330 tmp &= ~0UL >> (32 - size);
331 if (tmp == 0UL) /* Are any bits set? */
332 return result + size; /* Nope. */
333found_middle:
334 return result + __ffs(tmp);
335}
336
337/**
338 * find_first_bit - find the first set bit in a memory region
339 * @addr: The address to start the search at
340 * @size: The maximum size to search
341 *
342 * Returns the bit-number of the first set bit, not the number of the byte
343 * containing a bit.
344 */
345#define find_first_bit(addr, size) \
346 find_next_bit((addr), (size), 0)
347
348/*
349 * This implementation of find_{first,next}_zero_bit was stolen from
350 * Linus' asm-alpha/bitops.h.
351 */
352#define find_first_zero_bit(addr, size) \
353 find_next_zero_bit((addr), (size), 0)
354
355static __inline__ unsigned long find_next_zero_bit(const unsigned long *addr,
356 unsigned long size, unsigned long offset)
357{
358 unsigned int * p = ((unsigned int *) addr) + (offset >> 5);
359 unsigned int result = offset & ~31UL;
360 unsigned int tmp;
361
362 if (offset >= size)
363 return size;
364 size -= result;
365 offset &= 31UL;
366 if (offset) {
367 tmp = *p++;
368 tmp |= ~0UL >> (32-offset);
369 if (size < 32)
370 goto found_first;
371 if (tmp != ~0U)
372 goto found_middle;
373 size -= 32;
374 result += 32;
375 }
376 while (size >= 32) {
377 if ((tmp = *p++) != ~0U)
378 goto found_middle;
379 result += 32;
380 size -= 32;
381 }
382 if (!size)
383 return result;
384 tmp = *p;
385found_first:
386 tmp |= ~0UL << size;
387 if (tmp == ~0UL) /* Are any bits zero? */
388 return result + size; /* Nope. */
389found_middle:
390 return result + ffz(tmp);
391}
392
393
394#define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
395#define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
396#define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
397#define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
398
399static __inline__ int ext2_test_bit(int nr, __const__ void * addr)
400{
401 __const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
402
403 return (ADDR[nr >> 3] >> (nr & 7)) & 1;
404}
405
406/*
407 * This implementation of ext2_find_{first,next}_zero_bit was stolen from
408 * Linus' asm-alpha/bitops.h and modified for a big-endian machine.
409 */
410
411#define ext2_find_first_zero_bit(addr, size) \
412 ext2_find_next_zero_bit((addr), (size), 0)
413
414static __inline__ unsigned long ext2_find_next_zero_bit(const void *addr,
415 unsigned long size, unsigned long offset)
416{
417 unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
418 unsigned int result = offset & ~31UL;
419 unsigned int tmp;
420
421 if (offset >= size)
422 return size;
423 size -= result;
424 offset &= 31UL;
425 if (offset) {
426 tmp = cpu_to_le32p(p++);
427 tmp |= ~0UL >> (32-offset);
428 if (size < 32)
429 goto found_first;
430 if (tmp != ~0U)
431 goto found_middle;
432 size -= 32;
433 result += 32;
434 }
435 while (size >= 32) {
436 if ((tmp = cpu_to_le32p(p++)) != ~0U)
437 goto found_middle;
438 result += 32;
439 size -= 32;
440 }
441 if (!size)
442 return result;
443 tmp = cpu_to_le32p(p);
444found_first:
445 tmp |= ~0U << size;
446 if (tmp == ~0UL) /* Are any bits zero? */
447 return result + size; /* Nope. */
448found_middle:
449 return result + ffz(tmp);
450}
451
452/* Bitmap functions for the minix filesystem. */
453#define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr)
454#define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr))
455#define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
456#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
457#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
458
459#endif /* _PPC_BITOPS_H */
460#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h
index 5bbb8e2c1c6d..973e60908234 100644
--- a/include/asm-ppc/commproc.h
+++ b/include/asm-ppc/commproc.h
@@ -83,6 +83,8 @@ extern uint m8xx_cpm_hostalloc(uint size);
83extern int m8xx_cpm_hostfree(uint start); 83extern int m8xx_cpm_hostfree(uint start);
84extern void m8xx_cpm_hostdump(void); 84extern void m8xx_cpm_hostdump(void);
85 85
86extern void cpm_load_patch(volatile immap_t *immr);
87
86/* Buffer descriptors used by many of the CPM protocols. 88/* Buffer descriptors used by many of the CPM protocols.
87*/ 89*/
88typedef struct cpm_buf_desc { 90typedef struct cpm_buf_desc {
diff --git a/include/asm-ppc/futex.h b/include/asm-ppc/futex.h
deleted file mode 100644
index 9feff4ce1424..000000000000
--- a/include/asm-ppc/futex.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#ifdef __KERNEL__
5
6#include <linux/futex.h>
7#include <asm/errno.h>
8#include <asm/uaccess.h>
9
10static inline int
11futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
12{
13 int op = (encoded_op >> 28) & 7;
14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg;
20
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT;
23
24 inc_preempt_count();
25
26 switch (op) {
27 case FUTEX_OP_SET:
28 case FUTEX_OP_ADD:
29 case FUTEX_OP_OR:
30 case FUTEX_OP_ANDN:
31 case FUTEX_OP_XOR:
32 default:
33 ret = -ENOSYS;
34 }
35
36 dec_preempt_count();
37
38 if (!ret) {
39 switch (cmp) {
40 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
41 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
42 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
43 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
44 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
45 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
46 default: ret = -ENOSYS;
47 }
48 }
49 return ret;
50}
51
52#endif
53#endif
diff --git a/include/asm-ppc/ipcbuf.h b/include/asm-ppc/ipcbuf.h
deleted file mode 100644
index fab6752c7480..000000000000
--- a/include/asm-ppc/ipcbuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __PPC_IPCBUF_H__
2#define __PPC_IPCBUF_H__
3
4/*
5 * The ipc64_perm structure for PPC architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 1 32-bit value to fill up for 8-byte alignment
11 * - 2 miscellaneous 64-bit values (so that this structure matches
12 * PPC64 ipc64_perm)
13 */
14
15struct ipc64_perm
16{
17 __kernel_key_t key;
18 __kernel_uid_t uid;
19 __kernel_gid_t gid;
20 __kernel_uid_t cuid;
21 __kernel_gid_t cgid;
22 __kernel_mode_t mode;
23 unsigned long seq;
24 unsigned int __pad2;
25 unsigned long long __unused1;
26 unsigned long long __unused2;
27};
28
29#endif /* __PPC_IPCBUF_H__ */
diff --git a/include/asm-ppc/kexec.h b/include/asm-ppc/kexec.h
deleted file mode 100644
index 6d2aa0aa4642..000000000000
--- a/include/asm-ppc/kexec.h
+++ /dev/null
@@ -1,40 +0,0 @@
1#ifndef _PPC_KEXEC_H
2#define _PPC_KEXEC_H
3
4#ifdef CONFIG_KEXEC
5
6/*
7 * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
8 * I.e. Maximum page that is mapped directly into kernel memory,
9 * and kmap is not required.
10 *
11 * Someone correct me if FIXADDR_START - PAGEOFFSET is not the correct
12 * calculation for the amount of memory directly mappable into the
13 * kernel memory space.
14 */
15
16/* Maximum physical address we can use pages from */
17#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
18/* Maximum address we can reach in physical address mode */
19#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
20/* Maximum address we can use for the control code buffer */
21#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
22
23#define KEXEC_CONTROL_CODE_SIZE 4096
24
25/* The native architecture */
26#define KEXEC_ARCH KEXEC_ARCH_PPC
27
28#ifndef __ASSEMBLY__
29
30extern void *crash_notes;
31
32struct kimage;
33
34extern void machine_kexec_simple(struct kimage *image);
35
36#endif /* __ASSEMBLY__ */
37
38#endif /* CONFIG_KEXEC */
39
40#endif /* _PPC_KEXEC_H */
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h
deleted file mode 100644
index c34fb4e37a97..000000000000
--- a/include/asm-ppc/ptrace.h
+++ /dev/null
@@ -1,152 +0,0 @@
1#ifndef _PPC_PTRACE_H
2#define _PPC_PTRACE_H
3
4/*
5 * This struct defines the way the registers are stored on the
6 * kernel stack during a system call or other kernel entry.
7 *
8 * this should only contain volatile regs
9 * since we can keep non-volatile in the thread_struct
10 * should set this up when only volatiles are saved
11 * by intr code.
12 *
13 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
14 * that the overall structure is a multiple of 16 bytes in length.
15 *
16 * Note that the offsets of the fields in this struct correspond with
17 * the PT_* values below. This simplifies arch/ppc/kernel/ptrace.c.
18 */
19
20#ifndef __ASSEMBLY__
21struct pt_regs {
22 unsigned long gpr[32];
23 unsigned long nip;
24 unsigned long msr;
25 unsigned long orig_gpr3; /* Used for restarting system calls */
26 unsigned long ctr;
27 unsigned long link;
28 unsigned long xer;
29 unsigned long ccr;
30 unsigned long mq; /* 601 only (not used at present) */
31 /* Used on APUS to hold IPL value. */
32 unsigned long trap; /* Reason for being here */
33 /* N.B. for critical exceptions on 4xx, the dar and dsisr
34 fields are overloaded to hold srr0 and srr1. */
35 unsigned long dar; /* Fault registers */
36 unsigned long dsisr; /* on 4xx/Book-E used for ESR */
37 unsigned long result; /* Result of a system call */
38};
39
40#endif /* __ASSEMBLY__ */
41
42#ifdef __KERNEL__
43#define STACK_FRAME_OVERHEAD 16 /* size of minimum stack frame */
44
45/* Size of stack frame allocated when calling signal handler. */
46#define __SIGNAL_FRAMESIZE 64
47
48#ifndef __ASSEMBLY__
49#define instruction_pointer(regs) ((regs)->nip)
50#ifdef CONFIG_SMP
51extern unsigned long profile_pc(struct pt_regs *regs);
52#else
53#define profile_pc(regs) instruction_pointer(regs)
54#endif
55
56#define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
57
58#define force_successful_syscall_return() \
59 do { \
60 current_thread_info()->syscall_noerror = 1; \
61 } while(0)
62
63/*
64 * We use the least-significant bit of the trap field to indicate
65 * whether we have saved the full set of registers, or only a
66 * partial set. A 1 there means the partial set.
67 * On 4xx we use the next bit to indicate whether the exception
68 * is a critical exception (1 means it is).
69 */
70#define FULL_REGS(regs) (((regs)->trap & 1) == 0)
71#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) == 0)
72#define TRAP(regs) ((regs)->trap & ~0xF)
73
74#define CHECK_FULL_REGS(regs) \
75do { \
76 if ((regs)->trap & 1) \
77 printk(KERN_CRIT "%s: partial register set\n", __FUNCTION__); \
78} while (0)
79#endif /* __ASSEMBLY__ */
80
81#endif /* __KERNEL__ */
82
83/*
84 * Offsets used by 'ptrace' system call interface.
85 * These can't be changed without breaking binary compatibility
86 * with MkLinux, etc.
87 */
88#define PT_R0 0
89#define PT_R1 1
90#define PT_R2 2
91#define PT_R3 3
92#define PT_R4 4
93#define PT_R5 5
94#define PT_R6 6
95#define PT_R7 7
96#define PT_R8 8
97#define PT_R9 9
98#define PT_R10 10
99#define PT_R11 11
100#define PT_R12 12
101#define PT_R13 13
102#define PT_R14 14
103#define PT_R15 15
104#define PT_R16 16
105#define PT_R17 17
106#define PT_R18 18
107#define PT_R19 19
108#define PT_R20 20
109#define PT_R21 21
110#define PT_R22 22
111#define PT_R23 23
112#define PT_R24 24
113#define PT_R25 25
114#define PT_R26 26
115#define PT_R27 27
116#define PT_R28 28
117#define PT_R29 29
118#define PT_R30 30
119#define PT_R31 31
120
121#define PT_NIP 32
122#define PT_MSR 33
123#ifdef __KERNEL__
124#define PT_ORIG_R3 34
125#endif
126#define PT_CTR 35
127#define PT_LNK 36
128#define PT_XER 37
129#define PT_CCR 38
130#define PT_MQ 39
131
132#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */
133#define PT_FPR31 (PT_FPR0 + 2*31)
134#define PT_FPSCR (PT_FPR0 + 2*32 + 1)
135
136/* Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go */
137#define PTRACE_GETVRREGS 18
138#define PTRACE_SETVRREGS 19
139
140/* Get/set all the upper 32-bits of the SPE registers, accumulator, and
141 * spefscr, in one go */
142#define PTRACE_GETEVRREGS 20
143#define PTRACE_SETEVRREGS 21
144
145/*
146 * Get or set a debug register. The first 16 are DABR registers and the
147 * second 16 are IABR registers.
148 */
149#define PTRACE_GET_DEBUGREG 25
150#define PTRACE_SET_DEBUGREG 26
151
152#endif
diff --git a/include/asm-ppc/sigcontext.h b/include/asm-ppc/sigcontext.h
deleted file mode 100644
index b7a417e0a921..000000000000
--- a/include/asm-ppc/sigcontext.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASM_PPC_SIGCONTEXT_H
2#define _ASM_PPC_SIGCONTEXT_H
3
4#include <asm/ptrace.h>
5#include <linux/compiler.h>
6
7struct sigcontext {
8 unsigned long _unused[4];
9 int signal;
10 unsigned long handler;
11 unsigned long oldmask;
12 struct pt_regs __user *regs;
13};
14
15#endif
diff --git a/include/asm-ppc/stat.h b/include/asm-ppc/stat.h
deleted file mode 100644
index cadb34298496..000000000000
--- a/include/asm-ppc/stat.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef _PPC_STAT_H
2#define _PPC_STAT_H
3
4#ifdef __KERNEL__
5#include <linux/types.h>
6#endif /* __KERNEL__ */
7
8struct __old_kernel_stat {
9 unsigned short st_dev;
10 unsigned short st_ino;
11 unsigned short st_mode;
12 unsigned short st_nlink;
13 unsigned short st_uid;
14 unsigned short st_gid;
15 unsigned short st_rdev;
16 unsigned long st_size;
17 unsigned long st_atime;
18 unsigned long st_mtime;
19 unsigned long st_ctime;
20};
21
22#define STAT_HAVE_NSEC 1
23
24struct stat {
25 unsigned st_dev;
26 ino_t st_ino;
27 mode_t st_mode;
28 nlink_t st_nlink;
29 uid_t st_uid;
30 gid_t st_gid;
31 unsigned st_rdev;
32 off_t st_size;
33 unsigned long st_blksize;
34 unsigned long st_blocks;
35 unsigned long st_atime;
36 unsigned long st_atime_nsec;
37 unsigned long st_mtime;
38 unsigned long st_mtime_nsec;
39 unsigned long st_ctime;
40 unsigned long st_ctime_nsec;
41 unsigned long __unused4;
42 unsigned long __unused5;
43};
44
45/* This matches struct stat64 in glibc2.1.
46 */
47struct stat64 {
48 unsigned long long st_dev; /* Device. */
49 unsigned long long st_ino; /* File serial number. */
50 unsigned int st_mode; /* File mode. */
51 unsigned int st_nlink; /* Link count. */
52 unsigned int st_uid; /* User ID of the file's owner. */
53 unsigned int st_gid; /* Group ID of the file's group. */
54 unsigned long long st_rdev; /* Device number, if device. */
55 unsigned short int __pad2;
56 long long st_size; /* Size of file, in bytes. */
57 long st_blksize; /* Optimal block size for I/O. */
58
59 long long st_blocks; /* Number 512-byte blocks allocated. */
60 long st_atime; /* Time of last access. */
61 unsigned long st_atime_nsec;
62 long st_mtime; /* Time of last modification. */
63 unsigned long int st_mtime_nsec;
64 long st_ctime; /* Time of last status change. */
65 unsigned long int st_ctime_nsec;
66 unsigned long int __unused4;
67 unsigned long int __unused5;
68};
69#endif
diff --git a/include/asm-ppc/tlbflush.h b/include/asm-ppc/tlbflush.h
deleted file mode 100644
index 9afee4ffc835..000000000000
--- a/include/asm-ppc/tlbflush.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * include/asm-ppc/tlbflush.h
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#ifdef __KERNEL__
10#ifndef _PPC_TLBFLUSH_H
11#define _PPC_TLBFLUSH_H
12
13#include <linux/config.h>
14#include <linux/mm.h>
15
16extern void _tlbie(unsigned long address);
17extern void _tlbia(void);
18
19#if defined(CONFIG_4xx)
20
21#ifndef CONFIG_44x
22#define __tlbia() asm volatile ("sync; tlbia; isync" : : : "memory")
23#else
24#define __tlbia _tlbia
25#endif
26
27static inline void flush_tlb_mm(struct mm_struct *mm)
28 { __tlbia(); }
29static inline void flush_tlb_page(struct vm_area_struct *vma,
30 unsigned long vmaddr)
31 { _tlbie(vmaddr); }
32static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
33 unsigned long vmaddr)
34 { _tlbie(vmaddr); }
35static inline void flush_tlb_range(struct vm_area_struct *vma,
36 unsigned long start, unsigned long end)
37 { __tlbia(); }
38static inline void flush_tlb_kernel_range(unsigned long start,
39 unsigned long end)
40 { __tlbia(); }
41
42#elif defined(CONFIG_FSL_BOOKE)
43
44/* TODO: determine if flush_tlb_range & flush_tlb_kernel_range
45 * are best implemented as tlbia vs specific tlbie's */
46
47#define __tlbia() _tlbia()
48
49static inline void flush_tlb_mm(struct mm_struct *mm)
50 { __tlbia(); }
51static inline void flush_tlb_page(struct vm_area_struct *vma,
52 unsigned long vmaddr)
53 { _tlbie(vmaddr); }
54static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
55 unsigned long vmaddr)
56 { _tlbie(vmaddr); }
57static inline void flush_tlb_range(struct vm_area_struct *vma,
58 unsigned long start, unsigned long end)
59 { __tlbia(); }
60static inline void flush_tlb_kernel_range(unsigned long start,
61 unsigned long end)
62 { __tlbia(); }
63
64#elif defined(CONFIG_8xx)
65#define __tlbia() asm volatile ("tlbia; sync" : : : "memory")
66
67static inline void flush_tlb_mm(struct mm_struct *mm)
68 { __tlbia(); }
69static inline void flush_tlb_page(struct vm_area_struct *vma,
70 unsigned long vmaddr)
71 { _tlbie(vmaddr); }
72static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
73 unsigned long vmaddr)
74 { _tlbie(vmaddr); }
75static inline void flush_tlb_range(struct vm_area_struct *vma,
76 unsigned long start, unsigned long end)
77 { __tlbia(); }
78static inline void flush_tlb_kernel_range(unsigned long start,
79 unsigned long end)
80 { __tlbia(); }
81
82#else /* 6xx, 7xx, 7xxx cpus */
83struct mm_struct;
84struct vm_area_struct;
85extern void flush_tlb_mm(struct mm_struct *mm);
86extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
87extern void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long addr);
88extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
89 unsigned long end);
90extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
91#endif
92
93/*
94 * This is called in munmap when we have freed up some page-table
95 * pages. We don't need to do anything here, there's nothing special
96 * about our page-table pages. -- paulus
97 */
98static inline void flush_tlb_pgtables(struct mm_struct *mm,
99 unsigned long start, unsigned long end)
100{
101}
102
103/*
104 * This gets called at the end of handling a page fault, when
105 * the kernel has put a new PTE into the page table for the process.
106 * We use it to ensure coherency between the i-cache and d-cache
107 * for the page which has just been mapped in.
108 * On machines which use an MMU hash table, we use this to put a
109 * corresponding HPTE into the hash table ahead of time, instead of
110 * waiting for the inevitable extra hash-table miss exception.
111 */
112extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
113
114#endif /* _PPC_TLBFLUSH_H */
115#endif /*__KERNEL__ */
diff --git a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h
deleted file mode 100644
index 63f56224da8c..000000000000
--- a/include/asm-ppc/uaccess.h
+++ /dev/null
@@ -1,393 +0,0 @@
1#ifdef __KERNEL__
2#ifndef _PPC_UACCESS_H
3#define _PPC_UACCESS_H
4
5#ifndef __ASSEMBLY__
6#include <linux/sched.h>
7#include <linux/errno.h>
8#include <asm/processor.h>
9
10#define VERIFY_READ 0
11#define VERIFY_WRITE 1
12
13/*
14 * The fs value determines whether argument validity checking should be
15 * performed or not. If get_fs() == USER_DS, checking is performed, with
16 * get_fs() == KERNEL_DS, checking is bypassed.
17 *
18 * For historical reasons, these macros are grossly misnamed.
19 *
20 * The fs/ds values are now the highest legal address in the "segment".
21 * This simplifies the checking in the routines below.
22 */
23
24#define KERNEL_DS ((mm_segment_t) { ~0UL })
25#define USER_DS ((mm_segment_t) { TASK_SIZE - 1 })
26
27#define get_ds() (KERNEL_DS)
28#define get_fs() (current->thread.fs)
29#define set_fs(val) (current->thread.fs = (val))
30
31#define segment_eq(a,b) ((a).seg == (b).seg)
32
33#define __access_ok(addr,size) \
34 ((addr) <= current->thread.fs.seg \
35 && ((size) == 0 || (size) - 1 <= current->thread.fs.seg - (addr)))
36
37#define access_ok(type, addr, size) \
38 (__chk_user_ptr(addr),__access_ok((unsigned long)(addr),(size)))
39
40/*
41 * The exception table consists of pairs of addresses: the first is the
42 * address of an instruction that is allowed to fault, and the second is
43 * the address at which the program should continue. No registers are
44 * modified, so it is entirely up to the continuation code to figure out
45 * what to do.
46 *
47 * All the routines below use bits of fixup code that are out of line
48 * with the main instruction path. This means when everything is well,
49 * we don't even have to jump over them. Further, they do not intrude
50 * on our cache or tlb entries.
51 */
52
53struct exception_table_entry
54{
55 unsigned long insn, fixup;
56};
57
58/*
59 * These are the main single-value transfer routines. They automatically
60 * use the right size if we just have the right pointer type.
61 *
62 * This gets kind of ugly. We want to return _two_ values in "get_user()"
63 * and yet we don't want to do any pointers, because that is too much
64 * of a performance impact. Thus we have a few rather ugly macros here,
65 * and hide all the ugliness from the user.
66 *
67 * The "__xxx" versions of the user access functions are versions that
68 * do not verify the address space, that must have been done previously
69 * with a separate "access_ok()" call (this is used when we do multiple
70 * accesses to the same area of user memory).
71 *
72 * As we use the same address space for kernel and user data on the
73 * PowerPC, we can just do these as direct assignments. (Of course, the
74 * exception handling means that it's no longer "just"...)
75 *
76 * The "user64" versions of the user access functions are versions that
77 * allow access of 64-bit data. The "get_user" functions do not
78 * properly handle 64-bit data because the value gets down cast to a long.
79 * The "put_user" functions already handle 64-bit data properly but we add
80 * "user64" versions for completeness
81 */
82#define get_user(x,ptr) \
83 __get_user_check((x),(ptr),sizeof(*(ptr)))
84#define get_user64(x,ptr) \
85 __get_user64_check((x),(ptr),sizeof(*(ptr)))
86#define put_user(x,ptr) \
87 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
88#define put_user64(x,ptr) put_user(x,ptr)
89
90#define __get_user(x,ptr) \
91 __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
92#define __get_user64(x,ptr) \
93 __get_user64_nocheck((x),(ptr),sizeof(*(ptr)))
94#define __put_user(x,ptr) \
95 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
96#define __put_user64(x,ptr) __put_user(x,ptr)
97
98extern long __put_user_bad(void);
99
100#define __put_user_nocheck(x,ptr,size) \
101({ \
102 long __pu_err; \
103 __chk_user_ptr(ptr); \
104 __put_user_size((x),(ptr),(size),__pu_err); \
105 __pu_err; \
106})
107
108#define __put_user_check(x,ptr,size) \
109({ \
110 long __pu_err = -EFAULT; \
111 __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
112 if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
113 __put_user_size((x),__pu_addr,(size),__pu_err); \
114 __pu_err; \
115})
116
117#define __put_user_size(x,ptr,size,retval) \
118do { \
119 retval = 0; \
120 switch (size) { \
121 case 1: \
122 __put_user_asm(x, ptr, retval, "stb"); \
123 break; \
124 case 2: \
125 __put_user_asm(x, ptr, retval, "sth"); \
126 break; \
127 case 4: \
128 __put_user_asm(x, ptr, retval, "stw"); \
129 break; \
130 case 8: \
131 __put_user_asm2(x, ptr, retval); \
132 break; \
133 default: \
134 __put_user_bad(); \
135 } \
136} while (0)
137
138/*
139 * We don't tell gcc that we are accessing memory, but this is OK
140 * because we do not write to any memory gcc knows about, so there
141 * are no aliasing issues.
142 */
143#define __put_user_asm(x, addr, err, op) \
144 __asm__ __volatile__( \
145 "1: "op" %1,0(%2)\n" \
146 "2:\n" \
147 ".section .fixup,\"ax\"\n" \
148 "3: li %0,%3\n" \
149 " b 2b\n" \
150 ".previous\n" \
151 ".section __ex_table,\"a\"\n" \
152 " .align 2\n" \
153 " .long 1b,3b\n" \
154 ".previous" \
155 : "=r" (err) \
156 : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err))
157
158#define __put_user_asm2(x, addr, err) \
159 __asm__ __volatile__( \
160 "1: stw %1,0(%2)\n" \
161 "2: stw %1+1,4(%2)\n" \
162 "3:\n" \
163 ".section .fixup,\"ax\"\n" \
164 "4: li %0,%3\n" \
165 " b 3b\n" \
166 ".previous\n" \
167 ".section __ex_table,\"a\"\n" \
168 " .align 2\n" \
169 " .long 1b,4b\n" \
170 " .long 2b,4b\n" \
171 ".previous" \
172 : "=r" (err) \
173 : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err))
174
175#define __get_user_nocheck(x, ptr, size) \
176({ \
177 long __gu_err; \
178 unsigned long __gu_val; \
179 __chk_user_ptr(ptr); \
180 __get_user_size(__gu_val, (ptr), (size), __gu_err); \
181 (x) = (__typeof__(*(ptr)))__gu_val; \
182 __gu_err; \
183})
184
185#define __get_user64_nocheck(x, ptr, size) \
186({ \
187 long __gu_err; \
188 long long __gu_val; \
189 __chk_user_ptr(ptr); \
190 __get_user_size64(__gu_val, (ptr), (size), __gu_err); \
191 (x) = (__typeof__(*(ptr)))__gu_val; \
192 __gu_err; \
193})
194
195#define __get_user_check(x, ptr, size) \
196({ \
197 long __gu_err = -EFAULT; \
198 unsigned long __gu_val = 0; \
199 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
200 if (access_ok(VERIFY_READ, __gu_addr, (size))) \
201 __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
202 (x) = (__typeof__(*(ptr)))__gu_val; \
203 __gu_err; \
204})
205
206#define __get_user64_check(x, ptr, size) \
207({ \
208 long __gu_err = -EFAULT; \
209 long long __gu_val = 0; \
210 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
211 if (access_ok(VERIFY_READ, __gu_addr, (size))) \
212 __get_user_size64(__gu_val, __gu_addr, (size), __gu_err); \
213 (x) = (__typeof__(*(ptr)))__gu_val; \
214 __gu_err; \
215})
216
217extern long __get_user_bad(void);
218
219#define __get_user_size(x, ptr, size, retval) \
220do { \
221 retval = 0; \
222 switch (size) { \
223 case 1: \
224 __get_user_asm(x, ptr, retval, "lbz"); \
225 break; \
226 case 2: \
227 __get_user_asm(x, ptr, retval, "lhz"); \
228 break; \
229 case 4: \
230 __get_user_asm(x, ptr, retval, "lwz"); \
231 break; \
232 default: \
233 x = __get_user_bad(); \
234 } \
235} while (0)
236
237#define __get_user_size64(x, ptr, size, retval) \
238do { \
239 retval = 0; \
240 switch (size) { \
241 case 1: \
242 __get_user_asm(x, ptr, retval, "lbz"); \
243 break; \
244 case 2: \
245 __get_user_asm(x, ptr, retval, "lhz"); \
246 break; \
247 case 4: \
248 __get_user_asm(x, ptr, retval, "lwz"); \
249 break; \
250 case 8: \
251 __get_user_asm2(x, ptr, retval); \
252 break; \
253 default: \
254 x = __get_user_bad(); \
255 } \
256} while (0)
257
258#define __get_user_asm(x, addr, err, op) \
259 __asm__ __volatile__( \
260 "1: "op" %1,0(%2)\n" \
261 "2:\n" \
262 ".section .fixup,\"ax\"\n" \
263 "3: li %0,%3\n" \
264 " li %1,0\n" \
265 " b 2b\n" \
266 ".previous\n" \
267 ".section __ex_table,\"a\"\n" \
268 " .align 2\n" \
269 " .long 1b,3b\n" \
270 ".previous" \
271 : "=r"(err), "=r"(x) \
272 : "b"(addr), "i"(-EFAULT), "0"(err))
273
274#define __get_user_asm2(x, addr, err) \
275 __asm__ __volatile__( \
276 "1: lwz %1,0(%2)\n" \
277 "2: lwz %1+1,4(%2)\n" \
278 "3:\n" \
279 ".section .fixup,\"ax\"\n" \
280 "4: li %0,%3\n" \
281 " li %1,0\n" \
282 " li %1+1,0\n" \
283 " b 3b\n" \
284 ".previous\n" \
285 ".section __ex_table,\"a\"\n" \
286 " .align 2\n" \
287 " .long 1b,4b\n" \
288 " .long 2b,4b\n" \
289 ".previous" \
290 : "=r"(err), "=&r"(x) \
291 : "b"(addr), "i"(-EFAULT), "0"(err))
292
293/* more complex routines */
294
295extern int __copy_tofrom_user(void __user *to, const void __user *from,
296 unsigned long size);
297
298extern inline unsigned long
299copy_from_user(void *to, const void __user *from, unsigned long n)
300{
301 unsigned long over;
302
303 if (access_ok(VERIFY_READ, from, n))
304 return __copy_tofrom_user((__force void __user *)to, from, n);
305 if ((unsigned long)from < TASK_SIZE) {
306 over = (unsigned long)from + n - TASK_SIZE;
307 return __copy_tofrom_user((__force void __user *)to, from, n - over) + over;
308 }
309 return n;
310}
311
312extern inline unsigned long
313copy_to_user(void __user *to, const void *from, unsigned long n)
314{
315 unsigned long over;
316
317 if (access_ok(VERIFY_WRITE, to, n))
318 return __copy_tofrom_user(to, (__force void __user *) from, n);
319 if ((unsigned long)to < TASK_SIZE) {
320 over = (unsigned long)to + n - TASK_SIZE;
321 return __copy_tofrom_user(to, (__force void __user *) from, n - over) + over;
322 }
323 return n;
324}
325
326static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long size)
327{
328 return __copy_tofrom_user((__force void __user *)to, from, size);
329}
330
331static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long size)
332{
333 return __copy_tofrom_user(to, (__force void __user *)from, size);
334}
335
336#define __copy_to_user_inatomic __copy_to_user
337#define __copy_from_user_inatomic __copy_from_user
338
339extern unsigned long __clear_user(void __user *addr, unsigned long size);
340
341extern inline unsigned long
342clear_user(void __user *addr, unsigned long size)
343{
344 if (access_ok(VERIFY_WRITE, addr, size))
345 return __clear_user(addr, size);
346 if ((unsigned long)addr < TASK_SIZE) {
347 unsigned long over = (unsigned long)addr + size - TASK_SIZE;
348 return __clear_user(addr, size - over) + over;
349 }
350 return size;
351}
352
353extern int __strncpy_from_user(char *dst, const char __user *src, long count);
354
355extern inline long
356strncpy_from_user(char *dst, const char __user *src, long count)
357{
358 if (access_ok(VERIFY_READ, src, 1))
359 return __strncpy_from_user(dst, src, count);
360 return -EFAULT;
361}
362
363/*
364 * Return the size of a string (including the ending 0)
365 *
366 * Return 0 for error
367 */
368
369extern int __strnlen_user(const char __user *str, long len, unsigned long top);
370
371/*
372 * Returns the length of the string at str (including the null byte),
373 * or 0 if we hit a page we can't access,
374 * or something > len if we didn't find a null byte.
375 *
376 * The `top' parameter to __strnlen_user is to make sure that
377 * we can never overflow from the user area into kernel space.
378 */
379extern __inline__ int strnlen_user(const char __user *str, long len)
380{
381 unsigned long top = current->thread.fs.seg;
382
383 if ((unsigned long)str > top)
384 return 0;
385 return __strnlen_user(str, len, top);
386}
387
388#define strlen_user(str) strnlen_user((str), 0x7ffffffe)
389
390#endif /* __ASSEMBLY__ */
391
392#endif /* _PPC_UACCESS_H */
393#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/ucontext.h b/include/asm-ppc/ucontext.h
deleted file mode 100644
index 664bc984d51f..000000000000
--- a/include/asm-ppc/ucontext.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _ASMPPC_UCONTEXT_H
2#define _ASMPPC_UCONTEXT_H
3
4#include <asm/elf.h>
5#include <asm/signal.h>
6
7struct mcontext {
8 elf_gregset_t mc_gregs;
9 elf_fpregset_t mc_fregs;
10 unsigned long mc_pad[2];
11 elf_vrregset_t mc_vregs __attribute__((__aligned__(16)));
12};
13
14struct ucontext {
15 unsigned long uc_flags;
16 struct ucontext __user *uc_link;
17 stack_t uc_stack;
18 int uc_pad[7];
19 struct mcontext __user *uc_regs;/* points to uc_mcontext field */
20 sigset_t uc_sigmask;
21 /* glibc has 1024-bit signal masks, ours are 64-bit */
22 int uc_maskext[30];
23 int uc_pad2[3];
24 struct mcontext uc_mcontext;
25};
26
27#endif /* !_ASMPPC_UCONTEXT_H */
diff --git a/include/asm-ppc64/bitops.h b/include/asm-ppc64/bitops.h
deleted file mode 100644
index dbfa42ef4a99..000000000000
--- a/include/asm-ppc64/bitops.h
+++ /dev/null
@@ -1,360 +0,0 @@
1/*
2 * PowerPC64 atomic bit operations.
3 * Dave Engebretsen, Todd Inglett, Don Reed, Pat McCarthy, Peter Bergner,
4 * Anton Blanchard
5 *
6 * Originally taken from the 32b PPC code. Modified to use 64b values for
7 * the various counters & memory references.
8 *
9 * Bitops are odd when viewed on big-endian systems. They were designed
10 * on little endian so the size of the bitset doesn't matter (low order bytes
11 * come first) as long as the bit in question is valid.
12 *
13 * Bits are "tested" often using the C expression (val & (1<<nr)) so we do
14 * our best to stay compatible with that. The assumption is that val will
15 * be unsigned long for such tests. As such, we assume the bits are stored
16 * as an array of unsigned long (the usual case is a single unsigned long,
17 * of course). Here's an example bitset with bit numbering:
18 *
19 * |63..........0|127........64|195.......128|255.......196|
20 *
21 * This leads to a problem. If an int, short or char is passed as a bitset
22 * it will be a bad memory reference since we want to store in chunks
23 * of unsigned long (64 bits here) size.
24 *
25 * There are a few little-endian macros used mostly for filesystem bitmaps,
26 * these work on similar bit arrays layouts, but byte-oriented:
27 *
28 * |7...0|15...8|23...16|31...24|39...32|47...40|55...48|63...56|
29 *
30 * The main difference is that bit 3-5 in the bit number field needs to be
31 * reversed compared to the big-endian bit fields. This can be achieved
32 * by XOR with 0b111000 (0x38).
33 *
34 * This program is free software; you can redistribute it and/or
35 * modify it under the terms of the GNU General Public License
36 * as published by the Free Software Foundation; either version
37 * 2 of the License, or (at your option) any later version.
38 */
39
40#ifndef _PPC64_BITOPS_H
41#define _PPC64_BITOPS_H
42
43#ifdef __KERNEL__
44
45#include <asm/synch.h>
46
47/*
48 * clear_bit doesn't imply a memory barrier
49 */
50#define smp_mb__before_clear_bit() smp_mb()
51#define smp_mb__after_clear_bit() smp_mb()
52
53static __inline__ int test_bit(unsigned long nr, __const__ volatile unsigned long *addr)
54{
55 return (1UL & (addr[nr >> 6] >> (nr & 63)));
56}
57
58static __inline__ void set_bit(unsigned long nr, volatile unsigned long *addr)
59{
60 unsigned long old;
61 unsigned long mask = 1UL << (nr & 0x3f);
62 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
63
64 __asm__ __volatile__(
65"1: ldarx %0,0,%3 # set_bit\n\
66 or %0,%0,%2\n\
67 stdcx. %0,0,%3\n\
68 bne- 1b"
69 : "=&r" (old), "=m" (*p)
70 : "r" (mask), "r" (p), "m" (*p)
71 : "cc");
72}
73
74static __inline__ void clear_bit(unsigned long nr, volatile unsigned long *addr)
75{
76 unsigned long old;
77 unsigned long mask = 1UL << (nr & 0x3f);
78 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
79
80 __asm__ __volatile__(
81"1: ldarx %0,0,%3 # clear_bit\n\
82 andc %0,%0,%2\n\
83 stdcx. %0,0,%3\n\
84 bne- 1b"
85 : "=&r" (old), "=m" (*p)
86 : "r" (mask), "r" (p), "m" (*p)
87 : "cc");
88}
89
90static __inline__ void change_bit(unsigned long nr, volatile unsigned long *addr)
91{
92 unsigned long old;
93 unsigned long mask = 1UL << (nr & 0x3f);
94 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
95
96 __asm__ __volatile__(
97"1: ldarx %0,0,%3 # change_bit\n\
98 xor %0,%0,%2\n\
99 stdcx. %0,0,%3\n\
100 bne- 1b"
101 : "=&r" (old), "=m" (*p)
102 : "r" (mask), "r" (p), "m" (*p)
103 : "cc");
104}
105
106static __inline__ int test_and_set_bit(unsigned long nr, volatile unsigned long *addr)
107{
108 unsigned long old, t;
109 unsigned long mask = 1UL << (nr & 0x3f);
110 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
111
112 __asm__ __volatile__(
113 EIEIO_ON_SMP
114"1: ldarx %0,0,%3 # test_and_set_bit\n\
115 or %1,%0,%2 \n\
116 stdcx. %1,0,%3 \n\
117 bne- 1b"
118 ISYNC_ON_SMP
119 : "=&r" (old), "=&r" (t)
120 : "r" (mask), "r" (p)
121 : "cc", "memory");
122
123 return (old & mask) != 0;
124}
125
126static __inline__ int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr)
127{
128 unsigned long old, t;
129 unsigned long mask = 1UL << (nr & 0x3f);
130 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
131
132 __asm__ __volatile__(
133 EIEIO_ON_SMP
134"1: ldarx %0,0,%3 # test_and_clear_bit\n\
135 andc %1,%0,%2\n\
136 stdcx. %1,0,%3\n\
137 bne- 1b"
138 ISYNC_ON_SMP
139 : "=&r" (old), "=&r" (t)
140 : "r" (mask), "r" (p)
141 : "cc", "memory");
142
143 return (old & mask) != 0;
144}
145
146static __inline__ int test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
147{
148 unsigned long old, t;
149 unsigned long mask = 1UL << (nr & 0x3f);
150 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
151
152 __asm__ __volatile__(
153 EIEIO_ON_SMP
154"1: ldarx %0,0,%3 # test_and_change_bit\n\
155 xor %1,%0,%2\n\
156 stdcx. %1,0,%3\n\
157 bne- 1b"
158 ISYNC_ON_SMP
159 : "=&r" (old), "=&r" (t)
160 : "r" (mask), "r" (p)
161 : "cc", "memory");
162
163 return (old & mask) != 0;
164}
165
166static __inline__ void set_bits(unsigned long mask, unsigned long *addr)
167{
168 unsigned long old;
169
170 __asm__ __volatile__(
171"1: ldarx %0,0,%3 # set_bit\n\
172 or %0,%0,%2\n\
173 stdcx. %0,0,%3\n\
174 bne- 1b"
175 : "=&r" (old), "=m" (*addr)
176 : "r" (mask), "r" (addr), "m" (*addr)
177 : "cc");
178}
179
180/*
181 * non-atomic versions
182 */
183static __inline__ void __set_bit(unsigned long nr, volatile unsigned long *addr)
184{
185 unsigned long mask = 1UL << (nr & 0x3f);
186 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
187
188 *p |= mask;
189}
190
191static __inline__ void __clear_bit(unsigned long nr, volatile unsigned long *addr)
192{
193 unsigned long mask = 1UL << (nr & 0x3f);
194 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
195
196 *p &= ~mask;
197}
198
199static __inline__ void __change_bit(unsigned long nr, volatile unsigned long *addr)
200{
201 unsigned long mask = 1UL << (nr & 0x3f);
202 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
203
204 *p ^= mask;
205}
206
207static __inline__ int __test_and_set_bit(unsigned long nr, volatile unsigned long *addr)
208{
209 unsigned long mask = 1UL << (nr & 0x3f);
210 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
211 unsigned long old = *p;
212
213 *p = old | mask;
214 return (old & mask) != 0;
215}
216
217static __inline__ int __test_and_clear_bit(unsigned long nr, volatile unsigned long *addr)
218{
219 unsigned long mask = 1UL << (nr & 0x3f);
220 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
221 unsigned long old = *p;
222
223 *p = old & ~mask;
224 return (old & mask) != 0;
225}
226
227static __inline__ int __test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
228{
229 unsigned long mask = 1UL << (nr & 0x3f);
230 unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
231 unsigned long old = *p;
232
233 *p = old ^ mask;
234 return (old & mask) != 0;
235}
236
237/*
238 * Return the zero-based bit position (from RIGHT TO LEFT, 63 -> 0) of the
239 * most significant (left-most) 1-bit in a double word.
240 */
241static __inline__ int __ilog2(unsigned long x)
242{
243 int lz;
244
245 asm ("cntlzd %0,%1" : "=r" (lz) : "r" (x));
246 return 63 - lz;
247}
248
249/*
250 * Determines the bit position of the least significant (rightmost) 0 bit
251 * in the specified double word. The returned bit position will be zero-based,
252 * starting from the right side (63 - 0).
253 */
254static __inline__ unsigned long ffz(unsigned long x)
255{
256 /* no zero exists anywhere in the 8 byte area. */
257 if ((x = ~x) == 0)
258 return 64;
259
260 /*
261 * Calculate the bit position of the least signficant '1' bit in x
262 * (since x has been changed this will actually be the least signficant
263 * '0' bit in * the original x). Note: (x & -x) gives us a mask that
264 * is the least significant * (RIGHT-most) 1-bit of the value in x.
265 */
266 return __ilog2(x & -x);
267}
268
269static __inline__ int __ffs(unsigned long x)
270{
271 return __ilog2(x & -x);
272}
273
274/*
275 * ffs: find first bit set. This is defined the same way as
276 * the libc and compiler builtin ffs routines, therefore
277 * differs in spirit from the above ffz (man ffs).
278 */
279static __inline__ int ffs(int x)
280{
281 unsigned long i = (unsigned long)x;
282 return __ilog2(i & -i) + 1;
283}
284
285/*
286 * fls: find last (most-significant) bit set.
287 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
288 */
289#define fls(x) generic_fls(x)
290
291/*
292 * hweightN: returns the hamming weight (i.e. the number
293 * of bits set) of a N-bit word
294 */
295#define hweight64(x) generic_hweight64(x)
296#define hweight32(x) generic_hweight32(x)
297#define hweight16(x) generic_hweight16(x)
298#define hweight8(x) generic_hweight8(x)
299
300extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
301#define find_first_zero_bit(addr, size) \
302 find_next_zero_bit((addr), (size), 0)
303
304extern unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
305#define find_first_bit(addr, size) \
306 find_next_bit((addr), (size), 0)
307
308extern unsigned long find_next_zero_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
309#define find_first_zero_le_bit(addr, size) \
310 find_next_zero_le_bit((addr), (size), 0)
311
312static __inline__ int test_le_bit(unsigned long nr, __const__ unsigned long * addr)
313{
314 __const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
315 return (ADDR[nr >> 3] >> (nr & 7)) & 1;
316}
317
318#define test_and_clear_le_bit(nr, addr) \
319 test_and_clear_bit((nr) ^ 0x38, (addr))
320#define test_and_set_le_bit(nr, addr) \
321 test_and_set_bit((nr) ^ 0x38, (addr))
322
323/*
324 * non-atomic versions
325 */
326
327#define __set_le_bit(nr, addr) \
328 __set_bit((nr) ^ 0x38, (addr))
329#define __clear_le_bit(nr, addr) \
330 __clear_bit((nr) ^ 0x38, (addr))
331#define __test_and_clear_le_bit(nr, addr) \
332 __test_and_clear_bit((nr) ^ 0x38, (addr))
333#define __test_and_set_le_bit(nr, addr) \
334 __test_and_set_bit((nr) ^ 0x38, (addr))
335
336#define ext2_set_bit(nr,addr) \
337 __test_and_set_le_bit((nr), (unsigned long*)addr)
338#define ext2_clear_bit(nr, addr) \
339 __test_and_clear_le_bit((nr), (unsigned long*)addr)
340
341#define ext2_set_bit_atomic(lock, nr, addr) \
342 test_and_set_le_bit((nr), (unsigned long*)addr)
343#define ext2_clear_bit_atomic(lock, nr, addr) \
344 test_and_clear_le_bit((nr), (unsigned long*)addr)
345
346
347#define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr)
348#define ext2_find_first_zero_bit(addr, size) \
349 find_first_zero_le_bit((unsigned long*)addr, size)
350#define ext2_find_next_zero_bit(addr, size, off) \
351 find_next_zero_le_bit((unsigned long*)addr, size, off)
352
353#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
354#define minix_set_bit(nr,addr) set_bit(nr,addr)
355#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
356#define minix_test_bit(nr,addr) test_bit(nr,addr)
357#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
358
359#endif /* __KERNEL__ */
360#endif /* _PPC64_BITOPS_H */
diff --git a/include/asm-ppc64/io.h b/include/asm-ppc64/io.h
index bd7c9532d77b..77fc07c3c6bd 100644
--- a/include/asm-ppc64/io.h
+++ b/include/asm-ppc64/io.h
@@ -13,7 +13,7 @@
13#include <asm/page.h> 13#include <asm/page.h>
14#include <asm/byteorder.h> 14#include <asm/byteorder.h>
15#ifdef CONFIG_PPC_ISERIES 15#ifdef CONFIG_PPC_ISERIES
16#include <asm/iSeries/iSeries_io.h> 16#include <asm/iseries/iseries_io.h>
17#endif 17#endif
18#include <asm/synch.h> 18#include <asm/synch.h>
19#include <asm/delay.h> 19#include <asm/delay.h>
diff --git a/include/asm-ppc64/ipcbuf.h b/include/asm-ppc64/ipcbuf.h
deleted file mode 100644
index fa393c8342af..000000000000
--- a/include/asm-ppc64/ipcbuf.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef __PPC64_IPCBUF_H__
2#define __PPC64_IPCBUF_H__
3
4/*
5 * The ipc64_perm structure for the PPC is identical to kern_ipc_perm
6 * as we have always had 32-bit UIDs and GIDs in the kernel.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid_t uid;
18 __kernel_gid_t gid;
19 __kernel_uid_t cuid;
20 __kernel_gid_t cgid;
21 __kernel_mode_t mode;
22 unsigned int seq;
23 unsigned int __pad1;
24 unsigned long __unused1;
25 unsigned long __unused2;
26};
27
28#endif /* __PPC64_IPCBUF_H__ */
diff --git a/include/asm-ppc64/kexec.h b/include/asm-ppc64/kexec.h
deleted file mode 100644
index 511908afaeeb..000000000000
--- a/include/asm-ppc64/kexec.h
+++ /dev/null
@@ -1,41 +0,0 @@
1#ifndef _PPC64_KEXEC_H
2#define _PPC64_KEXEC_H
3
4/*
5 * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
6 * I.e. Maximum page that is mapped directly into kernel memory,
7 * and kmap is not required.
8 */
9
10/* Maximum physical address we can use pages from */
11/* XXX: since we copy virt we can use any page we allocate */
12#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
13
14/* Maximum address we can reach in physical address mode */
15/* XXX: I want to allow initrd in highmem. otherwise set to rmo on lpar */
16#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
17
18/* Maximum address we can use for the control code buffer */
19/* XXX: unused today, ppc32 uses TASK_SIZE, probably left over from use_mm */
20#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
21
22/* XXX: today we don't use this at all, althogh we have a static stack */
23#define KEXEC_CONTROL_CODE_SIZE 4096
24
25/* The native architecture */
26#define KEXEC_ARCH KEXEC_ARCH_PPC64
27
28#define MAX_NOTE_BYTES 1024
29
30#ifndef __ASSEMBLY__
31
32typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
33
34extern note_buf_t crash_notes[];
35
36extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
37 master to copy new code to 0 */
38
39#endif /* __ASSEMBLY__ */
40#endif /* _PPC_KEXEC_H */
41
diff --git a/include/asm-ppc64/mmu_context.h b/include/asm-ppc64/mmu_context.h
index 77a743402db4..820dd729b895 100644
--- a/include/asm-ppc64/mmu_context.h
+++ b/include/asm-ppc64/mmu_context.h
@@ -16,21 +16,6 @@
16 * 2 of the License, or (at your option) any later version. 16 * 2 of the License, or (at your option) any later version.
17 */ 17 */
18 18
19/*
20 * Every architecture must define this function. It's the fastest
21 * way of searching a 140-bit bitmap where the first 100 bits are
22 * unlikely to be set. It's guaranteed that at least one of the 140
23 * bits is cleared.
24 */
25static inline int sched_find_first_bit(unsigned long *b)
26{
27 if (unlikely(b[0]))
28 return __ffs(b[0]);
29 if (unlikely(b[1]))
30 return __ffs(b[1]) + 64;
31 return __ffs(b[2]) + 128;
32}
33
34static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 19static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
35{ 20{
36} 21}
diff --git a/include/asm-ppc64/numnodes.h b/include/asm-ppc64/numnodes.h
deleted file mode 100644
index 75ae0b906708..000000000000
--- a/include/asm-ppc64/numnodes.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4/* Max 16 Nodes */
5#define NODES_SHIFT 4
6
7#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-ppc64/nvram.h b/include/asm-ppc64/nvram.h
index dfaa21566c9a..def47d720d3d 100644
--- a/include/asm-ppc64/nvram.h
+++ b/include/asm-ppc64/nvram.h
@@ -70,7 +70,7 @@ extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
70 70
71extern int pSeries_nvram_init(void); 71extern int pSeries_nvram_init(void);
72extern int pmac_nvram_init(void); 72extern int pmac_nvram_init(void);
73extern int bpa_nvram_init(void); 73extern int mmio_nvram_init(void);
74 74
75/* PowerMac specific nvram stuffs */ 75/* PowerMac specific nvram stuffs */
76 76
diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h
index 2f0f36f73d38..f68fe91debaf 100644
--- a/include/asm-ppc64/paca.h
+++ b/include/asm-ppc64/paca.h
@@ -19,7 +19,7 @@
19#include <linux/config.h> 19#include <linux/config.h>
20#include <asm/types.h> 20#include <asm/types.h>
21#include <asm/lppaca.h> 21#include <asm/lppaca.h>
22#include <asm/iSeries/ItLpRegSave.h> 22#include <asm/iseries/it_lp_reg_save.h>
23#include <asm/mmu.h> 23#include <asm/mmu.h>
24 24
25register struct paca_struct *local_paca asm("r13"); 25register struct paca_struct *local_paca asm("r13");
diff --git a/include/asm-ppc64/plpar_wrappers.h b/include/asm-ppc64/plpar_wrappers.h
deleted file mode 100644
index 72dd2449ee76..000000000000
--- a/include/asm-ppc64/plpar_wrappers.h
+++ /dev/null
@@ -1,120 +0,0 @@
1#ifndef _PPC64_PLPAR_WRAPPERS_H
2#define _PPC64_PLPAR_WRAPPERS_H
3
4#include <asm/hvcall.h>
5
6static inline long poll_pending(void)
7{
8 unsigned long dummy;
9 return plpar_hcall(H_POLL_PENDING, 0, 0, 0, 0,
10 &dummy, &dummy, &dummy);
11}
12
13static inline long prod_processor(void)
14{
15 plpar_hcall_norets(H_PROD);
16 return(0);
17}
18
19static inline long cede_processor(void)
20{
21 plpar_hcall_norets(H_CEDE);
22 return(0);
23}
24
25static inline long register_vpa(unsigned long flags, unsigned long proc,
26 unsigned long vpa)
27{
28 return plpar_hcall_norets(H_REGISTER_VPA, flags, proc, vpa);
29}
30
31void vpa_init(int cpu);
32
33static inline long plpar_pte_remove(unsigned long flags,
34 unsigned long ptex,
35 unsigned long avpn,
36 unsigned long *old_pteh_ret,
37 unsigned long *old_ptel_ret)
38{
39 unsigned long dummy;
40 return plpar_hcall(H_REMOVE, flags, ptex, avpn, 0,
41 old_pteh_ret, old_ptel_ret, &dummy);
42}
43
44static inline long plpar_pte_read(unsigned long flags,
45 unsigned long ptex,
46 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
47{
48 unsigned long dummy;
49 return plpar_hcall(H_READ, flags, ptex, 0, 0,
50 old_pteh_ret, old_ptel_ret, &dummy);
51}
52
53static inline long plpar_pte_protect(unsigned long flags,
54 unsigned long ptex,
55 unsigned long avpn)
56{
57 return plpar_hcall_norets(H_PROTECT, flags, ptex, avpn);
58}
59
60static inline long plpar_tce_get(unsigned long liobn,
61 unsigned long ioba,
62 unsigned long *tce_ret)
63{
64 unsigned long dummy;
65 return plpar_hcall(H_GET_TCE, liobn, ioba, 0, 0,
66 tce_ret, &dummy, &dummy);
67}
68
69static inline long plpar_tce_put(unsigned long liobn,
70 unsigned long ioba,
71 unsigned long tceval)
72{
73 return plpar_hcall_norets(H_PUT_TCE, liobn, ioba, tceval);
74}
75
76static inline long plpar_tce_put_indirect(unsigned long liobn,
77 unsigned long ioba,
78 unsigned long page,
79 unsigned long count)
80{
81 return plpar_hcall_norets(H_PUT_TCE_INDIRECT, liobn, ioba, page, count);
82}
83
84static inline long plpar_tce_stuff(unsigned long liobn,
85 unsigned long ioba,
86 unsigned long tceval,
87 unsigned long count)
88{
89 return plpar_hcall_norets(H_STUFF_TCE, liobn, ioba, tceval, count);
90}
91
92static inline long plpar_get_term_char(unsigned long termno,
93 unsigned long *len_ret,
94 char *buf_ret)
95{
96 unsigned long *lbuf = (unsigned long *)buf_ret; /* ToDo: alignment? */
97 return plpar_hcall(H_GET_TERM_CHAR, termno, 0, 0, 0,
98 len_ret, lbuf+0, lbuf+1);
99}
100
101static inline long plpar_put_term_char(unsigned long termno,
102 unsigned long len,
103 const char *buffer)
104{
105 unsigned long *lbuf = (unsigned long *)buffer; /* ToDo: alignment? */
106 return plpar_hcall_norets(H_PUT_TERM_CHAR, termno, len, lbuf[0],
107 lbuf[1]);
108}
109
110static inline long plpar_set_xdabr(unsigned long address, unsigned long flags)
111{
112 return plpar_hcall_norets(H_SET_XDABR, address, flags);
113}
114
115static inline long plpar_set_dabr(unsigned long val)
116{
117 return plpar_hcall_norets(H_SET_DABR, val);
118}
119
120#endif /* _PPC64_PLPAR_WRAPPERS_H */
diff --git a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h
index 14cb895bb607..7d84fb5e39f1 100644
--- a/include/asm-ppc64/spinlock.h
+++ b/include/asm-ppc64/spinlock.h
@@ -21,7 +21,7 @@
21#include <linux/config.h> 21#include <linux/config.h>
22#include <asm/paca.h> 22#include <asm/paca.h>
23#include <asm/hvcall.h> 23#include <asm/hvcall.h>
24#include <asm/iSeries/HvCall.h> 24#include <asm/iseries/hv_call.h>
25 25
26#define __raw_spin_is_locked(x) ((x)->slock != 0) 26#define __raw_spin_is_locked(x) ((x)->slock != 0)
27 27
diff --git a/include/asm-ppc64/stat.h b/include/asm-ppc64/stat.h
deleted file mode 100644
index 973a5f97951d..000000000000
--- a/include/asm-ppc64/stat.h
+++ /dev/null
@@ -1,60 +0,0 @@
1#ifndef _PPC64_STAT_H
2#define _PPC64_STAT_H
3
4/*
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
10
11#include <linux/types.h>
12
13struct stat {
14 unsigned long st_dev;
15 ino_t st_ino;
16 nlink_t st_nlink;
17 mode_t st_mode;
18 uid_t st_uid;
19 gid_t st_gid;
20 unsigned long st_rdev;
21 off_t st_size;
22 unsigned long st_blksize;
23 unsigned long st_blocks;
24 unsigned long st_atime;
25 unsigned long st_atime_nsec;
26 unsigned long st_mtime;
27 unsigned long st_mtime_nsec;
28 unsigned long st_ctime;
29 unsigned long st_ctime_nsec;
30 unsigned long __unused4;
31 unsigned long __unused5;
32 unsigned long __unused6;
33};
34
35#define STAT_HAVE_NSEC 1
36
37/* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
38struct stat64 {
39 unsigned long st_dev; /* Device. */
40 unsigned long st_ino; /* File serial number. */
41 unsigned int st_mode; /* File mode. */
42 unsigned int st_nlink; /* Link count. */
43 unsigned int st_uid; /* User ID of the file's owner. */
44 unsigned int st_gid; /* Group ID of the file's group. */
45 unsigned long st_rdev; /* Device number, if device. */
46 unsigned short __pad2;
47 long st_size; /* Size of file, in bytes. */
48 int st_blksize; /* Optimal block size for I/O. */
49
50 long st_blocks; /* Number 512-byte blocks allocated. */
51 int st_atime; /* Time of last access. */
52 int st_atime_nsec;
53 int st_mtime; /* Time of last modification. */
54 int st_mtime_nsec;
55 int st_ctime; /* Time of last status change. */
56 int st_ctime_nsec;
57 unsigned int __unused4;
58 unsigned int __unused5;
59};
60#endif
diff --git a/include/asm-ppc64/tlb.h b/include/asm-ppc64/tlb.h
deleted file mode 100644
index 97cb696ce68d..000000000000
--- a/include/asm-ppc64/tlb.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * TLB shootdown specifics for PPC64
3 *
4 * Copyright (C) 2002 Anton Blanchard, IBM Corp.
5 * Copyright (C) 2002 Paul Mackerras, IBM Corp.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12#ifndef _PPC64_TLB_H
13#define _PPC64_TLB_H
14
15#include <asm/tlbflush.h>
16
17struct mmu_gather;
18
19extern void pte_free_finish(void);
20
21static inline void tlb_flush(struct mmu_gather *tlb)
22{
23 flush_tlb_pending();
24 pte_free_finish();
25}
26
27/* Avoid pulling in another include just for this */
28#define check_pgt_cache() do { } while (0)
29
30/* Get the generic bits... */
31#include <asm-generic/tlb.h>
32
33/* Nothing needed here in fact... */
34#define tlb_start_vma(tlb, vma) do { } while (0)
35#define tlb_end_vma(tlb, vma) do { } while (0)
36
37#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0)
38
39#endif /* _PPC64_TLB_H */
diff --git a/include/asm-ppc64/tlbflush.h b/include/asm-ppc64/tlbflush.h
deleted file mode 100644
index 626f505c6ee3..000000000000
--- a/include/asm-ppc64/tlbflush.h
+++ /dev/null
@@ -1,52 +0,0 @@
1#ifndef _PPC64_TLBFLUSH_H
2#define _PPC64_TLBFLUSH_H
3
4/*
5 * TLB flushing:
6 *
7 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
8 * - flush_tlb_page(vma, vmaddr) flushes one page
9 * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB
10 * - flush_tlb_range(vma, start, end) flushes a range of pages
11 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
12 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
13 */
14
15#include <linux/percpu.h>
16#include <asm/page.h>
17
18#define PPC64_TLB_BATCH_NR 192
19
20struct mm_struct;
21struct ppc64_tlb_batch {
22 unsigned long index;
23 struct mm_struct *mm;
24 pte_t pte[PPC64_TLB_BATCH_NR];
25 unsigned long vaddr[PPC64_TLB_BATCH_NR];
26 unsigned int large;
27};
28DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
29
30extern void __flush_tlb_pending(struct ppc64_tlb_batch *batch);
31
32static inline void flush_tlb_pending(void)
33{
34 struct ppc64_tlb_batch *batch = &get_cpu_var(ppc64_tlb_batch);
35
36 if (batch->index)
37 __flush_tlb_pending(batch);
38 put_cpu_var(ppc64_tlb_batch);
39}
40
41#define flush_tlb_mm(mm) flush_tlb_pending()
42#define flush_tlb_page(vma, addr) flush_tlb_pending()
43#define flush_tlb_page_nohash(vma, addr) do { } while (0)
44#define flush_tlb_range(vma, start, end) \
45 do { (void)(start); flush_tlb_pending(); } while (0)
46#define flush_tlb_kernel_range(start, end) flush_tlb_pending()
47#define flush_tlb_pgtables(mm, start, end) do { } while (0)
48
49extern void flush_hash_page(unsigned long va, pte_t pte, int local);
50void flush_hash_range(unsigned long number, int local);
51
52#endif /* _PPC64_TLBFLUSH_H */
diff --git a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h
deleted file mode 100644
index 132c1276547b..000000000000
--- a/include/asm-ppc64/uaccess.h
+++ /dev/null
@@ -1,341 +0,0 @@
1#ifndef _PPC64_UACCESS_H
2#define _PPC64_UACCESS_H
3
4/*
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
10
11#ifndef __ASSEMBLY__
12#include <linux/sched.h>
13#include <linux/errno.h>
14#include <asm/processor.h>
15
16#define VERIFY_READ 0
17#define VERIFY_WRITE 1
18
19/*
20 * The fs value determines whether argument validity checking should be
21 * performed or not. If get_fs() == USER_DS, checking is performed, with
22 * get_fs() == KERNEL_DS, checking is bypassed.
23 *
24 * For historical reasons, these macros are grossly misnamed.
25 */
26
27#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
28
29#define KERNEL_DS MAKE_MM_SEG(0UL)
30#define USER_DS MAKE_MM_SEG(0xf000000000000000UL)
31
32#define get_ds() (KERNEL_DS)
33#define get_fs() (current->thread.fs)
34#define set_fs(val) (current->thread.fs = (val))
35
36#define segment_eq(a,b) ((a).seg == (b).seg)
37
38/*
39 * Use the alpha trick for checking ranges:
40 *
41 * Is a address valid? This does a straightforward calculation rather
42 * than tests.
43 *
44 * Address valid if:
45 * - "addr" doesn't have any high-bits set
46 * - AND "size" doesn't have any high-bits set
47 * - OR we are in kernel mode.
48 *
49 * We dont have to check for high bits in (addr+size) because the first
50 * two checks force the maximum result to be below the start of the
51 * kernel region.
52 */
53#define __access_ok(addr,size,segment) \
54 (((segment).seg & (addr | size )) == 0)
55
56#define access_ok(type,addr,size) \
57 __access_ok(((__force unsigned long)(addr)),(size),get_fs())
58
59/*
60 * The exception table consists of pairs of addresses: the first is the
61 * address of an instruction that is allowed to fault, and the second is
62 * the address at which the program should continue. No registers are
63 * modified, so it is entirely up to the continuation code to figure out
64 * what to do.
65 *
66 * All the routines below use bits of fixup code that are out of line
67 * with the main instruction path. This means when everything is well,
68 * we don't even have to jump over them. Further, they do not intrude
69 * on our cache or tlb entries.
70 */
71
72struct exception_table_entry
73{
74 unsigned long insn, fixup;
75};
76
77/* Returns 0 if exception not found and fixup otherwise. */
78extern unsigned long search_exception_table(unsigned long);
79
80/*
81 * These are the main single-value transfer routines. They automatically
82 * use the right size if we just have the right pointer type.
83 *
84 * This gets kind of ugly. We want to return _two_ values in "get_user()"
85 * and yet we don't want to do any pointers, because that is too much
86 * of a performance impact. Thus we have a few rather ugly macros here,
87 * and hide all the ugliness from the user.
88 *
89 * The "__xxx" versions of the user access functions are versions that
90 * do not verify the address space, that must have been done previously
91 * with a separate "access_ok()" call (this is used when we do multiple
92 * accesses to the same area of user memory).
93 *
94 * As we use the same address space for kernel and user data on the
95 * PowerPC, we can just do these as direct assignments. (Of course, the
96 * exception handling means that it's no longer "just"...)
97 */
98#define get_user(x,ptr) \
99 __get_user_check((x),(ptr),sizeof(*(ptr)))
100#define put_user(x,ptr) \
101 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
102
103#define __get_user(x,ptr) \
104 __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
105#define __put_user(x,ptr) \
106 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
107
108#define __get_user_unaligned __get_user
109#define __put_user_unaligned __put_user
110
111extern long __put_user_bad(void);
112
113#define __put_user_nocheck(x,ptr,size) \
114({ \
115 long __pu_err; \
116 might_sleep(); \
117 __chk_user_ptr(ptr); \
118 __put_user_size((x),(ptr),(size),__pu_err,-EFAULT); \
119 __pu_err; \
120})
121
122#define __put_user_check(x,ptr,size) \
123({ \
124 long __pu_err = -EFAULT; \
125 void __user *__pu_addr = (ptr); \
126 might_sleep(); \
127 if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
128 __put_user_size((x),__pu_addr,(size),__pu_err,-EFAULT); \
129 __pu_err; \
130})
131
132#define __put_user_size(x,ptr,size,retval,errret) \
133do { \
134 retval = 0; \
135 switch (size) { \
136 case 1: __put_user_asm(x,ptr,retval,"stb",errret); break; \
137 case 2: __put_user_asm(x,ptr,retval,"sth",errret); break; \
138 case 4: __put_user_asm(x,ptr,retval,"stw",errret); break; \
139 case 8: __put_user_asm(x,ptr,retval,"std",errret); break; \
140 default: __put_user_bad(); \
141 } \
142} while (0)
143
144/*
145 * We don't tell gcc that we are accessing memory, but this is OK
146 * because we do not write to any memory gcc knows about, so there
147 * are no aliasing issues.
148 */
149#define __put_user_asm(x, addr, err, op, errret) \
150 __asm__ __volatile__( \
151 "1: "op" %1,0(%2) # put_user\n" \
152 "2:\n" \
153 ".section .fixup,\"ax\"\n" \
154 "3: li %0,%3\n" \
155 " b 2b\n" \
156 ".previous\n" \
157 ".section __ex_table,\"a\"\n" \
158 " .align 3\n" \
159 " .llong 1b,3b\n" \
160 ".previous" \
161 : "=r"(err) \
162 : "r"(x), "b"(addr), "i"(errret), "0"(err))
163
164
165#define __get_user_nocheck(x,ptr,size) \
166({ \
167 long __gu_err; \
168 unsigned long __gu_val; \
169 might_sleep(); \
170 __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\
171 (x) = (__typeof__(*(ptr)))__gu_val; \
172 __gu_err; \
173})
174
175#define __get_user_check(x,ptr,size) \
176({ \
177 long __gu_err = -EFAULT; \
178 unsigned long __gu_val = 0; \
179 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
180 might_sleep(); \
181 if (access_ok(VERIFY_READ,__gu_addr,size)) \
182 __get_user_size(__gu_val,__gu_addr,(size),__gu_err,-EFAULT);\
183 (x) = (__typeof__(*(ptr)))__gu_val; \
184 __gu_err; \
185})
186
187extern long __get_user_bad(void);
188
189#define __get_user_size(x,ptr,size,retval,errret) \
190do { \
191 retval = 0; \
192 __chk_user_ptr(ptr); \
193 switch (size) { \
194 case 1: __get_user_asm(x,ptr,retval,"lbz",errret); break; \
195 case 2: __get_user_asm(x,ptr,retval,"lhz",errret); break; \
196 case 4: __get_user_asm(x,ptr,retval,"lwz",errret); break; \
197 case 8: __get_user_asm(x,ptr,retval,"ld",errret); break; \
198 default: (x) = __get_user_bad(); \
199 } \
200} while (0)
201
202#define __get_user_asm(x, addr, err, op, errret) \
203 __asm__ __volatile__( \
204 "1: "op" %1,0(%2) # get_user\n" \
205 "2:\n" \
206 ".section .fixup,\"ax\"\n" \
207 "3: li %0,%3\n" \
208 " li %1,0\n" \
209 " b 2b\n" \
210 ".previous\n" \
211 ".section __ex_table,\"a\"\n" \
212 " .align 3\n" \
213 " .llong 1b,3b\n" \
214 ".previous" \
215 : "=r"(err), "=r"(x) \
216 : "b"(addr), "i"(errret), "0"(err))
217
218/* more complex routines */
219
220extern unsigned long __copy_tofrom_user(void __user *to, const void __user *from,
221 unsigned long size);
222
223static inline unsigned long
224__copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
225{
226 if (__builtin_constant_p(n)) {
227 unsigned long ret;
228
229 switch (n) {
230 case 1:
231 __get_user_size(*(u8 *)to, from, 1, ret, 1);
232 return ret;
233 case 2:
234 __get_user_size(*(u16 *)to, from, 2, ret, 2);
235 return ret;
236 case 4:
237 __get_user_size(*(u32 *)to, from, 4, ret, 4);
238 return ret;
239 case 8:
240 __get_user_size(*(u64 *)to, from, 8, ret, 8);
241 return ret;
242 }
243 }
244 return __copy_tofrom_user((__force void __user *) to, from, n);
245}
246
247static inline unsigned long
248__copy_from_user(void *to, const void __user *from, unsigned long n)
249{
250 might_sleep();
251 return __copy_from_user_inatomic(to, from, n);
252}
253
254static inline unsigned long
255__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
256{
257 if (__builtin_constant_p(n)) {
258 unsigned long ret;
259
260 switch (n) {
261 case 1:
262 __put_user_size(*(u8 *)from, (u8 __user *)to, 1, ret, 1);
263 return ret;
264 case 2:
265 __put_user_size(*(u16 *)from, (u16 __user *)to, 2, ret, 2);
266 return ret;
267 case 4:
268 __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret, 4);
269 return ret;
270 case 8:
271 __put_user_size(*(u64 *)from, (u64 __user *)to, 8, ret, 8);
272 return ret;
273 }
274 }
275 return __copy_tofrom_user(to, (__force const void __user *) from, n);
276}
277
278static inline unsigned long
279__copy_to_user(void __user *to, const void *from, unsigned long n)
280{
281 might_sleep();
282 return __copy_to_user_inatomic(to, from, n);
283}
284
285#define __copy_in_user(to, from, size) \
286 __copy_tofrom_user((to), (from), (size))
287
288extern unsigned long copy_from_user(void *to, const void __user *from,
289 unsigned long n);
290extern unsigned long copy_to_user(void __user *to, const void *from,
291 unsigned long n);
292extern unsigned long copy_in_user(void __user *to, const void __user *from,
293 unsigned long n);
294
295extern unsigned long __clear_user(void __user *addr, unsigned long size);
296
297static inline unsigned long
298clear_user(void __user *addr, unsigned long size)
299{
300 might_sleep();
301 if (likely(access_ok(VERIFY_WRITE, addr, size)))
302 size = __clear_user(addr, size);
303 return size;
304}
305
306extern int __strncpy_from_user(char *dst, const char __user *src, long count);
307
308static inline long
309strncpy_from_user(char *dst, const char __user *src, long count)
310{
311 might_sleep();
312 if (likely(access_ok(VERIFY_READ, src, 1)))
313 return __strncpy_from_user(dst, src, count);
314 return -EFAULT;
315}
316
317/*
318 * Return the size of a string (including the ending 0)
319 *
320 * Return 0 for error
321 */
322extern int __strnlen_user(const char __user *str, long len);
323
324/*
325 * Returns the length of the string at str (including the null byte),
326 * or 0 if we hit a page we can't access,
327 * or something > len if we didn't find a null byte.
328 */
329static inline int strnlen_user(const char __user *str, long len)
330{
331 might_sleep();
332 if (likely(access_ok(VERIFY_READ, str, 1)))
333 return __strnlen_user(str, len);
334 return 0;
335}
336
337#define strlen_user(str) strnlen_user((str), 0x7ffffffe)
338
339#endif /* __ASSEMBLY__ */
340
341#endif /* _PPC64_UACCESS_H */
diff --git a/include/asm-ppc64/ucontext.h b/include/asm-ppc64/ucontext.h
deleted file mode 100644
index ef8cc5b37542..000000000000
--- a/include/asm-ppc64/ucontext.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ASMPPC64_UCONTEXT_H
2#define _ASMPPC64_UCONTEXT_H
3
4#include <asm/sigcontext.h>
5
6/*
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13struct ucontext {
14 unsigned long uc_flags;
15 struct ucontext *uc_link;
16 stack_t uc_stack;
17 sigset_t uc_sigmask;
18 sigset_t __unsued[15]; /* Allow for uc_sigmask growth */
19 struct sigcontext uc_mcontext; /* last for extensibility */
20};
21
22#endif /* _ASMPPC64_UCONTEXT_H */