aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/head.S1
-rw-r--r--arch/alpha/kernel/pci.c10
-rw-r--r--arch/alpha/kernel/pci_iommu.c4
-rw-r--r--arch/alpha/kernel/smp.c7
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S1
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/kernel/setup.c1
-rw-r--r--arch/arm/kernel/smp.c3
-rw-r--r--arch/arm/kernel/traps.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720.c27
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c2
-rw-r--r--arch/arm/plat-omap/mailbox.c8
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/blackfin/kernel/dma-mapping.c3
-rw-r--r--arch/blackfin/kernel/setup.c5
-rw-r--r--arch/blackfin/kernel/traps.c2
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S16
-rw-r--r--arch/blackfin/mach-bf561/head.S10
-rw-r--r--arch/blackfin/mach-common/cacheinit.S3
-rw-r--r--arch/blackfin/mach-common/ints-priority-dc.c39
-rw-r--r--arch/blackfin/mach-common/ints-priority-sc.c48
-rw-r--r--arch/frv/kernel/sys_frv.c1
-rw-r--r--arch/i386/Kconfig.debug4
-rw-r--r--arch/i386/boot/apm.c7
-rw-r--r--arch/i386/boot/main.c16
-rw-r--r--arch/i386/kernel/alternative.c14
-rw-r--r--arch/i386/kernel/cpu/cpufreq/Kconfig2
-rw-r--r--arch/i386/kernel/e820.c2
-rw-r--r--arch/i386/kernel/microcode.c1
-rw-r--r--arch/i386/kernel/sys_i386.c1
-rw-r--r--arch/i386/kernel/sysenter.c1
-rw-r--r--arch/i386/mm/init.c16
-rw-r--r--arch/i386/power/Makefile2
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/ia64/hp/common/sba_iommu.c7
-rw-r--r--arch/ia64/hp/sim/simscsi.c2
-rw-r--r--arch/ia64/ia32/ia32_support.c8
-rw-r--r--arch/ia64/ia32/ia32priv.h12
-rw-r--r--arch/ia64/ia32/sys_ia32.c81
-rw-r--r--arch/ia64/kernel/acpi.c28
-rw-r--r--arch/ia64/kernel/cyclone.c14
-rw-r--r--arch/ia64/kernel/head.S4
-rw-r--r--arch/ia64/kernel/init_task.c1
-rw-r--r--arch/ia64/kernel/irq_ia64.c31
-rw-r--r--arch/ia64/kernel/machvec.c27
-rw-r--r--arch/ia64/kernel/process.c7
-rw-r--r--arch/ia64/kernel/setup.c11
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/smpboot.c6
-rw-r--r--arch/ia64/kernel/time.c4
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S2
-rw-r--r--arch/ia64/pci/pci.c2
-rw-r--r--arch/m32r/kernel/setup_mappi.c5
-rw-r--r--arch/m68k/kernel/process.c1
-rw-r--r--arch/m68k/kernel/sys_m68k.c1
-rw-r--r--arch/m68knommu/Kconfig24
-rw-r--r--arch/m68knommu/Makefile2
-rw-r--r--arch/m68knommu/kernel/dma.c1
-rw-r--r--arch/m68knommu/kernel/setup.c7
-rw-r--r--arch/m68knommu/platform/5206/config.c10
-rw-r--r--arch/m68knommu/platform/5206e/config.c9
-rw-r--r--arch/m68knommu/platform/520x/config.c9
-rw-r--r--arch/m68knommu/platform/523x/config.c10
-rw-r--r--arch/m68knommu/platform/5249/config.c10
-rw-r--r--arch/m68knommu/platform/5272/config.c9
-rw-r--r--arch/m68knommu/platform/527x/config.c10
-rw-r--r--arch/m68knommu/platform/528x/config.c10
-rw-r--r--arch/m68knommu/platform/5307/config.c9
-rw-r--r--arch/m68knommu/platform/5307/entry.S11
-rw-r--r--arch/m68knommu/platform/5307/pit.c14
-rw-r--r--arch/m68knommu/platform/5307/timers.c13
-rw-r--r--arch/m68knommu/platform/532x/config.c7
-rw-r--r--arch/m68knommu/platform/5407/config.c9
-rw-r--r--arch/m68knommu/platform/68328/timers.c11
-rw-r--r--arch/m68knommu/platform/68360/config.c14
-rw-r--r--arch/m68knommu/platform/68VZ328/config.c7
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/mips/arc/console.c31
-rw-r--r--arch/mips/jazz/io.c135
-rw-r--r--arch/mips/jazz/reset.c13
-rw-r--r--arch/mips/jazz/setup.c4
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c2
-rw-r--r--arch/mips/kernel/gdb-stub.c4
-rw-r--r--arch/mips/kernel/head.S2
-rw-r--r--arch/mips/kernel/linux32.c2
-rw-r--r--arch/mips/kernel/rtlx.c2
-rw-r--r--arch/mips/kernel/smp.c1
-rw-r--r--arch/mips/kernel/syscall.c5
-rw-r--r--arch/mips/kernel/vpe.c3
-rw-r--r--arch/mips/mm/c-sb1.c2
-rw-r--r--arch/mips/mm/init.c2
-rw-r--r--arch/mips/sni/sniprom.c5
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c2
-rw-r--r--arch/parisc/hpux/fs.c1
-rw-r--r--arch/parisc/kernel/init_task.c1
-rw-r--r--arch/parisc/kernel/process.c1
-rw-r--r--arch/parisc/kernel/smp.c1
-rw-r--r--arch/powerpc/Kconfig9
-rw-r--r--arch/powerpc/Kconfig.debug4
-rw-r--r--arch/powerpc/boot/dts/kuroboxHD.dts18
-rw-r--r--arch/powerpc/boot/dts/kuroboxHG.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts219
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts250
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts60
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts8
-rw-r--r--arch/powerpc/configs/lite5200_defconfig2
-rw-r--r--arch/powerpc/configs/mpc8544_ds_defconfig333
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig292
-rw-r--r--arch/powerpc/configs/pmac32_defconfig2
-rw-r--r--arch/powerpc/kernel/Makefile6
-rw-r--r--arch/powerpc/kernel/head_64.S7
-rw-r--r--arch/powerpc/kernel/iomap.c8
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/pci-common.c25
-rw-r--r--arch/powerpc/kernel/pci_32.c45
-rw-r--r--arch/powerpc/kernel/process.c4
-rw-r--r--arch/powerpc/kernel/prom_parse.c2
-rw-r--r--arch/powerpc/kernel/setup-common.c4
-rw-r--r--arch/powerpc/kernel/syscalls.c1
-rw-r--r--arch/powerpc/kernel/udbg.c2
-rw-r--r--arch/powerpc/lib/rheap.c1
-rw-r--r--arch/powerpc/mm/lmb.c4
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c1
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c3
-rw-r--r--arch/powerpc/platforms/83xx/pci.c4
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig6
-rw-r--r--arch/powerpc/platforms/85xx/Makefile2
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c241
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx.h1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c3
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c125
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c7
-rw-r--r--arch/powerpc/platforms/85xx/pci.c91
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/86xx/Makefile1
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx.h5
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c13
-rw-r--r--arch/powerpc/platforms/86xx/pci.c238
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h5
-rw-r--r--arch/powerpc/platforms/chrp/pci.c7
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c2
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c2
-rw-r--r--arch/powerpc/platforms/maple/pci.c3
-rw-r--r--arch/powerpc/sysdev/Makefile1
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c257
-rw-r--r--arch/powerpc/sysdev/fsl_pci.h88
-rw-r--r--arch/powerpc/sysdev/fsl_pcie.h94
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c61
-rw-r--r--arch/powerpc/sysdev/grackle.c2
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c60
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c2
-rw-r--r--arch/ppc/configs/TQM8540_defconfig2
-rw-r--r--arch/ppc/configs/TQM8541_defconfig2
-rw-r--r--arch/ppc/configs/TQM8555_defconfig2
-rw-r--r--arch/ppc/configs/TQM8560_defconfig2
-rw-r--r--arch/ppc/configs/ev64360_defconfig2
-rw-r--r--arch/ppc/configs/ml300_defconfig2
-rw-r--r--arch/ppc/configs/ml403_defconfig2
-rw-r--r--arch/ppc/configs/mpc834x_sys_defconfig2
-rw-r--r--arch/ppc/configs/prep_defconfig2
-rw-r--r--arch/s390/appldata/appldata_base.c12
-rw-r--r--arch/s390/kernel/compat_wrapper.S10
-rw-r--r--arch/s390/kernel/entry.S6
-rw-r--r--arch/s390/kernel/entry64.S6
-rw-r--r--arch/s390/kernel/head.S1
-rw-r--r--arch/s390/kernel/init_task.c1
-rw-r--r--arch/s390/kernel/process.c1
-rw-r--r--arch/s390/kernel/smp.c31
-rw-r--r--arch/s390/kernel/sys_s390.c21
-rw-r--r--arch/s390/kernel/syscalls.S2
-rw-r--r--arch/s390/kernel/vmlinux.lds.S1
-rw-r--r--arch/s390/kernel/vtime.c2
-rw-r--r--arch/s390/mm/vmem.c6
-rw-r--r--arch/sparc/defconfig2
-rw-r--r--arch/sparc/kernel/init_task.c1
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c3
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S2
-rw-r--r--arch/sparc/lib/memset.S2
-rw-r--r--arch/sparc/prom/printf.c2
-rw-r--r--arch/sparc64/Kconfig.debug2
-rw-r--r--arch/sparc64/defconfig32
-rw-r--r--arch/sparc64/kernel/head.S11
-rw-r--r--arch/sparc64/kernel/init_task.c1
-rw-r--r--arch/sparc64/kernel/process.c1
-rw-r--r--arch/sparc64/kernel/viohs.c2
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S2
-rw-r--r--arch/um/drivers/mconsole_kern.c4
-rw-r--r--arch/um/drivers/mmapper_kern.c1
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/um/drivers/ubd_kern.c4
-rw-r--r--arch/um/kernel/exec.c1
-rw-r--r--arch/um/kernel/init_task.c1
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/kernel/physmem.c15
-rw-r--r--arch/um/kernel/skas/process.c4
-rw-r--r--arch/um/kernel/syscall.c1
-rw-r--r--arch/um/os-Linux/aio.c47
-rw-r--r--arch/um/os-Linux/process.c2
-rw-r--r--arch/um/os-Linux/user_syms.c5
-rw-r--r--arch/um/sys-i386/Makefile2
-rw-r--r--arch/x86_64/Kconfig3
-rw-r--r--arch/x86_64/defconfig2
-rw-r--r--arch/x86_64/ia32/ia32_binfmt.c5
-rw-r--r--arch/x86_64/ia32/ptrace32.c1
-rw-r--r--arch/x86_64/ia32/syscall32.c8
-rw-r--r--arch/x86_64/kernel/Makefile2
-rw-r--r--arch/x86_64/kernel/acpi/sleep.c4
-rw-r--r--arch/x86_64/kernel/process.c1
-rw-r--r--arch/x86_64/kernel/suspend.c4
-rw-r--r--arch/x86_64/kernel/sys_x86_64.c1
-rw-r--r--arch/x86_64/kernel/tce.c4
-rw-r--r--arch/x86_64/kernel/tsc.c2
-rw-r--r--arch/x86_64/mm/init.c10
-rw-r--r--arch/x86_64/vdso/vma.c1
229 files changed, 2394 insertions, 1580 deletions
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index e27d23c74ba8..7ac1f1372c36 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -10,6 +10,7 @@
10#include <asm/system.h> 10#include <asm/system.h>
11#include <asm/asm-offsets.h> 11#include <asm/asm-offsets.h>
12 12
13.section .text.head, "ax"
13.globl swapper_pg_dir 14.globl swapper_pg_dir
14.globl _stext 15.globl _stext
15swapper_pg_dir=SWAPPER_PGD 16swapper_pg_dir=SWAPPER_PGD
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ab642a4f08de..9dc1cee43265 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -195,7 +195,7 @@ pcibios_init(void)
195 195
196subsys_initcall(pcibios_init); 196subsys_initcall(pcibios_init);
197 197
198char * __init 198char * __devinit
199pcibios_setup(char *str) 199pcibios_setup(char *str)
200{ 200{
201 return str; 201 return str;
@@ -204,7 +204,7 @@ pcibios_setup(char *str)
204#ifdef ALPHA_RESTORE_SRM_SETUP 204#ifdef ALPHA_RESTORE_SRM_SETUP
205static struct pdev_srm_saved_conf *srm_saved_configs; 205static struct pdev_srm_saved_conf *srm_saved_configs;
206 206
207void __init 207void __devinit
208pdev_save_srm_config(struct pci_dev *dev) 208pdev_save_srm_config(struct pci_dev *dev)
209{ 209{
210 struct pdev_srm_saved_conf *tmp; 210 struct pdev_srm_saved_conf *tmp;
@@ -247,14 +247,14 @@ pci_restore_srm_config(void)
247} 247}
248#endif 248#endif
249 249
250void __init 250void __devinit
251pcibios_fixup_resource(struct resource *res, struct resource *root) 251pcibios_fixup_resource(struct resource *res, struct resource *root)
252{ 252{
253 res->start += root->start; 253 res->start += root->start;
254 res->end += root->start; 254 res->end += root->start;
255} 255}
256 256
257void __init 257void __devinit
258pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus) 258pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
259{ 259{
260 /* Update device resources. */ 260 /* Update device resources. */
@@ -273,7 +273,7 @@ pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
273 } 273 }
274} 274}
275 275
276void __init 276void __devinit
277pcibios_fixup_bus(struct pci_bus *bus) 277pcibios_fixup_bus(struct pci_bus *bus)
278{ 278{
279 /* Propagate hose info into the subordinate devices. */ 279 /* Propagate hose info into the subordinate devices. */
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 6b07f89a72c7..e1c470752ebc 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -58,7 +58,7 @@ size_for_memory(unsigned long max)
58 return max; 58 return max;
59} 59}
60 60
61struct pci_iommu_arena * 61struct pci_iommu_arena * __init
62iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base, 62iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
63 unsigned long window_size, unsigned long align) 63 unsigned long window_size, unsigned long align)
64{ 64{
@@ -117,7 +117,7 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
117 return arena; 117 return arena;
118} 118}
119 119
120struct pci_iommu_arena * 120struct pci_iommu_arena * __init
121iommu_arena_new(struct pci_controller *hose, dma_addr_t base, 121iommu_arena_new(struct pci_controller *hose, dma_addr_t base,
122 unsigned long window_size, unsigned long align) 122 unsigned long window_size, unsigned long align)
123{ 123{
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index b28731437c31..ad176441be55 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/threads.h> 20#include <linux/threads.h>
20#include <linux/smp.h> 21#include <linux/smp.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
@@ -358,7 +359,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
358/* 359/*
359 * Bring one cpu online. 360 * Bring one cpu online.
360 */ 361 */
361static int __devinit 362static int __cpuinit
362smp_boot_one_cpu(int cpuid) 363smp_boot_one_cpu(int cpuid)
363{ 364{
364 struct task_struct *idle; 365 struct task_struct *idle;
@@ -487,7 +488,7 @@ smp_prepare_boot_cpu(void)
487{ 488{
488} 489}
489 490
490int __devinit 491int __cpuinit
491__cpu_up(unsigned int cpu) 492__cpu_up(unsigned int cpu)
492{ 493{
493 smp_boot_one_cpu(cpu); 494 smp_boot_one_cpu(cpu);
@@ -541,7 +542,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs)
541 set_irq_regs(old_regs); 542 set_irq_regs(old_regs);
542} 543}
543 544
544int __init 545int
545setup_profiling_timer(unsigned int multiplier) 546setup_profiling_timer(unsigned int multiplier)
546{ 547{
547 return -EINVAL; 548 return -EINVAL;
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index fe13daa5cb2c..7af07d3ad5f0 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -15,6 +15,7 @@ SECTIONS
15 15
16 _text = .; /* Text and read-only data */ 16 _text = .; /* Text and read-only data */
17 .text : { 17 .text : {
18 *(.text.head)
18 TEXT_TEXT 19 TEXT_TEXT
19 SCHED_TEXT 20 SCHED_TEXT
20 LOCK_TEXT 21 LOCK_TEXT
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 85016313bd11..c8569e862c6b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -341,6 +341,7 @@ config ARCH_PXA
341 select ARCH_MTD_XIP 341 select ARCH_MTD_XIP
342 select GENERIC_GPIO 342 select GENERIC_GPIO
343 select GENERIC_TIME 343 select GENERIC_TIME
344 select GENERIC_CLOCKEVENTS
344 help 345 help
345 Support for Intel's PXA2XX processor line. 346 Support for Intel's PXA2XX processor line.
346 347
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 5be2e987b843..4de432ec903a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -23,6 +23,7 @@
23#include <linux/cpu.h> 23#include <linux/cpu.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/fs.h>
26 27
27#include <asm/cpu.h> 28#include <asm/cpu.h>
28#include <asm/elf.h> 29#include <asm/elf.h>
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 1b76d87fa335..eafbb2b05eb8 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -17,6 +17,7 @@
17#include <linux/profile.h> 17#include <linux/profile.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/err.h>
20#include <linux/cpu.h> 21#include <linux/cpu.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
22#include <linux/seq_file.h> 23#include <linux/seq_file.h>
@@ -630,7 +631,7 @@ void smp_send_stop(void)
630/* 631/*
631 * not supported here 632 * not supported here
632 */ 633 */
633int __init setup_profiling_timer(unsigned int multiplier) 634int setup_profiling_timer(unsigned int multiplier)
634{ 635{
635 return -EINVAL; 636 return -EINVAL;
636} 637}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index f2114bcf09d5..8ad47619c079 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -352,10 +352,8 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
352 352
353asmlinkage void do_unexp_fiq (struct pt_regs *regs) 353asmlinkage void do_unexp_fiq (struct pt_regs *regs)
354{ 354{
355#ifndef CONFIG_IGNORE_FIQ
356 printk("Hmm. Unexpected FIQ received, but trying to continue\n"); 355 printk("Hmm. Unexpected FIQ received, but trying to continue\n");
357 printk("You may have a hardware problem...\n"); 356 printk("You may have a hardware problem...\n");
358#endif
359} 357}
360 358
361/* 359/*
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 64067cd58d36..52ac37d1e23a 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * HP Jornada720 init code 4 * HP Jornada720 init code
5 * 5 *
6 * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
6 * Copyright (C) 2006 Filip Zyzniewski <filip.zyzniewski@tefnet.pl> 7 * Copyright (C) 2006 Filip Zyzniewski <filip.zyzniewski@tefnet.pl>
7 * Copyright (C) 2005 Michael Gernoth <michael@gernoth.net> 8 * Copyright (C) 2005 Michael Gernoth <michael@gernoth.net>
8 * 9 *
@@ -220,14 +221,16 @@ static struct platform_device sa1111_device = {
220 .resource = sa1111_resources, 221 .resource = sa1111_resources,
221}; 222};
222 223
223static struct platform_device jornada720_mcu_device = { 224static struct platform_device jornada_ssp_device = {
224 .name = "jornada720_mcu", 225 .name = "jornada_ssp",
225 .id = -1, 226 .id = -1,
226}; 227};
227 228
228static struct platform_device *devices[] __initdata = { 229static struct platform_device *devices[] __initdata = {
229 &sa1111_device, 230 &sa1111_device,
230 &jornada720_mcu_device, 231#ifdef CONFIG_SA1100_JORNADA720_SSP
232 &jornada_ssp_device,
233#endif
231 &s1d13xxxfb_device, 234 &s1d13xxxfb_device,
232}; 235};
233 236
@@ -236,19 +239,19 @@ static int __init jornada720_init(void)
236 int ret = -ENODEV; 239 int ret = -ENODEV;
237 240
238 if (machine_is_jornada720()) { 241 if (machine_is_jornada720()) {
239 GPDR |= GPIO_GPIO20; 242 /* we want to use gpio20 as input to drive the clock of our uart 3 */
240 /* oscillator setup (line 116 of HP's doc) */ 243 GPDR |= GPIO_GPIO20; /* Clear gpio20 pin as input */
241 TUCR = TUCR_VAL; 244 TUCR = TUCR_VAL;
242 /* resetting SA1111 (line 118 of HP's doc) */ 245 GPSR = GPIO_GPIO20; /* start gpio20 pin */
243 GPSR = GPIO_GPIO20;
244 udelay(1); 246 udelay(1);
245 GPCR = GPIO_GPIO20; 247 GPCR = GPIO_GPIO20; /* stop gpio20 */
246 udelay(1); 248 udelay(1);
247 GPSR = GPIO_GPIO20; 249 GPSR = GPIO_GPIO20; /* restart gpio20 */
248 udelay(20); 250 udelay(20); /* give it some time to restart */
249 251
250 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 252 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
251 } 253 }
254
252 return ret; 255 return ret;
253} 256}
254 257
@@ -345,7 +348,7 @@ static void __init jornada720_mach_init(void)
345} 348}
346 349
347MACHINE_START(JORNADA720, "HP Jornada 720") 350MACHINE_START(JORNADA720, "HP Jornada 720")
348 /* Maintainer: Michael Gernoth <michael@gernoth.net> */ 351 /* Maintainer: Kristoffer Ericson <Kristoffer.Ericson@gmail.com> */
349 .phys_io = 0x80000000, 352 .phys_io = 0x80000000,
350 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 353 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
351 .boot_params = 0xc0000100, 354 .boot_params = 0xc0000100,
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 0a45e1ac8ad6..395c39bed7d8 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -161,7 +161,7 @@ static int __init jornada_ssp_probe(struct platform_device *dev)
161 ret = jornada_ssp_inout(GETBRIGHTNESS); 161 ret = jornada_ssp_inout(GETBRIGHTNESS);
162 162
163 /* seems like it worked, just feed it with TxDummy to get rid of data */ 163 /* seems like it worked, just feed it with TxDummy to get rid of data */
164 if (ret == TxDummy) 164 if (ret == TXDUMMY)
165 jornada_ssp_inout(TXDUMMY); 165 jornada_ssp_inout(TXDUMMY);
166 166
167 jornada_ssp_end(); 167 jornada_ssp_end();
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index de7e6ef48bd0..0360b1f14d11 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -161,11 +161,11 @@ static void mbox_rx_work(struct work_struct *work)
161/* 161/*
162 * Mailbox interrupt handler 162 * Mailbox interrupt handler
163 */ 163 */
164static void mbox_txq_fn(request_queue_t * q) 164static void mbox_txq_fn(struct request_queue * q)
165{ 165{
166} 166}
167 167
168static void mbox_rxq_fn(request_queue_t * q) 168static void mbox_rxq_fn(struct request_queue * q)
169{ 169{
170} 170}
171 171
@@ -180,7 +180,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
180{ 180{
181 struct request *rq; 181 struct request *rq;
182 mbox_msg_t msg; 182 mbox_msg_t msg;
183 request_queue_t *q = mbox->rxq->queue; 183 struct request_queue *q = mbox->rxq->queue;
184 184
185 disable_mbox_irq(mbox, IRQ_RX); 185 disable_mbox_irq(mbox, IRQ_RX);
186 186
@@ -297,7 +297,7 @@ static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
297 request_fn_proc * proc, 297 request_fn_proc * proc,
298 void (*work) (struct work_struct *)) 298 void (*work) (struct work_struct *))
299{ 299{
300 request_queue_t *q; 300 struct request_queue *q;
301 struct omap_mbox_queue *mq; 301 struct omap_mbox_queue *mq;
302 302
303 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL); 303 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL);
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 1b75672dfc8f..20841663270f 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -24,6 +24,8 @@ machine-$(CONFIG_BF533) := bf533
24machine-$(CONFIG_BF534) := bf537 24machine-$(CONFIG_BF534) := bf537
25machine-$(CONFIG_BF536) := bf537 25machine-$(CONFIG_BF536) := bf537
26machine-$(CONFIG_BF537) := bf537 26machine-$(CONFIG_BF537) := bf537
27machine-$(CONFIG_BF542) := bf548
28machine-$(CONFIG_BF544) := bf548
27machine-$(CONFIG_BF548) := bf548 29machine-$(CONFIG_BF548) := bf548
28machine-$(CONFIG_BF549) := bf548 30machine-$(CONFIG_BF549) := bf548
29machine-$(CONFIG_BF561) := bf561 31machine-$(CONFIG_BF561) := bf561
@@ -36,6 +38,8 @@ cpu-$(CONFIG_BF533) := bf533
36cpu-$(CONFIG_BF534) := bf534 38cpu-$(CONFIG_BF534) := bf534
37cpu-$(CONFIG_BF536) := bf536 39cpu-$(CONFIG_BF536) := bf536
38cpu-$(CONFIG_BF537) := bf537 40cpu-$(CONFIG_BF537) := bf537
41cpu-$(CONFIG_BF542) := bf542
42cpu-$(CONFIG_BF544) := bf544
39cpu-$(CONFIG_BF548) := bf548 43cpu-$(CONFIG_BF548) := bf548
40cpu-$(CONFIG_BF549) := bf549 44cpu-$(CONFIG_BF549) := bf549
41cpu-$(CONFIG_BF561) := bf561 45cpu-$(CONFIG_BF561) := bf561
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index ea48d5b13f11..94d7b119b71e 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -160,7 +160,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
160 BUG_ON(direction == DMA_NONE); 160 BUG_ON(direction == DMA_NONE);
161 161
162 for (i = 0; i < nents; i++, sg++) { 162 for (i = 0; i < nents; i++, sg++) {
163 sg->dma_address = page_address(sg->page) + sg->offset; 163 sg->dma_address = (dma_addr_t)(page_address(sg->page) +
164 sg->offset);
164 165
165 invalidate_dcache_range(sg_dma_address(sg), 166 invalidate_dcache_range(sg_dma_address(sg),
166 sg_dma_address(sg) + 167 sg_dma_address(sg) +
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index f59dcee7bae3..88f221b89b33 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -402,11 +402,7 @@ void __init setup_arch(char **cmdline_p)
402 if (l1_length > L1_DATA_A_LENGTH) 402 if (l1_length > L1_DATA_A_LENGTH)
403 panic("L1 data memory overflow\n"); 403 panic("L1 data memory overflow\n");
404 404
405#ifdef BF561_FAMILY
406 _bfin_swrst = bfin_read_SICA_SWRST();
407#else
408 _bfin_swrst = bfin_read_SWRST(); 405 _bfin_swrst = bfin_read_SWRST();
409#endif
410 406
411 /* Copy atomic sequences to their fixed location, and sanity check that 407 /* Copy atomic sequences to their fixed location, and sanity check that
412 these locations are the ones that we advertise to userspace. */ 408 these locations are the ones that we advertise to userspace. */
@@ -429,6 +425,7 @@ void __init setup_arch(char **cmdline_p)
429 BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start 425 BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start
430 != ATOMIC_XOR32 - FIXED_CODE_START); 426 != ATOMIC_XOR32 - FIXED_CODE_START);
431 427
428 init_exception_vectors();
432 bf53x_cache_init(); 429 bf53x_cache_init();
433} 430}
434 431
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 3909f5b35536..8766bd612b47 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -140,7 +140,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
140#ifdef CONFIG_KGDB 140#ifdef CONFIG_KGDB
141# define CHK_DEBUGGER_TRAP() \ 141# define CHK_DEBUGGER_TRAP() \
142 do { \ 142 do { \
143 CHK_DEBUGGER(trapnr, sig, info.si_code, fp); \ 143 CHK_DEBUGGER(trapnr, sig, info.si_code, fp, ); \
144 } while (0) 144 } while (0)
145# define CHK_DEBUGGER_TRAP_MAYBE() \ 145# define CHK_DEBUGGER_TRAP_MAYBE() \
146 do { \ 146 do { \
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index d06f860f4790..fb53780247bc 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -32,6 +32,7 @@
32#include <asm-generic/vmlinux.lds.h> 32#include <asm-generic/vmlinux.lds.h>
33#include <asm/mem_map.h> 33#include <asm/mem_map.h>
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/thread_info.h>
35 36
36OUTPUT_FORMAT("elf32-bfin") 37OUTPUT_FORMAT("elf32-bfin")
37ENTRY(__start) 38ENTRY(__start)
@@ -64,8 +65,12 @@ SECTIONS
64 65
65 .data : 66 .data :
66 { 67 {
67 . = ALIGN(PAGE_SIZE); 68 /* make sure the init_task is aligned to the
69 * kernel thread size so we can locate the kernel
70 * stack properly and quickly.
71 */
68 __sdata = .; 72 __sdata = .;
73 . = ALIGN(THREAD_SIZE);
69 *(.data.init_task) 74 *(.data.init_task)
70 DATA_DATA 75 DATA_DATA
71 CONSTRUCTORS 76 CONSTRUCTORS
@@ -73,14 +78,14 @@ SECTIONS
73 . = ALIGN(32); 78 . = ALIGN(32);
74 *(.data.cacheline_aligned) 79 *(.data.cacheline_aligned)
75 80
76 . = ALIGN(PAGE_SIZE); 81 . = ALIGN(THREAD_SIZE);
77 __edata = .; 82 __edata = .;
78 } 83 }
79 84
80 . = ALIGN(PAGE_SIZE);
81 ___init_begin = .; 85 ___init_begin = .;
82 .init : 86 .init :
83 { 87 {
88 . = ALIGN(PAGE_SIZE);
84 __sinittext = .; 89 __sinittext = .;
85 *(.init.text) 90 *(.init.text)
86 __einittext = .; 91 __einittext = .;
@@ -153,10 +158,9 @@ SECTIONS
153 __ebss_b_l1 = .; 158 __ebss_b_l1 = .;
154 } 159 }
155 160
156 . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); 161 ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
157 ___init_end = ALIGN(PAGE_SIZE);
158 162
159 .bss ___init_end : 163 .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
160 { 164 {
161 . = ALIGN(4); 165 . = ALIGN(4);
162 ___bss_start = .; 166 ___bss_start = .;
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S
index 2f08bcb2dded..38650a628980 100644
--- a/arch/blackfin/mach-bf561/head.S
+++ b/arch/blackfin/mach-bf561/head.S
@@ -440,15 +440,15 @@ ENTRY(_bfin_reset)
440 SSYNC; 440 SSYNC;
441 441
442 /* make sure SYSCR is set to use BMODE */ 442 /* make sure SYSCR is set to use BMODE */
443 P0.h = hi(SICA_SYSCR); 443 P0.h = hi(SYSCR);
444 P0.l = lo(SICA_SYSCR); 444 P0.l = lo(SYSCR);
445 R0.l = 0x20; 445 R0.l = 0x20; /* on BF561, disable core b */
446 W[P0] = R0.l; 446 W[P0] = R0.l;
447 SSYNC; 447 SSYNC;
448 448
449 /* issue a system soft reset */ 449 /* issue a system soft reset */
450 P1.h = hi(SICA_SWRST); 450 P1.h = hi(SWRST);
451 P1.l = lo(SICA_SWRST); 451 P1.l = lo(SWRST);
452 R1.l = 0x0007; 452 R1.l = 0x0007;
453 W[P1] = R1; 453 W[P1] = R1;
454 SSYNC; 454 SSYNC;
diff --git a/arch/blackfin/mach-common/cacheinit.S b/arch/blackfin/mach-common/cacheinit.S
index 9d475623b724..5be6b975ae4a 100644
--- a/arch/blackfin/mach-common/cacheinit.S
+++ b/arch/blackfin/mach-common/cacheinit.S
@@ -60,6 +60,9 @@ ENDPROC(_bfin_write_IMEM_CONTROL)
60 60
61#if defined(CONFIG_BLKFIN_DCACHE) 61#if defined(CONFIG_BLKFIN_DCACHE)
62ENTRY(_bfin_write_DMEM_CONTROL) 62ENTRY(_bfin_write_DMEM_CONTROL)
63 P0.l = (DMEM_CONTROL & 0xFFFF);
64 P0.h = (DMEM_CONTROL >> 16);
65
63 CLI R1; 66 CLI R1;
64 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 67 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
65 .align 8; 68 .align 8;
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c
index 6b9fd03ce835..660f881b620a 100644
--- a/arch/blackfin/mach-common/ints-priority-dc.c
+++ b/arch/blackfin/mach-common/ints-priority-dc.c
@@ -358,26 +358,10 @@ static void bf561_demux_gpio_irq(unsigned int inta_irq,
358 358
359#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ 359#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */
360 360
361/* 361void __init init_exception_vectors(void)
362 * This function should be called during kernel startup to initialize
363 * the BFin IRQ handling routines.
364 */
365int __init init_arch_irq(void)
366{ 362{
367 int irq;
368 unsigned long ilat = 0;
369 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */
370 bfin_write_SICA_IMASK0(SIC_UNMASK_ALL);
371 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
372 SSYNC(); 363 SSYNC();
373 364
374 bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
375 bfin_write_SICA_IWR1(IWR_ENABLE_ALL);
376
377 local_irq_disable();
378
379 init_exception_buff();
380
381#ifndef CONFIG_KGDB 365#ifndef CONFIG_KGDB
382 bfin_write_EVT0(evt_emulation); 366 bfin_write_EVT0(evt_emulation);
383#endif 367#endif
@@ -395,6 +379,27 @@ int __init init_arch_irq(void)
395 bfin_write_EVT14(evt14_softirq); 379 bfin_write_EVT14(evt14_softirq);
396 bfin_write_EVT15(evt_system_call); 380 bfin_write_EVT15(evt_system_call);
397 CSYNC(); 381 CSYNC();
382}
383
384/*
385 * This function should be called during kernel startup to initialize
386 * the BFin IRQ handling routines.
387 */
388int __init init_arch_irq(void)
389{
390 int irq;
391 unsigned long ilat = 0;
392 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */
393 bfin_write_SICA_IMASK0(SIC_UNMASK_ALL);
394 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
395 SSYNC();
396
397 bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
398 bfin_write_SICA_IWR1(IWR_ENABLE_ALL);
399
400 local_irq_disable();
401
402 init_exception_buff();
398 403
399 for (irq = 0; irq <= SYS_IRQS; irq++) { 404 for (irq = 0; irq <= SYS_IRQS; irq++) {
400 if (irq <= IRQ_CORETMR) 405 if (irq <= IRQ_CORETMR)
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c
index 28a878c3577a..4708023fe716 100644
--- a/arch/blackfin/mach-common/ints-priority-sc.c
+++ b/arch/blackfin/mach-common/ints-priority-sc.c
@@ -579,8 +579,12 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq)
579 u16 gpionr = irq - IRQ_PA0; 579 u16 gpionr = irq - IRQ_PA0;
580 u8 pint_val = irq2pint_lut[irq - SYS_IRQS]; 580 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
581 581
582 if (pint_val == IRQ_NOT_AVAIL) 582 if (pint_val == IRQ_NOT_AVAIL) {
583 printk(KERN_ERR
584 "GPIO IRQ %d :Not in PINT Assign table "
585 "Reconfigure Interrupt to Port Assignemt\n", irq);
583 return -ENODEV; 586 return -ENODEV;
587 }
584 588
585 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 589 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
586 ret = gpio_request(gpionr, NULL); 590 ret = gpio_request(gpionr, NULL);
@@ -713,6 +717,29 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq,
713} 717}
714#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ 718#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */
715 719
720void __init init_exception_vectors(void)
721{
722 SSYNC();
723
724#ifndef CONFIG_KGDB
725 bfin_write_EVT0(evt_emulation);
726#endif
727 bfin_write_EVT2(evt_evt2);
728 bfin_write_EVT3(trap);
729 bfin_write_EVT5(evt_ivhw);
730 bfin_write_EVT6(evt_timer);
731 bfin_write_EVT7(evt_evt7);
732 bfin_write_EVT8(evt_evt8);
733 bfin_write_EVT9(evt_evt9);
734 bfin_write_EVT10(evt_evt10);
735 bfin_write_EVT11(evt_evt11);
736 bfin_write_EVT12(evt_evt12);
737 bfin_write_EVT13(evt_evt13);
738 bfin_write_EVT14(evt14_softirq);
739 bfin_write_EVT15(evt_system_call);
740 CSYNC();
741}
742
716/* 743/*
717 * This function should be called during kernel startup to initialize 744 * This function should be called during kernel startup to initialize
718 * the BFin IRQ handling routines. 745 * the BFin IRQ handling routines.
@@ -733,29 +760,10 @@ int __init init_arch_irq(void)
733 bfin_write_SIC_IMASK(SIC_UNMASK_ALL); 760 bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
734 bfin_write_SIC_IWR(IWR_ENABLE_ALL); 761 bfin_write_SIC_IWR(IWR_ENABLE_ALL);
735#endif 762#endif
736
737 SSYNC(); 763 SSYNC();
738 764
739 local_irq_disable(); 765 local_irq_disable();
740 766
741#ifndef CONFIG_KGDB
742 bfin_write_EVT0(evt_emulation);
743#endif
744 bfin_write_EVT2(evt_evt2);
745 bfin_write_EVT3(trap);
746 bfin_write_EVT5(evt_ivhw);
747 bfin_write_EVT6(evt_timer);
748 bfin_write_EVT7(evt_evt7);
749 bfin_write_EVT8(evt_evt8);
750 bfin_write_EVT9(evt_evt9);
751 bfin_write_EVT10(evt_evt10);
752 bfin_write_EVT11(evt_evt11);
753 bfin_write_EVT12(evt_evt12);
754 bfin_write_EVT13(evt_evt13);
755 bfin_write_EVT14(evt14_softirq);
756 bfin_write_EVT15(evt_system_call);
757 CSYNC();
758
759#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x) 767#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x)
760#ifdef CONFIG_PINTx_REASSIGN 768#ifdef CONFIG_PINTx_REASSIGN
761 pint[0]->assign = CONFIG_PINT0_ASSIGN; 769 pint[0]->assign = CONFIG_PINT0_ASSIGN;
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c
index 26b3df32b9a7..6fbe2665c577 100644
--- a/arch/frv/kernel/sys_frv.c
+++ b/arch/frv/kernel/sys_frv.c
@@ -13,6 +13,7 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/fs.h>
16#include <linux/smp.h> 17#include <linux/smp.h>
17#include <linux/sem.h> 18#include <linux/sem.h>
18#include <linux/msg.h> 19#include <linux/msg.h>
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug
index b31c0802e1cc..f03531eacdfb 100644
--- a/arch/i386/Kconfig.debug
+++ b/arch/i386/Kconfig.debug
@@ -36,11 +36,11 @@ config DEBUG_STACK_USAGE
36 This option will slow down process creation somewhat. 36 This option will slow down process creation somewhat.
37 37
38comment "Page alloc debug is incompatible with Software Suspend on i386" 38comment "Page alloc debug is incompatible with Software Suspend on i386"
39 depends on DEBUG_KERNEL && SOFTWARE_SUSPEND 39 depends on DEBUG_KERNEL && HIBERNATION
40 40
41config DEBUG_PAGEALLOC 41config DEBUG_PAGEALLOC
42 bool "Debug page memory allocations" 42 bool "Debug page memory allocations"
43 depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS 43 depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
44 help 44 help
45 Unmap pages from the kernel linear mapping after free_pages(). 45 Unmap pages from the kernel linear mapping after free_pages().
46 This results in a large slowdown, but helps to find certain types 46 This results in a large slowdown, but helps to find certain types
diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
index a34087c370c0..eab50c55a3a5 100644
--- a/arch/i386/boot/apm.c
+++ b/arch/i386/boot/apm.c
@@ -40,14 +40,15 @@ int query_apm_bios(void)
40 if (bx != 0x504d) /* "PM" signature */ 40 if (bx != 0x504d) /* "PM" signature */
41 return -1; 41 return -1;
42 42
43 if (cx & 0x02) /* 32 bits supported? */ 43 if (!(cx & 0x02)) /* 32 bits supported? */
44 return -1; 44 return -1;
45 45
46 /* Disconnect first, just in case */ 46 /* Disconnect first, just in case */
47 ax = 0x5304; 47 ax = 0x5304;
48 bx = 0;
48 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp" 49 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
49 : "+a" (ax) 50 : "+a" (ax), "+b" (bx)
50 : : "ebx", "ecx", "edx", "esi", "edi"); 51 : : "ecx", "edx", "esi", "edi");
51 52
52 /* Paranoia */ 53 /* Paranoia */
53 ebx = esi = 0; 54 ebx = esi = 0;
diff --git a/arch/i386/boot/main.c b/arch/i386/boot/main.c
index 7f01f96c4fb8..0eeef3989a17 100644
--- a/arch/i386/boot/main.c
+++ b/arch/i386/boot/main.c
@@ -73,15 +73,15 @@ static void keyboard_set_repeat(void)
73} 73}
74 74
75/* 75/*
76 * Get Intel SpeedStep IST information. 76 * Get Intel SpeedStep (IST) information.
77 */ 77 */
78static void query_speedstep_ist(void) 78static void query_ist(void)
79{ 79{
80 asm("int $0x15" 80 asm("int $0x15"
81 : "=a" (boot_params.speedstep_info[0]), 81 : "=a" (boot_params.ist_info.signature),
82 "=b" (boot_params.speedstep_info[1]), 82 "=b" (boot_params.ist_info.command),
83 "=c" (boot_params.speedstep_info[2]), 83 "=c" (boot_params.ist_info.event),
84 "=d" (boot_params.speedstep_info[3]) 84 "=d" (boot_params.ist_info.perf_level)
85 : "a" (0x0000e980), /* IST Support */ 85 : "a" (0x0000e980), /* IST Support */
86 "d" (0x47534943)); /* Request value */ 86 "d" (0x47534943)); /* Request value */
87} 87}
@@ -144,8 +144,8 @@ void main(void)
144 query_voyager(); 144 query_voyager();
145#endif 145#endif
146 146
147 /* Query SpeedStep IST information */ 147 /* Query Intel SpeedStep (IST) information */
148 query_speedstep_ist(); 148 query_ist();
149 149
150 /* Query APM information */ 150 /* Query APM information */
151#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) 151#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index c3750c2c4113..c85598acb8fd 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -430,22 +430,12 @@ void __init alternative_instructions(void)
430 * And on the local CPU you need to be protected again NMI or MCE handlers 430 * And on the local CPU you need to be protected again NMI or MCE handlers
431 * seeing an inconsistent instruction while you patch. 431 * seeing an inconsistent instruction while you patch.
432 */ 432 */
433void __kprobes text_poke(void *oaddr, unsigned char *opcode, int len) 433void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
434{ 434{
435 u8 *addr = oaddr;
436 if (!pte_write(*lookup_address((unsigned long)addr))) {
437 struct page *p[2] = { virt_to_page(addr), virt_to_page(addr+PAGE_SIZE) };
438 addr = vmap(p, 2, VM_MAP, PAGE_KERNEL);
439 if (!addr)
440 return;
441 addr += ((unsigned long)oaddr) % PAGE_SIZE;
442 }
443 memcpy(addr, opcode, len); 435 memcpy(addr, opcode, len);
444 sync_core(); 436 sync_core();
445 /* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline 437 /* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline
446 case. */ 438 case. */
447 if (cpu_has_clflush) 439 if (cpu_has_clflush)
448 asm("clflush (%0) " :: "r" (oaddr) : "memory"); 440 asm("clflush (%0) " :: "r" (addr) : "memory");
449 if (addr != oaddr)
450 vunmap(addr);
451} 441}
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
index 094118ba00da..d8c6f132dc7a 100644
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -92,7 +92,7 @@ config X86_POWERNOW_K8
92config X86_POWERNOW_K8_ACPI 92config X86_POWERNOW_K8_ACPI
93 bool "ACPI Support" 93 bool "ACPI Support"
94 select ACPI_PROCESSOR 94 select ACPI_PROCESSOR
95 depends on X86_POWERNOW_K8 95 depends on ACPI && X86_POWERNOW_K8
96 default y 96 default y
97 help 97 help
98 This provides access to the K8s Processor Performance States via ACPI. 98 This provides access to the K8s Processor Performance States via ACPI.
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index e60cddbc4cfb..3c86b979a40a 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -321,7 +321,7 @@ static int __init request_standard_resources(void)
321 321
322subsys_initcall(request_standard_resources); 322subsys_initcall(request_standard_resources);
323 323
324#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) 324#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION)
325/** 325/**
326 * e820_mark_nosave_regions - Find the ranges of physical addresses that do not 326 * e820_mark_nosave_regions - Find the ranges of physical addresses that do not
327 * correspond to e820 RAM areas and mark the corresponding pages as nosave for 327 * correspond to e820 RAM areas and mark the corresponding pages as nosave for
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index d865d041bea1..09cf78110358 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -82,6 +82,7 @@
82#include <linux/miscdevice.h> 82#include <linux/miscdevice.h>
83#include <linux/spinlock.h> 83#include <linux/spinlock.h>
84#include <linux/mm.h> 84#include <linux/mm.h>
85#include <linux/fs.h>
85#include <linux/mutex.h> 86#include <linux/mutex.h>
86#include <linux/cpu.h> 87#include <linux/cpu.h>
87#include <linux/firmware.h> 88#include <linux/firmware.h>
diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c
index e5dcb9379018..42147304de88 100644
--- a/arch/i386/kernel/sys_i386.c
+++ b/arch/i386/kernel/sys_i386.c
@@ -9,6 +9,7 @@
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/fs.h>
12#include <linux/smp.h> 13#include <linux/smp.h>
13#include <linux/sem.h> 14#include <linux/sem.h>
14#include <linux/msg.h> 15#include <linux/msg.h>
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 6deb159d08e0..4eb2e408764f 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/elf.h> 17#include <linux/elf.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/module.h> 20#include <linux/module.h>
20 21
21#include <asm/cpufeature.h> 22#include <asm/cpufeature.h>
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index c3b9905af2d5..730a5b177b1f 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -432,7 +432,7 @@ static void __init pagetable_init (void)
432 paravirt_pagetable_setup_done(pgd_base); 432 paravirt_pagetable_setup_done(pgd_base);
433} 433}
434 434
435#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) 435#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI)
436/* 436/*
437 * Swap suspend & friends need this for resume because things like the intel-agp 437 * Swap suspend & friends need this for resume because things like the intel-agp
438 * driver might have split up a kernel 4MB mapping. 438 * driver might have split up a kernel 4MB mapping.
@@ -800,9 +800,17 @@ void mark_rodata_ro(void)
800 unsigned long start = PFN_ALIGN(_text); 800 unsigned long start = PFN_ALIGN(_text);
801 unsigned long size = PFN_ALIGN(_etext) - start; 801 unsigned long size = PFN_ALIGN(_etext) - start;
802 802
803 change_page_attr(virt_to_page(start), 803#ifndef CONFIG_KPROBES
804 size >> PAGE_SHIFT, PAGE_KERNEL_RX); 804#ifdef CONFIG_HOTPLUG_CPU
805 printk("Write protecting the kernel text: %luk\n", size >> 10); 805 /* It must still be possible to apply SMP alternatives. */
806 if (num_possible_cpus() <= 1)
807#endif
808 {
809 change_page_attr(virt_to_page(start),
810 size >> PAGE_SHIFT, PAGE_KERNEL_RX);
811 printk("Write protecting the kernel text: %luk\n", size >> 10);
812 }
813#endif
806 start += size; 814 start += size;
807 size = (unsigned long)__end_rodata - start; 815 size = (unsigned long)__end_rodata - start;
808 change_page_attr(virt_to_page(start), 816 change_page_attr(virt_to_page(start),
diff --git a/arch/i386/power/Makefile b/arch/i386/power/Makefile
index 2de7bbf03cd7..d764ec950065 100644
--- a/arch/i386/power/Makefile
+++ b/arch/i386/power/Makefile
@@ -1,2 +1,2 @@
1obj-$(CONFIG_PM) += cpu.o 1obj-$(CONFIG_PM) += cpu.o
2obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o 2obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 36c7b9682aa6..21aa4fc5f8ef 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -425,6 +425,9 @@ config COMPAT
425 depends on IA32_SUPPORT 425 depends on IA32_SUPPORT
426 default y 426 default y
427 427
428config COMPAT_FOR_U64_ALIGNMENT
429 def_bool COMPAT
430
428config IA64_MCA_RECOVERY 431config IA64_MCA_RECOVERY
429 tristate "MCA recovery from errors other than TLB." 432 tristate "MCA recovery from errors other than TLB."
430 433
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index cd4adf52f174..e980e7aa2306 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2015,9 +2015,14 @@ acpi_sba_ioc_add(struct acpi_device *device)
2015 return 0; 2015 return 0;
2016} 2016}
2017 2017
2018static const struct acpi_device_id hp_ioc_iommu_device_ids[] = {
2019 {"HWP0001", 0},
2020 {"HWP0004", 0},
2021 {"", 0},
2022};
2018static struct acpi_driver acpi_sba_ioc_driver = { 2023static struct acpi_driver acpi_sba_ioc_driver = {
2019 .name = "IOC IOMMU Driver", 2024 .name = "IOC IOMMU Driver",
2020 .ids = "HWP0001,HWP0004", 2025 .ids = hp_ioc_iommu_device_ids,
2021 .ops = { 2026 .ops = {
2022 .add = acpi_sba_ioc_add, 2027 .add = acpi_sba_ioc_add,
2023 }, 2028 },
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index decdf6e1e5d0..e62694f8ef75 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -101,7 +101,7 @@ simscsi_interrupt (unsigned long val)
101{ 101{
102 struct scsi_cmnd *sc; 102 struct scsi_cmnd *sc;
103 103
104 while ((sc = queue[rd].sc) != 0) { 104 while ((sc = queue[rd].sc) != NULL) {
105 atomic_dec(&num_reqs); 105 atomic_dec(&num_reqs);
106 queue[rd].sc = NULL; 106 queue[rd].sc = NULL;
107 if (DBG) 107 if (DBG)
diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c
index e13a1a1db4b5..d1d50cd1c38a 100644
--- a/arch/ia64/ia32/ia32_support.c
+++ b/arch/ia64/ia32/ia32_support.c
@@ -249,11 +249,11 @@ ia32_init (void)
249 249
250#if PAGE_SHIFT > IA32_PAGE_SHIFT 250#if PAGE_SHIFT > IA32_PAGE_SHIFT
251 { 251 {
252 extern struct kmem_cache *partial_page_cachep; 252 extern struct kmem_cache *ia64_partial_page_cachep;
253 253
254 partial_page_cachep = kmem_cache_create("partial_page_cache", 254 ia64_partial_page_cachep = kmem_cache_create("ia64_partial_page_cache",
255 sizeof(struct partial_page), 255 sizeof(struct ia64_partial_page),
256 0, SLAB_PANIC, NULL); 256 0, SLAB_PANIC, NULL);
257 } 257 }
258#endif 258#endif
259 return 0; 259 return 0;
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
index cfa0bc0026b5..466bbcb138b2 100644
--- a/arch/ia64/ia32/ia32priv.h
+++ b/arch/ia64/ia32/ia32priv.h
@@ -25,8 +25,8 @@
25 * partially mapped pages provide precise accounting of which 4k sub pages 25 * partially mapped pages provide precise accounting of which 4k sub pages
26 * are mapped and which ones are not, thereby improving IA-32 compatibility. 26 * are mapped and which ones are not, thereby improving IA-32 compatibility.
27 */ 27 */
28struct partial_page { 28struct ia64_partial_page {
29 struct partial_page *next; /* linked list, sorted by address */ 29 struct ia64_partial_page *next; /* linked list, sorted by address */
30 struct rb_node pp_rb; 30 struct rb_node pp_rb;
31 /* 64K is the largest "normal" page supported by ia64 ABI. So 4K*64 31 /* 64K is the largest "normal" page supported by ia64 ABI. So 4K*64
32 * should suffice.*/ 32 * should suffice.*/
@@ -34,17 +34,17 @@ struct partial_page {
34 unsigned int base; 34 unsigned int base;
35}; 35};
36 36
37struct partial_page_list { 37struct ia64_partial_page_list {
38 struct partial_page *pp_head; /* list head, points to the lowest 38 struct ia64_partial_page *pp_head; /* list head, points to the lowest
39 * addressed partial page */ 39 * addressed partial page */
40 struct rb_root ppl_rb; 40 struct rb_root ppl_rb;
41 struct partial_page *pp_hint; /* pp_hint->next is the last 41 struct ia64_partial_page *pp_hint; /* pp_hint->next is the last
42 * accessed partial page */ 42 * accessed partial page */
43 atomic_t pp_count; /* reference count */ 43 atomic_t pp_count; /* reference count */
44}; 44};
45 45
46#if PAGE_SHIFT > IA32_PAGE_SHIFT 46#if PAGE_SHIFT > IA32_PAGE_SHIFT
47struct partial_page_list* ia32_init_pp_list (void); 47struct ia64_partial_page_list* ia32_init_pp_list (void);
48#else 48#else
49# define ia32_init_pp_list() 0 49# define ia32_init_pp_list() 0
50#endif 50#endif
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 0afb4fe7c35b..af10462d44d4 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -253,17 +253,17 @@ mmap_subpage (struct file *file, unsigned long start, unsigned long end, int pro
253 return ret; 253 return ret;
254} 254}
255 255
256/* SLAB cache for partial_page structures */ 256/* SLAB cache for ia64_partial_page structures */
257struct kmem_cache *partial_page_cachep; 257struct kmem_cache *ia64_partial_page_cachep;
258 258
259/* 259/*
260 * init partial_page_list. 260 * init ia64_partial_page_list.
261 * return 0 means kmalloc fail. 261 * return 0 means kmalloc fail.
262 */ 262 */
263struct partial_page_list* 263struct ia64_partial_page_list*
264ia32_init_pp_list(void) 264ia32_init_pp_list(void)
265{ 265{
266 struct partial_page_list *p; 266 struct ia64_partial_page_list *p;
267 267
268 if ((p = kmalloc(sizeof(*p), GFP_KERNEL)) == NULL) 268 if ((p = kmalloc(sizeof(*p), GFP_KERNEL)) == NULL)
269 return p; 269 return p;
@@ -280,12 +280,12 @@ ia32_init_pp_list(void)
280 * Else, return 0 and provide @pprev, @rb_link, @rb_parent to 280 * Else, return 0 and provide @pprev, @rb_link, @rb_parent to
281 * be used by later __ia32_insert_pp(). 281 * be used by later __ia32_insert_pp().
282 */ 282 */
283static struct partial_page * 283static struct ia64_partial_page *
284__ia32_find_pp(struct partial_page_list *ppl, unsigned int start, 284__ia32_find_pp(struct ia64_partial_page_list *ppl, unsigned int start,
285 struct partial_page **pprev, struct rb_node ***rb_link, 285 struct ia64_partial_page **pprev, struct rb_node ***rb_link,
286 struct rb_node **rb_parent) 286 struct rb_node **rb_parent)
287{ 287{
288 struct partial_page *pp; 288 struct ia64_partial_page *pp;
289 struct rb_node **__rb_link, *__rb_parent, *rb_prev; 289 struct rb_node **__rb_link, *__rb_parent, *rb_prev;
290 290
291 pp = ppl->pp_hint; 291 pp = ppl->pp_hint;
@@ -297,7 +297,7 @@ __ia32_find_pp(struct partial_page_list *ppl, unsigned int start,
297 297
298 while (*__rb_link) { 298 while (*__rb_link) {
299 __rb_parent = *__rb_link; 299 __rb_parent = *__rb_link;
300 pp = rb_entry(__rb_parent, struct partial_page, pp_rb); 300 pp = rb_entry(__rb_parent, struct ia64_partial_page, pp_rb);
301 301
302 if (pp->base == start) { 302 if (pp->base == start) {
303 ppl->pp_hint = pp; 303 ppl->pp_hint = pp;
@@ -314,7 +314,7 @@ __ia32_find_pp(struct partial_page_list *ppl, unsigned int start,
314 *rb_parent = __rb_parent; 314 *rb_parent = __rb_parent;
315 *pprev = NULL; 315 *pprev = NULL;
316 if (rb_prev) 316 if (rb_prev)
317 *pprev = rb_entry(rb_prev, struct partial_page, pp_rb); 317 *pprev = rb_entry(rb_prev, struct ia64_partial_page, pp_rb);
318 return NULL; 318 return NULL;
319} 319}
320 320
@@ -322,9 +322,9 @@ __ia32_find_pp(struct partial_page_list *ppl, unsigned int start,
322 * insert @pp into @ppl. 322 * insert @pp into @ppl.
323 */ 323 */
324static void 324static void
325__ia32_insert_pp(struct partial_page_list *ppl, struct partial_page *pp, 325__ia32_insert_pp(struct ia64_partial_page_list *ppl,
326 struct partial_page *prev, struct rb_node **rb_link, 326 struct ia64_partial_page *pp, struct ia64_partial_page *prev,
327 struct rb_node *rb_parent) 327 struct rb_node **rb_link, struct rb_node *rb_parent)
328{ 328{
329 /* link list */ 329 /* link list */
330 if (prev) { 330 if (prev) {
@@ -334,7 +334,7 @@ __ia32_insert_pp(struct partial_page_list *ppl, struct partial_page *pp,
334 ppl->pp_head = pp; 334 ppl->pp_head = pp;
335 if (rb_parent) 335 if (rb_parent)
336 pp->next = rb_entry(rb_parent, 336 pp->next = rb_entry(rb_parent,
337 struct partial_page, pp_rb); 337 struct ia64_partial_page, pp_rb);
338 else 338 else
339 pp->next = NULL; 339 pp->next = NULL;
340 } 340 }
@@ -350,8 +350,8 @@ __ia32_insert_pp(struct partial_page_list *ppl, struct partial_page *pp,
350 * delete @pp from partial page list @ppl. 350 * delete @pp from partial page list @ppl.
351 */ 351 */
352static void 352static void
353__ia32_delete_pp(struct partial_page_list *ppl, struct partial_page *pp, 353__ia32_delete_pp(struct ia64_partial_page_list *ppl,
354 struct partial_page *prev) 354 struct ia64_partial_page *pp, struct ia64_partial_page *prev)
355{ 355{
356 if (prev) { 356 if (prev) {
357 prev->next = pp->next; 357 prev->next = pp->next;
@@ -363,15 +363,15 @@ __ia32_delete_pp(struct partial_page_list *ppl, struct partial_page *pp,
363 ppl->pp_hint = pp->next; 363 ppl->pp_hint = pp->next;
364 } 364 }
365 rb_erase(&pp->pp_rb, &ppl->ppl_rb); 365 rb_erase(&pp->pp_rb, &ppl->ppl_rb);
366 kmem_cache_free(partial_page_cachep, pp); 366 kmem_cache_free(ia64_partial_page_cachep, pp);
367} 367}
368 368
369static struct partial_page * 369static struct ia64_partial_page *
370__pp_prev(struct partial_page *pp) 370__pp_prev(struct ia64_partial_page *pp)
371{ 371{
372 struct rb_node *prev = rb_prev(&pp->pp_rb); 372 struct rb_node *prev = rb_prev(&pp->pp_rb);
373 if (prev) 373 if (prev)
374 return rb_entry(prev, struct partial_page, pp_rb); 374 return rb_entry(prev, struct ia64_partial_page, pp_rb);
375 else 375 else
376 return NULL; 376 return NULL;
377} 377}
@@ -383,7 +383,7 @@ __pp_prev(struct partial_page *pp)
383static void 383static void
384__ia32_delete_pp_range(unsigned int start, unsigned int end) 384__ia32_delete_pp_range(unsigned int start, unsigned int end)
385{ 385{
386 struct partial_page *pp, *prev; 386 struct ia64_partial_page *pp, *prev;
387 struct rb_node **rb_link, *rb_parent; 387 struct rb_node **rb_link, *rb_parent;
388 388
389 if (start >= end) 389 if (start >= end)
@@ -401,7 +401,7 @@ __ia32_delete_pp_range(unsigned int start, unsigned int end)
401 } 401 }
402 402
403 while (pp && pp->base < end) { 403 while (pp && pp->base < end) {
404 struct partial_page *tmp = pp->next; 404 struct ia64_partial_page *tmp = pp->next;
405 __ia32_delete_pp(current->thread.ppl, pp, prev); 405 __ia32_delete_pp(current->thread.ppl, pp, prev);
406 pp = tmp; 406 pp = tmp;
407 } 407 }
@@ -414,7 +414,7 @@ __ia32_delete_pp_range(unsigned int start, unsigned int end)
414static int 414static int
415__ia32_set_pp(unsigned int start, unsigned int end, int flags) 415__ia32_set_pp(unsigned int start, unsigned int end, int flags)
416{ 416{
417 struct partial_page *pp, *prev; 417 struct ia64_partial_page *pp, *prev;
418 struct rb_node ** rb_link, *rb_parent; 418 struct rb_node ** rb_link, *rb_parent;
419 unsigned int pstart, start_bit, end_bit, i; 419 unsigned int pstart, start_bit, end_bit, i;
420 420
@@ -450,8 +450,8 @@ __ia32_set_pp(unsigned int start, unsigned int end, int flags)
450 return 0; 450 return 0;
451 } 451 }
452 452
453 /* new a partial_page */ 453 /* new a ia64_partial_page */
454 pp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL); 454 pp = kmem_cache_alloc(ia64_partial_page_cachep, GFP_KERNEL);
455 if (!pp) 455 if (!pp)
456 return -ENOMEM; 456 return -ENOMEM;
457 pp->base = pstart; 457 pp->base = pstart;
@@ -504,7 +504,7 @@ ia32_set_pp(unsigned int start, unsigned int end, int flags)
504static int 504static int
505__ia32_unset_pp(unsigned int start, unsigned int end) 505__ia32_unset_pp(unsigned int start, unsigned int end)
506{ 506{
507 struct partial_page *pp, *prev; 507 struct ia64_partial_page *pp, *prev;
508 struct rb_node ** rb_link, *rb_parent; 508 struct rb_node ** rb_link, *rb_parent;
509 unsigned int pstart, start_bit, end_bit, i; 509 unsigned int pstart, start_bit, end_bit, i;
510 struct vm_area_struct *vma; 510 struct vm_area_struct *vma;
@@ -532,8 +532,8 @@ __ia32_unset_pp(unsigned int start, unsigned int end)
532 return -ENOMEM; 532 return -ENOMEM;
533 } 533 }
534 534
535 /* new a partial_page */ 535 /* new a ia64_partial_page */
536 pp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL); 536 pp = kmem_cache_alloc(ia64_partial_page_cachep, GFP_KERNEL);
537 if (!pp) 537 if (!pp)
538 return -ENOMEM; 538 return -ENOMEM;
539 pp->base = pstart; 539 pp->base = pstart;
@@ -605,7 +605,7 @@ ia32_unset_pp(unsigned int *startp, unsigned int *endp)
605static int 605static int
606__ia32_compare_pp(unsigned int start, unsigned int end) 606__ia32_compare_pp(unsigned int start, unsigned int end)
607{ 607{
608 struct partial_page *pp, *prev; 608 struct ia64_partial_page *pp, *prev;
609 struct rb_node ** rb_link, *rb_parent; 609 struct rb_node ** rb_link, *rb_parent;
610 unsigned int pstart, start_bit, end_bit, size; 610 unsigned int pstart, start_bit, end_bit, size;
611 unsigned int first_bit, next_zero_bit; /* the first range in bitmap */ 611 unsigned int first_bit, next_zero_bit; /* the first range in bitmap */
@@ -682,13 +682,13 @@ ia32_compare_pp(unsigned int *startp, unsigned int *endp)
682} 682}
683 683
684static void 684static void
685__ia32_drop_pp_list(struct partial_page_list *ppl) 685__ia32_drop_pp_list(struct ia64_partial_page_list *ppl)
686{ 686{
687 struct partial_page *pp = ppl->pp_head; 687 struct ia64_partial_page *pp = ppl->pp_head;
688 688
689 while (pp) { 689 while (pp) {
690 struct partial_page *next = pp->next; 690 struct ia64_partial_page *next = pp->next;
691 kmem_cache_free(partial_page_cachep, pp); 691 kmem_cache_free(ia64_partial_page_cachep, pp);
692 pp = next; 692 pp = next;
693 } 693 }
694 694
@@ -696,9 +696,9 @@ __ia32_drop_pp_list(struct partial_page_list *ppl)
696} 696}
697 697
698void 698void
699ia32_drop_partial_page_list(struct task_struct *task) 699ia32_drop_ia64_partial_page_list(struct task_struct *task)
700{ 700{
701 struct partial_page_list* ppl = task->thread.ppl; 701 struct ia64_partial_page_list* ppl = task->thread.ppl;
702 702
703 if (ppl && atomic_dec_and_test(&ppl->pp_count)) 703 if (ppl && atomic_dec_and_test(&ppl->pp_count))
704 __ia32_drop_pp_list(ppl); 704 __ia32_drop_pp_list(ppl);
@@ -708,9 +708,9 @@ ia32_drop_partial_page_list(struct task_struct *task)
708 * Copy current->thread.ppl to ppl (already initialized). 708 * Copy current->thread.ppl to ppl (already initialized).
709 */ 709 */
710static int 710static int
711__ia32_copy_pp_list(struct partial_page_list *ppl) 711__ia32_copy_pp_list(struct ia64_partial_page_list *ppl)
712{ 712{
713 struct partial_page *pp, *tmp, *prev; 713 struct ia64_partial_page *pp, *tmp, *prev;
714 struct rb_node **rb_link, *rb_parent; 714 struct rb_node **rb_link, *rb_parent;
715 715
716 ppl->pp_head = NULL; 716 ppl->pp_head = NULL;
@@ -721,7 +721,7 @@ __ia32_copy_pp_list(struct partial_page_list *ppl)
721 prev = NULL; 721 prev = NULL;
722 722
723 for (pp = current->thread.ppl->pp_head; pp; pp = pp->next) { 723 for (pp = current->thread.ppl->pp_head; pp; pp = pp->next) {
724 tmp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL); 724 tmp = kmem_cache_alloc(ia64_partial_page_cachep, GFP_KERNEL);
725 if (!tmp) 725 if (!tmp)
726 return -ENOMEM; 726 return -ENOMEM;
727 *tmp = *pp; 727 *tmp = *pp;
@@ -734,7 +734,8 @@ __ia32_copy_pp_list(struct partial_page_list *ppl)
734} 734}
735 735
736int 736int
737ia32_copy_partial_page_list(struct task_struct *p, unsigned long clone_flags) 737ia32_copy_ia64_partial_page_list(struct task_struct *p,
738 unsigned long clone_flags)
738{ 739{
739 int retval = 0; 740 int retval = 0;
740 741
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 103dd8edda71..3d45d24a9d61 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -67,6 +67,8 @@ EXPORT_SYMBOL(pm_power_off);
67unsigned int acpi_cpei_override; 67unsigned int acpi_cpei_override;
68unsigned int acpi_cpei_phys_cpuid; 68unsigned int acpi_cpei_phys_cpuid;
69 69
70unsigned long acpi_wakeup_address = 0;
71
70const char __init * 72const char __init *
71acpi_get_sysname(void) 73acpi_get_sysname(void)
72{ 74{
@@ -739,16 +741,15 @@ int __init acpi_boot_init(void)
739 741
740int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) 742int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
741{ 743{
742 int vector; 744 int tmp;
743 745
744 if (has_8259 && gsi < 16) 746 if (has_8259 && gsi < 16)
745 *irq = isa_irq_to_vector(gsi); 747 *irq = isa_irq_to_vector(gsi);
746 else { 748 else {
747 vector = gsi_to_vector(gsi); 749 tmp = gsi_to_irq(gsi);
748 if (vector == -1) 750 if (tmp == -1)
749 return -1; 751 return -1;
750 752 *irq = tmp;
751 *irq = vector;
752 } 753 }
753 return 0; 754 return 0;
754} 755}
@@ -986,4 +987,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
986 987
987EXPORT_SYMBOL(acpi_unregister_ioapic); 988EXPORT_SYMBOL(acpi_unregister_ioapic);
988 989
990/*
991 * acpi_save_state_mem() - save kernel state
992 *
993 * TBD when when IA64 starts to support suspend...
994 */
995int acpi_save_state_mem(void) { return 0; }
996
997/*
998 * acpi_restore_state()
999 */
1000void acpi_restore_state_mem(void) {}
1001
1002/*
1003 * do_suspend_lowlevel()
1004 */
1005void do_suspend_lowlevel(void) {}
1006
989#endif /* CONFIG_ACPI */ 1007#endif /* CONFIG_ACPI */
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index 2fd96d9062a1..790ef0d87e12 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -38,11 +38,11 @@ static struct clocksource clocksource_cyclone = {
38 38
39int __init init_cyclone_clock(void) 39int __init init_cyclone_clock(void)
40{ 40{
41 u64* reg; 41 u64 __iomem *reg;
42 u64 base; /* saved cyclone base address */ 42 u64 base; /* saved cyclone base address */
43 u64 offset; /* offset from pageaddr to cyclone_timer register */ 43 u64 offset; /* offset from pageaddr to cyclone_timer register */
44 int i; 44 int i;
45 u32* volatile cyclone_timer; /* Cyclone MPMC0 register */ 45 u32 __iomem *cyclone_timer; /* Cyclone MPMC0 register */
46 46
47 if (!use_cyclone) 47 if (!use_cyclone)
48 return 0; 48 return 0;
@@ -51,7 +51,7 @@ int __init init_cyclone_clock(void)
51 51
52 /* find base address */ 52 /* find base address */
53 offset = (CYCLONE_CBAR_ADDR); 53 offset = (CYCLONE_CBAR_ADDR);
54 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 54 reg = ioremap_nocache(offset, sizeof(u64));
55 if(!reg){ 55 if(!reg){
56 printk(KERN_ERR "Summit chipset: Could not find valid CBAR" 56 printk(KERN_ERR "Summit chipset: Could not find valid CBAR"
57 " register.\n"); 57 " register.\n");
@@ -69,7 +69,7 @@ int __init init_cyclone_clock(void)
69 69
70 /* setup PMCC */ 70 /* setup PMCC */
71 offset = (base + CYCLONE_PMCC_OFFSET); 71 offset = (base + CYCLONE_PMCC_OFFSET);
72 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 72 reg = ioremap_nocache(offset, sizeof(u64));
73 if(!reg){ 73 if(!reg){
74 printk(KERN_ERR "Summit chipset: Could not find valid PMCC" 74 printk(KERN_ERR "Summit chipset: Could not find valid PMCC"
75 " register.\n"); 75 " register.\n");
@@ -81,7 +81,7 @@ int __init init_cyclone_clock(void)
81 81
82 /* setup MPCS */ 82 /* setup MPCS */
83 offset = (base + CYCLONE_MPCS_OFFSET); 83 offset = (base + CYCLONE_MPCS_OFFSET);
84 reg = (u64*)ioremap_nocache(offset, sizeof(u64)); 84 reg = ioremap_nocache(offset, sizeof(u64));
85 if(!reg){ 85 if(!reg){
86 printk(KERN_ERR "Summit chipset: Could not find valid MPCS" 86 printk(KERN_ERR "Summit chipset: Could not find valid MPCS"
87 " register.\n"); 87 " register.\n");
@@ -93,7 +93,7 @@ int __init init_cyclone_clock(void)
93 93
94 /* map in cyclone_timer */ 94 /* map in cyclone_timer */
95 offset = (base + CYCLONE_MPMC_OFFSET); 95 offset = (base + CYCLONE_MPMC_OFFSET);
96 cyclone_timer = (u32*)ioremap_nocache(offset, sizeof(u32)); 96 cyclone_timer = ioremap_nocache(offset, sizeof(u32));
97 if(!cyclone_timer){ 97 if(!cyclone_timer){
98 printk(KERN_ERR "Summit chipset: Could not find valid MPMC" 98 printk(KERN_ERR "Summit chipset: Could not find valid MPMC"
99 " register.\n"); 99 " register.\n");
@@ -110,7 +110,7 @@ int __init init_cyclone_clock(void)
110 printk(KERN_ERR "Summit chipset: Counter not counting!" 110 printk(KERN_ERR "Summit chipset: Counter not counting!"
111 " DISABLED\n"); 111 " DISABLED\n");
112 iounmap(cyclone_timer); 112 iounmap(cyclone_timer);
113 cyclone_timer = 0; 113 cyclone_timer = NULL;
114 use_cyclone = 0; 114 use_cyclone = 0;
115 return -ENODEV; 115 return -ENODEV;
116 } 116 }
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 44d540efa6d1..4e5e27540e27 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -178,7 +178,7 @@ swapper_pg_dir:
178halt_msg: 178halt_msg:
179 stringz "Halting kernel\n" 179 stringz "Halting kernel\n"
180 180
181 .text 181 .section .text.head,"ax"
182 182
183 .global start_ap 183 .global start_ap
184 184
@@ -392,6 +392,8 @@ self: hint @pause
392 br.sptk.many self // endless loop 392 br.sptk.many self // endless loop
393END(_start) 393END(_start)
394 394
395 .text
396
395GLOBAL_ENTRY(ia64_save_debug_regs) 397GLOBAL_ENTRY(ia64_save_debug_regs)
396 alloc r16=ar.pfs,1,0,0,0 398 alloc r16=ar.pfs,1,0,0,0
397 mov r20=ar.lc // preserve ar.lc 399 mov r20=ar.lc // preserve ar.lc
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
index b69c397ed1bf..bc8efcad28b8 100644
--- a/arch/ia64/kernel/init_task.c
+++ b/arch/ia64/kernel/init_task.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/fs.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <linux/init_task.h> 14#include <linux/init_task.h>
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 91797c111162..9386b955eed1 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -85,8 +85,8 @@ DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
85 [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR 85 [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR
86}; 86};
87 87
88static cpumask_t vector_table[IA64_MAX_DEVICE_VECTORS] = { 88static cpumask_t vector_table[IA64_NUM_VECTORS] = {
89 [0 ... IA64_MAX_DEVICE_VECTORS - 1] = CPU_MASK_NONE 89 [0 ... IA64_NUM_VECTORS - 1] = CPU_MASK_NONE
90}; 90};
91 91
92static int irq_status[NR_IRQS] = { 92static int irq_status[NR_IRQS] = {
@@ -123,17 +123,18 @@ static inline int find_unassigned_irq(void)
123static inline int find_unassigned_vector(cpumask_t domain) 123static inline int find_unassigned_vector(cpumask_t domain)
124{ 124{
125 cpumask_t mask; 125 cpumask_t mask;
126 int pos; 126 int pos, vector;
127 127
128 cpus_and(mask, domain, cpu_online_map); 128 cpus_and(mask, domain, cpu_online_map);
129 if (cpus_empty(mask)) 129 if (cpus_empty(mask))
130 return -EINVAL; 130 return -EINVAL;
131 131
132 for (pos = 0; pos < IA64_NUM_DEVICE_VECTORS; pos++) { 132 for (pos = 0; pos < IA64_NUM_DEVICE_VECTORS; pos++) {
133 cpus_and(mask, domain, vector_table[pos]); 133 vector = IA64_FIRST_DEVICE_VECTOR + pos;
134 cpus_and(mask, domain, vector_table[vector]);
134 if (!cpus_empty(mask)) 135 if (!cpus_empty(mask))
135 continue; 136 continue;
136 return IA64_FIRST_DEVICE_VECTOR + pos; 137 return vector;
137 } 138 }
138 return -ENOSPC; 139 return -ENOSPC;
139} 140}
@@ -141,9 +142,12 @@ static inline int find_unassigned_vector(cpumask_t domain)
141static int __bind_irq_vector(int irq, int vector, cpumask_t domain) 142static int __bind_irq_vector(int irq, int vector, cpumask_t domain)
142{ 143{
143 cpumask_t mask; 144 cpumask_t mask;
144 int cpu, pos; 145 int cpu;
145 struct irq_cfg *cfg = &irq_cfg[irq]; 146 struct irq_cfg *cfg = &irq_cfg[irq];
146 147
148 BUG_ON((unsigned)irq >= NR_IRQS);
149 BUG_ON((unsigned)vector >= IA64_NUM_VECTORS);
150
147 cpus_and(mask, domain, cpu_online_map); 151 cpus_and(mask, domain, cpu_online_map);
148 if (cpus_empty(mask)) 152 if (cpus_empty(mask))
149 return -EINVAL; 153 return -EINVAL;
@@ -156,8 +160,7 @@ static int __bind_irq_vector(int irq, int vector, cpumask_t domain)
156 cfg->vector = vector; 160 cfg->vector = vector;
157 cfg->domain = domain; 161 cfg->domain = domain;
158 irq_status[irq] = IRQ_USED; 162 irq_status[irq] = IRQ_USED;
159 pos = vector - IA64_FIRST_DEVICE_VECTOR; 163 cpus_or(vector_table[vector], vector_table[vector], domain);
160 cpus_or(vector_table[pos], vector_table[pos], domain);
161 return 0; 164 return 0;
162} 165}
163 166
@@ -174,7 +177,7 @@ int bind_irq_vector(int irq, int vector, cpumask_t domain)
174 177
175static void __clear_irq_vector(int irq) 178static void __clear_irq_vector(int irq)
176{ 179{
177 int vector, cpu, pos; 180 int vector, cpu;
178 cpumask_t mask; 181 cpumask_t mask;
179 cpumask_t domain; 182 cpumask_t domain;
180 struct irq_cfg *cfg = &irq_cfg[irq]; 183 struct irq_cfg *cfg = &irq_cfg[irq];
@@ -189,8 +192,7 @@ static void __clear_irq_vector(int irq)
189 cfg->vector = IRQ_VECTOR_UNASSIGNED; 192 cfg->vector = IRQ_VECTOR_UNASSIGNED;
190 cfg->domain = CPU_MASK_NONE; 193 cfg->domain = CPU_MASK_NONE;
191 irq_status[irq] = IRQ_UNUSED; 194 irq_status[irq] = IRQ_UNUSED;
192 pos = vector - IA64_FIRST_DEVICE_VECTOR; 195 cpus_andnot(vector_table[vector], vector_table[vector], domain);
193 cpus_andnot(vector_table[pos], vector_table[pos], domain);
194} 196}
195 197
196static void clear_irq_vector(int irq) 198static void clear_irq_vector(int irq)
@@ -212,9 +214,6 @@ assign_irq_vector (int irq)
212 vector = -ENOSPC; 214 vector = -ENOSPC;
213 215
214 spin_lock_irqsave(&vector_lock, flags); 216 spin_lock_irqsave(&vector_lock, flags);
215 if (irq < 0) {
216 goto out;
217 }
218 for_each_online_cpu(cpu) { 217 for_each_online_cpu(cpu) {
219 domain = vector_allocation_domain(cpu); 218 domain = vector_allocation_domain(cpu);
220 vector = find_unassigned_vector(domain); 219 vector = find_unassigned_vector(domain);
@@ -223,6 +222,8 @@ assign_irq_vector (int irq)
223 } 222 }
224 if (vector < 0) 223 if (vector < 0)
225 goto out; 224 goto out;
225 if (irq == AUTO_ASSIGN)
226 irq = vector;
226 BUG_ON(__bind_irq_vector(irq, vector, domain)); 227 BUG_ON(__bind_irq_vector(irq, vector, domain));
227 out: 228 out:
228 spin_unlock_irqrestore(&vector_lock, flags); 229 spin_unlock_irqrestore(&vector_lock, flags);
@@ -288,7 +289,7 @@ static int __init parse_vector_domain(char *arg)
288 vector_domain_type = VECTOR_DOMAIN_PERCPU; 289 vector_domain_type = VECTOR_DOMAIN_PERCPU;
289 no_int_routing = 1; 290 no_int_routing = 1;
290 } 291 }
291 return 1; 292 return 0;
292} 293}
293early_param("vector", parse_vector_domain); 294early_param("vector", parse_vector_domain);
294#else 295#else
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index 13df337508e7..7ccb228ceedc 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -13,14 +13,6 @@
13struct ia64_machine_vector ia64_mv; 13struct ia64_machine_vector ia64_mv;
14EXPORT_SYMBOL(ia64_mv); 14EXPORT_SYMBOL(ia64_mv);
15 15
16static __initdata const char *mvec_name;
17static __init int setup_mvec(char *s)
18{
19 mvec_name = s;
20 return 0;
21}
22early_param("machvec", setup_mvec);
23
24static struct ia64_machine_vector * __init 16static struct ia64_machine_vector * __init
25lookup_machvec (const char *name) 17lookup_machvec (const char *name)
26{ 18{
@@ -41,7 +33,7 @@ machvec_init (const char *name)
41 struct ia64_machine_vector *mv; 33 struct ia64_machine_vector *mv;
42 34
43 if (!name) 35 if (!name)
44 name = mvec_name ? mvec_name : acpi_get_sysname(); 36 name = acpi_get_sysname();
45 mv = lookup_machvec(name); 37 mv = lookup_machvec(name);
46 if (!mv) 38 if (!mv)
47 panic("generic kernel failed to find machine vector for" 39 panic("generic kernel failed to find machine vector for"
@@ -51,6 +43,23 @@ machvec_init (const char *name)
51 printk(KERN_INFO "booting generic kernel on platform %s\n", name); 43 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
52} 44}
53 45
46void __init
47machvec_init_from_cmdline(const char *cmdline)
48{
49 char str[64];
50 const char *start;
51 char *end;
52
53 if (! (start = strstr(cmdline, "machvec=")) )
54 return machvec_init(NULL);
55
56 strlcpy(str, start + strlen("machvec="), sizeof(str));
57 if ( (end = strchr(str, ' ')) )
58 *end = '\0';
59
60 return machvec_init(str);
61}
62
54#endif /* CONFIG_IA64_GENERIC */ 63#endif /* CONFIG_IA64_GENERIC */
55 64
56void 65void
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index fa40cba43350..4158906c45aa 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -499,7 +499,8 @@ copy_thread (int nr, unsigned long clone_flags,
499 499
500 /* Copy partially mapped page list */ 500 /* Copy partially mapped page list */
501 if (!retval) 501 if (!retval)
502 retval = ia32_copy_partial_page_list(p, clone_flags); 502 retval = ia32_copy_ia64_partial_page_list(p,
503 clone_flags);
503 } 504 }
504#endif 505#endif
505 506
@@ -728,7 +729,7 @@ flush_thread (void)
728 ia64_drop_fpu(current); 729 ia64_drop_fpu(current);
729#ifdef CONFIG_IA32_SUPPORT 730#ifdef CONFIG_IA32_SUPPORT
730 if (IS_IA32_PROCESS(task_pt_regs(current))) { 731 if (IS_IA32_PROCESS(task_pt_regs(current))) {
731 ia32_drop_partial_page_list(current); 732 ia32_drop_ia64_partial_page_list(current);
732 current->thread.task_size = IA32_PAGE_OFFSET; 733 current->thread.task_size = IA32_PAGE_OFFSET;
733 set_fs(USER_DS); 734 set_fs(USER_DS);
734 } 735 }
@@ -754,7 +755,7 @@ exit_thread (void)
754 pfm_release_debug_registers(current); 755 pfm_release_debug_registers(current);
755#endif 756#endif
756 if (IS_IA32_PROCESS(task_pt_regs(current))) 757 if (IS_IA32_PROCESS(task_pt_regs(current)))
757 ia32_drop_partial_page_list(current); 758 ia32_drop_ia64_partial_page_list(current);
758} 759}
759 760
760unsigned long 761unsigned long
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index cf06fe799041..7cecd2964200 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -491,12 +491,17 @@ setup_arch (char **cmdline_p)
491 efi_init(); 491 efi_init();
492 io_port_init(); 492 io_port_init();
493 493
494 parse_early_param();
495
496#ifdef CONFIG_IA64_GENERIC 494#ifdef CONFIG_IA64_GENERIC
497 machvec_init(NULL); 495 /* machvec needs to be parsed from the command line
496 * before parse_early_param() is called to ensure
497 * that ia64_mv is initialised before any command line
498 * settings may cause console setup to occur
499 */
500 machvec_init_from_cmdline(*cmdline_p);
498#endif 501#endif
499 502
503 parse_early_param();
504
500 if (early_console_setup(*cmdline_p) == 0) 505 if (early_console_setup(*cmdline_p) == 0)
501 mark_bsp_online(); 506 mark_bsp_online();
502 507
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 9f72838db26e..0982882bfb80 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -468,7 +468,7 @@ smp_send_stop (void)
468 send_IPI_allbutself(IPI_CPU_STOP); 468 send_IPI_allbutself(IPI_CPU_STOP);
469} 469}
470 470
471int __init 471int
472setup_profiling_timer (unsigned int multiplier) 472setup_profiling_timer (unsigned int multiplier)
473{ 473{
474 return -EINVAL; 474 return -EINVAL;
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 9f5c90b594b9..62209dcf06d3 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -487,7 +487,7 @@ struct create_idle {
487 int cpu; 487 int cpu;
488}; 488};
489 489
490void 490void __cpuinit
491do_fork_idle(struct work_struct *work) 491do_fork_idle(struct work_struct *work)
492{ 492{
493 struct create_idle *c_idle = 493 struct create_idle *c_idle =
@@ -497,7 +497,7 @@ do_fork_idle(struct work_struct *work)
497 complete(&c_idle->done); 497 complete(&c_idle->done);
498} 498}
499 499
500static int __devinit 500static int __cpuinit
501do_boot_cpu (int sapicid, int cpu) 501do_boot_cpu (int sapicid, int cpu)
502{ 502{
503 int timeout; 503 int timeout;
@@ -808,7 +808,7 @@ set_cpu_sibling_map(int cpu)
808 } 808 }
809} 809}
810 810
811int __devinit 811int __cpuinit
812__cpu_up (unsigned int cpu) 812__cpu_up (unsigned int cpu)
813{ 813{
814 int ret; 814 int ret;
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 627785c48ea9..6c0e9e2e1b82 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -52,7 +52,7 @@ static struct clocksource clocksource_itc = {
52 .name = "itc", 52 .name = "itc",
53 .rating = 350, 53 .rating = 350,
54 .read = itc_get_cycles, 54 .read = itc_get_cycles,
55 .mask = 0xffffffffffffffff, 55 .mask = CLOCKSOURCE_MASK(64),
56 .mult = 0, /*to be caluclated*/ 56 .mult = 0, /*to be caluclated*/
57 .shift = 16, 57 .shift = 16,
58 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 58 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
@@ -255,7 +255,7 @@ ia64_init_itm (void)
255 } 255 }
256} 256}
257 257
258static cycle_t itc_get_cycles() 258static cycle_t itc_get_cycles(void)
259{ 259{
260 u64 lcycle, now, ret; 260 u64 lcycle, now, ret;
261 261
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 860f251d2fc2..83e80677de70 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -50,6 +50,8 @@ SECTIONS
50 KPROBES_TEXT 50 KPROBES_TEXT
51 *(.gnu.linkonce.t*) 51 *(.gnu.linkonce.t*)
52 } 52 }
53 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
54 { *(.text.head) }
53 .text2 : AT(ADDR(.text2) - LOAD_OFFSET) 55 .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
54 { *(.text2) } 56 { *(.text2) }
55#ifdef CONFIG_SMP 57#ifdef CONFIG_SMP
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 07d0e92742c8..488e48a5deea 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -581,7 +581,7 @@ pcibios_align_resource (void *data, struct resource *res,
581/* 581/*
582 * PCI BIOS setup, always defaults to SAL interface 582 * PCI BIOS setup, always defaults to SAL interface
583 */ 583 */
584char * __init 584char * __devinit
585pcibios_setup (char *str) 585pcibios_setup (char *str)
586{ 586{
587 return str; 587 return str;
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
index 6b2d77da0683..fe73c9ec611f 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/kernel/setup_mappi.c
@@ -45,7 +45,8 @@ static void mask_and_ack_mappi(unsigned int irq)
45 45
46static void end_mappi_irq(unsigned int irq) 46static void end_mappi_irq(unsigned int irq)
47{ 47{
48 enable_mappi_irq(irq); 48 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
49 enable_mappi_irq(irq);
49} 50}
50 51
51static unsigned int startup_mappi_irq(unsigned int irq) 52static unsigned int startup_mappi_irq(unsigned int irq)
@@ -88,7 +89,7 @@ void __init init_IRQ(void)
88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 89 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
89 irq_desc[M32R_IRQ_INT0].action = NULL; 90 irq_desc[M32R_IRQ_INT0].action = NULL;
90 irq_desc[M32R_IRQ_INT0].depth = 1; 91 irq_desc[M32R_IRQ_INT0].depth = 1;
91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 92 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
92 disable_mappi_irq(M32R_IRQ_INT0); 93 disable_mappi_irq(M32R_IRQ_INT0);
93#endif /* CONFIG_M32R_NE2000 */ 94#endif /* CONFIG_M32R_NE2000 */
94 95
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 99fc1226f7f8..3ee918695215 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -15,6 +15,7 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/fs.h>
18#include <linux/smp.h> 19#include <linux/smp.h>
19#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
20#include <linux/stddef.h> 21#include <linux/stddef.h>
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 90238a8c9e14..36d78cf1a7bc 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/fs.h>
13#include <linux/smp.h> 14#include <linux/smp.h>
14#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
15#include <linux/sem.h> 16#include <linux/sem.h>
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 1175ceff8b2a..185906b54cb0 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -216,6 +216,18 @@ config XCOPILOT_BUGS
216 help 216 help
217 Support the bugs of Xcopilot. 217 Support the bugs of Xcopilot.
218 218
219config UC5272
220 bool 'Arcturus Networks uC5272 dimm board support'
221 depends on M5272
222 help
223 Support for the Arcturus Networks uC5272 dimm board.
224
225config UC5282
226 bool "Arcturus Networks uC5282 board support"
227 depends on M528x
228 help
229 Support for the Arcturus Networks uC5282 dimm board.
230
219config UCSIMM 231config UCSIMM
220 bool "uCsimm module support" 232 bool "uCsimm module support"
221 depends on M68EZ328 233 depends on M68EZ328
@@ -342,6 +354,18 @@ config SOM5282EM
342 depends on M528x 354 depends on M528x
343 help 355 help
344 Support for the EMAC.Inc SOM5282EM module. 356 Support for the EMAC.Inc SOM5282EM module.
357
358config WILDFIRE
359 bool "Intec Automation Inc. WildFire board support"
360 depends on M528x
361 help
362 Support for the Intec Automation Inc. WildFire.
363
364config WILDFIREMOD
365 bool "Intec Automation Inc. WildFire module support"
366 depends on M528x
367 help
368 Support for the Intec Automation Inc. WildFire module.
345 369
346config ARN5307 370config ARN5307
347 bool "Arnewsh 5307 board support" 371 bool "Arnewsh 5307 board support"
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 8951793fd8d4..1305cc980023 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -26,6 +26,8 @@ platform-$(CONFIG_M5407) := 5407
26PLATFORM := $(platform-y) 26PLATFORM := $(platform-y)
27 27
28board-$(CONFIG_PILOT) := pilot 28board-$(CONFIG_PILOT) := pilot
29board-$(CONFIG_UC5272) := UC5272
30board-$(CONFIG_UC5282) := UC5282
29board-$(CONFIG_UCSIMM) := ucsimm 31board-$(CONFIG_UCSIMM) := ucsimm
30board-$(CONFIG_UCDIMM) := ucdimm 32board-$(CONFIG_UCDIMM) := ucdimm
31board-$(CONFIG_UCQUICC) := uCquicc 33board-$(CONFIG_UCQUICC) := uCquicc
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c
index 0a25874a2aae..e10eafc52789 100644
--- a/arch/m68knommu/kernel/dma.c
+++ b/arch/m68knommu/kernel/dma.c
@@ -8,6 +8,7 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/device.h>
11#include <asm/io.h> 12#include <asm/io.h>
12 13
13void *dma_alloc_coherent(struct device *dev, size_t size, 14void *dma_alloc_coherent(struct device *dev, size_t size,
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 2203f694f26b..3f86ade3a22a 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -42,8 +42,6 @@ EXPORT_SYMBOL(memory_end);
42 42
43char __initdata command_line[COMMAND_LINE_SIZE]; 43char __initdata command_line[COMMAND_LINE_SIZE];
44 44
45void (*mach_trap_init)(void);
46
47/* machine dependent timer functions */ 45/* machine dependent timer functions */
48void (*mach_sched_init)(irq_handler_t handler); 46void (*mach_sched_init)(irq_handler_t handler);
49void (*mach_tick)(void); 47void (*mach_tick)(void);
@@ -132,6 +130,11 @@ void setup_arch(char **cmdline_p)
132 130
133 config_BSP(&command_line[0], sizeof(command_line)); 131 config_BSP(&command_line[0], sizeof(command_line));
134 132
133#if defined(CONFIG_BOOTPARAM)
134 strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
135 command_line[sizeof(command_line) - 1] = 0;
136#endif
137
135 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); 138 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
136 139
137#ifdef CONFIG_UCDIMM 140#ifdef CONFIG_UCDIMM
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index 3343830aad10..d0f2dc5cb5a1 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -28,7 +28,6 @@
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void);
32void coldfire_reset(void); 31void coldfire_reset(void);
33 32
34/***************************************************************************/ 33/***************************************************************************/
@@ -98,18 +97,9 @@ int mcf_timerirqpending(int timer)
98void config_BSP(char *commandp, int size) 97void config_BSP(char *commandp, int size)
99{ 98{
100 mcf_setimr(MCFSIM_IMR_MASKALL); 99 mcf_setimr(MCFSIM_IMR_MASKALL);
101
102#if defined(CONFIG_BOOTPARAM)
103 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
104 commandp[size-1] = 0;
105#else
106 memset(commandp, 0, size);
107#endif
108
109 mach_sched_init = coldfire_timer_init; 100 mach_sched_init = coldfire_timer_init;
110 mach_tick = coldfire_tick; 101 mach_tick = coldfire_tick;
111 mach_gettimeoffset = coldfire_timer_offset; 102 mach_gettimeoffset = coldfire_timer_offset;
112 mach_trap_init = coldfire_trap_init;
113 mach_reset = coldfire_reset; 103 mach_reset = coldfire_reset;
114} 104}
115 105
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 0f67320b4031..4ab614f1ecda 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -27,7 +27,6 @@
27void coldfire_tick(void); 27void coldfire_tick(void);
28void coldfire_timer_init(irq_handler_t handler); 28void coldfire_timer_init(irq_handler_t handler);
29unsigned long coldfire_timer_offset(void); 29unsigned long coldfire_timer_offset(void);
30void coldfire_trap_init(void);
31void coldfire_reset(void); 30void coldfire_reset(void);
32 31
33/***************************************************************************/ 32/***************************************************************************/
@@ -98,21 +97,15 @@ void config_BSP(char *commandp, int size)
98{ 97{
99 mcf_setimr(MCFSIM_IMR_MASKALL); 98 mcf_setimr(MCFSIM_IMR_MASKALL);
100 99
101#if defined(CONFIG_BOOTPARAM) 100#if defined(CONFIG_NETtel)
102 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
103 commandp[size-1] = 0;
104#elif defined(CONFIG_NETtel)
105 /* Copy command line from FLASH to local buffer... */ 101 /* Copy command line from FLASH to local buffer... */
106 memcpy(commandp, (char *) 0xf0004000, size); 102 memcpy(commandp, (char *) 0xf0004000, size);
107 commandp[size-1] = 0; 103 commandp[size-1] = 0;
108#else
109 memset(commandp, 0, size);
110#endif /* CONFIG_NETtel */ 104#endif /* CONFIG_NETtel */
111 105
112 mach_sched_init = coldfire_timer_init; 106 mach_sched_init = coldfire_timer_init;
113 mach_tick = coldfire_tick; 107 mach_tick = coldfire_tick;
114 mach_gettimeoffset = coldfire_timer_offset; 108 mach_gettimeoffset = coldfire_timer_offset;
115 mach_trap_init = coldfire_trap_init;
116 mach_reset = coldfire_reset; 109 mach_reset = coldfire_reset;
117} 110}
118 111
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 58b2878deb61..a2c95bebd004 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -30,7 +30,6 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
30void coldfire_pit_tick(void); 30void coldfire_pit_tick(void);
31void coldfire_pit_init(irq_handler_t handler); 31void coldfire_pit_init(irq_handler_t handler);
32unsigned long coldfire_pit_offset(void); 32unsigned long coldfire_pit_offset(void);
33void coldfire_trap_init(void);
34void coldfire_reset(void); 33void coldfire_reset(void);
35 34
36/***************************************************************************/ 35/***************************************************************************/
@@ -48,17 +47,9 @@ void mcf_autovector(unsigned int vec)
48 47
49void config_BSP(char *commandp, int size) 48void config_BSP(char *commandp, int size)
50{ 49{
51#ifdef CONFIG_BOOTPARAM
52 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
53 commandp[size-1] = 0;
54#else
55 memset(commandp, 0, size);
56#endif
57
58 mach_sched_init = coldfire_pit_init; 50 mach_sched_init = coldfire_pit_init;
59 mach_tick = coldfire_pit_tick; 51 mach_tick = coldfire_pit_tick;
60 mach_gettimeoffset = coldfire_pit_offset; 52 mach_gettimeoffset = coldfire_pit_offset;
61 mach_trap_init = coldfire_trap_init;
62 mach_reset = coldfire_reset; 53 mach_reset = coldfire_reset;
63} 54}
64 55
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 9b054e6caee2..0a3af05a434b 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -29,7 +29,6 @@
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void);
33void coldfire_reset(void); 32void coldfire_reset(void);
34 33
35/***************************************************************************/ 34/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 62void config_BSP(char *commandp, int size)
64{ 63{
65 mcf_disableall(); 64 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 65 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 66 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 67 mach_gettimeoffset = coldfire_pit_offset;
77 mach_trap_init = coldfire_trap_init;
78 mach_reset = coldfire_reset; 68 mach_reset = coldfire_reset;
79} 69}
80 70
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index d6706079d64a..dc2c362590c2 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -27,7 +27,6 @@
27void coldfire_tick(void); 27void coldfire_tick(void);
28void coldfire_timer_init(irq_handler_t handler); 28void coldfire_timer_init(irq_handler_t handler);
29unsigned long coldfire_timer_offset(void); 29unsigned long coldfire_timer_offset(void);
30void coldfire_trap_init(void);
31void coldfire_reset(void); 30void coldfire_reset(void);
32 31
33/***************************************************************************/ 32/***************************************************************************/
@@ -96,18 +95,9 @@ int mcf_timerirqpending(int timer)
96void config_BSP(char *commandp, int size) 95void config_BSP(char *commandp, int size)
97{ 96{
98 mcf_setimr(MCFSIM_IMR_MASKALL); 97 mcf_setimr(MCFSIM_IMR_MASKALL);
99
100#if defined(CONFIG_BOOTPARAM)
101 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
102 commandp[size-1] = 0;
103#else
104 memset(commandp, 0, size);
105#endif
106
107 mach_sched_init = coldfire_timer_init; 98 mach_sched_init = coldfire_timer_init;
108 mach_tick = coldfire_tick; 99 mach_tick = coldfire_tick;
109 mach_gettimeoffset = coldfire_timer_offset; 100 mach_gettimeoffset = coldfire_timer_offset;
110 mach_trap_init = coldfire_trap_init;
111 mach_reset = coldfire_reset; 101 mach_reset = coldfire_reset;
112} 102}
113 103
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 6b437cc97776..1365a8300d5d 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -28,7 +28,6 @@
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void);
32void coldfire_reset(void); 31void coldfire_reset(void);
33 32
34extern unsigned int mcf_timervector; 33extern unsigned int mcf_timervector;
@@ -113,10 +112,7 @@ void config_BSP(char *commandp, int size)
113 112
114 mcf_disableall(); 113 mcf_disableall();
115 114
116#if defined(CONFIG_BOOTPARAM) 115#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
117 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
118 commandp[size-1] = 0;
119#elif defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
120 /* Copy command line from FLASH to local buffer... */ 116 /* Copy command line from FLASH to local buffer... */
121 memcpy(commandp, (char *) 0xf0004000, size); 117 memcpy(commandp, (char *) 0xf0004000, size);
122 commandp[size-1] = 0; 118 commandp[size-1] = 0;
@@ -128,8 +124,6 @@ void config_BSP(char *commandp, int size)
128 /* Copy command line from FLASH to local buffer... */ 124 /* Copy command line from FLASH to local buffer... */
129 memcpy(commandp, (char *) 0xf0010000, size); 125 memcpy(commandp, (char *) 0xf0010000, size);
130 commandp[size-1] = 0; 126 commandp[size-1] = 0;
131#else
132 memset(commandp, 0, size);
133#endif 127#endif
134 128
135 mcf_timervector = 69; 129 mcf_timervector = 69;
@@ -137,7 +131,6 @@ void config_BSP(char *commandp, int size)
137 mach_sched_init = coldfire_timer_init; 131 mach_sched_init = coldfire_timer_init;
138 mach_tick = coldfire_tick; 132 mach_tick = coldfire_tick;
139 mach_gettimeoffset = coldfire_timer_offset; 133 mach_gettimeoffset = coldfire_timer_offset;
140 mach_trap_init = coldfire_trap_init;
141 mach_reset = coldfire_reset; 134 mach_reset = coldfire_reset;
142} 135}
143 136
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 28e7d964eef1..1b820441419a 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -29,7 +29,6 @@
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void);
33void coldfire_reset(void); 32void coldfire_reset(void);
34 33
35/***************************************************************************/ 34/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 62void config_BSP(char *commandp, int size)
64{ 63{
65 mcf_disableall(); 64 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 65 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 66 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 67 mach_gettimeoffset = coldfire_pit_offset;
77 mach_trap_init = coldfire_trap_init;
78 mach_reset = coldfire_reset; 68 mach_reset = coldfire_reset;
79} 69}
80 70
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 805b4f74ff19..a089e9513699 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -29,7 +29,6 @@
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void);
33void coldfire_reset(void); 32void coldfire_reset(void);
34 33
35/***************************************************************************/ 34/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 62void config_BSP(char *commandp, int size)
64{ 63{
65 mcf_disableall(); 64 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 65 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 66 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 67 mach_gettimeoffset = coldfire_pit_offset;
77 mach_trap_init = coldfire_trap_init;
78 mach_reset = coldfire_reset; 68 mach_reset = coldfire_reset;
79} 69}
80 70
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index e04b84deb57d..e3461619fd65 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -29,7 +29,6 @@
29void coldfire_tick(void); 29void coldfire_tick(void);
30void coldfire_timer_init(irq_handler_t handler); 30void coldfire_timer_init(irq_handler_t handler);
31unsigned long coldfire_timer_offset(void); 31unsigned long coldfire_timer_offset(void);
32void coldfire_trap_init(void);
33void coldfire_reset(void); 32void coldfire_reset(void);
34 33
35extern unsigned int mcf_timervector; 34extern unsigned int mcf_timervector;
@@ -111,10 +110,7 @@ void config_BSP(char *commandp, int size)
111{ 110{
112 mcf_setimr(MCFSIM_IMR_MASKALL); 111 mcf_setimr(MCFSIM_IMR_MASKALL);
113 112
114#if defined(CONFIG_BOOTPARAM) 113#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
115 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
116 commandp[size-1] = 0;
117#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
118 defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ 114 defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
119 defined(CONFIG_CLEOPATRA) 115 defined(CONFIG_CLEOPATRA)
120 /* Copy command line from FLASH to local buffer... */ 116 /* Copy command line from FLASH to local buffer... */
@@ -124,14 +120,11 @@ void config_BSP(char *commandp, int size)
124 mcf_timervector = 30; 120 mcf_timervector = 30;
125 mcf_profilevector = 31; 121 mcf_profilevector = 31;
126 mcf_timerlevel = 6; 122 mcf_timerlevel = 6;
127#else
128 memset(commandp, 0, size);
129#endif 123#endif
130 124
131 mach_sched_init = coldfire_timer_init; 125 mach_sched_init = coldfire_timer_init;
132 mach_tick = coldfire_tick; 126 mach_tick = coldfire_tick;
133 mach_gettimeoffset = coldfire_timer_offset; 127 mach_gettimeoffset = coldfire_timer_offset;
134 mach_trap_init = coldfire_trap_init;
135 mach_reset = coldfire_reset; 128 mach_reset = coldfire_reset;
136 129
137#ifdef MCF_BDM_DISABLE 130#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index c358aebe0af3..a8cd867805ca 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -213,16 +213,12 @@ ENTRY(ret_from_interrupt)
213 * Beware - when entering resume, prev (the current task) is 213 * Beware - when entering resume, prev (the current task) is
214 * in a0, next (the new task) is in a1,so don't change these 214 * in a0, next (the new task) is in a1,so don't change these
215 * registers until their contents are no longer needed. 215 * registers until their contents are no longer needed.
216 * This is always called in supervisor mode, so don't bother to save
217 * and restore sr; user's process sr is actually in the stack.
216 */ 218 */
217ENTRY(resume) 219ENTRY(resume)
218 movel %a0, %d1 /* get prev thread in d1 */ 220 movel %a0, %d1 /* get prev thread in d1 */
219 221
220 movew %sr,%d0 /* save thread status reg */
221 movew %d0,%a0@(TASK_THREAD+THREAD_SR)
222
223 oril #0x700,%d0 /* disable interrupts */
224 move %d0,%sr
225
226 movel sw_usp,%d0 /* save usp */ 222 movel sw_usp,%d0 /* save usp */
227 movel %d0,%a0@(TASK_THREAD+THREAD_USP) 223 movel %d0,%a0@(TASK_THREAD+THREAD_USP)
228 224
@@ -233,7 +229,4 @@ ENTRY(resume)
233 229
234 movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ 230 movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */
235 movel %a0, sw_usp 231 movel %a0, sw_usp
236
237 movew %a1@(TASK_THREAD+THREAD_SR),%d0 /* restore thread status reg */
238 movew %d0, %sr
239 rts 232 rts
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index aa15beeb36ca..e53c446d10e4 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -5,9 +5,8 @@
5 * hardware timer only exists in the Freescale ColdFire 5 * hardware timer only exists in the Freescale ColdFire
6 * 5270/5271, 5282 and other CPUs. 6 * 5270/5271, 5282 and other CPUs.
7 * 7 *
8 * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com) 8 * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
9 * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) 9 * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com)
10 *
11 */ 10 */
12 11
13/***************************************************************************/ 12/***************************************************************************/
@@ -17,8 +16,8 @@
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h>
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/irq.h>
22#include <asm/coldfire.h> 21#include <asm/coldfire.h>
23#include <asm/mcfpit.h> 22#include <asm/mcfpit.h>
24#include <asm/mcfsim.h> 23#include <asm/mcfsim.h>
@@ -43,13 +42,18 @@ void coldfire_pit_tick(void)
43 42
44/***************************************************************************/ 43/***************************************************************************/
45 44
45static struct irqaction coldfire_pit_irq = {
46 .name = "timer",
47 .flags = IRQF_DISABLED | IRQF_TIMER,
48};
49
46void coldfire_pit_init(irq_handler_t handler) 50void coldfire_pit_init(irq_handler_t handler)
47{ 51{
48 volatile unsigned char *icrp; 52 volatile unsigned char *icrp;
49 volatile unsigned long *imrp; 53 volatile unsigned long *imrp;
50 54
51 request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED, 55 coldfire_pit_irq.handler = handler;
52 "ColdFire Timer", NULL); 56 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq);
53 57
54 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 58 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
55 MCFINTC_ICR0 + MCFINT_PIT1); 59 MCFINTC_ICR0 + MCFINT_PIT1);
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index fb66eadd5896..64bd0ff9029e 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -3,7 +3,7 @@
3/* 3/*
4 * timers.c -- generic ColdFire hardware timer support. 4 * timers.c -- generic ColdFire hardware timer support.
5 * 5 *
6 * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com) 6 * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
7 */ 7 */
8 8
9/***************************************************************************/ 9/***************************************************************************/
@@ -13,8 +13,8 @@
13#include <linux/param.h> 13#include <linux/param.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/irq.h>
16#include <asm/io.h> 17#include <asm/io.h>
17#include <asm/irq.h>
18#include <asm/traps.h> 18#include <asm/traps.h>
19#include <asm/machdep.h> 19#include <asm/machdep.h>
20#include <asm/coldfire.h> 20#include <asm/coldfire.h>
@@ -62,17 +62,24 @@ void coldfire_tick(void)
62 62
63/***************************************************************************/ 63/***************************************************************************/
64 64
65static struct irqaction coldfire_timer_irq = {
66 .name = "timer",
67 .flags = IRQF_DISABLED | IRQF_TIMER,
68};
69
65static int ticks_per_intr; 70static int ticks_per_intr;
66 71
67void coldfire_timer_init(irq_handler_t handler) 72void coldfire_timer_init(irq_handler_t handler)
68{ 73{
74 coldfire_timer_irq.handler = handler;
75 setup_irq(mcf_timervector, &coldfire_timer_irq);
76
69 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 77 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
70 ticks_per_intr = (MCF_BUSCLK / 16) / HZ; 78 ticks_per_intr = (MCF_BUSCLK / 16) / HZ;
71 __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR)); 79 __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR));
72 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 80 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
73 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 81 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
74 82
75 request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL);
76 mcf_settimericr(1, mcf_timerlevel); 83 mcf_settimericr(1, mcf_timerlevel);
77 84
78#ifdef CONFIG_HIGHPROFILE 85#ifdef CONFIG_HIGHPROFILE
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index 664c3a12b0c1..b32c6425f821 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -37,7 +37,6 @@
37void coldfire_tick(void); 37void coldfire_tick(void);
38void coldfire_timer_init(irq_handler_t handler); 38void coldfire_timer_init(irq_handler_t handler);
39unsigned long coldfire_timer_offset(void); 39unsigned long coldfire_timer_offset(void);
40void coldfire_trap_init(void);
41void coldfire_reset(void); 40void coldfire_reset(void);
42 41
43extern unsigned int mcf_timervector; 42extern unsigned int mcf_timervector;
@@ -92,10 +91,7 @@ void config_BSP(char *commandp, int size)
92{ 91{
93 mcf_setimr(MCFSIM_IMR_MASKALL); 92 mcf_setimr(MCFSIM_IMR_MASKALL);
94 93
95#if defined(CONFIG_BOOTPARAM) 94#if !defined(CONFIG_BOOTPARAM)
96 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
97 commandp[size-1] = 0;
98#else
99 /* Copy command line from FLASH to local buffer... */ 95 /* Copy command line from FLASH to local buffer... */
100 memcpy(commandp, (char *) 0x4000, 4); 96 memcpy(commandp, (char *) 0x4000, 4);
101 if(strncmp(commandp, "kcl ", 4) == 0){ 97 if(strncmp(commandp, "kcl ", 4) == 0){
@@ -111,7 +107,6 @@ void config_BSP(char *commandp, int size)
111 mach_sched_init = coldfire_timer_init; 107 mach_sched_init = coldfire_timer_init;
112 mach_tick = coldfire_tick; 108 mach_tick = coldfire_tick;
113 mach_gettimeoffset = coldfire_timer_offset; 109 mach_gettimeoffset = coldfire_timer_offset;
114 mach_trap_init = coldfire_trap_init;
115 mach_reset = coldfire_reset; 110 mach_reset = coldfire_reset;
116 111
117#ifdef MCF_BDM_DISABLE 112#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 036f62876241..e692536817d8 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -28,7 +28,6 @@
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void);
32void coldfire_reset(void); 31void coldfire_reset(void);
33 32
34extern unsigned int mcf_timervector; 33extern unsigned int mcf_timervector;
@@ -102,13 +101,6 @@ void config_BSP(char *commandp, int size)
102{ 101{
103 mcf_setimr(MCFSIM_IMR_MASKALL); 102 mcf_setimr(MCFSIM_IMR_MASKALL);
104 103
105#if defined(CONFIG_BOOTPARAM)
106 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
107 commandp[size-1] = 0;
108#else
109 memset(commandp, 0, size);
110#endif
111
112#if defined(CONFIG_CLEOPATRA) 104#if defined(CONFIG_CLEOPATRA)
113 /* Different timer setup - to prevent device clash */ 105 /* Different timer setup - to prevent device clash */
114 mcf_timervector = 30; 106 mcf_timervector = 30;
@@ -119,7 +111,6 @@ void config_BSP(char *commandp, int size)
119 mach_sched_init = coldfire_timer_init; 111 mach_sched_init = coldfire_timer_init;
120 mach_tick = coldfire_tick; 112 mach_tick = coldfire_tick;
121 mach_gettimeoffset = coldfire_timer_offset; 113 mach_gettimeoffset = coldfire_timer_offset;
122 mach_trap_init = coldfire_trap_init;
123 mach_reset = coldfire_reset; 114 mach_reset = coldfire_reset;
124} 115}
125 116
diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c
index ef067f4c3cd4..0396476f955d 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -18,10 +18,10 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/irq.h>
21#include <asm/setup.h> 22#include <asm/setup.h>
22#include <asm/system.h> 23#include <asm/system.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
24#include <asm/irq.h>
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/MC68VZ328.h> 26#include <asm/MC68VZ328.h>
27 27
@@ -53,14 +53,19 @@
53 53
54/***************************************************************************/ 54/***************************************************************************/
55 55
56static struct irqaction m68328_timer_irq = {
57 .name = "timer",
58 .flags = IRQF_DISABLED | IRQF_TIMER,
59};
60
56void m68328_timer_init(irq_handler_t timer_routine) 61void m68328_timer_init(irq_handler_t timer_routine)
57{ 62{
58 /* disable timer 1 */ 63 /* disable timer 1 */
59 TCTL = 0; 64 TCTL = 0;
60 65
61 /* set ISR */ 66 /* set ISR */
62 if (request_irq(TMR_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, "timer", NULL)) 67 m68328_timer_irq.handler = timer_routine;
63 panic("Unable to attach timer interrupt\n"); 68 setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
64 69
65 /* Restart mode, Enable int, Set clock source */ 70 /* Restart mode, Enable int, Set clock source */
66 TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE; 71 TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE;
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c
index 4ff13bd51ffd..155b72fe2607 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -17,11 +17,11 @@
17#include <linux/tty.h> 17#include <linux/tty.h>
18#include <linux/console.h> 18#include <linux/console.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/irq.h>
20 21
21#include <asm/setup.h> 22#include <asm/setup.h>
22#include <asm/system.h> 23#include <asm/system.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
24#include <asm/irq.h>
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/m68360.h> 26#include <asm/m68360.h>
27 27
@@ -51,11 +51,15 @@ extern unsigned long int system_clock; //In kernel setup.c
51 51
52extern void config_M68360_irq(void); 52extern void config_M68360_irq(void);
53 53
54static struct irqaction m68360_timer_irq = {
55 .name = "timer",
56 .flags = IRQF_DISABLED | IRQF_TIMER,
57};
58
54void BSP_sched_init(irq_handler_t timer_routine) 59void BSP_sched_init(irq_handler_t timer_routine)
55{ 60{
56 unsigned char prescaler; 61 unsigned char prescaler;
57 unsigned short tgcr_save; 62 unsigned short tgcr_save;
58 int return_value;
59 63
60#if 0 64#if 0
61 /* Restart mode, Enable int, 32KHz, Enable timer */ 65 /* Restart mode, Enable int, 32KHz, Enable timer */
@@ -86,10 +90,8 @@ void BSP_sched_init(irq_handler_t timer_routine)
86 pquicc->timer_ter1 = 0x0003; /* clear timer events */ 90 pquicc->timer_ter1 = 0x0003; /* clear timer events */
87 91
88 /* enable timer 1 interrupt in CIMR */ 92 /* enable timer 1 interrupt in CIMR */
89// request_irq(IRQ_MACHSPEC | CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, "timer", NULL); 93 m68360_timer_irq.handler = timer_routine;
90 //return_value = request_irq( CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, "timer", NULL); 94 setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);
91 return_value = request_irq(CPMVEC_TIMER1 , timer_routine, IRQ_FLG_LOCK,
92 "Timer", NULL);
93 95
94 /* Start timer 1: */ 96 /* Start timer 1: */
95 tgcr_save = (pquicc->timer_tgcr & 0xfff0) | 0x0001; 97 tgcr_save = (pquicc->timer_tgcr & 0xfff0) | 0x0001;
diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c
index 8abe0f6e7235..79dced929c97 100644
--- a/arch/m68knommu/platform/68VZ328/config.c
+++ b/arch/m68knommu/platform/68VZ328/config.c
@@ -191,13 +191,6 @@ void config_BSP(char *command, int size)
191{ 191{
192 printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n"); 192 printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
193 193
194#if defined(CONFIG_BOOTPARAM)
195 strncpy(command, CONFIG_BOOTPARAM_STRING, size);
196 command[size-1] = 0;
197#else
198 memset(command, 0, size);
199#endif
200
201 init_hardware(command, size); 194 init_hardware(command, size);
202 195
203 mach_sched_init = (void *) m68328_timer_init; 196 mach_sched_init = (void *) m68328_timer_init;
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 20d19c9b7761..a9a987a06daf 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -328,7 +328,7 @@ load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
328# MIPS SIM 328# MIPS SIM
329# 329#
330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/ 330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/
331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim 331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-mipssim
332load-$(CONFIG_MIPS_SIM) += 0x80100000 332load-$(CONFIG_MIPS_SIM) += 0x80100000
333 333
334# 334#
diff --git a/arch/mips/arc/console.c b/arch/mips/arc/console.c
deleted file mode 100644
index 0fe6032999cb..000000000000
--- a/arch/mips/arc/console.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996 David S. Miller (dm@sgi.com)
7 * Compability with board caches, Ulf Carlsson
8 */
9#include <linux/kernel.h>
10#include <asm/sgialib.h>
11#include <asm/bcache.h>
12
13/*
14 * IP22 boardcache is not compatible with board caches. Thus we disable it
15 * during romvec action. Since r4xx0.c is always compiled and linked with your
16 * kernel, this shouldn't cause any harm regardless what MIPS processor you
17 * have.
18 *
19 * The ARC write and read functions seem to interfere with the serial lines
20 * in some way. You should be careful with them.
21 */
22
23void prom_putchar(char c)
24{
25 ULONG cnt;
26 CHAR it = c;
27
28 bc_disable();
29 ArcWrite(1, &it, 1, &cnt);
30 bc_enable();
31}
diff --git a/arch/mips/jazz/io.c b/arch/mips/jazz/io.c
deleted file mode 100644
index e86904454c89..000000000000
--- a/arch/mips/jazz/io.c
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Low level I/O functions for Jazz family machines.
7 *
8 * Copyright (C) 1997 by Ralf Baechle.
9 */
10#include <linux/string.h>
11#include <linux/spinlock.h>
12#include <asm/addrspace.h>
13#include <asm/system.h>
14#include <asm/jazz.h>
15
16/*
17 * Map an 16mb segment of the EISA address space to 0xe3000000;
18 */
19static inline void map_eisa_address(unsigned long address)
20{
21 /* XXX */
22 /* We've got an wired entry in the TLB. We just need to modify it.
23 fast and clean. But since we want to get rid of wired entries
24 things are a little bit more complicated ... */
25}
26
27static unsigned char jazz_readb(unsigned long addr)
28{
29 unsigned char res;
30
31 map_eisa_address(addr);
32 addr &= 0xffffff;
33 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
34
35 return res;
36}
37
38static unsigned short jazz_readw(unsigned long addr)
39{
40 unsigned short res;
41
42 map_eisa_address(addr);
43 addr &= 0xffffff;
44 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
45
46 return res;
47}
48
49static unsigned int jazz_readl(unsigned long addr)
50{
51 unsigned int res;
52
53 map_eisa_address(addr);
54 addr &= 0xffffff;
55 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
56
57 return res;
58}
59
60static void jazz_writeb(unsigned char val, unsigned long addr)
61{
62 map_eisa_address(addr);
63 addr &= 0xffffff;
64 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
65}
66
67static void jazz_writew(unsigned short val, unsigned long addr)
68{
69 map_eisa_address(addr);
70 addr &= 0xffffff;
71 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
72}
73
74static void jazz_writel(unsigned int val, unsigned long addr)
75{
76 map_eisa_address(addr);
77 addr &= 0xffffff;
78 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
79}
80
81static void jazz_memset_io(unsigned long addr, int val, unsigned long len)
82{
83 unsigned long waddr;
84
85 waddr = JAZZ_EISA_BASE | (addr & 0xffffff);
86 while(len) {
87 unsigned long fraglen;
88
89 fraglen = (~addr + 1) & 0xffffff;
90 fraglen = (fraglen < len) ? fraglen : len;
91 map_eisa_address(addr);
92 memset((char *)waddr, val, fraglen);
93 addr += fraglen;
94 waddr = waddr + fraglen - 0x1000000;
95 len -= fraglen;
96 }
97}
98
99static void jazz_memcpy_fromio(unsigned long to, unsigned long from, unsigned long len)
100{
101 unsigned long waddr;
102
103 waddr = JAZZ_EISA_BASE | (from & 0xffffff);
104 while(len) {
105 unsigned long fraglen;
106
107 fraglen = (~from + 1) & 0xffffff;
108 fraglen = (fraglen < len) ? fraglen : len;
109 map_eisa_address(from);
110 memcpy((void *)to, (void *)waddr, fraglen);
111 to += fraglen;
112 from += fraglen;
113 waddr = waddr + fraglen - 0x1000000;
114 len -= fraglen;
115 }
116}
117
118static void jazz_memcpy_toio(unsigned long to, unsigned long from, unsigned long len)
119{
120 unsigned long waddr;
121
122 waddr = JAZZ_EISA_BASE | (to & 0xffffff);
123 while(len) {
124 unsigned long fraglen;
125
126 fraglen = (~to + 1) & 0xffffff;
127 fraglen = (fraglen < len) ? fraglen : len;
128 map_eisa_address(to);
129 memcpy((char *)to + JAZZ_EISA_BASE, (void *)from, fraglen);
130 to += fraglen;
131 from += fraglen;
132 waddr = waddr + fraglen - 0x1000000;
133 len -= fraglen;
134 }
135}
diff --git a/arch/mips/jazz/reset.c b/arch/mips/jazz/reset.c
index 2a9754750bc8..d8ade85060b3 100644
--- a/arch/mips/jazz/reset.c
+++ b/arch/mips/jazz/reset.c
@@ -6,10 +6,6 @@
6 */ 6 */
7#include <linux/jiffies.h> 7#include <linux/jiffies.h>
8#include <asm/jazz.h> 8#include <asm/jazz.h>
9#include <asm/io.h>
10#include <asm/system.h>
11#include <asm/reboot.h>
12#include <asm/delay.h>
13 9
14#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ 10#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */
15 11
@@ -58,12 +54,3 @@ void jazz_machine_restart(char *command)
58 jazz_write_output (0x00); 54 jazz_write_output (0x00);
59 } 55 }
60} 56}
61
62void jazz_machine_halt(void)
63{
64}
65
66void jazz_machine_power_off(void)
67{
68 /* Jazz machines don't have a software power switch */
69}
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index 81ec559a1c26..798279e06691 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -34,8 +34,6 @@
34extern asmlinkage void jazz_handle_int(void); 34extern asmlinkage void jazz_handle_int(void);
35 35
36extern void jazz_machine_restart(char *command); 36extern void jazz_machine_restart(char *command);
37extern void jazz_machine_halt(void);
38extern void jazz_machine_power_off(void);
39 37
40void __init plat_timer_setup(struct irqaction *irq) 38void __init plat_timer_setup(struct irqaction *irq)
41{ 39{
@@ -95,8 +93,6 @@ void __init plat_mem_setup(void)
95 /* The RTC is outside the port address space */ 93 /* The RTC is outside the port address space */
96 94
97 _machine_restart = jazz_machine_restart; 95 _machine_restart = jazz_machine_restart;
98 _machine_halt = jazz_machine_halt;
99 pm_power_off = jazz_machine_power_off;
100 96
101 screen_info = (struct screen_info) { 97 screen_info = (struct screen_info) {
102 0, 0, /* orig-x, orig-y */ 98 0, 0, /* orig-x, orig-y */
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index d1ef2895d564..8303001516d2 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -434,7 +434,7 @@ EXPORT_SYMBOL(__swizzle_addr_b);
434 434
435static int __init jmr3927_rtc_init(void) 435static int __init jmr3927_rtc_init(void)
436{ 436{
437 struct resource res = { 437 static struct resource __initdata res = {
438 .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE, 438 .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE,
439 .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1, 439 .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1,
440 .flags = IORESOURCE_MEM, 440 .flags = IORESOURCE_MEM,
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c
index 7bc882049269..cb5623aad552 100644
--- a/arch/mips/kernel/gdb-stub.c
+++ b/arch/mips/kernel/gdb-stub.c
@@ -1099,12 +1099,12 @@ void adel(void)
1099 * malloc is needed by gdb client in "call func()", even a private one 1099 * malloc is needed by gdb client in "call func()", even a private one
1100 * will make gdb happy 1100 * will make gdb happy
1101 */ 1101 */
1102static void * __attribute_used__ malloc(size_t size) 1102static void __used *malloc(size_t size)
1103{ 1103{
1104 return kmalloc(size, GFP_ATOMIC); 1104 return kmalloc(size, GFP_ATOMIC);
1105} 1105}
1106 1106
1107static void __attribute_used__ free (void *where) 1107static void __used free(void *where)
1108{ 1108{
1109 kfree(where); 1109 kfree(where);
1110} 1110}
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index f78538eceef7..c15bbc436bbd 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -141,7 +141,7 @@
141EXPORT(stext) # used for profiling 141EXPORT(stext) # used for profiling
142EXPORT(_stext) 142EXPORT(_stext)
143 143
144#ifdef CONFIG_BOOT_RAW 144#ifndef CONFIG_BOOT_RAW
145 /* 145 /*
146 * Give us a fighting chance of running if execution beings at the 146 * Give us a fighting chance of running if execution beings at the
147 * kernel load address. This is needed because this platform does 147 * kernel load address. This is needed because this platform does
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 06e04da211d5..c37568d6fb55 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -567,7 +567,7 @@ asmlinkage long sys32_fadvise64_64(int fd, int __pad,
567} 567}
568 568
569save_static_function(sys32_clone); 569save_static_function(sys32_clone);
570__attribute_used__ noinline static int 570static int noinline __used
571_sys32_clone(nabi_no_regargs struct pt_regs regs) 571_sys32_clone(nabi_no_regargs struct pt_regs regs)
572{ 572{
573 unsigned long clone_flags; 573 unsigned long clone_flags;
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index bfc8ca168f83..8cf24d716d41 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -85,7 +85,7 @@ static irqreturn_t rtlx_interrupt(int irq, void *dev_id)
85 return IRQ_HANDLED; 85 return IRQ_HANDLED;
86} 86}
87 87
88static __attribute_used__ void dump_rtlx(void) 88static void __used dump_rtlx(void)
89{ 89{
90 int i; 90 int i;
91 91
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index be7362bc2c9a..04bbbd8d91ab 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -30,6 +30,7 @@
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/cpumask.h> 31#include <linux/cpumask.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/err.h>
33 34
34#include <asm/atomic.h> 35#include <asm/atomic.h>
35#include <asm/cpu.h> 36#include <asm/cpu.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index b947c61c0cc8..541b5005957e 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -12,6 +12,7 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/fs.h>
15#include <linux/smp.h> 16#include <linux/smp.h>
16#include <linux/mman.h> 17#include <linux/mman.h>
17#include <linux/ptrace.h> 18#include <linux/ptrace.h>
@@ -167,14 +168,14 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
167} 168}
168 169
169save_static_function(sys_fork); 170save_static_function(sys_fork);
170__attribute_used__ noinline static int 171static int __used noinline
171_sys_fork(nabi_no_regargs struct pt_regs regs) 172_sys_fork(nabi_no_regargs struct pt_regs regs)
172{ 173{
173 return do_fork(SIGCHLD, regs.regs[29], &regs, 0, NULL, NULL); 174 return do_fork(SIGCHLD, regs.regs[29], &regs, 0, NULL, NULL);
174} 175}
175 176
176save_static_function(sys_clone); 177save_static_function(sys_clone);
177__attribute_used__ noinline static int 178static int __used noinline
178_sys_clone(nabi_no_regargs struct pt_regs regs) 179_sys_clone(nabi_no_regargs struct pt_regs regs)
179{ 180{
180 unsigned long clone_flags; 181 unsigned long clone_flags;
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 9e66354dee8b..a2bee10f04cf 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -154,7 +154,6 @@ struct {
154}; 154};
155 155
156static void release_progmem(void *ptr); 156static void release_progmem(void *ptr);
157/* static __attribute_used__ void dump_vpe(struct vpe * v); */
158extern void save_gp_address(unsigned int secbase, unsigned int rel); 157extern void save_gp_address(unsigned int secbase, unsigned int rel);
159 158
160/* get the vpe associated with this minor */ 159/* get the vpe associated with this minor */
@@ -1024,7 +1023,7 @@ static int vpe_elfload(struct vpe * v)
1024 return 0; 1023 return 0;
1025} 1024}
1026 1025
1027__attribute_used__ void dump_vpe(struct vpe * v) 1026void __used dump_vpe(struct vpe * v)
1028{ 1027{
1029 struct tc *t; 1028 struct tc *t;
1030 1029
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 6f9bd7fbd481..85ce2842d0da 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -272,7 +272,7 @@ void sb1_flush_cache_data_page(unsigned long)
272/* 272/*
273 * Invalidate all caches on this CPU 273 * Invalidate all caches on this CPU
274 */ 274 */
275static void __attribute_used__ local_sb1___flush_cache_all(void) 275static void __used local_sb1___flush_cache_all(void)
276{ 276{
277 __sb1_writeback_inv_dcache_all(); 277 __sb1_writeback_inv_dcache_all();
278 __sb1_flush_icache_all(); 278 __sb1_flush_icache_all();
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4c80528deadd..b8cb0dde3af0 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -484,7 +484,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
484} 484}
485#endif 485#endif
486 486
487void free_initmem(void) 487void __init_refok free_initmem(void)
488{ 488{
489 prom_free_prom_memory(); 489 prom_free_prom_memory();
490 free_init_pages("unused kernel memory", 490 free_init_pages("unused kernel memory",
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c
index 00a03a6e8f58..db544a6e23f3 100644
--- a/arch/mips/sni/sniprom.c
+++ b/arch/mips/sni/sniprom.c
@@ -19,6 +19,7 @@
19#include <asm/addrspace.h> 19#include <asm/addrspace.h>
20#include <asm/sni.h> 20#include <asm/sni.h>
21#include <asm/mipsprom.h> 21#include <asm/mipsprom.h>
22#include <asm/mipsregs.h>
22#include <asm/bootinfo.h> 23#include <asm/bootinfo.h>
23 24
24/* special SNI prom calls */ 25/* special SNI prom calls */
@@ -71,7 +72,7 @@ const char *get_system_type(void)
71#define SNI_IDPROM_SIZE 0x1000 72#define SNI_IDPROM_SIZE 0x1000
72 73
73#ifdef DEBUG 74#ifdef DEBUG
74static void sni_idprom_dump(void) 75static void __init sni_idprom_dump(void)
75{ 76{
76 int i; 77 int i;
77 78
@@ -88,7 +89,7 @@ static void sni_idprom_dump(void)
88} 89}
89#endif 90#endif
90 91
91static void sni_mem_init(void ) 92static void __init sni_mem_init(void )
92{ 93{
93 int i, memsize; 94 int i, memsize;
94 struct membank { 95 struct membank {
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index 40c7c3eeafaf..ab72292a172e 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -1020,7 +1020,7 @@ void __init toshiba_rbtx4927_timer_setup(struct irqaction *irq)
1020 1020
1021static int __init toshiba_rbtx4927_rtc_init(void) 1021static int __init toshiba_rbtx4927_rtc_init(void)
1022{ 1022{
1023 struct resource res = { 1023 static struct resource __initdata res = {
1024 .start = 0x1c010000, 1024 .start = 0x1c010000,
1025 .end = 0x1c010000 + 0x800 - 1, 1025 .end = 0x1c010000 + 0x800 - 1,
1026 .flags = IORESOURCE_MEM, 1026 .flags = IORESOURCE_MEM,
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index f2042e6466a4..1263f00dc35d 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/sched.h> 27#include <linux/sched.h>
27#include <linux/file.h> 28#include <linux/file.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index 8384bf9cecd2..446f98d3fd7b 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/module.h> 27#include <linux/module.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28#include <linux/init.h> 29#include <linux/init.h>
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 355664812b83..b80e02a4d81d 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -38,6 +38,7 @@
38#include <linux/errno.h> 38#include <linux/errno.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/fs.h>
41#include <linux/module.h> 42#include <linux/module.h>
42#include <linux/personality.h> 43#include <linux/personality.h>
43#include <linux/ptrace.h> 44#include <linux/ptrace.h>
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 04c7e1d36cea..d7bc7bb42c94 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -28,6 +28,7 @@
28#include <linux/smp.h> 28#include <linux/smp.h>
29#include <linux/kernel_stat.h> 29#include <linux/kernel_stat.h>
30#include <linux/mm.h> 30#include <linux/mm.h>
31#include <linux/err.h>
31#include <linux/delay.h> 32#include <linux/delay.h>
32#include <linux/bitops.h> 33#include <linux/bitops.h>
33 34
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 853c282da22e..00099efe0e9f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -411,11 +411,6 @@ config PPC_INDIRECT_PCI
411 default y if 40x || 44x 411 default y if 40x || 44x
412 default n 412 default n
413 413
414config PPC_INDIRECT_PCI_BE
415 bool
416 depends PPC_INDIRECT_PCI
417 default n
418
419config EISA 414config EISA
420 bool 415 bool
421 416
@@ -425,6 +420,10 @@ config SBUS
425config FSL_SOC 420config FSL_SOC
426 bool 421 bool
427 422
423config FSL_PCI
424 bool
425 select PPC_INDIRECT_PCI
426
428# Yes MCA RS/6000s exist but Linux-PPC does not currently support any 427# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
429config MCA 428config MCA
430 bool 429 bool
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 346cd3befe1e..22acece95b11 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -20,7 +20,7 @@ config DEBUG_STACK_USAGE
20 20
21config DEBUG_PAGEALLOC 21config DEBUG_PAGEALLOC
22 bool "Debug page memory allocations" 22 bool "Debug page memory allocations"
23 depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND 23 depends on DEBUG_KERNEL && !HIBERNATION
24 help 24 help
25 Unmap pages from the kernel linear mapping after free_pages(). 25 Unmap pages from the kernel linear mapping after free_pages().
26 This results in a large slowdown, but helps to find certain types 26 This results in a large slowdown, but helps to find certain types
@@ -134,7 +134,7 @@ config BDI_SWITCH
134 134
135config BOOTX_TEXT 135config BOOTX_TEXT
136 bool "Support for early boot text console (BootX or OpenFirmware only)" 136 bool "Support for early boot text console (BootX or OpenFirmware only)"
137 depends PPC_OF 137 depends PPC_OF && PPC_MULTIPLATFORM
138 help 138 help
139 Say Y here to see progress messages from the boot firmware in text 139 Say Y here to see progress messages from the boot firmware in text
140 mode. Requires either BootX or Open Firmware. 140 mode. Requires either BootX or Open Firmware.
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
index a983680c3263..122537419d9f 100644
--- a/arch/powerpc/boot/dts/kuroboxHD.dts
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
33 PowerPC,603e { /* Really 8241 */ 33 PowerPC,603e { /* Really 8241 */
34 device_type = "cpu"; 34 device_type = "cpu";
35 reg = <0>; 35 reg = <0>;
36 clock-frequency = <bebc200>; /* Fixed by bootwrapper */ 36 clock-frequency = <bebc200>; /* Fixed by bootloader */
37 timebase-frequency = <1743000>; /* Fixed by bootwrapper */ 37 timebase-frequency = <1743000>; /* Fixed by bootloader */
38 bus-frequency = <0>; /* From bootloader */ 38 bus-frequency = <0>; /* Fixed by bootloader */
39 /* Following required by dtc but not used */ 39 /* Following required by dtc but not used */
40 i-cache-line-size = <0>;
41 d-cache-line-size = <0>;
42 i-cache-size = <4000>; 40 i-cache-size = <4000>;
43 d-cache-size = <4000>; 41 d-cache-size = <4000>;
44 }; 42 };
@@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
64 fef00000 fef00000 00100000>; /* pci iack */ 62 fef00000 fef00000 00100000>; /* pci iack */
65 63
66 i2c@80003000 { 64 i2c@80003000 {
65 #address-cells = <1>;
66 #size-cells = <0>;
67 device_type = "i2c"; 67 device_type = "i2c";
68 compatible = "fsl-i2c"; 68 compatible = "fsl-i2c";
69 reg = <80003000 1000>; 69 reg = <80003000 1000>;
70 interrupts = <5 2>; 70 interrupts = <5 2>;
71 interrupt-parent = <&mpic>; 71 interrupt-parent = <&mpic>;
72
73 rtc@32 {
74 device_type = "rtc";
75 compatible = "ricoh,rs5c372b";
76 reg = <32>;
77 };
72 }; 78 };
73 79
74 serial@80004500 { 80 serial@80004500 {
@@ -91,7 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
91 interrupt-parent = <&mpic>; 97 interrupt-parent = <&mpic>;
92 }; 98 };
93 99
94 mpic: pic@80040000 { 100 mpic: interrupt-controller@80040000 {
95 #interrupt-cells = <2>; 101 #interrupt-cells = <2>;
96 #address-cells = <0>; 102 #address-cells = <0>;
97 device_type = "open-pic"; 103 device_type = "open-pic";
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index 5cf42dc022df..579aa8b967d9 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
33 PowerPC,603e { /* Really 8241 */ 33 PowerPC,603e { /* Really 8241 */
34 device_type = "cpu"; 34 device_type = "cpu";
35 reg = <0>; 35 reg = <0>;
36 clock-frequency = <fdad680>; /* Fixed by bootwrapper */ 36 clock-frequency = <fdad680>; /* Fixed by bootloader */
37 timebase-frequency = <1F04000>; /* Fixed by bootwrapper */ 37 timebase-frequency = <1F04000>; /* Fixed by bootloader */
38 bus-frequency = <0>; /* From bootloader */ 38 bus-frequency = <0>; /* Fixed by bootloader */
39 /* Following required by dtc but not used */ 39 /* Following required by dtc but not used */
40 i-cache-line-size = <0>;
41 d-cache-line-size = <0>;
42 i-cache-size = <4000>; 40 i-cache-size = <4000>;
43 d-cache-size = <4000>; 41 d-cache-size = <4000>;
44 }; 42 };
@@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
64 fef00000 fef00000 00100000>; /* pci iack */ 62 fef00000 fef00000 00100000>; /* pci iack */
65 63
66 i2c@80003000 { 64 i2c@80003000 {
65 #address-cells = <1>;
66 #size-cells = <0>;
67 device_type = "i2c"; 67 device_type = "i2c";
68 compatible = "fsl-i2c"; 68 compatible = "fsl-i2c";
69 reg = <80003000 1000>; 69 reg = <80003000 1000>;
70 interrupts = <5 2>; 70 interrupts = <5 2>;
71 interrupt-parent = <&mpic>; 71 interrupt-parent = <&mpic>;
72
73 rtc@32 {
74 device_type = "rtc";
75 compatible = "ricoh,rs5c372b";
76 reg = <32>;
77 };
72 }; 78 };
73 79
74 serial@80004500 { 80 serial@80004500 {
@@ -91,8 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
91 interrupt-parent = <&mpic>; 97 interrupt-parent = <&mpic>;
92 }; 98 };
93 99
94 mpic: pic@80040000 { 100 mpic: interrupt-controller@80040000 {
95 interrupt-parent = <&mpic>;
96 #interrupt-cells = <2>; 101 #interrupt-cells = <2>;
97 #address-cells = <0>; 102 #address-cells = <0>;
98 device_type = "open-pic"; 103 device_type = "open-pic";
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 0e3d314a7158..b9158eb2797e 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -45,7 +45,7 @@
45 #address-cells = <1>; 45 #address-cells = <1>;
46 #size-cells = <1>; 46 #size-cells = <1>;
47 #interrupt-cells = <2>; 47 #interrupt-cells = <2>;
48 device_type = "tsi108-bridge"; 48 device_type = "tsi-bridge";
49 ranges = <00000000 c0000000 00010000>; 49 ranges = <00000000 c0000000 00010000>;
50 reg = <c0000000 00010000>; 50 reg = <c0000000 00010000>;
51 bus-frequency = <0>; 51 bus-frequency = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index a1533cc07d09..c5adbe40364e 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -178,7 +178,7 @@
178 #size-cells = <2>; 178 #size-cells = <2>;
179 #address-cells = <3>; 179 #address-cells = <3>;
180 reg = <8500 100>; 180 reg = <8500 100>;
181 compatible = "83xx"; 181 compatible = "fsl,mpc8349-pci";
182 device_type = "pci"; 182 device_type = "pci";
183 }; 183 };
184 184
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 4fc0c4d34aa8..f158ed781ba8 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -154,7 +154,7 @@
154 #size-cells = <2>; 154 #size-cells = <2>;
155 #address-cells = <3>; 155 #address-cells = <3>;
156 reg = <8500 100>; 156 reg = <8500 100>;
157 compatible = "83xx"; 157 compatible = "fsl,mpc8349-pci";
158 device_type = "pci"; 158 device_type = "pci";
159 }; 159 };
160 160
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 447c03ffabbc..7c4beff3e200 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -123,7 +123,7 @@
123 #size-cells = <2>; 123 #size-cells = <2>;
124 #address-cells = <3>; 124 #address-cells = <3>;
125 reg = <8500 100>; 125 reg = <8500 100>;
126 compatible = "83xx"; 126 compatible = "fsl,mpc8349-pci";
127 device_type = "pci"; 127 device_type = "pci";
128 }; 128 };
129 129
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index ae9bca575453..502f47c01797 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -197,7 +197,7 @@
197 #size-cells = <2>; 197 #size-cells = <2>;
198 #address-cells = <3>; 198 #address-cells = <3>;
199 reg = <8500 100>; 199 reg = <8500 100>;
200 compatible = "83xx"; 200 compatible = "fsl,mpc8349-pci";
201 device_type = "pci"; 201 device_type = "pci";
202 }; 202 };
203 203
@@ -222,7 +222,7 @@
222 #size-cells = <2>; 222 #size-cells = <2>;
223 #address-cells = <3>; 223 #address-cells = <3>;
224 reg = <8600 100>; 224 reg = <8600 100>;
225 compatible = "83xx"; 225 compatible = "fsl,mpc8349-pci";
226 device_type = "pci"; 226 device_type = "pci";
227 }; 227 };
228 228
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index f636528a3c72..0b8387141d88 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -154,7 +154,7 @@
154 #size-cells = <2>; 154 #size-cells = <2>;
155 #address-cells = <3>; 155 #address-cells = <3>;
156 reg = <8600 100>; 156 reg = <8600 100>;
157 compatible = "83xx"; 157 compatible = "fsl,mpc8349-pci";
158 device_type = "pci"; 158 device_type = "pci";
159 }; 159 };
160 160
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 310e877826b4..481099756e44 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -241,7 +241,7 @@
241 #size-cells = <2>; 241 #size-cells = <2>;
242 #address-cells = <3>; 242 #address-cells = <3>;
243 reg = <8500 100>; 243 reg = <8500 100>;
244 compatible = "83xx"; 244 compatible = "fsl,mpc8349-pci";
245 device_type = "pci"; 245 device_type = "pci";
246 }; 246 };
247 247
@@ -301,7 +301,7 @@
301 #size-cells = <2>; 301 #size-cells = <2>;
302 #address-cells = <3>; 302 #address-cells = <3>;
303 reg = <8600 100>; 303 reg = <8600 100>;
304 compatible = "83xx"; 304 compatible = "fsl,mpc8349-pci";
305 device_type = "pci"; 305 device_type = "pci";
306 }; 306 };
307 307
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 1e914f31dd92..e3f7c1282068 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -169,7 +169,7 @@
169 #size-cells = <2>; 169 #size-cells = <2>;
170 #address-cells = <3>; 170 #address-cells = <3>;
171 reg = <8500 100>; 171 reg = <8500 100>;
172 compatible = "83xx"; 172 compatible = "fsl,mpc8349-pci";
173 device_type = "pci"; 173 device_type = "pci";
174 }; 174 };
175 175
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 364a969f5c2f..fc8dff9f6201 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -258,7 +258,7 @@
258 #size-cells = <2>; 258 #size-cells = <2>;
259 #address-cells = <3>; 259 #address-cells = <3>;
260 reg = <8000 1000>; 260 reg = <8000 1000>;
261 compatible = "85xx"; 261 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
262 device_type = "pci"; 262 device_type = "pci";
263 }; 263 };
264 264
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 070206fffe88..fb0b647f8c2a 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -193,7 +193,7 @@
193 #size-cells = <2>; 193 #size-cells = <2>;
194 #address-cells = <3>; 194 #address-cells = <3>;
195 reg = <8000 1000>; 195 reg = <8000 1000>;
196 compatible = "85xx"; 196 compatible = "fsl,mpc8540-pci";
197 device_type = "pci"; 197 device_type = "pci";
198 198
199 i8259@19000 { 199 i8259@19000 {
@@ -230,7 +230,7 @@
230 #size-cells = <2>; 230 #size-cells = <2>;
231 #address-cells = <3>; 231 #address-cells = <3>;
232 reg = <9000 1000>; 232 reg = <9000 1000>;
233 compatible = "85xx"; 233 compatible = "fsl,mpc8540-pci";
234 device_type = "pci"; 234 device_type = "pci";
235 }; 235 };
236 236
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 828592592460..4680e2010887 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -104,6 +104,7 @@
104 interrupts = <1d 2 1e 2 22 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 phy-connection-type = "rgmii-id";
107 }; 108 };
108 109
109 ethernet@26000 { 110 ethernet@26000 {
@@ -117,6 +118,7 @@
117 interrupts = <1f 2 20 2 21 2>; 118 interrupts = <1f 2 20 2 21 2>;
118 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 120 phy-handle = <&phy1>;
121 phy-connection-type = "rgmii-id";
120 }; 122 };
121 123
122 serial@4500 { 124 serial@4500 {
@@ -137,6 +139,223 @@
137 interrupt-parent = <&mpic>; 139 interrupt-parent = <&mpic>;
138 }; 140 };
139 141
142 pci@8000 {
143 compatible = "fsl,mpc8540-pci";
144 device_type = "pci";
145 interrupt-map-mask = <f800 0 0 7>;
146 interrupt-map = <
147
148 /* IDSEL 0x11 J17 Slot 1 */
149 8800 0 0 1 &mpic 2 1
150 8800 0 0 2 &mpic 3 1
151 8800 0 0 3 &mpic 4 1
152 8800 0 0 4 &mpic 1 1
153
154 /* IDSEL 0x12 J16 Slot 2 */
155
156 9000 0 0 1 &mpic 3 1
157 9000 0 0 2 &mpic 4 1
158 9000 0 0 3 &mpic 2 1
159 9000 0 0 4 &mpic 1 1>;
160
161 interrupt-parent = <&mpic>;
162 interrupts = <18 2>;
163 bus-range = <0 ff>;
164 ranges = <02000000 0 80000000 80000000 0 10000000
165 01000000 0 00000000 e2000000 0 00800000>;
166 clock-frequency = <3f940aa>;
167 #interrupt-cells = <1>;
168 #size-cells = <2>;
169 #address-cells = <3>;
170 reg = <8000 1000>;
171 };
172
173 pcie@9000 {
174 compatible = "fsl,mpc8548-pcie";
175 device_type = "pci";
176 #interrupt-cells = <1>;
177 #size-cells = <2>;
178 #address-cells = <3>;
179 reg = <9000 1000>;
180 bus-range = <0 ff>;
181 ranges = <02000000 0 90000000 90000000 0 10000000
182 01000000 0 00000000 e3000000 0 00800000>;
183 clock-frequency = <1fca055>;
184 interrupt-parent = <&mpic>;
185 interrupts = <1a 2>;
186 interrupt-map-mask = <f800 0 0 7>;
187 interrupt-map = <
188 /* IDSEL 0x0 */
189 0000 0 0 1 &mpic 4 1
190 0000 0 0 2 &mpic 5 1
191 0000 0 0 3 &mpic 6 1
192 0000 0 0 4 &mpic 7 1
193 >;
194 };
195
196 pcie@a000 {
197 compatible = "fsl,mpc8548-pcie";
198 device_type = "pci";
199 #interrupt-cells = <1>;
200 #size-cells = <2>;
201 #address-cells = <3>;
202 reg = <a000 1000>;
203 bus-range = <0 ff>;
204 ranges = <02000000 0 a0000000 a0000000 0 10000000
205 01000000 0 00000000 e2800000 0 00800000>;
206 clock-frequency = <1fca055>;
207 interrupt-parent = <&mpic>;
208 interrupts = <19 2>;
209 interrupt-map-mask = <f800 0 0 7>;
210 interrupt-map = <
211 /* IDSEL 0x0 */
212 0000 0 0 1 &mpic 0 1
213 0000 0 0 2 &mpic 1 1
214 0000 0 0 3 &mpic 2 1
215 0000 0 0 4 &mpic 3 1
216 >;
217 };
218
219 pcie@b000 {
220 compatible = "fsl,mpc8548-pcie";
221 device_type = "pci";
222 #interrupt-cells = <1>;
223 #size-cells = <2>;
224 #address-cells = <3>;
225 reg = <b000 1000>;
226 bus-range = <0 ff>;
227 ranges = <02000000 0 b0000000 b0000000 0 10000000
228 01000000 0 00000000 e3800000 0 00800000>;
229 clock-frequency = <1fca055>;
230 interrupt-parent = <&mpic>;
231 interrupts = <1b 2>;
232 interrupt-map-mask = <f800 0 0 7>;
233 interrupt-map = <
234
235 // IDSEL 0x1a
236 d000 0 0 1 &i8259 6 2
237 d000 0 0 2 &i8259 3 2
238 d000 0 0 3 &i8259 4 2
239 d000 0 0 4 &i8259 5 2
240
241 // IDSEL 0x1b
242 d800 0 0 1 &i8259 5 2
243 d800 0 0 2 &i8259 0 0
244 d800 0 0 3 &i8259 0 0
245 d800 0 0 4 &i8259 0 0
246
247 // IDSEL 0x1c USB
248 e000 0 0 1 &i8259 9 2
249 e000 0 0 2 &i8259 a 2
250 e000 0 0 3 &i8259 c 2
251 e000 0 0 4 &i8259 7 2
252
253 // IDSEL 0x1d Audio
254 e800 0 0 1 &i8259 9 2
255 e800 0 0 2 &i8259 a 2
256 e800 0 0 3 &i8259 b 2
257 e800 0 0 4 &i8259 0 0
258
259 // IDSEL 0x1e Legacy
260 f000 0 0 1 &i8259 c 2
261 f000 0 0 2 &i8259 0 0
262 f000 0 0 3 &i8259 0 0
263 f000 0 0 4 &i8259 0 0
264
265 // IDSEL 0x1f IDE/SATA
266 f800 0 0 1 &i8259 6 2
267 f800 0 0 2 &i8259 0 0
268 f800 0 0 3 &i8259 0 0
269 f800 0 0 4 &i8259 0 0
270 >;
271 uli1575@0 {
272 reg = <0 0 0 0 0>;
273 #size-cells = <2>;
274 #address-cells = <3>;
275 ranges = <02000000 0 b0000000
276 02000000 0 b0000000
277 0 10000000
278 01000000 0 00000000
279 01000000 0 00000000
280 0 00080000>;
281
282 pci_bridge@0 {
283 reg = <0 0 0 0 0>;
284 #size-cells = <2>;
285 #address-cells = <3>;
286 ranges = <02000000 0 b0000000
287 02000000 0 b0000000
288 0 20000000
289 01000000 0 00000000
290 01000000 0 00000000
291 0 00100000>;
292
293 isa@1e {
294 device_type = "isa";
295 #interrupt-cells = <2>;
296 #size-cells = <1>;
297 #address-cells = <2>;
298 reg = <f000 0 0 0 0>;
299 ranges = <1 0 01000000 0 0
300 00001000>;
301 interrupt-parent = <&i8259>;
302
303 i8259: interrupt-controller@20 {
304 reg = <1 20 2
305 1 a0 2
306 1 4d0 2>;
307 clock-frequency = <0>;
308 interrupt-controller;
309 device_type = "interrupt-controller";
310 #address-cells = <0>;
311 #interrupt-cells = <2>;
312 built-in;
313 compatible = "chrp,iic";
314 interrupts = <9 2>;
315 interrupt-parent =
316 <&mpic>;
317 };
318
319 i8042@60 {
320 #size-cells = <0>;
321 #address-cells = <1>;
322 reg = <1 60 1 1 64 1>;
323 interrupts = <1 3 c 3>;
324 interrupt-parent =
325 <&i8259>;
326
327 keyboard@0 {
328 reg = <0>;
329 compatible = "pnpPNP,303";
330 };
331
332 mouse@1 {
333 reg = <1>;
334 compatible = "pnpPNP,f03";
335 };
336 };
337
338 rtc@70 {
339 compatible =
340 "pnpPNP,b00";
341 reg = <1 70 2>;
342 };
343
344 gpio@400 {
345 reg = <1 400 80>;
346 };
347 };
348 };
349 };
350
351 };
352
353 global-utilities@e0000 { //global utilities block
354 compatible = "fsl,mpc8548-guts";
355 reg = <e0000 1000>;
356 fsl,has-rstcr;
357 };
358
140 mpic: pic@40000 { 359 mpic: pic@40000 {
141 clock-frequency = <0>; 360 clock-frequency = <0>;
142 interrupt-controller; 361 interrupt-controller;
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 9d0b84b66cd4..d215d21fff42 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -1,5 +1,5 @@
1/* 1/*
2 * MPC8555 CDS Device Tree Source 2 * MPC8548 CDS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006 Freescale Semiconductor Inc.
5 * 5 *
@@ -44,8 +44,14 @@
44 #size-cells = <1>; 44 #size-cells = <1>;
45 #interrupt-cells = <2>; 45 #interrupt-cells = <2>;
46 device_type = "soc"; 46 device_type = "soc";
47 ranges = <0 e0000000 00100000>; 47 ranges = <00001000 e0001000 000ff000
48 reg = <e0000000 00100000>; // CCSRBAR 1M 48 80000000 80000000 10000000
49 e2000000 e2000000 00800000
50 90000000 90000000 10000000
51 e2800000 e2800000 00800000
52 a0000000 a0000000 20000000
53 e3000000 e3000000 01000000>;
54 reg = <e0000000 00001000>; // CCSRBAR
49 bus-frequency = <0>; 55 bus-frequency = <0>;
50 56
51 memory-controller@2000 { 57 memory-controller@2000 {
@@ -162,8 +168,8 @@
162 serial@4500 { 168 serial@4500 {
163 device_type = "serial"; 169 device_type = "serial";
164 compatible = "ns16550"; 170 compatible = "ns16550";
165 reg = <4500 100>; // reg base, size 171 reg = <4500 100>; // reg base, size
166 clock-frequency = <0>; // should we fill in in uboot? 172 clock-frequency = <0>; // should we fill in in uboot?
167 interrupts = <2a 2>; 173 interrupts = <2a 2>;
168 interrupt-parent = <&mpic>; 174 interrupt-parent = <&mpic>;
169 }; 175 };
@@ -172,7 +178,7 @@
172 device_type = "serial"; 178 device_type = "serial";
173 compatible = "ns16550"; 179 compatible = "ns16550";
174 reg = <4600 100>; // reg base, size 180 reg = <4600 100>; // reg base, size
175 clock-frequency = <0>; // should we fill in in uboot? 181 clock-frequency = <0>; // should we fill in in uboot?
176 interrupts = <2a 2>; 182 interrupts = <2a 2>;
177 interrupt-parent = <&mpic>; 183 interrupt-parent = <&mpic>;
178 }; 184 };
@@ -183,77 +189,154 @@
183 fsl,has-rstcr; 189 fsl,has-rstcr;
184 }; 190 };
185 191
186 pci1: pci@8000 { 192 pci@8000 {
187 interrupt-map-mask = <1f800 0 0 7>; 193 interrupt-map-mask = <f800 0 0 7>;
188 interrupt-map = < 194 interrupt-map = <
195 /* IDSEL 0x4 (PCIX Slot 2) */
196 02000 0 0 1 &mpic 0 1
197 02000 0 0 2 &mpic 1 1
198 02000 0 0 3 &mpic 2 1
199 02000 0 0 4 &mpic 3 1
200
201 /* IDSEL 0x5 (PCIX Slot 3) */
202 02800 0 0 1 &mpic 1 1
203 02800 0 0 2 &mpic 2 1
204 02800 0 0 3 &mpic 3 1
205 02800 0 0 4 &mpic 0 1
206
207 /* IDSEL 0x6 (PCIX Slot 4) */
208 03000 0 0 1 &mpic 2 1
209 03000 0 0 2 &mpic 3 1
210 03000 0 0 3 &mpic 0 1
211 03000 0 0 4 &mpic 1 1
212
213 /* IDSEL 0x8 (PCIX Slot 5) */
214 04000 0 0 1 &mpic 0 1
215 04000 0 0 2 &mpic 1 1
216 04000 0 0 3 &mpic 2 1
217 04000 0 0 4 &mpic 3 1
218
219 /* IDSEL 0xC (Tsi310 bridge) */
220 06000 0 0 1 &mpic 0 1
221 06000 0 0 2 &mpic 1 1
222 06000 0 0 3 &mpic 2 1
223 06000 0 0 4 &mpic 3 1
224
225 /* IDSEL 0x14 (Slot 2) */
226 0a000 0 0 1 &mpic 0 1
227 0a000 0 0 2 &mpic 1 1
228 0a000 0 0 3 &mpic 2 1
229 0a000 0 0 4 &mpic 3 1
230
231 /* IDSEL 0x15 (Slot 3) */
232 0a800 0 0 1 &mpic 1 1
233 0a800 0 0 2 &mpic 2 1
234 0a800 0 0 3 &mpic 3 1
235 0a800 0 0 4 &mpic 0 1
236
237 /* IDSEL 0x16 (Slot 4) */
238 0b000 0 0 1 &mpic 2 1
239 0b000 0 0 2 &mpic 3 1
240 0b000 0 0 3 &mpic 0 1
241 0b000 0 0 4 &mpic 1 1
242
243 /* IDSEL 0x18 (Slot 5) */
244 0c000 0 0 1 &mpic 0 1
245 0c000 0 0 2 &mpic 1 1
246 0c000 0 0 3 &mpic 2 1
247 0c000 0 0 4 &mpic 3 1
248
249 /* IDSEL 0x1C (Tsi310 bridge PCI primary) */
250 0E000 0 0 1 &mpic 0 1
251 0E000 0 0 2 &mpic 1 1
252 0E000 0 0 3 &mpic 2 1
253 0E000 0 0 4 &mpic 3 1>;
189 254
190 /* IDSEL 0x10 */
191 08000 0 0 1 &mpic 0 1
192 08000 0 0 2 &mpic 1 1
193 08000 0 0 3 &mpic 2 1
194 08000 0 0 4 &mpic 3 1
195
196 /* IDSEL 0x11 */
197 08800 0 0 1 &mpic 0 1
198 08800 0 0 2 &mpic 1 1
199 08800 0 0 3 &mpic 2 1
200 08800 0 0 4 &mpic 3 1
201
202 /* IDSEL 0x12 (Slot 1) */
203 09000 0 0 1 &mpic 0 1
204 09000 0 0 2 &mpic 1 1
205 09000 0 0 3 &mpic 2 1
206 09000 0 0 4 &mpic 3 1
207
208 /* IDSEL 0x13 (Slot 2) */
209 09800 0 0 1 &mpic 1 1
210 09800 0 0 2 &mpic 2 1
211 09800 0 0 3 &mpic 3 1
212 09800 0 0 4 &mpic 0 1
213
214 /* IDSEL 0x14 (Slot 3) */
215 0a000 0 0 1 &mpic 2 1
216 0a000 0 0 2 &mpic 3 1
217 0a000 0 0 3 &mpic 0 1
218 0a000 0 0 4 &mpic 1 1
219
220 /* IDSEL 0x15 (Slot 4) */
221 0a800 0 0 1 &mpic 3 1
222 0a800 0 0 2 &mpic 0 1
223 0a800 0 0 3 &mpic 1 1
224 0a800 0 0 4 &mpic 2 1
225
226 /* Bus 1 (Tundra Bridge) */
227 /* IDSEL 0x12 (ISA bridge) */
228 19000 0 0 1 &mpic 0 1
229 19000 0 0 2 &mpic 1 1
230 19000 0 0 3 &mpic 2 1
231 19000 0 0 4 &mpic 3 1>;
232 interrupt-parent = <&mpic>; 255 interrupt-parent = <&mpic>;
233 interrupts = <18 2>; 256 interrupts = <18 2>;
234 bus-range = <0 0>; 257 bus-range = <0 0>;
235 ranges = <02000000 0 80000000 80000000 0 20000000 258 ranges = <02000000 0 80000000 80000000 0 10000000
236 01000000 0 00000000 e2000000 0 00100000>; 259 01000000 0 00000000 e2000000 0 00800000>;
237 clock-frequency = <3f940aa>; 260 clock-frequency = <3f940aa>;
238 #interrupt-cells = <1>; 261 #interrupt-cells = <1>;
239 #size-cells = <2>; 262 #size-cells = <2>;
240 #address-cells = <3>; 263 #address-cells = <3>;
241 reg = <8000 1000>; 264 reg = <8000 1000>;
242 compatible = "85xx"; 265 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
243 device_type = "pci"; 266 device_type = "pci";
244 267
245 i8259@19000 { 268 pci_bridge@1c {
246 clock-frequency = <0>; 269 interrupt-map-mask = <f800 0 0 7>;
247 interrupt-controller; 270 interrupt-map = <
248 device_type = "interrupt-controller"; 271
249 reg = <19000 0 0 0 1>; 272 /* IDSEL 0x00 (PrPMC Site) */
250 #address-cells = <0>; 273 0000 0 0 1 &mpic 0 1
251 #interrupt-cells = <2>; 274 0000 0 0 2 &mpic 1 1
252 built-in; 275 0000 0 0 3 &mpic 2 1
253 compatible = "chrp,iic"; 276 0000 0 0 4 &mpic 3 1
254 big-endian; 277
255 interrupts = <1>; 278 /* IDSEL 0x04 (VIA chip) */
256 interrupt-parent = <&pci1>; 279 2000 0 0 1 &mpic 0 1
280 2000 0 0 2 &mpic 1 1
281 2000 0 0 3 &mpic 2 1
282 2000 0 0 4 &mpic 3 1
283
284 /* IDSEL 0x05 (8139) */
285 2800 0 0 1 &mpic 1 1
286
287 /* IDSEL 0x06 (Slot 6) */
288 3000 0 0 1 &mpic 2 1
289 3000 0 0 2 &mpic 3 1
290 3000 0 0 3 &mpic 0 1
291 3000 0 0 4 &mpic 1 1
292
293 /* IDESL 0x07 (Slot 7) */
294 3800 0 0 1 &mpic 3 1
295 3800 0 0 2 &mpic 0 1
296 3800 0 0 3 &mpic 1 1
297 3800 0 0 4 &mpic 2 1>;
298
299 reg = <e000 0 0 0 0>;
300 #interrupt-cells = <1>;
301 #size-cells = <2>;
302 #address-cells = <3>;
303 ranges = <02000000 0 80000000
304 02000000 0 80000000
305 0 20000000
306 01000000 0 00000000
307 01000000 0 00000000
308 0 00080000>;
309 clock-frequency = <1fca055>;
310
311 isa@4 {
312 device_type = "isa";
313 #interrupt-cells = <2>;
314 #size-cells = <1>;
315 #address-cells = <2>;
316 reg = <2000 0 0 0 0>;
317 ranges = <1 0 01000000 0 0 00001000>;
318 interrupt-parent = <&i8259>;
319
320 i8259: interrupt-controller@20 {
321 clock-frequency = <0>;
322 interrupt-controller;
323 device_type = "interrupt-controller";
324 reg = <1 20 2
325 1 a0 2
326 1 4d0 2>;
327 #address-cells = <0>;
328 #interrupt-cells = <2>;
329 built-in;
330 compatible = "chrp,iic";
331 interrupts = <0 1>;
332 interrupt-parent = <&mpic>;
333 };
334
335 rtc@70 {
336 compatible = "pnpPNP,b00";
337 reg = <1 70 2>;
338 };
339 };
257 }; 340 };
258 }; 341 };
259 342
@@ -263,20 +346,45 @@
263 346
264 /* IDSEL 0x15 */ 347 /* IDSEL 0x15 */
265 a800 0 0 1 &mpic b 1 348 a800 0 0 1 &mpic b 1
266 a800 0 0 2 &mpic b 1 349 a800 0 0 2 &mpic 1 1
267 a800 0 0 3 &mpic b 1 350 a800 0 0 3 &mpic 2 1
268 a800 0 0 4 &mpic b 1>; 351 a800 0 0 4 &mpic 3 1>;
352
269 interrupt-parent = <&mpic>; 353 interrupt-parent = <&mpic>;
270 interrupts = <19 2>; 354 interrupts = <19 2>;
271 bus-range = <0 0>; 355 bus-range = <0 0>;
272 ranges = <02000000 0 a0000000 a0000000 0 20000000 356 ranges = <02000000 0 90000000 90000000 0 10000000
273 01000000 0 00000000 e3000000 0 00100000>; 357 01000000 0 00000000 e2800000 0 00800000>;
274 clock-frequency = <3f940aa>; 358 clock-frequency = <3f940aa>;
275 #interrupt-cells = <1>; 359 #interrupt-cells = <1>;
276 #size-cells = <2>; 360 #size-cells = <2>;
277 #address-cells = <3>; 361 #address-cells = <3>;
278 reg = <9000 1000>; 362 reg = <9000 1000>;
279 compatible = "85xx"; 363 compatible = "fsl,mpc8540-pci";
364 device_type = "pci";
365 };
366 /* PCI Express */
367 pcie@a000 {
368 interrupt-map-mask = <f800 0 0 7>;
369 interrupt-map = <
370
371 /* IDSEL 0x0 (PEX) */
372 00000 0 0 1 &mpic 0 1
373 00000 0 0 2 &mpic 1 1
374 00000 0 0 3 &mpic 2 1
375 00000 0 0 4 &mpic 3 1>;
376
377 interrupt-parent = <&mpic>;
378 interrupts = <1a 2>;
379 bus-range = <0 ff>;
380 ranges = <02000000 0 a0000000 a0000000 0 20000000
381 01000000 0 00000000 e3000000 0 08000000>;
382 clock-frequency = <1fca055>;
383 #interrupt-cells = <1>;
384 #size-cells = <2>;
385 #address-cells = <3>;
386 reg = <a000 1000>;
387 compatible = "fsl,mpc8548-pcie";
280 device_type = "pci"; 388 device_type = "pci";
281 }; 389 };
282 390
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 17e45d9a382a..c3c888252121 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -193,7 +193,7 @@
193 #size-cells = <2>; 193 #size-cells = <2>;
194 #address-cells = <3>; 194 #address-cells = <3>;
195 reg = <8000 1000>; 195 reg = <8000 1000>;
196 compatible = "85xx"; 196 compatible = "fsl,mpc8540-pci";
197 device_type = "pci"; 197 device_type = "pci";
198 198
199 i8259@19000 { 199 i8259@19000 {
@@ -230,7 +230,7 @@
230 #size-cells = <2>; 230 #size-cells = <2>;
231 #address-cells = <3>; 231 #address-cells = <3>;
232 reg = <9000 1000>; 232 reg = <9000 1000>;
233 compatible = "85xx"; 233 compatible = "fsl,mpc8540-pci";
234 device_type = "pci"; 234 device_type = "pci";
235 }; 235 };
236 236
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 21ccaaa27993..16dbe848cecf 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -136,7 +136,7 @@
136 #interrupt-cells = <1>; 136 #interrupt-cells = <1>;
137 #size-cells = <2>; 137 #size-cells = <2>;
138 #address-cells = <3>; 138 #address-cells = <3>;
139 compatible = "85xx"; 139 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
140 device_type = "pci"; 140 device_type = "pci";
141 reg = <8000 1000>; 141 reg = <8000 1000>;
142 clock-frequency = <3f940aa>; 142 clock-frequency = <3f940aa>;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 6bb18f2807a8..b1dcfbe8c1f8 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -170,6 +170,66 @@
170 interrupt-parent = <&mpic>; 170 interrupt-parent = <&mpic>;
171 }; 171 };
172 172
173 global-utilities@e0000 { //global utilities block
174 compatible = "fsl,mpc8548-guts";
175 reg = <e0000 1000>;
176 fsl,has-rstcr;
177 };
178
179 pci@8000 {
180 interrupt-map-mask = <f800 0 0 7>;
181 interrupt-map = <
182 /* IDSEL 0x12 AD18 */
183 9000 0 0 1 &mpic 5 1
184 9000 0 0 2 &mpic 6 1
185 9000 0 0 3 &mpic 7 1
186 9000 0 0 4 &mpic 4 1
187
188 /* IDSEL 0x13 AD19 */
189 9800 0 0 1 &mpic 6 1
190 9800 0 0 2 &mpic 7 1
191 9800 0 0 3 &mpic 4 1
192 9800 0 0 4 &mpic 5 1>;
193
194 interrupt-parent = <&mpic>;
195 interrupts = <18 2>;
196 bus-range = <0 ff>;
197 ranges = <02000000 0 80000000 80000000 0 20000000
198 01000000 0 00000000 e2000000 0 00800000>;
199 clock-frequency = <3f940aa>;
200 #interrupt-cells = <1>;
201 #size-cells = <2>;
202 #address-cells = <3>;
203 reg = <8000 1000>;
204 compatible = "fsl,mpc8540-pci";
205 device_type = "pci";
206 };
207
208 /* PCI Express */
209 pcie@a000 {
210 interrupt-map-mask = <f800 0 0 7>;
211 interrupt-map = <
212
213 /* IDSEL 0x0 (PEX) */
214 00000 0 0 1 &mpic 0 1
215 00000 0 0 2 &mpic 1 1
216 00000 0 0 3 &mpic 2 1
217 00000 0 0 4 &mpic 3 1>;
218
219 interrupt-parent = <&mpic>;
220 interrupts = <1a 2>;
221 bus-range = <0 ff>;
222 ranges = <02000000 0 a0000000 a0000000 0 20000000
223 01000000 0 00000000 e3000000 0 08000000>;
224 clock-frequency = <1fca055>;
225 #interrupt-cells = <1>;
226 #size-cells = <2>;
227 #address-cells = <3>;
228 reg = <a000 1000>;
229 compatible = "fsl,mpc8548-pcie";
230 device_type = "pci";
231 };
232
173 serial@4600 { 233 serial@4600 {
174 device_type = "serial"; 234 device_type = "serial";
175 compatible = "ns16550"; 235 compatible = "ns16550";
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 6a78a2b37c08..5d82709cfcbb 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -211,8 +211,8 @@
211 interrupt-parent = <&mpic>; 211 interrupt-parent = <&mpic>;
212 }; 212 };
213 213
214 pci@8000 { 214 pcie@8000 {
215 compatible = "86xx"; 215 compatible = "fsl,mpc8641-pcie";
216 device_type = "pci"; 216 device_type = "pci";
217 #interrupt-cells = <1>; 217 #interrupt-cells = <1>;
218 #size-cells = <2>; 218 #size-cells = <2>;
@@ -399,8 +399,8 @@
399 399
400 }; 400 };
401 401
402 pci@9000 { 402 pcie@9000 {
403 compatible = "86xx"; 403 compatible = "fsl,mpc8641-pcie";
404 device_type = "pci"; 404 device_type = "pci";
405 #interrupt-cells = <1>; 405 #interrupt-cells = <1>;
406 #size-cells = <2>; 406 #size-cells = <2>;
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/lite5200_defconfig
index d12a981398b8..9c30ca451617 100644
--- a/arch/powerpc/configs/lite5200_defconfig
+++ b/arch/powerpc/configs/lite5200_defconfig
@@ -196,7 +196,7 @@ CONFIG_PM=y
196# CONFIG_PM_LEGACY is not set 196# CONFIG_PM_LEGACY is not set
197# CONFIG_PM_DEBUG is not set 197# CONFIG_PM_DEBUG is not set
198# CONFIG_PM_SYSFS_DEPRECATED is not set 198# CONFIG_PM_SYSFS_DEPRECATED is not set
199# CONFIG_SOFTWARE_SUSPEND is not set 199# CONFIG_HIBERNATION is not set
200CONFIG_SECCOMP=y 200CONFIG_SECCOMP=y
201# CONFIG_WANT_DEVICE_TREE is not set 201# CONFIG_WANT_DEVICE_TREE is not set
202CONFIG_ISA_DMA_API=y 202CONFIG_ISA_DMA_API=y
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig
index c40a25a79cbb..7995231def26 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/mpc8544_ds_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.22
4# Sun Jul 1 23:56:58 2007 4# Fri Jul 20 14:09:13 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22# CONFIG_SPE is not set
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,6 +31,7 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
@@ -25,28 +43,8 @@ CONFIG_PPC_UDBG_16550=y
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48# CONFIG_SPE is not set
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
@@ -63,13 +61,12 @@ CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 61CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 62CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 63CONFIG_SYSVIPC=y
66CONFIG_IPC_NS=y
67CONFIG_SYSVIPC_SYSCTL=y 64CONFIG_SYSVIPC_SYSCTL=y
68CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
69CONFIG_BSD_PROCESS_ACCT=y 66CONFIG_BSD_PROCESS_ACCT=y
70# CONFIG_BSD_PROCESS_ACCT_V3 is not set 67# CONFIG_BSD_PROCESS_ACCT_V3 is not set
71# CONFIG_TASKSTATS is not set 68# CONFIG_TASKSTATS is not set
72# CONFIG_UTS_NS is not set 69# CONFIG_USER_NS is not set
73CONFIG_AUDIT=y 70CONFIG_AUDIT=y
74# CONFIG_AUDITSYSCALL is not set 71# CONFIG_AUDITSYSCALL is not set
75CONFIG_IKCONFIG=y 72CONFIG_IKCONFIG=y
@@ -86,7 +83,7 @@ CONFIG_SYSCTL_SYSCALL=y
86CONFIG_KALLSYMS=y 83CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 84CONFIG_KALLSYMS_ALL=y
88# CONFIG_KALLSYMS_EXTRA_PASS is not set 85# CONFIG_KALLSYMS_EXTRA_PASS is not set
89# CONFIG_HOTPLUG is not set 86CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y 87CONFIG_PRINTK=y
91CONFIG_BUG=y 88CONFIG_BUG=y
92CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
@@ -105,24 +102,17 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 105CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 106CONFIG_MODULE_UNLOAD=y
114CONFIG_MODULE_FORCE_UNLOAD=y 107CONFIG_MODULE_FORCE_UNLOAD=y
115CONFIG_MODVERSIONS=y 108CONFIG_MODVERSIONS=y
116# CONFIG_MODULE_SRCVERSION_ALL is not set 109# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_KMOD=y 110CONFIG_KMOD=y
118
119#
120# Block layer
121#
122CONFIG_BLOCK=y 111CONFIG_BLOCK=y
123CONFIG_LBD=y 112CONFIG_LBD=y
124# CONFIG_BLK_DEV_IO_TRACE is not set 113# CONFIG_BLK_DEV_IO_TRACE is not set
125# CONFIG_LSF is not set 114# CONFIG_LSF is not set
115# CONFIG_BLK_DEV_BSG is not set
126 116
127# 117#
128# IO Schedulers 118# IO Schedulers
@@ -153,7 +143,7 @@ CONFIG_MPC8544_DS=y
153CONFIG_MPC85xx=y 143CONFIG_MPC85xx=y
154CONFIG_MPIC=y 144CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set 145# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set 146CONFIG_PPC_I8259=y
157# CONFIG_PPC_RTAS is not set 147# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set 148# CONFIG_MMIO_NVRAM is not set
159# CONFIG_PPC_MPC106 is not set 149# CONFIG_PPC_MPC106 is not set
@@ -191,6 +181,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
191CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
192# CONFIG_RESOURCES_64BIT is not set 182# CONFIG_RESOURCES_64BIT is not set
193CONFIG_ZONE_DMA_FLAG=1 183CONFIG_ZONE_DMA_FLAG=1
184CONFIG_BOUNCE=y
185CONFIG_VIRT_TO_BUS=y
194CONFIG_PROC_DEVICETREE=y 186CONFIG_PROC_DEVICETREE=y
195CONFIG_CMDLINE_BOOL=y 187CONFIG_CMDLINE_BOOL=y
196CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200" 188CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200"
@@ -205,15 +197,21 @@ CONFIG_ISA_DMA_API=y
205# 197#
206CONFIG_ZONE_DMA=y 198CONFIG_ZONE_DMA=y
207CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
208CONFIG_PPC_INDIRECT_PCI_BE=y
209CONFIG_FSL_SOC=y 200CONFIG_FSL_SOC=y
210# CONFIG_PCI is not set 201CONFIG_FSL_PCI=y
211# CONFIG_PCI_DOMAINS is not set 202CONFIG_PCI=y
212# CONFIG_ARCH_SUPPORTS_MSI is not set 203CONFIG_PCI_DOMAINS=y
204CONFIG_PCI_SYSCALL=y
205# CONFIG_PCIEPORTBUS is not set
206CONFIG_ARCH_SUPPORTS_MSI=y
207# CONFIG_PCI_MSI is not set
208# CONFIG_PCI_DEBUG is not set
213 209
214# 210#
215# PCCARD (PCMCIA/CardBus) support 211# PCCARD (PCMCIA/CardBus) support
216# 212#
213# CONFIG_PCCARD is not set
214# CONFIG_HOTPLUG_PCI is not set
217 215
218# 216#
219# Advanced setup 217# Advanced setup
@@ -254,7 +252,6 @@ CONFIG_ASK_IP_FIB_HASH=y
254CONFIG_IP_FIB_HASH=y 252CONFIG_IP_FIB_HASH=y
255CONFIG_IP_MULTIPLE_TABLES=y 253CONFIG_IP_MULTIPLE_TABLES=y
256CONFIG_IP_ROUTE_MULTIPATH=y 254CONFIG_IP_ROUTE_MULTIPATH=y
257# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
258CONFIG_IP_ROUTE_VERBOSE=y 255CONFIG_IP_ROUTE_VERBOSE=y
259CONFIG_IP_PNP=y 256CONFIG_IP_PNP=y
260CONFIG_IP_PNP_DHCP=y 257CONFIG_IP_PNP_DHCP=y
@@ -330,6 +327,7 @@ CONFIG_FIB_RULES=y
330# CONFIG_MAC80211 is not set 327# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set 328# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set 329# CONFIG_RFKILL is not set
330# CONFIG_NET_9P is not set
333 331
334# 332#
335# Device Drivers 333# Device Drivers
@@ -340,45 +338,35 @@ CONFIG_FIB_RULES=y
340# 338#
341CONFIG_STANDALONE=y 339CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y 340CONFIG_PREVENT_FIRMWARE_BUILD=y
341# CONFIG_FW_LOADER is not set
343# CONFIG_DEBUG_DRIVER is not set 342# CONFIG_DEBUG_DRIVER is not set
344# CONFIG_DEBUG_DEVRES is not set 343# CONFIG_DEBUG_DEVRES is not set
345# CONFIG_SYS_HYPERVISOR is not set 344# CONFIG_SYS_HYPERVISOR is not set
346
347#
348# Connector - unified userspace <-> kernelspace linker
349#
350# CONFIG_CONNECTOR is not set 345# CONFIG_CONNECTOR is not set
351# CONFIG_MTD is not set 346# CONFIG_MTD is not set
352
353#
354# Parallel port support
355#
356# CONFIG_PARPORT is not set 347# CONFIG_PARPORT is not set
357 348CONFIG_BLK_DEV=y
358#
359# Plug and Play support
360#
361# CONFIG_PNPACPI is not set
362
363#
364# Block devices
365#
366# CONFIG_BLK_DEV_FD is not set 349# CONFIG_BLK_DEV_FD is not set
350# CONFIG_BLK_CPQ_DA is not set
351# CONFIG_BLK_CPQ_CISS_DA is not set
352# CONFIG_BLK_DEV_DAC960 is not set
353# CONFIG_BLK_DEV_UMEM is not set
367# CONFIG_BLK_DEV_COW_COMMON is not set 354# CONFIG_BLK_DEV_COW_COMMON is not set
368CONFIG_BLK_DEV_LOOP=y 355CONFIG_BLK_DEV_LOOP=y
369# CONFIG_BLK_DEV_CRYPTOLOOP is not set 356# CONFIG_BLK_DEV_CRYPTOLOOP is not set
370CONFIG_BLK_DEV_NBD=y 357CONFIG_BLK_DEV_NBD=y
358# CONFIG_BLK_DEV_SX8 is not set
371CONFIG_BLK_DEV_RAM=y 359CONFIG_BLK_DEV_RAM=y
372CONFIG_BLK_DEV_RAM_COUNT=2 360CONFIG_BLK_DEV_RAM_COUNT=2
373CONFIG_BLK_DEV_RAM_SIZE=16384 361CONFIG_BLK_DEV_RAM_SIZE=16384
374CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
375# CONFIG_CDROM_PKTCDVD is not set 363# CONFIG_CDROM_PKTCDVD is not set
376# CONFIG_ATA_OVER_ETH is not set 364# CONFIG_ATA_OVER_ETH is not set
377 365CONFIG_MISC_DEVICES=y
378# 366# CONFIG_PHANTOM is not set
379# Misc devices 367# CONFIG_EEPROM_93CX6 is not set
380# 368# CONFIG_SGI_IOC4 is not set
381# CONFIG_BLINK is not set 369# CONFIG_TIFM_CORE is not set
382# CONFIG_IDE is not set 370# CONFIG_IDE is not set
383 371
384# 372#
@@ -386,6 +374,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
386# 374#
387# CONFIG_RAID_ATTRS is not set 375# CONFIG_RAID_ATTRS is not set
388CONFIG_SCSI=y 376CONFIG_SCSI=y
377CONFIG_SCSI_DMA=y
389# CONFIG_SCSI_TGT is not set 378# CONFIG_SCSI_TGT is not set
390# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
391CONFIG_SCSI_PROC_FS=y 380CONFIG_SCSI_PROC_FS=y
@@ -422,25 +411,120 @@ CONFIG_SCSI_WAIT_SCAN=m
422# SCSI low-level drivers 411# SCSI low-level drivers
423# 412#
424# CONFIG_ISCSI_TCP is not set 413# CONFIG_ISCSI_TCP is not set
414# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
415# CONFIG_SCSI_3W_9XXX is not set
416# CONFIG_SCSI_ACARD is not set
417# CONFIG_SCSI_AACRAID is not set
418# CONFIG_SCSI_AIC7XXX is not set
419# CONFIG_SCSI_AIC7XXX_OLD is not set
420# CONFIG_SCSI_AIC79XX is not set
421# CONFIG_SCSI_AIC94XX is not set
422# CONFIG_SCSI_DPT_I2O is not set
423# CONFIG_SCSI_ARCMSR is not set
424# CONFIG_MEGARAID_NEWGEN is not set
425# CONFIG_MEGARAID_LEGACY is not set
426# CONFIG_MEGARAID_SAS is not set
427# CONFIG_SCSI_HPTIOP is not set
428# CONFIG_SCSI_BUSLOGIC is not set
429# CONFIG_SCSI_DMX3191D is not set
430# CONFIG_SCSI_EATA is not set
431# CONFIG_SCSI_FUTURE_DOMAIN is not set
432# CONFIG_SCSI_GDTH is not set
433# CONFIG_SCSI_IPS is not set
434# CONFIG_SCSI_INITIO is not set
435# CONFIG_SCSI_INIA100 is not set
436# CONFIG_SCSI_STEX is not set
437# CONFIG_SCSI_SYM53C8XX_2 is not set
438# CONFIG_SCSI_IPR is not set
439# CONFIG_SCSI_QLOGIC_1280 is not set
440# CONFIG_SCSI_QLA_FC is not set
441# CONFIG_SCSI_QLA_ISCSI is not set
442# CONFIG_SCSI_LPFC is not set
443# CONFIG_SCSI_DC395x is not set
444# CONFIG_SCSI_DC390T is not set
445# CONFIG_SCSI_NSP32 is not set
425# CONFIG_SCSI_DEBUG is not set 446# CONFIG_SCSI_DEBUG is not set
447# CONFIG_SCSI_SRP is not set
426CONFIG_ATA=y 448CONFIG_ATA=y
427# CONFIG_ATA_NONSTANDARD is not set 449# CONFIG_ATA_NONSTANDARD is not set
450# CONFIG_SATA_AHCI is not set
451# CONFIG_SATA_SVW is not set
452# CONFIG_ATA_PIIX is not set
453# CONFIG_SATA_MV is not set
454# CONFIG_SATA_NV is not set
455# CONFIG_PDC_ADMA is not set
456# CONFIG_SATA_QSTOR is not set
457# CONFIG_SATA_PROMISE is not set
458# CONFIG_SATA_SX4 is not set
459# CONFIG_SATA_SIL is not set
460# CONFIG_SATA_SIL24 is not set
461# CONFIG_SATA_SIS is not set
462# CONFIG_SATA_ULI is not set
463# CONFIG_SATA_VIA is not set
464# CONFIG_SATA_VITESSE is not set
465# CONFIG_SATA_INIC162X is not set
466# CONFIG_PATA_ALI is not set
467# CONFIG_PATA_AMD is not set
468# CONFIG_PATA_ARTOP is not set
469# CONFIG_PATA_ATIIXP is not set
470# CONFIG_PATA_CMD640_PCI is not set
471# CONFIG_PATA_CMD64X is not set
472# CONFIG_PATA_CS5520 is not set
473# CONFIG_PATA_CS5530 is not set
474# CONFIG_PATA_CYPRESS is not set
475# CONFIG_PATA_EFAR is not set
476# CONFIG_ATA_GENERIC is not set
477# CONFIG_PATA_HPT366 is not set
478# CONFIG_PATA_HPT37X is not set
479# CONFIG_PATA_HPT3X2N is not set
480# CONFIG_PATA_HPT3X3 is not set
481# CONFIG_PATA_IT821X is not set
482# CONFIG_PATA_IT8213 is not set
483# CONFIG_PATA_JMICRON is not set
484# CONFIG_PATA_TRIFLEX is not set
485# CONFIG_PATA_MARVELL is not set
486# CONFIG_PATA_MPIIX is not set
487# CONFIG_PATA_OLDPIIX is not set
488# CONFIG_PATA_NETCELL is not set
489# CONFIG_PATA_NS87410 is not set
490# CONFIG_PATA_OPTI is not set
491# CONFIG_PATA_OPTIDMA is not set
492# CONFIG_PATA_PDC_OLD is not set
493# CONFIG_PATA_RADISYS is not set
494# CONFIG_PATA_RZ1000 is not set
495# CONFIG_PATA_SC1200 is not set
496# CONFIG_PATA_SERVERWORKS is not set
497# CONFIG_PATA_PDC2027X is not set
498# CONFIG_PATA_SIL680 is not set
499# CONFIG_PATA_SIS is not set
500# CONFIG_PATA_VIA is not set
501# CONFIG_PATA_WINBOND is not set
428# CONFIG_PATA_PLATFORM is not set 502# CONFIG_PATA_PLATFORM is not set
503# CONFIG_MD is not set
429 504
430# 505#
431# Multi-device support (RAID and LVM) 506# Fusion MPT device support
432# 507#
433# CONFIG_MD is not set 508# CONFIG_FUSION is not set
434# CONFIG_MACINTOSH_DRIVERS is not set 509# CONFIG_FUSION_SPI is not set
510# CONFIG_FUSION_FC is not set
511# CONFIG_FUSION_SAS is not set
435 512
436# 513#
437# Network device support 514# IEEE 1394 (FireWire) support
438# 515#
516# CONFIG_FIREWIRE is not set
517# CONFIG_IEEE1394 is not set
518# CONFIG_I2O is not set
519# CONFIG_MACINTOSH_DRIVERS is not set
439CONFIG_NETDEVICES=y 520CONFIG_NETDEVICES=y
521# CONFIG_NETDEVICES_MULTIQUEUE is not set
440# CONFIG_DUMMY is not set 522# CONFIG_DUMMY is not set
441# CONFIG_BONDING is not set 523# CONFIG_BONDING is not set
524# CONFIG_MACVLAN is not set
442# CONFIG_EQUALIZER is not set 525# CONFIG_EQUALIZER is not set
443# CONFIG_TUN is not set 526# CONFIG_TUN is not set
527# CONFIG_ARCNET is not set
444CONFIG_PHYLIB=y 528CONFIG_PHYLIB=y
445 529
446# 530#
@@ -454,17 +538,44 @@ CONFIG_PHYLIB=y
454CONFIG_VITESSE_PHY=y 538CONFIG_VITESSE_PHY=y
455# CONFIG_SMSC_PHY is not set 539# CONFIG_SMSC_PHY is not set
456# CONFIG_BROADCOM_PHY is not set 540# CONFIG_BROADCOM_PHY is not set
541# CONFIG_ICPLUS_PHY is not set
457# CONFIG_FIXED_PHY is not set 542# CONFIG_FIXED_PHY is not set
458
459#
460# Ethernet (10 or 100Mbit)
461#
462CONFIG_NET_ETHERNET=y 543CONFIG_NET_ETHERNET=y
463CONFIG_MII=y 544CONFIG_MII=y
545# CONFIG_HAPPYMEAL is not set
546# CONFIG_SUNGEM is not set
547# CONFIG_CASSINI is not set
548# CONFIG_NET_VENDOR_3COM is not set
549# CONFIG_NET_TULIP is not set
550# CONFIG_HP100 is not set
551# CONFIG_NET_PCI is not set
464CONFIG_NETDEV_1000=y 552CONFIG_NETDEV_1000=y
553# CONFIG_ACENIC is not set
554# CONFIG_DL2K is not set
555# CONFIG_E1000 is not set
556# CONFIG_NS83820 is not set
557# CONFIG_HAMACHI is not set
558# CONFIG_YELLOWFIN is not set
559# CONFIG_R8169 is not set
560# CONFIG_SIS190 is not set
561# CONFIG_SKGE is not set
562# CONFIG_SKY2 is not set
563# CONFIG_VIA_VELOCITY is not set
564# CONFIG_TIGON3 is not set
565# CONFIG_BNX2 is not set
465CONFIG_GIANFAR=y 566CONFIG_GIANFAR=y
466CONFIG_GFAR_NAPI=y 567CONFIG_GFAR_NAPI=y
568# CONFIG_QLA3XXX is not set
569# CONFIG_ATL1 is not set
467CONFIG_NETDEV_10000=y 570CONFIG_NETDEV_10000=y
571# CONFIG_CHELSIO_T1 is not set
572# CONFIG_CHELSIO_T3 is not set
573# CONFIG_IXGB is not set
574# CONFIG_S2IO is not set
575# CONFIG_MYRI10GE is not set
576# CONFIG_NETXEN_NIC is not set
577# CONFIG_MLX4_CORE is not set
578# CONFIG_TR is not set
468 579
469# 580#
470# Wireless LAN 581# Wireless LAN
@@ -472,21 +583,16 @@ CONFIG_NETDEV_10000=y
472# CONFIG_WLAN_PRE80211 is not set 583# CONFIG_WLAN_PRE80211 is not set
473# CONFIG_WLAN_80211 is not set 584# CONFIG_WLAN_80211 is not set
474# CONFIG_WAN is not set 585# CONFIG_WAN is not set
586# CONFIG_FDDI is not set
587# CONFIG_HIPPI is not set
475# CONFIG_PPP is not set 588# CONFIG_PPP is not set
476# CONFIG_SLIP is not set 589# CONFIG_SLIP is not set
590# CONFIG_NET_FC is not set
477# CONFIG_SHAPER is not set 591# CONFIG_SHAPER is not set
478# CONFIG_NETCONSOLE is not set 592# CONFIG_NETCONSOLE is not set
479# CONFIG_NETPOLL is not set 593# CONFIG_NETPOLL is not set
480# CONFIG_NET_POLL_CONTROLLER is not set 594# CONFIG_NET_POLL_CONTROLLER is not set
481
482#
483# ISDN subsystem
484#
485# CONFIG_ISDN is not set 595# CONFIG_ISDN is not set
486
487#
488# Telephony Support
489#
490# CONFIG_PHONE is not set 596# CONFIG_PHONE is not set
491 597
492# 598#
@@ -521,6 +627,7 @@ CONFIG_INPUT=y
521CONFIG_SERIO=y 627CONFIG_SERIO=y
522CONFIG_SERIO_I8042=y 628CONFIG_SERIO_I8042=y
523CONFIG_SERIO_SERPORT=y 629CONFIG_SERIO_SERPORT=y
630# CONFIG_SERIO_PCIPS2 is not set
524CONFIG_SERIO_LIBPS2=y 631CONFIG_SERIO_LIBPS2=y
525# CONFIG_SERIO_RAW is not set 632# CONFIG_SERIO_RAW is not set
526# CONFIG_GAMEPORT is not set 633# CONFIG_GAMEPORT is not set
@@ -539,6 +646,7 @@ CONFIG_HW_CONSOLE=y
539# 646#
540CONFIG_SERIAL_8250=y 647CONFIG_SERIAL_8250=y
541CONFIG_SERIAL_8250_CONSOLE=y 648CONFIG_SERIAL_8250_CONSOLE=y
649CONFIG_SERIAL_8250_PCI=y
542CONFIG_SERIAL_8250_NR_UARTS=4 650CONFIG_SERIAL_8250_NR_UARTS=4
543CONFIG_SERIAL_8250_RUNTIME_UARTS=4 651CONFIG_SERIAL_8250_RUNTIME_UARTS=4
544# CONFIG_SERIAL_8250_EXTENDED is not set 652# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -550,14 +658,11 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
550# CONFIG_SERIAL_UARTLITE is not set 658# CONFIG_SERIAL_UARTLITE is not set
551CONFIG_SERIAL_CORE=y 659CONFIG_SERIAL_CORE=y
552CONFIG_SERIAL_CORE_CONSOLE=y 660CONFIG_SERIAL_CORE_CONSOLE=y
661# CONFIG_SERIAL_JSM is not set
553# CONFIG_SERIAL_OF_PLATFORM is not set 662# CONFIG_SERIAL_OF_PLATFORM is not set
554CONFIG_UNIX98_PTYS=y 663CONFIG_UNIX98_PTYS=y
555CONFIG_LEGACY_PTYS=y 664CONFIG_LEGACY_PTYS=y
556CONFIG_LEGACY_PTY_COUNT=256 665CONFIG_LEGACY_PTY_COUNT=256
557
558#
559# IPMI
560#
561# CONFIG_IPMI_HANDLER is not set 666# CONFIG_IPMI_HANDLER is not set
562# CONFIG_WATCHDOG is not set 667# CONFIG_WATCHDOG is not set
563# CONFIG_HW_RANDOM is not set 668# CONFIG_HW_RANDOM is not set
@@ -565,12 +670,12 @@ CONFIG_NVRAM=y
565CONFIG_GEN_RTC=y 670CONFIG_GEN_RTC=y
566CONFIG_GEN_RTC_X=y 671CONFIG_GEN_RTC_X=y
567# CONFIG_R3964 is not set 672# CONFIG_R3964 is not set
673# CONFIG_APPLICOM is not set
674# CONFIG_AGP is not set
675# CONFIG_DRM is not set
568# CONFIG_RAW_DRIVER is not set 676# CONFIG_RAW_DRIVER is not set
569
570#
571# TPM devices
572#
573# CONFIG_TCG_TPM is not set 677# CONFIG_TCG_TPM is not set
678CONFIG_DEVPORT=y
574# CONFIG_I2C is not set 679# CONFIG_I2C is not set
575 680
576# 681#
@@ -578,11 +683,8 @@ CONFIG_GEN_RTC_X=y
578# 683#
579# CONFIG_SPI is not set 684# CONFIG_SPI is not set
580# CONFIG_SPI_MASTER is not set 685# CONFIG_SPI_MASTER is not set
581
582#
583# Dallas's 1-wire bus
584#
585# CONFIG_W1 is not set 686# CONFIG_W1 is not set
687# CONFIG_POWER_SUPPLY is not set
586# CONFIG_HWMON is not set 688# CONFIG_HWMON is not set
587 689
588# 690#
@@ -655,19 +757,14 @@ CONFIG_DUMMY_CONSOLE=y
655# Sound 757# Sound
656# 758#
657# CONFIG_SOUND is not set 759# CONFIG_SOUND is not set
658 760CONFIG_HID_SUPPORT=y
659#
660# HID Devices
661#
662CONFIG_HID=y 761CONFIG_HID=y
663# CONFIG_HID_DEBUG is not set 762# CONFIG_HID_DEBUG is not set
664 763CONFIG_USB_SUPPORT=y
665# 764CONFIG_USB_ARCH_HAS_HCD=y
666# USB support 765CONFIG_USB_ARCH_HAS_OHCI=y
667# 766CONFIG_USB_ARCH_HAS_EHCI=y
668# CONFIG_USB_ARCH_HAS_HCD is not set 767# CONFIG_USB is not set
669# CONFIG_USB_ARCH_HAS_OHCI is not set
670# CONFIG_USB_ARCH_HAS_EHCI is not set
671 768
672# 769#
673# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 770# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -691,14 +788,7 @@ CONFIG_HID=y
691# 788#
692# LED Triggers 789# LED Triggers
693# 790#
694 791# CONFIG_INFINIBAND is not set
695#
696# InfiniBand support
697#
698
699#
700# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
701#
702 792
703# 793#
704# Real Time Clock 794# Real Time Clock
@@ -719,19 +809,13 @@ CONFIG_RTC_INTF_DEV=y
719# CONFIG_RTC_DRV_TEST is not set 809# CONFIG_RTC_DRV_TEST is not set
720 810
721# 811#
722# I2C RTC drivers
723#
724
725#
726# SPI RTC drivers
727#
728
729#
730# Platform RTC drivers 812# Platform RTC drivers
731# 813#
814# CONFIG_RTC_DRV_CMOS is not set
732# CONFIG_RTC_DRV_DS1553 is not set 815# CONFIG_RTC_DRV_DS1553 is not set
733# CONFIG_RTC_DRV_DS1742 is not set 816# CONFIG_RTC_DRV_DS1742 is not set
734# CONFIG_RTC_DRV_M48T86 is not set 817# CONFIG_RTC_DRV_M48T86 is not set
818# CONFIG_RTC_DRV_M48T59 is not set
735# CONFIG_RTC_DRV_V3020 is not set 819# CONFIG_RTC_DRV_V3020 is not set
736 820
737# 821#
@@ -752,6 +836,11 @@ CONFIG_RTC_INTF_DEV=y
752# 836#
753 837
754# 838#
839# Userspace I/O
840#
841# CONFIG_UIO is not set
842
843#
755# File systems 844# File systems
756# 845#
757CONFIG_EXT2_FS=y 846CONFIG_EXT2_FS=y
@@ -859,7 +948,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
859# CONFIG_NCP_FS is not set 948# CONFIG_NCP_FS is not set
860# CONFIG_CODA_FS is not set 949# CONFIG_CODA_FS is not set
861# CONFIG_AFS_FS is not set 950# CONFIG_AFS_FS is not set
862# CONFIG_9P_FS is not set
863 951
864# 952#
865# Partition Types 953# Partition Types
@@ -941,6 +1029,7 @@ CONFIG_BITREVERSE=y
941# CONFIG_CRC16 is not set 1029# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set 1030# CONFIG_CRC_ITU_T is not set
943CONFIG_CRC32=y 1031CONFIG_CRC32=y
1032# CONFIG_CRC7 is not set
944CONFIG_LIBCRC32C=m 1033CONFIG_LIBCRC32C=m
945CONFIG_ZLIB_INFLATE=y 1034CONFIG_ZLIB_INFLATE=y
946CONFIG_PLIST=y 1035CONFIG_PLIST=y
@@ -965,6 +1054,7 @@ CONFIG_ENABLE_MUST_CHECK=y
965CONFIG_DEBUG_KERNEL=y 1054CONFIG_DEBUG_KERNEL=y
966# CONFIG_DEBUG_SHIRQ is not set 1055# CONFIG_DEBUG_SHIRQ is not set
967CONFIG_DETECT_SOFTLOCKUP=y 1056CONFIG_DETECT_SOFTLOCKUP=y
1057CONFIG_SCHED_DEBUG=y
968# CONFIG_SCHEDSTATS is not set 1058# CONFIG_SCHEDSTATS is not set
969# CONFIG_TIMER_STATS is not set 1059# CONFIG_TIMER_STATS is not set
970# CONFIG_DEBUG_SLAB is not set 1060# CONFIG_DEBUG_SLAB is not set
@@ -996,10 +1086,6 @@ CONFIG_FORCED_INLINING=y
996# 1086#
997# CONFIG_KEYS is not set 1087# CONFIG_KEYS is not set
998# CONFIG_SECURITY is not set 1088# CONFIG_SECURITY is not set
999
1000#
1001# Cryptographic options
1002#
1003CONFIG_CRYPTO=y 1089CONFIG_CRYPTO=y
1004CONFIG_CRYPTO_ALGAPI=y 1090CONFIG_CRYPTO_ALGAPI=y
1005CONFIG_CRYPTO_BLKCIPHER=y 1091CONFIG_CRYPTO_BLKCIPHER=y
@@ -1038,7 +1124,4 @@ CONFIG_CRYPTO_DES=y
1038# CONFIG_CRYPTO_CRC32C is not set 1124# CONFIG_CRYPTO_CRC32C is not set
1039# CONFIG_CRYPTO_CAMELLIA is not set 1125# CONFIG_CRYPTO_CAMELLIA is not set
1040# CONFIG_CRYPTO_TEST is not set 1126# CONFIG_CRYPTO_TEST is not set
1041 1127CONFIG_CRYPTO_HW=y
1042#
1043# Hardware crypto devices
1044#
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
index 6451d4dd28a0..417d3e6abcdf 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/mpc8568mds_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.22
4# Sun Jul 1 23:56:59 2007 4# Fri Jul 20 13:55:04 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,6 +31,7 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
@@ -25,28 +43,8 @@ CONFIG_PPC_UDBG_16550=y
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
@@ -63,12 +61,11 @@ CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 61CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 62CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 63CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 64CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 65# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 66# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 67# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 68# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 69# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 70# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 71CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +97,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 97CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 98# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 99CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 100CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 101CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 105# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 106CONFIG_BLOCK=y
118# CONFIG_LBD is not set 107# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 108# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 109# CONFIG_LSF is not set
110# CONFIG_BLK_DEV_BSG is not set
121 111
122# 112#
123# IO Schedulers 113# IO Schedulers
@@ -186,6 +176,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186CONFIG_SPLIT_PTLOCK_CPUS=4 176CONFIG_SPLIT_PTLOCK_CPUS=4
187# CONFIG_RESOURCES_64BIT is not set 177# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1 178CONFIG_ZONE_DMA_FLAG=1
179CONFIG_BOUNCE=y
180CONFIG_VIRT_TO_BUS=y
189CONFIG_PROC_DEVICETREE=y 181CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 182# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 183# CONFIG_PM is not set
@@ -201,14 +193,20 @@ CONFIG_ZONE_DMA=y
201CONFIG_PPC_INDIRECT_PCI=y 193CONFIG_PPC_INDIRECT_PCI=y
202CONFIG_PPC_INDIRECT_PCI_BE=y 194CONFIG_PPC_INDIRECT_PCI_BE=y
203CONFIG_FSL_SOC=y 195CONFIG_FSL_SOC=y
204# CONFIG_PCI is not set 196CONFIG_FSL_PCI=y
205# CONFIG_PCI_DOMAINS is not set 197CONFIG_PCI=y
206# CONFIG_ARCH_SUPPORTS_MSI is not set 198CONFIG_PCI_DOMAINS=y
199CONFIG_PCI_SYSCALL=y
200# CONFIG_PCIEPORTBUS is not set
201CONFIG_ARCH_SUPPORTS_MSI=y
202# CONFIG_PCI_MSI is not set
203# CONFIG_PCI_DEBUG is not set
207 204
208# 205#
209# PCCARD (PCMCIA/CardBus) support 206# PCCARD (PCMCIA/CardBus) support
210# 207#
211# CONFIG_PCCARD is not set 208# CONFIG_PCCARD is not set
209# CONFIG_HOTPLUG_PCI is not set
212 210
213# 211#
214# Advanced setup 212# Advanced setup
@@ -309,6 +307,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
309# CONFIG_MAC80211 is not set 307# CONFIG_MAC80211 is not set
310# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
311# CONFIG_RFKILL is not set 309# CONFIG_RFKILL is not set
310# CONFIG_NET_9P is not set
312 311
313# 312#
314# Device Drivers 313# Device Drivers
@@ -323,42 +322,31 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
323# CONFIG_DEBUG_DRIVER is not set 322# CONFIG_DEBUG_DRIVER is not set
324# CONFIG_DEBUG_DEVRES is not set 323# CONFIG_DEBUG_DEVRES is not set
325# CONFIG_SYS_HYPERVISOR is not set 324# CONFIG_SYS_HYPERVISOR is not set
326
327#
328# Connector - unified userspace <-> kernelspace linker
329#
330# CONFIG_CONNECTOR is not set 325# CONFIG_CONNECTOR is not set
331# CONFIG_MTD is not set 326# CONFIG_MTD is not set
332
333#
334# Parallel port support
335#
336# CONFIG_PARPORT is not set 327# CONFIG_PARPORT is not set
337 328CONFIG_BLK_DEV=y
338#
339# Plug and Play support
340#
341# CONFIG_PNPACPI is not set
342
343#
344# Block devices
345#
346# CONFIG_BLK_DEV_FD is not set 329# CONFIG_BLK_DEV_FD is not set
330# CONFIG_BLK_CPQ_DA is not set
331# CONFIG_BLK_CPQ_CISS_DA is not set
332# CONFIG_BLK_DEV_DAC960 is not set
333# CONFIG_BLK_DEV_UMEM is not set
347# CONFIG_BLK_DEV_COW_COMMON is not set 334# CONFIG_BLK_DEV_COW_COMMON is not set
348CONFIG_BLK_DEV_LOOP=y 335CONFIG_BLK_DEV_LOOP=y
349# CONFIG_BLK_DEV_CRYPTOLOOP is not set 336# CONFIG_BLK_DEV_CRYPTOLOOP is not set
350# CONFIG_BLK_DEV_NBD is not set 337# CONFIG_BLK_DEV_NBD is not set
338# CONFIG_BLK_DEV_SX8 is not set
351CONFIG_BLK_DEV_RAM=y 339CONFIG_BLK_DEV_RAM=y
352CONFIG_BLK_DEV_RAM_COUNT=16 340CONFIG_BLK_DEV_RAM_COUNT=16
353CONFIG_BLK_DEV_RAM_SIZE=32768 341CONFIG_BLK_DEV_RAM_SIZE=32768
354CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
355# CONFIG_CDROM_PKTCDVD is not set 343# CONFIG_CDROM_PKTCDVD is not set
356# CONFIG_ATA_OVER_ETH is not set 344# CONFIG_ATA_OVER_ETH is not set
357 345CONFIG_MISC_DEVICES=y
358# 346# CONFIG_PHANTOM is not set
359# Misc devices 347# CONFIG_EEPROM_93CX6 is not set
360# 348# CONFIG_SGI_IOC4 is not set
361# CONFIG_BLINK is not set 349# CONFIG_TIFM_CORE is not set
362# CONFIG_IDE is not set 350# CONFIG_IDE is not set
363 351
364# 352#
@@ -366,6 +354,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
366# 354#
367# CONFIG_RAID_ATTRS is not set 355# CONFIG_RAID_ATTRS is not set
368CONFIG_SCSI=y 356CONFIG_SCSI=y
357CONFIG_SCSI_DMA=y
369# CONFIG_SCSI_TGT is not set 358# CONFIG_SCSI_TGT is not set
370# CONFIG_SCSI_NETLINK is not set 359# CONFIG_SCSI_NETLINK is not set
371CONFIG_SCSI_PROC_FS=y 360CONFIG_SCSI_PROC_FS=y
@@ -402,23 +391,65 @@ CONFIG_SCSI_WAIT_SCAN=m
402# SCSI low-level drivers 391# SCSI low-level drivers
403# 392#
404# CONFIG_ISCSI_TCP is not set 393# CONFIG_ISCSI_TCP is not set
394# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
395# CONFIG_SCSI_3W_9XXX is not set
396# CONFIG_SCSI_ACARD is not set
397# CONFIG_SCSI_AACRAID is not set
398# CONFIG_SCSI_AIC7XXX is not set
399# CONFIG_SCSI_AIC7XXX_OLD is not set
400# CONFIG_SCSI_AIC79XX is not set
401# CONFIG_SCSI_AIC94XX is not set
402# CONFIG_SCSI_DPT_I2O is not set
403# CONFIG_SCSI_ARCMSR is not set
404# CONFIG_MEGARAID_NEWGEN is not set
405# CONFIG_MEGARAID_LEGACY is not set
406# CONFIG_MEGARAID_SAS is not set
407# CONFIG_SCSI_HPTIOP is not set
408# CONFIG_SCSI_BUSLOGIC is not set
409# CONFIG_SCSI_DMX3191D is not set
410# CONFIG_SCSI_EATA is not set
411# CONFIG_SCSI_FUTURE_DOMAIN is not set
412# CONFIG_SCSI_GDTH is not set
413# CONFIG_SCSI_IPS is not set
414# CONFIG_SCSI_INITIO is not set
415# CONFIG_SCSI_INIA100 is not set
416# CONFIG_SCSI_STEX is not set
417# CONFIG_SCSI_SYM53C8XX_2 is not set
418# CONFIG_SCSI_QLOGIC_1280 is not set
419# CONFIG_SCSI_QLA_FC is not set
420# CONFIG_SCSI_QLA_ISCSI is not set
421# CONFIG_SCSI_LPFC is not set
422# CONFIG_SCSI_DC395x is not set
423# CONFIG_SCSI_DC390T is not set
424# CONFIG_SCSI_NSP32 is not set
405# CONFIG_SCSI_DEBUG is not set 425# CONFIG_SCSI_DEBUG is not set
426# CONFIG_SCSI_SRP is not set
406# CONFIG_ATA is not set 427# CONFIG_ATA is not set
428# CONFIG_MD is not set
407 429
408# 430#
409# Multi-device support (RAID and LVM) 431# Fusion MPT device support
410# 432#
411# CONFIG_MD is not set 433# CONFIG_FUSION is not set
412# CONFIG_MACINTOSH_DRIVERS is not set 434# CONFIG_FUSION_SPI is not set
435# CONFIG_FUSION_FC is not set
436# CONFIG_FUSION_SAS is not set
413 437
414# 438#
415# Network device support 439# IEEE 1394 (FireWire) support
416# 440#
441# CONFIG_FIREWIRE is not set
442# CONFIG_IEEE1394 is not set
443# CONFIG_I2O is not set
444# CONFIG_MACINTOSH_DRIVERS is not set
417CONFIG_NETDEVICES=y 445CONFIG_NETDEVICES=y
446# CONFIG_NETDEVICES_MULTIQUEUE is not set
418# CONFIG_DUMMY is not set 447# CONFIG_DUMMY is not set
419# CONFIG_BONDING is not set 448# CONFIG_BONDING is not set
449# CONFIG_MACVLAN is not set
420# CONFIG_EQUALIZER is not set 450# CONFIG_EQUALIZER is not set
421# CONFIG_TUN is not set 451# CONFIG_TUN is not set
452# CONFIG_ARCNET is not set
422CONFIG_PHYLIB=y 453CONFIG_PHYLIB=y
423 454
424# 455#
@@ -432,17 +463,44 @@ CONFIG_MARVELL_PHY=y
432# CONFIG_VITESSE_PHY is not set 463# CONFIG_VITESSE_PHY is not set
433# CONFIG_SMSC_PHY is not set 464# CONFIG_SMSC_PHY is not set
434# CONFIG_BROADCOM_PHY is not set 465# CONFIG_BROADCOM_PHY is not set
466# CONFIG_ICPLUS_PHY is not set
435# CONFIG_FIXED_PHY is not set 467# CONFIG_FIXED_PHY is not set
436
437#
438# Ethernet (10 or 100Mbit)
439#
440CONFIG_NET_ETHERNET=y 468CONFIG_NET_ETHERNET=y
441CONFIG_MII=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# CONFIG_NET_TULIP is not set
475# CONFIG_HP100 is not set
476# CONFIG_NET_PCI is not set
442CONFIG_NETDEV_1000=y 477CONFIG_NETDEV_1000=y
478# CONFIG_ACENIC is not set
479# CONFIG_DL2K is not set
480# CONFIG_E1000 is not set
481# CONFIG_NS83820 is not set
482# CONFIG_HAMACHI is not set
483# CONFIG_YELLOWFIN is not set
484# CONFIG_R8169 is not set
485# CONFIG_SIS190 is not set
486# CONFIG_SKGE is not set
487# CONFIG_SKY2 is not set
488# CONFIG_VIA_VELOCITY is not set
489# CONFIG_TIGON3 is not set
490# CONFIG_BNX2 is not set
443CONFIG_GIANFAR=y 491CONFIG_GIANFAR=y
444CONFIG_GFAR_NAPI=y 492CONFIG_GFAR_NAPI=y
493# CONFIG_QLA3XXX is not set
494# CONFIG_ATL1 is not set
445CONFIG_NETDEV_10000=y 495CONFIG_NETDEV_10000=y
496# CONFIG_CHELSIO_T1 is not set
497# CONFIG_CHELSIO_T3 is not set
498# CONFIG_IXGB is not set
499# CONFIG_S2IO is not set
500# CONFIG_MYRI10GE is not set
501# CONFIG_NETXEN_NIC is not set
502# CONFIG_MLX4_CORE is not set
503# CONFIG_TR is not set
446 504
447# 505#
448# Wireless LAN 506# Wireless LAN
@@ -450,21 +508,16 @@ CONFIG_NETDEV_10000=y
450# CONFIG_WLAN_PRE80211 is not set 508# CONFIG_WLAN_PRE80211 is not set
451# CONFIG_WLAN_80211 is not set 509# CONFIG_WLAN_80211 is not set
452# CONFIG_WAN is not set 510# CONFIG_WAN is not set
511# CONFIG_FDDI is not set
512# CONFIG_HIPPI is not set
453# CONFIG_PPP is not set 513# CONFIG_PPP is not set
454# CONFIG_SLIP is not set 514# CONFIG_SLIP is not set
515# CONFIG_NET_FC is not set
455# CONFIG_SHAPER is not set 516# CONFIG_SHAPER is not set
456# CONFIG_NETCONSOLE is not set 517# CONFIG_NETCONSOLE is not set
457# CONFIG_NETPOLL is not set 518# CONFIG_NETPOLL is not set
458# CONFIG_NET_POLL_CONTROLLER is not set 519# CONFIG_NET_POLL_CONTROLLER is not set
459
460#
461# ISDN subsystem
462#
463# CONFIG_ISDN is not set 520# CONFIG_ISDN is not set
464
465#
466# Telephony Support
467#
468# CONFIG_PHONE is not set 521# CONFIG_PHONE is not set
469 522
470# 523#
@@ -510,6 +563,7 @@ CONFIG_INPUT=y
510# 563#
511CONFIG_SERIAL_8250=y 564CONFIG_SERIAL_8250=y
512CONFIG_SERIAL_8250_CONSOLE=y 565CONFIG_SERIAL_8250_CONSOLE=y
566CONFIG_SERIAL_8250_PCI=y
513CONFIG_SERIAL_8250_NR_UARTS=4 567CONFIG_SERIAL_8250_NR_UARTS=4
514CONFIG_SERIAL_8250_RUNTIME_UARTS=4 568CONFIG_SERIAL_8250_RUNTIME_UARTS=4
515# CONFIG_SERIAL_8250_EXTENDED is not set 569# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -521,14 +575,11 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
521# CONFIG_SERIAL_UARTLITE is not set 575# CONFIG_SERIAL_UARTLITE is not set
522CONFIG_SERIAL_CORE=y 576CONFIG_SERIAL_CORE=y
523CONFIG_SERIAL_CORE_CONSOLE=y 577CONFIG_SERIAL_CORE_CONSOLE=y
578# CONFIG_SERIAL_JSM is not set
524# CONFIG_SERIAL_OF_PLATFORM is not set 579# CONFIG_SERIAL_OF_PLATFORM is not set
525CONFIG_UNIX98_PTYS=y 580CONFIG_UNIX98_PTYS=y
526CONFIG_LEGACY_PTYS=y 581CONFIG_LEGACY_PTYS=y
527CONFIG_LEGACY_PTY_COUNT=256 582CONFIG_LEGACY_PTY_COUNT=256
528
529#
530# IPMI
531#
532# CONFIG_IPMI_HANDLER is not set 583# CONFIG_IPMI_HANDLER is not set
533CONFIG_WATCHDOG=y 584CONFIG_WATCHDOG=y
534# CONFIG_WATCHDOG_NOWAYOUT is not set 585# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -538,17 +589,23 @@ CONFIG_WATCHDOG=y
538# 589#
539# CONFIG_SOFT_WATCHDOG is not set 590# CONFIG_SOFT_WATCHDOG is not set
540# CONFIG_BOOKE_WDT is not set 591# CONFIG_BOOKE_WDT is not set
592
593#
594# PCI-based Watchdog Cards
595#
596# CONFIG_PCIPCWATCHDOG is not set
597# CONFIG_WDTPCI is not set
541CONFIG_HW_RANDOM=y 598CONFIG_HW_RANDOM=y
542# CONFIG_NVRAM is not set 599# CONFIG_NVRAM is not set
543CONFIG_GEN_RTC=y 600CONFIG_GEN_RTC=y
544# CONFIG_GEN_RTC_X is not set 601# CONFIG_GEN_RTC_X is not set
545# CONFIG_R3964 is not set 602# CONFIG_R3964 is not set
603# CONFIG_APPLICOM is not set
604# CONFIG_AGP is not set
605# CONFIG_DRM is not set
546# CONFIG_RAW_DRIVER is not set 606# CONFIG_RAW_DRIVER is not set
547
548#
549# TPM devices
550#
551# CONFIG_TCG_TPM is not set 607# CONFIG_TCG_TPM is not set
608CONFIG_DEVPORT=y
552CONFIG_I2C=y 609CONFIG_I2C=y
553CONFIG_I2C_BOARDINFO=y 610CONFIG_I2C_BOARDINFO=y
554CONFIG_I2C_CHARDEV=y 611CONFIG_I2C_CHARDEV=y
@@ -563,23 +620,43 @@ CONFIG_I2C_CHARDEV=y
563# 620#
564# I2C Hardware Bus support 621# I2C Hardware Bus support
565# 622#
623# CONFIG_I2C_ALI1535 is not set
624# CONFIG_I2C_ALI1563 is not set
625# CONFIG_I2C_ALI15X3 is not set
626# CONFIG_I2C_AMD756 is not set
627# CONFIG_I2C_AMD8111 is not set
628# CONFIG_I2C_I801 is not set
629# CONFIG_I2C_I810 is not set
630# CONFIG_I2C_PIIX4 is not set
566CONFIG_I2C_MPC=y 631CONFIG_I2C_MPC=y
632# CONFIG_I2C_NFORCE2 is not set
567# CONFIG_I2C_OCORES is not set 633# CONFIG_I2C_OCORES is not set
568# CONFIG_I2C_PARPORT_LIGHT is not set 634# CONFIG_I2C_PARPORT_LIGHT is not set
635# CONFIG_I2C_PROSAVAGE is not set
636# CONFIG_I2C_SAVAGE4 is not set
569# CONFIG_I2C_SIMTEC is not set 637# CONFIG_I2C_SIMTEC is not set
638# CONFIG_I2C_SIS5595 is not set
639# CONFIG_I2C_SIS630 is not set
640# CONFIG_I2C_SIS96X is not set
641# CONFIG_I2C_TAOS_EVM is not set
570# CONFIG_I2C_STUB is not set 642# CONFIG_I2C_STUB is not set
643# CONFIG_I2C_VIA is not set
644# CONFIG_I2C_VIAPRO is not set
645# CONFIG_I2C_VOODOO3 is not set
571 646
572# 647#
573# Miscellaneous I2C Chip support 648# Miscellaneous I2C Chip support
574# 649#
575# CONFIG_SENSORS_DS1337 is not set 650# CONFIG_SENSORS_DS1337 is not set
576# CONFIG_SENSORS_DS1374 is not set 651# CONFIG_SENSORS_DS1374 is not set
652# CONFIG_DS1682 is not set
577# CONFIG_SENSORS_EEPROM is not set 653# CONFIG_SENSORS_EEPROM is not set
578# CONFIG_SENSORS_PCF8574 is not set 654# CONFIG_SENSORS_PCF8574 is not set
579# CONFIG_SENSORS_PCA9539 is not set 655# CONFIG_SENSORS_PCA9539 is not set
580# CONFIG_SENSORS_PCF8591 is not set 656# CONFIG_SENSORS_PCF8591 is not set
581# CONFIG_SENSORS_M41T00 is not set 657# CONFIG_SENSORS_M41T00 is not set
582# CONFIG_SENSORS_MAX6875 is not set 658# CONFIG_SENSORS_MAX6875 is not set
659# CONFIG_SENSORS_TSL2550 is not set
583# CONFIG_I2C_DEBUG_CORE is not set 660# CONFIG_I2C_DEBUG_CORE is not set
584# CONFIG_I2C_DEBUG_ALGO is not set 661# CONFIG_I2C_DEBUG_ALGO is not set
585# CONFIG_I2C_DEBUG_BUS is not set 662# CONFIG_I2C_DEBUG_BUS is not set
@@ -590,11 +667,8 @@ CONFIG_I2C_MPC=y
590# 667#
591# CONFIG_SPI is not set 668# CONFIG_SPI is not set
592# CONFIG_SPI_MASTER is not set 669# CONFIG_SPI_MASTER is not set
593
594#
595# Dallas's 1-wire bus
596#
597# CONFIG_W1 is not set 670# CONFIG_W1 is not set
671# CONFIG_POWER_SUPPLY is not set
598CONFIG_HWMON=y 672CONFIG_HWMON=y
599# CONFIG_HWMON_VID is not set 673# CONFIG_HWMON_VID is not set
600# CONFIG_SENSORS_ABITUGURU is not set 674# CONFIG_SENSORS_ABITUGURU is not set
@@ -628,10 +702,13 @@ CONFIG_HWMON=y
628# CONFIG_SENSORS_MAX6650 is not set 702# CONFIG_SENSORS_MAX6650 is not set
629# CONFIG_SENSORS_PC87360 is not set 703# CONFIG_SENSORS_PC87360 is not set
630# CONFIG_SENSORS_PC87427 is not set 704# CONFIG_SENSORS_PC87427 is not set
705# CONFIG_SENSORS_SIS5595 is not set
631# CONFIG_SENSORS_SMSC47M1 is not set 706# CONFIG_SENSORS_SMSC47M1 is not set
632# CONFIG_SENSORS_SMSC47M192 is not set 707# CONFIG_SENSORS_SMSC47M192 is not set
633# CONFIG_SENSORS_SMSC47B397 is not set 708# CONFIG_SENSORS_SMSC47B397 is not set
709# CONFIG_SENSORS_VIA686A is not set
634# CONFIG_SENSORS_VT1211 is not set 710# CONFIG_SENSORS_VT1211 is not set
711# CONFIG_SENSORS_VT8231 is not set
635# CONFIG_SENSORS_W83781D is not set 712# CONFIG_SENSORS_W83781D is not set
636# CONFIG_SENSORS_W83791D is not set 713# CONFIG_SENSORS_W83791D is not set
637# CONFIG_SENSORS_W83792D is not set 714# CONFIG_SENSORS_W83792D is not set
@@ -670,19 +747,14 @@ CONFIG_DAB=y
670# Sound 747# Sound
671# 748#
672# CONFIG_SOUND is not set 749# CONFIG_SOUND is not set
673 750CONFIG_HID_SUPPORT=y
674#
675# HID Devices
676#
677CONFIG_HID=y 751CONFIG_HID=y
678# CONFIG_HID_DEBUG is not set 752# CONFIG_HID_DEBUG is not set
679 753CONFIG_USB_SUPPORT=y
680# 754CONFIG_USB_ARCH_HAS_HCD=y
681# USB support 755CONFIG_USB_ARCH_HAS_OHCI=y
682# 756CONFIG_USB_ARCH_HAS_EHCI=y
683# CONFIG_USB_ARCH_HAS_HCD is not set 757# CONFIG_USB is not set
684# CONFIG_USB_ARCH_HAS_OHCI is not set
685# CONFIG_USB_ARCH_HAS_EHCI is not set
686 758
687# 759#
688# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 760# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -706,14 +778,7 @@ CONFIG_HID=y
706# 778#
707# LED Triggers 779# LED Triggers
708# 780#
709 781# CONFIG_INFINIBAND is not set
710#
711# InfiniBand support
712#
713
714#
715# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
716#
717 782
718# 783#
719# Real Time Clock 784# Real Time Clock
@@ -734,6 +799,11 @@ CONFIG_HID=y
734# 799#
735 800
736# 801#
802# Userspace I/O
803#
804# CONFIG_UIO is not set
805
806#
737# File systems 807# File systems
738# 808#
739CONFIG_EXT2_FS=y 809CONFIG_EXT2_FS=y
@@ -829,7 +899,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
829# CONFIG_NCP_FS is not set 899# CONFIG_NCP_FS is not set
830# CONFIG_CODA_FS is not set 900# CONFIG_CODA_FS is not set
831# CONFIG_AFS_FS is not set 901# CONFIG_AFS_FS is not set
832# CONFIG_9P_FS is not set
833 902
834# 903#
835# Partition Types 904# Partition Types
@@ -868,6 +937,7 @@ CONFIG_BITREVERSE=y
868# CONFIG_CRC16 is not set 937# CONFIG_CRC16 is not set
869# CONFIG_CRC_ITU_T is not set 938# CONFIG_CRC_ITU_T is not set
870CONFIG_CRC32=y 939CONFIG_CRC32=y
940# CONFIG_CRC7 is not set
871# CONFIG_LIBCRC32C is not set 941# CONFIG_LIBCRC32C is not set
872CONFIG_PLIST=y 942CONFIG_PLIST=y
873CONFIG_HAS_IOMEM=y 943CONFIG_HAS_IOMEM=y
@@ -892,6 +962,7 @@ CONFIG_ENABLE_MUST_CHECK=y
892CONFIG_DEBUG_KERNEL=y 962CONFIG_DEBUG_KERNEL=y
893# CONFIG_DEBUG_SHIRQ is not set 963# CONFIG_DEBUG_SHIRQ is not set
894CONFIG_DETECT_SOFTLOCKUP=y 964CONFIG_DETECT_SOFTLOCKUP=y
965CONFIG_SCHED_DEBUG=y
895# CONFIG_SCHEDSTATS is not set 966# CONFIG_SCHEDSTATS is not set
896# CONFIG_TIMER_STATS is not set 967# CONFIG_TIMER_STATS is not set
897# CONFIG_DEBUG_SLAB is not set 968# CONFIG_DEBUG_SLAB is not set
@@ -915,7 +986,7 @@ CONFIG_FORCED_INLINING=y
915CONFIG_DEBUGGER=y 986CONFIG_DEBUGGER=y
916# CONFIG_XMON is not set 987# CONFIG_XMON is not set
917# CONFIG_BDI_SWITCH is not set 988# CONFIG_BDI_SWITCH is not set
918CONFIG_BOOTX_TEXT=y 989# CONFIG_BOOTX_TEXT is not set
919CONFIG_PPC_EARLY_DEBUG=y 990CONFIG_PPC_EARLY_DEBUG=y
920# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 991# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
921# CONFIG_PPC_EARLY_DEBUG_G5 is not set 992# CONFIG_PPC_EARLY_DEBUG_G5 is not set
@@ -932,10 +1003,6 @@ CONFIG_PPC_EARLY_DEBUG=y
932# 1003#
933# CONFIG_KEYS is not set 1004# CONFIG_KEYS is not set
934# CONFIG_SECURITY is not set 1005# CONFIG_SECURITY is not set
935
936#
937# Cryptographic options
938#
939CONFIG_CRYPTO=y 1006CONFIG_CRYPTO=y
940CONFIG_CRYPTO_ALGAPI=y 1007CONFIG_CRYPTO_ALGAPI=y
941CONFIG_CRYPTO_BLKCIPHER=y 1008CONFIG_CRYPTO_BLKCIPHER=y
@@ -973,7 +1040,4 @@ CONFIG_CRYPTO_DES=y
973# CONFIG_CRYPTO_CRC32C is not set 1040# CONFIG_CRYPTO_CRC32C is not set
974# CONFIG_CRYPTO_CAMELLIA is not set 1041# CONFIG_CRYPTO_CAMELLIA is not set
975# CONFIG_CRYPTO_TEST is not set 1042# CONFIG_CRYPTO_TEST is not set
976 1043CONFIG_CRYPTO_HW=y
977#
978# Hardware crypto devices
979#
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 0d8ba623e29a..08525d6fb1f1 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -218,7 +218,7 @@ CONFIG_PM=y
218CONFIG_PM_DEBUG=y 218CONFIG_PM_DEBUG=y
219# CONFIG_DISABLE_CONSOLE_SUSPEND is not set 219# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
220CONFIG_PM_SYSFS_DEPRECATED=y 220CONFIG_PM_SYSFS_DEPRECATED=y
221CONFIG_SOFTWARE_SUSPEND=y 221CONFIG_HIBERNATION=y
222CONFIG_PM_STD_PARTITION="" 222CONFIG_PM_STD_PARTITION=""
223CONFIG_APM_EMULATION=y 223CONFIG_APM_EMULATION=y
224CONFIG_SECCOMP=y 224CONFIG_SECCOMP=y
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 42c42ecad00c..f39a72f30aad 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -37,9 +37,9 @@ obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
37obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 37obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
38obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o 38obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
39obj-$(CONFIG_TAU) += tau_6xx.o 39obj-$(CONFIG_TAU) += tau_6xx.o
40obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o 40obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
41obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o 41obj32-$(CONFIG_HIBERNATION) += swsusp_32.o
42obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o 42obj64-$(CONFIG_HIBERNATION) += swsusp_64.o swsusp_asm64.o
43obj32-$(CONFIG_MODULES) += module_32.o 43obj32-$(CONFIG_MODULES) += module_32.o
44 44
45ifeq ($(CONFIG_PPC_MERGE),y) 45ifeq ($(CONFIG_PPC_MERGE),y)
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 8cdd48ea4391..1448af92c6a9 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -809,8 +809,9 @@ system_reset_iSeries:
809 mtmsrd r24 /* RI on */ 809 mtmsrd r24 /* RI on */
810 lhz r24,PACAPACAINDEX(r13) /* Get processor # */ 810 lhz r24,PACAPACAINDEX(r13) /* Get processor # */
811 cmpwi 0,r24,0 /* Are we processor 0? */ 811 cmpwi 0,r24,0 /* Are we processor 0? */
812 beq .__start_initialization_iSeries /* Start up the first processor */ 812 bne 1f
813 mfspr r4,SPRN_CTRLF 813 b .__start_initialization_iSeries /* Start up the first processor */
8141: mfspr r4,SPRN_CTRLF
814 li r5,CTRL_RUNLATCH /* Turn off the run light */ 815 li r5,CTRL_RUNLATCH /* Turn off the run light */
815 andc r4,r4,r5 816 andc r4,r4,r5
816 mtspr SPRN_CTRLT,r4 817 mtspr SPRN_CTRLT,r4
@@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init)
1611#endif 1612#endif
1612 1613
1613#ifdef CONFIG_PPC_ISERIES 1614#ifdef CONFIG_PPC_ISERIES
1614_STATIC(__start_initialization_iSeries) 1615_INIT_STATIC(__start_initialization_iSeries)
1615 /* Clear out the BSS */ 1616 /* Clear out the BSS */
1616 LOAD_REG_IMMEDIATE(r11,__bss_stop) 1617 LOAD_REG_IMMEDIATE(r11,__bss_stop)
1617 LOAD_REG_IMMEDIATE(r8,__bss_start) 1618 LOAD_REG_IMMEDIATE(r8,__bss_start)
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 601ef79a5916..2a5cf8680370 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -7,6 +7,7 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <asm/io.h> 9#include <asm/io.h>
10#include <asm/pci-bridge.h>
10 11
11/* 12/*
12 * Here comes the ppc64 implementation of the IOMAP 13 * Here comes the ppc64 implementation of the IOMAP
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
136 137
137void pci_iounmap(struct pci_dev *dev, void __iomem *addr) 138void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
138{ 139{
139 /* Nothing to do */ 140 if (isa_vaddr_is_ioport(addr))
141 return;
142 if (pcibios_vaddr_is_ioport(addr))
143 return;
144 iounmap(addr);
140} 145}
146
141EXPORT_SYMBOL(pci_iomap); 147EXPORT_SYMBOL(pci_iomap);
142EXPORT_SYMBOL(pci_iounmap); 148EXPORT_SYMBOL(pci_iounmap);
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2fc87862146c..24bea97c736c 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
418} 418}
419EXPORT_SYMBOL_GPL(virq_to_hw); 419EXPORT_SYMBOL_GPL(virq_to_hw);
420 420
421struct irq_host *irq_alloc_host(unsigned int revmap_type, 421__init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type,
422 unsigned int revmap_arg, 422 unsigned int revmap_arg,
423 struct irq_host_ops *ops, 423 struct irq_host_ops *ops,
424 irq_hw_number_t inval_irq) 424 irq_hw_number_t inval_irq)
425{ 425{
426 struct irq_host *host; 426 struct irq_host *host;
427 unsigned int size = sizeof(struct irq_host); 427 unsigned int size = sizeof(struct irq_host);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index fe7d1255e11e..083cfbdbe0b2 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
65 spin_unlock(&hose_spinlock); 65 spin_unlock(&hose_spinlock);
66} 66}
67 67
68struct pci_controller * pcibios_alloc_controller(struct device_node *dev) 68__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
69{ 69{
70 struct pci_controller *phb; 70 struct pci_controller *phb;
71 71
@@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_controller *phb)
101 kfree(phb); 101 kfree(phb);
102} 102}
103 103
104int pcibios_vaddr_is_ioport(void __iomem *address)
105{
106 int ret = 0;
107 struct pci_controller *hose;
108 unsigned long size;
109
110 spin_lock(&hose_spinlock);
111 list_for_each_entry(hose, &hose_list, list_node) {
112#ifdef CONFIG_PPC64
113 size = hose->pci_io_size;
114#else
115 size = hose->io_resource.end - hose->io_resource.start + 1;
116#endif
117 if (address >= hose->io_base_virt &&
118 address < (hose->io_base_virt + size)) {
119 ret = 1;
120 break;
121 }
122 }
123 spin_unlock(&hose_spinlock);
124 return ret;
125}
126
104/* 127/*
105 * Return the domain number for this bus. 128 * Return the domain number for this bus.
106 */ 129 */
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 0adf077f3f3a..cd35c969bb28 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list);
60static int pci_bus_count; 60static int pci_bus_count;
61 61
62static void 62static void
63fixup_hide_host_resource_fsl(struct pci_dev* dev)
64{
65 int i, class = dev->class >> 8;
66
67 if ((class == PCI_CLASS_PROCESSOR_POWERPC) &&
68 (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
69 (dev->bus->parent == NULL)) {
70 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
71 dev->resource[i].start = 0;
72 dev->resource[i].end = 0;
73 dev->resource[i].flags = 0;
74 }
75 }
76}
77DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
78DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
79
80static void
63fixup_broken_pcnet32(struct pci_dev* dev) 81fixup_broken_pcnet32(struct pci_dev* dev)
64{ 82{
65 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { 83 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
@@ -415,15 +433,13 @@ probe_resource(struct pci_bus *parent, struct resource *pr,
415 return 0; 433 return 0;
416} 434}
417 435
418static void __init 436void __init
419update_bridge_base(struct pci_bus *bus, int i) 437update_bridge_resource(struct pci_dev *dev, struct resource *res)
420{ 438{
421 struct resource *res = bus->resource[i];
422 u8 io_base_lo, io_limit_lo; 439 u8 io_base_lo, io_limit_lo;
423 u16 mem_base, mem_limit; 440 u16 mem_base, mem_limit;
424 u16 cmd; 441 u16 cmd;
425 unsigned long start, end, off; 442 unsigned long start, end, off;
426 struct pci_dev *dev = bus->self;
427 struct pci_controller *hose = dev->sysdata; 443 struct pci_controller *hose = dev->sysdata;
428 444
429 if (!hose) { 445 if (!hose) {
@@ -467,12 +483,20 @@ update_bridge_base(struct pci_bus *bus, int i)
467 pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit); 483 pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit);
468 484
469 } else { 485 } else {
470 DBG(KERN_ERR "PCI: ugh, bridge %s res %d has flags=%lx\n", 486 DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n",
471 pci_name(dev), i, res->flags); 487 pci_name(dev), res->flags);
472 } 488 }
473 pci_write_config_word(dev, PCI_COMMAND, cmd); 489 pci_write_config_word(dev, PCI_COMMAND, cmd);
474} 490}
475 491
492static void __init
493update_bridge_base(struct pci_bus *bus, int i)
494{
495 struct resource *res = bus->resource[i];
496 struct pci_dev *dev = bus->self;
497 update_bridge_resource(dev, res);
498}
499
476static inline void alloc_resource(struct pci_dev *dev, int idx) 500static inline void alloc_resource(struct pci_dev *dev, int idx)
477{ 501{
478 struct resource *pr, *r = &dev->resource[idx]; 502 struct resource *pr, *r = &dev->resource[idx];
@@ -1223,7 +1247,7 @@ pcibios_init(void)
1223 1247
1224subsys_initcall(pcibios_init); 1248subsys_initcall(pcibios_init);
1225 1249
1226void __init pcibios_fixup_bus(struct pci_bus *bus) 1250void pcibios_fixup_bus(struct pci_bus *bus)
1227{ 1251{
1228 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 1252 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
1229 unsigned long io_offset; 1253 unsigned long io_offset;
@@ -1468,3 +1492,10 @@ EARLY_PCI_OP(read, dword, u32 *)
1468EARLY_PCI_OP(write, byte, u8) 1492EARLY_PCI_OP(write, byte, u8)
1469EARLY_PCI_OP(write, word, u16) 1493EARLY_PCI_OP(write, word, u16)
1470EARLY_PCI_OP(write, dword, u32) 1494EARLY_PCI_OP(write, dword, u32)
1495
1496extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
1497int early_find_capability(struct pci_controller *hose, int bus, int devfn,
1498 int cap)
1499{
1500 return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap);
1501}
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 84f000a45e36..a83727b308a0 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs)
423 printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); 423 printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
424 trap = TRAP(regs); 424 trap = TRAP(regs);
425 if (trap == 0x300 || trap == 0x600) 425 if (trap == 0x300 || trap == 0x600)
426#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
427 printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
428#else
426 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); 429 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
430#endif
427 printk("TASK = %p[%d] '%s' THREAD: %p", 431 printk("TASK = %p[%d] '%s' THREAD: %p",
428 current, current->pid, current->comm, task_thread_info(current)); 432 current, current->pid, current->comm, task_thread_info(current));
429 433
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 3786dcc8a7b6..b5c96af955c6 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -24,7 +24,7 @@
24/* Max address size we deal with */ 24/* Max address size we deal with */
25#define OF_MAX_ADDR_CELLS 4 25#define OF_MAX_ADDR_CELLS 4
26#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ 26#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
27 (ns) >= 0) 27 (ns) > 0)
28 28
29static struct of_bus *of_match_bus(struct device_node *np); 29static struct of_bus *of_match_bus(struct device_node *np);
30static int __of_address_to_resource(struct device_node *dev, 30static int __of_address_to_resource(struct device_node *dev,
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 4924c48cb1ff..50ef38cffdbf 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -496,6 +496,10 @@ int check_legacy_ioport(unsigned long base_port)
496 break; 496 break;
497 } 497 }
498 np = of_find_node_by_type(NULL, "8042"); 498 np = of_find_node_by_type(NULL, "8042");
499 /* Pegasos has no device_type on its 8042 node, look for the
500 * name instead */
501 if (!np)
502 np = of_find_node_by_name(NULL, "8042");
499 break; 503 break;
500 case FDC_BASE: /* FDC1 */ 504 case FDC_BASE: /* FDC1 */
501 np = of_find_node_by_type(NULL, "fdc"); 505 np = of_find_node_by_type(NULL, "fdc");
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index fc6647d332cb..f85f402ceaef 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -23,6 +23,7 @@
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/syscalls.h> 24#include <linux/syscalls.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/smp.h> 27#include <linux/smp.h>
27#include <linux/sem.h> 28#include <linux/sem.h>
28#include <linux/msg.h> 29#include <linux/msg.h>
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index cbca1df8bc60..0f9b4eadfbcb 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -155,7 +155,7 @@ static int early_console_initialized;
155 * Called by setup_system after ppc_md->probe and ppc_md->early_init. 155 * Called by setup_system after ppc_md->probe and ppc_md->early_init.
156 * Call it again after setting udbg_putc in ppc_md->setup_arch. 156 * Call it again after setting udbg_putc in ppc_md->setup_arch.
157 */ 157 */
158void register_early_udbg_console(void) 158void __init register_early_udbg_console(void)
159{ 159{
160 if (early_console_initialized) 160 if (early_console_initialized)
161 return; 161 return;
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 2f24ea0d723a..ada5b42dd231 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20 21
21#include <asm/rheap.h> 22#include <asm/rheap.h>
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index e3a1e8dc536a..8f4d2dc4cafb 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -138,8 +138,8 @@ void __init lmb_analyze(void)
138static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, 138static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
139 unsigned long size) 139 unsigned long size)
140{ 140{
141 unsigned long i, coalesced = 0; 141 unsigned long coalesced = 0;
142 long adjacent; 142 long adjacent, i;
143 143
144 /* First try and coalesce this LMB with another. */ 144 /* First try and coalesce this LMB with another. */
145 for (i=0; i < rgn->cnt; i++) { 145 for (i=0; i < rgn->cnt; i++) {
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 133665754a75..4a890cb42b98 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -21,6 +21,7 @@
21#include <linux/dcookies.h> 21#include <linux/dcookies.h>
22#include <linux/kref.h> 22#include <linux/kref.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/fs.h>
24#include <linux/module.h> 25#include <linux/module.h>
25#include <linux/notifier.h> 26#include <linux/notifier.h>
26#include <linux/numa.h> 27#include <linux/numa.h>
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index da20832b27f1..2d1b05b9f8ef 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -553,7 +553,8 @@ static void __init mpc82xx_add_bridge(struct device_node *np)
553 553
554 setup_indirect_pci(hose, 554 setup_indirect_pci(hose,
555 r.start + offsetof(pci_cpm2_t, pci_cfg_addr), 555 r.start + offsetof(pci_cpm2_t, pci_cfg_addr),
556 r.start + offsetof(pci_cpm2_t, pci_cfg_data)); 556 r.start + offsetof(pci_cpm2_t, pci_cfg_data),
557 0);
557 558
558 pci_process_bridge_OF_ranges(hose, np, 1); 559 pci_process_bridge_OF_ranges(hose, np, 1);
559} 560}
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index c0e2b89154e5..92069469de20 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -74,11 +74,11 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
74 */ 74 */
75 /* PCI 1 */ 75 /* PCI 1 */
76 if ((rsrc.start & 0xfffff) == 0x8500) { 76 if ((rsrc.start & 0xfffff) == 0x8500) {
77 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); 77 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0);
78 } 78 }
79 /* PCI 2 */ 79 /* PCI 2 */
80 if ((rsrc.start & 0xfffff) == 0x8600) { 80 if ((rsrc.start & 0xfffff) == 0x8600) {
81 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); 81 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0);
82 primary = 0; 82 primary = 0;
83 } 83 }
84 84
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 629926e01e90..f58184086c8c 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -18,6 +18,7 @@ config MPC8560_ADS
18config MPC85xx_CDS 18config MPC85xx_CDS
19 bool "Freescale MPC85xx CDS" 19 bool "Freescale MPC85xx CDS"
20 select DEFAULT_UIMAGE 20 select DEFAULT_UIMAGE
21 select PPC_I8259
21 help 22 help
22 This option enables support for the MPC85xx CDS board 23 This option enables support for the MPC85xx CDS board
23 24
@@ -30,6 +31,7 @@ config MPC85xx_MDS
30 31
31config MPC8544_DS 32config MPC8544_DS
32 bool "Freescale MPC8544 DS" 33 bool "Freescale MPC8544 DS"
34 select PPC_I8259
33 select DEFAULT_UIMAGE 35 select DEFAULT_UIMAGE
34 help 36 help
35 This option enables support for the MPC8544 DS board 37 This option enables support for the MPC8544 DS board
@@ -50,9 +52,9 @@ config MPC8560
50config MPC85xx 52config MPC85xx
51 bool 53 bool
52 select PPC_UDBG_16550 54 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI 55 select PPC_INDIRECT_PCI if PCI
54 select PPC_INDIRECT_PCI_BE
55 select MPIC 56 select MPIC
57 select FSL_PCI if PCI
56 select SERIAL_8250_SHARE_IRQ if SERIAL_8250 58 select SERIAL_8250_SHARE_IRQ if SERIAL_8250
57 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \ 59 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \
58 || MPC85xx_MDS || MPC8544_DS 60 || MPC85xx_MDS || MPC8544_DS
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 4e02cbb14cf7..d70f2d0f9d36 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the PowerPC 85xx linux kernel. 2# Makefile for the PowerPC 85xx linux kernel.
3# 3#
4obj-$(CONFIG_PPC_85xx) += misc.o pci.o 4obj-$(CONFIG_PPC_85xx) += misc.o
5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o 5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o 6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 6fb90aab879f..4905f6f8903b 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -2,6 +2,8 @@
2 * MPC8544 DS Board Setup 2 * MPC8544 DS Board Setup
3 * 3 *
4 * Author Xianghua Xiao (x.xiao@freescale.com) 4 * Author Xianghua Xiao (x.xiao@freescale.com)
5 * Roy Zang <tie-fei.zang@freescale.com>
6 * - Add PCI/PCI Exprees support
5 * Copyright 2007 Freescale Semiconductor Inc. 7 * Copyright 2007 Freescale Semiconductor Inc.
6 * 8 *
7 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
@@ -12,13 +14,16 @@
12 14
13#include <linux/stddef.h> 15#include <linux/stddef.h>
14#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/pci.h>
15#include <linux/kdev_t.h> 18#include <linux/kdev_t.h>
16#include <linux/delay.h> 19#include <linux/delay.h>
17#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/interrupt.h>
18 22
19#include <asm/system.h> 23#include <asm/system.h>
20#include <asm/time.h> 24#include <asm/time.h>
21#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/pci-bridge.h>
22#include <asm/mpc85xx.h> 27#include <asm/mpc85xx.h>
23#include <mm/mmu_decl.h> 28#include <mm/mmu_decl.h>
24#include <asm/prom.h> 29#include <asm/prom.h>
@@ -27,6 +32,7 @@
27#include <asm/i8259.h> 32#include <asm/i8259.h>
28 33
29#include <sysdev/fsl_soc.h> 34#include <sysdev/fsl_soc.h>
35#include <sysdev/fsl_pci.h>
30#include "mpc85xx.h" 36#include "mpc85xx.h"
31 37
32#undef DEBUG 38#undef DEBUG
@@ -37,6 +43,17 @@
37#define DBG(fmt, args...) 43#define DBG(fmt, args...)
38#endif 44#endif
39 45
46#ifdef CONFIG_PPC_I8259
47static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc)
48{
49 unsigned int cascade_irq = i8259_irq();
50
51 if (cascade_irq != NO_IRQ) {
52 generic_handle_irq(cascade_irq);
53 }
54 desc->chip->eoi(irq);
55}
56#endif /* CONFIG_PPC_I8259 */
40 57
41void __init mpc8544_ds_pic_init(void) 58void __init mpc8544_ds_pic_init(void)
42{ 59{
@@ -96,19 +113,240 @@ void __init mpc8544_ds_pic_init(void)
96#endif /* CONFIG_PPC_I8259 */ 113#endif /* CONFIG_PPC_I8259 */
97} 114}
98 115
116#ifdef CONFIG_PCI
117enum pirq { PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };
118
119/*
120 * Value in table -- IRQ number
121 */
122const unsigned char uli1575_irq_route_table[16] = {
123 0, /* 0: Reserved */
124 0x8,
125 0, /* 2: Reserved */
126 0x2,
127 0x4,
128 0x5,
129 0x7,
130 0x6,
131 0, /* 8: Reserved */
132 0x1,
133 0x3,
134 0x9,
135 0xb,
136 0, /* 13: Reserved */
137 0xd,
138 0xf,
139};
140
141static int __devinit
142get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
143{
144 struct of_irq oirq;
145 u32 laddr[3];
146 struct device_node *hosenode = hose ? hose->arch_data : NULL;
147
148 if (!hosenode)
149 return -EINVAL;
150
151 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
152 laddr[1] = laddr[2] = 0;
153 of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
154 DBG("mpc8544_ds: pci irq addr %x, slot %d, pin %d, irq %d\n",
155 laddr[0], slot, pin, oirq.specifier[0]);
156 return oirq.specifier[0];
157}
158
159/*8259*/
160static void __devinit quirk_uli1575(struct pci_dev *dev)
161{
162 unsigned short temp;
163 struct pci_controller *hose = pci_bus_to_host(dev->bus);
164 unsigned char irq2pin[16];
165 unsigned long pirq_map_word = 0;
166 u32 irq;
167 int i;
168
169 /*
170 * ULI1575 interrupts route setup
171 */
172 memset(irq2pin, 0, 16); /* Initialize default value 0 */
173
174 irq2pin[6]=PIRQA+3; /* enabled mapping for IRQ6 to PIRQD, used by SATA */
175
176 /*
177 * PIRQE -> PIRQF mapping set manually
178 *
179 * IRQ pin IRQ#
180 * PIRQE ---- 9
181 * PIRQF ---- 10
182 * PIRQG ---- 11
183 * PIRQH ---- 12
184 */
185 for (i = 0; i < 4; i++)
186 irq2pin[i + 9] = PIRQE + i;
187
188 /* Set IRQ-PIRQ Mapping to ULI1575 */
189 for (i = 0; i < 16; i++)
190 if (irq2pin[i])
191 pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
192 << ((irq2pin[i] - PIRQA) * 4);
193
194 pirq_map_word |= 1<<26; /* disable INTx in EP mode*/
195
196 /* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
197 DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
198 (int)pirq_map_word);
199 pci_write_config_dword(dev, 0x48, pirq_map_word);
200
201#define ULI1575_SET_DEV_IRQ(slot, pin, reg) \
202 do { \
203 int irq; \
204 irq = get_pci_irq_from_of(hose, slot, pin); \
205 if (irq > 0 && irq < 16) \
206 pci_write_config_byte(dev, reg, irq2pin[irq]); \
207 else \
208 printk(KERN_WARNING "ULI1575 device" \
209 "(slot %d, pin %d) irq %d is invalid.\n", \
210 slot, pin, irq); \
211 } while(0)
212
213 /* USB 1.1 OHCI controller 1, slot 28, pin 1 */
214 ULI1575_SET_DEV_IRQ(28, 1, 0x86);
215
216 /* USB 1.1 OHCI controller 2, slot 28, pin 2 */
217 ULI1575_SET_DEV_IRQ(28, 2, 0x87);
218
219 /* USB 1.1 OHCI controller 3, slot 28, pin 3 */
220 ULI1575_SET_DEV_IRQ(28, 3, 0x88);
221
222 /* USB 2.0 controller, slot 28, pin 4 */
223 irq = get_pci_irq_from_of(hose, 28, 4);
224 if (irq >= 0 && irq <= 15)
225 pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
226
227 /* Audio controller, slot 29, pin 1 */
228 ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
229
230 /* Modem controller, slot 29, pin 2 */
231 ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
232
233 /* HD audio controller, slot 29, pin 3 */
234 ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
235
236 /* SMB interrupt: slot 30, pin 1 */
237 ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
238
239 /* PMU ACPI SCI interrupt: slot 30, pin 2 */
240 ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
241
242 /* Serial ATA interrupt: slot 31, pin 1 */
243 ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
244
245 /* Primary PATA IDE IRQ: 14
246 * Secondary PATA IDE IRQ: 15
247 */
248 pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
249 pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
250
251 /* Set IRQ14 and IRQ15 to legacy IRQs */
252 pci_read_config_word(dev, 0x46, &temp);
253 temp |= 0xc000;
254 pci_write_config_word(dev, 0x46, temp);
255
256 /* Set i8259 interrupt trigger
257 * IRQ 3: Level
258 * IRQ 4: Level
259 * IRQ 5: Level
260 * IRQ 6: Level
261 * IRQ 7: Level
262 * IRQ 9: Level
263 * IRQ 10: Level
264 * IRQ 11: Level
265 * IRQ 12: Level
266 * IRQ 14: Edge
267 * IRQ 15: Edge
268 */
269 outb(0xfa, 0x4d0);
270 outb(0x1e, 0x4d1);
271
272#undef ULI1575_SET_DEV_IRQ
273}
274
275/* SATA */
276static void __devinit quirk_uli5288(struct pci_dev *dev)
277{
278 unsigned char c;
279
280 pci_read_config_byte(dev, 0x83, &c);
281 c |= 0x80; /* read/write lock */
282 pci_write_config_byte(dev, 0x83, c);
283
284 pci_write_config_byte(dev, 0x09, 0x01); /* Base class code: storage */
285 pci_write_config_byte(dev, 0x0a, 0x06); /* IDE disk */
286
287 pci_read_config_byte(dev, 0x83, &c);
288 c &= 0x7f;
289 pci_write_config_byte(dev, 0x83, c);
290
291 pci_read_config_byte(dev, 0x84, &c);
292 c |= 0x01; /* emulated PATA mode enabled */
293 pci_write_config_byte(dev, 0x84, c);
294}
295
296/* PATA */
297static void __devinit quirk_uli5229(struct pci_dev *dev)
298{
299 unsigned short temp;
300 pci_write_config_word(dev, 0x04, 0x0405); /* MEM IO MSI */
301 pci_read_config_word(dev, 0x4a, &temp);
302 temp |= 0x1000; /* Enable Native IRQ 14/15 */
303 pci_write_config_word(dev, 0x4a, temp);
304}
305
306/*Bridge*/
307static void __devinit early_uli5249(struct pci_dev *dev)
308{
309 unsigned char temp;
310 pci_write_config_word(dev, 0x04, 0x0007); /* mem access */
311 pci_read_config_byte(dev, 0x7c, &temp);
312 pci_write_config_byte(dev, 0x7c, 0x80); /* R/W lock control */
313 pci_write_config_byte(dev, 0x09, 0x01); /* set as pci-pci bridge */
314 pci_write_config_byte(dev, 0x7c, temp); /* restore pci bus debug control */
315 dev->class |= 0x1;
316}
317
318DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
319DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
320DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
321DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
322#endif /* CONFIG_PCI */
99 323
100/* 324/*
101 * Setup the architecture 325 * Setup the architecture
102 */ 326 */
103static void __init mpc8544_ds_setup_arch(void) 327static void __init mpc8544_ds_setup_arch(void)
104{ 328{
329#ifdef CONFIG_PCI
330 struct device_node *np;
331#endif
332
105 if (ppc_md.progress) 333 if (ppc_md.progress)
106 ppc_md.progress("mpc8544_ds_setup_arch()", 0); 334 ppc_md.progress("mpc8544_ds_setup_arch()", 0);
107 335
336#ifdef CONFIG_PCI
337 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
338 struct resource rsrc;
339 of_address_to_resource(np, 0, &rsrc);
340 if ((rsrc.start & 0xfffff) == 0xb000)
341 fsl_add_bridge(np, 1);
342 else
343 fsl_add_bridge(np, 0);
344 }
345#endif
346
108 printk("MPC8544 DS board from Freescale Semiconductor\n"); 347 printk("MPC8544 DS board from Freescale Semiconductor\n");
109} 348}
110 349
111
112/* 350/*
113 * Called very early, device-tree isn't unflattened 351 * Called very early, device-tree isn't unflattened
114 */ 352 */
@@ -124,6 +362,7 @@ define_machine(mpc8544_ds) {
124 .probe = mpc8544_ds_probe, 362 .probe = mpc8544_ds_probe,
125 .setup_arch = mpc8544_ds_setup_arch, 363 .setup_arch = mpc8544_ds_setup_arch,
126 .init_IRQ = mpc8544_ds_pic_init, 364 .init_IRQ = mpc8544_ds_pic_init,
365 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
127 .get_irq = mpic_get_irq, 366 .get_irq = mpic_get_irq,
128 .restart = mpc85xx_restart, 367 .restart = mpc85xx_restart,
129 .calibrate_decr = generic_calibrate_decr, 368 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index 7286ffac2c1d..5b34deef12b5 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -15,4 +15,3 @@
15 */ 15 */
16 16
17extern void mpc85xx_restart(char *); 17extern void mpc85xx_restart(char *);
18extern int mpc85xx_add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 7235f702394c..40a828675c7b 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -29,6 +29,7 @@
29#include <asm/udbg.h> 29#include <asm/udbg.h>
30 30
31#include <sysdev/fsl_soc.h> 31#include <sysdev/fsl_soc.h>
32#include <sysdev/fsl_pci.h>
32#include "mpc85xx.h" 33#include "mpc85xx.h"
33 34
34#ifdef CONFIG_CPM2 35#ifdef CONFIG_CPM2
@@ -217,7 +218,7 @@ static void __init mpc85xx_ads_setup_arch(void)
217 218
218#ifdef CONFIG_PCI 219#ifdef CONFIG_PCI
219 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 220 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
220 mpc85xx_add_bridge(np); 221 fsl_add_bridge(np, 1);
221 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 222 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
222#endif 223#endif
223} 224}
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 50c8d6458362..6a171e9abf7d 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -24,6 +24,7 @@
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/initrd.h> 25#include <linux/initrd.h>
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/interrupt.h>
27#include <linux/fsl_devices.h> 28#include <linux/fsl_devices.h>
28 29
29#include <asm/system.h> 30#include <asm/system.h>
@@ -45,6 +46,7 @@
45#include <asm/i8259.h> 46#include <asm/i8259.h>
46 47
47#include <sysdev/fsl_soc.h> 48#include <sysdev/fsl_soc.h>
49#include <sysdev/fsl_pci.h>
48#include "mpc85xx.h" 50#include "mpc85xx.h"
49 51
50static int cds_pci_slot = 2; 52static int cds_pci_slot = 2;
@@ -58,8 +60,6 @@ static volatile u8 *cadmus;
58static int mpc85xx_exclude_device(struct pci_controller *hose, 60static int mpc85xx_exclude_device(struct pci_controller *hose,
59 u_char bus, u_char devfn) 61 u_char bus, u_char devfn)
60{ 62{
61 if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
62 return PCIBIOS_DEVICE_NOT_FOUND;
63 /* We explicitly do not go past the Tundra 320 Bridge */ 63 /* We explicitly do not go past the Tundra 320 Bridge */
64 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) 64 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
65 return PCIBIOS_DEVICE_NOT_FOUND; 65 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -69,6 +69,37 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
69 return PCIBIOS_SUCCESSFUL; 69 return PCIBIOS_SUCCESSFUL;
70} 70}
71 71
72static void mpc85xx_cds_restart(char *cmd)
73{
74 struct pci_dev *dev;
75 u_char tmp;
76
77 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686,
78 NULL))) {
79
80 /* Use the VIA Super Southbridge to force a PCI reset */
81 pci_read_config_byte(dev, 0x47, &tmp);
82 pci_write_config_byte(dev, 0x47, tmp | 1);
83
84 /* Flush the outbound PCI write queues */
85 pci_read_config_byte(dev, 0x47, &tmp);
86
87 /*
88 * At this point, the harware reset should have triggered.
89 * However, if it doesn't work for some mysterious reason,
90 * just fall through to the default reset below.
91 */
92
93 pci_dev_put(dev);
94 }
95
96 /*
97 * If we can't find the VIA chip (maybe the P2P bridge is disabled)
98 * or the VIA chip reset didn't work, just use the default reset.
99 */
100 mpc85xx_restart(NULL);
101}
102
72static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) 103static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
73{ 104{
74 u_char c; 105 u_char c;
@@ -98,7 +129,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
98 /* There are two USB controllers. 129 /* There are two USB controllers.
99 * Identify them by functon number 130 * Identify them by functon number
100 */ 131 */
101 if (PCI_FUNC(dev->devfn)) 132 if (PCI_FUNC(dev->devfn) == 3)
102 dev->irq = 11; 133 dev->irq = 11;
103 else 134 else
104 dev->irq = 10; 135 dev->irq = 10;
@@ -109,17 +140,41 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
109 } 140 }
110} 141}
111 142
143static void __devinit skip_fake_bridge(struct pci_dev *dev)
144{
145 /* Make it an error to skip the fake bridge
146 * in pci_setup_device() in probe.c */
147 dev->hdr_type = 0x7f;
148}
149DECLARE_PCI_FIXUP_EARLY(0x1957, 0x3fff, skip_fake_bridge);
150DECLARE_PCI_FIXUP_EARLY(0x3fff, 0x1957, skip_fake_bridge);
151DECLARE_PCI_FIXUP_EARLY(0xff3f, 0x5719, skip_fake_bridge);
152
112#ifdef CONFIG_PPC_I8259 153#ifdef CONFIG_PPC_I8259
113#warning The i8259 PIC support is currently broken 154static void mpc85xx_8259_cascade_handler(unsigned int irq,
114static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 155 struct irq_desc *desc)
115{ 156{
116 unsigned int cascade_irq = i8259_irq(); 157 unsigned int cascade_irq = i8259_irq();
117 158
118 if (cascade_irq != NO_IRQ) 159 if (cascade_irq != NO_IRQ)
160 /* handle an interrupt from the 8259 */
119 generic_handle_irq(cascade_irq); 161 generic_handle_irq(cascade_irq);
120 162
121 desc->chip->eoi(irq); 163 /* check for any interrupts from the shared IRQ line */
164 handle_fasteoi_irq(irq, desc);
165}
166
167static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id)
168{
169 return IRQ_HANDLED;
122} 170}
171
172static struct irqaction mpc85xxcds_8259_irqaction = {
173 .handler = mpc85xx_8259_cascade_action,
174 .flags = IRQF_SHARED,
175 .mask = CPU_MASK_NONE,
176 .name = "8259 cascade",
177};
123#endif /* PPC_I8259 */ 178#endif /* PPC_I8259 */
124#endif /* CONFIG_PCI */ 179#endif /* CONFIG_PCI */
125 180
@@ -128,10 +183,6 @@ static void __init mpc85xx_cds_pic_init(void)
128 struct mpic *mpic; 183 struct mpic *mpic;
129 struct resource r; 184 struct resource r;
130 struct device_node *np = NULL; 185 struct device_node *np = NULL;
131#ifdef CONFIG_PPC_I8259
132 struct device_node *cascade_node = NULL;
133 int cascade_irq;
134#endif
135 186
136 np = of_find_node_by_type(np, "open-pic"); 187 np = of_find_node_by_type(np, "open-pic");
137 188
@@ -155,8 +206,19 @@ static void __init mpc85xx_cds_pic_init(void)
155 of_node_put(np); 206 of_node_put(np);
156 207
157 mpic_init(mpic); 208 mpic_init(mpic);
209}
210
211#if defined(CONFIG_PPC_I8259) && defined(CONFIG_PCI)
212static int mpc85xx_cds_8259_attach(void)
213{
214 int ret;
215 struct device_node *np = NULL;
216 struct device_node *cascade_node = NULL;
217 int cascade_irq;
218
219 if (!machine_is(mpc85xx_cds))
220 return 0;
158 221
159#ifdef CONFIG_PPC_I8259
160 /* Initialize the i8259 controller */ 222 /* Initialize the i8259 controller */
161 for_each_node_by_type(np, "interrupt-controller") 223 for_each_node_by_type(np, "interrupt-controller")
162 if (of_device_is_compatible(np, "chrp,iic")) { 224 if (of_device_is_compatible(np, "chrp,iic")) {
@@ -166,22 +228,39 @@ static void __init mpc85xx_cds_pic_init(void)
166 228
167 if (cascade_node == NULL) { 229 if (cascade_node == NULL) {
168 printk(KERN_DEBUG "Could not find i8259 PIC\n"); 230 printk(KERN_DEBUG "Could not find i8259 PIC\n");
169 return; 231 return -ENODEV;
170 } 232 }
171 233
172 cascade_irq = irq_of_parse_and_map(cascade_node, 0); 234 cascade_irq = irq_of_parse_and_map(cascade_node, 0);
173 if (cascade_irq == NO_IRQ) { 235 if (cascade_irq == NO_IRQ) {
174 printk(KERN_ERR "Failed to map cascade interrupt\n"); 236 printk(KERN_ERR "Failed to map cascade interrupt\n");
175 return; 237 return -ENXIO;
176 } 238 }
177 239
178 i8259_init(cascade_node, 0); 240 i8259_init(cascade_node, 0);
179 of_node_put(cascade_node); 241 of_node_put(cascade_node);
180 242
181 set_irq_chained_handler(cascade_irq, mpc85xx_8259_cascade); 243 /*
182#endif /* CONFIG_PPC_I8259 */ 244 * Hook the interrupt to make sure desc->action is never NULL.
245 * This is required to ensure that the interrupt does not get
246 * disabled when the last user of the shared IRQ line frees their
247 * interrupt.
248 */
249 if ((ret = setup_irq(cascade_irq, &mpc85xxcds_8259_irqaction))) {
250 printk(KERN_ERR "Failed to setup cascade interrupt\n");
251 return ret;
252 }
253
254 /* Success. Connect our low-level cascade handler. */
255 set_irq_handler(cascade_irq, mpc85xx_8259_cascade_handler);
256
257 return 0;
183} 258}
184 259
260device_initcall(mpc85xx_cds_8259_attach);
261
262#endif /* CONFIG_PPC_I8259 */
263
185/* 264/*
186 * Setup the architecture 265 * Setup the architecture
187 */ 266 */
@@ -218,9 +297,14 @@ static void __init mpc85xx_cds_setup_arch(void)
218 } 297 }
219 298
220#ifdef CONFIG_PCI 299#ifdef CONFIG_PCI
221 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 300 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
222 mpc85xx_add_bridge(np); 301 struct resource rsrc;
223 302 of_address_to_resource(np, 0, &rsrc);
303 if ((rsrc.start & 0xfffff) == 0x8000)
304 fsl_add_bridge(np, 1);
305 else
306 fsl_add_bridge(np, 0);
307 }
224 ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; 308 ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
225 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 309 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
226#endif 310#endif
@@ -265,7 +349,12 @@ define_machine(mpc85xx_cds) {
265 .init_IRQ = mpc85xx_cds_pic_init, 349 .init_IRQ = mpc85xx_cds_pic_init,
266 .show_cpuinfo = mpc85xx_cds_show_cpuinfo, 350 .show_cpuinfo = mpc85xx_cds_show_cpuinfo,
267 .get_irq = mpic_get_irq, 351 .get_irq = mpic_get_irq,
352#ifdef CONFIG_PCI
353 .restart = mpc85xx_cds_restart,
354#else
268 .restart = mpc85xx_restart, 355 .restart = mpc85xx_restart,
356#endif
269 .calibrate_decr = generic_calibrate_decr, 357 .calibrate_decr = generic_calibrate_decr,
270 .progress = udbg_progress, 358 .progress = udbg_progress,
359 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
271}; 360};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 004b80bd0b84..e8003bf00c9a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -46,6 +46,7 @@
46#include <asm/prom.h> 46#include <asm/prom.h>
47#include <asm/udbg.h> 47#include <asm/udbg.h>
48#include <sysdev/fsl_soc.h> 48#include <sysdev/fsl_soc.h>
49#include <sysdev/fsl_pci.h>
49#include <asm/qe.h> 50#include <asm/qe.h>
50#include <asm/qe_ic.h> 51#include <asm/qe_ic.h>
51#include <asm/mpic.h> 52#include <asm/mpic.h>
@@ -94,9 +95,8 @@ static void __init mpc85xx_mds_setup_arch(void)
94 } 95 }
95 96
96#ifdef CONFIG_PCI 97#ifdef CONFIG_PCI
97 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { 98 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
98 mpc85xx_add_bridge(np); 99 fsl_add_bridge(np, 1);
99 }
100 of_node_put(np); 100 of_node_put(np);
101#endif 101#endif
102 102
@@ -208,4 +208,5 @@ define_machine(mpc85xx_mds) {
208 .restart = mpc85xx_restart, 208 .restart = mpc85xx_restart,
209 .calibrate_decr = generic_calibrate_decr, 209 .calibrate_decr = generic_calibrate_decr,
210 .progress = udbg_progress, 210 .progress = udbg_progress,
211 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
211}; 212};
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
deleted file mode 100644
index 8118417b7364..000000000000
--- a/arch/powerpc/platforms/85xx/pci.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * FSL SoC setup code
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/pci.h>
17#include <linux/delay.h>
18#include <linux/irq.h>
19#include <linux/module.h>
20
21#include <asm/system.h>
22#include <asm/atomic.h>
23#include <asm/io.h>
24#include <asm/pci-bridge.h>
25#include <asm/prom.h>
26#include <sysdev/fsl_soc.h>
27
28#undef DEBUG
29
30#ifdef DEBUG
31#define DBG(x...) printk(x)
32#else
33#define DBG(x...)
34#endif
35
36#ifdef CONFIG_PCI
37int __init mpc85xx_add_bridge(struct device_node *dev)
38{
39 int len;
40 struct pci_controller *hose;
41 struct resource rsrc;
42 const int *bus_range;
43 int primary = 1, has_address = 0;
44 phys_addr_t immr = get_immrbase();
45
46 DBG("Adding PCI host bridge %s\n", dev->full_name);
47
48 /* Fetch host bridge registers address */
49 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
50
51 /* Get bus range if any */
52 bus_range = of_get_property(dev, "bus-range", &len);
53 if (bus_range == NULL || len < 2 * sizeof(int)) {
54 printk(KERN_WARNING "Can't get bus-range for %s, assume"
55 " bus 0\n", dev->full_name);
56 }
57
58 pci_assign_all_buses = 1;
59 hose = pcibios_alloc_controller(dev);
60 if (!hose)
61 return -ENOMEM;
62
63 hose->first_busno = bus_range ? bus_range[0] : 0;
64 hose->last_busno = bus_range ? bus_range[1] : 0xff;
65
66 /* PCI 1 */
67 if ((rsrc.start & 0xfffff) == 0x8000) {
68 setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004);
69 }
70 /* PCI 2 */
71 if ((rsrc.start & 0xfffff) == 0x9000) {
72 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
73 primary = 0;
74 }
75
76 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
77 "Firmware bus number: %d->%d\n",
78 (unsigned long long)rsrc.start, hose->first_busno,
79 hose->last_busno);
80
81 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
82 hose, hose->cfg_addr, hose->cfg_data);
83
84 /* Interpret the "ranges" property */
85 /* This also maps the I/O region and sets isa_io/mem_base */
86 pci_process_bridge_OF_ranges(hose, dev, primary);
87
88 return 0;
89}
90
91#endif
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 0faebfdc1596..343b76d0d793 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -14,8 +14,7 @@ endchoice
14 14
15config MPC8641 15config MPC8641
16 bool 16 bool
17 select PPC_INDIRECT_PCI 17 select FSL_PCI if PCI
18 select PPC_INDIRECT_PCI_BE
19 select PPC_UDBG_16550 18 select PPC_UDBG_16550
20 select MPIC 19 select MPIC
21 default y if MPC8641_HPCN 20 default y if MPC8641_HPCN
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index 418fd8f4d268..3376c7767f2d 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -4,4 +4,3 @@
4 4
5obj-$(CONFIG_SMP) += mpc86xx_smp.o 5obj-$(CONFIG_SMP) += mpc86xx_smp.o
6obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o 6obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o
7obj-$(CONFIG_PCI) += pci.o
diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h b/arch/powerpc/platforms/86xx/mpc86xx.h
index 23f7ed2a7f88..525ffa1904f9 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx.h
+++ b/arch/powerpc/platforms/86xx/mpc86xx.h
@@ -15,11 +15,6 @@
15 * mpc86xx_* files. Mostly for use by mpc86xx_setup(). 15 * mpc86xx_* files. Mostly for use by mpc86xx_setup().
16 */ 16 */
17 17
18extern int mpc86xx_add_bridge(struct device_node *dev);
19
20extern int mpc86xx_exclude_device(struct pci_controller *hose,
21 u_char bus, u_char devfn);
22
23extern void __init mpc86xx_smp_init(void); 18extern void __init mpc86xx_smp_init(void);
24 19
25#endif /* __MPC86XX_H__ */ 20#endif /* __MPC86XX_H__ */
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 5b01ec7c13dc..e9eaa0749ae6 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -31,6 +31,7 @@
31 31
32#include <asm/mpic.h> 32#include <asm/mpic.h>
33 33
34#include <sysdev/fsl_pci.h>
34#include <sysdev/fsl_soc.h> 35#include <sysdev/fsl_soc.h>
35 36
36#include "mpc86xx.h" 37#include "mpc86xx.h"
@@ -344,8 +345,14 @@ mpc86xx_hpcn_setup_arch(void)
344 } 345 }
345 346
346#ifdef CONFIG_PCI 347#ifdef CONFIG_PCI
347 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 348 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
348 mpc86xx_add_bridge(np); 349 struct resource rsrc;
350 of_address_to_resource(np, 0, &rsrc);
351 if ((rsrc.start & 0xfffff) == 0x8000)
352 fsl_add_bridge(np, 1);
353 else
354 fsl_add_bridge(np, 0);
355 }
349#endif 356#endif
350 357
351 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); 358 printk("MPC86xx HPCN board from Freescale Semiconductor\n");
@@ -424,7 +431,6 @@ mpc86xx_time_init(void)
424 return 0; 431 return 0;
425} 432}
426 433
427
428define_machine(mpc86xx_hpcn) { 434define_machine(mpc86xx_hpcn) {
429 .name = "MPC86xx HPCN", 435 .name = "MPC86xx HPCN",
430 .probe = mpc86xx_hpcn_probe, 436 .probe = mpc86xx_hpcn_probe,
@@ -436,4 +442,5 @@ define_machine(mpc86xx_hpcn) {
436 .time_init = mpc86xx_time_init, 442 .time_init = mpc86xx_time_init,
437 .calibrate_decr = generic_calibrate_decr, 443 .calibrate_decr = generic_calibrate_decr,
438 .progress = udbg_progress, 444 .progress = udbg_progress,
445 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
439}; 446};
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
deleted file mode 100644
index 73cd5b05a84e..000000000000
--- a/arch/powerpc/platforms/86xx/pci.c
+++ /dev/null
@@ -1,238 +0,0 @@
1/*
2 * MPC86XX pci setup code
3 *
4 * Recode: ZHANG WEI <wei.zhang@freescale.com>
5 * Initial author: Xianghua Xiao <x.xiao@freescale.com>
6 *
7 * Copyright 2006 Freescale Semiconductor Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#include <linux/types.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/pci.h>
19#include <linux/serial.h>
20
21#include <asm/system.h>
22#include <asm/atomic.h>
23#include <asm/io.h>
24#include <asm/prom.h>
25#include <asm/pci-bridge.h>
26#include <sysdev/fsl_soc.h>
27#include <sysdev/fsl_pcie.h>
28
29#include "mpc86xx.h"
30
31#undef DEBUG
32
33#ifdef DEBUG
34#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
35#else
36#define DBG(fmt, args...)
37#endif
38
39struct pcie_outbound_window_regs {
40 uint pexotar; /* 0x.0 - PCI Express outbound translation address register */
41 uint pexotear; /* 0x.4 - PCI Express outbound translation extended address register */
42 uint pexowbar; /* 0x.8 - PCI Express outbound window base address register */
43 char res1[4];
44 uint pexowar; /* 0x.10 - PCI Express outbound window attributes register */
45 char res2[12];
46};
47
48struct pcie_inbound_window_regs {
49 uint pexitar; /* 0x.0 - PCI Express inbound translation address register */
50 char res1[4];
51 uint pexiwbar; /* 0x.8 - PCI Express inbound window base address register */
52 uint pexiwbear; /* 0x.c - PCI Express inbound window base extended address register */
53 uint pexiwar; /* 0x.10 - PCI Express inbound window attributes register */
54 char res2[12];
55};
56
57static void __init setup_pcie_atmu(struct pci_controller *hose, struct resource *rsrc)
58{
59 volatile struct ccsr_pex *pcie;
60 volatile struct pcie_outbound_window_regs *pcieow;
61 volatile struct pcie_inbound_window_regs *pcieiw;
62 int i = 0;
63
64 DBG("PCIE memory map start 0x%x, size 0x%x\n", rsrc->start,
65 rsrc->end - rsrc->start + 1);
66 pcie = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
67
68 /* Disable all windows (except pexowar0 since its ignored) */
69 pcie->pexowar1 = 0;
70 pcie->pexowar2 = 0;
71 pcie->pexowar3 = 0;
72 pcie->pexowar4 = 0;
73 pcie->pexiwar1 = 0;
74 pcie->pexiwar2 = 0;
75 pcie->pexiwar3 = 0;
76
77 pcieow = (struct pcie_outbound_window_regs *)&pcie->pexotar1;
78 pcieiw = (struct pcie_inbound_window_regs *)&pcie->pexitar1;
79
80 /* Setup outbound MEM window */
81 for(i = 0; i < 3; i++)
82 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
83 DBG("PCIE MEM resource start 0x%08x, size 0x%08x.\n",
84 hose->mem_resources[i].start,
85 hose->mem_resources[i].end
86 - hose->mem_resources[i].start + 1);
87 pcieow->pexotar = (hose->mem_resources[i].start) >> 12
88 & 0x000fffff;
89 pcieow->pexotear = 0;
90 pcieow->pexowbar = (hose->mem_resources[i].start) >> 12
91 & 0x000fffff;
92 /* Enable, Mem R/W */
93 pcieow->pexowar = 0x80044000 |
94 (__ilog2(hose->mem_resources[i].end
95 - hose->mem_resources[i].start + 1)
96 - 1);
97 pcieow++;
98 }
99
100 /* Setup outbound IO window */
101 if (hose->io_resource.flags & IORESOURCE_IO){
102 DBG("PCIE IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n",
103 hose->io_resource.start,
104 hose->io_resource.end - hose->io_resource.start + 1,
105 hose->io_base_phys);
106 pcieow->pexotar = (hose->io_resource.start) >> 12 & 0x000fffff;
107 pcieow->pexotear = 0;
108 pcieow->pexowbar = (hose->io_base_phys) >> 12 & 0x000fffff;
109 /* Enable, IO R/W */
110 pcieow->pexowar = 0x80088000 | (__ilog2(hose->io_resource.end
111 - hose->io_resource.start + 1) - 1);
112 }
113
114 /* Setup 2G inbound Memory Window @ 0 */
115 pcieiw->pexitar = 0x00000000;
116 pcieiw->pexiwbar = 0x00000000;
117 /* Enable, Prefetch, Local Mem, Snoop R/W, 2G */
118 pcieiw->pexiwar = 0xa0f5501e;
119}
120
121static void __init
122mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
123{
124 u16 cmd;
125
126 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n",
127 pcie_offset, pcie_size);
128
129 early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
130 cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY
131 | PCI_COMMAND_IO;
132 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd);
133
134 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
135}
136
137static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev)
138{
139 struct resource *res;
140 int i, res_idx = PCI_BRIDGE_RESOURCES;
141 struct pci_controller *hose;
142
143 /*
144 * Make the bridge be transparent.
145 */
146 dev->transparent = 1;
147
148 hose = pci_bus_to_host(dev->bus);
149 if (!hose) {
150 printk(KERN_ERR "Can't find hose for bus %d\n",
151 dev->bus->number);
152 return;
153 }
154
155 if (hose->io_resource.flags) {
156 res = &dev->resource[res_idx++];
157 res->start = hose->io_resource.start;
158 res->end = hose->io_resource.end;
159 res->flags = hose->io_resource.flags;
160 }
161
162 for (i = 0; i < 3; i++) {
163 res = &dev->resource[res_idx + i];
164 res->start = hose->mem_resources[i].start;
165 res->end = hose->mem_resources[i].end;
166 res->flags = hose->mem_resources[i].flags;
167 }
168}
169
170
171DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent);
172DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent);
173
174#define PCIE_LTSSM 0x404 /* PCIe Link Training and Status */
175#define PCIE_LTSSM_L0 0x16 /* L0 state */
176
177int __init mpc86xx_add_bridge(struct device_node *dev)
178{
179 int len;
180 struct pci_controller *hose;
181 struct resource rsrc;
182 const int *bus_range;
183 int has_address = 0;
184 int primary = 0;
185 u16 val;
186
187 DBG("Adding PCIE host bridge %s\n", dev->full_name);
188
189 /* Fetch host bridge registers address */
190 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
191
192 /* Get bus range if any */
193 bus_range = of_get_property(dev, "bus-range", &len);
194 if (bus_range == NULL || len < 2 * sizeof(int))
195 printk(KERN_WARNING "Can't get bus-range for %s, assume"
196 " bus 0\n", dev->full_name);
197
198 pci_assign_all_buses = 1;
199 hose = pcibios_alloc_controller(dev);
200 if (!hose)
201 return -ENOMEM;
202
203 hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
204 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
205
206 hose->first_busno = bus_range ? bus_range[0] : 0x0;
207 hose->last_busno = bus_range ? bus_range[1] : 0xff;
208
209 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4);
210
211 /* Probe the hose link training status */
212 early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val);
213 if (val < PCIE_LTSSM_L0)
214 return -ENXIO;
215
216 /* Setup the PCIE host controller. */
217 mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1);
218
219 if ((rsrc.start & 0xfffff) == 0x8000)
220 primary = 1;
221
222 printk(KERN_INFO "Found MPC86xx PCIE host bridge at 0x%08lx. "
223 "Firmware bus number: %d->%d\n",
224 (unsigned long) rsrc.start,
225 hose->first_busno, hose->last_busno);
226
227 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
228 hose, hose->cfg_addr, hose->cfg_data);
229
230 /* Interpret the "ranges" property */
231 /* This also maps the I/O region and sets isa_io/mem_base */
232 pci_process_bridge_OF_ranges(hose, dev, primary);
233
234 /* Setup PEX window registers */
235 setup_pcie_atmu(hose, &rsrc);
236
237 return 0;
238}
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 6694f86d7000..9cb081c26e71 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -59,7 +59,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
59 INIT_LIST_HEAD(&ctx->aff_list); 59 INIT_LIST_HEAD(&ctx->aff_list);
60 if (gang) 60 if (gang)
61 spu_gang_add_ctx(gang, ctx); 61 spu_gang_add_ctx(gang, ctx);
62 ctx->cpus_allowed = current->cpus_allowed; 62
63 __spu_update_sched_info(ctx);
63 spu_set_timeslice(ctx); 64 spu_set_timeslice(ctx);
64 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED; 65 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
65 66
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 0b50fa5cb39d..6abdd8fe2098 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -312,6 +312,7 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
312 spu_acquire(ctx); 312 spu_acquire(ctx);
313 if (ctx->state == SPU_STATE_SAVED) { 313 if (ctx->state == SPU_STATE_SAVED) {
314 __spu_update_sched_info(ctx); 314 __spu_update_sched_info(ctx);
315 spu_set_timeslice(ctx);
315 316
316 ret = spu_activate(ctx, 0); 317 ret = spu_activate(ctx, 0);
317 if (ret) { 318 if (ret) {
@@ -322,6 +323,9 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
322 /* 323 /*
323 * We have to update the scheduling priority under active_mutex 324 * We have to update the scheduling priority under active_mutex
324 * to protect against find_victim(). 325 * to protect against find_victim().
326 *
327 * No need to update the timeslice ASAP, it will get updated
328 * once the current one has expired.
325 */ 329 */
326 spu_update_sched_info(ctx); 330 spu_update_sched_info(ctx);
327 } 331 }
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 227968b4779d..758a80ac080a 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -927,10 +927,6 @@ int __init spu_sched_init(void)
927 INIT_LIST_HEAD(&spu_prio->runq[i]); 927 INIT_LIST_HEAD(&spu_prio->runq[i]);
928 __clear_bit(i, spu_prio->bitmap); 928 __clear_bit(i, spu_prio->bitmap);
929 } 929 }
930 for (i = 0; i < MAX_NUMNODES; i++) {
931 mutex_init(&cbe_spu_info[i].list_mutex);
932 INIT_LIST_HEAD(&cbe_spu_info[i].spus);
933 }
934 spin_lock_init(&spu_prio->runq_lock); 930 spin_lock_init(&spu_prio->runq_lock);
935 931
936 setup_timer(&spusched_timer, spusched_wake, 0); 932 setup_timer(&spusched_timer, spusched_wake, 0);
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 8b20c0c1556f..2bfdeb8ea8bd 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -40,13 +40,10 @@ enum {
40struct spu_context_ops; 40struct spu_context_ops;
41struct spu_gang; 41struct spu_gang;
42 42
43enum {
44 SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
45};
46
47/* ctx->sched_flags */ 43/* ctx->sched_flags */
48enum { 44enum {
49 SPU_SCHED_NOTIFY_ACTIVE, 45 SPU_SCHED_NOTIFY_ACTIVE,
46 SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
50}; 47};
51 48
52struct spu_context { 49struct spu_context {
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 3690624e49d4..28d1647b204e 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -181,7 +181,7 @@ setup_python(struct pci_controller *hose, struct device_node *dev)
181 } 181 }
182 iounmap(reg); 182 iounmap(reg);
183 183
184 setup_indirect_pci(hose, r.start + 0xf8000, r.start + 0xf8010); 184 setup_indirect_pci(hose, r.start + 0xf8000, r.start + 0xf8010, 0);
185} 185}
186 186
187/* Marvell Discovery II based Pegasos 2 */ 187/* Marvell Discovery II based Pegasos 2 */
@@ -277,13 +277,14 @@ chrp_find_bridges(void)
277 hose->cfg_data = p; 277 hose->cfg_data = p;
278 gg2_pci_config_base = p; 278 gg2_pci_config_base = p;
279 } else if (is_pegasos == 1) { 279 } else if (is_pegasos == 1) {
280 setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc); 280 setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);
281 } else if (is_pegasos == 2) { 281 } else if (is_pegasos == 2) {
282 setup_peg2(hose, dev); 282 setup_peg2(hose, dev);
283 } else if (!strncmp(model, "IBM,CPC710", 10)) { 283 } else if (!strncmp(model, "IBM,CPC710", 10)) {
284 setup_indirect_pci(hose, 284 setup_indirect_pci(hose,
285 r.start + 0x000f8000, 285 r.start + 0x000f8000,
286 r.start + 0x000f8010); 286 r.start + 0x000f8010,
287 0);
287 if (index == 0) { 288 if (index == 0) {
288 dma = of_get_property(dev, "system-dma-base", 289 dma = of_get_property(dev, "system-dma-base",
289 &len); 290 &len);
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index f4d0a7a603f5..bd5ca58345a1 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -73,7 +73,7 @@ static int __init linkstation_add_bridge(struct device_node *dev)
73 return -ENOMEM; 73 return -ENOMEM;
74 hose->first_busno = bus_range ? bus_range[0] : 0; 74 hose->first_busno = bus_range ? bus_range[0] : 0;
75 hose->last_busno = bus_range ? bus_range[1] : 0xff; 75 hose->last_busno = bus_range ? bus_range[1] : 0xff;
76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
77 77
78 /* Interpret the "ranges" property */ 78 /* Interpret the "ranges" property */
79 /* This also maps the I/O region and sets isa_io/mem_base */ 79 /* This also maps the I/O region and sets isa_io/mem_base */
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index 91df52a1899a..34bdbbe3ce59 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -182,7 +182,7 @@ static int set_spread_lpevents(char *str)
182} 182}
183__setup("spread_lpevents=", set_spread_lpevents); 183__setup("spread_lpevents=", set_spread_lpevents);
184 184
185void setup_hvlpevent_queue(void) 185void __init setup_hvlpevent_queue(void)
186{ 186{
187 void *eventStack; 187 void *eventStack;
188 188
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index fceaae40fe70..2542403288f9 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -490,6 +490,9 @@ static int __init maple_add_bridge(struct device_node *dev)
490 /* Fixup "bus-range" OF property */ 490 /* Fixup "bus-range" OF property */
491 fixup_bus_range(dev); 491 fixup_bus_range(dev);
492 492
493 /* Check for legacy IOs */
494 isa_bridge_find_early(hose);
495
493 return 0; 496 return 0;
494} 497}
495 498
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 484eb4e0e9db..08ce31e612c2 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_PPC_PMI) += pmi.o
12obj-$(CONFIG_U3_DART) += dart_iommu.o 12obj-$(CONFIG_U3_DART) += dart_iommu.o
13obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 13obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
14obj-$(CONFIG_FSL_SOC) += fsl_soc.o 14obj-$(CONFIG_FSL_SOC) += fsl_soc.o
15obj-$(CONFIG_FSL_PCI) += fsl_pci.o
15obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 16obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
16obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ 17obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
17mv64x60-$(CONFIG_PCI) += mv64x60_pci.o 18mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
new file mode 100644
index 000000000000..9fb0ce5c7176
--- /dev/null
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -0,0 +1,257 @@
1/*
2 * MPC85xx/86xx PCI/PCIE support routing.
3 *
4 * Copyright 2007 Freescale Semiconductor, Inc
5 *
6 * Initial author: Xianghua Xiao <x.xiao@freescale.com>
7 * Recode: ZHANG WEI <wei.zhang@freescale.com>
8 * Rewrite the routing for Frescale PCI and PCI Express
9 * Roy Zang <tie-fei.zang@freescale.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16#include <linux/kernel.h>
17#include <linux/pci.h>
18#include <linux/delay.h>
19#include <linux/string.h>
20#include <linux/init.h>
21#include <linux/bootmem.h>
22
23#include <asm/io.h>
24#include <asm/prom.h>
25#include <asm/pci-bridge.h>
26#include <asm/machdep.h>
27#include <sysdev/fsl_soc.h>
28#include <sysdev/fsl_pci.h>
29
30/* atmu setup for fsl pci/pcie controller */
31void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc)
32{
33 struct ccsr_pci __iomem *pci;
34 int i;
35
36 pr_debug("PCI memory map start 0x%x, size 0x%x\n", rsrc->start,
37 rsrc->end - rsrc->start + 1);
38 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
39
40 /* Disable all windows (except powar0 since its ignored) */
41 for(i = 1; i < 5; i++)
42 out_be32(&pci->pow[i].powar, 0);
43 for(i = 0; i < 3; i++)
44 out_be32(&pci->piw[i].piwar, 0);
45
46 /* Setup outbound MEM window */
47 for(i = 0; i < 3; i++)
48 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
49 pr_debug("PCI MEM resource start 0x%08x, size 0x%08x.\n",
50 hose->mem_resources[i].start,
51 hose->mem_resources[i].end
52 - hose->mem_resources[i].start + 1);
53 out_be32(&pci->pow[i+1].potar,
54 (hose->mem_resources[i].start >> 12)
55 & 0x000fffff);
56 out_be32(&pci->pow[i+1].potear, 0);
57 out_be32(&pci->pow[i+1].powbar,
58 (hose->mem_resources[i].start >> 12)
59 & 0x000fffff);
60 /* Enable, Mem R/W */
61 out_be32(&pci->pow[i+1].powar, 0x80044000
62 | (__ilog2(hose->mem_resources[i].end
63 - hose->mem_resources[i].start + 1) - 1));
64 }
65
66 /* Setup outbound IO window */
67 if (hose->io_resource.flags & IORESOURCE_IO){
68 pr_debug("PCI IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n",
69 hose->io_resource.start,
70 hose->io_resource.end - hose->io_resource.start + 1,
71 hose->io_base_phys);
72 out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12)
73 & 0x000fffff);
74 out_be32(&pci->pow[i+1].potear, 0);
75 out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12)
76 & 0x000fffff);
77 /* Enable, IO R/W */
78 out_be32(&pci->pow[i+1].powar, 0x80088000
79 | (__ilog2(hose->io_resource.end
80 - hose->io_resource.start + 1) - 1));
81 }
82
83 /* Setup 2G inbound Memory Window @ 1 */
84 out_be32(&pci->piw[2].pitar, 0x00000000);
85 out_be32(&pci->piw[2].piwbar,0x00000000);
86 out_be32(&pci->piw[2].piwar, PIWAR_2G);
87}
88
89void __init setup_pci_cmd(struct pci_controller *hose)
90{
91 u16 cmd;
92 int cap_x;
93
94 early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
95 cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY
96 | PCI_COMMAND_IO;
97 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd);
98
99 cap_x = early_find_capability(hose, 0, 0, PCI_CAP_ID_PCIX);
100 if (cap_x) {
101 int pci_x_cmd = cap_x + PCI_X_CMD;
102 cmd = PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ
103 | PCI_X_CMD_ERO | PCI_X_CMD_DPERR_E;
104 early_write_config_word(hose, 0, 0, pci_x_cmd, cmd);
105 } else {
106 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
107 }
108}
109
110static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
111{
112 struct resource *res;
113 int i, res_idx = PCI_BRIDGE_RESOURCES;
114 struct pci_controller *hose;
115
116 /* if we aren't a PCIe don't bother */
117 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
118 return ;
119
120 /*
121 * Make the bridge be transparent.
122 */
123 dev->transparent = 1;
124
125 hose = pci_bus_to_host(dev->bus);
126 if (!hose) {
127 printk(KERN_ERR "Can't find hose for bus %d\n",
128 dev->bus->number);
129 return;
130 }
131
132 /* Clear out any of the virtual P2P bridge registers */
133 pci_write_config_word(dev, PCI_IO_BASE_UPPER16, 0);
134 pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, 0);
135 pci_write_config_byte(dev, PCI_IO_BASE, 0x10);
136 pci_write_config_byte(dev, PCI_IO_LIMIT, 0);
137 pci_write_config_word(dev, PCI_MEMORY_BASE, 0x10);
138 pci_write_config_word(dev, PCI_MEMORY_LIMIT, 0);
139 pci_write_config_word(dev, PCI_PREF_BASE_UPPER32, 0x0);
140 pci_write_config_word(dev, PCI_PREF_LIMIT_UPPER32, 0x0);
141 pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10);
142 pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0);
143
144 if (hose->io_resource.flags) {
145 res = &dev->resource[res_idx++];
146 res->start = hose->io_resource.start;
147 res->end = hose->io_resource.end;
148 res->flags = hose->io_resource.flags;
149 update_bridge_resource(dev, res);
150 }
151
152 for (i = 0; i < 3; i++) {
153 res = &dev->resource[res_idx + i];
154 res->start = hose->mem_resources[i].start;
155 res->end = hose->mem_resources[i].end;
156 res->flags = hose->mem_resources[i].flags;
157 update_bridge_resource(dev, res);
158 }
159}
160
161int __init fsl_pcie_check_link(struct pci_controller *hose)
162{
163 u16 val;
164 early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val);
165 if (val < PCIE_LTSSM_L0)
166 return 1;
167 return 0;
168}
169
170void fsl_pcibios_fixup_bus(struct pci_bus *bus)
171{
172 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
173 int i;
174
175 /* deal with bogus pci_bus when we don't have anything connected on PCIe */
176 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
177 if (bus->parent) {
178 for (i = 0; i < 4; ++i)
179 bus->resource[i] = bus->parent->resource[i];
180 }
181 }
182}
183
184int __init fsl_add_bridge(struct device_node *dev, int is_primary)
185{
186 int len;
187 struct pci_controller *hose;
188 struct resource rsrc;
189 const int *bus_range;
190
191 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
192
193 /* Fetch host bridge registers address */
194 if (of_address_to_resource(dev, 0, &rsrc)) {
195 printk(KERN_WARNING "Can't get pci register base!");
196 return -ENOMEM;
197 }
198
199 /* Get bus range if any */
200 bus_range = of_get_property(dev, "bus-range", &len);
201 if (bus_range == NULL || len < 2 * sizeof(int))
202 printk(KERN_WARNING "Can't get bus-range for %s, assume"
203 " bus 0\n", dev->full_name);
204
205 pci_assign_all_buses = 1;
206 hose = pcibios_alloc_controller(dev);
207 if (!hose)
208 return -ENOMEM;
209
210 hose->first_busno = bus_range ? bus_range[0] : 0x0;
211 hose->last_busno = bus_range ? bus_range[1] : 0xff;
212
213 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4,
214 PPC_INDIRECT_TYPE_BIG_ENDIAN);
215 setup_pci_cmd(hose);
216
217 /* check PCI express link status */
218 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
219 hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG |
220 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
221 if (fsl_pcie_check_link(hose))
222 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
223 }
224
225 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx."
226 "Firmware bus number: %d->%d\n",
227 (unsigned long long)rsrc.start, hose->first_busno,
228 hose->last_busno);
229
230 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
231 hose, hose->cfg_addr, hose->cfg_data);
232
233 /* Interpret the "ranges" property */
234 /* This also maps the I/O region and sets isa_io/mem_base */
235 pci_process_bridge_OF_ranges(hose, dev, is_primary);
236
237 /* Setup PEX window registers */
238 setup_pci_atmu(hose, &rsrc);
239
240 return 0;
241}
242
243DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_transparent);
244DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_transparent);
245DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_transparent);
246DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_transparent);
247DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_transparent);
248DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_transparent);
249DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_transparent);
250DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_transparent);
251DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_transparent);
252DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_transparent);
253DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_transparent);
254DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent);
255DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent);
256DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent);
257DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent);
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
new file mode 100644
index 000000000000..37b04ad26571
--- /dev/null
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -0,0 +1,88 @@
1/*
2 * MPC85xx/86xx PCI Express structure define
3 *
4 * Copyright 2007 Freescale Semiconductor, Inc
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 */
12
13#ifdef __KERNEL__
14#ifndef __POWERPC_FSL_PCI_H
15#define __POWERPC_FSL_PCI_H
16
17#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */
18#define PCIE_LTSSM_L0 0x16 /* L0 state */
19#define PIWAR_2G 0xa0f5501e /* Enable, Prefetch, Local Mem, Snoop R/W, 2G */
20
21/* PCI/PCI Express outbound window reg */
22struct pci_outbound_window_regs {
23 __be32 potar; /* 0x.0 - Outbound translation address register */
24 __be32 potear; /* 0x.4 - Outbound translation extended address register */
25 __be32 powbar; /* 0x.8 - Outbound window base address register */
26 u8 res1[4];
27 __be32 powar; /* 0x.10 - Outbound window attributes register */
28 u8 res2[12];
29};
30
31/* PCI/PCI Express inbound window reg */
32struct pci_inbound_window_regs {
33 __be32 pitar; /* 0x.0 - Inbound translation address register */
34 u8 res1[4];
35 __be32 piwbar; /* 0x.8 - Inbound window base address register */
36 __be32 piwbear; /* 0x.c - Inbound window base extended address register */
37 __be32 piwar; /* 0x.10 - Inbound window attributes register */
38 u8 res2[12];
39};
40
41/* PCI/PCI Express IO block registers for 85xx/86xx */
42struct ccsr_pci {
43 __be32 config_addr; /* 0x.000 - PCI/PCIE Configuration Address Register */
44 __be32 config_data; /* 0x.004 - PCI/PCIE Configuration Data Register */
45 __be32 int_ack; /* 0x.008 - PCI Interrupt Acknowledge Register */
46 __be32 pex_otb_cpl_tor; /* 0x.00c - PCIE Outbound completion timeout register */
47 __be32 pex_conf_tor; /* 0x.010 - PCIE configuration timeout register */
48 u8 res2[12];
49 __be32 pex_pme_mes_dr; /* 0x.020 - PCIE PME and message detect register */
50 __be32 pex_pme_mes_disr; /* 0x.024 - PCIE PME and message disable register */
51 __be32 pex_pme_mes_ier; /* 0x.028 - PCIE PME and message interrupt enable register */
52 __be32 pex_pmcr; /* 0x.02c - PCIE power management command register */
53 u8 res3[3024];
54
55/* PCI/PCI Express outbound window 0-4
56 * Window 0 is the default window and is the only window enabled upon reset.
57 * The default outbound register set is used when a transaction misses
58 * in all of the other outbound windows.
59 */
60 struct pci_outbound_window_regs pow[5];
61
62 u8 res14[256];
63
64/* PCI/PCI Express inbound window 3-1
65 * inbound window 1 supports only a 32-bit base address and does not
66 * define an inbound window base extended address register.
67 */
68 struct pci_inbound_window_regs piw[3];
69
70 __be32 pex_err_dr; /* 0x.e00 - PCI/PCIE error detect register */
71 u8 res21[4];
72 __be32 pex_err_en; /* 0x.e08 - PCI/PCIE error interrupt enable register */
73 u8 res22[4];
74 __be32 pex_err_disr; /* 0x.e10 - PCI/PCIE error disable register */
75 u8 res23[12];
76 __be32 pex_err_cap_stat; /* 0x.e20 - PCI/PCIE error capture status register */
77 u8 res24[4];
78 __be32 pex_err_cap_r0; /* 0x.e28 - PCIE error capture register 0 */
79 __be32 pex_err_cap_r1; /* 0x.e2c - PCIE error capture register 0 */
80 __be32 pex_err_cap_r2; /* 0x.e30 - PCIE error capture register 0 */
81 __be32 pex_err_cap_r3; /* 0x.e34 - PCIE error capture register 0 */
82};
83
84extern int fsl_add_bridge(struct device_node *dev, int is_primary);
85extern void fsl_pcibios_fixup_bus(struct pci_bus *bus);
86
87#endif /* __POWERPC_FSL_PCI_H */
88#endif /* __KERNEL__ */
diff --git a/arch/powerpc/sysdev/fsl_pcie.h b/arch/powerpc/sysdev/fsl_pcie.h
deleted file mode 100644
index 8d9779c84bea..000000000000
--- a/arch/powerpc/sysdev/fsl_pcie.h
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * MPC85xx/86xx PCI Express structure define
3 *
4 * Copyright 2007 Freescale Semiconductor, Inc
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 */
12
13#ifdef __KERNEL__
14#ifndef __POWERPC_FSL_PCIE_H
15#define __POWERPC_FSL_PCIE_H
16
17/* PCIE Express IO block registers in 85xx/86xx */
18
19struct ccsr_pex {
20 __be32 __iomem pex_config_addr; /* 0x.000 - PCI Express Configuration Address Register */
21 __be32 __iomem pex_config_data; /* 0x.004 - PCI Express Configuration Data Register */
22 u8 __iomem res1[4];
23 __be32 __iomem pex_otb_cpl_tor; /* 0x.00c - PCI Express Outbound completion timeout register */
24 __be32 __iomem pex_conf_tor; /* 0x.010 - PCI Express configuration timeout register */
25 u8 __iomem res2[12];
26 __be32 __iomem pex_pme_mes_dr; /* 0x.020 - PCI Express PME and message detect register */
27 __be32 __iomem pex_pme_mes_disr; /* 0x.024 - PCI Express PME and message disable register */
28 __be32 __iomem pex_pme_mes_ier; /* 0x.028 - PCI Express PME and message interrupt enable register */
29 __be32 __iomem pex_pmcr; /* 0x.02c - PCI Express power management command register */
30 u8 __iomem res3[3024];
31 __be32 __iomem pexotar0; /* 0x.c00 - PCI Express outbound translation address register 0 */
32 __be32 __iomem pexotear0; /* 0x.c04 - PCI Express outbound translation extended address register 0*/
33 u8 __iomem res4[8];
34 __be32 __iomem pexowar0; /* 0x.c10 - PCI Express outbound window attributes register 0*/
35 u8 __iomem res5[12];
36 __be32 __iomem pexotar1; /* 0x.c20 - PCI Express outbound translation address register 1 */
37 __be32 __iomem pexotear1; /* 0x.c24 - PCI Express outbound translation extended address register 1*/
38 __be32 __iomem pexowbar1; /* 0x.c28 - PCI Express outbound window base address register 1*/
39 u8 __iomem res6[4];
40 __be32 __iomem pexowar1; /* 0x.c30 - PCI Express outbound window attributes register 1*/
41 u8 __iomem res7[12];
42 __be32 __iomem pexotar2; /* 0x.c40 - PCI Express outbound translation address register 2 */
43 __be32 __iomem pexotear2; /* 0x.c44 - PCI Express outbound translation extended address register 2*/
44 __be32 __iomem pexowbar2; /* 0x.c48 - PCI Express outbound window base address register 2*/
45 u8 __iomem res8[4];
46 __be32 __iomem pexowar2; /* 0x.c50 - PCI Express outbound window attributes register 2*/
47 u8 __iomem res9[12];
48 __be32 __iomem pexotar3; /* 0x.c60 - PCI Express outbound translation address register 3 */
49 __be32 __iomem pexotear3; /* 0x.c64 - PCI Express outbound translation extended address register 3*/
50 __be32 __iomem pexowbar3; /* 0x.c68 - PCI Express outbound window base address register 3*/
51 u8 __iomem res10[4];
52 __be32 __iomem pexowar3; /* 0x.c70 - PCI Express outbound window attributes register 3*/
53 u8 __iomem res11[12];
54 __be32 __iomem pexotar4; /* 0x.c80 - PCI Express outbound translation address register 4 */
55 __be32 __iomem pexotear4; /* 0x.c84 - PCI Express outbound translation extended address register 4*/
56 __be32 __iomem pexowbar4; /* 0x.c88 - PCI Express outbound window base address register 4*/
57 u8 __iomem res12[4];
58 __be32 __iomem pexowar4; /* 0x.c90 - PCI Express outbound window attributes register 4*/
59 u8 __iomem res13[12];
60 u8 __iomem res14[256];
61 __be32 __iomem pexitar3; /* 0x.da0 - PCI Express inbound translation address register 3 */
62 u8 __iomem res15[4];
63 __be32 __iomem pexiwbar3; /* 0x.da8 - PCI Express inbound window base address register 3 */
64 __be32 __iomem pexiwbear3; /* 0x.dac - PCI Express inbound window base extended address register 3 */
65 __be32 __iomem pexiwar3; /* 0x.db0 - PCI Express inbound window attributes register 3 */
66 u8 __iomem res16[12];
67 __be32 __iomem pexitar2; /* 0x.dc0 - PCI Express inbound translation address register 2 */
68 u8 __iomem res17[4];
69 __be32 __iomem pexiwbar2; /* 0x.dc8 - PCI Express inbound window base address register 2 */
70 __be32 __iomem pexiwbear2; /* 0x.dcc - PCI Express inbound window base extended address register 2 */
71 __be32 __iomem pexiwar2; /* 0x.dd0 - PCI Express inbound window attributes register 2 */
72 u8 __iomem res18[12];
73 __be32 __iomem pexitar1; /* 0x.de0 - PCI Express inbound translation address register 2 */
74 u8 __iomem res19[4];
75 __be32 __iomem pexiwbar1; /* 0x.de8 - PCI Express inbound window base address register 2 */
76 __be32 __iomem pexiwbear1; /* 0x.dec - PCI Express inbound window base extended address register 2 */
77 __be32 __iomem pexiwar1; /* 0x.df0 - PCI Express inbound window attributes register 2 */
78 u8 __iomem res20[12];
79 __be32 __iomem pex_err_dr; /* 0x.e00 - PCI Express error detect register */
80 u8 __iomem res21[4];
81 __be32 __iomem pex_err_en; /* 0x.e08 - PCI Express error interrupt enable register */
82 u8 __iomem res22[4];
83 __be32 __iomem pex_err_disr; /* 0x.e10 - PCI Express error disable register */
84 u8 __iomem res23[12];
85 __be32 __iomem pex_err_cap_stat; /* 0x.e20 - PCI Express error capture status register */
86 u8 __iomem res24[4];
87 __be32 __iomem pex_err_cap_r0; /* 0x.e28 - PCI Express error capture register 0 */
88 __be32 __iomem pex_err_cap_r1; /* 0x.e2c - PCI Express error capture register 0 */
89 __be32 __iomem pex_err_cap_r2; /* 0x.e30 - PCI Express error capture register 0 */
90 __be32 __iomem pex_err_cap_r3; /* 0x.e34 - PCI Express error capture register 0 */
91};
92
93#endif /* __POWERPC_FSL_PCIE_H */
94#endif /* __KERNEL__ */
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3289fab01e92..727453d3e8b9 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -305,6 +305,64 @@ err:
305 305
306arch_initcall(gfar_of_init); 306arch_initcall(gfar_of_init);
307 307
308#ifdef CONFIG_I2C_BOARDINFO
309#include <linux/i2c.h>
310struct i2c_driver_device {
311 char *of_device;
312 char *i2c_driver;
313 char *i2c_type;
314};
315
316static struct i2c_driver_device i2c_devices[] __initdata = {
317 {"ricoh,rs5c372a", "rtc-rs5c372", "rs5c372a",},
318 {"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",},
319 {"ricoh,rv5c386", "rtc-rs5c372", "rv5c386",},
320 {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",},
321};
322
323static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info)
324{
325 int i;
326
327 for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
328 if (!of_device_is_compatible(node, i2c_devices[i].of_device))
329 continue;
330 strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN);
331 strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE);
332 return 0;
333 }
334 return -ENODEV;
335}
336
337static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num)
338{
339 struct device_node *node = NULL;
340
341 while ((node = of_get_next_child(adap_node, node))) {
342 struct i2c_board_info info;
343 const u32 *addr;
344 int len;
345
346 addr = of_get_property(node, "reg", &len);
347 if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) {
348 printk(KERN_WARNING "fsl_ioc.c: invalid i2c device entry\n");
349 continue;
350 }
351
352 info.irq = irq_of_parse_and_map(node, 0);
353 if (info.irq == NO_IRQ)
354 info.irq = -1;
355
356 if (of_find_i2c_driver(node, &info) < 0)
357 continue;
358
359 info.platform_data = NULL;
360 info.addr = *addr;
361
362 i2c_register_board_info(bus_num, &info, 1);
363 }
364}
365
308static int __init fsl_i2c_of_init(void) 366static int __init fsl_i2c_of_init(void)
309{ 367{
310 struct device_node *np; 368 struct device_node *np;
@@ -349,6 +407,8 @@ static int __init fsl_i2c_of_init(void)
349 fsl_i2c_platform_data)); 407 fsl_i2c_platform_data));
350 if (ret) 408 if (ret)
351 goto unreg; 409 goto unreg;
410
411 of_register_i2c_devices(np, i);
352 } 412 }
353 413
354 return 0; 414 return 0;
@@ -360,6 +420,7 @@ err:
360} 420}
361 421
362arch_initcall(fsl_i2c_of_init); 422arch_initcall(fsl_i2c_of_init);
423#endif
363 424
364#ifdef CONFIG_PPC_83xx 425#ifdef CONFIG_PPC_83xx
365static int __init mpc83xx_wdt_init(void) 426static int __init mpc83xx_wdt_init(void)
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index 42053625f498..11ad5622eb76 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -55,7 +55,7 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
55 55
56void __init setup_grackle(struct pci_controller *hose) 56void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
59 if (machine_is_compatible("PowerMac1,1")) 59 if (machine_is_compatible("PowerMac1,1"))
60 pci_assign_all_buses = 1; 60 pci_assign_all_buses = 1;
61 if (machine_is_compatible("AAPL,PowerBook1998")) 61 if (machine_is_compatible("AAPL,PowerBook1998"))
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index c7e6e859b393..5294560c7b00 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -20,12 +20,6 @@
20#include <asm/pci-bridge.h> 20#include <asm/pci-bridge.h>
21#include <asm/machdep.h> 21#include <asm/machdep.h>
22 22
23#ifdef CONFIG_PPC_INDIRECT_PCI_BE
24#define PCI_CFG_OUT out_be32
25#else
26#define PCI_CFG_OUT out_le32
27#endif
28
29static int 23static int
30indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, 24indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
31 int len, u32 *val) 25 int len, u32 *val)
@@ -35,10 +29,17 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
35 u8 cfg_type = 0; 29 u8 cfg_type = 0;
36 u32 bus_no, reg; 30 u32 bus_no, reg;
37 31
32 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
33 if (bus->number != hose->first_busno)
34 return PCIBIOS_DEVICE_NOT_FOUND;
35 if (devfn != 0)
36 return PCIBIOS_DEVICE_NOT_FOUND;
37 }
38
38 if (ppc_md.pci_exclude_device) 39 if (ppc_md.pci_exclude_device)
39 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) 40 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
40 return PCIBIOS_DEVICE_NOT_FOUND; 41 return PCIBIOS_DEVICE_NOT_FOUND;
41 42
42 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) 43 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
43 if (bus->number != hose->first_busno) 44 if (bus->number != hose->first_busno)
44 cfg_type = 1; 45 cfg_type = 1;
@@ -51,9 +52,12 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
51 else 52 else
52 reg = offset & 0xfc; 53 reg = offset & 0xfc;
53 54
54 PCI_CFG_OUT(hose->cfg_addr, 55 if (hose->indirect_type & PPC_INDIRECT_TYPE_BIG_ENDIAN)
55 (0x80000000 | (bus_no << 16) 56 out_be32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
56 | (devfn << 8) | reg | cfg_type)); 57 (devfn << 8) | reg | cfg_type));
58 else
59 out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
60 (devfn << 8) | reg | cfg_type));
57 61
58 /* 62 /*
59 * Note: the caller has already checked that offset is 63 * Note: the caller has already checked that offset is
@@ -83,6 +87,13 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
83 u8 cfg_type = 0; 87 u8 cfg_type = 0;
84 u32 bus_no, reg; 88 u32 bus_no, reg;
85 89
90 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
91 if (bus->number != hose->first_busno)
92 return PCIBIOS_DEVICE_NOT_FOUND;
93 if (devfn != 0)
94 return PCIBIOS_DEVICE_NOT_FOUND;
95 }
96
86 if (ppc_md.pci_exclude_device) 97 if (ppc_md.pci_exclude_device)
87 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) 98 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
88 return PCIBIOS_DEVICE_NOT_FOUND; 99 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -99,9 +110,12 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
99 else 110 else
100 reg = offset & 0xfc; 111 reg = offset & 0xfc;
101 112
102 PCI_CFG_OUT(hose->cfg_addr, 113 if (hose->indirect_type & PPC_INDIRECT_TYPE_BIG_ENDIAN)
103 (0x80000000 | (bus_no << 16) 114 out_be32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
104 | (devfn << 8) | reg | cfg_type)); 115 (devfn << 8) | reg | cfg_type));
116 else
117 out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
118 (devfn << 8) | reg | cfg_type));
105 119
106 /* surpress setting of PCI_PRIMARY_BUS */ 120 /* surpress setting of PCI_PRIMARY_BUS */
107 if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) 121 if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
@@ -135,24 +149,16 @@ static struct pci_ops indirect_pci_ops =
135}; 149};
136 150
137void __init 151void __init
138setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr, 152setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 flags)
139 void __iomem * cfg_data)
140{
141 hose->cfg_addr = cfg_addr;
142 hose->cfg_data = cfg_data;
143 hose->ops = &indirect_pci_ops;
144}
145
146void __init
147setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
148{ 153{
149 unsigned long base = cfg_addr & PAGE_MASK; 154 unsigned long base = cfg_addr & PAGE_MASK;
150 void __iomem *mbase, *addr, *data; 155 void __iomem *mbase;
151 156
152 mbase = ioremap(base, PAGE_SIZE); 157 mbase = ioremap(base, PAGE_SIZE);
153 addr = mbase + (cfg_addr & ~PAGE_MASK); 158 hose->cfg_addr = mbase + (cfg_addr & ~PAGE_MASK);
154 if ((cfg_data & PAGE_MASK) != base) 159 if ((cfg_data & PAGE_MASK) != base)
155 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); 160 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
156 data = mbase + (cfg_data & ~PAGE_MASK); 161 hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK);
157 setup_indirect_pci_nomap(hose, addr, data); 162 hose->ops = &indirect_pci_ops;
163 hose->indirect_type = flags;
158} 164}
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 45db86c2363c..9b3baa7317d7 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -144,7 +144,7 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
144 hose->first_busno = bus_range ? bus_range[0] : 0; 144 hose->first_busno = bus_range ? bus_range[0] : 0;
145 hose->last_busno = bus_range ? bus_range[1] : 0xff; 145 hose->last_busno = bus_range ? bus_range[1] : 0xff;
146 146
147 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4); 147 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4, 0);
148 hose->self_busno = hose->first_busno; 148 hose->self_busno = hose->first_busno;
149 149
150 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. " 150 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. "
diff --git a/arch/ppc/configs/TQM8540_defconfig b/arch/ppc/configs/TQM8540_defconfig
index 99bf3b7a2762..f33f0e772dcb 100644
--- a/arch/ppc/configs/TQM8540_defconfig
+++ b/arch/ppc/configs/TQM8540_defconfig
@@ -136,7 +136,7 @@ CONFIG_BINFMT_ELF=y
136# CONFIG_BINFMT_MISC is not set 136# CONFIG_BINFMT_MISC is not set
137# CONFIG_CMDLINE_BOOL is not set 137# CONFIG_CMDLINE_BOOL is not set
138# CONFIG_PM is not set 138# CONFIG_PM is not set
139# CONFIG_SOFTWARE_SUSPEND is not set 139# CONFIG_HIBERNATION is not set
140CONFIG_SECCOMP=y 140CONFIG_SECCOMP=y
141CONFIG_ISA_DMA_API=y 141CONFIG_ISA_DMA_API=y
142 142
diff --git a/arch/ppc/configs/TQM8541_defconfig b/arch/ppc/configs/TQM8541_defconfig
index 0ff56695d349..e00cd62daa3f 100644
--- a/arch/ppc/configs/TQM8541_defconfig
+++ b/arch/ppc/configs/TQM8541_defconfig
@@ -138,7 +138,7 @@ CONFIG_BINFMT_ELF=y
138# CONFIG_BINFMT_MISC is not set 138# CONFIG_BINFMT_MISC is not set
139# CONFIG_CMDLINE_BOOL is not set 139# CONFIG_CMDLINE_BOOL is not set
140# CONFIG_PM is not set 140# CONFIG_PM is not set
141# CONFIG_SOFTWARE_SUSPEND is not set 141# CONFIG_HIBERNATION is not set
142CONFIG_SECCOMP=y 142CONFIG_SECCOMP=y
143CONFIG_ISA_DMA_API=y 143CONFIG_ISA_DMA_API=y
144 144
diff --git a/arch/ppc/configs/TQM8555_defconfig b/arch/ppc/configs/TQM8555_defconfig
index 730b3db2e47a..43a0d9df1e23 100644
--- a/arch/ppc/configs/TQM8555_defconfig
+++ b/arch/ppc/configs/TQM8555_defconfig
@@ -138,7 +138,7 @@ CONFIG_BINFMT_ELF=y
138# CONFIG_BINFMT_MISC is not set 138# CONFIG_BINFMT_MISC is not set
139# CONFIG_CMDLINE_BOOL is not set 139# CONFIG_CMDLINE_BOOL is not set
140# CONFIG_PM is not set 140# CONFIG_PM is not set
141# CONFIG_SOFTWARE_SUSPEND is not set 141# CONFIG_HIBERNATION is not set
142CONFIG_SECCOMP=y 142CONFIG_SECCOMP=y
143CONFIG_ISA_DMA_API=y 143CONFIG_ISA_DMA_API=y
144 144
diff --git a/arch/ppc/configs/TQM8560_defconfig b/arch/ppc/configs/TQM8560_defconfig
index 1d902072825e..a814d17a2be9 100644
--- a/arch/ppc/configs/TQM8560_defconfig
+++ b/arch/ppc/configs/TQM8560_defconfig
@@ -137,7 +137,7 @@ CONFIG_BINFMT_ELF=y
137# CONFIG_BINFMT_MISC is not set 137# CONFIG_BINFMT_MISC is not set
138# CONFIG_CMDLINE_BOOL is not set 138# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set 139# CONFIG_PM is not set
140# CONFIG_SOFTWARE_SUSPEND is not set 140# CONFIG_HIBERNATION is not set
141CONFIG_SECCOMP=y 141CONFIG_SECCOMP=y
142CONFIG_ISA_DMA_API=y 142CONFIG_ISA_DMA_API=y
143 143
diff --git a/arch/ppc/configs/ev64360_defconfig b/arch/ppc/configs/ev64360_defconfig
index d471e578dcb5..f297c4bb632b 100644
--- a/arch/ppc/configs/ev64360_defconfig
+++ b/arch/ppc/configs/ev64360_defconfig
@@ -142,7 +142,7 @@ CONFIG_BINFMT_MISC=y
142CONFIG_CMDLINE_BOOL=y 142CONFIG_CMDLINE_BOOL=y
143CONFIG_CMDLINE="console=ttyMM0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2" 143CONFIG_CMDLINE="console=ttyMM0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"
144# CONFIG_PM is not set 144# CONFIG_PM is not set
145# CONFIG_SOFTWARE_SUSPEND is not set 145# CONFIG_HIBERNATION is not set
146CONFIG_SECCOMP=y 146CONFIG_SECCOMP=y
147CONFIG_ISA_DMA_API=y 147CONFIG_ISA_DMA_API=y
148 148
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig
index 4a33aca948cc..69bad91a6b65 100644
--- a/arch/ppc/configs/ml300_defconfig
+++ b/arch/ppc/configs/ml300_defconfig
@@ -148,7 +148,7 @@ CONFIG_BINFMT_ELF=y
148CONFIG_CMDLINE_BOOL=y 148CONFIG_CMDLINE_BOOL=y
149CONFIG_CMDLINE="console=ttyS0,9600" 149CONFIG_CMDLINE="console=ttyS0,9600"
150# CONFIG_PM is not set 150# CONFIG_PM is not set
151# CONFIG_SOFTWARE_SUSPEND is not set 151# CONFIG_HIBERNATION is not set
152CONFIG_SECCOMP=y 152CONFIG_SECCOMP=y
153CONFIG_ISA_DMA_API=y 153CONFIG_ISA_DMA_API=y
154 154
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig
index fafd2516fa51..a78896ea4560 100644
--- a/arch/ppc/configs/ml403_defconfig
+++ b/arch/ppc/configs/ml403_defconfig
@@ -149,7 +149,7 @@ CONFIG_BINFMT_ELF=y
149CONFIG_CMDLINE_BOOL=y 149CONFIG_CMDLINE_BOOL=y
150CONFIG_CMDLINE="console=ttyS0,9600" 150CONFIG_CMDLINE="console=ttyS0,9600"
151# CONFIG_PM is not set 151# CONFIG_PM is not set
152# CONFIG_SOFTWARE_SUSPEND is not set 152# CONFIG_HIBERNATION is not set
153CONFIG_SECCOMP=y 153CONFIG_SECCOMP=y
154CONFIG_ISA_DMA_API=y 154CONFIG_ISA_DMA_API=y
155 155
diff --git a/arch/ppc/configs/mpc834x_sys_defconfig b/arch/ppc/configs/mpc834x_sys_defconfig
index b96a6d6dad0e..d90c8a7e060c 100644
--- a/arch/ppc/configs/mpc834x_sys_defconfig
+++ b/arch/ppc/configs/mpc834x_sys_defconfig
@@ -130,7 +130,7 @@ CONFIG_BINFMT_ELF=y
130# CONFIG_BINFMT_MISC is not set 130# CONFIG_BINFMT_MISC is not set
131# CONFIG_CMDLINE_BOOL is not set 131# CONFIG_CMDLINE_BOOL is not set
132# CONFIG_PM is not set 132# CONFIG_PM is not set
133# CONFIG_SOFTWARE_SUSPEND is not set 133# CONFIG_HIBERNATION is not set
134CONFIG_SECCOMP=y 134CONFIG_SECCOMP=y
135CONFIG_ISA_DMA_API=y 135CONFIG_ISA_DMA_API=y
136 136
diff --git a/arch/ppc/configs/prep_defconfig b/arch/ppc/configs/prep_defconfig
index 0aa333178b2a..b7cee2d71405 100644
--- a/arch/ppc/configs/prep_defconfig
+++ b/arch/ppc/configs/prep_defconfig
@@ -166,7 +166,7 @@ CONFIG_PROC_PREPRESIDUAL=y
166CONFIG_PM=y 166CONFIG_PM=y
167# CONFIG_PM_LEGACY is not set 167# CONFIG_PM_LEGACY is not set
168# CONFIG_PM_DEBUG is not set 168# CONFIG_PM_DEBUG is not set
169CONFIG_SOFTWARE_SUSPEND=y 169CONFIG_HIBERNATION=y
170CONFIG_PM_STD_PARTITION="" 170CONFIG_PM_STD_PARTITION=""
171# CONFIG_SECCOMP is not set 171# CONFIG_SECCOMP is not set
172CONFIG_ISA_DMA_API=y 172CONFIG_ISA_DMA_API=y
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 6ffbab77ae4d..62391fb1f61f 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -173,7 +173,7 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer,
173/* 173/*
174 * appldata_mod_vtimer_wrap() 174 * appldata_mod_vtimer_wrap()
175 * 175 *
176 * wrapper function for mod_virt_timer(), because smp_call_function_on() 176 * wrapper function for mod_virt_timer(), because smp_call_function_single()
177 * accepts only one parameter. 177 * accepts only one parameter.
178 */ 178 */
179static void __appldata_mod_vtimer_wrap(void *p) { 179static void __appldata_mod_vtimer_wrap(void *p) {
@@ -208,9 +208,9 @@ __appldata_vtimer_setup(int cmd)
208 num_online_cpus()) * TOD_MICRO; 208 num_online_cpus()) * TOD_MICRO;
209 for_each_online_cpu(i) { 209 for_each_online_cpu(i) {
210 per_cpu(appldata_timer, i).expires = per_cpu_interval; 210 per_cpu(appldata_timer, i).expires = per_cpu_interval;
211 smp_call_function_on(add_virt_timer_periodic, 211 smp_call_function_single(i, add_virt_timer_periodic,
212 &per_cpu(appldata_timer, i), 212 &per_cpu(appldata_timer, i),
213 0, 1, i); 213 0, 1);
214 } 214 }
215 appldata_timer_active = 1; 215 appldata_timer_active = 1;
216 P_INFO("Monitoring timer started.\n"); 216 P_INFO("Monitoring timer started.\n");
@@ -236,8 +236,8 @@ __appldata_vtimer_setup(int cmd)
236 } args; 236 } args;
237 args.timer = &per_cpu(appldata_timer, i); 237 args.timer = &per_cpu(appldata_timer, i);
238 args.expires = per_cpu_interval; 238 args.expires = per_cpu_interval;
239 smp_call_function_on(__appldata_mod_vtimer_wrap, 239 smp_call_function_single(i, __appldata_mod_vtimer_wrap,
240 &args, 0, 1, i); 240 &args, 0, 1);
241 } 241 }
242 } 242 }
243} 243}
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index acc415457b45..6ee1bedbd1bf 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1710,3 +1710,13 @@ compat_sys_timerfd_wrapper:
1710sys_eventfd_wrapper: 1710sys_eventfd_wrapper:
1711 llgfr %r2,%r2 # unsigned int 1711 llgfr %r2,%r2 # unsigned int
1712 jg sys_eventfd 1712 jg sys_eventfd
1713
1714 .globl sys_fallocate_wrapper
1715sys_fallocate_wrapper:
1716 lgfr %r2,%r2 # int
1717 lgfr %r3,%r3 # int
1718 sllg %r4,%r4,32 # get high word of 64bit loff_t
1719 lr %r4,%r5 # get low word of 64bit loff_t
1720 sllg %r5,%r6,32 # get high word of 64bit loff_t
1721 l %r5,164(%r15) # get low word of 64bit loff_t
1722 jg sys_fallocate
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index bc7ff3658c3d..f3bceb165321 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -624,9 +624,11 @@ io_work_loop:
624# _TIF_MCCK_PENDING is set, call handler 624# _TIF_MCCK_PENDING is set, call handler
625# 625#
626io_mcck_pending: 626io_mcck_pending:
627 TRACE_IRQS_OFF
627 l %r1,BASED(.Ls390_handle_mcck) 628 l %r1,BASED(.Ls390_handle_mcck)
628 la %r14,BASED(io_work_loop) 629 basr %r14,%r1 # TIF bit will be cleared by handler
629 br %r1 # TIF bit will be cleared by handler 630 TRACE_IRQS_ON
631 b BASED(io_work_loop)
630 632
631# 633#
632# _TIF_NEED_RESCHED is set, call schedule 634# _TIF_NEED_RESCHED is set, call schedule
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 2a7b1304418b..9c0d5cc8269d 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -611,8 +611,10 @@ io_work_loop:
611# _TIF_MCCK_PENDING is set, call handler 611# _TIF_MCCK_PENDING is set, call handler
612# 612#
613io_mcck_pending: 613io_mcck_pending:
614 larl %r14,io_work_loop 614 TRACE_IRQS_OFF
615 jg s390_handle_mcck # TIF bit will be cleared by handler 615 brasl %r14,s390_handle_mcck # TIF bit will be cleared by handler
616 TRACE_IRQS_ON
617 j io_work_loop
616 618
617# 619#
618# _TIF_NEED_RESCHED is set, call schedule 620# _TIF_NEED_RESCHED is set, call schedule
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index 8f8c802f1bcf..83477c7dc743 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -35,6 +35,7 @@
35#define ARCH_OFFSET 0 35#define ARCH_OFFSET 0
36#endif 36#endif
37 37
38.section ".text.head","ax"
38#ifndef CONFIG_IPL 39#ifndef CONFIG_IPL
39 .org 0 40 .org 0
40 .long 0x00080000,0x80000000+startup # Just a restart PSW 41 .long 0x00080000,0x80000000+startup # Just a restart PSW
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
index d73a74013e73..d494161b05b4 100644
--- a/arch/s390/kernel/init_task.c
+++ b/arch/s390/kernel/init_task.c
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/fs.h>
10#include <linux/module.h> 11#include <linux/module.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/init_task.h> 13#include <linux/init_task.h>
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 441975b796fb..abb447a3e472 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -21,6 +21,7 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/fs.h>
24#include <linux/smp.h> 25#include <linux/smp.h>
25#include <linux/stddef.h> 26#include <linux/stddef.h>
26#include <linux/unistd.h> 27#include <linux/unistd.h>
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 182c085ae4dd..35edbef1d222 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/err.h>
26#include <linux/spinlock.h> 27#include <linux/spinlock.h>
27#include <linux/kernel_stat.h> 28#include <linux/kernel_stat.h>
28#include <linux/delay.h> 29#include <linux/delay.h>
@@ -120,7 +121,7 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
120 if (wait) 121 if (wait)
121 data.finished = CPU_MASK_NONE; 122 data.finished = CPU_MASK_NONE;
122 123
123 spin_lock_bh(&call_lock); 124 spin_lock(&call_lock);
124 call_data = &data; 125 call_data = &data;
125 126
126 for_each_cpu_mask(cpu, map) 127 for_each_cpu_mask(cpu, map)
@@ -129,18 +130,16 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
129 /* Wait for response */ 130 /* Wait for response */
130 while (!cpus_equal(map, data.started)) 131 while (!cpus_equal(map, data.started))
131 cpu_relax(); 132 cpu_relax();
132
133 if (wait) 133 if (wait)
134 while (!cpus_equal(map, data.finished)) 134 while (!cpus_equal(map, data.finished))
135 cpu_relax(); 135 cpu_relax();
136 136 spin_unlock(&call_lock);
137 spin_unlock_bh(&call_lock);
138
139out: 137out:
140 local_irq_disable(); 138 if (local) {
141 if (local) 139 local_irq_disable();
142 func(info); 140 func(info);
143 local_irq_enable(); 141 local_irq_enable();
142 }
144} 143}
145 144
146/* 145/*
@@ -170,30 +169,28 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
170EXPORT_SYMBOL(smp_call_function); 169EXPORT_SYMBOL(smp_call_function);
171 170
172/* 171/*
173 * smp_call_function_on: 172 * smp_call_function_single:
173 * @cpu: the CPU where func should run
174 * @func: the function to run; this must be fast and non-blocking 174 * @func: the function to run; this must be fast and non-blocking
175 * @info: an arbitrary pointer to pass to the function 175 * @info: an arbitrary pointer to pass to the function
176 * @nonatomic: unused 176 * @nonatomic: unused
177 * @wait: if true, wait (atomically) until function has completed on other CPUs 177 * @wait: if true, wait (atomically) until function has completed on other CPUs
178 * @cpu: the CPU where func should run
179 * 178 *
180 * Run a function on one processor. 179 * Run a function on one processor.
181 * 180 *
182 * You must not call this function with disabled interrupts, from a 181 * You must not call this function with disabled interrupts, from a
183 * hardware interrupt handler or from a bottom half. 182 * hardware interrupt handler or from a bottom half.
184 */ 183 */
185int smp_call_function_on(void (*func) (void *info), void *info, int nonatomic, 184int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
186 int wait, int cpu) 185 int nonatomic, int wait)
187{ 186{
188 cpumask_t map = CPU_MASK_NONE;
189
190 preempt_disable(); 187 preempt_disable();
191 cpu_set(cpu, map); 188 __smp_call_function_map(func, info, nonatomic, wait,
192 __smp_call_function_map(func, info, nonatomic, wait, map); 189 cpumask_of_cpu(cpu));
193 preempt_enable(); 190 preempt_enable();
194 return 0; 191 return 0;
195} 192}
196EXPORT_SYMBOL(smp_call_function_on); 193EXPORT_SYMBOL(smp_call_function_single);
197 194
198static void do_send_stop(void) 195static void do_send_stop(void)
199{ 196{
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index 1c90c7e99978..1eaff84a1eb6 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/fs.h>
19#include <linux/smp.h> 20#include <linux/smp.h>
20#include <linux/sem.h> 21#include <linux/sem.h>
21#include <linux/msg.h> 22#include <linux/msg.h>
@@ -265,3 +266,23 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args)
265 return -EFAULT; 266 return -EFAULT;
266 return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); 267 return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice);
267} 268}
269
270#ifndef CONFIG_64BIT
271/*
272 * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last
273 * 64 bit argument "len" is split into the upper and lower 32 bits. The
274 * system call wrapper in the user space loads the value to %r6/%r7.
275 * The code in entry.S keeps the values in %r2 - %r6 where they are and
276 * stores %r7 to 96(%r15). But the standard C linkage requires that
277 * the whole 64 bit value for len is stored on the stack and doesn't
278 * use %r6 at all. So s390_fallocate has to convert the arguments from
279 * %r2: fd, %r3: mode, %r4/%r5: offset, %r6/96(%r15)-99(%r15): len
280 * to
281 * %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len
282 */
283asmlinkage long s390_fallocate(int fd, int mode, loff_t offset,
284 u32 len_high, u32 len_low)
285{
286 return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low);
287}
288#endif
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 738feb4a0aad..9e26ed9fe4e7 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -322,7 +322,7 @@ NI_SYSCALL /* 310 sys_move_pages */
322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) 322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) 323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) 324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
325NI_SYSCALL /* 314 sys_fallocate */ 325SYSCALL(s390_fallocate,sys_fallocate,sys_fallocate_wrapper)
326SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ 326SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
327SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) 327SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
328SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper) 328SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper)
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 6ab7d4ee13a4..b4622a3889b0 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -21,6 +21,7 @@ SECTIONS
21 . = 0x00000000; 21 . = 0x00000000;
22 _text = .; /* Text and read-only data */ 22 _text = .; /* Text and read-only data */
23 .text : { 23 .text : {
24 *(.text.head)
24 TEXT_TEXT 25 TEXT_TEXT
25 SCHED_TEXT 26 SCHED_TEXT
26 LOCK_TEXT 27 LOCK_TEXT
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index b6ed143e8597..84ff78de6bac 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -415,7 +415,7 @@ EXPORT_SYMBOL(add_virt_timer_periodic);
415 415
416/* 416/*
417 * If we change a pending timer the function must be called on the CPU 417 * If we change a pending timer the function must be called on the CPU
418 * where the timer is running on, e.g. by smp_call_function_on() 418 * where the timer is running on, e.g. by smp_call_function_single()
419 * 419 *
420 * The original mod_timer adds the timer if it is not pending. For compatibility 420 * The original mod_timer adds the timer if it is not pending. For compatibility
421 * we do the same. The timer will be added on the current CPU as a oneshot timer. 421 * we do the same. The timer will be added on the current CPU as a oneshot timer.
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 92a565190028..fd594d5fe142 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -29,8 +29,8 @@ struct memory_segment {
29 29
30static LIST_HEAD(mem_segs); 30static LIST_HEAD(mem_segs);
31 31
32void memmap_init(unsigned long size, int nid, unsigned long zone, 32void __meminit memmap_init(unsigned long size, int nid, unsigned long zone,
33 unsigned long start_pfn) 33 unsigned long start_pfn)
34{ 34{
35 struct page *start, *end; 35 struct page *start, *end;
36 struct page *map_start, *map_end; 36 struct page *map_start, *map_end;
@@ -66,7 +66,7 @@ void memmap_init(unsigned long size, int nid, unsigned long zone,
66 } 66 }
67} 67}
68 68
69static inline void *vmem_alloc_pages(unsigned int order) 69static void __init_refok *vmem_alloc_pages(unsigned int order)
70{ 70{
71 if (slab_is_available()) 71 if (slab_is_available())
72 return (void *)__get_free_pages(GFP_KERNEL, order); 72 return (void *)__get_free_pages(GFP_KERNEL, order);
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig
index 38bd79fe6e75..fdc67238408a 100644
--- a/arch/sparc/defconfig
+++ b/arch/sparc/defconfig
@@ -600,7 +600,7 @@ CONFIG_LEGACY_PTY_COUNT=256
600# CONFIG_IPMI_HANDLER is not set 600# CONFIG_IPMI_HANDLER is not set
601# CONFIG_WATCHDOG is not set 601# CONFIG_WATCHDOG is not set
602CONFIG_HW_RANDOM=m 602CONFIG_HW_RANDOM=m
603CONFIG_RTC=m 603CONFIG_JS_RTC=m
604# CONFIG_R3964 is not set 604# CONFIG_R3964 is not set
605# CONFIG_APPLICOM is not set 605# CONFIG_APPLICOM is not set
606# CONFIG_DRM is not set 606# CONFIG_DRM is not set
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
index fc31de66b1c2..d9d4f96360c7 100644
--- a/arch/sparc/kernel/init_task.c
+++ b/arch/sparc/kernel/init_task.c
@@ -1,4 +1,5 @@
1#include <linux/mm.h> 1#include <linux/mm.h>
2#include <linux/fs.h>
2#include <linux/module.h> 3#include <linux/module.h>
3#include <linux/sched.h> 4#include <linux/sched.h>
4#include <linux/init_task.h> 5#include <linux/init_task.h>
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 55bac516dfe2..7b4abde43028 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -161,6 +161,8 @@ EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
161EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); 161EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
162EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one)); 162EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
163 163
164EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached));
165
164#ifdef CONFIG_SBUS 166#ifdef CONFIG_SBUS
165EXPORT_SYMBOL(sbus_root); 167EXPORT_SYMBOL(sbus_root);
166EXPORT_SYMBOL(dma_chain); 168EXPORT_SYMBOL(dma_chain);
@@ -260,6 +262,7 @@ EXPORT_SYMBOL(__memmove);
260/* Moving data to/from userspace. */ 262/* Moving data to/from userspace. */
261EXPORT_SYMBOL(__copy_user); 263EXPORT_SYMBOL(__copy_user);
262EXPORT_SYMBOL(__strncpy_from_user); 264EXPORT_SYMBOL(__strncpy_from_user);
265EXPORT_SYMBOL(__strnlen_user);
263 266
264/* Networking helper routines. */ 267/* Networking helper routines. */
265EXPORT_SYMBOL(__csum_partial_copy_sparc_generic); 268EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index 47583887abc6..15109c156e83 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -35,6 +35,8 @@ SECTIONS
35 __ex_table : { *(__ex_table) } 35 __ex_table : { *(__ex_table) }
36 __stop___ex_table = .; 36 __stop___ex_table = .;
37 37
38 NOTES
39
38 . = ALIGN(4096); 40 . = ALIGN(4096);
39 __init_begin = .; 41 __init_begin = .;
40 _sinittext = .; 42 _sinittext = .;
diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S
index a65eba41097c..1c37ea892deb 100644
--- a/arch/sparc/lib/memset.S
+++ b/arch/sparc/lib/memset.S
@@ -162,7 +162,7 @@ __bzero:
1628: 1628:
163 add %o0, 1, %o0 163 add %o0, 1, %o0
164 subcc %o1, 1, %o1 164 subcc %o1, 1, %o1
165 bne,a 8b 165 bne 8b
166 EX(stb %g3, [%o0 - 1], add %o1, 1) 166 EX(stb %g3, [%o0 - 1], add %o1, 1)
1670: 1670:
168 retl 168 retl
diff --git a/arch/sparc/prom/printf.c b/arch/sparc/prom/printf.c
index 27fdac99f790..a36ab9c5ee08 100644
--- a/arch/sparc/prom/printf.c
+++ b/arch/sparc/prom/printf.c
@@ -13,6 +13,7 @@
13 */ 13 */
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/module.h>
16 17
17#include <asm/openprom.h> 18#include <asm/openprom.h>
18#include <asm/oplib.h> 19#include <asm/oplib.h>
@@ -44,3 +45,4 @@ prom_printf(char *fmt, ...)
44 45
45 prom_write(ppbuf, i); 46 prom_write(ppbuf, i);
46} 47}
48EXPORT_SYMBOL(prom_printf);
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug
index 1f130f3b6c24..a5faa3683bd6 100644
--- a/arch/sparc64/Kconfig.debug
+++ b/arch/sparc64/Kconfig.debug
@@ -29,7 +29,7 @@ config DEBUG_BOOTMEM
29 29
30config DEBUG_PAGEALLOC 30config DEBUG_PAGEALLOC
31 bool "Debug page memory allocations" 31 bool "Debug page memory allocations"
32 depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND 32 depends on DEBUG_KERNEL && !HIBERNATION
33 help 33 help
34 Unmap pages from the kernel linear mapping after free_pages(). 34 Unmap pages from the kernel linear mapping after free_pages().
35 This results in a large slowdown, but helps to find certain types 35 This results in a large slowdown, but helps to find certain types
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 10e301970a44..68338a601f70 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,11 +1,12 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22 3# Linux kernel version: 2.6.23-rc1
4# Thu Jul 19 21:30:37 2007 4# Sun Jul 22 19:24:37 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
8CONFIG_GENERIC_TIME=y 8CONFIG_GENERIC_TIME=y
9CONFIG_GENERIC_CMOS_UPDATE=y
9CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
10CONFIG_64BIT=y 11CONFIG_64BIT=y
11CONFIG_MMU=y 12CONFIG_MMU=y
@@ -17,6 +18,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
17# CONFIG_ARCH_HAS_ILOG2_U64 is not set 18# CONFIG_ARCH_HAS_ILOG2_U64 is not set
18CONFIG_AUDIT_ARCH=y 19CONFIG_AUDIT_ARCH=y
19CONFIG_ARCH_NO_VIRT_TO_BUS=y 20CONFIG_ARCH_NO_VIRT_TO_BUS=y
21CONFIG_OF=y
20CONFIG_SPARC64_PAGE_SIZE_8KB=y 22CONFIG_SPARC64_PAGE_SIZE_8KB=y
21# CONFIG_SPARC64_PAGE_SIZE_64KB is not set 23# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
22# CONFIG_SPARC64_PAGE_SIZE_512KB is not set 24# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
@@ -314,6 +316,7 @@ CONFIG_FW_LOADER=y
314# CONFIG_SYS_HYPERVISOR is not set 316# CONFIG_SYS_HYPERVISOR is not set
315CONFIG_CONNECTOR=m 317CONFIG_CONNECTOR=m
316# CONFIG_MTD is not set 318# CONFIG_MTD is not set
319CONFIG_OF_DEVICE=y
317# CONFIG_PARPORT is not set 320# CONFIG_PARPORT is not set
318CONFIG_BLK_DEV=y 321CONFIG_BLK_DEV=y
319# CONFIG_BLK_DEV_FD is not set 322# CONFIG_BLK_DEV_FD is not set
@@ -433,10 +436,7 @@ CONFIG_SCSI_FC_ATTRS=y
433CONFIG_SCSI_ISCSI_ATTRS=m 436CONFIG_SCSI_ISCSI_ATTRS=m
434# CONFIG_SCSI_SAS_ATTRS is not set 437# CONFIG_SCSI_SAS_ATTRS is not set
435# CONFIG_SCSI_SAS_LIBSAS is not set 438# CONFIG_SCSI_SAS_LIBSAS is not set
436 439CONFIG_SCSI_LOWLEVEL=y
437#
438# SCSI low-level drivers
439#
440CONFIG_ISCSI_TCP=m 440CONFIG_ISCSI_TCP=m
441# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 441# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
442# CONFIG_SCSI_3W_9XXX is not set 442# CONFIG_SCSI_3W_9XXX is not set
@@ -701,7 +701,6 @@ CONFIG_UNIX98_PTYS=y
701# CONFIG_IPMI_HANDLER is not set 701# CONFIG_IPMI_HANDLER is not set
702# CONFIG_WATCHDOG is not set 702# CONFIG_WATCHDOG is not set
703# CONFIG_HW_RANDOM is not set 703# CONFIG_HW_RANDOM is not set
704CONFIG_RTC=y
705# CONFIG_R3964 is not set 704# CONFIG_R3964 is not set
706# CONFIG_APPLICOM is not set 705# CONFIG_APPLICOM is not set
707# CONFIG_DRM is not set 706# CONFIG_DRM is not set
@@ -844,6 +843,7 @@ CONFIG_HWMON=y
844# 843#
845# CONFIG_DISPLAY_SUPPORT is not set 844# CONFIG_DISPLAY_SUPPORT is not set
846# CONFIG_VGASTATE is not set 845# CONFIG_VGASTATE is not set
846# CONFIG_VIDEO_OUTPUT_CONTROL is not set
847CONFIG_FB=y 847CONFIG_FB=y
848# CONFIG_FIRMWARE_EDID is not set 848# CONFIG_FIRMWARE_EDID is not set
849CONFIG_FB_DDC=y 849CONFIG_FB_DDC=y
@@ -937,7 +937,6 @@ CONFIG_SND_MIXER_OSS=m
937CONFIG_SND_PCM_OSS=m 937CONFIG_SND_PCM_OSS=m
938CONFIG_SND_PCM_OSS_PLUGINS=y 938CONFIG_SND_PCM_OSS_PLUGINS=y
939CONFIG_SND_SEQUENCER_OSS=y 939CONFIG_SND_SEQUENCER_OSS=y
940# CONFIG_SND_RTCTIMER is not set
941# CONFIG_SND_DYNAMIC_MINORS is not set 940# CONFIG_SND_DYNAMIC_MINORS is not set
942CONFIG_SND_SUPPORT_OLD_API=y 941CONFIG_SND_SUPPORT_OLD_API=y
943CONFIG_SND_VERBOSE_PROCFS=y 942CONFIG_SND_VERBOSE_PROCFS=y
@@ -1034,6 +1033,10 @@ CONFIG_SND_SUN_CS4231=m
1034# CONFIG_SND_SOC is not set 1033# CONFIG_SND_SOC is not set
1035 1034
1036# 1035#
1036# SoC Audio support for SuperH
1037#
1038
1039#
1037# Open Sound System 1040# Open Sound System
1038# 1041#
1039# CONFIG_SOUND_PRIME is not set 1042# CONFIG_SOUND_PRIME is not set
@@ -1157,19 +1160,7 @@ CONFIG_USB_STORAGE=m
1157# 1160#
1158# CONFIG_USB_GADGET is not set 1161# CONFIG_USB_GADGET is not set
1159# CONFIG_MMC is not set 1162# CONFIG_MMC is not set
1160
1161#
1162# LED devices
1163#
1164# CONFIG_NEW_LEDS is not set 1163# CONFIG_NEW_LEDS is not set
1165
1166#
1167# LED drivers
1168#
1169
1170#
1171# LED Triggers
1172#
1173# CONFIG_INFINIBAND is not set 1164# CONFIG_INFINIBAND is not set
1174 1165
1175# 1166#
@@ -1199,7 +1190,6 @@ CONFIG_USB_STORAGE=m
1199# Misc Linux/SPARC drivers 1190# Misc Linux/SPARC drivers
1200# 1191#
1201CONFIG_SUN_OPENPROMIO=m 1192CONFIG_SUN_OPENPROMIO=m
1202CONFIG_SUN_MOSTEK_RTC=y
1203# CONFIG_OBP_FLASH is not set 1193# CONFIG_OBP_FLASH is not set
1204# CONFIG_SUN_BPP is not set 1194# CONFIG_SUN_BPP is not set
1205# CONFIG_BBC_I2C is not set 1195# CONFIG_BBC_I2C is not set
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 35feacb6b8ec..9dbd833d79d6 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -1,15 +1,15 @@
1/* $Id: head.S,v 1.87 2002/02/09 19:49:31 davem Exp $ 1/* head.S: Initial boot code for the Sparc64 port of Linux.
2 * head.S: Initial boot code for the Sparc64 port of Linux.
3 * 2 *
4 * Copyright (C) 1996,1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996, 1997, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 David Sitsky (David.Sitsky@anu.edu.au) 4 * Copyright (C) 1996 David Sitsky (David.Sitsky@anu.edu.au)
6 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx) 6 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
8 */ 7 */
9 8
10#include <linux/version.h> 9#include <linux/version.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
12#include <linux/init.h>
13#include <asm/thread_info.h> 13#include <asm/thread_info.h>
14#include <asm/asi.h> 14#include <asm/asi.h>
15#include <asm/pstate.h> 15#include <asm/pstate.h>
@@ -374,6 +374,7 @@ jump_to_sun4u_init:
374 jmpl %g2 + %g0, %g0 374 jmpl %g2 + %g0, %g0
375 nop 375 nop
376 376
377 .section .text.init.refok
377sun4u_init: 378sun4u_init:
378 BRANCH_IF_SUN4V(g1, sun4v_init) 379 BRANCH_IF_SUN4V(g1, sun4v_init)
379 380
@@ -529,6 +530,8 @@ tlb_fixup_done:
529 nop 530 nop
530 /* Not reached... */ 531 /* Not reached... */
531 532
533 .previous
534
532 /* This is meant to allow the sharing of this code between 535 /* This is meant to allow the sharing of this code between
533 * boot processor invocation (via setup_tba() below) and 536 * boot processor invocation (via setup_tba() below) and
534 * secondary processor startup (via trampoline.S). The 537 * secondary processor startup (via trampoline.S). The
diff --git a/arch/sparc64/kernel/init_task.c b/arch/sparc64/kernel/init_task.c
index 329b38fa5c89..90007cf88bac 100644
--- a/arch/sparc64/kernel/init_task.c
+++ b/arch/sparc64/kernel/init_task.c
@@ -1,4 +1,5 @@
1#include <linux/mm.h> 1#include <linux/mm.h>
2#include <linux/fs.h>
2#include <linux/module.h> 3#include <linux/module.h>
3#include <linux/sched.h> 4#include <linux/sched.h>
4#include <linux/init_task.h> 5#include <linux/init_task.h>
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index fd7899ba1d70..ca7cdfd55f72 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -18,6 +18,7 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/kallsyms.h> 19#include <linux/kallsyms.h>
20#include <linux/mm.h> 20#include <linux/mm.h>
21#include <linux/fs.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
22#include <linux/stddef.h> 23#include <linux/stddef.h>
23#include <linux/ptrace.h> 24#include <linux/ptrace.h>
diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c
index 09126fc338ba..708fa1705fbe 100644
--- a/arch/sparc64/kernel/viohs.c
+++ b/arch/sparc64/kernel/viohs.c
@@ -702,7 +702,7 @@ u32 vio_send_sid(struct vio_driver_state *vio)
702} 702}
703EXPORT_SYMBOL(vio_send_sid); 703EXPORT_SYMBOL(vio_send_sid);
704 704
705extern int vio_ldc_alloc(struct vio_driver_state *vio, 705int vio_ldc_alloc(struct vio_driver_state *vio,
706 struct ldc_channel_config *base_cfg, 706 struct ldc_channel_config *base_cfg,
707 void *event_arg) 707 void *event_arg)
708{ 708{
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index 481861764deb..b982fa3dd748 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -45,6 +45,8 @@ SECTIONS
45 __ex_table : { *(__ex_table) } 45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .; 46 __stop___ex_table = .;
47 47
48 NOTES
49
48 . = ALIGN(PAGE_SIZE); 50 . = ALIGN(PAGE_SIZE);
49 __init_begin = .; 51 __init_begin = .;
50 .init.text : { 52 .init.text : {
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 542c9ef858f8..d87090507401 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -499,7 +499,7 @@ static struct mc_device mem_mc = {
499 .remove = mem_remove, 499 .remove = mem_remove,
500}; 500};
501 501
502static int mem_mc_init(void) 502static int __init mem_mc_init(void)
503{ 503{
504 if(can_drop_memory()) 504 if(can_drop_memory())
505 mconsole_register_dev(&mem_mc); 505 mconsole_register_dev(&mem_mc);
@@ -798,7 +798,7 @@ void mconsole_stack(struct mc_request *req)
798 */ 798 */
799static char *notify_socket = NULL; 799static char *notify_socket = NULL;
800 800
801static int mconsole_init(void) 801static int __init mconsole_init(void)
802{ 802{
803 /* long to avoid size mismatch warnings from gcc */ 803 /* long to avoid size mismatch warnings from gcc */
804 long sock; 804 long sock;
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index e41a08f04694..867666a02339 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -12,6 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/fs.h>
15#include <linux/miscdevice.h> 16#include <linux/miscdevice.h>
16#include <asm/uaccess.h> 17#include <asm/uaccess.h>
17#include "mem_user.h" 18#include "mem_user.h"
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 72773dd54425..d35d0c1ee7f4 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -623,7 +623,7 @@ static int eth_setup_common(char *str, int index)
623 return found; 623 return found;
624} 624}
625 625
626static int eth_setup(char *str) 626static int __init eth_setup(char *str)
627{ 627{
628 struct eth_init *new; 628 struct eth_init *new;
629 char *error; 629 char *error;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index fc27f6c72b41..aff661fe2ee1 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -469,7 +469,7 @@ __uml_help(fakehd,
469" Change the ubd device name to \"hd\".\n\n" 469" Change the ubd device name to \"hd\".\n\n"
470); 470);
471 471
472static void do_ubd_request(request_queue_t * q); 472static void do_ubd_request(struct request_queue * q);
473 473
474/* Only changed by ubd_init, which is an initcall. */ 474/* Only changed by ubd_init, which is an initcall. */
475int thread_fd = -1; 475int thread_fd = -1;
@@ -1081,7 +1081,7 @@ static void prepare_request(struct request *req, struct io_thread_req *io_req,
1081} 1081}
1082 1082
1083/* Called with dev->lock held */ 1083/* Called with dev->lock held */
1084static void do_ubd_request(request_queue_t *q) 1084static void do_ubd_request(struct request_queue *q)
1085{ 1085{
1086 struct io_thread_req *io_req; 1086 struct io_thread_req *io_req;
1087 struct request *req; 1087 struct request *req;
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 356e50f5aaed..ce6828fd396f 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -6,6 +6,7 @@
6#include "linux/slab.h" 6#include "linux/slab.h"
7#include "linux/smp_lock.h" 7#include "linux/smp_lock.h"
8#include "linux/ptrace.h" 8#include "linux/ptrace.h"
9#include "linux/fs.h"
9#include "asm/ptrace.h" 10#include "asm/ptrace.h"
10#include "asm/pgtable.h" 11#include "asm/pgtable.h"
11#include "asm/tlbflush.h" 12#include "asm/tlbflush.h"
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index d4f1d1ab252b..cba516e6c99a 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include "linux/mm.h" 6#include "linux/mm.h"
7#include "linux/fs.h"
7#include "linux/module.h" 8#include "linux/module.h"
8#include "linux/sched.h" 9#include "linux/sched.h"
9#include "linux/init_task.h" 10#include "linux/init_task.h"
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 72ff85693a39..d2b11f242698 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -62,7 +62,7 @@ static void setup_highmem(unsigned long highmem_start,
62} 62}
63#endif 63#endif
64 64
65void mem_init(void) 65void __init mem_init(void)
66{ 66{
67 /* clear the zero-page */ 67 /* clear the zero-page */
68 memset((void *) empty_zero_page, 0, PAGE_SIZE); 68 memset((void *) empty_zero_page, 0, PAGE_SIZE);
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index 3ba6e4c841da..5ee7e851bbc1 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -28,7 +28,8 @@ unsigned long high_physmem;
28 28
29extern unsigned long long physmem_size; 29extern unsigned long long physmem_size;
30 30
31int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) 31int __init init_maps(unsigned long physmem, unsigned long iomem,
32 unsigned long highmem)
32{ 33{
33 struct page *p, *map; 34 struct page *p, *map;
34 unsigned long phys_len, phys_pages, highmem_len, highmem_pages; 35 unsigned long phys_len, phys_pages, highmem_len, highmem_pages;
@@ -47,13 +48,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
47 total_pages = phys_pages + iomem_pages + highmem_pages; 48 total_pages = phys_pages + iomem_pages + highmem_pages;
48 total_len = phys_len + iomem_len + highmem_len; 49 total_len = phys_len + iomem_len + highmem_len;
49 50
50 if(kmalloc_ok){ 51 map = alloc_bootmem_low_pages(total_len);
51 map = kmalloc(total_len, GFP_KERNEL);
52 if(map == NULL)
53 map = vmalloc(total_len);
54 }
55 else map = alloc_bootmem_low_pages(total_len);
56
57 if(map == NULL) 52 if(map == NULL)
58 return -ENOMEM; 53 return -ENOMEM;
59 54
@@ -98,8 +93,8 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
98 93
99extern int __syscall_stub_start; 94extern int __syscall_stub_start;
100 95
101void setup_physmem(unsigned long start, unsigned long reserve_end, 96void __init setup_physmem(unsigned long start, unsigned long reserve_end,
102 unsigned long len, unsigned long long highmem) 97 unsigned long len, unsigned long long highmem)
103{ 98{
104 unsigned long reserve = reserve_end - start; 99 unsigned long reserve = reserve_end - start;
105 int pfn = PFN_UP(__pa(reserve_end)); 100 int pfn = PFN_UP(__pa(reserve_end));
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c
index 2a69a7ce5792..48051a98525f 100644
--- a/arch/um/kernel/skas/process.c
+++ b/arch/um/kernel/skas/process.c
@@ -145,7 +145,7 @@ void init_idle_skas(void)
145 145
146extern void start_kernel(void); 146extern void start_kernel(void);
147 147
148static int start_kernel_proc(void *unused) 148static int __init start_kernel_proc(void *unused)
149{ 149{
150 int pid; 150 int pid;
151 151
@@ -165,7 +165,7 @@ extern int userspace_pid[];
165 165
166extern char cpu0_irqstack[]; 166extern char cpu0_irqstack[];
167 167
168int start_uml_skas(void) 168int __init start_uml_skas(void)
169{ 169{
170 stack_protections((unsigned long) &cpu0_irqstack); 170 stack_protections((unsigned long) &cpu0_irqstack);
171 set_sigstack(cpu0_irqstack, THREAD_SIZE); 171 set_sigstack(cpu0_irqstack, THREAD_SIZE);
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index 237c4eab7cfd..7b3b67333ff3 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -7,6 +7,7 @@
7#include "linux/file.h" 7#include "linux/file.h"
8#include "linux/smp_lock.h" 8#include "linux/smp_lock.h"
9#include "linux/mm.h" 9#include "linux/mm.h"
10#include "linux/fs.h"
10#include "linux/utsname.h" 11#include "linux/utsname.h"
11#include "linux/msg.h" 12#include "linux/msg.h"
12#include "linux/shm.h" 13#include "linux/shm.h"
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index b126df4ea168..59348359f9ab 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -14,6 +14,7 @@
14#include "init.h" 14#include "init.h"
15#include "user.h" 15#include "user.h"
16#include "mode.h" 16#include "mode.h"
17#include "kern_constants.h"
17 18
18struct aio_thread_req { 19struct aio_thread_req {
19 enum aio_type type; 20 enum aio_type type;
@@ -65,47 +66,33 @@ static long io_getevents(aio_context_t ctx_id, long min_nr, long nr,
65static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf, 66static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf,
66 int len, unsigned long long offset, struct aio_context *aio) 67 int len, unsigned long long offset, struct aio_context *aio)
67{ 68{
68 struct iocb iocb, *iocbp = &iocb; 69 struct iocb *iocbp = & ((struct iocb) {
70 .aio_data = (unsigned long) aio,
71 .aio_fildes = fd,
72 .aio_buf = (unsigned long) buf,
73 .aio_nbytes = len,
74 .aio_offset = offset
75 });
69 char c; 76 char c;
70 int err;
71 77
72 iocb = ((struct iocb) { .aio_data = (unsigned long) aio, 78 switch (type) {
73 .aio_reqprio = 0,
74 .aio_fildes = fd,
75 .aio_buf = (unsigned long) buf,
76 .aio_nbytes = len,
77 .aio_offset = offset,
78 .aio_reserved1 = 0,
79 .aio_reserved2 = 0,
80 .aio_reserved3 = 0 });
81
82 switch(type){
83 case AIO_READ: 79 case AIO_READ:
84 iocb.aio_lio_opcode = IOCB_CMD_PREAD; 80 iocbp->aio_lio_opcode = IOCB_CMD_PREAD;
85 err = io_submit(ctx, 1, &iocbp);
86 break; 81 break;
87 case AIO_WRITE: 82 case AIO_WRITE:
88 iocb.aio_lio_opcode = IOCB_CMD_PWRITE; 83 iocbp->aio_lio_opcode = IOCB_CMD_PWRITE;
89 err = io_submit(ctx, 1, &iocbp);
90 break; 84 break;
91 case AIO_MMAP: 85 case AIO_MMAP:
92 iocb.aio_lio_opcode = IOCB_CMD_PREAD; 86 iocbp->aio_lio_opcode = IOCB_CMD_PREAD;
93 iocb.aio_buf = (unsigned long) &c; 87 iocbp->aio_buf = (unsigned long) &c;
94 iocb.aio_nbytes = sizeof(c); 88 iocbp->aio_nbytes = sizeof(c);
95 err = io_submit(ctx, 1, &iocbp);
96 break; 89 break;
97 default: 90 default:
98 printk("Bogus op in do_aio - %d\n", type); 91 printk(UM_KERN_ERR "Bogus op in do_aio - %d\n", type);
99 err = -EINVAL; 92 return -EINVAL;
100 break;
101 } 93 }
102 94
103 if(err > 0) 95 return (io_submit(ctx, 1, &iocbp) > 0) ? 0 : -errno;
104 err = 0;
105 else
106 err = -errno;
107
108 return err;
109} 96}
110 97
111/* Initialized in an initcall and unchanged thereafter */ 98/* Initialized in an initcall and unchanged thereafter */
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index 2d9d2ca39299..e9c143297512 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -194,7 +194,7 @@ int os_unmap_memory(void *addr, int len)
194#define MADV_REMOVE KERNEL_MADV_REMOVE 194#define MADV_REMOVE KERNEL_MADV_REMOVE
195#endif 195#endif
196 196
197int __init os_drop_memory(void *addr, int length) 197int os_drop_memory(void *addr, int length)
198{ 198{
199 int err; 199 int err;
200 200
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 419b2d5ff6de..4c37b1b1d0b5 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -19,10 +19,7 @@ extern void *memmove(void *, const void *, size_t);
19extern void *memset(void *, int, size_t); 19extern void *memset(void *, int, size_t);
20extern int printf(const char *, ...); 20extern int printf(const char *, ...);
21 21
22/* If they're not defined, the export is included in lib/string.c.*/ 22/* If it's not defined, the export is included in lib/string.c.*/
23#ifdef __HAVE_ARCH_STRLEN
24EXPORT_SYMBOL(strlen);
25#endif
26#ifdef __HAVE_ARCH_STRSTR 23#ifdef __HAVE_ARCH_STRSTR
27EXPORT_SYMBOL(strstr); 24EXPORT_SYMBOL(strstr);
28#endif 25#endif
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
index 098720be019a..d6b3ecd4b77e 100644
--- a/arch/um/sys-i386/Makefile
+++ b/arch/um/sys-i386/Makefile
@@ -4,7 +4,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
4 4
5obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o 5obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
6 6
7subarch-obj-y = lib/bitops.o lib/semaphore.o 7subarch-obj-y = lib/bitops.o lib/semaphore.o lib/string.o
8subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o 8subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o
9subarch-obj-$(CONFIG_MODULES) += kernel/module.o 9subarch-obj-$(CONFIG_MODULES) += kernel/module.o
10 10
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 45f82ae6d389..ffa036406289 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -765,6 +765,9 @@ config COMPAT
765 depends on IA32_EMULATION 765 depends on IA32_EMULATION
766 default y 766 default y
767 767
768config COMPAT_FOR_U64_ALIGNMENT
769 def_bool COMPAT
770
768config SYSVIPC_COMPAT 771config SYSVIPC_COMPAT
769 bool 772 bool
770 depends on COMPAT && SYSVIPC 773 depends on COMPAT && SYSVIPC
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index b7c4cd04bfc3..e64f65c9d901 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -199,7 +199,7 @@ CONFIG_GENERIC_PENDING_IRQ=y
199CONFIG_PM=y 199CONFIG_PM=y
200# CONFIG_PM_LEGACY is not set 200# CONFIG_PM_LEGACY is not set
201# CONFIG_PM_DEBUG is not set 201# CONFIG_PM_DEBUG is not set
202CONFIG_SOFTWARE_SUSPEND=y 202CONFIG_HIBERNATION=y
203CONFIG_PM_STD_PARTITION="" 203CONFIG_PM_STD_PARTITION=""
204CONFIG_SUSPEND_SMP=y 204CONFIG_SUSPEND_SMP=y
205 205
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index b70f3e7cf06c..dffd2ac72747 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -41,8 +41,9 @@ int sysctl_vsyscall32 = 1;
41#undef ARCH_DLINFO 41#undef ARCH_DLINFO
42#define ARCH_DLINFO do { \ 42#define ARCH_DLINFO do { \
43 if (sysctl_vsyscall32) { \ 43 if (sysctl_vsyscall32) { \
44 NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \ 44 current->mm->context.vdso = (void *)VSYSCALL32_BASE; \
45 NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE); \ 45 NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \
46 NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE); \
46 } \ 47 } \
47} while(0) 48} while(0)
48 49
diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c
index 4de3a54318f4..4a233ad6269c 100644
--- a/arch/x86_64/ia32/ptrace32.c
+++ b/arch/x86_64/ia32/ptrace32.c
@@ -15,6 +15,7 @@
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
16#include <linux/unistd.h> 16#include <linux/unistd.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/err.h>
18#include <linux/ptrace.h> 19#include <linux/ptrace.h>
19#include <asm/ptrace.h> 20#include <asm/ptrace.h>
20#include <asm/compat.h> 21#include <asm/compat.h>
diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c
index fc4419ff0355..15013bac181c 100644
--- a/arch/x86_64/ia32/syscall32.c
+++ b/arch/x86_64/ia32/syscall32.c
@@ -49,14 +49,6 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
49 return ret; 49 return ret;
50} 50}
51 51
52const char *arch_vma_name(struct vm_area_struct *vma)
53{
54 if (vma->vm_start == VSYSCALL32_BASE &&
55 vma->vm_mm && vma->vm_mm->task_size == IA32_PAGE_OFFSET)
56 return "[vdso]";
57 return NULL;
58}
59
60static int __init init_syscall32(void) 52static int __init init_syscall32(void)
61{ 53{
62 char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL); 54 char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL);
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 47f1dc30bf56..d1d18c1ea0f4 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -26,7 +26,7 @@ obj-y += io_apic.o mpparse.o genapic.o genapic_flat.o
26obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o 26obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
27obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 27obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
28obj-$(CONFIG_PM) += suspend.o 28obj-$(CONFIG_PM) += suspend.o
29obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o 29obj-$(CONFIG_HIBERNATION) += suspend_asm.o
30obj-$(CONFIG_CPU_FREQ) += cpufreq/ 30obj-$(CONFIG_CPU_FREQ) += cpufreq/
31obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 31obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
32obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o 32obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
index 4277f2b27e6d..79475d237071 100644
--- a/arch/x86_64/kernel/acpi/sleep.c
+++ b/arch/x86_64/kernel/acpi/sleep.c
@@ -51,8 +51,6 @@
51 Low-Level Sleep Support 51 Low-Level Sleep Support
52 -------------------------------------------------------------------------- */ 52 -------------------------------------------------------------------------- */
53 53
54#ifdef CONFIG_ACPI_SLEEP
55
56/* address in low memory of the wakeup routine. */ 54/* address in low memory of the wakeup routine. */
57unsigned long acpi_wakeup_address = 0; 55unsigned long acpi_wakeup_address = 0;
58unsigned long acpi_realmode_flags; 56unsigned long acpi_realmode_flags;
@@ -117,8 +115,6 @@ static int __init acpi_sleep_setup(char *str)
117 115
118__setup("acpi_sleep=", acpi_sleep_setup); 116__setup("acpi_sleep=", acpi_sleep_setup);
119 117
120#endif /*CONFIG_ACPI_SLEEP */
121
122void acpi_pci_link_exit(void) 118void acpi_pci_link_exit(void)
123{ 119{
124} 120}
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index e7ac629d4c46..2842f50cbe3f 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -23,6 +23,7 @@
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/elfcore.h> 27#include <linux/elfcore.h>
27#include <linux/smp.h> 28#include <linux/smp.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c
index ea83a9f91965..573c0a6e0ac6 100644
--- a/arch/x86_64/kernel/suspend.c
+++ b/arch/x86_64/kernel/suspend.c
@@ -146,7 +146,7 @@ void fix_processor_context(void)
146 146
147} 147}
148 148
149#ifdef CONFIG_SOFTWARE_SUSPEND 149#ifdef CONFIG_HIBERNATION
150/* Defined in arch/x86_64/kernel/suspend_asm.S */ 150/* Defined in arch/x86_64/kernel/suspend_asm.S */
151extern int restore_image(void); 151extern int restore_image(void);
152 152
@@ -236,4 +236,4 @@ int pfn_is_nosave(unsigned long pfn)
236 unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; 236 unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT;
237 return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); 237 return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn);
238} 238}
239#endif /* CONFIG_SOFTWARE_SUSPEND */ 239#endif /* CONFIG_HIBERNATION */
diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c
index d067d9a2ad27..4770b7a2052c 100644
--- a/arch/x86_64/kernel/sys_x86_64.c
+++ b/arch/x86_64/kernel/sys_x86_64.c
@@ -6,6 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/syscalls.h> 7#include <linux/syscalls.h>
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/fs.h>
9#include <linux/smp.h> 10#include <linux/smp.h>
10#include <linux/sem.h> 11#include <linux/sem.h>
11#include <linux/msg.h> 12#include <linux/msg.h>
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index 3aeae2fa2e24..821527e7faa3 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -165,7 +165,7 @@ done:
165 return ret; 165 return ret;
166} 166}
167 167
168void* alloc_tce_table(void) 168void * __init alloc_tce_table(void)
169{ 169{
170 unsigned int size; 170 unsigned int size;
171 171
@@ -175,7 +175,7 @@ void* alloc_tce_table(void)
175 return __alloc_bootmem_low(size, size, 0); 175 return __alloc_bootmem_low(size, size, 0);
176} 176}
177 177
178void free_tce_table(void *tbl) 178void __init free_tce_table(void *tbl)
179{ 179{
180 unsigned int size; 180 unsigned int size;
181 181
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
index 9b76b03d0600..2a59bde663f2 100644
--- a/arch/x86_64/kernel/tsc.c
+++ b/arch/x86_64/kernel/tsc.c
@@ -118,8 +118,6 @@ core_initcall(cpufreq_tsc);
118 118
119#endif 119#endif
120 120
121static int tsc_unstable = 0;
122
123/* 121/*
124 * Make an educated guess if the TSC is trustworthy and synchronized 122 * Make an educated guess if the TSC is trustworthy and synchronized
125 * over all CPUs. 123 * over all CPUs.
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 38f5d6368006..458893b376f8 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -600,6 +600,16 @@ void mark_rodata_ro(void)
600{ 600{
601 unsigned long start = (unsigned long)_stext, end; 601 unsigned long start = (unsigned long)_stext, end;
602 602
603#ifdef CONFIG_HOTPLUG_CPU
604 /* It must still be possible to apply SMP alternatives. */
605 if (num_possible_cpus() > 1)
606 start = (unsigned long)_etext;
607#endif
608
609#ifdef CONFIG_KPROBES
610 start = (unsigned long)__start_rodata;
611#endif
612
603 end = (unsigned long)__end_rodata; 613 end = (unsigned long)__end_rodata;
604 start = (start + PAGE_SIZE - 1) & PAGE_MASK; 614 start = (start + PAGE_SIZE - 1) & PAGE_MASK;
605 end &= PAGE_MASK; 615 end &= PAGE_MASK;
diff --git a/arch/x86_64/vdso/vma.c b/arch/x86_64/vdso/vma.c
index d4cb83a6c066..ff9333e5fb08 100644
--- a/arch/x86_64/vdso/vma.c
+++ b/arch/x86_64/vdso/vma.c
@@ -4,6 +4,7 @@
4 * Subject to the GPL, v.2 4 * Subject to the GPL, v.2
5 */ 5 */
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/err.h>
7#include <linux/sched.h> 8#include <linux/sched.h>
8#include <linux/init.h> 9#include <linux/init.h>
9#include <linux/random.h> 10#include <linux/random.h>