aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-04-07 16:34:16 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-04-07 16:34:16 -0400
commit38f4b8c0da01ae7cd9b93386842ce272d6fde9ab (patch)
tree3c8c52201aac038094bfea7efdd0984a8f62045e /arch
parenta811454027352c762e0d5bba1b1d8f7d26bf96ae (diff)
parent8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (diff)
Merge commit 'origin/master' into for-linus/xen/master
* commit 'origin/master': (4825 commits) Fix build errors due to CONFIG_BRANCH_TRACER=y parport: Use the PCI IRQ if offered tty: jsm cleanups Adjust path to gpio headers KGDB_SERIAL_CONSOLE check for module Change KCONFIG name tty: Blackin CTS/RTS Change hardware flow control from poll to interrupt driven Add support for the MAX3100 SPI UART. lanana: assign a device name and numbering for MAX3100 serqt: initial clean up pass for tty side tty: Use the generic RS485 ioctl on CRIS tty: Correct inline types for tty_driver_kref_get() splice: fix deadlock in splicing to file nilfs2: support nanosecond timestamp nilfs2: introduce secondary super block nilfs2: simplify handling of active state of segments nilfs2: mark minor flag for checkpoint created by internal operation nilfs2: clean up sketch file nilfs2: super block operations fix endian bug ... Conflicts: arch/x86/include/asm/thread_info.h arch/x86/lguest/boot.c drivers/xen/manage.c
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig3
-rw-r--r--arch/alpha/include/asm/ftrace.h1
-rw-r--r--arch/alpha/include/asm/hardirq.h13
-rw-r--r--arch/alpha/include/asm/machvec.h2
-rw-r--r--arch/alpha/include/asm/pci.h14
-rw-r--r--arch/alpha/include/asm/spinlock.h3
-rw-r--r--arch/alpha/include/asm/system.h547
-rw-r--r--arch/alpha/include/asm/types.h5
-rw-r--r--arch/alpha/include/asm/uaccess.h12
-rw-r--r--arch/alpha/include/asm/xchg.h258
-rw-r--r--arch/alpha/kernel/Makefile2
-rw-r--r--arch/alpha/kernel/err_ev6.c4
-rw-r--r--arch/alpha/kernel/err_ev7.c6
-rw-r--r--arch/alpha/kernel/err_marvel.c40
-rw-r--r--arch/alpha/kernel/err_titan.c28
-rw-r--r--arch/alpha/kernel/pci-sysfs.c366
-rw-r--r--arch/alpha/kernel/pci.c2
-rw-r--r--arch/alpha/kernel/pci_iommu.c34
-rw-r--r--arch/alpha/kernel/process.c2
-rw-r--r--arch/alpha/kernel/proto.h16
-rw-r--r--arch/alpha/kernel/setup.c2
-rw-r--r--arch/alpha/kernel/smc37c669.c4
-rw-r--r--arch/alpha/kernel/srm_env.c5
-rw-r--r--arch/alpha/kernel/sys_jensen.c3
-rw-r--r--arch/alpha/kernel/sys_sable.c4
-rw-r--r--arch/alpha/kernel/traps.c2
-rw-r--r--arch/arm/boot/compressed/misc.c5
-rw-r--r--arch/arm/configs/omap_ldp_defconfig24
-rw-r--r--arch/arm/configs/pcm037_defconfig23
-rw-r--r--arch/arm/configs/realview-smp_defconfig24
-rw-r--r--arch/arm/configs/realview_defconfig24
-rw-r--r--arch/arm/include/asm/spinlock.h3
-rw-r--r--arch/arm/kernel/process.c2
-rw-r--r--arch/arm/mach-at91/pm.c8
-rw-r--r--arch/arm/mach-davinci/board-evm.c4
-rw-r--r--arch/arm/mach-davinci/include/mach/nand.h80
-rw-r--r--arch/arm/mach-davinci/usb.c4
-rw-r--r--arch/arm/mach-gemini/include/mach/system.h2
-rw-r--r--arch/arm/mach-iop13xx/setup.c8
-rw-r--r--arch/arm/mach-iop13xx/tpmi.c10
-rw-r--r--arch/arm/mach-kirkwood/common.c10
-rw-r--r--arch/arm/mach-mmp/include/mach/system.h2
-rw-r--r--arch/arm/mach-mx1/Makefile3
-rw-r--r--arch/arm/mach-mx1/devices.c2
-rw-r--r--arch/arm/mach-mx1/ksym_mx1.c18
-rw-r--r--arch/arm/mach-mx1/mx1_camera_fiq.S35
-rw-r--r--arch/arm/mach-mx3/clock.c2
-rw-r--r--arch/arm/mach-mx3/pcm037.c23
-rw-r--r--arch/arm/mach-netx/include/mach/netx-regs.h2
-rw-r--r--arch/arm/mach-omap1/Kconfig2
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c47
-rw-r--r--arch/arm/mach-omap2/board-overo.c65
-rw-r--r--arch/arm/mach-orion5x/common.c6
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa2xx_spi.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx_nand.h3
-rw-r--r--arch/arm/mach-pxa/magician.c1
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c53
-rw-r--r--arch/arm/mach-realview/core.c17
-rw-r--r--arch/arm/mach-realview/localtimer.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c3
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c3
-rw-r--r--arch/arm/mm/abort-ev6.S4
-rw-r--r--arch/arm/mm/cache-feroceon-l2.c9
-rw-r--r--arch/arm/plat-iop/adma.c8
-rw-r--r--arch/arm/plat-mxc/include/mach/i2c.h25
-rw-r--r--arch/arm/plat-mxc/include/mach/memory.h8
-rw-r--r--arch/arm/plat-mxc/include/mach/mx1_camera.h35
-rw-r--r--arch/arm/plat-mxc/include/mach/mx3_camera.h52
-rw-r--r--arch/arm/plat-s3c/dev-i2c0.c7
-rw-r--r--arch/arm/plat-s3c/dev-i2c1.c7
-rw-r--r--arch/arm/plat-s3c/include/plat/iic.h33
-rw-r--r--arch/arm/vfp/entry.S23
-rw-r--r--arch/arm/vfp/vfphw.S12
-rw-r--r--arch/arm/vfp/vfpmodule.c6
-rw-r--r--arch/avr32/Kconfig20
-rw-r--r--arch/avr32/Makefile1
-rw-r--r--arch/avr32/boards/atngw100/evklcd10x.c50
-rw-r--r--arch/avr32/boards/atngw100/setup.c7
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c6
-rw-r--r--arch/avr32/boards/atstk1000/atstk1003.c6
-rw-r--r--arch/avr32/boards/atstk1000/atstk1004.c6
-rw-r--r--arch/avr32/boards/favr-32/setup.c9
-rw-r--r--arch/avr32/boards/hammerhead/flash.c4
-rw-r--r--arch/avr32/boards/hammerhead/setup.c6
-rw-r--r--arch/avr32/boards/merisc/Kconfig5
-rw-r--r--arch/avr32/boards/merisc/Makefile1
-rw-r--r--arch/avr32/boards/merisc/display.c65
-rw-r--r--arch/avr32/boards/merisc/flash.c139
-rw-r--r--arch/avr32/boards/merisc/merisc.h18
-rw-r--r--arch/avr32/boards/merisc/merisc_sysfs.c65
-rw-r--r--arch/avr32/boards/merisc/setup.c297
-rw-r--r--arch/avr32/boards/mimc200/setup.c8
-rw-r--r--arch/avr32/configs/merisc_defconfig1237
-rw-r--r--arch/avr32/include/asm/ftrace.h1
-rw-r--r--arch/avr32/include/asm/hardirq.h11
-rw-r--r--arch/avr32/kernel/process.c2
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c120
-rw-r--r--arch/avr32/mach-at32ap/include/mach/at32ap700x.h52
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h24
-rw-r--r--arch/avr32/mm/fault.c18
-rw-r--r--arch/blackfin/Kconfig6
-rw-r--r--arch/blackfin/include/asm/bfin5xx_spi.h5
-rw-r--r--arch/blackfin/include/asm/ftrace.h1
-rw-r--r--arch/blackfin/kernel/process.c4
-rw-r--r--arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h10
-rw-r--r--arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h36
-rw-r--r--arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h29
-rw-r--r--arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h37
-rw-r--r--arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h10
-rw-r--r--arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h117
-rw-r--r--arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h29
-rw-r--r--arch/blackfin/mm/sram-alloc.c1
-rw-r--r--arch/cris/Kconfig6
-rw-r--r--arch/cris/arch-v10/kernel/irq.c2
-rw-r--r--arch/cris/arch-v10/kernel/process.c2
-rw-r--r--arch/cris/arch-v10/kernel/time.c1
-rw-r--r--arch/cris/arch-v32/Kconfig2
-rw-r--r--arch/cris/arch-v32/boot/compressed/Makefile6
-rw-r--r--arch/cris/arch-v32/drivers/Kconfig2
-rw-r--r--arch/cris/arch-v32/kernel/irq.c2
-rw-r--r--arch/cris/arch-v32/kernel/process.c2
-rw-r--r--arch/cris/arch-v32/kernel/smp.c11
-rw-r--r--arch/cris/arch-v32/kernel/time.c1
-rw-r--r--arch/cris/arch-v32/mach-fs/Kconfig2
-rw-r--r--arch/cris/arch-v32/mm/tlb.c2
-rw-r--r--arch/cris/include/arch-v32/arch/spinlock.h2
-rw-r--r--arch/cris/include/asm/ftrace.h1
-rw-r--r--arch/cris/include/asm/ioctls.h5
-rw-r--r--arch/cris/include/asm/rs485.h8
-rw-r--r--arch/cris/include/asm/termios.h1
-rw-r--r--arch/cris/kernel/process.c1
-rw-r--r--arch/cris/kernel/setup.c2
-rw-r--r--arch/cris/mm/init.c3
-rw-r--r--arch/frv/kernel/irq-mb93091.c4
-rw-r--r--arch/frv/kernel/irq-mb93093.c1
-rw-r--r--arch/frv/kernel/irq-mb93493.c2
-rw-r--r--arch/frv/kernel/process.c2
-rw-r--r--arch/frv/kernel/time.c1
-rw-r--r--arch/frv/mm/tlb-miss.S1
-rw-r--r--arch/h8300/include/asm/ftrace.h1
-rw-r--r--arch/h8300/kernel/process.c2
-rw-r--r--arch/h8300/kernel/timer/itu.c1
-rw-r--r--arch/h8300/kernel/timer/timer16.c1
-rw-r--r--arch/h8300/kernel/timer/timer8.c1
-rw-r--r--arch/h8300/kernel/timer/tpu.c3
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/ia64/configs/generic_defconfig3
-rw-r--r--arch/ia64/dig/Makefile4
-rw-r--r--arch/ia64/dig/dig_vtd_iommu.c59
-rw-r--r--arch/ia64/hp/common/hwsw_iommu.c165
-rw-r--r--arch/ia64/hp/common/sba_iommu.c79
-rw-r--r--arch/ia64/hp/sim/simserial.c49
-rw-r--r--arch/ia64/include/asm/dma-mapping.h194
-rw-r--r--arch/ia64/include/asm/ftrace.h28
-rw-r--r--arch/ia64/include/asm/hardirq.h10
-rw-r--r--arch/ia64/include/asm/intrinsics.h6
-rw-r--r--arch/ia64/include/asm/machvec.h102
-rw-r--r--arch/ia64/include/asm/machvec_dig_vtd.h20
-rw-r--r--arch/ia64/include/asm/machvec_hpzx1.h23
-rw-r--r--arch/ia64/include/asm/machvec_hpzx1_swiotlb.h27
-rw-r--r--arch/ia64/include/asm/machvec_sn2.h27
-rw-r--r--arch/ia64/include/asm/mmu_context.h6
-rw-r--r--arch/ia64/include/asm/module.h6
-rw-r--r--arch/ia64/include/asm/native/inst.h13
-rw-r--r--arch/ia64/include/asm/native/patchlist.h38
-rw-r--r--arch/ia64/include/asm/native/pvchk_inst.h8
-rw-r--r--arch/ia64/include/asm/paravirt.h65
-rw-r--r--arch/ia64/include/asm/paravirt_patch.h143
-rw-r--r--arch/ia64/include/asm/paravirt_privop.h365
-rw-r--r--arch/ia64/include/asm/smp.h3
-rw-r--r--arch/ia64/include/asm/spinlock.h77
-rw-r--r--arch/ia64/include/asm/timex.h1
-rw-r--r--arch/ia64/include/asm/topology.h10
-rw-r--r--arch/ia64/include/asm/uv/uv_hub.h6
-rw-r--r--arch/ia64/include/asm/uv/uv_mmrs.h158
-rw-r--r--arch/ia64/include/asm/xen/hypervisor.h39
-rw-r--r--arch/ia64/include/asm/xen/inst.h28
-rw-r--r--arch/ia64/include/asm/xen/interface.h9
-rw-r--r--arch/ia64/include/asm/xen/minstate.h11
-rw-r--r--arch/ia64/include/asm/xen/patchlist.h38
-rw-r--r--arch/ia64/include/asm/xen/privop.h8
-rw-r--r--arch/ia64/kernel/Makefile48
-rw-r--r--arch/ia64/kernel/Makefile.gate27
-rw-r--r--arch/ia64/kernel/acpi.c8
-rw-r--r--arch/ia64/kernel/asm-offsets.c2
-rw-r--r--arch/ia64/kernel/dma-mapping.c13
-rw-r--r--arch/ia64/kernel/efi.c1
-rw-r--r--arch/ia64/kernel/entry.S104
-rw-r--r--arch/ia64/kernel/fsys.S35
-rw-r--r--arch/ia64/kernel/ftrace.c206
-rw-r--r--arch/ia64/kernel/gate.S171
-rw-r--r--arch/ia64/kernel/gate.lds.S17
-rw-r--r--arch/ia64/kernel/head.S10
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c6
-rw-r--r--arch/ia64/kernel/ivt.S2
-rw-r--r--arch/ia64/kernel/machvec.c8
-rw-r--r--arch/ia64/kernel/mca.c6
-rw-r--r--arch/ia64/kernel/module.c35
-rw-r--r--arch/ia64/kernel/palinfo.c2
-rw-r--r--arch/ia64/kernel/paravirt.c539
-rw-r--r--arch/ia64/kernel/paravirt_patch.c514
-rw-r--r--arch/ia64/kernel/paravirt_patchlist.c79
-rw-r--r--arch/ia64/kernel/paravirt_patchlist.h28
-rw-r--r--arch/ia64/kernel/paravirtentry.S99
-rw-r--r--arch/ia64/kernel/patch.c40
-rw-r--r--arch/ia64/kernel/pci-dma.c52
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c30
-rw-r--r--arch/ia64/kernel/perfmon.c4
-rw-r--r--arch/ia64/kernel/process.c2
-rw-r--r--arch/ia64/kernel/salinfo.c6
-rw-r--r--arch/ia64/kernel/setup.c9
-rw-r--r--arch/ia64/kernel/smp.c6
-rw-r--r--arch/ia64/kernel/smpboot.c17
-rw-r--r--arch/ia64/kernel/time.c25
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S30
-rw-r--r--arch/ia64/kvm/kvm-ia64.c2
-rw-r--r--arch/ia64/kvm/vcpu.c2
-rw-r--r--arch/ia64/kvm/vtlb.c2
-rw-r--r--arch/ia64/mm/init.c12
-rw-r--r--arch/ia64/mm/tlb.c2
-rw-r--r--arch/ia64/scripts/pvcheck.sed1
-rw-r--r--arch/ia64/sn/kernel/io_common.c15
-rw-r--r--arch/ia64/sn/kernel/io_init.c12
-rw-r--r--arch/ia64/sn/kernel/setup.c5
-rw-r--r--arch/ia64/sn/kernel/sn2/prominfo_proc.c9
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c12
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c8
-rw-r--r--arch/ia64/sn/pci/pci_dma.c101
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_dma.c4
-rw-r--r--arch/ia64/xen/Makefile19
-rw-r--r--arch/ia64/xen/gate-data.S3
-rw-r--r--arch/ia64/xen/hypercall.S2
-rw-r--r--arch/ia64/xen/time.c48
-rw-r--r--arch/ia64/xen/xen_pv_ops.c800
-rw-r--r--arch/m32r/kernel/process.c2
-rw-r--r--arch/m32r/kernel/time.c1
-rw-r--r--arch/m68k/include/asm/bootinfo.h381
-rw-r--r--arch/m68k/include/asm/bootinfo_mm.h378
-rw-r--r--arch/m68k/include/asm/bootinfo_no.h2
-rw-r--r--arch/m68k/include/asm/bug.h31
-rw-r--r--arch/m68k/include/asm/bug_mm.h29
-rw-r--r--arch/m68k/include/asm/bug_no.h4
-rw-r--r--arch/m68k/include/asm/bugs.h21
-rw-r--r--arch/m68k/include/asm/bugs_mm.h14
-rw-r--r--arch/m68k/include/asm/bugs_no.h16
-rw-r--r--arch/m68k/include/asm/cache.h14
-rw-r--r--arch/m68k/include/asm/cache_mm.h11
-rw-r--r--arch/m68k/include/asm/cache_no.h12
-rw-r--r--arch/m68k/include/asm/current.h31
-rw-r--r--arch/m68k/include/asm/current_mm.h6
-rw-r--r--arch/m68k/include/asm/current_no.h24
-rw-r--r--arch/m68k/include/asm/div64.h37
-rw-r--r--arch/m68k/include/asm/div64_mm.h28
-rw-r--r--arch/m68k/include/asm/div64_no.h1
-rw-r--r--arch/m68k/include/asm/dma-mapping.h113
-rw-r--r--arch/m68k/include/asm/dma-mapping_mm.h112
-rw-r--r--arch/m68k/include/asm/dma-mapping_no.h6
-rw-r--r--arch/m68k/include/asm/elf.h120
-rw-r--r--arch/m68k/include/asm/elf_mm.h119
-rw-r--r--arch/m68k/include/asm/elf_no.h110
-rw-r--r--arch/m68k/include/asm/fb.h41
-rw-r--r--arch/m68k/include/asm/fb_mm.h34
-rw-r--r--arch/m68k/include/asm/fb_no.h12
-rw-r--r--arch/m68k/include/asm/fpu.h22
-rw-r--r--arch/m68k/include/asm/fpu_mm.h21
-rw-r--r--arch/m68k/include/asm/fpu_no.h21
-rw-r--r--arch/m68k/include/asm/ftrace.h1
-rw-r--r--arch/m68k/include/asm/hw_irq.h9
-rw-r--r--arch/m68k/include/asm/hw_irq_mm.h6
-rw-r--r--arch/m68k/include/asm/hw_irq_no.h4
-rw-r--r--arch/m68k/include/asm/ide.h73
-rw-r--r--arch/m68k/include/asm/kmap_types.h26
-rw-r--r--arch/m68k/include/asm/kmap_types_mm.h21
-rw-r--r--arch/m68k/include/asm/kmap_types_no.h21
-rw-r--r--arch/m68k/include/asm/m532xsim.h1
-rw-r--r--arch/m68k/include/asm/mc146818rtc.h31
-rw-r--r--arch/m68k/include/asm/mc146818rtc_mm.h26
-rw-r--r--arch/m68k/include/asm/mc146818rtc_no.h9
-rw-r--r--arch/m68k/include/asm/mcfpci.h119
-rw-r--r--arch/m68k/include/asm/mmu.h14
-rw-r--r--arch/m68k/include/asm/mmu_context.h176
-rw-r--r--arch/m68k/include/asm/mmu_context_mm.h154
-rw-r--r--arch/m68k/include/asm/mmu_context_no.h33
-rw-r--r--arch/m68k/include/asm/mmu_mm.h7
-rw-r--r--arch/m68k/include/asm/mmu_no.h10
-rw-r--r--arch/m68k/include/asm/module.h51
-rw-r--r--arch/m68k/include/asm/module_mm.h39
-rw-r--r--arch/m68k/include/asm/module_no.h11
-rw-r--r--arch/m68k/include/asm/page_offset.h12
-rw-r--r--arch/m68k/include/asm/page_offset_mm.h8
-rw-r--r--arch/m68k/include/asm/page_offset_no.h5
-rw-r--r--arch/m68k/include/asm/pci.h17
-rw-r--r--arch/m68k/include/asm/pci_mm.h12
-rw-r--r--arch/m68k/include/asm/pci_no.h29
-rw-r--r--arch/m68k/include/asm/pgalloc.h20
-rw-r--r--arch/m68k/include/asm/pgalloc_mm.h19
-rw-r--r--arch/m68k/include/asm/pgalloc_no.h8
-rw-r--r--arch/m68k/include/asm/pgtable_no.h2
-rw-r--r--arch/m68k/include/asm/rtc.h7
-rw-r--r--arch/m68k/include/asm/scatterlist.h26
-rw-r--r--arch/m68k/include/asm/scatterlist_mm.h23
-rw-r--r--arch/m68k/include/asm/scatterlist_no.h22
-rw-r--r--arch/m68k/include/asm/segment.h64
-rw-r--r--arch/m68k/include/asm/segment_mm.h57
-rw-r--r--arch/m68k/include/asm/segment_no.h51
-rw-r--r--arch/m68k/include/asm/timex.h21
-rw-r--r--arch/m68k/include/asm/timex_mm.h18
-rw-r--r--arch/m68k/include/asm/timex_no.h23
-rw-r--r--arch/m68k/include/asm/tlbflush.h268
-rw-r--r--arch/m68k/include/asm/tlbflush_mm.h219
-rw-r--r--arch/m68k/include/asm/tlbflush_no.h55
-rw-r--r--arch/m68k/include/asm/ucontext.h33
-rw-r--r--arch/m68k/include/asm/ucontext_mm.h30
-rw-r--r--arch/m68k/include/asm/ucontext_no.h32
-rw-r--r--arch/m68k/include/asm/unaligned.h26
-rw-r--r--arch/m68k/include/asm/unaligned_mm.h13
-rw-r--r--arch/m68k/include/asm/unaligned_no.h25
-rw-r--r--arch/m68k/kernel/process.c2
-rw-r--r--arch/m68k/kernel/time.c18
-rw-r--r--arch/m68knommu/Makefile14
-rw-r--r--arch/m68knommu/kernel/dma.c8
-rw-r--r--arch/m68knommu/kernel/irq.c2
-rw-r--r--arch/m68knommu/kernel/process.c2
-rw-r--r--arch/m68knommu/mm/init.c6
-rw-r--r--arch/m68knommu/platform/5249/config.c11
-rw-r--r--arch/m68knommu/platform/5307/config.c8
-rw-r--r--arch/m68knommu/platform/5407/config.c8
-rw-r--r--arch/m68knommu/platform/coldfire/Makefile2
-rw-r--r--arch/m68knommu/platform/coldfire/clk.c40
-rw-r--r--arch/mips/Kconfig14
-rw-r--r--arch/mips/Makefile6
-rw-r--r--arch/mips/alchemy/Kconfig2
-rw-r--r--arch/mips/alchemy/common/gpio.c203
-rw-r--r--arch/mips/alchemy/common/platform.c30
-rw-r--r--arch/mips/alchemy/devboards/pb1200/platform.c14
-rw-r--r--arch/mips/cavium-octeon/Makefile2
-rw-r--r--arch/mips/cavium-octeon/flash_setup.c2
-rw-r--r--arch/mips/cavium-octeon/octeon-irq.c2
-rw-r--r--arch/mips/cobalt/irq.c1
-rw-r--r--arch/mips/emma/markeins/irq.c51
-rw-r--r--arch/mips/emma/markeins/platform.c3
-rw-r--r--arch/mips/include/asm/cpu.h3
-rw-r--r--arch/mips/include/asm/ftrace.h1
-rw-r--r--arch/mips/include/asm/hazards.h4
-rw-r--r--arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h49
-rw-r--r--arch/mips/include/asm/mach-au1x00/gpio.h70
-rw-r--r--arch/mips/include/asm/mach-bcm47xx/gpio.h20
-rw-r--r--arch/mips/include/asm/mach-ip27/topology.h1
-rw-r--r--arch/mips/include/asm/mips-boards/generic.h2
-rw-r--r--arch/mips/include/asm/smp-ops.h2
-rw-r--r--arch/mips/include/asm/spinlock.h10
-rw-r--r--arch/mips/include/asm/txx9/ndfmc.h30
-rw-r--r--arch/mips/include/asm/txx9/rbtx4939.h9
-rw-r--r--arch/mips/include/asm/txx9/tx4938.h1
-rw-r--r--arch/mips/include/asm/txx9/tx4939.h2
-rw-r--r--arch/mips/include/asm/types.h8
-rw-r--r--arch/mips/include/asm/unistd.h18
-rw-r--r--arch/mips/jazz/irq.c1
-rw-r--r--arch/mips/jazz/jazzdma.c3
-rw-r--r--arch/mips/kernel/cevt-bcm1480.c1
-rw-r--r--arch/mips/kernel/cevt-sb1250.c1
-rw-r--r--arch/mips/kernel/cpu-probe.c21
-rw-r--r--arch/mips/kernel/i8253.c2
-rw-r--r--arch/mips/kernel/i8259.c1
-rw-r--r--arch/mips/kernel/irq-msc01.c6
-rw-r--r--arch/mips/kernel/irq_cpu.c3
-rw-r--r--arch/mips/kernel/linux32.c6
-rw-r--r--arch/mips/kernel/process.c2
-rw-r--r--arch/mips/kernel/scall32-o32.S2
-rw-r--r--arch/mips/kernel/scall64-64.S2
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/setup.c3
-rw-r--r--arch/mips/kernel/smp-up.c14
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/traps.c3
-rw-r--r--arch/mips/lasat/interrupt.c1
-rw-r--r--arch/mips/lemote/lm2e/irq.c1
-rw-r--r--arch/mips/mm/c-r4k.c17
-rw-r--r--arch/mips/mm/highmem.c11
-rw-r--r--arch/mips/mm/init.c3
-rw-r--r--arch/mips/mm/ioremap.c9
-rw-r--r--arch/mips/mm/tlbex.c8
-rw-r--r--arch/mips/mti-malta/malta-init.c2
-rw-r--r--arch/mips/nxp/pnx833x/common/platform.c12
-rw-r--r--arch/mips/nxp/pnx8550/common/platform.c8
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_usb.c8
-rw-r--r--arch/mips/sgi-ip27/ip27-berr.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-nmi.c6
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c2
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c65
-rw-r--r--arch/mips/sgi-ip32/ip32-memory.c2
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c2
-rw-r--r--arch/mips/sibyte/sb1250/irq.c2
-rw-r--r--arch/mips/sni/a20r.c2
-rw-r--r--arch/mips/sni/pcimt.c2
-rw-r--r--arch/mips/sni/pcit.c4
-rw-r--r--arch/mips/sni/rm200.c5
-rw-r--r--arch/mips/txx9/Kconfig1
-rw-r--r--arch/mips/txx9/generic/setup.c21
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c21
-rw-r--r--arch/mips/txx9/generic/setup_tx4939.c17
-rw-r--r--arch/mips/txx9/rbtx4938/setup.c2
-rw-r--r--arch/mips/txx9/rbtx4939/setup.c161
-rw-r--r--arch/mips/vr41xx/common/irq.c1
-rw-r--r--arch/mn10300/kernel/process.c2
-rw-r--r--arch/mn10300/kernel/time.c1
-rw-r--r--arch/parisc/Kconfig12
-rw-r--r--arch/parisc/Makefile4
-rw-r--r--arch/parisc/include/asm/atomic.h18
-rw-r--r--arch/parisc/include/asm/cacheflush.h3
-rw-r--r--arch/parisc/include/asm/elf.h10
-rw-r--r--arch/parisc/include/asm/ftrace.h25
-rw-r--r--arch/parisc/include/asm/page.h13
-rw-r--r--arch/parisc/include/asm/pdc.h4
-rw-r--r--arch/parisc/include/asm/pgtable.h15
-rw-r--r--arch/parisc/include/asm/smp.h3
-rw-r--r--arch/parisc/include/asm/spinlock.h3
-rw-r--r--arch/parisc/kernel/Makefile15
-rw-r--r--arch/parisc/kernel/entry.S60
-rw-r--r--arch/parisc/kernel/firmware.c6
-rw-r--r--arch/parisc/kernel/ftrace.c185
-rw-r--r--arch/parisc/kernel/irq.c4
-rw-r--r--arch/parisc/kernel/module.c18
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c5
-rw-r--r--arch/parisc/kernel/process.c31
-rw-r--r--arch/parisc/kernel/processor.c13
-rw-r--r--arch/parisc/kernel/smp.c21
-rw-r--r--arch/parisc/kernel/stacktrace.c63
-rw-r--r--arch/parisc/kernel/syscall.S58
-rw-r--r--arch/parisc/kernel/time.c12
-rw-r--r--arch/parisc/kernel/traps.c5
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S2
-rw-r--r--arch/parisc/mm/init.c7
-rw-r--r--arch/powerpc/Kconfig80
-rw-r--r--arch/powerpc/Kconfig.debug11
-rw-r--r--arch/powerpc/Makefile4
-rw-r--r--arch/powerpc/boot/Makefile9
-rw-r--r--arch/powerpc/boot/cuboot-amigaone.c35
-rw-r--r--arch/powerpc/boot/dts/amigaone.dts173
-rw-r--r--arch/powerpc/boot/dts/asp834x-redboot.dts82
-rw-r--r--arch/powerpc/boot/dts/canyonlands.dts28
-rw-r--r--arch/powerpc/boot/dts/cm5200.dts49
-rw-r--r--arch/powerpc/boot/dts/digsy_mtc.dts254
-rw-r--r--arch/powerpc/boot/dts/gef_ppc9a.dts367
-rw-r--r--arch/powerpc/boot/dts/gef_sbc310.dts367
-rw-r--r--arch/powerpc/boot/dts/gef_sbc610.dts41
-rw-r--r--arch/powerpc/boot/dts/ksi8560.dts83
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts52
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts63
-rw-r--r--arch/powerpc/boot/dts/media5200.dts318
-rw-r--r--arch/powerpc/boot/dts/motionpro.dts42
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts11
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts144
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts24
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts69
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts42
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts81
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts211
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts229
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts209
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts229
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts146
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts164
-rw-r--r--arch/powerpc/boot/dts/mpc8536ds.dts78
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts117
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts78
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts81
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts156
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts78
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts102
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts102
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts160
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds_36b.dts799
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts49
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts6
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts157
-rw-r--r--arch/powerpc/boot/dts/pcm030.dts182
-rw-r--r--arch/powerpc/boot/dts/pcm032.dts392
-rw-r--r--arch/powerpc/boot/dts/pq2fads.dts20
-rw-r--r--arch/powerpc/boot/dts/redwood.dts244
-rw-r--r--arch/powerpc/boot/dts/sbc8349.dts80
-rw-r--r--arch/powerpc/boot/dts/sbc8548.dts82
-rw-r--r--arch/powerpc/boot/dts/sbc8560.dts104
-rw-r--r--arch/powerpc/boot/dts/sbc8641d.dts156
-rw-r--r--arch/powerpc/boot/dts/socrates.dts339
-rw-r--r--arch/powerpc/boot/dts/stx_gp3_8560.dts82
-rw-r--r--arch/powerpc/boot/dts/tqm5200.dts32
-rw-r--r--arch/powerpc/boot/dts/tqm8540.dts126
-rw-r--r--arch/powerpc/boot/dts/tqm8541.dts99
-rw-r--r--arch/powerpc/boot/dts/tqm8548-bigflash.dts184
-rw-r--r--arch/powerpc/boot/dts/tqm8548.dts184
-rw-r--r--arch/powerpc/boot/dts/tqm8555.dts99
-rw-r--r--arch/powerpc/boot/dts/tqm8560.dts103
-rw-r--r--arch/powerpc/boot/dts/virtex440-ml507.dts124
-rw-r--r--arch/powerpc/boot/serial.c3
-rwxr-xr-xarch/powerpc/boot/wrapper7
-rw-r--r--arch/powerpc/configs/44x/canyonlands_defconfig266
-rw-r--r--arch/powerpc/configs/44x/redwood_defconfig1176
-rw-r--r--arch/powerpc/configs/85xx/socrates_defconfig1410
-rw-r--r--arch/powerpc/configs/86xx/gef_ppc9a_defconfig1889
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc310_defconfig1613
-rw-r--r--arch/powerpc/configs/amigaone_defconfig1636
-rw-r--r--arch/powerpc/configs/mpc5200_defconfig71
-rw-r--r--arch/powerpc/configs/ppc64_defconfig6
-rw-r--r--arch/powerpc/configs/pseries_defconfig2
-rw-r--r--arch/powerpc/include/asm/code-patching.h4
-rw-r--r--arch/powerpc/include/asm/cputable.h4
-rw-r--r--arch/powerpc/include/asm/dbell.h43
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h12
-rw-r--r--arch/powerpc/include/asm/elf.h12
-rw-r--r--arch/powerpc/include/asm/fixmap.h2
-rw-r--r--arch/powerpc/include/asm/ftrace.h39
-rw-r--r--arch/powerpc/include/asm/highmem.h14
-rw-r--r--arch/powerpc/include/asm/hw_irq.h2
-rw-r--r--arch/powerpc/include/asm/io.h6
-rw-r--r--arch/powerpc/include/asm/lppaca.h10
-rw-r--r--arch/powerpc/include/asm/machdep.h4
-rw-r--r--arch/powerpc/include/asm/mmu-44x.h2
-rw-r--r--arch/powerpc/include/asm/mmu-book3e.h (renamed from arch/powerpc/include/asm/mmu-fsl-booke.h)66
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h2
-rw-r--r--arch/powerpc/include/asm/mmu.h20
-rw-r--r--arch/powerpc/include/asm/mmu_context.h2
-rw-r--r--arch/powerpc/include/asm/mmzone.h1
-rw-r--r--arch/powerpc/include/asm/mpc52xx.h1
-rw-r--r--arch/powerpc/include/asm/mpic.h12
-rw-r--r--arch/powerpc/include/asm/page.h6
-rw-r--r--arch/powerpc/include/asm/page_32.h4
-rw-r--r--arch/powerpc/include/asm/pci.h4
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc32.h557
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64-4k.h (renamed from arch/powerpc/include/asm/pgtable-4k.h)55
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64-64k.h42
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64.h196
-rw-r--r--arch/powerpc/include/asm/pgtable.h134
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h73
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h6
-rw-r--r--arch/powerpc/include/asm/processor.h19
-rw-r--r--arch/powerpc/include/asm/ps3.h3
-rw-r--r--arch/powerpc/include/asm/ps3av.h2
-rw-r--r--arch/powerpc/include/asm/pte-40x.h64
-rw-r--r--arch/powerpc/include/asm/pte-44x.h102
-rw-r--r--arch/powerpc/include/asm/pte-8xx.h67
-rw-r--r--arch/powerpc/include/asm/pte-common.h182
-rw-r--r--arch/powerpc/include/asm/pte-fsl-booke.h48
-rw-r--r--arch/powerpc/include/asm/pte-hash32.h48
-rw-r--r--arch/powerpc/include/asm/pte-hash64-4k.h17
-rw-r--r--arch/powerpc/include/asm/pte-hash64-64k.h (renamed from arch/powerpc/include/asm/pgtable-64k.h)132
-rw-r--r--arch/powerpc/include/asm/pte-hash64.h54
-rw-r--r--arch/powerpc/include/asm/reg.h32
-rw-r--r--arch/powerpc/include/asm/reg_booke.h32
-rw-r--r--arch/powerpc/include/asm/rtas.h3
-rw-r--r--arch/powerpc/include/asm/sfp-machine.h6
-rw-r--r--arch/powerpc/include/asm/spinlock.h3
-rw-r--r--arch/powerpc/include/asm/suspend.h3
-rw-r--r--arch/powerpc/include/asm/systbl.h3
-rw-r--r--arch/powerpc/include/asm/system.h2
-rw-r--r--arch/powerpc/include/asm/thread_info.h11
-rw-r--r--arch/powerpc/include/asm/topology.h5
-rw-r--r--arch/powerpc/include/asm/udbg.h1
-rw-r--r--arch/powerpc/include/asm/unistd.h4
-rw-r--r--arch/powerpc/kernel/Makefile12
-rw-r--r--arch/powerpc/kernel/align.c2
-rw-r--r--arch/powerpc/kernel/asm-offsets.c3
-rw-r--r--arch/powerpc/kernel/cpu_setup_44x.S1
-rw-r--r--arch/powerpc/kernel/cpu_setup_6xx.S5
-rw-r--r--arch/powerpc/kernel/cpu_setup_fsl_booke.S31
-rw-r--r--arch/powerpc/kernel/cputable.c166
-rw-r--r--arch/powerpc/kernel/crash_dump.c2
-rw-r--r--arch/powerpc/kernel/dbell.c44
-rw-r--r--arch/powerpc/kernel/dma.c2
-rw-r--r--arch/powerpc/kernel/entry_32.S129
-rw-r--r--arch/powerpc/kernel/entry_64.S89
-rw-r--r--arch/powerpc/kernel/fpu.S5
-rw-r--r--arch/powerpc/kernel/ftrace.c218
-rw-r--r--arch/powerpc/kernel/head_32.S101
-rw-r--r--arch/powerpc/kernel/head_64.S6
-rw-r--r--arch/powerpc/kernel/head_booke.h19
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S101
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/lparcfg.c16
-rw-r--r--arch/powerpc/kernel/misc_64.S8
-rw-r--r--arch/powerpc/kernel/module_64.c2
-rw-r--r--arch/powerpc/kernel/msi.c5
-rw-r--r--arch/powerpc/kernel/of_platform.c2
-rw-r--r--arch/powerpc/kernel/pci-common.c45
-rw-r--r--arch/powerpc/kernel/pci_32.c36
-rw-r--r--arch/powerpc/kernel/pci_64.c19
-rw-r--r--arch/powerpc/kernel/process.c60
-rw-r--r--arch/powerpc/kernel/prom.c6
-rw-r--r--arch/powerpc/kernel/prom_init.c20
-rw-r--r--arch/powerpc/kernel/prom_init_check.sh2
-rw-r--r--arch/powerpc/kernel/ptrace32.c15
-rw-r--r--arch/powerpc/kernel/rtas.c10
-rw-r--r--arch/powerpc/kernel/rtas_flash.c1
-rw-r--r--arch/powerpc/kernel/setup-common.c35
-rw-r--r--arch/powerpc/kernel/setup_64.c42
-rw-r--r--arch/powerpc/kernel/signal.c4
-rw-r--r--arch/powerpc/kernel/signal.h12
-rw-r--r--arch/powerpc/kernel/signal_32.c4
-rw-r--r--arch/powerpc/kernel/signal_64.c2
-rw-r--r--arch/powerpc/kernel/sysfs.c35
-rw-r--r--arch/powerpc/kernel/time.c16
-rw-r--r--arch/powerpc/kernel/traps.c79
-rw-r--r--arch/powerpc/kernel/udbg.c7
-rw-r--r--arch/powerpc/kernel/udbg_16550.c60
-rw-r--r--arch/powerpc/kernel/vio.c2
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S1
-rw-r--r--arch/powerpc/lib/dma-noncoherent.c303
-rw-r--r--arch/powerpc/lib/feature-fixups.c4
-rw-r--r--arch/powerpc/math-emu/Makefile5
-rw-r--r--arch/powerpc/mm/Makefile4
-rw-r--r--arch/powerpc/mm/fault.c46
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c95
-rw-r--r--arch/powerpc/mm/gup.c16
-rw-r--r--arch/powerpc/mm/hash_utils_64.c51
-rw-r--r--arch/powerpc/mm/mem.c33
-rw-r--r--arch/powerpc/mm/mmap_64.c (renamed from arch/powerpc/mm/mmap.c)64
-rw-r--r--arch/powerpc/mm/mmu_context_nohash.c4
-rw-r--r--arch/powerpc/mm/numa.c174
-rw-r--r--arch/powerpc/mm/pgtable.c134
-rw-r--r--arch/powerpc/mm/pgtable_32.c18
-rw-r--r--arch/powerpc/mm/pgtable_64.c25
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c10
-rw-r--r--arch/powerpc/mm/tlb_hash64.c6
-rw-r--r--arch/powerpc/mm/tlb_nohash.c18
-rw-r--r--arch/powerpc/mm/tlb_nohash_low.S44
-rw-r--r--arch/powerpc/oprofile/op_model_7450.c21
-rw-r--r--arch/powerpc/platforms/44x/Kconfig19
-rw-r--r--arch/powerpc/platforms/44x/ppc44x_simple.c1
-rw-r--r--arch/powerpc/platforms/512x/Kconfig4
-rw-r--r--arch/powerpc/platforms/52xx/Kconfig15
-rw-r--r--arch/powerpc/platforms/52xx/Makefile3
-rw-r--r--arch/powerpc/platforms/52xx/media5200.c273
-rw-r--r--arch/powerpc/platforms/52xx/mpc5200_simple.c4
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c40
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpio.c85
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c396
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c170
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/83xx/asp834x.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc831x_rdb.c2
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c123
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_mds.c11
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c3
-rw-r--r--arch/powerpc/platforms/83xx/sbc834x.c1
-rw-r--r--arch/powerpc/platforms/83xx/usb.c3
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig6
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/ksi8560.c3
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c1
-rw-r--r--arch/powerpc/platforms/85xx/sbc8548.c1
-rw-r--r--arch/powerpc/platforms/85xx/sbc8560.c1
-rw-r--r--arch/powerpc/platforms/85xx/smp.c43
-rw-r--r--arch/powerpc/platforms/85xx/socrates.c133
-rw-r--r--arch/powerpc/platforms/85xx/socrates_fpga_pic.c327
-rw-r--r--arch/powerpc/platforms/85xx/socrates_fpga_pic.h16
-rw-r--r--arch/powerpc/platforms/85xx/stx_gp3.c1
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c1
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig20
-rw-r--r--arch/powerpc/platforms/86xx/Makefile2
-rw-r--r--arch/powerpc/platforms/86xx/gef_gpio.c36
-rw-r--r--arch/powerpc/platforms/86xx/gef_ppc9a.c224
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc310.c235
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c1
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c1
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c1
-rw-r--r--arch/powerpc/platforms/86xx/sbc8641d.c1
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c1
-rw-r--r--arch/powerpc/platforms/Kconfig41
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype22
-rw-r--r--arch/powerpc/platforms/Makefile1
-rw-r--r--arch/powerpc/platforms/amigaone/Kconfig18
-rw-r--r--arch/powerpc/platforms/amigaone/Makefile1
-rw-r--r--arch/powerpc/platforms/amigaone/setup.c170
-rw-r--r--arch/powerpc/platforms/cell/Kconfig33
-rw-r--r--arch/powerpc/platforms/cell/Makefile2
-rw-r--r--arch/powerpc/platforms/cell/io-workarounds.c4
-rw-r--r--arch/powerpc/platforms/cell/iommu.c11
-rw-r--r--arch/powerpc/platforms/cell/qpace_setup.c15
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c2
-rw-r--r--arch/powerpc/platforms/cell/spu_fault.c48
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c20
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c7
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h8
-rw-r--r--arch/powerpc/platforms/chrp/Kconfig2
-rw-r--r--arch/powerpc/platforms/chrp/pegasos_eth.c72
-rw-r--r--arch/powerpc/platforms/chrp/setup.c1
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/iseries/Kconfig2
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c4
-rw-r--r--arch/powerpc/platforms/iseries/irq.c2
-rw-r--r--arch/powerpc/platforms/iseries/setup.c2
-rw-r--r--arch/powerpc/platforms/maple/Kconfig2
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig2
-rw-r--r--arch/powerpc/platforms/powermac/Kconfig2
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c5
-rw-r--r--arch/powerpc/platforms/powermac/pic.c2
-rw-r--r--arch/powerpc/platforms/powermac/pic.h2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c3
-rw-r--r--arch/powerpc/platforms/powermac/smp.c1
-rw-r--r--arch/powerpc/platforms/prep/Kconfig2
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig2
-rw-r--r--arch/powerpc/platforms/ps3/mm.c4
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c2
-rw-r--r--arch/powerpc/platforms/ps3/platform.h2
-rw-r--r--arch/powerpc/platforms/ps3/setup.c2
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c2
-rw-r--r--arch/powerpc/platforms/ps3/time.c26
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig17
-rw-r--r--arch/powerpc/platforms/pseries/Makefile3
-rw-r--r--arch/powerpc/platforms/pseries/dtl.c278
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c68
-rw-r--r--arch/powerpc/platforms/pseries/msi.c248
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h10
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c6
-rw-r--r--arch/powerpc/sysdev/bestcomm/Kconfig4
-rw-r--r--arch/powerpc/sysdev/cpm1.c1
-rw-r--r--arch/powerpc/sysdev/cpm2.c4
-rw-r--r--arch/powerpc/sysdev/cpm_common.c2
-rw-r--r--arch/powerpc/sysdev/fsl_lbc.c2
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c244
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c113
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h7
-rw-r--r--arch/powerpc/sysdev/ipic.c6
-rw-r--r--arch/powerpc/sysdev/mpic.c34
-rw-r--r--arch/powerpc/sysdev/msi_bitmap.c6
-rw-r--r--arch/powerpc/sysdev/pmi.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.c2
-rw-r--r--arch/s390/Kconfig3
-rw-r--r--arch/s390/Kconfig.debug8
-rw-r--r--arch/s390/hypfs/hypfs_diag.c2
-rw-r--r--arch/s390/include/asm/cio.h2
-rw-r--r--arch/s390/include/asm/smp.h6
-rw-r--r--arch/s390/include/asm/spinlock.h3
-rw-r--r--arch/s390/kernel/process.c2
-rw-r--r--arch/sh/Kconfig10
-rw-r--r--arch/sh/boards/board-ap325rxa.c56
-rw-r--r--arch/sh/boards/board-urquell.c4
-rw-r--r--arch/sh/boards/mach-migor/setup.c3
-rw-r--r--arch/sh/configs/ap325rxa_defconfig70
-rw-r--r--arch/sh/configs/cayman_defconfig235
-rw-r--r--arch/sh/configs/dreamcast_defconfig71
-rw-r--r--arch/sh/configs/edosk7705_defconfig29
-rw-r--r--arch/sh/configs/edosk7760_defconfig78
-rw-r--r--arch/sh/configs/espt_defconfig39
-rw-r--r--arch/sh/configs/hp6xx_defconfig54
-rw-r--r--arch/sh/configs/landisk_defconfig97
-rw-r--r--arch/sh/configs/lboxre2_defconfig69
-rw-r--r--arch/sh/configs/magicpanelr2_defconfig73
-rw-r--r--arch/sh/configs/microdev_defconfig74
-rw-r--r--arch/sh/configs/migor_defconfig82
-rw-r--r--arch/sh/configs/polaris_defconfig31
-rw-r--r--arch/sh/configs/r7780mp_defconfig91
-rw-r--r--arch/sh/configs/r7785rp_defconfig96
-rw-r--r--arch/sh/configs/rsk7201_defconfig57
-rw-r--r--arch/sh/configs/rsk7203_defconfig94
-rw-r--r--arch/sh/configs/rts7751r2d1_defconfig83
-rw-r--r--arch/sh/configs/rts7751r2dplus_defconfig83
-rw-r--r--arch/sh/configs/sdk7780_defconfig78
-rw-r--r--arch/sh/configs/se7206_defconfig82
-rw-r--r--arch/sh/configs/se7343_defconfig89
-rw-r--r--arch/sh/configs/se7619_defconfig55
-rw-r--r--arch/sh/configs/se7705_defconfig75
-rw-r--r--arch/sh/configs/se7712_defconfig79
-rw-r--r--arch/sh/configs/se7721_defconfig82
-rw-r--r--arch/sh/configs/se7722_defconfig76
-rw-r--r--arch/sh/configs/se7750_defconfig71
-rw-r--r--arch/sh/configs/se7751_defconfig74
-rw-r--r--arch/sh/configs/se7780_defconfig78
-rw-r--r--arch/sh/configs/sh03_defconfig79
-rw-r--r--arch/sh/configs/sh7710voipgw_defconfig69
-rw-r--r--arch/sh/configs/sh7763rdp_defconfig82
-rw-r--r--arch/sh/configs/sh7785lcr_32bit_defconfig42
-rw-r--r--arch/sh/configs/sh7785lcr_defconfig90
-rw-r--r--arch/sh/configs/shmin_defconfig73
-rw-r--r--arch/sh/configs/shx3_defconfig99
-rw-r--r--arch/sh/configs/snapgear_defconfig62
-rw-r--r--arch/sh/configs/systemh_defconfig54
-rw-r--r--arch/sh/configs/titan_defconfig101
-rw-r--r--arch/sh/configs/ul2_defconfig93
-rw-r--r--arch/sh/configs/urquell_defconfig45
-rw-r--r--arch/sh/drivers/dma/Kconfig20
-rw-r--r--arch/sh/drivers/pci/ops-sh7785lcr.c9
-rw-r--r--arch/sh/drivers/pci/pci-sh7780.c16
-rw-r--r--arch/sh/include/asm/mmu.h35
-rw-r--r--arch/sh/include/asm/processor_32.h13
-rw-r--r--arch/sh/include/asm/ptrace.h8
-rw-r--r--arch/sh/include/asm/spinlock.h3
-rw-r--r--arch/sh/include/asm/system.h1
-rw-r--r--arch/sh/include/asm/system_32.h170
-rw-r--r--arch/sh/include/asm/topology.h1
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7786.h214
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S85
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c5
-rw-r--r--arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c185
-rw-r--r--arch/sh/kernel/idle.c2
-rw-r--r--arch/sh/kernel/io_trapped.c13
-rw-r--r--arch/sh/kernel/process_32.c16
-rw-r--r--arch/sh/kernel/process_64.c2
-rw-r--r--arch/sh/kernel/ptrace_32.c6
-rw-r--r--arch/sh/kernel/setup.c5
-rw-r--r--arch/sh/kernel/time_64.c1
-rw-r--r--arch/sh/kernel/timers/timer-cmt.c1
-rw-r--r--arch/sh/kernel/timers/timer-mtu2.c1
-rw-r--r--arch/sh/kernel/timers/timer-tmu.c1
-rw-r--r--arch/sh/kernel/traps_32.c2
-rw-r--r--arch/sh/mm/Kconfig12
-rw-r--r--arch/sparc/Kconfig3
-rw-r--r--arch/sparc/Kconfig.debug8
-rw-r--r--arch/sparc/include/asm/mmu_context_64.h8
-rw-r--r--arch/sparc/include/asm/mmzone.h2
-rw-r--r--arch/sparc/include/asm/smp_64.h3
-rw-r--r--arch/sparc/include/asm/spinlock_32.h2
-rw-r--r--arch/sparc/include/asm/spinlock_64.h2
-rw-r--r--arch/sparc/include/asm/system_32.h2
-rw-r--r--arch/sparc/include/asm/topology_64.h12
-rw-r--r--arch/sparc/kernel/ds.c2
-rw-r--r--arch/sparc/kernel/head_64.S2
-rw-r--r--arch/sparc/kernel/irq_32.c2
-rw-r--r--arch/sparc/kernel/irq_64.c4
-rw-r--r--arch/sparc/kernel/led.c1
-rw-r--r--arch/sparc/kernel/mdesc.c2
-rw-r--r--arch/sparc/kernel/nmi.c23
-rw-r--r--arch/sparc/kernel/process_32.c2
-rw-r--r--arch/sparc/kernel/process_64.c2
-rw-r--r--arch/sparc/kernel/prom_64.c4
-rw-r--r--arch/sparc/kernel/smp_32.c36
-rw-r--r--arch/sparc/kernel/smp_64.c14
-rw-r--r--arch/sparc/kernel/sun4d_irq.c1
-rw-r--r--arch/sparc/kernel/sun4d_smp.c11
-rw-r--r--arch/sparc/kernel/sun4m_smp.c10
-rw-r--r--arch/sparc/mm/highmem.c1
-rw-r--r--arch/sparc/mm/init_64.c2
-rw-r--r--arch/sparc/mm/srmmu.c2
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/um/drivers/pcap_user.h10
-rw-r--r--arch/um/drivers/port.h10
-rw-r--r--arch/um/drivers/ssl.h10
-rw-r--r--arch/um/drivers/stdio_console.h10
-rw-r--r--arch/um/drivers/ubd_kern.c29
-rw-r--r--arch/um/drivers/xterm.h10
-rw-r--r--arch/um/include/asm/ftrace.h1
-rw-r--r--arch/um/include/asm/irq_vectors.h10
-rw-r--r--arch/um/include/asm/mmu.h10
-rw-r--r--arch/um/include/asm/pda.h10
-rw-r--r--arch/um/include/asm/pgalloc.h10
-rw-r--r--arch/um/include/asm/pgtable-3level.h10
-rw-r--r--arch/um/include/shared/frame_kern.h10
-rw-r--r--arch/um/include/shared/initrd.h10
-rw-r--r--arch/um/include/shared/irq_kern.h10
-rw-r--r--arch/um/include/shared/mem_kern.h10
-rw-r--r--arch/um/include/shared/ubd_user.h10
-rw-r--r--arch/um/kernel/Makefile6
-rw-r--r--arch/um/kernel/config.c.in18
-rw-r--r--arch/um/kernel/process.c2
-rw-r--r--arch/um/kernel/syscall.c3
-rw-r--r--arch/um/os-Linux/start_up.c8
-rw-r--r--arch/um/sys-i386/asm/archparam.h10
-rw-r--r--arch/um/sys-i386/shared/sysdep/checksum.h10
-rw-r--r--arch/um/sys-i386/sys_call_table.S11
-rw-r--r--arch/um/sys-ia64/sysdep/ptrace.h10
-rw-r--r--arch/um/sys-ia64/sysdep/sigcontext.h10
-rw-r--r--arch/um/sys-ia64/sysdep/syscalls.h10
-rw-r--r--arch/um/sys-ppc/miscthings.c11
-rw-r--r--arch/um/sys-ppc/ptrace.c10
-rw-r--r--arch/um/sys-ppc/ptrace_user.c10
-rw-r--r--arch/um/sys-ppc/shared/sysdep/ptrace.h10
-rw-r--r--arch/um/sys-ppc/shared/sysdep/sigcontext.h10
-rw-r--r--arch/um/sys-ppc/shared/sysdep/syscalls.h10
-rw-r--r--arch/um/sys-ppc/sigcontext.c10
-rw-r--r--arch/um/sys-x86_64/asm/archparam.h10
-rw-r--r--arch/um/sys-x86_64/asm/module.h10
-rw-r--r--arch/um/sys-x86_64/mem.c9
-rw-r--r--arch/x86/Kconfig31
-rw-r--r--arch/x86/Kconfig.cpu17
-rw-r--r--arch/x86/Kconfig.debug8
-rw-r--r--arch/x86/Makefile29
-rw-r--r--arch/x86/boot/Makefile56
-rw-r--r--arch/x86/boot/compressed/Makefile1
-rw-r--r--arch/x86/boot/header.S29
-rw-r--r--arch/x86/boot/memory.c39
-rw-r--r--arch/x86/boot/pm.c44
-rw-r--r--arch/x86/boot/pmjump.S1
-rw-r--r--arch/x86/boot/setup.ld3
-rw-r--r--arch/x86/boot/tools/build.c9
-rw-r--r--arch/x86/boot/video-vga.c22
-rw-r--r--arch/x86/ia32/ia32entry.S2
-rw-r--r--arch/x86/include/asm/apic.h40
-rw-r--r--arch/x86/include/asm/apicdef.h1
-rw-r--r--arch/x86/include/asm/boot.h4
-rw-r--r--arch/x86/include/asm/cacheflush.h8
-rwxr-xr-xarch/x86/include/asm/cpu_debug.h226
-rw-r--r--arch/x86/include/asm/cpumask.h18
-rw-r--r--arch/x86/include/asm/desc.h3
-rw-r--r--arch/x86/include/asm/device.h2
-rw-r--r--arch/x86/include/asm/dma-mapping.h194
-rw-r--r--arch/x86/include/asm/dmi.h19
-rw-r--r--arch/x86/include/asm/e820.h2
-rw-r--r--arch/x86/include/asm/entry_arch.h2
-rw-r--r--arch/x86/include/asm/fixmap.h2
-rw-r--r--arch/x86/include/asm/ftrace.h32
-rw-r--r--arch/x86/include/asm/hardirq.h1
-rw-r--r--arch/x86/include/asm/highmem.h1
-rw-r--r--arch/x86/include/asm/hw_irq.h1
-rw-r--r--arch/x86/include/asm/init.h18
-rw-r--r--arch/x86/include/asm/io_apic.h12
-rw-r--r--arch/x86/include/asm/iommu.h2
-rw-r--r--arch/x86/include/asm/irq.h1
-rw-r--r--arch/x86/include/asm/irq_remapping.h2
-rw-r--r--arch/x86/include/asm/irq_vectors.h5
-rw-r--r--arch/x86/include/asm/kexec.h13
-rw-r--r--arch/x86/include/asm/lguest_hcall.h24
-rw-r--r--arch/x86/include/asm/linkage.h19
-rw-r--r--arch/x86/include/asm/mce.h35
-rw-r--r--arch/x86/include/asm/msidef.h1
-rw-r--r--arch/x86/include/asm/msr-index.h5
-rw-r--r--arch/x86/include/asm/page_32_types.h5
-rw-r--r--arch/x86/include/asm/page_types.h6
-rw-r--r--arch/x86/include/asm/paravirt.h19
-rw-r--r--arch/x86/include/asm/pat.h5
-rw-r--r--arch/x86/include/asm/pci.h44
-rw-r--r--arch/x86/include/asm/pci_32.h34
-rw-r--r--arch/x86/include/asm/pci_64.h22
-rw-r--r--arch/x86/include/asm/pgtable-2level.h7
-rw-r--r--arch/x86/include/asm/pgtable-3level.h17
-rw-r--r--arch/x86/include/asm/pgtable.h2
-rw-r--r--arch/x86/include/asm/pgtable_32.h3
-rw-r--r--arch/x86/include/asm/pgtable_32_types.h5
-rw-r--r--arch/x86/include/asm/pgtable_types.h1
-rw-r--r--arch/x86/include/asm/processor.h8
-rw-r--r--arch/x86/include/asm/ptrace-abi.h3
-rw-r--r--arch/x86/include/asm/sections.h7
-rw-r--r--arch/x86/include/asm/setup.h39
-rw-r--r--arch/x86/include/asm/smp.h13
-rw-r--r--arch/x86/include/asm/spinlock.h3
-rw-r--r--arch/x86/include/asm/suspend_32.h24
-rw-r--r--arch/x86/include/asm/thread_info.h9
-rw-r--r--arch/x86/include/asm/timer.h2
-rw-r--r--arch/x86/include/asm/topology.h99
-rw-r--r--arch/x86/include/asm/unistd_32.h2
-rw-r--r--arch/x86/include/asm/unistd_64.h4
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h18
-rw-r--r--arch/x86/include/asm/uv/uv_mmrs.h153
-rw-r--r--arch/x86/include/asm/xen/hypercall.h2
-rw-r--r--arch/x86/kernel/Makefile9
-rw-r--r--arch/x86/kernel/acpi/boot.c65
-rw-r--r--arch/x86/kernel/alternative.c46
-rw-r--r--arch/x86/kernel/amd_iommu.c33
-rw-r--r--arch/x86/kernel/apic/apic.c97
-rw-r--r--arch/x86/kernel/apic/apic_flat_64.c18
-rw-r--r--arch/x86/kernel/apic/bigsmp_32.c16
-rw-r--r--arch/x86/kernel/apic/es7000_32.c17
-rw-r--r--arch/x86/kernel/apic/io_apic.c412
-rw-r--r--arch/x86/kernel/apic/nmi.c11
-rw-r--r--arch/x86/kernel/apic/numaq_32.c11
-rw-r--r--arch/x86/kernel/apic/probe_32.c3
-rw-r--r--arch/x86/kernel/apic/probe_64.c7
-rw-r--r--arch/x86/kernel/apic/summit_32.c21
-rw-r--r--arch/x86/kernel/apic/x2apic_cluster.c6
-rw-r--r--arch/x86/kernel/apic/x2apic_phys.c6
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c9
-rw-r--r--arch/x86/kernel/apm_32.c263
-rw-r--r--arch/x86/kernel/asm-offsets_32.c1
-rw-r--r--arch/x86/kernel/asm-offsets_64.c1
-rw-r--r--arch/x86/kernel/check.c8
-rw-r--r--arch/x86/kernel/cpu/Makefile5
-rw-r--r--arch/x86/kernel/cpu/addon_cpuid_features.c2
-rw-r--r--arch/x86/kernel/cpu/amd.c54
-rw-r--r--arch/x86/kernel/cpu/centaur.c36
-rw-r--r--arch/x86/kernel/cpu/centaur_64.c37
-rw-r--r--arch/x86/kernel/cpu/common.c405
-rw-r--r--arch/x86/kernel/cpu/cpu.h25
-rwxr-xr-xarch/x86/kernel/cpu/cpu_debug.c901
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c16
-rw-r--r--arch/x86/kernel/cpu/cpufreq/longhaul.c6
-rw-r--r--arch/x86/kernel/cpu/cpufreq/p4-clockmod.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c13
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-ich.c2
-rw-r--r--arch/x86/kernel/cpu/cyrix.c16
-rw-r--r--arch/x86/kernel/cpu/intel.c32
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c32
-rw-r--r--arch/x86/kernel/cpu/mcheck/Makefile1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_32.c14
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c540
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c68
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_intel_64.c207
-rw-r--r--arch/x86/kernel/cpu/mcheck/threshold.c29
-rw-r--r--arch/x86/kernel/cpu/mtrr/Makefile2
-rw-r--r--arch/x86/kernel/cpu/mtrr/cleanup.c1101
-rw-r--r--arch/x86/kernel/cpu/mtrr/generic.c199
-rw-r--r--arch/x86/kernel/cpu/mtrr/if.c10
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c1069
-rw-r--r--arch/x86/kernel/cpu/mtrr/mtrr.h4
-rw-r--r--arch/x86/kernel/cpu/proc.c6
-rw-r--r--arch/x86/kernel/cpu/transmeta.c2
-rw-r--r--arch/x86/kernel/cpu/umc.c2
-rw-r--r--arch/x86/kernel/dumpstack.c7
-rw-r--r--arch/x86/kernel/e820.c142
-rw-r--r--arch/x86/kernel/early_printk.c20
-rw-r--r--arch/x86/kernel/entry_32.S18
-rw-r--r--arch/x86/kernel/entry_64.S6
-rw-r--r--arch/x86/kernel/ftrace.c265
-rw-r--r--arch/x86/kernel/head32.c5
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/kernel/head_32.S76
-rw-r--r--arch/x86/kernel/i8253.c68
-rw-r--r--arch/x86/kernel/io_delay.c27
-rw-r--r--arch/x86/kernel/irq.c88
-rw-r--r--arch/x86/kernel/irqinit_32.c5
-rw-r--r--arch/x86/kernel/irqinit_64.c4
-rw-r--r--arch/x86/kernel/kdebugfs.c82
-rw-r--r--arch/x86/kernel/kprobes.c19
-rw-r--r--arch/x86/kernel/kvm.c7
-rw-r--r--arch/x86/kernel/machine_kexec_32.c17
-rw-r--r--arch/x86/kernel/machine_kexec_64.c99
-rw-r--r--arch/x86/kernel/mfgpt_32.c1
-rw-r--r--arch/x86/kernel/microcode_amd.c43
-rw-r--r--arch/x86/kernel/microcode_core.c160
-rw-r--r--arch/x86/kernel/microcode_intel.c83
-rw-r--r--arch/x86/kernel/mmconf-fam10h_64.c2
-rw-r--r--arch/x86/kernel/mpparse.c384
-rw-r--r--arch/x86/kernel/paravirt.c1
-rw-r--r--arch/x86/kernel/pci-calgary_64.c38
-rw-r--r--arch/x86/kernel/pci-dma.c25
-rw-r--r--arch/x86/kernel/pci-gart_64.c34
-rw-r--r--arch/x86/kernel/pci-nommu.c41
-rw-r--r--arch/x86/kernel/pci-swiotlb.c (renamed from arch/x86/kernel/pci-swiotlb_64.c)19
-rw-r--r--arch/x86/kernel/process.c30
-rw-r--r--arch/x86/kernel/process_32.c2
-rw-r--r--arch/x86/kernel/process_64.c2
-rw-r--r--arch/x86/kernel/ptrace.c12
-rw-r--r--arch/x86/kernel/quirks.c3
-rw-r--r--arch/x86/kernel/relocate_kernel_32.S24
-rw-r--r--arch/x86/kernel/relocate_kernel_64.S189
-rw-r--r--arch/x86/kernel/rtc.c20
-rw-r--r--arch/x86/kernel/setup.c59
-rw-r--r--arch/x86/kernel/setup_percpu.c16
-rw-r--r--arch/x86/kernel/signal.c48
-rw-r--r--arch/x86/kernel/smpboot.c138
-rw-r--r--arch/x86/kernel/syscall_table_32.S2
-rw-r--r--arch/x86/kernel/time_64.c2
-rw-r--r--arch/x86/kernel/tlb_uv.c12
-rw-r--r--arch/x86/kernel/topology.c14
-rw-r--r--arch/x86/kernel/uv_time.c393
-rw-r--r--arch/x86/kernel/visws_quirks.c2
-rw-r--r--arch/x86/kernel/vmi_32.c6
-rw-r--r--arch/x86/kernel/vmiclock_32.c1
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S21
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S101
-rw-r--r--arch/x86/kernel/vsmp_64.c12
-rw-r--r--arch/x86/kvm/Kconfig3
-rw-r--r--arch/x86/lguest/boot.c94
-rw-r--r--arch/x86/lguest/i386_head.S4
-rw-r--r--arch/x86/lib/memcpy_64.S143
-rw-r--r--arch/x86/mm/Makefile2
-rw-r--r--arch/x86/mm/highmem_32.c69
-rw-r--r--arch/x86/mm/init.c344
-rw-r--r--arch/x86/mm/init_32.c291
-rw-r--r--arch/x86/mm/init_64.c317
-rw-r--r--arch/x86/mm/iomap_32.c30
-rw-r--r--arch/x86/mm/ioremap.c52
-rw-r--r--arch/x86/mm/kmmio.c2
-rw-r--r--arch/x86/mm/memtest.c3
-rw-r--r--arch/x86/mm/mmio-mod.c19
-rw-r--r--arch/x86/mm/numa.c67
-rw-r--r--arch/x86/mm/numa_32.c5
-rw-r--r--arch/x86/mm/numa_64.c111
-rw-r--r--arch/x86/mm/pageattr.c147
-rw-r--r--arch/x86/mm/pat.c5
-rw-r--r--arch/x86/mm/pgtable_32.c2
-rw-r--r--arch/x86/mm/srat_64.c30
-rw-r--r--arch/x86/mm/tlb.c5
-rw-r--r--arch/x86/oprofile/op_model_p4.c2
-rw-r--r--arch/x86/pci/common.c4
-rw-r--r--arch/x86/pci/early.c19
-rw-r--r--arch/x86/pci/fixup.c24
-rw-r--r--arch/x86/pci/i386.c43
-rw-r--r--arch/x86/pci/legacy.c3
-rw-r--r--arch/x86/pci/mmconfig-shared.c227
-rw-r--r--arch/x86/pci/mmconfig_64.c17
-rw-r--r--arch/x86/power/Makefile5
-rw-r--r--arch/x86/power/cpu_32.c1
-rw-r--r--arch/x86/power/cpu_64.c1
-rw-r--r--arch/x86/power/hibernate_64.c1
-rw-r--r--arch/x86/xen/mmu.c7
-rw-r--r--arch/x86/xen/smp.c6
-rw-r--r--arch/xtensa/Kconfig184
-rw-r--r--arch/xtensa/Makefile15
-rw-r--r--arch/xtensa/configs/s6105_defconfig530
-rw-r--r--arch/xtensa/include/asm/cacheflush.h10
-rw-r--r--arch/xtensa/include/asm/dma.h3
-rw-r--r--arch/xtensa/include/asm/flat.h12
-rw-r--r--arch/xtensa/include/asm/ftrace.h1
-rw-r--r--arch/xtensa/include/asm/gpio.h56
-rw-r--r--arch/xtensa/include/asm/io.h9
-rw-r--r--arch/xtensa/include/asm/irq.h7
-rw-r--r--arch/xtensa/include/asm/mmu.h5
-rw-r--r--arch/xtensa/include/asm/mmu_context.h9
-rw-r--r--arch/xtensa/include/asm/nommu.h3
-rw-r--r--arch/xtensa/include/asm/nommu_context.h25
-rw-r--r--arch/xtensa/include/asm/page.h14
-rw-r--r--arch/xtensa/include/asm/pgtable.h13
-rw-r--r--arch/xtensa/include/asm/platform.h11
-rw-r--r--arch/xtensa/include/asm/processor.h8
-rw-r--r--arch/xtensa/kernel/entry.S3
-rw-r--r--arch/xtensa/kernel/head.S5
-rw-r--r--arch/xtensa/kernel/irq.c14
-rw-r--r--arch/xtensa/kernel/platform.c2
-rw-r--r--arch/xtensa/kernel/process.c2
-rw-r--r--arch/xtensa/kernel/setup.c7
-rw-r--r--arch/xtensa/kernel/time.c131
-rw-r--r--arch/xtensa/kernel/traps.c16
-rw-r--r--arch/xtensa/kernel/vectors.S4
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S3
-rw-r--r--arch/xtensa/mm/Makefile3
-rw-r--r--arch/xtensa/mm/init.c78
-rw-r--r--arch/xtensa/mm/misc.S2
-rw-r--r--arch/xtensa/mm/mmu.c70
-rw-r--r--arch/xtensa/platforms/iss/console.c29
-rw-r--r--arch/xtensa/platforms/s6105/Makefile3
-rw-r--r--arch/xtensa/platforms/s6105/device.c67
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/gpio.h27
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/hardware.h11
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/serial.h8
-rw-r--r--arch/xtensa/platforms/s6105/setup.c61
-rw-r--r--arch/xtensa/platforms/xt2000/include/platform/hardware.h1
-rw-r--r--arch/xtensa/variants/s6000/Makefile3
-rw-r--r--arch/xtensa/variants/s6000/gpio.c71
-rw-r--r--arch/xtensa/variants/s6000/include/variant/core.h431
-rw-r--r--arch/xtensa/variants/s6000/include/variant/hardware.h259
-rw-r--r--arch/xtensa/variants/s6000/include/variant/irq.h9
-rw-r--r--arch/xtensa/variants/s6000/include/variant/tie-asm.h304
-rw-r--r--arch/xtensa/variants/s6000/include/variant/tie.h191
-rw-r--r--arch/xtensa/variants/s6000/irq.c74
1147 files changed, 43686 insertions, 16420 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 550dab22daa1..dc81b34c5d82 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -6,6 +6,7 @@ config OPROFILE
6 tristate "OProfile system profiling (EXPERIMENTAL)" 6 tristate "OProfile system profiling (EXPERIMENTAL)"
7 depends on PROFILING 7 depends on PROFILING
8 depends on HAVE_OPROFILE 8 depends on HAVE_OPROFILE
9 depends on TRACING_SUPPORT
9 select TRACING 10 select TRACING
10 select RING_BUFFER 11 select RING_BUFFER
11 help 12 help
@@ -106,3 +107,5 @@ config HAVE_CLK
106 The <linux/clk.h> calls support software clock gating and 107 The <linux/clk.h> calls support software clock gating and
107 thus are a key power management tool on many systems. 108 thus are a key power management tool on many systems.
108 109
110config HAVE_DMA_API_DEBUG
111 bool
diff --git a/arch/alpha/include/asm/ftrace.h b/arch/alpha/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/alpha/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/alpha/include/asm/hardirq.h b/arch/alpha/include/asm/hardirq.h
index d953e234daa8..88971460fa6c 100644
--- a/arch/alpha/include/asm/hardirq.h
+++ b/arch/alpha/include/asm/hardirq.h
@@ -14,17 +14,4 @@ typedef struct {
14 14
15void ack_bad_irq(unsigned int irq); 15void ack_bad_irq(unsigned int irq);
16 16
17#define HARDIRQ_BITS 12
18
19/*
20 * The hardirq mask has to be large enough to have
21 * space for potentially nestable IRQ sources in the system
22 * to nest on a single CPU. On Alpha, interrupts are masked at the CPU
23 * by IPL as well as at the system level. We only have 8 IPLs (UNIX PALcode)
24 * so we really only have 8 nestable IRQs, but allow some overhead
25 */
26#if (1 << HARDIRQ_BITS) < 16
27#error HARDIRQ_BITS is too low!
28#endif
29
30#endif /* _ALPHA_HARDIRQ_H */ 17#endif /* _ALPHA_HARDIRQ_H */
diff --git a/arch/alpha/include/asm/machvec.h b/arch/alpha/include/asm/machvec.h
index fea4ea75b79d..13cd42743810 100644
--- a/arch/alpha/include/asm/machvec.h
+++ b/arch/alpha/include/asm/machvec.h
@@ -80,7 +80,7 @@ struct alpha_machine_vector
80 void (*update_irq_hw)(unsigned long, unsigned long, int); 80 void (*update_irq_hw)(unsigned long, unsigned long, int);
81 void (*ack_irq)(unsigned long); 81 void (*ack_irq)(unsigned long);
82 void (*device_interrupt)(unsigned long vector); 82 void (*device_interrupt)(unsigned long vector);
83 void (*machine_check)(u64 vector, u64 la); 83 void (*machine_check)(unsigned long vector, unsigned long la);
84 84
85 void (*smp_callin)(void); 85 void (*smp_callin)(void);
86 void (*init_arch)(void); 86 void (*init_arch)(void);
diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h
index 2a14302c17a3..cb04eaa6ba33 100644
--- a/arch/alpha/include/asm/pci.h
+++ b/arch/alpha/include/asm/pci.h
@@ -273,4 +273,18 @@ struct pci_dev *alpha_gendev_to_pci(struct device *dev);
273 273
274extern struct pci_dev *isa_bridge; 274extern struct pci_dev *isa_bridge;
275 275
276extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
277 size_t count);
278extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
279 size_t count);
280extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
281 struct vm_area_struct *vma,
282 enum pci_mmap_state mmap_state);
283extern void pci_adjust_legacy_attr(struct pci_bus *bus,
284 enum pci_mmap_state mmap_type);
285#define HAVE_PCI_LEGACY 1
286
287extern int pci_create_resource_files(struct pci_dev *dev);
288extern void pci_remove_resource_files(struct pci_dev *dev);
289
276#endif /* __ALPHA_PCI_H */ 290#endif /* __ALPHA_PCI_H */
diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h
index aeeb125f6851..e38fb95cb335 100644
--- a/arch/alpha/include/asm/spinlock.h
+++ b/arch/alpha/include/asm/spinlock.h
@@ -166,6 +166,9 @@ static inline void __raw_write_unlock(raw_rwlock_t * lock)
166 lock->lock = 0; 166 lock->lock = 0;
167} 167}
168 168
169#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
170#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
171
169#define _raw_spin_relax(lock) cpu_relax() 172#define _raw_spin_relax(lock) cpu_relax()
170#define _raw_read_relax(lock) cpu_relax() 173#define _raw_read_relax(lock) cpu_relax()
171#define _raw_write_relax(lock) cpu_relax() 174#define _raw_write_relax(lock) cpu_relax()
diff --git a/arch/alpha/include/asm/system.h b/arch/alpha/include/asm/system.h
index afe20fa58c99..5aa40cca4f23 100644
--- a/arch/alpha/include/asm/system.h
+++ b/arch/alpha/include/asm/system.h
@@ -309,518 +309,71 @@ extern int __min_ipl;
309#define tbia() __tbi(-2, /* no second argument */) 309#define tbia() __tbi(-2, /* no second argument */)
310 310
311/* 311/*
312 * Atomic exchange. 312 * Atomic exchange routines.
313 * Since it can be used to implement critical sections
314 * it must clobber "memory" (also for interrupts in UP).
315 */ 313 */
316 314
317static inline unsigned long 315#define __ASM__MB
318__xchg_u8(volatile char *m, unsigned long val) 316#define ____xchg(type, args...) __xchg ## type ## _local(args)
319{ 317#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
320 unsigned long ret, tmp, addr64; 318#include <asm/xchg.h>
321
322 __asm__ __volatile__(
323 " andnot %4,7,%3\n"
324 " insbl %1,%4,%1\n"
325 "1: ldq_l %2,0(%3)\n"
326 " extbl %2,%4,%0\n"
327 " mskbl %2,%4,%2\n"
328 " or %1,%2,%2\n"
329 " stq_c %2,0(%3)\n"
330 " beq %2,2f\n"
331#ifdef CONFIG_SMP
332 " mb\n"
333#endif
334 ".subsection 2\n"
335 "2: br 1b\n"
336 ".previous"
337 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
338 : "r" ((long)m), "1" (val) : "memory");
339
340 return ret;
341}
342
343static inline unsigned long
344__xchg_u16(volatile short *m, unsigned long val)
345{
346 unsigned long ret, tmp, addr64;
347
348 __asm__ __volatile__(
349 " andnot %4,7,%3\n"
350 " inswl %1,%4,%1\n"
351 "1: ldq_l %2,0(%3)\n"
352 " extwl %2,%4,%0\n"
353 " mskwl %2,%4,%2\n"
354 " or %1,%2,%2\n"
355 " stq_c %2,0(%3)\n"
356 " beq %2,2f\n"
357#ifdef CONFIG_SMP
358 " mb\n"
359#endif
360 ".subsection 2\n"
361 "2: br 1b\n"
362 ".previous"
363 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
364 : "r" ((long)m), "1" (val) : "memory");
365
366 return ret;
367}
368
369static inline unsigned long
370__xchg_u32(volatile int *m, unsigned long val)
371{
372 unsigned long dummy;
373
374 __asm__ __volatile__(
375 "1: ldl_l %0,%4\n"
376 " bis $31,%3,%1\n"
377 " stl_c %1,%2\n"
378 " beq %1,2f\n"
379#ifdef CONFIG_SMP
380 " mb\n"
381#endif
382 ".subsection 2\n"
383 "2: br 1b\n"
384 ".previous"
385 : "=&r" (val), "=&r" (dummy), "=m" (*m)
386 : "rI" (val), "m" (*m) : "memory");
387
388 return val;
389}
390
391static inline unsigned long
392__xchg_u64(volatile long *m, unsigned long val)
393{
394 unsigned long dummy;
395
396 __asm__ __volatile__(
397 "1: ldq_l %0,%4\n"
398 " bis $31,%3,%1\n"
399 " stq_c %1,%2\n"
400 " beq %1,2f\n"
401#ifdef CONFIG_SMP
402 " mb\n"
403#endif
404 ".subsection 2\n"
405 "2: br 1b\n"
406 ".previous"
407 : "=&r" (val), "=&r" (dummy), "=m" (*m)
408 : "rI" (val), "m" (*m) : "memory");
409 319
410 return val; 320#define xchg_local(ptr,x) \
411} 321 ({ \
412 322 __typeof__(*(ptr)) _x_ = (x); \
413/* This function doesn't exist, so you'll get a linker error 323 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
414 if something tries to do an invalid xchg(). */ 324 sizeof(*(ptr))); \
415extern void __xchg_called_with_bad_pointer(void);
416
417#define __xchg(ptr, x, size) \
418({ \
419 unsigned long __xchg__res; \
420 volatile void *__xchg__ptr = (ptr); \
421 switch (size) { \
422 case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
423 case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
424 case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
425 case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
426 default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
427 } \
428 __xchg__res; \
429})
430
431#define xchg(ptr,x) \
432 ({ \
433 __typeof__(*(ptr)) _x_ = (x); \
434 (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
435 }) 325 })
436 326
437static inline unsigned long 327#define cmpxchg_local(ptr, o, n) \
438__xchg_u8_local(volatile char *m, unsigned long val) 328 ({ \
439{ 329 __typeof__(*(ptr)) _o_ = (o); \
440 unsigned long ret, tmp, addr64; 330 __typeof__(*(ptr)) _n_ = (n); \
441 331 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
442 __asm__ __volatile__( 332 (unsigned long)_n_, \
443 " andnot %4,7,%3\n" 333 sizeof(*(ptr))); \
444 " insbl %1,%4,%1\n"
445 "1: ldq_l %2,0(%3)\n"
446 " extbl %2,%4,%0\n"
447 " mskbl %2,%4,%2\n"
448 " or %1,%2,%2\n"
449 " stq_c %2,0(%3)\n"
450 " beq %2,2f\n"
451 ".subsection 2\n"
452 "2: br 1b\n"
453 ".previous"
454 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
455 : "r" ((long)m), "1" (val) : "memory");
456
457 return ret;
458}
459
460static inline unsigned long
461__xchg_u16_local(volatile short *m, unsigned long val)
462{
463 unsigned long ret, tmp, addr64;
464
465 __asm__ __volatile__(
466 " andnot %4,7,%3\n"
467 " inswl %1,%4,%1\n"
468 "1: ldq_l %2,0(%3)\n"
469 " extwl %2,%4,%0\n"
470 " mskwl %2,%4,%2\n"
471 " or %1,%2,%2\n"
472 " stq_c %2,0(%3)\n"
473 " beq %2,2f\n"
474 ".subsection 2\n"
475 "2: br 1b\n"
476 ".previous"
477 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
478 : "r" ((long)m), "1" (val) : "memory");
479
480 return ret;
481}
482
483static inline unsigned long
484__xchg_u32_local(volatile int *m, unsigned long val)
485{
486 unsigned long dummy;
487
488 __asm__ __volatile__(
489 "1: ldl_l %0,%4\n"
490 " bis $31,%3,%1\n"
491 " stl_c %1,%2\n"
492 " beq %1,2f\n"
493 ".subsection 2\n"
494 "2: br 1b\n"
495 ".previous"
496 : "=&r" (val), "=&r" (dummy), "=m" (*m)
497 : "rI" (val), "m" (*m) : "memory");
498
499 return val;
500}
501
502static inline unsigned long
503__xchg_u64_local(volatile long *m, unsigned long val)
504{
505 unsigned long dummy;
506
507 __asm__ __volatile__(
508 "1: ldq_l %0,%4\n"
509 " bis $31,%3,%1\n"
510 " stq_c %1,%2\n"
511 " beq %1,2f\n"
512 ".subsection 2\n"
513 "2: br 1b\n"
514 ".previous"
515 : "=&r" (val), "=&r" (dummy), "=m" (*m)
516 : "rI" (val), "m" (*m) : "memory");
517
518 return val;
519}
520
521#define __xchg_local(ptr, x, size) \
522({ \
523 unsigned long __xchg__res; \
524 volatile void *__xchg__ptr = (ptr); \
525 switch (size) { \
526 case 1: __xchg__res = __xchg_u8_local(__xchg__ptr, x); break; \
527 case 2: __xchg__res = __xchg_u16_local(__xchg__ptr, x); break; \
528 case 4: __xchg__res = __xchg_u32_local(__xchg__ptr, x); break; \
529 case 8: __xchg__res = __xchg_u64_local(__xchg__ptr, x); break; \
530 default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
531 } \
532 __xchg__res; \
533})
534
535#define xchg_local(ptr,x) \
536 ({ \
537 __typeof__(*(ptr)) _x_ = (x); \
538 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
539 sizeof(*(ptr))); \
540 }) 334 })
541 335
542/* 336#define cmpxchg64_local(ptr, o, n) \
543 * Atomic compare and exchange. Compare OLD with MEM, if identical, 337 ({ \
544 * store NEW in MEM. Return the initial value in MEM. Success is 338 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
545 * indicated by comparing RETURN with OLD. 339 cmpxchg_local((ptr), (o), (n)); \
546 * 340 })
547 * The memory barrier should be placed in SMP only when we actually
548 * make the change. If we don't change anything (so if the returned
549 * prev is equal to old) then we aren't acquiring anything new and
550 * we don't need any memory barrier as far I can tell.
551 */
552
553#define __HAVE_ARCH_CMPXCHG 1
554
555static inline unsigned long
556__cmpxchg_u8(volatile char *m, long old, long new)
557{
558 unsigned long prev, tmp, cmp, addr64;
559
560 __asm__ __volatile__(
561 " andnot %5,7,%4\n"
562 " insbl %1,%5,%1\n"
563 "1: ldq_l %2,0(%4)\n"
564 " extbl %2,%5,%0\n"
565 " cmpeq %0,%6,%3\n"
566 " beq %3,2f\n"
567 " mskbl %2,%5,%2\n"
568 " or %1,%2,%2\n"
569 " stq_c %2,0(%4)\n"
570 " beq %2,3f\n"
571#ifdef CONFIG_SMP
572 " mb\n"
573#endif
574 "2:\n"
575 ".subsection 2\n"
576 "3: br 1b\n"
577 ".previous"
578 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
579 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
580
581 return prev;
582}
583
584static inline unsigned long
585__cmpxchg_u16(volatile short *m, long old, long new)
586{
587 unsigned long prev, tmp, cmp, addr64;
588
589 __asm__ __volatile__(
590 " andnot %5,7,%4\n"
591 " inswl %1,%5,%1\n"
592 "1: ldq_l %2,0(%4)\n"
593 " extwl %2,%5,%0\n"
594 " cmpeq %0,%6,%3\n"
595 " beq %3,2f\n"
596 " mskwl %2,%5,%2\n"
597 " or %1,%2,%2\n"
598 " stq_c %2,0(%4)\n"
599 " beq %2,3f\n"
600#ifdef CONFIG_SMP
601 " mb\n"
602#endif
603 "2:\n"
604 ".subsection 2\n"
605 "3: br 1b\n"
606 ".previous"
607 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
608 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
609
610 return prev;
611}
612
613static inline unsigned long
614__cmpxchg_u32(volatile int *m, int old, int new)
615{
616 unsigned long prev, cmp;
617
618 __asm__ __volatile__(
619 "1: ldl_l %0,%5\n"
620 " cmpeq %0,%3,%1\n"
621 " beq %1,2f\n"
622 " mov %4,%1\n"
623 " stl_c %1,%2\n"
624 " beq %1,3f\n"
625#ifdef CONFIG_SMP
626 " mb\n"
627#endif
628 "2:\n"
629 ".subsection 2\n"
630 "3: br 1b\n"
631 ".previous"
632 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
633 : "r"((long) old), "r"(new), "m"(*m) : "memory");
634
635 return prev;
636}
637 341
638static inline unsigned long
639__cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
640{
641 unsigned long prev, cmp;
642
643 __asm__ __volatile__(
644 "1: ldq_l %0,%5\n"
645 " cmpeq %0,%3,%1\n"
646 " beq %1,2f\n"
647 " mov %4,%1\n"
648 " stq_c %1,%2\n"
649 " beq %1,3f\n"
650#ifdef CONFIG_SMP 342#ifdef CONFIG_SMP
651 " mb\n" 343#undef __ASM__MB
344#define __ASM__MB "\tmb\n"
652#endif 345#endif
653 "2:\n" 346#undef ____xchg
654 ".subsection 2\n" 347#undef ____cmpxchg
655 "3: br 1b\n" 348#define ____xchg(type, args...) __xchg ##type(args)
656 ".previous" 349#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
657 : "=&r"(prev), "=&r"(cmp), "=m"(*m) 350#include <asm/xchg.h>
658 : "r"((long) old), "r"(new), "m"(*m) : "memory"); 351
659 352#define xchg(ptr,x) \
660 return prev; 353 ({ \
661} 354 __typeof__(*(ptr)) _x_ = (x); \
662 355 (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
663/* This function doesn't exist, so you'll get a linker error 356 sizeof(*(ptr))); \
664 if something tries to do an invalid cmpxchg(). */
665extern void __cmpxchg_called_with_bad_pointer(void);
666
667static __always_inline unsigned long
668__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
669{
670 switch (size) {
671 case 1:
672 return __cmpxchg_u8(ptr, old, new);
673 case 2:
674 return __cmpxchg_u16(ptr, old, new);
675 case 4:
676 return __cmpxchg_u32(ptr, old, new);
677 case 8:
678 return __cmpxchg_u64(ptr, old, new);
679 }
680 __cmpxchg_called_with_bad_pointer();
681 return old;
682}
683
684#define cmpxchg(ptr, o, n) \
685 ({ \
686 __typeof__(*(ptr)) _o_ = (o); \
687 __typeof__(*(ptr)) _n_ = (n); \
688 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
689 (unsigned long)_n_, sizeof(*(ptr))); \
690 }) 357 })
691#define cmpxchg64(ptr, o, n) \
692 ({ \
693 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
694 cmpxchg((ptr), (o), (n)); \
695 })
696
697static inline unsigned long
698__cmpxchg_u8_local(volatile char *m, long old, long new)
699{
700 unsigned long prev, tmp, cmp, addr64;
701
702 __asm__ __volatile__(
703 " andnot %5,7,%4\n"
704 " insbl %1,%5,%1\n"
705 "1: ldq_l %2,0(%4)\n"
706 " extbl %2,%5,%0\n"
707 " cmpeq %0,%6,%3\n"
708 " beq %3,2f\n"
709 " mskbl %2,%5,%2\n"
710 " or %1,%2,%2\n"
711 " stq_c %2,0(%4)\n"
712 " beq %2,3f\n"
713 "2:\n"
714 ".subsection 2\n"
715 "3: br 1b\n"
716 ".previous"
717 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
718 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
719
720 return prev;
721}
722
723static inline unsigned long
724__cmpxchg_u16_local(volatile short *m, long old, long new)
725{
726 unsigned long prev, tmp, cmp, addr64;
727
728 __asm__ __volatile__(
729 " andnot %5,7,%4\n"
730 " inswl %1,%5,%1\n"
731 "1: ldq_l %2,0(%4)\n"
732 " extwl %2,%5,%0\n"
733 " cmpeq %0,%6,%3\n"
734 " beq %3,2f\n"
735 " mskwl %2,%5,%2\n"
736 " or %1,%2,%2\n"
737 " stq_c %2,0(%4)\n"
738 " beq %2,3f\n"
739 "2:\n"
740 ".subsection 2\n"
741 "3: br 1b\n"
742 ".previous"
743 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
744 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
745
746 return prev;
747}
748
749static inline unsigned long
750__cmpxchg_u32_local(volatile int *m, int old, int new)
751{
752 unsigned long prev, cmp;
753
754 __asm__ __volatile__(
755 "1: ldl_l %0,%5\n"
756 " cmpeq %0,%3,%1\n"
757 " beq %1,2f\n"
758 " mov %4,%1\n"
759 " stl_c %1,%2\n"
760 " beq %1,3f\n"
761 "2:\n"
762 ".subsection 2\n"
763 "3: br 1b\n"
764 ".previous"
765 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
766 : "r"((long) old), "r"(new), "m"(*m) : "memory");
767
768 return prev;
769}
770
771static inline unsigned long
772__cmpxchg_u64_local(volatile long *m, unsigned long old, unsigned long new)
773{
774 unsigned long prev, cmp;
775
776 __asm__ __volatile__(
777 "1: ldq_l %0,%5\n"
778 " cmpeq %0,%3,%1\n"
779 " beq %1,2f\n"
780 " mov %4,%1\n"
781 " stq_c %1,%2\n"
782 " beq %1,3f\n"
783 "2:\n"
784 ".subsection 2\n"
785 "3: br 1b\n"
786 ".previous"
787 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
788 : "r"((long) old), "r"(new), "m"(*m) : "memory");
789
790 return prev;
791}
792
793static __always_inline unsigned long
794__cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
795 int size)
796{
797 switch (size) {
798 case 1:
799 return __cmpxchg_u8_local(ptr, old, new);
800 case 2:
801 return __cmpxchg_u16_local(ptr, old, new);
802 case 4:
803 return __cmpxchg_u32_local(ptr, old, new);
804 case 8:
805 return __cmpxchg_u64_local(ptr, old, new);
806 }
807 __cmpxchg_called_with_bad_pointer();
808 return old;
809}
810 358
811#define cmpxchg_local(ptr, o, n) \ 359#define cmpxchg(ptr, o, n) \
812 ({ \ 360 ({ \
813 __typeof__(*(ptr)) _o_ = (o); \ 361 __typeof__(*(ptr)) _o_ = (o); \
814 __typeof__(*(ptr)) _n_ = (n); \ 362 __typeof__(*(ptr)) _n_ = (n); \
815 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \ 363 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
816 (unsigned long)_n_, sizeof(*(ptr))); \ 364 (unsigned long)_n_, sizeof(*(ptr)));\
817 }) 365 })
818#define cmpxchg64_local(ptr, o, n) \ 366
819 ({ \ 367#define cmpxchg64(ptr, o, n) \
820 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ 368 ({ \
821 cmpxchg_local((ptr), (o), (n)); \ 369 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
370 cmpxchg((ptr), (o), (n)); \
822 }) 371 })
823 372
373#undef __ASM__MB
374#undef ____cmpxchg
375
376#define __HAVE_ARCH_CMPXCHG 1
824 377
825#endif /* __ASSEMBLY__ */ 378#endif /* __ASSEMBLY__ */
826 379
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h
index c1541353ccef..f072f344497e 100644
--- a/arch/alpha/include/asm/types.h
+++ b/arch/alpha/include/asm/types.h
@@ -8,7 +8,12 @@
8 * not a major issue. However, for interoperability, libraries still 8 * not a major issue. However, for interoperability, libraries still
9 * need to be careful to avoid a name clashes. 9 * need to be careful to avoid a name clashes.
10 */ 10 */
11
12#ifdef __KERNEL__
13#include <asm-generic/int-ll64.h>
14#else
11#include <asm-generic/int-l64.h> 15#include <asm-generic/int-l64.h>
16#endif
12 17
13#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
14 19
diff --git a/arch/alpha/include/asm/uaccess.h b/arch/alpha/include/asm/uaccess.h
index 22de3b434a22..163f3053001c 100644
--- a/arch/alpha/include/asm/uaccess.h
+++ b/arch/alpha/include/asm/uaccess.h
@@ -498,13 +498,13 @@ struct exception_table_entry
498}; 498};
499 499
500/* Returns the new pc */ 500/* Returns the new pc */
501#define fixup_exception(map_reg, fixup, pc) \ 501#define fixup_exception(map_reg, _fixup, pc) \
502({ \ 502({ \
503 if ((fixup)->fixup.bits.valreg != 31) \ 503 if ((_fixup)->fixup.bits.valreg != 31) \
504 map_reg((fixup)->fixup.bits.valreg) = 0; \ 504 map_reg((_fixup)->fixup.bits.valreg) = 0; \
505 if ((fixup)->fixup.bits.errreg != 31) \ 505 if ((_fixup)->fixup.bits.errreg != 31) \
506 map_reg((fixup)->fixup.bits.errreg) = -EFAULT; \ 506 map_reg((_fixup)->fixup.bits.errreg) = -EFAULT; \
507 (pc) + (fixup)->fixup.bits.nextinsn; \ 507 (pc) + (_fixup)->fixup.bits.nextinsn; \
508}) 508})
509 509
510 510
diff --git a/arch/alpha/include/asm/xchg.h b/arch/alpha/include/asm/xchg.h
new file mode 100644
index 000000000000..beba1b803e0d
--- /dev/null
+++ b/arch/alpha/include/asm/xchg.h
@@ -0,0 +1,258 @@
1#ifndef __ALPHA_SYSTEM_H
2#error Do not include xchg.h directly!
3#else
4/*
5 * xchg/xchg_local and cmpxchg/cmpxchg_local share the same code
6 * except that local version do not have the expensive memory barrier.
7 * So this file is included twice from asm/system.h.
8 */
9
10/*
11 * Atomic exchange.
12 * Since it can be used to implement critical sections
13 * it must clobber "memory" (also for interrupts in UP).
14 */
15
16static inline unsigned long
17____xchg(_u8, volatile char *m, unsigned long val)
18{
19 unsigned long ret, tmp, addr64;
20
21 __asm__ __volatile__(
22 " andnot %4,7,%3\n"
23 " insbl %1,%4,%1\n"
24 "1: ldq_l %2,0(%3)\n"
25 " extbl %2,%4,%0\n"
26 " mskbl %2,%4,%2\n"
27 " or %1,%2,%2\n"
28 " stq_c %2,0(%3)\n"
29 " beq %2,2f\n"
30 __ASM__MB
31 ".subsection 2\n"
32 "2: br 1b\n"
33 ".previous"
34 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
35 : "r" ((long)m), "1" (val) : "memory");
36
37 return ret;
38}
39
40static inline unsigned long
41____xchg(_u16, volatile short *m, unsigned long val)
42{
43 unsigned long ret, tmp, addr64;
44
45 __asm__ __volatile__(
46 " andnot %4,7,%3\n"
47 " inswl %1,%4,%1\n"
48 "1: ldq_l %2,0(%3)\n"
49 " extwl %2,%4,%0\n"
50 " mskwl %2,%4,%2\n"
51 " or %1,%2,%2\n"
52 " stq_c %2,0(%3)\n"
53 " beq %2,2f\n"
54 __ASM__MB
55 ".subsection 2\n"
56 "2: br 1b\n"
57 ".previous"
58 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
59 : "r" ((long)m), "1" (val) : "memory");
60
61 return ret;
62}
63
64static inline unsigned long
65____xchg(_u32, volatile int *m, unsigned long val)
66{
67 unsigned long dummy;
68
69 __asm__ __volatile__(
70 "1: ldl_l %0,%4\n"
71 " bis $31,%3,%1\n"
72 " stl_c %1,%2\n"
73 " beq %1,2f\n"
74 __ASM__MB
75 ".subsection 2\n"
76 "2: br 1b\n"
77 ".previous"
78 : "=&r" (val), "=&r" (dummy), "=m" (*m)
79 : "rI" (val), "m" (*m) : "memory");
80
81 return val;
82}
83
84static inline unsigned long
85____xchg(_u64, volatile long *m, unsigned long val)
86{
87 unsigned long dummy;
88
89 __asm__ __volatile__(
90 "1: ldq_l %0,%4\n"
91 " bis $31,%3,%1\n"
92 " stq_c %1,%2\n"
93 " beq %1,2f\n"
94 __ASM__MB
95 ".subsection 2\n"
96 "2: br 1b\n"
97 ".previous"
98 : "=&r" (val), "=&r" (dummy), "=m" (*m)
99 : "rI" (val), "m" (*m) : "memory");
100
101 return val;
102}
103
104/* This function doesn't exist, so you'll get a linker error
105 if something tries to do an invalid xchg(). */
106extern void __xchg_called_with_bad_pointer(void);
107
108static __always_inline unsigned long
109____xchg(, volatile void *ptr, unsigned long x, int size)
110{
111 switch (size) {
112 case 1:
113 return ____xchg(_u8, ptr, x);
114 case 2:
115 return ____xchg(_u16, ptr, x);
116 case 4:
117 return ____xchg(_u32, ptr, x);
118 case 8:
119 return ____xchg(_u64, ptr, x);
120 }
121 __xchg_called_with_bad_pointer();
122 return x;
123}
124
125/*
126 * Atomic compare and exchange. Compare OLD with MEM, if identical,
127 * store NEW in MEM. Return the initial value in MEM. Success is
128 * indicated by comparing RETURN with OLD.
129 *
130 * The memory barrier should be placed in SMP only when we actually
131 * make the change. If we don't change anything (so if the returned
132 * prev is equal to old) then we aren't acquiring anything new and
133 * we don't need any memory barrier as far I can tell.
134 */
135
136static inline unsigned long
137____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new)
138{
139 unsigned long prev, tmp, cmp, addr64;
140
141 __asm__ __volatile__(
142 " andnot %5,7,%4\n"
143 " insbl %1,%5,%1\n"
144 "1: ldq_l %2,0(%4)\n"
145 " extbl %2,%5,%0\n"
146 " cmpeq %0,%6,%3\n"
147 " beq %3,2f\n"
148 " mskbl %2,%5,%2\n"
149 " or %1,%2,%2\n"
150 " stq_c %2,0(%4)\n"
151 " beq %2,3f\n"
152 __ASM__MB
153 "2:\n"
154 ".subsection 2\n"
155 "3: br 1b\n"
156 ".previous"
157 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
158 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
159
160 return prev;
161}
162
163static inline unsigned long
164____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new)
165{
166 unsigned long prev, tmp, cmp, addr64;
167
168 __asm__ __volatile__(
169 " andnot %5,7,%4\n"
170 " inswl %1,%5,%1\n"
171 "1: ldq_l %2,0(%4)\n"
172 " extwl %2,%5,%0\n"
173 " cmpeq %0,%6,%3\n"
174 " beq %3,2f\n"
175 " mskwl %2,%5,%2\n"
176 " or %1,%2,%2\n"
177 " stq_c %2,0(%4)\n"
178 " beq %2,3f\n"
179 __ASM__MB
180 "2:\n"
181 ".subsection 2\n"
182 "3: br 1b\n"
183 ".previous"
184 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
185 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
186
187 return prev;
188}
189
190static inline unsigned long
191____cmpxchg(_u32, volatile int *m, int old, int new)
192{
193 unsigned long prev, cmp;
194
195 __asm__ __volatile__(
196 "1: ldl_l %0,%5\n"
197 " cmpeq %0,%3,%1\n"
198 " beq %1,2f\n"
199 " mov %4,%1\n"
200 " stl_c %1,%2\n"
201 " beq %1,3f\n"
202 __ASM__MB
203 "2:\n"
204 ".subsection 2\n"
205 "3: br 1b\n"
206 ".previous"
207 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
208 : "r"((long) old), "r"(new), "m"(*m) : "memory");
209
210 return prev;
211}
212
213static inline unsigned long
214____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new)
215{
216 unsigned long prev, cmp;
217
218 __asm__ __volatile__(
219 "1: ldq_l %0,%5\n"
220 " cmpeq %0,%3,%1\n"
221 " beq %1,2f\n"
222 " mov %4,%1\n"
223 " stq_c %1,%2\n"
224 " beq %1,3f\n"
225 __ASM__MB
226 "2:\n"
227 ".subsection 2\n"
228 "3: br 1b\n"
229 ".previous"
230 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
231 : "r"((long) old), "r"(new), "m"(*m) : "memory");
232
233 return prev;
234}
235
236/* This function doesn't exist, so you'll get a linker error
237 if something tries to do an invalid cmpxchg(). */
238extern void __cmpxchg_called_with_bad_pointer(void);
239
240static __always_inline unsigned long
241____cmpxchg(, volatile void *ptr, unsigned long old, unsigned long new,
242 int size)
243{
244 switch (size) {
245 case 1:
246 return ____cmpxchg(_u8, ptr, old, new);
247 case 2:
248 return ____cmpxchg(_u16, ptr, old, new);
249 case 4:
250 return ____cmpxchg(_u32, ptr, old, new);
251 case 8:
252 return ____cmpxchg(_u64, ptr, old, new);
253 }
254 __cmpxchg_called_with_bad_pointer();
255 return old;
256}
257
258#endif
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index b4697759a123..a427538252f8 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -12,7 +12,7 @@ obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
12 12
13obj-$(CONFIG_VGA_HOSE) += console.o 13obj-$(CONFIG_VGA_HOSE) += console.o
14obj-$(CONFIG_SMP) += smp.o 14obj-$(CONFIG_SMP) += smp.o
15obj-$(CONFIG_PCI) += pci.o pci_iommu.o 15obj-$(CONFIG_PCI) += pci.o pci_iommu.o pci-sysfs.o
16obj-$(CONFIG_SRM_ENV) += srm_env.o 16obj-$(CONFIG_SRM_ENV) += srm_env.o
17obj-$(CONFIG_MODULES) += module.o 17obj-$(CONFIG_MODULES) += module.o
18 18
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
index 11aee012a8ae..985e5c1681ac 100644
--- a/arch/alpha/kernel/err_ev6.c
+++ b/arch/alpha/kernel/err_ev6.c
@@ -157,8 +157,8 @@ ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
157 err_print_prefix, 157 err_print_prefix,
158 streamname[stream], bitsname[bits], sourcename[source]); 158 streamname[stream], bitsname[bits], sourcename[source]);
159 159
160 printk("%s Address: 0x%016lx\n" 160 printk("%s Address: 0x%016llx\n"
161 " Syndrome[upper.lower]: %02lx.%02lx\n", 161 " Syndrome[upper.lower]: %02llx.%02llx\n",
162 err_print_prefix, 162 err_print_prefix,
163 c_addr, 163 c_addr,
164 c2_syn, c1_syn); 164 c2_syn, c1_syn);
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c
index 68cd493f54c5..73770c6ca013 100644
--- a/arch/alpha/kernel/err_ev7.c
+++ b/arch/alpha/kernel/err_ev7.c
@@ -246,13 +246,13 @@ ev7_process_pal_subpacket(struct el_subpacket *header)
246 246
247 switch(header->type) { 247 switch(header->type) {
248 case EL_TYPE__PAL__LOGOUT_FRAME: 248 case EL_TYPE__PAL__LOGOUT_FRAME:
249 printk("%s*** MCHK occurred on LPID %ld (RBOX %lx)\n", 249 printk("%s*** MCHK occurred on LPID %ld (RBOX %llx)\n",
250 err_print_prefix, 250 err_print_prefix,
251 packet->by_type.logout.whami, 251 packet->by_type.logout.whami,
252 packet->by_type.logout.rbox_whami); 252 packet->by_type.logout.rbox_whami);
253 el_print_timestamp(&packet->by_type.logout.timestamp); 253 el_print_timestamp(&packet->by_type.logout.timestamp);
254 printk("%s EXC_ADDR: %016lx\n" 254 printk("%s EXC_ADDR: %016llx\n"
255 " HALT_CODE: %lx\n", 255 " HALT_CODE: %llx\n",
256 err_print_prefix, 256 err_print_prefix,
257 packet->by_type.logout.exc_addr, 257 packet->by_type.logout.exc_addr,
258 packet->by_type.logout.halt_code); 258 packet->by_type.logout.halt_code);
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index 413bf37eb094..6bfd243efba3 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -129,7 +129,7 @@ marvel_print_po7_crrct_sym(u64 crrct_sym)
129 129
130 130
131 printk("%s Correctable Error Symptoms:\n" 131 printk("%s Correctable Error Symptoms:\n"
132 "%s Syndrome: 0x%lx\n", 132 "%s Syndrome: 0x%llx\n",
133 err_print_prefix, 133 err_print_prefix,
134 err_print_prefix, EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__SYN)); 134 err_print_prefix, EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__SYN));
135 marvel_print_err_cyc(EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__ERR_CYC)); 135 marvel_print_err_cyc(EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__ERR_CYC));
@@ -186,7 +186,7 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
186 uncrr_sym &= valid_mask; 186 uncrr_sym &= valid_mask;
187 187
188 if (EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__SYN)) 188 if (EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__SYN))
189 printk("%s Syndrome: 0x%lx\n", 189 printk("%s Syndrome: 0x%llx\n",
190 err_print_prefix, 190 err_print_prefix,
191 EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__SYN)); 191 EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__SYN));
192 192
@@ -307,7 +307,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
307 sprintf(opcode_str, "BlkIO"); 307 sprintf(opcode_str, "BlkIO");
308 break; 308 break;
309 default: 309 default:
310 sprintf(opcode_str, "0x%lx\n", 310 sprintf(opcode_str, "0x%llx\n",
311 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE)); 311 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE));
312 break; 312 break;
313 } 313 }
@@ -321,7 +321,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
321 opcode_str); 321 opcode_str);
322 322
323 if (0xC5 != EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE)) 323 if (0xC5 != EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE))
324 printk("%s Packet Offset 0x%08lx\n", 324 printk("%s Packet Offset 0x%08llx\n",
325 err_print_prefix, 325 err_print_prefix,
326 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_PKT_OFF)); 326 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_PKT_OFF));
327} 327}
@@ -480,8 +480,8 @@ marvel_print_po7_err_sum(struct ev7_pal_io_subpacket *io)
480 printk("%s Lost Error\n", err_print_prefix); 480 printk("%s Lost Error\n", err_print_prefix);
481 481
482 printk("%s Failing Packet:\n" 482 printk("%s Failing Packet:\n"
483 "%s Cycle 1: %016lx\n" 483 "%s Cycle 1: %016llx\n"
484 "%s Cycle 2: %016lx\n", 484 "%s Cycle 2: %016llx\n",
485 err_print_prefix, 485 err_print_prefix,
486 err_print_prefix, io->po7_err_pkt0, 486 err_print_prefix, io->po7_err_pkt0,
487 err_print_prefix, io->po7_err_pkt1); 487 err_print_prefix, io->po7_err_pkt1);
@@ -515,9 +515,9 @@ marvel_print_pox_tlb_err(u64 tlb_err)
515 if (!(tlb_err & IO7__POX_TLBERR__ERR_VALID)) 515 if (!(tlb_err & IO7__POX_TLBERR__ERR_VALID))
516 return; 516 return;
517 517
518 printk("%s TLB Error on index 0x%lx:\n" 518 printk("%s TLB Error on index 0x%llx:\n"
519 "%s - %s\n" 519 "%s - %s\n"
520 "%s - Addr: 0x%016lx\n", 520 "%s - Addr: 0x%016llx\n",
521 err_print_prefix, 521 err_print_prefix,
522 EXTRACT(tlb_err, IO7__POX_TLBERR__ERR_TLB_PTR), 522 EXTRACT(tlb_err, IO7__POX_TLBERR__ERR_TLB_PTR),
523 err_print_prefix, 523 err_print_prefix,
@@ -579,7 +579,7 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
579 sprintf(message, "Uncorrectable Split Write Data Error"); 579 sprintf(message, "Uncorrectable Split Write Data Error");
580 break; 580 break;
581 default: 581 default:
582 sprintf(message, "%08lx\n", 582 sprintf(message, "%08llx\n",
583 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__MESSAGE)); 583 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__MESSAGE));
584 break; 584 break;
585 } 585 }
@@ -620,9 +620,9 @@ marvel_print_pox_trans_sum(u64 trans_sum)
620 return; 620 return;
621 621
622 printk("%s Transaction Summary:\n" 622 printk("%s Transaction Summary:\n"
623 "%s Command: 0x%lx - %s\n" 623 "%s Command: 0x%llx - %s\n"
624 "%s Address: 0x%016lx%s\n" 624 "%s Address: 0x%016llx%s\n"
625 "%s PCI-X Master Slot: 0x%lx\n", 625 "%s PCI-X Master Slot: 0x%llx\n",
626 err_print_prefix, 626 err_print_prefix,
627 err_print_prefix, 627 err_print_prefix,
628 EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_CMD), 628 EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_CMD),
@@ -964,12 +964,12 @@ marvel_process_io_error(struct ev7_lf_subpackets *lf_subpackets, int print)
964 964
965#if 0 965#if 0
966 printk("%s PORT 7 ERROR:\n" 966 printk("%s PORT 7 ERROR:\n"
967 "%s PO7_ERROR_SUM: %016lx\n" 967 "%s PO7_ERROR_SUM: %016llx\n"
968 "%s PO7_UNCRR_SYM: %016lx\n" 968 "%s PO7_UNCRR_SYM: %016llx\n"
969 "%s PO7_CRRCT_SYM: %016lx\n" 969 "%s PO7_CRRCT_SYM: %016llx\n"
970 "%s PO7_UGBGE_SYM: %016lx\n" 970 "%s PO7_UGBGE_SYM: %016llx\n"
971 "%s PO7_ERR_PKT0: %016lx\n" 971 "%s PO7_ERR_PKT0: %016llx\n"
972 "%s PO7_ERR_PKT1: %016lx\n", 972 "%s PO7_ERR_PKT1: %016llx\n",
973 err_print_prefix, 973 err_print_prefix,
974 err_print_prefix, io->po7_error_sum, 974 err_print_prefix, io->po7_error_sum,
975 err_print_prefix, io->po7_uncrr_sym, 975 err_print_prefix, io->po7_uncrr_sym,
@@ -987,12 +987,12 @@ marvel_process_io_error(struct ev7_lf_subpackets *lf_subpackets, int print)
987 if (!MARVEL_IO_ERR_VALID(io->ports[i].pox_err_sum)) 987 if (!MARVEL_IO_ERR_VALID(io->ports[i].pox_err_sum))
988 continue; 988 continue;
989 989
990 printk("%s PID %u PORT %d POx_ERR_SUM: %016lx\n", 990 printk("%s PID %u PORT %d POx_ERR_SUM: %016llx\n",
991 err_print_prefix, 991 err_print_prefix,
992 lf_subpackets->io_pid, i, io->ports[i].pox_err_sum); 992 lf_subpackets->io_pid, i, io->ports[i].pox_err_sum);
993 marvel_print_pox_err(io->ports[i].pox_err_sum, &io->ports[i]); 993 marvel_print_pox_err(io->ports[i].pox_err_sum, &io->ports[i]);
994 994
995 printk("%s [ POx_FIRST_ERR: %016lx ]\n", 995 printk("%s [ POx_FIRST_ERR: %016llx ]\n",
996 err_print_prefix, io->ports[i].pox_first_err); 996 err_print_prefix, io->ports[i].pox_first_err);
997 marvel_print_pox_err(io->ports[i].pox_first_err, 997 marvel_print_pox_err(io->ports[i].pox_first_err,
998 &io->ports[i]); 998 &io->ports[i]);
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
index 257449ed15ef..c7e28a88d6e3 100644
--- a/arch/alpha/kernel/err_titan.c
+++ b/arch/alpha/kernel/err_titan.c
@@ -107,12 +107,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
107 if (!print) 107 if (!print)
108 return status; 108 return status;
109 109
110 printk("%s PChip %d SERROR: %016lx\n", 110 printk("%s PChip %d SERROR: %016llx\n",
111 err_print_prefix, which, serror); 111 err_print_prefix, which, serror);
112 if (serror & TITAN__PCHIP_SERROR__ECCMASK) { 112 if (serror & TITAN__PCHIP_SERROR__ECCMASK) {
113 printk("%s %sorrectable ECC Error:\n" 113 printk("%s %sorrectable ECC Error:\n"
114 " Source: %-6s Command: %-8s Syndrome: 0x%08x\n" 114 " Source: %-6s Command: %-8s Syndrome: 0x%08x\n"
115 " Address: 0x%lx\n", 115 " Address: 0x%llx\n",
116 err_print_prefix, 116 err_print_prefix,
117 (serror & TITAN__PCHIP_SERROR__UECC) ? "Unc" : "C", 117 (serror & TITAN__PCHIP_SERROR__UECC) ? "Unc" : "C",
118 serror_src[EXTRACT(serror, TITAN__PCHIP_SERROR__SRC)], 118 serror_src[EXTRACT(serror, TITAN__PCHIP_SERROR__SRC)],
@@ -223,7 +223,7 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
223 if (!print) 223 if (!print)
224 return status; 224 return status;
225 225
226 printk("%s PChip %d %cPERROR: %016lx\n", 226 printk("%s PChip %d %cPERROR: %016llx\n",
227 err_print_prefix, which, 227 err_print_prefix, which,
228 port ? 'A' : 'G', perror); 228 port ? 'A' : 'G', perror);
229 if (perror & TITAN__PCHIP_PERROR__IPTPW) 229 if (perror & TITAN__PCHIP_PERROR__IPTPW)
@@ -316,7 +316,7 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
316 addr = EXTRACT(agperror, TITAN__PCHIP_AGPERROR__ADDR) << 3; 316 addr = EXTRACT(agperror, TITAN__PCHIP_AGPERROR__ADDR) << 3;
317 len = EXTRACT(agperror, TITAN__PCHIP_AGPERROR__LEN); 317 len = EXTRACT(agperror, TITAN__PCHIP_AGPERROR__LEN);
318 318
319 printk("%s PChip %d AGPERROR: %016lx\n", err_print_prefix, 319 printk("%s PChip %d AGPERROR: %016llx\n", err_print_prefix,
320 which, agperror); 320 which, agperror);
321 if (agperror & TITAN__PCHIP_AGPERROR__NOWINDOW) 321 if (agperror & TITAN__PCHIP_AGPERROR__NOWINDOW)
322 printk("%s No Window\n", err_print_prefix); 322 printk("%s No Window\n", err_print_prefix);
@@ -597,16 +597,16 @@ privateer_process_680_frame(struct el_common *mchk_header, int print)
597 return status; 597 return status;
598 598
599 /* TODO - decode instead of just dumping... */ 599 /* TODO - decode instead of just dumping... */
600 printk("%s Summary Flags: %016lx\n" 600 printk("%s Summary Flags: %016llx\n"
601 " CChip DIRx: %016lx\n" 601 " CChip DIRx: %016llx\n"
602 " System Management IR: %016lx\n" 602 " System Management IR: %016llx\n"
603 " CPU IR: %016lx\n" 603 " CPU IR: %016llx\n"
604 " Power Supply IR: %016lx\n" 604 " Power Supply IR: %016llx\n"
605 " LM78 Fault Status: %016lx\n" 605 " LM78 Fault Status: %016llx\n"
606 " System Doors: %016lx\n" 606 " System Doors: %016llx\n"
607 " Temperature Warning: %016lx\n" 607 " Temperature Warning: %016llx\n"
608 " Fan Control: %016lx\n" 608 " Fan Control: %016llx\n"
609 " Fatal Power Down Code: %016lx\n", 609 " Fatal Power Down Code: %016llx\n",
610 err_print_prefix, 610 err_print_prefix,
611 emchk->summary, 611 emchk->summary,
612 emchk->c_dirx, 612 emchk->c_dirx,
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c
new file mode 100644
index 000000000000..6ea822e7f724
--- /dev/null
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -0,0 +1,366 @@
1/*
2 * arch/alpha/kernel/pci-sysfs.c
3 *
4 * Copyright (C) 2009 Ivan Kokshaysky
5 *
6 * Alpha PCI resource files.
7 *
8 * Loosely based on generic HAVE_PCI_MMAP implementation in
9 * drivers/pci/pci-sysfs.c
10 */
11
12#include <linux/sched.h>
13#include <linux/pci.h>
14
15static int hose_mmap_page_range(struct pci_controller *hose,
16 struct vm_area_struct *vma,
17 enum pci_mmap_state mmap_type, int sparse)
18{
19 unsigned long base;
20
21 if (mmap_type == pci_mmap_mem)
22 base = sparse ? hose->sparse_mem_base : hose->dense_mem_base;
23 else
24 base = sparse ? hose->sparse_io_base : hose->dense_io_base;
25
26 vma->vm_pgoff += base >> PAGE_SHIFT;
27 vma->vm_flags |= (VM_IO | VM_RESERVED);
28
29 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
30 vma->vm_end - vma->vm_start,
31 vma->vm_page_prot);
32}
33
34static int __pci_mmap_fits(struct pci_dev *pdev, int num,
35 struct vm_area_struct *vma, int sparse)
36{
37 unsigned long nr, start, size;
38 int shift = sparse ? 5 : 0;
39
40 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
41 start = vma->vm_pgoff;
42 size = ((pci_resource_len(pdev, num) - 1) >> (PAGE_SHIFT - shift)) + 1;
43
44 if (start < size && size - start >= nr)
45 return 1;
46 WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on %s BAR %d "
47 "(size 0x%08lx)\n",
48 current->comm, sparse ? " sparse" : "", start, start + nr,
49 pci_name(pdev), num, size);
50 return 0;
51}
52
53/**
54 * pci_mmap_resource - map a PCI resource into user memory space
55 * @kobj: kobject for mapping
56 * @attr: struct bin_attribute for the file being mapped
57 * @vma: struct vm_area_struct passed into the mmap
58 * @sparse: address space type
59 *
60 * Use the bus mapping routines to map a PCI resource into userspace.
61 */
62static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
63 struct vm_area_struct *vma, int sparse)
64{
65 struct pci_dev *pdev = to_pci_dev(container_of(kobj,
66 struct device, kobj));
67 struct resource *res = (struct resource *)attr->private;
68 enum pci_mmap_state mmap_type;
69 struct pci_bus_region bar;
70 int i;
71
72 for (i = 0; i < PCI_ROM_RESOURCE; i++)
73 if (res == &pdev->resource[i])
74 break;
75 if (i >= PCI_ROM_RESOURCE)
76 return -ENODEV;
77
78 if (!__pci_mmap_fits(pdev, i, vma, sparse))
79 return -EINVAL;
80
81 if (iomem_is_exclusive(res->start))
82 return -EINVAL;
83
84 pcibios_resource_to_bus(pdev, &bar, res);
85 vma->vm_pgoff += bar.start >> (PAGE_SHIFT - (sparse ? 5 : 0));
86 mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io;
87
88 return hose_mmap_page_range(pdev->sysdata, vma, mmap_type, sparse);
89}
90
91static int pci_mmap_resource_sparse(struct kobject *kobj,
92 struct bin_attribute *attr,
93 struct vm_area_struct *vma)
94{
95 return pci_mmap_resource(kobj, attr, vma, 1);
96}
97
98static int pci_mmap_resource_dense(struct kobject *kobj,
99 struct bin_attribute *attr,
100 struct vm_area_struct *vma)
101{
102 return pci_mmap_resource(kobj, attr, vma, 0);
103}
104
105/**
106 * pci_remove_resource_files - cleanup resource files
107 * @dev: dev to cleanup
108 *
109 * If we created resource files for @dev, remove them from sysfs and
110 * free their resources.
111 */
112void pci_remove_resource_files(struct pci_dev *pdev)
113{
114 int i;
115
116 for (i = 0; i < PCI_ROM_RESOURCE; i++) {
117 struct bin_attribute *res_attr;
118
119 res_attr = pdev->res_attr[i];
120 if (res_attr) {
121 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
122 kfree(res_attr);
123 }
124
125 res_attr = pdev->res_attr_wc[i];
126 if (res_attr) {
127 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
128 kfree(res_attr);
129 }
130 }
131}
132
133static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num)
134{
135 struct pci_bus_region bar;
136 struct pci_controller *hose = pdev->sysdata;
137 long dense_offset;
138 unsigned long sparse_size;
139
140 pcibios_resource_to_bus(pdev, &bar, &pdev->resource[num]);
141
142 /* All core logic chips have 4G sparse address space, except
143 CIA which has 16G (see xxx_SPARSE_MEM and xxx_DENSE_MEM
144 definitions in asm/core_xxx.h files). This corresponds
145 to 128M or 512M of the bus space. */
146 dense_offset = (long)(hose->dense_mem_base - hose->sparse_mem_base);
147 sparse_size = dense_offset >= 0x400000000UL ? 0x20000000 : 0x8000000;
148
149 return bar.end < sparse_size;
150}
151
152static int pci_create_one_attr(struct pci_dev *pdev, int num, char *name,
153 char *suffix, struct bin_attribute *res_attr,
154 unsigned long sparse)
155{
156 size_t size = pci_resource_len(pdev, num);
157
158 sprintf(name, "resource%d%s", num, suffix);
159 res_attr->mmap = sparse ? pci_mmap_resource_sparse :
160 pci_mmap_resource_dense;
161 res_attr->attr.name = name;
162 res_attr->attr.mode = S_IRUSR | S_IWUSR;
163 res_attr->size = sparse ? size << 5 : size;
164 res_attr->private = &pdev->resource[num];
165 return sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
166}
167
168static int pci_create_attr(struct pci_dev *pdev, int num)
169{
170 /* allocate attribute structure, piggyback attribute name */
171 int retval, nlen1, nlen2 = 0, res_count = 1;
172 unsigned long sparse_base, dense_base;
173 struct bin_attribute *attr;
174 struct pci_controller *hose = pdev->sysdata;
175 char *suffix, *attr_name;
176
177 suffix = ""; /* Assume bwx machine, normal resourceN files. */
178 nlen1 = 10;
179
180 if (pdev->resource[num].flags & IORESOURCE_MEM) {
181 sparse_base = hose->sparse_mem_base;
182 dense_base = hose->dense_mem_base;
183 if (sparse_base && !sparse_mem_mmap_fits(pdev, num)) {
184 sparse_base = 0;
185 suffix = "_dense";
186 nlen1 = 16; /* resourceN_dense */
187 }
188 } else {
189 sparse_base = hose->sparse_io_base;
190 dense_base = hose->dense_io_base;
191 }
192
193 if (sparse_base) {
194 suffix = "_sparse";
195 nlen1 = 17;
196 if (dense_base) {
197 nlen2 = 16; /* resourceN_dense */
198 res_count = 2;
199 }
200 }
201
202 attr = kzalloc(sizeof(*attr) * res_count + nlen1 + nlen2, GFP_ATOMIC);
203 if (!attr)
204 return -ENOMEM;
205
206 /* Create bwx, sparse or single dense file */
207 attr_name = (char *)(attr + res_count);
208 pdev->res_attr[num] = attr;
209 retval = pci_create_one_attr(pdev, num, attr_name, suffix, attr,
210 sparse_base);
211 if (retval || res_count == 1)
212 return retval;
213
214 /* Create dense file */
215 attr_name += nlen1;
216 attr++;
217 pdev->res_attr_wc[num] = attr;
218 return pci_create_one_attr(pdev, num, attr_name, "_dense", attr, 0);
219}
220
221/**
222 * pci_create_resource_files - create resource files in sysfs for @dev
223 * @dev: dev in question
224 *
225 * Walk the resources in @dev creating files for each resource available.
226 */
227int pci_create_resource_files(struct pci_dev *pdev)
228{
229 int i;
230 int retval;
231
232 /* Expose the PCI resources from this device as files */
233 for (i = 0; i < PCI_ROM_RESOURCE; i++) {
234
235 /* skip empty resources */
236 if (!pci_resource_len(pdev, i))
237 continue;
238
239 retval = pci_create_attr(pdev, i);
240 if (retval) {
241 pci_remove_resource_files(pdev);
242 return retval;
243 }
244 }
245 return 0;
246}
247
248/* Legacy I/O bus mapping stuff. */
249
250static int __legacy_mmap_fits(struct pci_controller *hose,
251 struct vm_area_struct *vma,
252 unsigned long res_size, int sparse)
253{
254 unsigned long nr, start, size;
255
256 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
257 start = vma->vm_pgoff;
258 size = ((res_size - 1) >> PAGE_SHIFT) + 1;
259
260 if (start < size && size - start >= nr)
261 return 1;
262 WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on hose %d "
263 "(size 0x%08lx)\n",
264 current->comm, sparse ? " sparse" : "", start, start + nr,
265 hose->index, size);
266 return 0;
267}
268
269static inline int has_sparse(struct pci_controller *hose,
270 enum pci_mmap_state mmap_type)
271{
272 unsigned long base;
273
274 base = (mmap_type == pci_mmap_mem) ? hose->sparse_mem_base :
275 hose->sparse_io_base;
276
277 return base != 0;
278}
279
280int pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma,
281 enum pci_mmap_state mmap_type)
282{
283 struct pci_controller *hose = bus->sysdata;
284 int sparse = has_sparse(hose, mmap_type);
285 unsigned long res_size;
286
287 res_size = (mmap_type == pci_mmap_mem) ? bus->legacy_mem->size :
288 bus->legacy_io->size;
289 if (!__legacy_mmap_fits(hose, vma, res_size, sparse))
290 return -EINVAL;
291
292 return hose_mmap_page_range(hose, vma, mmap_type, sparse);
293}
294
295/**
296 * pci_adjust_legacy_attr - adjustment of legacy file attributes
297 * @b: bus to create files under
298 * @mmap_type: I/O port or memory
299 *
300 * Adjust file name and size for sparse mappings.
301 */
302void pci_adjust_legacy_attr(struct pci_bus *bus, enum pci_mmap_state mmap_type)
303{
304 struct pci_controller *hose = bus->sysdata;
305
306 if (!has_sparse(hose, mmap_type))
307 return;
308
309 if (mmap_type == pci_mmap_mem) {
310 bus->legacy_mem->attr.name = "legacy_mem_sparse";
311 bus->legacy_mem->size <<= 5;
312 } else {
313 bus->legacy_io->attr.name = "legacy_io_sparse";
314 bus->legacy_io->size <<= 5;
315 }
316 return;
317}
318
319/* Legacy I/O bus read/write functions */
320int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val, size_t size)
321{
322 struct pci_controller *hose = bus->sysdata;
323
324 port += hose->io_space->start;
325
326 switch(size) {
327 case 1:
328 *((u8 *)val) = inb(port);
329 return 1;
330 case 2:
331 if (port & 1)
332 return -EINVAL;
333 *((u16 *)val) = inw(port);
334 return 2;
335 case 4:
336 if (port & 3)
337 return -EINVAL;
338 *((u32 *)val) = inl(port);
339 return 4;
340 }
341 return -EINVAL;
342}
343
344int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, size_t size)
345{
346 struct pci_controller *hose = bus->sysdata;
347
348 port += hose->io_space->start;
349
350 switch(size) {
351 case 1:
352 outb(port, val);
353 return 1;
354 case 2:
355 if (port & 1)
356 return -EINVAL;
357 outw(port, val);
358 return 2;
359 case 4:
360 if (port & 3)
361 return -EINVAL;
362 outl(port, val);
363 return 4;
364 }
365 return -EINVAL;
366}
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index a3b938811400..a91ba28999b5 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -168,7 +168,7 @@ pcibios_align_resource(void *data, struct resource *res,
168 */ 168 */
169 169
170 /* Align to multiple of size of minimum base. */ 170 /* Align to multiple of size of minimum base. */
171 alignto = max(0x1000UL, align); 171 alignto = max_t(resource_size_t, 0x1000, align);
172 start = ALIGN(start, alignto); 172 start = ALIGN(start, alignto);
173 if (hose->sparse_mem_base && size <= 7 * 16*MB) { 173 if (hose->sparse_mem_base && size <= 7 * 16*MB) {
174 if (((start / (16*MB)) & 0x7) == 0) { 174 if (((start / (16*MB)) & 0x7) == 0) {
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index b9094da05d7a..bfb880af959d 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -247,7 +247,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
247 && paddr + size <= __direct_map_size) { 247 && paddr + size <= __direct_map_size) {
248 ret = paddr + __direct_map_base; 248 ret = paddr + __direct_map_base;
249 249
250 DBGA2("pci_map_single: [%p,%lx] -> direct %lx from %p\n", 250 DBGA2("pci_map_single: [%p,%zx] -> direct %llx from %p\n",
251 cpu_addr, size, ret, __builtin_return_address(0)); 251 cpu_addr, size, ret, __builtin_return_address(0));
252 252
253 return ret; 253 return ret;
@@ -258,7 +258,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
258 if (dac_allowed) { 258 if (dac_allowed) {
259 ret = paddr + alpha_mv.pci_dac_offset; 259 ret = paddr + alpha_mv.pci_dac_offset;
260 260
261 DBGA2("pci_map_single: [%p,%lx] -> DAC %lx from %p\n", 261 DBGA2("pci_map_single: [%p,%zx] -> DAC %llx from %p\n",
262 cpu_addr, size, ret, __builtin_return_address(0)); 262 cpu_addr, size, ret, __builtin_return_address(0));
263 263
264 return ret; 264 return ret;
@@ -299,7 +299,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
299 ret = arena->dma_base + dma_ofs * PAGE_SIZE; 299 ret = arena->dma_base + dma_ofs * PAGE_SIZE;
300 ret += (unsigned long)cpu_addr & ~PAGE_MASK; 300 ret += (unsigned long)cpu_addr & ~PAGE_MASK;
301 301
302 DBGA2("pci_map_single: [%p,%lx] np %ld -> sg %lx from %p\n", 302 DBGA2("pci_map_single: [%p,%zx] np %ld -> sg %llx from %p\n",
303 cpu_addr, size, npages, ret, __builtin_return_address(0)); 303 cpu_addr, size, npages, ret, __builtin_return_address(0));
304 304
305 return ret; 305 return ret;
@@ -355,14 +355,14 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
355 && dma_addr < __direct_map_base + __direct_map_size) { 355 && dma_addr < __direct_map_base + __direct_map_size) {
356 /* Nothing to do. */ 356 /* Nothing to do. */
357 357
358 DBGA2("pci_unmap_single: direct [%lx,%lx] from %p\n", 358 DBGA2("pci_unmap_single: direct [%llx,%zx] from %p\n",
359 dma_addr, size, __builtin_return_address(0)); 359 dma_addr, size, __builtin_return_address(0));
360 360
361 return; 361 return;
362 } 362 }
363 363
364 if (dma_addr > 0xffffffff) { 364 if (dma_addr > 0xffffffff) {
365 DBGA2("pci64_unmap_single: DAC [%lx,%lx] from %p\n", 365 DBGA2("pci64_unmap_single: DAC [%llx,%zx] from %p\n",
366 dma_addr, size, __builtin_return_address(0)); 366 dma_addr, size, __builtin_return_address(0));
367 return; 367 return;
368 } 368 }
@@ -373,9 +373,9 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
373 373
374 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT; 374 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT;
375 if (dma_ofs * PAGE_SIZE >= arena->size) { 375 if (dma_ofs * PAGE_SIZE >= arena->size) {
376 printk(KERN_ERR "Bogus pci_unmap_single: dma_addr %lx " 376 printk(KERN_ERR "Bogus pci_unmap_single: dma_addr %llx "
377 " base %lx size %x\n", dma_addr, arena->dma_base, 377 " base %llx size %x\n",
378 arena->size); 378 dma_addr, arena->dma_base, arena->size);
379 return; 379 return;
380 BUG(); 380 BUG();
381 } 381 }
@@ -394,7 +394,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
394 394
395 spin_unlock_irqrestore(&arena->lock, flags); 395 spin_unlock_irqrestore(&arena->lock, flags);
396 396
397 DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", 397 DBGA2("pci_unmap_single: sg [%llx,%zx] np %ld from %p\n",
398 dma_addr, size, npages, __builtin_return_address(0)); 398 dma_addr, size, npages, __builtin_return_address(0));
399} 399}
400EXPORT_SYMBOL(pci_unmap_single); 400EXPORT_SYMBOL(pci_unmap_single);
@@ -444,7 +444,7 @@ try_again:
444 goto try_again; 444 goto try_again;
445 } 445 }
446 446
447 DBGA2("pci_alloc_consistent: %lx -> [%p,%x] from %p\n", 447 DBGA2("pci_alloc_consistent: %zx -> [%p,%llx] from %p\n",
448 size, cpu_addr, *dma_addrp, __builtin_return_address(0)); 448 size, cpu_addr, *dma_addrp, __builtin_return_address(0));
449 449
450 return cpu_addr; 450 return cpu_addr;
@@ -464,7 +464,7 @@ pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu_addr,
464 pci_unmap_single(pdev, dma_addr, size, PCI_DMA_BIDIRECTIONAL); 464 pci_unmap_single(pdev, dma_addr, size, PCI_DMA_BIDIRECTIONAL);
465 free_pages((unsigned long)cpu_addr, get_order(size)); 465 free_pages((unsigned long)cpu_addr, get_order(size));
466 466
467 DBGA2("pci_free_consistent: [%x,%lx] from %p\n", 467 DBGA2("pci_free_consistent: [%llx,%zx] from %p\n",
468 dma_addr, size, __builtin_return_address(0)); 468 dma_addr, size, __builtin_return_address(0));
469} 469}
470EXPORT_SYMBOL(pci_free_consistent); 470EXPORT_SYMBOL(pci_free_consistent);
@@ -551,7 +551,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
551 out->dma_address = paddr + __direct_map_base; 551 out->dma_address = paddr + __direct_map_base;
552 out->dma_length = size; 552 out->dma_length = size;
553 553
554 DBGA(" sg_fill: [%p,%lx] -> direct %lx\n", 554 DBGA(" sg_fill: [%p,%lx] -> direct %llx\n",
555 __va(paddr), size, out->dma_address); 555 __va(paddr), size, out->dma_address);
556 556
557 return 0; 557 return 0;
@@ -563,7 +563,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
563 out->dma_address = paddr + alpha_mv.pci_dac_offset; 563 out->dma_address = paddr + alpha_mv.pci_dac_offset;
564 out->dma_length = size; 564 out->dma_length = size;
565 565
566 DBGA(" sg_fill: [%p,%lx] -> DAC %lx\n", 566 DBGA(" sg_fill: [%p,%lx] -> DAC %llx\n",
567 __va(paddr), size, out->dma_address); 567 __va(paddr), size, out->dma_address);
568 568
569 return 0; 569 return 0;
@@ -589,7 +589,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
589 out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr; 589 out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr;
590 out->dma_length = size; 590 out->dma_length = size;
591 591
592 DBGA(" sg_fill: [%p,%lx] -> sg %lx np %ld\n", 592 DBGA(" sg_fill: [%p,%lx] -> sg %llx np %ld\n",
593 __va(paddr), size, out->dma_address, npages); 593 __va(paddr), size, out->dma_address, npages);
594 594
595 /* All virtually contiguous. We need to find the length of each 595 /* All virtually contiguous. We need to find the length of each
@@ -752,7 +752,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
752 752
753 if (addr > 0xffffffff) { 753 if (addr > 0xffffffff) {
754 /* It's a DAC address -- nothing to do. */ 754 /* It's a DAC address -- nothing to do. */
755 DBGA(" (%ld) DAC [%lx,%lx]\n", 755 DBGA(" (%ld) DAC [%llx,%zx]\n",
756 sg - end + nents, addr, size); 756 sg - end + nents, addr, size);
757 continue; 757 continue;
758 } 758 }
@@ -760,12 +760,12 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
760 if (addr >= __direct_map_base 760 if (addr >= __direct_map_base
761 && addr < __direct_map_base + __direct_map_size) { 761 && addr < __direct_map_base + __direct_map_size) {
762 /* Nothing to do. */ 762 /* Nothing to do. */
763 DBGA(" (%ld) direct [%lx,%lx]\n", 763 DBGA(" (%ld) direct [%llx,%zx]\n",
764 sg - end + nents, addr, size); 764 sg - end + nents, addr, size);
765 continue; 765 continue;
766 } 766 }
767 767
768 DBGA(" (%ld) sg [%lx,%lx]\n", 768 DBGA(" (%ld) sg [%llx,%zx]\n",
769 sg - end + nents, addr, size); 769 sg - end + nents, addr, size);
770 770
771 npages = iommu_num_pages(addr, size, PAGE_SIZE); 771 npages = iommu_num_pages(addr, size, PAGE_SIZE);
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 8d0097f10208..3a2fb7a02db4 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -272,7 +272,7 @@ alpha_vfork(struct pt_regs *regs)
272 */ 272 */
273 273
274int 274int
275copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 275copy_thread(unsigned long clone_flags, unsigned long usp,
276 unsigned long unused, 276 unsigned long unused,
277 struct task_struct * p, struct pt_regs * regs) 277 struct task_struct * p, struct pt_regs * regs)
278{ 278{
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index fe14c6747cd6..567f2598d090 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -20,7 +20,7 @@ struct pci_controller;
20extern struct pci_ops apecs_pci_ops; 20extern struct pci_ops apecs_pci_ops;
21extern void apecs_init_arch(void); 21extern void apecs_init_arch(void);
22extern void apecs_pci_clr_err(void); 22extern void apecs_pci_clr_err(void);
23extern void apecs_machine_check(u64, u64); 23extern void apecs_machine_check(unsigned long vector, unsigned long la_ptr);
24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
25 25
26/* core_cia.c */ 26/* core_cia.c */
@@ -29,7 +29,7 @@ extern void cia_init_pci(void);
29extern void cia_init_arch(void); 29extern void cia_init_arch(void);
30extern void pyxis_init_arch(void); 30extern void pyxis_init_arch(void);
31extern void cia_kill_arch(int); 31extern void cia_kill_arch(int);
32extern void cia_machine_check(u64, u64); 32extern void cia_machine_check(unsigned long vector, unsigned long la_ptr);
33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
34 34
35/* core_irongate.c */ 35/* core_irongate.c */
@@ -42,7 +42,7 @@ extern void irongate_machine_check(u64, u64);
42/* core_lca.c */ 42/* core_lca.c */
43extern struct pci_ops lca_pci_ops; 43extern struct pci_ops lca_pci_ops;
44extern void lca_init_arch(void); 44extern void lca_init_arch(void);
45extern void lca_machine_check(u64, u64); 45extern void lca_machine_check(unsigned long vector, unsigned long la_ptr);
46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
47 47
48/* core_marvel.c */ 48/* core_marvel.c */
@@ -64,7 +64,7 @@ void io7_clear_errors(struct io7 *io7);
64extern struct pci_ops mcpcia_pci_ops; 64extern struct pci_ops mcpcia_pci_ops;
65extern void mcpcia_init_arch(void); 65extern void mcpcia_init_arch(void);
66extern void mcpcia_init_hoses(void); 66extern void mcpcia_init_hoses(void);
67extern void mcpcia_machine_check(u64, u64); 67extern void mcpcia_machine_check(unsigned long vector, unsigned long la_ptr);
68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
69 69
70/* core_polaris.c */ 70/* core_polaris.c */
@@ -72,14 +72,14 @@ extern struct pci_ops polaris_pci_ops;
72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *); 72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
73extern int polaris_write_config_dword(struct pci_dev *, int, u32); 73extern int polaris_write_config_dword(struct pci_dev *, int, u32);
74extern void polaris_init_arch(void); 74extern void polaris_init_arch(void);
75extern void polaris_machine_check(u64, u64); 75extern void polaris_machine_check(unsigned long vector, unsigned long la_ptr);
76#define polaris_pci_tbi ((void *)0) 76#define polaris_pci_tbi ((void *)0)
77 77
78/* core_t2.c */ 78/* core_t2.c */
79extern struct pci_ops t2_pci_ops; 79extern struct pci_ops t2_pci_ops;
80extern void t2_init_arch(void); 80extern void t2_init_arch(void);
81extern void t2_kill_arch(int); 81extern void t2_kill_arch(int);
82extern void t2_machine_check(u64, u64); 82extern void t2_machine_check(unsigned long vector, unsigned long la_ptr);
83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
84 84
85/* core_titan.c */ 85/* core_titan.c */
@@ -94,14 +94,14 @@ extern struct _alpha_agp_info *titan_agp_info(void);
94extern struct pci_ops tsunami_pci_ops; 94extern struct pci_ops tsunami_pci_ops;
95extern void tsunami_init_arch(void); 95extern void tsunami_init_arch(void);
96extern void tsunami_kill_arch(int); 96extern void tsunami_kill_arch(int);
97extern void tsunami_machine_check(u64, u64); 97extern void tsunami_machine_check(unsigned long vector, unsigned long la_ptr);
98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
99 99
100/* core_wildfire.c */ 100/* core_wildfire.c */
101extern struct pci_ops wildfire_pci_ops; 101extern struct pci_ops wildfire_pci_ops;
102extern void wildfire_init_arch(void); 102extern void wildfire_init_arch(void);
103extern void wildfire_kill_arch(int); 103extern void wildfire_kill_arch(int);
104extern void wildfire_machine_check(u64, u64); 104extern void wildfire_machine_check(unsigned long vector, unsigned long la_ptr);
105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
106extern int wildfire_pa_to_nid(unsigned long); 106extern int wildfire_pa_to_nid(unsigned long);
107extern int wildfire_cpuid_to_nid(int); 107extern int wildfire_cpuid_to_nid(int);
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 02bee6983ce2..80df86cd746b 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -1255,7 +1255,7 @@ show_cpuinfo(struct seq_file *f, void *slot)
1255 platform_string(), nr_processors); 1255 platform_string(), nr_processors);
1256 1256
1257#ifdef CONFIG_SMP 1257#ifdef CONFIG_SMP
1258 seq_printf(f, "cpus active\t\t: %d\n" 1258 seq_printf(f, "cpus active\t\t: %u\n"
1259 "cpu active mask\t\t: %016lx\n", 1259 "cpu active mask\t\t: %016lx\n",
1260 num_online_cpus(), cpus_addr(cpu_possible_map)[0]); 1260 num_online_cpus(), cpus_addr(cpu_possible_map)[0]);
1261#endif 1261#endif
diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c
index fd467b207f0f..bca5bda90cde 100644
--- a/arch/alpha/kernel/smc37c669.c
+++ b/arch/alpha/kernel/smc37c669.c
@@ -2542,8 +2542,8 @@ void __init SMC669_Init ( int index )
2542 SMC37c669_display_device_info( ); 2542 SMC37c669_display_device_info( );
2543#endif 2543#endif
2544 local_irq_restore(flags); 2544 local_irq_restore(flags);
2545 printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n", 2545 printk( "SMC37c669 Super I/O Controller found @ 0x%p\n",
2546 (unsigned long) SMC_base ); 2546 SMC_base );
2547 } 2547 }
2548 else { 2548 else {
2549 local_irq_restore(flags); 2549 local_irq_restore(flags);
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c
index 78ad7cd1bbd6..d12af472e1c0 100644
--- a/arch/alpha/kernel/srm_env.c
+++ b/arch/alpha/kernel/srm_env.c
@@ -218,7 +218,6 @@ srm_env_init(void)
218 BASE_DIR); 218 BASE_DIR);
219 goto cleanup; 219 goto cleanup;
220 } 220 }
221 base_dir->owner = THIS_MODULE;
222 221
223 /* 222 /*
224 * Create per-name subdirectory 223 * Create per-name subdirectory
@@ -229,7 +228,6 @@ srm_env_init(void)
229 BASE_DIR, NAMED_DIR); 228 BASE_DIR, NAMED_DIR);
230 goto cleanup; 229 goto cleanup;
231 } 230 }
232 named_dir->owner = THIS_MODULE;
233 231
234 /* 232 /*
235 * Create per-number subdirectory 233 * Create per-number subdirectory
@@ -241,7 +239,6 @@ srm_env_init(void)
241 goto cleanup; 239 goto cleanup;
242 240
243 } 241 }
244 numbered_dir->owner = THIS_MODULE;
245 242
246 /* 243 /*
247 * Create all named nodes 244 * Create all named nodes
@@ -254,7 +251,6 @@ srm_env_init(void)
254 goto cleanup; 251 goto cleanup;
255 252
256 entry->proc_entry->data = (void *) entry; 253 entry->proc_entry->data = (void *) entry;
257 entry->proc_entry->owner = THIS_MODULE;
258 entry->proc_entry->read_proc = srm_env_read; 254 entry->proc_entry->read_proc = srm_env_read;
259 entry->proc_entry->write_proc = srm_env_write; 255 entry->proc_entry->write_proc = srm_env_write;
260 256
@@ -275,7 +271,6 @@ srm_env_init(void)
275 271
276 entry->id = var_num; 272 entry->id = var_num;
277 entry->proc_entry->data = (void *) entry; 273 entry->proc_entry->data = (void *) entry;
278 entry->proc_entry->owner = THIS_MODULE;
279 entry->proc_entry->read_proc = srm_env_read; 274 entry->proc_entry->read_proc = srm_env_read;
280 entry->proc_entry->write_proc = srm_env_write; 275 entry->proc_entry->write_proc = srm_env_write;
281 } 276 }
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index e2516f9a8967..2b5caf3d9b15 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -244,12 +244,11 @@ jensen_init_arch(void)
244} 244}
245 245
246static void 246static void
247jensen_machine_check (u64 vector, u64 la) 247jensen_machine_check(unsigned long vector, unsigned long la)
248{ 248{
249 printk(KERN_CRIT "Machine check\n"); 249 printk(KERN_CRIT "Machine check\n");
250} 250}
251 251
252
253/* 252/*
254 * The System Vector 253 * The System Vector
255 */ 254 */
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index d232e42be018..9e263256a42d 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -453,7 +453,7 @@ sable_lynx_enable_irq(unsigned int irq)
453 sable_lynx_irq_swizzle->update_irq_hw(bit, mask); 453 sable_lynx_irq_swizzle->update_irq_hw(bit, mask);
454 spin_unlock(&sable_lynx_irq_lock); 454 spin_unlock(&sable_lynx_irq_lock);
455#if 0 455#if 0
456 printk("%s: mask 0x%lx bit 0x%x irq 0x%x\n", 456 printk("%s: mask 0x%lx bit 0x%lx irq 0x%x\n",
457 __func__, mask, bit, irq); 457 __func__, mask, bit, irq);
458#endif 458#endif
459} 459}
@@ -469,7 +469,7 @@ sable_lynx_disable_irq(unsigned int irq)
469 sable_lynx_irq_swizzle->update_irq_hw(bit, mask); 469 sable_lynx_irq_swizzle->update_irq_hw(bit, mask);
470 spin_unlock(&sable_lynx_irq_lock); 470 spin_unlock(&sable_lynx_irq_lock);
471#if 0 471#if 0
472 printk("%s: mask 0x%lx bit 0x%x irq 0x%x\n", 472 printk("%s: mask 0x%lx bit 0x%lx irq 0x%x\n",
473 __func__, mask, bit, irq); 473 __func__, mask, bit, irq);
474#endif 474#endif
475} 475}
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index cefc5a355ef9..6ee7655b7568 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -623,7 +623,7 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
623 } 623 }
624 624
625 lock_kernel(); 625 lock_kernel();
626 printk("Bad unaligned kernel access at %016lx: %p %lx %ld\n", 626 printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n",
627 pc, va, opcode, reg); 627 pc, va, opcode, reg);
628 do_exit(SIGSEGV); 628 do_exit(SIGSEGV);
629 629
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 393c81641314..9e6e512f0117 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -18,7 +18,10 @@
18 18
19unsigned int __machine_arch_type; 19unsigned int __machine_arch_type;
20 20
21#include <linux/string.h> 21#include <linux/compiler.h> /* for inline */
22#include <linux/types.h> /* for size_t */
23#include <linux/stddef.h> /* for NULL */
24#include <asm/string.h>
22 25
23#ifdef STANDALONE_DEBUG 26#ifdef STANDALONE_DEBUG
24#define putstr printf 27#define putstr printf
diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig
index aa9d34feddc6..679a4a3e265e 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -474,14 +474,34 @@ CONFIG_NETDEVICES=y
474# CONFIG_EQUALIZER is not set 474# CONFIG_EQUALIZER is not set
475# CONFIG_TUN is not set 475# CONFIG_TUN is not set
476# CONFIG_VETH is not set 476# CONFIG_VETH is not set
477# CONFIG_PHYLIB is not set 477CONFIG_PHYLIB=y
478
479#
480# MII PHY device drivers
481#
482# CONFIG_MARVELL_PHY is not set
483# CONFIG_DAVICOM_PHY is not set
484# CONFIG_QSEMI_PHY is not set
485# CONFIG_LXT_PHY is not set
486# CONFIG_CICADA_PHY is not set
487# CONFIG_VITESSE_PHY is not set
488CONFIG_SMSC_PHY=y
489# CONFIG_BROADCOM_PHY is not set
490# CONFIG_ICPLUS_PHY is not set
491# CONFIG_REALTEK_PHY is not set
492# CONFIG_NATIONAL_PHY is not set
493# CONFIG_STE10XP is not set
494# CONFIG_LSI_ET1011C_PHY is not set
495# CONFIG_FIXED_PHY is not set
496# CONFIG_MDIO_BITBANG is not set
478CONFIG_NET_ETHERNET=y 497CONFIG_NET_ETHERNET=y
479CONFIG_MII=y 498CONFIG_MII=y
480# CONFIG_AX88796 is not set 499# CONFIG_AX88796 is not set
481# CONFIG_SMC91X is not set 500# CONFIG_SMC91X is not set
482# CONFIG_DM9000 is not set 501# CONFIG_DM9000 is not set
483# CONFIG_ENC28J60 is not set 502# CONFIG_ENC28J60 is not set
484CONFIG_SMC911X=y 503# CONFIG_SMC911X is not set
504CONFIG_SMSC911X=y
485# CONFIG_IBM_NEW_EMAC_ZMII is not set 505# CONFIG_IBM_NEW_EMAC_ZMII is not set
486# CONFIG_IBM_NEW_EMAC_RGMII is not set 506# CONFIG_IBM_NEW_EMAC_RGMII is not set
487# CONFIG_IBM_NEW_EMAC_TAH is not set 507# CONFIG_IBM_NEW_EMAC_TAH is not set
diff --git a/arch/arm/configs/pcm037_defconfig b/arch/arm/configs/pcm037_defconfig
index 627474586470..6e37c77c4760 100644
--- a/arch/arm/configs/pcm037_defconfig
+++ b/arch/arm/configs/pcm037_defconfig
@@ -465,12 +465,33 @@ CONFIG_NETDEVICES=y
465# CONFIG_EQUALIZER is not set 465# CONFIG_EQUALIZER is not set
466# CONFIG_TUN is not set 466# CONFIG_TUN is not set
467# CONFIG_VETH is not set 467# CONFIG_VETH is not set
468# CONFIG_PHYLIB is not set 468CONFIG_PHYLIB=y
469
470#
471# MII PHY device drivers
472#
473# CONFIG_MARVELL_PHY is not set
474# CONFIG_DAVICOM_PHY is not set
475# CONFIG_QSEMI_PHY is not set
476# CONFIG_LXT_PHY is not set
477# CONFIG_CICADA_PHY is not set
478# CONFIG_VITESSE_PHY is not set
479CONFIG_SMSC_PHY=y
480# CONFIG_BROADCOM_PHY is not set
481# CONFIG_ICPLUS_PHY is not set
482# CONFIG_REALTEK_PHY is not set
483# CONFIG_NATIONAL_PHY is not set
484# CONFIG_STE10XP is not set
485# CONFIG_LSI_ET1011C_PHY is not set
486# CONFIG_FIXED_PHY is not set
487# CONFIG_MDIO_BITBANG is not set
469CONFIG_NET_ETHERNET=y 488CONFIG_NET_ETHERNET=y
470CONFIG_MII=y 489CONFIG_MII=y
471# CONFIG_AX88796 is not set 490# CONFIG_AX88796 is not set
472CONFIG_SMC91X=y 491CONFIG_SMC91X=y
473# CONFIG_DM9000 is not set 492# CONFIG_DM9000 is not set
493# CONFIG_SMC911X is not set
494CONFIG_SMSC911X=y
474# CONFIG_IBM_NEW_EMAC_ZMII is not set 495# CONFIG_IBM_NEW_EMAC_ZMII is not set
475# CONFIG_IBM_NEW_EMAC_RGMII is not set 496# CONFIG_IBM_NEW_EMAC_RGMII is not set
476# CONFIG_IBM_NEW_EMAC_TAH is not set 497# CONFIG_IBM_NEW_EMAC_TAH is not set
diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig
index cd29824d791c..21db4b3ec8ff 100644
--- a/arch/arm/configs/realview-smp_defconfig
+++ b/arch/arm/configs/realview-smp_defconfig
@@ -496,13 +496,33 @@ CONFIG_NETDEVICES=y
496# CONFIG_EQUALIZER is not set 496# CONFIG_EQUALIZER is not set
497# CONFIG_TUN is not set 497# CONFIG_TUN is not set
498# CONFIG_VETH is not set 498# CONFIG_VETH is not set
499# CONFIG_PHYLIB is not set 499CONFIG_PHYLIB=y
500
501#
502# MII PHY device drivers
503#
504# CONFIG_MARVELL_PHY is not set
505# CONFIG_DAVICOM_PHY is not set
506# CONFIG_QSEMI_PHY is not set
507# CONFIG_LXT_PHY is not set
508# CONFIG_CICADA_PHY is not set
509# CONFIG_VITESSE_PHY is not set
510CONFIG_SMSC_PHY=y
511# CONFIG_BROADCOM_PHY is not set
512# CONFIG_ICPLUS_PHY is not set
513# CONFIG_REALTEK_PHY is not set
514# CONFIG_NATIONAL_PHY is not set
515# CONFIG_STE10XP is not set
516# CONFIG_LSI_ET1011C_PHY is not set
517# CONFIG_FIXED_PHY is not set
518# CONFIG_MDIO_BITBANG is not set
500CONFIG_NET_ETHERNET=y 519CONFIG_NET_ETHERNET=y
501CONFIG_MII=y 520CONFIG_MII=y
502# CONFIG_AX88796 is not set 521# CONFIG_AX88796 is not set
503CONFIG_SMC91X=y 522CONFIG_SMC91X=y
504# CONFIG_DM9000 is not set 523# CONFIG_DM9000 is not set
505CONFIG_SMC911X=y 524# CONFIG_SMC911X is not set
525CONFIG_SMSC911X=y
506# CONFIG_IBM_NEW_EMAC_ZMII is not set 526# CONFIG_IBM_NEW_EMAC_ZMII is not set
507# CONFIG_IBM_NEW_EMAC_RGMII is not set 527# CONFIG_IBM_NEW_EMAC_RGMII is not set
508# CONFIG_IBM_NEW_EMAC_TAH is not set 528# CONFIG_IBM_NEW_EMAC_TAH is not set
diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 7e253f58ed18..9a75c30b910d 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -490,13 +490,33 @@ CONFIG_NETDEVICES=y
490# CONFIG_EQUALIZER is not set 490# CONFIG_EQUALIZER is not set
491# CONFIG_TUN is not set 491# CONFIG_TUN is not set
492# CONFIG_VETH is not set 492# CONFIG_VETH is not set
493# CONFIG_PHYLIB is not set 493CONFIG_PHYLIB=y
494
495#
496# MII PHY device drivers
497#
498# CONFIG_MARVELL_PHY is not set
499# CONFIG_DAVICOM_PHY is not set
500# CONFIG_QSEMI_PHY is not set
501# CONFIG_LXT_PHY is not set
502# CONFIG_CICADA_PHY is not set
503# CONFIG_VITESSE_PHY is not set
504CONFIG_SMSC_PHY=y
505# CONFIG_BROADCOM_PHY is not set
506# CONFIG_ICPLUS_PHY is not set
507# CONFIG_REALTEK_PHY is not set
508# CONFIG_NATIONAL_PHY is not set
509# CONFIG_STE10XP is not set
510# CONFIG_LSI_ET1011C_PHY is not set
511# CONFIG_FIXED_PHY is not set
512# CONFIG_MDIO_BITBANG is not set
494CONFIG_NET_ETHERNET=y 513CONFIG_NET_ETHERNET=y
495CONFIG_MII=y 514CONFIG_MII=y
496# CONFIG_AX88796 is not set 515# CONFIG_AX88796 is not set
497CONFIG_SMC91X=y 516CONFIG_SMC91X=y
498# CONFIG_DM9000 is not set 517# CONFIG_DM9000 is not set
499CONFIG_SMC911X=y 518# CONFIG_SMC911X is not set
519CONFIG_SMSC911X=y
500# CONFIG_IBM_NEW_EMAC_ZMII is not set 520# CONFIG_IBM_NEW_EMAC_ZMII is not set
501# CONFIG_IBM_NEW_EMAC_RGMII is not set 521# CONFIG_IBM_NEW_EMAC_RGMII is not set
502# CONFIG_IBM_NEW_EMAC_TAH is not set 522# CONFIG_IBM_NEW_EMAC_TAH is not set
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index 2b41ebbfa7ff..c13681ac1ede 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -217,6 +217,9 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
217/* read_can_lock - would read_trylock() succeed? */ 217/* read_can_lock - would read_trylock() succeed? */
218#define __raw_read_can_lock(x) ((x)->lock < 0x80000000) 218#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
219 219
220#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
221#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
222
220#define _raw_spin_relax(lock) cpu_relax() 223#define _raw_spin_relax(lock) cpu_relax()
221#define _raw_read_relax(lock) cpu_relax() 224#define _raw_read_relax(lock) cpu_relax()
222#define _raw_write_relax(lock) cpu_relax() 225#define _raw_write_relax(lock) cpu_relax()
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 2de14e2afdc5..c3265a2e7cd4 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -301,7 +301,7 @@ void release_thread(struct task_struct *dead_task)
301asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); 301asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
302 302
303int 303int
304copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, 304copy_thread(unsigned long clone_flags, unsigned long stack_start,
305 unsigned long stk_sz, struct task_struct *p, struct pt_regs *regs) 305 unsigned long stk_sz, struct task_struct *p, struct pt_regs *regs)
306{ 306{
307 struct thread_info *thread = task_thread_info(p); 307 struct thread_info *thread = task_thread_info(p);
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 7ac812dc055a..e26c4fe61fae 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -198,17 +198,17 @@ static int at91_pm_verify_clocks(void)
198 /* USB must not be using PLLB */ 198 /* USB must not be using PLLB */
199 if (cpu_is_at91rm9200()) { 199 if (cpu_is_at91rm9200()) {
200 if ((scsr & (AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP)) != 0) { 200 if ((scsr & (AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP)) != 0) {
201 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); 201 pr_err("AT91: PM - Suspend-to-RAM with USB still active\n");
202 return 0; 202 return 0;
203 } 203 }
204 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) { 204 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) {
205 if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) { 205 if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
206 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); 206 pr_err("AT91: PM - Suspend-to-RAM with USB still active\n");
207 return 0; 207 return 0;
208 } 208 }
209 } else if (cpu_is_at91cap9()) { 209 } else if (cpu_is_at91cap9()) {
210 if ((scsr & AT91CAP9_PMC_UHP) != 0) { 210 if ((scsr & AT91CAP9_PMC_UHP) != 0) {
211 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); 211 pr_err("AT91: PM - Suspend-to-RAM with USB still active\n");
212 return 0; 212 return 0;
213 } 213 }
214 } 214 }
@@ -223,7 +223,7 @@ static int at91_pm_verify_clocks(void)
223 223
224 css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS; 224 css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS;
225 if (css != AT91_PMC_CSS_SLOW) { 225 if (css != AT91_PMC_CSS_SLOW) {
226 pr_debug("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css); 226 pr_err("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css);
227 return 0; 227 return 0;
228 } 228 }
229 } 229 }
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
index 38b6a9ce2a93..0b97a528902b 100644
--- a/arch/arm/mach-davinci/board-evm.c
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -118,7 +118,7 @@ static struct resource ide_resources[] = {
118 }, 118 },
119}; 119};
120 120
121static u64 ide_dma_mask = DMA_32BIT_MASK; 121static u64 ide_dma_mask = DMA_BIT_MASK(32);
122 122
123static struct platform_device ide_dev = { 123static struct platform_device ide_dev = {
124 .name = "palm_bk3710", 124 .name = "palm_bk3710",
@@ -127,7 +127,7 @@ static struct platform_device ide_dev = {
127 .num_resources = ARRAY_SIZE(ide_resources), 127 .num_resources = ARRAY_SIZE(ide_resources),
128 .dev = { 128 .dev = {
129 .dma_mask = &ide_dma_mask, 129 .dma_mask = &ide_dma_mask,
130 .coherent_dma_mask = DMA_32BIT_MASK, 130 .coherent_dma_mask = DMA_BIT_MASK(32),
131 }, 131 },
132}; 132};
133 133
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h
new file mode 100644
index 000000000000..aa482841270b
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/nand.h
@@ -0,0 +1,80 @@
1/*
2 * mach-davinci/nand.h
3 *
4 * Copyright © 2006 Texas Instruments.
5 *
6 * Ported to 2.6.23 Copyright © 2008 by
7 * Sander Huijsen <Shuijsen@optelecom-nkf.com>
8 * Troy Kisky <troy.kisky@boundarydevices.com>
9 * Dirk Behme <Dirk.Behme@gmail.com>
10 *
11 * --------------------------------------------------------------------------
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ARCH_ARM_DAVINCI_NAND_H
29#define __ARCH_ARM_DAVINCI_NAND_H
30
31#include <linux/mtd/nand.h>
32
33#define NRCSR_OFFSET 0x00
34#define AWCCR_OFFSET 0x04
35#define A1CR_OFFSET 0x10
36#define NANDFCR_OFFSET 0x60
37#define NANDFSR_OFFSET 0x64
38#define NANDF1ECC_OFFSET 0x70
39
40/* 4-bit ECC syndrome registers */
41#define NAND_4BIT_ECC_LOAD_OFFSET 0xbc
42#define NAND_4BIT_ECC1_OFFSET 0xc0
43#define NAND_4BIT_ECC2_OFFSET 0xc4
44#define NAND_4BIT_ECC3_OFFSET 0xc8
45#define NAND_4BIT_ECC4_OFFSET 0xcc
46#define NAND_ERR_ADD1_OFFSET 0xd0
47#define NAND_ERR_ADD2_OFFSET 0xd4
48#define NAND_ERR_ERRVAL1_OFFSET 0xd8
49#define NAND_ERR_ERRVAL2_OFFSET 0xdc
50
51/* NOTE: boards don't need to use these address bits
52 * for ALE/CLE unless they support booting from NAND.
53 * They're used unless platform data overrides them.
54 */
55#define MASK_ALE 0x08
56#define MASK_CLE 0x10
57
58struct davinci_nand_pdata { /* platform_data */
59 uint32_t mask_ale;
60 uint32_t mask_cle;
61
62 /* for packages using two chipselects */
63 uint32_t mask_chipsel;
64
65 /* board's default static partition info */
66 struct mtd_partition *parts;
67 unsigned nr_parts;
68
69 /* none == NAND_ECC_NONE (strongly *not* advised!!)
70 * soft == NAND_ECC_SOFT
71 * 1-bit == NAND_ECC_HW
72 * 4-bit == NAND_ECC_HW_SYNDROME (not on all chips)
73 */
74 nand_ecc_modes_t ecc_mode;
75
76 /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
77 unsigned options;
78};
79
80#endif /* __ARCH_ARM_DAVINCI_NAND_H */
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 69680784448a..2429b79f6da2 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -64,7 +64,7 @@ static struct resource usb_resources[] = {
64 }, 64 },
65}; 65};
66 66
67static u64 usb_dmamask = DMA_32BIT_MASK; 67static u64 usb_dmamask = DMA_BIT_MASK(32);
68 68
69static struct platform_device usb_dev = { 69static struct platform_device usb_dev = {
70 .name = "musb_hdrc", 70 .name = "musb_hdrc",
@@ -72,7 +72,7 @@ static struct platform_device usb_dev = {
72 .dev = { 72 .dev = {
73 .platform_data = &usb_data, 73 .platform_data = &usb_data,
74 .dma_mask = &usb_dmamask, 74 .dma_mask = &usb_dmamask,
75 .coherent_dma_mask = DMA_32BIT_MASK, 75 .coherent_dma_mask = DMA_BIT_MASK(32),
76 }, 76 },
77 .resource = usb_resources, 77 .resource = usb_resources,
78 .num_resources = ARRAY_SIZE(usb_resources), 78 .num_resources = ARRAY_SIZE(usb_resources),
diff --git a/arch/arm/mach-gemini/include/mach/system.h b/arch/arm/mach-gemini/include/mach/system.h
index bbbd72767a02..4d9c1f872472 100644
--- a/arch/arm/mach-gemini/include/mach/system.h
+++ b/arch/arm/mach-gemini/include/mach/system.h
@@ -28,7 +28,7 @@ static inline void arch_idle(void)
28 cpu_do_idle(); 28 cpu_do_idle();
29} 29}
30 30
31static inline void arch_reset(char mode) 31static inline void arch_reset(char mode, const char *cmd)
32{ 32{
33 __raw_writel(RESET_GLOBAL | RESET_CPU1, 33 __raw_writel(RESET_GLOBAL | RESET_CPU1,
34 IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET); 34 IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET);
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index cfd4d2e6dacd..bee42c609df6 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -307,7 +307,7 @@ static struct resource iop13xx_adma_2_resources[] = {
307 } 307 }
308}; 308};
309 309
310static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK; 310static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64);
311static struct iop_adma_platform_data iop13xx_adma_0_data = { 311static struct iop_adma_platform_data iop13xx_adma_0_data = {
312 .hw_id = 0, 312 .hw_id = 0,
313 .pool_size = PAGE_SIZE, 313 .pool_size = PAGE_SIZE,
@@ -331,7 +331,7 @@ static struct platform_device iop13xx_adma_0_channel = {
331 .resource = iop13xx_adma_0_resources, 331 .resource = iop13xx_adma_0_resources,
332 .dev = { 332 .dev = {
333 .dma_mask = &iop13xx_adma_dmamask, 333 .dma_mask = &iop13xx_adma_dmamask,
334 .coherent_dma_mask = DMA_64BIT_MASK, 334 .coherent_dma_mask = DMA_BIT_MASK(64),
335 .platform_data = (void *) &iop13xx_adma_0_data, 335 .platform_data = (void *) &iop13xx_adma_0_data,
336 }, 336 },
337}; 337};
@@ -343,7 +343,7 @@ static struct platform_device iop13xx_adma_1_channel = {
343 .resource = iop13xx_adma_1_resources, 343 .resource = iop13xx_adma_1_resources,
344 .dev = { 344 .dev = {
345 .dma_mask = &iop13xx_adma_dmamask, 345 .dma_mask = &iop13xx_adma_dmamask,
346 .coherent_dma_mask = DMA_64BIT_MASK, 346 .coherent_dma_mask = DMA_BIT_MASK(64),
347 .platform_data = (void *) &iop13xx_adma_1_data, 347 .platform_data = (void *) &iop13xx_adma_1_data,
348 }, 348 },
349}; 349};
@@ -355,7 +355,7 @@ static struct platform_device iop13xx_adma_2_channel = {
355 .resource = iop13xx_adma_2_resources, 355 .resource = iop13xx_adma_2_resources,
356 .dev = { 356 .dev = {
357 .dma_mask = &iop13xx_adma_dmamask, 357 .dma_mask = &iop13xx_adma_dmamask,
358 .coherent_dma_mask = DMA_64BIT_MASK, 358 .coherent_dma_mask = DMA_BIT_MASK(64),
359 .platform_data = (void *) &iop13xx_adma_2_data, 359 .platform_data = (void *) &iop13xx_adma_2_data,
360 }, 360 },
361}; 361};
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c
index c6af1e1bee32..6fdad7a0425a 100644
--- a/arch/arm/mach-iop13xx/tpmi.c
+++ b/arch/arm/mach-iop13xx/tpmi.c
@@ -151,7 +151,7 @@ static struct resource iop13xx_tpmi_3_resources[] = {
151 } 151 }
152}; 152};
153 153
154u64 iop13xx_tpmi_mask = DMA_64BIT_MASK; 154u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64);
155static struct platform_device iop13xx_tpmi_0_device = { 155static struct platform_device iop13xx_tpmi_0_device = {
156 .name = "iop-tpmi", 156 .name = "iop-tpmi",
157 .id = 0, 157 .id = 0,
@@ -159,7 +159,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
159 .resource = iop13xx_tpmi_0_resources, 159 .resource = iop13xx_tpmi_0_resources,
160 .dev = { 160 .dev = {
161 .dma_mask = &iop13xx_tpmi_mask, 161 .dma_mask = &iop13xx_tpmi_mask,
162 .coherent_dma_mask = DMA_64BIT_MASK, 162 .coherent_dma_mask = DMA_BIT_MASK(64),
163 }, 163 },
164}; 164};
165 165
@@ -170,7 +170,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
170 .resource = iop13xx_tpmi_1_resources, 170 .resource = iop13xx_tpmi_1_resources,
171 .dev = { 171 .dev = {
172 .dma_mask = &iop13xx_tpmi_mask, 172 .dma_mask = &iop13xx_tpmi_mask,
173 .coherent_dma_mask = DMA_64BIT_MASK, 173 .coherent_dma_mask = DMA_BIT_MASK(64),
174 }, 174 },
175}; 175};
176 176
@@ -181,7 +181,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
181 .resource = iop13xx_tpmi_2_resources, 181 .resource = iop13xx_tpmi_2_resources,
182 .dev = { 182 .dev = {
183 .dma_mask = &iop13xx_tpmi_mask, 183 .dma_mask = &iop13xx_tpmi_mask,
184 .coherent_dma_mask = DMA_64BIT_MASK, 184 .coherent_dma_mask = DMA_BIT_MASK(64),
185 }, 185 },
186}; 186};
187 187
@@ -192,7 +192,7 @@ static struct platform_device iop13xx_tpmi_3_device = {
192 .resource = iop13xx_tpmi_3_resources, 192 .resource = iop13xx_tpmi_3_resources,
193 .dev = { 193 .dev = {
194 .dma_mask = &iop13xx_tpmi_mask, 194 .dma_mask = &iop13xx_tpmi_mask,
195 .coherent_dma_mask = DMA_64BIT_MASK, 195 .coherent_dma_mask = DMA_BIT_MASK(64),
196 }, 196 },
197}; 197};
198 198
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 3d2fae846512..16dc9ea08393 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -508,7 +508,7 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
508 .dram = &kirkwood_mbus_dram_info, 508 .dram = &kirkwood_mbus_dram_info,
509}; 509};
510 510
511static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK; 511static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
512 512
513 513
514/***************************************************************************** 514/*****************************************************************************
@@ -559,7 +559,7 @@ static struct platform_device kirkwood_xor00_channel = {
559 .resource = kirkwood_xor00_resources, 559 .resource = kirkwood_xor00_resources,
560 .dev = { 560 .dev = {
561 .dma_mask = &kirkwood_xor_dmamask, 561 .dma_mask = &kirkwood_xor_dmamask,
562 .coherent_dma_mask = DMA_64BIT_MASK, 562 .coherent_dma_mask = DMA_BIT_MASK(64),
563 .platform_data = (void *)&kirkwood_xor00_data, 563 .platform_data = (void *)&kirkwood_xor00_data,
564 }, 564 },
565}; 565};
@@ -585,7 +585,7 @@ static struct platform_device kirkwood_xor01_channel = {
585 .resource = kirkwood_xor01_resources, 585 .resource = kirkwood_xor01_resources,
586 .dev = { 586 .dev = {
587 .dma_mask = &kirkwood_xor_dmamask, 587 .dma_mask = &kirkwood_xor_dmamask,
588 .coherent_dma_mask = DMA_64BIT_MASK, 588 .coherent_dma_mask = DMA_BIT_MASK(64),
589 .platform_data = (void *)&kirkwood_xor01_data, 589 .platform_data = (void *)&kirkwood_xor01_data,
590 }, 590 },
591}; 591};
@@ -657,7 +657,7 @@ static struct platform_device kirkwood_xor10_channel = {
657 .resource = kirkwood_xor10_resources, 657 .resource = kirkwood_xor10_resources,
658 .dev = { 658 .dev = {
659 .dma_mask = &kirkwood_xor_dmamask, 659 .dma_mask = &kirkwood_xor_dmamask,
660 .coherent_dma_mask = DMA_64BIT_MASK, 660 .coherent_dma_mask = DMA_BIT_MASK(64),
661 .platform_data = (void *)&kirkwood_xor10_data, 661 .platform_data = (void *)&kirkwood_xor10_data,
662 }, 662 },
663}; 663};
@@ -683,7 +683,7 @@ static struct platform_device kirkwood_xor11_channel = {
683 .resource = kirkwood_xor11_resources, 683 .resource = kirkwood_xor11_resources,
684 .dev = { 684 .dev = {
685 .dma_mask = &kirkwood_xor_dmamask, 685 .dma_mask = &kirkwood_xor_dmamask,
686 .coherent_dma_mask = DMA_64BIT_MASK, 686 .coherent_dma_mask = DMA_BIT_MASK(64),
687 .platform_data = (void *)&kirkwood_xor11_data, 687 .platform_data = (void *)&kirkwood_xor11_data,
688 }, 688 },
689}; 689};
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
index 001edfefec19..4f5b0e0ce6cf 100644
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ b/arch/arm/mach-mmp/include/mach/system.h
@@ -14,7 +14,7 @@ static inline void arch_idle(void)
14 cpu_do_idle(); 14 cpu_do_idle();
15} 15}
16 16
17static inline void arch_reset(char mode) 17static inline void arch_reset(char mode, const char *cmd)
18{ 18{
19 cpu_reset(0); 19 cpu_reset(0);
20} 20}
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile
index 82f1309568ef..7f86fe073ec6 100644
--- a/arch/arm/mach-mx1/Makefile
+++ b/arch/arm/mach-mx1/Makefile
@@ -6,6 +6,9 @@
6 6
7obj-y += generic.o clock.o devices.o 7obj-y += generic.o clock.o devices.o
8 8
9# Support for CMOS sensor interface
10obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o
11
9# Specific board support 12# Specific board support
10obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o 13obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
11obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file 14obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c
index 97f42d96d7a1..76d1ffb48079 100644
--- a/arch/arm/mach-mx1/devices.c
+++ b/arch/arm/mach-mx1/devices.c
@@ -44,7 +44,7 @@ static struct resource imx_csi_resources[] = {
44static u64 imx_csi_dmamask = 0xffffffffUL; 44static u64 imx_csi_dmamask = 0xffffffffUL;
45 45
46struct platform_device imx_csi_device = { 46struct platform_device imx_csi_device = {
47 .name = "imx-csi", 47 .name = "mx1-camera",
48 .id = 0, /* This is used to put cameras on this interface */ 48 .id = 0, /* This is used to put cameras on this interface */
49 .dev = { 49 .dev = {
50 .dma_mask = &imx_csi_dmamask, 50 .dma_mask = &imx_csi_dmamask,
diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-mx1/ksym_mx1.c
new file mode 100644
index 000000000000..b09ee12a4ff0
--- /dev/null
+++ b/arch/arm/mach-mx1/ksym_mx1.c
@@ -0,0 +1,18 @@
1/*
2 * Exported ksyms of ARCH_MX1
3 *
4 * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/platform_device.h>
12#include <linux/module.h>
13
14#include <mach/mx1_camera.h>
15
16/* IMX camera FIQ handler */
17EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
18EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-mx1/mx1_camera_fiq.S
new file mode 100644
index 000000000000..9c69aa65bf17
--- /dev/null
+++ b/arch/arm/mach-mx1/mx1_camera_fiq.S
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
3 *
4 * Based on linux/arch/arm/lib/floppydma.S
5 * Copyright (C) 1995, 1996 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/linkage.h>
12#include <asm/assembler.h>
13
14 .text
15 .global mx1_camera_sof_fiq_end
16 .global mx1_camera_sof_fiq_start
17mx1_camera_sof_fiq_start:
18 @ enable dma
19 ldr r12, [r9]
20 orr r12, r12, #0x00000001
21 str r12, [r9]
22 @ unmask DMA interrupt
23 ldr r12, [r8]
24 bic r12, r12, r13
25 str r12, [r8]
26 @ disable SOF interrupt
27 ldr r12, [r10]
28 bic r12, r12, #0x00010000
29 str r12, [r10]
30 @ clear SOF flag
31 mov r12, #0x00010000
32 str r12, [r11]
33 @ return from FIQ
34 subs pc, lr, #4
35mx1_camera_sof_fiq_end:
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c
index ca46f4801c3d..9957a11533a4 100644
--- a/arch/arm/mach-mx3/clock.c
+++ b/arch/arm/mach-mx3/clock.c
@@ -533,7 +533,7 @@ static struct clk_lookup lookups[] __initdata = {
533 _REGISTER_CLOCK(NULL, "kpp", kpp_clk) 533 _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
534 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) 534 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1)
535 _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) 535 _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2)
536 _REGISTER_CLOCK("mx3-camera.0", "csi", csi_clk) 536 _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
537 _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) 537 _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
538 _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) 538 _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
539 _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) 539 _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index 5fce022114de..c3648eff5137 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -24,7 +24,7 @@
24#include <linux/mtd/plat-ram.h> 24#include <linux/mtd/plat-ram.h>
25#include <linux/memory.h> 25#include <linux/memory.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/smc911x.h> 27#include <linux/smsc911x.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/i2c.h> 29#include <linux/i2c.h>
30#include <linux/i2c/at24.h> 30#include <linux/i2c/at24.h>
@@ -70,7 +70,7 @@ static struct imxuart_platform_data uart_pdata = {
70 .flags = IMXUART_HAVE_RTSCTS, 70 .flags = IMXUART_HAVE_RTSCTS,
71}; 71};
72 72
73static struct resource smc911x_resources[] = { 73static struct resource smsc911x_resources[] = {
74 [0] = { 74 [0] = {
75 .start = CS1_BASE_ADDR + 0x300, 75 .start = CS1_BASE_ADDR + 0x300,
76 .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, 76 .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
@@ -79,22 +79,25 @@ static struct resource smc911x_resources[] = {
79 [1] = { 79 [1] = {
80 .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), 80 .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
81 .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), 81 .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
82 .flags = IORESOURCE_IRQ, 82 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
83 }, 83 },
84}; 84};
85 85
86static struct smc911x_platdata smc911x_info = { 86static struct smsc911x_platform_config smsc911x_info = {
87 .flags = SMC911X_USE_32BIT, 87 .flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY |
88 .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, 88 SMSC911X_SAVE_MAC_ADDRESS,
89 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
90 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
91 .phy_interface = PHY_INTERFACE_MODE_MII,
89}; 92};
90 93
91static struct platform_device pcm037_eth = { 94static struct platform_device pcm037_eth = {
92 .name = "smc911x", 95 .name = "smsc911x",
93 .id = -1, 96 .id = -1,
94 .num_resources = ARRAY_SIZE(smc911x_resources), 97 .num_resources = ARRAY_SIZE(smsc911x_resources),
95 .resource = smc911x_resources, 98 .resource = smsc911x_resources,
96 .dev = { 99 .dev = {
97 .platform_data = &smc911x_info, 100 .platform_data = &smsc911x_info,
98 }, 101 },
99}; 102};
100 103
diff --git a/arch/arm/mach-netx/include/mach/netx-regs.h b/arch/arm/mach-netx/include/mach/netx-regs.h
index 08c60ff227be..5a03e7ccb01a 100644
--- a/arch/arm/mach-netx/include/mach/netx-regs.h
+++ b/arch/arm/mach-netx/include/mach/netx-regs.h
@@ -80,7 +80,7 @@
80#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no)) 80#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no))
81#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC) 81#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC)
82 82
83/* virual addresses */ 83/* virtual addresses */
84#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM) 84#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM)
85#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR) 85#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR)
86#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS) 86#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS)
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 3f325d3718a9..cd8de89c5fad 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -109,7 +109,7 @@ config MACH_OMAP_PALMZ71
109 help 109 help
110 Support for the Palm Zire71 PDA. To boot the kernel, 110 Support for the Palm Zire71 PDA. To boot the kernel,
111 you'll need a PalmOS compatible bootloader; check out 111 you'll need a PalmOS compatible bootloader; check out
112 http://hackndev.com/palm/z71 for more informations. 112 http://hackndev.com/palm/z71 for more information.
113 Say Y here if you have such a PDA, say N otherwise. 113 Say Y here if you have such a PDA, say N otherwise.
114 114
115config MACH_OMAP_PALMTT 115config MACH_OMAP_PALMTT
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a2c3fcc27a22..c49d9bfa3abd 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -47,6 +47,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
47 47
48obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ 48obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
49 board-rx51-peripherals.o \ 49 board-rx51-peripherals.o \
50 mmc-twl4030.o
51
50# Platform specific device init code 52# Platform specific device init code
51ifeq ($(CONFIG_USB_MUSB_SOC),y) 53ifeq ($(CONFIG_USB_MUSB_SOC),y)
52obj-y += usb-musb.o 54obj-y += usb-musb.o
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index e096f776f996..da57b0fcda14 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -23,6 +23,7 @@
23#include <linux/spi/ads7846.h> 23#include <linux/spi/ads7846.h>
24#include <linux/i2c/twl4030.h> 24#include <linux/i2c/twl4030.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/smsc911x.h>
26 27
27#include <mach/hardware.h> 28#include <mach/hardware.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
@@ -41,12 +42,12 @@
41 42
42#include "mmc-twl4030.h" 43#include "mmc-twl4030.h"
43 44
44#define LDP_SMC911X_CS 1 45#define LDP_SMSC911X_CS 1
45#define LDP_SMC911X_GPIO 152 46#define LDP_SMSC911X_GPIO 152
46#define DEBUG_BASE 0x08000000 47#define DEBUG_BASE 0x08000000
47#define LDP_ETHR_START DEBUG_BASE 48#define LDP_ETHR_START DEBUG_BASE
48 49
49static struct resource ldp_smc911x_resources[] = { 50static struct resource ldp_smsc911x_resources[] = {
50 [0] = { 51 [0] = {
51 .start = LDP_ETHR_START, 52 .start = LDP_ETHR_START,
52 .end = LDP_ETHR_START + SZ_4K, 53 .end = LDP_ETHR_START + SZ_4K,
@@ -59,40 +60,50 @@ static struct resource ldp_smc911x_resources[] = {
59 }, 60 },
60}; 61};
61 62
62static struct platform_device ldp_smc911x_device = { 63static struct smsc911x_platform_config ldp_smsc911x_config = {
63 .name = "smc911x", 64 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
65 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
66 .flags = SMSC911X_USE_32BIT,
67 .phy_interface = PHY_INTERFACE_MODE_MII,
68};
69
70static struct platform_device ldp_smsc911x_device = {
71 .name = "smsc911x",
64 .id = -1, 72 .id = -1,
65 .num_resources = ARRAY_SIZE(ldp_smc911x_resources), 73 .num_resources = ARRAY_SIZE(ldp_smsc911x_resources),
66 .resource = ldp_smc911x_resources, 74 .resource = ldp_smsc911x_resources,
75 .dev = {
76 .platform_data = &ldp_smsc911x_config,
77 },
67}; 78};
68 79
69static struct platform_device *ldp_devices[] __initdata = { 80static struct platform_device *ldp_devices[] __initdata = {
70 &ldp_smc911x_device, 81 &ldp_smsc911x_device,
71}; 82};
72 83
73static inline void __init ldp_init_smc911x(void) 84static inline void __init ldp_init_smsc911x(void)
74{ 85{
75 int eth_cs; 86 int eth_cs;
76 unsigned long cs_mem_base; 87 unsigned long cs_mem_base;
77 int eth_gpio = 0; 88 int eth_gpio = 0;
78 89
79 eth_cs = LDP_SMC911X_CS; 90 eth_cs = LDP_SMSC911X_CS;
80 91
81 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { 92 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
82 printk(KERN_ERR "Failed to request GPMC mem for smc911x\n"); 93 printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n");
83 return; 94 return;
84 } 95 }
85 96
86 ldp_smc911x_resources[0].start = cs_mem_base + 0x0; 97 ldp_smsc911x_resources[0].start = cs_mem_base + 0x0;
87 ldp_smc911x_resources[0].end = cs_mem_base + 0xff; 98 ldp_smsc911x_resources[0].end = cs_mem_base + 0xff;
88 udelay(100); 99 udelay(100);
89 100
90 eth_gpio = LDP_SMC911X_GPIO; 101 eth_gpio = LDP_SMSC911X_GPIO;
91 102
92 ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); 103 ldp_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
93 104
94 if (gpio_request(eth_gpio, "smc911x irq") < 0) { 105 if (gpio_request(eth_gpio, "smsc911x irq") < 0) {
95 printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", 106 printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
96 eth_gpio); 107 eth_gpio);
97 return; 108 return;
98 } 109 }
@@ -104,7 +115,7 @@ static void __init omap_ldp_init_irq(void)
104 omap2_init_common_hw(NULL); 115 omap2_init_common_hw(NULL);
105 omap_init_irq(); 116 omap_init_irq();
106 omap_gpio_init(); 117 omap_gpio_init();
107 ldp_init_smc911x(); 118 ldp_init_smsc911x();
108} 119}
109 120
110static struct omap_uart_config ldp_uart_config __initdata = { 121static struct omap_uart_config ldp_uart_config __initdata = {
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index b3f6e9d81807..b1f23bea863f 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -57,6 +57,9 @@
57#define GPMC_CS0_BASE 0x60 57#define GPMC_CS0_BASE 0x60
58#define GPMC_CS_SIZE 0x30 58#define GPMC_CS_SIZE 0x30
59 59
60#define OVERO_SMSC911X_CS 5
61#define OVERO_SMSC911X_GPIO 176
62
60#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ 63#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
61 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 64 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
62 65
@@ -116,6 +119,67 @@ static void __init overo_ads7846_init(void)
116static inline void __init overo_ads7846_init(void) { return; } 119static inline void __init overo_ads7846_init(void) { return; }
117#endif 120#endif
118 121
122#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
123
124#include <linux/smsc911x.h>
125
126static struct resource overo_smsc911x_resources[] = {
127 {
128 .name = "smsc911x-memory",
129 .flags = IORESOURCE_MEM,
130 },
131 {
132 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
133 },
134};
135
136static struct smsc911x_platform_config overo_smsc911x_config = {
137 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
138 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
139 .flags = SMSC911X_USE_32BIT ,
140 .phy_interface = PHY_INTERFACE_MODE_MII,
141};
142
143static struct platform_device overo_smsc911x_device = {
144 .name = "smsc911x",
145 .id = -1,
146 .num_resources = ARRAY_SIZE(overo_smsc911x_resources),
147 .resource = &overo_smsc911x_resources,
148 .dev = {
149 .platform_data = &overo_smsc911x_config,
150 },
151};
152
153static inline void __init overo_init_smsc911x(void)
154{
155 unsigned long cs_mem_base;
156
157 if (gpmc_cs_request(OVERO_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) {
158 printk(KERN_ERR "Failed request for GPMC mem for smsc911x\n");
159 return;
160 }
161
162 overo_smsc911x_resources[0].start = cs_mem_base + 0x0;
163 overo_smsc911x_resources[0].end = cs_mem_base + 0xff;
164
165 if ((gpio_request(OVERO_SMSC911X_GPIO, "SMSC911X IRQ") == 0) &&
166 (gpio_direction_input(OVERO_SMSC911X_GPIO) == 0)) {
167 gpio_export(OVERO_SMSC911X_GPIO, 0);
168 } else {
169 printk(KERN_ERR "could not obtain gpio for SMSC911X IRQ\n");
170 return;
171 }
172
173 overo_smsc911x_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X_GPIO);
174 overo_smsc911x_resources[1].end = 0;
175
176 platform_device_register(&overo_smsc911x_device);
177}
178
179#else
180static inline void __init overo_init_smsc911x(void) { return; }
181#endif
182
119static struct mtd_partition overo_nand_partitions[] = { 183static struct mtd_partition overo_nand_partitions[] = {
120 { 184 {
121 .name = "xloader", 185 .name = "xloader",
@@ -290,6 +354,7 @@ static void __init overo_init(void)
290 overo_flash_init(); 354 overo_flash_init();
291 usb_musb_init(); 355 usb_musb_init();
292 overo_ads7846_init(); 356 overo_ads7846_init();
357 overo_init_smsc911x();
293 358
294 if ((gpio_request(OVERO_GPIO_W2W_NRESET, 359 if ((gpio_request(OVERO_GPIO_W2W_NRESET,
295 "OVERO_GPIO_W2W_NRESET") == 0) && 360 "OVERO_GPIO_W2W_NRESET") == 0) &&
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 68cc3efae567..6af99ddabdfb 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -463,7 +463,7 @@ static struct platform_device orion5x_xor_shared = {
463 .resource = orion5x_xor_shared_resources, 463 .resource = orion5x_xor_shared_resources,
464}; 464};
465 465
466static u64 orion5x_xor_dmamask = DMA_32BIT_MASK; 466static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32);
467 467
468static struct resource orion5x_xor0_resources[] = { 468static struct resource orion5x_xor0_resources[] = {
469 [0] = { 469 [0] = {
@@ -486,7 +486,7 @@ static struct platform_device orion5x_xor0_channel = {
486 .resource = orion5x_xor0_resources, 486 .resource = orion5x_xor0_resources,
487 .dev = { 487 .dev = {
488 .dma_mask = &orion5x_xor_dmamask, 488 .dma_mask = &orion5x_xor_dmamask,
489 .coherent_dma_mask = DMA_64BIT_MASK, 489 .coherent_dma_mask = DMA_BIT_MASK(64),
490 .platform_data = (void *)&orion5x_xor0_data, 490 .platform_data = (void *)&orion5x_xor0_data,
491 }, 491 },
492}; 492};
@@ -512,7 +512,7 @@ static struct platform_device orion5x_xor1_channel = {
512 .resource = orion5x_xor1_resources, 512 .resource = orion5x_xor1_resources,
513 .dev = { 513 .dev = {
514 .dma_mask = &orion5x_xor_dmamask, 514 .dma_mask = &orion5x_xor_dmamask,
515 .coherent_dma_mask = DMA_64BIT_MASK, 515 .coherent_dma_mask = DMA_BIT_MASK(64),
516 .platform_data = (void *)&orion5x_xor1_data, 516 .platform_data = (void *)&orion5x_xor1_data,
517 }, 517 },
518}; 518};
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
index 2206cb61a9f9..b87cecd9bbdc 100644
--- a/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
+++ b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
@@ -38,6 +38,7 @@ struct pxa2xx_spi_chip {
38 u8 dma_burst_size; 38 u8 dma_burst_size;
39 u32 timeout; 39 u32 timeout;
40 u8 enable_loopback; 40 u8 enable_loopback;
41 int gpio_cs;
41 void (*cs_control)(u32 command); 42 void (*cs_control)(u32 command);
42}; 43};
43 44
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
index eb35fca9aea5..3478eae32d8a 100644
--- a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
+++ b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
@@ -49,6 +49,9 @@ struct pxa3xx_nand_platform_data {
49 */ 49 */
50 int enable_arbiter; 50 int enable_arbiter;
51 51
52 /* allow platform code to keep OBM/bootloader defined NFC config */
53 int keep_config;
54
52 const struct mtd_partition *parts; 55 const struct mtd_partition *parts;
53 unsigned int nr_parts; 56 unsigned int nr_parts;
54 57
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index d46b36746be2..deeea1c2782b 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -507,7 +507,6 @@ static struct resource pasic3_resources[] = {
507}; 507};
508 508
509static struct pasic3_platform_data pasic3_platform_data = { 509static struct pasic3_platform_data pasic3_platform_data = {
510 .bus_shift = 2,
511 .led_pdata = &pasic3_leds_info, 510 .led_pdata = &pasic3_leds_info,
512 .clock_rate = 4000000, 511 .clock_rate = 4000000,
513}; 512};
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index f46698e20c1f..6112740b4ae9 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -380,14 +380,49 @@ static struct pca953x_platform_data pca9536_data = {
380 .gpio_base = NR_BUILTIN_GPIO + 1, 380 .gpio_base = NR_BUILTIN_GPIO + 1,
381}; 381};
382 382
383static struct soc_camera_link iclink[] = { 383static int gpio_bus_switch;
384 { 384
385 .bus_id = 0, /* Must match with the camera ID above */ 385static int pcm990_camera_set_bus_param(struct soc_camera_link *link,
386 .gpio = NR_BUILTIN_GPIO + 1, 386 unsigned long flags)
387 }, { 387{
388 .bus_id = 0, /* Must match with the camera ID above */ 388 if (gpio_bus_switch <= 0) {
389 .gpio = -ENXIO, 389 if (flags == SOCAM_DATAWIDTH_10)
390 return 0;
391 else
392 return -EINVAL;
393 }
394
395 if (flags & SOCAM_DATAWIDTH_8)
396 gpio_set_value(gpio_bus_switch, 1);
397 else
398 gpio_set_value(gpio_bus_switch, 0);
399
400 return 0;
401}
402
403static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
404{
405 int ret;
406
407 if (!gpio_bus_switch) {
408 ret = gpio_request(NR_BUILTIN_GPIO + 1, "camera");
409 if (!ret) {
410 gpio_bus_switch = NR_BUILTIN_GPIO + 1;
411 gpio_direction_output(gpio_bus_switch, 0);
412 } else
413 gpio_bus_switch = -EINVAL;
390 } 414 }
415
416 if (gpio_bus_switch > 0)
417 return SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_10;
418 else
419 return SOCAM_DATAWIDTH_10;
420}
421
422static struct soc_camera_link iclink = {
423 .bus_id = 0, /* Must match with the camera ID above */
424 .query_bus_param = pcm990_camera_query_bus_param,
425 .set_bus_param = pcm990_camera_set_bus_param,
391}; 426};
392 427
393/* Board I2C devices. */ 428/* Board I2C devices. */
@@ -398,10 +433,10 @@ static struct i2c_board_info __initdata pcm990_i2c_devices[] = {
398 .platform_data = &pca9536_data, 433 .platform_data = &pca9536_data,
399 }, { 434 }, {
400 I2C_BOARD_INFO("mt9v022", 0x48), 435 I2C_BOARD_INFO("mt9v022", 0x48),
401 .platform_data = &iclink[0], /* With extender */ 436 .platform_data = &iclink, /* With extender */
402 }, { 437 }, {
403 I2C_BOARD_INFO("mt9m001", 0x5d), 438 I2C_BOARD_INFO("mt9m001", 0x5d),
404 .platform_data = &iclink[0], /* With extender */ 439 .platform_data = &iclink, /* With extender */
405 }, 440 },
406}; 441};
407#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ 442#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index d6766685cfc7..9ab947c14f26 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -28,7 +28,7 @@
28#include <linux/clocksource.h> 28#include <linux/clocksource.h>
29#include <linux/clockchips.h> 29#include <linux/clockchips.h>
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/smc911x.h> 31#include <linux/smsc911x.h>
32#include <linux/ata_platform.h> 32#include <linux/ata_platform.h>
33 33
34#include <asm/clkdev.h> 34#include <asm/clkdev.h>
@@ -128,14 +128,15 @@ int realview_flash_register(struct resource *res, u32 num)
128 return platform_device_register(&realview_flash_device); 128 return platform_device_register(&realview_flash_device);
129} 129}
130 130
131static struct smc911x_platdata realview_smc911x_platdata = { 131static struct smsc911x_platform_config smsc911x_config = {
132 .flags = SMC911X_USE_32BIT, 132 .flags = SMSC911X_USE_32BIT,
133 .irq_flags = IRQF_SHARED, 133 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
134 .irq_polarity = 1, 134 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
135 .phy_interface = PHY_INTERFACE_MODE_MII,
135}; 136};
136 137
137static struct platform_device realview_eth_device = { 138static struct platform_device realview_eth_device = {
138 .name = "smc911x", 139 .name = "smsc911x",
139 .id = 0, 140 .id = 0,
140 .num_resources = 2, 141 .num_resources = 2,
141}; 142};
@@ -145,8 +146,8 @@ int realview_eth_register(const char *name, struct resource *res)
145 if (name) 146 if (name)
146 realview_eth_device.name = name; 147 realview_eth_device.name = name;
147 realview_eth_device.resource = res; 148 realview_eth_device.resource = res;
148 if (strcmp(realview_eth_device.name, "smc911x") == 0) 149 if (strcmp(realview_eth_device.name, "smsc911x") == 0)
149 realview_eth_device.dev.platform_data = &realview_smc911x_platdata; 150 realview_eth_device.dev.platform_data = &smsc911x_config;
150 151
151 return platform_device_register(&realview_eth_device); 152 return platform_device_register(&realview_eth_device);
152} 153}
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c
index 67d6d9cc68b2..d0d39adf6407 100644
--- a/arch/arm/mach-realview/localtimer.c
+++ b/arch/arm/mach-realview/localtimer.c
@@ -191,6 +191,7 @@ void __cpuinit local_timer_setup(void)
191 clk->name = "dummy_timer"; 191 clk->name = "dummy_timer";
192 clk->features = CLOCK_EVT_FEAT_DUMMY; 192 clk->features = CLOCK_EVT_FEAT_DUMMY;
193 clk->rating = 200; 193 clk->rating = 200;
194 clk->mult = 1;
194 clk->set_mode = dummy_timer_set_mode; 195 clk->set_mode = dummy_timer_set_mode;
195 clk->broadcast = smp_timer_broadcast; 196 clk->broadcast = smp_timer_broadcast;
196 clk->cpumask = cpumask_of(cpu); 197 clk->cpumask = cpumask_of(cpu);
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 01bd76725b92..4389c160f7d0 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -409,8 +409,7 @@ static struct platform_device bast_sio = {
409static struct s3c2410_platform_i2c __initdata bast_i2c_info = { 409static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
410 .flags = 0, 410 .flags = 0,
411 .slave_addr = 0x10, 411 .slave_addr = 0x10,
412 .bus_freq = 100*1000, 412 .frequency = 100*1000,
413 .max_freq = 130*1000,
414}; 413};
415 414
416/* Asix AX88796 10/100 ethernet controller */ 415/* Asix AX88796 10/100 ethernet controller */
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 05a5e877b49b..2b83f8707710 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -340,8 +340,7 @@ static struct platform_device *n35_devices[] __initdata = {
340static struct s3c2410_platform_i2c n30_i2ccfg = { 340static struct s3c2410_platform_i2c n30_i2ccfg = {
341 .flags = 0, 341 .flags = 0,
342 .slave_addr = 0x10, 342 .slave_addr = 0x10,
343 .bus_freq = 10*1000, 343 .frequency = 10*1000,
344 .max_freq = 10*1000,
345}; 344};
346 345
347/* Lots of hardcoded stuff, but it sets up the hardware in a useful 346/* Lots of hardcoded stuff, but it sets up the hardware in a useful
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 72c266aee141..332bd3263eaf 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -453,8 +453,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
453/* I2C bus and device configuration. */ 453/* I2C bus and device configuration. */
454 454
455static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = { 455static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = {
456 .max_freq = 80 * 1000, 456 .frequency = 80 * 1000,
457 .bus_freq = 50 * 1000,
458 .flags = S3C_IICFLG_FILTER, 457 .flags = S3C_IICFLG_FILTER,
459 .sda_delay = 2, 458 .sda_delay = 2,
460}; 459};
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S
index 94077fbd96b7..6f7e70907e44 100644
--- a/arch/arm/mm/abort-ev6.S
+++ b/arch/arm/mm/abort-ev6.S
@@ -29,10 +29,10 @@ ENTRY(v6_early_abort)
29 mrc p15, 0, r1, c5, c0, 0 @ get FSR 29 mrc p15, 0, r1, c5, c0, 0 @ get FSR
30 mrc p15, 0, r0, c6, c0, 0 @ get FAR 30 mrc p15, 0, r0, c6, c0, 0 @ get FAR
31/* 31/*
32 * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR. 32 * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103).
33 * The test below covers all the write situations, including Java bytecodes 33 * The test below covers all the write situations, including Java bytecodes
34 */ 34 */
35 bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR 35 bic r1, r1, #1 << 11 @ clear bit 11 of FSR
36 tst r3, #PSR_J_BIT @ Java? 36 tst r3, #PSR_J_BIT @ Java?
37 movne pc, lr 37 movne pc, lr
38 do_thumb_abort 38 do_thumb_abort
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
index d6dd83826f8a..6e77c042d8e9 100644
--- a/arch/arm/mm/cache-feroceon-l2.c
+++ b/arch/arm/mm/cache-feroceon-l2.c
@@ -115,6 +115,10 @@ static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
115 raw_local_irq_restore(flags); 115 raw_local_irq_restore(flags);
116} 116}
117 117
118static inline void l2_inv_all(void)
119{
120 __asm__("mcr p15, 1, %0, c15, c11, 0" : : "r" (0));
121}
118 122
119/* 123/*
120 * Linux primitives. 124 * Linux primitives.
@@ -254,9 +258,7 @@ static void __init enable_dcache(void)
254 258
255static void __init __invalidate_icache(void) 259static void __init __invalidate_icache(void)
256{ 260{
257 int dummy; 261 __asm__("mcr p15, 0, %0, c7, c5, 0" : : "r" (0));
258
259 __asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0" : "=r" (dummy));
260} 262}
261 263
262static int __init invalidate_and_disable_icache(void) 264static int __init invalidate_and_disable_icache(void)
@@ -321,6 +323,7 @@ static void __init enable_l2(void)
321 323
322 d = flush_and_disable_dcache(); 324 d = flush_and_disable_dcache();
323 i = invalidate_and_disable_icache(); 325 i = invalidate_and_disable_icache();
326 l2_inv_all();
324 write_extra_features(u | 0x00400000); 327 write_extra_features(u | 0x00400000);
325 if (i) 328 if (i)
326 enable_icache(); 329 enable_icache();
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index f72420821619..3c127aabe214 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -119,7 +119,7 @@ static struct resource iop3xx_aau_resources[] = {
119 } 119 }
120}; 120};
121 121
122static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK; 122static u64 iop3xx_adma_dmamask = DMA_BIT_MASK(32);
123 123
124static struct iop_adma_platform_data iop3xx_dma_0_data = { 124static struct iop_adma_platform_data iop3xx_dma_0_data = {
125 .hw_id = DMA0_ID, 125 .hw_id = DMA0_ID,
@@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = {
143 .resource = iop3xx_dma_0_resources, 143 .resource = iop3xx_dma_0_resources,
144 .dev = { 144 .dev = {
145 .dma_mask = &iop3xx_adma_dmamask, 145 .dma_mask = &iop3xx_adma_dmamask,
146 .coherent_dma_mask = DMA_64BIT_MASK, 146 .coherent_dma_mask = DMA_BIT_MASK(64),
147 .platform_data = (void *) &iop3xx_dma_0_data, 147 .platform_data = (void *) &iop3xx_dma_0_data,
148 }, 148 },
149}; 149};
@@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = {
155 .resource = iop3xx_dma_1_resources, 155 .resource = iop3xx_dma_1_resources,
156 .dev = { 156 .dev = {
157 .dma_mask = &iop3xx_adma_dmamask, 157 .dma_mask = &iop3xx_adma_dmamask,
158 .coherent_dma_mask = DMA_64BIT_MASK, 158 .coherent_dma_mask = DMA_BIT_MASK(64),
159 .platform_data = (void *) &iop3xx_dma_1_data, 159 .platform_data = (void *) &iop3xx_dma_1_data,
160 }, 160 },
161}; 161};
@@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = {
167 .resource = iop3xx_aau_resources, 167 .resource = iop3xx_aau_resources,
168 .dev = { 168 .dev = {
169 .dma_mask = &iop3xx_adma_dmamask, 169 .dma_mask = &iop3xx_adma_dmamask,
170 .coherent_dma_mask = DMA_64BIT_MASK, 170 .coherent_dma_mask = DMA_BIT_MASK(64),
171 .platform_data = (void *) &iop3xx_aau_data, 171 .platform_data = (void *) &iop3xx_aau_data,
172 }, 172 },
173}; 173};
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h
new file mode 100644
index 000000000000..4a5dc5c6d8e8
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/i2c.h
@@ -0,0 +1,25 @@
1/*
2 * i2c.h - i.MX I2C driver header file
3 *
4 * Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com>
5 *
6 * This file is released under the GPLv2
7 */
8
9#ifndef __ASM_ARCH_I2C_H_
10#define __ASM_ARCH_I2C_H_
11
12/**
13 * struct imxi2c_platform_data - structure of platform data for MXC I2C driver
14 * @init: Initialise gpio's and other board specific things
15 * @exit: Free everything initialised by @init
16 * @bitrate: Bus speed measured in Hz
17 *
18 **/
19struct imxi2c_platform_data {
20 int (*init)(struct device *dev);
21 void (*exit)(struct device *dev);
22 int bitrate;
23};
24
25#endif /* __ASM_ARCH_I2C_H_ */
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h
index e0783e619580..eca37d09f3f8 100644
--- a/arch/arm/plat-mxc/include/mach/memory.h
+++ b/arch/arm/plat-mxc/include/mach/memory.h
@@ -24,4 +24,12 @@
24#define PHYS_OFFSET UL(0x80000000) 24#define PHYS_OFFSET UL(0x80000000)
25#endif 25#endif
26 26
27#if defined(CONFIG_MX1_VIDEO)
28/*
29 * Increase size of DMA-consistent memory region.
30 * This is required for i.MX camera driver to capture at least four VGA frames.
31 */
32#define CONSISTENT_DMA_SIZE SZ_4M
33#endif /* CONFIG_MX1_VIDEO */
34
27#endif /* __ASM_ARCH_MXC_MEMORY_H__ */ 35#endif /* __ASM_ARCH_MXC_MEMORY_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/mx1_camera.h b/arch/arm/plat-mxc/include/mach/mx1_camera.h
new file mode 100644
index 000000000000..4fd6c70314b4
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/mx1_camera.h
@@ -0,0 +1,35 @@
1/*
2 * mx1_camera.h - i.MX1/i.MXL camera driver header file
3 *
4 * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
6 *
7 * Based on PXA camera.h file:
8 * Copyright (C) 2003, Intel Corporation
9 * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_CAMERA_H_
17#define __ASM_ARCH_CAMERA_H_
18
19#define MX1_CAMERA_DATA_HIGH 1
20#define MX1_CAMERA_PCLK_RISING 2
21#define MX1_CAMERA_VSYNC_HIGH 4
22
23extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
24
25/**
26 * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
27 * @mclk_10khz: master clock frequency in 10kHz units
28 * @flags: MX1 camera platform flags
29 */
30struct mx1_camera_pdata {
31 unsigned long mclk_10khz;
32 unsigned long flags;
33};
34
35#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/arch/arm/plat-mxc/include/mach/mx3_camera.h b/arch/arm/plat-mxc/include/mach/mx3_camera.h
new file mode 100644
index 000000000000..36d7ff27b5e2
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/mx3_camera.h
@@ -0,0 +1,52 @@
1/*
2 * mx3_camera.h - i.MX3x camera driver header file
3 *
4 * Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef _MX3_CAMERA_H_
22#define _MX3_CAMERA_H_
23
24#include <linux/device.h>
25
26#define MX3_CAMERA_CLK_SRC 1
27#define MX3_CAMERA_EXT_VSYNC 2
28#define MX3_CAMERA_DP 4
29#define MX3_CAMERA_PCP 8
30#define MX3_CAMERA_HSP 0x10
31#define MX3_CAMERA_VSP 0x20
32#define MX3_CAMERA_DATAWIDTH_4 0x40
33#define MX3_CAMERA_DATAWIDTH_8 0x80
34#define MX3_CAMERA_DATAWIDTH_10 0x100
35#define MX3_CAMERA_DATAWIDTH_15 0x200
36
37#define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \
38 MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15)
39
40/**
41 * struct mx3_camera_pdata - i.MX3x camera platform data
42 * @flags: MX3_CAMERA_* flags
43 * @mclk_10khz: master clock frequency in 10kHz units
44 * @dma_dev: IPU DMA device to match against in channel allocation
45 */
46struct mx3_camera_pdata {
47 unsigned long flags;
48 unsigned long mclk_10khz;
49 struct device *dma_dev;
50};
51
52#endif
diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c
index fe327074037e..428372868fbb 100644
--- a/arch/arm/plat-s3c/dev-i2c0.c
+++ b/arch/arm/plat-s3c/dev-i2c0.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/plat-s3c/dev-i2c0.c 1/* linux/arch/arm/plat-s3c/dev-i2c0.c
2 * 2 *
3 * Copyright 2008 Simtec Electronics 3 * Copyright 2008,2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/ 5 * http://armlinux.simtec.co.uk/
6 * 6 *
@@ -50,9 +50,8 @@ struct platform_device s3c_device_i2c0 = {
50static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { 50static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
51 .flags = 0, 51 .flags = 0,
52 .slave_addr = 0x10, 52 .slave_addr = 0x10,
53 .bus_freq = 100*1000, 53 .frequency = 100*1000,
54 .max_freq = 400*1000, 54 .sda_delay = 100,
55 .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
56}; 55};
57 56
58void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) 57void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c
index 2387fbf57af6..8349c462788c 100644
--- a/arch/arm/plat-s3c/dev-i2c1.c
+++ b/arch/arm/plat-s3c/dev-i2c1.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/plat-s3c/dev-i2c1.c 1/* linux/arch/arm/plat-s3c/dev-i2c1.c
2 * 2 *
3 * Copyright 2008 Simtec Electronics 3 * Copyright 2008,2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/ 5 * http://armlinux.simtec.co.uk/
6 * 6 *
@@ -47,9 +47,8 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = {
47 .flags = 0, 47 .flags = 0,
48 .bus_num = 1, 48 .bus_num = 1,
49 .slave_addr = 0x10, 49 .slave_addr = 0x10,
50 .bus_freq = 100*1000, 50 .frequency = 100*1000,
51 .max_freq = 400*1000, 51 .sda_delay = 100,
52 .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
53}; 52};
54 53
55void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) 54void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
diff --git a/arch/arm/plat-s3c/include/plat/iic.h b/arch/arm/plat-s3c/include/plat/iic.h
index dc1dfcb9bc6c..67450f115748 100644
--- a/arch/arm/plat-s3c/include/plat/iic.h
+++ b/arch/arm/plat-s3c/include/plat/iic.h
@@ -1,9 +1,9 @@
1/* arch/arm/mach-s3c2410/include/mach/iic.h 1/* arch/arm/plat-s3c/include/plat/iic.h
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright 2004,2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2410 - I2C Controller platfrom_device info 6 * S3C - I2C Controller platform_device info
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -15,19 +15,24 @@
15 15
16#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ 16#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
17 17
18/* Notes: 18/**
19 * 1) All frequencies are expressed in Hz 19 * struct s3c2410_platform_i2c - Platform data for s3c I2C.
20 * 2) A value of zero is `do not care` 20 * @bus_num: The bus number to use (if possible).
21*/ 21 * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
22 22 * @slave_addr: The I2C address for the slave device (if enabled).
23 * @frequency: The desired frequency in Hz of the bus. This is
24 * guaranteed to not be exceeded. If the caller does
25 * not care, use zero and the driver will select a
26 * useful default.
27 * @sda_delay: The delay (in ns) applied to SDA edges.
28 * @cfg_gpio: A callback to configure the pins for I2C operation.
29 */
23struct s3c2410_platform_i2c { 30struct s3c2410_platform_i2c {
24 int bus_num; /* bus number to use */ 31 int bus_num;
25 unsigned int flags; 32 unsigned int flags;
26 unsigned int slave_addr; /* slave address for controller */ 33 unsigned int slave_addr;
27 unsigned long bus_freq; /* standard bus frequency */ 34 unsigned long frequency;
28 unsigned long max_freq; /* max frequency for the bus */ 35 unsigned int sda_delay;
29 unsigned long min_freq; /* min frequency for the bus */
30 unsigned int sda_delay; /* pclks (s3c2440 only) */
31 36
32 void (*cfg_gpio)(struct platform_device *dev); 37 void (*cfg_gpio)(struct platform_device *dev);
33}; 38};
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index ba592a9e6fb3..a2bed62aec21 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -15,13 +15,16 @@
15 * r10 = thread_info structure 15 * r10 = thread_info structure
16 * lr = failure return 16 * lr = failure return
17 */ 17 */
18#include <linux/linkage.h> 18#include <asm/thread_info.h>
19#include <linux/init.h>
20#include <asm/asm-offsets.h>
21#include <asm/assembler.h>
22#include <asm/vfpmacros.h> 19#include <asm/vfpmacros.h>
20#include "../kernel/entry-header.S"
23 21
24ENTRY(do_vfp) 22ENTRY(do_vfp)
23#ifdef CONFIG_PREEMPT
24 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
25 add r11, r4, #1 @ increment it
26 str r11, [r10, #TI_PREEMPT]
27#endif
25 enable_irq 28 enable_irq
26 ldr r4, .LCvfp 29 ldr r4, .LCvfp
27 ldr r11, [r10, #TI_CPU] @ CPU number 30 ldr r11, [r10, #TI_CPU] @ CPU number
@@ -30,6 +33,12 @@ ENTRY(do_vfp)
30ENDPROC(do_vfp) 33ENDPROC(do_vfp)
31 34
32ENTRY(vfp_null_entry) 35ENTRY(vfp_null_entry)
36#ifdef CONFIG_PREEMPT
37 get_thread_info r10
38 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
39 sub r11, r4, #1 @ decrement it
40 str r11, [r10, #TI_PREEMPT]
41#endif
33 mov pc, lr 42 mov pc, lr
34ENDPROC(vfp_null_entry) 43ENDPROC(vfp_null_entry)
35 44
@@ -41,6 +50,12 @@ ENDPROC(vfp_null_entry)
41 50
42 __INIT 51 __INIT
43ENTRY(vfp_testing_entry) 52ENTRY(vfp_testing_entry)
53#ifdef CONFIG_PREEMPT
54 get_thread_info r10
55 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
56 sub r11, r4, #1 @ decrement it
57 str r11, [r10, #TI_PREEMPT]
58#endif
44 ldr r0, VFP_arch_address 59 ldr r0, VFP_arch_address
45 str r5, [r0] @ known non-zero value 60 str r5, [r0] @ known non-zero value
46 mov pc, r9 @ we have handled the fault 61 mov pc, r9 @ we have handled the fault
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index a5a4e57763c3..83c4e384b16d 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -137,6 +137,12 @@ check_for_exception:
137 VFPFMXR FPEXC, r1 @ restore FPEXC last 137 VFPFMXR FPEXC, r1 @ restore FPEXC last
138 sub r2, r2, #4 138 sub r2, r2, #4
139 str r2, [sp, #S_PC] @ retry the instruction 139 str r2, [sp, #S_PC] @ retry the instruction
140#ifdef CONFIG_PREEMPT
141 get_thread_info r10
142 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
143 sub r11, r4, #1 @ decrement it
144 str r11, [r10, #TI_PREEMPT]
145#endif
140 mov pc, r9 @ we think we have handled things 146 mov pc, r9 @ we think we have handled things
141 147
142 148
@@ -155,6 +161,12 @@ look_for_VFP_exceptions:
155 @ not recognised by VFP 161 @ not recognised by VFP
156 162
157 DBGSTR "not VFP" 163 DBGSTR "not VFP"
164#ifdef CONFIG_PREEMPT
165 get_thread_info r10
166 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
167 sub r11, r4, #1 @ decrement it
168 str r11, [r10, #TI_PREEMPT]
169#endif
158 mov pc, lr 170 mov pc, lr
159 171
160process_exception: 172process_exception:
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 75457b30d813..01599c4ef726 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -266,7 +266,7 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
266 * on VFP subarch 1. 266 * on VFP subarch 1.
267 */ 267 */
268 vfp_raise_exceptions(VFP_EXCEPTION_ERROR, trigger, fpscr, regs); 268 vfp_raise_exceptions(VFP_EXCEPTION_ERROR, trigger, fpscr, regs);
269 return; 269 goto exit;
270 } 270 }
271 271
272 /* 272 /*
@@ -297,7 +297,7 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
297 * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1. 297 * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1.
298 */ 298 */
299 if (fpexc ^ (FPEXC_EX | FPEXC_FP2V)) 299 if (fpexc ^ (FPEXC_EX | FPEXC_FP2V))
300 return; 300 goto exit;
301 301
302 /* 302 /*
303 * The barrier() here prevents fpinst2 being read 303 * The barrier() here prevents fpinst2 being read
@@ -310,6 +310,8 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
310 exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs); 310 exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs);
311 if (exceptions) 311 if (exceptions)
312 vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); 312 vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);
313 exit:
314 preempt_enable();
313} 315}
314 316
315static void vfp_enable(void *unused) 317static void vfp_enable(void *unused)
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 05fe3053dcae..35e3bd9858df 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -127,13 +127,13 @@ config BOARD_HAMMERHEAD
127 select CPU_AT32AP7000 127 select CPU_AT32AP7000
128 select USB_ARCH_HAS_HCD 128 select USB_ARCH_HAS_HCD
129 help 129 help
130 The Hammerhead platform is built around a AVR32 32-bit microcontroller from Atmel. 130 The Hammerhead platform is built around an AVR32 32-bit microcontroller from Atmel.
131 It offers versatile peripherals, such as ethernet, usb device, usb host etc. 131 It offers versatile peripherals, such as ethernet, usb device, usb host etc.
132 132
133 The board also incooperates a power supply and is a Power over Ethernet (PoE) Powered 133 The board also incorporates a power supply and is a Power over Ethernet (PoE) Powered
134 Device (PD). 134 Device (PD).
135 135
136 Additonally, a Cyclone III FPGA from Altera is integrated on the board. The FPGA is 136 Additionally, a Cyclone III FPGA from Altera is integrated on the board. The FPGA is
137 mapped into the 32-bit AVR memory bus. The FPGA offers two DDR2 SDRAM interfaces, which 137 mapped into the 32-bit AVR memory bus. The FPGA offers two DDR2 SDRAM interfaces, which
138 will cover even the most exceptional need of memory bandwidth. Together with the onboard 138 will cover even the most exceptional need of memory bandwidth. Together with the onboard
139 video decoder the board is ready for video processing. 139 video decoder the board is ready for video processing.
@@ -144,6 +144,19 @@ config BOARD_FAVR_32
144 bool "Favr-32 LCD-board" 144 bool "Favr-32 LCD-board"
145 select CPU_AT32AP7000 145 select CPU_AT32AP7000
146 146
147config BOARD_MERISC
148 bool "Merisc board"
149 select CPU_AT32AP7000
150 help
151 Merisc is the family name for a range of AVR32-based boards.
152
153 The boards are designed to be used in a man-machine
154 interfacing environment, utilizing a touch-based graphical
155 user interface. They host a vast range of I/O peripherals as
156 well as a large SDRAM & Flash memory bank.
157
158 For more information see: http://www.martinsson.se/merisc
159
147config BOARD_MIMC200 160config BOARD_MIMC200
148 bool "MIMC200 CPU board" 161 bool "MIMC200 CPU board"
149 select CPU_AT32AP7000 162 select CPU_AT32AP7000
@@ -153,6 +166,7 @@ source "arch/avr32/boards/atstk1000/Kconfig"
153source "arch/avr32/boards/atngw100/Kconfig" 166source "arch/avr32/boards/atngw100/Kconfig"
154source "arch/avr32/boards/hammerhead/Kconfig" 167source "arch/avr32/boards/hammerhead/Kconfig"
155source "arch/avr32/boards/favr-32/Kconfig" 168source "arch/avr32/boards/favr-32/Kconfig"
169source "arch/avr32/boards/merisc/Kconfig"
156 170
157choice 171choice
158 prompt "Boot loader type" 172 prompt "Boot loader type"
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index f3ef3bbf797c..0b97e14f73f6 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -35,6 +35,7 @@ core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
35core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/ 35core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/
36core-$(CONFIG_BOARD_HAMMERHEAD) += arch/avr32/boards/hammerhead/ 36core-$(CONFIG_BOARD_HAMMERHEAD) += arch/avr32/boards/hammerhead/
37core-$(CONFIG_BOARD_FAVR_32) += arch/avr32/boards/favr-32/ 37core-$(CONFIG_BOARD_FAVR_32) += arch/avr32/boards/favr-32/
38core-$(CONFIG_BOARD_MERISC) += arch/avr32/boards/merisc/
38core-$(CONFIG_BOARD_MIMC200) += arch/avr32/boards/mimc200/ 39core-$(CONFIG_BOARD_MIMC200) += arch/avr32/boards/mimc200/
39core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ 40core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/
40core-y += arch/avr32/kernel/ 41core-y += arch/avr32/kernel/
diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c
index 8140b22b3461..00337112c5ac 100644
--- a/arch/avr32/boards/atngw100/evklcd10x.c
+++ b/arch/avr32/boards/atngw100/evklcd10x.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/gpio.h>
14#include <linux/fb.h> 15#include <linux/fb.h>
15#include <linux/platform_device.h> 16#include <linux/platform_device.h>
16 17
@@ -19,26 +20,26 @@
19#include <asm/setup.h> 20#include <asm/setup.h>
20 21
21#include <mach/at32ap700x.h> 22#include <mach/at32ap700x.h>
23#include <mach/portmux.h>
22#include <mach/board.h> 24#include <mach/board.h>
23 25
26#include <sound/atmel-ac97c.h>
27
24static struct ac97c_platform_data __initdata ac97c0_data = { 28static struct ac97c_platform_data __initdata ac97c0_data = {
25 .dma_rx_periph_id = 3, 29 .reset_pin = GPIO_PIN_PB(19),
26 .dma_tx_periph_id = 4,
27 .dma_controller_id = 0,
28 .reset_pin = GPIO_PIN_PB(19),
29}; 30};
30 31
31#ifdef CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA 32#ifdef CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA
32static struct fb_videomode __initdata tcg057vglad_modes[] = { 33static struct fb_videomode __initdata tcg057vglad_modes[] = {
33 { 34 {
34 .name = "640x480 @ 60", 35 .name = "640x480 @ 50",
35 .refresh = 60, 36 .refresh = 50,
36 .xres = 640, .yres = 480, 37 .xres = 640, .yres = 480,
37 .pixclock = KHZ2PICOS(25180), 38 .pixclock = KHZ2PICOS(25180),
38 39
39 .left_margin = 64, .right_margin = 31, 40 .left_margin = 64, .right_margin = 96,
40 .upper_margin = 34, .lower_margin = 2, 41 .upper_margin = 34, .lower_margin = 11,
41 .hsync_len = 96, .vsync_len = 4, 42 .hsync_len = 64, .vsync_len = 15,
42 43
43 .sync = 0, 44 .sync = 0,
44 .vmode = FB_VMODE_NONINTERLACED, 45 .vmode = FB_VMODE_NONINTERLACED,
@@ -69,14 +70,14 @@ static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
69#elif CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA 70#elif CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA
70static struct fb_videomode __initdata tcg057qvlad_modes[] = { 71static struct fb_videomode __initdata tcg057qvlad_modes[] = {
71 { 72 {
72 .name = "320x240 @ 60", 73 .name = "320x240 @ 50",
73 .refresh = 60, 74 .refresh = 50,
74 .xres = 320, .yres = 240, 75 .xres = 320, .yres = 240,
75 .pixclock = KHZ2PICOS(6300), 76 .pixclock = KHZ2PICOS(6300),
76 77
77 .left_margin = 52, .right_margin = 28, 78 .left_margin = 34, .right_margin = 46,
78 .upper_margin = 7, .lower_margin = 2, 79 .upper_margin = 7, .lower_margin = 15,
79 .hsync_len = 96, .vsync_len = 4, 80 .hsync_len = 64, .vsync_len = 12,
80 81
81 .sync = 0, 82 .sync = 0,
82 .vmode = FB_VMODE_NONINTERLACED, 83 .vmode = FB_VMODE_NONINTERLACED,
@@ -144,12 +145,29 @@ static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
144}; 145};
145#endif 146#endif
146 147
148static void atevklcd10x_lcdc_power_control(int on)
149{
150 gpio_set_value(GPIO_PIN_PB(15), on);
151}
152
147static int __init atevklcd10x_init(void) 153static int __init atevklcd10x_init(void)
148{ 154{
149 at32_add_device_ac97c(0, &ac97c0_data); 155 /* PB15 is connected to the enable line on the boost regulator
156 * controlling the backlight for the LCD panel.
157 */
158 at32_select_gpio(GPIO_PIN_PB(15), AT32_GPIOF_OUTPUT);
159 gpio_request(GPIO_PIN_PB(15), "backlight");
160 gpio_direction_output(GPIO_PIN_PB(15), 0);
161
162 atevklcd10x_lcdc_data.atmel_lcdfb_power_control =
163 atevklcd10x_lcdc_power_control;
150 164
151 at32_add_device_lcdc(0, &atevklcd10x_lcdc_data, 165 at32_add_device_lcdc(0, &atevklcd10x_lcdc_data,
152 fbmem_start, fbmem_size, 1); 166 fbmem_start, fbmem_size,
167 ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL);
168
169 at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH);
170
153 return 0; 171 return 0;
154} 172}
155postcore_initcall(atevklcd10x_init); 173postcore_initcall(atevklcd10x_init);
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 05d3722fff18..5b022aad4bd9 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -56,13 +56,8 @@ static struct spi_board_info spi0_board_info[] __initdata = {
56static struct mci_platform_data __initdata mci0_data = { 56static struct mci_platform_data __initdata mci0_data = {
57 .slot[0] = { 57 .slot[0] = {
58 .bus_width = 4, 58 .bus_width = 4,
59#ifndef CONFIG_BOARD_ATNGW100_EVKLCD10X
60 .detect_pin = GPIO_PIN_PC(25), 59 .detect_pin = GPIO_PIN_PC(25),
61 .wp_pin = GPIO_PIN_PE(0), 60 .wp_pin = GPIO_PIN_PE(0),
62#else
63 .detect_pin = GPIO_PIN_NONE,
64 .wp_pin = GPIO_PIN_NONE,
65#endif
66 }, 61 },
67}; 62};
68 63
@@ -123,7 +118,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
123 118
124void __init setup_board(void) 119void __init setup_board(void)
125{ 120{
126 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */ 121 at32_map_usart(1, 0, 0); /* USART 1: /dev/ttyS0, DB9 */
127 at32_setup_serial_console(0); 122 at32_setup_serial_console(0);
128} 123}
129 124
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 1f33a106905c..2adc261c9e3d 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -252,12 +252,12 @@ static void __init atstk1002_setup_extdac(void)
252void __init setup_board(void) 252void __init setup_board(void)
253{ 253{
254#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 254#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
255 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ 255 at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
256#else 256#else
257 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ 257 at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
258#endif 258#endif
259 /* USART 2/unused: expansion connector */ 259 /* USART 2/unused: expansion connector */
260 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ 260 at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
261 261
262 at32_setup_serial_console(0); 262 at32_setup_serial_console(0);
263} 263}
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c
index b3a23c88bcfe..ff7e23298827 100644
--- a/arch/avr32/boards/atstk1000/atstk1003.c
+++ b/arch/avr32/boards/atstk1000/atstk1003.c
@@ -115,12 +115,12 @@ static void __init atstk1003_setup_extdac(void)
115void __init setup_board(void) 115void __init setup_board(void)
116{ 116{
117#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 117#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
118 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ 118 at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
119#else 119#else
120 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ 120 at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
121#endif 121#endif
122 /* USART 2/unused: expansion connector */ 122 /* USART 2/unused: expansion connector */
123 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ 123 at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
124 124
125 at32_setup_serial_console(0); 125 at32_setup_serial_console(0);
126} 126}
diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c
index 29b35aca96cd..69a9f0f08c6e 100644
--- a/arch/avr32/boards/atstk1000/atstk1004.c
+++ b/arch/avr32/boards/atstk1000/atstk1004.c
@@ -120,12 +120,12 @@ static void __init atstk1004_setup_extdac(void)
120void __init setup_board(void) 120void __init setup_board(void)
121{ 121{
122#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 122#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
123 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ 123 at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
124#else 124#else
125 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ 125 at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
126#endif 126#endif
127 /* USART 2/unused: expansion connector */ 127 /* USART 2/unused: expansion connector */
128 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ 128 at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
129 129
130 at32_setup_serial_console(0); 130 at32_setup_serial_console(0);
131} 131}
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c
index 745c408c2ac5..46c9b0a224cf 100644
--- a/arch/avr32/boards/favr-32/setup.c
+++ b/arch/avr32/boards/favr-32/setup.c
@@ -22,6 +22,8 @@
22#include <linux/spi/spi.h> 22#include <linux/spi/spi.h>
23#include <linux/spi/ads7846.h> 23#include <linux/spi/ads7846.h>
24 24
25#include <sound/atmel-abdac.h>
26
25#include <video/atmel_lcdc.h> 27#include <video/atmel_lcdc.h>
26 28
27#include <asm/setup.h> 29#include <asm/setup.h>
@@ -41,6 +43,9 @@ unsigned long at32_board_osc_rates[3] = {
41/* Initialized by bootloader-specific startup code. */ 43/* Initialized by bootloader-specific startup code. */
42struct tag *bootloader_tags __initdata; 44struct tag *bootloader_tags __initdata;
43 45
46static struct atmel_abdac_pdata __initdata abdac0_data = {
47};
48
44struct eth_addr { 49struct eth_addr {
45 u8 addr[6]; 50 u8 addr[6];
46}; 51};
@@ -245,7 +250,7 @@ static void __init favr32_setup_atmel_pwm_bl(void)
245 250
246void __init setup_board(void) 251void __init setup_board(void)
247{ 252{
248 at32_map_usart(3, 0); /* USART 3 => /dev/ttyS0 */ 253 at32_map_usart(3, 0, 0); /* USART 3 => /dev/ttyS0 */
249 at32_setup_serial_console(0); 254 at32_setup_serial_console(0);
250} 255}
251 256
@@ -326,7 +331,7 @@ static int __init favr32_init(void)
326 331
327 spi1_board_info[0].irq = gpio_to_irq(GPIO_PIN_PB(3)); 332 spi1_board_info[0].irq = gpio_to_irq(GPIO_PIN_PB(3));
328 333
329 set_abdac_rate(at32_add_device_abdac(0)); 334 set_abdac_rate(at32_add_device_abdac(0, &abdac0_data));
330 335
331 at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel); 336 at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel);
332 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); 337 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
diff --git a/arch/avr32/boards/hammerhead/flash.c b/arch/avr32/boards/hammerhead/flash.c
index 559bbcb03f9b..776c3cb9b6e4 100644
--- a/arch/avr32/boards/hammerhead/flash.c
+++ b/arch/avr32/boards/hammerhead/flash.c
@@ -280,13 +280,13 @@ static struct resource hh_fpga0_resource[] = {
280 }, 280 },
281}; 281};
282 282
283static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK; 283static u64 hh_fpga0_dma_mask = DMA_BIT_MASK(32);
284static struct platform_device hh_fpga0_device = { 284static struct platform_device hh_fpga0_device = {
285 .name = "hh_fpga", 285 .name = "hh_fpga",
286 .id = 0, 286 .id = 0,
287 .dev = { 287 .dev = {
288 .dma_mask = &hh_fpga0_dma_mask, 288 .dma_mask = &hh_fpga0_dma_mask,
289 .coherent_dma_mask = DMA_32BIT_MASK, 289 .coherent_dma_mask = DMA_BIT_MASK(32),
290 }, 290 },
291 .resource = hh_fpga0_resource, 291 .resource = hh_fpga0_resource,
292 .num_resources = ARRAY_SIZE(hh_fpga0_resource), 292 .num_resources = ARRAY_SIZE(hh_fpga0_resource),
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c
index 4d2fe82b2029..dd009875a405 100644
--- a/arch/avr32/boards/hammerhead/setup.c
+++ b/arch/avr32/boards/hammerhead/setup.c
@@ -29,6 +29,8 @@
29#include <mach/init.h> 29#include <mach/init.h>
30#include <mach/portmux.h> 30#include <mach/portmux.h>
31 31
32#include <sound/atmel-ac97c.h>
33
32#include "../../mach-at32ap/clock.h" 34#include "../../mach-at32ap/clock.h"
33#include "flash.h" 35#include "flash.h"
34 36
@@ -163,7 +165,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
163 165
164void __init setup_board(void) 166void __init setup_board(void)
165{ 167{
166 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */ 168 at32_map_usart(1, 0, 0); /* USART 1: /dev/ttyS0, DB9 */
167 at32_setup_serial_console(0); 169 at32_setup_serial_console(0);
168} 170}
169 171
@@ -233,7 +235,7 @@ static int __init hammerhead_init(void)
233 i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info)); 235 i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info));
234 236
235#ifdef CONFIG_BOARD_HAMMERHEAD_SND 237#ifdef CONFIG_BOARD_HAMMERHEAD_SND
236 at32_add_device_ac97c(0, &ac97c_data); 238 at32_add_device_ac97c(0, &ac97c_data, AC97C_BOTH);
237#endif 239#endif
238 240
239 /* Select the Touchscreen interrupt pin mode */ 241 /* Select the Touchscreen interrupt pin mode */
diff --git a/arch/avr32/boards/merisc/Kconfig b/arch/avr32/boards/merisc/Kconfig
new file mode 100644
index 000000000000..7e043275d5a9
--- /dev/null
+++ b/arch/avr32/boards/merisc/Kconfig
@@ -0,0 +1,5 @@
1# Merisc customization
2
3if BOARD_MERISC
4
5endif # BOARD_MERISC
diff --git a/arch/avr32/boards/merisc/Makefile b/arch/avr32/boards/merisc/Makefile
new file mode 100644
index 000000000000..d24c78729bd1
--- /dev/null
+++ b/arch/avr32/boards/merisc/Makefile
@@ -0,0 +1 @@
obj-y += setup.o flash.o display.o merisc_sysfs.o
diff --git a/arch/avr32/boards/merisc/display.c b/arch/avr32/boards/merisc/display.c
new file mode 100644
index 000000000000..85a543cd4abc
--- /dev/null
+++ b/arch/avr32/boards/merisc/display.c
@@ -0,0 +1,65 @@
1/*
2 * Display setup code for the Merisc board
3 *
4 * Copyright (C) 2008 Martinsson Elektronik AB
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/init.h>
11#include <linux/platform_device.h>
12#include <linux/fb.h>
13#include <video/atmel_lcdc.h>
14#include <asm/setup.h>
15#include <mach/board.h>
16#include "merisc.h"
17
18static struct fb_videomode merisc_fb_videomode[] = {
19 {
20 .refresh = 44,
21 .xres = 640,
22 .yres = 480,
23 .left_margin = 96,
24 .right_margin = 96,
25 .upper_margin = 34,
26 .lower_margin = 8,
27 .hsync_len = 64,
28 .vsync_len = 64,
29 .name = "640x480 @ 44",
30 .pixclock = KHZ2PICOS(25180),
31 .sync = 0,
32 .vmode = FB_VMODE_NONINTERLACED,
33 },
34};
35
36static struct fb_monspecs merisc_fb_monspecs = {
37 .manufacturer = "Kyo",
38 .monitor = "TCG075VG2AD",
39 .modedb = merisc_fb_videomode,
40 .modedb_len = ARRAY_SIZE(merisc_fb_videomode),
41 .hfmin = 30000,
42 .hfmax = 33333,
43 .vfmin = 60,
44 .vfmax = 90,
45 .dclkmax = 30000000,
46};
47
48struct atmel_lcdfb_info merisc_lcdc_data = {
49 .default_bpp = 24,
50 .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
51 .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
52 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
53 | ATMEL_LCDC_MEMOR_BIG),
54 .default_monspecs = &merisc_fb_monspecs,
55 .guard_time = 2,
56};
57
58static int __init merisc_display_init(void)
59{
60 at32_add_device_lcdc(0, &merisc_lcdc_data, fbmem_start,
61 fbmem_size, 0);
62
63 return 0;
64}
65device_initcall(merisc_display_init);
diff --git a/arch/avr32/boards/merisc/flash.c b/arch/avr32/boards/merisc/flash.c
new file mode 100644
index 000000000000..8e856fd6f013
--- /dev/null
+++ b/arch/avr32/boards/merisc/flash.c
@@ -0,0 +1,139 @@
1/*
2 * Merisc board-specific flash initialization
3 *
4 * Copyright (C) 2008 Martinsson Elektronik AB
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/init.h>
11#include <linux/platform_device.h>
12#include <linux/mtd/mtd.h>
13#include <linux/mtd/partitions.h>
14#include <linux/mtd/physmap.h>
15#include <mach/smc.h>
16
17/* Will be translated to units of 14.3 ns, rounded up */
18static struct smc_timing flash_timing __initdata = {
19 .ncs_read_setup = 1 * 14,
20 .nrd_setup = 5 * 14,
21 .ncs_write_setup = 1 * 14,
22 .nwe_setup = 2 * 14,
23
24 .ncs_read_pulse = 12 * 14,
25 .nrd_pulse = 7 * 14,
26 .ncs_write_pulse = 8 * 14,
27 .nwe_pulse = 4 * 14,
28
29 .read_cycle = 14 * 14,
30 .write_cycle = 10 * 14,
31};
32
33static struct smc_config flash_config __initdata = {
34 .bus_width = 2,
35 .nrd_controlled = 1,
36 .nwe_controlled = 1,
37 .byte_write = 1,
38 .tdf_cycles = 3,
39};
40
41static struct mtd_partition flash_0_parts[] = {
42 {
43 .name = "boot",
44 .offset = 0x00000000,
45 .size = 0x00060000,
46 .mask_flags = 0,
47 },
48 {
49 .name = "kernel",
50 .offset = 0x00060000,
51 .size = 0x00200000,
52 .mask_flags = 0,
53 },
54 {
55 .name = "root",
56 .offset = 0x00260000,
57 .size = MTDPART_SIZ_FULL,
58 .mask_flags = 0,
59 },
60};
61
62static struct mtd_partition flash_1_parts[] = {
63 {
64 .name = "2ndflash",
65 .offset = 0x00000000,
66 .size = MTDPART_SIZ_FULL,
67 .mask_flags = 0,
68 },
69};
70
71static struct physmap_flash_data flash_data[] = {
72 {
73 .width = 2,
74 .nr_parts = ARRAY_SIZE(flash_0_parts),
75 .parts = flash_0_parts,
76 },
77 {
78 .width = 2,
79 .nr_parts = ARRAY_SIZE(flash_1_parts),
80 .parts = flash_1_parts,
81 }
82};
83
84static struct resource flash_resource[] = {
85 {
86 .start = 0x00000000,
87 .end = 0x03ffffff,
88 .flags = IORESOURCE_MEM,
89 },
90 {
91 .start = 0x04000000,
92 .end = 0x07ffffff,
93 .flags = IORESOURCE_MEM,
94 },
95};
96
97static struct platform_device flash_device[] = {
98 {
99 .name = "physmap-flash",
100 .id = 0,
101 .resource = &flash_resource[0],
102 .num_resources = 1,
103 .dev = {
104 .platform_data = &flash_data[0],
105 },
106 },
107 {
108 .name = "physmap-flash",
109 .id = 1,
110 .resource = &flash_resource[1],
111 .num_resources = 1,
112 .dev = {
113 .platform_data = &flash_data[1],
114 },
115 },
116};
117
118static int __init merisc_flash_init(void)
119{
120 int ret;
121 smc_set_timing(&flash_config, &flash_timing);
122
123 ret = smc_set_configuration(0, &flash_config);
124 if (ret < 0) {
125 printk(KERN_ERR "Merisc: failed to set NOR flash timing #0\n");
126 return ret;
127 }
128
129 ret = smc_set_configuration(4, &flash_config);
130 if (ret < 0) {
131 printk(KERN_ERR "Merisc: failed to set NOR flash timing #1\n");
132 return ret;
133 }
134
135 platform_device_register(&flash_device[0]);
136 platform_device_register(&flash_device[1]);
137 return 0;
138}
139device_initcall(merisc_flash_init);
diff --git a/arch/avr32/boards/merisc/merisc.h b/arch/avr32/boards/merisc/merisc.h
new file mode 100644
index 000000000000..50ffb2f3fcbf
--- /dev/null
+++ b/arch/avr32/boards/merisc/merisc.h
@@ -0,0 +1,18 @@
1/*
2 * Merisc exports
3 *
4 * Copyright (C) 2008 Martinsson Elektronik AB
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ARCH_AVR32_BOARDS_MERISC_MERISC_H
11#define __ARCH_AVR32_BOARDS_MERISC_MERISC_H
12
13const char *merisc_revision(void);
14const char *merisc_model(void);
15
16extern struct class merisc_class;
17
18#endif /* __ARCH_AVR32_BOARDS_MERISC_MERISC_H */
diff --git a/arch/avr32/boards/merisc/merisc_sysfs.c b/arch/avr32/boards/merisc/merisc_sysfs.c
new file mode 100644
index 000000000000..df431fdba9ad
--- /dev/null
+++ b/arch/avr32/boards/merisc/merisc_sysfs.c
@@ -0,0 +1,65 @@
1/*
2 * Merisc sysfs exports
3 *
4 * Copyright (C) 2008 Martinsson Elektronik AB
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/module.h>
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/list.h>
14#include <linux/spinlock.h>
15#include <linux/device.h>
16#include <linux/sysdev.h>
17#include <linux/timer.h>
18#include <linux/err.h>
19#include <linux/ctype.h>
20#include "merisc.h"
21
22static ssize_t merisc_model_show(struct class *class, char *buf)
23{
24 ssize_t ret = 0;
25
26 sprintf(buf, "%s\n", merisc_model());
27 ret = strlen(buf) + 1;
28
29 return ret;
30}
31
32static ssize_t merisc_revision_show(struct class *class, char *buf)
33{
34 ssize_t ret = 0;
35
36 sprintf(buf, "%s\n", merisc_revision());
37 ret = strlen(buf) + 1;
38
39 return ret;
40}
41
42static struct class_attribute merisc_class_attrs[] = {
43 __ATTR(model, S_IRUGO, merisc_model_show, NULL),
44 __ATTR(revision, S_IRUGO, merisc_revision_show, NULL),
45 __ATTR_NULL,
46};
47
48struct class merisc_class = {
49 .name = "merisc",
50 .owner = THIS_MODULE,
51 .class_attrs = merisc_class_attrs,
52};
53
54static int __init merisc_sysfs_init(void)
55{
56 int status;
57
58 status = class_register(&merisc_class);
59 if (status < 0)
60 return status;
61
62 return 0;
63}
64
65postcore_initcall(merisc_sysfs_init);
diff --git a/arch/avr32/boards/merisc/setup.c b/arch/avr32/boards/merisc/setup.c
new file mode 100644
index 000000000000..20b300cf105a
--- /dev/null
+++ b/arch/avr32/boards/merisc/setup.c
@@ -0,0 +1,297 @@
1/*
2 * Board-specific setup code for the Merisc
3 *
4 * Copyright (C) 2008 Martinsson Elektronik AB
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/clk.h>
11#include <linux/etherdevice.h>
12#include <linux/i2c.h>
13#include <linux/i2c-gpio.h>
14#include <linux/gpio.h>
15#include <linux/init.h>
16#include <linux/linkage.h>
17#include <linux/platform_device.h>
18#include <linux/types.h>
19#include <linux/leds.h>
20#include <linux/spi/spi.h>
21#include <linux/spi/ads7846.h>
22#include <linux/irq.h>
23#include <linux/fb.h>
24#include <linux/atmel-mci.h>
25
26#include <asm/io.h>
27#include <asm/setup.h>
28#include <asm/gpio.h>
29
30#include <mach/at32ap700x.h>
31#include <mach/board.h>
32#include <mach/init.h>
33#include <mach/portmux.h>
34
35#include "merisc.h"
36
37/* Holds the autodetected board model and revision */
38static int merisc_board_id;
39
40/* Initialized by bootloader-specific startup code. */
41struct tag *bootloader_tags __initdata;
42
43/* Oscillator frequencies. These are board specific */
44unsigned long at32_board_osc_rates[3] = {
45 [0] = 32768, /* 32.768 kHz on RTC osc */
46 [1] = 20000000, /* 20 MHz on osc0 */
47 [2] = 12000000, /* 12 MHz on osc1 */
48};
49
50struct eth_addr {
51 u8 addr[6];
52};
53
54static struct eth_addr __initdata hw_addr[2];
55static struct eth_platform_data __initdata eth_data[2];
56
57static int ads7846_get_pendown_state_PB26(void)
58{
59 return !gpio_get_value(GPIO_PIN_PB(26));
60}
61
62static int ads7846_get_pendown_state_PB28(void)
63{
64 return !gpio_get_value(GPIO_PIN_PB(28));
65}
66
67static struct ads7846_platform_data __initdata ads7846_data = {
68 .model = 7846,
69 .vref_delay_usecs = 100,
70 .vref_mv = 0,
71 .keep_vref_on = 0,
72 .settle_delay_usecs = 150,
73 .penirq_recheck_delay_usecs = 1,
74 .x_plate_ohms = 800,
75 .debounce_rep = 4,
76 .debounce_max = 10,
77 .debounce_tol = 50,
78 .get_pendown_state = ads7846_get_pendown_state_PB26,
79 .filter_init = NULL,
80 .filter = NULL,
81 .filter_cleanup = NULL,
82};
83
84static struct spi_board_info __initdata spi0_board_info[] = {
85 {
86 .modalias = "ads7846",
87 .max_speed_hz = 3250000,
88 .chip_select = 0,
89 .bus_num = 0,
90 .platform_data = &ads7846_data,
91 .mode = SPI_MODE_0,
92 },
93};
94
95static struct mci_platform_data __initdata mci0_data = {
96 .slot[0] = {
97 .bus_width = 4,
98 .detect_pin = GPIO_PIN_PE(19),
99 .wp_pin = GPIO_PIN_PE(20),
100 },
101};
102
103static int __init parse_tag_ethernet(struct tag *tag)
104{
105 int i;
106
107 i = tag->u.ethernet.mac_index;
108 if (i < ARRAY_SIZE(hw_addr)) {
109 memcpy(hw_addr[i].addr, tag->u.ethernet.hw_address,
110 sizeof(hw_addr[i].addr));
111 }
112
113 return 0;
114}
115__tagtable(ATAG_ETHERNET, parse_tag_ethernet);
116
117static void __init set_hw_addr(struct platform_device *pdev)
118{
119 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
120 const u8 *addr;
121 void __iomem *regs;
122 struct clk *pclk;
123
124 if (!res)
125 return;
126
127 if (pdev->id >= ARRAY_SIZE(hw_addr))
128 return;
129
130 addr = hw_addr[pdev->id].addr;
131 if (!is_valid_ether_addr(addr))
132 return;
133
134 regs = (void __iomem __force *)res->start;
135 pclk = clk_get(&pdev->dev, "pclk");
136 if (!pclk)
137 return;
138
139 clk_enable(pclk);
140 __raw_writel((addr[3] << 24) | (addr[2] << 16)
141 | (addr[1] << 8) | addr[0], regs + 0x98);
142 __raw_writel((addr[5] << 8) | addr[4], regs + 0x9c);
143 clk_disable(pclk);
144 clk_put(pclk);
145}
146
147static struct i2c_gpio_platform_data i2c_gpio_data = {
148 .sda_pin = GPIO_PIN_PA(6),
149 .scl_pin = GPIO_PIN_PA(7),
150 .sda_is_open_drain = 1,
151 .scl_is_open_drain = 1,
152 .udelay = 2,
153};
154
155static struct platform_device i2c_gpio_device = {
156 .name = "i2c-gpio",
157 .id = 0,
158 .dev = {
159 .platform_data = &i2c_gpio_data,
160 },
161};
162
163static struct i2c_board_info __initdata i2c_info[] = {
164 {
165 I2C_BOARD_INFO("pcf8563", 0x51)
166 },
167};
168
169#ifdef CONFIG_LEDS_ATMEL_PWM
170static struct gpio_led stk_pwm_led[] = {
171 {
172 .name = "backlight",
173 .gpio = 0, /* PWM channel 0 (LCD backlight) */
174 },
175};
176
177static struct gpio_led_platform_data stk_pwm_led_data = {
178 .num_leds = ARRAY_SIZE(stk_pwm_led),
179 .leds = stk_pwm_led,
180};
181
182static struct platform_device stk_pwm_led_dev = {
183 .name = "leds-atmel-pwm",
184 .id = -1,
185 .dev = {
186 .platform_data = &stk_pwm_led_data,
187 },
188};
189#endif
190
191const char *merisc_model(void)
192{
193 switch (merisc_board_id) {
194 case 0:
195 case 1:
196 return "500-01";
197 case 2:
198 return "BT";
199 default:
200 return "Unknown";
201 }
202}
203
204const char *merisc_revision(void)
205{
206 switch (merisc_board_id) {
207 case 0:
208 return "B";
209 case 1:
210 return "D";
211 case 2:
212 return "A";
213 default:
214 return "Unknown";
215 }
216}
217
218static void detect_merisc_board_id(void)
219{
220 /* Board ID pins MUST be set as input or the board may be damaged */
221 at32_select_gpio(GPIO_PIN_PA(24), AT32_GPIOF_PULLUP);
222 at32_select_gpio(GPIO_PIN_PA(25), AT32_GPIOF_PULLUP);
223 at32_select_gpio(GPIO_PIN_PA(26), AT32_GPIOF_PULLUP);
224 at32_select_gpio(GPIO_PIN_PA(27), AT32_GPIOF_PULLUP);
225
226 merisc_board_id = !gpio_get_value(GPIO_PIN_PA(24)) +
227 !gpio_get_value(GPIO_PIN_PA(25)) * 2 +
228 !gpio_get_value(GPIO_PIN_PA(26)) * 4 +
229 !gpio_get_value(GPIO_PIN_PA(27)) * 8;
230}
231
232void __init setup_board(void)
233{
234 at32_map_usart(0, 0, 0);
235 at32_map_usart(1, 1, 0);
236 at32_map_usart(3, 3, 0);
237 at32_setup_serial_console(1);
238}
239
240static int __init merisc_init(void)
241{
242 detect_merisc_board_id();
243
244 printk(KERN_NOTICE "BOARD: Merisc %s revision %s\n", merisc_model(),
245 merisc_revision());
246
247 /* Reserve pins for SDRAM */
248 at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL | (1 << 26));
249
250 if (merisc_board_id >= 1)
251 at32_map_usart(2, 2, 0);
252
253 at32_add_device_usart(0);
254 at32_add_device_usart(1);
255 if (merisc_board_id >= 1)
256 at32_add_device_usart(2);
257 at32_add_device_usart(3);
258 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
259
260 /* ADS7846 PENIRQ */
261 if (merisc_board_id == 0) {
262 ads7846_data.get_pendown_state = ads7846_get_pendown_state_PB26;
263 at32_select_periph(GPIO_PIOB_BASE, 1 << 26,
264 GPIO_PERIPH_A, AT32_GPIOF_PULLUP);
265 spi0_board_info[0].irq = AT32_EXTINT(1);
266 } else {
267 ads7846_data.get_pendown_state = ads7846_get_pendown_state_PB28;
268 at32_select_periph(GPIO_PIOB_BASE, 1 << 28, GPIO_PERIPH_A,
269 AT32_GPIOF_PULLUP);
270 spi0_board_info[0].irq = AT32_EXTINT(3);
271 }
272
273 /* ADS7846 busy pin */
274 at32_select_gpio(GPIO_PIN_PA(4), AT32_GPIOF_PULLUP);
275
276 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
277
278 at32_add_device_mci(0, &mci0_data);
279
280#ifdef CONFIG_LEDS_ATMEL_PWM
281 at32_add_device_pwm((1 << 0) | (1 << 2));
282 platform_device_register(&stk_pwm_led_dev);
283#else
284 at32_add_device_pwm((1 << 2));
285#endif
286
287 at32_select_gpio(i2c_gpio_data.sda_pin,
288 AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
289 at32_select_gpio(i2c_gpio_data.scl_pin,
290 AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
291 platform_device_register(&i2c_gpio_device);
292
293 i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info));
294
295 return 0;
296}
297postcore_initcall(merisc_init);
diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c
index 2b58d61f0afc..c1b2175b4fea 100644
--- a/arch/avr32/boards/mimc200/setup.c
+++ b/arch/avr32/boards/mimc200/setup.c
@@ -175,10 +175,10 @@ static void __init set_hw_addr(struct platform_device *pdev)
175 175
176void __init setup_board(void) 176void __init setup_board(void)
177{ 177{
178 at32_map_usart(0, 0); /* USART 0: /dev/ttyS0 (TTL --> Altera) */ 178 at32_map_usart(0, 0, 0); /* USART 0: /dev/ttyS0 (TTL --> Altera) */
179 at32_map_usart(1, 1); /* USART 1: /dev/ttyS1 (RS232) */ 179 at32_map_usart(1, 1, 0); /* USART 1: /dev/ttyS1 (RS232) */
180 at32_map_usart(2, 2); /* USART 2: /dev/ttyS2 (RS485) */ 180 at32_map_usart(2, 2, 0); /* USART 2: /dev/ttyS2 (RS485) */
181 at32_map_usart(3, 3); /* USART 3: /dev/ttyS3 (RS422 Multidrop) */ 181 at32_map_usart(3, 3, 0); /* USART 3: /dev/ttyS3 (RS422 Multidrop) */
182} 182}
183 183
184static struct i2c_gpio_platform_data i2c_gpio_data = { 184static struct i2c_gpio_platform_data i2c_gpio_data = {
diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig
new file mode 100644
index 000000000000..41554db4877f
--- /dev/null
+++ b/arch/avr32/configs/merisc_defconfig
@@ -0,0 +1,1237 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc1
4# Wed Mar 25 14:06:15 2009
5#
6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y
8CONFIG_GENERIC_HARDIRQS=y
9CONFIG_STACKTRACE_SUPPORT=y
10CONFIG_LOCKDEP_SUPPORT=y
11CONFIG_TRACE_IRQFLAGS_SUPPORT=y
12CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24
25#
26# General setup
27#
28CONFIG_EXPERIMENTAL=y
29CONFIG_BROKEN_ON_SMP=y
30CONFIG_INIT_ENV_ARG_LIMIT=32
31CONFIG_LOCALVERSION=""
32# CONFIG_LOCALVERSION_AUTO is not set
33CONFIG_SWAP=y
34CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y
37CONFIG_BSD_PROCESS_ACCT=y
38CONFIG_BSD_PROCESS_ACCT_V3=y
39# CONFIG_TASKSTATS is not set
40# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set
42CONFIG_LOG_BUF_SHIFT=14
43CONFIG_GROUP_SCHED=y
44CONFIG_FAIR_GROUP_SCHED=y
45# CONFIG_RT_GROUP_SCHED is not set
46CONFIG_USER_SCHED=y
47# CONFIG_CGROUP_SCHED is not set
48# CONFIG_CGROUPS is not set
49CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set
52# CONFIG_NAMESPACES is not set
53CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE=""
55CONFIG_CC_OPTIMIZE_FOR_SIZE=y
56CONFIG_SYSCTL=y
57CONFIG_EMBEDDED=y
58# CONFIG_SYSCTL_SYSCALL is not set
59CONFIG_KALLSYMS=y
60# CONFIG_KALLSYMS_EXTRA_PASS is not set
61CONFIG_HOTPLUG=y
62CONFIG_PRINTK=y
63CONFIG_BUG=y
64CONFIG_ELF_CORE=y
65CONFIG_COMPAT_BRK=y
66# CONFIG_BASE_FULL is not set
67CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y
71CONFIG_TIMERFD=y
72CONFIG_EVENTFD=y
73CONFIG_SHMEM=y
74CONFIG_AIO=y
75CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_SLUB_DEBUG=y
77# CONFIG_SLAB is not set
78CONFIG_SLUB=y
79# CONFIG_SLOB is not set
80# CONFIG_PROFILING is not set
81CONFIG_HAVE_OPROFILE=y
82# CONFIG_KPROBES is not set
83CONFIG_HAVE_KPROBES=y
84CONFIG_HAVE_CLK=y
85# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
86CONFIG_SLABINFO=y
87CONFIG_RT_MUTEXES=y
88CONFIG_BASE_SMALL=1
89CONFIG_MODULES=y
90# CONFIG_MODULE_FORCE_LOAD is not set
91CONFIG_MODULE_UNLOAD=y
92CONFIG_MODULE_FORCE_UNLOAD=y
93# CONFIG_MODVERSIONS is not set
94# CONFIG_MODULE_SRCVERSION_ALL is not set
95CONFIG_BLOCK=y
96# CONFIG_LBD is not set
97# CONFIG_BLK_DEV_IO_TRACE is not set
98# CONFIG_BLK_DEV_BSG is not set
99# CONFIG_BLK_DEV_INTEGRITY is not set
100
101#
102# IO Schedulers
103#
104CONFIG_IOSCHED_NOOP=y
105# CONFIG_IOSCHED_AS is not set
106# CONFIG_IOSCHED_DEADLINE is not set
107CONFIG_IOSCHED_CFQ=y
108# CONFIG_DEFAULT_AS is not set
109# CONFIG_DEFAULT_DEADLINE is not set
110CONFIG_DEFAULT_CFQ=y
111# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="cfq"
113CONFIG_CLASSIC_RCU=y
114# CONFIG_TREE_RCU is not set
115# CONFIG_PREEMPT_RCU is not set
116# CONFIG_TREE_RCU_TRACE is not set
117# CONFIG_PREEMPT_RCU_TRACE is not set
118# CONFIG_FREEZER is not set
119
120#
121# System Type and features
122#
123CONFIG_TICK_ONESHOT=y
124CONFIG_NO_HZ=y
125CONFIG_HIGH_RES_TIMERS=y
126CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
127CONFIG_SUBARCH_AVR32B=y
128CONFIG_MMU=y
129CONFIG_PERFORMANCE_COUNTERS=y
130CONFIG_PLATFORM_AT32AP=y
131CONFIG_CPU_AT32AP700X=y
132CONFIG_CPU_AT32AP7000=y
133# CONFIG_BOARD_ATSTK1000 is not set
134# CONFIG_BOARD_ATNGW100 is not set
135# CONFIG_BOARD_HAMMERHEAD is not set
136# CONFIG_BOARD_FAVR_32 is not set
137# CONFIG_BOARD_MIMC200 is not set
138CONFIG_BOARD_MERISC=y
139CONFIG_LOADER_U_BOOT=y
140
141#
142# Atmel AVR32 AP options
143#
144CONFIG_AP700X_32_BIT_SMC=y
145# CONFIG_AP700X_16_BIT_SMC is not set
146# CONFIG_AP700X_8_BIT_SMC is not set
147CONFIG_LOAD_ADDRESS=0x10000000
148CONFIG_ENTRY_ADDRESS=0x90000000
149CONFIG_PHYS_OFFSET=0x10000000
150CONFIG_PREEMPT_NONE=y
151# CONFIG_PREEMPT_VOLUNTARY is not set
152# CONFIG_PREEMPT is not set
153CONFIG_QUICKLIST=y
154# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
155# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
156# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
157CONFIG_ARCH_FLATMEM_ENABLE=y
158# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
159# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
160CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y
162# CONFIG_DISCONTIGMEM_MANUAL is not set
163# CONFIG_SPARSEMEM_MANUAL is not set
164CONFIG_FLATMEM=y
165CONFIG_FLAT_NODE_MEM_MAP=y
166CONFIG_PAGEFLAGS_EXTENDED=y
167CONFIG_SPLIT_PTLOCK_CPUS=4
168# CONFIG_PHYS_ADDR_T_64BIT is not set
169CONFIG_ZONE_DMA_FLAG=0
170CONFIG_NR_QUICK=2
171CONFIG_VIRT_TO_BUS=y
172CONFIG_UNEVICTABLE_LRU=y
173# CONFIG_OWNERSHIP_TRACE is not set
174# CONFIG_NMI_DEBUGGING is not set
175# CONFIG_HZ_100 is not set
176CONFIG_HZ_250=y
177# CONFIG_HZ_300 is not set
178# CONFIG_HZ_1000 is not set
179CONFIG_HZ=250
180CONFIG_SCHED_HRTICK=y
181CONFIG_CMDLINE=""
182
183#
184# Power management options
185#
186# CONFIG_PM is not set
187CONFIG_ARCH_SUSPEND_POSSIBLE=y
188
189#
190# CPU Frequency scaling
191#
192# CONFIG_CPU_FREQ is not set
193
194#
195# Bus options
196#
197# CONFIG_ARCH_SUPPORTS_MSI is not set
198# CONFIG_PCCARD is not set
199
200#
201# Executable file formats
202#
203CONFIG_BINFMT_ELF=y
204# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
205# CONFIG_HAVE_AOUT is not set
206# CONFIG_BINFMT_MISC is not set
207CONFIG_NET=y
208
209#
210# Networking options
211#
212CONFIG_COMPAT_NET_DEV_OPS=y
213CONFIG_PACKET=y
214CONFIG_PACKET_MMAP=y
215CONFIG_UNIX=y
216CONFIG_XFRM=y
217CONFIG_XFRM_USER=y
218# CONFIG_XFRM_SUB_POLICY is not set
219# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_XFRM_STATISTICS is not set
221CONFIG_XFRM_IPCOMP=y
222CONFIG_NET_KEY=y
223# CONFIG_NET_KEY_MIGRATE is not set
224CONFIG_INET=y
225CONFIG_IP_MULTICAST=y
226CONFIG_IP_ADVANCED_ROUTER=y
227CONFIG_ASK_IP_FIB_HASH=y
228# CONFIG_IP_FIB_TRIE is not set
229CONFIG_IP_FIB_HASH=y
230# CONFIG_IP_MULTIPLE_TABLES is not set
231# CONFIG_IP_ROUTE_MULTIPATH is not set
232# CONFIG_IP_ROUTE_VERBOSE is not set
233CONFIG_IP_PNP=y
234CONFIG_IP_PNP_DHCP=y
235# CONFIG_IP_PNP_BOOTP is not set
236# CONFIG_IP_PNP_RARP is not set
237# CONFIG_NET_IPIP is not set
238# CONFIG_NET_IPGRE is not set
239CONFIG_IP_MROUTE=y
240CONFIG_IP_PIMSM_V1=y
241# CONFIG_IP_PIMSM_V2 is not set
242# CONFIG_ARPD is not set
243CONFIG_SYN_COOKIES=y
244CONFIG_INET_AH=y
245CONFIG_INET_ESP=y
246CONFIG_INET_IPCOMP=y
247CONFIG_INET_XFRM_TUNNEL=y
248CONFIG_INET_TUNNEL=y
249CONFIG_INET_XFRM_MODE_TRANSPORT=y
250CONFIG_INET_XFRM_MODE_TUNNEL=y
251CONFIG_INET_XFRM_MODE_BEET=y
252# CONFIG_INET_LRO is not set
253CONFIG_INET_DIAG=y
254CONFIG_INET_TCP_DIAG=y
255# CONFIG_TCP_CONG_ADVANCED is not set
256CONFIG_TCP_CONG_CUBIC=y
257CONFIG_DEFAULT_TCP_CONG="cubic"
258# CONFIG_TCP_MD5SIG is not set
259# CONFIG_IPV6 is not set
260# CONFIG_NETWORK_SECMARK is not set
261# CONFIG_NETFILTER is not set
262# CONFIG_IP_DCCP is not set
263# CONFIG_IP_SCTP is not set
264# CONFIG_TIPC is not set
265# CONFIG_ATM is not set
266# CONFIG_BRIDGE is not set
267# CONFIG_NET_DSA is not set
268# CONFIG_VLAN_8021Q is not set
269# CONFIG_DECNET is not set
270# CONFIG_LLC2 is not set
271# CONFIG_IPX is not set
272# CONFIG_ATALK is not set
273# CONFIG_X25 is not set
274# CONFIG_LAPB is not set
275# CONFIG_ECONET is not set
276# CONFIG_WAN_ROUTER is not set
277# CONFIG_NET_SCHED is not set
278# CONFIG_DCB is not set
279
280#
281# Network testing
282#
283# CONFIG_NET_PKTGEN is not set
284# CONFIG_HAMRADIO is not set
285CONFIG_CAN=y
286CONFIG_CAN_RAW=y
287CONFIG_CAN_BCM=y
288
289#
290# CAN Device Drivers
291#
292# CONFIG_CAN_VCAN is not set
293# CONFIG_CAN_DEBUG_DEVICES is not set
294# CONFIG_IRDA is not set
295# CONFIG_BT is not set
296# CONFIG_AF_RXRPC is not set
297# CONFIG_PHONET is not set
298# CONFIG_WIRELESS is not set
299# CONFIG_WIMAX is not set
300# CONFIG_RFKILL is not set
301# CONFIG_NET_9P is not set
302
303#
304# Device Drivers
305#
306
307#
308# Generic Driver Options
309#
310CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
311CONFIG_STANDALONE=y
312# CONFIG_PREVENT_FIRMWARE_BUILD is not set
313# CONFIG_FW_LOADER is not set
314# CONFIG_SYS_HYPERVISOR is not set
315# CONFIG_CONNECTOR is not set
316CONFIG_MTD=y
317# CONFIG_MTD_DEBUG is not set
318CONFIG_MTD_CONCAT=y
319CONFIG_MTD_PARTITIONS=y
320# CONFIG_MTD_TESTS is not set
321# CONFIG_MTD_REDBOOT_PARTS is not set
322# CONFIG_MTD_CMDLINE_PARTS is not set
323# CONFIG_MTD_AR7_PARTS is not set
324
325#
326# User Modules And Translation Layers
327#
328CONFIG_MTD_CHAR=y
329CONFIG_MTD_BLKDEVS=y
330CONFIG_MTD_BLOCK=y
331# CONFIG_FTL is not set
332# CONFIG_NFTL is not set
333# CONFIG_INFTL is not set
334# CONFIG_RFD_FTL is not set
335# CONFIG_SSFDC is not set
336# CONFIG_MTD_OOPS is not set
337
338#
339# RAM/ROM/Flash chip drivers
340#
341CONFIG_MTD_CFI=y
342CONFIG_MTD_JEDECPROBE=y
343CONFIG_MTD_GEN_PROBE=y
344# CONFIG_MTD_CFI_ADV_OPTIONS is not set
345CONFIG_MTD_MAP_BANK_WIDTH_1=y
346CONFIG_MTD_MAP_BANK_WIDTH_2=y
347CONFIG_MTD_MAP_BANK_WIDTH_4=y
348# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
349# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
350# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
351CONFIG_MTD_CFI_I1=y
352CONFIG_MTD_CFI_I2=y
353# CONFIG_MTD_CFI_I4 is not set
354# CONFIG_MTD_CFI_I8 is not set
355# CONFIG_MTD_CFI_INTELEXT is not set
356CONFIG_MTD_CFI_AMDSTD=y
357# CONFIG_MTD_CFI_STAA is not set
358CONFIG_MTD_CFI_UTIL=y
359# CONFIG_MTD_RAM is not set
360# CONFIG_MTD_ROM is not set
361CONFIG_MTD_ABSENT=y
362
363#
364# Mapping drivers for chip access
365#
366# CONFIG_MTD_COMPLEX_MAPPINGS is not set
367CONFIG_MTD_PHYSMAP=y
368# CONFIG_MTD_PHYSMAP_COMPAT is not set
369# CONFIG_MTD_PLATRAM is not set
370
371#
372# Self-contained MTD device drivers
373#
374# CONFIG_MTD_DATAFLASH is not set
375# CONFIG_MTD_M25P80 is not set
376# CONFIG_MTD_SLRAM is not set
377# CONFIG_MTD_PHRAM is not set
378# CONFIG_MTD_MTDRAM is not set
379CONFIG_MTD_BLOCK2MTD=y
380
381#
382# Disk-On-Chip Device Drivers
383#
384# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set
387# CONFIG_MTD_NAND is not set
388# CONFIG_MTD_ONENAND is not set
389
390#
391# LPDDR flash memory drivers
392#
393# CONFIG_MTD_LPDDR is not set
394# CONFIG_MTD_QINFO_PROBE is not set
395
396#
397# UBI - Unsorted block images
398#
399# CONFIG_MTD_UBI is not set
400# CONFIG_PARPORT is not set
401CONFIG_BLK_DEV=y
402# CONFIG_BLK_DEV_COW_COMMON is not set
403CONFIG_BLK_DEV_LOOP=y
404# CONFIG_BLK_DEV_CRYPTOLOOP is not set
405# CONFIG_BLK_DEV_NBD is not set
406# CONFIG_BLK_DEV_RAM is not set
407# CONFIG_CDROM_PKTCDVD is not set
408# CONFIG_ATA_OVER_ETH is not set
409CONFIG_MISC_DEVICES=y
410CONFIG_ATMEL_PWM=y
411# CONFIG_ATMEL_TCLIB is not set
412# CONFIG_EEPROM_93CX6 is not set
413# CONFIG_ICS932S401 is not set
414CONFIG_ATMEL_SSC=y
415# CONFIG_ENCLOSURE_SERVICES is not set
416# CONFIG_C2PORT is not set
417
418#
419# SCSI device support
420#
421# CONFIG_RAID_ATTRS is not set
422CONFIG_SCSI=y
423CONFIG_SCSI_DMA=y
424# CONFIG_SCSI_TGT is not set
425# CONFIG_SCSI_NETLINK is not set
426CONFIG_SCSI_PROC_FS=y
427
428#
429# SCSI support type (disk, tape, CD-ROM)
430#
431CONFIG_BLK_DEV_SD=y
432# CONFIG_CHR_DEV_ST is not set
433# CONFIG_CHR_DEV_OSST is not set
434# CONFIG_BLK_DEV_SR is not set
435# CONFIG_CHR_DEV_SG is not set
436# CONFIG_CHR_DEV_SCH is not set
437
438#
439# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
440#
441# CONFIG_SCSI_MULTI_LUN is not set
442# CONFIG_SCSI_CONSTANTS is not set
443# CONFIG_SCSI_LOGGING is not set
444# CONFIG_SCSI_SCAN_ASYNC is not set
445CONFIG_SCSI_WAIT_SCAN=m
446
447#
448# SCSI Transports
449#
450# CONFIG_SCSI_SPI_ATTRS is not set
451# CONFIG_SCSI_FC_ATTRS is not set
452# CONFIG_SCSI_ISCSI_ATTRS is not set
453# CONFIG_SCSI_SAS_LIBSAS is not set
454# CONFIG_SCSI_SRP_ATTRS is not set
455# CONFIG_SCSI_LOWLEVEL is not set
456# CONFIG_SCSI_DH is not set
457# CONFIG_ATA is not set
458# CONFIG_MD is not set
459CONFIG_NETDEVICES=y
460# CONFIG_DUMMY is not set
461# CONFIG_BONDING is not set
462# CONFIG_MACVLAN is not set
463# CONFIG_EQUALIZER is not set
464# CONFIG_TUN is not set
465# CONFIG_VETH is not set
466CONFIG_PHYLIB=y
467
468#
469# MII PHY device drivers
470#
471# CONFIG_MARVELL_PHY is not set
472# CONFIG_DAVICOM_PHY is not set
473# CONFIG_QSEMI_PHY is not set
474# CONFIG_LXT_PHY is not set
475# CONFIG_CICADA_PHY is not set
476# CONFIG_VITESSE_PHY is not set
477# CONFIG_SMSC_PHY is not set
478# CONFIG_BROADCOM_PHY is not set
479# CONFIG_ICPLUS_PHY is not set
480# CONFIG_REALTEK_PHY is not set
481# CONFIG_NATIONAL_PHY is not set
482# CONFIG_STE10XP is not set
483# CONFIG_LSI_ET1011C_PHY is not set
484# CONFIG_FIXED_PHY is not set
485# CONFIG_MDIO_BITBANG is not set
486CONFIG_NET_ETHERNET=y
487# CONFIG_MII is not set
488CONFIG_MACB=y
489# CONFIG_ENC28J60 is not set
490# CONFIG_IBM_NEW_EMAC_ZMII is not set
491# CONFIG_IBM_NEW_EMAC_RGMII is not set
492# CONFIG_IBM_NEW_EMAC_TAH is not set
493# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
494# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
495# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
496# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
497# CONFIG_B44 is not set
498# CONFIG_NETDEV_1000 is not set
499# CONFIG_NETDEV_10000 is not set
500
501#
502# Wireless LAN
503#
504# CONFIG_WLAN_PRE80211 is not set
505# CONFIG_WLAN_80211 is not set
506# CONFIG_IWLWIFI_LEDS is not set
507
508#
509# Enable WiMAX (Networking options) to see the WiMAX drivers
510#
511# CONFIG_WAN is not set
512# CONFIG_PPP is not set
513# CONFIG_SLIP is not set
514# CONFIG_NETCONSOLE is not set
515# CONFIG_NETPOLL is not set
516# CONFIG_NET_POLL_CONTROLLER is not set
517# CONFIG_ISDN is not set
518# CONFIG_PHONE is not set
519
520#
521# Input device support
522#
523CONFIG_INPUT=y
524# CONFIG_INPUT_FF_MEMLESS is not set
525# CONFIG_INPUT_POLLDEV is not set
526
527#
528# Userland interfaces
529#
530# CONFIG_INPUT_MOUSEDEV is not set
531# CONFIG_INPUT_JOYDEV is not set
532CONFIG_INPUT_EVDEV=y
533# CONFIG_INPUT_EVBUG is not set
534
535#
536# Input Device Drivers
537#
538CONFIG_INPUT_KEYBOARD=y
539# CONFIG_KEYBOARD_ATKBD is not set
540# CONFIG_KEYBOARD_SUNKBD is not set
541# CONFIG_KEYBOARD_LKKBD is not set
542# CONFIG_KEYBOARD_XTKBD is not set
543# CONFIG_KEYBOARD_NEWTON is not set
544# CONFIG_KEYBOARD_STOWAWAY is not set
545# CONFIG_KEYBOARD_GPIO is not set
546# CONFIG_INPUT_MOUSE is not set
547# CONFIG_INPUT_JOYSTICK is not set
548# CONFIG_INPUT_TABLET is not set
549CONFIG_INPUT_TOUCHSCREEN=y
550CONFIG_TOUCHSCREEN_ADS7846=y
551# CONFIG_TOUCHSCREEN_FUJITSU is not set
552# CONFIG_TOUCHSCREEN_GUNZE is not set
553# CONFIG_TOUCHSCREEN_ELO is not set
554# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
555# CONFIG_TOUCHSCREEN_MTOUCH is not set
556# CONFIG_TOUCHSCREEN_INEXIO is not set
557# CONFIG_TOUCHSCREEN_MK712 is not set
558# CONFIG_TOUCHSCREEN_PENMOUNT is not set
559# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
560# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
561# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
562# CONFIG_TOUCHSCREEN_TSC2007 is not set
563CONFIG_INPUT_MISC=y
564CONFIG_INPUT_UINPUT=y
565
566#
567# Hardware I/O ports
568#
569# CONFIG_SERIO is not set
570# CONFIG_GAMEPORT is not set
571
572#
573# Character devices
574#
575CONFIG_VT=y
576# CONFIG_CONSOLE_TRANSLATIONS is not set
577CONFIG_VT_CONSOLE=y
578CONFIG_HW_CONSOLE=y
579CONFIG_VT_HW_CONSOLE_BINDING=y
580# CONFIG_DEVKMEM is not set
581# CONFIG_SERIAL_NONSTANDARD is not set
582
583#
584# Serial drivers
585#
586# CONFIG_SERIAL_8250 is not set
587
588#
589# Non-8250 serial port support
590#
591CONFIG_SERIAL_ATMEL=y
592CONFIG_SERIAL_ATMEL_CONSOLE=y
593CONFIG_SERIAL_ATMEL_PDC=y
594# CONFIG_SERIAL_ATMEL_TTYAT is not set
595CONFIG_SERIAL_CORE=y
596CONFIG_SERIAL_CORE_CONSOLE=y
597CONFIG_UNIX98_PTYS=y
598# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
599# CONFIG_LEGACY_PTYS is not set
600# CONFIG_IPMI_HANDLER is not set
601# CONFIG_HW_RANDOM is not set
602# CONFIG_R3964 is not set
603# CONFIG_RAW_DRIVER is not set
604# CONFIG_TCG_TPM is not set
605CONFIG_I2C=y
606CONFIG_I2C_BOARDINFO=y
607CONFIG_I2C_CHARDEV=y
608CONFIG_I2C_HELPER_AUTO=y
609CONFIG_I2C_ALGOBIT=y
610
611#
612# I2C Hardware Bus support
613#
614
615#
616# I2C system bus drivers (mostly embedded / system-on-chip)
617#
618CONFIG_I2C_GPIO=y
619# CONFIG_I2C_OCORES is not set
620# CONFIG_I2C_SIMTEC is not set
621
622#
623# External I2C/SMBus adapter drivers
624#
625# CONFIG_I2C_PARPORT_LIGHT is not set
626# CONFIG_I2C_TAOS_EVM is not set
627
628#
629# Other I2C/SMBus bus drivers
630#
631# CONFIG_I2C_PCA_PLATFORM is not set
632# CONFIG_I2C_STUB is not set
633
634#
635# Miscellaneous I2C Chip support
636#
637# CONFIG_DS1682 is not set
638# CONFIG_AT24 is not set
639# CONFIG_SENSORS_EEPROM is not set
640# CONFIG_SENSORS_PCF8574 is not set
641# CONFIG_PCF8575 is not set
642# CONFIG_SENSORS_PCA9539 is not set
643# CONFIG_SENSORS_PCF8591 is not set
644# CONFIG_SENSORS_MAX6875 is not set
645# CONFIG_SENSORS_TSL2550 is not set
646# CONFIG_I2C_DEBUG_CORE is not set
647# CONFIG_I2C_DEBUG_ALGO is not set
648# CONFIG_I2C_DEBUG_BUS is not set
649# CONFIG_I2C_DEBUG_CHIP is not set
650CONFIG_SPI=y
651CONFIG_SPI_MASTER=y
652
653#
654# SPI Master Controller Drivers
655#
656CONFIG_SPI_ATMEL=y
657# CONFIG_SPI_BITBANG is not set
658# CONFIG_SPI_GPIO is not set
659
660#
661# SPI Protocol Masters
662#
663# CONFIG_SPI_AT25 is not set
664CONFIG_SPI_SPIDEV=y
665# CONFIG_SPI_TLE62X0 is not set
666CONFIG_ARCH_REQUIRE_GPIOLIB=y
667CONFIG_GPIOLIB=y
668CONFIG_GPIO_SYSFS=y
669
670#
671# Memory mapped GPIO expanders:
672#
673
674#
675# I2C GPIO expanders:
676#
677# CONFIG_GPIO_MAX732X is not set
678# CONFIG_GPIO_PCA953X is not set
679# CONFIG_GPIO_PCF857X is not set
680
681#
682# PCI GPIO expanders:
683#
684
685#
686# SPI GPIO expanders:
687#
688# CONFIG_GPIO_MAX7301 is not set
689# CONFIG_GPIO_MCP23S08 is not set
690# CONFIG_W1 is not set
691# CONFIG_POWER_SUPPLY is not set
692# CONFIG_HWMON is not set
693# CONFIG_THERMAL is not set
694# CONFIG_THERMAL_HWMON is not set
695CONFIG_WATCHDOG=y
696# CONFIG_WATCHDOG_NOWAYOUT is not set
697
698#
699# Watchdog Device Drivers
700#
701# CONFIG_SOFT_WATCHDOG is not set
702# CONFIG_AT32AP700X_WDT is not set
703CONFIG_SSB_POSSIBLE=y
704
705#
706# Sonics Silicon Backplane
707#
708# CONFIG_SSB is not set
709
710#
711# Multifunction device drivers
712#
713# CONFIG_MFD_CORE is not set
714# CONFIG_MFD_SM501 is not set
715# CONFIG_HTC_PASIC3 is not set
716# CONFIG_TPS65010 is not set
717# CONFIG_TWL4030_CORE is not set
718# CONFIG_MFD_TMIO is not set
719# CONFIG_PMIC_DA903X is not set
720# CONFIG_MFD_WM8400 is not set
721# CONFIG_MFD_WM8350_I2C is not set
722# CONFIG_MFD_PCF50633 is not set
723# CONFIG_REGULATOR is not set
724
725#
726# Multimedia devices
727#
728
729#
730# Multimedia core support
731#
732# CONFIG_VIDEO_DEV is not set
733# CONFIG_DVB_CORE is not set
734# CONFIG_VIDEO_MEDIA is not set
735
736#
737# Multimedia drivers
738#
739# CONFIG_DAB is not set
740
741#
742# Graphics support
743#
744# CONFIG_VGASTATE is not set
745CONFIG_VIDEO_OUTPUT_CONTROL=y
746CONFIG_FB=y
747# CONFIG_FIRMWARE_EDID is not set
748# CONFIG_FB_DDC is not set
749# CONFIG_FB_BOOT_VESA_SUPPORT is not set
750CONFIG_FB_CFB_FILLRECT=y
751CONFIG_FB_CFB_COPYAREA=y
752CONFIG_FB_CFB_IMAGEBLIT=y
753# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
754# CONFIG_FB_SYS_FILLRECT is not set
755# CONFIG_FB_SYS_COPYAREA is not set
756# CONFIG_FB_SYS_IMAGEBLIT is not set
757# CONFIG_FB_FOREIGN_ENDIAN is not set
758# CONFIG_FB_SYS_FOPS is not set
759# CONFIG_FB_SVGALIB is not set
760# CONFIG_FB_MACMODES is not set
761# CONFIG_FB_BACKLIGHT is not set
762# CONFIG_FB_MODE_HELPERS is not set
763# CONFIG_FB_TILEBLITTING is not set
764
765#
766# Frame buffer hardware drivers
767#
768# CONFIG_FB_S1D13XXX is not set
769CONFIG_FB_ATMEL=y
770# CONFIG_FB_VIRTUAL is not set
771# CONFIG_FB_METRONOME is not set
772# CONFIG_FB_MB862XX is not set
773CONFIG_BACKLIGHT_LCD_SUPPORT=y
774# CONFIG_LCD_CLASS_DEVICE is not set
775# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
776
777#
778# Display device support
779#
780CONFIG_DISPLAY_SUPPORT=y
781
782#
783# Display hardware drivers
784#
785
786#
787# Console display driver support
788#
789CONFIG_DUMMY_CONSOLE=y
790CONFIG_FRAMEBUFFER_CONSOLE=y
791# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
792# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
793# CONFIG_FONTS is not set
794CONFIG_FONT_8x8=y
795CONFIG_FONT_8x16=y
796CONFIG_LOGO=y
797CONFIG_LOGO_LINUX_MONO=y
798CONFIG_LOGO_LINUX_VGA16=y
799CONFIG_LOGO_LINUX_CLUT224=y
800# CONFIG_SOUND is not set
801CONFIG_HID_SUPPORT=y
802CONFIG_HID=y
803# CONFIG_HID_DEBUG is not set
804# CONFIG_HIDRAW is not set
805# CONFIG_HID_PID is not set
806
807#
808# Special HID drivers
809#
810CONFIG_HID_COMPAT=y
811CONFIG_USB_SUPPORT=y
812# CONFIG_USB_ARCH_HAS_HCD is not set
813# CONFIG_USB_ARCH_HAS_OHCI is not set
814# CONFIG_USB_ARCH_HAS_EHCI is not set
815# CONFIG_USB_OTG_WHITELIST is not set
816# CONFIG_USB_OTG_BLACKLIST_HUB is not set
817
818#
819# Enable Host or Gadget support to see Inventra options
820#
821
822#
823# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
824#
825# CONFIG_USB_GADGET is not set
826
827#
828# OTG and related infrastructure
829#
830CONFIG_MMC=y
831# CONFIG_MMC_DEBUG is not set
832# CONFIG_MMC_UNSAFE_RESUME is not set
833
834#
835# MMC/SD/SDIO Card Drivers
836#
837CONFIG_MMC_BLOCK=y
838CONFIG_MMC_BLOCK_BOUNCE=y
839# CONFIG_SDIO_UART is not set
840# CONFIG_MMC_TEST is not set
841
842#
843# MMC/SD/SDIO Host Controller Drivers
844#
845# CONFIG_MMC_SDHCI is not set
846CONFIG_MMC_ATMELMCI=y
847CONFIG_MMC_ATMELMCI_DMA=y
848# CONFIG_MMC_SPI is not set
849# CONFIG_MEMSTICK is not set
850CONFIG_NEW_LEDS=y
851CONFIG_LEDS_CLASS=y
852
853#
854# LED drivers
855#
856CONFIG_LEDS_ATMEL_PWM=y
857# CONFIG_LEDS_PCA9532 is not set
858# CONFIG_LEDS_GPIO is not set
859# CONFIG_LEDS_PCA955X is not set
860
861#
862# LED Triggers
863#
864# CONFIG_LEDS_TRIGGERS is not set
865# CONFIG_ACCESSIBILITY is not set
866CONFIG_RTC_LIB=y
867CONFIG_RTC_CLASS=y
868# CONFIG_RTC_HCTOSYS is not set
869# CONFIG_RTC_DEBUG is not set
870
871#
872# RTC interfaces
873#
874CONFIG_RTC_INTF_SYSFS=y
875CONFIG_RTC_INTF_PROC=y
876CONFIG_RTC_INTF_DEV=y
877# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
878# CONFIG_RTC_DRV_TEST is not set
879
880#
881# I2C RTC drivers
882#
883# CONFIG_RTC_DRV_DS1307 is not set
884# CONFIG_RTC_DRV_DS1374 is not set
885# CONFIG_RTC_DRV_DS1672 is not set
886# CONFIG_RTC_DRV_MAX6900 is not set
887# CONFIG_RTC_DRV_RS5C372 is not set
888# CONFIG_RTC_DRV_ISL1208 is not set
889# CONFIG_RTC_DRV_X1205 is not set
890CONFIG_RTC_DRV_PCF8563=y
891# CONFIG_RTC_DRV_PCF8583 is not set
892# CONFIG_RTC_DRV_M41T80 is not set
893# CONFIG_RTC_DRV_S35390A is not set
894# CONFIG_RTC_DRV_FM3130 is not set
895# CONFIG_RTC_DRV_RX8581 is not set
896
897#
898# SPI RTC drivers
899#
900# CONFIG_RTC_DRV_M41T94 is not set
901# CONFIG_RTC_DRV_DS1305 is not set
902# CONFIG_RTC_DRV_DS1390 is not set
903# CONFIG_RTC_DRV_MAX6902 is not set
904# CONFIG_RTC_DRV_R9701 is not set
905# CONFIG_RTC_DRV_RS5C348 is not set
906# CONFIG_RTC_DRV_DS3234 is not set
907
908#
909# Platform RTC drivers
910#
911# CONFIG_RTC_DRV_DS1286 is not set
912# CONFIG_RTC_DRV_DS1511 is not set
913# CONFIG_RTC_DRV_DS1553 is not set
914# CONFIG_RTC_DRV_DS1742 is not set
915# CONFIG_RTC_DRV_STK17TA8 is not set
916# CONFIG_RTC_DRV_M48T86 is not set
917# CONFIG_RTC_DRV_M48T35 is not set
918# CONFIG_RTC_DRV_M48T59 is not set
919# CONFIG_RTC_DRV_BQ4802 is not set
920# CONFIG_RTC_DRV_V3020 is not set
921
922#
923# on-CPU RTC drivers
924#
925# CONFIG_RTC_DRV_AT32AP700X is not set
926CONFIG_DMADEVICES=y
927
928#
929# DMA Devices
930#
931CONFIG_DW_DMAC=y
932CONFIG_DMA_ENGINE=y
933
934#
935# DMA Clients
936#
937# CONFIG_NET_DMA is not set
938# CONFIG_DMATEST is not set
939CONFIG_UIO=y
940# CONFIG_UIO_PDRV is not set
941# CONFIG_UIO_PDRV_GENIRQ is not set
942# CONFIG_UIO_SMX is not set
943# CONFIG_UIO_SERCOS3 is not set
944# CONFIG_STAGING is not set
945
946#
947# File systems
948#
949CONFIG_EXT2_FS=y
950# CONFIG_EXT2_FS_XATTR is not set
951# CONFIG_EXT2_FS_XIP is not set
952# CONFIG_EXT3_FS is not set
953# CONFIG_EXT4_FS is not set
954# CONFIG_REISERFS_FS is not set
955# CONFIG_JFS_FS is not set
956# CONFIG_FS_POSIX_ACL is not set
957CONFIG_FILE_LOCKING=y
958# CONFIG_XFS_FS is not set
959# CONFIG_OCFS2_FS is not set
960# CONFIG_BTRFS_FS is not set
961# CONFIG_DNOTIFY is not set
962CONFIG_INOTIFY=y
963CONFIG_INOTIFY_USER=y
964# CONFIG_QUOTA is not set
965# CONFIG_AUTOFS_FS is not set
966# CONFIG_AUTOFS4_FS is not set
967CONFIG_FUSE_FS=y
968
969#
970# CD-ROM/DVD Filesystems
971#
972# CONFIG_ISO9660_FS is not set
973# CONFIG_UDF_FS is not set
974
975#
976# DOS/FAT/NT Filesystems
977#
978CONFIG_FAT_FS=y
979CONFIG_MSDOS_FS=y
980CONFIG_VFAT_FS=y
981CONFIG_FAT_DEFAULT_CODEPAGE=437
982CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
983# CONFIG_NTFS_FS is not set
984
985#
986# Pseudo filesystems
987#
988CONFIG_PROC_FS=y
989# CONFIG_PROC_KCORE is not set
990CONFIG_PROC_SYSCTL=y
991CONFIG_PROC_PAGE_MONITOR=y
992CONFIG_SYSFS=y
993CONFIG_TMPFS=y
994# CONFIG_TMPFS_POSIX_ACL is not set
995# CONFIG_HUGETLB_PAGE is not set
996CONFIG_CONFIGFS_FS=y
997CONFIG_MISC_FILESYSTEMS=y
998# CONFIG_ADFS_FS is not set
999# CONFIG_AFFS_FS is not set
1000# CONFIG_HFS_FS is not set
1001# CONFIG_HFSPLUS_FS is not set
1002# CONFIG_BEFS_FS is not set
1003# CONFIG_BFS_FS is not set
1004# CONFIG_EFS_FS is not set
1005CONFIG_JFFS2_FS=y
1006CONFIG_JFFS2_FS_DEBUG=0
1007CONFIG_JFFS2_FS_WRITEBUFFER=y
1008CONFIG_JFFS2_FS_WBUF_VERIFY=y
1009# CONFIG_JFFS2_SUMMARY is not set
1010# CONFIG_JFFS2_FS_XATTR is not set
1011# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1012CONFIG_JFFS2_ZLIB=y
1013# CONFIG_JFFS2_LZO is not set
1014CONFIG_JFFS2_RTIME=y
1015# CONFIG_JFFS2_RUBIN is not set
1016CONFIG_CRAMFS=y
1017# CONFIG_SQUASHFS is not set
1018# CONFIG_VXFS_FS is not set
1019# CONFIG_MINIX_FS is not set
1020# CONFIG_OMFS_FS is not set
1021# CONFIG_HPFS_FS is not set
1022# CONFIG_QNX4FS_FS is not set
1023# CONFIG_ROMFS_FS is not set
1024# CONFIG_SYSV_FS is not set
1025# CONFIG_UFS_FS is not set
1026CONFIG_NETWORK_FILESYSTEMS=y
1027CONFIG_NFS_FS=y
1028CONFIG_NFS_V3=y
1029# CONFIG_NFS_V3_ACL is not set
1030# CONFIG_NFS_V4 is not set
1031CONFIG_ROOT_NFS=y
1032# CONFIG_NFSD is not set
1033CONFIG_LOCKD=y
1034CONFIG_LOCKD_V4=y
1035CONFIG_NFS_COMMON=y
1036CONFIG_SUNRPC=y
1037# CONFIG_SUNRPC_REGISTER_V4 is not set
1038# CONFIG_RPCSEC_GSS_KRB5 is not set
1039# CONFIG_RPCSEC_GSS_SPKM3 is not set
1040# CONFIG_SMB_FS is not set
1041# CONFIG_CIFS is not set
1042# CONFIG_NCP_FS is not set
1043# CONFIG_CODA_FS is not set
1044# CONFIG_AFS_FS is not set
1045
1046#
1047# Partition Types
1048#
1049# CONFIG_PARTITION_ADVANCED is not set
1050CONFIG_MSDOS_PARTITION=y
1051CONFIG_NLS=y
1052CONFIG_NLS_DEFAULT="iso8859-1"
1053CONFIG_NLS_CODEPAGE_437=y
1054# CONFIG_NLS_CODEPAGE_737 is not set
1055# CONFIG_NLS_CODEPAGE_775 is not set
1056CONFIG_NLS_CODEPAGE_850=y
1057# CONFIG_NLS_CODEPAGE_852 is not set
1058# CONFIG_NLS_CODEPAGE_855 is not set
1059# CONFIG_NLS_CODEPAGE_857 is not set
1060# CONFIG_NLS_CODEPAGE_860 is not set
1061# CONFIG_NLS_CODEPAGE_861 is not set
1062# CONFIG_NLS_CODEPAGE_862 is not set
1063# CONFIG_NLS_CODEPAGE_863 is not set
1064# CONFIG_NLS_CODEPAGE_864 is not set
1065# CONFIG_NLS_CODEPAGE_865 is not set
1066# CONFIG_NLS_CODEPAGE_866 is not set
1067# CONFIG_NLS_CODEPAGE_869 is not set
1068# CONFIG_NLS_CODEPAGE_936 is not set
1069# CONFIG_NLS_CODEPAGE_950 is not set
1070# CONFIG_NLS_CODEPAGE_932 is not set
1071# CONFIG_NLS_CODEPAGE_949 is not set
1072# CONFIG_NLS_CODEPAGE_874 is not set
1073# CONFIG_NLS_ISO8859_8 is not set
1074# CONFIG_NLS_CODEPAGE_1250 is not set
1075# CONFIG_NLS_CODEPAGE_1251 is not set
1076# CONFIG_NLS_ASCII is not set
1077CONFIG_NLS_ISO8859_1=y
1078# CONFIG_NLS_ISO8859_2 is not set
1079# CONFIG_NLS_ISO8859_3 is not set
1080# CONFIG_NLS_ISO8859_4 is not set
1081# CONFIG_NLS_ISO8859_5 is not set
1082# CONFIG_NLS_ISO8859_6 is not set
1083# CONFIG_NLS_ISO8859_7 is not set
1084# CONFIG_NLS_ISO8859_9 is not set
1085# CONFIG_NLS_ISO8859_13 is not set
1086# CONFIG_NLS_ISO8859_14 is not set
1087# CONFIG_NLS_ISO8859_15 is not set
1088# CONFIG_NLS_KOI8_R is not set
1089# CONFIG_NLS_KOI8_U is not set
1090CONFIG_NLS_UTF8=y
1091# CONFIG_DLM is not set
1092
1093#
1094# Kernel hacking
1095#
1096# CONFIG_PRINTK_TIME is not set
1097CONFIG_ENABLE_WARN_DEPRECATED=y
1098CONFIG_ENABLE_MUST_CHECK=y
1099CONFIG_FRAME_WARN=1024
1100# CONFIG_MAGIC_SYSRQ is not set
1101# CONFIG_UNUSED_SYMBOLS is not set
1102# CONFIG_DEBUG_FS is not set
1103# CONFIG_HEADERS_CHECK is not set
1104# CONFIG_DEBUG_KERNEL is not set
1105# CONFIG_SLUB_DEBUG_ON is not set
1106# CONFIG_SLUB_STATS is not set
1107# CONFIG_DEBUG_BUGVERBOSE is not set
1108# CONFIG_DEBUG_MEMORY_INIT is not set
1109# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1110
1111#
1112# Tracers
1113#
1114# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1115# CONFIG_SAMPLES is not set
1116
1117#
1118# Security options
1119#
1120# CONFIG_KEYS is not set
1121# CONFIG_SECURITY is not set
1122# CONFIG_SECURITYFS is not set
1123# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1124CONFIG_CRYPTO=y
1125
1126#
1127# Crypto core or helper
1128#
1129# CONFIG_CRYPTO_FIPS is not set
1130CONFIG_CRYPTO_ALGAPI=y
1131CONFIG_CRYPTO_ALGAPI2=y
1132CONFIG_CRYPTO_AEAD=y
1133CONFIG_CRYPTO_AEAD2=y
1134CONFIG_CRYPTO_BLKCIPHER=y
1135CONFIG_CRYPTO_BLKCIPHER2=y
1136CONFIG_CRYPTO_HASH=y
1137CONFIG_CRYPTO_HASH2=y
1138CONFIG_CRYPTO_RNG2=y
1139CONFIG_CRYPTO_MANAGER=y
1140CONFIG_CRYPTO_MANAGER2=y
1141# CONFIG_CRYPTO_GF128MUL is not set
1142# CONFIG_CRYPTO_NULL is not set
1143# CONFIG_CRYPTO_CRYPTD is not set
1144CONFIG_CRYPTO_AUTHENC=y
1145# CONFIG_CRYPTO_TEST is not set
1146
1147#
1148# Authenticated Encryption with Associated Data
1149#
1150# CONFIG_CRYPTO_CCM is not set
1151# CONFIG_CRYPTO_GCM is not set
1152# CONFIG_CRYPTO_SEQIV is not set
1153
1154#
1155# Block modes
1156#
1157CONFIG_CRYPTO_CBC=y
1158# CONFIG_CRYPTO_CTR is not set
1159# CONFIG_CRYPTO_CTS is not set
1160# CONFIG_CRYPTO_ECB is not set
1161# CONFIG_CRYPTO_LRW is not set
1162# CONFIG_CRYPTO_PCBC is not set
1163# CONFIG_CRYPTO_XTS is not set
1164
1165#
1166# Hash modes
1167#
1168CONFIG_CRYPTO_HMAC=y
1169# CONFIG_CRYPTO_XCBC is not set
1170
1171#
1172# Digest
1173#
1174# CONFIG_CRYPTO_CRC32C is not set
1175# CONFIG_CRYPTO_MD4 is not set
1176CONFIG_CRYPTO_MD5=y
1177# CONFIG_CRYPTO_MICHAEL_MIC is not set
1178# CONFIG_CRYPTO_RMD128 is not set
1179# CONFIG_CRYPTO_RMD160 is not set
1180# CONFIG_CRYPTO_RMD256 is not set
1181# CONFIG_CRYPTO_RMD320 is not set
1182CONFIG_CRYPTO_SHA1=y
1183# CONFIG_CRYPTO_SHA256 is not set
1184# CONFIG_CRYPTO_SHA512 is not set
1185# CONFIG_CRYPTO_TGR192 is not set
1186# CONFIG_CRYPTO_WP512 is not set
1187
1188#
1189# Ciphers
1190#
1191# CONFIG_CRYPTO_AES is not set
1192# CONFIG_CRYPTO_ANUBIS is not set
1193# CONFIG_CRYPTO_ARC4 is not set
1194# CONFIG_CRYPTO_BLOWFISH is not set
1195# CONFIG_CRYPTO_CAMELLIA is not set
1196# CONFIG_CRYPTO_CAST5 is not set
1197# CONFIG_CRYPTO_CAST6 is not set
1198CONFIG_CRYPTO_DES=y
1199# CONFIG_CRYPTO_FCRYPT is not set
1200# CONFIG_CRYPTO_KHAZAD is not set
1201# CONFIG_CRYPTO_SALSA20 is not set
1202# CONFIG_CRYPTO_SEED is not set
1203# CONFIG_CRYPTO_SERPENT is not set
1204# CONFIG_CRYPTO_TEA is not set
1205# CONFIG_CRYPTO_TWOFISH is not set
1206
1207#
1208# Compression
1209#
1210CONFIG_CRYPTO_DEFLATE=y
1211# CONFIG_CRYPTO_LZO is not set
1212
1213#
1214# Random Number Generation
1215#
1216# CONFIG_CRYPTO_ANSI_CPRNG is not set
1217# CONFIG_CRYPTO_HW is not set
1218
1219#
1220# Library routines
1221#
1222CONFIG_BITREVERSE=y
1223CONFIG_GENERIC_FIND_LAST_BIT=y
1224# CONFIG_CRC_CCITT is not set
1225# CONFIG_CRC16 is not set
1226# CONFIG_CRC_T10DIF is not set
1227# CONFIG_CRC_ITU_T is not set
1228CONFIG_CRC32=y
1229# CONFIG_CRC7 is not set
1230# CONFIG_LIBCRC32C is not set
1231CONFIG_ZLIB_INFLATE=y
1232CONFIG_ZLIB_DEFLATE=y
1233CONFIG_GENERIC_ALLOCATOR=y
1234CONFIG_PLIST=y
1235CONFIG_HAS_IOMEM=y
1236CONFIG_HAS_IOPORT=y
1237CONFIG_HAS_DMA=y
diff --git a/arch/avr32/include/asm/ftrace.h b/arch/avr32/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/avr32/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/avr32/include/asm/hardirq.h b/arch/avr32/include/asm/hardirq.h
index 267354356f60..015bc75ea798 100644
--- a/arch/avr32/include/asm/hardirq.h
+++ b/arch/avr32/include/asm/hardirq.h
@@ -20,15 +20,4 @@ void ack_bad_irq(unsigned int irq);
20 20
21#endif /* __ASSEMBLY__ */ 21#endif /* __ASSEMBLY__ */
22 22
23#define HARDIRQ_BITS 12
24
25/*
26 * The hardirq mask has to be large enough to have
27 * space for potentially all IRQ sources in the system
28 * nesting on a single CPU:
29 */
30#if (1 << HARDIRQ_BITS) < NR_IRQS
31# error HARDIRQ_BITS is too low!
32#endif
33
34#endif /* __ASM_AVR32_HARDIRQ_H */ 23#endif /* __ASM_AVR32_HARDIRQ_H */
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 43ae555ecb33..1bbe1da54869 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -332,7 +332,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
332 332
333asmlinkage void ret_from_fork(void); 333asmlinkage void ret_from_fork(void);
334 334
335int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 335int copy_thread(unsigned long clone_flags, unsigned long usp,
336 unsigned long unused, 336 unsigned long unused,
337 struct task_struct *p, struct pt_regs *regs) 337 struct task_struct *p, struct pt_regs *regs)
338{ 338{
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 3fbfd1e32a9e..eb9d4dc2e86d 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -26,6 +26,9 @@
26#include <mach/portmux.h> 26#include <mach/portmux.h>
27#include <mach/sram.h> 27#include <mach/sram.h>
28 28
29#include <sound/atmel-abdac.h>
30#include <sound/atmel-ac97c.h>
31
29#include <video/atmel_lcdc.h> 32#include <video/atmel_lcdc.h>
30 33
31#include "clock.h" 34#include "clock.h"
@@ -57,26 +60,26 @@
57 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more. 60 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
58 */ 61 */
59#define DEFINE_DEV(_name, _id) \ 62#define DEFINE_DEV(_name, _id) \
60static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ 63static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
61static struct platform_device _name##_id##_device = { \ 64static struct platform_device _name##_id##_device = { \
62 .name = #_name, \ 65 .name = #_name, \
63 .id = _id, \ 66 .id = _id, \
64 .dev = { \ 67 .dev = { \
65 .dma_mask = &_name##_id##_dma_mask, \ 68 .dma_mask = &_name##_id##_dma_mask, \
66 .coherent_dma_mask = DMA_32BIT_MASK, \ 69 .coherent_dma_mask = DMA_BIT_MASK(32), \
67 }, \ 70 }, \
68 .resource = _name##_id##_resource, \ 71 .resource = _name##_id##_resource, \
69 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 72 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
70} 73}
71#define DEFINE_DEV_DATA(_name, _id) \ 74#define DEFINE_DEV_DATA(_name, _id) \
72static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ 75static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
73static struct platform_device _name##_id##_device = { \ 76static struct platform_device _name##_id##_device = { \
74 .name = #_name, \ 77 .name = #_name, \
75 .id = _id, \ 78 .id = _id, \
76 .dev = { \ 79 .dev = { \
77 .dma_mask = &_name##_id##_dma_mask, \ 80 .dma_mask = &_name##_id##_dma_mask, \
78 .platform_data = &_name##_id##_data, \ 81 .platform_data = &_name##_id##_data, \
79 .coherent_dma_mask = DMA_32BIT_MASK, \ 82 .coherent_dma_mask = DMA_BIT_MASK(32), \
80 }, \ 83 }, \
81 .resource = _name##_id##_resource, \ 84 .resource = _name##_id##_resource, \
82 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 85 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
@@ -963,56 +966,68 @@ static struct resource atmel_usart3_resource[] = {
963DEFINE_DEV_DATA(atmel_usart, 3); 966DEFINE_DEV_DATA(atmel_usart, 3);
964DEV_CLK(usart, atmel_usart3, pba, 6); 967DEV_CLK(usart, atmel_usart3, pba, 6);
965 968
966static inline void configure_usart0_pins(void) 969static inline void configure_usart0_pins(int flags)
967{ 970{
968 u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */ 971 u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
972 if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 6);
973 if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 7);
974 if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 10);
969 975
970 select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP); 976 select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
971} 977}
972 978
973static inline void configure_usart1_pins(void) 979static inline void configure_usart1_pins(int flags)
974{ 980{
975 u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */ 981 u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
982 if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 19);
983 if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 20);
984 if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 16);
976 985
977 select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP); 986 select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
978} 987}
979 988
980static inline void configure_usart2_pins(void) 989static inline void configure_usart2_pins(int flags)
981{ 990{
982 u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */ 991 u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
992 if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 30);
993 if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 29);
994 if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 28);
983 995
984 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP); 996 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
985} 997}
986 998
987static inline void configure_usart3_pins(void) 999static inline void configure_usart3_pins(int flags)
988{ 1000{
989 u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */ 1001 u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
1002 if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 16);
1003 if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 15);
1004 if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 19);
990 1005
991 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP); 1006 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
992} 1007}
993 1008
994static struct platform_device *__initdata at32_usarts[4]; 1009static struct platform_device *__initdata at32_usarts[4];
995 1010
996void __init at32_map_usart(unsigned int hw_id, unsigned int line) 1011void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
997{ 1012{
998 struct platform_device *pdev; 1013 struct platform_device *pdev;
999 1014
1000 switch (hw_id) { 1015 switch (hw_id) {
1001 case 0: 1016 case 0:
1002 pdev = &atmel_usart0_device; 1017 pdev = &atmel_usart0_device;
1003 configure_usart0_pins(); 1018 configure_usart0_pins(flags);
1004 break; 1019 break;
1005 case 1: 1020 case 1:
1006 pdev = &atmel_usart1_device; 1021 pdev = &atmel_usart1_device;
1007 configure_usart1_pins(); 1022 configure_usart1_pins(flags);
1008 break; 1023 break;
1009 case 2: 1024 case 2:
1010 pdev = &atmel_usart2_device; 1025 pdev = &atmel_usart2_device;
1011 configure_usart2_pins(); 1026 configure_usart2_pins(flags);
1012 break; 1027 break;
1013 case 3: 1028 case 3:
1014 pdev = &atmel_usart3_device; 1029 pdev = &atmel_usart3_device;
1015 configure_usart3_pins(); 1030 configure_usart3_pins(flags);
1016 break; 1031 break;
1017 default: 1032 default:
1018 return; 1033 return;
@@ -1753,7 +1768,7 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
1753 if (platform_device_add_data(pdev, data, sizeof(usba_data))) 1768 if (platform_device_add_data(pdev, data, sizeof(usba_data)))
1754 goto out_free_pdev; 1769 goto out_free_pdev;
1755 1770
1756 if (data->vbus_pin >= 0) 1771 if (gpio_is_valid(data->vbus_pin))
1757 at32_select_gpio(data->vbus_pin, 0); 1772 at32_select_gpio(data->vbus_pin, 0);
1758 1773
1759 usba0_pclk.dev = &pdev->dev; 1774 usba0_pclk.dev = &pdev->dev;
@@ -1980,11 +1995,14 @@ static struct clk atmel_ac97c0_pclk = {
1980}; 1995};
1981 1996
1982struct platform_device *__init 1997struct platform_device *__init
1983at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data) 1998at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
1999 unsigned int flags)
1984{ 2000{
1985 struct platform_device *pdev; 2001 struct platform_device *pdev;
1986 struct ac97c_platform_data _data; 2002 struct dw_dma_slave *rx_dws;
1987 u32 pin_mask; 2003 struct dw_dma_slave *tx_dws;
2004 struct ac97c_platform_data _data;
2005 u32 pin_mask;
1988 2006
1989 if (id != 0) 2007 if (id != 0)
1990 return NULL; 2008 return NULL;
@@ -1995,37 +2013,52 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data)
1995 2013
1996 if (platform_device_add_resources(pdev, atmel_ac97c0_resource, 2014 if (platform_device_add_resources(pdev, atmel_ac97c0_resource,
1997 ARRAY_SIZE(atmel_ac97c0_resource))) 2015 ARRAY_SIZE(atmel_ac97c0_resource)))
1998 goto fail; 2016 goto out_free_resources;
1999 2017
2000 if (!data) { 2018 if (!data) {
2001 data = &_data; 2019 data = &_data;
2002 memset(data, 0, sizeof(struct ac97c_platform_data)); 2020 memset(data, 0, sizeof(struct ac97c_platform_data));
2003 data->reset_pin = GPIO_PIN_NONE; 2021 data->reset_pin = -ENODEV;
2004 } 2022 }
2005 2023
2006 data->dma_rx_periph_id = 3; 2024 rx_dws = &data->rx_dws;
2007 data->dma_tx_periph_id = 4; 2025 tx_dws = &data->tx_dws;
2008 data->dma_controller_id = 0; 2026
2027 /* Check if DMA slave interface for capture should be configured. */
2028 if (flags & AC97C_CAPTURE) {
2029 rx_dws->dma_dev = &dw_dmac0_device.dev;
2030 rx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT;
2031 rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3);
2032 rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
2033 }
2034
2035 /* Check if DMA slave interface for playback should be configured. */
2036 if (flags & AC97C_PLAYBACK) {
2037 tx_dws->dma_dev = &dw_dmac0_device.dev;
2038 tx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT;
2039 tx_dws->cfg_hi = DWC_CFGH_DST_PER(4);
2040 tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
2041 }
2009 2042
2010 if (platform_device_add_data(pdev, data, 2043 if (platform_device_add_data(pdev, data,
2011 sizeof(struct ac97c_platform_data))) 2044 sizeof(struct ac97c_platform_data)))
2012 goto fail; 2045 goto out_free_resources;
2013 2046
2014 pin_mask = (1 << 20) | (1 << 21); /* SDO & SYNC */ 2047 /* SDO | SYNC | SCLK | SDI */
2015 pin_mask |= (1 << 22) | (1 << 23); /* SCLK & SDI */ 2048 pin_mask = (1 << 20) | (1 << 21) | (1 << 22) | (1 << 23);
2016 2049
2017 select_peripheral(PIOB, pin_mask, PERIPH_B, 0); 2050 select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
2018 2051
2019 /* TODO: gpio_is_valid(data->reset_pin) with kernel 2.6.26. */ 2052 if (gpio_is_valid(data->reset_pin))
2020 if (data->reset_pin != GPIO_PIN_NONE) 2053 at32_select_gpio(data->reset_pin, AT32_GPIOF_OUTPUT
2021 at32_select_gpio(data->reset_pin, 0); 2054 | AT32_GPIOF_HIGH);
2022 2055
2023 atmel_ac97c0_pclk.dev = &pdev->dev; 2056 atmel_ac97c0_pclk.dev = &pdev->dev;
2024 2057
2025 platform_device_add(pdev); 2058 platform_device_add(pdev);
2026 return pdev; 2059 return pdev;
2027 2060
2028fail: 2061out_free_resources:
2029 platform_device_put(pdev); 2062 platform_device_put(pdev);
2030 return NULL; 2063 return NULL;
2031} 2064}
@@ -2053,21 +2086,34 @@ static struct clk abdac0_sample_clk = {
2053 .index = 6, 2086 .index = 6,
2054}; 2087};
2055 2088
2056struct platform_device *__init at32_add_device_abdac(unsigned int id) 2089struct platform_device *__init
2090at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data)
2057{ 2091{
2058 struct platform_device *pdev; 2092 struct platform_device *pdev;
2059 u32 pin_mask; 2093 struct dw_dma_slave *dws;
2094 u32 pin_mask;
2060 2095
2061 if (id != 0) 2096 if (id != 0 || !data)
2062 return NULL; 2097 return NULL;
2063 2098
2064 pdev = platform_device_alloc("abdac", id); 2099 pdev = platform_device_alloc("atmel_abdac", id);
2065 if (!pdev) 2100 if (!pdev)
2066 return NULL; 2101 return NULL;
2067 2102
2068 if (platform_device_add_resources(pdev, abdac0_resource, 2103 if (platform_device_add_resources(pdev, abdac0_resource,
2069 ARRAY_SIZE(abdac0_resource))) 2104 ARRAY_SIZE(abdac0_resource)))
2070 goto err_add_resources; 2105 goto out_free_resources;
2106
2107 dws = &data->dws;
2108
2109 dws->dma_dev = &dw_dmac0_device.dev;
2110 dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT;
2111 dws->cfg_hi = DWC_CFGH_DST_PER(2);
2112 dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
2113
2114 if (platform_device_add_data(pdev, data,
2115 sizeof(struct atmel_abdac_pdata)))
2116 goto out_free_resources;
2071 2117
2072 pin_mask = (1 << 20) | (1 << 22); /* DATA1 & DATAN1 */ 2118 pin_mask = (1 << 20) | (1 << 22); /* DATA1 & DATAN1 */
2073 pin_mask |= (1 << 21) | (1 << 23); /* DATA0 & DATAN0 */ 2119 pin_mask |= (1 << 21) | (1 << 23); /* DATA0 & DATAN0 */
@@ -2080,7 +2126,7 @@ struct platform_device *__init at32_add_device_abdac(unsigned int id)
2080 platform_device_add(pdev); 2126 platform_device_add(pdev);
2081 return pdev; 2127 return pdev;
2082 2128
2083err_add_resources: 2129out_free_resources:
2084 platform_device_put(pdev); 2130 platform_device_put(pdev);
2085 return NULL; 2131 return NULL;
2086} 2132}
diff --git a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
index 5c4c971eed8e..b9222bf895bc 100644
--- a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
+++ b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
@@ -171,25 +171,49 @@
171 ATMEL_LCDC(PE, DATA20) | ATMEL_LCDC(PE, DATA21) | \ 171 ATMEL_LCDC(PE, DATA20) | ATMEL_LCDC(PE, DATA21) | \
172 ATMEL_LCDC(PD, DATA22) | ATMEL_LCDC(PD, DATA23)) 172 ATMEL_LCDC(PD, DATA22) | ATMEL_LCDC(PD, DATA23))
173 173
174#define ATMEL_LCDC_PRI_15B_DATA ( \ 174#define ATMEL_LCDC_PRI_18B_DATA ( \
175 ATMEL_LCDC(PC, DATA0) | ATMEL_LCDC(PC, DATA1) | \
176 ATMEL_LCDC(PC, DATA2) | ATMEL_LCDC(PC, DATA3) | \ 175 ATMEL_LCDC(PC, DATA2) | ATMEL_LCDC(PC, DATA3) | \
177 ATMEL_LCDC(PC, DATA4) | ATMEL_LCDC(PC, DATA5) | \ 176 ATMEL_LCDC(PC, DATA4) | ATMEL_LCDC(PC, DATA5) | \
178 ATMEL_LCDC(PD, DATA8) | ATMEL_LCDC(PD, DATA9) | \ 177 ATMEL_LCDC(PD, DATA6) | ATMEL_LCDC(PD, DATA7) | \
179 ATMEL_LCDC(PD, DATA10) | ATMEL_LCDC(PD, DATA11) | \ 178 ATMEL_LCDC(PD, DATA10) | ATMEL_LCDC(PD, DATA11) | \
180 ATMEL_LCDC(PD, DATA12) | ATMEL_LCDC(PD, DATA16) | \ 179 ATMEL_LCDC(PD, DATA12) | ATMEL_LCDC(PD, DATA13) | \
181 ATMEL_LCDC(PD, DATA17) | ATMEL_LCDC(PD, DATA18) | \ 180 ATMEL_LCDC(PD, DATA14) | ATMEL_LCDC(PD, DATA15) | \
182 ATMEL_LCDC(PD, DATA19) | ATMEL_LCDC(PD, DATA20)) 181 ATMEL_LCDC(PD, DATA18) | ATMEL_LCDC(PD, DATA19) | \
182 ATMEL_LCDC(PD, DATA20) | ATMEL_LCDC(PD, DATA21) | \
183 ATMEL_LCDC(PD, DATA22) | ATMEL_LCDC(PD, DATA23))
183 184
184#define ATMEL_LCDC_ALT_15B_DATA ( \ 185#define ATMEL_LCDC_ALT_18B_DATA ( \
185 ATMEL_LCDC(PE, DATA0) | ATMEL_LCDC(PE, DATA1) | \
186 ATMEL_LCDC(PE, DATA2) | ATMEL_LCDC(PE, DATA3) | \ 186 ATMEL_LCDC(PE, DATA2) | ATMEL_LCDC(PE, DATA3) | \
187 ATMEL_LCDC(PE, DATA4) | ATMEL_LCDC(PC, DATA5) | \ 187 ATMEL_LCDC(PE, DATA4) | ATMEL_LCDC(PC, DATA5) | \
188 ATMEL_LCDC(PE, DATA8) | ATMEL_LCDC(PE, DATA9) | \ 188 ATMEL_LCDC(PD, DATA6) | ATMEL_LCDC(PD, DATA7) | \
189 ATMEL_LCDC(PE, DATA10) | ATMEL_LCDC(PE, DATA11) | \ 189 ATMEL_LCDC(PE, DATA10) | ATMEL_LCDC(PE, DATA11) | \
190 ATMEL_LCDC(PE, DATA12) | ATMEL_LCDC(PE, DATA16) | \ 190 ATMEL_LCDC(PE, DATA12) | ATMEL_LCDC(PD, DATA13) | \
191 ATMEL_LCDC(PE, DATA17) | ATMEL_LCDC(PE, DATA18) | \ 191 ATMEL_LCDC(PD, DATA14) | ATMEL_LCDC(PD, DATA15) | \
192 ATMEL_LCDC(PE, DATA19) | ATMEL_LCDC(PE, DATA20)) 192 ATMEL_LCDC(PE, DATA18) | ATMEL_LCDC(PE, DATA19) | \
193 ATMEL_LCDC(PE, DATA20) | ATMEL_LCDC(PE, DATA21) | \
194 ATMEL_LCDC(PD, DATA22) | ATMEL_LCDC(PD, DATA23))
195
196#define ATMEL_LCDC_PRI_15B_DATA ( \
197 ATMEL_LCDC(PC, DATA3) | ATMEL_LCDC(PC, DATA4) | \
198 ATMEL_LCDC(PC, DATA5) | ATMEL_LCDC(PD, DATA6) | \
199 ATMEL_LCDC(PD, DATA7) | \
200 ATMEL_LCDC(PD, DATA11) | ATMEL_LCDC(PD, DATA12) | \
201 ATMEL_LCDC(PD, DATA13) | ATMEL_LCDC(PD, DATA14) | \
202 ATMEL_LCDC(PD, DATA15) | \
203 ATMEL_LCDC(PD, DATA19) | ATMEL_LCDC(PD, DATA20) | \
204 ATMEL_LCDC(PD, DATA21) | ATMEL_LCDC(PD, DATA22) | \
205 ATMEL_LCDC(PD, DATA23))
206
207#define ATMEL_LCDC_ALT_15B_DATA ( \
208 ATMEL_LCDC(PE, DATA3) | ATMEL_LCDC(PE, DATA4) | \
209 ATMEL_LCDC(PC, DATA5) | ATMEL_LCDC(PD, DATA6) | \
210 ATMEL_LCDC(PD, DATA7) | \
211 ATMEL_LCDC(PE, DATA11) | ATMEL_LCDC(PE, DATA12) | \
212 ATMEL_LCDC(PD, DATA13) | ATMEL_LCDC(PD, DATA14) | \
213 ATMEL_LCDC(PD, DATA15) | \
214 ATMEL_LCDC(PE, DATA19) | ATMEL_LCDC(PE, DATA20) | \
215 ATMEL_LCDC(PE, DATA21) | ATMEL_LCDC(PD, DATA22) | \
216 ATMEL_LCDC(PD, DATA23))
193 217
194#define ATMEL_LCDC_PRI_CONTROL ( \ 218#define ATMEL_LCDC_PRI_CONTROL ( \
195 ATMEL_LCDC(PC, CC) | ATMEL_LCDC(PC, DVAL) | \ 219 ATMEL_LCDC(PC, CC) | ATMEL_LCDC(PC, DVAL) | \
@@ -207,6 +231,10 @@
207 231
208#define ATMEL_LCDC_ALT_24BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_24B_DATA) 232#define ATMEL_LCDC_ALT_24BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_24B_DATA)
209 233
234#define ATMEL_LCDC_PRI_18BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_PRI_18B_DATA)
235
236#define ATMEL_LCDC_ALT_18BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_18B_DATA)
237
210#define ATMEL_LCDC_PRI_15BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_PRI_15B_DATA) 238#define ATMEL_LCDC_PRI_15BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_PRI_15B_DATA)
211 239
212#define ATMEL_LCDC_ALT_15BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_15B_DATA) 240#define ATMEL_LCDC_ALT_15BIT (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_15B_DATA)
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index cff8e84f78f2..0b8164281899 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -13,7 +13,7 @@
13 * in this array is chip-dependent. 13 * in this array is chip-dependent.
14 */ 14 */
15extern unsigned long at32_board_osc_rates[]; 15extern unsigned long at32_board_osc_rates[];
16 16
17/* 17/*
18 * This used to add essential system devices, but this is now done 18 * This used to add essential system devices, but this is now done
19 * automatically. Please don't use it in new board code. 19 * automatically. Please don't use it in new board code.
@@ -26,12 +26,17 @@ static inline void __deprecated at32_add_system_devices(void)
26#define ATMEL_MAX_UART 4 26#define ATMEL_MAX_UART 4
27extern struct platform_device *atmel_default_console_device; 27extern struct platform_device *atmel_default_console_device;
28 28
29/* Flags for selecting USART extra pins */
30#define ATMEL_USART_RTS 0x01
31#define ATMEL_USART_CTS 0x02
32#define ATMEL_USART_CLK 0x03
33
29struct atmel_uart_data { 34struct atmel_uart_data {
30 short use_dma_tx; /* use transmit DMA? */ 35 short use_dma_tx; /* use transmit DMA? */
31 short use_dma_rx; /* use receive DMA? */ 36 short use_dma_rx; /* use receive DMA? */
32 void __iomem *regs; /* virtual base address, if any */ 37 void __iomem *regs; /* virtual base address, if any */
33}; 38};
34void at32_map_usart(unsigned int hw_id, unsigned int line); 39void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);
35struct platform_device *at32_add_device_usart(unsigned int id); 40struct platform_device *at32_add_device_usart(unsigned int id);
36 41
37struct eth_platform_data { 42struct eth_platform_data {
@@ -88,16 +93,15 @@ struct mci_platform_data;
88struct platform_device * 93struct platform_device *
89at32_add_device_mci(unsigned int id, struct mci_platform_data *data); 94at32_add_device_mci(unsigned int id, struct mci_platform_data *data);
90 95
91struct ac97c_platform_data { 96struct ac97c_platform_data;
92 unsigned short dma_rx_periph_id; 97struct platform_device *
93 unsigned short dma_tx_periph_id; 98at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
94 unsigned short dma_controller_id; 99 unsigned int flags);
95 int reset_pin; 100
96}; 101struct atmel_abdac_pdata;
97struct platform_device * 102struct platform_device *
98at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data); 103at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data);
99 104
100struct platform_device *at32_add_device_abdac(unsigned int id);
101struct platform_device *at32_add_device_psif(unsigned int id); 105struct platform_device *at32_add_device_psif(unsigned int id);
102 106
103struct cf_platform_data { 107struct cf_platform_data {
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index ce4e4296b954..62d4abbaa654 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -250,21 +250,3 @@ asmlinkage void do_bus_error(unsigned long addr, int write_access,
250 dump_dtlb(); 250 dump_dtlb();
251 die("Bus Error", regs, SIGKILL); 251 die("Bus Error", regs, SIGKILL);
252} 252}
253
254/*
255 * This functionality is currently not possible to implement because
256 * we're using segmentation to ensure a fixed mapping of the kernel
257 * virtual address space.
258 *
259 * It would be possible to implement this, but it would require us to
260 * disable segmentation at startup and load the kernel mappings into
261 * the TLB like any other pages. There will be lots of trickery to
262 * avoid recursive invocation of the TLB miss handler, though...
263 */
264#ifdef CONFIG_DEBUG_PAGEALLOC
265void kernel_map_pages(struct page *page, int numpages, int enable)
266{
267
268}
269EXPORT_SYMBOL(kernel_map_pages);
270#endif
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 0c1f86e3e44a..3640cdc38aac 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -777,7 +777,7 @@ config CACHELINE_ALIGNED_L1
777 default n if BF54x 777 default n if BF54x
778 depends on !BF531 778 depends on !BF531
779 help 779 help
780 If enabled, cacheline_anligned data is linked 780 If enabled, cacheline_aligned data is linked
781 into L1 data memory. (less latency) 781 into L1 data memory. (less latency)
782 782
783config SYSCALL_TAB_L1 783config SYSCALL_TAB_L1
@@ -957,7 +957,7 @@ config MPU
957 memory they do not own. This comes at a performance penalty 957 memory they do not own. This comes at a performance penalty
958 and is recommended only for debugging. 958 and is recommended only for debugging.
959 959
960comment "Asynchonous Memory Configuration" 960comment "Asynchronous Memory Configuration"
961 961
962menu "EBIU_AMGCTL Global Control" 962menu "EBIU_AMGCTL Global Control"
963config C_AMCKEN 963config C_AMCKEN
@@ -989,7 +989,7 @@ config C_B3PEN
989 default n 989 default n
990 990
991choice 991choice
992 prompt"Enable Asynchonous Memory Banks" 992 prompt "Enable Asynchronous Memory Banks"
993 default C_AMBEN_ALL 993 default C_AMBEN_ALL
994 994
995config C_AMBEN 995config C_AMBEN
diff --git a/arch/blackfin/include/asm/bfin5xx_spi.h b/arch/blackfin/include/asm/bfin5xx_spi.h
index 0292d58f9362..aaeb4df10d57 100644
--- a/arch/blackfin/include/asm/bfin5xx_spi.h
+++ b/arch/blackfin/include/asm/bfin5xx_spi.h
@@ -11,6 +11,8 @@
11#ifndef _SPI_CHANNEL_H_ 11#ifndef _SPI_CHANNEL_H_
12#define _SPI_CHANNEL_H_ 12#define _SPI_CHANNEL_H_
13 13
14#define MIN_SPI_BAUD_VAL 2
15
14#define SPI_READ 0 16#define SPI_READ 0
15#define SPI_WRITE 1 17#define SPI_WRITE 1
16 18
@@ -122,6 +124,9 @@ struct bfin5xx_spi_chip {
122 u8 bits_per_word; 124 u8 bits_per_word;
123 u8 cs_change_per_word; 125 u8 cs_change_per_word;
124 u16 cs_chg_udelay; /* Some devices require 16-bit delays */ 126 u16 cs_chg_udelay; /* Some devices require 16-bit delays */
127 u32 cs_gpio;
128 /* Value to send if no TX value is supplied, usually 0x0 or 0xFFFF */
129 u16 idle_tx_val;
125}; 130};
126 131
127#endif /* _SPI_CHANNEL_H_ */ 132#endif /* _SPI_CHANNEL_H_ */
diff --git a/arch/blackfin/include/asm/ftrace.h b/arch/blackfin/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/blackfin/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 33e2e8993f7f..e040e03335ea 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -193,7 +193,7 @@ asmlinkage int bfin_clone(struct pt_regs *regs)
193} 193}
194 194
195int 195int
196copy_thread(int nr, unsigned long clone_flags, 196copy_thread(unsigned long clone_flags,
197 unsigned long usp, unsigned long topstk, 197 unsigned long usp, unsigned long topstk,
198 struct task_struct *p, struct pt_regs *regs) 198 struct task_struct *p, struct pt_regs *regs)
199{ 199{
@@ -337,7 +337,7 @@ int _access_ok(unsigned long addr, unsigned long size)
337 if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end) 337 if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end)
338 return 1; 338 return 1;
339 339
340#ifdef CONFIG_ROMFS_MTD_FS 340#ifdef CONFIG_ROMFS_ON_MTD
341 /* For XIP, allow user space to use pointers within the ROMFS. */ 341 /* For XIP, allow user space to use pointers within the ROMFS. */
342 if (addr >= memory_mtd_start && (addr + size) <= memory_mtd_end) 342 if (addr >= memory_mtd_start && (addr + size) <= memory_mtd_end)
343 return 1; 343 return 1;
diff --git a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
index e21c1c3e4ec7..0fb2ce5d840e 100644
--- a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -87,6 +87,7 @@
87struct bfin_serial_port { 87struct bfin_serial_port {
88 struct uart_port port; 88 struct uart_port port;
89 unsigned int old_status; 89 unsigned int old_status;
90 int status_irq;
90 unsigned int lsr; 91 unsigned int lsr;
91#ifdef CONFIG_SERIAL_BFIN_DMA 92#ifdef CONFIG_SERIAL_BFIN_DMA
92 int tx_done; 93 int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
125struct bfin_serial_res { 126struct bfin_serial_res {
126 unsigned long uart_base_addr; 127 unsigned long uart_base_addr;
127 int uart_irq; 128 int uart_irq;
129 int uart_status_irq;
128#ifdef CONFIG_SERIAL_BFIN_DMA 130#ifdef CONFIG_SERIAL_BFIN_DMA
129 unsigned int uart_tx_dma_channel; 131 unsigned int uart_tx_dma_channel;
130 unsigned int uart_rx_dma_channel; 132 unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
140 { 142 {
141 0xFFC00400, 143 0xFFC00400,
142 IRQ_UART0_RX, 144 IRQ_UART0_RX,
145 IRQ_UART0_ERROR,
143#ifdef CONFIG_SERIAL_BFIN_DMA 146#ifdef CONFIG_SERIAL_BFIN_DMA
144 CH_UART0_TX, 147 CH_UART0_TX,
145 CH_UART0_RX, 148 CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
154 { 157 {
155 0xFFC02000, 158 0xFFC02000,
156 IRQ_UART1_RX, 159 IRQ_UART1_RX,
160 IRQ_UART1_ERROR,
157#ifdef CONFIG_SERIAL_BFIN_DMA 161#ifdef CONFIG_SERIAL_BFIN_DMA
158 CH_UART1_TX, 162 CH_UART1_TX,
159 CH_UART1_RX, 163 CH_UART1_RX,
diff --git a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
index e8c41fd842b5..a625659dd67f 100644
--- a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -87,6 +87,7 @@
87struct bfin_serial_port { 87struct bfin_serial_port {
88 struct uart_port port; 88 struct uart_port port;
89 unsigned int old_status; 89 unsigned int old_status;
90 int status_irq;
90 unsigned int lsr; 91 unsigned int lsr;
91#ifdef CONFIG_SERIAL_BFIN_DMA 92#ifdef CONFIG_SERIAL_BFIN_DMA
92 int tx_done; 93 int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
125struct bfin_serial_res { 126struct bfin_serial_res {
126 unsigned long uart_base_addr; 127 unsigned long uart_base_addr;
127 int uart_irq; 128 int uart_irq;
129 int uart_status_irq;
128#ifdef CONFIG_SERIAL_BFIN_DMA 130#ifdef CONFIG_SERIAL_BFIN_DMA
129 unsigned int uart_tx_dma_channel; 131 unsigned int uart_tx_dma_channel;
130 unsigned int uart_rx_dma_channel; 132 unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
140 { 142 {
141 0xFFC00400, 143 0xFFC00400,
142 IRQ_UART0_RX, 144 IRQ_UART0_RX,
145 IRQ_UART0_ERROR,
143#ifdef CONFIG_SERIAL_BFIN_DMA 146#ifdef CONFIG_SERIAL_BFIN_DMA
144 CH_UART0_TX, 147 CH_UART0_TX,
145 CH_UART0_RX, 148 CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
154 { 157 {
155 0xFFC02000, 158 0xFFC02000,
156 IRQ_UART1_RX, 159 IRQ_UART1_RX,
160 IRQ_UART1_ERROR,
157#ifdef CONFIG_SERIAL_BFIN_DMA 161#ifdef CONFIG_SERIAL_BFIN_DMA
158 CH_UART1_TX, 162 CH_UART1_TX,
159 CH_UART1_RX, 163 CH_UART1_RX,
@@ -167,29 +171,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
167}; 171};
168 172
169#define DRIVER_NAME "bfin-uart" 173#define DRIVER_NAME "bfin-uart"
170
171static void bfin_serial_hw_init(struct bfin_serial_port *uart)
172{
173
174#ifdef CONFIG_SERIAL_BFIN_UART0
175 peripheral_request(P_UART0_TX, DRIVER_NAME);
176 peripheral_request(P_UART0_RX, DRIVER_NAME);
177#endif
178
179#ifdef CONFIG_SERIAL_BFIN_UART1
180 peripheral_request(P_UART1_TX, DRIVER_NAME);
181 peripheral_request(P_UART1_RX, DRIVER_NAME);
182#endif
183
184#ifdef CONFIG_SERIAL_BFIN_CTSRTS
185 if (uart->cts_pin >= 0) {
186 gpio_request(uart->cts_pin, DRIVER_NAME);
187 gpio_direction_input(uart->cts_pin);
188 }
189
190 if (uart->rts_pin >= 0) {
191 gpio_request(uart->rts_pin, DRIVER_NAME);
192 gpio_direction_output(uart->rts_pin, 0);
193 }
194#endif
195}
diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
index 5f517f53b0fd..a3789d7ccf8c 100644
--- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -74,6 +74,7 @@
74struct bfin_serial_port { 74struct bfin_serial_port {
75 struct uart_port port; 75 struct uart_port port;
76 unsigned int old_status; 76 unsigned int old_status;
77 int status_irq;
77 unsigned int lsr; 78 unsigned int lsr;
78#ifdef CONFIG_SERIAL_BFIN_DMA 79#ifdef CONFIG_SERIAL_BFIN_DMA
79 int tx_done; 80 int tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
116struct bfin_serial_res { 117struct bfin_serial_res {
117 unsigned long uart_base_addr; 118 unsigned long uart_base_addr;
118 int uart_irq; 119 int uart_irq;
120 int uart_status_irq;
119#ifdef CONFIG_SERIAL_BFIN_DMA 121#ifdef CONFIG_SERIAL_BFIN_DMA
120 unsigned int uart_tx_dma_channel; 122 unsigned int uart_tx_dma_channel;
121 unsigned int uart_rx_dma_channel; 123 unsigned int uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
130 { 132 {
131 0xFFC00400, 133 0xFFC00400,
132 IRQ_UART_RX, 134 IRQ_UART_RX,
135 IRQ_UART_ERROR,
133#ifdef CONFIG_SERIAL_BFIN_DMA 136#ifdef CONFIG_SERIAL_BFIN_DMA
134 CH_UART_TX, 137 CH_UART_TX,
135 CH_UART_RX, 138 CH_UART_RX,
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
142}; 145};
143 146
144#define DRIVER_NAME "bfin-uart" 147#define DRIVER_NAME "bfin-uart"
145
146static void bfin_serial_hw_init(struct bfin_serial_port *uart)
147{
148
149#ifdef CONFIG_SERIAL_BFIN_UART0
150 peripheral_request(P_UART0_TX, DRIVER_NAME);
151 peripheral_request(P_UART0_RX, DRIVER_NAME);
152#endif
153
154#ifdef CONFIG_SERIAL_BFIN_CTSRTS
155 if (uart->cts_pin >= 0) {
156 gpio_request(uart->cts_pin, DRIVER_NAME);
157 gpio_direction_input(uart->cts_pin);
158 }
159 if (uart->rts_pin >= 0) {
160 gpio_request(uart->rts_pin, DRIVER_NAME);
161 gpio_direction_output(uart->rts_pin, 0);
162 }
163#endif
164}
diff --git a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
index 9e34700844a2..b86662fb9de7 100644
--- a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -87,6 +87,7 @@
87struct bfin_serial_port { 87struct bfin_serial_port {
88 struct uart_port port; 88 struct uart_port port;
89 unsigned int old_status; 89 unsigned int old_status;
90 int status_irq;
90 unsigned int lsr; 91 unsigned int lsr;
91#ifdef CONFIG_SERIAL_BFIN_DMA 92#ifdef CONFIG_SERIAL_BFIN_DMA
92 int tx_done; 93 int tx_done;
@@ -99,7 +100,6 @@ struct bfin_serial_port {
99 struct work_struct tx_dma_workqueue; 100 struct work_struct tx_dma_workqueue;
100#endif 101#endif
101#ifdef CONFIG_SERIAL_BFIN_CTSRTS 102#ifdef CONFIG_SERIAL_BFIN_CTSRTS
102 struct timer_list cts_timer;
103 int cts_pin; 103 int cts_pin;
104 int rts_pin; 104 int rts_pin;
105#endif 105#endif
@@ -125,6 +125,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
125struct bfin_serial_res { 125struct bfin_serial_res {
126 unsigned long uart_base_addr; 126 unsigned long uart_base_addr;
127 int uart_irq; 127 int uart_irq;
128 int uart_status_irq;
128#ifdef CONFIG_SERIAL_BFIN_DMA 129#ifdef CONFIG_SERIAL_BFIN_DMA
129 unsigned int uart_tx_dma_channel; 130 unsigned int uart_tx_dma_channel;
130 unsigned int uart_rx_dma_channel; 131 unsigned int uart_rx_dma_channel;
@@ -140,6 +141,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
140 { 141 {
141 0xFFC00400, 142 0xFFC00400,
142 IRQ_UART0_RX, 143 IRQ_UART0_RX,
144 IRQ_UART0_ERROR,
143#ifdef CONFIG_SERIAL_BFIN_DMA 145#ifdef CONFIG_SERIAL_BFIN_DMA
144 CH_UART0_TX, 146 CH_UART0_TX,
145 CH_UART0_RX, 147 CH_UART0_RX,
@@ -154,6 +156,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
154 { 156 {
155 0xFFC02000, 157 0xFFC02000,
156 IRQ_UART1_RX, 158 IRQ_UART1_RX,
159 IRQ_UART1_ERROR,
157#ifdef CONFIG_SERIAL_BFIN_DMA 160#ifdef CONFIG_SERIAL_BFIN_DMA
158 CH_UART1_TX, 161 CH_UART1_TX,
159 CH_UART1_RX, 162 CH_UART1_RX,
@@ -167,29 +170,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
167}; 170};
168 171
169#define DRIVER_NAME "bfin-uart" 172#define DRIVER_NAME "bfin-uart"
170
171static void bfin_serial_hw_init(struct bfin_serial_port *uart)
172{
173
174#ifdef CONFIG_SERIAL_BFIN_UART0
175 peripheral_request(P_UART0_TX, DRIVER_NAME);
176 peripheral_request(P_UART0_RX, DRIVER_NAME);
177#endif
178
179#ifdef CONFIG_SERIAL_BFIN_UART1
180 peripheral_request(P_UART1_TX, DRIVER_NAME);
181 peripheral_request(P_UART1_RX, DRIVER_NAME);
182#endif
183
184#ifdef CONFIG_SERIAL_BFIN_CTSRTS
185 if (uart->cts_pin >= 0) {
186 gpio_request(uart->cts_pin, DRIVER_NAME);
187 gpio_direction_input(uart->cts_pin);
188 }
189
190 if (uart->rts_pin >= 0) {
191 gpio_request(uart->rts_pin, DRIVER_NAME);
192 gpio_direction_output(uart->rts_pin, 0);
193 }
194#endif
195}
diff --git a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
index 3c2811ebecdd..c536551eb4b8 100644
--- a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -87,6 +87,7 @@
87struct bfin_serial_port { 87struct bfin_serial_port {
88 struct uart_port port; 88 struct uart_port port;
89 unsigned int old_status; 89 unsigned int old_status;
90 int status_irq;
90 unsigned int lsr; 91 unsigned int lsr;
91#ifdef CONFIG_SERIAL_BFIN_DMA 92#ifdef CONFIG_SERIAL_BFIN_DMA
92 int tx_done; 93 int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
125struct bfin_serial_res { 126struct bfin_serial_res {
126 unsigned long uart_base_addr; 127 unsigned long uart_base_addr;
127 int uart_irq; 128 int uart_irq;
129 int uart_status_irq;
128#ifdef CONFIG_SERIAL_BFIN_DMA 130#ifdef CONFIG_SERIAL_BFIN_DMA
129 unsigned int uart_tx_dma_channel; 131 unsigned int uart_tx_dma_channel;
130 unsigned int uart_rx_dma_channel; 132 unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
140 { 142 {
141 0xFFC00400, 143 0xFFC00400,
142 IRQ_UART0_RX, 144 IRQ_UART0_RX,
145 IRQ_UART0_ERROR,
143#ifdef CONFIG_SERIAL_BFIN_DMA 146#ifdef CONFIG_SERIAL_BFIN_DMA
144 CH_UART0_TX, 147 CH_UART0_TX,
145 CH_UART0_RX, 148 CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
154 { 157 {
155 0xFFC02000, 158 0xFFC02000,
156 IRQ_UART1_RX, 159 IRQ_UART1_RX,
160 IRQ_UART1_ERROR,
157#ifdef CONFIG_SERIAL_BFIN_DMA 161#ifdef CONFIG_SERIAL_BFIN_DMA
158 CH_UART1_TX, 162 CH_UART1_TX,
159 CH_UART1_RX, 163 CH_UART1_RX,
diff --git a/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
index c05e79cba257..2d1b5fa3cca0 100644
--- a/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
@@ -46,41 +46,27 @@
46#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) 46#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
47#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) 47#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
48#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v) 48#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
49#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v) 49#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
50#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) 50#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
51#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v) 51#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
52#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) 52#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
53#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1) 53#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
54#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) 54#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
55#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v) 55#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
56#define UART_CLEAR_SCTS(uart) bfin_write16(((uart)->port.membase + OFFSET_MSR),SCTS)
56 57
57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ 58#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ 59#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
59 60
60#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS) 61#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
61#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS)) 62#define UART_DISABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) & ~(ARTS|MRTS))
62#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS)) 63#define UART_ENABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS | ARTS)
63#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v) 64#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
64#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF) 65#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
65 66
66#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART2_CTSRTS) 67#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) || \
67# define CONFIG_SERIAL_BFIN_CTSRTS 68 defined(CONFIG_BFIN_UART2_CTSRTS) || defined(CONFIG_BFIN_UART3_CTSRTS)
68 69# define CONFIG_SERIAL_BFIN_HARD_CTSRTS
69# ifndef CONFIG_UART0_CTS_PIN
70# define CONFIG_UART0_CTS_PIN -1
71# endif
72
73# ifndef CONFIG_UART0_RTS_PIN
74# define CONFIG_UART0_RTS_PIN -1
75# endif
76
77# ifndef CONFIG_UART2_CTS_PIN
78# define CONFIG_UART2_CTS_PIN -1
79# endif
80
81# ifndef CONFIG_UART2_RTS_PIN
82# define CONFIG_UART2_RTS_PIN -1
83# endif
84#endif 70#endif
85 71
86#define BFIN_UART_TX_FIFO_SIZE 2 72#define BFIN_UART_TX_FIFO_SIZE 2
@@ -91,6 +77,7 @@
91struct bfin_serial_port { 77struct bfin_serial_port {
92 struct uart_port port; 78 struct uart_port port;
93 unsigned int old_status; 79 unsigned int old_status;
80 int status_irq;
94#ifdef CONFIG_SERIAL_BFIN_DMA 81#ifdef CONFIG_SERIAL_BFIN_DMA
95 int tx_done; 82 int tx_done;
96 int tx_count; 83 int tx_count;
@@ -101,23 +88,24 @@ struct bfin_serial_port {
101 unsigned int rx_dma_channel; 88 unsigned int rx_dma_channel;
102 struct work_struct tx_dma_workqueue; 89 struct work_struct tx_dma_workqueue;
103#endif 90#endif
104#ifdef CONFIG_SERIAL_BFIN_CTSRTS 91#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
105 struct timer_list cts_timer; 92 int scts;
106 int cts_pin; 93 int cts_pin;
107 int rts_pin; 94 int rts_pin;
108#endif 95#endif
109}; 96};
110 97
111struct bfin_serial_res { 98struct bfin_serial_res {
112 unsigned long uart_base_addr; 99 unsigned long uart_base_addr;
113 int uart_irq; 100 int uart_irq;
101 int uart_status_irq;
114#ifdef CONFIG_SERIAL_BFIN_DMA 102#ifdef CONFIG_SERIAL_BFIN_DMA
115 unsigned int uart_tx_dma_channel; 103 unsigned int uart_tx_dma_channel;
116 unsigned int uart_rx_dma_channel; 104 unsigned int uart_rx_dma_channel;
117#endif 105#endif
118#ifdef CONFIG_SERIAL_BFIN_CTSRTS 106#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
119 int uart_cts_pin; 107 int uart_cts_pin;
120 int uart_rts_pin; 108 int uart_rts_pin;
121#endif 109#endif
122}; 110};
123 111
@@ -126,13 +114,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
126 { 114 {
127 0xFFC00400, 115 0xFFC00400,
128 IRQ_UART0_RX, 116 IRQ_UART0_RX,
117 IRQ_UART0_ERROR,
129#ifdef CONFIG_SERIAL_BFIN_DMA 118#ifdef CONFIG_SERIAL_BFIN_DMA
130 CH_UART0_TX, 119 CH_UART0_TX,
131 CH_UART0_RX, 120 CH_UART0_RX,
132#endif 121#endif
133#ifdef CONFIG_SERIAL_BFIN_CTSRTS 122#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
134 CONFIG_UART0_CTS_PIN, 123 0,
135 CONFIG_UART0_RTS_PIN, 124 0,
136#endif 125#endif
137 }, 126 },
138#endif 127#endif
@@ -140,13 +129,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
140 { 129 {
141 0xFFC02000, 130 0xFFC02000,
142 IRQ_UART1_RX, 131 IRQ_UART1_RX,
132 IRQ_UART1_ERROR,
143#ifdef CONFIG_SERIAL_BFIN_DMA 133#ifdef CONFIG_SERIAL_BFIN_DMA
144 CH_UART1_TX, 134 CH_UART1_TX,
145 CH_UART1_RX, 135 CH_UART1_RX,
146#endif 136#endif
147#ifdef CONFIG_SERIAL_BFIN_CTSRTS 137#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
148 0, 138 GPIO_PE10,
149 0, 139 GPIO_PE9,
150#endif 140#endif
151 }, 141 },
152#endif 142#endif
@@ -154,13 +144,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
154 { 144 {
155 0xFFC02100, 145 0xFFC02100,
156 IRQ_UART2_RX, 146 IRQ_UART2_RX,
147 IRQ_UART2_ERROR,
157#ifdef CONFIG_SERIAL_BFIN_DMA 148#ifdef CONFIG_SERIAL_BFIN_DMA
158 CH_UART2_TX, 149 CH_UART2_TX,
159 CH_UART2_RX, 150 CH_UART2_RX,
160#endif 151#endif
161#ifdef CONFIG_SERIAL_BFIN_CTSRTS 152#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
162 CONFIG_UART2_CTS_PIN, 153 0,
163 CONFIG_UART2_RTS_PIN, 154 0,
164#endif 155#endif
165 }, 156 },
166#endif 157#endif
@@ -168,61 +159,17 @@ struct bfin_serial_res bfin_serial_resource[] = {
168 { 159 {
169 0xFFC03100, 160 0xFFC03100,
170 IRQ_UART3_RX, 161 IRQ_UART3_RX,
162 IRQ_UART3_ERROR,
171#ifdef CONFIG_SERIAL_BFIN_DMA 163#ifdef CONFIG_SERIAL_BFIN_DMA
172 CH_UART3_TX, 164 CH_UART3_TX,
173 CH_UART3_RX, 165 CH_UART3_RX,
174#endif 166#endif
175#ifdef CONFIG_SERIAL_BFIN_CTSRTS 167#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
176 0, 168 GPIO_PB3,
177 0, 169 GPIO_PB2,
178#endif 170#endif
179 }, 171 },
180#endif 172#endif
181}; 173};
182 174
183#define DRIVER_NAME "bfin-uart" 175#define DRIVER_NAME "bfin-uart"
184
185static void bfin_serial_hw_init(struct bfin_serial_port *uart)
186{
187#ifdef CONFIG_SERIAL_BFIN_UART0
188 peripheral_request(P_UART0_TX, DRIVER_NAME);
189 peripheral_request(P_UART0_RX, DRIVER_NAME);
190#endif
191
192#ifdef CONFIG_SERIAL_BFIN_UART1
193 peripheral_request(P_UART1_TX, DRIVER_NAME);
194 peripheral_request(P_UART1_RX, DRIVER_NAME);
195
196#ifdef CONFIG_BFIN_UART1_CTSRTS
197 peripheral_request(P_UART1_RTS, DRIVER_NAME);
198 peripheral_request(P_UART1_CTS, DRIVER_NAME);
199#endif
200#endif
201
202#ifdef CONFIG_SERIAL_BFIN_UART2
203 peripheral_request(P_UART2_TX, DRIVER_NAME);
204 peripheral_request(P_UART2_RX, DRIVER_NAME);
205#endif
206
207#ifdef CONFIG_SERIAL_BFIN_UART3
208 peripheral_request(P_UART3_TX, DRIVER_NAME);
209 peripheral_request(P_UART3_RX, DRIVER_NAME);
210
211#ifdef CONFIG_BFIN_UART3_CTSRTS
212 peripheral_request(P_UART3_RTS, DRIVER_NAME);
213 peripheral_request(P_UART3_CTS, DRIVER_NAME);
214#endif
215#endif
216 SSYNC();
217#ifdef CONFIG_SERIAL_BFIN_CTSRTS
218 if (uart->cts_pin >= 0) {
219 gpio_request(uart->cts_pin, DRIVER_NAME);
220 gpio_direction_input(uart->cts_pin);
221 }
222
223 if (uart->rts_pin >= 0) {
224 gpio_request(uart->rts_pin, DRIVER_NAME);
225 gpio_direction_output(uart->rts_pin, 0);
226 }
227#endif
228}
diff --git a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
index ca8c5f645209..a1b50878553f 100644
--- a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
@@ -53,9 +53,9 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin) 56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) 60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61 61
@@ -74,6 +74,7 @@
74struct bfin_serial_port { 74struct bfin_serial_port {
75 struct uart_port port; 75 struct uart_port port;
76 unsigned int old_status; 76 unsigned int old_status;
77 int status_irq;
77 unsigned int lsr; 78 unsigned int lsr;
78#ifdef CONFIG_SERIAL_BFIN_DMA 79#ifdef CONFIG_SERIAL_BFIN_DMA
79 int tx_done; 80 int tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
116struct bfin_serial_res { 117struct bfin_serial_res {
117 unsigned long uart_base_addr; 118 unsigned long uart_base_addr;
118 int uart_irq; 119 int uart_irq;
120 int uart_status_irq;
119#ifdef CONFIG_SERIAL_BFIN_DMA 121#ifdef CONFIG_SERIAL_BFIN_DMA
120 unsigned int uart_tx_dma_channel; 122 unsigned int uart_tx_dma_channel;
121 unsigned int uart_rx_dma_channel; 123 unsigned int uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
130 { 132 {
131 0xFFC00400, 133 0xFFC00400,
132 IRQ_UART_RX, 134 IRQ_UART_RX,
135 IRQ_UART_ERROR,
133#ifdef CONFIG_SERIAL_BFIN_DMA 136#ifdef CONFIG_SERIAL_BFIN_DMA
134 CH_UART_TX, 137 CH_UART_TX,
135 CH_UART_RX, 138 CH_UART_RX,
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
142}; 145};
143 146
144#define DRIVER_NAME "bfin-uart" 147#define DRIVER_NAME "bfin-uart"
145
146static void bfin_serial_hw_init(struct bfin_serial_port *uart)
147{
148
149#ifdef CONFIG_SERIAL_BFIN_UART0
150 peripheral_request(P_UART0_TX, DRIVER_NAME);
151 peripheral_request(P_UART0_RX, DRIVER_NAME);
152#endif
153
154#ifdef CONFIG_SERIAL_BFIN_CTSRTS
155 if (uart->cts_pin >= 0) {
156 gpio_request(uart->cts_pin, DRIVER_NAME);
157 gpio_direction_input(uart->cts_pin);
158 }
159 if (uart->rts_pin >= 0) {
160 gpio_request(uart->rts_pin, DRIVER_NAME);
161 gpio_direction_output(uart->rts_pin, 0);
162 }
163#endif
164}
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 834cab7438a8..530d1393a232 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -854,7 +854,6 @@ static int __init sram_proc_init(void)
854 printk(KERN_WARNING "unable to create /proc/sram\n"); 854 printk(KERN_WARNING "unable to create /proc/sram\n");
855 return -1; 855 return -1;
856 } 856 }
857 ptr->owner = THIS_MODULE;
858 ptr->read_proc = sram_proc_read; 857 ptr->read_proc = sram_proc_read;
859 return 0; 858 return 0;
860} 859}
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 3462245fe9fb..7adac388a771 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -438,7 +438,7 @@ config ETRAX_SERIAL_PORT0_DMA1_IN
438 help 438 help
439 Enables the DMA1 input channel for ser0 (ttyS0). 439 Enables the DMA1 input channel for ser0 (ttyS0).
440 If you do not enable DMA, an interrupt for each character will be 440 If you do not enable DMA, an interrupt for each character will be
441 used when receiveing data. 441 used when receiving data.
442 Normally you want to use DMA, unless you use the DMA channel for 442 Normally you want to use DMA, unless you use the DMA channel for
443 something else. 443 something else.
444 444
@@ -565,7 +565,7 @@ config ETRAX_SERIAL_PORT2_DMA7_IN
565 help 565 help
566 Enables the DMA7 input channel for ser2 (ttyS2). 566 Enables the DMA7 input channel for ser2 (ttyS2).
567 If you do not enable DMA, an interrupt for each character will be 567 If you do not enable DMA, an interrupt for each character will be
568 used when receiveing data. 568 used when receiving data.
569 Normally you want to use DMA, unless you use the DMA channel for 569 Normally you want to use DMA, unless you use the DMA channel for
570 something else. 570 something else.
571 571
@@ -604,7 +604,7 @@ config ETRAX_SERIAL_PORT3_DMA3_IN
604 help 604 help
605 Enables the DMA3 input channel for ser3 (ttyS3). 605 Enables the DMA3 input channel for ser3 (ttyS3).
606 If you do not enable DMA, an interrupt for each character will be 606 If you do not enable DMA, an interrupt for each character will be
607 used when receiveing data. 607 used when receiving data.
608 Normally you want to use DMA, unless you use the DMA channel for 608 Normally you want to use DMA, unless you use the DMA channel for
609 something else. 609 something else.
610 610
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c
index 65ed803dae6f..5d75f77f9c73 100644
--- a/arch/cris/arch-v10/kernel/irq.c
+++ b/arch/cris/arch-v10/kernel/irq.c
@@ -132,7 +132,7 @@ static void end_crisv10_irq(unsigned int irq)
132{ 132{
133} 133}
134 134
135static struct hw_interrupt_type crisv10_irq_type = { 135static struct irq_chip crisv10_irq_type = {
136 .typename = "CRISv10", 136 .typename = "CRISv10",
137 .startup = startup_crisv10_irq, 137 .startup = startup_crisv10_irq,
138 .shutdown = shutdown_crisv10_irq, 138 .shutdown = shutdown_crisv10_irq,
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c
index bd9b3ff63f6c..c4c69cf721e5 100644
--- a/arch/cris/arch-v10/kernel/process.c
+++ b/arch/cris/arch-v10/kernel/process.c
@@ -115,7 +115,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
115 */ 115 */
116asmlinkage void ret_from_fork(void); 116asmlinkage void ret_from_fork(void);
117 117
118int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 118int copy_thread(unsigned long clone_flags, unsigned long usp,
119 unsigned long unused, 119 unsigned long unused,
120 struct task_struct *p, struct pt_regs *regs) 120 struct task_struct *p, struct pt_regs *regs)
121{ 121{
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index c685ba4c3387..2b73c7a5b649 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -261,7 +261,6 @@ timer_interrupt(int irq, void *dev_id)
261static struct irqaction irq2 = { 261static struct irqaction irq2 = {
262 .handler = timer_interrupt, 262 .handler = timer_interrupt,
263 .flags = IRQF_SHARED | IRQF_DISABLED, 263 .flags = IRQF_SHARED | IRQF_DISABLED,
264 .mask = CPU_MASK_NONE,
265 .name = "timer", 264 .name = "timer",
266}; 265};
267 266
diff --git a/arch/cris/arch-v32/Kconfig b/arch/cris/arch-v32/Kconfig
index 005ed2b3f7f4..21bbd93be34f 100644
--- a/arch/cris/arch-v32/Kconfig
+++ b/arch/cris/arch-v32/Kconfig
@@ -28,7 +28,7 @@ config ETRAX_NBR_LED_GRP_ONE
28 help 28 help
29 Select this if you want one Ethernet LED group. This LED group 29 Select this if you want one Ethernet LED group. This LED group
30 can be used for one or more Ethernet interfaces. However, it is 30 can be used for one or more Ethernet interfaces. However, it is
31 recomended that each Ethernet interface use a dedicated LED group. 31 recommended that each Ethernet interface use a dedicated LED group.
32 32
33config ETRAX_NBR_LED_GRP_TWO 33config ETRAX_NBR_LED_GRP_TWO
34 bool "Use two LED groups" 34 bool "Use two LED groups"
diff --git a/arch/cris/arch-v32/boot/compressed/Makefile b/arch/cris/arch-v32/boot/compressed/Makefile
index 5a1b31c99eaa..e176b8b69d92 100644
--- a/arch/cris/arch-v32/boot/compressed/Makefile
+++ b/arch/cris/arch-v32/boot/compressed/Makefile
@@ -2,9 +2,9 @@
2# arch/cris/arch-v32/boot/compressed/Makefile 2# arch/cris/arch-v32/boot/compressed/Makefile
3# 3#
4 4
5asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch 5asflags-y += -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
6ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch 6ccflags-y += -O2 -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
7ldflags-y += -T $(srctree)/$(src)/decompress.lds 7ldflags-y += -T$(srctree)/$(src)/decompress.lds
8OBJECTS = $(obj)/head.o $(obj)/misc.o 8OBJECTS = $(obj)/head.o $(obj)/misc.o
9OBJCOPYFLAGS = -O binary --remove-section=.bss 9OBJCOPYFLAGS = -O binary --remove-section=.bss
10 10
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig
index 7a64fcef9d07..b9e328e688be 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -342,7 +342,7 @@ config ETRAX_SERIAL_PORT4_DMA9_IN
342 help 342 help
343 Enables the DMA9 input channel for ser4 (ttyS4). 343 Enables the DMA9 input channel for ser4 (ttyS4).
344 If you do not enable DMA, an interrupt for each character will be 344 If you do not enable DMA, an interrupt for each character will be
345 used when receiveing data. 345 used when receiving data.
346 Normally you want to use DMA, unless you use the DMA channel for 346 Normally you want to use DMA, unless you use the DMA channel for
347 something else. 347 something else.
348 348
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index 295131fee710..df3925cb1c7f 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -333,7 +333,7 @@ void set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest)
333 spin_unlock_irqrestore(&irq_lock, flags); 333 spin_unlock_irqrestore(&irq_lock, flags);
334} 334}
335 335
336static struct hw_interrupt_type crisv32_irq_type = { 336static struct irq_chip crisv32_irq_type = {
337 .typename = "CRISv32", 337 .typename = "CRISv32",
338 .startup = startup_crisv32_irq, 338 .startup = startup_crisv32_irq,
339 .shutdown = shutdown_crisv32_irq, 339 .shutdown = shutdown_crisv32_irq,
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c
index ced5b725d9bd..120e7f796fea 100644
--- a/arch/cris/arch-v32/kernel/process.c
+++ b/arch/cris/arch-v32/kernel/process.c
@@ -131,7 +131,7 @@ kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
131extern asmlinkage void ret_from_fork(void); 131extern asmlinkage void ret_from_fork(void);
132 132
133int 133int
134copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 134copy_thread(unsigned long clone_flags, unsigned long usp,
135 unsigned long unused, 135 unsigned long unused,
136 struct task_struct *p, struct pt_regs *regs) 136 struct task_struct *p, struct pt_regs *regs)
137{ 137{
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index 9dac17334640..d2a3ff8c4d37 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -65,7 +65,6 @@ static int send_ipi(int vector, int wait, cpumask_t cpu_mask);
65static struct irqaction irq_ipi = { 65static struct irqaction irq_ipi = {
66 .handler = crisv32_ipi_interrupt, 66 .handler = crisv32_ipi_interrupt,
67 .flags = IRQF_DISABLED, 67 .flags = IRQF_DISABLED,
68 .mask = CPU_MASK_NONE,
69 .name = "ipi", 68 .name = "ipi",
70}; 69};
71 70
@@ -98,9 +97,9 @@ void __devinit smp_prepare_boot_cpu(void)
98 SUPP_BANK_SEL(2); 97 SUPP_BANK_SEL(2);
99 SUPP_REG_WR(RW_MM_TLB_PGD, pgd); 98 SUPP_REG_WR(RW_MM_TLB_PGD, pgd);
100 99
101 cpu_set(0, cpu_online_map); 100 set_cpu_online(0, true);
102 cpu_set(0, phys_cpu_present_map); 101 cpu_set(0, phys_cpu_present_map);
103 cpu_set(0, cpu_possible_map); 102 set_cpu_possible(0, true);
104} 103}
105 104
106void __init smp_cpus_done(unsigned int max_cpus) 105void __init smp_cpus_done(unsigned int max_cpus)
@@ -232,7 +231,7 @@ void flush_tlb_common(struct mm_struct* mm, struct vm_area_struct* vma, unsigned
232 cpumask_t cpu_mask; 231 cpumask_t cpu_mask;
233 232
234 spin_lock_irqsave(&tlbstate_lock, flags); 233 spin_lock_irqsave(&tlbstate_lock, flags);
235 cpu_mask = (mm == FLUSH_ALL ? CPU_MASK_ALL : mm->cpu_vm_mask); 234 cpu_mask = (mm == FLUSH_ALL ? cpu_all_mask : *mm_cpumask(mm));
236 cpu_clear(smp_processor_id(), cpu_mask); 235 cpu_clear(smp_processor_id(), cpu_mask);
237 flush_mm = mm; 236 flush_mm = mm;
238 flush_vma = vma; 237 flush_vma = vma;
@@ -252,8 +251,8 @@ void flush_tlb_mm(struct mm_struct *mm)
252 __flush_tlb_mm(mm); 251 __flush_tlb_mm(mm);
253 flush_tlb_common(mm, FLUSH_ALL, 0); 252 flush_tlb_common(mm, FLUSH_ALL, 0);
254 /* No more mappings in other CPUs */ 253 /* No more mappings in other CPUs */
255 cpus_clear(mm->cpu_vm_mask); 254 cpumask_clear(mm_cpumask(mm));
256 cpu_set(smp_processor_id(), mm->cpu_vm_mask); 255 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
257} 256}
258 257
259void flush_tlb_page(struct vm_area_struct *vma, 258void flush_tlb_page(struct vm_area_struct *vma,
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c
index 3a13dd6e0a9a..65633d0dab86 100644
--- a/arch/cris/arch-v32/kernel/time.c
+++ b/arch/cris/arch-v32/kernel/time.c
@@ -267,7 +267,6 @@ timer_interrupt(int irq, void *dev_id)
267static struct irqaction irq_timer = { 267static struct irqaction irq_timer = {
268 .handler = timer_interrupt, 268 .handler = timer_interrupt,
269 .flags = IRQF_SHARED | IRQF_DISABLED, 269 .flags = IRQF_SHARED | IRQF_DISABLED,
270 .mask = CPU_MASK_NONE,
271 .name = "timer" 270 .name = "timer"
272}; 271};
273 272
diff --git a/arch/cris/arch-v32/mach-fs/Kconfig b/arch/cris/arch-v32/mach-fs/Kconfig
index f6d74475f1c6..774de82abef6 100644
--- a/arch/cris/arch-v32/mach-fs/Kconfig
+++ b/arch/cris/arch-v32/mach-fs/Kconfig
@@ -59,7 +59,7 @@ config ETRAX_SDRAM_GRP1_CONFIG
59 depends on ETRAX_ARCH_V32 59 depends on ETRAX_ARCH_V32
60 default "0" 60 default "0"
61 help 61 help
62 SDRAM configuration for group 1. The defult value is 0 62 SDRAM configuration for group 1. The default value is 0
63 because group 1 is not used in the default configuration, 63 because group 1 is not used in the default configuration,
64 described in the help for SDRAM_GRP0_CONFIG. 64 described in the help for SDRAM_GRP0_CONFIG.
65 65
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c
index 55ade36fe8a8..6779bcb28ab0 100644
--- a/arch/cris/arch-v32/mm/tlb.c
+++ b/arch/cris/arch-v32/mm/tlb.c
@@ -185,7 +185,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
185 /* Make sure there is a MMU context. */ 185 /* Make sure there is a MMU context. */
186 spin_lock(&mmu_context_lock); 186 spin_lock(&mmu_context_lock);
187 get_mmu_context(next); 187 get_mmu_context(next);
188 cpu_set(cpu, next->cpu_vm_mask); 188 cpumask_set_cpu(cpu, mm_cpumask(next));
189 spin_unlock(&mmu_context_lock); 189 spin_unlock(&mmu_context_lock);
190 190
191 /* 191 /*
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h
index 0d5709b983a1..129756b96661 100644
--- a/arch/cris/include/arch-v32/arch/spinlock.h
+++ b/arch/cris/include/arch-v32/arch/spinlock.h
@@ -121,6 +121,8 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
121 return 1; 121 return 1;
122} 122}
123 123
124#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)
125#define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock)
124 126
125#define _raw_spin_relax(lock) cpu_relax() 127#define _raw_spin_relax(lock) cpu_relax()
126#define _raw_read_relax(lock) cpu_relax() 128#define _raw_read_relax(lock) cpu_relax()
diff --git a/arch/cris/include/asm/ftrace.h b/arch/cris/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/cris/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/cris/include/asm/ioctls.h b/arch/cris/include/asm/ioctls.h
index 4f4e52531fa0..35bbc181598a 100644
--- a/arch/cris/include/asm/ioctls.h
+++ b/arch/cris/include/asm/ioctls.h
@@ -74,8 +74,9 @@
74#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ 74#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
75#define FIOQSIZE 0x5460 75#define FIOQSIZE 0x5460
76 76
77#define TIOCSERSETRS485 0x5461 /* enable rs-485 */ 77#define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */
78#define TIOCSERWRRS485 0x5462 /* write rs-485 */ 78#define TIOCSERWRRS485 0x5462 /* write rs-485 */
79#define TIOCSRS485 0x5463 /* enable rs-485 */
79 80
80/* Used for packet mode */ 81/* Used for packet mode */
81#define TIOCPKT_DATA 0 82#define TIOCPKT_DATA 0
diff --git a/arch/cris/include/asm/rs485.h b/arch/cris/include/asm/rs485.h
index c331c51b0c2b..ad40f9fbcb8a 100644
--- a/arch/cris/include/asm/rs485.h
+++ b/arch/cris/include/asm/rs485.h
@@ -1,15 +1,13 @@
1/* RS-485 structures */ 1/* RS-485 structures */
2 2
3/* RS-485 support */ 3/* Used with ioctl() TIOCSERSETRS485 for backward compatibility!
4/* Used with ioctl() TIOCSERSETRS485 */ 4 * XXX: Do not use it for new code!
5 */
5struct rs485_control { 6struct rs485_control {
6 unsigned short rts_on_send; 7 unsigned short rts_on_send;
7 unsigned short rts_after_sent; 8 unsigned short rts_after_sent;
8 unsigned long delay_rts_before_send; 9 unsigned long delay_rts_before_send;
9 unsigned short enabled; 10 unsigned short enabled;
10#ifdef __KERNEL__
11 int disable_serial_loopback;
12#endif
13}; 11};
14 12
15/* Used with ioctl() TIOCSERWRRS485 */ 13/* Used with ioctl() TIOCSERWRRS485 */
diff --git a/arch/cris/include/asm/termios.h b/arch/cris/include/asm/termios.h
index b0124e6c2e41..1265109f4ce3 100644
--- a/arch/cris/include/asm/termios.h
+++ b/arch/cris/include/asm/termios.h
@@ -4,6 +4,7 @@
4#include <asm/termbits.h> 4#include <asm/termbits.h>
5#include <asm/ioctls.h> 5#include <asm/ioctls.h>
6#include <asm/rs485.h> 6#include <asm/rs485.h>
7#include <linux/serial.h>
7 8
8struct winsize { 9struct winsize {
9 unsigned short ws_row; 10 unsigned short ws_row;
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 60816e876455..4df0b320d524 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -19,7 +19,6 @@
19#include <asm/system.h> 19#include <asm/system.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/fs_struct.h>
23#include <linux/init_task.h> 22#include <linux/init_task.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
25#include <linux/fs.h> 24#include <linux/fs.h>
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index 04d48dd91ddf..b712f4934c4b 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -166,7 +166,7 @@ void __init setup_arch(char **cmdline_p)
166 166
167static void *c_start(struct seq_file *m, loff_t *pos) 167static void *c_start(struct seq_file *m, loff_t *pos)
168{ 168{
169 return *pos < NR_CPUS ? (void *)(int)(*pos + 1): NULL; 169 return *pos < nr_cpu_ids ? (void *)(int)(*pos + 1) : NULL;
170} 170}
171 171
172static void *c_next(struct seq_file *m, void *v, loff_t *pos) 172static void *c_next(struct seq_file *m, void *v, loff_t *pos)
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c
index 2fdd212eb250..514f46a4b230 100644
--- a/arch/cris/mm/init.c
+++ b/arch/cris/mm/init.c
@@ -25,8 +25,7 @@ mem_init(void)
25 int codesize, reservedpages, datasize, initsize; 25 int codesize, reservedpages, datasize, initsize;
26 unsigned long tmp; 26 unsigned long tmp;
27 27
28 if(!mem_map) 28 BUG_ON(!mem_map);
29 BUG();
30 29
31 /* max/min_low_pfn was set by setup.c 30 /* max/min_low_pfn was set by setup.c
32 * now we just copy it to some other necessary places... 31 * now we just copy it to some other necessary places...
diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c
index 9e38f99bbab8..4dd9adaf115a 100644
--- a/arch/frv/kernel/irq-mb93091.c
+++ b/arch/frv/kernel/irq-mb93091.c
@@ -109,28 +109,24 @@ static struct irqaction fpga_irq[4] = {
109 [0] = { 109 [0] = {
110 .handler = fpga_interrupt, 110 .handler = fpga_interrupt,
111 .flags = IRQF_DISABLED | IRQF_SHARED, 111 .flags = IRQF_DISABLED | IRQF_SHARED,
112 .mask = CPU_MASK_NONE,
113 .name = "fpga.0", 112 .name = "fpga.0",
114 .dev_id = (void *) 0x0028UL, 113 .dev_id = (void *) 0x0028UL,
115 }, 114 },
116 [1] = { 115 [1] = {
117 .handler = fpga_interrupt, 116 .handler = fpga_interrupt,
118 .flags = IRQF_DISABLED | IRQF_SHARED, 117 .flags = IRQF_DISABLED | IRQF_SHARED,
119 .mask = CPU_MASK_NONE,
120 .name = "fpga.1", 118 .name = "fpga.1",
121 .dev_id = (void *) 0x0050UL, 119 .dev_id = (void *) 0x0050UL,
122 }, 120 },
123 [2] = { 121 [2] = {
124 .handler = fpga_interrupt, 122 .handler = fpga_interrupt,
125 .flags = IRQF_DISABLED | IRQF_SHARED, 123 .flags = IRQF_DISABLED | IRQF_SHARED,
126 .mask = CPU_MASK_NONE,
127 .name = "fpga.2", 124 .name = "fpga.2",
128 .dev_id = (void *) 0x1c00UL, 125 .dev_id = (void *) 0x1c00UL,
129 }, 126 },
130 [3] = { 127 [3] = {
131 .handler = fpga_interrupt, 128 .handler = fpga_interrupt,
132 .flags = IRQF_DISABLED | IRQF_SHARED, 129 .flags = IRQF_DISABLED | IRQF_SHARED,
133 .mask = CPU_MASK_NONE,
134 .name = "fpga.3", 130 .name = "fpga.3",
135 .dev_id = (void *) 0x6386UL, 131 .dev_id = (void *) 0x6386UL,
136 } 132 }
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
index 3c2752ca9775..e45209031873 100644
--- a/arch/frv/kernel/irq-mb93093.c
+++ b/arch/frv/kernel/irq-mb93093.c
@@ -108,7 +108,6 @@ static struct irqaction fpga_irq[1] = {
108 [0] = { 108 [0] = {
109 .handler = fpga_interrupt, 109 .handler = fpga_interrupt,
110 .flags = IRQF_DISABLED, 110 .flags = IRQF_DISABLED,
111 .mask = CPU_MASK_NONE,
112 .name = "fpga.0", 111 .name = "fpga.0",
113 .dev_id = (void *) 0x0700UL, 112 .dev_id = (void *) 0x0700UL,
114 } 113 }
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
index 7754c7338e4b..ba55ecdfb245 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -120,14 +120,12 @@ static struct irqaction mb93493_irq[2] = {
120 [0] = { 120 [0] = {
121 .handler = mb93493_interrupt, 121 .handler = mb93493_interrupt,
122 .flags = IRQF_DISABLED | IRQF_SHARED, 122 .flags = IRQF_DISABLED | IRQF_SHARED,
123 .mask = CPU_MASK_NONE,
124 .name = "mb93493.0", 123 .name = "mb93493.0",
125 .dev_id = (void *) __addr_MB93493_IQSR(0), 124 .dev_id = (void *) __addr_MB93493_IQSR(0),
126 }, 125 },
127 [1] = { 126 [1] = {
128 .handler = mb93493_interrupt, 127 .handler = mb93493_interrupt,
129 .flags = IRQF_DISABLED | IRQF_SHARED, 128 .flags = IRQF_DISABLED | IRQF_SHARED,
130 .mask = CPU_MASK_NONE,
131 .name = "mb93493.1", 129 .name = "mb93493.1",
132 .dev_id = (void *) __addr_MB93493_IQSR(1), 130 .dev_id = (void *) __addr_MB93493_IQSR(1),
133 } 131 }
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 9583a338e9d6..0de50df74970 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -204,7 +204,7 @@ void prepare_to_copy(struct task_struct *tsk)
204/* 204/*
205 * set up the kernel stack and exception frames for a new process 205 * set up the kernel stack and exception frames for a new process
206 */ 206 */
207int copy_thread(int nr, unsigned long clone_flags, 207int copy_thread(unsigned long clone_flags,
208 unsigned long usp, unsigned long topstk, 208 unsigned long usp, unsigned long topstk,
209 struct task_struct *p, struct pt_regs *regs) 209 struct task_struct *p, struct pt_regs *regs)
210{ 210{
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index 69f6a4ef5d61..fb0ce7577225 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -45,7 +45,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy);
45static struct irqaction timer_irq = { 45static struct irqaction timer_irq = {
46 .handler = timer_interrupt, 46 .handler = timer_interrupt,
47 .flags = IRQF_DISABLED, 47 .flags = IRQF_DISABLED,
48 .mask = CPU_MASK_NONE,
49 .name = "timer", 48 .name = "timer",
50}; 49};
51 50
diff --git a/arch/frv/mm/tlb-miss.S b/arch/frv/mm/tlb-miss.S
index 07643482cad2..7f392bc651a3 100644
--- a/arch/frv/mm/tlb-miss.S
+++ b/arch/frv/mm/tlb-miss.S
@@ -13,7 +13,6 @@
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/page.h> 14#include <asm/page.h>
15#include <asm/pgtable.h> 15#include <asm/pgtable.h>
16#include <asm/highmem.h>
17#include <asm/spr-regs.h> 16#include <asm/spr-regs.h>
18 17
19 .section .text.tlbmiss 18 .section .text.tlbmiss
diff --git a/arch/h8300/include/asm/ftrace.h b/arch/h8300/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/h8300/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index a8ef654a5a0b..e2f33d0f9969 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -191,7 +191,7 @@ asmlinkage int h8300_clone(struct pt_regs *regs)
191 191
192} 192}
193 193
194int copy_thread(int nr, unsigned long clone_flags, 194int copy_thread(unsigned long clone_flags,
195 unsigned long usp, unsigned long topstk, 195 unsigned long usp, unsigned long topstk,
196 struct task_struct * p, struct pt_regs * regs) 196 struct task_struct * p, struct pt_regs * regs)
197{ 197{
diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c
index d1c926596b08..4883ba7103a8 100644
--- a/arch/h8300/kernel/timer/itu.c
+++ b/arch/h8300/kernel/timer/itu.c
@@ -60,7 +60,6 @@ static struct irqaction itu_irq = {
60 .name = "itu", 60 .name = "itu",
61 .handler = timer_interrupt, 61 .handler = timer_interrupt,
62 .flags = IRQF_DISABLED | IRQF_TIMER, 62 .flags = IRQF_DISABLED | IRQF_TIMER,
63 .mask = CPU_MASK_NONE,
64}; 63};
65 64
66static const int __initdata divide_rate[] = {1, 2, 4, 8}; 65static const int __initdata divide_rate[] = {1, 2, 4, 8};
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c
index e14271b72119..042dbb53f3fb 100644
--- a/arch/h8300/kernel/timer/timer16.c
+++ b/arch/h8300/kernel/timer/timer16.c
@@ -55,7 +55,6 @@ static struct irqaction timer16_irq = {
55 .name = "timer-16", 55 .name = "timer-16",
56 .handler = timer_interrupt, 56 .handler = timer_interrupt,
57 .flags = IRQF_DISABLED | IRQF_TIMER, 57 .flags = IRQF_DISABLED | IRQF_TIMER,
58 .mask = CPU_MASK_NONE,
59}; 58};
60 59
61static const int __initdata divide_rate[] = {1, 2, 4, 8}; 60static const int __initdata divide_rate[] = {1, 2, 4, 8};
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c
index 0556d7c7bea6..38be0cabef0d 100644
--- a/arch/h8300/kernel/timer/timer8.c
+++ b/arch/h8300/kernel/timer/timer8.c
@@ -75,7 +75,6 @@ static struct irqaction timer8_irq = {
75 .name = "timer-8", 75 .name = "timer-8",
76 .handler = timer_interrupt, 76 .handler = timer_interrupt,
77 .flags = IRQF_DISABLED | IRQF_TIMER, 77 .flags = IRQF_DISABLED | IRQF_TIMER,
78 .mask = CPU_MASK_NONE,
79}; 78};
80 79
81static const int __initdata divide_rate[] = {8, 64, 8192}; 80static const int __initdata divide_rate[] = {8, 64, 8192};
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index df7f453a9673..e7c6e614a758 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -65,10 +65,9 @@ static struct irqaction tpu_irq = {
65 .name = "tpu", 65 .name = "tpu",
66 .handler = timer_interrupt, 66 .handler = timer_interrupt,
67 .flags = IRQF_DISABLED | IRQF_TIMER, 67 .flags = IRQF_DISABLED | IRQF_TIMER,
68 .mask = CPU_MASK_NONE,
69}; 68};
70 69
71const static int __initdata divide_rate[] = { 70static const int __initdata divide_rate[] = {
72#if CONFIG_H8300_TPU_CH == 0 71#if CONFIG_H8300_TPU_CH == 0
73 1,4,16,64,0,0,0,0, 72 1,4,16,64,0,0,0,0,
74#elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5) 73#elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5)
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 153e727a6e8e..294a3b13ecac 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -22,6 +22,9 @@ config IA64
22 select HAVE_OPROFILE 22 select HAVE_OPROFILE
23 select HAVE_KPROBES 23 select HAVE_KPROBES
24 select HAVE_KRETPROBES 24 select HAVE_KRETPROBES
25 select HAVE_FTRACE_MCOUNT_RECORD
26 select HAVE_DYNAMIC_FTRACE if (!ITANIUM)
27 select HAVE_FUNCTION_TRACER
25 select HAVE_DMA_ATTRS 28 select HAVE_DMA_ATTRS
26 select HAVE_KVM 29 select HAVE_KVM
27 select HAVE_ARCH_TRACEHOOK 30 select HAVE_ARCH_TRACEHOOK
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig
index a109db30ce55..75645495c2dd 100644
--- a/arch/ia64/configs/generic_defconfig
+++ b/arch/ia64/configs/generic_defconfig
@@ -193,7 +193,6 @@ CONFIG_BOUNCE=y
193CONFIG_NR_QUICK=1 193CONFIG_NR_QUICK=1
194CONFIG_VIRT_TO_BUS=y 194CONFIG_VIRT_TO_BUS=y
195CONFIG_UNEVICTABLE_LRU=y 195CONFIG_UNEVICTABLE_LRU=y
196CONFIG_MMU_NOTIFIER=y
197CONFIG_ARCH_SELECT_MEMORY_MODEL=y 196CONFIG_ARCH_SELECT_MEMORY_MODEL=y
198CONFIG_ARCH_DISCONTIGMEM_ENABLE=y 197CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
199CONFIG_ARCH_FLATMEM_ENABLE=y 198CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -416,8 +415,6 @@ CONFIG_SGI_IOC4=y
416# CONFIG_ENCLOSURE_SERVICES is not set 415# CONFIG_ENCLOSURE_SERVICES is not set
417CONFIG_SGI_XP=m 416CONFIG_SGI_XP=m
418# CONFIG_HP_ILO is not set 417# CONFIG_HP_ILO is not set
419CONFIG_SGI_GRU=m
420# CONFIG_SGI_GRU_DEBUG is not set
421# CONFIG_C2PORT is not set 418# CONFIG_C2PORT is not set
422CONFIG_HAVE_IDE=y 419CONFIG_HAVE_IDE=y
423CONFIG_IDE=y 420CONFIG_IDE=y
diff --git a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile
index 5c0283830bd6..2f7caddf093e 100644
--- a/arch/ia64/dig/Makefile
+++ b/arch/ia64/dig/Makefile
@@ -7,8 +7,8 @@
7 7
8obj-y := setup.o 8obj-y := setup.o
9ifeq ($(CONFIG_DMAR), y) 9ifeq ($(CONFIG_DMAR), y)
10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o dig_vtd_iommu.o 10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o
11else 11else
12obj-$(CONFIG_IA64_GENERIC) += machvec.o 12obj-$(CONFIG_IA64_GENERIC) += machvec.o
13endif 13endif
14obj-$(CONFIG_IA64_DIG_VTD) += dig_vtd_iommu.o 14
diff --git a/arch/ia64/dig/dig_vtd_iommu.c b/arch/ia64/dig/dig_vtd_iommu.c
deleted file mode 100644
index 1c8a079017a3..000000000000
--- a/arch/ia64/dig/dig_vtd_iommu.c
+++ /dev/null
@@ -1,59 +0,0 @@
1#include <linux/types.h>
2#include <linux/kernel.h>
3#include <linux/module.h>
4#include <linux/intel-iommu.h>
5
6void *
7vtd_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
8 gfp_t flags)
9{
10 return intel_alloc_coherent(dev, size, dma_handle, flags);
11}
12EXPORT_SYMBOL_GPL(vtd_alloc_coherent);
13
14void
15vtd_free_coherent(struct device *dev, size_t size, void *vaddr,
16 dma_addr_t dma_handle)
17{
18 intel_free_coherent(dev, size, vaddr, dma_handle);
19}
20EXPORT_SYMBOL_GPL(vtd_free_coherent);
21
22dma_addr_t
23vtd_map_single_attrs(struct device *dev, void *addr, size_t size,
24 int dir, struct dma_attrs *attrs)
25{
26 return intel_map_single(dev, (phys_addr_t)addr, size, dir);
27}
28EXPORT_SYMBOL_GPL(vtd_map_single_attrs);
29
30void
31vtd_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
32 int dir, struct dma_attrs *attrs)
33{
34 intel_unmap_single(dev, iova, size, dir);
35}
36EXPORT_SYMBOL_GPL(vtd_unmap_single_attrs);
37
38int
39vtd_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
40 int dir, struct dma_attrs *attrs)
41{
42 return intel_map_sg(dev, sglist, nents, dir);
43}
44EXPORT_SYMBOL_GPL(vtd_map_sg_attrs);
45
46void
47vtd_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
48 int nents, int dir, struct dma_attrs *attrs)
49{
50 intel_unmap_sg(dev, sglist, nents, dir);
51}
52EXPORT_SYMBOL_GPL(vtd_unmap_sg_attrs);
53
54int
55vtd_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
56{
57 return 0;
58}
59EXPORT_SYMBOL_GPL(vtd_dma_mapping_error);
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
index 2769dbfd03bf..e4a80d82e3d8 100644
--- a/arch/ia64/hp/common/hwsw_iommu.c
+++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -13,49 +13,34 @@
13 */ 13 */
14 14
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/dma-mapping.h>
16#include <linux/swiotlb.h> 17#include <linux/swiotlb.h>
17
18#include <asm/machvec.h> 18#include <asm/machvec.h>
19 19
20extern struct dma_map_ops sba_dma_ops, swiotlb_dma_ops;
21
20/* swiotlb declarations & definitions: */ 22/* swiotlb declarations & definitions: */
21extern int swiotlb_late_init_with_default_size (size_t size); 23extern int swiotlb_late_init_with_default_size (size_t size);
22 24
23/* hwiommu declarations & definitions: */
24
25extern ia64_mv_dma_alloc_coherent sba_alloc_coherent;
26extern ia64_mv_dma_free_coherent sba_free_coherent;
27extern ia64_mv_dma_map_single_attrs sba_map_single_attrs;
28extern ia64_mv_dma_unmap_single_attrs sba_unmap_single_attrs;
29extern ia64_mv_dma_map_sg_attrs sba_map_sg_attrs;
30extern ia64_mv_dma_unmap_sg_attrs sba_unmap_sg_attrs;
31extern ia64_mv_dma_supported sba_dma_supported;
32extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
33
34#define hwiommu_alloc_coherent sba_alloc_coherent
35#define hwiommu_free_coherent sba_free_coherent
36#define hwiommu_map_single_attrs sba_map_single_attrs
37#define hwiommu_unmap_single_attrs sba_unmap_single_attrs
38#define hwiommu_map_sg_attrs sba_map_sg_attrs
39#define hwiommu_unmap_sg_attrs sba_unmap_sg_attrs
40#define hwiommu_dma_supported sba_dma_supported
41#define hwiommu_dma_mapping_error sba_dma_mapping_error
42#define hwiommu_sync_single_for_cpu machvec_dma_sync_single
43#define hwiommu_sync_sg_for_cpu machvec_dma_sync_sg
44#define hwiommu_sync_single_for_device machvec_dma_sync_single
45#define hwiommu_sync_sg_for_device machvec_dma_sync_sg
46
47
48/* 25/*
49 * Note: we need to make the determination of whether or not to use 26 * Note: we need to make the determination of whether or not to use
50 * the sw I/O TLB based purely on the device structure. Anything else 27 * the sw I/O TLB based purely on the device structure. Anything else
51 * would be unreliable or would be too intrusive. 28 * would be unreliable or would be too intrusive.
52 */ 29 */
53static inline int 30static inline int use_swiotlb(struct device *dev)
54use_swiotlb (struct device *dev)
55{ 31{
56 return dev && dev->dma_mask && !hwiommu_dma_supported(dev, *dev->dma_mask); 32 return dev && dev->dma_mask &&
33 !sba_dma_ops.dma_supported(dev, *dev->dma_mask);
57} 34}
58 35
36struct dma_map_ops *hwsw_dma_get_ops(struct device *dev)
37{
38 if (use_swiotlb(dev))
39 return &swiotlb_dma_ops;
40 return &sba_dma_ops;
41}
42EXPORT_SYMBOL(hwsw_dma_get_ops);
43
59void __init 44void __init
60hwsw_init (void) 45hwsw_init (void)
61{ 46{
@@ -71,125 +56,3 @@ hwsw_init (void)
71#endif 56#endif
72 } 57 }
73} 58}
74
75void *
76hwsw_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
77{
78 if (use_swiotlb(dev))
79 return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
80 else
81 return hwiommu_alloc_coherent(dev, size, dma_handle, flags);
82}
83
84void
85hwsw_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
86{
87 if (use_swiotlb(dev))
88 swiotlb_free_coherent(dev, size, vaddr, dma_handle);
89 else
90 hwiommu_free_coherent(dev, size, vaddr, dma_handle);
91}
92
93dma_addr_t
94hwsw_map_single_attrs(struct device *dev, void *addr, size_t size, int dir,
95 struct dma_attrs *attrs)
96{
97 if (use_swiotlb(dev))
98 return swiotlb_map_single_attrs(dev, addr, size, dir, attrs);
99 else
100 return hwiommu_map_single_attrs(dev, addr, size, dir, attrs);
101}
102EXPORT_SYMBOL(hwsw_map_single_attrs);
103
104void
105hwsw_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
106 int dir, struct dma_attrs *attrs)
107{
108 if (use_swiotlb(dev))
109 return swiotlb_unmap_single_attrs(dev, iova, size, dir, attrs);
110 else
111 return hwiommu_unmap_single_attrs(dev, iova, size, dir, attrs);
112}
113EXPORT_SYMBOL(hwsw_unmap_single_attrs);
114
115int
116hwsw_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
117 int dir, struct dma_attrs *attrs)
118{
119 if (use_swiotlb(dev))
120 return swiotlb_map_sg_attrs(dev, sglist, nents, dir, attrs);
121 else
122 return hwiommu_map_sg_attrs(dev, sglist, nents, dir, attrs);
123}
124EXPORT_SYMBOL(hwsw_map_sg_attrs);
125
126void
127hwsw_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
128 int dir, struct dma_attrs *attrs)
129{
130 if (use_swiotlb(dev))
131 return swiotlb_unmap_sg_attrs(dev, sglist, nents, dir, attrs);
132 else
133 return hwiommu_unmap_sg_attrs(dev, sglist, nents, dir, attrs);
134}
135EXPORT_SYMBOL(hwsw_unmap_sg_attrs);
136
137void
138hwsw_sync_single_for_cpu (struct device *dev, dma_addr_t addr, size_t size, int dir)
139{
140 if (use_swiotlb(dev))
141 swiotlb_sync_single_for_cpu(dev, addr, size, dir);
142 else
143 hwiommu_sync_single_for_cpu(dev, addr, size, dir);
144}
145
146void
147hwsw_sync_sg_for_cpu (struct device *dev, struct scatterlist *sg, int nelems, int dir)
148{
149 if (use_swiotlb(dev))
150 swiotlb_sync_sg_for_cpu(dev, sg, nelems, dir);
151 else
152 hwiommu_sync_sg_for_cpu(dev, sg, nelems, dir);
153}
154
155void
156hwsw_sync_single_for_device (struct device *dev, dma_addr_t addr, size_t size, int dir)
157{
158 if (use_swiotlb(dev))
159 swiotlb_sync_single_for_device(dev, addr, size, dir);
160 else
161 hwiommu_sync_single_for_device(dev, addr, size, dir);
162}
163
164void
165hwsw_sync_sg_for_device (struct device *dev, struct scatterlist *sg, int nelems, int dir)
166{
167 if (use_swiotlb(dev))
168 swiotlb_sync_sg_for_device(dev, sg, nelems, dir);
169 else
170 hwiommu_sync_sg_for_device(dev, sg, nelems, dir);
171}
172
173int
174hwsw_dma_supported (struct device *dev, u64 mask)
175{
176 if (hwiommu_dma_supported(dev, mask))
177 return 1;
178 return swiotlb_dma_supported(dev, mask);
179}
180
181int
182hwsw_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
183{
184 return hwiommu_dma_mapping_error(dev, dma_addr) ||
185 swiotlb_dma_mapping_error(dev, dma_addr);
186}
187
188EXPORT_SYMBOL(hwsw_dma_mapping_error);
189EXPORT_SYMBOL(hwsw_dma_supported);
190EXPORT_SYMBOL(hwsw_alloc_coherent);
191EXPORT_SYMBOL(hwsw_free_coherent);
192EXPORT_SYMBOL(hwsw_sync_single_for_cpu);
193EXPORT_SYMBOL(hwsw_sync_single_for_device);
194EXPORT_SYMBOL(hwsw_sync_sg_for_cpu);
195EXPORT_SYMBOL(hwsw_sync_sg_for_device);
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 6d5e6c5630e3..56ceb68eb99d 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -36,6 +36,7 @@
36#include <linux/bitops.h> /* hweight64() */ 36#include <linux/bitops.h> /* hweight64() */
37#include <linux/crash_dump.h> 37#include <linux/crash_dump.h>
38#include <linux/iommu-helper.h> 38#include <linux/iommu-helper.h>
39#include <linux/dma-mapping.h>
39 40
40#include <asm/delay.h> /* ia64_get_itc() */ 41#include <asm/delay.h> /* ia64_get_itc() */
41#include <asm/io.h> 42#include <asm/io.h>
@@ -908,11 +909,13 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
908 * 909 *
909 * See Documentation/PCI/PCI-DMA-mapping.txt 910 * See Documentation/PCI/PCI-DMA-mapping.txt
910 */ 911 */
911dma_addr_t 912static dma_addr_t sba_map_page(struct device *dev, struct page *page,
912sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, 913 unsigned long poff, size_t size,
913 struct dma_attrs *attrs) 914 enum dma_data_direction dir,
915 struct dma_attrs *attrs)
914{ 916{
915 struct ioc *ioc; 917 struct ioc *ioc;
918 void *addr = page_address(page) + poff;
916 dma_addr_t iovp; 919 dma_addr_t iovp;
917 dma_addr_t offset; 920 dma_addr_t offset;
918 u64 *pdir_start; 921 u64 *pdir_start;
@@ -990,7 +993,14 @@ sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir,
990#endif 993#endif
991 return SBA_IOVA(ioc, iovp, offset); 994 return SBA_IOVA(ioc, iovp, offset);
992} 995}
993EXPORT_SYMBOL(sba_map_single_attrs); 996
997static dma_addr_t sba_map_single_attrs(struct device *dev, void *addr,
998 size_t size, enum dma_data_direction dir,
999 struct dma_attrs *attrs)
1000{
1001 return sba_map_page(dev, virt_to_page(addr),
1002 (unsigned long)addr & ~PAGE_MASK, size, dir, attrs);
1003}
994 1004
995#ifdef ENABLE_MARK_CLEAN 1005#ifdef ENABLE_MARK_CLEAN
996static SBA_INLINE void 1006static SBA_INLINE void
@@ -1026,8 +1036,8 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size)
1026 * 1036 *
1027 * See Documentation/PCI/PCI-DMA-mapping.txt 1037 * See Documentation/PCI/PCI-DMA-mapping.txt
1028 */ 1038 */
1029void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, 1039static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
1030 int dir, struct dma_attrs *attrs) 1040 enum dma_data_direction dir, struct dma_attrs *attrs)
1031{ 1041{
1032 struct ioc *ioc; 1042 struct ioc *ioc;
1033#if DELAYED_RESOURCE_CNT > 0 1043#if DELAYED_RESOURCE_CNT > 0
@@ -1094,7 +1104,12 @@ void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
1094 spin_unlock_irqrestore(&ioc->res_lock, flags); 1104 spin_unlock_irqrestore(&ioc->res_lock, flags);
1095#endif /* DELAYED_RESOURCE_CNT == 0 */ 1105#endif /* DELAYED_RESOURCE_CNT == 0 */
1096} 1106}
1097EXPORT_SYMBOL(sba_unmap_single_attrs); 1107
1108void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
1109 enum dma_data_direction dir, struct dma_attrs *attrs)
1110{
1111 sba_unmap_page(dev, iova, size, dir, attrs);
1112}
1098 1113
1099/** 1114/**
1100 * sba_alloc_coherent - allocate/map shared mem for DMA 1115 * sba_alloc_coherent - allocate/map shared mem for DMA
@@ -1104,7 +1119,7 @@ EXPORT_SYMBOL(sba_unmap_single_attrs);
1104 * 1119 *
1105 * See Documentation/PCI/PCI-DMA-mapping.txt 1120 * See Documentation/PCI/PCI-DMA-mapping.txt
1106 */ 1121 */
1107void * 1122static void *
1108sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) 1123sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
1109{ 1124{
1110 struct ioc *ioc; 1125 struct ioc *ioc;
@@ -1167,7 +1182,8 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp
1167 * 1182 *
1168 * See Documentation/PCI/PCI-DMA-mapping.txt 1183 * See Documentation/PCI/PCI-DMA-mapping.txt
1169 */ 1184 */
1170void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle) 1185static void sba_free_coherent (struct device *dev, size_t size, void *vaddr,
1186 dma_addr_t dma_handle)
1171{ 1187{
1172 sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL); 1188 sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL);
1173 free_pages((unsigned long) vaddr, get_order(size)); 1189 free_pages((unsigned long) vaddr, get_order(size));
@@ -1422,8 +1438,9 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
1422 * 1438 *
1423 * See Documentation/PCI/PCI-DMA-mapping.txt 1439 * See Documentation/PCI/PCI-DMA-mapping.txt
1424 */ 1440 */
1425int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, 1441static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
1426 int dir, struct dma_attrs *attrs) 1442 int nents, enum dma_data_direction dir,
1443 struct dma_attrs *attrs)
1427{ 1444{
1428 struct ioc *ioc; 1445 struct ioc *ioc;
1429 int coalesced, filled = 0; 1446 int coalesced, filled = 0;
@@ -1502,7 +1519,6 @@ int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
1502 1519
1503 return filled; 1520 return filled;
1504} 1521}
1505EXPORT_SYMBOL(sba_map_sg_attrs);
1506 1522
1507/** 1523/**
1508 * sba_unmap_sg_attrs - unmap Scatter/Gather list 1524 * sba_unmap_sg_attrs - unmap Scatter/Gather list
@@ -1514,8 +1530,9 @@ EXPORT_SYMBOL(sba_map_sg_attrs);
1514 * 1530 *
1515 * See Documentation/PCI/PCI-DMA-mapping.txt 1531 * See Documentation/PCI/PCI-DMA-mapping.txt
1516 */ 1532 */
1517void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, 1533static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
1518 int nents, int dir, struct dma_attrs *attrs) 1534 int nents, enum dma_data_direction dir,
1535 struct dma_attrs *attrs)
1519{ 1536{
1520#ifdef ASSERT_PDIR_SANITY 1537#ifdef ASSERT_PDIR_SANITY
1521 struct ioc *ioc; 1538 struct ioc *ioc;
@@ -1551,7 +1568,6 @@ void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
1551#endif 1568#endif
1552 1569
1553} 1570}
1554EXPORT_SYMBOL(sba_unmap_sg_attrs);
1555 1571
1556/************************************************************** 1572/**************************************************************
1557* 1573*
@@ -2064,6 +2080,8 @@ static struct acpi_driver acpi_sba_ioc_driver = {
2064 }, 2080 },
2065}; 2081};
2066 2082
2083extern struct dma_map_ops swiotlb_dma_ops;
2084
2067static int __init 2085static int __init
2068sba_init(void) 2086sba_init(void)
2069{ 2087{
@@ -2077,6 +2095,7 @@ sba_init(void)
2077 * a successful kdump kernel boot is to use the swiotlb. 2095 * a successful kdump kernel boot is to use the swiotlb.
2078 */ 2096 */
2079 if (is_kdump_kernel()) { 2097 if (is_kdump_kernel()) {
2098 dma_ops = &swiotlb_dma_ops;
2080 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0) 2099 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0)
2081 panic("Unable to initialize software I/O TLB:" 2100 panic("Unable to initialize software I/O TLB:"
2082 " Try machvec=dig boot option"); 2101 " Try machvec=dig boot option");
@@ -2092,6 +2111,7 @@ sba_init(void)
2092 * If we didn't find something sba_iommu can claim, we 2111 * If we didn't find something sba_iommu can claim, we
2093 * need to setup the swiotlb and switch to the dig machvec. 2112 * need to setup the swiotlb and switch to the dig machvec.
2094 */ 2113 */
2114 dma_ops = &swiotlb_dma_ops;
2095 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0) 2115 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0)
2096 panic("Unable to find SBA IOMMU or initialize " 2116 panic("Unable to find SBA IOMMU or initialize "
2097 "software I/O TLB: Try machvec=dig boot option"); 2117 "software I/O TLB: Try machvec=dig boot option");
@@ -2138,15 +2158,13 @@ nosbagart(char *str)
2138 return 1; 2158 return 1;
2139} 2159}
2140 2160
2141int 2161static int sba_dma_supported (struct device *dev, u64 mask)
2142sba_dma_supported (struct device *dev, u64 mask)
2143{ 2162{
2144 /* make sure it's at least 32bit capable */ 2163 /* make sure it's at least 32bit capable */
2145 return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); 2164 return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL);
2146} 2165}
2147 2166
2148int 2167static int sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
2149sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
2150{ 2168{
2151 return 0; 2169 return 0;
2152} 2170}
@@ -2176,7 +2194,22 @@ sba_page_override(char *str)
2176 2194
2177__setup("sbapagesize=",sba_page_override); 2195__setup("sbapagesize=",sba_page_override);
2178 2196
2179EXPORT_SYMBOL(sba_dma_mapping_error); 2197struct dma_map_ops sba_dma_ops = {
2180EXPORT_SYMBOL(sba_dma_supported); 2198 .alloc_coherent = sba_alloc_coherent,
2181EXPORT_SYMBOL(sba_alloc_coherent); 2199 .free_coherent = sba_free_coherent,
2182EXPORT_SYMBOL(sba_free_coherent); 2200 .map_page = sba_map_page,
2201 .unmap_page = sba_unmap_page,
2202 .map_sg = sba_map_sg_attrs,
2203 .unmap_sg = sba_unmap_sg_attrs,
2204 .sync_single_for_cpu = machvec_dma_sync_single,
2205 .sync_sg_for_cpu = machvec_dma_sync_sg,
2206 .sync_single_for_device = machvec_dma_sync_single,
2207 .sync_sg_for_device = machvec_dma_sync_sg,
2208 .dma_supported = sba_dma_supported,
2209 .mapping_error = sba_dma_mapping_error,
2210};
2211
2212void sba_dma_init(void)
2213{
2214 dma_ops = &sba_dma_ops;
2215}
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 24b1ad5334cb..2bef5261d96d 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -24,6 +24,7 @@
24#include <linux/major.h> 24#include <linux/major.h>
25#include <linux/fcntl.h> 25#include <linux/fcntl.h>
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <linux/seq_file.h>
27#include <linux/slab.h> 28#include <linux/slab.h>
28#include <linux/capability.h> 29#include <linux/capability.h>
29#include <linux/console.h> 30#include <linux/console.h>
@@ -848,38 +849,36 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
848 * /proc fs routines.... 849 * /proc fs routines....
849 */ 850 */
850 851
851static inline int line_info(char *buf, struct serial_state *state) 852static inline void line_info(struct seq_file *m, struct serial_state *state)
852{ 853{
853 return sprintf(buf, "%d: uart:%s port:%lX irq:%d\n", 854 seq_printf(m, "%d: uart:%s port:%lX irq:%d\n",
854 state->line, uart_config[state->type].name, 855 state->line, uart_config[state->type].name,
855 state->port, state->irq); 856 state->port, state->irq);
856} 857}
857 858
858static int rs_read_proc(char *page, char **start, off_t off, int count, 859static int rs_proc_show(struct seq_file *m, void *v)
859 int *eof, void *data)
860{ 860{
861 int i, len = 0, l; 861 int i;
862 off_t begin = 0; 862
863 863 seq_printf(m, "simserinfo:1.0 driver:%s\n", serial_version);
864 len += sprintf(page, "simserinfo:1.0 driver:%s\n", serial_version); 864 for (i = 0; i < NR_PORTS; i++)
865 for (i = 0; i < NR_PORTS && len < 4000; i++) { 865 line_info(m, &rs_table[i]);
866 l = line_info(page + len, &rs_table[i]); 866 return 0;
867 len += l;
868 if (len+begin > off+count)
869 goto done;
870 if (len+begin < off) {
871 begin += len;
872 len = 0;
873 }
874 }
875 *eof = 1;
876done:
877 if (off >= len+begin)
878 return 0;
879 *start = page + (begin-off);
880 return ((count < begin+len-off) ? count : begin+len-off);
881} 867}
882 868
869static int rs_proc_open(struct inode *inode, struct file *file)
870{
871 return single_open(file, rs_proc_show, NULL);
872}
873
874static const struct file_operations rs_proc_fops = {
875 .owner = THIS_MODULE,
876 .open = rs_proc_open,
877 .read = seq_read,
878 .llseek = seq_lseek,
879 .release = single_release,
880};
881
883/* 882/*
884 * --------------------------------------------------------------------- 883 * ---------------------------------------------------------------------
885 * rs_init() and friends 884 * rs_init() and friends
@@ -917,7 +916,7 @@ static const struct tty_operations hp_ops = {
917 .start = rs_start, 916 .start = rs_start,
918 .hangup = rs_hangup, 917 .hangup = rs_hangup,
919 .wait_until_sent = rs_wait_until_sent, 918 .wait_until_sent = rs_wait_until_sent,
920 .read_proc = rs_read_proc, 919 .proc_fops = &rs_proc_fops,
921}; 920};
922 921
923/* 922/*
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 1f912d927585..36c0009dbece 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -11,99 +11,128 @@
11 11
12#define ARCH_HAS_DMA_GET_REQUIRED_MASK 12#define ARCH_HAS_DMA_GET_REQUIRED_MASK
13 13
14struct dma_mapping_ops { 14extern struct dma_map_ops *dma_ops;
15 int (*mapping_error)(struct device *dev,
16 dma_addr_t dma_addr);
17 void* (*alloc_coherent)(struct device *dev, size_t size,
18 dma_addr_t *dma_handle, gfp_t gfp);
19 void (*free_coherent)(struct device *dev, size_t size,
20 void *vaddr, dma_addr_t dma_handle);
21 dma_addr_t (*map_single)(struct device *hwdev, unsigned long ptr,
22 size_t size, int direction);
23 void (*unmap_single)(struct device *dev, dma_addr_t addr,
24 size_t size, int direction);
25 void (*sync_single_for_cpu)(struct device *hwdev,
26 dma_addr_t dma_handle, size_t size,
27 int direction);
28 void (*sync_single_for_device)(struct device *hwdev,
29 dma_addr_t dma_handle, size_t size,
30 int direction);
31 void (*sync_single_range_for_cpu)(struct device *hwdev,
32 dma_addr_t dma_handle, unsigned long offset,
33 size_t size, int direction);
34 void (*sync_single_range_for_device)(struct device *hwdev,
35 dma_addr_t dma_handle, unsigned long offset,
36 size_t size, int direction);
37 void (*sync_sg_for_cpu)(struct device *hwdev,
38 struct scatterlist *sg, int nelems,
39 int direction);
40 void (*sync_sg_for_device)(struct device *hwdev,
41 struct scatterlist *sg, int nelems,
42 int direction);
43 int (*map_sg)(struct device *hwdev, struct scatterlist *sg,
44 int nents, int direction);
45 void (*unmap_sg)(struct device *hwdev,
46 struct scatterlist *sg, int nents,
47 int direction);
48 int (*dma_supported_op)(struct device *hwdev, u64 mask);
49 int is_phys;
50};
51
52extern struct dma_mapping_ops *dma_ops;
53extern struct ia64_machine_vector ia64_mv; 15extern struct ia64_machine_vector ia64_mv;
54extern void set_iommu_machvec(void); 16extern void set_iommu_machvec(void);
55 17
56#define dma_alloc_coherent(dev, size, handle, gfp) \ 18extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
57 platform_dma_alloc_coherent(dev, size, handle, (gfp) | GFP_DMA) 19 enum dma_data_direction);
20extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
21 enum dma_data_direction);
58 22
59/* coherent mem. is cheap */ 23static inline void *dma_alloc_coherent(struct device *dev, size_t size,
60static inline void * 24 dma_addr_t *daddr, gfp_t gfp)
61dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
62 gfp_t flag)
63{ 25{
64 return dma_alloc_coherent(dev, size, dma_handle, flag); 26 struct dma_map_ops *ops = platform_dma_get_ops(dev);
27 return ops->alloc_coherent(dev, size, daddr, gfp);
65} 28}
66#define dma_free_coherent platform_dma_free_coherent 29
67static inline void 30static inline void dma_free_coherent(struct device *dev, size_t size,
68dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr, 31 void *caddr, dma_addr_t daddr)
69 dma_addr_t dma_handle) 32{
33 struct dma_map_ops *ops = platform_dma_get_ops(dev);
34 ops->free_coherent(dev, size, caddr, daddr);
35}
36
37#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
38#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
39
40static inline dma_addr_t dma_map_single_attrs(struct device *dev,
41 void *caddr, size_t size,
42 enum dma_data_direction dir,
43 struct dma_attrs *attrs)
44{
45 struct dma_map_ops *ops = platform_dma_get_ops(dev);
46 return ops->map_page(dev, virt_to_page(caddr),
47 (unsigned long)caddr & ~PAGE_MASK, size,
48 dir, attrs);
49}
50
51static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t daddr,
52 size_t size,
53 enum dma_data_direction dir,
54 struct dma_attrs *attrs)
55{
56 struct dma_map_ops *ops = platform_dma_get_ops(dev);
57 ops->unmap_page(dev, daddr, size, dir, attrs);
58}
59
60#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
61#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
62
63static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
64 int nents, enum dma_data_direction dir,
65 struct dma_attrs *attrs)
66{
67 struct dma_map_ops *ops = platform_dma_get_ops(dev);
68 return ops->map_sg(dev, sgl, nents, dir, attrs);
69}
70
71static inline void dma_unmap_sg_attrs(struct device *dev,
72 struct scatterlist *sgl, int nents,
73 enum dma_data_direction dir,
74 struct dma_attrs *attrs)
75{
76 struct dma_map_ops *ops = platform_dma_get_ops(dev);
77 ops->unmap_sg(dev, sgl, nents, dir, attrs);
78}
79
80#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
81#define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
82
83static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t daddr,
84 size_t size,
85 enum dma_data_direction dir)
70{ 86{
71 dma_free_coherent(dev, size, cpu_addr, dma_handle); 87 struct dma_map_ops *ops = platform_dma_get_ops(dev);
88 ops->sync_single_for_cpu(dev, daddr, size, dir);
72} 89}
73#define dma_map_single_attrs platform_dma_map_single_attrs 90
74static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, 91static inline void dma_sync_sg_for_cpu(struct device *dev,
75 size_t size, int dir) 92 struct scatterlist *sgl,
93 int nents, enum dma_data_direction dir)
76{ 94{
77 return dma_map_single_attrs(dev, cpu_addr, size, dir, NULL); 95 struct dma_map_ops *ops = platform_dma_get_ops(dev);
96 ops->sync_sg_for_cpu(dev, sgl, nents, dir);
78} 97}
79#define dma_map_sg_attrs platform_dma_map_sg_attrs 98
80static inline int dma_map_sg(struct device *dev, struct scatterlist *sgl, 99static inline void dma_sync_single_for_device(struct device *dev,
81 int nents, int dir) 100 dma_addr_t daddr,
101 size_t size,
102 enum dma_data_direction dir)
82{ 103{
83 return dma_map_sg_attrs(dev, sgl, nents, dir, NULL); 104 struct dma_map_ops *ops = platform_dma_get_ops(dev);
105 ops->sync_single_for_device(dev, daddr, size, dir);
84} 106}
85#define dma_unmap_single_attrs platform_dma_unmap_single_attrs 107
86static inline void dma_unmap_single(struct device *dev, dma_addr_t cpu_addr, 108static inline void dma_sync_sg_for_device(struct device *dev,
87 size_t size, int dir) 109 struct scatterlist *sgl,
110 int nents,
111 enum dma_data_direction dir)
88{ 112{
89 return dma_unmap_single_attrs(dev, cpu_addr, size, dir, NULL); 113 struct dma_map_ops *ops = platform_dma_get_ops(dev);
114 ops->sync_sg_for_device(dev, sgl, nents, dir);
90} 115}
91#define dma_unmap_sg_attrs platform_dma_unmap_sg_attrs 116
92static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sgl, 117static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
93 int nents, int dir) 118{
119 struct dma_map_ops *ops = platform_dma_get_ops(dev);
120 return ops->mapping_error(dev, daddr);
121}
122
123static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
124 size_t offset, size_t size,
125 enum dma_data_direction dir)
94{ 126{
95 return dma_unmap_sg_attrs(dev, sgl, nents, dir, NULL); 127 struct dma_map_ops *ops = platform_dma_get_ops(dev);
128 return ops->map_page(dev, page, offset, size, dir, NULL);
96} 129}
97#define dma_sync_single_for_cpu platform_dma_sync_single_for_cpu
98#define dma_sync_sg_for_cpu platform_dma_sync_sg_for_cpu
99#define dma_sync_single_for_device platform_dma_sync_single_for_device
100#define dma_sync_sg_for_device platform_dma_sync_sg_for_device
101#define dma_mapping_error platform_dma_mapping_error
102 130
103#define dma_map_page(dev, pg, off, size, dir) \ 131static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
104 dma_map_single(dev, page_address(pg) + (off), (size), (dir)) 132 size_t size, enum dma_data_direction dir)
105#define dma_unmap_page(dev, dma_addr, size, dir) \ 133{
106 dma_unmap_single(dev, dma_addr, size, dir) 134 dma_unmap_single(dev, addr, size, dir);
135}
107 136
108/* 137/*
109 * Rest of this file is part of the "Advanced DMA API". Use at your own risk. 138 * Rest of this file is part of the "Advanced DMA API". Use at your own risk.
@@ -115,7 +144,11 @@ static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sgl,
115#define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \ 144#define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \
116 dma_sync_single_for_device(dev, dma_handle, size, dir) 145 dma_sync_single_for_device(dev, dma_handle, size, dir)
117 146
118#define dma_supported platform_dma_supported 147static inline int dma_supported(struct device *dev, u64 mask)
148{
149 struct dma_map_ops *ops = platform_dma_get_ops(dev);
150 return ops->dma_supported(dev, mask);
151}
119 152
120static inline int 153static inline int
121dma_set_mask (struct device *dev, u64 mask) 154dma_set_mask (struct device *dev, u64 mask)
@@ -141,11 +174,4 @@ dma_cache_sync (struct device *dev, void *vaddr, size_t size,
141 174
142#define dma_is_consistent(d, h) (1) /* all we do is coherent memory... */ 175#define dma_is_consistent(d, h) (1) /* all we do is coherent memory... */
143 176
144static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
145{
146 return dma_ops;
147}
148
149
150
151#endif /* _ASM_IA64_DMA_MAPPING_H */ 177#endif /* _ASM_IA64_DMA_MAPPING_H */
diff --git a/arch/ia64/include/asm/ftrace.h b/arch/ia64/include/asm/ftrace.h
new file mode 100644
index 000000000000..d20db3c2a656
--- /dev/null
+++ b/arch/ia64/include/asm/ftrace.h
@@ -0,0 +1,28 @@
1#ifndef _ASM_IA64_FTRACE_H
2#define _ASM_IA64_FTRACE_H
3
4#ifdef CONFIG_FUNCTION_TRACER
5#define MCOUNT_INSN_SIZE 32 /* sizeof mcount call */
6
7#ifndef __ASSEMBLY__
8extern void _mcount(unsigned long pfs, unsigned long r1, unsigned long b0, unsigned long r0);
9#define mcount _mcount
10
11#include <asm/kprobes.h>
12/* In IA64, MCOUNT_ADDR is set in link time, so it's not a constant at compile time */
13#define MCOUNT_ADDR (((struct fnptr *)mcount)->ip)
14#define FTRACE_ADDR (((struct fnptr *)ftrace_caller)->ip)
15
16static inline unsigned long ftrace_call_adjust(unsigned long addr)
17{
18 /* second bundle, insn 2 */
19 return addr - 0x12;
20}
21
22struct dyn_arch_ftrace {
23};
24#endif
25
26#endif /* CONFIG_FUNCTION_TRACER */
27
28#endif /* _ASM_IA64_FTRACE_H */
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index 140e495b8e0e..d514cd9edb49 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -20,16 +20,6 @@
20 20
21#define local_softirq_pending() (local_cpu_data->softirq_pending) 21#define local_softirq_pending() (local_cpu_data->softirq_pending)
22 22
23#define HARDIRQ_BITS 14
24
25/*
26 * The hardirq mask has to be large enough to have space for potentially all IRQ sources
27 * in the system nesting on a single CPU:
28 */
29#if (1 << HARDIRQ_BITS) < NR_IRQS
30# error HARDIRQ_BITS is too low!
31#endif
32
33extern void __iomem *ipi_base_addr; 23extern void __iomem *ipi_base_addr;
34 24
35void ack_bad_irq(unsigned int irq); 25void ack_bad_irq(unsigned int irq);
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h
index c47830e26cb7..111ed5222892 100644
--- a/arch/ia64/include/asm/intrinsics.h
+++ b/arch/ia64/include/asm/intrinsics.h
@@ -202,7 +202,11 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void);
202 202
203#ifndef __ASSEMBLY__ 203#ifndef __ASSEMBLY__
204#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__) 204#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__)
205#define IA64_INTRINSIC_API(name) pv_cpu_ops.name 205#ifdef ASM_SUPPORTED
206# define IA64_INTRINSIC_API(name) paravirt_ ## name
207#else
208# define IA64_INTRINSIC_API(name) pv_cpu_ops.name
209#endif
206#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name 210#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name
207#else 211#else
208#define IA64_INTRINSIC_API(name) ia64_native_ ## name 212#define IA64_INTRINSIC_API(name) ia64_native_ ## name
diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h
index fe87b2121707..367d299d9938 100644
--- a/arch/ia64/include/asm/machvec.h
+++ b/arch/ia64/include/asm/machvec.h
@@ -11,7 +11,6 @@
11#define _ASM_IA64_MACHVEC_H 11#define _ASM_IA64_MACHVEC_H
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/swiotlb.h>
15 14
16/* forward declarations: */ 15/* forward declarations: */
17struct device; 16struct device;
@@ -45,24 +44,8 @@ typedef void ia64_mv_kernel_launch_event_t(void);
45 44
46/* DMA-mapping interface: */ 45/* DMA-mapping interface: */
47typedef void ia64_mv_dma_init (void); 46typedef void ia64_mv_dma_init (void);
48typedef void *ia64_mv_dma_alloc_coherent (struct device *, size_t, dma_addr_t *, gfp_t);
49typedef void ia64_mv_dma_free_coherent (struct device *, size_t, void *, dma_addr_t);
50typedef dma_addr_t ia64_mv_dma_map_single (struct device *, void *, size_t, int);
51typedef void ia64_mv_dma_unmap_single (struct device *, dma_addr_t, size_t, int);
52typedef int ia64_mv_dma_map_sg (struct device *, struct scatterlist *, int, int);
53typedef void ia64_mv_dma_unmap_sg (struct device *, struct scatterlist *, int, int);
54typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_t, int);
55typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
56typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
57typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
58typedef int ia64_mv_dma_mapping_error(struct device *, dma_addr_t dma_addr);
59typedef int ia64_mv_dma_supported (struct device *, u64);
60
61typedef dma_addr_t ia64_mv_dma_map_single_attrs (struct device *, void *, size_t, int, struct dma_attrs *);
62typedef void ia64_mv_dma_unmap_single_attrs (struct device *, dma_addr_t, size_t, int, struct dma_attrs *);
63typedef int ia64_mv_dma_map_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *);
64typedef void ia64_mv_dma_unmap_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *);
65typedef u64 ia64_mv_dma_get_required_mask (struct device *); 47typedef u64 ia64_mv_dma_get_required_mask (struct device *);
48typedef struct dma_map_ops *ia64_mv_dma_get_ops(struct device *);
66 49
67/* 50/*
68 * WARNING: The legacy I/O space is _architected_. Platforms are 51 * WARNING: The legacy I/O space is _architected_. Platforms are
@@ -114,8 +97,6 @@ machvec_noop_bus (struct pci_bus *bus)
114 97
115extern void machvec_setup (char **); 98extern void machvec_setup (char **);
116extern void machvec_timer_interrupt (int, void *); 99extern void machvec_timer_interrupt (int, void *);
117extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
118extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);
119extern void machvec_tlb_migrate_finish (struct mm_struct *); 100extern void machvec_tlb_migrate_finish (struct mm_struct *);
120 101
121# if defined (CONFIG_IA64_HP_SIM) 102# if defined (CONFIG_IA64_HP_SIM)
@@ -148,19 +129,8 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *);
148# define platform_global_tlb_purge ia64_mv.global_tlb_purge 129# define platform_global_tlb_purge ia64_mv.global_tlb_purge
149# define platform_tlb_migrate_finish ia64_mv.tlb_migrate_finish 130# define platform_tlb_migrate_finish ia64_mv.tlb_migrate_finish
150# define platform_dma_init ia64_mv.dma_init 131# define platform_dma_init ia64_mv.dma_init
151# define platform_dma_alloc_coherent ia64_mv.dma_alloc_coherent
152# define platform_dma_free_coherent ia64_mv.dma_free_coherent
153# define platform_dma_map_single_attrs ia64_mv.dma_map_single_attrs
154# define platform_dma_unmap_single_attrs ia64_mv.dma_unmap_single_attrs
155# define platform_dma_map_sg_attrs ia64_mv.dma_map_sg_attrs
156# define platform_dma_unmap_sg_attrs ia64_mv.dma_unmap_sg_attrs
157# define platform_dma_sync_single_for_cpu ia64_mv.dma_sync_single_for_cpu
158# define platform_dma_sync_sg_for_cpu ia64_mv.dma_sync_sg_for_cpu
159# define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
160# define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
161# define platform_dma_mapping_error ia64_mv.dma_mapping_error
162# define platform_dma_supported ia64_mv.dma_supported
163# define platform_dma_get_required_mask ia64_mv.dma_get_required_mask 132# define platform_dma_get_required_mask ia64_mv.dma_get_required_mask
133# define platform_dma_get_ops ia64_mv.dma_get_ops
164# define platform_irq_to_vector ia64_mv.irq_to_vector 134# define platform_irq_to_vector ia64_mv.irq_to_vector
165# define platform_local_vector_to_irq ia64_mv.local_vector_to_irq 135# define platform_local_vector_to_irq ia64_mv.local_vector_to_irq
166# define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem 136# define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem
@@ -203,19 +173,8 @@ struct ia64_machine_vector {
203 ia64_mv_global_tlb_purge_t *global_tlb_purge; 173 ia64_mv_global_tlb_purge_t *global_tlb_purge;
204 ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish; 174 ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish;
205 ia64_mv_dma_init *dma_init; 175 ia64_mv_dma_init *dma_init;
206 ia64_mv_dma_alloc_coherent *dma_alloc_coherent;
207 ia64_mv_dma_free_coherent *dma_free_coherent;
208 ia64_mv_dma_map_single_attrs *dma_map_single_attrs;
209 ia64_mv_dma_unmap_single_attrs *dma_unmap_single_attrs;
210 ia64_mv_dma_map_sg_attrs *dma_map_sg_attrs;
211 ia64_mv_dma_unmap_sg_attrs *dma_unmap_sg_attrs;
212 ia64_mv_dma_sync_single_for_cpu *dma_sync_single_for_cpu;
213 ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
214 ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
215 ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
216 ia64_mv_dma_mapping_error *dma_mapping_error;
217 ia64_mv_dma_supported *dma_supported;
218 ia64_mv_dma_get_required_mask *dma_get_required_mask; 176 ia64_mv_dma_get_required_mask *dma_get_required_mask;
177 ia64_mv_dma_get_ops *dma_get_ops;
219 ia64_mv_irq_to_vector *irq_to_vector; 178 ia64_mv_irq_to_vector *irq_to_vector;
220 ia64_mv_local_vector_to_irq *local_vector_to_irq; 179 ia64_mv_local_vector_to_irq *local_vector_to_irq;
221 ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; 180 ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem;
@@ -254,19 +213,8 @@ struct ia64_machine_vector {
254 platform_global_tlb_purge, \ 213 platform_global_tlb_purge, \
255 platform_tlb_migrate_finish, \ 214 platform_tlb_migrate_finish, \
256 platform_dma_init, \ 215 platform_dma_init, \
257 platform_dma_alloc_coherent, \
258 platform_dma_free_coherent, \
259 platform_dma_map_single_attrs, \
260 platform_dma_unmap_single_attrs, \
261 platform_dma_map_sg_attrs, \
262 platform_dma_unmap_sg_attrs, \
263 platform_dma_sync_single_for_cpu, \
264 platform_dma_sync_sg_for_cpu, \
265 platform_dma_sync_single_for_device, \
266 platform_dma_sync_sg_for_device, \
267 platform_dma_mapping_error, \
268 platform_dma_supported, \
269 platform_dma_get_required_mask, \ 216 platform_dma_get_required_mask, \
217 platform_dma_get_ops, \
270 platform_irq_to_vector, \ 218 platform_irq_to_vector, \
271 platform_local_vector_to_irq, \ 219 platform_local_vector_to_irq, \
272 platform_pci_get_legacy_mem, \ 220 platform_pci_get_legacy_mem, \
@@ -302,6 +250,9 @@ extern void machvec_init_from_cmdline(const char *cmdline);
302# error Unknown configuration. Update arch/ia64/include/asm/machvec.h. 250# error Unknown configuration. Update arch/ia64/include/asm/machvec.h.
303# endif /* CONFIG_IA64_GENERIC */ 251# endif /* CONFIG_IA64_GENERIC */
304 252
253extern void swiotlb_dma_init(void);
254extern struct dma_map_ops *dma_get_ops(struct device *);
255
305/* 256/*
306 * Define default versions so we can extend machvec for new platforms without having 257 * Define default versions so we can extend machvec for new platforms without having
307 * to update the machvec files for all existing platforms. 258 * to update the machvec files for all existing platforms.
@@ -332,43 +283,10 @@ extern void machvec_init_from_cmdline(const char *cmdline);
332# define platform_kernel_launch_event machvec_noop 283# define platform_kernel_launch_event machvec_noop
333#endif 284#endif
334#ifndef platform_dma_init 285#ifndef platform_dma_init
335# define platform_dma_init swiotlb_init 286# define platform_dma_init swiotlb_dma_init
336#endif
337#ifndef platform_dma_alloc_coherent
338# define platform_dma_alloc_coherent swiotlb_alloc_coherent
339#endif
340#ifndef platform_dma_free_coherent
341# define platform_dma_free_coherent swiotlb_free_coherent
342#endif
343#ifndef platform_dma_map_single_attrs
344# define platform_dma_map_single_attrs swiotlb_map_single_attrs
345#endif
346#ifndef platform_dma_unmap_single_attrs
347# define platform_dma_unmap_single_attrs swiotlb_unmap_single_attrs
348#endif
349#ifndef platform_dma_map_sg_attrs
350# define platform_dma_map_sg_attrs swiotlb_map_sg_attrs
351#endif
352#ifndef platform_dma_unmap_sg_attrs
353# define platform_dma_unmap_sg_attrs swiotlb_unmap_sg_attrs
354#endif
355#ifndef platform_dma_sync_single_for_cpu
356# define platform_dma_sync_single_for_cpu swiotlb_sync_single_for_cpu
357#endif
358#ifndef platform_dma_sync_sg_for_cpu
359# define platform_dma_sync_sg_for_cpu swiotlb_sync_sg_for_cpu
360#endif
361#ifndef platform_dma_sync_single_for_device
362# define platform_dma_sync_single_for_device swiotlb_sync_single_for_device
363#endif
364#ifndef platform_dma_sync_sg_for_device
365# define platform_dma_sync_sg_for_device swiotlb_sync_sg_for_device
366#endif
367#ifndef platform_dma_mapping_error
368# define platform_dma_mapping_error swiotlb_dma_mapping_error
369#endif 287#endif
370#ifndef platform_dma_supported 288#ifndef platform_dma_get_ops
371# define platform_dma_supported swiotlb_dma_supported 289# define platform_dma_get_ops dma_get_ops
372#endif 290#endif
373#ifndef platform_dma_get_required_mask 291#ifndef platform_dma_get_required_mask
374# define platform_dma_get_required_mask ia64_dma_get_required_mask 292# define platform_dma_get_required_mask ia64_dma_get_required_mask
diff --git a/arch/ia64/include/asm/machvec_dig_vtd.h b/arch/ia64/include/asm/machvec_dig_vtd.h
index 3400b561e711..6ab1de5c45ef 100644
--- a/arch/ia64/include/asm/machvec_dig_vtd.h
+++ b/arch/ia64/include/asm/machvec_dig_vtd.h
@@ -2,14 +2,6 @@
2#define _ASM_IA64_MACHVEC_DIG_VTD_h 2#define _ASM_IA64_MACHVEC_DIG_VTD_h
3 3
4extern ia64_mv_setup_t dig_setup; 4extern ia64_mv_setup_t dig_setup;
5extern ia64_mv_dma_alloc_coherent vtd_alloc_coherent;
6extern ia64_mv_dma_free_coherent vtd_free_coherent;
7extern ia64_mv_dma_map_single_attrs vtd_map_single_attrs;
8extern ia64_mv_dma_unmap_single_attrs vtd_unmap_single_attrs;
9extern ia64_mv_dma_map_sg_attrs vtd_map_sg_attrs;
10extern ia64_mv_dma_unmap_sg_attrs vtd_unmap_sg_attrs;
11extern ia64_mv_dma_supported iommu_dma_supported;
12extern ia64_mv_dma_mapping_error vtd_dma_mapping_error;
13extern ia64_mv_dma_init pci_iommu_alloc; 5extern ia64_mv_dma_init pci_iommu_alloc;
14 6
15/* 7/*
@@ -22,17 +14,5 @@ extern ia64_mv_dma_init pci_iommu_alloc;
22#define platform_name "dig_vtd" 14#define platform_name "dig_vtd"
23#define platform_setup dig_setup 15#define platform_setup dig_setup
24#define platform_dma_init pci_iommu_alloc 16#define platform_dma_init pci_iommu_alloc
25#define platform_dma_alloc_coherent vtd_alloc_coherent
26#define platform_dma_free_coherent vtd_free_coherent
27#define platform_dma_map_single_attrs vtd_map_single_attrs
28#define platform_dma_unmap_single_attrs vtd_unmap_single_attrs
29#define platform_dma_map_sg_attrs vtd_map_sg_attrs
30#define platform_dma_unmap_sg_attrs vtd_unmap_sg_attrs
31#define platform_dma_sync_single_for_cpu machvec_dma_sync_single
32#define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg
33#define platform_dma_sync_single_for_device machvec_dma_sync_single
34#define platform_dma_sync_sg_for_device machvec_dma_sync_sg
35#define platform_dma_supported iommu_dma_supported
36#define platform_dma_mapping_error vtd_dma_mapping_error
37 17
38#endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */ 18#endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */
diff --git a/arch/ia64/include/asm/machvec_hpzx1.h b/arch/ia64/include/asm/machvec_hpzx1.h
index 2f57f5144b9f..3bd83d78a412 100644
--- a/arch/ia64/include/asm/machvec_hpzx1.h
+++ b/arch/ia64/include/asm/machvec_hpzx1.h
@@ -2,14 +2,7 @@
2#define _ASM_IA64_MACHVEC_HPZX1_h 2#define _ASM_IA64_MACHVEC_HPZX1_h
3 3
4extern ia64_mv_setup_t dig_setup; 4extern ia64_mv_setup_t dig_setup;
5extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; 5extern ia64_mv_dma_init sba_dma_init;
6extern ia64_mv_dma_free_coherent sba_free_coherent;
7extern ia64_mv_dma_map_single_attrs sba_map_single_attrs;
8extern ia64_mv_dma_unmap_single_attrs sba_unmap_single_attrs;
9extern ia64_mv_dma_map_sg_attrs sba_map_sg_attrs;
10extern ia64_mv_dma_unmap_sg_attrs sba_unmap_sg_attrs;
11extern ia64_mv_dma_supported sba_dma_supported;
12extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
13 6
14/* 7/*
15 * This stuff has dual use! 8 * This stuff has dual use!
@@ -20,18 +13,6 @@ extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
20 */ 13 */
21#define platform_name "hpzx1" 14#define platform_name "hpzx1"
22#define platform_setup dig_setup 15#define platform_setup dig_setup
23#define platform_dma_init machvec_noop 16#define platform_dma_init sba_dma_init
24#define platform_dma_alloc_coherent sba_alloc_coherent
25#define platform_dma_free_coherent sba_free_coherent
26#define platform_dma_map_single_attrs sba_map_single_attrs
27#define platform_dma_unmap_single_attrs sba_unmap_single_attrs
28#define platform_dma_map_sg_attrs sba_map_sg_attrs
29#define platform_dma_unmap_sg_attrs sba_unmap_sg_attrs
30#define platform_dma_sync_single_for_cpu machvec_dma_sync_single
31#define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg
32#define platform_dma_sync_single_for_device machvec_dma_sync_single
33#define platform_dma_sync_sg_for_device machvec_dma_sync_sg
34#define platform_dma_supported sba_dma_supported
35#define platform_dma_mapping_error sba_dma_mapping_error
36 17
37#endif /* _ASM_IA64_MACHVEC_HPZX1_h */ 18#endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff --git a/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h b/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
index a842cdda827b..1091ac39740c 100644
--- a/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
+++ b/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
@@ -2,18 +2,7 @@
2#define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h 2#define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
3 3
4extern ia64_mv_setup_t dig_setup; 4extern ia64_mv_setup_t dig_setup;
5extern ia64_mv_dma_alloc_coherent hwsw_alloc_coherent; 5extern ia64_mv_dma_get_ops hwsw_dma_get_ops;
6extern ia64_mv_dma_free_coherent hwsw_free_coherent;
7extern ia64_mv_dma_map_single_attrs hwsw_map_single_attrs;
8extern ia64_mv_dma_unmap_single_attrs hwsw_unmap_single_attrs;
9extern ia64_mv_dma_map_sg_attrs hwsw_map_sg_attrs;
10extern ia64_mv_dma_unmap_sg_attrs hwsw_unmap_sg_attrs;
11extern ia64_mv_dma_supported hwsw_dma_supported;
12extern ia64_mv_dma_mapping_error hwsw_dma_mapping_error;
13extern ia64_mv_dma_sync_single_for_cpu hwsw_sync_single_for_cpu;
14extern ia64_mv_dma_sync_sg_for_cpu hwsw_sync_sg_for_cpu;
15extern ia64_mv_dma_sync_single_for_device hwsw_sync_single_for_device;
16extern ia64_mv_dma_sync_sg_for_device hwsw_sync_sg_for_device;
17 6
18/* 7/*
19 * This stuff has dual use! 8 * This stuff has dual use!
@@ -23,20 +12,8 @@ extern ia64_mv_dma_sync_sg_for_device hwsw_sync_sg_for_device;
23 * the macros are used directly. 12 * the macros are used directly.
24 */ 13 */
25#define platform_name "hpzx1_swiotlb" 14#define platform_name "hpzx1_swiotlb"
26
27#define platform_setup dig_setup 15#define platform_setup dig_setup
28#define platform_dma_init machvec_noop 16#define platform_dma_init machvec_noop
29#define platform_dma_alloc_coherent hwsw_alloc_coherent 17#define platform_dma_get_ops hwsw_dma_get_ops
30#define platform_dma_free_coherent hwsw_free_coherent
31#define platform_dma_map_single_attrs hwsw_map_single_attrs
32#define platform_dma_unmap_single_attrs hwsw_unmap_single_attrs
33#define platform_dma_map_sg_attrs hwsw_map_sg_attrs
34#define platform_dma_unmap_sg_attrs hwsw_unmap_sg_attrs
35#define platform_dma_supported hwsw_dma_supported
36#define platform_dma_mapping_error hwsw_dma_mapping_error
37#define platform_dma_sync_single_for_cpu hwsw_sync_single_for_cpu
38#define platform_dma_sync_sg_for_cpu hwsw_sync_sg_for_cpu
39#define platform_dma_sync_single_for_device hwsw_sync_single_for_device
40#define platform_dma_sync_sg_for_device hwsw_sync_sg_for_device
41 18
42#endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */ 19#endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */
diff --git a/arch/ia64/include/asm/machvec_sn2.h b/arch/ia64/include/asm/machvec_sn2.h
index f1a6e0d6dfa5..f061a30aac42 100644
--- a/arch/ia64/include/asm/machvec_sn2.h
+++ b/arch/ia64/include/asm/machvec_sn2.h
@@ -55,19 +55,8 @@ extern ia64_mv_readb_t __sn_readb_relaxed;
55extern ia64_mv_readw_t __sn_readw_relaxed; 55extern ia64_mv_readw_t __sn_readw_relaxed;
56extern ia64_mv_readl_t __sn_readl_relaxed; 56extern ia64_mv_readl_t __sn_readl_relaxed;
57extern ia64_mv_readq_t __sn_readq_relaxed; 57extern ia64_mv_readq_t __sn_readq_relaxed;
58extern ia64_mv_dma_alloc_coherent sn_dma_alloc_coherent;
59extern ia64_mv_dma_free_coherent sn_dma_free_coherent;
60extern ia64_mv_dma_map_single_attrs sn_dma_map_single_attrs;
61extern ia64_mv_dma_unmap_single_attrs sn_dma_unmap_single_attrs;
62extern ia64_mv_dma_map_sg_attrs sn_dma_map_sg_attrs;
63extern ia64_mv_dma_unmap_sg_attrs sn_dma_unmap_sg_attrs;
64extern ia64_mv_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu;
65extern ia64_mv_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu;
66extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
67extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device;
68extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
69extern ia64_mv_dma_supported sn_dma_supported;
70extern ia64_mv_dma_get_required_mask sn_dma_get_required_mask; 58extern ia64_mv_dma_get_required_mask sn_dma_get_required_mask;
59extern ia64_mv_dma_init sn_dma_init;
71extern ia64_mv_migrate_t sn_migrate; 60extern ia64_mv_migrate_t sn_migrate;
72extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event; 61extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event;
73extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; 62extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq;
@@ -111,20 +100,8 @@ extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus;
111#define platform_pci_get_legacy_mem sn_pci_get_legacy_mem 100#define platform_pci_get_legacy_mem sn_pci_get_legacy_mem
112#define platform_pci_legacy_read sn_pci_legacy_read 101#define platform_pci_legacy_read sn_pci_legacy_read
113#define platform_pci_legacy_write sn_pci_legacy_write 102#define platform_pci_legacy_write sn_pci_legacy_write
114#define platform_dma_init machvec_noop
115#define platform_dma_alloc_coherent sn_dma_alloc_coherent
116#define platform_dma_free_coherent sn_dma_free_coherent
117#define platform_dma_map_single_attrs sn_dma_map_single_attrs
118#define platform_dma_unmap_single_attrs sn_dma_unmap_single_attrs
119#define platform_dma_map_sg_attrs sn_dma_map_sg_attrs
120#define platform_dma_unmap_sg_attrs sn_dma_unmap_sg_attrs
121#define platform_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu
122#define platform_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu
123#define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
124#define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device
125#define platform_dma_mapping_error sn_dma_mapping_error
126#define platform_dma_supported sn_dma_supported
127#define platform_dma_get_required_mask sn_dma_get_required_mask 103#define platform_dma_get_required_mask sn_dma_get_required_mask
104#define platform_dma_init sn_dma_init
128#define platform_migrate sn_migrate 105#define platform_migrate sn_migrate
129#define platform_kernel_launch_event sn_kernel_launch_event 106#define platform_kernel_launch_event sn_kernel_launch_event
130#ifdef CONFIG_PCI_MSI 107#ifdef CONFIG_PCI_MSI
diff --git a/arch/ia64/include/asm/mmu_context.h b/arch/ia64/include/asm/mmu_context.h
index 040bc87db930..7f2a456603cb 100644
--- a/arch/ia64/include/asm/mmu_context.h
+++ b/arch/ia64/include/asm/mmu_context.h
@@ -87,7 +87,7 @@ get_mmu_context (struct mm_struct *mm)
87 /* re-check, now that we've got the lock: */ 87 /* re-check, now that we've got the lock: */
88 context = mm->context; 88 context = mm->context;
89 if (context == 0) { 89 if (context == 0) {
90 cpus_clear(mm->cpu_vm_mask); 90 cpumask_clear(mm_cpumask(mm));
91 if (ia64_ctx.next >= ia64_ctx.limit) { 91 if (ia64_ctx.next >= ia64_ctx.limit) {
92 ia64_ctx.next = find_next_zero_bit(ia64_ctx.bitmap, 92 ia64_ctx.next = find_next_zero_bit(ia64_ctx.bitmap,
93 ia64_ctx.max_ctx, ia64_ctx.next); 93 ia64_ctx.max_ctx, ia64_ctx.next);
@@ -166,8 +166,8 @@ activate_context (struct mm_struct *mm)
166 166
167 do { 167 do {
168 context = get_mmu_context(mm); 168 context = get_mmu_context(mm);
169 if (!cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) 169 if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
170 cpu_set(smp_processor_id(), mm->cpu_vm_mask); 170 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
171 reload_context(context); 171 reload_context(context);
172 /* 172 /*
173 * in the unlikely event of a TLB-flush by another thread, 173 * in the unlikely event of a TLB-flush by another thread,
diff --git a/arch/ia64/include/asm/module.h b/arch/ia64/include/asm/module.h
index d2da61e4c49b..908eaef42a08 100644
--- a/arch/ia64/include/asm/module.h
+++ b/arch/ia64/include/asm/module.h
@@ -16,6 +16,12 @@ struct mod_arch_specific {
16 struct elf64_shdr *got; /* global offset table */ 16 struct elf64_shdr *got; /* global offset table */
17 struct elf64_shdr *opd; /* official procedure descriptors */ 17 struct elf64_shdr *opd; /* official procedure descriptors */
18 struct elf64_shdr *unwind; /* unwind-table section */ 18 struct elf64_shdr *unwind; /* unwind-table section */
19#ifdef CONFIG_PARAVIRT
20 struct elf64_shdr *paravirt_bundles;
21 /* paravirt_alt_bundle_patch table */
22 struct elf64_shdr *paravirt_insts;
23 /* paravirt_alt_inst_patch table */
24#endif
19 unsigned long gp; /* global-pointer for module */ 25 unsigned long gp; /* global-pointer for module */
20 26
21 void *core_unw_table; /* core unwind-table cookie returned by unwinder */ 27 void *core_unw_table; /* core unwind-table cookie returned by unwinder */
diff --git a/arch/ia64/include/asm/native/inst.h b/arch/ia64/include/asm/native/inst.h
index 0a1026cca4fa..d2d46efb3e6e 100644
--- a/arch/ia64/include/asm/native/inst.h
+++ b/arch/ia64/include/asm/native/inst.h
@@ -30,6 +30,9 @@
30#define __paravirt_work_processed_syscall_target \ 30#define __paravirt_work_processed_syscall_target \
31 ia64_work_processed_syscall 31 ia64_work_processed_syscall
32 32
33#define paravirt_fsyscall_table ia64_native_fsyscall_table
34#define paravirt_fsys_bubble_down ia64_native_fsys_bubble_down
35
33#ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK 36#ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK
34# define PARAVIRT_POISON 0xdeadbeefbaadf00d 37# define PARAVIRT_POISON 0xdeadbeefbaadf00d
35# define CLOBBER(clob) \ 38# define CLOBBER(clob) \
@@ -74,6 +77,11 @@
74(pred) mov reg = psr \ 77(pred) mov reg = psr \
75 CLOBBER(clob) 78 CLOBBER(clob)
76 79
80#define MOV_FROM_ITC(pred, pred_clob, reg, clob) \
81(pred) mov reg = ar.itc \
82 CLOBBER(clob) \
83 CLOBBER_PRED(pred_clob)
84
77#define MOV_TO_IFA(reg, clob) \ 85#define MOV_TO_IFA(reg, clob) \
78 mov cr.ifa = reg \ 86 mov cr.ifa = reg \
79 CLOBBER(clob) 87 CLOBBER(clob)
@@ -158,6 +166,11 @@
158#define RSM_PSR_DT \ 166#define RSM_PSR_DT \
159 rsm psr.dt 167 rsm psr.dt
160 168
169#define RSM_PSR_BE_I(clob0, clob1) \
170 rsm psr.be | psr.i \
171 CLOBBER(clob0) \
172 CLOBBER(clob1)
173
161#define SSM_PSR_DT_AND_SRLZ_I \ 174#define SSM_PSR_DT_AND_SRLZ_I \
162 ssm psr.dt \ 175 ssm psr.dt \
163 ;; \ 176 ;; \
diff --git a/arch/ia64/include/asm/native/patchlist.h b/arch/ia64/include/asm/native/patchlist.h
new file mode 100644
index 000000000000..be16ca9311bf
--- /dev/null
+++ b/arch/ia64/include/asm/native/patchlist.h
@@ -0,0 +1,38 @@
1/******************************************************************************
2 * arch/ia64/include/asm/native/inst.h
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#define __paravirt_start_gate_fsyscall_patchlist \
24 __ia64_native_start_gate_fsyscall_patchlist
25#define __paravirt_end_gate_fsyscall_patchlist \
26 __ia64_native_end_gate_fsyscall_patchlist
27#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist \
28 __ia64_native_start_gate_brl_fsys_bubble_down_patchlist
29#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
30 __ia64_native_end_gate_brl_fsys_bubble_down_patchlist
31#define __paravirt_start_gate_vtop_patchlist \
32 __ia64_native_start_gate_vtop_patchlist
33#define __paravirt_end_gate_vtop_patchlist \
34 __ia64_native_end_gate_vtop_patchlist
35#define __paravirt_start_gate_mckinley_e9_patchlist \
36 __ia64_native_start_gate_mckinley_e9_patchlist
37#define __paravirt_end_gate_mckinley_e9_patchlist \
38 __ia64_native_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/include/asm/native/pvchk_inst.h b/arch/ia64/include/asm/native/pvchk_inst.h
index b8e6eb1090d7..8d72962ec838 100644
--- a/arch/ia64/include/asm/native/pvchk_inst.h
+++ b/arch/ia64/include/asm/native/pvchk_inst.h
@@ -180,6 +180,11 @@
180 IS_PRED_IN(pred) \ 180 IS_PRED_IN(pred) \
181 IS_RREG_OUT(reg) \ 181 IS_RREG_OUT(reg) \
182 IS_RREG_CLOB(clob) 182 IS_RREG_CLOB(clob)
183#define MOV_FROM_ITC(pred, pred_clob, reg, clob) \
184 IS_PRED_IN(pred) \
185 IS_PRED_CLOB(pred_clob) \
186 IS_RREG_OUT(reg) \
187 IS_RREG_CLOB(clob)
183#define MOV_TO_IFA(reg, clob) \ 188#define MOV_TO_IFA(reg, clob) \
184 IS_RREG_IN(reg) \ 189 IS_RREG_IN(reg) \
185 IS_RREG_CLOB(clob) 190 IS_RREG_CLOB(clob)
@@ -246,6 +251,9 @@
246 IS_RREG_CLOB(clob2) 251 IS_RREG_CLOB(clob2)
247#define RSM_PSR_DT \ 252#define RSM_PSR_DT \
248 nop 0 253 nop 0
254#define RSM_PSR_BE_I(clob0, clob1) \
255 IS_RREG_CLOB(clob0) \
256 IS_RREG_CLOB(clob1)
249#define SSM_PSR_DT_AND_SRLZ_I \ 257#define SSM_PSR_DT_AND_SRLZ_I \
250 nop 0 258 nop 0
251#define BSW_0(clob0, clob1, clob2) \ 259#define BSW_0(clob0, clob1, clob2) \
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index 2bf3636473fe..2eb0a981a09a 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -22,6 +22,56 @@
22#ifndef __ASM_PARAVIRT_H 22#ifndef __ASM_PARAVIRT_H
23#define __ASM_PARAVIRT_H 23#define __ASM_PARAVIRT_H
24 24
25#ifndef __ASSEMBLY__
26/******************************************************************************
27 * fsys related addresses
28 */
29struct pv_fsys_data {
30 unsigned long *fsyscall_table;
31 void *fsys_bubble_down;
32};
33
34extern struct pv_fsys_data pv_fsys_data;
35
36unsigned long *paravirt_get_fsyscall_table(void);
37char *paravirt_get_fsys_bubble_down(void);
38
39/******************************************************************************
40 * patchlist addresses for gate page
41 */
42enum pv_gate_patchlist {
43 PV_GATE_START_FSYSCALL,
44 PV_GATE_END_FSYSCALL,
45
46 PV_GATE_START_BRL_FSYS_BUBBLE_DOWN,
47 PV_GATE_END_BRL_FSYS_BUBBLE_DOWN,
48
49 PV_GATE_START_VTOP,
50 PV_GATE_END_VTOP,
51
52 PV_GATE_START_MCKINLEY_E9,
53 PV_GATE_END_MCKINLEY_E9,
54};
55
56struct pv_patchdata {
57 unsigned long start_fsyscall_patchlist;
58 unsigned long end_fsyscall_patchlist;
59 unsigned long start_brl_fsys_bubble_down_patchlist;
60 unsigned long end_brl_fsys_bubble_down_patchlist;
61 unsigned long start_vtop_patchlist;
62 unsigned long end_vtop_patchlist;
63 unsigned long start_mckinley_e9_patchlist;
64 unsigned long end_mckinley_e9_patchlist;
65
66 void *gate_section;
67};
68
69extern struct pv_patchdata pv_patchdata;
70
71unsigned long paravirt_get_gate_patchlist(enum pv_gate_patchlist type);
72void *paravirt_get_gate_section(void);
73#endif
74
25#ifdef CONFIG_PARAVIRT_GUEST 75#ifdef CONFIG_PARAVIRT_GUEST
26 76
27#define PARAVIRT_HYPERVISOR_TYPE_DEFAULT 0 77#define PARAVIRT_HYPERVISOR_TYPE_DEFAULT 0
@@ -68,6 +118,14 @@ struct pv_init_ops {
68 int (*arch_setup_nomca)(void); 118 int (*arch_setup_nomca)(void);
69 119
70 void (*post_smp_prepare_boot_cpu)(void); 120 void (*post_smp_prepare_boot_cpu)(void);
121
122#ifdef ASM_SUPPORTED
123 unsigned long (*patch_bundle)(void *sbundle, void *ebundle,
124 unsigned long type);
125 unsigned long (*patch_inst)(unsigned long stag, unsigned long etag,
126 unsigned long type);
127#endif
128 void (*patch_branch)(unsigned long tag, unsigned long type);
71}; 129};
72 130
73extern struct pv_init_ops pv_init_ops; 131extern struct pv_init_ops pv_init_ops;
@@ -210,6 +268,8 @@ struct pv_time_ops {
210 int (*do_steal_accounting)(unsigned long *new_itm); 268 int (*do_steal_accounting)(unsigned long *new_itm);
211 269
212 void (*clocksource_resume)(void); 270 void (*clocksource_resume)(void);
271
272 unsigned long long (*sched_clock)(void);
213}; 273};
214 274
215extern struct pv_time_ops pv_time_ops; 275extern struct pv_time_ops pv_time_ops;
@@ -227,6 +287,11 @@ paravirt_do_steal_accounting(unsigned long *new_itm)
227 return pv_time_ops.do_steal_accounting(new_itm); 287 return pv_time_ops.do_steal_accounting(new_itm);
228} 288}
229 289
290static inline unsigned long long paravirt_sched_clock(void)
291{
292 return pv_time_ops.sched_clock();
293}
294
230#endif /* !__ASSEMBLY__ */ 295#endif /* !__ASSEMBLY__ */
231 296
232#else 297#else
diff --git a/arch/ia64/include/asm/paravirt_patch.h b/arch/ia64/include/asm/paravirt_patch.h
new file mode 100644
index 000000000000..128ff5db6e67
--- /dev/null
+++ b/arch/ia64/include/asm/paravirt_patch.h
@@ -0,0 +1,143 @@
1/******************************************************************************
2 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
3 * VA Linux Systems Japan K.K.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#ifndef __ASM_PARAVIRT_PATCH_H
22#define __ASM_PARAVIRT_PATCH_H
23
24#ifdef __ASSEMBLY__
25
26 .section .paravirt_branches, "a"
27 .previous
28#define PARAVIRT_PATCH_SITE_BR(type) \
29 { \
30 [1:] ; \
31 br.cond.sptk.many 2f ; \
32 nop.b 0 ; \
33 nop.b 0;; ; \
34 } ; \
35 2: \
36 .xdata8 ".paravirt_branches", 1b, type
37
38#else
39
40#include <linux/stringify.h>
41#include <asm/intrinsics.h>
42
43/* for binary patch */
44struct paravirt_patch_site_bundle {
45 void *sbundle;
46 void *ebundle;
47 unsigned long type;
48};
49
50/* label means the beginning of new bundle */
51#define paravirt_alt_bundle(instr, privop) \
52 "\t998:\n" \
53 "\t" instr "\n" \
54 "\t999:\n" \
55 "\t.pushsection .paravirt_bundles, \"a\"\n" \
56 "\t.popsection\n" \
57 "\t.xdata8 \".paravirt_bundles\", 998b, 999b, " \
58 __stringify(privop) "\n"
59
60
61struct paravirt_patch_bundle_elem {
62 const void *sbundle;
63 const void *ebundle;
64 unsigned long type;
65};
66
67
68struct paravirt_patch_site_inst {
69 unsigned long stag;
70 unsigned long etag;
71 unsigned long type;
72};
73
74#define paravirt_alt_inst(instr, privop) \
75 "\t[998:]\n" \
76 "\t" instr "\n" \
77 "\t[999:]\n" \
78 "\t.pushsection .paravirt_insts, \"a\"\n" \
79 "\t.popsection\n" \
80 "\t.xdata8 \".paravirt_insts\", 998b, 999b, " \
81 __stringify(privop) "\n"
82
83struct paravirt_patch_site_branch {
84 unsigned long tag;
85 unsigned long type;
86};
87
88struct paravirt_patch_branch_target {
89 const void *entry;
90 unsigned long type;
91};
92
93void
94__paravirt_patch_apply_branch(
95 unsigned long tag, unsigned long type,
96 const struct paravirt_patch_branch_target *entries,
97 unsigned int nr_entries);
98
99void
100paravirt_patch_reloc_br(unsigned long tag, const void *target);
101
102void
103paravirt_patch_reloc_brl(unsigned long tag, const void *target);
104
105
106#if defined(ASM_SUPPORTED) && defined(CONFIG_PARAVIRT)
107unsigned long
108ia64_native_patch_bundle(void *sbundle, void *ebundle, unsigned long type);
109
110unsigned long
111__paravirt_patch_apply_bundle(void *sbundle, void *ebundle, unsigned long type,
112 const struct paravirt_patch_bundle_elem *elems,
113 unsigned long nelems,
114 const struct paravirt_patch_bundle_elem **found);
115
116void
117paravirt_patch_apply_bundle(const struct paravirt_patch_site_bundle *start,
118 const struct paravirt_patch_site_bundle *end);
119
120void
121paravirt_patch_apply_inst(const struct paravirt_patch_site_inst *start,
122 const struct paravirt_patch_site_inst *end);
123
124void paravirt_patch_apply(void);
125#else
126#define paravirt_patch_apply_bundle(start, end) do { } while (0)
127#define paravirt_patch_apply_inst(start, end) do { } while (0)
128#define paravirt_patch_apply() do { } while (0)
129#endif
130
131#endif /* !__ASSEMBLEY__ */
132
133#endif /* __ASM_PARAVIRT_PATCH_H */
134
135/*
136 * Local variables:
137 * mode: C
138 * c-set-style: "linux"
139 * c-basic-offset: 8
140 * tab-width: 8
141 * indent-tabs-mode: t
142 * End:
143 */
diff --git a/arch/ia64/include/asm/paravirt_privop.h b/arch/ia64/include/asm/paravirt_privop.h
index 33c8e55f5775..3d2951130b5f 100644
--- a/arch/ia64/include/asm/paravirt_privop.h
+++ b/arch/ia64/include/asm/paravirt_privop.h
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35struct pv_cpu_ops { 35struct pv_cpu_ops {
36 void (*fc)(unsigned long addr); 36 void (*fc)(void *addr);
37 unsigned long (*thash)(unsigned long addr); 37 unsigned long (*thash)(unsigned long addr);
38 unsigned long (*get_cpuid)(int index); 38 unsigned long (*get_cpuid)(int index);
39 unsigned long (*get_pmd)(int index); 39 unsigned long (*get_pmd)(int index);
@@ -60,12 +60,18 @@ extern unsigned long ia64_native_getreg_func(int regnum);
60/* Instructions paravirtualized for performance */ 60/* Instructions paravirtualized for performance */
61/************************************************/ 61/************************************************/
62 62
63#ifndef ASM_SUPPORTED
64#define paravirt_ssm_i() pv_cpu_ops.ssm_i()
65#define paravirt_rsm_i() pv_cpu_ops.rsm_i()
66#define __paravirt_getreg() pv_cpu_ops.getreg()
67#endif
68
63/* mask for ia64_native_ssm/rsm() must be constant.("i" constraing). 69/* mask for ia64_native_ssm/rsm() must be constant.("i" constraing).
64 * static inline function doesn't satisfy it. */ 70 * static inline function doesn't satisfy it. */
65#define paravirt_ssm(mask) \ 71#define paravirt_ssm(mask) \
66 do { \ 72 do { \
67 if ((mask) == IA64_PSR_I) \ 73 if ((mask) == IA64_PSR_I) \
68 pv_cpu_ops.ssm_i(); \ 74 paravirt_ssm_i(); \
69 else \ 75 else \
70 ia64_native_ssm(mask); \ 76 ia64_native_ssm(mask); \
71 } while (0) 77 } while (0)
@@ -73,7 +79,7 @@ extern unsigned long ia64_native_getreg_func(int regnum);
73#define paravirt_rsm(mask) \ 79#define paravirt_rsm(mask) \
74 do { \ 80 do { \
75 if ((mask) == IA64_PSR_I) \ 81 if ((mask) == IA64_PSR_I) \
76 pv_cpu_ops.rsm_i(); \ 82 paravirt_rsm_i(); \
77 else \ 83 else \
78 ia64_native_rsm(mask); \ 84 ia64_native_rsm(mask); \
79 } while (0) 85 } while (0)
@@ -86,7 +92,7 @@ extern unsigned long ia64_native_getreg_func(int regnum);
86 if ((reg) == _IA64_REG_IP) \ 92 if ((reg) == _IA64_REG_IP) \
87 res = ia64_native_getreg(_IA64_REG_IP); \ 93 res = ia64_native_getreg(_IA64_REG_IP); \
88 else \ 94 else \
89 res = pv_cpu_ops.getreg(reg); \ 95 res = __paravirt_getreg(reg); \
90 res; \ 96 res; \
91 }) 97 })
92 98
@@ -112,6 +118,12 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
112 118
113#endif /* CONFIG_PARAVIRT */ 119#endif /* CONFIG_PARAVIRT */
114 120
121#if defined(CONFIG_PARAVIRT) && defined(ASM_SUPPORTED)
122#define paravirt_dv_serialize_data() ia64_dv_serialize_data()
123#else
124#define paravirt_dv_serialize_data() /* nothing */
125#endif
126
115/* these routines utilize privilege-sensitive or performance-sensitive 127/* these routines utilize privilege-sensitive or performance-sensitive
116 * privileged instructions so the code must be replaced with 128 * privileged instructions so the code must be replaced with
117 * paravirtualized versions */ 129 * paravirtualized versions */
@@ -121,4 +133,349 @@ void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
121 IA64_PARAVIRT_ASM_FUNC(work_processed_syscall) 133 IA64_PARAVIRT_ASM_FUNC(work_processed_syscall)
122#define ia64_leave_kernel IA64_PARAVIRT_ASM_FUNC(leave_kernel) 134#define ia64_leave_kernel IA64_PARAVIRT_ASM_FUNC(leave_kernel)
123 135
136
137#if defined(CONFIG_PARAVIRT)
138/******************************************************************************
139 * binary patching infrastructure
140 */
141#define PARAVIRT_PATCH_TYPE_FC 1
142#define PARAVIRT_PATCH_TYPE_THASH 2
143#define PARAVIRT_PATCH_TYPE_GET_CPUID 3
144#define PARAVIRT_PATCH_TYPE_GET_PMD 4
145#define PARAVIRT_PATCH_TYPE_PTCGA 5
146#define PARAVIRT_PATCH_TYPE_GET_RR 6
147#define PARAVIRT_PATCH_TYPE_SET_RR 7
148#define PARAVIRT_PATCH_TYPE_SET_RR0_TO_RR4 8
149#define PARAVIRT_PATCH_TYPE_SSM_I 9
150#define PARAVIRT_PATCH_TYPE_RSM_I 10
151#define PARAVIRT_PATCH_TYPE_GET_PSR_I 11
152#define PARAVIRT_PATCH_TYPE_INTRIN_LOCAL_IRQ_RESTORE 12
153
154/* PARAVIRT_PATY_TYPE_[GS]ETREG + _IA64_REG_xxx */
155#define PARAVIRT_PATCH_TYPE_GETREG 0x10000000
156#define PARAVIRT_PATCH_TYPE_SETREG 0x20000000
157
158/*
159 * struct task_struct* (*ia64_switch_to)(void* next_task);
160 * void *ia64_leave_syscall;
161 * void *ia64_work_processed_syscall
162 * void *ia64_leave_kernel;
163 */
164
165#define PARAVIRT_PATCH_TYPE_BR_START 0x30000000
166#define PARAVIRT_PATCH_TYPE_BR_SWITCH_TO \
167 (PARAVIRT_PATCH_TYPE_BR_START + 0)
168#define PARAVIRT_PATCH_TYPE_BR_LEAVE_SYSCALL \
169 (PARAVIRT_PATCH_TYPE_BR_START + 1)
170#define PARAVIRT_PATCH_TYPE_BR_WORK_PROCESSED_SYSCALL \
171 (PARAVIRT_PATCH_TYPE_BR_START + 2)
172#define PARAVIRT_PATCH_TYPE_BR_LEAVE_KERNEL \
173 (PARAVIRT_PATCH_TYPE_BR_START + 3)
174
175#ifdef ASM_SUPPORTED
176#include <asm/paravirt_patch.h>
177
178/*
179 * pv_cpu_ops calling stub.
180 * normal function call convension can't be written by gcc
181 * inline assembly.
182 *
183 * from the caller's point of view,
184 * the following registers will be clobbered.
185 * r2, r3
186 * r8-r15
187 * r16, r17
188 * b6, b7
189 * p6-p15
190 * ar.ccv
191 *
192 * from the callee's point of view ,
193 * the following registers can be used.
194 * r2, r3: scratch
195 * r8: scratch, input argument0 and return value
196 * r0-r15: scratch, input argument1-5
197 * b6: return pointer
198 * b7: scratch
199 * p6-p15: scratch
200 * ar.ccv: scratch
201 *
202 * other registers must not be changed. especially
203 * b0: rp: preserved. gcc ignores b0 in clobbered register.
204 * r16: saved gp
205 */
206/* 5 bundles */
207#define __PARAVIRT_BR \
208 ";;\n" \
209 "{ .mlx\n" \
210 "nop 0\n" \
211 "movl r2 = %[op_addr]\n"/* get function pointer address */ \
212 ";;\n" \
213 "}\n" \
214 "1:\n" \
215 "{ .mii\n" \
216 "ld8 r2 = [r2]\n" /* load function descriptor address */ \
217 "mov r17 = ip\n" /* get ip to calc return address */ \
218 "mov r16 = gp\n" /* save gp */ \
219 ";;\n" \
220 "}\n" \
221 "{ .mii\n" \
222 "ld8 r3 = [r2], 8\n" /* load entry address */ \
223 "adds r17 = 1f - 1b, r17\n" /* calculate return address */ \
224 ";;\n" \
225 "mov b7 = r3\n" /* set entry address */ \
226 "}\n" \
227 "{ .mib\n" \
228 "ld8 gp = [r2]\n" /* load gp value */ \
229 "mov b6 = r17\n" /* set return address */ \
230 "br.cond.sptk.few b7\n" /* intrinsics are very short isns */ \
231 "}\n" \
232 "1:\n" \
233 "{ .mii\n" \
234 "mov gp = r16\n" /* restore gp value */ \
235 "nop 0\n" \
236 "nop 0\n" \
237 ";;\n" \
238 "}\n"
239
240#define PARAVIRT_OP(op) \
241 [op_addr] "i"(&pv_cpu_ops.op)
242
243#define PARAVIRT_TYPE(type) \
244 PARAVIRT_PATCH_TYPE_ ## type
245
246#define PARAVIRT_REG_CLOBBERS0 \
247 "r2", "r3", /*"r8",*/ "r9", "r10", "r11", "r14", \
248 "r15", "r16", "r17"
249
250#define PARAVIRT_REG_CLOBBERS1 \
251 "r2","r3", /*"r8",*/ "r9", "r10", "r11", "r14", \
252 "r15", "r16", "r17"
253
254#define PARAVIRT_REG_CLOBBERS2 \
255 "r2", "r3", /*"r8", "r9",*/ "r10", "r11", "r14", \
256 "r15", "r16", "r17"
257
258#define PARAVIRT_REG_CLOBBERS5 \
259 "r2", "r3", /*"r8", "r9", "r10", "r11", "r14",*/ \
260 "r15", "r16", "r17"
261
262#define PARAVIRT_BR_CLOBBERS \
263 "b6", "b7"
264
265#define PARAVIRT_PR_CLOBBERS \
266 "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15"
267
268#define PARAVIRT_AR_CLOBBERS \
269 "ar.ccv"
270
271#define PARAVIRT_CLOBBERS0 \
272 PARAVIRT_REG_CLOBBERS0, \
273 PARAVIRT_BR_CLOBBERS, \
274 PARAVIRT_PR_CLOBBERS, \
275 PARAVIRT_AR_CLOBBERS, \
276 "memory"
277
278#define PARAVIRT_CLOBBERS1 \
279 PARAVIRT_REG_CLOBBERS1, \
280 PARAVIRT_BR_CLOBBERS, \
281 PARAVIRT_PR_CLOBBERS, \
282 PARAVIRT_AR_CLOBBERS, \
283 "memory"
284
285#define PARAVIRT_CLOBBERS2 \
286 PARAVIRT_REG_CLOBBERS2, \
287 PARAVIRT_BR_CLOBBERS, \
288 PARAVIRT_PR_CLOBBERS, \
289 PARAVIRT_AR_CLOBBERS, \
290 "memory"
291
292#define PARAVIRT_CLOBBERS5 \
293 PARAVIRT_REG_CLOBBERS5, \
294 PARAVIRT_BR_CLOBBERS, \
295 PARAVIRT_PR_CLOBBERS, \
296 PARAVIRT_AR_CLOBBERS, \
297 "memory"
298
299#define PARAVIRT_BR0(op, type) \
300 register unsigned long ia64_clobber asm ("r8"); \
301 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
302 PARAVIRT_TYPE(type)) \
303 : "=r"(ia64_clobber) \
304 : PARAVIRT_OP(op) \
305 : PARAVIRT_CLOBBERS0)
306
307#define PARAVIRT_BR0_RET(op, type) \
308 register unsigned long ia64_intri_res asm ("r8"); \
309 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
310 PARAVIRT_TYPE(type)) \
311 : "=r"(ia64_intri_res) \
312 : PARAVIRT_OP(op) \
313 : PARAVIRT_CLOBBERS0)
314
315#define PARAVIRT_BR1(op, type, arg1) \
316 register unsigned long __##arg1 asm ("r8") = arg1; \
317 register unsigned long ia64_clobber asm ("r8"); \
318 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
319 PARAVIRT_TYPE(type)) \
320 : "=r"(ia64_clobber) \
321 : PARAVIRT_OP(op), "0"(__##arg1) \
322 : PARAVIRT_CLOBBERS1)
323
324#define PARAVIRT_BR1_RET(op, type, arg1) \
325 register unsigned long ia64_intri_res asm ("r8"); \
326 register unsigned long __##arg1 asm ("r8") = arg1; \
327 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
328 PARAVIRT_TYPE(type)) \
329 : "=r"(ia64_intri_res) \
330 : PARAVIRT_OP(op), "0"(__##arg1) \
331 : PARAVIRT_CLOBBERS1)
332
333#define PARAVIRT_BR1_VOID(op, type, arg1) \
334 register void *__##arg1 asm ("r8") = arg1; \
335 register unsigned long ia64_clobber asm ("r8"); \
336 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
337 PARAVIRT_TYPE(type)) \
338 : "=r"(ia64_clobber) \
339 : PARAVIRT_OP(op), "0"(__##arg1) \
340 : PARAVIRT_CLOBBERS1)
341
342#define PARAVIRT_BR2(op, type, arg1, arg2) \
343 register unsigned long __##arg1 asm ("r8") = arg1; \
344 register unsigned long __##arg2 asm ("r9") = arg2; \
345 register unsigned long ia64_clobber1 asm ("r8"); \
346 register unsigned long ia64_clobber2 asm ("r9"); \
347 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
348 PARAVIRT_TYPE(type)) \
349 : "=r"(ia64_clobber1), "=r"(ia64_clobber2) \
350 : PARAVIRT_OP(op), "0"(__##arg1), "1"(__##arg2) \
351 : PARAVIRT_CLOBBERS2)
352
353
354#define PARAVIRT_DEFINE_CPU_OP0(op, type) \
355 static inline void \
356 paravirt_ ## op (void) \
357 { \
358 PARAVIRT_BR0(op, type); \
359 }
360
361#define PARAVIRT_DEFINE_CPU_OP0_RET(op, type) \
362 static inline unsigned long \
363 paravirt_ ## op (void) \
364 { \
365 PARAVIRT_BR0_RET(op, type); \
366 return ia64_intri_res; \
367 }
368
369#define PARAVIRT_DEFINE_CPU_OP1_VOID(op, type) \
370 static inline void \
371 paravirt_ ## op (void *arg1) \
372 { \
373 PARAVIRT_BR1_VOID(op, type, arg1); \
374 }
375
376#define PARAVIRT_DEFINE_CPU_OP1(op, type) \
377 static inline void \
378 paravirt_ ## op (unsigned long arg1) \
379 { \
380 PARAVIRT_BR1(op, type, arg1); \
381 }
382
383#define PARAVIRT_DEFINE_CPU_OP1_RET(op, type) \
384 static inline unsigned long \
385 paravirt_ ## op (unsigned long arg1) \
386 { \
387 PARAVIRT_BR1_RET(op, type, arg1); \
388 return ia64_intri_res; \
389 }
390
391#define PARAVIRT_DEFINE_CPU_OP2(op, type) \
392 static inline void \
393 paravirt_ ## op (unsigned long arg1, \
394 unsigned long arg2) \
395 { \
396 PARAVIRT_BR2(op, type, arg1, arg2); \
397 }
398
399
400PARAVIRT_DEFINE_CPU_OP1_VOID(fc, FC);
401PARAVIRT_DEFINE_CPU_OP1_RET(thash, THASH)
402PARAVIRT_DEFINE_CPU_OP1_RET(get_cpuid, GET_CPUID)
403PARAVIRT_DEFINE_CPU_OP1_RET(get_pmd, GET_PMD)
404PARAVIRT_DEFINE_CPU_OP2(ptcga, PTCGA)
405PARAVIRT_DEFINE_CPU_OP1_RET(get_rr, GET_RR)
406PARAVIRT_DEFINE_CPU_OP2(set_rr, SET_RR)
407PARAVIRT_DEFINE_CPU_OP0(ssm_i, SSM_I)
408PARAVIRT_DEFINE_CPU_OP0(rsm_i, RSM_I)
409PARAVIRT_DEFINE_CPU_OP0_RET(get_psr_i, GET_PSR_I)
410PARAVIRT_DEFINE_CPU_OP1(intrin_local_irq_restore, INTRIN_LOCAL_IRQ_RESTORE)
411
412static inline void
413paravirt_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
414 unsigned long val2, unsigned long val3,
415 unsigned long val4)
416{
417 register unsigned long __val0 asm ("r8") = val0;
418 register unsigned long __val1 asm ("r9") = val1;
419 register unsigned long __val2 asm ("r10") = val2;
420 register unsigned long __val3 asm ("r11") = val3;
421 register unsigned long __val4 asm ("r14") = val4;
422
423 register unsigned long ia64_clobber0 asm ("r8");
424 register unsigned long ia64_clobber1 asm ("r9");
425 register unsigned long ia64_clobber2 asm ("r10");
426 register unsigned long ia64_clobber3 asm ("r11");
427 register unsigned long ia64_clobber4 asm ("r14");
428
429 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR,
430 PARAVIRT_TYPE(SET_RR0_TO_RR4))
431 : "=r"(ia64_clobber0),
432 "=r"(ia64_clobber1),
433 "=r"(ia64_clobber2),
434 "=r"(ia64_clobber3),
435 "=r"(ia64_clobber4)
436 : PARAVIRT_OP(set_rr0_to_rr4),
437 "0"(__val0), "1"(__val1), "2"(__val2),
438 "3"(__val3), "4"(__val4)
439 : PARAVIRT_CLOBBERS5);
440}
441
442/* unsigned long paravirt_getreg(int reg) */
443#define __paravirt_getreg(reg) \
444 ({ \
445 register unsigned long ia64_intri_res asm ("r8"); \
446 register unsigned long __reg asm ("r8") = (reg); \
447 \
448 BUILD_BUG_ON(!__builtin_constant_p(reg)); \
449 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
450 PARAVIRT_TYPE(GETREG) \
451 + (reg)) \
452 : "=r"(ia64_intri_res) \
453 : PARAVIRT_OP(getreg), "0"(__reg) \
454 : PARAVIRT_CLOBBERS1); \
455 \
456 ia64_intri_res; \
457 })
458
459/* void paravirt_setreg(int reg, unsigned long val) */
460#define paravirt_setreg(reg, val) \
461 do { \
462 register unsigned long __val asm ("r8") = val; \
463 register unsigned long __reg asm ("r9") = reg; \
464 register unsigned long ia64_clobber1 asm ("r8"); \
465 register unsigned long ia64_clobber2 asm ("r9"); \
466 \
467 BUILD_BUG_ON(!__builtin_constant_p(reg)); \
468 asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
469 PARAVIRT_TYPE(SETREG) \
470 + (reg)) \
471 : "=r"(ia64_clobber1), \
472 "=r"(ia64_clobber2) \
473 : PARAVIRT_OP(setreg), \
474 "1"(__reg), "0"(__val) \
475 : PARAVIRT_CLOBBERS2); \
476 } while (0)
477
478#endif /* ASM_SUPPORTED */
479#endif /* CONFIG_PARAVIRT && ASM_SUPPOTED */
480
124#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */ 481#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h
index 21c402365d0e..598408336251 100644
--- a/arch/ia64/include/asm/smp.h
+++ b/arch/ia64/include/asm/smp.h
@@ -126,7 +126,8 @@ extern void identify_siblings (struct cpuinfo_ia64 *);
126extern int is_multithreading_enabled(void); 126extern int is_multithreading_enabled(void);
127 127
128extern void arch_send_call_function_single_ipi(int cpu); 128extern void arch_send_call_function_single_ipi(int cpu);
129extern void arch_send_call_function_ipi(cpumask_t mask); 129extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
130#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
130 131
131#else /* CONFIG_SMP */ 132#else /* CONFIG_SMP */
132 133
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
index 0229fb95fb38..13ab71576bc7 100644
--- a/arch/ia64/include/asm/spinlock.h
+++ b/arch/ia64/include/asm/spinlock.h
@@ -120,6 +120,38 @@ do { \
120#define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0) 120#define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0)
121#define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0) 121#define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0)
122 122
123#ifdef ASM_SUPPORTED
124
125static __always_inline void
126__raw_read_lock_flags(raw_rwlock_t *lock, unsigned long flags)
127{
128 __asm__ __volatile__ (
129 "tbit.nz p6, p0 = %1,%2\n"
130 "br.few 3f\n"
131 "1:\n"
132 "fetchadd4.rel r2 = [%0], -1;;\n"
133 "(p6) ssm psr.i\n"
134 "2:\n"
135 "hint @pause\n"
136 "ld4 r2 = [%0];;\n"
137 "cmp4.lt p7,p0 = r2, r0\n"
138 "(p7) br.cond.spnt.few 2b\n"
139 "(p6) rsm psr.i\n"
140 ";;\n"
141 "3:\n"
142 "fetchadd4.acq r2 = [%0], 1;;\n"
143 "cmp4.lt p7,p0 = r2, r0\n"
144 "(p7) br.cond.spnt.few 1b\n"
145 : : "r"(lock), "r"(flags), "i"(IA64_PSR_I_BIT)
146 : "p6", "p7", "r2", "memory");
147}
148
149#define __raw_read_lock(lock) __raw_read_lock_flags(lock, 0)
150
151#else /* !ASM_SUPPORTED */
152
153#define __raw_read_lock_flags(rw, flags) __raw_read_lock(rw)
154
123#define __raw_read_lock(rw) \ 155#define __raw_read_lock(rw) \
124do { \ 156do { \
125 raw_rwlock_t *__read_lock_ptr = (rw); \ 157 raw_rwlock_t *__read_lock_ptr = (rw); \
@@ -131,6 +163,8 @@ do { \
131 } \ 163 } \
132} while (0) 164} while (0)
133 165
166#endif /* !ASM_SUPPORTED */
167
134#define __raw_read_unlock(rw) \ 168#define __raw_read_unlock(rw) \
135do { \ 169do { \
136 raw_rwlock_t *__read_lock_ptr = (rw); \ 170 raw_rwlock_t *__read_lock_ptr = (rw); \
@@ -138,20 +172,33 @@ do { \
138} while (0) 172} while (0)
139 173
140#ifdef ASM_SUPPORTED 174#ifdef ASM_SUPPORTED
141#define __raw_write_lock(rw) \ 175
142do { \ 176static __always_inline void
143 __asm__ __volatile__ ( \ 177__raw_write_lock_flags(raw_rwlock_t *lock, unsigned long flags)
144 "mov ar.ccv = r0\n" \ 178{
145 "dep r29 = -1, r0, 31, 1;;\n" \ 179 __asm__ __volatile__ (
146 "1:\n" \ 180 "tbit.nz p6, p0 = %1, %2\n"
147 "ld4 r2 = [%0];;\n" \ 181 "mov ar.ccv = r0\n"
148 "cmp4.eq p0,p7 = r0,r2\n" \ 182 "dep r29 = -1, r0, 31, 1\n"
149 "(p7) br.cond.spnt.few 1b \n" \ 183 "br.few 3f;;\n"
150 "cmpxchg4.acq r2 = [%0], r29, ar.ccv;;\n" \ 184 "1:\n"
151 "cmp4.eq p0,p7 = r0, r2\n" \ 185 "(p6) ssm psr.i\n"
152 "(p7) br.cond.spnt.few 1b;;\n" \ 186 "2:\n"
153 :: "r"(rw) : "ar.ccv", "p7", "r2", "r29", "memory"); \ 187 "hint @pause\n"
154} while(0) 188 "ld4 r2 = [%0];;\n"
189 "cmp4.eq p0,p7 = r0, r2\n"
190 "(p7) br.cond.spnt.few 2b\n"
191 "(p6) rsm psr.i\n"
192 ";;\n"
193 "3:\n"
194 "cmpxchg4.acq r2 = [%0], r29, ar.ccv;;\n"
195 "cmp4.eq p0,p7 = r0, r2\n"
196 "(p7) br.cond.spnt.few 1b;;\n"
197 : : "r"(lock), "r"(flags), "i"(IA64_PSR_I_BIT)
198 : "ar.ccv", "p6", "p7", "r2", "r29", "memory");
199}
200
201#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0)
155 202
156#define __raw_write_trylock(rw) \ 203#define __raw_write_trylock(rw) \
157({ \ 204({ \
@@ -174,6 +221,8 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
174 221
175#else /* !ASM_SUPPORTED */ 222#else /* !ASM_SUPPORTED */
176 223
224#define __raw_write_lock_flags(l, flags) __raw_write_lock(l)
225
177#define __raw_write_lock(l) \ 226#define __raw_write_lock(l) \
178({ \ 227({ \
179 __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \ 228 __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \
diff --git a/arch/ia64/include/asm/timex.h b/arch/ia64/include/asm/timex.h
index 4e03cfe74a0c..86c7db861180 100644
--- a/arch/ia64/include/asm/timex.h
+++ b/arch/ia64/include/asm/timex.h
@@ -40,5 +40,6 @@ get_cycles (void)
40} 40}
41 41
42extern void ia64_cpu_local_tick (void); 42extern void ia64_cpu_local_tick (void);
43extern unsigned long long ia64_native_sched_clock (void);
43 44
44#endif /* _ASM_IA64_TIMEX_H */ 45#endif /* _ASM_IA64_TIMEX_H */
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 3193f4417e16..7b4c8c70b2d1 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -44,11 +44,6 @@
44#define parent_node(nid) (nid) 44#define parent_node(nid) (nid)
45 45
46/* 46/*
47 * Returns the number of the first CPU on Node 'node'.
48 */
49#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
50
51/*
52 * Determines the node for a given pci bus 47 * Determines the node for a given pci bus
53 */ 48 */
54#define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node 49#define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node
@@ -117,11 +112,6 @@ void build_cpu_to_node_map(void);
117 112
118extern void arch_fix_phys_package_id(int num, u32 slot); 113extern void arch_fix_phys_package_id(int num, u32 slot);
119 114
120#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
121 CPU_MASK_ALL : \
122 node_to_cpumask(pcibus_to_node(bus)) \
123 )
124
125#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ 115#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
126 cpu_all_mask : \ 116 cpu_all_mask : \
127 cpumask_of_node(pcibus_to_node(bus))) 117 cpumask_of_node(pcibus_to_node(bus)))
diff --git a/arch/ia64/include/asm/uv/uv_hub.h b/arch/ia64/include/asm/uv/uv_hub.h
index f607018af4a1..53e9dfacd073 100644
--- a/arch/ia64/include/asm/uv/uv_hub.h
+++ b/arch/ia64/include/asm/uv/uv_hub.h
@@ -305,5 +305,11 @@ static inline int uv_num_possible_blades(void)
305 return 1; 305 return 1;
306} 306}
307 307
308static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
309{
310 /* not currently needed on ia64 */
311}
312
313
308#endif /* __ASM_IA64_UV_HUB__ */ 314#endif /* __ASM_IA64_UV_HUB__ */
309 315
diff --git a/arch/ia64/include/asm/uv/uv_mmrs.h b/arch/ia64/include/asm/uv/uv_mmrs.h
index c149ef085437..fe0b8f05e1a8 100644
--- a/arch/ia64/include/asm/uv/uv_mmrs.h
+++ b/arch/ia64/include/asm/uv/uv_mmrs.h
@@ -8,8 +8,8 @@
8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. 8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
9 */ 9 */
10 10
11#ifndef __ASM_IA64_UV_MMRS__ 11#ifndef _ASM_IA64_UV_UV_MMRS_H
12#define __ASM_IA64_UV_MMRS__ 12#define _ASM_IA64_UV_UV_MMRS_H
13 13
14#define UV_MMR_ENABLE (1UL << 63) 14#define UV_MMR_ENABLE (1UL << 63)
15 15
@@ -243,6 +243,158 @@ union uvh_event_occurred0_u {
243#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0 243#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0
244 244
245/* ========================================================================= */ 245/* ========================================================================= */
246/* UVH_GR0_TLB_INT0_CONFIG */
247/* ========================================================================= */
248#define UVH_GR0_TLB_INT0_CONFIG 0x61b00UL
249
250#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_SHFT 0
251#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
252#define UVH_GR0_TLB_INT0_CONFIG_DM_SHFT 8
253#define UVH_GR0_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
254#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_SHFT 11
255#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
256#define UVH_GR0_TLB_INT0_CONFIG_STATUS_SHFT 12
257#define UVH_GR0_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
258#define UVH_GR0_TLB_INT0_CONFIG_P_SHFT 13
259#define UVH_GR0_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
260#define UVH_GR0_TLB_INT0_CONFIG_T_SHFT 15
261#define UVH_GR0_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
262#define UVH_GR0_TLB_INT0_CONFIG_M_SHFT 16
263#define UVH_GR0_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
264#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_SHFT 32
265#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
266
267union uvh_gr0_tlb_int0_config_u {
268 unsigned long v;
269 struct uvh_gr0_tlb_int0_config_s {
270 unsigned long vector_ : 8; /* RW */
271 unsigned long dm : 3; /* RW */
272 unsigned long destmode : 1; /* RW */
273 unsigned long status : 1; /* RO */
274 unsigned long p : 1; /* RO */
275 unsigned long rsvd_14 : 1; /* */
276 unsigned long t : 1; /* RO */
277 unsigned long m : 1; /* RW */
278 unsigned long rsvd_17_31: 15; /* */
279 unsigned long apic_id : 32; /* RW */
280 } s;
281};
282
283/* ========================================================================= */
284/* UVH_GR0_TLB_INT1_CONFIG */
285/* ========================================================================= */
286#define UVH_GR0_TLB_INT1_CONFIG 0x61b40UL
287
288#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_SHFT 0
289#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
290#define UVH_GR0_TLB_INT1_CONFIG_DM_SHFT 8
291#define UVH_GR0_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
292#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_SHFT 11
293#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
294#define UVH_GR0_TLB_INT1_CONFIG_STATUS_SHFT 12
295#define UVH_GR0_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
296#define UVH_GR0_TLB_INT1_CONFIG_P_SHFT 13
297#define UVH_GR0_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
298#define UVH_GR0_TLB_INT1_CONFIG_T_SHFT 15
299#define UVH_GR0_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
300#define UVH_GR0_TLB_INT1_CONFIG_M_SHFT 16
301#define UVH_GR0_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
302#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_SHFT 32
303#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
304
305union uvh_gr0_tlb_int1_config_u {
306 unsigned long v;
307 struct uvh_gr0_tlb_int1_config_s {
308 unsigned long vector_ : 8; /* RW */
309 unsigned long dm : 3; /* RW */
310 unsigned long destmode : 1; /* RW */
311 unsigned long status : 1; /* RO */
312 unsigned long p : 1; /* RO */
313 unsigned long rsvd_14 : 1; /* */
314 unsigned long t : 1; /* RO */
315 unsigned long m : 1; /* RW */
316 unsigned long rsvd_17_31: 15; /* */
317 unsigned long apic_id : 32; /* RW */
318 } s;
319};
320
321/* ========================================================================= */
322/* UVH_GR1_TLB_INT0_CONFIG */
323/* ========================================================================= */
324#define UVH_GR1_TLB_INT0_CONFIG 0x61f00UL
325
326#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_SHFT 0
327#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
328#define UVH_GR1_TLB_INT0_CONFIG_DM_SHFT 8
329#define UVH_GR1_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
330#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_SHFT 11
331#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
332#define UVH_GR1_TLB_INT0_CONFIG_STATUS_SHFT 12
333#define UVH_GR1_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
334#define UVH_GR1_TLB_INT0_CONFIG_P_SHFT 13
335#define UVH_GR1_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
336#define UVH_GR1_TLB_INT0_CONFIG_T_SHFT 15
337#define UVH_GR1_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
338#define UVH_GR1_TLB_INT0_CONFIG_M_SHFT 16
339#define UVH_GR1_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
340#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_SHFT 32
341#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
342
343union uvh_gr1_tlb_int0_config_u {
344 unsigned long v;
345 struct uvh_gr1_tlb_int0_config_s {
346 unsigned long vector_ : 8; /* RW */
347 unsigned long dm : 3; /* RW */
348 unsigned long destmode : 1; /* RW */
349 unsigned long status : 1; /* RO */
350 unsigned long p : 1; /* RO */
351 unsigned long rsvd_14 : 1; /* */
352 unsigned long t : 1; /* RO */
353 unsigned long m : 1; /* RW */
354 unsigned long rsvd_17_31: 15; /* */
355 unsigned long apic_id : 32; /* RW */
356 } s;
357};
358
359/* ========================================================================= */
360/* UVH_GR1_TLB_INT1_CONFIG */
361/* ========================================================================= */
362#define UVH_GR1_TLB_INT1_CONFIG 0x61f40UL
363
364#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_SHFT 0
365#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
366#define UVH_GR1_TLB_INT1_CONFIG_DM_SHFT 8
367#define UVH_GR1_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
368#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_SHFT 11
369#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
370#define UVH_GR1_TLB_INT1_CONFIG_STATUS_SHFT 12
371#define UVH_GR1_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
372#define UVH_GR1_TLB_INT1_CONFIG_P_SHFT 13
373#define UVH_GR1_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
374#define UVH_GR1_TLB_INT1_CONFIG_T_SHFT 15
375#define UVH_GR1_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
376#define UVH_GR1_TLB_INT1_CONFIG_M_SHFT 16
377#define UVH_GR1_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
378#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_SHFT 32
379#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
380
381union uvh_gr1_tlb_int1_config_u {
382 unsigned long v;
383 struct uvh_gr1_tlb_int1_config_s {
384 unsigned long vector_ : 8; /* RW */
385 unsigned long dm : 3; /* RW */
386 unsigned long destmode : 1; /* RW */
387 unsigned long status : 1; /* RO */
388 unsigned long p : 1; /* RO */
389 unsigned long rsvd_14 : 1; /* */
390 unsigned long t : 1; /* RO */
391 unsigned long m : 1; /* RW */
392 unsigned long rsvd_17_31: 15; /* */
393 unsigned long apic_id : 32; /* RW */
394 } s;
395};
396
397/* ========================================================================= */
246/* UVH_INT_CMPB */ 398/* UVH_INT_CMPB */
247/* ========================================================================= */ 399/* ========================================================================= */
248#define UVH_INT_CMPB 0x22080UL 400#define UVH_INT_CMPB 0x22080UL
@@ -670,4 +822,4 @@ union uvh_si_alias2_overlay_config_u {
670}; 822};
671 823
672 824
673#endif /* __ASM_IA64_UV_MMRS__ */ 825#endif /* _ASM_IA64_UV_UV_MMRS_H */
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h
index 7a804e80fc67..e425227a418e 100644
--- a/arch/ia64/include/asm/xen/hypervisor.h
+++ b/arch/ia64/include/asm/xen/hypervisor.h
@@ -33,9 +33,6 @@
33#ifndef _ASM_IA64_XEN_HYPERVISOR_H 33#ifndef _ASM_IA64_XEN_HYPERVISOR_H
34#define _ASM_IA64_XEN_HYPERVISOR_H 34#define _ASM_IA64_XEN_HYPERVISOR_H
35 35
36#ifdef CONFIG_XEN
37
38#include <linux/init.h>
39#include <xen/interface/xen.h> 36#include <xen/interface/xen.h>
40#include <xen/interface/version.h> /* to compile feature.c */ 37#include <xen/interface/version.h> /* to compile feature.c */
41#include <xen/features.h> /* to comiple xen-netfront.c */ 38#include <xen/features.h> /* to comiple xen-netfront.c */
@@ -43,22 +40,32 @@
43 40
44/* xen_domain_type is set before executing any C code by early_xen_setup */ 41/* xen_domain_type is set before executing any C code by early_xen_setup */
45enum xen_domain_type { 42enum xen_domain_type {
46 XEN_NATIVE, 43 XEN_NATIVE, /* running on bare hardware */
47 XEN_PV_DOMAIN, 44 XEN_PV_DOMAIN, /* running in a PV domain */
48 XEN_HVM_DOMAIN, 45 XEN_HVM_DOMAIN, /* running in a Xen hvm domain*/
49}; 46};
50 47
48#ifdef CONFIG_XEN
51extern enum xen_domain_type xen_domain_type; 49extern enum xen_domain_type xen_domain_type;
50#else
51#define xen_domain_type XEN_NATIVE
52#endif
52 53
53#define xen_domain() (xen_domain_type != XEN_NATIVE) 54#define xen_domain() (xen_domain_type != XEN_NATIVE)
54#define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN) 55#define xen_pv_domain() (xen_domain() && \
55#define xen_initial_domain() (xen_pv_domain() && \ 56 xen_domain_type == XEN_PV_DOMAIN)
57#define xen_hvm_domain() (xen_domain() && \
58 xen_domain_type == XEN_HVM_DOMAIN)
59
60#ifdef CONFIG_XEN_DOM0
61#define xen_initial_domain() (xen_pv_domain() && \
56 (xen_start_info->flags & SIF_INITDOMAIN)) 62 (xen_start_info->flags & SIF_INITDOMAIN))
57#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) 63#else
64#define xen_initial_domain() (0)
65#endif
58 66
59/* deprecated. remove this */
60#define is_running_on_xen() (xen_domain_type == XEN_PV_DOMAIN)
61 67
68#ifdef CONFIG_XEN
62extern struct shared_info *HYPERVISOR_shared_info; 69extern struct shared_info *HYPERVISOR_shared_info;
63extern struct start_info *xen_start_info; 70extern struct start_info *xen_start_info;
64 71
@@ -74,16 +81,6 @@ void force_evtchn_callback(void);
74 81
75/* For setup_arch() in arch/ia64/kernel/setup.c */ 82/* For setup_arch() in arch/ia64/kernel/setup.c */
76void xen_ia64_enable_opt_feature(void); 83void xen_ia64_enable_opt_feature(void);
77
78#else /* CONFIG_XEN */
79
80#define xen_domain() (0)
81#define xen_pv_domain() (0)
82#define xen_initial_domain() (0)
83#define xen_hvm_domain() (0)
84#define is_running_on_xen() (0) /* deprecated. remove this */
85#endif 84#endif
86 85
87#define is_initial_xendomain() (0) /* deprecated. remove this */
88
89#endif /* _ASM_IA64_XEN_HYPERVISOR_H */ 86#endif /* _ASM_IA64_XEN_HYPERVISOR_H */
diff --git a/arch/ia64/include/asm/xen/inst.h b/arch/ia64/include/asm/xen/inst.h
index 19c2ae1d878a..c53a47611208 100644
--- a/arch/ia64/include/asm/xen/inst.h
+++ b/arch/ia64/include/asm/xen/inst.h
@@ -33,6 +33,9 @@
33#define __paravirt_work_processed_syscall_target \ 33#define __paravirt_work_processed_syscall_target \
34 xen_work_processed_syscall 34 xen_work_processed_syscall
35 35
36#define paravirt_fsyscall_table xen_fsyscall_table
37#define paravirt_fsys_bubble_down xen_fsys_bubble_down
38
36#define MOV_FROM_IFA(reg) \ 39#define MOV_FROM_IFA(reg) \
37 movl reg = XSI_IFA; \ 40 movl reg = XSI_IFA; \
38 ;; \ 41 ;; \
@@ -110,6 +113,27 @@
110.endm 113.endm
111#define MOV_FROM_PSR(pred, reg, clob) __MOV_FROM_PSR pred, reg, clob 114#define MOV_FROM_PSR(pred, reg, clob) __MOV_FROM_PSR pred, reg, clob
112 115
116/* assuming ar.itc is read with interrupt disabled. */
117#define MOV_FROM_ITC(pred, pred_clob, reg, clob) \
118(pred) movl clob = XSI_ITC_OFFSET; \
119 ;; \
120(pred) ld8 clob = [clob]; \
121(pred) mov reg = ar.itc; \
122 ;; \
123(pred) add reg = reg, clob; \
124 ;; \
125(pred) movl clob = XSI_ITC_LAST; \
126 ;; \
127(pred) ld8 clob = [clob]; \
128 ;; \
129(pred) cmp.geu.unc pred_clob, p0 = clob, reg; \
130 ;; \
131(pred_clob) add reg = 1, clob; \
132 ;; \
133(pred) movl clob = XSI_ITC_LAST; \
134 ;; \
135(pred) st8 [clob] = reg
136
113 137
114#define MOV_TO_IFA(reg, clob) \ 138#define MOV_TO_IFA(reg, clob) \
115 movl clob = XSI_IFA; \ 139 movl clob = XSI_IFA; \
@@ -362,6 +386,10 @@
362#define RSM_PSR_DT \ 386#define RSM_PSR_DT \
363 XEN_HYPER_RSM_PSR_DT 387 XEN_HYPER_RSM_PSR_DT
364 388
389#define RSM_PSR_BE_I(clob0, clob1) \
390 RSM_PSR_I(p0, clob0, clob1); \
391 rum psr.be
392
365#define SSM_PSR_DT_AND_SRLZ_I \ 393#define SSM_PSR_DT_AND_SRLZ_I \
366 XEN_HYPER_SSM_PSR_DT 394 XEN_HYPER_SSM_PSR_DT
367 395
diff --git a/arch/ia64/include/asm/xen/interface.h b/arch/ia64/include/asm/xen/interface.h
index f00fab40854d..e951e740bdf2 100644
--- a/arch/ia64/include/asm/xen/interface.h
+++ b/arch/ia64/include/asm/xen/interface.h
@@ -209,6 +209,15 @@ struct mapped_regs {
209 unsigned long krs[8]; /* kernel registers */ 209 unsigned long krs[8]; /* kernel registers */
210 unsigned long tmp[16]; /* temp registers 210 unsigned long tmp[16]; /* temp registers
211 (e.g. for hyperprivops) */ 211 (e.g. for hyperprivops) */
212
213 /* itc paravirtualization
214 * vAR.ITC = mAR.ITC + itc_offset
215 * itc_last is one which was lastly passed to
216 * the guest OS in order to prevent it from
217 * going backwords.
218 */
219 unsigned long itc_offset;
220 unsigned long itc_last;
212 }; 221 };
213 }; 222 };
214}; 223};
diff --git a/arch/ia64/include/asm/xen/minstate.h b/arch/ia64/include/asm/xen/minstate.h
index 4d92d9bbda7b..c57fa910f2c9 100644
--- a/arch/ia64/include/asm/xen/minstate.h
+++ b/arch/ia64/include/asm/xen/minstate.h
@@ -1,3 +1,12 @@
1
2#ifdef CONFIG_VIRT_CPU_ACCOUNTING
3/* read ar.itc in advance, and use it before leaving bank 0 */
4#define XEN_ACCOUNT_GET_STAMP \
5 MOV_FROM_ITC(pUStk, p6, r20, r2);
6#else
7#define XEN_ACCOUNT_GET_STAMP
8#endif
9
1/* 10/*
2 * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves 11 * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves
3 * the minimum state necessary that allows us to turn psr.ic back 12 * the minimum state necessary that allows us to turn psr.ic back
@@ -123,7 +132,7 @@
123 ;; \ 132 ;; \
124.mem.offset 0,0; st8.spill [r16]=r2,16; \ 133.mem.offset 0,0; st8.spill [r16]=r2,16; \
125.mem.offset 8,0; st8.spill [r17]=r3,16; \ 134.mem.offset 8,0; st8.spill [r17]=r3,16; \
126 ACCOUNT_GET_STAMP \ 135 XEN_ACCOUNT_GET_STAMP \
127 adds r2=IA64_PT_REGS_R16_OFFSET,r1; \ 136 adds r2=IA64_PT_REGS_R16_OFFSET,r1; \
128 ;; \ 137 ;; \
129 EXTRA; \ 138 EXTRA; \
diff --git a/arch/ia64/include/asm/xen/patchlist.h b/arch/ia64/include/asm/xen/patchlist.h
new file mode 100644
index 000000000000..eae944e88846
--- /dev/null
+++ b/arch/ia64/include/asm/xen/patchlist.h
@@ -0,0 +1,38 @@
1/******************************************************************************
2 * arch/ia64/include/asm/xen/patchlist.h
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#define __paravirt_start_gate_fsyscall_patchlist \
24 __xen_start_gate_fsyscall_patchlist
25#define __paravirt_end_gate_fsyscall_patchlist \
26 __xen_end_gate_fsyscall_patchlist
27#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist \
28 __xen_start_gate_brl_fsys_bubble_down_patchlist
29#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
30 __xen_end_gate_brl_fsys_bubble_down_patchlist
31#define __paravirt_start_gate_vtop_patchlist \
32 __xen_start_gate_vtop_patchlist
33#define __paravirt_end_gate_vtop_patchlist \
34 __xen_end_gate_vtop_patchlist
35#define __paravirt_start_gate_mckinley_e9_patchlist \
36 __xen_start_gate_mckinley_e9_patchlist
37#define __paravirt_end_gate_mckinley_e9_patchlist \
38 __xen_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/include/asm/xen/privop.h b/arch/ia64/include/asm/xen/privop.h
index 71ec7546e100..fb4ec5e0b066 100644
--- a/arch/ia64/include/asm/xen/privop.h
+++ b/arch/ia64/include/asm/xen/privop.h
@@ -55,6 +55,8 @@
55#define XSI_BANK1_R16 (XSI_BASE + XSI_BANK1_R16_OFS) 55#define XSI_BANK1_R16 (XSI_BASE + XSI_BANK1_R16_OFS)
56#define XSI_BANKNUM (XSI_BASE + XSI_BANKNUM_OFS) 56#define XSI_BANKNUM (XSI_BASE + XSI_BANKNUM_OFS)
57#define XSI_IHA (XSI_BASE + XSI_IHA_OFS) 57#define XSI_IHA (XSI_BASE + XSI_IHA_OFS)
58#define XSI_ITC_OFFSET (XSI_BASE + XSI_ITC_OFFSET_OFS)
59#define XSI_ITC_LAST (XSI_BASE + XSI_ITC_LAST_OFS)
58#endif 60#endif
59 61
60#ifndef __ASSEMBLY__ 62#ifndef __ASSEMBLY__
@@ -67,7 +69,7 @@
67 * may have different semantics depending on whether they are executed 69 * may have different semantics depending on whether they are executed
68 * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't 70 * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't
69 * be allowed to execute directly, lest incorrect semantics result. */ 71 * be allowed to execute directly, lest incorrect semantics result. */
70extern void xen_fc(unsigned long addr); 72extern void xen_fc(void *addr);
71extern unsigned long xen_thash(unsigned long addr); 73extern unsigned long xen_thash(unsigned long addr);
72 74
73/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag" 75/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag"
@@ -80,8 +82,10 @@ extern unsigned long xen_thash(unsigned long addr);
80extern unsigned long xen_get_cpuid(int index); 82extern unsigned long xen_get_cpuid(int index);
81extern unsigned long xen_get_pmd(int index); 83extern unsigned long xen_get_pmd(int index);
82 84
85#ifndef ASM_SUPPORTED
83extern unsigned long xen_get_eflag(void); /* see xen_ia64_getreg */ 86extern unsigned long xen_get_eflag(void); /* see xen_ia64_getreg */
84extern void xen_set_eflag(unsigned long); /* see xen_ia64_setreg */ 87extern void xen_set_eflag(unsigned long); /* see xen_ia64_setreg */
88#endif
85 89
86/************************************************/ 90/************************************************/
87/* Instructions paravirtualized for performance */ 91/* Instructions paravirtualized for performance */
@@ -106,6 +110,7 @@ extern void xen_set_eflag(unsigned long); /* see xen_ia64_setreg */
106#define xen_get_virtual_pend() \ 110#define xen_get_virtual_pend() \
107 (*(((uint8_t *)XEN_MAPPEDREGS->interrupt_mask_addr) - 1)) 111 (*(((uint8_t *)XEN_MAPPEDREGS->interrupt_mask_addr) - 1))
108 112
113#ifndef ASM_SUPPORTED
109/* Although all privileged operations can be left to trap and will 114/* Although all privileged operations can be left to trap and will
110 * be properly handled by Xen, some are frequent enough that we use 115 * be properly handled by Xen, some are frequent enough that we use
111 * hyperprivops for performance. */ 116 * hyperprivops for performance. */
@@ -123,6 +128,7 @@ extern void xen_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
123 unsigned long val4); 128 unsigned long val4);
124extern void xen_set_kr(unsigned long index, unsigned long val); 129extern void xen_set_kr(unsigned long index, unsigned long val);
125extern void xen_ptcga(unsigned long addr, unsigned long size); 130extern void xen_ptcga(unsigned long addr, unsigned long size);
131#endif /* !ASM_SUPPORTED */
126 132
127#endif /* !__ASSEMBLY__ */ 133#endif /* !__ASSEMBLY__ */
128 134
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index c381ea954892..6b7edcab0cb5 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -2,12 +2,16 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5ifdef CONFIG_DYNAMIC_FTRACE
6CFLAGS_REMOVE_ftrace.o = -pg
7endif
8
5extra-y := head.o init_task.o vmlinux.lds 9extra-y := head.o init_task.o vmlinux.lds
6 10
7obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ 11obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
8 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \ 12 irq_lsapic.o ivt.o machvec.o pal.o paravirt_patchlist.o patch.o process.o perfmon.o ptrace.o sal.o \
9 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \ 13 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
10 unwind.o mca.o mca_asm.o topology.o 14 unwind.o mca.o mca_asm.o topology.o dma-mapping.o
11 15
12obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o 16obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
13obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o 17obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
@@ -28,6 +32,7 @@ obj-$(CONFIG_IA64_CYCLONE) += cyclone.o
28obj-$(CONFIG_CPU_FREQ) += cpufreq/ 32obj-$(CONFIG_CPU_FREQ) += cpufreq/
29obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o 33obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
30obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o 34obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
35obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
31obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o 36obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
32obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 37obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
33obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o 38obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
@@ -36,46 +41,23 @@ obj-$(CONFIG_PCI_MSI) += msi_ia64.o
36mca_recovery-y += mca_drv.o mca_drv_asm.o 41mca_recovery-y += mca_drv.o mca_drv_asm.o
37obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o 42obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o
38 43
39obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o 44obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o \
45 paravirt_patch.o
40 46
41obj-$(CONFIG_IA64_ESI) += esi.o 47obj-$(CONFIG_IA64_ESI) += esi.o
42ifneq ($(CONFIG_IA64_ESI),) 48ifneq ($(CONFIG_IA64_ESI),)
43obj-y += esi_stub.o # must be in kernel proper 49obj-y += esi_stub.o # must be in kernel proper
44endif 50endif
45obj-$(CONFIG_DMAR) += pci-dma.o 51obj-$(CONFIG_DMAR) += pci-dma.o
46ifeq ($(CONFIG_DMAR), y)
47obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o 52obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o
48endif
49
50# The gate DSO image is built using a special linker script.
51targets += gate.so gate-syms.o
52
53extra-y += gate.so gate-syms.o gate.lds gate.o
54 53
55# fp_emulate() expects f2-f5,f16-f31 to contain the user-level state. 54# fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
56CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 55CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
57 56
58CPPFLAGS_gate.lds := -P -C -U$(ARCH) 57# The gate DSO image is built using a special linker script.
59 58include $(srctree)/arch/ia64/kernel/Makefile.gate
60quiet_cmd_gate = GATE $@ 59# tell compiled for native
61 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ 60CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_NATIVE
62
63GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
64 $(call ld-option, -Wl$(comma)--hash-style=sysv)
65$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
66 $(call if_changed,gate)
67
68$(obj)/built-in.o: $(obj)/gate-syms.o
69$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
70
71GATECFLAGS_gate-syms.o = -r
72$(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE
73 $(call if_changed,gate)
74
75# gate-data.o contains the gate DSO image as data in section .data.gate.
76# We must build gate.so before we can assemble it.
77# Note: kbuild does not track this dependency due to usage of .incbin
78$(obj)/gate-data.o: $(obj)/gate.so
79 61
80# Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config 62# Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config
81define sed-y 63define sed-y
@@ -111,9 +93,9 @@ include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
111clean-files += $(objtree)/include/asm-ia64/nr-irqs.h 93clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
112 94
113# 95#
114# native ivt.S and entry.S 96# native ivt.S, entry.S and fsys.S
115# 97#
116ASM_PARAVIRT_OBJS = ivt.o entry.o 98ASM_PARAVIRT_OBJS = ivt.o entry.o fsys.o
117define paravirtualized_native 99define paravirtualized_native
118AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE 100AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
119AFLAGS_pvchk-sed-$(1) += -D__IA64_ASM_PARAVIRTUALIZED_PVCHECK 101AFLAGS_pvchk-sed-$(1) += -D__IA64_ASM_PARAVIRTUALIZED_PVCHECK
diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate
new file mode 100644
index 000000000000..1d87f84069b3
--- /dev/null
+++ b/arch/ia64/kernel/Makefile.gate
@@ -0,0 +1,27 @@
1# The gate DSO image is built using a special linker script.
2
3targets += gate.so gate-syms.o
4
5extra-y += gate.so gate-syms.o gate.lds gate.o
6
7CPPFLAGS_gate.lds := -P -C -U$(ARCH)
8
9quiet_cmd_gate = GATE $@
10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
11
12GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
13 $(call ld-option, -Wl$(comma)--hash-style=sysv)
14$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
15 $(call if_changed,gate)
16
17$(obj)/built-in.o: $(obj)/gate-syms.o
18$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
19
20GATECFLAGS_gate-syms.o = -r
21$(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE
22 $(call if_changed,gate)
23
24# gate-data.o contains the gate DSO image as data in section .data.gate.
25# We must build gate.so before we can assemble it.
26# Note: kbuild does not track this dependency due to usage of .incbin
27$(obj)/gate-data.o: $(obj)/gate.so
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index bdef2ce38c8b..5510317db37b 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -890,7 +890,7 @@ __init void prefill_possible_map(void)
890 possible, max((possible - available_cpus), 0)); 890 possible, max((possible - available_cpus), 0));
891 891
892 for (i = 0; i < possible; i++) 892 for (i = 0; i < possible; i++)
893 cpu_set(i, cpu_possible_map); 893 set_cpu_possible(i, true);
894} 894}
895 895
896int acpi_map_lsapic(acpi_handle handle, int *pcpu) 896int acpi_map_lsapic(acpi_handle handle, int *pcpu)
@@ -928,9 +928,9 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
928 buffer.length = ACPI_ALLOCATE_BUFFER; 928 buffer.length = ACPI_ALLOCATE_BUFFER;
929 buffer.pointer = NULL; 929 buffer.pointer = NULL;
930 930
931 cpus_complement(tmp_map, cpu_present_map); 931 cpumask_complement(&tmp_map, cpu_present_mask);
932 cpu = first_cpu(tmp_map); 932 cpu = cpumask_first(&tmp_map);
933 if (cpu >= NR_CPUS) 933 if (cpu >= nr_cpu_ids)
934 return -EINVAL; 934 return -EINVAL;
935 935
936 acpi_map_cpu2node(handle, cpu, physid); 936 acpi_map_cpu2node(handle, cpu, physid);
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 742dbb1d5a4f..af5650169043 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -316,5 +316,7 @@ void foo(void)
316 DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]); 316 DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]);
317 DEFINE_MAPPED_REG_OFS(XSI_B0NATS_OFS, vbnat); 317 DEFINE_MAPPED_REG_OFS(XSI_B0NATS_OFS, vbnat);
318 DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat); 318 DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat);
319 DEFINE_MAPPED_REG_OFS(XSI_ITC_OFFSET_OFS, itc_offset);
320 DEFINE_MAPPED_REG_OFS(XSI_ITC_LAST_OFS, itc_last);
319#endif /* CONFIG_XEN */ 321#endif /* CONFIG_XEN */
320} 322}
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
new file mode 100644
index 000000000000..086a2aeb0404
--- /dev/null
+++ b/arch/ia64/kernel/dma-mapping.c
@@ -0,0 +1,13 @@
1#include <linux/dma-mapping.h>
2
3/* Set this to 1 if there is a HW IOMMU in the system */
4int iommu_detected __read_mostly;
5
6struct dma_map_ops *dma_ops;
7EXPORT_SYMBOL(dma_ops);
8
9struct dma_map_ops *dma_get_ops(struct device *dev)
10{
11 return dma_ops;
12}
13EXPORT_SYMBOL(dma_get_ops);
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index efaff15d8cf1..7ef80e8161ce 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -456,6 +456,7 @@ efi_map_pal_code (void)
456 GRANULEROUNDDOWN((unsigned long) pal_vaddr), 456 GRANULEROUNDDOWN((unsigned long) pal_vaddr),
457 pte_val(pfn_pte(__pa(pal_vaddr) >> PAGE_SHIFT, PAGE_KERNEL)), 457 pte_val(pfn_pte(__pa(pal_vaddr) >> PAGE_SHIFT, PAGE_KERNEL)),
458 IA64_GRANULE_SHIFT); 458 IA64_GRANULE_SHIFT);
459 paravirt_dv_serialize_data();
459 ia64_set_psr(psr); /* restore psr */ 460 ia64_set_psr(psr); /* restore psr */
460} 461}
461 462
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index e5341e2c1175..8dc69669586a 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -47,6 +47,7 @@
47#include <asm/processor.h> 47#include <asm/processor.h>
48#include <asm/thread_info.h> 48#include <asm/thread_info.h>
49#include <asm/unistd.h> 49#include <asm/unistd.h>
50#include <asm/ftrace.h>
50 51
51#include "minstate.h" 52#include "minstate.h"
52 53
@@ -735,7 +736,7 @@ GLOBAL_ENTRY(__paravirt_leave_syscall)
735__paravirt_work_processed_syscall: 736__paravirt_work_processed_syscall:
736#ifdef CONFIG_VIRT_CPU_ACCOUNTING 737#ifdef CONFIG_VIRT_CPU_ACCOUNTING
737 adds r2=PT(LOADRS)+16,r12 738 adds r2=PT(LOADRS)+16,r12
738(pUStk) mov.m r22=ar.itc // fetch time at leave 739 MOV_FROM_ITC(pUStk, p9, r22, r19) // fetch time at leave
739 adds r18=TI_FLAGS+IA64_TASK_SIZE,r13 740 adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
740 ;; 741 ;;
741(p6) ld4 r31=[r18] // load current_thread_info()->flags 742(p6) ld4 r31=[r18] // load current_thread_info()->flags
@@ -984,7 +985,7 @@ GLOBAL_ENTRY(__paravirt_leave_kernel)
984#ifdef CONFIG_VIRT_CPU_ACCOUNTING 985#ifdef CONFIG_VIRT_CPU_ACCOUNTING
985 .pred.rel.mutex pUStk,pKStk 986 .pred.rel.mutex pUStk,pKStk
986 MOV_FROM_PSR(pKStk, r22, r29) // M2 read PSR now that interrupts are disabled 987 MOV_FROM_PSR(pKStk, r22, r29) // M2 read PSR now that interrupts are disabled
987(pUStk) mov.m r22=ar.itc // M fetch time at leave 988 MOV_FROM_ITC(pUStk, p9, r22, r29) // M fetch time at leave
988 nop.i 0 989 nop.i 0
989 ;; 990 ;;
990#else 991#else
@@ -1404,6 +1405,105 @@ GLOBAL_ENTRY(unw_init_running)
1404 br.ret.sptk.many rp 1405 br.ret.sptk.many rp
1405END(unw_init_running) 1406END(unw_init_running)
1406 1407
1408#ifdef CONFIG_FUNCTION_TRACER
1409#ifdef CONFIG_DYNAMIC_FTRACE
1410GLOBAL_ENTRY(_mcount)
1411 br ftrace_stub
1412END(_mcount)
1413
1414.here:
1415 br.ret.sptk.many b0
1416
1417GLOBAL_ENTRY(ftrace_caller)
1418 alloc out0 = ar.pfs, 8, 0, 4, 0
1419 mov out3 = r0
1420 ;;
1421 mov out2 = b0
1422 add r3 = 0x20, r3
1423 mov out1 = r1;
1424 br.call.sptk.many b0 = ftrace_patch_gp
1425 //this might be called from module, so we must patch gp
1426ftrace_patch_gp:
1427 movl gp=__gp
1428 mov b0 = r3
1429 ;;
1430.global ftrace_call;
1431ftrace_call:
1432{
1433 .mlx
1434 nop.m 0x0
1435 movl r3 = .here;;
1436}
1437 alloc loc0 = ar.pfs, 4, 4, 2, 0
1438 ;;
1439 mov loc1 = b0
1440 mov out0 = b0
1441 mov loc2 = r8
1442 mov loc3 = r15
1443 ;;
1444 adds out0 = -MCOUNT_INSN_SIZE, out0
1445 mov out1 = in2
1446 mov b6 = r3
1447
1448 br.call.sptk.many b0 = b6
1449 ;;
1450 mov ar.pfs = loc0
1451 mov b0 = loc1
1452 mov r8 = loc2
1453 mov r15 = loc3
1454 br ftrace_stub
1455 ;;
1456END(ftrace_caller)
1457
1458#else
1459GLOBAL_ENTRY(_mcount)
1460 movl r2 = ftrace_stub
1461 movl r3 = ftrace_trace_function;;
1462 ld8 r3 = [r3];;
1463 ld8 r3 = [r3];;
1464 cmp.eq p7,p0 = r2, r3
1465(p7) br.sptk.many ftrace_stub
1466 ;;
1467
1468 alloc loc0 = ar.pfs, 4, 4, 2, 0
1469 ;;
1470 mov loc1 = b0
1471 mov out0 = b0
1472 mov loc2 = r8
1473 mov loc3 = r15
1474 ;;
1475 adds out0 = -MCOUNT_INSN_SIZE, out0
1476 mov out1 = in2
1477 mov b6 = r3
1478
1479 br.call.sptk.many b0 = b6
1480 ;;
1481 mov ar.pfs = loc0
1482 mov b0 = loc1
1483 mov r8 = loc2
1484 mov r15 = loc3
1485 br ftrace_stub
1486 ;;
1487END(_mcount)
1488#endif
1489
1490GLOBAL_ENTRY(ftrace_stub)
1491 mov r3 = b0
1492 movl r2 = _mcount_ret_helper
1493 ;;
1494 mov b6 = r2
1495 mov b7 = r3
1496 br.ret.sptk.many b6
1497
1498_mcount_ret_helper:
1499 mov b0 = r42
1500 mov r1 = r41
1501 mov ar.pfs = r40
1502 br b7
1503END(ftrace_stub)
1504
1505#endif /* CONFIG_FUNCTION_TRACER */
1506
1407 .rodata 1507 .rodata
1408 .align 8 1508 .align 8
1409 .globl sys_call_table 1509 .globl sys_call_table
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index c1625c7e1779..3567d54f8cee 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -25,6 +25,7 @@
25#include <asm/unistd.h> 25#include <asm/unistd.h>
26 26
27#include "entry.h" 27#include "entry.h"
28#include "paravirt_inst.h"
28 29
29/* 30/*
30 * See Documentation/ia64/fsys.txt for details on fsyscalls. 31 * See Documentation/ia64/fsys.txt for details on fsyscalls.
@@ -279,7 +280,7 @@ ENTRY(fsys_gettimeofday)
279(p9) cmp.eq p13,p0 = 0,r30 // if mmio_ptr, clear p13 jitter control 280(p9) cmp.eq p13,p0 = 0,r30 // if mmio_ptr, clear p13 jitter control
280 ;; 281 ;;
281 .pred.rel.mutex p8,p9 282 .pred.rel.mutex p8,p9
282(p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!! 283 MOV_FROM_ITC(p8, p6, r2, r10) // CPU_TIMER. 36 clocks latency!!!
283(p9) ld8 r2 = [r30] // MMIO_TIMER. Could also have latency issues.. 284(p9) ld8 r2 = [r30] // MMIO_TIMER. Could also have latency issues..
284(p13) ld8 r25 = [r19] // get itc_lastcycle value 285(p13) ld8 r25 = [r19] // get itc_lastcycle value
285 ld8 r9 = [r22],IA64_TIMESPEC_TV_NSEC_OFFSET // tv_sec 286 ld8 r9 = [r22],IA64_TIMESPEC_TV_NSEC_OFFSET // tv_sec
@@ -418,7 +419,7 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
418 mov r17=(1 << (SIGKILL - 1)) | (1 << (SIGSTOP - 1)) 419 mov r17=(1 << (SIGKILL - 1)) | (1 << (SIGSTOP - 1))
419 ;; 420 ;;
420 421
421 rsm psr.i // mask interrupt delivery 422 RSM_PSR_I(p0, r18, r19) // mask interrupt delivery
422 mov ar.ccv=0 423 mov ar.ccv=0
423 andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP 424 andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP
424 425
@@ -491,7 +492,7 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
491#ifdef CONFIG_SMP 492#ifdef CONFIG_SMP
492 st4.rel [r31]=r0 // release the lock 493 st4.rel [r31]=r0 // release the lock
493#endif 494#endif
494 ssm psr.i 495 SSM_PSR_I(p0, p9, r31)
495 ;; 496 ;;
496 497
497 srlz.d // ensure psr.i is set again 498 srlz.d // ensure psr.i is set again
@@ -513,7 +514,7 @@ EX(.fail_efault, (p15) st8 [r34]=r3)
513#ifdef CONFIG_SMP 514#ifdef CONFIG_SMP
514 st4.rel [r31]=r0 // release the lock 515 st4.rel [r31]=r0 // release the lock
515#endif 516#endif
516 ssm psr.i 517 SSM_PSR_I(p0, p9, r17)
517 ;; 518 ;;
518 srlz.d 519 srlz.d
519 br.sptk.many fsys_fallback_syscall // with signal pending, do the heavy-weight syscall 520 br.sptk.many fsys_fallback_syscall // with signal pending, do the heavy-weight syscall
@@ -521,7 +522,7 @@ EX(.fail_efault, (p15) st8 [r34]=r3)
521#ifdef CONFIG_SMP 522#ifdef CONFIG_SMP
522.lock_contention: 523.lock_contention:
523 /* Rather than spinning here, fall back on doing a heavy-weight syscall. */ 524 /* Rather than spinning here, fall back on doing a heavy-weight syscall. */
524 ssm psr.i 525 SSM_PSR_I(p0, p9, r17)
525 ;; 526 ;;
526 srlz.d 527 srlz.d
527 br.sptk.many fsys_fallback_syscall 528 br.sptk.many fsys_fallback_syscall
@@ -592,17 +593,17 @@ ENTRY(fsys_fallback_syscall)
592 adds r17=-1024,r15 593 adds r17=-1024,r15
593 movl r14=sys_call_table 594 movl r14=sys_call_table
594 ;; 595 ;;
595 rsm psr.i 596 RSM_PSR_I(p0, r26, r27)
596 shladd r18=r17,3,r14 597 shladd r18=r17,3,r14
597 ;; 598 ;;
598 ld8 r18=[r18] // load normal (heavy-weight) syscall entry-point 599 ld8 r18=[r18] // load normal (heavy-weight) syscall entry-point
599 mov r29=psr // read psr (12 cyc load latency) 600 MOV_FROM_PSR(p0, r29, r26) // read psr (12 cyc load latency)
600 mov r27=ar.rsc 601 mov r27=ar.rsc
601 mov r21=ar.fpsr 602 mov r21=ar.fpsr
602 mov r26=ar.pfs 603 mov r26=ar.pfs
603END(fsys_fallback_syscall) 604END(fsys_fallback_syscall)
604 /* FALL THROUGH */ 605 /* FALL THROUGH */
605GLOBAL_ENTRY(fsys_bubble_down) 606GLOBAL_ENTRY(paravirt_fsys_bubble_down)
606 .prologue 607 .prologue
607 .altrp b6 608 .altrp b6
608 .body 609 .body
@@ -640,7 +641,7 @@ GLOBAL_ENTRY(fsys_bubble_down)
640 * 641 *
641 * PSR.BE : already is turned off in __kernel_syscall_via_epc() 642 * PSR.BE : already is turned off in __kernel_syscall_via_epc()
642 * PSR.AC : don't care (kernel normally turns PSR.AC on) 643 * PSR.AC : don't care (kernel normally turns PSR.AC on)
643 * PSR.I : already turned off by the time fsys_bubble_down gets 644 * PSR.I : already turned off by the time paravirt_fsys_bubble_down gets
644 * invoked 645 * invoked
645 * PSR.DFL: always 0 (kernel never turns it on) 646 * PSR.DFL: always 0 (kernel never turns it on)
646 * PSR.DFH: don't care --- kernel never touches f32-f127 on its own 647 * PSR.DFH: don't care --- kernel never touches f32-f127 on its own
@@ -650,7 +651,7 @@ GLOBAL_ENTRY(fsys_bubble_down)
650 * PSR.DB : don't care --- kernel never enables kernel-level 651 * PSR.DB : don't care --- kernel never enables kernel-level
651 * breakpoints 652 * breakpoints
652 * PSR.TB : must be 0 already; if it wasn't zero on entry to 653 * PSR.TB : must be 0 already; if it wasn't zero on entry to
653 * __kernel_syscall_via_epc, the branch to fsys_bubble_down 654 * __kernel_syscall_via_epc, the branch to paravirt_fsys_bubble_down
654 * will trigger a taken branch; the taken-trap-handler then 655 * will trigger a taken branch; the taken-trap-handler then
655 * converts the syscall into a break-based system-call. 656 * converts the syscall into a break-based system-call.
656 */ 657 */
@@ -683,7 +684,7 @@ GLOBAL_ENTRY(fsys_bubble_down)
683 ;; 684 ;;
684 mov ar.rsc=0 // M2 set enforced lazy mode, pl 0, LE, loadrs=0 685 mov ar.rsc=0 // M2 set enforced lazy mode, pl 0, LE, loadrs=0
685#ifdef CONFIG_VIRT_CPU_ACCOUNTING 686#ifdef CONFIG_VIRT_CPU_ACCOUNTING
686 mov.m r30=ar.itc // M get cycle for accounting 687 MOV_FROM_ITC(p0, p6, r30, r23) // M get cycle for accounting
687#else 688#else
688 nop.m 0 689 nop.m 0
689#endif 690#endif
@@ -734,21 +735,21 @@ GLOBAL_ENTRY(fsys_bubble_down)
734 mov rp=r14 // I0 set the real return addr 735 mov rp=r14 // I0 set the real return addr
735 and r3=_TIF_SYSCALL_TRACEAUDIT,r3 // A 736 and r3=_TIF_SYSCALL_TRACEAUDIT,r3 // A
736 ;; 737 ;;
737 ssm psr.i // M2 we're on kernel stacks now, reenable irqs 738 SSM_PSR_I(p0, p6, r22) // M2 we're on kernel stacks now, reenable irqs
738 cmp.eq p8,p0=r3,r0 // A 739 cmp.eq p8,p0=r3,r0 // A
739(p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT 740(p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT
740 741
741 nop.m 0 742 nop.m 0
742(p8) br.call.sptk.many b6=b6 // B (ignore return address) 743(p8) br.call.sptk.many b6=b6 // B (ignore return address)
743 br.cond.spnt ia64_trace_syscall // B 744 br.cond.spnt ia64_trace_syscall // B
744END(fsys_bubble_down) 745END(paravirt_fsys_bubble_down)
745 746
746 .rodata 747 .rodata
747 .align 8 748 .align 8
748 .globl fsyscall_table 749 .globl paravirt_fsyscall_table
749 750
750 data8 fsys_bubble_down 751 data8 paravirt_fsys_bubble_down
751fsyscall_table: 752paravirt_fsyscall_table:
752 data8 fsys_ni_syscall 753 data8 fsys_ni_syscall
753 data8 0 // exit // 1025 754 data8 0 // exit // 1025
754 data8 0 // read 755 data8 0 // read
@@ -1033,4 +1034,4 @@ fsyscall_table:
1033 1034
1034 // fill in zeros for the remaining entries 1035 // fill in zeros for the remaining entries
1035 .zero: 1036 .zero:
1036 .space fsyscall_table + 8*NR_syscalls - .zero, 0 1037 .space paravirt_fsyscall_table + 8*NR_syscalls - .zero, 0
diff --git a/arch/ia64/kernel/ftrace.c b/arch/ia64/kernel/ftrace.c
new file mode 100644
index 000000000000..7fc8c961b1f7
--- /dev/null
+++ b/arch/ia64/kernel/ftrace.c
@@ -0,0 +1,206 @@
1/*
2 * Dynamic function tracing support.
3 *
4 * Copyright (C) 2008 Shaohua Li <shaohua.li@intel.com>
5 *
6 * For licencing details, see COPYING.
7 *
8 * Defines low-level handling of mcount calls when the kernel
9 * is compiled with the -pg flag. When using dynamic ftrace, the
10 * mcount call-sites get patched lazily with NOP till they are
11 * enabled. All code mutation routines here take effect atomically.
12 */
13
14#include <linux/uaccess.h>
15#include <linux/ftrace.h>
16
17#include <asm/cacheflush.h>
18#include <asm/patch.h>
19
20/* In IA64, each function will be added below two bundles with -pg option */
21static unsigned char __attribute__((aligned(8)))
22ftrace_orig_code[MCOUNT_INSN_SIZE] = {
23 0x02, 0x40, 0x31, 0x10, 0x80, 0x05, /* alloc r40=ar.pfs,12,8,0 */
24 0xb0, 0x02, 0x00, 0x00, 0x42, 0x40, /* mov r43=r0;; */
25 0x05, 0x00, 0xc4, 0x00, /* mov r42=b0 */
26 0x11, 0x48, 0x01, 0x02, 0x00, 0x21, /* mov r41=r1 */
27 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* nop.i 0x0 */
28 0x08, 0x00, 0x00, 0x50 /* br.call.sptk.many b0 = _mcount;; */
29};
30
31struct ftrace_orig_insn {
32 u64 dummy1, dummy2, dummy3;
33 u64 dummy4:64-41+13;
34 u64 imm20:20;
35 u64 dummy5:3;
36 u64 sign:1;
37 u64 dummy6:4;
38};
39
40/* mcount stub will be converted below for nop */
41static unsigned char ftrace_nop_code[MCOUNT_INSN_SIZE] = {
42 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MII] nop.m 0x0 */
43 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, /* mov r3=ip */
44 0x00, 0x00, 0x04, 0x00, /* nop.i 0x0 */
45 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0x0 */
46 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* nop.x 0x0;; */
47 0x00, 0x00, 0x04, 0x00
48};
49
50static unsigned char *ftrace_nop_replace(void)
51{
52 return ftrace_nop_code;
53}
54
55/*
56 * mcount stub will be converted below for call
57 * Note: Just the last instruction is changed against nop
58 * */
59static unsigned char __attribute__((aligned(8)))
60ftrace_call_code[MCOUNT_INSN_SIZE] = {
61 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MII] nop.m 0x0 */
62 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, /* mov r3=ip */
63 0x00, 0x00, 0x04, 0x00, /* nop.i 0x0 */
64 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0x0 */
65 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, /* brl.many .;;*/
66 0xf8, 0xff, 0xff, 0xc8
67};
68
69struct ftrace_call_insn {
70 u64 dummy1, dummy2;
71 u64 dummy3:48;
72 u64 imm39_l:16;
73 u64 imm39_h:23;
74 u64 dummy4:13;
75 u64 imm20:20;
76 u64 dummy5:3;
77 u64 i:1;
78 u64 dummy6:4;
79};
80
81static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
82{
83 struct ftrace_call_insn *code = (void *)ftrace_call_code;
84 unsigned long offset = addr - (ip + 0x10);
85
86 code->imm39_l = offset >> 24;
87 code->imm39_h = offset >> 40;
88 code->imm20 = offset >> 4;
89 code->i = offset >> 63;
90 return ftrace_call_code;
91}
92
93static int
94ftrace_modify_code(unsigned long ip, unsigned char *old_code,
95 unsigned char *new_code, int do_check)
96{
97 unsigned char replaced[MCOUNT_INSN_SIZE];
98
99 /*
100 * Note: Due to modules and __init, code can
101 * disappear and change, we need to protect against faulting
102 * as well as code changing. We do this by using the
103 * probe_kernel_* functions.
104 *
105 * No real locking needed, this code is run through
106 * kstop_machine, or before SMP starts.
107 */
108
109 if (!do_check)
110 goto skip_check;
111
112 /* read the text we want to modify */
113 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE))
114 return -EFAULT;
115
116 /* Make sure it is what we expect it to be */
117 if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0)
118 return -EINVAL;
119
120skip_check:
121 /* replace the text with the new text */
122 if (probe_kernel_write(((void *)ip), new_code, MCOUNT_INSN_SIZE))
123 return -EPERM;
124 flush_icache_range(ip, ip + MCOUNT_INSN_SIZE);
125
126 return 0;
127}
128
129static int ftrace_make_nop_check(struct dyn_ftrace *rec, unsigned long addr)
130{
131 unsigned char __attribute__((aligned(8))) replaced[MCOUNT_INSN_SIZE];
132 unsigned long ip = rec->ip;
133
134 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE))
135 return -EFAULT;
136 if (rec->flags & FTRACE_FL_CONVERTED) {
137 struct ftrace_call_insn *call_insn, *tmp_call;
138
139 call_insn = (void *)ftrace_call_code;
140 tmp_call = (void *)replaced;
141 call_insn->imm39_l = tmp_call->imm39_l;
142 call_insn->imm39_h = tmp_call->imm39_h;
143 call_insn->imm20 = tmp_call->imm20;
144 call_insn->i = tmp_call->i;
145 if (memcmp(replaced, ftrace_call_code, MCOUNT_INSN_SIZE) != 0)
146 return -EINVAL;
147 return 0;
148 } else {
149 struct ftrace_orig_insn *call_insn, *tmp_call;
150
151 call_insn = (void *)ftrace_orig_code;
152 tmp_call = (void *)replaced;
153 call_insn->sign = tmp_call->sign;
154 call_insn->imm20 = tmp_call->imm20;
155 if (memcmp(replaced, ftrace_orig_code, MCOUNT_INSN_SIZE) != 0)
156 return -EINVAL;
157 return 0;
158 }
159}
160
161int ftrace_make_nop(struct module *mod,
162 struct dyn_ftrace *rec, unsigned long addr)
163{
164 int ret;
165 char *new;
166
167 ret = ftrace_make_nop_check(rec, addr);
168 if (ret)
169 return ret;
170 new = ftrace_nop_replace();
171 return ftrace_modify_code(rec->ip, NULL, new, 0);
172}
173
174int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
175{
176 unsigned long ip = rec->ip;
177 unsigned char *old, *new;
178
179 old= ftrace_nop_replace();
180 new = ftrace_call_replace(ip, addr);
181 return ftrace_modify_code(ip, old, new, 1);
182}
183
184/* in IA64, _mcount can't directly call ftrace_stub. Only jump is ok */
185int ftrace_update_ftrace_func(ftrace_func_t func)
186{
187 unsigned long ip;
188 unsigned long addr = ((struct fnptr *)ftrace_call)->ip;
189
190 if (func == ftrace_stub)
191 return 0;
192 ip = ((struct fnptr *)func)->ip;
193
194 ia64_patch_imm64(addr + 2, ip);
195
196 flush_icache_range(addr, addr + 16);
197 return 0;
198}
199
200/* run from kstop_machine */
201int __init ftrace_dyn_arch_init(void *data)
202{
203 *(unsigned long *)data = 0;
204
205 return 0;
206}
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S
index 74b1ccce4e84..cf5e0a105e16 100644
--- a/arch/ia64/kernel/gate.S
+++ b/arch/ia64/kernel/gate.S
@@ -13,6 +13,7 @@
13#include <asm/sigcontext.h> 13#include <asm/sigcontext.h>
14#include <asm/system.h> 14#include <asm/system.h>
15#include <asm/unistd.h> 15#include <asm/unistd.h>
16#include "paravirt_inst.h"
16 17
17/* 18/*
18 * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, 19 * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation,
@@ -48,87 +49,6 @@ GLOBAL_ENTRY(__kernel_syscall_via_break)
48} 49}
49END(__kernel_syscall_via_break) 50END(__kernel_syscall_via_break)
50 51
51/*
52 * On entry:
53 * r11 = saved ar.pfs
54 * r15 = system call #
55 * b0 = saved return address
56 * b6 = return address
57 * On exit:
58 * r11 = saved ar.pfs
59 * r15 = system call #
60 * b0 = saved return address
61 * all other "scratch" registers: undefined
62 * all "preserved" registers: same as on entry
63 */
64
65GLOBAL_ENTRY(__kernel_syscall_via_epc)
66 .prologue
67 .altrp b6
68 .body
69{
70 /*
71 * Note: the kernel cannot assume that the first two instructions in this
72 * bundle get executed. The remaining code must be safe even if
73 * they do not get executed.
74 */
75 adds r17=-1024,r15 // A
76 mov r10=0 // A default to successful syscall execution
77 epc // B causes split-issue
78}
79 ;;
80 rsm psr.be | psr.i // M2 (5 cyc to srlz.d)
81 LOAD_FSYSCALL_TABLE(r14) // X
82 ;;
83 mov r16=IA64_KR(CURRENT) // M2 (12 cyc)
84 shladd r18=r17,3,r14 // A
85 mov r19=NR_syscalls-1 // A
86 ;;
87 lfetch [r18] // M0|1
88 mov r29=psr // M2 (12 cyc)
89 // If r17 is a NaT, p6 will be zero
90 cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)?
91 ;;
92 mov r21=ar.fpsr // M2 (12 cyc)
93 tnat.nz p10,p9=r15 // I0
94 mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...)
95 ;;
96 srlz.d // M0 (forces split-issue) ensure PSR.BE==0
97(p6) ld8 r18=[r18] // M0|1
98 nop.i 0
99 ;;
100 nop.m 0
101(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!)
102 nop.i 0
103 ;;
104(p8) ssm psr.i
105(p6) mov b7=r18 // I0
106(p8) br.dptk.many b7 // B
107
108 mov r27=ar.rsc // M2 (12 cyc)
109/*
110 * brl.cond doesn't work as intended because the linker would convert this branch
111 * into a branch to a PLT. Perhaps there will be a way to avoid this with some
112 * future version of the linker. In the meantime, we just use an indirect branch
113 * instead.
114 */
115#ifdef CONFIG_ITANIUM
116(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry
117 ;;
118(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down
119 ;;
120(p6) mov b7=r14
121(p6) br.sptk.many b7
122#else
123 BRL_COND_FSYS_BUBBLE_DOWN(p6)
124#endif
125 ssm psr.i
126 mov r10=-1
127(p10) mov r8=EINVAL
128(p9) mov r8=ENOSYS
129 FSYS_RETURN
130END(__kernel_syscall_via_epc)
131
132# define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET) 52# define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET)
133# define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET) 53# define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET)
134# define ARG2_OFF (16 + IA64_SIGFRAME_ARG2_OFFSET) 54# define ARG2_OFF (16 + IA64_SIGFRAME_ARG2_OFFSET)
@@ -374,3 +294,92 @@ restore_rbs:
374 // invala not necessary as that will happen when returning to user-mode 294 // invala not necessary as that will happen when returning to user-mode
375 br.cond.sptk back_from_restore_rbs 295 br.cond.sptk back_from_restore_rbs
376END(__kernel_sigtramp) 296END(__kernel_sigtramp)
297
298/*
299 * On entry:
300 * r11 = saved ar.pfs
301 * r15 = system call #
302 * b0 = saved return address
303 * b6 = return address
304 * On exit:
305 * r11 = saved ar.pfs
306 * r15 = system call #
307 * b0 = saved return address
308 * all other "scratch" registers: undefined
309 * all "preserved" registers: same as on entry
310 */
311
312GLOBAL_ENTRY(__kernel_syscall_via_epc)
313 .prologue
314 .altrp b6
315 .body
316{
317 /*
318 * Note: the kernel cannot assume that the first two instructions in this
319 * bundle get executed. The remaining code must be safe even if
320 * they do not get executed.
321 */
322 adds r17=-1024,r15 // A
323 mov r10=0 // A default to successful syscall execution
324 epc // B causes split-issue
325}
326 ;;
327 RSM_PSR_BE_I(r20, r22) // M2 (5 cyc to srlz.d)
328 LOAD_FSYSCALL_TABLE(r14) // X
329 ;;
330 mov r16=IA64_KR(CURRENT) // M2 (12 cyc)
331 shladd r18=r17,3,r14 // A
332 mov r19=NR_syscalls-1 // A
333 ;;
334 lfetch [r18] // M0|1
335 MOV_FROM_PSR(p0, r29, r8) // M2 (12 cyc)
336 // If r17 is a NaT, p6 will be zero
337 cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)?
338 ;;
339 mov r21=ar.fpsr // M2 (12 cyc)
340 tnat.nz p10,p9=r15 // I0
341 mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...)
342 ;;
343 srlz.d // M0 (forces split-issue) ensure PSR.BE==0
344(p6) ld8 r18=[r18] // M0|1
345 nop.i 0
346 ;;
347 nop.m 0
348(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!)
349 nop.i 0
350 ;;
351 SSM_PSR_I(p8, p14, r25)
352(p6) mov b7=r18 // I0
353(p8) br.dptk.many b7 // B
354
355 mov r27=ar.rsc // M2 (12 cyc)
356/*
357 * brl.cond doesn't work as intended because the linker would convert this branch
358 * into a branch to a PLT. Perhaps there will be a way to avoid this with some
359 * future version of the linker. In the meantime, we just use an indirect branch
360 * instead.
361 */
362#ifdef CONFIG_ITANIUM
363(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry
364 ;;
365(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down
366 ;;
367(p6) mov b7=r14
368(p6) br.sptk.many b7
369#else
370 BRL_COND_FSYS_BUBBLE_DOWN(p6)
371#endif
372 SSM_PSR_I(p0, p14, r10)
373 mov r10=-1
374(p10) mov r8=EINVAL
375(p9) mov r8=ENOSYS
376 FSYS_RETURN
377
378#ifdef CONFIG_PARAVIRT
379 /*
380 * padd to make the size of this symbol constant
381 * independent of paravirtualization.
382 */
383 .align PAGE_SIZE / 8
384#endif
385END(__kernel_syscall_via_epc)
diff --git a/arch/ia64/kernel/gate.lds.S b/arch/ia64/kernel/gate.lds.S
index 3cb1abc00e24..88c64ed47c36 100644
--- a/arch/ia64/kernel/gate.lds.S
+++ b/arch/ia64/kernel/gate.lds.S
@@ -7,6 +7,7 @@
7 7
8 8
9#include <asm/system.h> 9#include <asm/system.h>
10#include "paravirt_patchlist.h"
10 11
11SECTIONS 12SECTIONS
12{ 13{
@@ -33,21 +34,21 @@ SECTIONS
33 . = GATE_ADDR + 0x600; 34 . = GATE_ADDR + 0x600;
34 35
35 .data.patch : { 36 .data.patch : {
36 __start_gate_mckinley_e9_patchlist = .; 37 __paravirt_start_gate_mckinley_e9_patchlist = .;
37 *(.data.patch.mckinley_e9) 38 *(.data.patch.mckinley_e9)
38 __end_gate_mckinley_e9_patchlist = .; 39 __paravirt_end_gate_mckinley_e9_patchlist = .;
39 40
40 __start_gate_vtop_patchlist = .; 41 __paravirt_start_gate_vtop_patchlist = .;
41 *(.data.patch.vtop) 42 *(.data.patch.vtop)
42 __end_gate_vtop_patchlist = .; 43 __paravirt_end_gate_vtop_patchlist = .;
43 44
44 __start_gate_fsyscall_patchlist = .; 45 __paravirt_start_gate_fsyscall_patchlist = .;
45 *(.data.patch.fsyscall_table) 46 *(.data.patch.fsyscall_table)
46 __end_gate_fsyscall_patchlist = .; 47 __paravirt_end_gate_fsyscall_patchlist = .;
47 48
48 __start_gate_brl_fsys_bubble_down_patchlist = .; 49 __paravirt_start_gate_brl_fsys_bubble_down_patchlist = .;
49 *(.data.patch.brl_fsys_bubble_down) 50 *(.data.patch.brl_fsys_bubble_down)
50 __end_gate_brl_fsys_bubble_down_patchlist = .; 51 __paravirt_end_gate_brl_fsys_bubble_down_patchlist = .;
51 } :readable 52 } :readable
52 53
53 .IA_64.unwind_info : { *(.IA_64.unwind_info*) } 54 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 59301c472800..23f846de62d5 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -1050,7 +1050,7 @@ END(ia64_delay_loop)
1050 * except that the multiplication and the shift are done with 128-bit 1050 * except that the multiplication and the shift are done with 128-bit
1051 * intermediate precision so that we can produce a full 64-bit result. 1051 * intermediate precision so that we can produce a full 64-bit result.
1052 */ 1052 */
1053GLOBAL_ENTRY(sched_clock) 1053GLOBAL_ENTRY(ia64_native_sched_clock)
1054 addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 1054 addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
1055 mov.m r9=ar.itc // fetch cycle-counter (35 cyc) 1055 mov.m r9=ar.itc // fetch cycle-counter (35 cyc)
1056 ;; 1056 ;;
@@ -1066,7 +1066,13 @@ GLOBAL_ENTRY(sched_clock)
1066 ;; 1066 ;;
1067 shrp r8=r9,r8,IA64_NSEC_PER_CYC_SHIFT 1067 shrp r8=r9,r8,IA64_NSEC_PER_CYC_SHIFT
1068 br.ret.sptk.many rp 1068 br.ret.sptk.many rp
1069END(sched_clock) 1069END(ia64_native_sched_clock)
1070#ifndef CONFIG_PARAVIRT
1071 //unsigned long long
1072 //sched_clock(void) __attribute__((alias("ia64_native_sched_clock")));
1073 .global sched_clock
1074sched_clock = ia64_native_sched_clock
1075#endif
1070 1076
1071#ifdef CONFIG_VIRT_CPU_ACCOUNTING 1077#ifdef CONFIG_VIRT_CPU_ACCOUNTING
1072GLOBAL_ENTRY(cycle_to_cputime) 1078GLOBAL_ENTRY(cycle_to_cputime)
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 6da1f20d7372..2d311864e359 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -112,3 +112,9 @@ EXPORT_SYMBOL_GPL(esi_call_phys);
112#endif 112#endif
113extern char ia64_ivt[]; 113extern char ia64_ivt[];
114EXPORT_SYMBOL(ia64_ivt); 114EXPORT_SYMBOL(ia64_ivt);
115
116#include <asm/ftrace.h>
117#ifdef CONFIG_FUNCTION_TRACER
118/* mcount is defined in assembly */
119EXPORT_SYMBOL(_mcount);
120#endif
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index f675d8e33853..ec9a5fdfa1b9 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -804,7 +804,7 @@ ENTRY(break_fault)
804/////////////////////////////////////////////////////////////////////// 804///////////////////////////////////////////////////////////////////////
805 st1 [r16]=r0 // M2|3 clear current->thread.on_ustack flag 805 st1 [r16]=r0 // M2|3 clear current->thread.on_ustack flag
806#ifdef CONFIG_VIRT_CPU_ACCOUNTING 806#ifdef CONFIG_VIRT_CPU_ACCOUNTING
807 mov.m r30=ar.itc // M get cycle for accounting 807 MOV_FROM_ITC(p0, p14, r30, r18) // M get cycle for accounting
808#else 808#else
809 mov b6=r30 // I0 setup syscall handler branch reg early 809 mov b6=r30 // I0 setup syscall handler branch reg early
810#endif 810#endif
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index 7ccb228ceedc..d41a40ef80c0 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -1,5 +1,5 @@
1#include <linux/module.h> 1#include <linux/module.h>
2 2#include <linux/dma-mapping.h>
3#include <asm/machvec.h> 3#include <asm/machvec.h>
4#include <asm/system.h> 4#include <asm/system.h>
5 5
@@ -75,14 +75,16 @@ machvec_timer_interrupt (int irq, void *dev_id)
75EXPORT_SYMBOL(machvec_timer_interrupt); 75EXPORT_SYMBOL(machvec_timer_interrupt);
76 76
77void 77void
78machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir) 78machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size,
79 enum dma_data_direction dir)
79{ 80{
80 mb(); 81 mb();
81} 82}
82EXPORT_SYMBOL(machvec_dma_sync_single); 83EXPORT_SYMBOL(machvec_dma_sync_single);
83 84
84void 85void
85machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir) 86machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n,
87 enum dma_data_direction dir)
86{ 88{
87 mb(); 89 mb();
88} 90}
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index bab1de2d2f6a..8f33a8840422 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1456,9 +1456,9 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
1456 1456
1457 ia64_mca_cmc_int_handler(cmc_irq, arg); 1457 ia64_mca_cmc_int_handler(cmc_irq, arg);
1458 1458
1459 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); 1459 cpuid = cpumask_next(cpuid+1, cpu_online_mask);
1460 1460
1461 if (cpuid < NR_CPUS) { 1461 if (cpuid < nr_cpu_ids) {
1462 platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0); 1462 platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
1463 } else { 1463 } else {
1464 /* If no log record, switch out of polling mode */ 1464 /* If no log record, switch out of polling mode */
@@ -1525,7 +1525,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
1525 1525
1526 ia64_mca_cpe_int_handler(cpe_irq, arg); 1526 ia64_mca_cpe_int_handler(cpe_irq, arg);
1527 1527
1528 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); 1528 cpuid = cpumask_next(cpuid+1, cpu_online_mask);
1529 1529
1530 if (cpuid < NR_CPUS) { 1530 if (cpuid < NR_CPUS) {
1531 platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); 1531 platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index aaa7d901521f..da3b0cf495a3 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -446,6 +446,14 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
446 mod->arch.opd = s; 446 mod->arch.opd = s;
447 else if (strcmp(".IA_64.unwind", secstrings + s->sh_name) == 0) 447 else if (strcmp(".IA_64.unwind", secstrings + s->sh_name) == 0)
448 mod->arch.unwind = s; 448 mod->arch.unwind = s;
449#ifdef CONFIG_PARAVIRT
450 else if (strcmp(".paravirt_bundles",
451 secstrings + s->sh_name) == 0)
452 mod->arch.paravirt_bundles = s;
453 else if (strcmp(".paravirt_insts",
454 secstrings + s->sh_name) == 0)
455 mod->arch.paravirt_insts = s;
456#endif
449 457
450 if (!mod->arch.core_plt || !mod->arch.init_plt || !mod->arch.got || !mod->arch.opd) { 458 if (!mod->arch.core_plt || !mod->arch.init_plt || !mod->arch.got || !mod->arch.opd) {
451 printk(KERN_ERR "%s: sections missing\n", mod->name); 459 printk(KERN_ERR "%s: sections missing\n", mod->name);
@@ -525,8 +533,7 @@ get_ltoff (struct module *mod, uint64_t value, int *okp)
525 goto found; 533 goto found;
526 534
527 /* Not enough GOT entries? */ 535 /* Not enough GOT entries? */
528 if (e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)) 536 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size));
529 BUG();
530 537
531 e->val = value; 538 e->val = value;
532 ++mod->arch.next_got_entry; 539 ++mod->arch.next_got_entry;
@@ -921,6 +928,30 @@ module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mo
921 DEBUGP("%s: init: entry=%p\n", __func__, mod->init); 928 DEBUGP("%s: init: entry=%p\n", __func__, mod->init);
922 if (mod->arch.unwind) 929 if (mod->arch.unwind)
923 register_unwind_table(mod); 930 register_unwind_table(mod);
931#ifdef CONFIG_PARAVIRT
932 if (mod->arch.paravirt_bundles) {
933 struct paravirt_patch_site_bundle *start =
934 (struct paravirt_patch_site_bundle *)
935 mod->arch.paravirt_bundles->sh_addr;
936 struct paravirt_patch_site_bundle *end =
937 (struct paravirt_patch_site_bundle *)
938 (mod->arch.paravirt_bundles->sh_addr +
939 mod->arch.paravirt_bundles->sh_size);
940
941 paravirt_patch_apply_bundle(start, end);
942 }
943 if (mod->arch.paravirt_insts) {
944 struct paravirt_patch_site_inst *start =
945 (struct paravirt_patch_site_inst *)
946 mod->arch.paravirt_insts->sh_addr;
947 struct paravirt_patch_site_inst *end =
948 (struct paravirt_patch_site_inst *)
949 (mod->arch.paravirt_insts->sh_addr +
950 mod->arch.paravirt_insts->sh_size);
951
952 paravirt_patch_apply_inst(start, end);
953 }
954#endif
924 return 0; 955 return 0;
925} 956}
926 957
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index e5c57f413ca2..a4f19c70aadd 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -1002,8 +1002,6 @@ create_palinfo_proc_entries(unsigned int cpu)
1002 *pdir = create_proc_read_entry( 1002 *pdir = create_proc_read_entry(
1003 palinfo_entries[j].name, 0, cpu_dir, 1003 palinfo_entries[j].name, 0, cpu_dir,
1004 palinfo_read_entry, (void *)f.value); 1004 palinfo_read_entry, (void *)f.value);
1005 if (*pdir)
1006 (*pdir)->owner = THIS_MODULE;
1007 pdir++; 1005 pdir++;
1008 } 1006 }
1009} 1007}
diff --git a/arch/ia64/kernel/paravirt.c b/arch/ia64/kernel/paravirt.c
index 9f14c16f6369..a21d7bb9c69c 100644
--- a/arch/ia64/kernel/paravirt.c
+++ b/arch/ia64/kernel/paravirt.c
@@ -46,13 +46,23 @@ struct pv_info pv_info = {
46 * initialization hooks. 46 * initialization hooks.
47 */ 47 */
48 48
49struct pv_init_ops pv_init_ops; 49static void __init
50ia64_native_patch_branch(unsigned long tag, unsigned long type);
51
52struct pv_init_ops pv_init_ops =
53{
54#ifdef ASM_SUPPORTED
55 .patch_bundle = ia64_native_patch_bundle,
56#endif
57 .patch_branch = ia64_native_patch_branch,
58};
50 59
51/*************************************************************************** 60/***************************************************************************
52 * pv_cpu_ops 61 * pv_cpu_ops
53 * intrinsics hooks. 62 * intrinsics hooks.
54 */ 63 */
55 64
65#ifndef ASM_SUPPORTED
56/* ia64_native_xxx are macros so that we have to make them real functions */ 66/* ia64_native_xxx are macros so that we have to make them real functions */
57 67
58#define DEFINE_VOID_FUNC1(name) \ 68#define DEFINE_VOID_FUNC1(name) \
@@ -60,7 +70,14 @@ struct pv_init_ops pv_init_ops;
60 ia64_native_ ## name ## _func(unsigned long arg) \ 70 ia64_native_ ## name ## _func(unsigned long arg) \
61 { \ 71 { \
62 ia64_native_ ## name(arg); \ 72 ia64_native_ ## name(arg); \
63 } \ 73 }
74
75#define DEFINE_VOID_FUNC1_VOID(name) \
76 static void \
77 ia64_native_ ## name ## _func(void *arg) \
78 { \
79 ia64_native_ ## name(arg); \
80 }
64 81
65#define DEFINE_VOID_FUNC2(name) \ 82#define DEFINE_VOID_FUNC2(name) \
66 static void \ 83 static void \
@@ -68,7 +85,7 @@ struct pv_init_ops pv_init_ops;
68 unsigned long arg1) \ 85 unsigned long arg1) \
69 { \ 86 { \
70 ia64_native_ ## name(arg0, arg1); \ 87 ia64_native_ ## name(arg0, arg1); \
71 } \ 88 }
72 89
73#define DEFINE_FUNC0(name) \ 90#define DEFINE_FUNC0(name) \
74 static unsigned long \ 91 static unsigned long \
@@ -84,7 +101,7 @@ struct pv_init_ops pv_init_ops;
84 return ia64_native_ ## name(arg); \ 101 return ia64_native_ ## name(arg); \
85 } \ 102 } \
86 103
87DEFINE_VOID_FUNC1(fc); 104DEFINE_VOID_FUNC1_VOID(fc);
88DEFINE_VOID_FUNC1(intrin_local_irq_restore); 105DEFINE_VOID_FUNC1(intrin_local_irq_restore);
89 106
90DEFINE_VOID_FUNC2(ptcga); 107DEFINE_VOID_FUNC2(ptcga);
@@ -274,6 +291,266 @@ ia64_native_setreg_func(int regnum, unsigned long val)
274 break; 291 break;
275 } 292 }
276} 293}
294#else
295
296#define __DEFINE_FUNC(name, code) \
297 extern const char ia64_native_ ## name ## _direct_start[]; \
298 extern const char ia64_native_ ## name ## _direct_end[]; \
299 asm (".align 32\n" \
300 ".proc ia64_native_" #name "_func\n" \
301 "ia64_native_" #name "_func:\n" \
302 "ia64_native_" #name "_direct_start:\n" \
303 code \
304 "ia64_native_" #name "_direct_end:\n" \
305 "br.cond.sptk.many b6\n" \
306 ".endp ia64_native_" #name "_func\n")
307
308#define DEFINE_VOID_FUNC0(name, code) \
309 extern void \
310 ia64_native_ ## name ## _func(void); \
311 __DEFINE_FUNC(name, code)
312
313#define DEFINE_VOID_FUNC1(name, code) \
314 extern void \
315 ia64_native_ ## name ## _func(unsigned long arg); \
316 __DEFINE_FUNC(name, code)
317
318#define DEFINE_VOID_FUNC1_VOID(name, code) \
319 extern void \
320 ia64_native_ ## name ## _func(void *arg); \
321 __DEFINE_FUNC(name, code)
322
323#define DEFINE_VOID_FUNC2(name, code) \
324 extern void \
325 ia64_native_ ## name ## _func(unsigned long arg0, \
326 unsigned long arg1); \
327 __DEFINE_FUNC(name, code)
328
329#define DEFINE_FUNC0(name, code) \
330 extern unsigned long \
331 ia64_native_ ## name ## _func(void); \
332 __DEFINE_FUNC(name, code)
333
334#define DEFINE_FUNC1(name, type, code) \
335 extern unsigned long \
336 ia64_native_ ## name ## _func(type arg); \
337 __DEFINE_FUNC(name, code)
338
339DEFINE_VOID_FUNC1_VOID(fc,
340 "fc r8\n");
341DEFINE_VOID_FUNC1(intrin_local_irq_restore,
342 ";;\n"
343 " cmp.ne p6, p7 = r8, r0\n"
344 ";;\n"
345 "(p6) ssm psr.i\n"
346 "(p7) rsm psr.i\n"
347 ";;\n"
348 "(p6) srlz.d\n");
349
350DEFINE_VOID_FUNC2(ptcga,
351 "ptc.ga r8, r9\n");
352DEFINE_VOID_FUNC2(set_rr,
353 "mov rr[r8] = r9\n");
354
355/* ia64_native_getreg(_IA64_REG_PSR) & IA64_PSR_I */
356DEFINE_FUNC0(get_psr_i,
357 "mov r2 = " __stringify(1 << IA64_PSR_I_BIT) "\n"
358 "mov r8 = psr\n"
359 ";;\n"
360 "and r8 = r2, r8\n");
361
362DEFINE_FUNC1(thash, unsigned long,
363 "thash r8 = r8\n");
364DEFINE_FUNC1(get_cpuid, int,
365 "mov r8 = cpuid[r8]\n");
366DEFINE_FUNC1(get_pmd, int,
367 "mov r8 = pmd[r8]\n");
368DEFINE_FUNC1(get_rr, unsigned long,
369 "mov r8 = rr[r8]\n");
370
371DEFINE_VOID_FUNC0(ssm_i,
372 "ssm psr.i\n");
373DEFINE_VOID_FUNC0(rsm_i,
374 "rsm psr.i\n");
375
376extern void
377ia64_native_set_rr0_to_rr4_func(unsigned long val0, unsigned long val1,
378 unsigned long val2, unsigned long val3,
379 unsigned long val4);
380__DEFINE_FUNC(set_rr0_to_rr4,
381 "mov rr[r0] = r8\n"
382 "movl r2 = 0x2000000000000000\n"
383 ";;\n"
384 "mov rr[r2] = r9\n"
385 "shl r3 = r2, 1\n" /* movl r3 = 0x4000000000000000 */
386 ";;\n"
387 "add r2 = r2, r3\n" /* movl r2 = 0x6000000000000000 */
388 "mov rr[r3] = r10\n"
389 ";;\n"
390 "mov rr[r2] = r11\n"
391 "shl r3 = r3, 1\n" /* movl r3 = 0x8000000000000000 */
392 ";;\n"
393 "mov rr[r3] = r14\n");
394
395extern unsigned long ia64_native_getreg_func(int regnum);
396asm(".global ia64_native_getreg_func\n");
397#define __DEFINE_GET_REG(id, reg) \
398 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
399 ";;\n" \
400 "cmp.eq p6, p0 = r2, r8\n" \
401 ";;\n" \
402 "(p6) mov r8 = " #reg "\n" \
403 "(p6) br.cond.sptk.many b6\n" \
404 ";;\n"
405#define __DEFINE_GET_AR(id, reg) __DEFINE_GET_REG(AR_ ## id, ar.reg)
406#define __DEFINE_GET_CR(id, reg) __DEFINE_GET_REG(CR_ ## id, cr.reg)
407
408__DEFINE_FUNC(getreg,
409 __DEFINE_GET_REG(GP, gp)
410 /*__DEFINE_GET_REG(IP, ip)*/ /* returned ip value shouldn't be constant */
411 __DEFINE_GET_REG(PSR, psr)
412 __DEFINE_GET_REG(TP, tp)
413 __DEFINE_GET_REG(SP, sp)
414
415 __DEFINE_GET_REG(AR_KR0, ar0)
416 __DEFINE_GET_REG(AR_KR1, ar1)
417 __DEFINE_GET_REG(AR_KR2, ar2)
418 __DEFINE_GET_REG(AR_KR3, ar3)
419 __DEFINE_GET_REG(AR_KR4, ar4)
420 __DEFINE_GET_REG(AR_KR5, ar5)
421 __DEFINE_GET_REG(AR_KR6, ar6)
422 __DEFINE_GET_REG(AR_KR7, ar7)
423 __DEFINE_GET_AR(RSC, rsc)
424 __DEFINE_GET_AR(BSP, bsp)
425 __DEFINE_GET_AR(BSPSTORE, bspstore)
426 __DEFINE_GET_AR(RNAT, rnat)
427 __DEFINE_GET_AR(FCR, fcr)
428 __DEFINE_GET_AR(EFLAG, eflag)
429 __DEFINE_GET_AR(CSD, csd)
430 __DEFINE_GET_AR(SSD, ssd)
431 __DEFINE_GET_REG(AR_CFLAG, ar27)
432 __DEFINE_GET_AR(FSR, fsr)
433 __DEFINE_GET_AR(FIR, fir)
434 __DEFINE_GET_AR(FDR, fdr)
435 __DEFINE_GET_AR(CCV, ccv)
436 __DEFINE_GET_AR(UNAT, unat)
437 __DEFINE_GET_AR(FPSR, fpsr)
438 __DEFINE_GET_AR(ITC, itc)
439 __DEFINE_GET_AR(PFS, pfs)
440 __DEFINE_GET_AR(LC, lc)
441 __DEFINE_GET_AR(EC, ec)
442
443 __DEFINE_GET_CR(DCR, dcr)
444 __DEFINE_GET_CR(ITM, itm)
445 __DEFINE_GET_CR(IVA, iva)
446 __DEFINE_GET_CR(PTA, pta)
447 __DEFINE_GET_CR(IPSR, ipsr)
448 __DEFINE_GET_CR(ISR, isr)
449 __DEFINE_GET_CR(IIP, iip)
450 __DEFINE_GET_CR(IFA, ifa)
451 __DEFINE_GET_CR(ITIR, itir)
452 __DEFINE_GET_CR(IIPA, iipa)
453 __DEFINE_GET_CR(IFS, ifs)
454 __DEFINE_GET_CR(IIM, iim)
455 __DEFINE_GET_CR(IHA, iha)
456 __DEFINE_GET_CR(LID, lid)
457 __DEFINE_GET_CR(IVR, ivr)
458 __DEFINE_GET_CR(TPR, tpr)
459 __DEFINE_GET_CR(EOI, eoi)
460 __DEFINE_GET_CR(IRR0, irr0)
461 __DEFINE_GET_CR(IRR1, irr1)
462 __DEFINE_GET_CR(IRR2, irr2)
463 __DEFINE_GET_CR(IRR3, irr3)
464 __DEFINE_GET_CR(ITV, itv)
465 __DEFINE_GET_CR(PMV, pmv)
466 __DEFINE_GET_CR(CMCV, cmcv)
467 __DEFINE_GET_CR(LRR0, lrr0)
468 __DEFINE_GET_CR(LRR1, lrr1)
469
470 "mov r8 = -1\n" /* unsupported case */
471 );
472
473extern void ia64_native_setreg_func(int regnum, unsigned long val);
474asm(".global ia64_native_setreg_func\n");
475#define __DEFINE_SET_REG(id, reg) \
476 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
477 ";;\n" \
478 "cmp.eq p6, p0 = r2, r9\n" \
479 ";;\n" \
480 "(p6) mov " #reg " = r8\n" \
481 "(p6) br.cond.sptk.many b6\n" \
482 ";;\n"
483#define __DEFINE_SET_AR(id, reg) __DEFINE_SET_REG(AR_ ## id, ar.reg)
484#define __DEFINE_SET_CR(id, reg) __DEFINE_SET_REG(CR_ ## id, cr.reg)
485__DEFINE_FUNC(setreg,
486 "mov r2 = " __stringify(_IA64_REG_PSR_L) "\n"
487 ";;\n"
488 "cmp.eq p6, p0 = r2, r9\n"
489 ";;\n"
490 "(p6) mov psr.l = r8\n"
491#ifdef HAVE_SERIALIZE_DIRECTIVE
492 ".serialize.data\n"
493#endif
494 "(p6) br.cond.sptk.many b6\n"
495 __DEFINE_SET_REG(GP, gp)
496 __DEFINE_SET_REG(SP, sp)
497
498 __DEFINE_SET_REG(AR_KR0, ar0)
499 __DEFINE_SET_REG(AR_KR1, ar1)
500 __DEFINE_SET_REG(AR_KR2, ar2)
501 __DEFINE_SET_REG(AR_KR3, ar3)
502 __DEFINE_SET_REG(AR_KR4, ar4)
503 __DEFINE_SET_REG(AR_KR5, ar5)
504 __DEFINE_SET_REG(AR_KR6, ar6)
505 __DEFINE_SET_REG(AR_KR7, ar7)
506 __DEFINE_SET_AR(RSC, rsc)
507 __DEFINE_SET_AR(BSP, bsp)
508 __DEFINE_SET_AR(BSPSTORE, bspstore)
509 __DEFINE_SET_AR(RNAT, rnat)
510 __DEFINE_SET_AR(FCR, fcr)
511 __DEFINE_SET_AR(EFLAG, eflag)
512 __DEFINE_SET_AR(CSD, csd)
513 __DEFINE_SET_AR(SSD, ssd)
514 __DEFINE_SET_REG(AR_CFLAG, ar27)
515 __DEFINE_SET_AR(FSR, fsr)
516 __DEFINE_SET_AR(FIR, fir)
517 __DEFINE_SET_AR(FDR, fdr)
518 __DEFINE_SET_AR(CCV, ccv)
519 __DEFINE_SET_AR(UNAT, unat)
520 __DEFINE_SET_AR(FPSR, fpsr)
521 __DEFINE_SET_AR(ITC, itc)
522 __DEFINE_SET_AR(PFS, pfs)
523 __DEFINE_SET_AR(LC, lc)
524 __DEFINE_SET_AR(EC, ec)
525
526 __DEFINE_SET_CR(DCR, dcr)
527 __DEFINE_SET_CR(ITM, itm)
528 __DEFINE_SET_CR(IVA, iva)
529 __DEFINE_SET_CR(PTA, pta)
530 __DEFINE_SET_CR(IPSR, ipsr)
531 __DEFINE_SET_CR(ISR, isr)
532 __DEFINE_SET_CR(IIP, iip)
533 __DEFINE_SET_CR(IFA, ifa)
534 __DEFINE_SET_CR(ITIR, itir)
535 __DEFINE_SET_CR(IIPA, iipa)
536 __DEFINE_SET_CR(IFS, ifs)
537 __DEFINE_SET_CR(IIM, iim)
538 __DEFINE_SET_CR(IHA, iha)
539 __DEFINE_SET_CR(LID, lid)
540 __DEFINE_SET_CR(IVR, ivr)
541 __DEFINE_SET_CR(TPR, tpr)
542 __DEFINE_SET_CR(EOI, eoi)
543 __DEFINE_SET_CR(IRR0, irr0)
544 __DEFINE_SET_CR(IRR1, irr1)
545 __DEFINE_SET_CR(IRR2, irr2)
546 __DEFINE_SET_CR(IRR3, irr3)
547 __DEFINE_SET_CR(ITV, itv)
548 __DEFINE_SET_CR(PMV, pmv)
549 __DEFINE_SET_CR(CMCV, cmcv)
550 __DEFINE_SET_CR(LRR0, lrr0)
551 __DEFINE_SET_CR(LRR1, lrr1)
552 );
553#endif
277 554
278struct pv_cpu_ops pv_cpu_ops = { 555struct pv_cpu_ops pv_cpu_ops = {
279 .fc = ia64_native_fc_func, 556 .fc = ia64_native_fc_func,
@@ -366,4 +643,258 @@ ia64_native_do_steal_accounting(unsigned long *new_itm)
366 643
367struct pv_time_ops pv_time_ops = { 644struct pv_time_ops pv_time_ops = {
368 .do_steal_accounting = ia64_native_do_steal_accounting, 645 .do_steal_accounting = ia64_native_do_steal_accounting,
646 .sched_clock = ia64_native_sched_clock,
647};
648
649/***************************************************************************
650 * binary pacthing
651 * pv_init_ops.patch_bundle
652 */
653
654#ifdef ASM_SUPPORTED
655#define IA64_NATIVE_PATCH_DEFINE_GET_REG(name, reg) \
656 __DEFINE_FUNC(get_ ## name, \
657 ";;\n" \
658 "mov r8 = " #reg "\n" \
659 ";;\n")
660
661#define IA64_NATIVE_PATCH_DEFINE_SET_REG(name, reg) \
662 __DEFINE_FUNC(set_ ## name, \
663 ";;\n" \
664 "mov " #reg " = r8\n" \
665 ";;\n")
666
667#define IA64_NATIVE_PATCH_DEFINE_REG(name, reg) \
668 IA64_NATIVE_PATCH_DEFINE_GET_REG(name, reg); \
669 IA64_NATIVE_PATCH_DEFINE_SET_REG(name, reg) \
670
671#define IA64_NATIVE_PATCH_DEFINE_AR(name, reg) \
672 IA64_NATIVE_PATCH_DEFINE_REG(ar_ ## name, ar.reg)
673
674#define IA64_NATIVE_PATCH_DEFINE_CR(name, reg) \
675 IA64_NATIVE_PATCH_DEFINE_REG(cr_ ## name, cr.reg)
676
677
678IA64_NATIVE_PATCH_DEFINE_GET_REG(psr, psr);
679IA64_NATIVE_PATCH_DEFINE_GET_REG(tp, tp);
680
681/* IA64_NATIVE_PATCH_DEFINE_SET_REG(psr_l, psr.l); */
682__DEFINE_FUNC(set_psr_l,
683 ";;\n"
684 "mov psr.l = r8\n"
685#ifdef HAVE_SERIALIZE_DIRECTIVE
686 ".serialize.data\n"
687#endif
688 ";;\n");
689
690IA64_NATIVE_PATCH_DEFINE_REG(gp, gp);
691IA64_NATIVE_PATCH_DEFINE_REG(sp, sp);
692
693IA64_NATIVE_PATCH_DEFINE_REG(kr0, ar0);
694IA64_NATIVE_PATCH_DEFINE_REG(kr1, ar1);
695IA64_NATIVE_PATCH_DEFINE_REG(kr2, ar2);
696IA64_NATIVE_PATCH_DEFINE_REG(kr3, ar3);
697IA64_NATIVE_PATCH_DEFINE_REG(kr4, ar4);
698IA64_NATIVE_PATCH_DEFINE_REG(kr5, ar5);
699IA64_NATIVE_PATCH_DEFINE_REG(kr6, ar6);
700IA64_NATIVE_PATCH_DEFINE_REG(kr7, ar7);
701
702IA64_NATIVE_PATCH_DEFINE_AR(rsc, rsc);
703IA64_NATIVE_PATCH_DEFINE_AR(bsp, bsp);
704IA64_NATIVE_PATCH_DEFINE_AR(bspstore, bspstore);
705IA64_NATIVE_PATCH_DEFINE_AR(rnat, rnat);
706IA64_NATIVE_PATCH_DEFINE_AR(fcr, fcr);
707IA64_NATIVE_PATCH_DEFINE_AR(eflag, eflag);
708IA64_NATIVE_PATCH_DEFINE_AR(csd, csd);
709IA64_NATIVE_PATCH_DEFINE_AR(ssd, ssd);
710IA64_NATIVE_PATCH_DEFINE_REG(ar27, ar27);
711IA64_NATIVE_PATCH_DEFINE_AR(fsr, fsr);
712IA64_NATIVE_PATCH_DEFINE_AR(fir, fir);
713IA64_NATIVE_PATCH_DEFINE_AR(fdr, fdr);
714IA64_NATIVE_PATCH_DEFINE_AR(ccv, ccv);
715IA64_NATIVE_PATCH_DEFINE_AR(unat, unat);
716IA64_NATIVE_PATCH_DEFINE_AR(fpsr, fpsr);
717IA64_NATIVE_PATCH_DEFINE_AR(itc, itc);
718IA64_NATIVE_PATCH_DEFINE_AR(pfs, pfs);
719IA64_NATIVE_PATCH_DEFINE_AR(lc, lc);
720IA64_NATIVE_PATCH_DEFINE_AR(ec, ec);
721
722IA64_NATIVE_PATCH_DEFINE_CR(dcr, dcr);
723IA64_NATIVE_PATCH_DEFINE_CR(itm, itm);
724IA64_NATIVE_PATCH_DEFINE_CR(iva, iva);
725IA64_NATIVE_PATCH_DEFINE_CR(pta, pta);
726IA64_NATIVE_PATCH_DEFINE_CR(ipsr, ipsr);
727IA64_NATIVE_PATCH_DEFINE_CR(isr, isr);
728IA64_NATIVE_PATCH_DEFINE_CR(iip, iip);
729IA64_NATIVE_PATCH_DEFINE_CR(ifa, ifa);
730IA64_NATIVE_PATCH_DEFINE_CR(itir, itir);
731IA64_NATIVE_PATCH_DEFINE_CR(iipa, iipa);
732IA64_NATIVE_PATCH_DEFINE_CR(ifs, ifs);
733IA64_NATIVE_PATCH_DEFINE_CR(iim, iim);
734IA64_NATIVE_PATCH_DEFINE_CR(iha, iha);
735IA64_NATIVE_PATCH_DEFINE_CR(lid, lid);
736IA64_NATIVE_PATCH_DEFINE_CR(ivr, ivr);
737IA64_NATIVE_PATCH_DEFINE_CR(tpr, tpr);
738IA64_NATIVE_PATCH_DEFINE_CR(eoi, eoi);
739IA64_NATIVE_PATCH_DEFINE_CR(irr0, irr0);
740IA64_NATIVE_PATCH_DEFINE_CR(irr1, irr1);
741IA64_NATIVE_PATCH_DEFINE_CR(irr2, irr2);
742IA64_NATIVE_PATCH_DEFINE_CR(irr3, irr3);
743IA64_NATIVE_PATCH_DEFINE_CR(itv, itv);
744IA64_NATIVE_PATCH_DEFINE_CR(pmv, pmv);
745IA64_NATIVE_PATCH_DEFINE_CR(cmcv, cmcv);
746IA64_NATIVE_PATCH_DEFINE_CR(lrr0, lrr0);
747IA64_NATIVE_PATCH_DEFINE_CR(lrr1, lrr1);
748
749static const struct paravirt_patch_bundle_elem ia64_native_patch_bundle_elems[]
750__initdata_or_module =
751{
752#define IA64_NATIVE_PATCH_BUNDLE_ELEM(name, type) \
753 { \
754 (void*)ia64_native_ ## name ## _direct_start, \
755 (void*)ia64_native_ ## name ## _direct_end, \
756 PARAVIRT_PATCH_TYPE_ ## type, \
757 }
758
759 IA64_NATIVE_PATCH_BUNDLE_ELEM(fc, FC),
760 IA64_NATIVE_PATCH_BUNDLE_ELEM(thash, THASH),
761 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_cpuid, GET_CPUID),
762 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_pmd, GET_PMD),
763 IA64_NATIVE_PATCH_BUNDLE_ELEM(ptcga, PTCGA),
764 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_rr, GET_RR),
765 IA64_NATIVE_PATCH_BUNDLE_ELEM(set_rr, SET_RR),
766 IA64_NATIVE_PATCH_BUNDLE_ELEM(set_rr0_to_rr4, SET_RR0_TO_RR4),
767 IA64_NATIVE_PATCH_BUNDLE_ELEM(ssm_i, SSM_I),
768 IA64_NATIVE_PATCH_BUNDLE_ELEM(rsm_i, RSM_I),
769 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_psr_i, GET_PSR_I),
770 IA64_NATIVE_PATCH_BUNDLE_ELEM(intrin_local_irq_restore,
771 INTRIN_LOCAL_IRQ_RESTORE),
772
773#define IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(name, reg) \
774 { \
775 (void*)ia64_native_get_ ## name ## _direct_start, \
776 (void*)ia64_native_get_ ## name ## _direct_end, \
777 PARAVIRT_PATCH_TYPE_GETREG + _IA64_REG_ ## reg, \
778 }
779
780#define IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
781 { \
782 (void*)ia64_native_set_ ## name ## _direct_start, \
783 (void*)ia64_native_set_ ## name ## _direct_end, \
784 PARAVIRT_PATCH_TYPE_SETREG + _IA64_REG_ ## reg, \
785 }
786
787#define IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(name, reg) \
788 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(name, reg), \
789 IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
790
791#define IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(name, reg) \
792 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(ar_ ## name, AR_ ## reg)
793
794#define IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(name, reg) \
795 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(cr_ ## name, CR_ ## reg)
796
797 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(psr, PSR),
798 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(tp, TP),
799
800 IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(psr_l, PSR_L),
801
802 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(gp, GP),
803 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(sp, SP),
804
805 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr0, AR_KR0),
806 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr1, AR_KR1),
807 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr2, AR_KR2),
808 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr3, AR_KR3),
809 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr4, AR_KR4),
810 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr5, AR_KR5),
811 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr6, AR_KR6),
812 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr7, AR_KR7),
813
814 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(rsc, RSC),
815 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(bsp, BSP),
816 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(bspstore, BSPSTORE),
817 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(rnat, RNAT),
818 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fcr, FCR),
819 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(eflag, EFLAG),
820 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(csd, CSD),
821 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ssd, SSD),
822 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(ar27, AR_CFLAG),
823 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fsr, FSR),
824 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fir, FIR),
825 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fdr, FDR),
826 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ccv, CCV),
827 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(unat, UNAT),
828 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fpsr, FPSR),
829 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(itc, ITC),
830 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(pfs, PFS),
831 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(lc, LC),
832 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ec, EC),
833
834 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(dcr, DCR),
835 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itm, ITM),
836 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iva, IVA),
837 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(pta, PTA),
838 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ipsr, IPSR),
839 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(isr, ISR),
840 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iip, IIP),
841 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ifa, IFA),
842 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itir, ITIR),
843 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iipa, IIPA),
844 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ifs, IFS),
845 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iim, IIM),
846 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iha, IHA),
847 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(lid, LID),
848 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ivr, IVR),
849 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(tpr, TPR),
850 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(eoi, EOI),
851 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr0, IRR0),
852 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr1, IRR1),
853 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr2, IRR2),
854 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr3, IRR3),
855 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itv, ITV),
856 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(pmv, PMV),
857 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(cmcv, CMCV),
858 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(lrr0, LRR0),
859 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(lrr1, LRR1),
369}; 860};
861
862unsigned long __init_or_module
863ia64_native_patch_bundle(void *sbundle, void *ebundle, unsigned long type)
864{
865 const unsigned long nelems = sizeof(ia64_native_patch_bundle_elems) /
866 sizeof(ia64_native_patch_bundle_elems[0]);
867
868 return __paravirt_patch_apply_bundle(sbundle, ebundle, type,
869 ia64_native_patch_bundle_elems,
870 nelems, NULL);
871}
872#endif /* ASM_SUPPOTED */
873
874extern const char ia64_native_switch_to[];
875extern const char ia64_native_leave_syscall[];
876extern const char ia64_native_work_processed_syscall[];
877extern const char ia64_native_leave_kernel[];
878
879const struct paravirt_patch_branch_target ia64_native_branch_target[]
880__initconst = {
881#define PARAVIRT_BR_TARGET(name, type) \
882 { \
883 ia64_native_ ## name, \
884 PARAVIRT_PATCH_TYPE_BR_ ## type, \
885 }
886 PARAVIRT_BR_TARGET(switch_to, SWITCH_TO),
887 PARAVIRT_BR_TARGET(leave_syscall, LEAVE_SYSCALL),
888 PARAVIRT_BR_TARGET(work_processed_syscall, WORK_PROCESSED_SYSCALL),
889 PARAVIRT_BR_TARGET(leave_kernel, LEAVE_KERNEL),
890};
891
892static void __init
893ia64_native_patch_branch(unsigned long tag, unsigned long type)
894{
895 const unsigned long nelem =
896 sizeof(ia64_native_branch_target) /
897 sizeof(ia64_native_branch_target[0]);
898 __paravirt_patch_apply_branch(tag, type,
899 ia64_native_branch_target, nelem);
900}
diff --git a/arch/ia64/kernel/paravirt_patch.c b/arch/ia64/kernel/paravirt_patch.c
new file mode 100644
index 000000000000..bfdfef1b1ffd
--- /dev/null
+++ b/arch/ia64/kernel/paravirt_patch.c
@@ -0,0 +1,514 @@
1/******************************************************************************
2 * linux/arch/ia64/xen/paravirt_patch.c
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#include <linux/init.h>
24#include <asm/intrinsics.h>
25#include <asm/kprobes.h>
26#include <asm/paravirt.h>
27#include <asm/paravirt_patch.h>
28
29typedef union ia64_inst {
30 struct {
31 unsigned long long qp : 6;
32 unsigned long long : 31;
33 unsigned long long opcode : 4;
34 unsigned long long reserved : 23;
35 } generic;
36 unsigned long long l;
37} ia64_inst_t;
38
39/*
40 * flush_icache_range() can't be used here.
41 * we are here before cpu_init() which initializes
42 * ia64_i_cache_stride_shift. flush_icache_range() uses it.
43 */
44void __init_or_module
45paravirt_flush_i_cache_range(const void *instr, unsigned long size)
46{
47 extern void paravirt_fc_i(const void *addr);
48 unsigned long i;
49
50 for (i = 0; i < size; i += sizeof(bundle_t))
51 paravirt_fc_i(instr + i);
52}
53
54bundle_t* __init_or_module
55paravirt_get_bundle(unsigned long tag)
56{
57 return (bundle_t *)(tag & ~3UL);
58}
59
60unsigned long __init_or_module
61paravirt_get_slot(unsigned long tag)
62{
63 return tag & 3UL;
64}
65
66unsigned long __init_or_module
67paravirt_get_num_inst(unsigned long stag, unsigned long etag)
68{
69 bundle_t *sbundle = paravirt_get_bundle(stag);
70 unsigned long sslot = paravirt_get_slot(stag);
71 bundle_t *ebundle = paravirt_get_bundle(etag);
72 unsigned long eslot = paravirt_get_slot(etag);
73
74 return (ebundle - sbundle) * 3 + eslot - sslot + 1;
75}
76
77unsigned long __init_or_module
78paravirt_get_next_tag(unsigned long tag)
79{
80 unsigned long slot = paravirt_get_slot(tag);
81
82 switch (slot) {
83 case 0:
84 case 1:
85 return tag + 1;
86 case 2: {
87 bundle_t *bundle = paravirt_get_bundle(tag);
88 return (unsigned long)(bundle + 1);
89 }
90 default:
91 BUG();
92 }
93 /* NOTREACHED */
94}
95
96ia64_inst_t __init_or_module
97paravirt_read_slot0(const bundle_t *bundle)
98{
99 ia64_inst_t inst;
100 inst.l = bundle->quad0.slot0;
101 return inst;
102}
103
104ia64_inst_t __init_or_module
105paravirt_read_slot1(const bundle_t *bundle)
106{
107 ia64_inst_t inst;
108 inst.l = bundle->quad0.slot1_p0 |
109 ((unsigned long long)bundle->quad1.slot1_p1 << 18UL);
110 return inst;
111}
112
113ia64_inst_t __init_or_module
114paravirt_read_slot2(const bundle_t *bundle)
115{
116 ia64_inst_t inst;
117 inst.l = bundle->quad1.slot2;
118 return inst;
119}
120
121ia64_inst_t __init_or_module
122paravirt_read_inst(unsigned long tag)
123{
124 bundle_t *bundle = paravirt_get_bundle(tag);
125 unsigned long slot = paravirt_get_slot(tag);
126
127 switch (slot) {
128 case 0:
129 return paravirt_read_slot0(bundle);
130 case 1:
131 return paravirt_read_slot1(bundle);
132 case 2:
133 return paravirt_read_slot2(bundle);
134 default:
135 BUG();
136 }
137 /* NOTREACHED */
138}
139
140void __init_or_module
141paravirt_write_slot0(bundle_t *bundle, ia64_inst_t inst)
142{
143 bundle->quad0.slot0 = inst.l;
144}
145
146void __init_or_module
147paravirt_write_slot1(bundle_t *bundle, ia64_inst_t inst)
148{
149 bundle->quad0.slot1_p0 = inst.l;
150 bundle->quad1.slot1_p1 = inst.l >> 18UL;
151}
152
153void __init_or_module
154paravirt_write_slot2(bundle_t *bundle, ia64_inst_t inst)
155{
156 bundle->quad1.slot2 = inst.l;
157}
158
159void __init_or_module
160paravirt_write_inst(unsigned long tag, ia64_inst_t inst)
161{
162 bundle_t *bundle = paravirt_get_bundle(tag);
163 unsigned long slot = paravirt_get_slot(tag);
164
165 switch (slot) {
166 case 0:
167 paravirt_write_slot0(bundle, inst);
168 break;
169 case 1:
170 paravirt_write_slot1(bundle, inst);
171 break;
172 case 2:
173 paravirt_write_slot2(bundle, inst);
174 break;
175 default:
176 BUG();
177 break;
178 }
179 paravirt_flush_i_cache_range(bundle, sizeof(*bundle));
180}
181
182/* for debug */
183void
184paravirt_print_bundle(const bundle_t *bundle)
185{
186 const unsigned long *quad = (const unsigned long *)bundle;
187 ia64_inst_t slot0 = paravirt_read_slot0(bundle);
188 ia64_inst_t slot1 = paravirt_read_slot1(bundle);
189 ia64_inst_t slot2 = paravirt_read_slot2(bundle);
190
191 printk(KERN_DEBUG
192 "bundle 0x%p 0x%016lx 0x%016lx\n", bundle, quad[0], quad[1]);
193 printk(KERN_DEBUG
194 "bundle template 0x%x\n",
195 bundle->quad0.template);
196 printk(KERN_DEBUG
197 "slot0 0x%lx slot1_p0 0x%lx slot1_p1 0x%lx slot2 0x%lx\n",
198 (unsigned long)bundle->quad0.slot0,
199 (unsigned long)bundle->quad0.slot1_p0,
200 (unsigned long)bundle->quad1.slot1_p1,
201 (unsigned long)bundle->quad1.slot2);
202 printk(KERN_DEBUG
203 "slot0 0x%016llx slot1 0x%016llx slot2 0x%016llx\n",
204 slot0.l, slot1.l, slot2.l);
205}
206
207static int noreplace_paravirt __init_or_module = 0;
208
209static int __init setup_noreplace_paravirt(char *str)
210{
211 noreplace_paravirt = 1;
212 return 1;
213}
214__setup("noreplace-paravirt", setup_noreplace_paravirt);
215
216#ifdef ASM_SUPPORTED
217static void __init_or_module
218fill_nop_bundle(void *sbundle, void *ebundle)
219{
220 extern const char paravirt_nop_bundle[];
221 extern const unsigned long paravirt_nop_bundle_size;
222
223 void *bundle = sbundle;
224
225 BUG_ON((((unsigned long)sbundle) % sizeof(bundle_t)) != 0);
226 BUG_ON((((unsigned long)ebundle) % sizeof(bundle_t)) != 0);
227
228 while (bundle < ebundle) {
229 memcpy(bundle, paravirt_nop_bundle, paravirt_nop_bundle_size);
230
231 bundle += paravirt_nop_bundle_size;
232 }
233}
234
235/* helper function */
236unsigned long __init_or_module
237__paravirt_patch_apply_bundle(void *sbundle, void *ebundle, unsigned long type,
238 const struct paravirt_patch_bundle_elem *elems,
239 unsigned long nelems,
240 const struct paravirt_patch_bundle_elem **found)
241{
242 unsigned long used = 0;
243 unsigned long i;
244
245 BUG_ON((((unsigned long)sbundle) % sizeof(bundle_t)) != 0);
246 BUG_ON((((unsigned long)ebundle) % sizeof(bundle_t)) != 0);
247
248 found = NULL;
249 for (i = 0; i < nelems; i++) {
250 const struct paravirt_patch_bundle_elem *p = &elems[i];
251 if (p->type == type) {
252 unsigned long need = p->ebundle - p->sbundle;
253 unsigned long room = ebundle - sbundle;
254
255 if (found != NULL)
256 *found = p;
257
258 if (room < need) {
259 /* no room to replace. skip it */
260 printk(KERN_DEBUG
261 "the space is too small to put "
262 "bundles. type %ld need %ld room %ld\n",
263 type, need, room);
264 break;
265 }
266
267 used = need;
268 memcpy(sbundle, p->sbundle, used);
269 break;
270 }
271 }
272
273 return used;
274}
275
276void __init_or_module
277paravirt_patch_apply_bundle(const struct paravirt_patch_site_bundle *start,
278 const struct paravirt_patch_site_bundle *end)
279{
280 const struct paravirt_patch_site_bundle *p;
281
282 if (noreplace_paravirt)
283 return;
284 if (pv_init_ops.patch_bundle == NULL)
285 return;
286
287 for (p = start; p < end; p++) {
288 unsigned long used;
289
290 used = (*pv_init_ops.patch_bundle)(p->sbundle, p->ebundle,
291 p->type);
292 if (used == 0)
293 continue;
294
295 fill_nop_bundle(p->sbundle + used, p->ebundle);
296 paravirt_flush_i_cache_range(p->sbundle,
297 p->ebundle - p->sbundle);
298 }
299 ia64_sync_i();
300 ia64_srlz_i();
301}
302
303/*
304 * nop.i, nop.m, nop.f instruction are same format.
305 * but nop.b has differennt format.
306 * This doesn't support nop.b for now.
307 */
308static void __init_or_module
309fill_nop_inst(unsigned long stag, unsigned long etag)
310{
311 extern const bundle_t paravirt_nop_mfi_inst_bundle[];
312 unsigned long tag;
313 const ia64_inst_t nop_inst =
314 paravirt_read_slot0(paravirt_nop_mfi_inst_bundle);
315
316 for (tag = stag; tag < etag; tag = paravirt_get_next_tag(tag))
317 paravirt_write_inst(tag, nop_inst);
318}
319
320void __init_or_module
321paravirt_patch_apply_inst(const struct paravirt_patch_site_inst *start,
322 const struct paravirt_patch_site_inst *end)
323{
324 const struct paravirt_patch_site_inst *p;
325
326 if (noreplace_paravirt)
327 return;
328 if (pv_init_ops.patch_inst == NULL)
329 return;
330
331 for (p = start; p < end; p++) {
332 unsigned long tag;
333 bundle_t *sbundle;
334 bundle_t *ebundle;
335
336 tag = (*pv_init_ops.patch_inst)(p->stag, p->etag, p->type);
337 if (tag == p->stag)
338 continue;
339
340 fill_nop_inst(tag, p->etag);
341 sbundle = paravirt_get_bundle(p->stag);
342 ebundle = paravirt_get_bundle(p->etag) + 1;
343 paravirt_flush_i_cache_range(sbundle, (ebundle - sbundle) *
344 sizeof(bundle_t));
345 }
346 ia64_sync_i();
347 ia64_srlz_i();
348}
349#endif /* ASM_SUPPOTED */
350
351/* brl.cond.sptk.many <target64> X3 */
352typedef union inst_x3_op {
353 ia64_inst_t inst;
354 struct {
355 unsigned long qp: 6;
356 unsigned long btyp: 3;
357 unsigned long unused: 3;
358 unsigned long p: 1;
359 unsigned long imm20b: 20;
360 unsigned long wh: 2;
361 unsigned long d: 1;
362 unsigned long i: 1;
363 unsigned long opcode: 4;
364 };
365 unsigned long l;
366} inst_x3_op_t;
367
368typedef union inst_x3_imm {
369 ia64_inst_t inst;
370 struct {
371 unsigned long unused: 2;
372 unsigned long imm39: 39;
373 };
374 unsigned long l;
375} inst_x3_imm_t;
376
377void __init_or_module
378paravirt_patch_reloc_brl(unsigned long tag, const void *target)
379{
380 unsigned long tag_op = paravirt_get_next_tag(tag);
381 unsigned long tag_imm = tag;
382 bundle_t *bundle = paravirt_get_bundle(tag);
383
384 ia64_inst_t inst_op = paravirt_read_inst(tag_op);
385 ia64_inst_t inst_imm = paravirt_read_inst(tag_imm);
386
387 inst_x3_op_t inst_x3_op = { .l = inst_op.l };
388 inst_x3_imm_t inst_x3_imm = { .l = inst_imm.l };
389
390 unsigned long imm60 =
391 ((unsigned long)target - (unsigned long)bundle) >> 4;
392
393 BUG_ON(paravirt_get_slot(tag) != 1); /* MLX */
394 BUG_ON(((unsigned long)target & (sizeof(bundle_t) - 1)) != 0);
395
396 /* imm60[59] 1bit */
397 inst_x3_op.i = (imm60 >> 59) & 1;
398 /* imm60[19:0] 20bit */
399 inst_x3_op.imm20b = imm60 & ((1UL << 20) - 1);
400 /* imm60[58:20] 39bit */
401 inst_x3_imm.imm39 = (imm60 >> 20) & ((1UL << 39) - 1);
402
403 inst_op.l = inst_x3_op.l;
404 inst_imm.l = inst_x3_imm.l;
405
406 paravirt_write_inst(tag_op, inst_op);
407 paravirt_write_inst(tag_imm, inst_imm);
408}
409
410/* br.cond.sptk.many <target25> B1 */
411typedef union inst_b1 {
412 ia64_inst_t inst;
413 struct {
414 unsigned long qp: 6;
415 unsigned long btype: 3;
416 unsigned long unused: 3;
417 unsigned long p: 1;
418 unsigned long imm20b: 20;
419 unsigned long wh: 2;
420 unsigned long d: 1;
421 unsigned long s: 1;
422 unsigned long opcode: 4;
423 };
424 unsigned long l;
425} inst_b1_t;
426
427void __init
428paravirt_patch_reloc_br(unsigned long tag, const void *target)
429{
430 bundle_t *bundle = paravirt_get_bundle(tag);
431 ia64_inst_t inst = paravirt_read_inst(tag);
432 unsigned long target25 = (unsigned long)target - (unsigned long)bundle;
433 inst_b1_t inst_b1;
434
435 BUG_ON(((unsigned long)target & (sizeof(bundle_t) - 1)) != 0);
436
437 inst_b1.l = inst.l;
438 if (target25 & (1UL << 63))
439 inst_b1.s = 1;
440 else
441 inst_b1.s = 0;
442
443 inst_b1.imm20b = target25 >> 4;
444 inst.l = inst_b1.l;
445
446 paravirt_write_inst(tag, inst);
447}
448
449void __init
450__paravirt_patch_apply_branch(
451 unsigned long tag, unsigned long type,
452 const struct paravirt_patch_branch_target *entries,
453 unsigned int nr_entries)
454{
455 unsigned int i;
456 for (i = 0; i < nr_entries; i++) {
457 if (entries[i].type == type) {
458 paravirt_patch_reloc_br(tag, entries[i].entry);
459 break;
460 }
461 }
462}
463
464static void __init
465paravirt_patch_apply_branch(const struct paravirt_patch_site_branch *start,
466 const struct paravirt_patch_site_branch *end)
467{
468 const struct paravirt_patch_site_branch *p;
469
470 if (noreplace_paravirt)
471 return;
472 if (pv_init_ops.patch_branch == NULL)
473 return;
474
475 for (p = start; p < end; p++)
476 (*pv_init_ops.patch_branch)(p->tag, p->type);
477
478 ia64_sync_i();
479 ia64_srlz_i();
480}
481
482void __init
483paravirt_patch_apply(void)
484{
485 extern const char __start_paravirt_bundles[];
486 extern const char __stop_paravirt_bundles[];
487 extern const char __start_paravirt_insts[];
488 extern const char __stop_paravirt_insts[];
489 extern const char __start_paravirt_branches[];
490 extern const char __stop_paravirt_branches[];
491
492 paravirt_patch_apply_bundle((const struct paravirt_patch_site_bundle *)
493 __start_paravirt_bundles,
494 (const struct paravirt_patch_site_bundle *)
495 __stop_paravirt_bundles);
496 paravirt_patch_apply_inst((const struct paravirt_patch_site_inst *)
497 __start_paravirt_insts,
498 (const struct paravirt_patch_site_inst *)
499 __stop_paravirt_insts);
500 paravirt_patch_apply_branch((const struct paravirt_patch_site_branch *)
501 __start_paravirt_branches,
502 (const struct paravirt_patch_site_branch *)
503 __stop_paravirt_branches);
504}
505
506/*
507 * Local variables:
508 * mode: C
509 * c-set-style: "linux"
510 * c-basic-offset: 8
511 * tab-width: 8
512 * indent-tabs-mode: t
513 * End:
514 */
diff --git a/arch/ia64/kernel/paravirt_patchlist.c b/arch/ia64/kernel/paravirt_patchlist.c
new file mode 100644
index 000000000000..b28082a95d45
--- /dev/null
+++ b/arch/ia64/kernel/paravirt_patchlist.c
@@ -0,0 +1,79 @@
1/******************************************************************************
2 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
3 * VA Linux Systems Japan K.K.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#include <linux/bug.h>
22#include <asm/paravirt.h>
23
24#define DECLARE(name) \
25 extern unsigned long \
26 __ia64_native_start_gate_##name##_patchlist[]; \
27 extern unsigned long \
28 __ia64_native_end_gate_##name##_patchlist[]
29
30DECLARE(fsyscall);
31DECLARE(brl_fsys_bubble_down);
32DECLARE(vtop);
33DECLARE(mckinley_e9);
34
35extern unsigned long __start_gate_section[];
36
37#define ASSIGN(name) \
38 .start_##name##_patchlist = \
39 (unsigned long)__ia64_native_start_gate_##name##_patchlist, \
40 .end_##name##_patchlist = \
41 (unsigned long)__ia64_native_end_gate_##name##_patchlist
42
43struct pv_patchdata pv_patchdata __initdata = {
44 ASSIGN(fsyscall),
45 ASSIGN(brl_fsys_bubble_down),
46 ASSIGN(vtop),
47 ASSIGN(mckinley_e9),
48
49 .gate_section = (void*)__start_gate_section,
50};
51
52
53unsigned long __init
54paravirt_get_gate_patchlist(enum pv_gate_patchlist type)
55{
56
57#define CASE(NAME, name) \
58 case PV_GATE_START_##NAME: \
59 return pv_patchdata.start_##name##_patchlist; \
60 case PV_GATE_END_##NAME: \
61 return pv_patchdata.end_##name##_patchlist; \
62
63 switch (type) {
64 CASE(FSYSCALL, fsyscall);
65 CASE(BRL_FSYS_BUBBLE_DOWN, brl_fsys_bubble_down);
66 CASE(VTOP, vtop);
67 CASE(MCKINLEY_E9, mckinley_e9);
68 default:
69 BUG();
70 break;
71 }
72 return 0;
73}
74
75void * __init
76paravirt_get_gate_section(void)
77{
78 return pv_patchdata.gate_section;
79}
diff --git a/arch/ia64/kernel/paravirt_patchlist.h b/arch/ia64/kernel/paravirt_patchlist.h
new file mode 100644
index 000000000000..0684aa6c6507
--- /dev/null
+++ b/arch/ia64/kernel/paravirt_patchlist.h
@@ -0,0 +1,28 @@
1/******************************************************************************
2 * linux/arch/ia64/xen/paravirt_patchlist.h
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#if defined(__IA64_GATE_PARAVIRTUALIZED_XEN)
24#include <asm/xen/patchlist.h>
25#else
26#include <asm/native/patchlist.h>
27#endif
28
diff --git a/arch/ia64/kernel/paravirtentry.S b/arch/ia64/kernel/paravirtentry.S
index 2f42fcb9776a..6158560d7f17 100644
--- a/arch/ia64/kernel/paravirtentry.S
+++ b/arch/ia64/kernel/paravirtentry.S
@@ -20,8 +20,11 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/init.h>
23#include <asm/asmmacro.h> 24#include <asm/asmmacro.h>
24#include <asm/asm-offsets.h> 25#include <asm/asm-offsets.h>
26#include <asm/paravirt_privop.h>
27#include <asm/paravirt_patch.h>
25#include "entry.h" 28#include "entry.h"
26 29
27#define DATA8(sym, init_value) \ 30#define DATA8(sym, init_value) \
@@ -32,29 +35,87 @@
32 data8 init_value ; \ 35 data8 init_value ; \
33 .popsection 36 .popsection
34 37
35#define BRANCH(targ, reg, breg) \ 38#define BRANCH(targ, reg, breg, type) \
36 movl reg=targ ; \ 39 PARAVIRT_PATCH_SITE_BR(PARAVIRT_PATCH_TYPE_BR_ ## type) ; \
37 ;; \ 40 ;; \
38 ld8 reg=[reg] ; \ 41 movl reg=targ ; \
39 ;; \ 42 ;; \
40 mov breg=reg ; \ 43 ld8 reg=[reg] ; \
44 ;; \
45 mov breg=reg ; \
41 br.cond.sptk.many breg 46 br.cond.sptk.many breg
42 47
43#define BRANCH_PROC(sym, reg, breg) \ 48#define BRANCH_PROC(sym, reg, breg, type) \
44 DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \ 49 DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \
45 GLOBAL_ENTRY(paravirt_ ## sym) ; \ 50 GLOBAL_ENTRY(paravirt_ ## sym) ; \
46 BRANCH(paravirt_ ## sym ## _targ, reg, breg) ; \ 51 BRANCH(paravirt_ ## sym ## _targ, reg, breg, type) ; \
47 END(paravirt_ ## sym) 52 END(paravirt_ ## sym)
48 53
49#define BRANCH_PROC_UNWINFO(sym, reg, breg) \ 54#define BRANCH_PROC_UNWINFO(sym, reg, breg, type) \
50 DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \ 55 DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \
51 GLOBAL_ENTRY(paravirt_ ## sym) ; \ 56 GLOBAL_ENTRY(paravirt_ ## sym) ; \
52 PT_REGS_UNWIND_INFO(0) ; \ 57 PT_REGS_UNWIND_INFO(0) ; \
53 BRANCH(paravirt_ ## sym ## _targ, reg, breg) ; \ 58 BRANCH(paravirt_ ## sym ## _targ, reg, breg, type) ; \
54 END(paravirt_ ## sym) 59 END(paravirt_ ## sym)
55 60
56 61
57BRANCH_PROC(switch_to, r22, b7) 62BRANCH_PROC(switch_to, r22, b7, SWITCH_TO)
58BRANCH_PROC_UNWINFO(leave_syscall, r22, b7) 63BRANCH_PROC_UNWINFO(leave_syscall, r22, b7, LEAVE_SYSCALL)
59BRANCH_PROC(work_processed_syscall, r2, b7) 64BRANCH_PROC(work_processed_syscall, r2, b7, WORK_PROCESSED_SYSCALL)
60BRANCH_PROC_UNWINFO(leave_kernel, r22, b7) 65BRANCH_PROC_UNWINFO(leave_kernel, r22, b7, LEAVE_KERNEL)
66
67
68#ifdef CONFIG_MODULES
69#define __INIT_OR_MODULE .text
70#define __INITDATA_OR_MODULE .data
71#else
72#define __INIT_OR_MODULE __INIT
73#define __INITDATA_OR_MODULE __INITDATA
74#endif /* CONFIG_MODULES */
75
76 __INIT_OR_MODULE
77 GLOBAL_ENTRY(paravirt_fc_i)
78 fc.i r32
79 br.ret.sptk.many rp
80 END(paravirt_fc_i)
81 __FINIT
82
83 __INIT_OR_MODULE
84 .align 32
85 GLOBAL_ENTRY(paravirt_nop_b_inst_bundle)
86 {
87 nop.b 0
88 nop.b 0
89 nop.b 0
90 }
91 END(paravirt_nop_b_inst_bundle)
92 __FINIT
93
94 /* NOTE: nop.[mfi] has same format */
95 __INIT_OR_MODULE
96 GLOBAL_ENTRY(paravirt_nop_mfi_inst_bundle)
97 {
98 nop.m 0
99 nop.f 0
100 nop.i 0
101 }
102 END(paravirt_nop_mfi_inst_bundle)
103 __FINIT
104
105 __INIT_OR_MODULE
106 GLOBAL_ENTRY(paravirt_nop_bundle)
107paravirt_nop_bundle_start:
108 {
109 nop 0
110 nop 0
111 nop 0
112 }
113paravirt_nop_bundle_end:
114 END(paravirt_nop_bundle)
115 __FINIT
116
117 __INITDATA_OR_MODULE
118 .align 8
119 .global paravirt_nop_bundle_size
120paravirt_nop_bundle_size:
121 data8 paravirt_nop_bundle_end - paravirt_nop_bundle_start
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index b83b2c516008..68a1311db806 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -7,6 +7,7 @@
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/string.h> 8#include <linux/string.h>
9 9
10#include <asm/paravirt.h>
10#include <asm/patch.h> 11#include <asm/patch.h>
11#include <asm/processor.h> 12#include <asm/processor.h>
12#include <asm/sections.h> 13#include <asm/sections.h>
@@ -169,16 +170,35 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end)
169 ia64_srlz_i(); 170 ia64_srlz_i();
170} 171}
171 172
173extern unsigned long ia64_native_fsyscall_table[NR_syscalls];
174extern char ia64_native_fsys_bubble_down[];
175struct pv_fsys_data pv_fsys_data __initdata = {
176 .fsyscall_table = (unsigned long *)ia64_native_fsyscall_table,
177 .fsys_bubble_down = (void *)ia64_native_fsys_bubble_down,
178};
179
180unsigned long * __init
181paravirt_get_fsyscall_table(void)
182{
183 return pv_fsys_data.fsyscall_table;
184}
185
186char * __init
187paravirt_get_fsys_bubble_down(void)
188{
189 return pv_fsys_data.fsys_bubble_down;
190}
191
172static void __init 192static void __init
173patch_fsyscall_table (unsigned long start, unsigned long end) 193patch_fsyscall_table (unsigned long start, unsigned long end)
174{ 194{
175 extern unsigned long fsyscall_table[NR_syscalls]; 195 u64 fsyscall_table = (u64)paravirt_get_fsyscall_table();
176 s32 *offp = (s32 *) start; 196 s32 *offp = (s32 *) start;
177 u64 ip; 197 u64 ip;
178 198
179 while (offp < (s32 *) end) { 199 while (offp < (s32 *) end) {
180 ip = (u64) ia64_imva((char *) offp + *offp); 200 ip = (u64) ia64_imva((char *) offp + *offp);
181 ia64_patch_imm64(ip, (u64) fsyscall_table); 201 ia64_patch_imm64(ip, fsyscall_table);
182 ia64_fc((void *) ip); 202 ia64_fc((void *) ip);
183 ++offp; 203 ++offp;
184 } 204 }
@@ -189,7 +209,7 @@ patch_fsyscall_table (unsigned long start, unsigned long end)
189static void __init 209static void __init
190patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) 210patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
191{ 211{
192 extern char fsys_bubble_down[]; 212 u64 fsys_bubble_down = (u64)paravirt_get_fsys_bubble_down();
193 s32 *offp = (s32 *) start; 213 s32 *offp = (s32 *) start;
194 u64 ip; 214 u64 ip;
195 215
@@ -207,13 +227,13 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end)
207void __init 227void __init
208ia64_patch_gate (void) 228ia64_patch_gate (void)
209{ 229{
210# define START(name) ((unsigned long) __start_gate_##name##_patchlist) 230# define START(name) paravirt_get_gate_patchlist(PV_GATE_START_##name)
211# define END(name) ((unsigned long)__end_gate_##name##_patchlist) 231# define END(name) paravirt_get_gate_patchlist(PV_GATE_END_##name)
212 232
213 patch_fsyscall_table(START(fsyscall), END(fsyscall)); 233 patch_fsyscall_table(START(FSYSCALL), END(FSYSCALL));
214 patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down)); 234 patch_brl_fsys_bubble_down(START(BRL_FSYS_BUBBLE_DOWN), END(BRL_FSYS_BUBBLE_DOWN));
215 ia64_patch_vtop(START(vtop), END(vtop)); 235 ia64_patch_vtop(START(VTOP), END(VTOP));
216 ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); 236 ia64_patch_mckinley_e9(START(MCKINLEY_E9), END(MCKINLEY_E9));
217} 237}
218 238
219void ia64_patch_phys_stack_reg(unsigned long val) 239void ia64_patch_phys_stack_reg(unsigned long val)
@@ -229,7 +249,7 @@ void ia64_patch_phys_stack_reg(unsigned long val)
229 while (offp < end) { 249 while (offp < end) {
230 ip = (u64) offp + *offp; 250 ip = (u64) offp + *offp;
231 ia64_patch(ip, mask, imm); 251 ia64_patch(ip, mask, imm);
232 ia64_fc(ip); 252 ia64_fc((void *)ip);
233 ++offp; 253 ++offp;
234 } 254 }
235 ia64_sync_i(); 255 ia64_sync_i();
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index d0ada067a4af..eb987386f691 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -32,30 +32,16 @@ int force_iommu __read_mostly = 1;
32int force_iommu __read_mostly; 32int force_iommu __read_mostly;
33#endif 33#endif
34 34
35/* Set this to 1 if there is a HW IOMMU in the system */
36int iommu_detected __read_mostly;
37
38/* Dummy device used for NULL arguments (normally ISA). Better would 35/* Dummy device used for NULL arguments (normally ISA). Better would
39 be probably a smaller DMA mask, but this is bug-to-bug compatible 36 be probably a smaller DMA mask, but this is bug-to-bug compatible
40 to i386. */ 37 to i386. */
41struct device fallback_dev = { 38struct device fallback_dev = {
42 .init_name = "fallback device", 39 .init_name = "fallback device",
43 .coherent_dma_mask = DMA_32BIT_MASK, 40 .coherent_dma_mask = DMA_BIT_MASK(32),
44 .dma_mask = &fallback_dev.coherent_dma_mask, 41 .dma_mask = &fallback_dev.coherent_dma_mask,
45}; 42};
46 43
47void __init pci_iommu_alloc(void) 44extern struct dma_map_ops intel_dma_ops;
48{
49 /*
50 * The order of these functions is important for
51 * fall-back/fail-over reasons
52 */
53 detect_intel_iommu();
54
55#ifdef CONFIG_SWIOTLB
56 pci_swiotlb_init();
57#endif
58}
59 45
60static int __init pci_iommu_init(void) 46static int __init pci_iommu_init(void)
61{ 47{
@@ -79,20 +65,17 @@ iommu_dma_init(void)
79 return; 65 return;
80} 66}
81 67
82struct dma_mapping_ops *dma_ops;
83EXPORT_SYMBOL(dma_ops);
84
85int iommu_dma_supported(struct device *dev, u64 mask) 68int iommu_dma_supported(struct device *dev, u64 mask)
86{ 69{
87 struct dma_mapping_ops *ops = get_dma_ops(dev); 70 struct dma_map_ops *ops = platform_dma_get_ops(dev);
88 71
89 if (ops->dma_supported_op) 72 if (ops->dma_supported)
90 return ops->dma_supported_op(dev, mask); 73 return ops->dma_supported(dev, mask);
91 74
92 /* Copied from i386. Doesn't make much sense, because it will 75 /* Copied from i386. Doesn't make much sense, because it will
93 only work for pci_alloc_coherent. 76 only work for pci_alloc_coherent.
94 The caller just has to use GFP_DMA in this case. */ 77 The caller just has to use GFP_DMA in this case. */
95 if (mask < DMA_24BIT_MASK) 78 if (mask < DMA_BIT_MASK(24))
96 return 0; 79 return 0;
97 80
98 /* Tell the device to use SAC when IOMMU force is on. This 81 /* Tell the device to use SAC when IOMMU force is on. This
@@ -107,7 +90,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
107 SAC for these. Assume all masks <= 40 bits are of this 90 SAC for these. Assume all masks <= 40 bits are of this
108 type. Normally this doesn't make any difference, but gives 91 type. Normally this doesn't make any difference, but gives
109 more gentle handling of IOMMU overflow. */ 92 more gentle handling of IOMMU overflow. */
110 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { 93 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
111 dev_info(dev, "Force SAC with mask %lx\n", mask); 94 dev_info(dev, "Force SAC with mask %lx\n", mask);
112 return 0; 95 return 0;
113 } 96 }
@@ -116,4 +99,25 @@ int iommu_dma_supported(struct device *dev, u64 mask)
116} 99}
117EXPORT_SYMBOL(iommu_dma_supported); 100EXPORT_SYMBOL(iommu_dma_supported);
118 101
102void __init pci_iommu_alloc(void)
103{
104 dma_ops = &intel_dma_ops;
105
106 dma_ops->sync_single_for_cpu = machvec_dma_sync_single;
107 dma_ops->sync_sg_for_cpu = machvec_dma_sync_sg;
108 dma_ops->sync_single_for_device = machvec_dma_sync_single;
109 dma_ops->sync_sg_for_device = machvec_dma_sync_sg;
110 dma_ops->dma_supported = iommu_dma_supported;
111
112 /*
113 * The order of these functions is important for
114 * fall-back/fail-over reasons
115 */
116 detect_intel_iommu();
117
118#ifdef CONFIG_SWIOTLB
119 pci_swiotlb_init();
120#endif
121}
122
119#endif 123#endif
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 16c50516dbc1..573f02c39a00 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -13,23 +13,37 @@
13int swiotlb __read_mostly; 13int swiotlb __read_mostly;
14EXPORT_SYMBOL(swiotlb); 14EXPORT_SYMBOL(swiotlb);
15 15
16struct dma_mapping_ops swiotlb_dma_ops = { 16static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
17 .mapping_error = swiotlb_dma_mapping_error, 17 dma_addr_t *dma_handle, gfp_t gfp)
18 .alloc_coherent = swiotlb_alloc_coherent, 18{
19 if (dev->coherent_dma_mask != DMA_64BIT_MASK)
20 gfp |= GFP_DMA;
21 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
22}
23
24struct dma_map_ops swiotlb_dma_ops = {
25 .alloc_coherent = ia64_swiotlb_alloc_coherent,
19 .free_coherent = swiotlb_free_coherent, 26 .free_coherent = swiotlb_free_coherent,
20 .map_single = swiotlb_map_single, 27 .map_page = swiotlb_map_page,
21 .unmap_single = swiotlb_unmap_single, 28 .unmap_page = swiotlb_unmap_page,
29 .map_sg = swiotlb_map_sg_attrs,
30 .unmap_sg = swiotlb_unmap_sg_attrs,
22 .sync_single_for_cpu = swiotlb_sync_single_for_cpu, 31 .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
23 .sync_single_for_device = swiotlb_sync_single_for_device, 32 .sync_single_for_device = swiotlb_sync_single_for_device,
24 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 33 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
25 .sync_single_range_for_device = swiotlb_sync_single_range_for_device, 34 .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
26 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, 35 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
27 .sync_sg_for_device = swiotlb_sync_sg_for_device, 36 .sync_sg_for_device = swiotlb_sync_sg_for_device,
28 .map_sg = swiotlb_map_sg, 37 .dma_supported = swiotlb_dma_supported,
29 .unmap_sg = swiotlb_unmap_sg, 38 .mapping_error = swiotlb_dma_mapping_error,
30 .dma_supported_op = swiotlb_dma_supported,
31}; 39};
32 40
41void __init swiotlb_dma_init(void)
42{
43 dma_ops = &swiotlb_dma_ops;
44 swiotlb_init();
45}
46
33void __init pci_swiotlb_init(void) 47void __init pci_swiotlb_init(void)
34{ 48{
35 if (!iommu_detected) { 49 if (!iommu_detected) {
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 5c0f408cfd71..8a06dc480594 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -5603,7 +5603,7 @@ pfm_interrupt_handler(int irq, void *arg)
5603 * /proc/perfmon interface, for debug only 5603 * /proc/perfmon interface, for debug only
5604 */ 5604 */
5605 5605
5606#define PFM_PROC_SHOW_HEADER ((void *)NR_CPUS+1) 5606#define PFM_PROC_SHOW_HEADER ((void *)nr_cpu_ids+1)
5607 5607
5608static void * 5608static void *
5609pfm_proc_start(struct seq_file *m, loff_t *pos) 5609pfm_proc_start(struct seq_file *m, loff_t *pos)
@@ -5612,7 +5612,7 @@ pfm_proc_start(struct seq_file *m, loff_t *pos)
5612 return PFM_PROC_SHOW_HEADER; 5612 return PFM_PROC_SHOW_HEADER;
5613 } 5613 }
5614 5614
5615 while (*pos <= NR_CPUS) { 5615 while (*pos <= nr_cpu_ids) {
5616 if (cpu_online(*pos - 1)) { 5616 if (cpu_online(*pos - 1)) {
5617 return (void *)*pos; 5617 return (void *)*pos;
5618 } 5618 }
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index c57162705147..5d7c0e5b9e76 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -413,7 +413,7 @@ ia64_load_extra (struct task_struct *task)
413 * so there is nothing to worry about. 413 * so there is nothing to worry about.
414 */ 414 */
415int 415int
416copy_thread (int nr, unsigned long clone_flags, 416copy_thread(unsigned long clone_flags,
417 unsigned long user_stack_base, unsigned long user_stack_size, 417 unsigned long user_stack_base, unsigned long user_stack_size,
418 struct task_struct *p, struct pt_regs *regs) 418 struct task_struct *p, struct pt_regs *regs)
419{ 419{
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index ecb9eb78d687..7053c55b7649 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -317,7 +317,7 @@ retry:
317 } 317 }
318 318
319 n = data->cpu_check; 319 n = data->cpu_check;
320 for (i = 0; i < NR_CPUS; i++) { 320 for (i = 0; i < nr_cpu_ids; i++) {
321 if (cpu_isset(n, data->cpu_event)) { 321 if (cpu_isset(n, data->cpu_event)) {
322 if (!cpu_online(n)) { 322 if (!cpu_online(n)) {
323 cpu_clear(n, data->cpu_event); 323 cpu_clear(n, data->cpu_event);
@@ -326,7 +326,7 @@ retry:
326 cpu = n; 326 cpu = n;
327 break; 327 break;
328 } 328 }
329 if (++n == NR_CPUS) 329 if (++n == nr_cpu_ids)
330 n = 0; 330 n = 0;
331 } 331 }
332 332
@@ -337,7 +337,7 @@ retry:
337 337
338 /* for next read, start checking at next CPU */ 338 /* for next read, start checking at next CPU */
339 data->cpu_check = cpu; 339 data->cpu_check = cpu;
340 if (++data->cpu_check == NR_CPUS) 340 if (++data->cpu_check == nr_cpu_ids)
341 data->cpu_check = 0; 341 data->cpu_check = 0;
342 342
343 snprintf(cmd, sizeof(cmd), "read %d\n", cpu); 343 snprintf(cmd, sizeof(cmd), "read %d\n", cpu);
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 865af27c7737..714066aeda7f 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -52,6 +52,7 @@
52#include <asm/meminit.h> 52#include <asm/meminit.h>
53#include <asm/page.h> 53#include <asm/page.h>
54#include <asm/paravirt.h> 54#include <asm/paravirt.h>
55#include <asm/paravirt_patch.h>
55#include <asm/patch.h> 56#include <asm/patch.h>
56#include <asm/pgtable.h> 57#include <asm/pgtable.h>
57#include <asm/processor.h> 58#include <asm/processor.h>
@@ -537,6 +538,7 @@ setup_arch (char **cmdline_p)
537 paravirt_arch_setup_early(); 538 paravirt_arch_setup_early();
538 539
539 ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); 540 ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
541 paravirt_patch_apply();
540 542
541 *cmdline_p = __va(ia64_boot_param->command_line); 543 *cmdline_p = __va(ia64_boot_param->command_line);
542 strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE); 544 strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
@@ -730,10 +732,10 @@ static void *
730c_start (struct seq_file *m, loff_t *pos) 732c_start (struct seq_file *m, loff_t *pos)
731{ 733{
732#ifdef CONFIG_SMP 734#ifdef CONFIG_SMP
733 while (*pos < NR_CPUS && !cpu_isset(*pos, cpu_online_map)) 735 while (*pos < nr_cpu_ids && !cpu_online(*pos))
734 ++*pos; 736 ++*pos;
735#endif 737#endif
736 return *pos < NR_CPUS ? cpu_data(*pos) : NULL; 738 return *pos < nr_cpu_ids ? cpu_data(*pos) : NULL;
737} 739}
738 740
739static void * 741static void *
@@ -1016,8 +1018,7 @@ cpu_init (void)
1016 | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); 1018 | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
1017 atomic_inc(&init_mm.mm_count); 1019 atomic_inc(&init_mm.mm_count);
1018 current->active_mm = &init_mm; 1020 current->active_mm = &init_mm;
1019 if (current->mm) 1021 BUG_ON(current->mm);
1020 BUG();
1021 1022
1022 ia64_mmu_init(ia64_imva(cpu_data)); 1023 ia64_mmu_init(ia64_imva(cpu_data));
1023 ia64_mca_cpu_init(ia64_imva(cpu_data)); 1024 ia64_mca_cpu_init(ia64_imva(cpu_data));
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index da8f020d82c1..2ea4199d9c57 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -166,11 +166,11 @@ send_IPI_allbutself (int op)
166 * Called with preemption disabled. 166 * Called with preemption disabled.
167 */ 167 */
168static inline void 168static inline void
169send_IPI_mask(cpumask_t mask, int op) 169send_IPI_mask(const struct cpumask *mask, int op)
170{ 170{
171 unsigned int cpu; 171 unsigned int cpu;
172 172
173 for_each_cpu_mask(cpu, mask) { 173 for_each_cpu(cpu, mask) {
174 send_IPI_single(cpu, op); 174 send_IPI_single(cpu, op);
175 } 175 }
176} 176}
@@ -316,7 +316,7 @@ void arch_send_call_function_single_ipi(int cpu)
316 send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE); 316 send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE);
317} 317}
318 318
319void arch_send_call_function_ipi(cpumask_t mask) 319void arch_send_call_function_ipi_mask(const struct cpumask *mask)
320{ 320{
321 send_IPI_mask(mask, IPI_CALL_FUNC); 321 send_IPI_mask(mask, IPI_CALL_FUNC);
322} 322}
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 52290547c85b..7700e23034bb 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -581,14 +581,14 @@ smp_build_cpu_map (void)
581 581
582 ia64_cpu_to_sapicid[0] = boot_cpu_id; 582 ia64_cpu_to_sapicid[0] = boot_cpu_id;
583 cpus_clear(cpu_present_map); 583 cpus_clear(cpu_present_map);
584 cpu_set(0, cpu_present_map); 584 set_cpu_present(0, true);
585 cpu_set(0, cpu_possible_map); 585 set_cpu_possible(0, true);
586 for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { 586 for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) {
587 sapicid = smp_boot_data.cpu_phys_id[i]; 587 sapicid = smp_boot_data.cpu_phys_id[i];
588 if (sapicid == boot_cpu_id) 588 if (sapicid == boot_cpu_id)
589 continue; 589 continue;
590 cpu_set(cpu, cpu_present_map); 590 set_cpu_present(cpu, true);
591 cpu_set(cpu, cpu_possible_map); 591 set_cpu_possible(cpu, true);
592 ia64_cpu_to_sapicid[cpu] = sapicid; 592 ia64_cpu_to_sapicid[cpu] = sapicid;
593 cpu++; 593 cpu++;
594 } 594 }
@@ -626,12 +626,9 @@ smp_prepare_cpus (unsigned int max_cpus)
626 */ 626 */
627 if (!max_cpus) { 627 if (!max_cpus) {
628 printk(KERN_INFO "SMP mode deactivated.\n"); 628 printk(KERN_INFO "SMP mode deactivated.\n");
629 cpus_clear(cpu_online_map); 629 init_cpu_online(cpumask_of(0));
630 cpus_clear(cpu_present_map); 630 init_cpu_present(cpumask_of(0));
631 cpus_clear(cpu_possible_map); 631 init_cpu_possible(cpumask_of(0));
632 cpu_set(0, cpu_online_map);
633 cpu_set(0, cpu_present_map);
634 cpu_set(0, cpu_possible_map);
635 return; 632 return;
636 } 633 }
637} 634}
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index f0ebb342409d..641c8b61c4f1 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -20,6 +20,7 @@
20#include <linux/efi.h> 20#include <linux/efi.h>
21#include <linux/timex.h> 21#include <linux/timex.h>
22#include <linux/clocksource.h> 22#include <linux/clocksource.h>
23#include <linux/platform_device.h>
23 24
24#include <asm/machvec.h> 25#include <asm/machvec.h>
25#include <asm/delay.h> 26#include <asm/delay.h>
@@ -50,6 +51,15 @@ EXPORT_SYMBOL(last_cli_ip);
50#endif 51#endif
51 52
52#ifdef CONFIG_PARAVIRT 53#ifdef CONFIG_PARAVIRT
54/* We need to define a real function for sched_clock, to override the
55 weak default version */
56unsigned long long sched_clock(void)
57{
58 return paravirt_sched_clock();
59}
60#endif
61
62#ifdef CONFIG_PARAVIRT
53static void 63static void
54paravirt_clocksource_resume(void) 64paravirt_clocksource_resume(void)
55{ 65{
@@ -405,6 +415,21 @@ static struct irqaction timer_irqaction = {
405 .name = "timer" 415 .name = "timer"
406}; 416};
407 417
418static struct platform_device rtc_efi_dev = {
419 .name = "rtc-efi",
420 .id = -1,
421};
422
423static int __init rtc_init(void)
424{
425 if (platform_device_register(&rtc_efi_dev) < 0)
426 printk(KERN_ERR "unable to register rtc device...\n");
427
428 /* not necessarily an error */
429 return 0;
430}
431module_init(rtc_init);
432
408void __init 433void __init
409time_init (void) 434time_init (void)
410{ 435{
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 3765efc5f963..4a95e86b9ac2 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -169,6 +169,30 @@ SECTIONS
169 __end___mckinley_e9_bundles = .; 169 __end___mckinley_e9_bundles = .;
170 } 170 }
171 171
172#if defined(CONFIG_PARAVIRT)
173 . = ALIGN(16);
174 .paravirt_bundles : AT(ADDR(.paravirt_bundles) - LOAD_OFFSET)
175 {
176 __start_paravirt_bundles = .;
177 *(.paravirt_bundles)
178 __stop_paravirt_bundles = .;
179 }
180 . = ALIGN(16);
181 .paravirt_insts : AT(ADDR(.paravirt_insts) - LOAD_OFFSET)
182 {
183 __start_paravirt_insts = .;
184 *(.paravirt_insts)
185 __stop_paravirt_insts = .;
186 }
187 . = ALIGN(16);
188 .paravirt_branches : AT(ADDR(.paravirt_branches) - LOAD_OFFSET)
189 {
190 __start_paravirt_branches = .;
191 *(.paravirt_branches)
192 __stop_paravirt_branches = .;
193 }
194#endif
195
172#if defined(CONFIG_IA64_GENERIC) 196#if defined(CONFIG_IA64_GENERIC)
173 /* Machine Vector */ 197 /* Machine Vector */
174 . = ALIGN(16); 198 . = ALIGN(16);
@@ -201,6 +225,12 @@ SECTIONS
201 __start_gate_section = .; 225 __start_gate_section = .;
202 *(.data.gate) 226 *(.data.gate)
203 __stop_gate_section = .; 227 __stop_gate_section = .;
228#ifdef CONFIG_XEN
229 . = ALIGN(PAGE_SIZE);
230 __xen_start_gate_section = .;
231 *(.data.gate.xen)
232 __xen_stop_gate_section = .;
233#endif
204 } 234 }
205 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose 235 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
206 * kernel data 236 * kernel data
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 076b00d1dbff..28af6a731bb8 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -70,7 +70,7 @@ static void kvm_flush_icache(unsigned long start, unsigned long len)
70 int l; 70 int l;
71 71
72 for (l = 0; l < (len + 32); l += 32) 72 for (l = 0; l < (len + 32); l += 32)
73 ia64_fc(start + l); 73 ia64_fc((void *)(start + l));
74 74
75 ia64_sync_i(); 75 ia64_sync_i();
76 ia64_srlz_i(); 76 ia64_srlz_i();
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c
index d4d280505878..a18ee17b9192 100644
--- a/arch/ia64/kvm/vcpu.c
+++ b/arch/ia64/kvm/vcpu.c
@@ -386,7 +386,7 @@ void set_rse_reg(struct kvm_pt_regs *regs, unsigned long r1,
386 else 386 else
387 *rnat_addr = (*rnat_addr) & (~nat_mask); 387 *rnat_addr = (*rnat_addr) & (~nat_mask);
388 388
389 ia64_setreg(_IA64_REG_AR_BSPSTORE, bspstore); 389 ia64_setreg(_IA64_REG_AR_BSPSTORE, (unsigned long)bspstore);
390 ia64_setreg(_IA64_REG_AR_RNAT, rnat); 390 ia64_setreg(_IA64_REG_AR_RNAT, rnat);
391 } 391 }
392 local_irq_restore(psr); 392 local_irq_restore(psr);
diff --git a/arch/ia64/kvm/vtlb.c b/arch/ia64/kvm/vtlb.c
index 38232b37668b..2c2501f13159 100644
--- a/arch/ia64/kvm/vtlb.c
+++ b/arch/ia64/kvm/vtlb.c
@@ -210,6 +210,7 @@ void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte, u64 itir, u64 va, int type)
210 phy_pte &= ~PAGE_FLAGS_RV_MASK; 210 phy_pte &= ~PAGE_FLAGS_RV_MASK;
211 psr = ia64_clear_ic(); 211 psr = ia64_clear_ic();
212 ia64_itc(type, va, phy_pte, itir_ps(itir)); 212 ia64_itc(type, va, phy_pte, itir_ps(itir));
213 paravirt_dv_serialize_data();
213 ia64_set_psr(psr); 214 ia64_set_psr(psr);
214 } 215 }
215 216
@@ -456,6 +457,7 @@ void thash_purge_and_insert(struct kvm_vcpu *v, u64 pte, u64 itir,
456 phy_pte &= ~PAGE_FLAGS_RV_MASK; 457 phy_pte &= ~PAGE_FLAGS_RV_MASK;
457 psr = ia64_clear_ic(); 458 psr = ia64_clear_ic();
458 ia64_itc(type, ifa, phy_pte, ps); 459 ia64_itc(type, ifa, phy_pte, ps);
460 paravirt_dv_serialize_data();
459 ia64_set_psr(psr); 461 ia64_set_psr(psr);
460 } 462 }
461 if (!(pte&VTLB_PTE_IO)) 463 if (!(pte&VTLB_PTE_IO))
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 56e12903973c..c0f3bee69042 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -35,6 +35,7 @@
35#include <asm/uaccess.h> 35#include <asm/uaccess.h>
36#include <asm/unistd.h> 36#include <asm/unistd.h>
37#include <asm/mca.h> 37#include <asm/mca.h>
38#include <asm/paravirt.h>
38 39
39DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 40DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
40 41
@@ -259,6 +260,7 @@ put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
259static void __init 260static void __init
260setup_gate (void) 261setup_gate (void)
261{ 262{
263 void *gate_section;
262 struct page *page; 264 struct page *page;
263 265
264 /* 266 /*
@@ -266,10 +268,11 @@ setup_gate (void)
266 * headers etc. and once execute-only page to enable 268 * headers etc. and once execute-only page to enable
267 * privilege-promotion via "epc": 269 * privilege-promotion via "epc":
268 */ 270 */
269 page = virt_to_page(ia64_imva(__start_gate_section)); 271 gate_section = paravirt_get_gate_section();
272 page = virt_to_page(ia64_imva(gate_section));
270 put_kernel_page(page, GATE_ADDR, PAGE_READONLY); 273 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
271#ifdef HAVE_BUGGY_SEGREL 274#ifdef HAVE_BUGGY_SEGREL
272 page = virt_to_page(ia64_imva(__start_gate_section + PAGE_SIZE)); 275 page = virt_to_page(ia64_imva(gate_section + PAGE_SIZE));
273 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); 276 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
274#else 277#else
275 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); 278 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
@@ -633,8 +636,7 @@ mem_init (void)
633#endif 636#endif
634 637
635#ifdef CONFIG_FLATMEM 638#ifdef CONFIG_FLATMEM
636 if (!mem_map) 639 BUG_ON(!mem_map);
637 BUG();
638 max_mapnr = max_low_pfn; 640 max_mapnr = max_low_pfn;
639#endif 641#endif
640 642
@@ -667,8 +669,8 @@ mem_init (void)
667 * code can tell them apart. 669 * code can tell them apart.
668 */ 670 */
669 for (i = 0; i < NR_syscalls; ++i) { 671 for (i = 0; i < NR_syscalls; ++i) {
670 extern unsigned long fsyscall_table[NR_syscalls];
671 extern unsigned long sys_call_table[NR_syscalls]; 672 extern unsigned long sys_call_table[NR_syscalls];
673 unsigned long *fsyscall_table = paravirt_get_fsyscall_table();
672 674
673 if (!fsyscall_table[i] || nolwsys) 675 if (!fsyscall_table[i] || nolwsys)
674 fsyscall_table[i] = sys_call_table[i] | 1; 676 fsyscall_table[i] = sys_call_table[i] | 1;
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index bd9818a36b47..b9f3d7bbb338 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -309,7 +309,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start,
309 309
310 preempt_disable(); 310 preempt_disable();
311#ifdef CONFIG_SMP 311#ifdef CONFIG_SMP
312 if (mm != current->active_mm || cpus_weight(mm->cpu_vm_mask) != 1) { 312 if (mm != current->active_mm || cpumask_weight(mm_cpumask(mm)) != 1) {
313 platform_global_tlb_purge(mm, start, end, nbits); 313 platform_global_tlb_purge(mm, start, end, nbits);
314 preempt_enable(); 314 preempt_enable();
315 return; 315 return;
diff --git a/arch/ia64/scripts/pvcheck.sed b/arch/ia64/scripts/pvcheck.sed
index ba66ac2e4c60..e59809a3fc01 100644
--- a/arch/ia64/scripts/pvcheck.sed
+++ b/arch/ia64/scripts/pvcheck.sed
@@ -17,6 +17,7 @@ s/mov.*=.*cr\.iip/.warning \"cr.iip should not used directly\"/g
17s/mov.*=.*cr\.ivr/.warning \"cr.ivr should not used directly\"/g 17s/mov.*=.*cr\.ivr/.warning \"cr.ivr should not used directly\"/g
18s/mov.*=[^\.]*psr/.warning \"psr should not used directly\"/g # avoid ar.fpsr 18s/mov.*=[^\.]*psr/.warning \"psr should not used directly\"/g # avoid ar.fpsr
19s/mov.*=.*ar\.eflags/.warning \"ar.eflags should not used directly\"/g 19s/mov.*=.*ar\.eflags/.warning \"ar.eflags should not used directly\"/g
20s/mov.*=.*ar\.itc.*/.warning \"ar.itc should not used directly\"/g
20s/mov.*cr\.ifa.*=.*/.warning \"cr.ifa should not used directly\"/g 21s/mov.*cr\.ifa.*=.*/.warning \"cr.ifa should not used directly\"/g
21s/mov.*cr\.itir.*=.*/.warning \"cr.itir should not used directly\"/g 22s/mov.*cr\.itir.*=.*/.warning \"cr.itir should not used directly\"/g
22s/mov.*cr\.iha.*=.*/.warning \"cr.iha should not used directly\"/g 23s/mov.*cr\.iha.*=.*/.warning \"cr.iha should not used directly\"/g
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 0d4ffa4da1da..57f280dd9def 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -135,8 +135,7 @@ static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
135 } 135 }
136 136
137 war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); 137 war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL);
138 if (!war_list) 138 BUG_ON(!war_list);
139 BUG();
140 139
141 SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, 140 SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,
142 nasid, widget, __pa(war_list), 0, 0, 0 ,0); 141 nasid, widget, __pa(war_list), 0, 0, 0 ,0);
@@ -180,23 +179,20 @@ sn_common_hubdev_init(struct hubdev_info *hubdev)
180 sizeof(struct sn_flush_device_kernel *); 179 sizeof(struct sn_flush_device_kernel *);
181 hubdev->hdi_flush_nasid_list.widget_p = 180 hubdev->hdi_flush_nasid_list.widget_p =
182 kzalloc(size, GFP_KERNEL); 181 kzalloc(size, GFP_KERNEL);
183 if (!hubdev->hdi_flush_nasid_list.widget_p) 182 BUG_ON(!hubdev->hdi_flush_nasid_list.widget_p);
184 BUG();
185 183
186 for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) { 184 for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
187 size = DEV_PER_WIDGET * 185 size = DEV_PER_WIDGET *
188 sizeof(struct sn_flush_device_kernel); 186 sizeof(struct sn_flush_device_kernel);
189 sn_flush_device_kernel = kzalloc(size, GFP_KERNEL); 187 sn_flush_device_kernel = kzalloc(size, GFP_KERNEL);
190 if (!sn_flush_device_kernel) 188 BUG_ON(!sn_flush_device_kernel);
191 BUG();
192 189
193 dev_entry = sn_flush_device_kernel; 190 dev_entry = sn_flush_device_kernel;
194 for (device = 0; device < DEV_PER_WIDGET; 191 for (device = 0; device < DEV_PER_WIDGET;
195 device++, dev_entry++) { 192 device++, dev_entry++) {
196 size = sizeof(struct sn_flush_device_common); 193 size = sizeof(struct sn_flush_device_common);
197 dev_entry->common = kzalloc(size, GFP_KERNEL); 194 dev_entry->common = kzalloc(size, GFP_KERNEL);
198 if (!dev_entry->common) 195 BUG_ON(!dev_entry->common);
199 BUG();
200 if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST)) 196 if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST))
201 status = sal_get_device_dmaflush_list( 197 status = sal_get_device_dmaflush_list(
202 hubdev->hdi_nasid, widget, device, 198 hubdev->hdi_nasid, widget, device,
@@ -326,8 +322,7 @@ sn_common_bus_fixup(struct pci_bus *bus,
326 */ 322 */
327 controller->platform_data = kzalloc(sizeof(struct sn_platform_data), 323 controller->platform_data = kzalloc(sizeof(struct sn_platform_data),
328 GFP_KERNEL); 324 GFP_KERNEL);
329 if (controller->platform_data == NULL) 325 BUG_ON(controller->platform_data == NULL);
330 BUG();
331 sn_platform_data = 326 sn_platform_data =
332 (struct sn_platform_data *) controller->platform_data; 327 (struct sn_platform_data *) controller->platform_data;
333 sn_platform_data->provider_soft = provider_soft; 328 sn_platform_data->provider_soft = provider_soft;
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index e2eb2da60f96..ee774c366a06 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -128,8 +128,7 @@ sn_legacy_pci_window_fixup(struct pci_controller *controller,
128{ 128{
129 controller->window = kcalloc(2, sizeof(struct pci_window), 129 controller->window = kcalloc(2, sizeof(struct pci_window),
130 GFP_KERNEL); 130 GFP_KERNEL);
131 if (controller->window == NULL) 131 BUG_ON(controller->window == NULL);
132 BUG();
133 controller->window[0].offset = legacy_io; 132 controller->window[0].offset = legacy_io;
134 controller->window[0].resource.name = "legacy_io"; 133 controller->window[0].resource.name = "legacy_io";
135 controller->window[0].resource.flags = IORESOURCE_IO; 134 controller->window[0].resource.flags = IORESOURCE_IO;
@@ -168,8 +167,7 @@ sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
168 idx = controller->windows; 167 idx = controller->windows;
169 new_count = controller->windows + count; 168 new_count = controller->windows + count;
170 new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL); 169 new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
171 if (new_window == NULL) 170 BUG_ON(new_window == NULL);
172 BUG();
173 if (controller->window) { 171 if (controller->window) {
174 memcpy(new_window, controller->window, 172 memcpy(new_window, controller->window,
175 sizeof(struct pci_window) * controller->windows); 173 sizeof(struct pci_window) * controller->windows);
@@ -222,8 +220,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
222 (u64) __pa(pcidev_info), 220 (u64) __pa(pcidev_info),
223 (u64) __pa(sn_irq_info)); 221 (u64) __pa(sn_irq_info));
224 222
225 if (status) 223 BUG_ON(status); /* Cannot get platform pci device information */
226 BUG(); /* Cannot get platform pci device information */
227 224
228 225
229 /* Copy over PIO Mapped Addresses */ 226 /* Copy over PIO Mapped Addresses */
@@ -307,8 +304,7 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
307 prom_bussoft_ptr = __va(prom_bussoft_ptr); 304 prom_bussoft_ptr = __va(prom_bussoft_ptr);
308 305
309 controller = kzalloc(sizeof(*controller), GFP_KERNEL); 306 controller = kzalloc(sizeof(*controller), GFP_KERNEL);
310 if (!controller) 307 BUG_ON(!controller);
311 BUG();
312 controller->segment = segment; 308 controller->segment = segment;
313 309
314 /* 310 /*
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 02c5b8a9fb60..e456f062f241 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -732,8 +732,7 @@ void __init build_cnode_tables(void)
732 kl_config_hdr_t *klgraph_header; 732 kl_config_hdr_t *klgraph_header;
733 nasid = cnodeid_to_nasid(node); 733 nasid = cnodeid_to_nasid(node);
734 klgraph_header = ia64_sn_get_klconfig_addr(nasid); 734 klgraph_header = ia64_sn_get_klconfig_addr(nasid);
735 if (klgraph_header == NULL) 735 BUG_ON(klgraph_header == NULL);
736 BUG();
737 brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info); 736 brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info);
738 while (brd) { 737 while (brd) {
739 if (board_needs_cnode(brd->brd_type) && physical_node_map[brd->brd_nasid] < 0) { 738 if (board_needs_cnode(brd->brd_type) && physical_node_map[brd->brd_nasid] < 0) {
@@ -750,7 +749,7 @@ nasid_slice_to_cpuid(int nasid, int slice)
750{ 749{
751 long cpu; 750 long cpu;
752 751
753 for (cpu = 0; cpu < NR_CPUS; cpu++) 752 for (cpu = 0; cpu < nr_cpu_ids; cpu++)
754 if (cpuid_to_nasid(cpu) == nasid && 753 if (cpuid_to_nasid(cpu) == nasid &&
755 cpuid_to_slice(cpu) == slice) 754 cpuid_to_slice(cpu) == slice)
756 return cpu; 755 return cpu;
diff --git a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c
index 4dcce3d0e04c..e63328818643 100644
--- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c
+++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c
@@ -225,7 +225,6 @@ static struct proc_dir_entry *sgi_prominfo_entry;
225int __init prominfo_init(void) 225int __init prominfo_init(void)
226{ 226{
227 struct proc_dir_entry **entp; 227 struct proc_dir_entry **entp;
228 struct proc_dir_entry *p;
229 cnodeid_t cnodeid; 228 cnodeid_t cnodeid;
230 unsigned long nasid; 229 unsigned long nasid;
231 int size; 230 int size;
@@ -246,14 +245,10 @@ int __init prominfo_init(void)
246 sprintf(name, "node%d", cnodeid); 245 sprintf(name, "node%d", cnodeid);
247 *entp = proc_mkdir(name, sgi_prominfo_entry); 246 *entp = proc_mkdir(name, sgi_prominfo_entry);
248 nasid = cnodeid_to_nasid(cnodeid); 247 nasid = cnodeid_to_nasid(cnodeid);
249 p = create_proc_read_entry("fit", 0, *entp, read_fit_entry, 248 create_proc_read_entry("fit", 0, *entp, read_fit_entry,
250 (void *)nasid); 249 (void *)nasid);
251 if (p) 250 create_proc_read_entry("version", 0, *entp,
252 p->owner = THIS_MODULE;
253 p = create_proc_read_entry("version", 0, *entp,
254 read_version_entry, (void *)nasid); 251 read_version_entry, (void *)nasid);
255 if (p)
256 p->owner = THIS_MODULE;
257 entp++; 252 entp++;
258 } 253 }
259 254
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index e585f9a2afb9..1176506b2bae 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -133,7 +133,7 @@ sn2_ipi_flush_all_tlb(struct mm_struct *mm)
133 unsigned long itc; 133 unsigned long itc;
134 134
135 itc = ia64_get_itc(); 135 itc = ia64_get_itc();
136 smp_flush_tlb_cpumask(mm->cpu_vm_mask); 136 smp_flush_tlb_cpumask(*mm_cpumask(mm));
137 itc = ia64_get_itc() - itc; 137 itc = ia64_get_itc() - itc;
138 __get_cpu_var(ptcstats).shub_ipi_flushes_itc_clocks += itc; 138 __get_cpu_var(ptcstats).shub_ipi_flushes_itc_clocks += itc;
139 __get_cpu_var(ptcstats).shub_ipi_flushes++; 139 __get_cpu_var(ptcstats).shub_ipi_flushes++;
@@ -182,7 +182,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
182 nodes_clear(nodes_flushed); 182 nodes_clear(nodes_flushed);
183 i = 0; 183 i = 0;
184 184
185 for_each_cpu_mask(cpu, mm->cpu_vm_mask) { 185 for_each_cpu(cpu, mm_cpumask(mm)) {
186 cnode = cpu_to_node(cpu); 186 cnode = cpu_to_node(cpu);
187 node_set(cnode, nodes_flushed); 187 node_set(cnode, nodes_flushed);
188 lcpu = cpu; 188 lcpu = cpu;
@@ -461,7 +461,7 @@ bool sn_cpu_disable_allowed(int cpu)
461 461
462static void *sn2_ptc_seq_start(struct seq_file *file, loff_t * offset) 462static void *sn2_ptc_seq_start(struct seq_file *file, loff_t * offset)
463{ 463{
464 if (*offset < NR_CPUS) 464 if (*offset < nr_cpu_ids)
465 return offset; 465 return offset;
466 return NULL; 466 return NULL;
467} 467}
@@ -469,7 +469,7 @@ static void *sn2_ptc_seq_start(struct seq_file *file, loff_t * offset)
469static void *sn2_ptc_seq_next(struct seq_file *file, void *data, loff_t * offset) 469static void *sn2_ptc_seq_next(struct seq_file *file, void *data, loff_t * offset)
470{ 470{
471 (*offset)++; 471 (*offset)++;
472 if (*offset < NR_CPUS) 472 if (*offset < nr_cpu_ids)
473 return offset; 473 return offset;
474 return NULL; 474 return NULL;
475} 475}
@@ -491,7 +491,7 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
491 seq_printf(file, "# ptctest %d, flushopt %d\n", sn2_ptctest, sn2_flush_opt); 491 seq_printf(file, "# ptctest %d, flushopt %d\n", sn2_ptctest, sn2_flush_opt);
492 } 492 }
493 493
494 if (cpu < NR_CPUS && cpu_online(cpu)) { 494 if (cpu < nr_cpu_ids && cpu_online(cpu)) {
495 stat = &per_cpu(ptcstats, cpu); 495 stat = &per_cpu(ptcstats, cpu);
496 seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l, 496 seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l,
497 stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed, 497 stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed,
@@ -554,7 +554,7 @@ static int __init sn2_ptc_init(void)
554 554
555 proc_sn2_ptc = proc_create(PTC_BASENAME, 0444, 555 proc_sn2_ptc = proc_create(PTC_BASENAME, 0444,
556 NULL, &proc_sn2_ptc_operations); 556 NULL, &proc_sn2_ptc_operations);
557 if (!&proc_sn2_ptc_operations) { 557 if (!proc_sn2_ptc) {
558 printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); 558 printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME);
559 return -EINVAL; 559 return -EINVAL;
560 } 560 }
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index be339477f906..9e6491cf72bd 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -275,8 +275,7 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
275 275
276 /* get it's interconnect topology */ 276 /* get it's interconnect topology */
277 sz = op->ports * sizeof(struct sn_hwperf_port_info); 277 sz = op->ports * sizeof(struct sn_hwperf_port_info);
278 if (sz > sizeof(ptdata)) 278 BUG_ON(sz > sizeof(ptdata));
279 BUG();
280 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, 279 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
281 SN_HWPERF_ENUM_PORTS, nodeobj->id, sz, 280 SN_HWPERF_ENUM_PORTS, nodeobj->id, sz,
282 (u64)&ptdata, 0, 0, NULL); 281 (u64)&ptdata, 0, 0, NULL);
@@ -310,8 +309,7 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
310 if (router && (!found_cpu || !found_mem)) { 309 if (router && (!found_cpu || !found_mem)) {
311 /* search for a node connected to the same router */ 310 /* search for a node connected to the same router */
312 sz = router->ports * sizeof(struct sn_hwperf_port_info); 311 sz = router->ports * sizeof(struct sn_hwperf_port_info);
313 if (sz > sizeof(ptdata)) 312 BUG_ON(sz > sizeof(ptdata));
314 BUG();
315 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, 313 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
316 SN_HWPERF_ENUM_PORTS, router->id, sz, 314 SN_HWPERF_ENUM_PORTS, router->id, sz,
317 (u64)&ptdata, 0, 0, NULL); 315 (u64)&ptdata, 0, 0, NULL);
@@ -612,7 +610,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
612 op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK; 610 op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK;
613 611
614 if (cpu != SN_HWPERF_ARG_ANY_CPU) { 612 if (cpu != SN_HWPERF_ARG_ANY_CPU) {
615 if (cpu >= NR_CPUS || !cpu_online(cpu)) { 613 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
616 r = -EINVAL; 614 r = -EINVAL;
617 goto out; 615 goto out;
618 } 616 }
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
index 863f5017baae..d876423e4e75 100644
--- a/arch/ia64/sn/pci/pci_dma.c
+++ b/arch/ia64/sn/pci/pci_dma.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/dma-attrs.h> 13#include <linux/dma-mapping.h>
14#include <asm/dma.h> 14#include <asm/dma.h>
15#include <asm/sn/intr.h> 15#include <asm/sn/intr.h>
16#include <asm/sn/pcibus_provider_defs.h> 16#include <asm/sn/pcibus_provider_defs.h>
@@ -31,7 +31,7 @@
31 * this function. Of course, SN only supports devices that have 32 or more 31 * this function. Of course, SN only supports devices that have 32 or more
32 * address bits when using the PMU. 32 * address bits when using the PMU.
33 */ 33 */
34int sn_dma_supported(struct device *dev, u64 mask) 34static int sn_dma_supported(struct device *dev, u64 mask)
35{ 35{
36 BUG_ON(dev->bus != &pci_bus_type); 36 BUG_ON(dev->bus != &pci_bus_type);
37 37
@@ -39,7 +39,6 @@ int sn_dma_supported(struct device *dev, u64 mask)
39 return 0; 39 return 0;
40 return 1; 40 return 1;
41} 41}
42EXPORT_SYMBOL(sn_dma_supported);
43 42
44/** 43/**
45 * sn_dma_set_mask - set the DMA mask 44 * sn_dma_set_mask - set the DMA mask
@@ -75,8 +74,8 @@ EXPORT_SYMBOL(sn_dma_set_mask);
75 * queue for a SCSI controller). See Documentation/DMA-API.txt for 74 * queue for a SCSI controller). See Documentation/DMA-API.txt for
76 * more information. 75 * more information.
77 */ 76 */
78void *sn_dma_alloc_coherent(struct device *dev, size_t size, 77static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
79 dma_addr_t * dma_handle, gfp_t flags) 78 dma_addr_t * dma_handle, gfp_t flags)
80{ 79{
81 void *cpuaddr; 80 void *cpuaddr;
82 unsigned long phys_addr; 81 unsigned long phys_addr;
@@ -124,7 +123,6 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size,
124 123
125 return cpuaddr; 124 return cpuaddr;
126} 125}
127EXPORT_SYMBOL(sn_dma_alloc_coherent);
128 126
129/** 127/**
130 * sn_pci_free_coherent - free memory associated with coherent DMAable region 128 * sn_pci_free_coherent - free memory associated with coherent DMAable region
@@ -136,8 +134,8 @@ EXPORT_SYMBOL(sn_dma_alloc_coherent);
136 * Frees the memory allocated by dma_alloc_coherent(), potentially unmapping 134 * Frees the memory allocated by dma_alloc_coherent(), potentially unmapping
137 * any associated IOMMU mappings. 135 * any associated IOMMU mappings.
138 */ 136 */
139void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 137static void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
140 dma_addr_t dma_handle) 138 dma_addr_t dma_handle)
141{ 139{
142 struct pci_dev *pdev = to_pci_dev(dev); 140 struct pci_dev *pdev = to_pci_dev(dev);
143 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); 141 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
@@ -147,7 +145,6 @@ void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
147 provider->dma_unmap(pdev, dma_handle, 0); 145 provider->dma_unmap(pdev, dma_handle, 0);
148 free_pages((unsigned long)cpu_addr, get_order(size)); 146 free_pages((unsigned long)cpu_addr, get_order(size));
149} 147}
150EXPORT_SYMBOL(sn_dma_free_coherent);
151 148
152/** 149/**
153 * sn_dma_map_single_attrs - map a single page for DMA 150 * sn_dma_map_single_attrs - map a single page for DMA
@@ -173,10 +170,12 @@ EXPORT_SYMBOL(sn_dma_free_coherent);
173 * TODO: simplify our interface; 170 * TODO: simplify our interface;
174 * figure out how to save dmamap handle so can use two step. 171 * figure out how to save dmamap handle so can use two step.
175 */ 172 */
176dma_addr_t sn_dma_map_single_attrs(struct device *dev, void *cpu_addr, 173static dma_addr_t sn_dma_map_page(struct device *dev, struct page *page,
177 size_t size, int direction, 174 unsigned long offset, size_t size,
178 struct dma_attrs *attrs) 175 enum dma_data_direction dir,
176 struct dma_attrs *attrs)
179{ 177{
178 void *cpu_addr = page_address(page) + offset;
180 dma_addr_t dma_addr; 179 dma_addr_t dma_addr;
181 unsigned long phys_addr; 180 unsigned long phys_addr;
182 struct pci_dev *pdev = to_pci_dev(dev); 181 struct pci_dev *pdev = to_pci_dev(dev);
@@ -201,7 +200,6 @@ dma_addr_t sn_dma_map_single_attrs(struct device *dev, void *cpu_addr,
201 } 200 }
202 return dma_addr; 201 return dma_addr;
203} 202}
204EXPORT_SYMBOL(sn_dma_map_single_attrs);
205 203
206/** 204/**
207 * sn_dma_unmap_single_attrs - unamp a DMA mapped page 205 * sn_dma_unmap_single_attrs - unamp a DMA mapped page
@@ -215,21 +213,20 @@ EXPORT_SYMBOL(sn_dma_map_single_attrs);
215 * by @dma_handle into the coherence domain. On SN, we're always cache 213 * by @dma_handle into the coherence domain. On SN, we're always cache
216 * coherent, so we just need to free any ATEs associated with this mapping. 214 * coherent, so we just need to free any ATEs associated with this mapping.
217 */ 215 */
218void sn_dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, 216static void sn_dma_unmap_page(struct device *dev, dma_addr_t dma_addr,
219 size_t size, int direction, 217 size_t size, enum dma_data_direction dir,
220 struct dma_attrs *attrs) 218 struct dma_attrs *attrs)
221{ 219{
222 struct pci_dev *pdev = to_pci_dev(dev); 220 struct pci_dev *pdev = to_pci_dev(dev);
223 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); 221 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
224 222
225 BUG_ON(dev->bus != &pci_bus_type); 223 BUG_ON(dev->bus != &pci_bus_type);
226 224
227 provider->dma_unmap(pdev, dma_addr, direction); 225 provider->dma_unmap(pdev, dma_addr, dir);
228} 226}
229EXPORT_SYMBOL(sn_dma_unmap_single_attrs);
230 227
231/** 228/**
232 * sn_dma_unmap_sg_attrs - unmap a DMA scatterlist 229 * sn_dma_unmap_sg - unmap a DMA scatterlist
233 * @dev: device to unmap 230 * @dev: device to unmap
234 * @sg: scatterlist to unmap 231 * @sg: scatterlist to unmap
235 * @nhwentries: number of scatterlist entries 232 * @nhwentries: number of scatterlist entries
@@ -238,9 +235,9 @@ EXPORT_SYMBOL(sn_dma_unmap_single_attrs);
238 * 235 *
239 * Unmap a set of streaming mode DMA translations. 236 * Unmap a set of streaming mode DMA translations.
240 */ 237 */
241void sn_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, 238static void sn_dma_unmap_sg(struct device *dev, struct scatterlist *sgl,
242 int nhwentries, int direction, 239 int nhwentries, enum dma_data_direction dir,
243 struct dma_attrs *attrs) 240 struct dma_attrs *attrs)
244{ 241{
245 int i; 242 int i;
246 struct pci_dev *pdev = to_pci_dev(dev); 243 struct pci_dev *pdev = to_pci_dev(dev);
@@ -250,15 +247,14 @@ void sn_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl,
250 BUG_ON(dev->bus != &pci_bus_type); 247 BUG_ON(dev->bus != &pci_bus_type);
251 248
252 for_each_sg(sgl, sg, nhwentries, i) { 249 for_each_sg(sgl, sg, nhwentries, i) {
253 provider->dma_unmap(pdev, sg->dma_address, direction); 250 provider->dma_unmap(pdev, sg->dma_address, dir);
254 sg->dma_address = (dma_addr_t) NULL; 251 sg->dma_address = (dma_addr_t) NULL;
255 sg->dma_length = 0; 252 sg->dma_length = 0;
256 } 253 }
257} 254}
258EXPORT_SYMBOL(sn_dma_unmap_sg_attrs);
259 255
260/** 256/**
261 * sn_dma_map_sg_attrs - map a scatterlist for DMA 257 * sn_dma_map_sg - map a scatterlist for DMA
262 * @dev: device to map for 258 * @dev: device to map for
263 * @sg: scatterlist to map 259 * @sg: scatterlist to map
264 * @nhwentries: number of entries 260 * @nhwentries: number of entries
@@ -272,8 +268,9 @@ EXPORT_SYMBOL(sn_dma_unmap_sg_attrs);
272 * 268 *
273 * Maps each entry of @sg for DMA. 269 * Maps each entry of @sg for DMA.
274 */ 270 */
275int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, 271static int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl,
276 int nhwentries, int direction, struct dma_attrs *attrs) 272 int nhwentries, enum dma_data_direction dir,
273 struct dma_attrs *attrs)
277{ 274{
278 unsigned long phys_addr; 275 unsigned long phys_addr;
279 struct scatterlist *saved_sg = sgl, *sg; 276 struct scatterlist *saved_sg = sgl, *sg;
@@ -310,8 +307,7 @@ int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
310 * Free any successfully allocated entries. 307 * Free any successfully allocated entries.
311 */ 308 */
312 if (i > 0) 309 if (i > 0)
313 sn_dma_unmap_sg_attrs(dev, saved_sg, i, 310 sn_dma_unmap_sg(dev, saved_sg, i, dir, attrs);
314 direction, attrs);
315 return 0; 311 return 0;
316 } 312 }
317 313
@@ -320,45 +316,40 @@ int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
320 316
321 return nhwentries; 317 return nhwentries;
322} 318}
323EXPORT_SYMBOL(sn_dma_map_sg_attrs);
324 319
325void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, 320static void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
326 size_t size, int direction) 321 size_t size, enum dma_data_direction dir)
327{ 322{
328 BUG_ON(dev->bus != &pci_bus_type); 323 BUG_ON(dev->bus != &pci_bus_type);
329} 324}
330EXPORT_SYMBOL(sn_dma_sync_single_for_cpu);
331 325
332void sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 326static void sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
333 size_t size, int direction) 327 size_t size,
328 enum dma_data_direction dir)
334{ 329{
335 BUG_ON(dev->bus != &pci_bus_type); 330 BUG_ON(dev->bus != &pci_bus_type);
336} 331}
337EXPORT_SYMBOL(sn_dma_sync_single_for_device);
338 332
339void sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, 333static void sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
340 int nelems, int direction) 334 int nelems, enum dma_data_direction dir)
341{ 335{
342 BUG_ON(dev->bus != &pci_bus_type); 336 BUG_ON(dev->bus != &pci_bus_type);
343} 337}
344EXPORT_SYMBOL(sn_dma_sync_sg_for_cpu);
345 338
346void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, 339static void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
347 int nelems, int direction) 340 int nelems, enum dma_data_direction dir)
348{ 341{
349 BUG_ON(dev->bus != &pci_bus_type); 342 BUG_ON(dev->bus != &pci_bus_type);
350} 343}
351EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
352 344
353int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 345static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
354{ 346{
355 return 0; 347 return 0;
356} 348}
357EXPORT_SYMBOL(sn_dma_mapping_error);
358 349
359u64 sn_dma_get_required_mask(struct device *dev) 350u64 sn_dma_get_required_mask(struct device *dev)
360{ 351{
361 return DMA_64BIT_MASK; 352 return DMA_BIT_MASK(64);
362} 353}
363EXPORT_SYMBOL_GPL(sn_dma_get_required_mask); 354EXPORT_SYMBOL_GPL(sn_dma_get_required_mask);
364 355
@@ -471,3 +462,23 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
471 out: 462 out:
472 return ret; 463 return ret;
473} 464}
465
466static struct dma_map_ops sn_dma_ops = {
467 .alloc_coherent = sn_dma_alloc_coherent,
468 .free_coherent = sn_dma_free_coherent,
469 .map_page = sn_dma_map_page,
470 .unmap_page = sn_dma_unmap_page,
471 .map_sg = sn_dma_map_sg,
472 .unmap_sg = sn_dma_unmap_sg,
473 .sync_single_for_cpu = sn_dma_sync_single_for_cpu,
474 .sync_sg_for_cpu = sn_dma_sync_sg_for_cpu,
475 .sync_single_for_device = sn_dma_sync_single_for_device,
476 .sync_sg_for_device = sn_dma_sync_sg_for_device,
477 .mapping_error = sn_dma_mapping_error,
478 .dma_supported = sn_dma_supported,
479};
480
481void sn_dma_init(void)
482{
483 dma_ops = &sn_dma_ops;
484}
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
index 060df4aa9916..c659ad5613a0 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
@@ -256,9 +256,7 @@ void sn_dma_flush(u64 addr)
256 256
257 hubinfo = (NODEPDA(nasid_to_cnodeid(nasid)))->pdinfo; 257 hubinfo = (NODEPDA(nasid_to_cnodeid(nasid)))->pdinfo;
258 258
259 if (!hubinfo) { 259 BUG_ON(!hubinfo);
260 BUG();
261 }
262 260
263 flush_nasid_list = &hubinfo->hdi_flush_nasid_list; 261 flush_nasid_list = &hubinfo->hdi_flush_nasid_list;
264 if (flush_nasid_list->widget_p == NULL) 262 if (flush_nasid_list->widget_p == NULL)
diff --git a/arch/ia64/xen/Makefile b/arch/ia64/xen/Makefile
index 0ad0224693d9..e6f4a0a74228 100644
--- a/arch/ia64/xen/Makefile
+++ b/arch/ia64/xen/Makefile
@@ -3,14 +3,29 @@
3# 3#
4 4
5obj-y := hypercall.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o \ 5obj-y := hypercall.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o \
6 hypervisor.o xencomm.o xcom_hcall.o grant-table.o time.o suspend.o 6 hypervisor.o xencomm.o xcom_hcall.o grant-table.o time.o suspend.o \
7 gate-data.o
7 8
8obj-$(CONFIG_IA64_GENERIC) += machvec.o 9obj-$(CONFIG_IA64_GENERIC) += machvec.o
9 10
11# The gate DSO image is built using a special linker script.
12include $(srctree)/arch/ia64/kernel/Makefile.gate
13
14# tell compiled for xen
15CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_XEN
16AFLAGS_gate.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN -D__IA64_GATE_PARAVIRTUALIZED_XEN
17
18# use same file of native.
19$(obj)/gate.o: $(src)/../kernel/gate.S FORCE
20 $(call if_changed_dep,as_o_S)
21$(obj)/gate.lds: $(src)/../kernel/gate.lds.S FORCE
22 $(call if_changed_dep,cpp_lds_S)
23
24
10AFLAGS_xenivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN 25AFLAGS_xenivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN
11 26
12# xen multi compile 27# xen multi compile
13ASM_PARAVIRT_MULTI_COMPILE_SRCS = ivt.S entry.S 28ASM_PARAVIRT_MULTI_COMPILE_SRCS = ivt.S entry.S fsys.S
14ASM_PARAVIRT_OBJS = $(addprefix xen-,$(ASM_PARAVIRT_MULTI_COMPILE_SRCS:.S=.o)) 29ASM_PARAVIRT_OBJS = $(addprefix xen-,$(ASM_PARAVIRT_MULTI_COMPILE_SRCS:.S=.o))
15obj-y += $(ASM_PARAVIRT_OBJS) 30obj-y += $(ASM_PARAVIRT_OBJS)
16define paravirtualized_xen 31define paravirtualized_xen
diff --git a/arch/ia64/xen/gate-data.S b/arch/ia64/xen/gate-data.S
new file mode 100644
index 000000000000..7d4830afc91d
--- /dev/null
+++ b/arch/ia64/xen/gate-data.S
@@ -0,0 +1,3 @@
1 .section .data.gate.xen, "aw"
2
3 .incbin "arch/ia64/xen/gate.so"
diff --git a/arch/ia64/xen/hypercall.S b/arch/ia64/xen/hypercall.S
index 45e02bb64a92..e32dae444dd6 100644
--- a/arch/ia64/xen/hypercall.S
+++ b/arch/ia64/xen/hypercall.S
@@ -9,6 +9,7 @@
9#include <asm/intrinsics.h> 9#include <asm/intrinsics.h>
10#include <asm/xen/privop.h> 10#include <asm/xen/privop.h>
11 11
12#ifdef __INTEL_COMPILER
12/* 13/*
13 * Hypercalls without parameter. 14 * Hypercalls without parameter.
14 */ 15 */
@@ -72,6 +73,7 @@ GLOBAL_ENTRY(xen_set_rr0_to_rr4)
72 br.ret.sptk.many rp 73 br.ret.sptk.many rp
73 ;; 74 ;;
74END(xen_set_rr0_to_rr4) 75END(xen_set_rr0_to_rr4)
76#endif
75 77
76GLOBAL_ENTRY(xen_send_ipi) 78GLOBAL_ENTRY(xen_send_ipi)
77 mov r14=r32 79 mov r14=r32
diff --git a/arch/ia64/xen/time.c b/arch/ia64/xen/time.c
index 68d6204c3f16..fb8332690179 100644
--- a/arch/ia64/xen/time.c
+++ b/arch/ia64/xen/time.c
@@ -175,10 +175,58 @@ static void xen_itc_jitter_data_reset(void)
175 } while (unlikely(ret != lcycle)); 175 } while (unlikely(ret != lcycle));
176} 176}
177 177
178/* based on xen_sched_clock() in arch/x86/xen/time.c. */
179/*
180 * This relies on HAVE_UNSTABLE_SCHED_CLOCK. If it can't be defined,
181 * something similar logic should be implemented here.
182 */
183/*
184 * Xen sched_clock implementation. Returns the number of unstolen
185 * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED
186 * states.
187 */
188static unsigned long long xen_sched_clock(void)
189{
190 struct vcpu_runstate_info runstate;
191
192 unsigned long long now;
193 unsigned long long offset;
194 unsigned long long ret;
195
196 /*
197 * Ideally sched_clock should be called on a per-cpu basis
198 * anyway, so preempt should already be disabled, but that's
199 * not current practice at the moment.
200 */
201 preempt_disable();
202
203 /*
204 * both ia64_native_sched_clock() and xen's runstate are
205 * based on mAR.ITC. So difference of them makes sense.
206 */
207 now = ia64_native_sched_clock();
208
209 get_runstate_snapshot(&runstate);
210
211 WARN_ON(runstate.state != RUNSTATE_running);
212
213 offset = 0;
214 if (now > runstate.state_entry_time)
215 offset = now - runstate.state_entry_time;
216 ret = runstate.time[RUNSTATE_blocked] +
217 runstate.time[RUNSTATE_running] +
218 offset;
219
220 preempt_enable();
221
222 return ret;
223}
224
178struct pv_time_ops xen_time_ops __initdata = { 225struct pv_time_ops xen_time_ops __initdata = {
179 .init_missing_ticks_accounting = xen_init_missing_ticks_accounting, 226 .init_missing_ticks_accounting = xen_init_missing_ticks_accounting,
180 .do_steal_accounting = xen_do_steal_accounting, 227 .do_steal_accounting = xen_do_steal_accounting,
181 .clocksource_resume = xen_itc_jitter_data_reset, 228 .clocksource_resume = xen_itc_jitter_data_reset,
229 .sched_clock = xen_sched_clock,
182}; 230};
183 231
184/* Called after suspend, to resume time. */ 232/* Called after suspend, to resume time. */
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c
index 936cff3c96e0..5e2270a999fa 100644
--- a/arch/ia64/xen/xen_pv_ops.c
+++ b/arch/ia64/xen/xen_pv_ops.c
@@ -24,6 +24,7 @@
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/pm.h> 26#include <linux/pm.h>
27#include <linux/unistd.h>
27 28
28#include <asm/xen/hypervisor.h> 29#include <asm/xen/hypervisor.h>
29#include <asm/xen/xencomm.h> 30#include <asm/xen/xencomm.h>
@@ -153,6 +154,13 @@ xen_post_smp_prepare_boot_cpu(void)
153 xen_setup_vcpu_info_placement(); 154 xen_setup_vcpu_info_placement();
154} 155}
155 156
157#ifdef ASM_SUPPORTED
158static unsigned long __init_or_module
159xen_patch_bundle(void *sbundle, void *ebundle, unsigned long type);
160#endif
161static void __init
162xen_patch_branch(unsigned long tag, unsigned long type);
163
156static const struct pv_init_ops xen_init_ops __initconst = { 164static const struct pv_init_ops xen_init_ops __initconst = {
157 .banner = xen_banner, 165 .banner = xen_banner,
158 166
@@ -163,6 +171,53 @@ static const struct pv_init_ops xen_init_ops __initconst = {
163 .arch_setup_nomca = xen_arch_setup_nomca, 171 .arch_setup_nomca = xen_arch_setup_nomca,
164 172
165 .post_smp_prepare_boot_cpu = xen_post_smp_prepare_boot_cpu, 173 .post_smp_prepare_boot_cpu = xen_post_smp_prepare_boot_cpu,
174#ifdef ASM_SUPPORTED
175 .patch_bundle = xen_patch_bundle,
176#endif
177 .patch_branch = xen_patch_branch,
178};
179
180/***************************************************************************
181 * pv_fsys_data
182 * addresses for fsys
183 */
184
185extern unsigned long xen_fsyscall_table[NR_syscalls];
186extern char xen_fsys_bubble_down[];
187struct pv_fsys_data xen_fsys_data __initdata = {
188 .fsyscall_table = (unsigned long *)xen_fsyscall_table,
189 .fsys_bubble_down = (void *)xen_fsys_bubble_down,
190};
191
192/***************************************************************************
193 * pv_patchdata
194 * patchdata addresses
195 */
196
197#define DECLARE(name) \
198 extern unsigned long __xen_start_gate_##name##_patchlist[]; \
199 extern unsigned long __xen_end_gate_##name##_patchlist[]
200
201DECLARE(fsyscall);
202DECLARE(brl_fsys_bubble_down);
203DECLARE(vtop);
204DECLARE(mckinley_e9);
205
206extern unsigned long __xen_start_gate_section[];
207
208#define ASSIGN(name) \
209 .start_##name##_patchlist = \
210 (unsigned long)__xen_start_gate_##name##_patchlist, \
211 .end_##name##_patchlist = \
212 (unsigned long)__xen_end_gate_##name##_patchlist
213
214static struct pv_patchdata xen_patchdata __initdata = {
215 ASSIGN(fsyscall),
216 ASSIGN(brl_fsys_bubble_down),
217 ASSIGN(vtop),
218 ASSIGN(mckinley_e9),
219
220 .gate_section = (void*)__xen_start_gate_section,
166}; 221};
167 222
168/*************************************************************************** 223/***************************************************************************
@@ -170,6 +225,76 @@ static const struct pv_init_ops xen_init_ops __initconst = {
170 * intrinsics hooks. 225 * intrinsics hooks.
171 */ 226 */
172 227
228#ifndef ASM_SUPPORTED
229static void
230xen_set_itm_with_offset(unsigned long val)
231{
232 /* ia64_cpu_local_tick() calls this with interrupt enabled. */
233 /* WARN_ON(!irqs_disabled()); */
234 xen_set_itm(val - XEN_MAPPEDREGS->itc_offset);
235}
236
237static unsigned long
238xen_get_itm_with_offset(void)
239{
240 /* unused at this moment */
241 printk(KERN_DEBUG "%s is called.\n", __func__);
242
243 WARN_ON(!irqs_disabled());
244 return ia64_native_getreg(_IA64_REG_CR_ITM) +
245 XEN_MAPPEDREGS->itc_offset;
246}
247
248/* ia64_set_itc() is only called by
249 * cpu_init() with ia64_set_itc(0) and ia64_sync_itc().
250 * So XEN_MAPPEDRESG->itc_offset cal be considered as almost constant.
251 */
252static void
253xen_set_itc(unsigned long val)
254{
255 unsigned long mitc;
256
257 WARN_ON(!irqs_disabled());
258 mitc = ia64_native_getreg(_IA64_REG_AR_ITC);
259 XEN_MAPPEDREGS->itc_offset = val - mitc;
260 XEN_MAPPEDREGS->itc_last = val;
261}
262
263static unsigned long
264xen_get_itc(void)
265{
266 unsigned long res;
267 unsigned long itc_offset;
268 unsigned long itc_last;
269 unsigned long ret_itc_last;
270
271 itc_offset = XEN_MAPPEDREGS->itc_offset;
272 do {
273 itc_last = XEN_MAPPEDREGS->itc_last;
274 res = ia64_native_getreg(_IA64_REG_AR_ITC);
275 res += itc_offset;
276 if (itc_last >= res)
277 res = itc_last + 1;
278 ret_itc_last = cmpxchg(&XEN_MAPPEDREGS->itc_last,
279 itc_last, res);
280 } while (unlikely(ret_itc_last != itc_last));
281 return res;
282
283#if 0
284 /* ia64_itc_udelay() calls ia64_get_itc() with interrupt enabled.
285 Should it be paravirtualized instead? */
286 WARN_ON(!irqs_disabled());
287 itc_offset = XEN_MAPPEDREGS->itc_offset;
288 itc_last = XEN_MAPPEDREGS->itc_last;
289 res = ia64_native_getreg(_IA64_REG_AR_ITC);
290 res += itc_offset;
291 if (itc_last >= res)
292 res = itc_last + 1;
293 XEN_MAPPEDREGS->itc_last = res;
294 return res;
295#endif
296}
297
173static void xen_setreg(int regnum, unsigned long val) 298static void xen_setreg(int regnum, unsigned long val)
174{ 299{
175 switch (regnum) { 300 switch (regnum) {
@@ -181,11 +306,14 @@ static void xen_setreg(int regnum, unsigned long val)
181 xen_set_eflag(val); 306 xen_set_eflag(val);
182 break; 307 break;
183#endif 308#endif
309 case _IA64_REG_AR_ITC:
310 xen_set_itc(val);
311 break;
184 case _IA64_REG_CR_TPR: 312 case _IA64_REG_CR_TPR:
185 xen_set_tpr(val); 313 xen_set_tpr(val);
186 break; 314 break;
187 case _IA64_REG_CR_ITM: 315 case _IA64_REG_CR_ITM:
188 xen_set_itm(val); 316 xen_set_itm_with_offset(val);
189 break; 317 break;
190 case _IA64_REG_CR_EOI: 318 case _IA64_REG_CR_EOI:
191 xen_eoi(val); 319 xen_eoi(val);
@@ -209,6 +337,12 @@ static unsigned long xen_getreg(int regnum)
209 res = xen_get_eflag(); 337 res = xen_get_eflag();
210 break; 338 break;
211#endif 339#endif
340 case _IA64_REG_AR_ITC:
341 res = xen_get_itc();
342 break;
343 case _IA64_REG_CR_ITM:
344 res = xen_get_itm_with_offset();
345 break;
212 case _IA64_REG_CR_IVR: 346 case _IA64_REG_CR_IVR:
213 res = xen_get_ivr(); 347 res = xen_get_ivr();
214 break; 348 break;
@@ -259,8 +393,417 @@ xen_intrin_local_irq_restore(unsigned long mask)
259 else 393 else
260 xen_rsm_i(); 394 xen_rsm_i();
261} 395}
396#else
397#define __DEFINE_FUNC(name, code) \
398 extern const char xen_ ## name ## _direct_start[]; \
399 extern const char xen_ ## name ## _direct_end[]; \
400 asm (".align 32\n" \
401 ".proc xen_" #name "\n" \
402 "xen_" #name ":\n" \
403 "xen_" #name "_direct_start:\n" \
404 code \
405 "xen_" #name "_direct_end:\n" \
406 "br.cond.sptk.many b6\n" \
407 ".endp xen_" #name "\n")
408
409#define DEFINE_VOID_FUNC0(name, code) \
410 extern void \
411 xen_ ## name (void); \
412 __DEFINE_FUNC(name, code)
413
414#define DEFINE_VOID_FUNC1(name, code) \
415 extern void \
416 xen_ ## name (unsigned long arg); \
417 __DEFINE_FUNC(name, code)
418
419#define DEFINE_VOID_FUNC1_VOID(name, code) \
420 extern void \
421 xen_ ## name (void *arg); \
422 __DEFINE_FUNC(name, code)
423
424#define DEFINE_VOID_FUNC2(name, code) \
425 extern void \
426 xen_ ## name (unsigned long arg0, \
427 unsigned long arg1); \
428 __DEFINE_FUNC(name, code)
262 429
263static const struct pv_cpu_ops xen_cpu_ops __initdata = { 430#define DEFINE_FUNC0(name, code) \
431 extern unsigned long \
432 xen_ ## name (void); \
433 __DEFINE_FUNC(name, code)
434
435#define DEFINE_FUNC1(name, type, code) \
436 extern unsigned long \
437 xen_ ## name (type arg); \
438 __DEFINE_FUNC(name, code)
439
440#define XEN_PSR_I_ADDR_ADDR (XSI_BASE + XSI_PSR_I_ADDR_OFS)
441
442/*
443 * static void xen_set_itm_with_offset(unsigned long val)
444 * xen_set_itm(val - XEN_MAPPEDREGS->itc_offset);
445 */
446/* 2 bundles */
447DEFINE_VOID_FUNC1(set_itm_with_offset,
448 "mov r2 = " __stringify(XSI_BASE) " + "
449 __stringify(XSI_ITC_OFFSET_OFS) "\n"
450 ";;\n"
451 "ld8 r3 = [r2]\n"
452 ";;\n"
453 "sub r8 = r8, r3\n"
454 "break " __stringify(HYPERPRIVOP_SET_ITM) "\n");
455
456/*
457 * static unsigned long xen_get_itm_with_offset(void)
458 * return ia64_native_getreg(_IA64_REG_CR_ITM) + XEN_MAPPEDREGS->itc_offset;
459 */
460/* 2 bundles */
461DEFINE_FUNC0(get_itm_with_offset,
462 "mov r2 = " __stringify(XSI_BASE) " + "
463 __stringify(XSI_ITC_OFFSET_OFS) "\n"
464 ";;\n"
465 "ld8 r3 = [r2]\n"
466 "mov r8 = cr.itm\n"
467 ";;\n"
468 "add r8 = r8, r2\n");
469
470/*
471 * static void xen_set_itc(unsigned long val)
472 * unsigned long mitc;
473 *
474 * WARN_ON(!irqs_disabled());
475 * mitc = ia64_native_getreg(_IA64_REG_AR_ITC);
476 * XEN_MAPPEDREGS->itc_offset = val - mitc;
477 * XEN_MAPPEDREGS->itc_last = val;
478 */
479/* 2 bundles */
480DEFINE_VOID_FUNC1(set_itc,
481 "mov r2 = " __stringify(XSI_BASE) " + "
482 __stringify(XSI_ITC_LAST_OFS) "\n"
483 "mov r3 = ar.itc\n"
484 ";;\n"
485 "sub r3 = r8, r3\n"
486 "st8 [r2] = r8, "
487 __stringify(XSI_ITC_LAST_OFS) " - "
488 __stringify(XSI_ITC_OFFSET_OFS) "\n"
489 ";;\n"
490 "st8 [r2] = r3\n");
491
492/*
493 * static unsigned long xen_get_itc(void)
494 * unsigned long res;
495 * unsigned long itc_offset;
496 * unsigned long itc_last;
497 * unsigned long ret_itc_last;
498 *
499 * itc_offset = XEN_MAPPEDREGS->itc_offset;
500 * do {
501 * itc_last = XEN_MAPPEDREGS->itc_last;
502 * res = ia64_native_getreg(_IA64_REG_AR_ITC);
503 * res += itc_offset;
504 * if (itc_last >= res)
505 * res = itc_last + 1;
506 * ret_itc_last = cmpxchg(&XEN_MAPPEDREGS->itc_last,
507 * itc_last, res);
508 * } while (unlikely(ret_itc_last != itc_last));
509 * return res;
510 */
511/* 5 bundles */
512DEFINE_FUNC0(get_itc,
513 "mov r2 = " __stringify(XSI_BASE) " + "
514 __stringify(XSI_ITC_OFFSET_OFS) "\n"
515 ";;\n"
516 "ld8 r9 = [r2], " __stringify(XSI_ITC_LAST_OFS) " - "
517 __stringify(XSI_ITC_OFFSET_OFS) "\n"
518 /* r9 = itc_offset */
519 /* r2 = XSI_ITC_OFFSET */
520 "888:\n"
521 "mov r8 = ar.itc\n" /* res = ar.itc */
522 ";;\n"
523 "ld8 r3 = [r2]\n" /* r3 = itc_last */
524 "add r8 = r8, r9\n" /* res = ar.itc + itc_offset */
525 ";;\n"
526 "cmp.gtu p6, p0 = r3, r8\n"
527 ";;\n"
528 "(p6) add r8 = 1, r3\n" /* if (itc_last > res) itc_last + 1 */
529 ";;\n"
530 "mov ar.ccv = r8\n"
531 ";;\n"
532 "cmpxchg8.acq r10 = [r2], r8, ar.ccv\n"
533 ";;\n"
534 "cmp.ne p6, p0 = r10, r3\n"
535 "(p6) hint @pause\n"
536 "(p6) br.cond.spnt 888b\n");
537
538DEFINE_VOID_FUNC1_VOID(fc,
539 "break " __stringify(HYPERPRIVOP_FC) "\n");
540
541/*
542 * psr_i_addr_addr = XEN_PSR_I_ADDR_ADDR
543 * masked_addr = *psr_i_addr_addr
544 * pending_intr_addr = masked_addr - 1
545 * if (val & IA64_PSR_I) {
546 * masked = *masked_addr
547 * *masked_addr = 0:xen_set_virtual_psr_i(1)
548 * compiler barrier
549 * if (masked) {
550 * uint8_t pending = *pending_intr_addr;
551 * if (pending)
552 * XEN_HYPER_SSM_I
553 * }
554 * } else {
555 * *masked_addr = 1:xen_set_virtual_psr_i(0)
556 * }
557 */
558/* 6 bundles */
559DEFINE_VOID_FUNC1(intrin_local_irq_restore,
560 /* r8 = input value: 0 or IA64_PSR_I
561 * p6 = (flags & IA64_PSR_I)
562 * = if clause
563 * p7 = !(flags & IA64_PSR_I)
564 * = else clause
565 */
566 "cmp.ne p6, p7 = r8, r0\n"
567 "mov r9 = " __stringify(XEN_PSR_I_ADDR_ADDR) "\n"
568 ";;\n"
569 /* r9 = XEN_PSR_I_ADDR */
570 "ld8 r9 = [r9]\n"
571 ";;\n"
572
573 /* r10 = masked previous value */
574 "(p6) ld1.acq r10 = [r9]\n"
575 ";;\n"
576
577 /* p8 = !masked interrupt masked previously? */
578 "(p6) cmp.ne.unc p8, p0 = r10, r0\n"
579
580 /* p7 = else clause */
581 "(p7) mov r11 = 1\n"
582 ";;\n"
583 /* masked = 1 */
584 "(p7) st1.rel [r9] = r11\n"
585
586 /* p6 = if clause */
587 /* masked = 0
588 * r9 = masked_addr - 1
589 * = pending_intr_addr
590 */
591 "(p8) st1.rel [r9] = r0, -1\n"
592 ";;\n"
593 /* r8 = pending_intr */
594 "(p8) ld1.acq r11 = [r9]\n"
595 ";;\n"
596 /* p9 = interrupt pending? */
597 "(p8) cmp.ne.unc p9, p10 = r11, r0\n"
598 ";;\n"
599 "(p10) mf\n"
600 /* issue hypercall to trigger interrupt */
601 "(p9) break " __stringify(HYPERPRIVOP_SSM_I) "\n");
602
603DEFINE_VOID_FUNC2(ptcga,
604 "break " __stringify(HYPERPRIVOP_PTC_GA) "\n");
605DEFINE_VOID_FUNC2(set_rr,
606 "break " __stringify(HYPERPRIVOP_SET_RR) "\n");
607
608/*
609 * tmp = XEN_MAPPEDREGS->interrupt_mask_addr = XEN_PSR_I_ADDR_ADDR;
610 * tmp = *tmp
611 * tmp = *tmp;
612 * psr_i = tmp? 0: IA64_PSR_I;
613 */
614/* 4 bundles */
615DEFINE_FUNC0(get_psr_i,
616 "mov r9 = " __stringify(XEN_PSR_I_ADDR_ADDR) "\n"
617 ";;\n"
618 "ld8 r9 = [r9]\n" /* r9 = XEN_PSR_I_ADDR */
619 "mov r8 = 0\n" /* psr_i = 0 */
620 ";;\n"
621 "ld1.acq r9 = [r9]\n" /* r9 = XEN_PSR_I */
622 ";;\n"
623 "cmp.eq.unc p6, p0 = r9, r0\n" /* p6 = (XEN_PSR_I != 0) */
624 ";;\n"
625 "(p6) mov r8 = " __stringify(1 << IA64_PSR_I_BIT) "\n");
626
627DEFINE_FUNC1(thash, unsigned long,
628 "break " __stringify(HYPERPRIVOP_THASH) "\n");
629DEFINE_FUNC1(get_cpuid, int,
630 "break " __stringify(HYPERPRIVOP_GET_CPUID) "\n");
631DEFINE_FUNC1(get_pmd, int,
632 "break " __stringify(HYPERPRIVOP_GET_PMD) "\n");
633DEFINE_FUNC1(get_rr, unsigned long,
634 "break " __stringify(HYPERPRIVOP_GET_RR) "\n");
635
636/*
637 * void xen_privop_ssm_i(void)
638 *
639 * int masked = !xen_get_virtual_psr_i();
640 * // masked = *(*XEN_MAPPEDREGS->interrupt_mask_addr)
641 * xen_set_virtual_psr_i(1)
642 * // *(*XEN_MAPPEDREGS->interrupt_mask_addr) = 0
643 * // compiler barrier
644 * if (masked) {
645 * uint8_t* pend_int_addr =
646 * (uint8_t*)(*XEN_MAPPEDREGS->interrupt_mask_addr) - 1;
647 * uint8_t pending = *pend_int_addr;
648 * if (pending)
649 * XEN_HYPER_SSM_I
650 * }
651 */
652/* 4 bundles */
653DEFINE_VOID_FUNC0(ssm_i,
654 "mov r8 = " __stringify(XEN_PSR_I_ADDR_ADDR) "\n"
655 ";;\n"
656 "ld8 r8 = [r8]\n" /* r8 = XEN_PSR_I_ADDR */
657 ";;\n"
658 "ld1.acq r9 = [r8]\n" /* r9 = XEN_PSR_I */
659 ";;\n"
660 "st1.rel [r8] = r0, -1\n" /* psr_i = 0. enable interrupt
661 * r8 = XEN_PSR_I_ADDR - 1
662 * = pend_int_addr
663 */
664 "cmp.eq.unc p0, p6 = r9, r0\n"/* p6 = !XEN_PSR_I
665 * previously interrupt
666 * masked?
667 */
668 ";;\n"
669 "(p6) ld1.acq r8 = [r8]\n" /* r8 = xen_pend_int */
670 ";;\n"
671 "(p6) cmp.eq.unc p6, p7 = r8, r0\n" /*interrupt pending?*/
672 ";;\n"
673 /* issue hypercall to get interrupt */
674 "(p7) break " __stringify(HYPERPRIVOP_SSM_I) "\n"
675 ";;\n");
676
677/*
678 * psr_i_addr_addr = XEN_MAPPEDREGS->interrupt_mask_addr
679 * = XEN_PSR_I_ADDR_ADDR;
680 * psr_i_addr = *psr_i_addr_addr;
681 * *psr_i_addr = 1;
682 */
683/* 2 bundles */
684DEFINE_VOID_FUNC0(rsm_i,
685 "mov r8 = " __stringify(XEN_PSR_I_ADDR_ADDR) "\n"
686 /* r8 = XEN_PSR_I_ADDR */
687 "mov r9 = 1\n"
688 ";;\n"
689 "ld8 r8 = [r8]\n" /* r8 = XEN_PSR_I */
690 ";;\n"
691 "st1.rel [r8] = r9\n"); /* XEN_PSR_I = 1 */
692
693extern void
694xen_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
695 unsigned long val2, unsigned long val3,
696 unsigned long val4);
697__DEFINE_FUNC(set_rr0_to_rr4,
698 "break " __stringify(HYPERPRIVOP_SET_RR0_TO_RR4) "\n");
699
700
701extern unsigned long xen_getreg(int regnum);
702#define __DEFINE_GET_REG(id, privop) \
703 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
704 ";;\n" \
705 "cmp.eq p6, p0 = r2, r8\n" \
706 ";;\n" \
707 "(p6) break " __stringify(HYPERPRIVOP_GET_ ## privop) "\n" \
708 "(p6) br.cond.sptk.many b6\n" \
709 ";;\n"
710
711__DEFINE_FUNC(getreg,
712 __DEFINE_GET_REG(PSR, PSR)
713#ifdef CONFIG_IA32_SUPPORT
714 __DEFINE_GET_REG(AR_EFLAG, EFLAG)
715#endif
716
717 /* get_itc */
718 "mov r2 = " __stringify(_IA64_REG_AR_ITC) "\n"
719 ";;\n"
720 "cmp.eq p6, p0 = r2, r8\n"
721 ";;\n"
722 "(p6) br.cond.spnt xen_get_itc\n"
723 ";;\n"
724
725 /* get itm */
726 "mov r2 = " __stringify(_IA64_REG_CR_ITM) "\n"
727 ";;\n"
728 "cmp.eq p6, p0 = r2, r8\n"
729 ";;\n"
730 "(p6) br.cond.spnt xen_get_itm_with_offset\n"
731 ";;\n"
732
733 __DEFINE_GET_REG(CR_IVR, IVR)
734 __DEFINE_GET_REG(CR_TPR, TPR)
735
736 /* fall back */
737 "movl r2 = ia64_native_getreg_func\n"
738 ";;\n"
739 "mov b7 = r2\n"
740 ";;\n"
741 "br.cond.sptk.many b7\n");
742
743extern void xen_setreg(int regnum, unsigned long val);
744#define __DEFINE_SET_REG(id, privop) \
745 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
746 ";;\n" \
747 "cmp.eq p6, p0 = r2, r9\n" \
748 ";;\n" \
749 "(p6) break " __stringify(HYPERPRIVOP_ ## privop) "\n" \
750 "(p6) br.cond.sptk.many b6\n" \
751 ";;\n"
752
753__DEFINE_FUNC(setreg,
754 /* kr0 .. kr 7*/
755 /*
756 * if (_IA64_REG_AR_KR0 <= regnum &&
757 * regnum <= _IA64_REG_AR_KR7) {
758 * register __index asm ("r8") = regnum - _IA64_REG_AR_KR0
759 * register __val asm ("r9") = val
760 * "break HYPERPRIVOP_SET_KR"
761 * }
762 */
763 "mov r17 = r9\n"
764 "mov r2 = " __stringify(_IA64_REG_AR_KR0) "\n"
765 ";;\n"
766 "cmp.ge p6, p0 = r9, r2\n"
767 "sub r17 = r17, r2\n"
768 ";;\n"
769 "(p6) cmp.ge.unc p7, p0 = "
770 __stringify(_IA64_REG_AR_KR7) " - " __stringify(_IA64_REG_AR_KR0)
771 ", r17\n"
772 ";;\n"
773 "(p7) mov r9 = r8\n"
774 ";;\n"
775 "(p7) mov r8 = r17\n"
776 "(p7) break " __stringify(HYPERPRIVOP_SET_KR) "\n"
777
778 /* set itm */
779 "mov r2 = " __stringify(_IA64_REG_CR_ITM) "\n"
780 ";;\n"
781 "cmp.eq p6, p0 = r2, r8\n"
782 ";;\n"
783 "(p6) br.cond.spnt xen_set_itm_with_offset\n"
784
785 /* set itc */
786 "mov r2 = " __stringify(_IA64_REG_AR_ITC) "\n"
787 ";;\n"
788 "cmp.eq p6, p0 = r2, r8\n"
789 ";;\n"
790 "(p6) br.cond.spnt xen_set_itc\n"
791
792#ifdef CONFIG_IA32_SUPPORT
793 __DEFINE_SET_REG(AR_EFLAG, SET_EFLAG)
794#endif
795 __DEFINE_SET_REG(CR_TPR, SET_TPR)
796 __DEFINE_SET_REG(CR_EOI, EOI)
797
798 /* fall back */
799 "movl r2 = ia64_native_setreg_func\n"
800 ";;\n"
801 "mov b7 = r2\n"
802 ";;\n"
803 "br.cond.sptk.many b7\n");
804#endif
805
806static const struct pv_cpu_ops xen_cpu_ops __initconst = {
264 .fc = xen_fc, 807 .fc = xen_fc,
265 .thash = xen_thash, 808 .thash = xen_thash,
266 .get_cpuid = xen_get_cpuid, 809 .get_cpuid = xen_get_cpuid,
@@ -337,7 +880,7 @@ xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val)
337 HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); 880 HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op);
338} 881}
339 882
340static const struct pv_iosapic_ops xen_iosapic_ops __initconst = { 883static struct pv_iosapic_ops xen_iosapic_ops __initdata = {
341 .pcat_compat_init = xen_pcat_compat_init, 884 .pcat_compat_init = xen_pcat_compat_init,
342 .__get_irq_chip = xen_iosapic_get_irq_chip, 885 .__get_irq_chip = xen_iosapic_get_irq_chip,
343 886
@@ -355,6 +898,8 @@ xen_setup_pv_ops(void)
355 xen_info_init(); 898 xen_info_init();
356 pv_info = xen_info; 899 pv_info = xen_info;
357 pv_init_ops = xen_init_ops; 900 pv_init_ops = xen_init_ops;
901 pv_fsys_data = xen_fsys_data;
902 pv_patchdata = xen_patchdata;
358 pv_cpu_ops = xen_cpu_ops; 903 pv_cpu_ops = xen_cpu_ops;
359 pv_iosapic_ops = xen_iosapic_ops; 904 pv_iosapic_ops = xen_iosapic_ops;
360 pv_irq_ops = xen_irq_ops; 905 pv_irq_ops = xen_irq_ops;
@@ -362,3 +907,252 @@ xen_setup_pv_ops(void)
362 907
363 paravirt_cpu_asm_init(&xen_cpu_asm_switch); 908 paravirt_cpu_asm_init(&xen_cpu_asm_switch);
364} 909}
910
911#ifdef ASM_SUPPORTED
912/***************************************************************************
913 * binary pacthing
914 * pv_init_ops.patch_bundle
915 */
916
917#define DEFINE_FUNC_GETREG(name, privop) \
918 DEFINE_FUNC0(get_ ## name, \
919 "break "__stringify(HYPERPRIVOP_GET_ ## privop) "\n")
920
921DEFINE_FUNC_GETREG(psr, PSR);
922DEFINE_FUNC_GETREG(eflag, EFLAG);
923DEFINE_FUNC_GETREG(ivr, IVR);
924DEFINE_FUNC_GETREG(tpr, TPR);
925
926#define DEFINE_FUNC_SET_KR(n) \
927 DEFINE_VOID_FUNC0(set_kr ## n, \
928 ";;\n" \
929 "mov r9 = r8\n" \
930 "mov r8 = " #n "\n" \
931 "break " __stringify(HYPERPRIVOP_SET_KR) "\n")
932
933DEFINE_FUNC_SET_KR(0);
934DEFINE_FUNC_SET_KR(1);
935DEFINE_FUNC_SET_KR(2);
936DEFINE_FUNC_SET_KR(3);
937DEFINE_FUNC_SET_KR(4);
938DEFINE_FUNC_SET_KR(5);
939DEFINE_FUNC_SET_KR(6);
940DEFINE_FUNC_SET_KR(7);
941
942#define __DEFINE_FUNC_SETREG(name, privop) \
943 DEFINE_VOID_FUNC0(name, \
944 "break "__stringify(HYPERPRIVOP_ ## privop) "\n")
945
946#define DEFINE_FUNC_SETREG(name, privop) \
947 __DEFINE_FUNC_SETREG(set_ ## name, SET_ ## privop)
948
949DEFINE_FUNC_SETREG(eflag, EFLAG);
950DEFINE_FUNC_SETREG(tpr, TPR);
951__DEFINE_FUNC_SETREG(eoi, EOI);
952
953extern const char xen_check_events[];
954extern const char __xen_intrin_local_irq_restore_direct_start[];
955extern const char __xen_intrin_local_irq_restore_direct_end[];
956extern const unsigned long __xen_intrin_local_irq_restore_direct_reloc;
957
958asm (
959 ".align 32\n"
960 ".proc xen_check_events\n"
961 "xen_check_events:\n"
962 /* masked = 0
963 * r9 = masked_addr - 1
964 * = pending_intr_addr
965 */
966 "st1.rel [r9] = r0, -1\n"
967 ";;\n"
968 /* r8 = pending_intr */
969 "ld1.acq r11 = [r9]\n"
970 ";;\n"
971 /* p9 = interrupt pending? */
972 "cmp.ne p9, p10 = r11, r0\n"
973 ";;\n"
974 "(p10) mf\n"
975 /* issue hypercall to trigger interrupt */
976 "(p9) break " __stringify(HYPERPRIVOP_SSM_I) "\n"
977 "br.cond.sptk.many b6\n"
978 ".endp xen_check_events\n"
979 "\n"
980 ".align 32\n"
981 ".proc __xen_intrin_local_irq_restore_direct\n"
982 "__xen_intrin_local_irq_restore_direct:\n"
983 "__xen_intrin_local_irq_restore_direct_start:\n"
984 "1:\n"
985 "{\n"
986 "cmp.ne p6, p7 = r8, r0\n"
987 "mov r17 = ip\n" /* get ip to calc return address */
988 "mov r9 = "__stringify(XEN_PSR_I_ADDR_ADDR) "\n"
989 ";;\n"
990 "}\n"
991 "{\n"
992 /* r9 = XEN_PSR_I_ADDR */
993 "ld8 r9 = [r9]\n"
994 ";;\n"
995 /* r10 = masked previous value */
996 "(p6) ld1.acq r10 = [r9]\n"
997 "adds r17 = 1f - 1b, r17\n" /* calculate return address */
998 ";;\n"
999 "}\n"
1000 "{\n"
1001 /* p8 = !masked interrupt masked previously? */
1002 "(p6) cmp.ne.unc p8, p0 = r10, r0\n"
1003 "\n"
1004 /* p7 = else clause */
1005 "(p7) mov r11 = 1\n"
1006 ";;\n"
1007 "(p8) mov b6 = r17\n" /* set return address */
1008 "}\n"
1009 "{\n"
1010 /* masked = 1 */
1011 "(p7) st1.rel [r9] = r11\n"
1012 "\n"
1013 "[99:]\n"
1014 "(p8) brl.cond.dptk.few xen_check_events\n"
1015 "}\n"
1016 /* pv calling stub is 5 bundles. fill nop to adjust return address */
1017 "{\n"
1018 "nop 0\n"
1019 "nop 0\n"
1020 "nop 0\n"
1021 "}\n"
1022 "1:\n"
1023 "__xen_intrin_local_irq_restore_direct_end:\n"
1024 ".endp __xen_intrin_local_irq_restore_direct\n"
1025 "\n"
1026 ".align 8\n"
1027 "__xen_intrin_local_irq_restore_direct_reloc:\n"
1028 "data8 99b\n"
1029);
1030
1031static struct paravirt_patch_bundle_elem xen_patch_bundle_elems[]
1032__initdata_or_module =
1033{
1034#define XEN_PATCH_BUNDLE_ELEM(name, type) \
1035 { \
1036 (void*)xen_ ## name ## _direct_start, \
1037 (void*)xen_ ## name ## _direct_end, \
1038 PARAVIRT_PATCH_TYPE_ ## type, \
1039 }
1040
1041 XEN_PATCH_BUNDLE_ELEM(fc, FC),
1042 XEN_PATCH_BUNDLE_ELEM(thash, THASH),
1043 XEN_PATCH_BUNDLE_ELEM(get_cpuid, GET_CPUID),
1044 XEN_PATCH_BUNDLE_ELEM(get_pmd, GET_PMD),
1045 XEN_PATCH_BUNDLE_ELEM(ptcga, PTCGA),
1046 XEN_PATCH_BUNDLE_ELEM(get_rr, GET_RR),
1047 XEN_PATCH_BUNDLE_ELEM(set_rr, SET_RR),
1048 XEN_PATCH_BUNDLE_ELEM(set_rr0_to_rr4, SET_RR0_TO_RR4),
1049 XEN_PATCH_BUNDLE_ELEM(ssm_i, SSM_I),
1050 XEN_PATCH_BUNDLE_ELEM(rsm_i, RSM_I),
1051 XEN_PATCH_BUNDLE_ELEM(get_psr_i, GET_PSR_I),
1052 {
1053 (void*)__xen_intrin_local_irq_restore_direct_start,
1054 (void*)__xen_intrin_local_irq_restore_direct_end,
1055 PARAVIRT_PATCH_TYPE_INTRIN_LOCAL_IRQ_RESTORE,
1056 },
1057
1058#define XEN_PATCH_BUNDLE_ELEM_GETREG(name, reg) \
1059 { \
1060 xen_get_ ## name ## _direct_start, \
1061 xen_get_ ## name ## _direct_end, \
1062 PARAVIRT_PATCH_TYPE_GETREG + _IA64_REG_ ## reg, \
1063 }
1064
1065 XEN_PATCH_BUNDLE_ELEM_GETREG(psr, PSR),
1066 XEN_PATCH_BUNDLE_ELEM_GETREG(eflag, AR_EFLAG),
1067
1068 XEN_PATCH_BUNDLE_ELEM_GETREG(ivr, CR_IVR),
1069 XEN_PATCH_BUNDLE_ELEM_GETREG(tpr, CR_TPR),
1070
1071 XEN_PATCH_BUNDLE_ELEM_GETREG(itc, AR_ITC),
1072 XEN_PATCH_BUNDLE_ELEM_GETREG(itm_with_offset, CR_ITM),
1073
1074
1075#define __XEN_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
1076 { \
1077 xen_ ## name ## _direct_start, \
1078 xen_ ## name ## _direct_end, \
1079 PARAVIRT_PATCH_TYPE_SETREG + _IA64_REG_ ## reg, \
1080 }
1081
1082#define XEN_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
1083 __XEN_PATCH_BUNDLE_ELEM_SETREG(set_ ## name, reg)
1084
1085 XEN_PATCH_BUNDLE_ELEM_SETREG(kr0, AR_KR0),
1086 XEN_PATCH_BUNDLE_ELEM_SETREG(kr1, AR_KR1),
1087 XEN_PATCH_BUNDLE_ELEM_SETREG(kr2, AR_KR2),
1088 XEN_PATCH_BUNDLE_ELEM_SETREG(kr3, AR_KR3),
1089 XEN_PATCH_BUNDLE_ELEM_SETREG(kr4, AR_KR4),
1090 XEN_PATCH_BUNDLE_ELEM_SETREG(kr5, AR_KR5),
1091 XEN_PATCH_BUNDLE_ELEM_SETREG(kr6, AR_KR6),
1092 XEN_PATCH_BUNDLE_ELEM_SETREG(kr7, AR_KR7),
1093
1094 XEN_PATCH_BUNDLE_ELEM_SETREG(eflag, AR_EFLAG),
1095 XEN_PATCH_BUNDLE_ELEM_SETREG(tpr, CR_TPR),
1096 __XEN_PATCH_BUNDLE_ELEM_SETREG(eoi, CR_EOI),
1097
1098 XEN_PATCH_BUNDLE_ELEM_SETREG(itc, AR_ITC),
1099 XEN_PATCH_BUNDLE_ELEM_SETREG(itm_with_offset, CR_ITM),
1100};
1101
1102static unsigned long __init_or_module
1103xen_patch_bundle(void *sbundle, void *ebundle, unsigned long type)
1104{
1105 const unsigned long nelems = sizeof(xen_patch_bundle_elems) /
1106 sizeof(xen_patch_bundle_elems[0]);
1107 unsigned long used;
1108 const struct paravirt_patch_bundle_elem *found;
1109
1110 used = __paravirt_patch_apply_bundle(sbundle, ebundle, type,
1111 xen_patch_bundle_elems, nelems,
1112 &found);
1113
1114 if (found == NULL)
1115 /* fallback */
1116 return ia64_native_patch_bundle(sbundle, ebundle, type);
1117 if (used == 0)
1118 return used;
1119
1120 /* relocation */
1121 switch (type) {
1122 case PARAVIRT_PATCH_TYPE_INTRIN_LOCAL_IRQ_RESTORE: {
1123 unsigned long reloc =
1124 __xen_intrin_local_irq_restore_direct_reloc;
1125 unsigned long reloc_offset = reloc - (unsigned long)
1126 __xen_intrin_local_irq_restore_direct_start;
1127 unsigned long tag = (unsigned long)sbundle + reloc_offset;
1128 paravirt_patch_reloc_brl(tag, xen_check_events);
1129 break;
1130 }
1131 default:
1132 /* nothing */
1133 break;
1134 }
1135 return used;
1136}
1137#endif /* ASM_SUPPOTED */
1138
1139const struct paravirt_patch_branch_target xen_branch_target[]
1140__initconst = {
1141#define PARAVIRT_BR_TARGET(name, type) \
1142 { \
1143 &xen_ ## name, \
1144 PARAVIRT_PATCH_TYPE_BR_ ## type, \
1145 }
1146 PARAVIRT_BR_TARGET(switch_to, SWITCH_TO),
1147 PARAVIRT_BR_TARGET(leave_syscall, LEAVE_SYSCALL),
1148 PARAVIRT_BR_TARGET(work_processed_syscall, WORK_PROCESSED_SYSCALL),
1149 PARAVIRT_BR_TARGET(leave_kernel, LEAVE_KERNEL),
1150};
1151
1152static void __init
1153xen_patch_branch(unsigned long tag, unsigned long type)
1154{
1155 const unsigned long nelem =
1156 sizeof(xen_branch_target) / sizeof(xen_branch_target[0]);
1157 __paravirt_patch_apply_branch(tag, type, xen_branch_target, nelem);
1158}
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 7103d91e1a2f..3e876f0baebc 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -225,7 +225,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
225 return 0; /* Task didn't use the fpu at all. */ 225 return 0; /* Task didn't use the fpu at all. */
226} 226}
227 227
228int copy_thread(int nr, unsigned long clone_flags, unsigned long spu, 228int copy_thread(unsigned long clone_flags, unsigned long spu,
229 unsigned long unused, struct task_struct *tsk, struct pt_regs *regs) 229 unsigned long unused, struct task_struct *tsk, struct pt_regs *regs)
230{ 230{
231 struct pt_regs *childregs = task_pt_regs(tsk); 231 struct pt_regs *childregs = task_pt_regs(tsk);
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index 6ea017727cce..cada3ba4b990 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -230,7 +230,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
230static struct irqaction irq0 = { 230static struct irqaction irq0 = {
231 .handler = timer_interrupt, 231 .handler = timer_interrupt,
232 .flags = IRQF_DISABLED, 232 .flags = IRQF_DISABLED,
233 .mask = CPU_MASK_NONE,
234 .name = "MFT2", 233 .name = "MFT2",
235}; 234};
236 235
diff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h
index fedf3e326121..fb8a06b9ab6a 100644
--- a/arch/m68k/include/asm/bootinfo.h
+++ b/arch/m68k/include/asm/bootinfo.h
@@ -1,5 +1,378 @@
1#ifdef __uClinux__ 1/*
2#include "bootinfo_no.h" 2** asm/bootinfo.h -- Definition of the Linux/m68k boot information structure
3#else 3**
4#include "bootinfo_mm.h" 4** Copyright 1992 by Greg Harp
5**
6** This file is subject to the terms and conditions of the GNU General Public
7** License. See the file COPYING in the main directory of this archive
8** for more details.
9**
10** Created 09/29/92 by Greg Harp
11**
12** 5/2/94 Roman Hodek:
13** Added bi_atari part of the machine dependent union bi_un; for now it
14** contains just a model field to distinguish between TT and Falcon.
15** 26/7/96 Roman Zippel:
16** Renamed to setup.h; added some useful macros to allow gcc some
17** optimizations if possible.
18** 5/10/96 Geert Uytterhoeven:
19** Redesign of the boot information structure; renamed to bootinfo.h again
20** 27/11/96 Geert Uytterhoeven:
21** Backwards compatibility with bootinfo interface version 1.0
22*/
23
24#ifndef _M68K_BOOTINFO_H
25#define _M68K_BOOTINFO_H
26
27
28 /*
29 * Bootinfo definitions
30 *
31 * This is an easily parsable and extendable structure containing all
32 * information to be passed from the bootstrap to the kernel.
33 *
34 * This way I hope to keep all future changes back/forewards compatible.
35 * Thus, keep your fingers crossed...
36 *
37 * This structure is copied right after the kernel bss by the bootstrap
38 * routine.
39 */
40
41#ifndef __ASSEMBLY__
42
43struct bi_record {
44 unsigned short tag; /* tag ID */
45 unsigned short size; /* size of record (in bytes) */
46 unsigned long data[0]; /* data */
47};
48
49#endif /* __ASSEMBLY__ */
50
51
52 /*
53 * Tag Definitions
54 *
55 * Machine independent tags start counting from 0x0000
56 * Machine dependent tags start counting from 0x8000
57 */
58
59#define BI_LAST 0x0000 /* last record (sentinel) */
60#define BI_MACHTYPE 0x0001 /* machine type (u_long) */
61#define BI_CPUTYPE 0x0002 /* cpu type (u_long) */
62#define BI_FPUTYPE 0x0003 /* fpu type (u_long) */
63#define BI_MMUTYPE 0x0004 /* mmu type (u_long) */
64#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */
65 /* (struct mem_info) */
66#define BI_RAMDISK 0x0006 /* ramdisk address and size */
67 /* (struct mem_info) */
68#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */
69 /* (string) */
70
71 /*
72 * Amiga-specific tags
73 */
74
75#define BI_AMIGA_MODEL 0x8000 /* model (u_long) */
76#define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */
77 /* (struct ConfigDev) */
78#define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */
79#define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */
80#define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */
81#define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */
82#define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */
83#define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */
84
85 /*
86 * Atari-specific tags
87 */
88
89#define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */
90#define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */
91 /* (values are ATARI_MACH_* defines */
92
93/* mch_cookie values (upper word) */
94#define ATARI_MCH_ST 0
95#define ATARI_MCH_STE 1
96#define ATARI_MCH_TT 2
97#define ATARI_MCH_FALCON 3
98
99/* mch_type values */
100#define ATARI_MACH_NORMAL 0 /* no special machine type */
101#define ATARI_MACH_MEDUSA 1 /* Medusa 040 */
102#define ATARI_MACH_HADES 2 /* Hades 040 or 060 */
103#define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */
104
105 /*
106 * VME-specific tags
107 */
108
109#define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */
110#define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */
111
112/* BI_VME_TYPE codes */
113#define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */
114#define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */
115#define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */
116#define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */
117#define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */
118#define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */
119#define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */
120#define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */
121#define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */
122
123/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
124 * Motorola VME boards. Contains board number, Bug version, board
125 * configuration options, etc. See include/asm/mvme16xhw.h for details.
126 */
127
128
129 /*
130 * Macintosh-specific tags (all u_long)
131 */
132
133#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */
134#define BI_MAC_VADDR 0x8001 /* Mac video base address */
135#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */
136#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */
137#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */
138#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */
139#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */
140#define BI_MAC_BTIME 0x8007 /* Mac boot time */
141#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */
142#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */
143#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */
144#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */
145
146 /*
147 * Macintosh hardware profile data - unused, see macintosh.h for
148 * resonable type values
149 */
150
151#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */
152#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */
153#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */
154#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */
155#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */
156#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */
157#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */
158#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */
159#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */
160#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */
161#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */
162#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */
163#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */
164#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */
165#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */
166#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */
167#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */
168#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */
169
170 /*
171 * Mac: compatibility with old booter data format (temporarily)
172 * Fields unused with the new bootinfo can be deleted now; instead of
173 * adding new fields the struct might be splitted into a hardware address
174 * part and a hardware type part
175 */
176
177#ifndef __ASSEMBLY__
178
179struct mac_booter_data
180{
181 unsigned long videoaddr;
182 unsigned long videorow;
183 unsigned long videodepth;
184 unsigned long dimensions;
185 unsigned long args;
186 unsigned long boottime;
187 unsigned long gmtbias;
188 unsigned long bootver;
189 unsigned long videological;
190 unsigned long sccbase;
191 unsigned long id;
192 unsigned long memsize;
193 unsigned long serialmf;
194 unsigned long serialhsk;
195 unsigned long serialgpi;
196 unsigned long printmf;
197 unsigned long printhsk;
198 unsigned long printgpi;
199 unsigned long cpuid;
200 unsigned long rombase;
201 unsigned long adbdelay;
202 unsigned long timedbra;
203};
204
205extern struct mac_booter_data
206 mac_bi_data;
207
5#endif 208#endif
209
210 /*
211 * Apollo-specific tags
212 */
213
214#define BI_APOLLO_MODEL 0x8000 /* model (u_long) */
215
216 /*
217 * HP300-specific tags
218 */
219
220#define BI_HP300_MODEL 0x8000 /* model (u_long) */
221#define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */
222#define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */
223
224 /*
225 * Stuff for bootinfo interface versioning
226 *
227 * At the start of kernel code, a 'struct bootversion' is located.
228 * bootstrap checks for a matching version of the interface before booting
229 * a kernel, to avoid user confusion if kernel and bootstrap don't work
230 * together :-)
231 *
232 * If incompatible changes are made to the bootinfo interface, the major
233 * number below should be stepped (and the minor reset to 0) for the
234 * appropriate machine. If a change is backward-compatible, the minor
235 * should be stepped. "Backwards-compatible" means that booting will work,
236 * but certain features may not.
237 */
238
239#define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */
240#define MK_BI_VERSION(major,minor) (((major)<<16)+(minor))
241#define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff)
242#define BI_VERSION_MINOR(v) ((v) & 0xffff)
243
244#ifndef __ASSEMBLY__
245
246struct bootversion {
247 unsigned short branch;
248 unsigned long magic;
249 struct {
250 unsigned long machtype;
251 unsigned long version;
252 } machversions[0];
253};
254
255#endif /* __ASSEMBLY__ */
256
257#define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
258#define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 )
259#define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
260#define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
261#define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
262#define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
263#define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
264#define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
265
266#ifdef BOOTINFO_COMPAT_1_0
267
268 /*
269 * Backwards compatibility with bootinfo interface version 1.0
270 */
271
272#define COMPAT_AMIGA_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
273#define COMPAT_ATARI_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
274#define COMPAT_MAC_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
275
276#include <linux/zorro.h>
277
278#define COMPAT_NUM_AUTO 16
279
280struct compat_bi_Amiga {
281 int model;
282 int num_autocon;
283 struct ConfigDev autocon[COMPAT_NUM_AUTO];
284 unsigned long chip_size;
285 unsigned char vblank;
286 unsigned char psfreq;
287 unsigned long eclock;
288 unsigned long chipset;
289 unsigned long hw_present;
290};
291
292struct compat_bi_Atari {
293 unsigned long hw_present;
294 unsigned long mch_cookie;
295};
296
297#ifndef __ASSEMBLY__
298
299struct compat_bi_Macintosh
300{
301 unsigned long videoaddr;
302 unsigned long videorow;
303 unsigned long videodepth;
304 unsigned long dimensions;
305 unsigned long args;
306 unsigned long boottime;
307 unsigned long gmtbias;
308 unsigned long bootver;
309 unsigned long videological;
310 unsigned long sccbase;
311 unsigned long id;
312 unsigned long memsize;
313 unsigned long serialmf;
314 unsigned long serialhsk;
315 unsigned long serialgpi;
316 unsigned long printmf;
317 unsigned long printhsk;
318 unsigned long printgpi;
319 unsigned long cpuid;
320 unsigned long rombase;
321 unsigned long adbdelay;
322 unsigned long timedbra;
323};
324
325#endif
326
327struct compat_mem_info {
328 unsigned long addr;
329 unsigned long size;
330};
331
332#define COMPAT_NUM_MEMINFO 4
333
334#define COMPAT_CPUB_68020 0
335#define COMPAT_CPUB_68030 1
336#define COMPAT_CPUB_68040 2
337#define COMPAT_CPUB_68060 3
338#define COMPAT_FPUB_68881 5
339#define COMPAT_FPUB_68882 6
340#define COMPAT_FPUB_68040 7
341#define COMPAT_FPUB_68060 8
342
343#define COMPAT_CPU_68020 (1<<COMPAT_CPUB_68020)
344#define COMPAT_CPU_68030 (1<<COMPAT_CPUB_68030)
345#define COMPAT_CPU_68040 (1<<COMPAT_CPUB_68040)
346#define COMPAT_CPU_68060 (1<<COMPAT_CPUB_68060)
347#define COMPAT_CPU_MASK (31)
348#define COMPAT_FPU_68881 (1<<COMPAT_FPUB_68881)
349#define COMPAT_FPU_68882 (1<<COMPAT_FPUB_68882)
350#define COMPAT_FPU_68040 (1<<COMPAT_FPUB_68040)
351#define COMPAT_FPU_68060 (1<<COMPAT_FPUB_68060)
352#define COMPAT_FPU_MASK (0xfe0)
353
354#define COMPAT_CL_SIZE (256)
355
356struct compat_bootinfo {
357 unsigned long machtype;
358 unsigned long cputype;
359 struct compat_mem_info memory[COMPAT_NUM_MEMINFO];
360 int num_memory;
361 unsigned long ramdisk_size;
362 unsigned long ramdisk_addr;
363 char command_line[COMPAT_CL_SIZE];
364 union {
365 struct compat_bi_Amiga bi_ami;
366 struct compat_bi_Atari bi_ata;
367 struct compat_bi_Macintosh bi_mac;
368 } bi_un;
369};
370
371#define bi_amiga bi_un.bi_ami
372#define bi_atari bi_un.bi_ata
373#define bi_mac bi_un.bi_mac
374
375#endif /* BOOTINFO_COMPAT_1_0 */
376
377
378#endif /* _M68K_BOOTINFO_H */
diff --git a/arch/m68k/include/asm/bootinfo_mm.h b/arch/m68k/include/asm/bootinfo_mm.h
deleted file mode 100644
index fb8a06b9ab6a..000000000000
--- a/arch/m68k/include/asm/bootinfo_mm.h
+++ /dev/null
@@ -1,378 +0,0 @@
1/*
2** asm/bootinfo.h -- Definition of the Linux/m68k boot information structure
3**
4** Copyright 1992 by Greg Harp
5**
6** This file is subject to the terms and conditions of the GNU General Public
7** License. See the file COPYING in the main directory of this archive
8** for more details.
9**
10** Created 09/29/92 by Greg Harp
11**
12** 5/2/94 Roman Hodek:
13** Added bi_atari part of the machine dependent union bi_un; for now it
14** contains just a model field to distinguish between TT and Falcon.
15** 26/7/96 Roman Zippel:
16** Renamed to setup.h; added some useful macros to allow gcc some
17** optimizations if possible.
18** 5/10/96 Geert Uytterhoeven:
19** Redesign of the boot information structure; renamed to bootinfo.h again
20** 27/11/96 Geert Uytterhoeven:
21** Backwards compatibility with bootinfo interface version 1.0
22*/
23
24#ifndef _M68K_BOOTINFO_H
25#define _M68K_BOOTINFO_H
26
27
28 /*
29 * Bootinfo definitions
30 *
31 * This is an easily parsable and extendable structure containing all
32 * information to be passed from the bootstrap to the kernel.
33 *
34 * This way I hope to keep all future changes back/forewards compatible.
35 * Thus, keep your fingers crossed...
36 *
37 * This structure is copied right after the kernel bss by the bootstrap
38 * routine.
39 */
40
41#ifndef __ASSEMBLY__
42
43struct bi_record {
44 unsigned short tag; /* tag ID */
45 unsigned short size; /* size of record (in bytes) */
46 unsigned long data[0]; /* data */
47};
48
49#endif /* __ASSEMBLY__ */
50
51
52 /*
53 * Tag Definitions
54 *
55 * Machine independent tags start counting from 0x0000
56 * Machine dependent tags start counting from 0x8000
57 */
58
59#define BI_LAST 0x0000 /* last record (sentinel) */
60#define BI_MACHTYPE 0x0001 /* machine type (u_long) */
61#define BI_CPUTYPE 0x0002 /* cpu type (u_long) */
62#define BI_FPUTYPE 0x0003 /* fpu type (u_long) */
63#define BI_MMUTYPE 0x0004 /* mmu type (u_long) */
64#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */
65 /* (struct mem_info) */
66#define BI_RAMDISK 0x0006 /* ramdisk address and size */
67 /* (struct mem_info) */
68#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */
69 /* (string) */
70
71 /*
72 * Amiga-specific tags
73 */
74
75#define BI_AMIGA_MODEL 0x8000 /* model (u_long) */
76#define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */
77 /* (struct ConfigDev) */
78#define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */
79#define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */
80#define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */
81#define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */
82#define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */
83#define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */
84
85 /*
86 * Atari-specific tags
87 */
88
89#define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */
90#define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */
91 /* (values are ATARI_MACH_* defines */
92
93/* mch_cookie values (upper word) */
94#define ATARI_MCH_ST 0
95#define ATARI_MCH_STE 1
96#define ATARI_MCH_TT 2
97#define ATARI_MCH_FALCON 3
98
99/* mch_type values */
100#define ATARI_MACH_NORMAL 0 /* no special machine type */
101#define ATARI_MACH_MEDUSA 1 /* Medusa 040 */
102#define ATARI_MACH_HADES 2 /* Hades 040 or 060 */
103#define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */
104
105 /*
106 * VME-specific tags
107 */
108
109#define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */
110#define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */
111
112/* BI_VME_TYPE codes */
113#define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */
114#define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */
115#define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */
116#define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */
117#define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */
118#define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */
119#define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */
120#define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */
121#define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */
122
123/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
124 * Motorola VME boards. Contains board number, Bug version, board
125 * configuration options, etc. See include/asm/mvme16xhw.h for details.
126 */
127
128
129 /*
130 * Macintosh-specific tags (all u_long)
131 */
132
133#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */
134#define BI_MAC_VADDR 0x8001 /* Mac video base address */
135#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */
136#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */
137#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */
138#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */
139#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */
140#define BI_MAC_BTIME 0x8007 /* Mac boot time */
141#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */
142#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */
143#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */
144#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */
145
146 /*
147 * Macintosh hardware profile data - unused, see macintosh.h for
148 * resonable type values
149 */
150
151#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */
152#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */
153#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */
154#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */
155#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */
156#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */
157#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */
158#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */
159#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */
160#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */
161#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */
162#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */
163#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */
164#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */
165#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */
166#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */
167#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */
168#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */
169
170 /*
171 * Mac: compatibility with old booter data format (temporarily)
172 * Fields unused with the new bootinfo can be deleted now; instead of
173 * adding new fields the struct might be splitted into a hardware address
174 * part and a hardware type part
175 */
176
177#ifndef __ASSEMBLY__
178
179struct mac_booter_data
180{
181 unsigned long videoaddr;
182 unsigned long videorow;
183 unsigned long videodepth;
184 unsigned long dimensions;
185 unsigned long args;
186 unsigned long boottime;
187 unsigned long gmtbias;
188 unsigned long bootver;
189 unsigned long videological;
190 unsigned long sccbase;
191 unsigned long id;
192 unsigned long memsize;
193 unsigned long serialmf;
194 unsigned long serialhsk;
195 unsigned long serialgpi;
196 unsigned long printmf;
197 unsigned long printhsk;
198 unsigned long printgpi;
199 unsigned long cpuid;
200 unsigned long rombase;
201 unsigned long adbdelay;
202 unsigned long timedbra;
203};
204
205extern struct mac_booter_data
206 mac_bi_data;
207
208#endif
209
210 /*
211 * Apollo-specific tags
212 */
213
214#define BI_APOLLO_MODEL 0x8000 /* model (u_long) */
215
216 /*
217 * HP300-specific tags
218 */
219
220#define BI_HP300_MODEL 0x8000 /* model (u_long) */
221#define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */
222#define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */
223
224 /*
225 * Stuff for bootinfo interface versioning
226 *
227 * At the start of kernel code, a 'struct bootversion' is located.
228 * bootstrap checks for a matching version of the interface before booting
229 * a kernel, to avoid user confusion if kernel and bootstrap don't work
230 * together :-)
231 *
232 * If incompatible changes are made to the bootinfo interface, the major
233 * number below should be stepped (and the minor reset to 0) for the
234 * appropriate machine. If a change is backward-compatible, the minor
235 * should be stepped. "Backwards-compatible" means that booting will work,
236 * but certain features may not.
237 */
238
239#define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */
240#define MK_BI_VERSION(major,minor) (((major)<<16)+(minor))
241#define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff)
242#define BI_VERSION_MINOR(v) ((v) & 0xffff)
243
244#ifndef __ASSEMBLY__
245
246struct bootversion {
247 unsigned short branch;
248 unsigned long magic;
249 struct {
250 unsigned long machtype;
251 unsigned long version;
252 } machversions[0];
253};
254
255#endif /* __ASSEMBLY__ */
256
257#define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
258#define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 )
259#define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
260#define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
261#define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
262#define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
263#define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
264#define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
265
266#ifdef BOOTINFO_COMPAT_1_0
267
268 /*
269 * Backwards compatibility with bootinfo interface version 1.0
270 */
271
272#define COMPAT_AMIGA_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
273#define COMPAT_ATARI_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
274#define COMPAT_MAC_BOOTI_VERSION MK_BI_VERSION( 1, 0 )
275
276#include <linux/zorro.h>
277
278#define COMPAT_NUM_AUTO 16
279
280struct compat_bi_Amiga {
281 int model;
282 int num_autocon;
283 struct ConfigDev autocon[COMPAT_NUM_AUTO];
284 unsigned long chip_size;
285 unsigned char vblank;
286 unsigned char psfreq;
287 unsigned long eclock;
288 unsigned long chipset;
289 unsigned long hw_present;
290};
291
292struct compat_bi_Atari {
293 unsigned long hw_present;
294 unsigned long mch_cookie;
295};
296
297#ifndef __ASSEMBLY__
298
299struct compat_bi_Macintosh
300{
301 unsigned long videoaddr;
302 unsigned long videorow;
303 unsigned long videodepth;
304 unsigned long dimensions;
305 unsigned long args;
306 unsigned long boottime;
307 unsigned long gmtbias;
308 unsigned long bootver;
309 unsigned long videological;
310 unsigned long sccbase;
311 unsigned long id;
312 unsigned long memsize;
313 unsigned long serialmf;
314 unsigned long serialhsk;
315 unsigned long serialgpi;
316 unsigned long printmf;
317 unsigned long printhsk;
318 unsigned long printgpi;
319 unsigned long cpuid;
320 unsigned long rombase;
321 unsigned long adbdelay;
322 unsigned long timedbra;
323};
324
325#endif
326
327struct compat_mem_info {
328 unsigned long addr;
329 unsigned long size;
330};
331
332#define COMPAT_NUM_MEMINFO 4
333
334#define COMPAT_CPUB_68020 0
335#define COMPAT_CPUB_68030 1
336#define COMPAT_CPUB_68040 2
337#define COMPAT_CPUB_68060 3
338#define COMPAT_FPUB_68881 5
339#define COMPAT_FPUB_68882 6
340#define COMPAT_FPUB_68040 7
341#define COMPAT_FPUB_68060 8
342
343#define COMPAT_CPU_68020 (1<<COMPAT_CPUB_68020)
344#define COMPAT_CPU_68030 (1<<COMPAT_CPUB_68030)
345#define COMPAT_CPU_68040 (1<<COMPAT_CPUB_68040)
346#define COMPAT_CPU_68060 (1<<COMPAT_CPUB_68060)
347#define COMPAT_CPU_MASK (31)
348#define COMPAT_FPU_68881 (1<<COMPAT_FPUB_68881)
349#define COMPAT_FPU_68882 (1<<COMPAT_FPUB_68882)
350#define COMPAT_FPU_68040 (1<<COMPAT_FPUB_68040)
351#define COMPAT_FPU_68060 (1<<COMPAT_FPUB_68060)
352#define COMPAT_FPU_MASK (0xfe0)
353
354#define COMPAT_CL_SIZE (256)
355
356struct compat_bootinfo {
357 unsigned long machtype;
358 unsigned long cputype;
359 struct compat_mem_info memory[COMPAT_NUM_MEMINFO];
360 int num_memory;
361 unsigned long ramdisk_size;
362 unsigned long ramdisk_addr;
363 char command_line[COMPAT_CL_SIZE];
364 union {
365 struct compat_bi_Amiga bi_ami;
366 struct compat_bi_Atari bi_ata;
367 struct compat_bi_Macintosh bi_mac;
368 } bi_un;
369};
370
371#define bi_amiga bi_un.bi_ami
372#define bi_atari bi_un.bi_ata
373#define bi_mac bi_un.bi_mac
374
375#endif /* BOOTINFO_COMPAT_1_0 */
376
377
378#endif /* _M68K_BOOTINFO_H */
diff --git a/arch/m68k/include/asm/bootinfo_no.h b/arch/m68k/include/asm/bootinfo_no.h
deleted file mode 100644
index c12e526f5189..000000000000
--- a/arch/m68k/include/asm/bootinfo_no.h
+++ /dev/null
@@ -1,2 +0,0 @@
1
2/* Nothing for m68knommu */
diff --git a/arch/m68k/include/asm/bug.h b/arch/m68k/include/asm/bug.h
index 997e0944ebc1..ef9a2e47352f 100644
--- a/arch/m68k/include/asm/bug.h
+++ b/arch/m68k/include/asm/bug.h
@@ -1,5 +1,30 @@
1#ifdef __uClinux__ 1#ifndef _M68K_BUG_H
2#include "bug_no.h" 2#define _M68K_BUG_H
3
4#ifdef CONFIG_MMU
5#ifdef CONFIG_BUG
6#ifdef CONFIG_DEBUG_BUGVERBOSE
7#ifndef CONFIG_SUN3
8#define BUG() do { \
9 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
10 __builtin_trap(); \
11} while (0)
3#else 12#else
4#include "bug_mm.h" 13#define BUG() do { \
14 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
15 panic("BUG!"); \
16} while (0)
17#endif
18#else
19#define BUG() do { \
20 __builtin_trap(); \
21} while (0)
22#endif
23
24#define HAVE_ARCH_BUG
25#endif
26#endif /* CONFIG_MMU */
27
28#include <asm-generic/bug.h>
29
5#endif 30#endif
diff --git a/arch/m68k/include/asm/bug_mm.h b/arch/m68k/include/asm/bug_mm.h
deleted file mode 100644
index e5b528deb8a8..000000000000
--- a/arch/m68k/include/asm/bug_mm.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef _M68K_BUG_H
2#define _M68K_BUG_H
3
4
5#ifdef CONFIG_BUG
6#ifdef CONFIG_DEBUG_BUGVERBOSE
7#ifndef CONFIG_SUN3
8#define BUG() do { \
9 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
10 __builtin_trap(); \
11} while (0)
12#else
13#define BUG() do { \
14 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
15 panic("BUG!"); \
16} while (0)
17#endif
18#else
19#define BUG() do { \
20 __builtin_trap(); \
21} while (0)
22#endif
23
24#define HAVE_ARCH_BUG
25#endif
26
27#include <asm-generic/bug.h>
28
29#endif
diff --git a/arch/m68k/include/asm/bug_no.h b/arch/m68k/include/asm/bug_no.h
deleted file mode 100644
index 70e7dc0af21a..000000000000
--- a/arch/m68k/include/asm/bug_no.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef _M68KNOMMU_BUG_H
2#define _M68KNOMMU_BUG_H
3#include <asm-generic/bug.h>
4#endif
diff --git a/arch/m68k/include/asm/bugs.h b/arch/m68k/include/asm/bugs.h
index 01f047d784ec..d06207b9ba5a 100644
--- a/arch/m68k/include/asm/bugs.h
+++ b/arch/m68k/include/asm/bugs.h
@@ -1,5 +1,20 @@
1#ifdef __uClinux__ 1/*
2#include "bugs_no.h" 2 * include/asm-m68k/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14#ifdef CONFIG_MMU
15extern void check_bugs(void); /* in arch/m68k/kernel/setup.c */
3#else 16#else
4#include "bugs_mm.h" 17static void check_bugs(void)
18{
19}
5#endif 20#endif
diff --git a/arch/m68k/include/asm/bugs_mm.h b/arch/m68k/include/asm/bugs_mm.h
deleted file mode 100644
index d01935592410..000000000000
--- a/arch/m68k/include/asm/bugs_mm.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-m68k/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14extern void check_bugs(void); /* in arch/m68k/kernel/setup.c */
diff --git a/arch/m68k/include/asm/bugs_no.h b/arch/m68k/include/asm/bugs_no.h
deleted file mode 100644
index 5f382dac3a60..000000000000
--- a/arch/m68k/include/asm/bugs_no.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-m68k/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14static void check_bugs(void)
15{
16}
diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h
index 599c29bc8f40..fed3fd30de7e 100644
--- a/arch/m68k/include/asm/cache.h
+++ b/arch/m68k/include/asm/cache.h
@@ -1,5 +1,11 @@
1#ifdef __uClinux__ 1/*
2#include "cache_no.h" 2 * include/asm-m68k/cache.h
3#else 3 */
4#include "cache_mm.h" 4#ifndef __ARCH_M68K_CACHE_H
5#define __ARCH_M68K_CACHE_H
6
7/* bytes per L1 cache line */
8#define L1_CACHE_SHIFT 4
9#define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT)
10
5#endif 11#endif
diff --git a/arch/m68k/include/asm/cache_mm.h b/arch/m68k/include/asm/cache_mm.h
deleted file mode 100644
index fed3fd30de7e..000000000000
--- a/arch/m68k/include/asm/cache_mm.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * include/asm-m68k/cache.h
3 */
4#ifndef __ARCH_M68K_CACHE_H
5#define __ARCH_M68K_CACHE_H
6
7/* bytes per L1 cache line */
8#define L1_CACHE_SHIFT 4
9#define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT)
10
11#endif
diff --git a/arch/m68k/include/asm/cache_no.h b/arch/m68k/include/asm/cache_no.h
deleted file mode 100644
index 24e9eace5f8c..000000000000
--- a/arch/m68k/include/asm/cache_no.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __ARCH_M68KNOMMU_CACHE_H
2#define __ARCH_M68KNOMMU_CACHE_H
3
4/* bytes per L1 cache line */
5#define L1_CACHE_BYTES 16 /* this need to be at least 1 */
6
7/* m68k-elf-gcc 2.95.2 doesn't like these */
8
9#define __cacheline_aligned
10#define ____cacheline_aligned
11
12#endif
diff --git a/arch/m68k/include/asm/current.h b/arch/m68k/include/asm/current.h
index 51b056dfaedd..91fcc5358cfe 100644
--- a/arch/m68k/include/asm/current.h
+++ b/arch/m68k/include/asm/current.h
@@ -1,5 +1,28 @@
1#ifdef __uClinux__ 1#ifndef _M68K_CURRENT_H
2#include "current_no.h" 2#define _M68K_CURRENT_H
3
4#ifdef CONFIG_MMU
5
6register struct task_struct *current __asm__("%a2");
7
3#else 8#else
4#include "current_mm.h" 9
5#endif 10/*
11 * Rather than dedicate a register (as the m68k source does), we
12 * just keep a global, we should probably just change it all to be
13 * current and lose _current_task.
14 */
15#include <linux/thread_info.h>
16
17struct task_struct;
18
19static inline struct task_struct *get_current(void)
20{
21 return(current_thread_info()->task);
22}
23
24#define current get_current()
25
26#endif /* CONFNIG_MMU */
27
28#endif /* !(_M68K_CURRENT_H) */
diff --git a/arch/m68k/include/asm/current_mm.h b/arch/m68k/include/asm/current_mm.h
deleted file mode 100644
index 8de8f8ceda61..000000000000
--- a/arch/m68k/include/asm/current_mm.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_CURRENT_H
2#define _M68K_CURRENT_H
3
4register struct task_struct *current __asm__("%a2");
5
6#endif /* !(_M68K_CURRENT_H) */
diff --git a/arch/m68k/include/asm/current_no.h b/arch/m68k/include/asm/current_no.h
deleted file mode 100644
index 53ee0f9f7cef..000000000000
--- a/arch/m68k/include/asm/current_no.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef _M68KNOMMU_CURRENT_H
2#define _M68KNOMMU_CURRENT_H
3/*
4 * current.h
5 * (C) Copyright 2000, Lineo, David McCullough <davidm@uclinux.org>
6 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
7 *
8 * rather than dedicate a register (as the m68k source does), we
9 * just keep a global, we should probably just change it all to be
10 * current and lose _current_task.
11 */
12
13#include <linux/thread_info.h>
14
15struct task_struct;
16
17static inline struct task_struct *get_current(void)
18{
19 return(current_thread_info()->task);
20}
21
22#define current get_current()
23
24#endif /* _M68KNOMMU_CURRENT_H */
diff --git a/arch/m68k/include/asm/div64.h b/arch/m68k/include/asm/div64.h
index d211d9f54276..edb66148a71d 100644
--- a/arch/m68k/include/asm/div64.h
+++ b/arch/m68k/include/asm/div64.h
@@ -1,5 +1,34 @@
1#ifdef __uClinux__ 1#ifndef _M68K_DIV64_H
2#include "div64_no.h" 2#define _M68K_DIV64_H
3
4#ifdef CONFIG_MMU
5
6#include <linux/types.h>
7
8/* n = n / base; return rem; */
9
10#define do_div(n, base) ({ \
11 union { \
12 unsigned long n32[2]; \
13 unsigned long long n64; \
14 } __n; \
15 unsigned long __rem, __upper; \
16 \
17 __n.n64 = (n); \
18 if ((__upper = __n.n32[0])) { \
19 asm ("divul.l %2,%1:%0" \
20 : "=d" (__n.n32[0]), "=d" (__upper) \
21 : "d" (base), "0" (__n.n32[0])); \
22 } \
23 asm ("divu.l %2,%1:%0" \
24 : "=d" (__n.n32[1]), "=d" (__rem) \
25 : "d" (base), "1" (__upper), "0" (__n.n32[1])); \
26 (n) = __n.n64; \
27 __rem; \
28})
29
3#else 30#else
4#include "div64_mm.h" 31#include <asm-generic/div64.h>
5#endif 32#endif /* CONFIG_MMU */
33
34#endif /* _M68K_DIV64_H */
diff --git a/arch/m68k/include/asm/div64_mm.h b/arch/m68k/include/asm/div64_mm.h
deleted file mode 100644
index 8243c931b5c0..000000000000
--- a/arch/m68k/include/asm/div64_mm.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _M68K_DIV64_H
2#define _M68K_DIV64_H
3
4#include <linux/types.h>
5
6/* n = n / base; return rem; */
7
8#define do_div(n, base) ({ \
9 union { \
10 unsigned long n32[2]; \
11 unsigned long long n64; \
12 } __n; \
13 unsigned long __rem, __upper; \
14 \
15 __n.n64 = (n); \
16 if ((__upper = __n.n32[0])) { \
17 asm ("divul.l %2,%1:%0" \
18 : "=d" (__n.n32[0]), "=d" (__upper) \
19 : "d" (base), "0" (__n.n32[0])); \
20 } \
21 asm ("divu.l %2,%1:%0" \
22 : "=d" (__n.n32[1]), "=d" (__rem) \
23 : "d" (base), "1" (__upper), "0" (__n.n32[1])); \
24 (n) = __n.n64; \
25 __rem; \
26})
27
28#endif /* _M68K_DIV64_H */
diff --git a/arch/m68k/include/asm/div64_no.h b/arch/m68k/include/asm/div64_no.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/arch/m68k/include/asm/div64_no.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h
index f4a4c7638f89..26f505488c11 100644
--- a/arch/m68k/include/asm/dma-mapping.h
+++ b/arch/m68k/include/asm/dma-mapping.h
@@ -1,5 +1,112 @@
1#ifdef __uClinux__ 1#ifndef _M68K_DMA_MAPPING_H
2#include "dma-mapping_no.h" 2#define _M68K_DMA_MAPPING_H
3
4#include <asm/cache.h>
5
6struct scatterlist;
7
8#ifndef CONFIG_MMU_SUN3
9static inline int dma_supported(struct device *dev, u64 mask)
10{
11 return 1;
12}
13
14static inline int dma_set_mask(struct device *dev, u64 mask)
15{
16 return 0;
17}
18
19static inline int dma_get_cache_alignment(void)
20{
21 return 1 << L1_CACHE_SHIFT;
22}
23
24static inline int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
25{
26 return 0;
27}
28
29extern void *dma_alloc_coherent(struct device *, size_t,
30 dma_addr_t *, gfp_t);
31extern void dma_free_coherent(struct device *, size_t,
32 void *, dma_addr_t);
33
34static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
35 dma_addr_t *handle, gfp_t flag)
36{
37 return dma_alloc_coherent(dev, size, handle, flag);
38}
39static inline void dma_free_noncoherent(struct device *dev, size_t size,
40 void *addr, dma_addr_t handle)
41{
42 dma_free_coherent(dev, size, addr, handle);
43}
44static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
45 enum dma_data_direction dir)
46{
47 /* we use coherent allocation, so not much to do here. */
48}
49
50extern dma_addr_t dma_map_single(struct device *, void *, size_t,
51 enum dma_data_direction);
52static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
53 size_t size, enum dma_data_direction dir)
54{
55}
56
57extern dma_addr_t dma_map_page(struct device *, struct page *,
58 unsigned long, size_t size,
59 enum dma_data_direction);
60static inline void dma_unmap_page(struct device *dev, dma_addr_t address,
61 size_t size, enum dma_data_direction dir)
62{
63}
64
65extern int dma_map_sg(struct device *, struct scatterlist *, int,
66 enum dma_data_direction);
67static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
68 int nhwentries, enum dma_data_direction dir)
69{
70}
71
72extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t,
73 enum dma_data_direction);
74extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
75 enum dma_data_direction);
76
77static inline void dma_sync_single_range_for_device(struct device *dev,
78 dma_addr_t dma_handle, unsigned long offset, size_t size,
79 enum dma_data_direction direction)
80{
81 /* just sync everything for now */
82 dma_sync_single_for_device(dev, dma_handle, offset + size, direction);
83}
84
85static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle,
86 size_t size, enum dma_data_direction dir)
87{
88}
89
90static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
91 int nents, enum dma_data_direction dir)
92{
93}
94
95static inline void dma_sync_single_range_for_cpu(struct device *dev,
96 dma_addr_t dma_handle, unsigned long offset, size_t size,
97 enum dma_data_direction direction)
98{
99 /* just sync everything for now */
100 dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction);
101}
102
103static inline int dma_mapping_error(struct device *dev, dma_addr_t handle)
104{
105 return 0;
106}
107
3#else 108#else
4#include "dma-mapping_mm.h" 109#include <asm-generic/dma-mapping-broken.h>
5#endif 110#endif
111
112#endif /* _M68K_DMA_MAPPING_H */
diff --git a/arch/m68k/include/asm/dma-mapping_mm.h b/arch/m68k/include/asm/dma-mapping_mm.h
deleted file mode 100644
index 26f505488c11..000000000000
--- a/arch/m68k/include/asm/dma-mapping_mm.h
+++ /dev/null
@@ -1,112 +0,0 @@
1#ifndef _M68K_DMA_MAPPING_H
2#define _M68K_DMA_MAPPING_H
3
4#include <asm/cache.h>
5
6struct scatterlist;
7
8#ifndef CONFIG_MMU_SUN3
9static inline int dma_supported(struct device *dev, u64 mask)
10{
11 return 1;
12}
13
14static inline int dma_set_mask(struct device *dev, u64 mask)
15{
16 return 0;
17}
18
19static inline int dma_get_cache_alignment(void)
20{
21 return 1 << L1_CACHE_SHIFT;
22}
23
24static inline int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
25{
26 return 0;
27}
28
29extern void *dma_alloc_coherent(struct device *, size_t,
30 dma_addr_t *, gfp_t);
31extern void dma_free_coherent(struct device *, size_t,
32 void *, dma_addr_t);
33
34static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
35 dma_addr_t *handle, gfp_t flag)
36{
37 return dma_alloc_coherent(dev, size, handle, flag);
38}
39static inline void dma_free_noncoherent(struct device *dev, size_t size,
40 void *addr, dma_addr_t handle)
41{
42 dma_free_coherent(dev, size, addr, handle);
43}
44static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
45 enum dma_data_direction dir)
46{
47 /* we use coherent allocation, so not much to do here. */
48}
49
50extern dma_addr_t dma_map_single(struct device *, void *, size_t,
51 enum dma_data_direction);
52static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
53 size_t size, enum dma_data_direction dir)
54{
55}
56
57extern dma_addr_t dma_map_page(struct device *, struct page *,
58 unsigned long, size_t size,
59 enum dma_data_direction);
60static inline void dma_unmap_page(struct device *dev, dma_addr_t address,
61 size_t size, enum dma_data_direction dir)
62{
63}
64
65extern int dma_map_sg(struct device *, struct scatterlist *, int,
66 enum dma_data_direction);
67static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
68 int nhwentries, enum dma_data_direction dir)
69{
70}
71
72extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t,
73 enum dma_data_direction);
74extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
75 enum dma_data_direction);
76
77static inline void dma_sync_single_range_for_device(struct device *dev,
78 dma_addr_t dma_handle, unsigned long offset, size_t size,
79 enum dma_data_direction direction)
80{
81 /* just sync everything for now */
82 dma_sync_single_for_device(dev, dma_handle, offset + size, direction);
83}
84
85static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle,
86 size_t size, enum dma_data_direction dir)
87{
88}
89
90static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
91 int nents, enum dma_data_direction dir)
92{
93}
94
95static inline void dma_sync_single_range_for_cpu(struct device *dev,
96 dma_addr_t dma_handle, unsigned long offset, size_t size,
97 enum dma_data_direction direction)
98{
99 /* just sync everything for now */
100 dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction);
101}
102
103static inline int dma_mapping_error(struct device *dev, dma_addr_t handle)
104{
105 return 0;
106}
107
108#else
109#include <asm-generic/dma-mapping-broken.h>
110#endif
111
112#endif /* _M68K_DMA_MAPPING_H */
diff --git a/arch/m68k/include/asm/dma-mapping_no.h b/arch/m68k/include/asm/dma-mapping_no.h
deleted file mode 100644
index 1748f2bca940..000000000000
--- a/arch/m68k/include/asm/dma-mapping_no.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68KNOMMU_DMA_MAPPING_H
2#define _M68KNOMMU_DMA_MAPPING_H
3
4#include <asm-generic/dma-mapping-broken.h>
5
6#endif /* _M68KNOMMU_DMA_MAPPING_H */
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
index 04ce488bc63f..0b0f49eb876b 100644
--- a/arch/m68k/include/asm/elf.h
+++ b/arch/m68k/include/asm/elf.h
@@ -1,5 +1,119 @@
1#ifdef __uClinux__ 1#ifndef __ASMm68k_ELF_H
2#include "elf_no.h" 2#define __ASMm68k_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/user.h>
10
11/*
12 * 68k ELF relocation types
13 */
14#define R_68K_NONE 0
15#define R_68K_32 1
16#define R_68K_16 2
17#define R_68K_8 3
18#define R_68K_PC32 4
19#define R_68K_PC16 5
20#define R_68K_PC8 6
21#define R_68K_GOT32 7
22#define R_68K_GOT16 8
23#define R_68K_GOT8 9
24#define R_68K_GOT32O 10
25#define R_68K_GOT16O 11
26#define R_68K_GOT8O 12
27#define R_68K_PLT32 13
28#define R_68K_PLT16 14
29#define R_68K_PLT8 15
30#define R_68K_PLT32O 16
31#define R_68K_PLT16O 17
32#define R_68K_PLT8O 18
33#define R_68K_COPY 19
34#define R_68K_GLOB_DAT 20
35#define R_68K_JMP_SLOT 21
36#define R_68K_RELATIVE 22
37
38typedef unsigned long elf_greg_t;
39
40#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
41typedef elf_greg_t elf_gregset_t[ELF_NGREG];
42
43typedef struct user_m68kfp_struct elf_fpregset_t;
44
45/*
46 * This is used to ensure we don't load something for the wrong architecture.
47 */
48#define elf_check_arch(x) ((x)->e_machine == EM_68K)
49
50/*
51 * These are used to set parameters in the core dumps.
52 */
53#define ELF_CLASS ELFCLASS32
54#define ELF_DATA ELFDATA2MSB
55#define ELF_ARCH EM_68K
56
57/* For SVR4/m68k the function pointer to be registered with `atexit' is
58 passed in %a1. Although my copy of the ABI has no such statement, it
59 is actually used on ASV. */
60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
61
62#define USE_ELF_CORE_DUMP
63#ifndef CONFIG_SUN3
64#define ELF_EXEC_PAGESIZE 4096
3#else 65#else
4#include "elf_mm.h" 66#define ELF_EXEC_PAGESIZE 8192
67#endif
68
69/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
70 use of this is to invoke "./ld.so someprog" to test out a new version of
71 the loader. We need to make sure that it is out of the way of the program
72 that it will "exec", and that there is sufficient room for the brk. */
73
74#ifndef CONFIG_SUN3
75#define ELF_ET_DYN_BASE 0xD0000000UL
76#else
77#define ELF_ET_DYN_BASE 0x0D800000UL
78#endif
79
80#define ELF_CORE_COPY_REGS(pr_reg, regs) \
81 /* Bleech. */ \
82 pr_reg[0] = regs->d1; \
83 pr_reg[1] = regs->d2; \
84 pr_reg[2] = regs->d3; \
85 pr_reg[3] = regs->d4; \
86 pr_reg[4] = regs->d5; \
87 pr_reg[7] = regs->a0; \
88 pr_reg[8] = regs->a1; \
89 pr_reg[9] = regs->a2; \
90 pr_reg[14] = regs->d0; \
91 pr_reg[15] = rdusp(); \
92 pr_reg[16] = regs->orig_d0; \
93 pr_reg[17] = regs->sr; \
94 pr_reg[18] = regs->pc; \
95 pr_reg[19] = (regs->format << 12) | regs->vector; \
96 { \
97 struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
98 pr_reg[5] = sw->d6; \
99 pr_reg[6] = sw->d7; \
100 pr_reg[10] = sw->a3; \
101 pr_reg[11] = sw->a4; \
102 pr_reg[12] = sw->a5; \
103 pr_reg[13] = sw->a6; \
104 }
105
106/* This yields a mask that user programs can use to figure out what
107 instruction set this cpu supports. */
108
109#define ELF_HWCAP (0)
110
111/* This yields a string that ld.so will use to load implementation
112 specific libraries for optimization. This is more specific in
113 intent than poking at uname or /proc/cpuinfo. */
114
115#define ELF_PLATFORM (NULL)
116
117#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
118
5#endif 119#endif
diff --git a/arch/m68k/include/asm/elf_mm.h b/arch/m68k/include/asm/elf_mm.h
deleted file mode 100644
index 0b0f49eb876b..000000000000
--- a/arch/m68k/include/asm/elf_mm.h
+++ /dev/null
@@ -1,119 +0,0 @@
1#ifndef __ASMm68k_ELF_H
2#define __ASMm68k_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/user.h>
10
11/*
12 * 68k ELF relocation types
13 */
14#define R_68K_NONE 0
15#define R_68K_32 1
16#define R_68K_16 2
17#define R_68K_8 3
18#define R_68K_PC32 4
19#define R_68K_PC16 5
20#define R_68K_PC8 6
21#define R_68K_GOT32 7
22#define R_68K_GOT16 8
23#define R_68K_GOT8 9
24#define R_68K_GOT32O 10
25#define R_68K_GOT16O 11
26#define R_68K_GOT8O 12
27#define R_68K_PLT32 13
28#define R_68K_PLT16 14
29#define R_68K_PLT8 15
30#define R_68K_PLT32O 16
31#define R_68K_PLT16O 17
32#define R_68K_PLT8O 18
33#define R_68K_COPY 19
34#define R_68K_GLOB_DAT 20
35#define R_68K_JMP_SLOT 21
36#define R_68K_RELATIVE 22
37
38typedef unsigned long elf_greg_t;
39
40#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
41typedef elf_greg_t elf_gregset_t[ELF_NGREG];
42
43typedef struct user_m68kfp_struct elf_fpregset_t;
44
45/*
46 * This is used to ensure we don't load something for the wrong architecture.
47 */
48#define elf_check_arch(x) ((x)->e_machine == EM_68K)
49
50/*
51 * These are used to set parameters in the core dumps.
52 */
53#define ELF_CLASS ELFCLASS32
54#define ELF_DATA ELFDATA2MSB
55#define ELF_ARCH EM_68K
56
57/* For SVR4/m68k the function pointer to be registered with `atexit' is
58 passed in %a1. Although my copy of the ABI has no such statement, it
59 is actually used on ASV. */
60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
61
62#define USE_ELF_CORE_DUMP
63#ifndef CONFIG_SUN3
64#define ELF_EXEC_PAGESIZE 4096
65#else
66#define ELF_EXEC_PAGESIZE 8192
67#endif
68
69/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
70 use of this is to invoke "./ld.so someprog" to test out a new version of
71 the loader. We need to make sure that it is out of the way of the program
72 that it will "exec", and that there is sufficient room for the brk. */
73
74#ifndef CONFIG_SUN3
75#define ELF_ET_DYN_BASE 0xD0000000UL
76#else
77#define ELF_ET_DYN_BASE 0x0D800000UL
78#endif
79
80#define ELF_CORE_COPY_REGS(pr_reg, regs) \
81 /* Bleech. */ \
82 pr_reg[0] = regs->d1; \
83 pr_reg[1] = regs->d2; \
84 pr_reg[2] = regs->d3; \
85 pr_reg[3] = regs->d4; \
86 pr_reg[4] = regs->d5; \
87 pr_reg[7] = regs->a0; \
88 pr_reg[8] = regs->a1; \
89 pr_reg[9] = regs->a2; \
90 pr_reg[14] = regs->d0; \
91 pr_reg[15] = rdusp(); \
92 pr_reg[16] = regs->orig_d0; \
93 pr_reg[17] = regs->sr; \
94 pr_reg[18] = regs->pc; \
95 pr_reg[19] = (regs->format << 12) | regs->vector; \
96 { \
97 struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
98 pr_reg[5] = sw->d6; \
99 pr_reg[6] = sw->d7; \
100 pr_reg[10] = sw->a3; \
101 pr_reg[11] = sw->a4; \
102 pr_reg[12] = sw->a5; \
103 pr_reg[13] = sw->a6; \
104 }
105
106/* This yields a mask that user programs can use to figure out what
107 instruction set this cpu supports. */
108
109#define ELF_HWCAP (0)
110
111/* This yields a string that ld.so will use to load implementation
112 specific libraries for optimization. This is more specific in
113 intent than poking at uname or /proc/cpuinfo. */
114
115#define ELF_PLATFORM (NULL)
116
117#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
118
119#endif
diff --git a/arch/m68k/include/asm/elf_no.h b/arch/m68k/include/asm/elf_no.h
deleted file mode 100644
index b8046837f384..000000000000
--- a/arch/m68k/include/asm/elf_no.h
+++ /dev/null
@@ -1,110 +0,0 @@
1#ifndef __ASMm68k_ELF_H
2#define __ASMm68k_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/user.h>
10
11/*
12 * 68k ELF relocation types
13 */
14#define R_68K_NONE 0
15#define R_68K_32 1
16#define R_68K_16 2
17#define R_68K_8 3
18#define R_68K_PC32 4
19#define R_68K_PC16 5
20#define R_68K_PC8 6
21#define R_68K_GOT32 7
22#define R_68K_GOT16 8
23#define R_68K_GOT8 9
24#define R_68K_GOT32O 10
25#define R_68K_GOT16O 11
26#define R_68K_GOT8O 12
27#define R_68K_PLT32 13
28#define R_68K_PLT16 14
29#define R_68K_PLT8 15
30#define R_68K_PLT32O 16
31#define R_68K_PLT16O 17
32#define R_68K_PLT8O 18
33#define R_68K_COPY 19
34#define R_68K_GLOB_DAT 20
35#define R_68K_JMP_SLOT 21
36#define R_68K_RELATIVE 22
37
38typedef unsigned long elf_greg_t;
39
40#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
41typedef elf_greg_t elf_gregset_t[ELF_NGREG];
42
43typedef struct user_m68kfp_struct elf_fpregset_t;
44
45/*
46 * This is used to ensure we don't load something for the wrong architecture.
47 */
48#define elf_check_arch(x) ((x)->e_machine == EM_68K)
49
50/*
51 * These are used to set parameters in the core dumps.
52 */
53#define ELF_CLASS ELFCLASS32
54#define ELF_DATA ELFDATA2MSB
55#define ELF_ARCH EM_68K
56
57/* For SVR4/m68k the function pointer to be registered with `atexit' is
58 passed in %a1. Although my copy of the ABI has no such statement, it
59 is actually used on ASV. */
60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
61
62#define USE_ELF_CORE_DUMP
63#define ELF_EXEC_PAGESIZE 4096
64
65/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
66 use of this is to invoke "./ld.so someprog" to test out a new version of
67 the loader. We need to make sure that it is out of the way of the program
68 that it will "exec", and that there is sufficient room for the brk. */
69
70#define ELF_ET_DYN_BASE 0xD0000000UL
71
72#define ELF_CORE_COPY_REGS(pr_reg, regs) \
73 /* Bleech. */ \
74 pr_reg[0] = regs->d1; \
75 pr_reg[1] = regs->d2; \
76 pr_reg[2] = regs->d3; \
77 pr_reg[3] = regs->d4; \
78 pr_reg[4] = regs->d5; \
79 pr_reg[7] = regs->a0; \
80 pr_reg[8] = regs->a1; \
81 pr_reg[14] = regs->d0; \
82 pr_reg[15] = rdusp(); \
83 pr_reg[16] = 0 /* regs->orig_d0 */; \
84 pr_reg[17] = regs->sr; \
85 pr_reg[18] = regs->pc; \
86 /* pr_reg[19] = (regs->format << 12) | regs->vector; */ \
87 { \
88 struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
89 pr_reg[5] = sw->d6; \
90 pr_reg[6] = sw->d7; \
91 pr_reg[10] = sw->a3; \
92 pr_reg[11] = sw->a4; \
93 pr_reg[12] = sw->a5; \
94 pr_reg[13] = sw->a6; \
95 }
96
97/* This yields a mask that user programs can use to figure out what
98 instruction set this cpu supports. */
99
100#define ELF_HWCAP (0)
101
102/* This yields a string that ld.so will use to load implementation
103 specific libraries for optimization. This is more specific in
104 intent than poking at uname or /proc/cpuinfo. */
105
106#define ELF_PLATFORM (NULL)
107
108#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
109
110#endif
diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h
index 97bcaefd2064..be4e4c6797e8 100644
--- a/arch/m68k/include/asm/fb.h
+++ b/arch/m68k/include/asm/fb.h
@@ -1,5 +1,38 @@
1#ifdef __uClinux__ 1#ifndef _ASM_FB_H_
2#include "fb_no.h" 2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7#include <asm/setup.h>
8
9#ifdef CONFIG_MMU
10#ifdef CONFIG_SUN3
11static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
12 unsigned long off)
13{
14 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
15}
3#else 16#else
4#include "fb_mm.h" 17static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
5#endif 18 unsigned long off)
19{
20 if (CPU_IS_020_OR_030)
21 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030;
22 if (CPU_IS_040_OR_060) {
23 pgprot_val(vma->vm_page_prot) &= _CACHEMASK040;
24 /* Use no-cache mode, serialized */
25 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S;
26 }
27}
28#endif /* CONFIG_SUN3 */
29#else
30#define fb_pgprotect(...) do {} while (0)
31#endif /* CONFIG_MMU */
32
33static inline int fb_is_primary_device(struct fb_info *info)
34{
35 return 0;
36}
37
38#endif /* _ASM_FB_H_ */
diff --git a/arch/m68k/include/asm/fb_mm.h b/arch/m68k/include/asm/fb_mm.h
deleted file mode 100644
index 380b97ae8157..000000000000
--- a/arch/m68k/include/asm/fb_mm.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7#include <asm/setup.h>
8
9#ifdef CONFIG_SUN3
10static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 unsigned long off)
12{
13 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
14}
15#else
16static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
17 unsigned long off)
18{
19 if (CPU_IS_020_OR_030)
20 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030;
21 if (CPU_IS_040_OR_060) {
22 pgprot_val(vma->vm_page_prot) &= _CACHEMASK040;
23 /* Use no-cache mode, serialized */
24 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S;
25 }
26}
27#endif /* CONFIG_SUN3 */
28
29static inline int fb_is_primary_device(struct fb_info *info)
30{
31 return 0;
32}
33
34#endif /* _ASM_FB_H_ */
diff --git a/arch/m68k/include/asm/fb_no.h b/arch/m68k/include/asm/fb_no.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/arch/m68k/include/asm/fb_no.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */
diff --git a/arch/m68k/include/asm/fpu.h b/arch/m68k/include/asm/fpu.h
index e19bc5ed9c37..ffb6b8cfc6d5 100644
--- a/arch/m68k/include/asm/fpu.h
+++ b/arch/m68k/include/asm/fpu.h
@@ -1,5 +1,21 @@
1#ifdef __uClinux__ 1#ifndef __M68K_FPU_H
2#include "fpu_no.h" 2#define __M68K_FPU_H
3
4
5/*
6 * MAX floating point unit state size (FSAVE/FRESTORE)
7 */
8
9#if defined(CONFIG_M68020) || defined(CONFIG_M68030)
10#define FPSTATESIZE (216)
11#elif defined(CONFIG_M68040)
12#define FPSTATESIZE (96)
13#elif defined(CONFIG_M68KFPU_EMU)
14#define FPSTATESIZE (28)
15#elif defined(CONFIG_M68060)
16#define FPSTATESIZE (12)
3#else 17#else
4#include "fpu_mm.h" 18#define FPSTATESIZE (0)
5#endif 19#endif
20
21#endif /* __M68K_FPU_H */
diff --git a/arch/m68k/include/asm/fpu_mm.h b/arch/m68k/include/asm/fpu_mm.h
deleted file mode 100644
index ffb6b8cfc6d5..000000000000
--- a/arch/m68k/include/asm/fpu_mm.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef __M68K_FPU_H
2#define __M68K_FPU_H
3
4
5/*
6 * MAX floating point unit state size (FSAVE/FRESTORE)
7 */
8
9#if defined(CONFIG_M68020) || defined(CONFIG_M68030)
10#define FPSTATESIZE (216)
11#elif defined(CONFIG_M68040)
12#define FPSTATESIZE (96)
13#elif defined(CONFIG_M68KFPU_EMU)
14#define FPSTATESIZE (28)
15#elif defined(CONFIG_M68060)
16#define FPSTATESIZE (12)
17#else
18#define FPSTATESIZE (0)
19#endif
20
21#endif /* __M68K_FPU_H */
diff --git a/arch/m68k/include/asm/fpu_no.h b/arch/m68k/include/asm/fpu_no.h
deleted file mode 100644
index b16b2e4fca2a..000000000000
--- a/arch/m68k/include/asm/fpu_no.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef __M68KNOMMU_FPU_H
2#define __M68KNOMMU_FPU_H
3
4
5/*
6 * MAX floating point unit state size (FSAVE/FRESTORE)
7 */
8#if defined(CONFIG_M68020) || defined(CONFIG_M68030)
9#define FPSTATESIZE (216/sizeof(unsigned char))
10#elif defined(CONFIG_M68040)
11#define FPSTATESIZE (96/sizeof(unsigned char))
12#elif defined(CONFIG_M68KFPU_EMU)
13#define FPSTATESIZE (28/sizeof(unsigned char))
14#elif defined(CONFIG_M68060)
15#define FPSTATESIZE (12/sizeof(unsigned char))
16#else
17/* Assume no FP unit present then... */
18#define FPSTATESIZE (2) /* dummy size */
19#endif
20
21#endif /* __M68K_FPU_H */
diff --git a/arch/m68k/include/asm/ftrace.h b/arch/m68k/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/m68k/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/m68k/include/asm/hw_irq.h b/arch/m68k/include/asm/hw_irq.h
index e19526015890..eacef0951fbf 100644
--- a/arch/m68k/include/asm/hw_irq.h
+++ b/arch/m68k/include/asm/hw_irq.h
@@ -1,5 +1,6 @@
1#ifdef __uClinux__ 1#ifndef __ASM_M68K_HW_IRQ_H
2#include "hw_irq_no.h" 2#define __ASM_M68K_HW_IRQ_H
3#else 3
4#include "hw_irq_mm.h" 4/* Dummy include. */
5
5#endif 6#endif
diff --git a/arch/m68k/include/asm/hw_irq_mm.h b/arch/m68k/include/asm/hw_irq_mm.h
deleted file mode 100644
index eacef0951fbf..000000000000
--- a/arch/m68k/include/asm/hw_irq_mm.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_M68K_HW_IRQ_H
2#define __ASM_M68K_HW_IRQ_H
3
4/* Dummy include. */
5
6#endif
diff --git a/arch/m68k/include/asm/hw_irq_no.h b/arch/m68k/include/asm/hw_irq_no.h
deleted file mode 100644
index f3ec9e5ae049..000000000000
--- a/arch/m68k/include/asm/hw_irq_no.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __M68KNOMMU_HW_IRQ_H__
2#define __M68KNOMMU_HW_IRQ_H__
3
4#endif /* __M68KNOMMU_HW_IRQ_H__ */
diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h
index b996a3c8cff5..3958726664ba 100644
--- a/arch/m68k/include/asm/ide.h
+++ b/arch/m68k/include/asm/ide.h
@@ -30,101 +30,28 @@
30#define _M68K_IDE_H 30#define _M68K_IDE_H
31 31
32#ifdef __KERNEL__ 32#ifdef __KERNEL__
33
34
35#include <asm/setup.h> 33#include <asm/setup.h>
36#include <asm/io.h> 34#include <asm/io.h>
37#include <asm/irq.h> 35#include <asm/irq.h>
38 36
39#ifdef CONFIG_ATARI
40#include <linux/interrupt.h>
41#include <asm/atari_stdma.h>
42#endif
43
44#ifdef CONFIG_MAC
45#include <asm/macints.h>
46#endif
47
48/* 37/*
49 * Get rid of defs from io.h - ide has its private and conflicting versions 38 * Get rid of defs from io.h - ide has its private and conflicting versions
50 * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we 39 * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
51 * always use the `raw' MMIO versions 40 * always use the `raw' MMIO versions
52 */ 41 */
53#undef inb
54#undef inw
55#undef insw
56#undef inl
57#undef insl
58#undef outb
59#undef outw
60#undef outsw
61#undef outl
62#undef outsl
63#undef readb 42#undef readb
64#undef readw 43#undef readw
65#undef readl
66#undef writeb 44#undef writeb
67#undef writew 45#undef writew
68#undef writel
69 46
70#define inb in_8
71#define inw in_be16
72#define insw(port, addr, n) raw_insw((u16 *)port, addr, n)
73#define inl in_be32
74#define insl(port, addr, n) raw_insl((u32 *)port, addr, n)
75#define outb(val, port) out_8(port, val)
76#define outw(val, port) out_be16(port, val)
77#define outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
78#define outl(val, port) out_be32(port, val)
79#define outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
80#define readb in_8 47#define readb in_8
81#define readw in_be16 48#define readw in_be16
82#define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n) 49#define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n)
83#define readl in_be32
84#define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n) 50#define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n)
85#define writeb(val, port) out_8(port, val) 51#define writeb(val, port) out_8(port, val)
86#define writew(val, port) out_be16(port, val) 52#define writew(val, port) out_be16(port, val)
87#define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) 53#define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
88#define writel(val, port) out_be32(port, val)
89#define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) 54#define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
90#if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
91#define insw_swapw(port, addr, n) raw_insw_swapw((u16 *)port, addr, n)
92#define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n)
93#endif
94
95#ifdef CONFIG_BLK_DEV_FALCON_IDE
96#define IDE_ARCH_LOCK
97
98extern int falconide_intr_lock;
99
100static __inline__ void ide_release_lock (void)
101{
102 if (MACH_IS_ATARI) {
103 if (falconide_intr_lock == 0) {
104 printk("ide_release_lock: bug\n");
105 return;
106 }
107 falconide_intr_lock = 0;
108 stdma_release();
109 }
110}
111
112static __inline__ void
113ide_get_lock(irq_handler_t handler, void *data)
114{
115 if (MACH_IS_ATARI) {
116 if (falconide_intr_lock == 0) {
117 if (in_interrupt() > 0)
118 panic( "Falcon IDE hasn't ST-DMA lock in interrupt" );
119 stdma_lock(handler, data);
120 falconide_intr_lock = 1;
121 }
122 }
123}
124#endif /* CONFIG_BLK_DEV_FALCON_IDE */
125
126#define IDE_ARCH_ACK_INTR
127#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
128 55
129#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
130#endif /* _M68K_IDE_H */ 57#endif /* _M68K_IDE_H */
diff --git a/arch/m68k/include/asm/kmap_types.h b/arch/m68k/include/asm/kmap_types.h
index 045d9fd122a2..c843c63d3801 100644
--- a/arch/m68k/include/asm/kmap_types.h
+++ b/arch/m68k/include/asm/kmap_types.h
@@ -1,5 +1,21 @@
1#ifdef __uClinux__ 1#ifndef __ASM_M68K_KMAP_TYPES_H
2#include "kmap_types_no.h" 2#define __ASM_M68K_KMAP_TYPES_H
3#else 3
4#include "kmap_types_mm.h" 4enum km_type {
5#endif 5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_PTE0,
13 KM_PTE1,
14 KM_IRQ0,
15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
18 KM_TYPE_NR
19};
20
21#endif /* __ASM_M68K_KMAP_TYPES_H */
diff --git a/arch/m68k/include/asm/kmap_types_mm.h b/arch/m68k/include/asm/kmap_types_mm.h
deleted file mode 100644
index c843c63d3801..000000000000
--- a/arch/m68k/include/asm/kmap_types_mm.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef __ASM_M68K_KMAP_TYPES_H
2#define __ASM_M68K_KMAP_TYPES_H
3
4enum km_type {
5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_PTE0,
13 KM_PTE1,
14 KM_IRQ0,
15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
18 KM_TYPE_NR
19};
20
21#endif /* __ASM_M68K_KMAP_TYPES_H */
diff --git a/arch/m68k/include/asm/kmap_types_no.h b/arch/m68k/include/asm/kmap_types_no.h
deleted file mode 100644
index bfb6707575d1..000000000000
--- a/arch/m68k/include/asm/kmap_types_no.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef __ASM_M68K_KMAP_TYPES_H
2#define __ASM_M68K_KMAP_TYPES_H
3
4enum km_type {
5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_PTE0,
13 KM_PTE1,
14 KM_IRQ0,
15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
18 KM_TYPE_NR
19};
20
21#endif
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h
index 1835fd20a82c..ce603451b55e 100644
--- a/arch/m68k/include/asm/m532xsim.h
+++ b/arch/m68k/include/asm/m532xsim.h
@@ -16,6 +16,7 @@
16#define MCFINT_VECBASE 64 16#define MCFINT_VECBASE 64
17#define MCFINT_UART0 26 /* Interrupt number for UART0 */ 17#define MCFINT_UART0 26 /* Interrupt number for UART0 */
18#define MCFINT_UART1 27 /* Interrupt number for UART1 */ 18#define MCFINT_UART1 27 /* Interrupt number for UART1 */
19#define MCFINT_UART2 28 /* Interrupt number for UART2 */
19 20
20#define MCF_WTM_WCR MCF_REG16(0xFC098000) 21#define MCF_WTM_WCR MCF_REG16(0xFC098000)
21 22
diff --git a/arch/m68k/include/asm/mc146818rtc.h b/arch/m68k/include/asm/mc146818rtc.h
index fb90dcf78426..9f70a01f73dc 100644
--- a/arch/m68k/include/asm/mc146818rtc.h
+++ b/arch/m68k/include/asm/mc146818rtc.h
@@ -1,5 +1,26 @@
1#ifdef __uClinux__ 1/*
2#include "mc146818rtc_no.h" 2 * Machine dependent access functions for RTC registers.
3#else 3 */
4#include "mc146818rtc_mm.h" 4#ifndef _ASM_MC146818RTC_H
5#endif 5#define _ASM_MC146818RTC_H
6
7
8#ifdef CONFIG_ATARI
9/* RTC in Atari machines */
10
11#include <asm/atarihw.h>
12
13#define RTC_PORT(x) (TT_RTC_BAS + 2*(x))
14#define RTC_ALWAYS_BCD 0
15
16#define CMOS_READ(addr) ({ \
17atari_outb_p((addr),RTC_PORT(0)); \
18atari_inb_p(RTC_PORT(1)); \
19})
20#define CMOS_WRITE(val, addr) ({ \
21atari_outb_p((addr),RTC_PORT(0)); \
22atari_outb_p((val),RTC_PORT(1)); \
23})
24#endif /* CONFIG_ATARI */
25
26#endif /* _ASM_MC146818RTC_H */
diff --git a/arch/m68k/include/asm/mc146818rtc_mm.h b/arch/m68k/include/asm/mc146818rtc_mm.h
deleted file mode 100644
index 9f70a01f73dc..000000000000
--- a/arch/m68k/include/asm/mc146818rtc_mm.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef _ASM_MC146818RTC_H
5#define _ASM_MC146818RTC_H
6
7
8#ifdef CONFIG_ATARI
9/* RTC in Atari machines */
10
11#include <asm/atarihw.h>
12
13#define RTC_PORT(x) (TT_RTC_BAS + 2*(x))
14#define RTC_ALWAYS_BCD 0
15
16#define CMOS_READ(addr) ({ \
17atari_outb_p((addr),RTC_PORT(0)); \
18atari_inb_p(RTC_PORT(1)); \
19})
20#define CMOS_WRITE(val, addr) ({ \
21atari_outb_p((addr),RTC_PORT(0)); \
22atari_outb_p((val),RTC_PORT(1)); \
23})
24#endif /* CONFIG_ATARI */
25
26#endif /* _ASM_MC146818RTC_H */
diff --git a/arch/m68k/include/asm/mc146818rtc_no.h b/arch/m68k/include/asm/mc146818rtc_no.h
deleted file mode 100644
index 907a0481a140..000000000000
--- a/arch/m68k/include/asm/mc146818rtc_no.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef _M68KNOMMU_MC146818RTC_H
5#define _M68KNOMMU_MC146818RTC_H
6
7/* empty include file to satisfy the include in genrtc.c/ide-geometry.c */
8
9#endif /* _M68KNOMMU_MC146818RTC_H */
diff --git a/arch/m68k/include/asm/mcfpci.h b/arch/m68k/include/asm/mcfpci.h
deleted file mode 100644
index f1507dd06ec6..000000000000
--- a/arch/m68k/include/asm/mcfpci.h
+++ /dev/null
@@ -1,119 +0,0 @@
1/****************************************************************************/
2
3/*
4 * mcfpci.h -- PCI bridge on ColdFire eval boards.
5 *
6 * (C) Copyright 2000, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2000, Lineo Inc. (www.lineo.com)
8 */
9
10/****************************************************************************/
11#ifndef mcfpci_h
12#define mcfpci_h
13/****************************************************************************/
14
15
16#ifdef CONFIG_PCI
17
18/*
19 * Address regions in the PCI address space are not mapped into the
20 * normal memory space of the ColdFire. They must be accessed via
21 * handler routines. This is easy for I/O space (inb/outb/etc) but
22 * needs some code changes to support ordinary memory. Interrupts
23 * also need to be vectored through the PCI handler first, then it
24 * will call the actual driver sub-handlers.
25 */
26
27/*
28 * Un-define all the standard I/O access routines.
29 */
30#undef inb
31#undef inw
32#undef inl
33#undef inb_p
34#undef inw_p
35#undef insb
36#undef insw
37#undef insl
38#undef outb
39#undef outw
40#undef outl
41#undef outb_p
42#undef outw_p
43#undef outsb
44#undef outsw
45#undef outsl
46
47#undef request_irq
48#undef free_irq
49
50#undef bus_to_virt
51#undef virt_to_bus
52
53
54/*
55 * Re-direct all I/O memory accesses functions to PCI specific ones.
56 */
57#define inb pci_inb
58#define inw pci_inw
59#define inl pci_inl
60#define inb_p pci_inb
61#define inw_p pci_inw
62#define insb pci_insb
63#define insw pci_insw
64#define insl pci_insl
65
66#define outb pci_outb
67#define outw pci_outw
68#define outl pci_outl
69#define outb_p pci_outb
70#define outw_p pci_outw
71#define outsb pci_outsb
72#define outsw pci_outsw
73#define outsl pci_outsl
74
75#define request_irq pci_request_irq
76#define free_irq pci_free_irq
77
78#define virt_to_bus pci_virt_to_bus
79#define bus_to_virt pci_bus_to_virt
80
81#define CONFIG_COMEMPCI 1
82
83
84/*
85 * Prototypes of the real PCI functions (defined in bios32.c).
86 */
87unsigned char pci_inb(unsigned int addr);
88unsigned short pci_inw(unsigned int addr);
89unsigned int pci_inl(unsigned int addr);
90void pci_insb(void *addr, void *buf, int len);
91void pci_insw(void *addr, void *buf, int len);
92void pci_insl(void *addr, void *buf, int len);
93
94void pci_outb(unsigned char val, unsigned int addr);
95void pci_outw(unsigned short val, unsigned int addr);
96void pci_outl(unsigned int val, unsigned int addr);
97void pci_outsb(void *addr, void *buf, int len);
98void pci_outsw(void *addr, void *buf, int len);
99void pci_outsl(void *addr, void *buf, int len);
100
101int pci_request_irq(unsigned int irq,
102 void (*handler)(int, void *, struct pt_regs *),
103 unsigned long flags,
104 const char *device,
105 void *dev_id);
106void pci_free_irq(unsigned int irq, void *dev_id);
107
108void *pci_bmalloc(int size);
109void pci_bmfree(void *bmp, int len);
110void pci_copytoshmem(unsigned long bmp, void *src, int size);
111void pci_copyfromshmem(void *dst, unsigned long bmp, int size);
112unsigned long pci_virt_to_bus(volatile void *address);
113void *pci_bus_to_virt(unsigned long address);
114void pci_bmcpyto(void *dst, void *src, int len);
115void pci_bmcpyfrom(void *dst, void *src, int len);
116
117#endif /* CONFIG_PCI */
118/****************************************************************************/
119#endif /* mcfpci_h */
diff --git a/arch/m68k/include/asm/mmu.h b/arch/m68k/include/asm/mmu.h
index a81d3946675f..8a11a63ee15a 100644
--- a/arch/m68k/include/asm/mmu.h
+++ b/arch/m68k/include/asm/mmu.h
@@ -1,5 +1,13 @@
1#ifdef __uClinux__ 1#ifndef __MMU_H
2#include "mmu_no.h" 2#define __MMU_H
3
4#ifdef CONFIG_MMU
5/* Default "unsigned long" context */
6typedef unsigned long mm_context_t;
3#else 7#else
4#include "mmu_mm.h" 8typedef struct {
9 unsigned long end_brk;
10} mm_context_t;
11#endif
12
5#endif 13#endif
diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h
index b440928fc6c7..7d4341e55a99 100644
--- a/arch/m68k/include/asm/mmu_context.h
+++ b/arch/m68k/include/asm/mmu_context.h
@@ -1,5 +1,175 @@
1#ifdef __uClinux__ 1#ifndef __M68K_MMU_CONTEXT_H
2#include "mmu_context_no.h" 2#define __M68K_MMU_CONTEXT_H
3
4#include <asm-generic/mm_hooks.h>
5
6static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
7{
8}
9
10#ifdef CONFIG_MMU
11#ifndef CONFIG_SUN3
12
13#include <asm/setup.h>
14#include <asm/page.h>
15#include <asm/pgalloc.h>
16
17static inline int init_new_context(struct task_struct *tsk,
18 struct mm_struct *mm)
19{
20 mm->context = virt_to_phys(mm->pgd);
21 return 0;
22}
23
24#define destroy_context(mm) do { } while(0)
25
26static inline void switch_mm_0230(struct mm_struct *mm)
27{
28 unsigned long crp[2] = {
29 0x80000000 | _PAGE_TABLE, mm->context
30 };
31 unsigned long tmp;
32
33 asm volatile (".chip 68030");
34
35 /* flush MC68030/MC68020 caches (they are virtually addressed) */
36 asm volatile (
37 "movec %%cacr,%0;"
38 "orw %1,%0; "
39 "movec %0,%%cacr"
40 : "=d" (tmp) : "di" (FLUSH_I_AND_D));
41
42 /* Switch the root pointer. For a 030-only kernel,
43 * avoid flushing the whole ATC, we only need to
44 * flush the user entries. The 68851 does this by
45 * itself. Avoid a runtime check here.
46 */
47 asm volatile (
48#ifdef CPU_M68030_ONLY
49 "pmovefd %0,%%crp; "
50 "pflush #0,#4"
3#else 51#else
4#include "mmu_context_mm.h" 52 "pmove %0,%%crp"
5#endif 53#endif
54 : : "m" (crp[0]));
55
56 asm volatile (".chip 68k");
57}
58
59static inline void switch_mm_0460(struct mm_struct *mm)
60{
61 asm volatile (".chip 68040");
62
63 /* flush address translation cache (user entries) */
64 asm volatile ("pflushan");
65
66 /* switch the root pointer */
67 asm volatile ("movec %0,%%urp" : : "r" (mm->context));
68
69 if (CPU_IS_060) {
70 unsigned long tmp;
71
72 /* clear user entries in the branch cache */
73 asm volatile (
74 "movec %%cacr,%0; "
75 "orl %1,%0; "
76 "movec %0,%%cacr"
77 : "=d" (tmp): "di" (0x00200000));
78 }
79
80 asm volatile (".chip 68k");
81}
82
83static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
84{
85 if (prev != next) {
86 if (CPU_IS_020_OR_030)
87 switch_mm_0230(next);
88 else
89 switch_mm_0460(next);
90 }
91}
92
93#define deactivate_mm(tsk,mm) do { } while (0)
94
95static inline void activate_mm(struct mm_struct *prev_mm,
96 struct mm_struct *next_mm)
97{
98 next_mm->context = virt_to_phys(next_mm->pgd);
99
100 if (CPU_IS_020_OR_030)
101 switch_mm_0230(next_mm);
102 else
103 switch_mm_0460(next_mm);
104}
105
106#else /* CONFIG_SUN3 */
107#include <asm/sun3mmu.h>
108#include <linux/sched.h>
109
110extern unsigned long get_free_context(struct mm_struct *mm);
111extern void clear_context(unsigned long context);
112
113/* set the context for a new task to unmapped */
114static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
115{
116 mm->context = SUN3_INVALID_CONTEXT;
117 return 0;
118}
119
120/* find the context given to this process, and if it hasn't already
121 got one, go get one for it. */
122static inline void get_mmu_context(struct mm_struct *mm)
123{
124 if(mm->context == SUN3_INVALID_CONTEXT)
125 mm->context = get_free_context(mm);
126}
127
128/* flush context if allocated... */
129static inline void destroy_context(struct mm_struct *mm)
130{
131 if(mm->context != SUN3_INVALID_CONTEXT)
132 clear_context(mm->context);
133}
134
135static inline void activate_context(struct mm_struct *mm)
136{
137 get_mmu_context(mm);
138 sun3_put_context(mm->context);
139}
140
141static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
142{
143 activate_context(tsk->mm);
144}
145
146#define deactivate_mm(tsk,mm) do { } while (0)
147
148static inline void activate_mm(struct mm_struct *prev_mm,
149 struct mm_struct *next_mm)
150{
151 activate_context(next_mm);
152}
153
154#endif
155#else /* !CONFIG_MMU */
156
157static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
158{
159 return 0;
160}
161
162
163static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
164{
165}
166
167#define destroy_context(mm) do { } while (0)
168#define deactivate_mm(tsk,mm) do { } while (0)
169
170static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
171{
172}
173
174#endif /* CONFIG_MMU */
175#endif /* __M68K_MMU_CONTEXT_H */
diff --git a/arch/m68k/include/asm/mmu_context_mm.h b/arch/m68k/include/asm/mmu_context_mm.h
deleted file mode 100644
index 894dacbcee14..000000000000
--- a/arch/m68k/include/asm/mmu_context_mm.h
+++ /dev/null
@@ -1,154 +0,0 @@
1#ifndef __M68K_MMU_CONTEXT_H
2#define __M68K_MMU_CONTEXT_H
3
4#include <asm-generic/mm_hooks.h>
5
6static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
7{
8}
9
10#ifndef CONFIG_SUN3
11
12#include <asm/setup.h>
13#include <asm/page.h>
14#include <asm/pgalloc.h>
15
16static inline int init_new_context(struct task_struct *tsk,
17 struct mm_struct *mm)
18{
19 mm->context = virt_to_phys(mm->pgd);
20 return 0;
21}
22
23#define destroy_context(mm) do { } while(0)
24
25static inline void switch_mm_0230(struct mm_struct *mm)
26{
27 unsigned long crp[2] = {
28 0x80000000 | _PAGE_TABLE, mm->context
29 };
30 unsigned long tmp;
31
32 asm volatile (".chip 68030");
33
34 /* flush MC68030/MC68020 caches (they are virtually addressed) */
35 asm volatile (
36 "movec %%cacr,%0;"
37 "orw %1,%0; "
38 "movec %0,%%cacr"
39 : "=d" (tmp) : "di" (FLUSH_I_AND_D));
40
41 /* Switch the root pointer. For a 030-only kernel,
42 * avoid flushing the whole ATC, we only need to
43 * flush the user entries. The 68851 does this by
44 * itself. Avoid a runtime check here.
45 */
46 asm volatile (
47#ifdef CPU_M68030_ONLY
48 "pmovefd %0,%%crp; "
49 "pflush #0,#4"
50#else
51 "pmove %0,%%crp"
52#endif
53 : : "m" (crp[0]));
54
55 asm volatile (".chip 68k");
56}
57
58static inline void switch_mm_0460(struct mm_struct *mm)
59{
60 asm volatile (".chip 68040");
61
62 /* flush address translation cache (user entries) */
63 asm volatile ("pflushan");
64
65 /* switch the root pointer */
66 asm volatile ("movec %0,%%urp" : : "r" (mm->context));
67
68 if (CPU_IS_060) {
69 unsigned long tmp;
70
71 /* clear user entries in the branch cache */
72 asm volatile (
73 "movec %%cacr,%0; "
74 "orl %1,%0; "
75 "movec %0,%%cacr"
76 : "=d" (tmp): "di" (0x00200000));
77 }
78
79 asm volatile (".chip 68k");
80}
81
82static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
83{
84 if (prev != next) {
85 if (CPU_IS_020_OR_030)
86 switch_mm_0230(next);
87 else
88 switch_mm_0460(next);
89 }
90}
91
92#define deactivate_mm(tsk,mm) do { } while (0)
93
94static inline void activate_mm(struct mm_struct *prev_mm,
95 struct mm_struct *next_mm)
96{
97 next_mm->context = virt_to_phys(next_mm->pgd);
98
99 if (CPU_IS_020_OR_030)
100 switch_mm_0230(next_mm);
101 else
102 switch_mm_0460(next_mm);
103}
104
105#else /* CONFIG_SUN3 */
106#include <asm/sun3mmu.h>
107#include <linux/sched.h>
108
109extern unsigned long get_free_context(struct mm_struct *mm);
110extern void clear_context(unsigned long context);
111
112/* set the context for a new task to unmapped */
113static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
114{
115 mm->context = SUN3_INVALID_CONTEXT;
116 return 0;
117}
118
119/* find the context given to this process, and if it hasn't already
120 got one, go get one for it. */
121static inline void get_mmu_context(struct mm_struct *mm)
122{
123 if(mm->context == SUN3_INVALID_CONTEXT)
124 mm->context = get_free_context(mm);
125}
126
127/* flush context if allocated... */
128static inline void destroy_context(struct mm_struct *mm)
129{
130 if(mm->context != SUN3_INVALID_CONTEXT)
131 clear_context(mm->context);
132}
133
134static inline void activate_context(struct mm_struct *mm)
135{
136 get_mmu_context(mm);
137 sun3_put_context(mm->context);
138}
139
140static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
141{
142 activate_context(tsk->mm);
143}
144
145#define deactivate_mm(tsk,mm) do { } while (0)
146
147static inline void activate_mm(struct mm_struct *prev_mm,
148 struct mm_struct *next_mm)
149{
150 activate_context(next_mm);
151}
152
153#endif
154#endif
diff --git a/arch/m68k/include/asm/mmu_context_no.h b/arch/m68k/include/asm/mmu_context_no.h
deleted file mode 100644
index 9ccee4278c97..000000000000
--- a/arch/m68k/include/asm/mmu_context_no.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __M68KNOMMU_MMU_CONTEXT_H
2#define __M68KNOMMU_MMU_CONTEXT_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6#include <asm/pgalloc.h>
7#include <asm-generic/mm_hooks.h>
8
9static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
10{
11}
12
13static inline int
14init_new_context(struct task_struct *tsk, struct mm_struct *mm)
15{
16 // mm->context = virt_to_phys(mm->pgd);
17 return(0);
18}
19
20#define destroy_context(mm) do { } while(0)
21
22static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
23{
24}
25
26#define deactivate_mm(tsk,mm) do { } while (0)
27
28static inline void activate_mm(struct mm_struct *prev_mm,
29 struct mm_struct *next_mm)
30{
31}
32
33#endif
diff --git a/arch/m68k/include/asm/mmu_mm.h b/arch/m68k/include/asm/mmu_mm.h
deleted file mode 100644
index ccd36d26615a..000000000000
--- a/arch/m68k/include/asm/mmu_mm.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __MMU_H
2#define __MMU_H
3
4/* Default "unsigned long" context */
5typedef unsigned long mm_context_t;
6
7#endif
diff --git a/arch/m68k/include/asm/mmu_no.h b/arch/m68k/include/asm/mmu_no.h
deleted file mode 100644
index e2da1e6f09fe..000000000000
--- a/arch/m68k/include/asm/mmu_no.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __M68KNOMMU_MMU_H
2#define __M68KNOMMU_MMU_H
3
4/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
5
6typedef struct {
7 unsigned long end_brk;
8} mm_context_t;
9
10#endif /* __M68KNOMMU_MMU_H */
diff --git a/arch/m68k/include/asm/module.h b/arch/m68k/include/asm/module.h
index 79b59d137dd0..5f21e11071bd 100644
--- a/arch/m68k/include/asm/module.h
+++ b/arch/m68k/include/asm/module.h
@@ -1,5 +1,48 @@
1#ifdef __uClinux__ 1#ifndef _ASM_M68K_MODULE_H
2#include "module_no.h" 2#define _ASM_M68K_MODULE_H
3
4#ifdef CONFIG_MMU
5
6struct mod_arch_specific {
7 struct m68k_fixup_info *fixup_start, *fixup_end;
8};
9
10#define MODULE_ARCH_INIT { \
11 .fixup_start = __start_fixup, \
12 .fixup_end = __stop_fixup, \
13}
14
15
16enum m68k_fixup_type {
17 m68k_fixup_memoffset,
18 m68k_fixup_vnode_shift,
19};
20
21struct m68k_fixup_info {
22 enum m68k_fixup_type type;
23 void *addr;
24};
25
26#define m68k_fixup(type, addr) \
27 " .section \".m68k_fixup\",\"aw\"\n" \
28 " .long " #type "," #addr "\n" \
29 " .previous\n"
30
31extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
32
33struct module;
34extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
35 struct m68k_fixup_info *end);
36
3#else 37#else
4#include "module_mm.h" 38
5#endif 39struct mod_arch_specific {
40};
41
42#endif /* CONFIG_MMU */
43
44#define Elf_Shdr Elf32_Shdr
45#define Elf_Sym Elf32_Sym
46#define Elf_Ehdr Elf32_Ehdr
47
48#endif /* _ASM_M68K_MODULE_H */
diff --git a/arch/m68k/include/asm/module_mm.h b/arch/m68k/include/asm/module_mm.h
deleted file mode 100644
index 382d20a6fc18..000000000000
--- a/arch/m68k/include/asm/module_mm.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef _ASM_M68K_MODULE_H
2#define _ASM_M68K_MODULE_H
3
4struct mod_arch_specific {
5 struct m68k_fixup_info *fixup_start, *fixup_end;
6};
7
8#define MODULE_ARCH_INIT { \
9 .fixup_start = __start_fixup, \
10 .fixup_end = __stop_fixup, \
11}
12
13#define Elf_Shdr Elf32_Shdr
14#define Elf_Sym Elf32_Sym
15#define Elf_Ehdr Elf32_Ehdr
16
17
18enum m68k_fixup_type {
19 m68k_fixup_memoffset,
20 m68k_fixup_vnode_shift,
21};
22
23struct m68k_fixup_info {
24 enum m68k_fixup_type type;
25 void *addr;
26};
27
28#define m68k_fixup(type, addr) \
29 " .section \".m68k_fixup\",\"aw\"\n" \
30 " .long " #type "," #addr "\n" \
31 " .previous\n"
32
33extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
34
35struct module;
36extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
37 struct m68k_fixup_info *end);
38
39#endif /* _ASM_M68K_MODULE_H */
diff --git a/arch/m68k/include/asm/module_no.h b/arch/m68k/include/asm/module_no.h
deleted file mode 100644
index 2e45ab50b232..000000000000
--- a/arch/m68k/include/asm/module_no.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef ASM_M68KNOMMU_MODULE_H
2#define ASM_M68KNOMMU_MODULE_H
3
4struct mod_arch_specific {
5};
6
7#define Elf_Shdr Elf32_Shdr
8#define Elf_Sym Elf32_Sym
9#define Elf_Ehdr Elf32_Ehdr
10
11#endif /* ASM_M68KNOMMU_MODULE_H */
diff --git a/arch/m68k/include/asm/page_offset.h b/arch/m68k/include/asm/page_offset.h
index 66455c849fbb..1780152d81da 100644
--- a/arch/m68k/include/asm/page_offset.h
+++ b/arch/m68k/include/asm/page_offset.h
@@ -1,5 +1,11 @@
1#ifdef __uClinux__ 1/* This handles the memory map.. */
2#include "page_offset_no.h" 2
3#ifdef CONFIG_MMU
4#ifndef CONFIG_SUN3
5#define PAGE_OFFSET_RAW 0x00000000
3#else 6#else
4#include "page_offset_mm.h" 7#define PAGE_OFFSET_RAW 0x0E000000
8#endif
9#else
10#define PAGE_OFFSET_RAW CONFIG_RAMBASE
5#endif 11#endif
diff --git a/arch/m68k/include/asm/page_offset_mm.h b/arch/m68k/include/asm/page_offset_mm.h
deleted file mode 100644
index 1cbdb7f30ac2..000000000000
--- a/arch/m68k/include/asm/page_offset_mm.h
+++ /dev/null
@@ -1,8 +0,0 @@
1
2/* This handles the memory map.. */
3#ifndef CONFIG_SUN3
4#define PAGE_OFFSET_RAW 0x00000000
5#else
6#define PAGE_OFFSET_RAW 0x0E000000
7#endif
8
diff --git a/arch/m68k/include/asm/page_offset_no.h b/arch/m68k/include/asm/page_offset_no.h
deleted file mode 100644
index d4e73e0ba646..000000000000
--- a/arch/m68k/include/asm/page_offset_no.h
+++ /dev/null
@@ -1,5 +0,0 @@
1
2
3/* This handles the memory map.. */
4#define PAGE_OFFSET_RAW CONFIG_RAMBASE
5
diff --git a/arch/m68k/include/asm/pci.h b/arch/m68k/include/asm/pci.h
index dbea95373080..4ad0aea48ab4 100644
--- a/arch/m68k/include/asm/pci.h
+++ b/arch/m68k/include/asm/pci.h
@@ -1,5 +1,12 @@
1#ifdef __uClinux__ 1#ifndef _ASM_M68K_PCI_H
2#include "pci_no.h" 2#define _ASM_M68K_PCI_H
3#else 3
4#include "pci_mm.h" 4#include <asm-generic/pci-dma-compat.h>
5#endif 5
6/* The PCI address space does equal the physical memory
7 * address space. The networking and block device layers use
8 * this boolean for bounce buffer decisions.
9 */
10#define PCI_DMA_BUS_IS_PHYS (1)
11
12#endif /* _ASM_M68K_PCI_H */
diff --git a/arch/m68k/include/asm/pci_mm.h b/arch/m68k/include/asm/pci_mm.h
deleted file mode 100644
index 4ad0aea48ab4..000000000000
--- a/arch/m68k/include/asm/pci_mm.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_M68K_PCI_H
2#define _ASM_M68K_PCI_H
3
4#include <asm-generic/pci-dma-compat.h>
5
6/* The PCI address space does equal the physical memory
7 * address space. The networking and block device layers use
8 * this boolean for bounce buffer decisions.
9 */
10#define PCI_DMA_BUS_IS_PHYS (1)
11
12#endif /* _ASM_M68K_PCI_H */
diff --git a/arch/m68k/include/asm/pci_no.h b/arch/m68k/include/asm/pci_no.h
deleted file mode 100644
index 9abbc03c73ee..000000000000
--- a/arch/m68k/include/asm/pci_no.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef M68KNOMMU_PCI_H
2#define M68KNOMMU_PCI_H
3
4#include <asm/pci_mm.h>
5
6#ifdef CONFIG_COMEMPCI
7/*
8 * These are pretty much arbitary with the CoMEM implementation.
9 * We have the whole address space to ourselves.
10 */
11#define PCIBIOS_MIN_IO 0x100
12#define PCIBIOS_MIN_MEM 0x00010000
13
14#define pcibios_scan_all_fns(a, b) 0
15
16/*
17 * Return whether the given PCI device DMA address mask can
18 * be supported properly. For example, if your device can
19 * only drive the low 24-bits during PCI bus mastering, then
20 * you would pass 0x00ffffff as the mask to this function.
21 */
22static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
23{
24 return 1;
25}
26
27#endif /* CONFIG_COMEMPCI */
28
29#endif /* M68KNOMMU_PCI_H */
diff --git a/arch/m68k/include/asm/pgalloc.h b/arch/m68k/include/asm/pgalloc.h
index 059cb73e78fc..c294aad8a900 100644
--- a/arch/m68k/include/asm/pgalloc.h
+++ b/arch/m68k/include/asm/pgalloc.h
@@ -1,5 +1,19 @@
1#ifdef __uClinux__ 1#ifndef M68K_PGALLOC_H
2#include "pgalloc_no.h" 2#define M68K_PGALLOC_H
3
4#include <linux/mm.h>
5#include <linux/highmem.h>
6#include <asm/setup.h>
7
8#ifdef CONFIG_MMU
9#include <asm/virtconvert.h>
10#ifdef CONFIG_SUN3
11#include <asm/sun3_pgalloc.h>
3#else 12#else
4#include "pgalloc_mm.h" 13#include <asm/motorola_pgalloc.h>
5#endif 14#endif
15
16extern void m68k_setup_node(int node);
17#endif
18
19#endif /* M68K_PGALLOC_H */
diff --git a/arch/m68k/include/asm/pgalloc_mm.h b/arch/m68k/include/asm/pgalloc_mm.h
deleted file mode 100644
index 4cb1a57ab763..000000000000
--- a/arch/m68k/include/asm/pgalloc_mm.h
+++ /dev/null
@@ -1,19 +0,0 @@
1
2#ifndef M68K_PGALLOC_H
3#define M68K_PGALLOC_H
4
5#include <linux/mm.h>
6#include <linux/highmem.h>
7#include <asm/setup.h>
8#include <asm/virtconvert.h>
9
10
11#ifdef CONFIG_SUN3
12#include <asm/sun3_pgalloc.h>
13#else
14#include <asm/motorola_pgalloc.h>
15#endif
16
17extern void m68k_setup_node(int node);
18
19#endif /* M68K_PGALLOC_H */
diff --git a/arch/m68k/include/asm/pgalloc_no.h b/arch/m68k/include/asm/pgalloc_no.h
deleted file mode 100644
index d6352f671ec0..000000000000
--- a/arch/m68k/include/asm/pgalloc_no.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _M68KNOMMU_PGALLOC_H
2#define _M68KNOMMU_PGALLOC_H
3
4#include <asm/setup.h>
5
6#define check_pgt_cache() do { } while (0)
7
8#endif /* _M68KNOMMU_PGALLOC_H */
diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h
index 46251016e821..bf86b29fe64a 100644
--- a/arch/m68k/include/asm/pgtable_no.h
+++ b/arch/m68k/include/asm/pgtable_no.h
@@ -67,4 +67,6 @@ extern unsigned int kobjsize(const void *objp);
67 67
68#include <asm-generic/pgtable.h> 68#include <asm-generic/pgtable.h>
69 69
70#define check_pgt_cache() do { } while (0)
71
70#endif /* _M68KNOMMU_PGTABLE_H */ 72#endif /* _M68KNOMMU_PGTABLE_H */
diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h
index 5d3e03859844..a4d08ea122ee 100644
--- a/arch/m68k/include/asm/rtc.h
+++ b/arch/m68k/include/asm/rtc.h
@@ -36,13 +36,16 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
36 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated 36 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
37 * by the RTC when initially set to a non-zero value. 37 * by the RTC when initially set to a non-zero value.
38 */ 38 */
39 mach_hwclk(0, time); 39 if (mach_hwclk)
40 mach_hwclk(0, time);
40 return RTC_24H; 41 return RTC_24H;
41} 42}
42 43
43static inline int set_rtc_time(struct rtc_time *time) 44static inline int set_rtc_time(struct rtc_time *time)
44{ 45{
45 return mach_hwclk(1, time); 46 if (mach_hwclk)
47 return mach_hwclk(1, time);
48 return -EINVAL;
46} 49}
47 50
48static inline unsigned int get_rtc_ss(void) 51static inline unsigned int get_rtc_ss(void)
diff --git a/arch/m68k/include/asm/scatterlist.h b/arch/m68k/include/asm/scatterlist.h
index b7e528636252..e27ad902b1cf 100644
--- a/arch/m68k/include/asm/scatterlist.h
+++ b/arch/m68k/include/asm/scatterlist.h
@@ -1,5 +1,23 @@
1#ifdef __uClinux__ 1#ifndef _M68K_SCATTERLIST_H
2#include "scatterlist_no.h" 2#define _M68K_SCATTERLIST_H
3#else 3
4#include "scatterlist_mm.h" 4#include <linux/types.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
5#endif 9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 unsigned int length;
13
14 dma_addr_t dma_address; /* A place to hang host-specific addresses at. */
15};
16
17/* This is bogus and should go away. */
18#define ISA_DMA_THRESHOLD (0x00ffffff)
19
20#define sg_dma_address(sg) ((sg)->dma_address)
21#define sg_dma_len(sg) ((sg)->length)
22
23#endif /* !(_M68K_SCATTERLIST_H) */
diff --git a/arch/m68k/include/asm/scatterlist_mm.h b/arch/m68k/include/asm/scatterlist_mm.h
deleted file mode 100644
index d3a7a0edfeca..000000000000
--- a/arch/m68k/include/asm/scatterlist_mm.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _M68K_SCATTERLIST_H
2#define _M68K_SCATTERLIST_H
3
4#include <linux/types.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 unsigned int length;
13
14 __u32 dma_address; /* A place to hang host-specific addresses at. */
15};
16
17/* This is bogus and should go away. */
18#define ISA_DMA_THRESHOLD (0x00ffffff)
19
20#define sg_dma_address(sg) ((sg)->dma_address)
21#define sg_dma_len(sg) ((sg)->length)
22
23#endif /* !(_M68K_SCATTERLIST_H) */
diff --git a/arch/m68k/include/asm/scatterlist_no.h b/arch/m68k/include/asm/scatterlist_no.h
deleted file mode 100644
index afc4788b0d2c..000000000000
--- a/arch/m68k/include/asm/scatterlist_no.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _M68KNOMMU_SCATTERLIST_H
2#define _M68KNOMMU_SCATTERLIST_H
3
4#include <linux/mm.h>
5#include <asm/types.h>
6
7struct scatterlist {
8#ifdef CONFIG_DEBUG_SG
9 unsigned long sg_magic;
10#endif
11 unsigned long page_link;
12 unsigned int offset;
13 dma_addr_t dma_address;
14 unsigned int length;
15};
16
17#define sg_dma_address(sg) ((sg)->dma_address)
18#define sg_dma_len(sg) ((sg)->length)
19
20#define ISA_DMA_THRESHOLD (0xffffffff)
21
22#endif /* !(_M68KNOMMU_SCATTERLIST_H) */
diff --git a/arch/m68k/include/asm/segment.h b/arch/m68k/include/asm/segment.h
index 82583bc004bd..ee959219fdfe 100644
--- a/arch/m68k/include/asm/segment.h
+++ b/arch/m68k/include/asm/segment.h
@@ -1,5 +1,63 @@
1#ifdef __uClinux__ 1#ifndef _M68K_SEGMENT_H
2#include "segment_no.h" 2#define _M68K_SEGMENT_H
3
4/* define constants */
5/* Address spaces (FC0-FC2) */
6#define USER_DATA (1)
7#ifndef __USER_DS
8#define __USER_DS (USER_DATA)
9#endif
10#define USER_PROGRAM (2)
11#define SUPER_DATA (5)
12#ifndef __KERNEL_DS
13#define __KERNEL_DS (SUPER_DATA)
14#endif
15#define SUPER_PROGRAM (6)
16#define CPU_SPACE (7)
17
18#ifndef __ASSEMBLY__
19
20typedef struct {
21 unsigned long seg;
22} mm_segment_t;
23
24#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
25#define USER_DS MAKE_MM_SEG(__USER_DS)
26#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
27
28/*
29 * Get/set the SFC/DFC registers for MOVES instructions
30 */
31
32static inline mm_segment_t get_fs(void)
33{
34#ifdef CONFIG_MMU
35 mm_segment_t _v;
36 __asm__ ("movec %/dfc,%0":"=r" (_v.seg):);
37
38 return _v;
3#else 39#else
4#include "segment_mm.h" 40 return USER_DS;
41#endif
42}
43
44static inline mm_segment_t get_ds(void)
45{
46 /* return the supervisor data space code */
47 return KERNEL_DS;
48}
49
50static inline void set_fs(mm_segment_t val)
51{
52#ifdef CONFIG_MMU
53 __asm__ __volatile__ ("movec %0,%/sfc\n\t"
54 "movec %0,%/dfc\n\t"
55 : /* no outputs */ : "r" (val.seg) : "memory");
5#endif 56#endif
57}
58
59#define segment_eq(a,b) ((a).seg == (b).seg)
60
61#endif /* __ASSEMBLY__ */
62
63#endif /* _M68K_SEGMENT_H */
diff --git a/arch/m68k/include/asm/segment_mm.h b/arch/m68k/include/asm/segment_mm.h
deleted file mode 100644
index 7b0b2d3127f9..000000000000
--- a/arch/m68k/include/asm/segment_mm.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef _M68K_SEGMENT_H
2#define _M68K_SEGMENT_H
3
4/* define constants */
5/* Address spaces (FC0-FC2) */
6#define USER_DATA (1)
7#ifndef __USER_DS
8#define __USER_DS (USER_DATA)
9#endif
10#define USER_PROGRAM (2)
11#define SUPER_DATA (5)
12#ifndef __KERNEL_DS
13#define __KERNEL_DS (SUPER_DATA)
14#endif
15#define SUPER_PROGRAM (6)
16#define CPU_SPACE (7)
17
18#ifndef __ASSEMBLY__
19
20typedef struct {
21 unsigned long seg;
22} mm_segment_t;
23
24#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
25#define USER_DS MAKE_MM_SEG(__USER_DS)
26#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
27
28/*
29 * Get/set the SFC/DFC registers for MOVES instructions
30 */
31
32static inline mm_segment_t get_fs(void)
33{
34 mm_segment_t _v;
35 __asm__ ("movec %/dfc,%0":"=r" (_v.seg):);
36
37 return _v;
38}
39
40static inline mm_segment_t get_ds(void)
41{
42 /* return the supervisor data space code */
43 return KERNEL_DS;
44}
45
46static inline void set_fs(mm_segment_t val)
47{
48 __asm__ __volatile__ ("movec %0,%/sfc\n\t"
49 "movec %0,%/dfc\n\t"
50 : /* no outputs */ : "r" (val.seg) : "memory");
51}
52
53#define segment_eq(a,b) ((a).seg == (b).seg)
54
55#endif /* __ASSEMBLY__ */
56
57#endif /* _M68K_SEGMENT_H */
diff --git a/arch/m68k/include/asm/segment_no.h b/arch/m68k/include/asm/segment_no.h
deleted file mode 100644
index 42318ebec7ec..000000000000
--- a/arch/m68k/include/asm/segment_no.h
+++ /dev/null
@@ -1,51 +0,0 @@
1#ifndef _M68K_SEGMENT_H
2#define _M68K_SEGMENT_H
3
4/* define constants */
5/* Address spaces (FC0-FC2) */
6#define USER_DATA (1)
7#ifndef __USER_DS
8#define __USER_DS (USER_DATA)
9#endif
10#define USER_PROGRAM (2)
11#define SUPER_DATA (5)
12#ifndef __KERNEL_DS
13#define __KERNEL_DS (SUPER_DATA)
14#endif
15#define SUPER_PROGRAM (6)
16#define CPU_SPACE (7)
17
18#ifndef __ASSEMBLY__
19
20typedef struct {
21 unsigned long seg;
22} mm_segment_t;
23
24#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
25#define USER_DS MAKE_MM_SEG(__USER_DS)
26#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
27
28/*
29 * Get/set the SFC/DFC registers for MOVES instructions
30 */
31
32static inline mm_segment_t get_fs(void)
33{
34 return USER_DS;
35}
36
37static inline mm_segment_t get_ds(void)
38{
39 /* return the supervisor data space code */
40 return KERNEL_DS;
41}
42
43static inline void set_fs(mm_segment_t val)
44{
45}
46
47#define segment_eq(a,b) ((a).seg == (b).seg)
48
49#endif /* __ASSEMBLY__ */
50
51#endif /* _M68K_SEGMENT_H */
diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
index 719762980578..b87f2f278f67 100644
--- a/arch/m68k/include/asm/timex.h
+++ b/arch/m68k/include/asm/timex.h
@@ -1,5 +1,18 @@
1#ifdef __uClinux__ 1/*
2#include "timex_no.h" 2 * linux/include/asm-m68k/timex.h
3#else 3 *
4#include "timex_mm.h" 4 * m68k architecture timex specifications
5 */
6#ifndef _ASMm68k_TIMEX_H
7#define _ASMm68k_TIMEX_H
8
9#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
10
11typedef unsigned long cycles_t;
12
13static inline cycles_t get_cycles(void)
14{
15 return 0;
16}
17
5#endif 18#endif
diff --git a/arch/m68k/include/asm/timex_mm.h b/arch/m68k/include/asm/timex_mm.h
deleted file mode 100644
index b87f2f278f67..000000000000
--- a/arch/m68k/include/asm/timex_mm.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-m68k/timex.h
3 *
4 * m68k architecture timex specifications
5 */
6#ifndef _ASMm68k_TIMEX_H
7#define _ASMm68k_TIMEX_H
8
9#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
10
11typedef unsigned long cycles_t;
12
13static inline cycles_t get_cycles(void)
14{
15 return 0;
16}
17
18#endif
diff --git a/arch/m68k/include/asm/timex_no.h b/arch/m68k/include/asm/timex_no.h
deleted file mode 100644
index 109050f3fe91..000000000000
--- a/arch/m68k/include/asm/timex_no.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-m68knommu/timex.h
3 *
4 * m68knommu architecture timex specifications
5 */
6#ifndef _ASM_M68KNOMMU_TIMEX_H
7#define _ASM_M68KNOMMU_TIMEX_H
8
9#ifdef CONFIG_COLDFIRE
10#include <asm/coldfire.h>
11#define CLOCK_TICK_RATE MCF_CLK
12#else
13#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
14#endif
15
16typedef unsigned long cycles_t;
17
18static inline cycles_t get_cycles(void)
19{
20 return 0;
21}
22
23#endif
diff --git a/arch/m68k/include/asm/tlbflush.h b/arch/m68k/include/asm/tlbflush.h
index b6f93b30951e..a6b4ed4fc90f 100644
--- a/arch/m68k/include/asm/tlbflush.h
+++ b/arch/m68k/include/asm/tlbflush.h
@@ -1,5 +1,267 @@
1#ifdef __uClinux__ 1#ifndef _M68K_TLBFLUSH_H
2#include "tlbflush_no.h" 2#define _M68K_TLBFLUSH_H
3
4#ifdef CONFIG_MMU
5#ifndef CONFIG_SUN3
6
7#include <asm/current.h>
8
9static inline void flush_tlb_kernel_page(void *addr)
10{
11 if (CPU_IS_040_OR_060) {
12 mm_segment_t old_fs = get_fs();
13 set_fs(KERNEL_DS);
14 __asm__ __volatile__(".chip 68040\n\t"
15 "pflush (%0)\n\t"
16 ".chip 68k"
17 : : "a" (addr));
18 set_fs(old_fs);
19 } else if (CPU_IS_020_OR_030)
20 __asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr));
21}
22
23/*
24 * flush all user-space atc entries.
25 */
26static inline void __flush_tlb(void)
27{
28 if (CPU_IS_040_OR_060)
29 __asm__ __volatile__(".chip 68040\n\t"
30 "pflushan\n\t"
31 ".chip 68k");
32 else if (CPU_IS_020_OR_030)
33 __asm__ __volatile__("pflush #0,#4");
34}
35
36static inline void __flush_tlb040_one(unsigned long addr)
37{
38 __asm__ __volatile__(".chip 68040\n\t"
39 "pflush (%0)\n\t"
40 ".chip 68k"
41 : : "a" (addr));
42}
43
44static inline void __flush_tlb_one(unsigned long addr)
45{
46 if (CPU_IS_040_OR_060)
47 __flush_tlb040_one(addr);
48 else if (CPU_IS_020_OR_030)
49 __asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr));
50}
51
52#define flush_tlb() __flush_tlb()
53
54/*
55 * flush all atc entries (both kernel and user-space entries).
56 */
57static inline void flush_tlb_all(void)
58{
59 if (CPU_IS_040_OR_060)
60 __asm__ __volatile__(".chip 68040\n\t"
61 "pflusha\n\t"
62 ".chip 68k");
63 else if (CPU_IS_020_OR_030)
64 __asm__ __volatile__("pflusha");
65}
66
67static inline void flush_tlb_mm(struct mm_struct *mm)
68{
69 if (mm == current->active_mm)
70 __flush_tlb();
71}
72
73static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
74{
75 if (vma->vm_mm == current->active_mm) {
76 mm_segment_t old_fs = get_fs();
77 set_fs(USER_DS);
78 __flush_tlb_one(addr);
79 set_fs(old_fs);
80 }
81}
82
83static inline void flush_tlb_range(struct vm_area_struct *vma,
84 unsigned long start, unsigned long end)
85{
86 if (vma->vm_mm == current->active_mm)
87 __flush_tlb();
88}
89
90static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
91{
92 flush_tlb_all();
93}
94
3#else 95#else
4#include "tlbflush_mm.h" 96
97
98/* Reserved PMEGs. */
99extern char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
100extern unsigned long pmeg_vaddr[SUN3_PMEGS_NUM];
101extern unsigned char pmeg_alloc[SUN3_PMEGS_NUM];
102extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM];
103
104/* Flush all userspace mappings one by one... (why no flush command,
105 sun?) */
106static inline void flush_tlb_all(void)
107{
108 unsigned long addr;
109 unsigned char ctx, oldctx;
110
111 oldctx = sun3_get_context();
112 for(addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) {
113 for(ctx = 0; ctx < 8; ctx++) {
114 sun3_put_context(ctx);
115 sun3_put_segmap(addr, SUN3_INVALID_PMEG);
116 }
117 }
118
119 sun3_put_context(oldctx);
120 /* erase all of the userspace pmeg maps, we've clobbered them
121 all anyway */
122 for(addr = 0; addr < SUN3_INVALID_PMEG; addr++) {
123 if(pmeg_alloc[addr] == 1) {
124 pmeg_alloc[addr] = 0;
125 pmeg_ctx[addr] = 0;
126 pmeg_vaddr[addr] = 0;
127 }
128 }
129
130}
131
132/* Clear user TLB entries within the context named in mm */
133static inline void flush_tlb_mm (struct mm_struct *mm)
134{
135 unsigned char oldctx;
136 unsigned char seg;
137 unsigned long i;
138
139 oldctx = sun3_get_context();
140 sun3_put_context(mm->context);
141
142 for(i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) {
143 seg = sun3_get_segmap(i);
144 if(seg == SUN3_INVALID_PMEG)
145 continue;
146
147 sun3_put_segmap(i, SUN3_INVALID_PMEG);
148 pmeg_alloc[seg] = 0;
149 pmeg_ctx[seg] = 0;
150 pmeg_vaddr[seg] = 0;
151 }
152
153 sun3_put_context(oldctx);
154
155}
156
157/* Flush a single TLB page. In this case, we're limited to flushing a
158 single PMEG */
159static inline void flush_tlb_page (struct vm_area_struct *vma,
160 unsigned long addr)
161{
162 unsigned char oldctx;
163 unsigned char i;
164
165 oldctx = sun3_get_context();
166 sun3_put_context(vma->vm_mm->context);
167 addr &= ~SUN3_PMEG_MASK;
168 if((i = sun3_get_segmap(addr)) != SUN3_INVALID_PMEG)
169 {
170 pmeg_alloc[i] = 0;
171 pmeg_ctx[i] = 0;
172 pmeg_vaddr[i] = 0;
173 sun3_put_segmap (addr, SUN3_INVALID_PMEG);
174 }
175 sun3_put_context(oldctx);
176
177}
178/* Flush a range of pages from TLB. */
179
180static inline void flush_tlb_range (struct vm_area_struct *vma,
181 unsigned long start, unsigned long end)
182{
183 struct mm_struct *mm = vma->vm_mm;
184 unsigned char seg, oldctx;
185
186 start &= ~SUN3_PMEG_MASK;
187
188 oldctx = sun3_get_context();
189 sun3_put_context(mm->context);
190
191 while(start < end)
192 {
193 if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG)
194 goto next;
195 if(pmeg_ctx[seg] == mm->context) {
196 pmeg_alloc[seg] = 0;
197 pmeg_ctx[seg] = 0;
198 pmeg_vaddr[seg] = 0;
199 }
200 sun3_put_segmap(start, SUN3_INVALID_PMEG);
201 next:
202 start += SUN3_PMEG_SIZE;
203 }
204}
205
206static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
207{
208 flush_tlb_all();
209}
210
211/* Flush kernel page from TLB. */
212static inline void flush_tlb_kernel_page (unsigned long addr)
213{
214 sun3_put_segmap (addr & ~(SUN3_PMEG_SIZE - 1), SUN3_INVALID_PMEG);
215}
216
5#endif 217#endif
218
219#else /* !CONFIG_MMU */
220
221/*
222 * flush all user-space atc entries.
223 */
224static inline void __flush_tlb(void)
225{
226 BUG();
227}
228
229static inline void __flush_tlb_one(unsigned long addr)
230{
231 BUG();
232}
233
234#define flush_tlb() __flush_tlb()
235
236/*
237 * flush all atc entries (both kernel and user-space entries).
238 */
239static inline void flush_tlb_all(void)
240{
241 BUG();
242}
243
244static inline void flush_tlb_mm(struct mm_struct *mm)
245{
246 BUG();
247}
248
249static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
250{
251 BUG();
252}
253
254static inline void flush_tlb_range(struct mm_struct *mm,
255 unsigned long start, unsigned long end)
256{
257 BUG();
258}
259
260static inline void flush_tlb_kernel_page(unsigned long addr)
261{
262 BUG();
263}
264
265#endif /* CONFIG_MMU */
266
267#endif /* _M68K_TLBFLUSH_H */
diff --git a/arch/m68k/include/asm/tlbflush_mm.h b/arch/m68k/include/asm/tlbflush_mm.h
deleted file mode 100644
index acb6bf21a321..000000000000
--- a/arch/m68k/include/asm/tlbflush_mm.h
+++ /dev/null
@@ -1,219 +0,0 @@
1#ifndef _M68K_TLBFLUSH_H
2#define _M68K_TLBFLUSH_H
3
4
5#ifndef CONFIG_SUN3
6
7#include <asm/current.h>
8
9static inline void flush_tlb_kernel_page(void *addr)
10{
11 if (CPU_IS_040_OR_060) {
12 mm_segment_t old_fs = get_fs();
13 set_fs(KERNEL_DS);
14 __asm__ __volatile__(".chip 68040\n\t"
15 "pflush (%0)\n\t"
16 ".chip 68k"
17 : : "a" (addr));
18 set_fs(old_fs);
19 } else if (CPU_IS_020_OR_030)
20 __asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr));
21}
22
23/*
24 * flush all user-space atc entries.
25 */
26static inline void __flush_tlb(void)
27{
28 if (CPU_IS_040_OR_060)
29 __asm__ __volatile__(".chip 68040\n\t"
30 "pflushan\n\t"
31 ".chip 68k");
32 else if (CPU_IS_020_OR_030)
33 __asm__ __volatile__("pflush #0,#4");
34}
35
36static inline void __flush_tlb040_one(unsigned long addr)
37{
38 __asm__ __volatile__(".chip 68040\n\t"
39 "pflush (%0)\n\t"
40 ".chip 68k"
41 : : "a" (addr));
42}
43
44static inline void __flush_tlb_one(unsigned long addr)
45{
46 if (CPU_IS_040_OR_060)
47 __flush_tlb040_one(addr);
48 else if (CPU_IS_020_OR_030)
49 __asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr));
50}
51
52#define flush_tlb() __flush_tlb()
53
54/*
55 * flush all atc entries (both kernel and user-space entries).
56 */
57static inline void flush_tlb_all(void)
58{
59 if (CPU_IS_040_OR_060)
60 __asm__ __volatile__(".chip 68040\n\t"
61 "pflusha\n\t"
62 ".chip 68k");
63 else if (CPU_IS_020_OR_030)
64 __asm__ __volatile__("pflusha");
65}
66
67static inline void flush_tlb_mm(struct mm_struct *mm)
68{
69 if (mm == current->active_mm)
70 __flush_tlb();
71}
72
73static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
74{
75 if (vma->vm_mm == current->active_mm) {
76 mm_segment_t old_fs = get_fs();
77 set_fs(USER_DS);
78 __flush_tlb_one(addr);
79 set_fs(old_fs);
80 }
81}
82
83static inline void flush_tlb_range(struct vm_area_struct *vma,
84 unsigned long start, unsigned long end)
85{
86 if (vma->vm_mm == current->active_mm)
87 __flush_tlb();
88}
89
90static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
91{
92 flush_tlb_all();
93}
94
95#else
96
97
98/* Reserved PMEGs. */
99extern char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
100extern unsigned long pmeg_vaddr[SUN3_PMEGS_NUM];
101extern unsigned char pmeg_alloc[SUN3_PMEGS_NUM];
102extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM];
103
104/* Flush all userspace mappings one by one... (why no flush command,
105 sun?) */
106static inline void flush_tlb_all(void)
107{
108 unsigned long addr;
109 unsigned char ctx, oldctx;
110
111 oldctx = sun3_get_context();
112 for(addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) {
113 for(ctx = 0; ctx < 8; ctx++) {
114 sun3_put_context(ctx);
115 sun3_put_segmap(addr, SUN3_INVALID_PMEG);
116 }
117 }
118
119 sun3_put_context(oldctx);
120 /* erase all of the userspace pmeg maps, we've clobbered them
121 all anyway */
122 for(addr = 0; addr < SUN3_INVALID_PMEG; addr++) {
123 if(pmeg_alloc[addr] == 1) {
124 pmeg_alloc[addr] = 0;
125 pmeg_ctx[addr] = 0;
126 pmeg_vaddr[addr] = 0;
127 }
128 }
129
130}
131
132/* Clear user TLB entries within the context named in mm */
133static inline void flush_tlb_mm (struct mm_struct *mm)
134{
135 unsigned char oldctx;
136 unsigned char seg;
137 unsigned long i;
138
139 oldctx = sun3_get_context();
140 sun3_put_context(mm->context);
141
142 for(i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) {
143 seg = sun3_get_segmap(i);
144 if(seg == SUN3_INVALID_PMEG)
145 continue;
146
147 sun3_put_segmap(i, SUN3_INVALID_PMEG);
148 pmeg_alloc[seg] = 0;
149 pmeg_ctx[seg] = 0;
150 pmeg_vaddr[seg] = 0;
151 }
152
153 sun3_put_context(oldctx);
154
155}
156
157/* Flush a single TLB page. In this case, we're limited to flushing a
158 single PMEG */
159static inline void flush_tlb_page (struct vm_area_struct *vma,
160 unsigned long addr)
161{
162 unsigned char oldctx;
163 unsigned char i;
164
165 oldctx = sun3_get_context();
166 sun3_put_context(vma->vm_mm->context);
167 addr &= ~SUN3_PMEG_MASK;
168 if((i = sun3_get_segmap(addr)) != SUN3_INVALID_PMEG)
169 {
170 pmeg_alloc[i] = 0;
171 pmeg_ctx[i] = 0;
172 pmeg_vaddr[i] = 0;
173 sun3_put_segmap (addr, SUN3_INVALID_PMEG);
174 }
175 sun3_put_context(oldctx);
176
177}
178/* Flush a range of pages from TLB. */
179
180static inline void flush_tlb_range (struct vm_area_struct *vma,
181 unsigned long start, unsigned long end)
182{
183 struct mm_struct *mm = vma->vm_mm;
184 unsigned char seg, oldctx;
185
186 start &= ~SUN3_PMEG_MASK;
187
188 oldctx = sun3_get_context();
189 sun3_put_context(mm->context);
190
191 while(start < end)
192 {
193 if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG)
194 goto next;
195 if(pmeg_ctx[seg] == mm->context) {
196 pmeg_alloc[seg] = 0;
197 pmeg_ctx[seg] = 0;
198 pmeg_vaddr[seg] = 0;
199 }
200 sun3_put_segmap(start, SUN3_INVALID_PMEG);
201 next:
202 start += SUN3_PMEG_SIZE;
203 }
204}
205
206static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
207{
208 flush_tlb_all();
209}
210
211/* Flush kernel page from TLB. */
212static inline void flush_tlb_kernel_page (unsigned long addr)
213{
214 sun3_put_segmap (addr & ~(SUN3_PMEG_SIZE - 1), SUN3_INVALID_PMEG);
215}
216
217#endif
218
219#endif /* _M68K_TLBFLUSH_H */
diff --git a/arch/m68k/include/asm/tlbflush_no.h b/arch/m68k/include/asm/tlbflush_no.h
deleted file mode 100644
index a470cfb803eb..000000000000
--- a/arch/m68k/include/asm/tlbflush_no.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _M68KNOMMU_TLBFLUSH_H
2#define _M68KNOMMU_TLBFLUSH_H
3
4/*
5 * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org>
6 * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com>
7 */
8
9#include <asm/setup.h>
10
11/*
12 * flush all user-space atc entries.
13 */
14static inline void __flush_tlb(void)
15{
16 BUG();
17}
18
19static inline void __flush_tlb_one(unsigned long addr)
20{
21 BUG();
22}
23
24#define flush_tlb() __flush_tlb()
25
26/*
27 * flush all atc entries (both kernel and user-space entries).
28 */
29static inline void flush_tlb_all(void)
30{
31 BUG();
32}
33
34static inline void flush_tlb_mm(struct mm_struct *mm)
35{
36 BUG();
37}
38
39static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
40{
41 BUG();
42}
43
44static inline void flush_tlb_range(struct mm_struct *mm,
45 unsigned long start, unsigned long end)
46{
47 BUG();
48}
49
50static inline void flush_tlb_kernel_page(unsigned long addr)
51{
52 BUG();
53}
54
55#endif /* _M68KNOMMU_TLBFLUSH_H */
diff --git a/arch/m68k/include/asm/ucontext.h b/arch/m68k/include/asm/ucontext.h
index b53cd160c0b3..e4e22669edc0 100644
--- a/arch/m68k/include/asm/ucontext.h
+++ b/arch/m68k/include/asm/ucontext.h
@@ -1,5 +1,30 @@
1#ifdef __uClinux__ 1#ifndef _M68K_UCONTEXT_H
2#include "ucontext_no.h" 2#define _M68K_UCONTEXT_H
3#else 3
4#include "ucontext_mm.h" 4typedef int greg_t;
5#define NGREG 18
6typedef greg_t gregset_t[NGREG];
7
8typedef struct fpregset {
9 int f_fpcntl[3];
10 int f_fpregs[8*3];
11} fpregset_t;
12
13struct mcontext {
14 int version;
15 gregset_t gregs;
16 fpregset_t fpregs;
17};
18
19#define MCONTEXT_VERSION 2
20
21struct ucontext {
22 unsigned long uc_flags;
23 struct ucontext *uc_link;
24 stack_t uc_stack;
25 struct mcontext uc_mcontext;
26 unsigned long uc_filler[80];
27 sigset_t uc_sigmask; /* mask last for extensibility */
28};
29
5#endif 30#endif
diff --git a/arch/m68k/include/asm/ucontext_mm.h b/arch/m68k/include/asm/ucontext_mm.h
deleted file mode 100644
index e4e22669edc0..000000000000
--- a/arch/m68k/include/asm/ucontext_mm.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _M68K_UCONTEXT_H
2#define _M68K_UCONTEXT_H
3
4typedef int greg_t;
5#define NGREG 18
6typedef greg_t gregset_t[NGREG];
7
8typedef struct fpregset {
9 int f_fpcntl[3];
10 int f_fpregs[8*3];
11} fpregset_t;
12
13struct mcontext {
14 int version;
15 gregset_t gregs;
16 fpregset_t fpregs;
17};
18
19#define MCONTEXT_VERSION 2
20
21struct ucontext {
22 unsigned long uc_flags;
23 struct ucontext *uc_link;
24 stack_t uc_stack;
25 struct mcontext uc_mcontext;
26 unsigned long uc_filler[80];
27 sigset_t uc_sigmask; /* mask last for extensibility */
28};
29
30#endif
diff --git a/arch/m68k/include/asm/ucontext_no.h b/arch/m68k/include/asm/ucontext_no.h
deleted file mode 100644
index 713a27f901cd..000000000000
--- a/arch/m68k/include/asm/ucontext_no.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef _M68KNOMMU_UCONTEXT_H
2#define _M68KNOMMU_UCONTEXT_H
3
4typedef int greg_t;
5#define NGREG 18
6typedef greg_t gregset_t[NGREG];
7
8typedef struct fpregset {
9 int f_pcr;
10 int f_psr;
11 int f_fpiaddr;
12 int f_fpregs[8][3];
13} fpregset_t;
14
15struct mcontext {
16 int version;
17 gregset_t gregs;
18 fpregset_t fpregs;
19};
20
21#define MCONTEXT_VERSION 2
22
23struct ucontext {
24 unsigned long uc_flags;
25 struct ucontext *uc_link;
26 stack_t uc_stack;
27 struct mcontext uc_mcontext;
28 unsigned long uc_filler[80];
29 sigset_t uc_sigmask; /* mask last for extensibility */
30};
31
32#endif
diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
index c640bba3bdf4..019caa740c21 100644
--- a/arch/m68k/include/asm/unaligned.h
+++ b/arch/m68k/include/asm/unaligned.h
@@ -1,5 +1,25 @@
1#ifdef __uClinux__ 1#ifndef _ASM_M68K_UNALIGNED_H
2#include "unaligned_no.h" 2#define _ASM_M68K_UNALIGNED_H
3
4
5#ifdef CONFIG_COLDFIRE
6#include <linux/unaligned/be_struct.h>
7#include <linux/unaligned/le_byteshift.h>
8#include <linux/unaligned/generic.h>
9
10#define get_unaligned __get_unaligned_be
11#define put_unaligned __put_unaligned_be
12
3#else 13#else
4#include "unaligned_mm.h" 14/*
15 * The m68k can do unaligned accesses itself.
16 */
17#include <linux/unaligned/access_ok.h>
18#include <linux/unaligned/generic.h>
19
20#define get_unaligned __get_unaligned_be
21#define put_unaligned __put_unaligned_be
22
5#endif 23#endif
24
25#endif /* _ASM_M68K_UNALIGNED_H */
diff --git a/arch/m68k/include/asm/unaligned_mm.h b/arch/m68k/include/asm/unaligned_mm.h
deleted file mode 100644
index 77698f2dc33c..000000000000
--- a/arch/m68k/include/asm/unaligned_mm.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_M68K_UNALIGNED_H
2#define _ASM_M68K_UNALIGNED_H
3
4/*
5 * The m68k can do unaligned accesses itself.
6 */
7#include <linux/unaligned/access_ok.h>
8#include <linux/unaligned/generic.h>
9
10#define get_unaligned __get_unaligned_be
11#define put_unaligned __put_unaligned_be
12
13#endif /* _ASM_M68K_UNALIGNED_H */
diff --git a/arch/m68k/include/asm/unaligned_no.h b/arch/m68k/include/asm/unaligned_no.h
deleted file mode 100644
index eb1ea4cb9a59..000000000000
--- a/arch/m68k/include/asm/unaligned_no.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _ASM_M68KNOMMU_UNALIGNED_H
2#define _ASM_M68KNOMMU_UNALIGNED_H
3
4
5#ifdef CONFIG_COLDFIRE
6#include <linux/unaligned/be_struct.h>
7#include <linux/unaligned/le_byteshift.h>
8#include <linux/unaligned/generic.h>
9
10#define get_unaligned __get_unaligned_be
11#define put_unaligned __put_unaligned_be
12
13#else
14/*
15 * The m68k can do unaligned accesses itself.
16 */
17#include <linux/unaligned/access_ok.h>
18#include <linux/unaligned/generic.h>
19
20#define get_unaligned __get_unaligned_be
21#define put_unaligned __put_unaligned_be
22
23#endif
24
25#endif /* _ASM_M68KNOMMU_UNALIGNED_H */
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 632ce016014d..ec37fb56c127 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -233,7 +233,7 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
233 parent_tidptr, child_tidptr); 233 parent_tidptr, child_tidptr);
234} 234}
235 235
236int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 236int copy_thread(unsigned long clone_flags, unsigned long usp,
237 unsigned long unused, 237 unsigned long unused,
238 struct task_struct * p, struct pt_regs * regs) 238 struct task_struct * p, struct pt_regs * regs)
239{ 239{
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 7db41594d7b6..54d980795fc4 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -18,6 +18,7 @@
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/rtc.h> 20#include <linux/rtc.h>
21#include <linux/platform_device.h>
21 22
22#include <asm/machdep.h> 23#include <asm/machdep.h>
23#include <asm/io.h> 24#include <asm/io.h>
@@ -159,3 +160,20 @@ int do_settimeofday(struct timespec *tv)
159} 160}
160 161
161EXPORT_SYMBOL(do_settimeofday); 162EXPORT_SYMBOL(do_settimeofday);
163
164
165static int __init rtc_init(void)
166{
167 struct platform_device *pdev;
168
169 if (!mach_hwclk)
170 return -ENODEV;
171
172 pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
173 if (IS_ERR(pdev))
174 return PTR_ERR(pdev);
175
176 return 0;
177}
178
179module_init(rtc_init);
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index fd0fb303d885..ce404bc9ccbd 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -88,18 +88,18 @@ export PLATFORM BOARD MODEL CPUCLASS
88# 88#
89# Some CFLAG additions based on specific CPU type. 89# Some CFLAG additions based on specific CPU type.
90# 90#
91cflags-$(CONFIG_M5206) := -m5200 91cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200)
92cflags-$(CONFIG_M5206e) := -m5200 92cflags-$(CONFIG_M5206e) := $(call cc-option,-m5206e,-m5200)
93cflags-$(CONFIG_M520x) := -m5307 93cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200)
94cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) 94cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307)
95cflags-$(CONFIG_M5249) := -m5200 95cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200)
96cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) 96cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307)
97cflags-$(CONFIG_M5272) := -m5307 97cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5271,-m5200)
98cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) 98cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307)
99cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) 99cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307)
100cflags-$(CONFIG_M5307) := -m5307 100cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200)
101cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) 101cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307)
102cflags-$(CONFIG_M5407) := -m5200 102cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200)
103cflags-$(CONFIG_M68328) := -m68000 103cflags-$(CONFIG_M68328) := -m68000
104cflags-$(CONFIG_M68EZ328) := -m68000 104cflags-$(CONFIG_M68EZ328) := -m68000
105cflags-$(CONFIG_M68VZ328) := -m68000 105cflags-$(CONFIG_M68VZ328) := -m68000
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c
index e10eafc52789..936125806638 100644
--- a/arch/m68knommu/kernel/dma.c
+++ b/arch/m68knommu/kernel/dma.c
@@ -9,10 +9,11 @@
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 <linux/device.h>
12#include <linux/dma-mapping.h>
12#include <asm/io.h> 13#include <asm/io.h>
13 14
14void *dma_alloc_coherent(struct device *dev, size_t size, 15void *dma_alloc_coherent(struct device *dev, size_t size,
15 dma_addr_t *dma_handle, int gfp) 16 dma_addr_t *dma_handle, gfp_t gfp)
16{ 17{
17 void *ret; 18 void *ret;
18 /* ignore region specifiers */ 19 /* ignore region specifiers */
@@ -34,3 +35,8 @@ void dma_free_coherent(struct device *dev, size_t size,
34{ 35{
35 free_pages((unsigned long)vaddr, get_order(size)); 36 free_pages((unsigned long)vaddr, get_order(size));
36} 37}
38
39void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir)
40{
41}
42
diff --git a/arch/m68knommu/kernel/irq.c b/arch/m68knommu/kernel/irq.c
index bba1bb48a21f..56e0f4c55a67 100644
--- a/arch/m68knommu/kernel/irq.c
+++ b/arch/m68knommu/kernel/irq.c
@@ -23,7 +23,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
23 struct pt_regs *oldregs = set_irq_regs(regs); 23 struct pt_regs *oldregs = set_irq_regs(regs);
24 24
25 irq_enter(); 25 irq_enter();
26 __do_IRQ(irq); 26 generic_handle_irq(irq);
27 irq_exit(); 27 irq_exit();
28 28
29 set_irq_regs(oldregs); 29 set_irq_regs(oldregs);
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 3f2d7745f31e..1e96c6eb6312 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -199,7 +199,7 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
199 return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); 199 return do_fork(clone_flags, newsp, regs, 0, NULL, NULL);
200} 200}
201 201
202int copy_thread(int nr, unsigned long clone_flags, 202int copy_thread(unsigned long clone_flags,
203 unsigned long usp, unsigned long topstk, 203 unsigned long usp, unsigned long topstk,
204 struct task_struct * p, struct pt_regs * regs) 204 struct task_struct * p, struct pt_regs * regs)
205{ 205{
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
index 3bf249c53e41..7befc0c357e0 100644
--- a/arch/m68knommu/mm/init.c
+++ b/arch/m68knommu/mm/init.c
@@ -111,11 +111,7 @@ void __init paging_init(void)
111 { 111 {
112 unsigned long zones_size[MAX_NR_ZONES] = {0, }; 112 unsigned long zones_size[MAX_NR_ZONES] = {0, };
113 113
114 zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; 114 zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT;
115 zones_size[ZONE_NORMAL] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT;
116#ifdef CONFIG_HIGHMEM
117 zones_size[ZONE_HIGHMEM] = 0;
118#endif
119 free_area_init(zones_size); 115 free_area_init(zones_size);
120 } 116 }
121} 117}
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index d299f7b8768a..9eab19d01eb1 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -32,7 +32,8 @@ static struct mcf_platform_uart m5249_uart_platform[] = {
32 { 32 {
33 .mapbase = MCF_MBAR + MCFUART_BASE2, 33 .mapbase = MCF_MBAR + MCFUART_BASE2,
34 .irq = 74, 34 .irq = 74,
35 } 35 },
36 { },
36}; 37};
37 38
38static struct platform_device m5249_uart = { 39static struct platform_device m5249_uart = {
@@ -50,12 +51,12 @@ static struct platform_device *m5249_devices[] __initdata = {
50static void __init m5249_uart_init_line(int line, int irq) 51static void __init m5249_uart_init_line(int line, int irq)
51{ 52{
52 if (line == 0) { 53 if (line == 0) {
53 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 54 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
54 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 55 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
55 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 56 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1);
56 } else if (line == 1) { 57 } else if (line == 1) {
57 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 58 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
58 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 59 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
59 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 60 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2);
60 } 61 }
61} 62}
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index 724faf05852a..44803bf70a6e 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -65,12 +65,12 @@ static struct platform_device *m5307_devices[] __initdata = {
65static void __init m5307_uart_init_line(int line, int irq) 65static void __init m5307_uart_init_line(int line, int irq)
66{ 66{
67 if (line == 0) { 67 if (line == 0) {
68 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 68 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
69 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 69 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
70 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 70 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1);
71 } else if (line == 1) { 71 } else if (line == 1) {
72 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 72 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
73 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 73 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
74 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 74 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2);
75 } 75 }
76} 76}
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 648b8b778211..0ee8c1a200c8 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -56,12 +56,12 @@ static struct platform_device *m5407_devices[] __initdata = {
56static void __init m5407_uart_init_line(int line, int irq) 56static void __init m5407_uart_init_line(int line, int irq)
57{ 57{
58 if (line == 0) { 58 if (line == 0) {
59 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 59 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
60 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 60 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
61 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 61 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1);
62 } else if (line == 1) { 62 } else if (line == 1) {
63 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 63 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
64 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 64 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
65 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 65 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2);
66 } 66 }
67} 67}
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile
index 4f416a91a829..1bcb9372353f 100644
--- a/arch/m68knommu/platform/coldfire/Makefile
+++ b/arch/m68knommu/platform/coldfire/Makefile
@@ -14,7 +14,7 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o 17obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o
18obj-$(CONFIG_M5206) += timers.o 18obj-$(CONFIG_M5206) += timers.o
19obj-$(CONFIG_M5206e) += timers.o 19obj-$(CONFIG_M5206e) += timers.o
20obj-$(CONFIG_M520x) += pit.o 20obj-$(CONFIG_M520x) += pit.o
diff --git a/arch/m68knommu/platform/coldfire/clk.c b/arch/m68knommu/platform/coldfire/clk.c
new file mode 100644
index 000000000000..7cdbf445b28f
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/clk.c
@@ -0,0 +1,40 @@
1/***************************************************************************/
2
3/*
4 * clk.c -- general ColdFire CPU kernel clk handling
5 *
6 * Copyright (C) 2009, Greg Ungerer (gerg@snapgear.com)
7 */
8
9/***************************************************************************/
10
11#include <linux/kernel.h>
12#include <linux/clk.h>
13#include <asm/coldfire.h>
14
15/***************************************************************************/
16
17struct clk *clk_get(struct device *dev, const char *id)
18{
19 return NULL;
20}
21
22int clk_enable(struct clk *clk)
23{
24 return 0;
25}
26
27void clk_disable(struct clk *clk)
28{
29}
30
31void clk_put(struct clk *clk)
32{
33}
34
35unsigned long clk_get_rate(struct clk *clk)
36{
37 return MCF_CLK;
38}
39
40/***************************************************************************/
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 206cb7953b0c..998e5db8cc0f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -77,7 +77,6 @@ config MIPS_COBALT
77 select SYS_SUPPORTS_32BIT_KERNEL 77 select SYS_SUPPORTS_32BIT_KERNEL
78 select SYS_SUPPORTS_64BIT_KERNEL 78 select SYS_SUPPORTS_64BIT_KERNEL
79 select SYS_SUPPORTS_LITTLE_ENDIAN 79 select SYS_SUPPORTS_LITTLE_ENDIAN
80 select GENERIC_HARDIRQS_NO__DO_IRQ
81 80
82config MACH_DECSTATION 81config MACH_DECSTATION
83 bool "DECstations" 82 bool "DECstations"
@@ -132,11 +131,10 @@ config MACH_JAZZ
132 select SYS_SUPPORTS_32BIT_KERNEL 131 select SYS_SUPPORTS_32BIT_KERNEL
133 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 132 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
134 select SYS_SUPPORTS_100HZ 133 select SYS_SUPPORTS_100HZ
135 select GENERIC_HARDIRQS_NO__DO_IRQ
136 help 134 help
137 This a family of machines based on the MIPS R4030 chipset which was 135 This a family of machines based on the MIPS R4030 chipset which was
138 used by several vendors to build RISC/os and Windows NT workstations. 136 used by several vendors to build RISC/os and Windows NT workstations.
139 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and 137 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millennium and
140 Olivetti M700-10 workstations. 138 Olivetti M700-10 workstations.
141 139
142config LASAT 140config LASAT
@@ -154,7 +152,6 @@ config LASAT
154 select SYS_SUPPORTS_32BIT_KERNEL 152 select SYS_SUPPORTS_32BIT_KERNEL
155 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN 153 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
156 select SYS_SUPPORTS_LITTLE_ENDIAN 154 select SYS_SUPPORTS_LITTLE_ENDIAN
157 select GENERIC_HARDIRQS_NO__DO_IRQ
158 155
159config LEMOTE_FULONG 156config LEMOTE_FULONG
160 bool "Lemote Fulong mini-PC" 157 bool "Lemote Fulong mini-PC"
@@ -175,7 +172,6 @@ config LEMOTE_FULONG
175 select SYS_SUPPORTS_LITTLE_ENDIAN 172 select SYS_SUPPORTS_LITTLE_ENDIAN
176 select SYS_SUPPORTS_HIGHMEM 173 select SYS_SUPPORTS_HIGHMEM
177 select SYS_HAS_EARLY_PRINTK 174 select SYS_HAS_EARLY_PRINTK
178 select GENERIC_HARDIRQS_NO__DO_IRQ
179 select GENERIC_ISA_DMA_SUPPORT_BROKEN 175 select GENERIC_ISA_DMA_SUPPORT_BROKEN
180 select CPU_HAS_WB 176 select CPU_HAS_WB
181 help 177 help
@@ -250,7 +246,6 @@ config MACH_VR41XX
250 select CEVT_R4K 246 select CEVT_R4K
251 select CSRC_R4K 247 select CSRC_R4K
252 select SYS_HAS_CPU_VR41XX 248 select SYS_HAS_CPU_VR41XX
253 select GENERIC_HARDIRQS_NO__DO_IRQ
254 249
255config NXP_STB220 250config NXP_STB220
256 bool "NXP STB220 board" 251 bool "NXP STB220 board"
@@ -364,7 +359,6 @@ config SGI_IP27
364 select SYS_SUPPORTS_BIG_ENDIAN 359 select SYS_SUPPORTS_BIG_ENDIAN
365 select SYS_SUPPORTS_NUMA 360 select SYS_SUPPORTS_NUMA
366 select SYS_SUPPORTS_SMP 361 select SYS_SUPPORTS_SMP
367 select GENERIC_HARDIRQS_NO__DO_IRQ
368 help 362 help
369 This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics 363 This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
370 workstations. To compile a Linux kernel that runs on these, say Y 364 workstations. To compile a Linux kernel that runs on these, say Y
@@ -563,7 +557,6 @@ config MIKROTIK_RB532
563 select CEVT_R4K 557 select CEVT_R4K
564 select CSRC_R4K 558 select CSRC_R4K
565 select DMA_NONCOHERENT 559 select DMA_NONCOHERENT
566 select GENERIC_HARDIRQS_NO__DO_IRQ
567 select HW_HAS_PCI 560 select HW_HAS_PCI
568 select IRQ_CPU 561 select IRQ_CPU
569 select SYS_HAS_CPU_MIPS32_R1 562 select SYS_HAS_CPU_MIPS32_R1
@@ -700,8 +693,7 @@ config SCHED_OMIT_FRAME_POINTER
700 default y 693 default y
701 694
702config GENERIC_HARDIRQS_NO__DO_IRQ 695config GENERIC_HARDIRQS_NO__DO_IRQ
703 bool 696 def_bool y
704 default n
705 697
706# 698#
707# Select some configuration options automatically based on user selections. 699# Select some configuration options automatically based on user selections.
@@ -920,7 +912,6 @@ config SOC_PNX833X
920 select SYS_SUPPORTS_32BIT_KERNEL 912 select SYS_SUPPORTS_32BIT_KERNEL
921 select SYS_SUPPORTS_LITTLE_ENDIAN 913 select SYS_SUPPORTS_LITTLE_ENDIAN
922 select SYS_SUPPORTS_BIG_ENDIAN 914 select SYS_SUPPORTS_BIG_ENDIAN
923 select GENERIC_HARDIRQS_NO__DO_IRQ
924 select GENERIC_GPIO 915 select GENERIC_GPIO
925 select CPU_MIPSR2_IRQ_VI 916 select CPU_MIPSR2_IRQ_VI
926 917
@@ -939,7 +930,6 @@ config SOC_PNX8550
939 select SYS_HAS_CPU_MIPS32_R1 930 select SYS_HAS_CPU_MIPS32_R1
940 select SYS_HAS_EARLY_PRINTK 931 select SYS_HAS_EARLY_PRINTK
941 select SYS_SUPPORTS_32BIT_KERNEL 932 select SYS_SUPPORTS_32BIT_KERNEL
942 select GENERIC_HARDIRQS_NO__DO_IRQ
943 select GENERIC_GPIO 933 select GENERIC_GPIO
944 934
945config SWAP_IO_SPACE 935config SWAP_IO_SPACE
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 22dab2e14348..8d544c7c9fe9 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -720,11 +720,17 @@ ifdef CONFIG_MIPS32_O32
720 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32" 720 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
721endif 721endif
722 722
723install:
724 $(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
725 $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
726 $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
727
723archclean: 728archclean:
724 @$(MAKE) $(clean)=arch/mips/boot 729 @$(MAKE) $(clean)=arch/mips/boot
725 @$(MAKE) $(clean)=arch/mips/lasat 730 @$(MAKE) $(clean)=arch/mips/lasat
726 731
727define archhelp 732define archhelp
733 echo ' install - install kernel into $(INSTALL_PATH)'
728 echo ' vmlinux.ecoff - ECOFF boot image' 734 echo ' vmlinux.ecoff - ECOFF boot image'
729 echo ' vmlinux.bin - Raw binary boot image' 735 echo ' vmlinux.bin - Raw binary boot image'
730 echo ' vmlinux.srec - SREC boot image' 736 echo ' vmlinux.srec - SREC boot image'
diff --git a/arch/mips/alchemy/Kconfig b/arch/mips/alchemy/Kconfig
index 7f8ef13d0014..8128aebfb155 100644
--- a/arch/mips/alchemy/Kconfig
+++ b/arch/mips/alchemy/Kconfig
@@ -134,4 +134,4 @@ config SOC_AU1X00
134 select SYS_HAS_CPU_MIPS32_R1 134 select SYS_HAS_CPU_MIPS32_R1
135 select SYS_SUPPORTS_32BIT_KERNEL 135 select SYS_SUPPORTS_32BIT_KERNEL
136 select SYS_SUPPORTS_APM_EMULATION 136 select SYS_SUPPORTS_APM_EMULATION
137 select GENERIC_HARDIRQS_NO__DO_IRQ 137 select ARCH_REQUIRE_GPIOLIB
diff --git a/arch/mips/alchemy/common/gpio.c b/arch/mips/alchemy/common/gpio.c
index e660ddd611c4..91a9c4436c39 100644
--- a/arch/mips/alchemy/common/gpio.c
+++ b/arch/mips/alchemy/common/gpio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007, OpenWrt.org, Florian Fainelli <florian@openwrt.org> 2 * Copyright (C) 2007-2009, OpenWrt.org, Florian Fainelli <florian@openwrt.org>
3 * Architecture specific GPIO support 3 * Architecture specific GPIO support
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
@@ -27,122 +27,175 @@
27 * others have a second one : GPIO2 27 * others have a second one : GPIO2
28 */ 28 */
29 29
30#include <linux/kernel.h>
30#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/types.h>
33#include <linux/platform_device.h>
34#include <linux/gpio.h>
31 35
32#include <asm/mach-au1x00/au1000.h> 36#include <asm/mach-au1x00/au1000.h>
33#include <asm/gpio.h> 37#include <asm/gpio.h>
34 38
35#define gpio1 sys 39struct au1000_gpio_chip {
36#if !defined(CONFIG_SOC_AU1000) 40 struct gpio_chip chip;
37 41 void __iomem *regbase;
38static struct au1x00_gpio2 *const gpio2 = (struct au1x00_gpio2 *) GPIO2_BASE; 42};
39#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
40 43
41static int au1xxx_gpio2_read(unsigned gpio) 44#if !defined(CONFIG_SOC_AU1000)
45static int au1000_gpio2_get(struct gpio_chip *chip, unsigned offset)
42{ 46{
43 gpio -= AU1XXX_GPIO_BASE; 47 u32 mask = 1 << offset;
44 return ((gpio2->pinstate >> gpio) & 0x01); 48 struct au1000_gpio_chip *gpch;
49
50 gpch = container_of(chip, struct au1000_gpio_chip, chip);
51 return readl(gpch->regbase + AU1000_GPIO2_ST) & mask;
45} 52}
46 53
47static void au1xxx_gpio2_write(unsigned gpio, int value) 54static void au1000_gpio2_set(struct gpio_chip *chip,
55 unsigned offset, int value)
48{ 56{
49 gpio -= AU1XXX_GPIO_BASE; 57 u32 mask = ((GPIO2_OUT_EN_MASK << offset) | (!!value << offset));
58 struct au1000_gpio_chip *gpch;
59 unsigned long flags;
60
61 gpch = container_of(chip, struct au1000_gpio_chip, chip);
50 62
51 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | ((!!value) << gpio); 63 local_irq_save(flags);
64 writel(mask, gpch->regbase + AU1000_GPIO2_OUT);
65 local_irq_restore(flags);
52} 66}
53 67
54static int au1xxx_gpio2_direction_input(unsigned gpio) 68static int au1000_gpio2_direction_input(struct gpio_chip *chip, unsigned offset)
55{ 69{
56 gpio -= AU1XXX_GPIO_BASE; 70 u32 mask = 1 << offset;
57 gpio2->dir &= ~(0x01 << gpio); 71 u32 tmp;
72 struct au1000_gpio_chip *gpch;
73 unsigned long flags;
74
75 gpch = container_of(chip, struct au1000_gpio_chip, chip);
76
77 local_irq_save(flags);
78 tmp = readl(gpch->regbase + AU1000_GPIO2_DIR);
79 tmp &= ~mask;
80 writel(tmp, gpch->regbase + AU1000_GPIO2_DIR);
81 local_irq_restore(flags);
82
58 return 0; 83 return 0;
59} 84}
60 85
61static int au1xxx_gpio2_direction_output(unsigned gpio, int value) 86static int au1000_gpio2_direction_output(struct gpio_chip *chip,
87 unsigned offset, int value)
62{ 88{
63 gpio -= AU1XXX_GPIO_BASE; 89 u32 mask = 1 << offset;
64 gpio2->dir |= 0x01 << gpio; 90 u32 out_mask = ((GPIO2_OUT_EN_MASK << offset) | (!!value << offset));
65 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | ((!!value) << gpio); 91 u32 tmp;
92 struct au1000_gpio_chip *gpch;
93 unsigned long flags;
94
95 gpch = container_of(chip, struct au1000_gpio_chip, chip);
96
97 local_irq_save(flags);
98 tmp = readl(gpch->regbase + AU1000_GPIO2_DIR);
99 tmp |= mask;
100 writel(tmp, gpch->regbase + AU1000_GPIO2_DIR);
101 writel(out_mask, gpch->regbase + AU1000_GPIO2_OUT);
102 local_irq_restore(flags);
103
66 return 0; 104 return 0;
67} 105}
68
69#endif /* !defined(CONFIG_SOC_AU1000) */ 106#endif /* !defined(CONFIG_SOC_AU1000) */
70 107
71static int au1xxx_gpio1_read(unsigned gpio) 108static int au1000_gpio1_get(struct gpio_chip *chip, unsigned offset)
72{ 109{
73 return (gpio1->pinstaterd >> gpio) & 0x01; 110 u32 mask = 1 << offset;
111 struct au1000_gpio_chip *gpch;
112
113 gpch = container_of(chip, struct au1000_gpio_chip, chip);
114 return readl(gpch->regbase + AU1000_GPIO1_ST) & mask;
74} 115}
75 116
76static void au1xxx_gpio1_write(unsigned gpio, int value) 117static void au1000_gpio1_set(struct gpio_chip *chip,
118 unsigned offset, int value)
77{ 119{
120 u32 mask = 1 << offset;
121 u32 reg_offset;
122 struct au1000_gpio_chip *gpch;
123 unsigned long flags;
124
125 gpch = container_of(chip, struct au1000_gpio_chip, chip);
126
78 if (value) 127 if (value)
79 gpio1->outputset = (0x01 << gpio); 128 reg_offset = AU1000_GPIO1_OUT;
80 else 129 else
81 /* Output a zero */ 130 reg_offset = AU1000_GPIO1_CLR;
82 gpio1->outputclr = (0x01 << gpio);
83}
84 131
85static int au1xxx_gpio1_direction_input(unsigned gpio) 132 local_irq_save(flags);
86{ 133 writel(mask, gpch->regbase + reg_offset);
87 gpio1->pininputen = (0x01 << gpio); 134 local_irq_restore(flags);
88 return 0;
89} 135}
90 136
91static int au1xxx_gpio1_direction_output(unsigned gpio, int value) 137static int au1000_gpio1_direction_input(struct gpio_chip *chip, unsigned offset)
92{ 138{
93 gpio1->trioutclr = (0x01 & gpio); 139 u32 mask = 1 << offset;
94 au1xxx_gpio1_write(gpio, value); 140 struct au1000_gpio_chip *gpch;
141
142 gpch = container_of(chip, struct au1000_gpio_chip, chip);
143 writel(mask, gpch->regbase + AU1000_GPIO1_ST);
144
95 return 0; 145 return 0;
96} 146}
97 147
98int au1xxx_gpio_get_value(unsigned gpio) 148static int au1000_gpio1_direction_output(struct gpio_chip *chip,
149 unsigned offset, int value)
99{ 150{
100 if (gpio >= AU1XXX_GPIO_BASE) 151 u32 mask = 1 << offset;
101#if defined(CONFIG_SOC_AU1000) 152 struct au1000_gpio_chip *gpch;
102 return 0;
103#else
104 return au1xxx_gpio2_read(gpio);
105#endif
106 else
107 return au1xxx_gpio1_read(gpio);
108}
109EXPORT_SYMBOL(au1xxx_gpio_get_value);
110 153
111void au1xxx_gpio_set_value(unsigned gpio, int value) 154 gpch = container_of(chip, struct au1000_gpio_chip, chip);
112{
113 if (gpio >= AU1XXX_GPIO_BASE)
114#if defined(CONFIG_SOC_AU1000)
115 ;
116#else
117 au1xxx_gpio2_write(gpio, value);
118#endif
119 else
120 au1xxx_gpio1_write(gpio, value);
121}
122EXPORT_SYMBOL(au1xxx_gpio_set_value);
123 155
124int au1xxx_gpio_direction_input(unsigned gpio) 156 writel(mask, gpch->regbase + AU1000_GPIO1_TRI_OUT);
125{ 157 au1000_gpio1_set(chip, offset, value);
126 if (gpio >= AU1XXX_GPIO_BASE)
127#if defined(CONFIG_SOC_AU1000)
128 return -ENODEV;
129#else
130 return au1xxx_gpio2_direction_input(gpio);
131#endif
132 158
133 return au1xxx_gpio1_direction_input(gpio); 159 return 0;
134} 160}
135EXPORT_SYMBOL(au1xxx_gpio_direction_input);
136 161
137int au1xxx_gpio_direction_output(unsigned gpio, int value) 162struct au1000_gpio_chip au1000_gpio_chip[] = {
163 [0] = {
164 .regbase = (void __iomem *)SYS_BASE,
165 .chip = {
166 .label = "au1000-gpio1",
167 .direction_input = au1000_gpio1_direction_input,
168 .direction_output = au1000_gpio1_direction_output,
169 .get = au1000_gpio1_get,
170 .set = au1000_gpio1_set,
171 .base = 0,
172 .ngpio = 32,
173 },
174 },
175#if !defined(CONFIG_SOC_AU1000)
176 [1] = {
177 .regbase = (void __iomem *)GPIO2_BASE,
178 .chip = {
179 .label = "au1000-gpio2",
180 .direction_input = au1000_gpio2_direction_input,
181 .direction_output = au1000_gpio2_direction_output,
182 .get = au1000_gpio2_get,
183 .set = au1000_gpio2_set,
184 .base = AU1XXX_GPIO_BASE,
185 .ngpio = 32,
186 },
187 },
188#endif
189};
190
191static int __init au1000_gpio_init(void)
138{ 192{
139 if (gpio >= AU1XXX_GPIO_BASE) 193 gpiochip_add(&au1000_gpio_chip[0].chip);
140#if defined(CONFIG_SOC_AU1000) 194#if !defined(CONFIG_SOC_AU1000)
141 return -ENODEV; 195 gpiochip_add(&au1000_gpio_chip[1].chip);
142#else
143 return au1xxx_gpio2_direction_output(gpio, value);
144#endif 196#endif
145 197
146 return au1xxx_gpio1_direction_output(gpio, value); 198 return 0;
147} 199}
148EXPORT_SYMBOL(au1xxx_gpio_direction_output); 200arch_initcall(au1000_gpio_init);
201
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 5c76c6448e04..117f99f70649 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -80,14 +80,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
80}; 80};
81 81
82/* The dmamask must be set for OHCI to work */ 82/* The dmamask must be set for OHCI to work */
83static u64 ohci_dmamask = DMA_32BIT_MASK; 83static u64 ohci_dmamask = DMA_BIT_MASK(32);
84 84
85static struct platform_device au1xxx_usb_ohci_device = { 85static struct platform_device au1xxx_usb_ohci_device = {
86 .name = "au1xxx-ohci", 86 .name = "au1xxx-ohci",
87 .id = 0, 87 .id = 0,
88 .dev = { 88 .dev = {
89 .dma_mask = &ohci_dmamask, 89 .dma_mask = &ohci_dmamask,
90 .coherent_dma_mask = DMA_32BIT_MASK, 90 .coherent_dma_mask = DMA_BIT_MASK(32),
91 }, 91 },
92 .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources), 92 .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
93 .resource = au1xxx_usb_ohci_resources, 93 .resource = au1xxx_usb_ohci_resources,
@@ -109,14 +109,14 @@ static struct resource au1100_lcd_resources[] = {
109 } 109 }
110}; 110};
111 111
112static u64 au1100_lcd_dmamask = DMA_32BIT_MASK; 112static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
113 113
114static struct platform_device au1100_lcd_device = { 114static struct platform_device au1100_lcd_device = {
115 .name = "au1100-lcd", 115 .name = "au1100-lcd",
116 .id = 0, 116 .id = 0,
117 .dev = { 117 .dev = {
118 .dma_mask = &au1100_lcd_dmamask, 118 .dma_mask = &au1100_lcd_dmamask,
119 .coherent_dma_mask = DMA_32BIT_MASK, 119 .coherent_dma_mask = DMA_BIT_MASK(32),
120 }, 120 },
121 .num_resources = ARRAY_SIZE(au1100_lcd_resources), 121 .num_resources = ARRAY_SIZE(au1100_lcd_resources),
122 .resource = au1100_lcd_resources, 122 .resource = au1100_lcd_resources,
@@ -138,14 +138,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
138 }, 138 },
139}; 139};
140 140
141static u64 ehci_dmamask = DMA_32BIT_MASK; 141static u64 ehci_dmamask = DMA_BIT_MASK(32);
142 142
143static struct platform_device au1xxx_usb_ehci_device = { 143static struct platform_device au1xxx_usb_ehci_device = {
144 .name = "au1xxx-ehci", 144 .name = "au1xxx-ehci",
145 .id = 0, 145 .id = 0,
146 .dev = { 146 .dev = {
147 .dma_mask = &ehci_dmamask, 147 .dma_mask = &ehci_dmamask,
148 .coherent_dma_mask = DMA_32BIT_MASK, 148 .coherent_dma_mask = DMA_BIT_MASK(32),
149 }, 149 },
150 .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources), 150 .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
151 .resource = au1xxx_usb_ehci_resources, 151 .resource = au1xxx_usb_ehci_resources,
@@ -165,14 +165,14 @@ static struct resource au1xxx_usb_gdt_resources[] = {
165 }, 165 },
166}; 166};
167 167
168static u64 udc_dmamask = DMA_32BIT_MASK; 168static u64 udc_dmamask = DMA_BIT_MASK(32);
169 169
170static struct platform_device au1xxx_usb_gdt_device = { 170static struct platform_device au1xxx_usb_gdt_device = {
171 .name = "au1xxx-udc", 171 .name = "au1xxx-udc",
172 .id = 0, 172 .id = 0,
173 .dev = { 173 .dev = {
174 .dma_mask = &udc_dmamask, 174 .dma_mask = &udc_dmamask,
175 .coherent_dma_mask = DMA_32BIT_MASK, 175 .coherent_dma_mask = DMA_BIT_MASK(32),
176 }, 176 },
177 .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources), 177 .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
178 .resource = au1xxx_usb_gdt_resources, 178 .resource = au1xxx_usb_gdt_resources,
@@ -192,14 +192,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
192 }, 192 },
193}; 193};
194 194
195static u64 uoc_dmamask = DMA_32BIT_MASK; 195static u64 uoc_dmamask = DMA_BIT_MASK(32);
196 196
197static struct platform_device au1xxx_usb_otg_device = { 197static struct platform_device au1xxx_usb_otg_device = {
198 .name = "au1xxx-uoc", 198 .name = "au1xxx-uoc",
199 .id = 0, 199 .id = 0,
200 .dev = { 200 .dev = {
201 .dma_mask = &uoc_dmamask, 201 .dma_mask = &uoc_dmamask,
202 .coherent_dma_mask = DMA_32BIT_MASK, 202 .coherent_dma_mask = DMA_BIT_MASK(32),
203 }, 203 },
204 .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources), 204 .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
205 .resource = au1xxx_usb_otg_resources, 205 .resource = au1xxx_usb_otg_resources,
@@ -218,20 +218,20 @@ static struct resource au1200_lcd_resources[] = {
218 } 218 }
219}; 219};
220 220
221static u64 au1200_lcd_dmamask = DMA_32BIT_MASK; 221static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);
222 222
223static struct platform_device au1200_lcd_device = { 223static struct platform_device au1200_lcd_device = {
224 .name = "au1200-lcd", 224 .name = "au1200-lcd",
225 .id = 0, 225 .id = 0,
226 .dev = { 226 .dev = {
227 .dma_mask = &au1200_lcd_dmamask, 227 .dma_mask = &au1200_lcd_dmamask,
228 .coherent_dma_mask = DMA_32BIT_MASK, 228 .coherent_dma_mask = DMA_BIT_MASK(32),
229 }, 229 },
230 .num_resources = ARRAY_SIZE(au1200_lcd_resources), 230 .num_resources = ARRAY_SIZE(au1200_lcd_resources),
231 .resource = au1200_lcd_resources, 231 .resource = au1200_lcd_resources,
232}; 232};
233 233
234static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK; 234static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32);
235 235
236extern struct au1xmmc_platform_data au1xmmc_platdata[2]; 236extern struct au1xmmc_platform_data au1xmmc_platdata[2];
237 237
@@ -263,7 +263,7 @@ static struct platform_device au1200_mmc0_device = {
263 .id = 0, 263 .id = 0,
264 .dev = { 264 .dev = {
265 .dma_mask = &au1xxx_mmc_dmamask, 265 .dma_mask = &au1xxx_mmc_dmamask,
266 .coherent_dma_mask = DMA_32BIT_MASK, 266 .coherent_dma_mask = DMA_BIT_MASK(32),
267 .platform_data = &au1xmmc_platdata[0], 267 .platform_data = &au1xmmc_platdata[0],
268 }, 268 },
269 .num_resources = ARRAY_SIZE(au1200_mmc0_resources), 269 .num_resources = ARRAY_SIZE(au1200_mmc0_resources),
@@ -299,7 +299,7 @@ static struct platform_device au1200_mmc1_device = {
299 .id = 1, 299 .id = 1,
300 .dev = { 300 .dev = {
301 .dma_mask = &au1xxx_mmc_dmamask, 301 .dma_mask = &au1xxx_mmc_dmamask,
302 .coherent_dma_mask = DMA_32BIT_MASK, 302 .coherent_dma_mask = DMA_BIT_MASK(32),
303 .platform_data = &au1xmmc_platdata[1], 303 .platform_data = &au1xmmc_platdata[1],
304 }, 304 },
305 .num_resources = ARRAY_SIZE(au1200_mmc1_resources), 305 .num_resources = ARRAY_SIZE(au1200_mmc1_resources),
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c
index 95303297c534..b93dff4a6789 100644
--- a/arch/mips/alchemy/devboards/pb1200/platform.c
+++ b/arch/mips/alchemy/devboards/pb1200/platform.c
@@ -22,6 +22,7 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/smc91x.h>
25 26
26#include <asm/mach-au1x00/au1xxx.h> 27#include <asm/mach-au1x00/au1xxx.h>
27#include <asm/mach-au1x00/au1100_mmc.h> 28#include <asm/mach-au1x00/au1100_mmc.h>
@@ -118,19 +119,25 @@ static struct resource ide_resources[] = {
118 } 119 }
119}; 120};
120 121
121static u64 ide_dmamask = DMA_32BIT_MASK; 122static u64 ide_dmamask = DMA_BIT_MASK(32);
122 123
123static struct platform_device ide_device = { 124static struct platform_device ide_device = {
124 .name = "au1200-ide", 125 .name = "au1200-ide",
125 .id = 0, 126 .id = 0,
126 .dev = { 127 .dev = {
127 .dma_mask = &ide_dmamask, 128 .dma_mask = &ide_dmamask,
128 .coherent_dma_mask = DMA_32BIT_MASK, 129 .coherent_dma_mask = DMA_BIT_MASK(32),
129 }, 130 },
130 .num_resources = ARRAY_SIZE(ide_resources), 131 .num_resources = ARRAY_SIZE(ide_resources),
131 .resource = ide_resources 132 .resource = ide_resources
132}; 133};
133 134
135static struct smc91x_platdata smc_data = {
136 .flags = SMC91X_NOWAIT | SMC91X_USE_16BIT,
137 .leda = RPC_LED_100_10,
138 .ledb = RPC_LED_TX_RX,
139};
140
134static struct resource smc91c111_resources[] = { 141static struct resource smc91c111_resources[] = {
135 [0] = { 142 [0] = {
136 .name = "smc91x-regs", 143 .name = "smc91x-regs",
@@ -146,6 +153,9 @@ static struct resource smc91c111_resources[] = {
146}; 153};
147 154
148static struct platform_device smc91c111_device = { 155static struct platform_device smc91c111_device = {
156 .dev = {
157 .platform_data = &smc_data,
158 },
149 .name = "smc91x", 159 .name = "smc91x",
150 .id = -1, 160 .id = -1,
151 .num_resources = ARRAY_SIZE(smc91c111_resources), 161 .num_resources = ARRAY_SIZE(smc91c111_resources),
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
index 1c2a7faf5881..d6903c3f3d51 100644
--- a/arch/mips/cavium-octeon/Makefile
+++ b/arch/mips/cavium-octeon/Makefile
@@ -14,3 +14,5 @@ obj-y += dma-octeon.o flash_setup.o
14obj-y += octeon-memcpy.o 14obj-y += octeon-memcpy.o
15 15
16obj-$(CONFIG_SMP) += smp.o 16obj-$(CONFIG_SMP) += smp.o
17
18EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c
index 553d36cbcc42..008f657116eb 100644
--- a/arch/mips/cavium-octeon/flash_setup.c
+++ b/arch/mips/cavium-octeon/flash_setup.c
@@ -57,7 +57,7 @@ static int __init flash_init(void)
57 flash_map.bankwidth = 1; 57 flash_map.bankwidth = 1;
58 flash_map.virt = ioremap(flash_map.phys, flash_map.size); 58 flash_map.virt = ioremap(flash_map.phys, flash_map.size);
59 pr_notice("Bootbus flash: Setting flash for %luMB flash at " 59 pr_notice("Bootbus flash: Setting flash for %luMB flash at "
60 "0x%08lx\n", flash_map.size >> 20, flash_map.phys); 60 "0x%08llx\n", flash_map.size >> 20, flash_map.phys);
61 simple_map_init(&flash_map); 61 simple_map_init(&flash_map);
62 mymtd = do_map_probe("cfi_probe", &flash_map); 62 mymtd = do_map_probe("cfi_probe", &flash_map);
63 if (mymtd) { 63 if (mymtd) {
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index fc72984a5dae..1c19af8daa62 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -31,7 +31,7 @@ static void octeon_irq_core_ack(unsigned int irq)
31 31
32static void octeon_irq_core_eoi(unsigned int irq) 32static void octeon_irq_core_eoi(unsigned int irq)
33{ 33{
34 irq_desc_t *desc = irq_desc + irq; 34 struct irq_desc *desc = irq_desc + irq;
35 unsigned int bit = irq - OCTEON_IRQ_SW0; 35 unsigned int bit = irq - OCTEON_IRQ_SW0;
36 /* 36 /*
37 * If an IRQ is being processed while we are disabling it the 37 * If an IRQ is being processed while we are disabling it the
diff --git a/arch/mips/cobalt/irq.c b/arch/mips/cobalt/irq.c
index ac4fb912649d..cb9bf820fe53 100644
--- a/arch/mips/cobalt/irq.c
+++ b/arch/mips/cobalt/irq.c
@@ -47,7 +47,6 @@ asmlinkage void plat_irq_dispatch(void)
47 47
48static struct irqaction cascade = { 48static struct irqaction cascade = {
49 .handler = no_action, 49 .handler = no_action,
50 .mask = CPU_MASK_NONE,
51 .name = "cascade", 50 .name = "cascade",
52}; 51};
53 52
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c
index c2583ecc93cf..43828ae796ec 100644
--- a/arch/mips/emma/markeins/irq.c
+++ b/arch/mips/emma/markeins/irq.c
@@ -80,9 +80,9 @@ void emma2rh_irq_init(void)
80 u32 i; 80 u32 i;
81 81
82 for (i = 0; i < NUM_EMMA2RH_IRQ; i++) 82 for (i = 0; i < NUM_EMMA2RH_IRQ; i++)
83 set_irq_chip_and_handler(EMMA2RH_IRQ_BASE + i, 83 set_irq_chip_and_handler_name(EMMA2RH_IRQ_BASE + i,
84 &emma2rh_irq_controller, 84 &emma2rh_irq_controller,
85 handle_level_irq); 85 handle_level_irq, "level");
86} 86}
87 87
88static void emma2rh_sw_irq_enable(unsigned int irq) 88static void emma2rh_sw_irq_enable(unsigned int irq)
@@ -120,9 +120,9 @@ void emma2rh_sw_irq_init(void)
120 u32 i; 120 u32 i;
121 121
122 for (i = 0; i < NUM_EMMA2RH_IRQ_SW; i++) 122 for (i = 0; i < NUM_EMMA2RH_IRQ_SW; i++)
123 set_irq_chip_and_handler(EMMA2RH_SW_IRQ_BASE + i, 123 set_irq_chip_and_handler_name(EMMA2RH_SW_IRQ_BASE + i,
124 &emma2rh_sw_irq_controller, 124 &emma2rh_sw_irq_controller,
125 handle_level_irq); 125 handle_level_irq, "level");
126} 126}
127 127
128static void emma2rh_gpio_irq_enable(unsigned int irq) 128static void emma2rh_gpio_irq_enable(unsigned int irq)
@@ -149,37 +149,28 @@ static void emma2rh_gpio_irq_disable(unsigned int irq)
149 149
150static void emma2rh_gpio_irq_ack(unsigned int irq) 150static void emma2rh_gpio_irq_ack(unsigned int irq)
151{ 151{
152 u32 reg;
153
154 irq -= EMMA2RH_GPIO_IRQ_BASE; 152 irq -= EMMA2RH_GPIO_IRQ_BASE;
155 emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq)); 153 emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq));
156
157 reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
158 reg &= ~(1 << irq);
159 emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
160} 154}
161 155
162static void emma2rh_gpio_irq_end(unsigned int irq) 156static void emma2rh_gpio_irq_mask_ack(unsigned int irq)
163{ 157{
164 u32 reg; 158 u32 reg;
165 159
166 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { 160 irq -= EMMA2RH_GPIO_IRQ_BASE;
167 161 emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq));
168 irq -= EMMA2RH_GPIO_IRQ_BASE;
169 162
170 reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK); 163 reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
171 reg |= 1 << irq; 164 reg &= ~(1 << irq);
172 emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg); 165 emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
173 }
174} 166}
175 167
176struct irq_chip emma2rh_gpio_irq_controller = { 168struct irq_chip emma2rh_gpio_irq_controller = {
177 .name = "emma2rh_gpio_irq", 169 .name = "emma2rh_gpio_irq",
178 .ack = emma2rh_gpio_irq_ack, 170 .ack = emma2rh_gpio_irq_ack,
179 .mask = emma2rh_gpio_irq_disable, 171 .mask = emma2rh_gpio_irq_disable,
180 .mask_ack = emma2rh_gpio_irq_ack, 172 .mask_ack = emma2rh_gpio_irq_mask_ack,
181 .unmask = emma2rh_gpio_irq_enable, 173 .unmask = emma2rh_gpio_irq_enable,
182 .end = emma2rh_gpio_irq_end,
183}; 174};
184 175
185void emma2rh_gpio_irq_init(void) 176void emma2rh_gpio_irq_init(void)
@@ -187,14 +178,14 @@ void emma2rh_gpio_irq_init(void)
187 u32 i; 178 u32 i;
188 179
189 for (i = 0; i < NUM_EMMA2RH_IRQ_GPIO; i++) 180 for (i = 0; i < NUM_EMMA2RH_IRQ_GPIO; i++)
190 set_irq_chip(EMMA2RH_GPIO_IRQ_BASE + i, 181 set_irq_chip_and_handler_name(EMMA2RH_GPIO_IRQ_BASE + i,
191 &emma2rh_gpio_irq_controller); 182 &emma2rh_gpio_irq_controller,
183 handle_edge_irq, "edge");
192} 184}
193 185
194static struct irqaction irq_cascade = { 186static struct irqaction irq_cascade = {
195 .handler = no_action, 187 .handler = no_action,
196 .flags = 0, 188 .flags = 0,
197 .mask = CPU_MASK_NONE,
198 .name = "cascade", 189 .name = "cascade",
199 .dev_id = NULL, 190 .dev_id = NULL,
200 .next = NULL, 191 .next = NULL,
@@ -213,8 +204,7 @@ void emma2rh_irq_dispatch(void)
213 emma2rh_in32(EMMA2RH_BHIF_INT_EN_0); 204 emma2rh_in32(EMMA2RH_BHIF_INT_EN_0);
214 205
215#ifdef EMMA2RH_SW_CASCADE 206#ifdef EMMA2RH_SW_CASCADE
216 if (intStatus & 207 if (intStatus & (1UL << EMMA2RH_SW_CASCADE)) {
217 (1 << ((EMMA2RH_SW_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
218 u32 swIntStatus; 208 u32 swIntStatus;
219 swIntStatus = emma2rh_in32(EMMA2RH_BHIF_SW_INT) 209 swIntStatus = emma2rh_in32(EMMA2RH_BHIF_SW_INT)
220 & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN); 210 & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
@@ -225,6 +215,8 @@ void emma2rh_irq_dispatch(void)
225 } 215 }
226 } 216 }
227 } 217 }
218 /* Skip S/W interrupt */
219 intStatus &= ~(1UL << EMMA2RH_SW_CASCADE);
228#endif 220#endif
229 221
230 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { 222 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
@@ -238,8 +230,7 @@ void emma2rh_irq_dispatch(void)
238 emma2rh_in32(EMMA2RH_BHIF_INT_EN_1); 230 emma2rh_in32(EMMA2RH_BHIF_INT_EN_1);
239 231
240#ifdef EMMA2RH_GPIO_CASCADE 232#ifdef EMMA2RH_GPIO_CASCADE
241 if (intStatus & 233 if (intStatus & (1UL << (EMMA2RH_GPIO_CASCADE % 32))) {
242 (1 << ((EMMA2RH_GPIO_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
243 u32 gpioIntStatus; 234 u32 gpioIntStatus;
244 gpioIntStatus = emma2rh_in32(EMMA2RH_GPIO_INT_ST) 235 gpioIntStatus = emma2rh_in32(EMMA2RH_GPIO_INT_ST)
245 & emma2rh_in32(EMMA2RH_GPIO_INT_MASK); 236 & emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
@@ -250,6 +241,8 @@ void emma2rh_irq_dispatch(void)
250 } 241 }
251 } 242 }
252 } 243 }
244 /* Skip GPIO interrupt */
245 intStatus &= ~(1UL << (EMMA2RH_GPIO_CASCADE % 32));
253#endif 246#endif
254 247
255 for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) { 248 for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) {
diff --git a/arch/mips/emma/markeins/platform.c b/arch/mips/emma/markeins/platform.c
index d5f47e4f0d18..80ae12ef87db 100644
--- a/arch/mips/emma/markeins/platform.c
+++ b/arch/mips/emma/markeins/platform.c
@@ -110,6 +110,7 @@ struct platform_device i2c_emma_devices[] = {
110static struct plat_serial8250_port platform_serial_ports[] = { 110static struct plat_serial8250_port platform_serial_ports[] = {
111 [0] = { 111 [0] = {
112 .membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3), 112 .membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3),
113 .mapbase = EMMA2RH_PFUR0_BASE + 3,
113 .irq = EMMA2RH_IRQ_PFUR0, 114 .irq = EMMA2RH_IRQ_PFUR0,
114 .uartclk = EMMA2RH_SERIAL_CLOCK, 115 .uartclk = EMMA2RH_SERIAL_CLOCK,
115 .regshift = 4, 116 .regshift = 4,
@@ -117,6 +118,7 @@ static struct plat_serial8250_port platform_serial_ports[] = {
117 .flags = EMMA2RH_SERIAL_FLAGS, 118 .flags = EMMA2RH_SERIAL_FLAGS,
118 }, [1] = { 119 }, [1] = {
119 .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3), 120 .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3),
121 .mapbase = EMMA2RH_PFUR1_BASE + 3,
120 .irq = EMMA2RH_IRQ_PFUR1, 122 .irq = EMMA2RH_IRQ_PFUR1,
121 .uartclk = EMMA2RH_SERIAL_CLOCK, 123 .uartclk = EMMA2RH_SERIAL_CLOCK,
122 .regshift = 4, 124 .regshift = 4,
@@ -124,6 +126,7 @@ static struct plat_serial8250_port platform_serial_ports[] = {
124 .flags = EMMA2RH_SERIAL_FLAGS, 126 .flags = EMMA2RH_SERIAL_FLAGS,
125 }, [2] = { 127 }, [2] = {
126 .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3), 128 .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3),
129 .mapbase = EMMA2RH_PFUR2_BASE + 3,
127 .irq = EMMA2RH_IRQ_PFUR2, 130 .irq = EMMA2RH_IRQ_PFUR2,
128 .uartclk = EMMA2RH_SERIAL_CLOCK, 131 .uartclk = EMMA2RH_SERIAL_CLOCK,
129 .regshift = 4, 132 .regshift = 4,
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index c018727c7ddc..3bdc0e3d89cc 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -209,8 +209,7 @@ enum cpu_type_enum {
209 * MIPS32 class processors 209 * MIPS32 class processors
210 */ 210 */
211 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, 211 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
212 CPU_AU1000, CPU_AU1100, CPU_AU1200, CPU_AU1210, CPU_AU1250, CPU_AU1500, 212 CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
213 CPU_AU1550, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
214 213
215 /* 214 /*
216 * MIPS64 class processors 215 * MIPS64 class processors
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/mips/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h
index 134e1fc8f4d6..a12d971db4f9 100644
--- a/arch/mips/include/asm/hazards.h
+++ b/arch/mips/include/asm/hazards.h
@@ -87,7 +87,7 @@ do { \
87 : "=r" (tmp)); \ 87 : "=r" (tmp)); \
88} while (0) 88} while (0)
89 89
90#elif defined(CONFIG_CPU_MIPSR1) 90#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MACH_ALCHEMY)
91 91
92/* 92/*
93 * These are slightly complicated by the fact that we guarantee R1 kernels to 93 * These are slightly complicated by the fact that we guarantee R1 kernels to
@@ -139,7 +139,7 @@ do { \
139} while (0) 139} while (0)
140 140
141#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \ 141#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
142 defined(CONFIG_CPU_R5500) 142 defined(CONFIG_CPU_R5500) || defined(CONFIG_MACH_ALCHEMY)
143 143
144/* 144/*
145 * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. 145 * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
diff --git a/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
new file mode 100644
index 000000000000..d5df0cab9b87
--- /dev/null
+++ b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
@@ -0,0 +1,49 @@
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
7#ifndef __ASM_MACH_AU1X00_CPU_FEATURE_OVERRIDES_H
8#define __ASM_MACH_AU1X00_CPU_FEATURE_OVERRIDES_H
9
10#define cpu_has_tlb 1
11#define cpu_has_4kex 1
12#define cpu_has_3k_cache 0
13#define cpu_has_4k_cache 1
14#define cpu_has_tx39_cache 0
15#define cpu_has_fpu 0
16#define cpu_has_counter 1
17#define cpu_has_watch 1
18#define cpu_has_divec 1
19#define cpu_has_vce 0
20#define cpu_has_cache_cdex_p 0
21#define cpu_has_cache_cdex_s 0
22#define cpu_has_mcheck 1
23#define cpu_has_ejtag 1
24#define cpu_has_llsc 1
25#define cpu_has_mips16 0
26#define cpu_has_mdmx 0
27#define cpu_has_mips3d 0
28#define cpu_has_smartmips 0
29#define cpu_has_vtag_icache 0
30#define cpu_has_dc_aliases 0
31#define cpu_has_ic_fills_f_dc 1
32#define cpu_has_mips32r1 1
33#define cpu_has_mips32r2 0
34#define cpu_has_mips64r1 0
35#define cpu_has_mips64r2 0
36#define cpu_has_dsp 0
37#define cpu_has_mipsmt 0
38#define cpu_has_userlocal 0
39#define cpu_has_nofpuex 0
40#define cpu_has_64bits 0
41#define cpu_has_64bit_zero_reg 0
42#define cpu_has_vint 0
43#define cpu_has_veic 0
44#define cpu_has_inclusive_pcaches 0
45
46#define cpu_dcache_line_size() 32
47#define cpu_icache_line_size() 32
48
49#endif /* __ASM_MACH_AU1X00_CPU_FEATURE_OVERRIDES_H */
diff --git a/arch/mips/include/asm/mach-au1x00/gpio.h b/arch/mips/include/asm/mach-au1x00/gpio.h
index 2dc61e009a08..34d9b7279024 100644
--- a/arch/mips/include/asm/mach-au1x00/gpio.h
+++ b/arch/mips/include/asm/mach-au1x00/gpio.h
@@ -5,65 +5,29 @@
5 5
6#define AU1XXX_GPIO_BASE 200 6#define AU1XXX_GPIO_BASE 200
7 7
8struct au1x00_gpio2 { 8/* GPIO bank 1 offsets */
9 u32 dir; 9#define AU1000_GPIO1_TRI_OUT 0x0100
10 u32 reserved; 10#define AU1000_GPIO1_OUT 0x0108
11 u32 output; 11#define AU1000_GPIO1_ST 0x0110
12 u32 pinstate; 12#define AU1000_GPIO1_CLR 0x010C
13 u32 inten;
14 u32 enable;
15};
16 13
17extern int au1xxx_gpio_get_value(unsigned gpio); 14/* GPIO bank 2 offsets */
18extern void au1xxx_gpio_set_value(unsigned gpio, int value); 15#define AU1000_GPIO2_DIR 0x00
19extern int au1xxx_gpio_direction_input(unsigned gpio); 16#define AU1000_GPIO2_RSVD 0x04
20extern int au1xxx_gpio_direction_output(unsigned gpio, int value); 17#define AU1000_GPIO2_OUT 0x08
18#define AU1000_GPIO2_ST 0x0C
19#define AU1000_GPIO2_INT 0x10
20#define AU1000_GPIO2_EN 0x14
21 21
22#define GPIO2_OUT_EN_MASK 0x00010000
22 23
23/* Wrappers for the arch-neutral GPIO API */ 24#define gpio_to_irq(gpio) NULL
24 25
25static inline int gpio_request(unsigned gpio, const char *label) 26#define gpio_get_value __gpio_get_value
26{ 27#define gpio_set_value __gpio_set_value
27 /* Not yet implemented */
28 return 0;
29}
30 28
31static inline void gpio_free(unsigned gpio) 29#define gpio_cansleep __gpio_cansleep
32{
33 /* Not yet implemented */
34}
35 30
36static inline int gpio_direction_input(unsigned gpio)
37{
38 return au1xxx_gpio_direction_input(gpio);
39}
40
41static inline int gpio_direction_output(unsigned gpio, int value)
42{
43 return au1xxx_gpio_direction_output(gpio, value);
44}
45
46static inline int gpio_get_value(unsigned gpio)
47{
48 return au1xxx_gpio_get_value(gpio);
49}
50
51static inline void gpio_set_value(unsigned gpio, int value)
52{
53 au1xxx_gpio_set_value(gpio, value);
54}
55
56static inline int gpio_to_irq(unsigned gpio)
57{
58 return gpio;
59}
60
61static inline int irq_to_gpio(unsigned irq)
62{
63 return irq;
64}
65
66/* For cansleep */
67#include <asm-generic/gpio.h> 31#include <asm-generic/gpio.h>
68 32
69#endif /* _AU1XXX_GPIO_H_ */ 33#endif /* _AU1XXX_GPIO_H_ */
diff --git a/arch/mips/include/asm/mach-bcm47xx/gpio.h b/arch/mips/include/asm/mach-bcm47xx/gpio.h
index d8ff4cd89ab5..1784fde2e28f 100644
--- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
+++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
@@ -31,24 +31,28 @@ static inline void gpio_set_value(unsigned gpio, int value)
31 31
32static inline int gpio_direction_input(unsigned gpio) 32static inline int gpio_direction_input(unsigned gpio)
33{ 33{
34 return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0); 34 ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0);
35 return 0;
35} 36}
36 37
37static inline int gpio_direction_output(unsigned gpio, int value) 38static inline int gpio_direction_output(unsigned gpio, int value)
38{ 39{
39 return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio); 40 ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
41 return 0;
40} 42}
41 43
42static int gpio_intmask(unsigned gpio, int value) 44static inline int gpio_intmask(unsigned gpio, int value)
43{ 45{
44 return ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio, 46 ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio,
45 value ? 1 << gpio : 0); 47 value ? 1 << gpio : 0);
48 return 0;
46} 49}
47 50
48static int gpio_polarity(unsigned gpio, int value) 51static inline int gpio_polarity(unsigned gpio, int value)
49{ 52{
50 return ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio, 53 ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio,
51 value ? 1 << gpio : 0); 54 value ? 1 << gpio : 0);
55 return 0;
52} 56}
53 57
54 58
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index 55d481569a1f..07547231e078 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -26,7 +26,6 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_cpumask(node) (hub_data(node)->h_cpus) 27#define node_to_cpumask(node) (hub_data(node)->h_cpus)
28#define cpumask_of_node(node) (&hub_data(node)->h_cpus) 28#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
29#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
30struct pci_bus; 29struct pci_bus;
31extern int pcibus_to_node(struct pci_bus *); 30extern int pcibus_to_node(struct pci_bus *);
32 31
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index 7f0b034dd9a5..c0da1a881e3d 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -71,8 +71,6 @@
71 71
72#define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) 72#define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f)
73 73
74extern int mips_revision_corid;
75
76#define MIPS_REVISION_SCON_OTHER 0 74#define MIPS_REVISION_SCON_OTHER 0
77#define MIPS_REVISION_SCON_SOCITSC 1 75#define MIPS_REVISION_SCON_SOCITSC 1
78#define MIPS_REVISION_SCON_SOCITSCP 2 76#define MIPS_REVISION_SCON_SOCITSCP 2
diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h
index 43c207e72a63..64ffc0290b84 100644
--- a/arch/mips/include/asm/smp-ops.h
+++ b/arch/mips/include/asm/smp-ops.h
@@ -15,6 +15,8 @@
15 15
16#include <linux/cpumask.h> 16#include <linux/cpumask.h>
17 17
18struct task_struct;
19
18struct plat_smp_ops { 20struct plat_smp_ops {
19 void (*send_ipi_single)(int cpu, unsigned int action); 21 void (*send_ipi_single)(int cpu, unsigned int action);
20 void (*send_ipi_mask)(cpumask_t mask, unsigned int action); 22 void (*send_ipi_mask)(cpumask_t mask, unsigned int action);
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h
index 0884947ebe27..5b60a09a0f08 100644
--- a/arch/mips/include/asm/spinlock.h
+++ b/arch/mips/include/asm/spinlock.h
@@ -76,7 +76,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
76 "2: \n" 76 "2: \n"
77 " .subsection 2 \n" 77 " .subsection 2 \n"
78 "4: andi %[ticket], %[ticket], 0x1fff \n" 78 "4: andi %[ticket], %[ticket], 0x1fff \n"
79 "5: sll %[ticket], 5 \n" 79 " sll %[ticket], 5 \n"
80 " \n" 80 " \n"
81 "6: bnez %[ticket], 6b \n" 81 "6: bnez %[ticket], 6b \n"
82 " subu %[ticket], 1 \n" 82 " subu %[ticket], 1 \n"
@@ -85,7 +85,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
85 " andi %[ticket], %[ticket], 0x1fff \n" 85 " andi %[ticket], %[ticket], 0x1fff \n"
86 " beq %[ticket], %[my_ticket], 2b \n" 86 " beq %[ticket], %[my_ticket], 2b \n"
87 " subu %[ticket], %[my_ticket], %[ticket] \n" 87 " subu %[ticket], %[my_ticket], %[ticket] \n"
88 " b 5b \n" 88 " b 4b \n"
89 " subu %[ticket], %[ticket], 1 \n" 89 " subu %[ticket], %[ticket], 1 \n"
90 " .previous \n" 90 " .previous \n"
91 " .set pop \n" 91 " .set pop \n"
@@ -113,7 +113,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
113 " ll %[ticket], %[ticket_ptr] \n" 113 " ll %[ticket], %[ticket_ptr] \n"
114 " \n" 114 " \n"
115 "4: andi %[ticket], %[ticket], 0x1fff \n" 115 "4: andi %[ticket], %[ticket], 0x1fff \n"
116 "5: sll %[ticket], 5 \n" 116 " sll %[ticket], 5 \n"
117 " \n" 117 " \n"
118 "6: bnez %[ticket], 6b \n" 118 "6: bnez %[ticket], 6b \n"
119 " subu %[ticket], 1 \n" 119 " subu %[ticket], 1 \n"
@@ -122,7 +122,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
122 " andi %[ticket], %[ticket], 0x1fff \n" 122 " andi %[ticket], %[ticket], 0x1fff \n"
123 " beq %[ticket], %[my_ticket], 2b \n" 123 " beq %[ticket], %[my_ticket], 2b \n"
124 " subu %[ticket], %[my_ticket], %[ticket] \n" 124 " subu %[ticket], %[my_ticket], %[ticket] \n"
125 " b 5b \n" 125 " b 4b \n"
126 " subu %[ticket], %[ticket], 1 \n" 126 " subu %[ticket], %[ticket], 1 \n"
127 " .previous \n" 127 " .previous \n"
128 " .set pop \n" 128 " .set pop \n"
@@ -480,6 +480,8 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
480 return ret; 480 return ret;
481} 481}
482 482
483#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
484#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
483 485
484#define _raw_spin_relax(lock) cpu_relax() 486#define _raw_spin_relax(lock) cpu_relax()
485#define _raw_read_relax(lock) cpu_relax() 487#define _raw_read_relax(lock) cpu_relax()
diff --git a/arch/mips/include/asm/txx9/ndfmc.h b/arch/mips/include/asm/txx9/ndfmc.h
new file mode 100644
index 000000000000..fa67f3df78fc
--- /dev/null
+++ b/arch/mips/include/asm/txx9/ndfmc.h
@@ -0,0 +1,30 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 *
6 * (C) Copyright TOSHIBA CORPORATION 2007
7 */
8#ifndef __ASM_TXX9_NDFMC_H
9#define __ASM_TXX9_NDFMC_H
10
11#define NDFMC_PLAT_FLAG_USE_BSPRT 0x01
12#define NDFMC_PLAT_FLAG_NO_RSTR 0x02
13#define NDFMC_PLAT_FLAG_HOLDADD 0x04
14#define NDFMC_PLAT_FLAG_DUMMYWRITE 0x08
15
16struct txx9ndfmc_platform_data {
17 unsigned int shift;
18 unsigned int gbus_clock;
19 unsigned int hold; /* hold time in nanosecond */
20 unsigned int spw; /* strobe pulse width in nanosecond */
21 unsigned int flags;
22 unsigned char ch_mask; /* available channel bitmask */
23 unsigned char wp_mask; /* write-protect bitmask */
24 unsigned char wide_mask; /* 16bit-nand bitmask */
25};
26
27void txx9_ndfmc_init(unsigned long baseaddr,
28 const struct txx9ndfmc_platform_data *plat_data);
29
30#endif /* __ASM_TXX9_NDFMC_H */
diff --git a/arch/mips/include/asm/txx9/rbtx4939.h b/arch/mips/include/asm/txx9/rbtx4939.h
index 1acf428c0b4f..e517899794a8 100644
--- a/arch/mips/include/asm/txx9/rbtx4939.h
+++ b/arch/mips/include/asm/txx9/rbtx4939.h
@@ -130,4 +130,13 @@
130void rbtx4939_prom_init(void); 130void rbtx4939_prom_init(void);
131void rbtx4939_irq_setup(void); 131void rbtx4939_irq_setup(void);
132 132
133struct mtd_partition;
134struct map_info;
135struct rbtx4939_flash_data {
136 unsigned int width;
137 unsigned int nr_parts;
138 struct mtd_partition *parts;
139 void (*map_init)(struct map_info *map);
140};
141
133#endif /* __ASM_TXX9_RBTX4939_H */ 142#endif /* __ASM_TXX9_RBTX4939_H */
diff --git a/arch/mips/include/asm/txx9/tx4938.h b/arch/mips/include/asm/txx9/tx4938.h
index 0b068154054c..cd8bc2021755 100644
--- a/arch/mips/include/asm/txx9/tx4938.h
+++ b/arch/mips/include/asm/txx9/tx4938.h
@@ -291,6 +291,7 @@ int tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot);
291void tx4938_setup_pcierr_irq(void); 291void tx4938_setup_pcierr_irq(void);
292void tx4938_irq_init(void); 292void tx4938_irq_init(void);
293void tx4938_mtd_init(int ch); 293void tx4938_mtd_init(int ch);
294void tx4938_ndfmc_init(unsigned int hold, unsigned int spw);
294 295
295struct tx4938ide_platform_info { 296struct tx4938ide_platform_info {
296 /* 297 /*
diff --git a/arch/mips/include/asm/txx9/tx4939.h b/arch/mips/include/asm/txx9/tx4939.h
index 964ef7ede268..f02c50b3abfb 100644
--- a/arch/mips/include/asm/txx9/tx4939.h
+++ b/arch/mips/include/asm/txx9/tx4939.h
@@ -542,5 +542,7 @@ int tx4939_irq(void);
542void tx4939_mtd_init(int ch); 542void tx4939_mtd_init(int ch);
543void tx4939_ata_init(void); 543void tx4939_ata_init(void);
544void tx4939_rtc_init(void); 544void tx4939_rtc_init(void);
545void tx4939_ndfmc_init(unsigned int hold, unsigned int spw,
546 unsigned char ch_mask, unsigned char wide_mask);
545 547
546#endif /* __ASM_TXX9_TX4939_H */ 548#endif /* __ASM_TXX9_TX4939_H */
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index bcbb8d675af5..7956e69a3bd5 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -4,12 +4,18 @@
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle 6 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
7 * Copyright (C) 2008 Wind River Systems,
8 * written by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc. 9 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */ 10 */
9#ifndef _ASM_TYPES_H 11#ifndef _ASM_TYPES_H
10#define _ASM_TYPES_H 12#define _ASM_TYPES_H
11 13
12#if _MIPS_SZLONG == 64 14/*
15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes.
17 */
18#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__)
13# include <asm-generic/int-l64.h> 19# include <asm-generic/int-l64.h>
14#else 20#else
15# include <asm-generic/int-ll64.h> 21# include <asm-generic/int-ll64.h>
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index a73e1531e151..40005010827c 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -350,16 +350,18 @@
350#define __NR_dup3 (__NR_Linux + 327) 350#define __NR_dup3 (__NR_Linux + 327)
351#define __NR_pipe2 (__NR_Linux + 328) 351#define __NR_pipe2 (__NR_Linux + 328)
352#define __NR_inotify_init1 (__NR_Linux + 329) 352#define __NR_inotify_init1 (__NR_Linux + 329)
353#define __NR_preadv (__NR_Linux + 330)
354#define __NR_pwritev (__NR_Linux + 331)
353 355
354/* 356/*
355 * Offset of the last Linux o32 flavoured syscall 357 * Offset of the last Linux o32 flavoured syscall
356 */ 358 */
357#define __NR_Linux_syscalls 329 359#define __NR_Linux_syscalls 331
358 360
359#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 361#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
360 362
361#define __NR_O32_Linux 4000 363#define __NR_O32_Linux 4000
362#define __NR_O32_Linux_syscalls 329 364#define __NR_O32_Linux_syscalls 331
363 365
364#if _MIPS_SIM == _MIPS_SIM_ABI64 366#if _MIPS_SIM == _MIPS_SIM_ABI64
365 367
@@ -656,16 +658,18 @@
656#define __NR_dup3 (__NR_Linux + 286) 658#define __NR_dup3 (__NR_Linux + 286)
657#define __NR_pipe2 (__NR_Linux + 287) 659#define __NR_pipe2 (__NR_Linux + 287)
658#define __NR_inotify_init1 (__NR_Linux + 288) 660#define __NR_inotify_init1 (__NR_Linux + 288)
661#define __NR_preadv (__NR_Linux + 289)
662#define __NR_pwritev (__NR_Linux + 290)
659 663
660/* 664/*
661 * Offset of the last Linux 64-bit flavoured syscall 665 * Offset of the last Linux 64-bit flavoured syscall
662 */ 666 */
663#define __NR_Linux_syscalls 288 667#define __NR_Linux_syscalls 290
664 668
665#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 669#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
666 670
667#define __NR_64_Linux 5000 671#define __NR_64_Linux 5000
668#define __NR_64_Linux_syscalls 288 672#define __NR_64_Linux_syscalls 290
669 673
670#if _MIPS_SIM == _MIPS_SIM_NABI32 674#if _MIPS_SIM == _MIPS_SIM_NABI32
671 675
@@ -966,16 +970,18 @@
966#define __NR_dup3 (__NR_Linux + 290) 970#define __NR_dup3 (__NR_Linux + 290)
967#define __NR_pipe2 (__NR_Linux + 291) 971#define __NR_pipe2 (__NR_Linux + 291)
968#define __NR_inotify_init1 (__NR_Linux + 292) 972#define __NR_inotify_init1 (__NR_Linux + 292)
973#define __NR_preadv (__NR_Linux + 293)
974#define __NR_pwritev (__NR_Linux + 294)
969 975
970/* 976/*
971 * Offset of the last N32 flavoured syscall 977 * Offset of the last N32 flavoured syscall
972 */ 978 */
973#define __NR_Linux_syscalls 292 979#define __NR_Linux_syscalls 294
974 980
975#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 981#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
976 982
977#define __NR_N32_Linux 6000 983#define __NR_N32_Linux 6000
978#define __NR_N32_Linux_syscalls 292 984#define __NR_N32_Linux_syscalls 294
979 985
980#ifdef __KERNEL__ 986#ifdef __KERNEL__
981 987
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index 03965cb1b252..d9b6a5b5399d 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -134,7 +134,6 @@ static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
134static struct irqaction r4030_timer_irqaction = { 134static struct irqaction r4030_timer_irqaction = {
135 .handler = r4030_timer_interrupt, 135 .handler = r4030_timer_interrupt,
136 .flags = IRQF_DISABLED, 136 .flags = IRQF_DISABLED,
137 .mask = CPU_MASK_CPU0,
138 .name = "R4030 timer", 137 .name = "R4030 timer",
139}; 138};
140 139
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c
index c672c08d49e5..f0fd636723be 100644
--- a/arch/mips/jazz/jazzdma.c
+++ b/arch/mips/jazz/jazzdma.c
@@ -68,8 +68,7 @@ static int __init vdma_init(void)
68 */ 68 */
69 pgtbl = (VDMA_PGTBL_ENTRY *)__get_free_pages(GFP_KERNEL | GFP_DMA, 69 pgtbl = (VDMA_PGTBL_ENTRY *)__get_free_pages(GFP_KERNEL | GFP_DMA,
70 get_order(VDMA_PGTBL_SIZE)); 70 get_order(VDMA_PGTBL_SIZE));
71 if (!pgtbl) 71 BUG_ON(!pgtbl);
72 BUG();
73 dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE); 72 dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE);
74 pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); 73 pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl);
75 74
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
index b820661678b0..a5182a207696 100644
--- a/arch/mips/kernel/cevt-bcm1480.c
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -144,7 +144,6 @@ void __cpuinit sb1480_clockevent_init(void)
144 144
145 action->handler = sibyte_counter_handler; 145 action->handler = sibyte_counter_handler;
146 action->flags = IRQF_DISABLED | IRQF_PERCPU; 146 action->flags = IRQF_DISABLED | IRQF_PERCPU;
147 action->mask = cpumask_of_cpu(cpu);
148 action->name = name; 147 action->name = name;
149 action->dev_id = cd; 148 action->dev_id = cd;
150 149
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
index a2eebaafda52..340f53e5c6b1 100644
--- a/arch/mips/kernel/cevt-sb1250.c
+++ b/arch/mips/kernel/cevt-sb1250.c
@@ -143,7 +143,6 @@ void __cpuinit sb1250_clockevent_init(void)
143 143
144 action->handler = sibyte_counter_handler; 144 action->handler = sibyte_counter_handler;
145 action->flags = IRQF_DISABLED | IRQF_PERCPU; 145 action->flags = IRQF_DISABLED | IRQF_PERCPU;
146 action->mask = cpumask_of_cpu(cpu);
147 action->name = name; 146 action->name = name;
148 action->dev_id = cd; 147 action->dev_id = cd;
149 148
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 1bdbcad3bb74..b13b8eb30596 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -183,13 +183,7 @@ void __init check_wait(void)
183 case CPU_TX49XX: 183 case CPU_TX49XX:
184 cpu_wait = r4k_wait_irqoff; 184 cpu_wait = r4k_wait_irqoff;
185 break; 185 break;
186 case CPU_AU1000: 186 case CPU_ALCHEMY:
187 case CPU_AU1100:
188 case CPU_AU1500:
189 case CPU_AU1550:
190 case CPU_AU1200:
191 case CPU_AU1210:
192 case CPU_AU1250:
193 cpu_wait = au1k_wait; 187 cpu_wait = au1k_wait;
194 break; 188 break;
195 case CPU_20KC: 189 case CPU_20KC:
@@ -783,37 +777,30 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
783 switch (c->processor_id & 0xff00) { 777 switch (c->processor_id & 0xff00) {
784 case PRID_IMP_AU1_REV1: 778 case PRID_IMP_AU1_REV1:
785 case PRID_IMP_AU1_REV2: 779 case PRID_IMP_AU1_REV2:
780 c->cputype = CPU_ALCHEMY;
786 switch ((c->processor_id >> 24) & 0xff) { 781 switch ((c->processor_id >> 24) & 0xff) {
787 case 0: 782 case 0:
788 c->cputype = CPU_AU1000;
789 __cpu_name[cpu] = "Au1000"; 783 __cpu_name[cpu] = "Au1000";
790 break; 784 break;
791 case 1: 785 case 1:
792 c->cputype = CPU_AU1500;
793 __cpu_name[cpu] = "Au1500"; 786 __cpu_name[cpu] = "Au1500";
794 break; 787 break;
795 case 2: 788 case 2:
796 c->cputype = CPU_AU1100;
797 __cpu_name[cpu] = "Au1100"; 789 __cpu_name[cpu] = "Au1100";
798 break; 790 break;
799 case 3: 791 case 3:
800 c->cputype = CPU_AU1550;
801 __cpu_name[cpu] = "Au1550"; 792 __cpu_name[cpu] = "Au1550";
802 break; 793 break;
803 case 4: 794 case 4:
804 c->cputype = CPU_AU1200;
805 __cpu_name[cpu] = "Au1200"; 795 __cpu_name[cpu] = "Au1200";
806 if ((c->processor_id & 0xff) == 2) { 796 if ((c->processor_id & 0xff) == 2)
807 c->cputype = CPU_AU1250;
808 __cpu_name[cpu] = "Au1250"; 797 __cpu_name[cpu] = "Au1250";
809 }
810 break; 798 break;
811 case 5: 799 case 5:
812 c->cputype = CPU_AU1210;
813 __cpu_name[cpu] = "Au1210"; 800 __cpu_name[cpu] = "Au1210";
814 break; 801 break;
815 default: 802 default:
816 panic("Unknown Au Core!"); 803 __cpu_name[cpu] = "Au1xxx";
817 break; 804 break;
818 } 805 }
819 break; 806 break;
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index f4d187825f96..689719e34f08 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -98,7 +98,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
98static struct irqaction irq0 = { 98static struct irqaction irq0 = {
99 .handler = timer_interrupt, 99 .handler = timer_interrupt,
100 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 100 .flags = IRQF_DISABLED | IRQF_NOBALANCING,
101 .mask = CPU_MASK_NONE,
102 .name = "timer" 101 .name = "timer"
103}; 102};
104 103
@@ -121,7 +120,6 @@ void __init setup_pit_timer(void)
121 cd->min_delta_ns = clockevent_delta2ns(0xF, cd); 120 cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
122 clockevents_register_device(cd); 121 clockevents_register_device(cd);
123 122
124 irq0.mask = cpumask_of_cpu(cpu);
125 setup_irq(0, &irq0); 123 setup_irq(0, &irq0);
126} 124}
127 125
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index 413bd1d37f54..01c0885a8061 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -306,7 +306,6 @@ static void init_8259A(int auto_eoi)
306 */ 306 */
307static struct irqaction irq2 = { 307static struct irqaction irq2 = {
308 .handler = no_action, 308 .handler = no_action,
309 .mask = CPU_MASK_NONE,
310 .name = "cascade", 309 .name = "cascade",
311}; 310};
312 311
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c
index 963c16d266ab..6a8cd28133d5 100644
--- a/arch/mips/kernel/irq-msc01.c
+++ b/arch/mips/kernel/irq-msc01.c
@@ -140,14 +140,16 @@ void __init init_msc_irqs(unsigned long icubase, unsigned int irqbase, msc_irqma
140 140
141 switch (imp->im_type) { 141 switch (imp->im_type) {
142 case MSC01_IRQ_EDGE: 142 case MSC01_IRQ_EDGE:
143 set_irq_chip(irqbase+n, &msc_edgeirq_type); 143 set_irq_chip_and_handler_name(irqbase + n,
144 &msc_edgeirq_type, handle_edge_irq, "edge");
144 if (cpu_has_veic) 145 if (cpu_has_veic)
145 MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT); 146 MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT);
146 else 147 else
147 MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT | imp->im_lvl); 148 MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT | imp->im_lvl);
148 break; 149 break;
149 case MSC01_IRQ_LEVEL: 150 case MSC01_IRQ_LEVEL:
150 set_irq_chip(irqbase+n, &msc_levelirq_type); 151 set_irq_chip_and_handler_name(irqbase+n,
152 &msc_levelirq_type, handle_level_irq, "level");
151 if (cpu_has_veic) 153 if (cpu_has_veic)
152 MSCIC_WRITE(MSC01_IC_SUP+n*8, 0); 154 MSCIC_WRITE(MSC01_IC_SUP+n*8, 0);
153 else 155 else
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 0ee2567b780d..55c8a3ca507b 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -112,7 +112,8 @@ void __init mips_cpu_irq_init(void)
112 */ 112 */
113 if (cpu_has_mipsmt) 113 if (cpu_has_mipsmt)
114 for (i = irq_base; i < irq_base + 2; i++) 114 for (i = irq_base; i < irq_base + 2; i++)
115 set_irq_chip(i, &mips_mt_cpu_irq_controller); 115 set_irq_chip_and_handler(i, &mips_mt_cpu_irq_controller,
116 handle_percpu_irq);
116 117
117 for (i = irq_base + 2; i < irq_base + 8; i++) 118 for (i = irq_base + 2; i < irq_base + 8; i++)
118 set_irq_chip_and_handler(i, &mips_cpu_irq_controller, 119 set_irq_chip_and_handler(i, &mips_cpu_irq_controller,
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 2a472713de8e..6242bc68add7 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -133,9 +133,9 @@ SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy,
133 return sys_ftruncate(fd, merge_64(a2, a3)); 133 return sys_ftruncate(fd, merge_64(a2, a3));
134} 134}
135 135
136SYSCALL_DEFINE5(32_llseek, unsigned long, fd, unsigned long, offset_high, 136SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high,
137 unsigned long, offset_low, loff_t __user *, result, 137 unsigned int, offset_low, loff_t __user *, result,
138 unsigned long, origin) 138 unsigned int, origin)
139{ 139{
140 return sys_llseek(fd, offset_high, offset_low, result, origin); 140 return sys_llseek(fd, offset_high, offset_low, result, origin);
141} 141}
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index ca2e4026ad20..1eaaa450e20c 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -99,7 +99,7 @@ void flush_thread(void)
99{ 99{
100} 100}
101 101
102int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 102int copy_thread(unsigned long clone_flags, unsigned long usp,
103 unsigned long unused, struct task_struct *p, struct pt_regs *regs) 103 unsigned long unused, struct task_struct *p, struct pt_regs *regs)
104{ 104{
105 struct thread_info *ti = task_thread_info(p); 105 struct thread_info *ti = task_thread_info(p);
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 9ab70c3b5be6..0b31b9bda048 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -650,6 +650,8 @@ einval: li v0, -ENOSYS
650 sys sys_dup3 3 650 sys sys_dup3 3
651 sys sys_pipe2 2 651 sys sys_pipe2 2
652 sys sys_inotify_init1 1 652 sys sys_inotify_init1 1
653 sys sys_preadv 6 /* 4330 */
654 sys sys_pwritev 6
653 .endm 655 .endm
654 656
655 /* We pre-compute the number of _instruction_ bytes needed to 657 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 9b4698667154..c647fd6e722f 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -487,4 +487,6 @@ sys_call_table:
487 PTR sys_dup3 487 PTR sys_dup3
488 PTR sys_pipe2 488 PTR sys_pipe2
489 PTR sys_inotify_init1 489 PTR sys_inotify_init1
490 PTR sys_preadv
491 PTR sys_pwritev /* 5390 */
490 .size sys_call_table,.-sys_call_table 492 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index f61d6b0e5731..c2c16ef9218f 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -413,4 +413,6 @@ EXPORT(sysn32_call_table)
413 PTR sys_dup3 /* 5290 */ 413 PTR sys_dup3 /* 5290 */
414 PTR sys_pipe2 414 PTR sys_pipe2
415 PTR sys_inotify_init1 415 PTR sys_inotify_init1
416 PTR sys_preadv
417 PTR sys_pwritev
416 .size sysn32_call_table,.-sysn32_call_table 418 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 60997f1f69d4..002fac27021e 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -533,4 +533,6 @@ sys_call_table:
533 PTR sys_dup3 533 PTR sys_dup3
534 PTR sys_pipe2 534 PTR sys_pipe2
535 PTR sys_inotify_init1 535 PTR sys_inotify_init1
536 PTR compat_sys_preadv /* 4330 */
537 PTR compat_sys_pwritev
536 .size sys_call_table,.-sys_call_table 538 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 4430a1f8fdf1..2950b97253b7 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -277,7 +277,8 @@ static void __init bootmem_init(void)
277 * not selected. Once that done we can determine the low bound 277 * not selected. Once that done we can determine the low bound
278 * of usable memory. 278 * of usable memory.
279 */ 279 */
280 reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end))); 280 reserved_end = max(init_initrd(),
281 (unsigned long) PFN_UP(__pa_symbol(&_end)));
281 282
282 /* 283 /*
283 * max_low_pfn is not a number of pages. The number of pages 284 * max_low_pfn is not a number of pages. The number of pages
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
index ead6c30eeb14..878e3733bbb2 100644
--- a/arch/mips/kernel/smp-up.c
+++ b/arch/mips/kernel/smp-up.c
@@ -13,7 +13,7 @@
13/* 13/*
14 * Send inter-processor interrupt 14 * Send inter-processor interrupt
15 */ 15 */
16void up_send_ipi_single(int cpu, unsigned int action) 16static void up_send_ipi_single(int cpu, unsigned int action)
17{ 17{
18 panic(KERN_ERR "%s called", __func__); 18 panic(KERN_ERR "%s called", __func__);
19} 19}
@@ -27,31 +27,31 @@ static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action)
27 * After we've done initial boot, this function is called to allow the 27 * After we've done initial boot, this function is called to allow the
28 * board code to clean up state, if needed 28 * board code to clean up state, if needed
29 */ 29 */
30void __cpuinit up_init_secondary(void) 30static void __cpuinit up_init_secondary(void)
31{ 31{
32} 32}
33 33
34void __cpuinit up_smp_finish(void) 34static void __cpuinit up_smp_finish(void)
35{ 35{
36} 36}
37 37
38/* Hook for after all CPUs are online */ 38/* Hook for after all CPUs are online */
39void up_cpus_done(void) 39static void up_cpus_done(void)
40{ 40{
41} 41}
42 42
43/* 43/*
44 * Firmware CPU startup hook 44 * Firmware CPU startup hook
45 */ 45 */
46void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) 46static void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle)
47{ 47{
48} 48}
49 49
50void __init up_smp_setup(void) 50static void __init up_smp_setup(void)
51{ 51{
52} 52}
53 53
54void __init up_prepare_cpus(unsigned int max_cpus) 54static void __init up_prepare_cpus(unsigned int max_cpus)
55{ 55{
56} 56}
57 57
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 3da94704f816..c937506a03aa 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -44,7 +44,7 @@
44#include <asm/mipsmtregs.h> 44#include <asm/mipsmtregs.h>
45#endif /* CONFIG_MIPS_MT_SMTC */ 45#endif /* CONFIG_MIPS_MT_SMTC */
46 46
47volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ 47static volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
48int __cpu_number_map[NR_CPUS]; /* Map physical to logical */ 48int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
49int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */ 49int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
50 50
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 29fadaccecdd..e83da174b533 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1277,8 +1277,7 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
1277 u32 *w; 1277 u32 *w;
1278 unsigned char *b; 1278 unsigned char *b;
1279 1279
1280 if (!cpu_has_veic && !cpu_has_vint) 1280 BUG_ON(!cpu_has_veic && !cpu_has_vint);
1281 BUG();
1282 1281
1283 if (addr == NULL) { 1282 if (addr == NULL) {
1284 handler = (unsigned long) do_default_vi; 1283 handler = (unsigned long) do_default_vi;
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index d1ac7a25c856..1353fb135ed3 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -104,7 +104,6 @@ asmlinkage void plat_irq_dispatch(void)
104 104
105static struct irqaction cascade = { 105static struct irqaction cascade = {
106 .handler = no_action, 106 .handler = no_action,
107 .mask = CPU_MASK_NONE,
108 .name = "cascade", 107 .name = "cascade",
109}; 108};
110 109
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c
index 3e0b7beb1009..1d0a09f3b832 100644
--- a/arch/mips/lemote/lm2e/irq.c
+++ b/arch/mips/lemote/lm2e/irq.c
@@ -92,7 +92,6 @@ asmlinkage void plat_irq_dispatch(void)
92 92
93static struct irqaction cascade_irqaction = { 93static struct irqaction cascade_irqaction = {
94 .handler = no_action, 94 .handler = no_action,
95 .mask = CPU_MASK_NONE,
96 .name = "cascade", 95 .name = "cascade",
97}; 96};
98 97
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 871e828bc62a..58d9075e86fe 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1026,13 +1026,7 @@ static void __cpuinit probe_pcache(void)
1026 c->icache.flags |= MIPS_CACHE_VTAG; 1026 c->icache.flags |= MIPS_CACHE_VTAG;
1027 break; 1027 break;
1028 1028
1029 case CPU_AU1000: 1029 case CPU_ALCHEMY:
1030 case CPU_AU1500:
1031 case CPU_AU1100:
1032 case CPU_AU1550:
1033 case CPU_AU1200:
1034 case CPU_AU1210:
1035 case CPU_AU1250:
1036 c->icache.flags |= MIPS_CACHE_IC_F_DC; 1030 c->icache.flags |= MIPS_CACHE_IC_F_DC;
1037 break; 1031 break;
1038 } 1032 }
@@ -1244,7 +1238,7 @@ void au1x00_fixup_config_od(void)
1244 /* 1238 /*
1245 * Au1100 errata actually keeps silence about this bit, so we set it 1239 * Au1100 errata actually keeps silence about this bit, so we set it
1246 * just in case for those revisions that require it to be set according 1240 * just in case for those revisions that require it to be set according
1247 * to arch/mips/au1000/common/cputable.c 1241 * to the (now gone) cpu table.
1248 */ 1242 */
1249 case 0x02030200: /* Au1100 AB */ 1243 case 0x02030200: /* Au1100 AB */
1250 case 0x02030201: /* Au1100 BA */ 1244 case 0x02030201: /* Au1100 BA */
@@ -1314,11 +1308,10 @@ static void __cpuinit coherency_setup(void)
1314 break; 1308 break;
1315 /* 1309 /*
1316 * We need to catch the early Alchemy SOCs with 1310 * We need to catch the early Alchemy SOCs with
1317 * the write-only co_config.od bit and set it back to one... 1311 * the write-only co_config.od bit and set it back to one on:
1312 * Au1000 rev DA, HA, HB; Au1100 AB, BA, BC, Au1500 AB
1318 */ 1313 */
1319 case CPU_AU1000: /* rev. DA, HA, HB */ 1314 case CPU_ALCHEMY:
1320 case CPU_AU1100: /* rev. AB, BA, BC ?? */
1321 case CPU_AU1500: /* rev. AB */
1322 au1x00_fixup_config_od(); 1315 au1x00_fixup_config_od();
1323 break; 1316 break;
1324 1317
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c
index 8f2cd8eda741..4481656d1065 100644
--- a/arch/mips/mm/highmem.c
+++ b/arch/mips/mm/highmem.c
@@ -17,8 +17,7 @@ void *__kmap(struct page *page)
17 17
18void __kunmap(struct page *page) 18void __kunmap(struct page *page)
19{ 19{
20 if (in_interrupt()) 20 BUG_ON(in_interrupt());
21 BUG();
22 if (!PageHighMem(page)) 21 if (!PageHighMem(page))
23 return; 22 return;
24 kunmap_high(page); 23 kunmap_high(page);
@@ -43,11 +42,11 @@ void *__kmap_atomic(struct page *page, enum km_type type)
43 if (!PageHighMem(page)) 42 if (!PageHighMem(page))
44 return page_address(page); 43 return page_address(page);
45 44
45 debug_kmap_atomic(type);
46 idx = type + KM_TYPE_NR*smp_processor_id(); 46 idx = type + KM_TYPE_NR*smp_processor_id();
47 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 47 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
48#ifdef CONFIG_DEBUG_HIGHMEM 48#ifdef CONFIG_DEBUG_HIGHMEM
49 if (!pte_none(*(kmap_pte-idx))) 49 BUG_ON(!pte_none(*(kmap_pte - idx)));
50 BUG();
51#endif 50#endif
52 set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); 51 set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
53 local_flush_tlb_one((unsigned long)vaddr); 52 local_flush_tlb_one((unsigned long)vaddr);
@@ -66,8 +65,7 @@ void __kunmap_atomic(void *kvaddr, enum km_type type)
66 return; 65 return;
67 } 66 }
68 67
69 if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)) 68 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
70 BUG();
71 69
72 /* 70 /*
73 * force other mappings to Oops if they'll try to access 71 * force other mappings to Oops if they'll try to access
@@ -91,6 +89,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
91 89
92 pagefault_disable(); 90 pagefault_disable();
93 91
92 debug_kmap_atomic(type);
94 idx = type + KM_TYPE_NR*smp_processor_id(); 93 idx = type + KM_TYPE_NR*smp_processor_id();
95 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 94 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
96 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot)); 95 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot));
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 137c14bafd6b..d9348946a19e 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -307,8 +307,7 @@ void __init fixrange_init(unsigned long start, unsigned long end,
307 if (pmd_none(*pmd)) { 307 if (pmd_none(*pmd)) {
308 pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); 308 pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
309 set_pmd(pmd, __pmd((unsigned long)pte)); 309 set_pmd(pmd, __pmd((unsigned long)pte));
310 if (pte != pte_offset_kernel(pmd, 0)) 310 BUG_ON(pte != pte_offset_kernel(pmd, 0));
311 BUG();
312 } 311 }
313 vaddr += PMD_SIZE; 312 vaddr += PMD_SIZE;
314 } 313 }
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index 59945b9ee23c..0c43248347bd 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -27,8 +27,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address,
27 end = address + size; 27 end = address + size;
28 if (end > PMD_SIZE) 28 if (end > PMD_SIZE)
29 end = PMD_SIZE; 29 end = PMD_SIZE;
30 if (address >= end) 30 BUG_ON(address >= end);
31 BUG();
32 pfn = phys_addr >> PAGE_SHIFT; 31 pfn = phys_addr >> PAGE_SHIFT;
33 do { 32 do {
34 if (!pte_none(*pte)) { 33 if (!pte_none(*pte)) {
@@ -52,8 +51,7 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address,
52 if (end > PGDIR_SIZE) 51 if (end > PGDIR_SIZE)
53 end = PGDIR_SIZE; 52 end = PGDIR_SIZE;
54 phys_addr -= address; 53 phys_addr -= address;
55 if (address >= end) 54 BUG_ON(address >= end);
56 BUG();
57 do { 55 do {
58 pte_t * pte = pte_alloc_kernel(pmd, address); 56 pte_t * pte = pte_alloc_kernel(pmd, address);
59 if (!pte) 57 if (!pte)
@@ -75,8 +73,7 @@ static int remap_area_pages(unsigned long address, phys_t phys_addr,
75 phys_addr -= address; 73 phys_addr -= address;
76 dir = pgd_offset(&init_mm, address); 74 dir = pgd_offset(&init_mm, address);
77 flush_cache_all(); 75 flush_cache_all();
78 if (address >= end) 76 BUG_ON(address >= end);
79 BUG();
80 do { 77 do {
81 pud_t *pud; 78 pud_t *pud;
82 pmd_t *pmd; 79 pmd_t *pmd;
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index f335cf6cdd78..0615b62efd6d 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -292,13 +292,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
292 case CPU_R4300: 292 case CPU_R4300:
293 case CPU_5KC: 293 case CPU_5KC:
294 case CPU_TX49XX: 294 case CPU_TX49XX:
295 case CPU_AU1000:
296 case CPU_AU1100:
297 case CPU_AU1500:
298 case CPU_AU1550:
299 case CPU_AU1200:
300 case CPU_AU1210:
301 case CPU_AU1250:
302 case CPU_PR4450: 295 case CPU_PR4450:
303 uasm_i_nop(p); 296 uasm_i_nop(p);
304 tlbw(p); 297 tlbw(p);
@@ -321,6 +314,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
321 case CPU_R5500: 314 case CPU_R5500:
322 if (m4kc_tlbp_war()) 315 if (m4kc_tlbp_war())
323 uasm_i_nop(p); 316 uasm_i_nop(p);
317 case CPU_ALCHEMY:
324 tlbw(p); 318 tlbw(p);
325 break; 319 break;
326 320
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 4832af251668..475038a141a6 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -48,7 +48,7 @@ int *_prom_argv, *_prom_envp;
48 48
49int init_debug = 0; 49int init_debug = 0;
50 50
51int mips_revision_corid; 51static int mips_revision_corid;
52int mips_revision_sconid; 52int mips_revision_sconid;
53 53
54/* Bonito64 system controller register base. */ 54/* Bonito64 system controller register base. */
diff --git a/arch/mips/nxp/pnx833x/common/platform.c b/arch/mips/nxp/pnx833x/common/platform.c
index b1ccbcc18f78..01f8345a2069 100644
--- a/arch/mips/nxp/pnx833x/common/platform.c
+++ b/arch/mips/nxp/pnx833x/common/platform.c
@@ -42,7 +42,7 @@
42#include <irq-mapping.h> 42#include <irq-mapping.h>
43#include <pnx833x.h> 43#include <pnx833x.h>
44 44
45static u64 uart_dmamask = DMA_32BIT_MASK; 45static u64 uart_dmamask = DMA_BIT_MASK(32);
46 46
47static struct resource pnx833x_uart_resources[] = { 47static struct resource pnx833x_uart_resources[] = {
48 [0] = { 48 [0] = {
@@ -101,14 +101,14 @@ static struct platform_device pnx833x_uart_device = {
101 .id = -1, 101 .id = -1,
102 .dev = { 102 .dev = {
103 .dma_mask = &uart_dmamask, 103 .dma_mask = &uart_dmamask,
104 .coherent_dma_mask = DMA_32BIT_MASK, 104 .coherent_dma_mask = DMA_BIT_MASK(32),
105 .platform_data = pnx8xxx_ports, 105 .platform_data = pnx8xxx_ports,
106 }, 106 },
107 .num_resources = ARRAY_SIZE(pnx833x_uart_resources), 107 .num_resources = ARRAY_SIZE(pnx833x_uart_resources),
108 .resource = pnx833x_uart_resources, 108 .resource = pnx833x_uart_resources,
109}; 109};
110 110
111static u64 ehci_dmamask = DMA_32BIT_MASK; 111static u64 ehci_dmamask = DMA_BIT_MASK(32);
112 112
113static struct resource pnx833x_usb_ehci_resources[] = { 113static struct resource pnx833x_usb_ehci_resources[] = {
114 [0] = { 114 [0] = {
@@ -128,7 +128,7 @@ static struct platform_device pnx833x_usb_ehci_device = {
128 .id = -1, 128 .id = -1,
129 .dev = { 129 .dev = {
130 .dma_mask = &ehci_dmamask, 130 .dma_mask = &ehci_dmamask,
131 .coherent_dma_mask = DMA_32BIT_MASK, 131 .coherent_dma_mask = DMA_BIT_MASK(32),
132 }, 132 },
133 .num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources), 133 .num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources),
134 .resource = pnx833x_usb_ehci_resources, 134 .resource = pnx833x_usb_ehci_resources,
@@ -198,7 +198,7 @@ static struct platform_device pnx833x_i2c1_device = {
198}; 198};
199#endif 199#endif
200 200
201static u64 ethernet_dmamask = DMA_32BIT_MASK; 201static u64 ethernet_dmamask = DMA_BIT_MASK(32);
202 202
203static struct resource pnx833x_ethernet_resources[] = { 203static struct resource pnx833x_ethernet_resources[] = {
204 [0] = { 204 [0] = {
@@ -218,7 +218,7 @@ static struct platform_device pnx833x_ethernet_device = {
218 .id = -1, 218 .id = -1,
219 .dev = { 219 .dev = {
220 .dma_mask = &ethernet_dmamask, 220 .dma_mask = &ethernet_dmamask,
221 .coherent_dma_mask = DMA_32BIT_MASK, 221 .coherent_dma_mask = DMA_BIT_MASK(32),
222 }, 222 },
223 .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources), 223 .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
224 .resource = pnx833x_ethernet_resources, 224 .resource = pnx833x_ethernet_resources,
diff --git a/arch/mips/nxp/pnx8550/common/platform.c b/arch/mips/nxp/pnx8550/common/platform.c
index 21d2955359b3..5264cc09a27b 100644
--- a/arch/mips/nxp/pnx8550/common/platform.c
+++ b/arch/mips/nxp/pnx8550/common/platform.c
@@ -92,16 +92,16 @@ struct pnx8xxx_port pnx8xxx_ports[] = {
92}; 92};
93 93
94/* The dmamask must be set for OHCI to work */ 94/* The dmamask must be set for OHCI to work */
95static u64 ohci_dmamask = DMA_32BIT_MASK; 95static u64 ohci_dmamask = DMA_BIT_MASK(32);
96 96
97static u64 uart_dmamask = DMA_32BIT_MASK; 97static u64 uart_dmamask = DMA_BIT_MASK(32);
98 98
99static struct platform_device pnx8550_usb_ohci_device = { 99static struct platform_device pnx8550_usb_ohci_device = {
100 .name = "pnx8550-ohci", 100 .name = "pnx8550-ohci",
101 .id = -1, 101 .id = -1,
102 .dev = { 102 .dev = {
103 .dma_mask = &ohci_dmamask, 103 .dma_mask = &ohci_dmamask,
104 .coherent_dma_mask = DMA_32BIT_MASK, 104 .coherent_dma_mask = DMA_BIT_MASK(32),
105 }, 105 },
106 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources), 106 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
107 .resource = pnx8550_usb_ohci_resources, 107 .resource = pnx8550_usb_ohci_resources,
@@ -112,7 +112,7 @@ static struct platform_device pnx8550_uart_device = {
112 .id = -1, 112 .id = -1,
113 .dev = { 113 .dev = {
114 .dma_mask = &uart_dmamask, 114 .dma_mask = &uart_dmamask,
115 .coherent_dma_mask = DMA_32BIT_MASK, 115 .coherent_dma_mask = DMA_BIT_MASK(32),
116 .platform_data = pnx8xxx_ports, 116 .platform_data = pnx8xxx_ports,
117 }, 117 },
118 .num_resources = ARRAY_SIZE(pnx8550_uart_resources), 118 .num_resources = ARRAY_SIZE(pnx8550_uart_resources),
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
index f7ca4f582331..0ee01e359dd8 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_usb.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -49,14 +49,14 @@ static struct resource msp_usbhost_resources [] = {
49 }, 49 },
50}; 50};
51 51
52static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK; 52static u64 msp_usbhost_dma_mask = DMA_BIT_MASK(32);
53 53
54static struct platform_device msp_usbhost_device = { 54static struct platform_device msp_usbhost_device = {
55 .name = "pmcmsp-ehci", 55 .name = "pmcmsp-ehci",
56 .id = 0, 56 .id = 0,
57 .dev = { 57 .dev = {
58 .dma_mask = &msp_usbhost_dma_mask, 58 .dma_mask = &msp_usbhost_dma_mask,
59 .coherent_dma_mask = DMA_32BIT_MASK, 59 .coherent_dma_mask = DMA_BIT_MASK(32),
60 }, 60 },
61 .num_resources = ARRAY_SIZE(msp_usbhost_resources), 61 .num_resources = ARRAY_SIZE(msp_usbhost_resources),
62 .resource = msp_usbhost_resources, 62 .resource = msp_usbhost_resources,
@@ -77,14 +77,14 @@ static struct resource msp_usbdev_resources [] = {
77 }, 77 },
78}; 78};
79 79
80static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK; 80static u64 msp_usbdev_dma_mask = DMA_BIT_MASK(32);
81 81
82static struct platform_device msp_usbdev_device = { 82static struct platform_device msp_usbdev_device = {
83 .name = "msp71xx_udc", 83 .name = "msp71xx_udc",
84 .id = 0, 84 .id = 0,
85 .dev = { 85 .dev = {
86 .dma_mask = &msp_usbdev_dma_mask, 86 .dma_mask = &msp_usbdev_dma_mask,
87 .coherent_dma_mask = DMA_32BIT_MASK, 87 .coherent_dma_mask = DMA_BIT_MASK(32),
88 }, 88 },
89 .num_resources = ARRAY_SIZE(msp_usbdev_resources), 89 .num_resources = ARRAY_SIZE(msp_usbdev_resources),
90 .resource = msp_usbdev_resources, 90 .resource = msp_usbdev_resources,
diff --git a/arch/mips/sgi-ip27/ip27-berr.c b/arch/mips/sgi-ip27/ip27-berr.c
index 7d05e68fdc77..04cebadc2b3c 100644
--- a/arch/mips/sgi-ip27/ip27-berr.c
+++ b/arch/mips/sgi-ip27/ip27-berr.c
@@ -66,7 +66,7 @@ int ip27_be_handler(struct pt_regs *regs, int is_fixup)
66 printk("Slice %c got %cbe at 0x%lx\n", 'A' + cpu, data ? 'd' : 'i', 66 printk("Slice %c got %cbe at 0x%lx\n", 'A' + cpu, data ? 'd' : 'i',
67 regs->cp0_epc); 67 regs->cp0_epc);
68 printk("Hub information:\n"); 68 printk("Hub information:\n");
69 printk("ERR_INT_PEND = 0x%06lx\n", LOCAL_HUB_L(PI_ERR_INT_PEND)); 69 printk("ERR_INT_PEND = 0x%06llx\n", LOCAL_HUB_L(PI_ERR_INT_PEND));
70 errst0 = LOCAL_HUB_L(cpu ? PI_ERR_STATUS0_B : PI_ERR_STATUS0_A); 70 errst0 = LOCAL_HUB_L(cpu ? PI_ERR_STATUS0_B : PI_ERR_STATUS0_A);
71 errst1 = LOCAL_HUB_L(cpu ? PI_ERR_STATUS1_B : PI_ERR_STATUS1_A); 71 errst1 = LOCAL_HUB_L(cpu ? PI_ERR_STATUS1_B : PI_ERR_STATUS1_A);
72 dump_hub_information(errst0, errst1); 72 dump_hub_information(errst0, errst1);
diff --git a/arch/mips/sgi-ip27/ip27-nmi.c b/arch/mips/sgi-ip27/ip27-nmi.c
index 64459e7d891b..6c5a630566f9 100644
--- a/arch/mips/sgi-ip27/ip27-nmi.c
+++ b/arch/mips/sgi-ip27/ip27-nmi.c
@@ -143,8 +143,8 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice)
143 pend0 = REMOTE_HUB_L(nasid, PI_INT_PEND0); 143 pend0 = REMOTE_HUB_L(nasid, PI_INT_PEND0);
144 pend1 = REMOTE_HUB_L(nasid, PI_INT_PEND1); 144 pend1 = REMOTE_HUB_L(nasid, PI_INT_PEND1);
145 145
146 printk("PI_INT_MASK0: %16lx PI_INT_MASK1: %16lx\n", mask0, mask1); 146 printk("PI_INT_MASK0: %16Lx PI_INT_MASK1: %16Lx\n", mask0, mask1);
147 printk("PI_INT_PEND0: %16lx PI_INT_PEND1: %16lx\n", pend0, pend1); 147 printk("PI_INT_PEND0: %16Lx PI_INT_PEND1: %16Lx\n", pend0, pend1);
148 printk("\n\n"); 148 printk("\n\n");
149} 149}
150 150
@@ -219,7 +219,7 @@ cont_nmi_dump(void)
219 if (i == 1000) { 219 if (i == 1000) {
220 for_each_online_node(node) 220 for_each_online_node(node)
221 if (NODEPDA(node)->dump_count == 0) { 221 if (NODEPDA(node)->dump_count == 0) {
222 cpu = node_to_first_cpu(node); 222 cpu = cpumask_first(cpumask_of_node(node));
223 for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) { 223 for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) {
224 CPUMASK_SETB(nmied_cpus, cpu); 224 CPUMASK_SETB(nmied_cpus, cpu);
225 /* 225 /*
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index 5b47d6b65275..cbcd7eb83bd1 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -221,7 +221,7 @@ static void __init ip27_smp_setup(void)
221 * Assumption to be fixed: we're always booted on logical / physical 221 * Assumption to be fixed: we're always booted on logical / physical
222 * processor 0. While we're always running on logical processor 0 222 * processor 0. While we're always running on logical processor 0
223 * this still means this is physical processor zero; it might for 223 * this still means this is physical processor zero; it might for
224 * example be disabled in the firwware. 224 * example be disabled in the firmware.
225 */ 225 */
226 alloc_cpupda(0, 0); 226 alloc_cpupda(0, 0);
227} 227}
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index 0d6b6663d5f6..83a0b3c359da 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -115,14 +115,12 @@ extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
115struct irqaction memerr_irq = { 115struct irqaction memerr_irq = {
116 .handler = crime_memerr_intr, 116 .handler = crime_memerr_intr,
117 .flags = IRQF_DISABLED, 117 .flags = IRQF_DISABLED,
118 .mask = CPU_MASK_NONE,
119 .name = "CRIME memory error", 118 .name = "CRIME memory error",
120}; 119};
121 120
122struct irqaction cpuerr_irq = { 121struct irqaction cpuerr_irq = {
123 .handler = crime_cpuerr_intr, 122 .handler = crime_cpuerr_intr,
124 .flags = IRQF_DISABLED, 123 .flags = IRQF_DISABLED,
125 .mask = CPU_MASK_NONE,
126 .name = "CRIME CPU error", 124 .name = "CRIME CPU error",
127}; 125};
128 126
@@ -325,16 +323,11 @@ static void mask_and_ack_maceisa_irq(unsigned int irq)
325{ 323{
326 unsigned long mace_int; 324 unsigned long mace_int;
327 325
328 switch (irq) { 326 /* edge triggered */
329 case MACEISA_PARALLEL_IRQ: 327 mace_int = mace->perif.ctrl.istat;
330 case MACEISA_SERIAL1_TDMAPR_IRQ: 328 mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ));
331 case MACEISA_SERIAL2_TDMAPR_IRQ: 329 mace->perif.ctrl.istat = mace_int;
332 /* edge triggered */ 330
333 mace_int = mace->perif.ctrl.istat;
334 mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ));
335 mace->perif.ctrl.istat = mace_int;
336 break;
337 }
338 disable_maceisa_irq(irq); 331 disable_maceisa_irq(irq);
339} 332}
340 333
@@ -344,7 +337,16 @@ static void end_maceisa_irq(unsigned irq)
344 enable_maceisa_irq(irq); 337 enable_maceisa_irq(irq);
345} 338}
346 339
347static struct irq_chip ip32_maceisa_interrupt = { 340static struct irq_chip ip32_maceisa_level_interrupt = {
341 .name = "IP32 MACE ISA",
342 .ack = disable_maceisa_irq,
343 .mask = disable_maceisa_irq,
344 .mask_ack = disable_maceisa_irq,
345 .unmask = enable_maceisa_irq,
346 .end = end_maceisa_irq,
347};
348
349static struct irq_chip ip32_maceisa_edge_interrupt = {
348 .name = "IP32 MACE ISA", 350 .name = "IP32 MACE ISA",
349 .ack = mask_and_ack_maceisa_irq, 351 .ack = mask_and_ack_maceisa_irq,
350 .mask = disable_maceisa_irq, 352 .mask = disable_maceisa_irq,
@@ -500,27 +502,50 @@ void __init arch_init_irq(void)
500 for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) { 502 for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) {
501 switch (irq) { 503 switch (irq) {
502 case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: 504 case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ:
503 set_irq_chip(irq, &ip32_mace_interrupt); 505 set_irq_chip_and_handler_name(irq,&ip32_mace_interrupt,
506 handle_level_irq, "level");
504 break; 507 break;
508
505 case MACEPCI_SCSI0_IRQ ... MACEPCI_SHARED2_IRQ: 509 case MACEPCI_SCSI0_IRQ ... MACEPCI_SHARED2_IRQ:
506 set_irq_chip(irq, &ip32_macepci_interrupt); 510 set_irq_chip_and_handler_name(irq,
511 &ip32_macepci_interrupt, handle_level_irq,
512 "level");
507 break; 513 break;
514
508 case CRIME_GBE0_IRQ ... CRIME_GBE3_IRQ: 515 case CRIME_GBE0_IRQ ... CRIME_GBE3_IRQ:
509 set_irq_chip(irq, &crime_edge_interrupt); 516 set_irq_chip_and_handler_name(irq,
517 &crime_edge_interrupt, handle_edge_irq, "edge");
510 break; 518 break;
511 case CRIME_CPUERR_IRQ: 519 case CRIME_CPUERR_IRQ:
512 case CRIME_MEMERR_IRQ: 520 case CRIME_MEMERR_IRQ:
513 set_irq_chip(irq, &crime_level_interrupt); 521 set_irq_chip_and_handler_name(irq,
522 &crime_level_interrupt, handle_level_irq,
523 "level");
514 break; 524 break;
525
515 case CRIME_RE_EMPTY_E_IRQ ... CRIME_RE_IDLE_E_IRQ: 526 case CRIME_RE_EMPTY_E_IRQ ... CRIME_RE_IDLE_E_IRQ:
516 case CRIME_SOFT0_IRQ ... CRIME_SOFT2_IRQ: 527 case CRIME_SOFT0_IRQ ... CRIME_SOFT2_IRQ:
517 set_irq_chip(irq, &crime_edge_interrupt); 528 set_irq_chip_and_handler_name(irq,
529 &crime_edge_interrupt, handle_edge_irq, "edge");
518 break; 530 break;
531
519 case CRIME_VICE_IRQ: 532 case CRIME_VICE_IRQ:
520 set_irq_chip(irq, &crime_edge_interrupt); 533 set_irq_chip_and_handler_name(irq,
534 &crime_edge_interrupt, handle_edge_irq, "edge");
535 break;
536
537 case MACEISA_PARALLEL_IRQ:
538 case MACEISA_SERIAL1_TDMAPR_IRQ:
539 case MACEISA_SERIAL2_TDMAPR_IRQ:
540 set_irq_chip_and_handler_name(irq,
541 &ip32_maceisa_edge_interrupt, handle_edge_irq,
542 "edge");
521 break; 543 break;
544
522 default: 545 default:
523 set_irq_chip(irq, &ip32_maceisa_interrupt); 546 set_irq_chip_and_handler_name(irq,
547 &ip32_maceisa_level_interrupt, handle_level_irq,
548 "level");
524 break; 549 break;
525 } 550 }
526 } 551 }
diff --git a/arch/mips/sgi-ip32/ip32-memory.c b/arch/mips/sgi-ip32/ip32-memory.c
index ca93ecf825ae..828ce131c228 100644
--- a/arch/mips/sgi-ip32/ip32-memory.c
+++ b/arch/mips/sgi-ip32/ip32-memory.c
@@ -36,7 +36,7 @@ void __init prom_meminit(void)
36 if (base + size > (256 << 20)) 36 if (base + size > (256 << 20))
37 base += CRIME_HI_MEM_BASE; 37 base += CRIME_HI_MEM_BASE;
38 38
39 printk("CRIME MC: bank %u base 0x%016lx size %luMiB\n", 39 printk("CRIME MC: bank %u base 0x%016Lx size %LuMiB\n",
40 bank, base, size >> 20); 40 bank, base, size >> 20);
41 add_memory_region(base, size, BOOT_MEM_RAM); 41 add_memory_region(base, size, BOOT_MEM_RAM);
42 } 42 }
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 12b465d404df..352352b3cb2f 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -236,7 +236,7 @@ void __init init_bcm1480_irqs(void)
236 int i; 236 int i;
237 237
238 for (i = 0; i < BCM1480_NR_IRQS; i++) { 238 for (i = 0; i < BCM1480_NR_IRQS; i++) {
239 set_irq_chip(i, &bcm1480_irq_type); 239 set_irq_chip_and_handler(i, &bcm1480_irq_type, handle_level_irq);
240 bcm1480_irq_owner[i] = 0; 240 bcm1480_irq_owner[i] = 0;
241 } 241 }
242} 242}
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 808ac2959b8c..c08ff582da6f 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -220,7 +220,7 @@ void __init init_sb1250_irqs(void)
220 int i; 220 int i;
221 221
222 for (i = 0; i < SB1250_NR_IRQS; i++) { 222 for (i = 0; i < SB1250_NR_IRQS; i++) {
223 set_irq_chip(i, &sb1250_irq_type); 223 set_irq_chip_and_handler(i, &sb1250_irq_type, handle_level_irq);
224 sb1250_irq_owner[i] = 0; 224 sb1250_irq_owner[i] = 0;
225 } 225 }
226} 226}
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index 3f8cf5eb2f06..7dd76fb3b645 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -219,7 +219,7 @@ void __init sni_a20r_irq_init(void)
219 int i; 219 int i;
220 220
221 for (i = SNI_A20R_IRQ_BASE + 2 ; i < SNI_A20R_IRQ_BASE + 8; i++) 221 for (i = SNI_A20R_IRQ_BASE + 2 ; i < SNI_A20R_IRQ_BASE + 8; i++)
222 set_irq_chip(i, &a20r_irq_type); 222 set_irq_chip_and_handler(i, &a20r_irq_type, handle_level_irq);
223 sni_hwint = a20r_hwint; 223 sni_hwint = a20r_hwint;
224 change_c0_status(ST0_IM, IE_IRQ0); 224 change_c0_status(ST0_IM, IE_IRQ0);
225 setup_irq(SNI_A20R_IRQ_BASE + 3, &sni_isa_irq); 225 setup_irq(SNI_A20R_IRQ_BASE + 3, &sni_isa_irq);
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c
index 834650f371e0..74e6c67982fb 100644
--- a/arch/mips/sni/pcimt.c
+++ b/arch/mips/sni/pcimt.c
@@ -304,7 +304,7 @@ void __init sni_pcimt_irq_init(void)
304 mips_cpu_irq_init(); 304 mips_cpu_irq_init();
305 /* Actually we've got more interrupts to handle ... */ 305 /* Actually we've got more interrupts to handle ... */
306 for (i = PCIMT_IRQ_INT2; i <= PCIMT_IRQ_SCSI; i++) 306 for (i = PCIMT_IRQ_INT2; i <= PCIMT_IRQ_SCSI; i++)
307 set_irq_chip(i, &pcimt_irq_type); 307 set_irq_chip_and_handler(i, &pcimt_irq_type, handle_level_irq);
308 sni_hwint = sni_pcimt_hwint; 308 sni_hwint = sni_pcimt_hwint;
309 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3); 309 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
310} 310}
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index e5f12cf96e8e..071a9573ac7f 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -246,7 +246,7 @@ void __init sni_pcit_irq_init(void)
246 246
247 mips_cpu_irq_init(); 247 mips_cpu_irq_init();
248 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++) 248 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
249 set_irq_chip(i, &pcit_irq_type); 249 set_irq_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
250 *(volatile u32 *)SNI_PCIT_INT_REG = 0; 250 *(volatile u32 *)SNI_PCIT_INT_REG = 0;
251 sni_hwint = sni_pcit_hwint; 251 sni_hwint = sni_pcit_hwint;
252 change_c0_status(ST0_IM, IE_IRQ1); 252 change_c0_status(ST0_IM, IE_IRQ1);
@@ -259,7 +259,7 @@ void __init sni_pcit_cplus_irq_init(void)
259 259
260 mips_cpu_irq_init(); 260 mips_cpu_irq_init();
261 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++) 261 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
262 set_irq_chip(i, &pcit_irq_type); 262 set_irq_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
263 *(volatile u32 *)SNI_PCIT_INT_REG = 0x40000000; 263 *(volatile u32 *)SNI_PCIT_INT_REG = 0x40000000;
264 sni_hwint = sni_pcit_hwint_cplus; 264 sni_hwint = sni_pcit_hwint_cplus;
265 change_c0_status(ST0_IM, IE_IRQ0); 265 change_c0_status(ST0_IM, IE_IRQ0);
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c
index 5310aa75afa4..5e687819cbc2 100644
--- a/arch/mips/sni/rm200.c
+++ b/arch/mips/sni/rm200.c
@@ -359,7 +359,8 @@ void sni_rm200_init_8259A(void)
359 * IRQ2 is cascade interrupt to second interrupt controller 359 * IRQ2 is cascade interrupt to second interrupt controller
360 */ 360 */
361static struct irqaction sni_rm200_irq2 = { 361static struct irqaction sni_rm200_irq2 = {
362 no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL 362 .handler = no_action,
363 .name = "cascade",
363}; 364};
364 365
365static struct resource sni_rm200_pic1_resource = { 366static struct resource sni_rm200_pic1_resource = {
@@ -487,7 +488,7 @@ void __init sni_rm200_irq_init(void)
487 mips_cpu_irq_init(); 488 mips_cpu_irq_init();
488 /* Actually we've got more interrupts to handle ... */ 489 /* Actually we've got more interrupts to handle ... */
489 for (i = SNI_RM200_INT_START; i <= SNI_RM200_INT_END; i++) 490 for (i = SNI_RM200_INT_START; i <= SNI_RM200_INT_END; i++)
490 set_irq_chip(i, &rm200_irq_type); 491 set_irq_chip_and_handler(i, &rm200_irq_type, handle_level_irq);
491 sni_hwint = sni_rm200_hwint; 492 sni_hwint = sni_rm200_hwint;
492 change_c0_status(ST0_IM, IE_IRQ0); 493 change_c0_status(ST0_IM, IE_IRQ0);
493 setup_irq(SNI_RM200_INT_START + 0, &sni_rm200_i8259A_irq); 494 setup_irq(SNI_RM200_INT_START + 0, &sni_rm200_i8259A_irq);
diff --git a/arch/mips/txx9/Kconfig b/arch/mips/txx9/Kconfig
index 226e8bb2f0a1..0db7cf38ed8b 100644
--- a/arch/mips/txx9/Kconfig
+++ b/arch/mips/txx9/Kconfig
@@ -20,7 +20,6 @@ config MACH_TXX9
20 select SYS_SUPPORTS_32BIT_KERNEL 20 select SYS_SUPPORTS_32BIT_KERNEL
21 select SYS_SUPPORTS_LITTLE_ENDIAN 21 select SYS_SUPPORTS_LITTLE_ENDIAN
22 select SYS_SUPPORTS_BIG_ENDIAN 22 select SYS_SUPPORTS_BIG_ENDIAN
23 select GENERIC_HARDIRQS_NO__DO_IRQ
24 23
25config TOSHIBA_JMR3927 24config TOSHIBA_JMR3927
26 bool "Toshiba JMR-TX3927 board" 25 bool "Toshiba JMR-TX3927 board"
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index a13a08b8c9ec..8a266c6a3f58 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -32,6 +32,7 @@
32#include <asm/txx9/generic.h> 32#include <asm/txx9/generic.h>
33#include <asm/txx9/pci.h> 33#include <asm/txx9/pci.h>
34#include <asm/txx9tmr.h> 34#include <asm/txx9tmr.h>
35#include <asm/txx9/ndfmc.h>
35#ifdef CONFIG_CPU_TX49XX 36#ifdef CONFIG_CPU_TX49XX
36#include <asm/txx9/tx4938.h> 37#include <asm/txx9/tx4938.h>
37#endif 38#endif
@@ -691,6 +692,26 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr,
691#endif 692#endif
692} 693}
693 694
695void __init txx9_ndfmc_init(unsigned long baseaddr,
696 const struct txx9ndfmc_platform_data *pdata)
697{
698#if defined(CONFIG_MTD_NAND_TXX9NDFMC) || \
699 defined(CONFIG_MTD_NAND_TXX9NDFMC_MODULE)
700 struct resource res = {
701 .start = baseaddr,
702 .end = baseaddr + 0x1000 - 1,
703 .flags = IORESOURCE_MEM,
704 };
705 struct platform_device *pdev = platform_device_alloc("txx9ndfmc", -1);
706
707 if (!pdev ||
708 platform_device_add_resources(pdev, &res, 1) ||
709 platform_device_add_data(pdev, pdata, sizeof(*pdata)) ||
710 platform_device_add(pdev))
711 platform_device_put(pdev);
712#endif
713}
714
694#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 715#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
695static DEFINE_SPINLOCK(txx9_iocled_lock); 716static DEFINE_SPINLOCK(txx9_iocled_lock);
696 717
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index 25819ff1c350..f0844f891f0b 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -23,6 +23,7 @@
23#include <asm/txx9tmr.h> 23#include <asm/txx9tmr.h>
24#include <asm/txx9pio.h> 24#include <asm/txx9pio.h>
25#include <asm/txx9/generic.h> 25#include <asm/txx9/generic.h>
26#include <asm/txx9/ndfmc.h>
26#include <asm/txx9/tx4938.h> 27#include <asm/txx9/tx4938.h>
27 28
28static void __init tx4938_wdr_init(void) 29static void __init tx4938_wdr_init(void)
@@ -382,6 +383,26 @@ void __init tx4938_ata_init(unsigned int irq, unsigned int shift, int tune)
382 platform_device_put(pdev); 383 platform_device_put(pdev);
383} 384}
384 385
386void __init tx4938_ndfmc_init(unsigned int hold, unsigned int spw)
387{
388 struct txx9ndfmc_platform_data plat_data = {
389 .shift = 1,
390 .gbus_clock = txx9_gbus_clock,
391 .hold = hold,
392 .spw = spw,
393 .ch_mask = 1,
394 };
395 unsigned long baseaddr = TX4938_NDFMC_REG & 0xfffffffffULL;
396
397#ifdef __BIG_ENDIAN
398 baseaddr += 4;
399#endif
400 if ((__raw_readq(&tx4938_ccfgptr->pcfg) &
401 (TX4938_PCFG_ATA_SEL|TX4938_PCFG_ISA_SEL|TX4938_PCFG_NDF_SEL)) ==
402 TX4938_PCFG_NDF_SEL)
403 txx9_ndfmc_init(baseaddr, &plat_data);
404}
405
385static void __init tx4938_stop_unused_modules(void) 406static void __init tx4938_stop_unused_modules(void)
386{ 407{
387 __u64 pcfg, rst = 0, ckd = 0; 408 __u64 pcfg, rst = 0, ckd = 0;
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c
index 55440967b3a8..7a25b573e9b0 100644
--- a/arch/mips/txx9/generic/setup_tx4939.c
+++ b/arch/mips/txx9/generic/setup_tx4939.c
@@ -27,6 +27,7 @@
27#include <asm/txx9irq.h> 27#include <asm/txx9irq.h>
28#include <asm/txx9tmr.h> 28#include <asm/txx9tmr.h>
29#include <asm/txx9/generic.h> 29#include <asm/txx9/generic.h>
30#include <asm/txx9/ndfmc.h>
30#include <asm/txx9/tx4939.h> 31#include <asm/txx9/tx4939.h>
31 32
32static void __init tx4939_wdr_init(void) 33static void __init tx4939_wdr_init(void)
@@ -457,6 +458,22 @@ void __init tx4939_rtc_init(void)
457 platform_device_register(&rtc_dev); 458 platform_device_register(&rtc_dev);
458} 459}
459 460
461void __init tx4939_ndfmc_init(unsigned int hold, unsigned int spw,
462 unsigned char ch_mask, unsigned char wide_mask)
463{
464 struct txx9ndfmc_platform_data plat_data = {
465 .shift = 1,
466 .gbus_clock = txx9_gbus_clock,
467 .hold = hold,
468 .spw = spw,
469 .flags = NDFMC_PLAT_FLAG_NO_RSTR | NDFMC_PLAT_FLAG_HOLDADD |
470 NDFMC_PLAT_FLAG_DUMMYWRITE,
471 .ch_mask = ch_mask,
472 .wide_mask = wide_mask,
473 };
474 txx9_ndfmc_init(TX4939_NDFMC_REG & 0xfffffffffULL, &plat_data);
475}
476
460static void __init tx4939_stop_unused_modules(void) 477static void __init tx4939_stop_unused_modules(void)
461{ 478{
462 __u64 pcfg, rst = 0, ckd = 0; 479 __u64 pcfg, rst = 0, ckd = 0;
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c
index 547ff2920bf0..65d13df8878a 100644
--- a/arch/mips/txx9/rbtx4938/setup.c
+++ b/arch/mips/txx9/rbtx4938/setup.c
@@ -352,6 +352,8 @@ static void __init rbtx4938_device_init(void)
352 rbtx4938_ne_init(); 352 rbtx4938_ne_init();
353 tx4938_wdt_init(); 353 tx4938_wdt_init();
354 rbtx4938_mtd_init(); 354 rbtx4938_mtd_init();
355 /* TC58DVM82A1FT: tDH=10ns, tWP=tRP=tREADID=35ns */
356 tx4938_ndfmc_init(10, 35);
355 tx4938_ata_init(RBTX4938_IRQ_IOC_ATA, 0, 1); 357 tx4938_ata_init(RBTX4938_IRQ_IOC_ATA, 0, 1);
356 txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL); 358 txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL);
357} 359}
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c
index 656603b85b71..011e1e332f47 100644
--- a/arch/mips/txx9/rbtx4939/setup.c
+++ b/arch/mips/txx9/rbtx4939/setup.c
@@ -16,6 +16,9 @@
16#include <linux/leds.h> 16#include <linux/leds.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/smc91x.h> 18#include <linux/smc91x.h>
19#include <linux/mtd/mtd.h>
20#include <linux/mtd/partitions.h>
21#include <linux/mtd/map.h>
19#include <asm/reboot.h> 22#include <asm/reboot.h>
20#include <asm/txx9/generic.h> 23#include <asm/txx9/generic.h>
21#include <asm/txx9/pci.h> 24#include <asm/txx9/pci.h>
@@ -282,6 +285,159 @@ static void rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
282 __rbtx4939_7segled_putc(pos, val); 285 __rbtx4939_7segled_putc(pos, val);
283} 286}
284 287
288#if defined(CONFIG_MTD_RBTX4939) || defined(CONFIG_MTD_RBTX4939_MODULE)
289/* special mapping for boot rom */
290static unsigned long rbtx4939_flash_fixup_ofs(unsigned long ofs)
291{
292 u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
293 unsigned char shift;
294
295 if (bdipsw & 8) {
296 /* BOOT Mode: USER ROM1 / USER ROM2 */
297 shift = bdipsw & 3;
298 /* rotate A[23:22] */
299 return (ofs & ~0xc00000) | ((((ofs >> 22) + shift) & 3) << 22);
300 }
301#ifdef __BIG_ENDIAN
302 if (bdipsw == 0)
303 /* BOOT Mode: Monitor ROM */
304 ofs ^= 0x400000; /* swap A[22] */
305#endif
306 return ofs;
307}
308
309static map_word rbtx4939_flash_read16(struct map_info *map, unsigned long ofs)
310{
311 map_word r;
312
313 ofs = rbtx4939_flash_fixup_ofs(ofs);
314 r.x[0] = __raw_readw(map->virt + ofs);
315 return r;
316}
317
318static void rbtx4939_flash_write16(struct map_info *map, const map_word datum,
319 unsigned long ofs)
320{
321 ofs = rbtx4939_flash_fixup_ofs(ofs);
322 __raw_writew(datum.x[0], map->virt + ofs);
323 mb(); /* see inline_map_write() in mtd/map.h */
324}
325
326static void rbtx4939_flash_copy_from(struct map_info *map, void *to,
327 unsigned long from, ssize_t len)
328{
329 u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
330 unsigned char shift;
331 ssize_t curlen;
332
333 from += (unsigned long)map->virt;
334 if (bdipsw & 8) {
335 /* BOOT Mode: USER ROM1 / USER ROM2 */
336 shift = bdipsw & 3;
337 while (len) {
338 curlen = min_t(unsigned long, len,
339 0x400000 - (from & (0x400000 - 1)));
340 memcpy(to,
341 (void *)((from & ~0xc00000) |
342 ((((from >> 22) + shift) & 3) << 22)),
343 curlen);
344 len -= curlen;
345 from += curlen;
346 to += curlen;
347 }
348 return;
349 }
350#ifdef __BIG_ENDIAN
351 if (bdipsw == 0) {
352 /* BOOT Mode: Monitor ROM */
353 while (len) {
354 curlen = min_t(unsigned long, len,
355 0x400000 - (from & (0x400000 - 1)));
356 memcpy(to, (void *)(from ^ 0x400000), curlen);
357 len -= curlen;
358 from += curlen;
359 to += curlen;
360 }
361 return;
362 }
363#endif
364 memcpy(to, (void *)from, len);
365}
366
367static void rbtx4939_flash_map_init(struct map_info *map)
368{
369 map->read = rbtx4939_flash_read16;
370 map->write = rbtx4939_flash_write16;
371 map->copy_from = rbtx4939_flash_copy_from;
372}
373
374static void __init rbtx4939_mtd_init(void)
375{
376 static struct {
377 struct platform_device dev;
378 struct resource res;
379 struct rbtx4939_flash_data data;
380 } pdevs[4];
381 int i;
382 static char names[4][8];
383 static struct mtd_partition parts[4];
384 struct rbtx4939_flash_data *boot_pdata = &pdevs[0].data;
385 u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
386
387 if (bdipsw & 8) {
388 /* BOOT Mode: USER ROM1 / USER ROM2 */
389 boot_pdata->nr_parts = 4;
390 for (i = 0; i < boot_pdata->nr_parts; i++) {
391 sprintf(names[i], "img%d", 4 - i);
392 parts[i].name = names[i];
393 parts[i].size = 0x400000;
394 parts[i].offset = MTDPART_OFS_NXTBLK;
395 }
396 } else if (bdipsw == 0) {
397 /* BOOT Mode: Monitor ROM */
398 boot_pdata->nr_parts = 2;
399 strcpy(names[0], "big");
400 strcpy(names[1], "little");
401 for (i = 0; i < boot_pdata->nr_parts; i++) {
402 parts[i].name = names[i];
403 parts[i].size = 0x400000;
404 parts[i].offset = MTDPART_OFS_NXTBLK;
405 }
406 } else {
407 /* BOOT Mode: ROM Emulator */
408 boot_pdata->nr_parts = 2;
409 parts[0].name = "boot";
410 parts[0].offset = 0xc00000;
411 parts[0].size = 0x400000;
412 parts[1].name = "user";
413 parts[1].offset = 0;
414 parts[1].size = 0xc00000;
415 }
416 boot_pdata->parts = parts;
417 boot_pdata->map_init = rbtx4939_flash_map_init;
418
419 for (i = 0; i < ARRAY_SIZE(pdevs); i++) {
420 struct resource *r = &pdevs[i].res;
421 struct platform_device *dev = &pdevs[i].dev;
422
423 r->start = 0x1f000000 - i * 0x1000000;
424 r->end = r->start + 0x1000000 - 1;
425 r->flags = IORESOURCE_MEM;
426 pdevs[i].data.width = 2;
427 dev->num_resources = 1;
428 dev->resource = r;
429 dev->id = i;
430 dev->name = "rbtx4939-flash";
431 dev->dev.platform_data = &pdevs[i].data;
432 platform_device_register(dev);
433 }
434}
435#else
436static void __init rbtx4939_mtd_init(void)
437{
438}
439#endif
440
285static void __init rbtx4939_arch_init(void) 441static void __init rbtx4939_arch_init(void)
286{ 442{
287 rbtx4939_pci_setup(); 443 rbtx4939_pci_setup();
@@ -333,6 +489,11 @@ static void __init rbtx4939_device_init(void)
333 platform_device_add_data(pdev, &smc_pdata, sizeof(smc_pdata)) || 489 platform_device_add_data(pdev, &smc_pdata, sizeof(smc_pdata)) ||
334 platform_device_add(pdev)) 490 platform_device_add(pdev))
335 platform_device_put(pdev); 491 platform_device_put(pdev);
492 rbtx4939_mtd_init();
493 /* TC58DVM82A1FT: tDH=10ns, tWP=tRP=tREADID=35ns */
494 tx4939_ndfmc_init(10, 35,
495 (1 << 1) | (1 << 2),
496 (1 << 2)); /* ch1:8bit, ch2:16bit */
336 rbtx4939_led_setup(); 497 rbtx4939_led_setup();
337 tx4939_wdt_init(); 498 tx4939_wdt_init();
338 tx4939_ata_init(); 499 tx4939_ata_init();
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index 92dd1a0ca352..9cc389109b19 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -32,7 +32,6 @@ static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned;
32 32
33static struct irqaction cascade_irqaction = { 33static struct irqaction cascade_irqaction = {
34 .handler = no_action, 34 .handler = no_action,
35 .mask = CPU_MASK_NONE,
36 .name = "cascade", 35 .name = "cascade",
37}; 36};
38 37
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index b28c9a60445b..234cf344cdce 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -193,7 +193,7 @@ void prepare_to_copy(struct task_struct *tsk)
193 * set up the kernel stack for a new thread and copy arch-specific thread 193 * set up the kernel stack for a new thread and copy arch-specific thread
194 * control information 194 * control information
195 */ 195 */
196int copy_thread(int nr, unsigned long clone_flags, 196int copy_thread(unsigned long clone_flags,
197 unsigned long c_usp, unsigned long ustk_size, 197 unsigned long c_usp, unsigned long ustk_size,
198 struct task_struct *p, struct pt_regs *kregs) 198 struct task_struct *p, struct pt_regs *kregs)
199{ 199{
diff --git a/arch/mn10300/kernel/time.c b/arch/mn10300/kernel/time.c
index e4606586f94c..395caf01b909 100644
--- a/arch/mn10300/kernel/time.c
+++ b/arch/mn10300/kernel/time.c
@@ -37,7 +37,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id);
37static struct irqaction timer_irq = { 37static struct irqaction timer_irq = {
38 .handler = timer_interrupt, 38 .handler = timer_interrupt,
39 .flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER, 39 .flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER,
40 .mask = CPU_MASK_NONE,
41 .name = "timer", 40 .name = "timer",
42}; 41};
43 42
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index aacf11d33723..9038f39d9d73 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -9,9 +9,13 @@ config PARISC
9 def_bool y 9 def_bool y
10 select HAVE_IDE 10 select HAVE_IDE
11 select HAVE_OPROFILE 11 select HAVE_OPROFILE
12 select HAVE_FUNCTION_TRACER if 64BIT
13 select HAVE_FUNCTION_GRAPH_TRACER if 64BIT
14 select HAVE_FUNCTION_TRACE_MCOUNT_TEST if 64BIT
12 select RTC_CLASS 15 select RTC_CLASS
13 select RTC_DRV_PARISC 16 select RTC_DRV_GENERIC
14 select INIT_ALL_POSSIBLE 17 select INIT_ALL_POSSIBLE
18 select BUG
15 help 19 help
16 The PA-RISC microprocessor is designed by Hewlett-Packard and used 20 The PA-RISC microprocessor is designed by Hewlett-Packard and used
17 in many of their workstations & servers (HP9000 700 and 800 series, 21 in many of their workstations & servers (HP9000 700 and 800 series,
@@ -75,6 +79,9 @@ config GENERIC_HARDIRQS
75config GENERIC_IRQ_PROBE 79config GENERIC_IRQ_PROBE
76 def_bool y 80 def_bool y
77 81
82config HAVE_LATENCYTOP_SUPPORT
83 def_bool y
84
78config IRQ_PER_CPU 85config IRQ_PER_CPU
79 bool 86 bool
80 default y 87 default y
@@ -83,6 +90,9 @@ config IRQ_PER_CPU
83config PM 90config PM
84 bool 91 bool
85 92
93config STACKTRACE_SUPPORT
94 def_bool y
95
86config ISA_DMA_API 96config ISA_DMA_API
87 bool 97 bool
88 98
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 0d428278356d..da6f66901c92 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -56,7 +56,9 @@ cflags-y += -mdisable-fpregs
56 56
57# Without this, "ld -r" results in .text sections that are too big 57# Without this, "ld -r" results in .text sections that are too big
58# (> 0x40000) for branches to reach stubs. 58# (> 0x40000) for branches to reach stubs.
59cflags-y += -ffunction-sections 59ifndef CONFIG_FUNCTION_TRACER
60 cflags-y += -ffunction-sections
61endif
60 62
61# select which processor to optimise for 63# select which processor to optimise for
62cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100 64cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index edbfe25c5fc1..ada3e5364d82 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -25,7 +25,7 @@
25 * Since "a" is usually an address, use one spinlock per cacheline. 25 * Since "a" is usually an address, use one spinlock per cacheline.
26 */ 26 */
27# define ATOMIC_HASH_SIZE 4 27# define ATOMIC_HASH_SIZE 4
28# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ])) 28# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) (a))/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
29 29
30extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; 30extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
31 31
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
222 222
223#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 223#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
224 224
225#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v)))) 225#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v))))
226#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v)))) 226#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v))))
227#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) 227#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
228#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) 228#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
229 229
230#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v))) 230#define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v)))
231#define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v))) 231#define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v)))
232#define atomic_inc_return(v) (__atomic_add_return( 1,(v))) 232#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
233#define atomic_dec_return(v) (__atomic_add_return( -1,(v))) 233#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
234 234
@@ -289,13 +289,13 @@ atomic64_read(const atomic64_t *v)
289 return v->counter; 289 return v->counter;
290} 290}
291 291
292#define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v)))) 292#define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)(i)),(v))))
293#define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v)))) 293#define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)(i)),(v))))
294#define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v)))) 294#define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v))))
295#define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v)))) 295#define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v))))
296 296
297#define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v))) 297#define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)(i)),(v)))
298#define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v))) 298#define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)(i)),(v)))
299#define atomic64_inc_return(v) (__atomic64_add_return( 1,(v))) 299#define atomic64_inc_return(v) (__atomic64_add_return( 1,(v)))
300#define atomic64_dec_return(v) (__atomic64_add_return( -1,(v))) 300#define atomic64_dec_return(v) (__atomic64_add_return( -1,(v)))
301 301
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index b7ca6dc7fddc..724395143f26 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -97,6 +97,9 @@ void mark_rodata_ro(void);
97 97
98#ifdef CONFIG_PA8X00 98#ifdef CONFIG_PA8X00
99/* Only pa8800, pa8900 needs this */ 99/* Only pa8800, pa8900 needs this */
100
101#include <asm/kmap_types.h>
102
100#define ARCH_HAS_KMAP 103#define ARCH_HAS_KMAP
101 104
102void kunmap_parisc(void *addr); 105void kunmap_parisc(void *addr);
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
index 7fa675799e6d..9c802eb4be84 100644
--- a/arch/parisc/include/asm/elf.h
+++ b/arch/parisc/include/asm/elf.h
@@ -168,6 +168,16 @@ typedef struct elf64_fdesc {
168 __u64 gp; 168 __u64 gp;
169} Elf64_Fdesc; 169} Elf64_Fdesc;
170 170
171#ifdef __KERNEL__
172
173#ifdef CONFIG_64BIT
174#define Elf_Fdesc Elf64_Fdesc
175#else
176#define Elf_Fdesc Elf32_Fdesc
177#endif /*CONFIG_64BIT*/
178
179#endif /*__KERNEL__*/
180
171/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ 181/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
172 182
173#define PT_HP_TLS (PT_LOOS + 0x0) 183#define PT_HP_TLS (PT_LOOS + 0x0)
diff --git a/arch/parisc/include/asm/ftrace.h b/arch/parisc/include/asm/ftrace.h
new file mode 100644
index 000000000000..2fa05dd6aeee
--- /dev/null
+++ b/arch/parisc/include/asm/ftrace.h
@@ -0,0 +1,25 @@
1#ifndef _ASM_PARISC_FTRACE_H
2#define _ASM_PARISC_FTRACE_H
3
4#ifndef __ASSEMBLY__
5extern void mcount(void);
6
7/*
8 * Stack of return addresses for functions of a thread.
9 * Used in struct thread_info
10 */
11struct ftrace_ret_stack {
12 unsigned long ret;
13 unsigned long func;
14 unsigned long long calltime;
15};
16
17/*
18 * Primary handler of a function return.
19 * It relays on ftrace_return_to_handler.
20 * Defined in entry.S
21 */
22extern void return_to_handler(void);
23#endif /* __ASSEMBLY__ */
24
25#endif /* _ASM_PARISC_FTRACE_H */
diff --git a/arch/parisc/include/asm/page.h b/arch/parisc/include/asm/page.h
index c3941f09a878..7bc5125d7d4c 100644
--- a/arch/parisc/include/asm/page.h
+++ b/arch/parisc/include/asm/page.h
@@ -36,16 +36,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
36 */ 36 */
37#define STRICT_MM_TYPECHECKS 37#define STRICT_MM_TYPECHECKS
38#ifdef STRICT_MM_TYPECHECKS 38#ifdef STRICT_MM_TYPECHECKS
39typedef struct { unsigned long pte; 39typedef struct { unsigned long pte; } pte_t; /* either 32 or 64bit */
40#if !defined(CONFIG_64BIT)
41 unsigned long future_flags;
42 /* XXX: it's possible to remove future_flags and change BITS_PER_PTE_ENTRY
43 to 2, but then strangely the identical 32bit kernel boots on a
44 c3000(pa20), but not any longer on a 715(pa11).
45 Still investigating... HelgeD.
46 */
47#endif
48} pte_t; /* either 32 or 64bit */
49 40
50/* NOTE: even on 64 bits, these entries are __u32 because we allocate 41/* NOTE: even on 64 bits, these entries are __u32 because we allocate
51 * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ 42 * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */
@@ -111,7 +102,7 @@ extern int npmem_ranges;
111#define BITS_PER_PMD_ENTRY 2 102#define BITS_PER_PMD_ENTRY 2
112#define BITS_PER_PGD_ENTRY 2 103#define BITS_PER_PGD_ENTRY 2
113#else 104#else
114#define BITS_PER_PTE_ENTRY 3 105#define BITS_PER_PTE_ENTRY 2
115#define BITS_PER_PMD_ENTRY 2 106#define BITS_PER_PMD_ENTRY 2
116#define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY 107#define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY
117#endif 108#endif
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index 430f1aeea0b8..4ca510b3c6f8 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -49,6 +49,8 @@
49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ 49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ 50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */
51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ 51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
52#define PDC_MODEL_OS64 (1 << 0)
53#define PDC_MODEL_OS32 (1 << 1)
52#define PDC_MODEL_IOPDIR_FDC (1 << 2) 54#define PDC_MODEL_IOPDIR_FDC (1 << 2)
53#define PDC_MODEL_NVA_MASK (3 << 4) 55#define PDC_MODEL_NVA_MASK (3 << 4)
54#define PDC_MODEL_NVA_SUPPORTED (0 << 4) 56#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
@@ -341,6 +343,8 @@
341 343
342#ifdef __KERNEL__ 344#ifdef __KERNEL__
343 345
346#include <asm/page.h> /* for __PAGE_OFFSET */
347
344extern int pdc_type; 348extern int pdc_type;
345 349
346/* Values for pdc_type */ 350/* Values for pdc_type */
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index 470a4b88124d..a27d2e200fb2 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -50,11 +50,7 @@
50 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) 50 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
51 51
52/* This is the size of the initially mapped kernel memory */ 52/* This is the size of the initially mapped kernel memory */
53#ifdef CONFIG_64BIT
54#define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ 53#define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */
55#else
56#define KERNEL_INITIAL_ORDER 23 /* 0 to 1<<23 = 8MB */
57#endif
58#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) 54#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER)
59 55
60#if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) 56#if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB)
@@ -91,16 +87,25 @@
91 87
92/* Definitions for 1st level */ 88/* Definitions for 1st level */
93#define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD) 89#define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD)
90#if (PGDIR_SHIFT + PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG
91#define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT)
92#else
94#define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) 93#define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY)
94#endif
95#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 95#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
96#define PGDIR_MASK (~(PGDIR_SIZE-1)) 96#define PGDIR_MASK (~(PGDIR_SIZE-1))
97#define PTRS_PER_PGD (1UL << BITS_PER_PGD) 97#define PTRS_PER_PGD (1UL << BITS_PER_PGD)
98#define USER_PTRS_PER_PGD PTRS_PER_PGD 98#define USER_PTRS_PER_PGD PTRS_PER_PGD
99 99
100#ifdef CONFIG_64BIT
100#define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) 101#define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD)
101#define MAX_ADDRESS (1UL << MAX_ADDRBITS) 102#define MAX_ADDRESS (1UL << MAX_ADDRBITS)
102
103#define SPACEID_SHIFT (MAX_ADDRBITS - 32) 103#define SPACEID_SHIFT (MAX_ADDRBITS - 32)
104#else
105#define MAX_ADDRBITS (BITS_PER_LONG)
106#define MAX_ADDRESS (1UL << MAX_ADDRBITS)
107#define SPACEID_SHIFT 0
108#endif
104 109
105/* This calculates the number of initial pages we need for the initial 110/* This calculates the number of initial pages we need for the initial
106 * page tables */ 111 * page tables */
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h
index 6ef4b7867b1b..21eb45a52629 100644
--- a/arch/parisc/include/asm/smp.h
+++ b/arch/parisc/include/asm/smp.h
@@ -29,7 +29,8 @@ extern void smp_send_reschedule(int cpu);
29extern void smp_send_all_nop(void); 29extern void smp_send_all_nop(void);
30 30
31extern void arch_send_call_function_single_ipi(int cpu); 31extern void arch_send_call_function_single_ipi(int cpu);
32extern void arch_send_call_function_ipi(cpumask_t mask); 32extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
33#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
33 34
34#endif /* !ASSEMBLY */ 35#endif /* !ASSEMBLY */
35 36
diff --git a/arch/parisc/include/asm/spinlock.h b/arch/parisc/include/asm/spinlock.h
index f3d2090a18dc..fae03e136fa8 100644
--- a/arch/parisc/include/asm/spinlock.h
+++ b/arch/parisc/include/asm/spinlock.h
@@ -187,6 +187,9 @@ static __inline__ int __raw_write_can_lock(raw_rwlock_t *rw)
187 return !rw->counter; 187 return !rw->counter;
188} 188}
189 189
190#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
191#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
192
190#define _raw_spin_relax(lock) cpu_relax() 193#define _raw_spin_relax(lock) cpu_relax()
191#define _raw_read_relax(lock) cpu_relax() 194#define _raw_read_relax(lock) cpu_relax()
192#define _raw_write_relax(lock) cpu_relax() 195#define _raw_write_relax(lock) cpu_relax()
diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
index 016d3fc4111c..67db0722e6ca 100644
--- a/arch/parisc/kernel/Makefile
+++ b/arch/parisc/kernel/Makefile
@@ -11,10 +11,25 @@ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
11 process.o processor.o pdc_cons.o pdc_chassis.o unwind.o \ 11 process.o processor.o pdc_cons.o pdc_chassis.o unwind.o \
12 topology.o 12 topology.o
13 13
14ifdef CONFIG_FUNCTION_TRACER
15# Do not profile debug and lowlevel utilities
16CFLAGS_REMOVE_ftrace.o = -pg
17CFLAGS_REMOVE_cache.o = -pg
18CFLAGS_REMOVE_irq.o = -pg
19CFLAGS_REMOVE_pacache.o = -pg
20CFLAGS_REMOVE_perf.o = -pg
21CFLAGS_REMOVE_traps.o = -pg
22CFLAGS_REMOVE_unaligned.o = -pg
23CFLAGS_REMOVE_unwind.o = -pg
24endif
25
14obj-$(CONFIG_SMP) += smp.o 26obj-$(CONFIG_SMP) += smp.o
15obj-$(CONFIG_PA11) += pci-dma.o 27obj-$(CONFIG_PA11) += pci-dma.o
16obj-$(CONFIG_PCI) += pci.o 28obj-$(CONFIG_PCI) += pci.o
17obj-$(CONFIG_MODULES) += module.o 29obj-$(CONFIG_MODULES) += module.o
18obj-$(CONFIG_64BIT) += binfmt_elf32.o sys_parisc32.o signal32.o 30obj-$(CONFIG_64BIT) += binfmt_elf32.o sys_parisc32.o signal32.o
31obj-$(CONFIG_STACKTRACE)+= stacktrace.o
19# only supported for PCX-W/U in 64-bit mode at the moment 32# only supported for PCX-W/U in 64-bit mode at the moment
20obj-$(CONFIG_64BIT) += perf.o perf_asm.o 33obj-$(CONFIG_64BIT) += perf.o perf_asm.o
34obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o
35obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 0db9fdcb7709..ae3e70cd1e14 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -505,6 +505,18 @@
505 STREG \pte,0(\ptep) 505 STREG \pte,0(\ptep)
506 .endm 506 .endm
507 507
508 /* bitshift difference between a PFN (based on kernel's PAGE_SIZE)
509 * to a CPU TLB 4k PFN (4k => 12 bits to shift) */
510 #define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
511
512 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */
513 .macro convert_for_tlb_insert20 pte
514 extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
515 64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
516 depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
517 (63-58)+PAGE_ADD_SHIFT,\pte
518 .endm
519
508 /* Convert the pte and prot to tlb insertion values. How 520 /* Convert the pte and prot to tlb insertion values. How
509 * this happens is quite subtle, read below */ 521 * this happens is quite subtle, read below */
510 .macro make_insert_tlb spc,pte,prot 522 .macro make_insert_tlb spc,pte,prot
@@ -544,8 +556,7 @@
544 depi 1,12,1,\prot 556 depi 1,12,1,\prot
545 557
546 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ 558 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */
547 extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58),64-PAGE_SHIFT,\pte 559 convert_for_tlb_insert20 \pte
548 depdi _PAGE_SIZE_ENCODING_DEFAULT,63,63-58,\pte
549 .endm 560 .endm
550 561
551 /* Identical macro to make_insert_tlb above, except it 562 /* Identical macro to make_insert_tlb above, except it
@@ -563,8 +574,8 @@
563 574
564 /* Get rid of prot bits and convert to page addr for iitlba */ 575 /* Get rid of prot bits and convert to page addr for iitlba */
565 576
566 depi _PAGE_SIZE_ENCODING_DEFAULT,31,ASM_PFN_PTE_SHIFT,\pte 577 depi 0,31,ASM_PFN_PTE_SHIFT,\pte
567 extru \pte,24,25,\pte 578 SHRREG \pte,(ASM_PFN_PTE_SHIFT-(31-26)),\pte
568 .endm 579 .endm
569 580
570 /* This is for ILP32 PA2.0 only. The TLB insertion needs 581 /* This is for ILP32 PA2.0 only. The TLB insertion needs
@@ -1244,10 +1255,9 @@ nadtlb_check_flush_20w:
1244 depdi,z 7,7,3,prot 1255 depdi,z 7,7,3,prot
1245 depdi 1,10,1,prot 1256 depdi 1,10,1,prot
1246 1257
1247 /* Get rid of prot bits and convert to page addr for idtlbt */ 1258 /* Drop prot bits from pte and convert to page addr for idtlbt */
1259 convert_for_tlb_insert20 pte
1248 1260
1249 depdi 0,63,12,pte
1250 extrd,u pte,56,52,pte
1251 idtlbt pte,prot 1261 idtlbt pte,prot
1252 1262
1253 rfir 1263 rfir
@@ -1337,8 +1347,8 @@ nadtlb_check_flush_11:
1337 1347
1338 /* Get rid of prot bits and convert to page addr for idtlba */ 1348 /* Get rid of prot bits and convert to page addr for idtlba */
1339 1349
1340 depi 0,31,12,pte 1350 depi 0,31,ASM_PFN_PTE_SHIFT,pte
1341 extru pte,24,25,pte 1351 SHRREG pte,(ASM_PFN_PTE_SHIFT-(31-26)),pte
1342 1352
1343 mfsp %sr1,t0 /* Save sr1 so we can use it in tlb inserts */ 1353 mfsp %sr1,t0 /* Save sr1 so we can use it in tlb inserts */
1344 mtsp spc,%sr1 1354 mtsp spc,%sr1
@@ -1403,10 +1413,9 @@ nadtlb_check_flush_20:
1403 depdi,z 7,7,3,prot 1413 depdi,z 7,7,3,prot
1404 depdi 1,10,1,prot 1414 depdi 1,10,1,prot
1405 1415
1406 /* Get rid of prot bits and convert to page addr for idtlbt */ 1416 /* Drop prot bits from pte and convert to page addr for idtlbt */
1417 convert_for_tlb_insert20 pte
1407 1418
1408 depdi 0,63,12,pte
1409 extrd,u pte,56,32,pte
1410 idtlbt pte,prot 1419 idtlbt pte,prot
1411 1420
1412 rfir 1421 rfir
@@ -2176,6 +2185,33 @@ syscall_do_resched:
2176ENDPROC(syscall_exit) 2185ENDPROC(syscall_exit)
2177 2186
2178 2187
2188#ifdef CONFIG_FUNCTION_TRACER
2189 .import ftrace_function_trampoline,code
2190ENTRY(_mcount)
2191 copy %r3, %arg2
2192 b ftrace_function_trampoline
2193 nop
2194ENDPROC(_mcount)
2195
2196ENTRY(return_to_handler)
2197 load32 return_trampoline, %rp
2198 copy %ret0, %arg0
2199 copy %ret1, %arg1
2200 b ftrace_return_to_handler
2201 nop
2202return_trampoline:
2203 copy %ret0, %rp
2204 copy %r23, %ret0
2205 copy %r24, %ret1
2206
2207.globl ftrace_stub
2208ftrace_stub:
2209 bv %r0(%rp)
2210 nop
2211ENDPROC(return_to_handler)
2212#endif /* CONFIG_FUNCTION_TRACER */
2213
2214
2179get_register: 2215get_register:
2180 /* 2216 /*
2181 * get_register is used by the non access tlb miss handlers to 2217 * get_register is used by the non access tlb miss handlers to
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index f6d241238a78..4c247e02d9b1 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -527,7 +527,11 @@ int pdc_model_capabilities(unsigned long *capabilities)
527 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */ 527 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
528 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0); 528 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
529 convert_to_wide(pdc_result); 529 convert_to_wide(pdc_result);
530 *capabilities = pdc_result[0]; 530 if (retval == PDC_OK) {
531 *capabilities = pdc_result[0];
532 } else {
533 *capabilities = PDC_MODEL_OS32;
534 }
531 spin_unlock_irqrestore(&pdc_lock, flags); 535 spin_unlock_irqrestore(&pdc_lock, flags);
532 536
533 return retval; 537 return retval;
diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c
new file mode 100644
index 000000000000..9877372ffdba
--- /dev/null
+++ b/arch/parisc/kernel/ftrace.c
@@ -0,0 +1,185 @@
1/*
2 * Code for tracing calls in Linux kernel.
3 * Copyright (C) 2009 Helge Deller <deller@gmx.de>
4 *
5 * based on code for x86 which is:
6 * Copyright (C) 2007-2008 Steven Rostedt <srostedt@redhat.com>
7 *
8 * future possible enhancements:
9 * - add CONFIG_DYNAMIC_FTRACE
10 * - add CONFIG_STACK_TRACER
11 */
12
13#include <linux/init.h>
14#include <linux/ftrace.h>
15
16#include <asm/sections.h>
17#include <asm/ftrace.h>
18
19
20
21#ifdef CONFIG_FUNCTION_GRAPH_TRACER
22
23/* Add a function return address to the trace stack on thread info.*/
24static int push_return_trace(unsigned long ret, unsigned long long time,
25 unsigned long func, int *depth)
26{
27 int index;
28
29 if (!current->ret_stack)
30 return -EBUSY;
31
32 /* The return trace stack is full */
33 if (current->curr_ret_stack == FTRACE_RETFUNC_DEPTH - 1) {
34 atomic_inc(&current->trace_overrun);
35 return -EBUSY;
36 }
37
38 index = ++current->curr_ret_stack;
39 barrier();
40 current->ret_stack[index].ret = ret;
41 current->ret_stack[index].func = func;
42 current->ret_stack[index].calltime = time;
43 *depth = index;
44
45 return 0;
46}
47
48/* Retrieve a function return address to the trace stack on thread info.*/
49static void pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret)
50{
51 int index;
52
53 index = current->curr_ret_stack;
54
55 if (unlikely(index < 0)) {
56 ftrace_graph_stop();
57 WARN_ON(1);
58 /* Might as well panic, otherwise we have no where to go */
59 *ret = (unsigned long)
60 dereference_function_descriptor(&panic);
61 return;
62 }
63
64 *ret = current->ret_stack[index].ret;
65 trace->func = current->ret_stack[index].func;
66 trace->calltime = current->ret_stack[index].calltime;
67 trace->overrun = atomic_read(&current->trace_overrun);
68 trace->depth = index;
69 barrier();
70 current->curr_ret_stack--;
71
72}
73
74/*
75 * Send the trace to the ring-buffer.
76 * @return the original return address.
77 */
78unsigned long ftrace_return_to_handler(unsigned long retval0,
79 unsigned long retval1)
80{
81 struct ftrace_graph_ret trace;
82 unsigned long ret;
83
84 pop_return_trace(&trace, &ret);
85 trace.rettime = cpu_clock(raw_smp_processor_id());
86 ftrace_graph_return(&trace);
87
88 if (unlikely(!ret)) {
89 ftrace_graph_stop();
90 WARN_ON(1);
91 /* Might as well panic. What else to do? */
92 ret = (unsigned long)
93 dereference_function_descriptor(&panic);
94 }
95
96 /* HACK: we hand over the old functions' return values
97 in %r23 and %r24. Assembly in entry.S will take care
98 and move those to their final registers %ret0 and %ret1 */
99 asm( "copy %0, %%r23 \n\t"
100 "copy %1, %%r24 \n" : : "r" (retval0), "r" (retval1) );
101
102 return ret;
103}
104
105/*
106 * Hook the return address and push it in the stack of return addrs
107 * in current thread info.
108 */
109void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
110{
111 unsigned long old;
112 unsigned long long calltime;
113 struct ftrace_graph_ent trace;
114
115 if (unlikely(atomic_read(&current->tracing_graph_pause)))
116 return;
117
118 old = *parent;
119 *parent = (unsigned long)
120 dereference_function_descriptor(&return_to_handler);
121
122 if (unlikely(!__kernel_text_address(old))) {
123 ftrace_graph_stop();
124 *parent = old;
125 WARN_ON(1);
126 return;
127 }
128
129 calltime = cpu_clock(raw_smp_processor_id());
130
131 if (push_return_trace(old, calltime,
132 self_addr, &trace.depth) == -EBUSY) {
133 *parent = old;
134 return;
135 }
136
137 trace.func = self_addr;
138
139 /* Only trace if the calling function expects to */
140 if (!ftrace_graph_entry(&trace)) {
141 current->curr_ret_stack--;
142 *parent = old;
143 }
144}
145
146#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
147
148
149void ftrace_function_trampoline(unsigned long parent,
150 unsigned long self_addr,
151 unsigned long org_sp_gr3)
152{
153 extern ftrace_func_t ftrace_trace_function;
154
155 if (function_trace_stop)
156 return;
157
158 if (ftrace_trace_function != ftrace_stub) {
159 ftrace_trace_function(parent, self_addr);
160 return;
161 }
162#ifdef CONFIG_FUNCTION_GRAPH_TRACER
163 if (ftrace_graph_entry && ftrace_graph_return) {
164 unsigned long sp;
165 unsigned long *parent_rp;
166
167 asm volatile ("copy %%r30, %0" : "=r"(sp));
168 /* sanity check: is stack pointer which we got from
169 assembler function in entry.S in a reasonable
170 range compared to current stack pointer? */
171 if ((sp - org_sp_gr3) > 0x400)
172 return;
173
174 /* calculate pointer to %rp in stack */
175 parent_rp = (unsigned long *) org_sp_gr3 - 0x10;
176 /* sanity check: parent_rp should hold parent */
177 if (*parent_rp != parent)
178 return;
179
180 prepare_ftrace_return(parent_rp, self_addr);
181 return;
182 }
183#endif
184}
185
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 1c740f5cbd63..4ea4229d765c 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -311,12 +311,12 @@ unsigned long txn_alloc_addr(unsigned int virt_irq)
311 next_cpu++; /* assign to "next" CPU we want this bugger on */ 311 next_cpu++; /* assign to "next" CPU we want this bugger on */
312 312
313 /* validate entry */ 313 /* validate entry */
314 while ((next_cpu < NR_CPUS) && 314 while ((next_cpu < nr_cpu_ids) &&
315 (!per_cpu(cpu_data, next_cpu).txn_addr || 315 (!per_cpu(cpu_data, next_cpu).txn_addr ||
316 !cpu_online(next_cpu))) 316 !cpu_online(next_cpu)))
317 next_cpu++; 317 next_cpu++;
318 318
319 if (next_cpu >= NR_CPUS) 319 if (next_cpu >= nr_cpu_ids)
320 next_cpu = 0; /* nothing else, assign monarch */ 320 next_cpu = 0; /* nothing else, assign monarch */
321 321
322 return txn_affinity_addr(virt_irq, next_cpu); 322 return txn_affinity_addr(virt_irq, next_cpu);
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index 9013243cecca..ecd1c5024447 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -61,9 +61,7 @@
61#include <linux/string.h> 61#include <linux/string.h>
62#include <linux/kernel.h> 62#include <linux/kernel.h>
63#include <linux/bug.h> 63#include <linux/bug.h>
64#include <linux/uaccess.h>
65 64
66#include <asm/sections.h>
67#include <asm/unwind.h> 65#include <asm/unwind.h>
68 66
69#if 0 67#if 0
@@ -115,8 +113,6 @@ struct got_entry {
115 Elf32_Addr addr; 113 Elf32_Addr addr;
116}; 114};
117 115
118#define Elf_Fdesc Elf32_Fdesc
119
120struct stub_entry { 116struct stub_entry {
121 Elf32_Word insns[2]; /* each stub entry has two insns */ 117 Elf32_Word insns[2]; /* each stub entry has two insns */
122}; 118};
@@ -125,8 +121,6 @@ struct got_entry {
125 Elf64_Addr addr; 121 Elf64_Addr addr;
126}; 122};
127 123
128#define Elf_Fdesc Elf64_Fdesc
129
130struct stub_entry { 124struct stub_entry {
131 Elf64_Word insns[4]; /* each stub entry has four insns */ 125 Elf64_Word insns[4]; /* each stub entry has four insns */
132}; 126};
@@ -916,15 +910,3 @@ void module_arch_cleanup(struct module *mod)
916 deregister_unwind_table(mod); 910 deregister_unwind_table(mod);
917 module_bug_cleanup(mod); 911 module_bug_cleanup(mod);
918} 912}
919
920#ifdef CONFIG_64BIT
921void *dereference_function_descriptor(void *ptr)
922{
923 Elf64_Fdesc *desc = ptr;
924 void *p;
925
926 if (!probe_kernel_address(&desc->addr, p))
927 ptr = p;
928 return ptr;
929}
930#endif
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index 0eecfbbc59cd..df653663d3db 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -153,5 +153,10 @@ EXPORT_SYMBOL(node_data);
153EXPORT_SYMBOL(pfnnid_map); 153EXPORT_SYMBOL(pfnnid_map);
154#endif 154#endif
155 155
156#ifdef CONFIG_FUNCTION_TRACER
157extern void _mcount(void);
158EXPORT_SYMBOL(_mcount);
159#endif
160
156/* from pacache.S -- needed for copy_page */ 161/* from pacache.S -- needed for copy_page */
157EXPORT_SYMBOL(copy_user_page_asm); 162EXPORT_SYMBOL(copy_user_page_asm);
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index b80e02a4d81d..6f69101f90bb 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -46,14 +46,15 @@
46#include <linux/stddef.h> 46#include <linux/stddef.h>
47#include <linux/unistd.h> 47#include <linux/unistd.h>
48#include <linux/kallsyms.h> 48#include <linux/kallsyms.h>
49#include <linux/uaccess.h>
49 50
50#include <asm/io.h> 51#include <asm/io.h>
51#include <asm/asm-offsets.h> 52#include <asm/asm-offsets.h>
52#include <asm/pdc.h> 53#include <asm/pdc.h>
53#include <asm/pdc_chassis.h> 54#include <asm/pdc_chassis.h>
54#include <asm/pgalloc.h> 55#include <asm/pgalloc.h>
55#include <asm/uaccess.h>
56#include <asm/unwind.h> 56#include <asm/unwind.h>
57#include <asm/sections.h>
57 58
58/* 59/*
59 * The idle thread. There's no useful work to be 60 * The idle thread. There's no useful work to be
@@ -231,8 +232,8 @@ sys_clone(unsigned long clone_flags, unsigned long usp,
231 232
232 However, these last 3 args are only examined 233 However, these last 3 args are only examined
233 if the proper flags are set. */ 234 if the proper flags are set. */
234 int __user *child_tidptr; 235 int __user *parent_tidptr = (int __user *)regs->gr[24];
235 int __user *parent_tidptr; 236 int __user *child_tidptr = (int __user *)regs->gr[22];
236 237
237 /* usp must be word aligned. This also prevents users from 238 /* usp must be word aligned. This also prevents users from
238 * passing in the value 1 (which is the signal for a special 239 * passing in the value 1 (which is the signal for a special
@@ -243,16 +244,6 @@ sys_clone(unsigned long clone_flags, unsigned long usp,
243 if (usp == 0) 244 if (usp == 0)
244 usp = regs->gr[30]; 245 usp = regs->gr[30];
245 246
246 if (clone_flags & CLONE_PARENT_SETTID)
247 parent_tidptr = (int __user *)regs->gr[24];
248 else
249 parent_tidptr = NULL;
250
251 if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID))
252 child_tidptr = (int __user *)regs->gr[22];
253 else
254 child_tidptr = NULL;
255
256 return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); 247 return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr);
257} 248}
258 249
@@ -263,7 +254,7 @@ sys_vfork(struct pt_regs *regs)
263} 254}
264 255
265int 256int
266copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 257copy_thread(unsigned long clone_flags, unsigned long usp,
267 unsigned long unused, /* in ia64 this is "user_stack_size" */ 258 unsigned long unused, /* in ia64 this is "user_stack_size" */
268 struct task_struct * p, struct pt_regs * pregs) 259 struct task_struct * p, struct pt_regs * pregs)
269{ 260{
@@ -400,3 +391,15 @@ get_wchan(struct task_struct *p)
400 } while (count++ < 16); 391 } while (count++ < 16);
401 return 0; 392 return 0;
402} 393}
394
395#ifdef CONFIG_64BIT
396void *dereference_function_descriptor(void *ptr)
397{
398 Elf64_Fdesc *desc = ptr;
399 void *p;
400
401 if (!probe_kernel_address(&desc->addr, p))
402 ptr = p;
403 return ptr;
404}
405#endif
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index ecb609342feb..e09d0f7fb6b0 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -100,8 +100,8 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
100 struct cpuinfo_parisc *p; 100 struct cpuinfo_parisc *p;
101 101
102#ifdef CONFIG_SMP 102#ifdef CONFIG_SMP
103 if (num_online_cpus() >= NR_CPUS) { 103 if (num_online_cpus() >= nr_cpu_ids) {
104 printk(KERN_INFO "num_online_cpus() >= NR_CPUS\n"); 104 printk(KERN_INFO "num_online_cpus() >= nr_cpu_ids\n");
105 return 1; 105 return 1;
106 } 106 }
107#else 107#else
@@ -214,7 +214,7 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
214 */ 214 */
215#ifdef CONFIG_SMP 215#ifdef CONFIG_SMP
216 if (cpuid) { 216 if (cpuid) {
217 cpu_set(cpuid, cpu_present_map); 217 set_cpu_present(cpuid, true);
218 cpu_up(cpuid); 218 cpu_up(cpuid);
219 } 219 }
220#endif 220#endif
@@ -364,6 +364,13 @@ show_cpuinfo (struct seq_file *m, void *v)
364 boot_cpu_data.cpu_hz / 1000000, 364 boot_cpu_data.cpu_hz / 1000000,
365 boot_cpu_data.cpu_hz % 1000000 ); 365 boot_cpu_data.cpu_hz % 1000000 );
366 366
367 seq_printf(m, "capabilities\t:");
368 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS32)
369 seq_printf(m, " os32");
370 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS64)
371 seq_printf(m, " os64");
372 seq_printf(m, "\n");
373
367 seq_printf(m, "model\t\t: %s\n" 374 seq_printf(m, "model\t\t: %s\n"
368 "model name\t: %s\n", 375 "model name\t: %s\n",
369 boot_cpu_data.pdc.sys_model_name, 376 boot_cpu_data.pdc.sys_model_name,
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 9995d7ed5819..1fd0f0cec037 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -31,6 +31,7 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/bitops.h> 33#include <linux/bitops.h>
34#include <linux/ftrace.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
36#include <asm/atomic.h> 37#include <asm/atomic.h>
@@ -113,14 +114,14 @@ halt_processor(void)
113{ 114{
114 /* REVISIT : redirect I/O Interrupts to another CPU? */ 115 /* REVISIT : redirect I/O Interrupts to another CPU? */
115 /* REVISIT : does PM *know* this CPU isn't available? */ 116 /* REVISIT : does PM *know* this CPU isn't available? */
116 cpu_clear(smp_processor_id(), cpu_online_map); 117 set_cpu_online(smp_processor_id(), false);
117 local_irq_disable(); 118 local_irq_disable();
118 for (;;) 119 for (;;)
119 ; 120 ;
120} 121}
121 122
122 123
123irqreturn_t 124irqreturn_t __irq_entry
124ipi_interrupt(int irq, void *dev_id) 125ipi_interrupt(int irq, void *dev_id)
125{ 126{
126 int this_cpu = smp_processor_id(); 127 int this_cpu = smp_processor_id();
@@ -214,11 +215,11 @@ ipi_send(int cpu, enum ipi_message_type op)
214} 215}
215 216
216static void 217static void
217send_IPI_mask(cpumask_t mask, enum ipi_message_type op) 218send_IPI_mask(const struct cpumask *mask, enum ipi_message_type op)
218{ 219{
219 int cpu; 220 int cpu;
220 221
221 for_each_cpu_mask(cpu, mask) 222 for_each_cpu(cpu, mask)
222 ipi_send(cpu, op); 223 ipi_send(cpu, op);
223} 224}
224 225
@@ -257,7 +258,7 @@ smp_send_all_nop(void)
257 send_IPI_allbutself(IPI_NOP); 258 send_IPI_allbutself(IPI_NOP);
258} 259}
259 260
260void arch_send_call_function_ipi(cpumask_t mask) 261void arch_send_call_function_ipi_mask(const struct cpumask *mask)
261{ 262{
262 send_IPI_mask(mask, IPI_CALL_FUNC); 263 send_IPI_mask(mask, IPI_CALL_FUNC);
263} 264}
@@ -296,13 +297,14 @@ smp_cpu_init(int cpunum)
296 mb(); 297 mb();
297 298
298 /* Well, support 2.4 linux scheme as well. */ 299 /* Well, support 2.4 linux scheme as well. */
299 if (cpu_test_and_set(cpunum, cpu_online_map)) 300 if (cpu_isset(cpunum, cpu_online_map))
300 { 301 {
301 extern void machine_halt(void); /* arch/parisc.../process.c */ 302 extern void machine_halt(void); /* arch/parisc.../process.c */
302 303
303 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); 304 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
304 machine_halt(); 305 machine_halt();
305 } 306 }
307 set_cpu_online(cpunum, true);
306 308
307 /* Initialise the idle task for this CPU */ 309 /* Initialise the idle task for this CPU */
308 atomic_inc(&init_mm.mm_count); 310 atomic_inc(&init_mm.mm_count);
@@ -424,8 +426,8 @@ void __init smp_prepare_boot_cpu(void)
424 /* Setup BSP mappings */ 426 /* Setup BSP mappings */
425 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor); 427 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
426 428
427 cpu_set(bootstrap_processor, cpu_online_map); 429 set_cpu_online(bootstrap_processor, true);
428 cpu_set(bootstrap_processor, cpu_present_map); 430 set_cpu_present(bootstrap_processor, true);
429} 431}
430 432
431 433
@@ -436,8 +438,7 @@ void __init smp_prepare_boot_cpu(void)
436*/ 438*/
437void __init smp_prepare_cpus(unsigned int max_cpus) 439void __init smp_prepare_cpus(unsigned int max_cpus)
438{ 440{
439 cpus_clear(cpu_present_map); 441 init_cpu_present(cpumask_of(0));
440 cpu_set(0, cpu_present_map);
441 442
442 parisc_max_cpus = max_cpus; 443 parisc_max_cpus = max_cpus;
443 if (!max_cpus) 444 if (!max_cpus)
diff --git a/arch/parisc/kernel/stacktrace.c b/arch/parisc/kernel/stacktrace.c
new file mode 100644
index 000000000000..2fe914c5f533
--- /dev/null
+++ b/arch/parisc/kernel/stacktrace.c
@@ -0,0 +1,63 @@
1/*
2 * Stack trace management functions
3 *
4 * Copyright (C) 2009 Helge Deller <deller@gmx.de>
5 * based on arch/x86/kernel/stacktrace.c by Ingo Molnar <mingo@redhat.com>
6 * and parisc unwind functions by Randolph Chung <tausq@debian.org>
7 *
8 * TODO: Userspace stacktrace (CONFIG_USER_STACKTRACE_SUPPORT)
9 */
10#include <linux/module.h>
11#include <linux/stacktrace.h>
12
13#include <asm/unwind.h>
14
15static void dump_trace(struct task_struct *task, struct stack_trace *trace)
16{
17 struct unwind_frame_info info;
18
19 /* initialize unwind info */
20 if (task == current) {
21 unsigned long sp;
22 struct pt_regs r;
23HERE:
24 asm volatile ("copy %%r30, %0" : "=r"(sp));
25 memset(&r, 0, sizeof(struct pt_regs));
26 r.iaoq[0] = (unsigned long)&&HERE;
27 r.gr[2] = (unsigned long)__builtin_return_address(0);
28 r.gr[30] = sp;
29 unwind_frame_init(&info, task, &r);
30 } else {
31 unwind_frame_init_from_blocked_task(&info, task);
32 }
33
34 /* unwind stack and save entries in stack_trace struct */
35 trace->nr_entries = 0;
36 while (trace->nr_entries < trace->max_entries) {
37 if (unwind_once(&info) < 0 || info.ip == 0)
38 break;
39
40 if (__kernel_text_address(info.ip))
41 trace->entries[trace->nr_entries++] = info.ip;
42 }
43}
44
45
46/*
47 * Save stack-backtrace addresses into a stack_trace buffer.
48 */
49void save_stack_trace(struct stack_trace *trace)
50{
51 dump_trace(current, trace);
52 if (trace->nr_entries < trace->max_entries)
53 trace->entries[trace->nr_entries++] = ULONG_MAX;
54}
55EXPORT_SYMBOL_GPL(save_stack_trace);
56
57void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
58{
59 dump_trace(tsk, trace);
60 if (trace->nr_entries < trace->max_entries)
61 trace->entries[trace->nr_entries++] = ULONG_MAX;
62}
63EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 69b6eebc466e..59fc1a43ec3e 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -365,17 +365,51 @@ tracesys_sigexit:
365 365
366 366
367 /********************************************************* 367 /*********************************************************
368 Light-weight-syscall code 368 32/64-bit Light-Weight-Syscall ABI
369 369
370 r20 - lws number 370 * - Indicates a hint for userspace inline asm
371 r26,r25,r24,r23,r22 - Input registers 371 implementations.
372 r28 - Function return register
373 r21 - Error code.
374 372
375 Scracth: Any of the above that aren't being 373 Syscall number (caller-saves)
376 currently used, including r1. 374 - %r20
375 * In asm clobber.
377 376
378 Return pointer: r31 (Not usable) 377 Argument registers (caller-saves)
378 - %r26, %r25, %r24, %r23, %r22
379 * In asm input.
380
381 Return registers (caller-saves)
382 - %r28 (return), %r21 (errno)
383 * In asm output.
384
385 Caller-saves registers
386 - %r1, %r27, %r29
387 - %r2 (return pointer)
388 - %r31 (ble link register)
389 * In asm clobber.
390
391 Callee-saves registers
392 - %r3-%r18
393 - %r30 (stack pointer)
394 * Not in asm clobber.
395
396 If userspace is 32-bit:
397 Callee-saves registers
398 - %r19 (32-bit PIC register)
399
400 Differences from 32-bit calling convention:
401 - Syscall number in %r20
402 - Additional argument register %r22 (arg4)
403 - Callee-saves %r19.
404
405 If userspace is 64-bit:
406 Callee-saves registers
407 - %r27 (64-bit PIC register)
408
409 Differences from 64-bit calling convention:
410 - Syscall number in %r20
411 - Additional argument register %r22 (arg4)
412 - Callee-saves %r27.
379 413
380 Error codes returned by entry path: 414 Error codes returned by entry path:
381 415
@@ -473,7 +507,8 @@ lws_compare_and_swap64:
473 b,n lws_compare_and_swap 507 b,n lws_compare_and_swap
474#else 508#else
475 /* If we are not a 64-bit kernel, then we don't 509 /* If we are not a 64-bit kernel, then we don't
476 * implement having 64-bit input registers 510 * have 64-bit input registers, and calling
511 * the 64-bit LWS CAS returns ENOSYS.
477 */ 512 */
478 b,n lws_exit_nosys 513 b,n lws_exit_nosys
479#endif 514#endif
@@ -635,12 +670,15 @@ END(sys_call_table64)
635 /* 670 /*
636 All light-weight-syscall atomic operations 671 All light-weight-syscall atomic operations
637 will use this set of locks 672 will use this set of locks
673
674 NOTE: The lws_lock_start symbol must be
675 at least 16-byte aligned for safe use
676 with ldcw.
638 */ 677 */
639 .section .data 678 .section .data
640 .align PAGE_SIZE 679 .align PAGE_SIZE
641ENTRY(lws_lock_start) 680ENTRY(lws_lock_start)
642 /* lws locks */ 681 /* lws locks */
643 .align 16
644 .rept 16 682 .rept 16
645 /* Keep locks aligned at 16-bytes */ 683 /* Keep locks aligned at 16-bytes */
646 .word 1 684 .word 1
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 9d46c43a4152..d4dd05674c62 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -24,6 +24,7 @@
24#include <linux/profile.h> 24#include <linux/profile.h>
25#include <linux/clocksource.h> 25#include <linux/clocksource.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/ftrace.h>
27 28
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
29#include <asm/io.h> 30#include <asm/io.h>
@@ -53,7 +54,7 @@ static unsigned long clocktick __read_mostly; /* timer cycles per tick */
53 * held off for an arbitrarily long period of time by interrupts being 54 * held off for an arbitrarily long period of time by interrupts being
54 * disabled, so we may miss one or more ticks. 55 * disabled, so we may miss one or more ticks.
55 */ 56 */
56irqreturn_t timer_interrupt(int irq, void *dev_id) 57irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
57{ 58{
58 unsigned long now; 59 unsigned long now;
59 unsigned long next_tick; 60 unsigned long next_tick;
@@ -216,17 +217,14 @@ void __init start_cpu_itimer(void)
216 per_cpu(cpu_data, cpu).it_value = next_tick; 217 per_cpu(cpu_data, cpu).it_value = next_tick;
217} 218}
218 219
219struct platform_device rtc_parisc_dev = { 220static struct platform_device rtc_generic_dev = {
220 .name = "rtc-parisc", 221 .name = "rtc-generic",
221 .id = -1, 222 .id = -1,
222}; 223};
223 224
224static int __init rtc_init(void) 225static int __init rtc_init(void)
225{ 226{
226 int ret; 227 if (platform_device_register(&rtc_generic_dev) < 0)
227
228 ret = platform_device_register(&rtc_parisc_dev);
229 if (ret < 0)
230 printk(KERN_ERR "unable to register rtc device...\n"); 228 printk(KERN_ERR "unable to register rtc device...\n");
231 229
232 /* not necessarily an error */ 230 /* not necessarily an error */
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index ba658d2086f7..c32f5d6d778e 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -247,6 +247,8 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
247 247
248 oops_in_progress = 1; 248 oops_in_progress = 1;
249 249
250 oops_enter();
251
250 /* Amuse the user in a SPARC fashion */ 252 /* Amuse the user in a SPARC fashion */
251 if (err) printk( 253 if (err) printk(
252KERN_CRIT " _______________________________ \n" 254KERN_CRIT " _______________________________ \n"
@@ -293,6 +295,7 @@ KERN_CRIT " || ||\n");
293 panic("Fatal exception"); 295 panic("Fatal exception");
294 } 296 }
295 297
298 oops_exit();
296 do_exit(SIGSEGV); 299 do_exit(SIGSEGV);
297} 300}
298 301
@@ -494,7 +497,7 @@ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long o
494 panic(msg); 497 panic(msg);
495} 498}
496 499
497void handle_interruption(int code, struct pt_regs *regs) 500void notrace handle_interruption(int code, struct pt_regs *regs)
498{ 501{
499 unsigned long fault_address = 0; 502 unsigned long fault_address = 0;
500 unsigned long fault_space = 0; 503 unsigned long fault_space = 0;
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 1a3b6ccd3620..fd2cc4fd2b65 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -54,6 +54,8 @@ SECTIONS
54 TEXT_TEXT 54 TEXT_TEXT
55 SCHED_TEXT 55 SCHED_TEXT
56 LOCK_TEXT 56 LOCK_TEXT
57 KPROBES_TEXT
58 IRQENTRY_TEXT
57 *(.text.do_softirq) 59 *(.text.do_softirq)
58 *(.text.sys_exit) 60 *(.text.sys_exit)
59 *(.text.do_sigaltstack) 61 *(.text.do_sigaltstack)
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 9d704d9831d1..4356ceb1e366 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -456,6 +456,13 @@ void __init mem_init(void)
456{ 456{
457 int codesize, reservedpages, datasize, initsize; 457 int codesize, reservedpages, datasize, initsize;
458 458
459 /* Do sanity checks on page table constants */
460 BUILD_BUG_ON(PTE_ENTRY_SIZE != sizeof(pte_t));
461 BUILD_BUG_ON(PMD_ENTRY_SIZE != sizeof(pmd_t));
462 BUILD_BUG_ON(PGD_ENTRY_SIZE != sizeof(pgd_t));
463 BUILD_BUG_ON(PAGE_SHIFT + BITS_PER_PTE + BITS_PER_PMD + BITS_PER_PGD
464 > BITS_PER_LONG);
465
459 high_memory = __va((max_pfn << PAGE_SHIFT)); 466 high_memory = __va((max_pfn << PAGE_SHIFT));
460 467
461#ifndef CONFIG_DISCONTIGMEM 468#ifndef CONFIG_DISCONTIGMEM
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 74cc312c347c..5b50e1ac6179 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -111,6 +111,7 @@ config PPC
111 select HAVE_FTRACE_MCOUNT_RECORD 111 select HAVE_FTRACE_MCOUNT_RECORD
112 select HAVE_DYNAMIC_FTRACE 112 select HAVE_DYNAMIC_FTRACE
113 select HAVE_FUNCTION_TRACER 113 select HAVE_FUNCTION_TRACER
114 select HAVE_FUNCTION_GRAPH_TRACER
114 select ARCH_WANT_OPTIONAL_GPIOLIB 115 select ARCH_WANT_OPTIONAL_GPIOLIB
115 select HAVE_IDE 116 select HAVE_IDE
116 select HAVE_IOREMAP_PROT 117 select HAVE_IOREMAP_PROT
@@ -227,6 +228,9 @@ config PPC_OF_PLATFORM_PCI
227 depends on PPC64 # not supported on 32 bits yet 228 depends on PPC64 # not supported on 32 bits yet
228 default n 229 default n
229 230
231config ARCH_SUPPORTS_DEBUG_PAGEALLOC
232 def_bool y
233
230source "init/Kconfig" 234source "init/Kconfig"
231 235
232source "kernel/Kconfig.freezer" 236source "kernel/Kconfig.freezer"
@@ -312,7 +316,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
312 316
313config KEXEC 317config KEXEC
314 bool "kexec system call (EXPERIMENTAL)" 318 bool "kexec system call (EXPERIMENTAL)"
315 depends on (PPC_PRPMC2800 || PPC_MULTIPLATFORM) && EXPERIMENTAL 319 depends on PPC_BOOK3S && EXPERIMENTAL
316 help 320 help
317 kexec is a system call that implements the ability to shutdown your 321 kexec is a system call that implements the ability to shutdown your
318 current kernel, and to start another kernel. It is like a reboot 322 current kernel, and to start another kernel. It is like a reboot
@@ -342,7 +346,7 @@ config PHYP_DUMP
342 help 346 help
343 Hypervisor-assisted dump is meant to be a kdump replacement 347 Hypervisor-assisted dump is meant to be a kdump replacement
344 offering robustness and speed not possible without system 348 offering robustness and speed not possible without system
345 hypervisor assistence. 349 hypervisor assistance.
346 350
347 If unsure, say "N" 351 If unsure, say "N"
348 352
@@ -409,6 +413,18 @@ config PPC_HAS_HASH_64K
409 depends on PPC64 413 depends on PPC64
410 default n 414 default n
411 415
416config STDBINUTILS
417 bool "Using standard binutils settings"
418 depends on 44x
419 default y
420 help
421 Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
422 Note, that kernel will be able to run only those applications,
423 which had been compiled using binutils later than 2.17.50.0.3 with
424 '-zmax-page-size' set to 256K (the default is 64K). Or, if using
425 the older binutils, you can patch them with a trivial patch, which
426 changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
427
412choice 428choice
413 prompt "Page size" 429 prompt "Page size"
414 default PPC_4K_PAGES 430 default PPC_4K_PAGES
@@ -444,6 +460,19 @@ config PPC_64K_PAGES
444 bool "64k page size" if 44x || PPC_STD_MMU_64 460 bool "64k page size" if 44x || PPC_STD_MMU_64
445 select PPC_HAS_HASH_64K if PPC_STD_MMU_64 461 select PPC_HAS_HASH_64K if PPC_STD_MMU_64
446 462
463config PPC_256K_PAGES
464 bool "256k page size" if 44x
465 depends on !STDBINUTILS && (!SHMEM || BROKEN)
466 help
467 Make the page size 256k.
468
469 As the ELF standard only requires alignment to support page
470 sizes up to 64k, you will need to compile all of your user
471 space applications with a non-standard binutils settings
472 (see the STDBINUTILS description for details).
473
474 Say N unless you know what you are doing.
475
447endchoice 476endchoice
448 477
449config FORCE_MAX_ZONEORDER 478config FORCE_MAX_ZONEORDER
@@ -456,6 +485,8 @@ config FORCE_MAX_ZONEORDER
456 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES 485 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
457 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES 486 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
458 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES 487 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
488 range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
489 default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
459 range 11 64 490 range 11 64
460 default "11" 491 default "11"
461 help 492 help
@@ -594,6 +625,7 @@ config FSL_SOC
594config FSL_PCI 625config FSL_PCI
595 bool 626 bool
596 select PPC_INDIRECT_PCI 627 select PPC_INDIRECT_PCI
628 select PCI_QUIRKS
597 629
598config 4xx_SOC 630config 4xx_SOC
599 bool 631 bool
@@ -730,6 +762,23 @@ config LOWMEM_SIZE
730 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL 762 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
731 default "0x30000000" 763 default "0x30000000"
732 764
765config LOWMEM_CAM_NUM_BOOL
766 bool "Set number of CAMs to use to map low memory"
767 depends on ADVANCED_OPTIONS && FSL_BOOKE
768 help
769 This option allows you to set the maximum number of CAM slots that
770 will be used to map low memory. There are a limited number of slots
771 available and even more limited number that will fit in the L1 MMU.
772 However, using more entries will allow mapping more low memory. This
773 can be useful in optimizing the layout of kernel virtual memory.
774
775 Say N here unless you know what you are doing.
776
777config LOWMEM_CAM_NUM
778 depends on FSL_BOOKE
779 int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
780 default 3
781
733config RELOCATABLE 782config RELOCATABLE
734 bool "Build a relocatable kernel (EXPERIMENTAL)" 783 bool "Build a relocatable kernel (EXPERIMENTAL)"
735 depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE 784 depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
@@ -794,7 +843,7 @@ config PHYSICAL_START
794 843
795config PHYSICAL_ALIGN 844config PHYSICAL_ALIGN
796 hex 845 hex
797 default "0x10000000" if FSL_BOOKE 846 default "0x04000000" if FSL_BOOKE
798 help 847 help
799 This value puts the alignment restrictions on physical address 848 This value puts the alignment restrictions on physical address
800 where kernel is loaded and run from. Kernel is compiled for an 849 where kernel is loaded and run from. Kernel is compiled for an
@@ -815,31 +864,6 @@ config TASK_SIZE
815 default "0x80000000" if PPC_PREP || PPC_8xx 864 default "0x80000000" if PPC_PREP || PPC_8xx
816 default "0xc0000000" 865 default "0xc0000000"
817 866
818config CONSISTENT_START_BOOL
819 bool "Set custom consistent memory pool address"
820 depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
821 help
822 This option allows you to set the base virtual address
823 of the consistent memory pool. This pool of virtual
824 memory is used to make consistent memory allocations.
825
826config CONSISTENT_START
827 hex "Base virtual address of consistent memory pool" if CONSISTENT_START_BOOL
828 default "0xfd000000" if (NOT_COHERENT_CACHE && 8xx)
829 default "0xff100000" if NOT_COHERENT_CACHE
830
831config CONSISTENT_SIZE_BOOL
832 bool "Set custom consistent memory pool size"
833 depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
834 help
835 This option allows you to set the size of the
836 consistent memory pool. This pool of virtual memory
837 is used to make consistent memory allocations.
838
839config CONSISTENT_SIZE
840 hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL
841 default "0x00200000" if NOT_COHERENT_CACHE
842
843config PIN_TLB 867config PIN_TLB
844 bool "Pinned Kernel TLBs (860 ONLY)" 868 bool "Pinned Kernel TLBs (860 ONLY)"
845 depends on ADVANCED_OPTIONS && 8xx 869 depends on ADVANCED_OPTIONS && 8xx
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 08f7cc0a1953..a1098e23221f 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -27,15 +27,6 @@ config DEBUG_STACK_USAGE
27 27
28 This option will slow down process creation somewhat. 28 This option will slow down process creation somewhat.
29 29
30config DEBUG_PAGEALLOC
31 bool "Debug page memory allocations"
32 depends on DEBUG_KERNEL && !HIBERNATION
33 help
34 Unmap pages from the kernel linear mapping after free_pages().
35 This results in a large slowdown, but helps to find certain types
36 of memory corruptions.
37
38
39config HCALL_STATS 30config HCALL_STATS
40 bool "Hypervisor call instrumentation" 31 bool "Hypervisor call instrumentation"
41 depends on PPC_PSERIES && DEBUG_FS 32 depends on PPC_PSERIES && DEBUG_FS
@@ -129,7 +120,7 @@ config BDI_SWITCH
129 120
130config BOOTX_TEXT 121config BOOTX_TEXT
131 bool "Support for early boot text console (BootX or OpenFirmware only)" 122 bool "Support for early boot text console (BootX or OpenFirmware only)"
132 depends on PPC_OF && PPC_MULTIPLATFORM 123 depends on PPC_OF && PPC_BOOK3S
133 help 124 help
134 Say Y here to see progress messages from the boot firmware in text 125 Say Y here to see progress messages from the boot firmware in text
135 mode. Requires either BootX or Open Firmware. 126 mode. Requires either BootX or Open Firmware.
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 72d17f50e54f..551fc58c05cf 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -147,8 +147,8 @@ core-y += arch/powerpc/kernel/ \
147 arch/powerpc/mm/ \ 147 arch/powerpc/mm/ \
148 arch/powerpc/lib/ \ 148 arch/powerpc/lib/ \
149 arch/powerpc/sysdev/ \ 149 arch/powerpc/sysdev/ \
150 arch/powerpc/platforms/ 150 arch/powerpc/platforms/ \
151core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/ 151 arch/powerpc/math-emu/
152core-$(CONFIG_XMON) += arch/powerpc/xmon/ 152core-$(CONFIG_XMON) += arch/powerpc/xmon/
153core-$(CONFIG_KVM) += arch/powerpc/kvm/ 153core-$(CONFIG_KVM) += arch/powerpc/kvm/
154 154
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index e84df338ea29..4458abb67c51 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -70,7 +70,7 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c
70 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ 70 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
71 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ 71 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
72 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ 72 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
73 cuboot-acadia.c 73 cuboot-acadia.c cuboot-amigaone.c
74src-boot := $(src-wlib) $(src-plat) empty.c 74src-boot := $(src-wlib) $(src-plat) empty.c
75 75
76src-boot := $(addprefix $(obj)/, $(src-boot)) 76src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -235,7 +235,9 @@ image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \
235 dtbImage.adder875-redboot 235 dtbImage.adder875-redboot
236 236
237# Board ports in arch/powerpc/platform/52xx/Kconfig 237# Board ports in arch/powerpc/platform/52xx/Kconfig
238image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b 238image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 lite5200.dtb
239image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200b lite5200b.dtb
240image-$(CONFIG_PPC_MEDIA5200) += cuImage.media5200 media5200.dtb
239 241
240# Board ports in arch/powerpc/platform/82xx/Kconfig 242# Board ports in arch/powerpc/platform/82xx/Kconfig
241image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads 243image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads
@@ -274,6 +276,9 @@ image-$(CONFIG_STORCENTER) += cuImage.storcenter
274image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2 276image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2
275image-$(CONFIG_PPC_C2K) += cuImage.c2k 277image-$(CONFIG_PPC_C2K) += cuImage.c2k
276 278
279# Board port in arch/powerpc/platform/amigaone/Kconfig
280image-$(CONFIG_AMIGAONE) += cuImage.amigaone
281
277# For 32-bit powermacs, build the COFF and miboot images 282# For 32-bit powermacs, build the COFF and miboot images
278# as well as the ELF images. 283# as well as the ELF images.
279ifeq ($(CONFIG_PPC32),y) 284ifeq ($(CONFIG_PPC32),y)
diff --git a/arch/powerpc/boot/cuboot-amigaone.c b/arch/powerpc/boot/cuboot-amigaone.c
new file mode 100644
index 000000000000..d5029674030b
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-amigaone.c
@@ -0,0 +1,35 @@
1/*
2 * Old U-boot compatibility for AmigaOne
3 *
4 * Author: Gerhard Pircher (gerhard_pircher@gmx.net)
5 *
6 * Based on cuboot-83xx.c
7 * Copyright (c) 2007 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 version 2 as published
11 * by the Free Software Foundation.
12 */
13
14#include "ops.h"
15#include "stdio.h"
16#include "cuboot.h"
17
18#include "ppcboot.h"
19
20static bd_t bd;
21
22static void platform_fixups(void)
23{
24 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
25 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
26}
27
28void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
29 unsigned long r6, unsigned long r7)
30{
31 CUBOOT_INIT();
32 fdt_init(_dtb_start);
33 serial_console_init();
34 platform_ops.fixups = platform_fixups;
35}
diff --git a/arch/powerpc/boot/dts/amigaone.dts b/arch/powerpc/boot/dts/amigaone.dts
new file mode 100644
index 000000000000..26549fca2ed4
--- /dev/null
+++ b/arch/powerpc/boot/dts/amigaone.dts
@@ -0,0 +1,173 @@
1/*
2 * AmigaOne Device Tree Source
3 *
4 * Copyright 2008 Gerhard Pircher (gerhard_pircher@gmx.net)
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/dts-v1/;
13
14/ {
15 model = "AmigaOne";
16 compatible = "eyetech,amigaone";
17 coherency-off;
18 #address-cells = <1>;
19 #size-cells = <1>;
20
21 cpus {
22 #cpus = <1>;
23 #address-cells = <1>;
24 #size-cells = <0>;
25
26 cpu@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <32>; // 32 bytes
30 i-cache-line-size = <32>; // 32 bytes
31 d-cache-size = <32768>; // L1, 32K
32 i-cache-size = <32768>; // L1, 32K
33 timebase-frequency = <0>; // 33.3 MHz, from U-boot
34 clock-frequency = <0>; // From U-boot
35 bus-frequency = <0>; // From U-boot
36 };
37 };
38
39 memory {
40 device_type = "memory";
41 reg = <0 0>; // From U-boot
42 };
43
44 pci@80000000 {
45 device_type = "pci";
46 compatible = "mai-logic,articia-s";
47 bus-frequency = <33333333>;
48 bus-range = <0 0xff>;
49 ranges = <0x01000000 0 0x00000000 0xfe000000 0 0x00c00000 // PCI I/O
50 0x02000000 0 0x80000000 0x80000000 0 0x7d000000 // PCI memory
51 0x02000000 0 0x00000000 0xfd000000 0 0x01000000>; // PCI alias memory (ISA)
52 // Configuration address and data register.
53 reg = <0xfec00cf8 4
54 0xfee00cfc 4>;
55 8259-interrupt-acknowledge = <0xfef00000>;
56 // Do not define a interrupt-parent here, if there is no
57 // interrupt-map property.
58 #address-cells = <3>;
59 #size-cells = <2>;
60
61 isa@7 {
62 device_type = "isa";
63 compatible = "pciclass,0601";
64 vendor-id = <0x00001106>;
65 device-id = <0x00000686>;
66 revision-id = <0x00000010>;
67 class-code = <0x00060100>;
68 subsystem-id = <0>;
69 subsystem-vendor-id = <0>;
70 devsel-speed = <0x00000001>;
71 min-grant = <0>;
72 max-latency = <0>;
73 /* First 64k for I/O at 0x0 on PCI mapped to 0x0 on ISA. */
74 ranges = <0x00000001 0 0x01000000 0 0x00000000 0x00010000>;
75 interrupt-parent = <&i8259>;
76 #interrupt-cells = <2>;
77 #address-cells = <2>;
78 #size-cells = <1>;
79
80 dma-controller@0 {
81 compatible = "pnpPNP,200";
82 reg = <1 0x00000000 0x00000020
83 1 0x00000080 0x00000010
84 1 0x000000c0 0x00000020>;
85 };
86
87 i8259: interrupt-controller@20 {
88 device_type = "interrupt-controller";
89 compatible = "pnpPNP,000";
90 interrupt-controller;
91 reg = <1 0x00000020 0x00000002
92 1 0x000000a0 0x00000002
93 1 0x000004d0 0x00000002>;
94 reserved-interrupts = <2>;
95 #interrupt-cells = <2>;
96 };
97
98 timer@40 {
99 // Also adds pcspkr to platform devices.
100 compatible = "pnpPNP,100";
101 reg = <1 0x00000040 0x00000020>;
102 };
103
104 8042@60 {
105 device_type = "8042";
106 reg = <1 0x00000060 0x00000001
107 1 0x00000064 0x00000001>;
108 interrupts = <1 3 12 3>;
109 #address-cells = <1>;
110 #size-cells = <0>;
111
112 keyboard@0 {
113 compatible = "pnpPNP,303";
114 reg = <0>;
115 };
116
117 mouse@1 {
118 compatible = "pnpPNP,f03";
119 reg = <1>;
120 };
121 };
122
123 rtc@70 {
124 compatible = "pnpPNP,b00";
125 reg = <1 0x00000070 0x00000002>;
126 interrupts = <8 3>;
127 };
128
129 serial@3f8 {
130 device_type = "serial";
131 compatible = "pnpPNP,501","pnpPNP,500";
132 reg = <1 0x000003f8 0x00000008>;
133 interrupts = <4 3>;
134 clock-frequency = <1843200>;
135 current-speed = <115200>;
136 };
137
138 serial@2f8 {
139 device_type = "serial";
140 compatible = "pnpPNP,501","pnpPNP,500";
141 reg = <1 0x000002f8 0x00000008>;
142 interrupts = <3 3>;
143 clock-frequency = <1843200>;
144 current-speed = <115200>;
145 };
146
147 parallel@378 {
148 device_type = "parallel";
149 // No ECP support for now, otherwise add "pnpPNP,401".
150 compatible = "pnpPNP,400";
151 reg = <1 0x00000378 0x00000003
152 1 0x00000778 0x00000003>;
153 };
154
155 fdc@3f0 {
156 device_type = "fdc";
157 compatible = "pnpPNP,700";
158 reg = <1 0x000003f0 0x00000008>;
159 interrupts = <6 3>;
160 #address-cells = <1>;
161 #size-cells = <0>;
162
163 disk@0 {
164 reg = <0>;
165 };
166 };
167 };
168 };
169
170 chosen {
171 linux,stdout-path = "/pci@80000000/isa@7/serial@3f8";
172 };
173};
diff --git a/arch/powerpc/boot/dts/asp834x-redboot.dts b/arch/powerpc/boot/dts/asp834x-redboot.dts
index 524af7ef9f26..7da84fd7be93 100644
--- a/arch/powerpc/boot/dts/asp834x-redboot.dts
+++ b/arch/powerpc/boot/dts/asp834x-redboot.dts
@@ -181,70 +181,76 @@
181 phy_type = "ulpi"; 181 phy_type = "ulpi";
182 }; 182 };
183 183
184 mdio@24520 {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "fsl,gianfar-mdio";
188 reg = <0x24520 0x20>;
189
190 phy0: ethernet-phy@0 {
191 interrupt-parent = <&ipic>;
192 interrupts = <17 0x8>;
193 reg = <0x1>;
194 device_type = "ethernet-phy";
195 };
196 phy1: ethernet-phy@1 {
197 interrupt-parent = <&ipic>;
198 interrupts = <18 0x8>;
199 reg = <0x2>;
200 device_type = "ethernet-phy";
201 };
202
203 tbi0: tbi-phy@11 {
204 reg = <0x11>;
205 device_type = "tbi-phy";
206 };
207 };
208
209 mdio@25520 {
210 #address-cells = <1>;
211 #size-cells = <0>;
212 compatible = "fsl,gianfar-tbi";
213 reg = <0x25520 0x20>;
214
215 tbi1: tbi-phy@11 {
216 reg = <0x11>;
217 device_type = "tbi-phy";
218 };
219 };
220
221
222 enet0: ethernet@24000 { 184 enet0: ethernet@24000 {
185 #address-cells = <1>;
186 #size-cells = <1>;
223 cell-index = <0>; 187 cell-index = <0>;
224 device_type = "network"; 188 device_type = "network";
225 model = "TSEC"; 189 model = "TSEC";
226 compatible = "gianfar"; 190 compatible = "gianfar";
227 reg = <0x24000 0x1000>; 191 reg = <0x24000 0x1000>;
192 ranges = <0x0 0x24000 0x1000>;
228 local-mac-address = [ 00 08 e5 11 32 33 ]; 193 local-mac-address = [ 00 08 e5 11 32 33 ];
229 interrupts = <32 0x8 33 0x8 34 0x8>; 194 interrupts = <32 0x8 33 0x8 34 0x8>;
230 interrupt-parent = <&ipic>; 195 interrupt-parent = <&ipic>;
231 tbi-handle = <&tbi0>; 196 tbi-handle = <&tbi0>;
232 phy-handle = <&phy0>; 197 phy-handle = <&phy0>;
233 linux,network-index = <0>; 198 linux,network-index = <0>;
199
200 mdio@520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-mdio";
204 reg = <0x520 0x20>;
205
206 phy0: ethernet-phy@0 {
207 interrupt-parent = <&ipic>;
208 interrupts = <17 0x8>;
209 reg = <0x1>;
210 device_type = "ethernet-phy";
211 };
212
213 phy1: ethernet-phy@1 {
214 interrupt-parent = <&ipic>;
215 interrupts = <18 0x8>;
216 reg = <0x2>;
217 device_type = "ethernet-phy";
218 };
219
220 tbi0: tbi-phy@11 {
221 reg = <0x11>;
222 device_type = "tbi-phy";
223 };
224 };
234 }; 225 };
235 226
236 enet1: ethernet@25000 { 227 enet1: ethernet@25000 {
228 #address-cells = <1>;
229 #size-cells = <1>;
237 cell-index = <1>; 230 cell-index = <1>;
238 device_type = "network"; 231 device_type = "network";
239 model = "TSEC"; 232 model = "TSEC";
240 compatible = "gianfar"; 233 compatible = "gianfar";
241 reg = <0x25000 0x1000>; 234 reg = <0x25000 0x1000>;
235 ranges = <0x0 0x25000 0x1000>;
242 local-mac-address = [ 00 08 e5 11 32 34 ]; 236 local-mac-address = [ 00 08 e5 11 32 34 ];
243 interrupts = <35 0x8 36 0x8 37 0x8>; 237 interrupts = <35 0x8 36 0x8 37 0x8>;
244 interrupt-parent = <&ipic>; 238 interrupt-parent = <&ipic>;
245 tbi-handle = <&tbi1>; 239 tbi-handle = <&tbi1>;
246 phy-handle = <&phy1>; 240 phy-handle = <&phy1>;
247 linux,network-index = <1>; 241 linux,network-index = <1>;
242
243 mdio@520 {
244 #address-cells = <1>;
245 #size-cells = <0>;
246 compatible = "fsl,gianfar-tbi";
247 reg = <0x520 0x20>;
248
249 tbi1: tbi-phy@11 {
250 reg = <0x11>;
251 device_type = "tbi-phy";
252 };
253 };
248 }; 254 };
249 255
250 serial0: serial@4500 { 256 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
index 4447def69dc5..5fd1ad09bdf2 100644
--- a/arch/powerpc/boot/dts/canyonlands.dts
+++ b/arch/powerpc/boot/dts/canyonlands.dts
@@ -149,6 +149,20 @@
149 /*RXDE*/ 0x5 0x4>; 149 /*RXDE*/ 0x5 0x4>;
150 }; 150 };
151 151
152 USB0: ehci@bffd0400 {
153 compatible = "ibm,usb-ehci-460ex", "usb-ehci";
154 interrupt-parent = <&UIC2>;
155 interrupts = <0x1d 4>;
156 reg = <4 0xbffd0400 0x90 4 0xbffd0490 0x70>;
157 };
158
159 USB1: usb@bffd0000 {
160 compatible = "ohci-le";
161 reg = <4 0xbffd0000 0x60>;
162 interrupt-parent = <&UIC2>;
163 interrupts = <0x1e 4>;
164 };
165
152 POB0: opb { 166 POB0: opb {
153 compatible = "ibm,opb-460ex", "ibm,opb"; 167 compatible = "ibm,opb-460ex", "ibm,opb";
154 #address-cells = <1>; 168 #address-cells = <1>;
@@ -252,6 +266,20 @@
252 reg = <0xef600700 0x00000014>; 266 reg = <0xef600700 0x00000014>;
253 interrupt-parent = <&UIC0>; 267 interrupt-parent = <&UIC0>;
254 interrupts = <0x2 0x4>; 268 interrupts = <0x2 0x4>;
269 #address-cells = <1>;
270 #size-cells = <0>;
271 rtc@68 {
272 compatible = "stm,m41t80";
273 reg = <0x68>;
274 interrupt-parent = <&UIC2>;
275 interrupts = <0x19 0x8>;
276 };
277 sttm@48 {
278 compatible = "ad,ad7414";
279 reg = <0x48>;
280 interrupt-parent = <&UIC1>;
281 interrupts = <0x14 0x8>;
282 };
255 }; 283 };
256 284
257 IIC1: i2c@ef600800 { 285 IIC1: i2c@ef600800 {
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 2f74cc4e093e..cee8080aa245 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -17,6 +17,7 @@
17 compatible = "schindler,cm5200"; 17 compatible = "schindler,cm5200";
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 interrupt-parent = <&mpc5200_pic>;
20 21
21 cpus { 22 cpus {
22 #address-cells = <1>; 23 #address-cells = <1>;
@@ -66,7 +67,6 @@
66 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 67 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
67 reg = <0x600 0x10>; 68 reg = <0x600 0x10>;
68 interrupts = <1 9 0>; 69 interrupts = <1 9 0>;
69 interrupt-parent = <&mpc5200_pic>;
70 fsl,has-wdt; 70 fsl,has-wdt;
71 }; 71 };
72 72
@@ -74,84 +74,76 @@
74 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
75 reg = <0x610 0x10>; 75 reg = <0x610 0x10>;
76 interrupts = <1 10 0>; 76 interrupts = <1 10 0>;
77 interrupt-parent = <&mpc5200_pic>;
78 }; 77 };
79 78
80 timer@620 { // General Purpose Timer 79 timer@620 { // General Purpose Timer
81 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
82 reg = <0x620 0x10>; 81 reg = <0x620 0x10>;
83 interrupts = <1 11 0>; 82 interrupts = <1 11 0>;
84 interrupt-parent = <&mpc5200_pic>;
85 }; 83 };
86 84
87 timer@630 { // General Purpose Timer 85 timer@630 { // General Purpose Timer
88 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
89 reg = <0x630 0x10>; 87 reg = <0x630 0x10>;
90 interrupts = <1 12 0>; 88 interrupts = <1 12 0>;
91 interrupt-parent = <&mpc5200_pic>;
92 }; 89 };
93 90
94 timer@640 { // General Purpose Timer 91 timer@640 { // General Purpose Timer
95 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
96 reg = <0x640 0x10>; 93 reg = <0x640 0x10>;
97 interrupts = <1 13 0>; 94 interrupts = <1 13 0>;
98 interrupt-parent = <&mpc5200_pic>;
99 }; 95 };
100 96
101 timer@650 { // General Purpose Timer 97 timer@650 { // General Purpose Timer
102 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
103 reg = <0x650 0x10>; 99 reg = <0x650 0x10>;
104 interrupts = <1 14 0>; 100 interrupts = <1 14 0>;
105 interrupt-parent = <&mpc5200_pic>;
106 }; 101 };
107 102
108 timer@660 { // General Purpose Timer 103 timer@660 { // General Purpose Timer
109 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 104 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
110 reg = <0x660 0x10>; 105 reg = <0x660 0x10>;
111 interrupts = <1 15 0>; 106 interrupts = <1 15 0>;
112 interrupt-parent = <&mpc5200_pic>;
113 }; 107 };
114 108
115 timer@670 { // General Purpose Timer 109 timer@670 { // General Purpose Timer
116 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 110 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
117 reg = <0x670 0x10>; 111 reg = <0x670 0x10>;
118 interrupts = <1 16 0>; 112 interrupts = <1 16 0>;
119 interrupt-parent = <&mpc5200_pic>;
120 }; 113 };
121 114
122 rtc@800 { // Real time clock 115 rtc@800 { // Real time clock
123 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; 116 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
124 reg = <0x800 0x100>; 117 reg = <0x800 0x100>;
125 interrupts = <1 5 0 1 6 0>; 118 interrupts = <1 5 0 1 6 0>;
126 interrupt-parent = <&mpc5200_pic>;
127 }; 119 };
128 120
129 gpio@b00 { 121 gpio_simple: gpio@b00 {
130 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; 122 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
131 reg = <0xb00 0x40>; 123 reg = <0xb00 0x40>;
132 interrupts = <1 7 0>; 124 interrupts = <1 7 0>;
133 interrupt-parent = <&mpc5200_pic>; 125 gpio-controller;
126 #gpio-cells = <2>;
134 }; 127 };
135 128
136 gpio@c00 { 129 gpio_wkup: gpio@c00 {
137 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; 130 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
138 reg = <0xc00 0x40>; 131 reg = <0xc00 0x40>;
139 interrupts = <1 8 0 0 3 0>; 132 interrupts = <1 8 0 0 3 0>;
140 interrupt-parent = <&mpc5200_pic>; 133 gpio-controller;
134 #gpio-cells = <2>;
141 }; 135 };
142 136
143 spi@f00 { 137 spi@f00 {
144 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; 138 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
145 reg = <0xf00 0x20>; 139 reg = <0xf00 0x20>;
146 interrupts = <2 13 0 2 14 0>; 140 interrupts = <2 13 0 2 14 0>;
147 interrupt-parent = <&mpc5200_pic>;
148 }; 141 };
149 142
150 usb@1000 { 143 usb@1000 {
151 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; 144 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
152 reg = <0x1000 0xff>; 145 reg = <0x1000 0xff>;
153 interrupts = <2 6 0>; 146 interrupts = <2 6 0>;
154 interrupt-parent = <&mpc5200_pic>;
155 }; 147 };
156 148
157 dma-controller@1200 { 149 dma-controller@1200 {
@@ -161,7 +153,6 @@
161 3 4 0 3 5 0 3 6 0 3 7 0 153 3 4 0 3 5 0 3 6 0 3 7 0
162 3 8 0 3 9 0 3 10 0 3 11 0 154 3 8 0 3 9 0 3 10 0 3 11 0
163 3 12 0 3 13 0 3 14 0 3 15 0>; 155 3 12 0 3 13 0 3 14 0 3 15 0>;
164 interrupt-parent = <&mpc5200_pic>;
165 }; 156 };
166 157
167 xlb@1f00 { 158 xlb@1f00 {
@@ -170,48 +161,34 @@
170 }; 161 };
171 162
172 serial@2000 { // PSC1 163 serial@2000 { // PSC1
173 device_type = "serial";
174 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 164 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
175 port-number = <0>; // Logical port assignment
176 reg = <0x2000 0x100>; 165 reg = <0x2000 0x100>;
177 interrupts = <2 1 0>; 166 interrupts = <2 1 0>;
178 interrupt-parent = <&mpc5200_pic>;
179 }; 167 };
180 168
181 serial@2200 { // PSC2 169 serial@2200 { // PSC2
182 device_type = "serial"; 170 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
183 compatible = "fsl,mpc5200-psc-uart";
184 port-number = <1>; // Logical port assignment
185 reg = <0x2200 0x100>; 171 reg = <0x2200 0x100>;
186 interrupts = <2 2 0>; 172 interrupts = <2 2 0>;
187 interrupt-parent = <&mpc5200_pic>;
188 }; 173 };
189 174
190 serial@2400 { // PSC3 175 serial@2400 { // PSC3
191 device_type = "serial"; 176 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
192 compatible = "fsl,mpc5200-psc-uart";
193 port-number = <2>; // Logical port assignment
194 reg = <0x2400 0x100>; 177 reg = <0x2400 0x100>;
195 interrupts = <2 3 0>; 178 interrupts = <2 3 0>;
196 interrupt-parent = <&mpc5200_pic>;
197 }; 179 };
198 180
199 serial@2c00 { // PSC6 181 serial@2c00 { // PSC6
200 device_type = "serial";
201 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 182 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
202 port-number = <5>; // Logical port assignment
203 reg = <0x2c00 0x100>; 183 reg = <0x2c00 0x100>;
204 interrupts = <2 4 0>; 184 interrupts = <2 4 0>;
205 interrupt-parent = <&mpc5200_pic>;
206 }; 185 };
207 186
208 ethernet@3000 { 187 ethernet@3000 {
209 device_type = "network";
210 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; 188 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
211 reg = <0x3000 0x400>; 189 reg = <0x3000 0x400>;
212 local-mac-address = [ 00 00 00 00 00 00 ]; 190 local-mac-address = [ 00 00 00 00 00 00 ];
213 interrupts = <2 5 0>; 191 interrupts = <2 5 0>;
214 interrupt-parent = <&mpc5200_pic>;
215 phy-handle = <&phy0>; 192 phy-handle = <&phy0>;
216 }; 193 };
217 194
@@ -221,10 +198,8 @@
221 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; 198 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
222 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 199 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
223 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 200 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
224 interrupt-parent = <&mpc5200_pic>;
225 201
226 phy0: ethernet-phy@0 { 202 phy0: ethernet-phy@0 {
227 device_type = "ethernet-phy";
228 reg = <0>; 203 reg = <0>;
229 }; 204 };
230 }; 205 };
@@ -235,7 +210,6 @@
235 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 210 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
236 reg = <0x3d40 0x40>; 211 reg = <0x3d40 0x40>;
237 interrupts = <2 16 0>; 212 interrupts = <2 16 0>;
238 interrupt-parent = <&mpc5200_pic>;
239 fsl5200-clocking; 213 fsl5200-clocking;
240 }; 214 };
241 215
@@ -245,9 +219,8 @@
245 }; 219 };
246 }; 220 };
247 221
248 lpb { 222 localbus {
249 model = "fsl,lpb"; 223 compatible = "fsl,mpc5200b-lpb","simple-bus";
250 compatible = "fsl,lpb";
251 #address-cells = <2>; 224 #address-cells = <2>;
252 #size-cells = <1>; 225 #size-cells = <1>;
253 ranges = <0 0 0xfc000000 0x2000000>; 226 ranges = <0 0 0xfc000000 0x2000000>;
diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts
new file mode 100644
index 000000000000..4c36186ef946
--- /dev/null
+++ b/arch/powerpc/boot/dts/digsy_mtc.dts
@@ -0,0 +1,254 @@
1/*
2 * Digsy MTC board Device Tree Source
3 *
4 * Copyright (C) 2009 Semihalf
5 *
6 * Based on the CM5200 by M. Balakowicz
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13
14/dts-v1/;
15
16/ {
17 model = "intercontrol,digsy-mtc";
18 compatible = "intercontrol,digsy-mtc";
19 #address-cells = <1>;
20 #size-cells = <1>;
21 interrupt-parent = <&mpc5200_pic>;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 PowerPC,5200@0 {
28 device_type = "cpu";
29 reg = <0>;
30 d-cache-line-size = <32>;
31 i-cache-line-size = <32>;
32 d-cache-size = <0x4000>; // L1, 16K
33 i-cache-size = <0x4000>; // L1, 16K
34 timebase-frequency = <0>; // from bootloader
35 bus-frequency = <0>; // from bootloader
36 clock-frequency = <0>; // from bootloader
37 };
38 };
39
40 memory {
41 device_type = "memory";
42 reg = <0x00000000 0x02000000>; // 32MB
43 };
44
45 soc5200@f0000000 {
46 #address-cells = <1>;
47 #size-cells = <1>;
48 compatible = "fsl,mpc5200b-immr";
49 ranges = <0 0xf0000000 0x0000c000>;
50 reg = <0xf0000000 0x00000100>;
51 bus-frequency = <0>; // from bootloader
52 system-frequency = <0>; // from bootloader
53
54 cdm@200 {
55 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
56 reg = <0x200 0x38>;
57 };
58
59 mpc5200_pic: interrupt-controller@500 {
60 // 5200 interrupts are encoded into two levels;
61 interrupt-controller;
62 #interrupt-cells = <3>;
63 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
64 reg = <0x500 0x80>;
65 };
66
67 timer@600 { // General Purpose Timer
68 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
69 reg = <0x600 0x10>;
70 interrupts = <1 9 0>;
71 fsl,has-wdt;
72 };
73
74 timer@610 { // General Purpose Timer
75 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
76 reg = <0x610 0x10>;
77 interrupts = <1 10 0>;
78 };
79
80 timer@620 { // General Purpose Timer
81 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
82 reg = <0x620 0x10>;
83 interrupts = <1 11 0>;
84 };
85
86 timer@630 { // General Purpose Timer
87 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
88 reg = <0x630 0x10>;
89 interrupts = <1 12 0>;
90 };
91
92 timer@640 { // General Purpose Timer
93 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
94 reg = <0x640 0x10>;
95 interrupts = <1 13 0>;
96 };
97
98 timer@650 { // General Purpose Timer
99 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
100 reg = <0x650 0x10>;
101 interrupts = <1 14 0>;
102 };
103
104 timer@660 { // General Purpose Timer
105 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
106 reg = <0x660 0x10>;
107 interrupts = <1 15 0>;
108 };
109
110 timer@670 { // General Purpose Timer
111 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
112 reg = <0x670 0x10>;
113 interrupts = <1 16 0>;
114 };
115
116 gpio_simple: gpio@b00 {
117 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
118 reg = <0xb00 0x40>;
119 interrupts = <1 7 0>;
120 gpio-controller;
121 #gpio-cells = <2>;
122 };
123
124 gpio_wkup: gpio@c00 {
125 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
126 reg = <0xc00 0x40>;
127 interrupts = <1 8 0 0 3 0>;
128 gpio-controller;
129 #gpio-cells = <2>;
130 };
131
132 spi@f00 {
133 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
134 reg = <0xf00 0x20>;
135 interrupts = <2 13 0 2 14 0>;
136 };
137
138 usb@1000 {
139 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
140 reg = <0x1000 0xff>;
141 interrupts = <2 6 0>;
142 };
143
144 dma-controller@1200 {
145 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
146 reg = <0x1200 0x80>;
147 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
148 3 4 0 3 5 0 3 6 0 3 7 0
149 3 8 0 3 9 0 3 10 0 3 11 0
150 3 12 0 3 13 0 3 14 0 3 15 0>;
151 };
152
153 xlb@1f00 {
154 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
155 reg = <0x1f00 0x100>;
156 };
157
158 serial@2600 { // PSC4
159 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
160 reg = <0x2600 0x100>;
161 interrupts = <2 11 0>;
162 };
163
164 serial@2800 { // PSC5
165 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
166 reg = <0x2800 0x100>;
167 interrupts = <2 12 0>;
168 };
169
170 ethernet@3000 {
171 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
172 reg = <0x3000 0x400>;
173 local-mac-address = [ 00 00 00 00 00 00 ];
174 interrupts = <2 5 0>;
175 phy-handle = <&phy0>;
176 };
177
178 mdio@3000 {
179 #address-cells = <1>;
180 #size-cells = <0>;
181 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
182 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
183 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
184
185 phy0: ethernet-phy@0 {
186 reg = <0>;
187 };
188 };
189
190 ata@3a00 {
191 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
192 reg = <0x3a00 0x100>;
193 interrupts = <2 7 0>;
194 };
195
196 i2c@3d00 {
197 #address-cells = <1>;
198 #size-cells = <0>;
199 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
200 reg = <0x3d00 0x40>;
201 interrupts = <2 15 0>;
202 fsl5200-clocking;
203
204 rtc@50 {
205 compatible = "at,24c08";
206 reg = <0x50>;
207 };
208
209 rtc@68 {
210 compatible = "dallas,ds1339";
211 reg = <0x68>;
212 };
213 };
214
215 sram@8000 {
216 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
217 reg = <0x8000 0x4000>;
218 };
219 };
220
221 lpb {
222 compatible = "fsl,mpc5200b-lpb","simple-bus";
223 #address-cells = <2>;
224 #size-cells = <1>;
225 ranges = <0 0 0xff000000 0x1000000>;
226
227 // 16-bit flash device at LocalPlus Bus CS0
228 flash@0,0 {
229 compatible = "cfi-flash";
230 reg = <0 0 0x1000000>;
231 bank-width = <2>;
232 device-width = <2>;
233 #size-cells = <1>;
234 #address-cells = <1>;
235
236 partition@0 {
237 label = "kernel";
238 reg = <0x0 0x00200000>;
239 };
240 partition@200000 {
241 label = "root";
242 reg = <0x00200000 0x00300000>;
243 };
244 partition@500000 {
245 label = "user";
246 reg = <0x00500000 0x00a00000>;
247 };
248 partition@f00000 {
249 label = "u-boot";
250 reg = <0x00f00000 0x100000>;
251 };
252 };
253 };
254};
diff --git a/arch/powerpc/boot/dts/gef_ppc9a.dts b/arch/powerpc/boot/dts/gef_ppc9a.dts
new file mode 100644
index 000000000000..d47ad0718759
--- /dev/null
+++ b/arch/powerpc/boot/dts/gef_ppc9a.dts
@@ -0,0 +1,367 @@
1/*
2 * GE Fanuc PPC9A Device Tree Source
3 *
4 * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, 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 * Based on: SBS CM6 Device Tree Source
12 * Copyright 2007 SBS Technologies GmbH & Co. KG
13 * And: mpc8641_hpcn.dts (MPC8641 HPCN Device Tree Source)
14 * Copyright 2006 Freescale Semiconductor Inc.
15 */
16
17/*
18 * Compiled with dtc -I dts -O dtb -o gef_ppc9a.dtb gef_ppc9a.dts
19 */
20
21/dts-v1/;
22
23/ {
24 model = "GEF_PPC9A";
25 compatible = "gef,ppc9a";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 aliases {
30 ethernet0 = &enet0;
31 ethernet1 = &enet1;
32 serial0 = &serial0;
33 serial1 = &serial1;
34 pci0 = &pci0;
35 };
36
37 cpus {
38 #address-cells = <1>;
39 #size-cells = <0>;
40
41 PowerPC,8641@0 {
42 device_type = "cpu";
43 reg = <0>;
44 d-cache-line-size = <32>; // 32 bytes
45 i-cache-line-size = <32>; // 32 bytes
46 d-cache-size = <32768>; // L1, 32K
47 i-cache-size = <32768>; // L1, 32K
48 timebase-frequency = <0>; // From uboot
49 bus-frequency = <0>; // From uboot
50 clock-frequency = <0>; // From uboot
51 };
52 PowerPC,8641@1 {
53 device_type = "cpu";
54 reg = <1>;
55 d-cache-line-size = <32>; // 32 bytes
56 i-cache-line-size = <32>; // 32 bytes
57 d-cache-size = <32768>; // L1, 32K
58 i-cache-size = <32768>; // L1, 32K
59 timebase-frequency = <0>; // From uboot
60 bus-frequency = <0>; // From uboot
61 clock-frequency = <0>; // From uboot
62 };
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x0 0x40000000>; // set by uboot
68 };
69
70 localbus@fef05000 {
71 #address-cells = <2>;
72 #size-cells = <1>;
73 compatible = "fsl,mpc8641-localbus", "simple-bus";
74 reg = <0xfef05000 0x1000>;
75 interrupts = <19 2>;
76 interrupt-parent = <&mpic>;
77
78 ranges = <0 0 0xff000000 0x01000000 // 16MB Boot flash
79 1 0 0xe8000000 0x08000000 // Paged Flash 0
80 2 0 0xe0000000 0x08000000 // Paged Flash 1
81 3 0 0xfc100000 0x00020000 // NVRAM
82 4 0 0xfc000000 0x00008000 // FPGA
83 5 0 0xfc008000 0x00008000 // AFIX FPGA
84 6 0 0xfd000000 0x00800000 // IO FPGA (8-bit)
85 7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit)
86
87 /* flash@0,0 is a mirror of part of the memory in flash@1,0
88 flash@0,0 {
89 compatible = "gef,ppc9a-firmware-mirror", "cfi-flash";
90 reg = <0x0 0x0 0x1000000>;
91 bank-width = <4>;
92 device-width = <2>;
93 #address-cells = <1>;
94 #size-cells = <1>;
95 partition@0 {
96 label = "firmware";
97 reg = <0x0 0x1000000>;
98 read-only;
99 };
100 };
101 */
102
103 flash@1,0 {
104 compatible = "gef,ppc9a-paged-flash", "cfi-flash";
105 reg = <0x1 0x0 0x8000000>;
106 bank-width = <4>;
107 device-width = <2>;
108 #address-cells = <1>;
109 #size-cells = <1>;
110 partition@0 {
111 label = "user";
112 reg = <0x0 0x7800000>;
113 };
114 partition@7800000 {
115 label = "firmware";
116 reg = <0x7800000 0x800000>;
117 read-only;
118 };
119 };
120
121 fpga@4,0 {
122 compatible = "gef,ppc9a-fpga-regs";
123 reg = <0x4 0x0 0x40>;
124 };
125
126 wdt@4,2000 {
127 compatible = "gef,ppc9a-fpga-wdt", "gef,fpga-wdt-1.00",
128 "gef,fpga-wdt";
129 reg = <0x4 0x2000 0x8>;
130 interrupts = <0x1a 0x4>;
131 interrupt-parent = <&gef_pic>;
132 };
133 /* Second watchdog available, driver currently supports one.
134 wdt@4,2010 {
135 compatible = "gef,ppc9a-fpga-wdt", "gef,fpga-wdt-1.00",
136 "gef,fpga-wdt";
137 reg = <0x4 0x2010 0x8>;
138 interrupts = <0x1b 0x4>;
139 interrupt-parent = <&gef_pic>;
140 };
141 */
142 gef_pic: pic@4,4000 {
143 #interrupt-cells = <1>;
144 interrupt-controller;
145 compatible = "gef,ppc9a-fpga-pic", "gef,fpga-pic-1.00";
146 reg = <0x4 0x4000 0x20>;
147 interrupts = <0x8
148 0x9>;
149 interrupt-parent = <&mpic>;
150
151 };
152 gef_gpio: gpio@7,14000 {
153 #gpio-cells = <2>;
154 compatible = "gef,ppc9a-gpio", "gef,sbc610-gpio";
155 reg = <0x7 0x14000 0x24>;
156 gpio-controller;
157 };
158 };
159
160 soc@fef00000 {
161 #address-cells = <1>;
162 #size-cells = <1>;
163 #interrupt-cells = <2>;
164 compatible = "fsl,mpc8641-soc", "simple-bus";
165 ranges = <0x0 0xfef00000 0x00100000>;
166 reg = <0xfef00000 0x100000>; // CCSRBAR 1M
167 bus-frequency = <33333333>;
168
169 i2c1: i2c@3000 {
170 #address-cells = <1>;
171 #size-cells = <0>;
172 compatible = "fsl-i2c";
173 reg = <0x3000 0x100>;
174 interrupts = <0x2b 0x2>;
175 interrupt-parent = <&mpic>;
176 dfsrr;
177
178 hwmon@48 {
179 compatible = "national,lm92";
180 reg = <0x48>;
181 };
182
183 hwmon@4c {
184 compatible = "adi,adt7461";
185 reg = <0x4c>;
186 };
187
188 rtc@51 {
189 compatible = "epson,rx8581";
190 reg = <0x00000051>;
191 };
192
193 eti@6b {
194 compatible = "dallas,ds1682";
195 reg = <0x6b>;
196 };
197 };
198
199 i2c2: i2c@3100 {
200 #address-cells = <1>;
201 #size-cells = <0>;
202 compatible = "fsl-i2c";
203 reg = <0x3100 0x100>;
204 interrupts = <0x2b 0x2>;
205 interrupt-parent = <&mpic>;
206 dfsrr;
207 };
208
209 dma@21300 {
210 #address-cells = <1>;
211 #size-cells = <1>;
212 compatible = "fsl,mpc8641-dma", "fsl,eloplus-dma";
213 reg = <0x21300 0x4>;
214 ranges = <0x0 0x21100 0x200>;
215 cell-index = <0>;
216 dma-channel@0 {
217 compatible = "fsl,mpc8641-dma-channel",
218 "fsl,eloplus-dma-channel";
219 reg = <0x0 0x80>;
220 cell-index = <0>;
221 interrupt-parent = <&mpic>;
222 interrupts = <20 2>;
223 };
224 dma-channel@80 {
225 compatible = "fsl,mpc8641-dma-channel",
226 "fsl,eloplus-dma-channel";
227 reg = <0x80 0x80>;
228 cell-index = <1>;
229 interrupt-parent = <&mpic>;
230 interrupts = <21 2>;
231 };
232 dma-channel@100 {
233 compatible = "fsl,mpc8641-dma-channel",
234 "fsl,eloplus-dma-channel";
235 reg = <0x100 0x80>;
236 cell-index = <2>;
237 interrupt-parent = <&mpic>;
238 interrupts = <22 2>;
239 };
240 dma-channel@180 {
241 compatible = "fsl,mpc8641-dma-channel",
242 "fsl,eloplus-dma-channel";
243 reg = <0x180 0x80>;
244 cell-index = <3>;
245 interrupt-parent = <&mpic>;
246 interrupts = <23 2>;
247 };
248 };
249
250 enet0: ethernet@24000 {
251 #address-cells = <1>;
252 #size-cells = <1>;
253 device_type = "network";
254 model = "eTSEC";
255 compatible = "gianfar";
256 reg = <0x24000 0x1000>;
257 ranges = <0x0 0x24000 0x1000>;
258 local-mac-address = [ 00 00 00 00 00 00 ];
259 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
260 interrupt-parent = <&mpic>;
261 phy-handle = <&phy0>;
262 phy-connection-type = "gmii";
263
264 mdio@520 {
265 #address-cells = <1>;
266 #size-cells = <0>;
267 compatible = "fsl,gianfar-mdio";
268 reg = <0x520 0x20>;
269
270 phy0: ethernet-phy@0 {
271 interrupt-parent = <&gef_pic>;
272 interrupts = <0x9 0x4>;
273 reg = <1>;
274 };
275 phy2: ethernet-phy@2 {
276 interrupt-parent = <&gef_pic>;
277 interrupts = <0x8 0x4>;
278 reg = <3>;
279 };
280 };
281 };
282
283 enet1: ethernet@26000 {
284 device_type = "network";
285 model = "eTSEC";
286 compatible = "gianfar";
287 reg = <0x26000 0x1000>;
288 local-mac-address = [ 00 00 00 00 00 00 ];
289 interrupts = <0x1f 0x2 0x20 0x2 0x21 0x2>;
290 interrupt-parent = <&mpic>;
291 phy-handle = <&phy2>;
292 phy-connection-type = "gmii";
293 };
294
295 serial0: serial@4500 {
296 cell-index = <0>;
297 device_type = "serial";
298 compatible = "ns16550";
299 reg = <0x4500 0x100>;
300 clock-frequency = <0>;
301 interrupts = <0x2a 0x2>;
302 interrupt-parent = <&mpic>;
303 };
304
305 serial1: serial@4600 {
306 cell-index = <1>;
307 device_type = "serial";
308 compatible = "ns16550";
309 reg = <0x4600 0x100>;
310 clock-frequency = <0>;
311 interrupts = <0x1c 0x2>;
312 interrupt-parent = <&mpic>;
313 };
314
315 mpic: pic@40000 {
316 clock-frequency = <0>;
317 interrupt-controller;
318 #address-cells = <0>;
319 #interrupt-cells = <2>;
320 reg = <0x40000 0x40000>;
321 compatible = "chrp,open-pic";
322 device_type = "open-pic";
323 };
324
325 global-utilities@e0000 {
326 compatible = "fsl,mpc8641-guts";
327 reg = <0xe0000 0x1000>;
328 fsl,has-rstcr;
329 };
330 };
331
332 pci0: pcie@fef08000 {
333 compatible = "fsl,mpc8641-pcie";
334 device_type = "pci";
335 #interrupt-cells = <1>;
336 #size-cells = <2>;
337 #address-cells = <3>;
338 reg = <0xfef08000 0x1000>;
339 bus-range = <0x0 0xff>;
340 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x40000000
341 0x01000000 0x0 0x00000000 0xfe000000 0x0 0x00400000>;
342 clock-frequency = <33333333>;
343 interrupt-parent = <&mpic>;
344 interrupts = <0x18 0x2>;
345 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
346 interrupt-map = <
347 0x0000 0x0 0x0 0x1 &mpic 0x0 0x1
348 0x0000 0x0 0x0 0x2 &mpic 0x1 0x1
349 0x0000 0x0 0x0 0x3 &mpic 0x2 0x1
350 0x0000 0x0 0x0 0x4 &mpic 0x3 0x1
351 >;
352
353 pcie@0 {
354 reg = <0 0 0 0 0>;
355 #size-cells = <2>;
356 #address-cells = <3>;
357 device_type = "pci";
358 ranges = <0x02000000 0x0 0x80000000
359 0x02000000 0x0 0x80000000
360 0x0 0x40000000
361
362 0x01000000 0x0 0x00000000
363 0x01000000 0x0 0x00000000
364 0x0 0x00400000>;
365 };
366 };
367};
diff --git a/arch/powerpc/boot/dts/gef_sbc310.dts b/arch/powerpc/boot/dts/gef_sbc310.dts
new file mode 100644
index 000000000000..1569117e5ddc
--- /dev/null
+++ b/arch/powerpc/boot/dts/gef_sbc310.dts
@@ -0,0 +1,367 @@
1/*
2 * GE Fanuc SBC310 Device Tree Source
3 *
4 * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, 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 * Based on: SBS CM6 Device Tree Source
12 * Copyright 2007 SBS Technologies GmbH & Co. KG
13 * And: mpc8641_hpcn.dts (MPC8641 HPCN Device Tree Source)
14 * Copyright 2006 Freescale Semiconductor Inc.
15 */
16
17/*
18 * Compiled with dtc -I dts -O dtb -o gef_sbc310.dtb gef_sbc310.dts
19 */
20
21/dts-v1/;
22
23/ {
24 model = "GEF_SBC310";
25 compatible = "gef,sbc310";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 aliases {
30 ethernet0 = &enet0;
31 ethernet1 = &enet1;
32 serial0 = &serial0;
33 serial1 = &serial1;
34 pci0 = &pci0;
35 };
36
37 cpus {
38 #address-cells = <1>;
39 #size-cells = <0>;
40
41 PowerPC,8641@0 {
42 device_type = "cpu";
43 reg = <0>;
44 d-cache-line-size = <32>; // 32 bytes
45 i-cache-line-size = <32>; // 32 bytes
46 d-cache-size = <32768>; // L1, 32K
47 i-cache-size = <32768>; // L1, 32K
48 timebase-frequency = <0>; // From uboot
49 bus-frequency = <0>; // From uboot
50 clock-frequency = <0>; // From uboot
51 };
52 PowerPC,8641@1 {
53 device_type = "cpu";
54 reg = <1>;
55 d-cache-line-size = <32>; // 32 bytes
56 i-cache-line-size = <32>; // 32 bytes
57 d-cache-size = <32768>; // L1, 32K
58 i-cache-size = <32768>; // L1, 32K
59 timebase-frequency = <0>; // From uboot
60 bus-frequency = <0>; // From uboot
61 clock-frequency = <0>; // From uboot
62 };
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x0 0x40000000>; // set by uboot
68 };
69
70 localbus@fef05000 {
71 #address-cells = <2>;
72 #size-cells = <1>;
73 compatible = "fsl,mpc8641-localbus", "simple-bus";
74 reg = <0xfef05000 0x1000>;
75 interrupts = <19 2>;
76 interrupt-parent = <&mpic>;
77
78 ranges = <0 0 0xff000000 0x01000000 // 16MB Boot flash
79 1 0 0xe0000000 0x08000000 // Paged Flash 0
80 2 0 0xe8000000 0x08000000 // Paged Flash 1
81 3 0 0xfc100000 0x00020000 // NVRAM
82 4 0 0xfc000000 0x00010000>; // FPGA
83
84 /* flash@0,0 is a mirror of part of the memory in flash@1,0
85 flash@0,0 {
86 compatible = "cfi-flash";
87 reg = <0 0 0x01000000>;
88 bank-width = <2>;
89 device-width = <2>;
90 #address-cells = <1>;
91 #size-cells = <1>;
92 partition@0 {
93 label = "firmware";
94 reg = <0x00000000 0x01000000>;
95 read-only;
96 };
97 };
98 */
99
100 flash@1,0 {
101 compatible = "cfi-flash";
102 reg = <1 0 0x8000000>;
103 bank-width = <2>;
104 device-width = <2>;
105 #address-cells = <1>;
106 #size-cells = <1>;
107 partition@0 {
108 label = "user";
109 reg = <0x00000000 0x07800000>;
110 };
111 partition@7800000 {
112 label = "firmware";
113 reg = <0x07800000 0x00800000>;
114 read-only;
115 };
116 };
117
118 fpga@4,0 {
119 compatible = "gef,fpga-regs";
120 reg = <0x4 0x0 0x40>;
121 };
122
123 wdt@4,2000 {
124 #interrupt-cells = <2>;
125 device_type = "watchdog";
126 compatible = "gef,fpga-wdt";
127 reg = <0x4 0x2000 0x8>;
128 interrupts = <0x1a 0x4>;
129 interrupt-parent = <&gef_pic>;
130 };
131/*
132 wdt@4,2010 {
133 #interrupt-cells = <2>;
134 device_type = "watchdog";
135 compatible = "gef,fpga-wdt";
136 reg = <0x4 0x2010 0x8>;
137 interrupts = <0x1b 0x4>;
138 interrupt-parent = <&gef_pic>;
139 };
140*/
141 gef_pic: pic@4,4000 {
142 #interrupt-cells = <1>;
143 interrupt-controller;
144 compatible = "gef,fpga-pic";
145 reg = <0x4 0x4000 0x20>;
146 interrupts = <0x8
147 0x9>;
148 interrupt-parent = <&mpic>;
149
150 };
151 gef_gpio: gpio@4,8000 {
152 #gpio-cells = <2>;
153 compatible = "gef,sbc310-gpio";
154 reg = <0x4 0x8000 0x24>;
155 gpio-controller;
156 };
157 };
158
159 soc@fef00000 {
160 #address-cells = <1>;
161 #size-cells = <1>;
162 #interrupt-cells = <2>;
163 device_type = "soc";
164 compatible = "simple-bus";
165 ranges = <0x0 0xfef00000 0x00100000>;
166 reg = <0xfef00000 0x100000>; // CCSRBAR 1M
167 bus-frequency = <33333333>;
168
169 i2c1: i2c@3000 {
170 #address-cells = <1>;
171 #size-cells = <0>;
172 compatible = "fsl-i2c";
173 reg = <0x3000 0x100>;
174 interrupts = <0x2b 0x2>;
175 interrupt-parent = <&mpic>;
176 dfsrr;
177
178 rtc@51 {
179 compatible = "epson,rx8581";
180 reg = <0x00000051>;
181 };
182 };
183
184 i2c2: i2c@3100 {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "fsl-i2c";
188 reg = <0x3100 0x100>;
189 interrupts = <0x2b 0x2>;
190 interrupt-parent = <&mpic>;
191 dfsrr;
192
193 hwmon@48 {
194 compatible = "national,lm92";
195 reg = <0x48>;
196 };
197
198 hwmon@4c {
199 compatible = "adi,adt7461";
200 reg = <0x4c>;
201 };
202
203 eti@6b {
204 compatible = "dallas,ds1682";
205 reg = <0x6b>;
206 };
207 };
208
209 dma@21300 {
210 #address-cells = <1>;
211 #size-cells = <1>;
212 compatible = "fsl,mpc8641-dma", "fsl,eloplus-dma";
213 reg = <0x21300 0x4>;
214 ranges = <0x0 0x21100 0x200>;
215 cell-index = <0>;
216 dma-channel@0 {
217 compatible = "fsl,mpc8641-dma-channel",
218 "fsl,eloplus-dma-channel";
219 reg = <0x0 0x80>;
220 cell-index = <0>;
221 interrupt-parent = <&mpic>;
222 interrupts = <20 2>;
223 };
224 dma-channel@80 {
225 compatible = "fsl,mpc8641-dma-channel",
226 "fsl,eloplus-dma-channel";
227 reg = <0x80 0x80>;
228 cell-index = <1>;
229 interrupt-parent = <&mpic>;
230 interrupts = <21 2>;
231 };
232 dma-channel@100 {
233 compatible = "fsl,mpc8641-dma-channel",
234 "fsl,eloplus-dma-channel";
235 reg = <0x100 0x80>;
236 cell-index = <2>;
237 interrupt-parent = <&mpic>;
238 interrupts = <22 2>;
239 };
240 dma-channel@180 {
241 compatible = "fsl,mpc8641-dma-channel",
242 "fsl,eloplus-dma-channel";
243 reg = <0x180 0x80>;
244 cell-index = <3>;
245 interrupt-parent = <&mpic>;
246 interrupts = <23 2>;
247 };
248 };
249
250 enet0: ethernet@24000 {
251 #address-cells = <1>;
252 #size-cells = <1>;
253 device_type = "network";
254 model = "eTSEC";
255 compatible = "gianfar";
256 reg = <0x24000 0x1000>;
257 ranges = <0x0 0x24000 0x1000>;
258 local-mac-address = [ 00 00 00 00 00 00 ];
259 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
260 interrupt-parent = <&mpic>;
261 phy-handle = <&phy0>;
262 phy-connection-type = "gmii";
263
264 mdio@520 {
265 #address-cells = <1>;
266 #size-cells = <0>;
267 compatible = "fsl,gianfar-mdio";
268 reg = <0x520 0x20>;
269
270 phy0: ethernet-phy@0 {
271 interrupt-parent = <&gef_pic>;
272 interrupts = <0x9 0x4>;
273 reg = <1>;
274 };
275 phy2: ethernet-phy@2 {
276 interrupt-parent = <&gef_pic>;
277 interrupts = <0x8 0x4>;
278 reg = <3>;
279 };
280 };
281 };
282
283 enet1: ethernet@26000 {
284 device_type = "network";
285 model = "eTSEC";
286 compatible = "gianfar";
287 reg = <0x26000 0x1000>;
288 local-mac-address = [ 00 00 00 00 00 00 ];
289 interrupts = <0x1f 0x2 0x20 0x2 0x21 0x2>;
290 interrupt-parent = <&mpic>;
291 phy-handle = <&phy2>;
292 phy-connection-type = "gmii";
293 };
294
295 serial0: serial@4500 {
296 cell-index = <0>;
297 device_type = "serial";
298 compatible = "ns16550";
299 reg = <0x4500 0x100>;
300 clock-frequency = <0>;
301 interrupts = <0x2a 0x2>;
302 interrupt-parent = <&mpic>;
303 };
304
305 serial1: serial@4600 {
306 cell-index = <1>;
307 device_type = "serial";
308 compatible = "ns16550";
309 reg = <0x4600 0x100>;
310 clock-frequency = <0>;
311 interrupts = <0x1c 0x2>;
312 interrupt-parent = <&mpic>;
313 };
314
315 mpic: pic@40000 {
316 clock-frequency = <0>;
317 interrupt-controller;
318 #address-cells = <0>;
319 #interrupt-cells = <2>;
320 reg = <0x40000 0x40000>;
321 compatible = "chrp,open-pic";
322 device_type = "open-pic";
323 };
324
325 global-utilities@e0000 {
326 compatible = "fsl,mpc8641-guts";
327 reg = <0xe0000 0x1000>;
328 fsl,has-rstcr;
329 };
330 };
331
332 pci0: pcie@fef08000 {
333 compatible = "fsl,mpc8641-pcie";
334 device_type = "pci";
335 #interrupt-cells = <1>;
336 #size-cells = <2>;
337 #address-cells = <3>;
338 reg = <0xfef08000 0x1000>;
339 bus-range = <0x0 0xff>;
340 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x40000000
341 0x01000000 0x0 0x00000000 0xfe000000 0x0 0x00400000>;
342 clock-frequency = <33333333>;
343 interrupt-parent = <&mpic>;
344 interrupts = <0x18 0x2>;
345 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
346 interrupt-map = <
347 0x0000 0x0 0x0 0x1 &mpic 0x0 0x2
348 0x0000 0x0 0x0 0x2 &mpic 0x1 0x2
349 0x0000 0x0 0x0 0x3 &mpic 0x2 0x2
350 0x0000 0x0 0x0 0x4 &mpic 0x3 0x2
351 >;
352
353 pcie@0 {
354 reg = <0 0 0 0 0>;
355 #size-cells = <2>;
356 #address-cells = <3>;
357 device_type = "pci";
358 ranges = <0x02000000 0x0 0x80000000
359 0x02000000 0x0 0x80000000
360 0x0 0x40000000
361
362 0x01000000 0x0 0x00000000
363 0x01000000 0x0 0x00000000
364 0x0 0x00400000>;
365 };
366 };
367};
diff --git a/arch/powerpc/boot/dts/gef_sbc610.dts b/arch/powerpc/boot/dts/gef_sbc610.dts
index e78c355c7bac..6582dbd36da7 100644
--- a/arch/powerpc/boot/dts/gef_sbc610.dts
+++ b/arch/powerpc/boot/dts/gef_sbc610.dts
@@ -71,7 +71,7 @@
71 #address-cells = <2>; 71 #address-cells = <2>;
72 #size-cells = <1>; 72 #size-cells = <1>;
73 compatible = "fsl,mpc8641-localbus", "simple-bus"; 73 compatible = "fsl,mpc8641-localbus", "simple-bus";
74 reg = <0xf8005000 0x1000>; 74 reg = <0xfef05000 0x1000>;
75 interrupts = <19 2>; 75 interrupts = <19 2>;
76 interrupt-parent = <&mpic>; 76 interrupt-parent = <&mpic>;
77 77
@@ -202,34 +202,37 @@
202 }; 202 };
203 }; 203 };
204 204
205 mdio@24520 {
206 #address-cells = <1>;
207 #size-cells = <0>;
208 compatible = "fsl,gianfar-mdio";
209 reg = <0x24520 0x20>;
210
211 phy0: ethernet-phy@0 {
212 interrupt-parent = <&gef_pic>;
213 interrupts = <0x9 0x4>;
214 reg = <1>;
215 };
216 phy2: ethernet-phy@2 {
217 interrupt-parent = <&gef_pic>;
218 interrupts = <0x8 0x4>;
219 reg = <3>;
220 };
221 };
222
223 enet0: ethernet@24000 { 205 enet0: ethernet@24000 {
206 #address-cells = <1>;
207 #size-cells = <1>;
224 device_type = "network"; 208 device_type = "network";
225 model = "eTSEC"; 209 model = "eTSEC";
226 compatible = "gianfar"; 210 compatible = "gianfar";
227 reg = <0x24000 0x1000>; 211 reg = <0x24000 0x1000>;
212 ranges = <0x0 0x24000 0x1000>;
228 local-mac-address = [ 00 00 00 00 00 00 ]; 213 local-mac-address = [ 00 00 00 00 00 00 ];
229 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 214 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
230 interrupt-parent = <&mpic>; 215 interrupt-parent = <&mpic>;
231 phy-handle = <&phy0>; 216 phy-handle = <&phy0>;
232 phy-connection-type = "gmii"; 217 phy-connection-type = "gmii";
218
219 mdio@520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-mdio";
223 reg = <0x520 0x20>;
224
225 phy0: ethernet-phy@0 {
226 interrupt-parent = <&gef_pic>;
227 interrupts = <0x9 0x4>;
228 reg = <1>;
229 };
230 phy2: ethernet-phy@2 {
231 interrupt-parent = <&gef_pic>;
232 interrupts = <0x8 0x4>;
233 reg = <3>;
234 };
235 };
233 }; 236 };
234 237
235 enet1: ethernet@26000 { 238 enet1: ethernet@26000 {
diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts
index 3bfff47418db..c9cfd374bffb 100644
--- a/arch/powerpc/boot/dts/ksi8560.dts
+++ b/arch/powerpc/boot/dts/ksi8560.dts
@@ -57,14 +57,14 @@
57 bus-frequency = <0>; /* Fixed by bootwrapper */ 57 bus-frequency = <0>; /* Fixed by bootwrapper */
58 58
59 memory-controller@2000 { 59 memory-controller@2000 {
60 compatible = "fsl,8540-memory-controller"; 60 compatible = "fsl,mpc8540-memory-controller";
61 reg = <0x2000 0x1000>; 61 reg = <0x2000 0x1000>;
62 interrupt-parent = <&mpic>; 62 interrupt-parent = <&mpic>;
63 interrupts = <0x12 0x2>; 63 interrupts = <0x12 0x2>;
64 }; 64 };
65 65
66 L2: l2-cache-controller@20000 { 66 L2: l2-cache-controller@20000 {
67 compatible = "fsl,8540-l2-cache-controller"; 67 compatible = "fsl,mpc8540-l2-cache-controller";
68 reg = <0x20000 0x1000>; 68 reg = <0x20000 0x1000>;
69 cache-line-size = <0x20>; /* 32 bytes */ 69 cache-line-size = <0x20>; /* 32 bytes */
70 cache-size = <0x40000>; /* L2, 256K */ 70 cache-size = <0x40000>; /* L2, 256K */
@@ -124,67 +124,72 @@
124 }; 124 };
125 }; 125 };
126 126
127 mdio@24520 { /* For TSECs */
128 #address-cells = <1>;
129 #size-cells = <0>;
130 compatible = "fsl,gianfar-mdio";
131 reg = <0x24520 0x20>;
132
133 PHY1: ethernet-phy@1 {
134 interrupt-parent = <&mpic>;
135 reg = <0x1>;
136 device_type = "ethernet-phy";
137 };
138
139 PHY2: ethernet-phy@2 {
140 interrupt-parent = <&mpic>;
141 reg = <0x2>;
142 device_type = "ethernet-phy";
143 };
144
145 tbi0: tbi-phy@11 {
146 reg = <0x11>;
147 device_type = "tbi-phy";
148 };
149 };
150
151 mdio@25520 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "fsl,gianfar-tbi";
155 reg = <0x25520 0x20>;
156
157 tbi1: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163
164 enet0: ethernet@24000 { 127 enet0: ethernet@24000 {
128 #address-cells = <1>;
129 #size-cells = <1>;
165 device_type = "network"; 130 device_type = "network";
166 model = "TSEC"; 131 model = "TSEC";
167 compatible = "gianfar"; 132 compatible = "gianfar";
168 reg = <0x24000 0x1000>; 133 reg = <0x24000 0x1000>;
134 ranges = <0x0 0x24000 0x1000>;
169 /* Mac address filled in by bootwrapper */ 135 /* Mac address filled in by bootwrapper */
170 local-mac-address = [ 00 00 00 00 00 00 ]; 136 local-mac-address = [ 00 00 00 00 00 00 ];
171 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 137 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
172 interrupt-parent = <&mpic>; 138 interrupt-parent = <&mpic>;
173 tbi-handle = <&tbi0>; 139 tbi-handle = <&tbi0>;
174 phy-handle = <&PHY1>; 140 phy-handle = <&PHY1>;
141
142 mdio@520 { /* For TSECs */
143 #address-cells = <1>;
144 #size-cells = <0>;
145 compatible = "fsl,gianfar-mdio";
146 reg = <0x520 0x20>;
147
148 PHY1: ethernet-phy@1 {
149 interrupt-parent = <&mpic>;
150 reg = <0x1>;
151 device_type = "ethernet-phy";
152 };
153
154 PHY2: ethernet-phy@2 {
155 interrupt-parent = <&mpic>;
156 reg = <0x2>;
157 device_type = "ethernet-phy";
158 };
159
160 tbi0: tbi-phy@11 {
161 reg = <0x11>;
162 device_type = "tbi-phy";
163 };
164 };
175 }; 165 };
176 166
177 enet1: ethernet@25000 { 167 enet1: ethernet@25000 {
168 #address-cells = <1>;
169 #size-cells = <1>;
178 device_type = "network"; 170 device_type = "network";
179 model = "TSEC"; 171 model = "TSEC";
180 compatible = "gianfar"; 172 compatible = "gianfar";
181 reg = <0x25000 0x1000>; 173 reg = <0x25000 0x1000>;
174 ranges = <0x0 0x25000 0x1000>;
182 /* Mac address filled in by bootwrapper */ 175 /* Mac address filled in by bootwrapper */
183 local-mac-address = [ 00 00 00 00 00 00 ]; 176 local-mac-address = [ 00 00 00 00 00 00 ];
184 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 177 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
185 interrupt-parent = <&mpic>; 178 interrupt-parent = <&mpic>;
186 tbi-handle = <&tbi1>; 179 tbi-handle = <&tbi1>;
187 phy-handle = <&PHY2>; 180 phy-handle = <&PHY2>;
181
182 mdio@520 {
183 #address-cells = <1>;
184 #size-cells = <0>;
185 compatible = "fsl,gianfar-tbi";
186 reg = <0x520 0x20>;
187
188 tbi1: tbi-phy@11 {
189 reg = <0x11>;
190 device_type = "tbi-phy";
191 };
192 };
188 }; 193 };
189 194
190 mpic: pic@40000 { 195 mpic: pic@40000 {
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 3f7a5dce8de0..de30b3f9eb26 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -17,6 +17,7 @@
17 compatible = "fsl,lite5200"; 17 compatible = "fsl,lite5200";
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 interrupt-parent = <&mpc5200_pic>;
20 21
21 cpus { 22 cpus {
22 #address-cells = <1>; 23 #address-cells = <1>;
@@ -58,96 +59,74 @@
58 // 5200 interrupts are encoded into two levels; 59 // 5200 interrupts are encoded into two levels;
59 interrupt-controller; 60 interrupt-controller;
60 #interrupt-cells = <3>; 61 #interrupt-cells = <3>;
61 device_type = "interrupt-controller";
62 compatible = "fsl,mpc5200-pic"; 62 compatible = "fsl,mpc5200-pic";
63 reg = <0x500 0x80>; 63 reg = <0x500 0x80>;
64 }; 64 };
65 65
66 timer@600 { // General Purpose Timer 66 timer@600 { // General Purpose Timer
67 compatible = "fsl,mpc5200-gpt"; 67 compatible = "fsl,mpc5200-gpt";
68 cell-index = <0>;
69 reg = <0x600 0x10>; 68 reg = <0x600 0x10>;
70 interrupts = <1 9 0>; 69 interrupts = <1 9 0>;
71 interrupt-parent = <&mpc5200_pic>;
72 fsl,has-wdt; 70 fsl,has-wdt;
73 }; 71 };
74 72
75 timer@610 { // General Purpose Timer 73 timer@610 { // General Purpose Timer
76 compatible = "fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200-gpt";
77 cell-index = <1>;
78 reg = <0x610 0x10>; 75 reg = <0x610 0x10>;
79 interrupts = <1 10 0>; 76 interrupts = <1 10 0>;
80 interrupt-parent = <&mpc5200_pic>;
81 }; 77 };
82 78
83 timer@620 { // General Purpose Timer 79 timer@620 { // General Purpose Timer
84 compatible = "fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200-gpt";
85 cell-index = <2>;
86 reg = <0x620 0x10>; 81 reg = <0x620 0x10>;
87 interrupts = <1 11 0>; 82 interrupts = <1 11 0>;
88 interrupt-parent = <&mpc5200_pic>;
89 }; 83 };
90 84
91 timer@630 { // General Purpose Timer 85 timer@630 { // General Purpose Timer
92 compatible = "fsl,mpc5200-gpt"; 86 compatible = "fsl,mpc5200-gpt";
93 cell-index = <3>;
94 reg = <0x630 0x10>; 87 reg = <0x630 0x10>;
95 interrupts = <1 12 0>; 88 interrupts = <1 12 0>;
96 interrupt-parent = <&mpc5200_pic>;
97 }; 89 };
98 90
99 timer@640 { // General Purpose Timer 91 timer@640 { // General Purpose Timer
100 compatible = "fsl,mpc5200-gpt"; 92 compatible = "fsl,mpc5200-gpt";
101 cell-index = <4>;
102 reg = <0x640 0x10>; 93 reg = <0x640 0x10>;
103 interrupts = <1 13 0>; 94 interrupts = <1 13 0>;
104 interrupt-parent = <&mpc5200_pic>;
105 }; 95 };
106 96
107 timer@650 { // General Purpose Timer 97 timer@650 { // General Purpose Timer
108 compatible = "fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200-gpt";
109 cell-index = <5>;
110 reg = <0x650 0x10>; 99 reg = <0x650 0x10>;
111 interrupts = <1 14 0>; 100 interrupts = <1 14 0>;
112 interrupt-parent = <&mpc5200_pic>;
113 }; 101 };
114 102
115 timer@660 { // General Purpose Timer 103 timer@660 { // General Purpose Timer
116 compatible = "fsl,mpc5200-gpt"; 104 compatible = "fsl,mpc5200-gpt";
117 cell-index = <6>;
118 reg = <0x660 0x10>; 105 reg = <0x660 0x10>;
119 interrupts = <1 15 0>; 106 interrupts = <1 15 0>;
120 interrupt-parent = <&mpc5200_pic>;
121 }; 107 };
122 108
123 timer@670 { // General Purpose Timer 109 timer@670 { // General Purpose Timer
124 compatible = "fsl,mpc5200-gpt"; 110 compatible = "fsl,mpc5200-gpt";
125 cell-index = <7>;
126 reg = <0x670 0x10>; 111 reg = <0x670 0x10>;
127 interrupts = <1 16 0>; 112 interrupts = <1 16 0>;
128 interrupt-parent = <&mpc5200_pic>;
129 }; 113 };
130 114
131 rtc@800 { // Real time clock 115 rtc@800 { // Real time clock
132 compatible = "fsl,mpc5200-rtc"; 116 compatible = "fsl,mpc5200-rtc";
133 reg = <0x800 0x100>; 117 reg = <0x800 0x100>;
134 interrupts = <1 5 0 1 6 0>; 118 interrupts = <1 5 0 1 6 0>;
135 interrupt-parent = <&mpc5200_pic>;
136 }; 119 };
137 120
138 can@900 { 121 can@900 {
139 compatible = "fsl,mpc5200-mscan"; 122 compatible = "fsl,mpc5200-mscan";
140 cell-index = <0>;
141 interrupts = <2 17 0>; 123 interrupts = <2 17 0>;
142 interrupt-parent = <&mpc5200_pic>;
143 reg = <0x900 0x80>; 124 reg = <0x900 0x80>;
144 }; 125 };
145 126
146 can@980 { 127 can@980 {
147 compatible = "fsl,mpc5200-mscan"; 128 compatible = "fsl,mpc5200-mscan";
148 cell-index = <1>;
149 interrupts = <2 18 0>; 129 interrupts = <2 18 0>;
150 interrupt-parent = <&mpc5200_pic>;
151 reg = <0x980 0x80>; 130 reg = <0x980 0x80>;
152 }; 131 };
153 132
@@ -155,39 +134,33 @@
155 compatible = "fsl,mpc5200-gpio"; 134 compatible = "fsl,mpc5200-gpio";
156 reg = <0xb00 0x40>; 135 reg = <0xb00 0x40>;
157 interrupts = <1 7 0>; 136 interrupts = <1 7 0>;
158 interrupt-parent = <&mpc5200_pic>;
159 }; 137 };
160 138
161 gpio@c00 { 139 gpio@c00 {
162 compatible = "fsl,mpc5200-gpio-wkup"; 140 compatible = "fsl,mpc5200-gpio-wkup";
163 reg = <0xc00 0x40>; 141 reg = <0xc00 0x40>;
164 interrupts = <1 8 0 0 3 0>; 142 interrupts = <1 8 0 0 3 0>;
165 interrupt-parent = <&mpc5200_pic>;
166 }; 143 };
167 144
168 spi@f00 { 145 spi@f00 {
169 compatible = "fsl,mpc5200-spi"; 146 compatible = "fsl,mpc5200-spi";
170 reg = <0xf00 0x20>; 147 reg = <0xf00 0x20>;
171 interrupts = <2 13 0 2 14 0>; 148 interrupts = <2 13 0 2 14 0>;
172 interrupt-parent = <&mpc5200_pic>;
173 }; 149 };
174 150
175 usb@1000 { 151 usb@1000 {
176 compatible = "fsl,mpc5200-ohci","ohci-be"; 152 compatible = "fsl,mpc5200-ohci","ohci-be";
177 reg = <0x1000 0xff>; 153 reg = <0x1000 0xff>;
178 interrupts = <2 6 0>; 154 interrupts = <2 6 0>;
179 interrupt-parent = <&mpc5200_pic>;
180 }; 155 };
181 156
182 dma-controller@1200 { 157 dma-controller@1200 {
183 device_type = "dma-controller";
184 compatible = "fsl,mpc5200-bestcomm"; 158 compatible = "fsl,mpc5200-bestcomm";
185 reg = <0x1200 0x80>; 159 reg = <0x1200 0x80>;
186 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 160 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
187 3 4 0 3 5 0 3 6 0 3 7 0 161 3 4 0 3 5 0 3 6 0 3 7 0
188 3 8 0 3 9 0 3 10 0 3 11 0 162 3 8 0 3 9 0 3 10 0 3 11 0
189 3 12 0 3 13 0 3 14 0 3 15 0>; 163 3 12 0 3 13 0 3 14 0 3 15 0>;
190 interrupt-parent = <&mpc5200_pic>;
191 }; 164 };
192 165
193 xlb@1f00 { 166 xlb@1f00 {
@@ -196,13 +169,10 @@
196 }; 169 };
197 170
198 serial@2000 { // PSC1 171 serial@2000 { // PSC1
199 device_type = "serial";
200 compatible = "fsl,mpc5200-psc-uart"; 172 compatible = "fsl,mpc5200-psc-uart";
201 port-number = <0>; // Logical port assignment
202 cell-index = <0>; 173 cell-index = <0>;
203 reg = <0x2000 0x100>; 174 reg = <0x2000 0x100>;
204 interrupts = <2 1 0>; 175 interrupts = <2 1 0>;
205 interrupt-parent = <&mpc5200_pic>;
206 }; 176 };
207 177
208 // PSC2 in ac97 mode example 178 // PSC2 in ac97 mode example
@@ -211,7 +181,6 @@
211 // cell-index = <1>; 181 // cell-index = <1>;
212 // reg = <0x2200 0x100>; 182 // reg = <0x2200 0x100>;
213 // interrupts = <2 2 0>; 183 // interrupts = <2 2 0>;
214 // interrupt-parent = <&mpc5200_pic>;
215 //}; 184 //};
216 185
217 // PSC3 in CODEC mode example 186 // PSC3 in CODEC mode example
@@ -220,27 +189,22 @@
220 // cell-index = <2>; 189 // cell-index = <2>;
221 // reg = <0x2400 0x100>; 190 // reg = <0x2400 0x100>;
222 // interrupts = <2 3 0>; 191 // interrupts = <2 3 0>;
223 // interrupt-parent = <&mpc5200_pic>;
224 //}; 192 //};
225 193
226 // PSC4 in uart mode example 194 // PSC4 in uart mode example
227 //serial@2600 { // PSC4 195 //serial@2600 { // PSC4
228 // device_type = "serial";
229 // compatible = "fsl,mpc5200-psc-uart"; 196 // compatible = "fsl,mpc5200-psc-uart";
230 // cell-index = <3>; 197 // cell-index = <3>;
231 // reg = <0x2600 0x100>; 198 // reg = <0x2600 0x100>;
232 // interrupts = <2 11 0>; 199 // interrupts = <2 11 0>;
233 // interrupt-parent = <&mpc5200_pic>;
234 //}; 200 //};
235 201
236 // PSC5 in uart mode example 202 // PSC5 in uart mode example
237 //serial@2800 { // PSC5 203 //serial@2800 { // PSC5
238 // device_type = "serial";
239 // compatible = "fsl,mpc5200-psc-uart"; 204 // compatible = "fsl,mpc5200-psc-uart";
240 // cell-index = <4>; 205 // cell-index = <4>;
241 // reg = <0x2800 0x100>; 206 // reg = <0x2800 0x100>;
242 // interrupts = <2 12 0>; 207 // interrupts = <2 12 0>;
243 // interrupt-parent = <&mpc5200_pic>;
244 //}; 208 //};
245 209
246 // PSC6 in spi mode example 210 // PSC6 in spi mode example
@@ -249,16 +213,13 @@
249 // cell-index = <5>; 213 // cell-index = <5>;
250 // reg = <0x2c00 0x100>; 214 // reg = <0x2c00 0x100>;
251 // interrupts = <2 4 0>; 215 // interrupts = <2 4 0>;
252 // interrupt-parent = <&mpc5200_pic>;
253 //}; 216 //};
254 217
255 ethernet@3000 { 218 ethernet@3000 {
256 device_type = "network";
257 compatible = "fsl,mpc5200-fec"; 219 compatible = "fsl,mpc5200-fec";
258 reg = <0x3000 0x400>; 220 reg = <0x3000 0x400>;
259 local-mac-address = [ 00 00 00 00 00 00 ]; 221 local-mac-address = [ 00 00 00 00 00 00 ];
260 interrupts = <2 5 0>; 222 interrupts = <2 5 0>;
261 interrupt-parent = <&mpc5200_pic>;
262 phy-handle = <&phy0>; 223 phy-handle = <&phy0>;
263 }; 224 };
264 225
@@ -268,30 +229,24 @@
268 compatible = "fsl,mpc5200-mdio"; 229 compatible = "fsl,mpc5200-mdio";
269 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 230 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
270 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 231 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
271 interrupt-parent = <&mpc5200_pic>;
272 232
273 phy0: ethernet-phy@1 { 233 phy0: ethernet-phy@1 {
274 device_type = "ethernet-phy";
275 reg = <1>; 234 reg = <1>;
276 }; 235 };
277 }; 236 };
278 237
279 ata@3a00 { 238 ata@3a00 {
280 device_type = "ata";
281 compatible = "fsl,mpc5200-ata"; 239 compatible = "fsl,mpc5200-ata";
282 reg = <0x3a00 0x100>; 240 reg = <0x3a00 0x100>;
283 interrupts = <2 7 0>; 241 interrupts = <2 7 0>;
284 interrupt-parent = <&mpc5200_pic>;
285 }; 242 };
286 243
287 i2c@3d00 { 244 i2c@3d00 {
288 #address-cells = <1>; 245 #address-cells = <1>;
289 #size-cells = <0>; 246 #size-cells = <0>;
290 compatible = "fsl,mpc5200-i2c","fsl-i2c"; 247 compatible = "fsl,mpc5200-i2c","fsl-i2c";
291 cell-index = <0>;
292 reg = <0x3d00 0x40>; 248 reg = <0x3d00 0x40>;
293 interrupts = <2 15 0>; 249 interrupts = <2 15 0>;
294 interrupt-parent = <&mpc5200_pic>;
295 fsl5200-clocking; 250 fsl5200-clocking;
296 }; 251 };
297 252
@@ -299,14 +254,12 @@
299 #address-cells = <1>; 254 #address-cells = <1>;
300 #size-cells = <0>; 255 #size-cells = <0>;
301 compatible = "fsl,mpc5200-i2c","fsl-i2c"; 256 compatible = "fsl,mpc5200-i2c","fsl-i2c";
302 cell-index = <1>;
303 reg = <0x3d40 0x40>; 257 reg = <0x3d40 0x40>;
304 interrupts = <2 16 0>; 258 interrupts = <2 16 0>;
305 interrupt-parent = <&mpc5200_pic>;
306 fsl5200-clocking; 259 fsl5200-clocking;
307 }; 260 };
308 sram@8000 { 261 sram@8000 {
309 compatible = "fsl,mpc5200-sram","sram"; 262 compatible = "fsl,mpc5200-sram";
310 reg = <0x8000 0x4000>; 263 reg = <0x8000 0x4000>;
311 }; 264 };
312 }; 265 };
@@ -325,7 +278,6 @@
325 0xc000 0 0 4 &mpc5200_pic 0 0 3>; 278 0xc000 0 0 4 &mpc5200_pic 0 0 3>;
326 clock-frequency = <0>; // From boot loader 279 clock-frequency = <0>; // From boot loader
327 interrupts = <2 8 0 2 9 0 2 10 0>; 280 interrupts = <2 8 0 2 9 0 2 10 0>;
328 interrupt-parent = <&mpc5200_pic>;
329 bus-range = <0 0>; 281 bus-range = <0 0>;
330 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000 282 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
331 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 283 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 63e3bb48e843..c63e3566479e 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -17,6 +17,7 @@
17 compatible = "fsl,lite5200b"; 17 compatible = "fsl,lite5200b";
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 interrupt-parent = <&mpc5200_pic>;
20 21
21 cpus { 22 cpus {
22 #address-cells = <1>; 23 #address-cells = <1>;
@@ -58,136 +59,112 @@
58 // 5200 interrupts are encoded into two levels; 59 // 5200 interrupts are encoded into two levels;
59 interrupt-controller; 60 interrupt-controller;
60 #interrupt-cells = <3>; 61 #interrupt-cells = <3>;
61 device_type = "interrupt-controller";
62 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; 62 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
63 reg = <0x500 0x80>; 63 reg = <0x500 0x80>;
64 }; 64 };
65 65
66 timer@600 { // General Purpose Timer 66 timer@600 { // General Purpose Timer
67 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 67 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
68 cell-index = <0>;
69 reg = <0x600 0x10>; 68 reg = <0x600 0x10>;
70 interrupts = <1 9 0>; 69 interrupts = <1 9 0>;
71 interrupt-parent = <&mpc5200_pic>;
72 fsl,has-wdt; 70 fsl,has-wdt;
73 }; 71 };
74 72
75 timer@610 { // General Purpose Timer 73 timer@610 { // General Purpose Timer
76 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
77 cell-index = <1>;
78 reg = <0x610 0x10>; 75 reg = <0x610 0x10>;
79 interrupts = <1 10 0>; 76 interrupts = <1 10 0>;
80 interrupt-parent = <&mpc5200_pic>;
81 }; 77 };
82 78
83 timer@620 { // General Purpose Timer 79 timer@620 { // General Purpose Timer
84 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
85 cell-index = <2>;
86 reg = <0x620 0x10>; 81 reg = <0x620 0x10>;
87 interrupts = <1 11 0>; 82 interrupts = <1 11 0>;
88 interrupt-parent = <&mpc5200_pic>;
89 }; 83 };
90 84
91 timer@630 { // General Purpose Timer 85 timer@630 { // General Purpose Timer
92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
93 cell-index = <3>;
94 reg = <0x630 0x10>; 87 reg = <0x630 0x10>;
95 interrupts = <1 12 0>; 88 interrupts = <1 12 0>;
96 interrupt-parent = <&mpc5200_pic>;
97 }; 89 };
98 90
99 timer@640 { // General Purpose Timer 91 timer@640 { // General Purpose Timer
100 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
101 cell-index = <4>;
102 reg = <0x640 0x10>; 93 reg = <0x640 0x10>;
103 interrupts = <1 13 0>; 94 interrupts = <1 13 0>;
104 interrupt-parent = <&mpc5200_pic>;
105 }; 95 };
106 96
107 timer@650 { // General Purpose Timer 97 timer@650 { // General Purpose Timer
108 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
109 cell-index = <5>;
110 reg = <0x650 0x10>; 99 reg = <0x650 0x10>;
111 interrupts = <1 14 0>; 100 interrupts = <1 14 0>;
112 interrupt-parent = <&mpc5200_pic>;
113 }; 101 };
114 102
115 timer@660 { // General Purpose Timer 103 timer@660 { // General Purpose Timer
116 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 104 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
117 cell-index = <6>;
118 reg = <0x660 0x10>; 105 reg = <0x660 0x10>;
119 interrupts = <1 15 0>; 106 interrupts = <1 15 0>;
120 interrupt-parent = <&mpc5200_pic>;
121 }; 107 };
122 108
123 timer@670 { // General Purpose Timer 109 timer@670 { // General Purpose Timer
124 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 110 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
125 cell-index = <7>;
126 reg = <0x670 0x10>; 111 reg = <0x670 0x10>;
127 interrupts = <1 16 0>; 112 interrupts = <1 16 0>;
128 interrupt-parent = <&mpc5200_pic>;
129 }; 113 };
130 114
131 rtc@800 { // Real time clock 115 rtc@800 { // Real time clock
132 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; 116 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
133 reg = <0x800 0x100>; 117 reg = <0x800 0x100>;
134 interrupts = <1 5 0 1 6 0>; 118 interrupts = <1 5 0 1 6 0>;
135 interrupt-parent = <&mpc5200_pic>;
136 }; 119 };
137 120
138 can@900 { 121 can@900 {
139 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; 122 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
140 cell-index = <0>;
141 interrupts = <2 17 0>; 123 interrupts = <2 17 0>;
142 interrupt-parent = <&mpc5200_pic>;
143 reg = <0x900 0x80>; 124 reg = <0x900 0x80>;
144 }; 125 };
145 126
146 can@980 { 127 can@980 {
147 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; 128 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
148 cell-index = <1>;
149 interrupts = <2 18 0>; 129 interrupts = <2 18 0>;
150 interrupt-parent = <&mpc5200_pic>;
151 reg = <0x980 0x80>; 130 reg = <0x980 0x80>;
152 }; 131 };
153 132
154 gpio@b00 { 133 gpio_simple: gpio@b00 {
155 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; 134 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
156 reg = <0xb00 0x40>; 135 reg = <0xb00 0x40>;
157 interrupts = <1 7 0>; 136 interrupts = <1 7 0>;
158 interrupt-parent = <&mpc5200_pic>; 137 gpio-controller;
138 #gpio-cells = <2>;
159 }; 139 };
160 140
161 gpio@c00 { 141 gpio_wkup: gpio@c00 {
162 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; 142 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
163 reg = <0xc00 0x40>; 143 reg = <0xc00 0x40>;
164 interrupts = <1 8 0 0 3 0>; 144 interrupts = <1 8 0 0 3 0>;
165 interrupt-parent = <&mpc5200_pic>; 145 gpio-controller;
146 #gpio-cells = <2>;
166 }; 147 };
167 148
168 spi@f00 { 149 spi@f00 {
169 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; 150 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
170 reg = <0xf00 0x20>; 151 reg = <0xf00 0x20>;
171 interrupts = <2 13 0 2 14 0>; 152 interrupts = <2 13 0 2 14 0>;
172 interrupt-parent = <&mpc5200_pic>;
173 }; 153 };
174 154
175 usb@1000 { 155 usb@1000 {
176 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; 156 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
177 reg = <0x1000 0xff>; 157 reg = <0x1000 0xff>;
178 interrupts = <2 6 0>; 158 interrupts = <2 6 0>;
179 interrupt-parent = <&mpc5200_pic>;
180 }; 159 };
181 160
182 dma-controller@1200 { 161 dma-controller@1200 {
183 device_type = "dma-controller";
184 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; 162 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
185 reg = <0x1200 0x80>; 163 reg = <0x1200 0x80>;
186 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 164 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
187 3 4 0 3 5 0 3 6 0 3 7 0 165 3 4 0 3 5 0 3 6 0 3 7 0
188 3 8 0 3 9 0 3 10 0 3 11 0 166 3 8 0 3 9 0 3 10 0 3 11 0
189 3 12 0 3 13 0 3 14 0 3 15 0>; 167 3 12 0 3 13 0 3 14 0 3 15 0>;
190 interrupt-parent = <&mpc5200_pic>;
191 }; 168 };
192 169
193 xlb@1f00 { 170 xlb@1f00 {
@@ -196,13 +173,10 @@
196 }; 173 };
197 174
198 serial@2000 { // PSC1 175 serial@2000 { // PSC1
199 device_type = "serial";
200 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 176 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
201 port-number = <0>; // Logical port assignment
202 cell-index = <0>; 177 cell-index = <0>;
203 reg = <0x2000 0x100>; 178 reg = <0x2000 0x100>;
204 interrupts = <2 1 0>; 179 interrupts = <2 1 0>;
205 interrupt-parent = <&mpc5200_pic>;
206 }; 180 };
207 181
208 // PSC2 in ac97 mode example 182 // PSC2 in ac97 mode example
@@ -211,7 +185,6 @@
211 // cell-index = <1>; 185 // cell-index = <1>;
212 // reg = <0x2200 0x100>; 186 // reg = <0x2200 0x100>;
213 // interrupts = <2 2 0>; 187 // interrupts = <2 2 0>;
214 // interrupt-parent = <&mpc5200_pic>;
215 //}; 188 //};
216 189
217 // PSC3 in CODEC mode example 190 // PSC3 in CODEC mode example
@@ -220,27 +193,22 @@
220 // cell-index = <2>; 193 // cell-index = <2>;
221 // reg = <0x2400 0x100>; 194 // reg = <0x2400 0x100>;
222 // interrupts = <2 3 0>; 195 // interrupts = <2 3 0>;
223 // interrupt-parent = <&mpc5200_pic>;
224 //}; 196 //};
225 197
226 // PSC4 in uart mode example 198 // PSC4 in uart mode example
227 //serial@2600 { // PSC4 199 //serial@2600 { // PSC4
228 // device_type = "serial";
229 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 200 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
230 // cell-index = <3>; 201 // cell-index = <3>;
231 // reg = <0x2600 0x100>; 202 // reg = <0x2600 0x100>;
232 // interrupts = <2 11 0>; 203 // interrupts = <2 11 0>;
233 // interrupt-parent = <&mpc5200_pic>;
234 //}; 204 //};
235 205
236 // PSC5 in uart mode example 206 // PSC5 in uart mode example
237 //serial@2800 { // PSC5 207 //serial@2800 { // PSC5
238 // device_type = "serial";
239 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 208 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
240 // cell-index = <4>; 209 // cell-index = <4>;
241 // reg = <0x2800 0x100>; 210 // reg = <0x2800 0x100>;
242 // interrupts = <2 12 0>; 211 // interrupts = <2 12 0>;
243 // interrupt-parent = <&mpc5200_pic>;
244 //}; 212 //};
245 213
246 // PSC6 in spi mode example 214 // PSC6 in spi mode example
@@ -249,49 +217,40 @@
249 // cell-index = <5>; 217 // cell-index = <5>;
250 // reg = <0x2c00 0x100>; 218 // reg = <0x2c00 0x100>;
251 // interrupts = <2 4 0>; 219 // interrupts = <2 4 0>;
252 // interrupt-parent = <&mpc5200_pic>;
253 //}; 220 //};
254 221
255 ethernet@3000 { 222 ethernet@3000 {
256 device_type = "network";
257 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; 223 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
258 reg = <0x3000 0x400>; 224 reg = <0x3000 0x400>;
259 local-mac-address = [ 00 00 00 00 00 00 ]; 225 local-mac-address = [ 00 00 00 00 00 00 ];
260 interrupts = <2 5 0>; 226 interrupts = <2 5 0>;
261 interrupt-parent = <&mpc5200_pic>;
262 phy-handle = <&phy0>; 227 phy-handle = <&phy0>;
263 }; 228 };
264 229
265 mdio@3000 { 230 mdio@3000 {
266 #address-cells = <1>; 231 #address-cells = <1>;
267 #size-cells = <0>; 232 #size-cells = <0>;
268 compatible = "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; 233 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
269 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 234 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
270 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 235 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
271 interrupt-parent = <&mpc5200_pic>;
272 236
273 phy0: ethernet-phy@0 { 237 phy0: ethernet-phy@0 {
274 device_type = "ethernet-phy";
275 reg = <0>; 238 reg = <0>;
276 }; 239 };
277 }; 240 };
278 241
279 ata@3a00 { 242 ata@3a00 {
280 device_type = "ata";
281 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; 243 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
282 reg = <0x3a00 0x100>; 244 reg = <0x3a00 0x100>;
283 interrupts = <2 7 0>; 245 interrupts = <2 7 0>;
284 interrupt-parent = <&mpc5200_pic>;
285 }; 246 };
286 247
287 i2c@3d00 { 248 i2c@3d00 {
288 #address-cells = <1>; 249 #address-cells = <1>;
289 #size-cells = <0>; 250 #size-cells = <0>;
290 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 251 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
291 cell-index = <0>;
292 reg = <0x3d00 0x40>; 252 reg = <0x3d00 0x40>;
293 interrupts = <2 15 0>; 253 interrupts = <2 15 0>;
294 interrupt-parent = <&mpc5200_pic>;
295 fsl5200-clocking; 254 fsl5200-clocking;
296 }; 255 };
297 256
@@ -299,14 +258,13 @@
299 #address-cells = <1>; 258 #address-cells = <1>;
300 #size-cells = <0>; 259 #size-cells = <0>;
301 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 260 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
302 cell-index = <1>;
303 reg = <0x3d40 0x40>; 261 reg = <0x3d40 0x40>;
304 interrupts = <2 16 0>; 262 interrupts = <2 16 0>;
305 interrupt-parent = <&mpc5200_pic>;
306 fsl5200-clocking; 263 fsl5200-clocking;
307 }; 264 };
265
308 sram@8000 { 266 sram@8000 {
309 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram"; 267 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
310 reg = <0x8000 0x4000>; 268 reg = <0x8000 0x4000>;
311 }; 269 };
312 }; 270 };
@@ -330,7 +288,6 @@
330 0xc800 0 0 4 &mpc5200_pic 0 0 3>; 288 0xc800 0 0 4 &mpc5200_pic 0 0 3>;
331 clock-frequency = <0>; // From boot loader 289 clock-frequency = <0>; // From boot loader
332 interrupts = <2 8 0 2 9 0 2 10 0>; 290 interrupts = <2 8 0 2 9 0 2 10 0>;
333 interrupt-parent = <&mpc5200_pic>;
334 bus-range = <0 0>; 291 bus-range = <0 0>;
335 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000 292 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
336 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 293 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts
new file mode 100644
index 000000000000..e297d8b41875
--- /dev/null
+++ b/arch/powerpc/boot/dts/media5200.dts
@@ -0,0 +1,318 @@
1/*
2 * Freescale Media5200 board Device Tree Source
3 *
4 * Copyright 2009 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca>
6 * Steven Cavanagh <scavanagh@secretlab.ca>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13
14/dts-v1/;
15
16/ {
17 model = "fsl,media5200";
18 compatible = "fsl,media5200";
19 #address-cells = <1>;
20 #size-cells = <1>;
21 interrupt-parent = <&mpc5200_pic>;
22
23 aliases {
24 console = &console;
25 ethernet0 = &eth0;
26 };
27
28 chosen {
29 linux,stdout-path = &console;
30 };
31
32 cpus {
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,5200@0 {
37 device_type = "cpu";
38 reg = <0>;
39 d-cache-line-size = <32>;
40 i-cache-line-size = <32>;
41 d-cache-size = <0x4000>; // L1, 16K
42 i-cache-size = <0x4000>; // L1, 16K
43 timebase-frequency = <33000000>; // 33 MHz, these were configured by U-Boot
44 bus-frequency = <132000000>; // 132 MHz
45 clock-frequency = <396000000>; // 396 MHz
46 };
47 };
48
49 memory {
50 device_type = "memory";
51 reg = <0x00000000 0x08000000>; // 128MB RAM
52 };
53
54 soc@f0000000 {
55 #address-cells = <1>;
56 #size-cells = <1>;
57 compatible = "fsl,mpc5200b-immr";
58 ranges = <0 0xf0000000 0x0000c000>;
59 reg = <0xf0000000 0x00000100>;
60 bus-frequency = <132000000>;// 132 MHz
61 system-frequency = <0>; // from bootloader
62
63 cdm@200 {
64 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
65 reg = <0x200 0x38>;
66 };
67
68 mpc5200_pic: interrupt-controller@500 {
69 // 5200 interrupts are encoded into two levels;
70 interrupt-controller;
71 #interrupt-cells = <3>;
72 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
73 reg = <0x500 0x80>;
74 };
75
76 timer@600 { // General Purpose Timer
77 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
78 reg = <0x600 0x10>;
79 interrupts = <1 9 0>;
80 fsl,has-wdt;
81 };
82
83 timer@610 { // General Purpose Timer
84 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
85 reg = <0x610 0x10>;
86 interrupts = <1 10 0>;
87 };
88
89 timer@620 { // General Purpose Timer
90 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
91 reg = <0x620 0x10>;
92 interrupts = <1 11 0>;
93 };
94
95 timer@630 { // General Purpose Timer
96 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
97 reg = <0x630 0x10>;
98 interrupts = <1 12 0>;
99 };
100
101 timer@640 { // General Purpose Timer
102 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
103 reg = <0x640 0x10>;
104 interrupts = <1 13 0>;
105 };
106
107 timer@650 { // General Purpose Timer
108 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
109 reg = <0x650 0x10>;
110 interrupts = <1 14 0>;
111 };
112
113 timer@660 { // General Purpose Timer
114 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
115 reg = <0x660 0x10>;
116 interrupts = <1 15 0>;
117 };
118
119 timer@670 { // General Purpose Timer
120 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
121 reg = <0x670 0x10>;
122 interrupts = <1 16 0>;
123 };
124
125 rtc@800 { // Real time clock
126 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
127 reg = <0x800 0x100>;
128 interrupts = <1 5 0 1 6 0>;
129 };
130
131 can@900 {
132 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
133 interrupts = <2 17 0>;
134 reg = <0x900 0x80>;
135 };
136
137 can@980 {
138 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
139 interrupts = <2 18 0>;
140 reg = <0x980 0x80>;
141 };
142
143 gpio_simple: gpio@b00 {
144 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
145 reg = <0xb00 0x40>;
146 interrupts = <1 7 0>;
147 gpio-controller;
148 #gpio-cells = <2>;
149 };
150
151 gpio_wkup: gpio@c00 {
152 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
153 reg = <0xc00 0x40>;
154 interrupts = <1 8 0 0 3 0>;
155 gpio-controller;
156 #gpio-cells = <2>;
157 };
158
159 spi@f00 {
160 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
161 reg = <0xf00 0x20>;
162 interrupts = <2 13 0 2 14 0>;
163 };
164
165 usb@1000 {
166 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
167 reg = <0x1000 0x100>;
168 interrupts = <2 6 0>;
169 };
170
171 dma-controller@1200 {
172 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
173 reg = <0x1200 0x80>;
174 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
175 3 4 0 3 5 0 3 6 0 3 7 0
176 3 8 0 3 9 0 3 10 0 3 11 0
177 3 12 0 3 13 0 3 14 0 3 15 0>;
178 };
179
180 xlb@1f00 {
181 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
182 reg = <0x1f00 0x100>;
183 };
184
185 // PSC6 in uart mode
186 console: serial@2c00 { // PSC6
187 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
188 cell-index = <5>;
189 port-number = <0>; // Logical port assignment
190 reg = <0x2c00 0x100>;
191 interrupts = <2 4 0>;
192 };
193
194 eth0: ethernet@3000 {
195 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
196 reg = <0x3000 0x400>;
197 local-mac-address = [ 00 00 00 00 00 00 ];
198 interrupts = <2 5 0>;
199 phy-handle = <&phy0>;
200 };
201
202 mdio@3000 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
206 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
207 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
208
209 phy0: ethernet-phy@0 {
210 reg = <0>;
211 };
212 };
213
214 ata@3a00 {
215 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
216 reg = <0x3a00 0x100>;
217 interrupts = <2 7 0>;
218 };
219
220 i2c@3d00 {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
224 reg = <0x3d00 0x40>;
225 interrupts = <2 15 0>;
226 fsl5200-clocking;
227 };
228
229 i2c@3d40 {
230 #address-cells = <1>;
231 #size-cells = <0>;
232 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
233 reg = <0x3d40 0x40>;
234 interrupts = <2 16 0>;
235 fsl5200-clocking;
236 };
237
238 sram@8000 {
239 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
240 reg = <0x8000 0x4000>;
241 };
242 };
243
244 pci@f0000d00 {
245 #interrupt-cells = <1>;
246 #size-cells = <2>;
247 #address-cells = <3>;
248 device_type = "pci";
249 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
250 reg = <0xf0000d00 0x100>;
251 interrupt-map-mask = <0xf800 0 0 7>;
252 interrupt-map = <0xc000 0 0 1 &media5200_fpga 0 2 // 1st slot
253 0xc000 0 0 2 &media5200_fpga 0 3
254 0xc000 0 0 3 &media5200_fpga 0 4
255 0xc000 0 0 4 &media5200_fpga 0 5
256
257 0xc800 0 0 1 &media5200_fpga 0 3 // 2nd slot
258 0xc800 0 0 2 &media5200_fpga 0 4
259 0xc800 0 0 3 &media5200_fpga 0 5
260 0xc800 0 0 4 &media5200_fpga 0 2
261
262 0xd000 0 0 1 &media5200_fpga 0 4 // miniPCI
263 0xd000 0 0 2 &media5200_fpga 0 5
264
265 0xe000 0 0 1 &media5200_fpga 0 5 // CoralIP
266 >;
267 clock-frequency = <0>; // From boot loader
268 interrupts = <2 8 0 2 9 0 2 10 0>;
269 interrupt-parent = <&mpc5200_pic>;
270 bus-range = <0 0>;
271 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
272 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
273 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
274 };
275
276 localbus {
277 compatible = "fsl,mpc5200b-lpb","simple-bus";
278 #address-cells = <2>;
279 #size-cells = <1>;
280
281 ranges = < 0 0 0xfc000000 0x02000000
282 1 0 0xfe000000 0x02000000
283 2 0 0xf0010000 0x00010000
284 3 0 0xf0020000 0x00010000 >;
285
286 flash@0,0 {
287 compatible = "amd,am29lv28ml", "cfi-flash";
288 reg = <0 0x0 0x2000000>; // 32 MB
289 bank-width = <4>; // Width in bytes of the flash bank
290 device-width = <2>; // Two devices on each bank
291 };
292
293 flash@1,0 {
294 compatible = "amd,am29lv28ml", "cfi-flash";
295 reg = <1 0 0x2000000>; // 32 MB
296 bank-width = <4>; // Width in bytes of the flash bank
297 device-width = <2>; // Two devices on each bank
298 };
299
300 media5200_fpga: fpga@2,0 {
301 compatible = "fsl,media5200-fpga";
302 interrupt-controller;
303 #interrupt-cells = <2>; // 0:bank 1:id; no type field
304 reg = <2 0 0x10000>;
305
306 interrupt-parent = <&mpc5200_pic>;
307 interrupts = <0 0 3 // IRQ bank 0
308 1 1 3>; // IRQ bank 1
309 };
310
311 uart@3,0 {
312 compatible = "ti,tl16c752bpt";
313 reg = <3 0 0x10000>;
314 interrupt-parent = <&media5200_fpga>;
315 interrupts = <0 0 0 1>; // 2 irqs
316 };
317 };
318};
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index 52ba6f98b273..7be8ca038676 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -17,6 +17,7 @@
17 compatible = "promess,motionpro"; 17 compatible = "promess,motionpro";
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 interrupt-parent = <&mpc5200_pic>;
20 21
21 cpus { 22 cpus {
22 #address-cells = <1>; 23 #address-cells = <1>;
@@ -66,7 +67,6 @@
66 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 67 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
67 reg = <0x600 0x10>; 68 reg = <0x600 0x10>;
68 interrupts = <1 9 0>; 69 interrupts = <1 9 0>;
69 interrupt-parent = <&mpc5200_pic>;
70 fsl,has-wdt; 70 fsl,has-wdt;
71 }; 71 };
72 72
@@ -74,35 +74,30 @@
74 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
75 reg = <0x610 0x10>; 75 reg = <0x610 0x10>;
76 interrupts = <1 10 0>; 76 interrupts = <1 10 0>;
77 interrupt-parent = <&mpc5200_pic>;
78 }; 77 };
79 78
80 timer@620 { // General Purpose Timer 79 timer@620 { // General Purpose Timer
81 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
82 reg = <0x620 0x10>; 81 reg = <0x620 0x10>;
83 interrupts = <1 11 0>; 82 interrupts = <1 11 0>;
84 interrupt-parent = <&mpc5200_pic>;
85 }; 83 };
86 84
87 timer@630 { // General Purpose Timer 85 timer@630 { // General Purpose Timer
88 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
89 reg = <0x630 0x10>; 87 reg = <0x630 0x10>;
90 interrupts = <1 12 0>; 88 interrupts = <1 12 0>;
91 interrupt-parent = <&mpc5200_pic>;
92 }; 89 };
93 90
94 timer@640 { // General Purpose Timer 91 timer@640 { // General Purpose Timer
95 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
96 reg = <0x640 0x10>; 93 reg = <0x640 0x10>;
97 interrupts = <1 13 0>; 94 interrupts = <1 13 0>;
98 interrupt-parent = <&mpc5200_pic>;
99 }; 95 };
100 96
101 timer@650 { // General Purpose Timer 97 timer@650 { // General Purpose Timer
102 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
103 reg = <0x650 0x10>; 99 reg = <0x650 0x10>;
104 interrupts = <1 14 0>; 100 interrupts = <1 14 0>;
105 interrupt-parent = <&mpc5200_pic>;
106 }; 101 };
107 102
108 motionpro-led@660 { // Motion-PRO status LED 103 motionpro-led@660 { // Motion-PRO status LED
@@ -110,7 +105,6 @@
110 label = "motionpro-statusled"; 105 label = "motionpro-statusled";
111 reg = <0x660 0x10>; 106 reg = <0x660 0x10>;
112 interrupts = <1 15 0>; 107 interrupts = <1 15 0>;
113 interrupt-parent = <&mpc5200_pic>;
114 blink-delay = <100>; // 100 msec 108 blink-delay = <100>; // 100 msec
115 }; 109 };
116 110
@@ -119,49 +113,46 @@
119 label = "motionpro-readyled"; 113 label = "motionpro-readyled";
120 reg = <0x670 0x10>; 114 reg = <0x670 0x10>;
121 interrupts = <1 16 0>; 115 interrupts = <1 16 0>;
122 interrupt-parent = <&mpc5200_pic>;
123 }; 116 };
124 117
125 rtc@800 { // Real time clock 118 rtc@800 { // Real time clock
126 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; 119 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
127 reg = <0x800 0x100>; 120 reg = <0x800 0x100>;
128 interrupts = <1 5 0 1 6 0>; 121 interrupts = <1 5 0 1 6 0>;
129 interrupt-parent = <&mpc5200_pic>;
130 }; 122 };
131 123
132 can@980 { 124 can@980 {
133 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; 125 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
134 interrupts = <2 18 0>; 126 interrupts = <2 18 0>;
135 interrupt-parent = <&mpc5200_pic>;
136 reg = <0x980 0x80>; 127 reg = <0x980 0x80>;
137 }; 128 };
138 129
139 gpio@b00 { 130 gpio_simple: gpio@b00 {
140 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; 131 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
141 reg = <0xb00 0x40>; 132 reg = <0xb00 0x40>;
142 interrupts = <1 7 0>; 133 interrupts = <1 7 0>;
143 interrupt-parent = <&mpc5200_pic>; 134 gpio-controller;
135 #gpio-cells = <2>;
144 }; 136 };
145 137
146 gpio@c00 { 138 gpio_wkup: gpio@c00 {
147 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; 139 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
148 reg = <0xc00 0x40>; 140 reg = <0xc00 0x40>;
149 interrupts = <1 8 0 0 3 0>; 141 interrupts = <1 8 0 0 3 0>;
150 interrupt-parent = <&mpc5200_pic>; 142 gpio-controller;
143 #gpio-cells = <2>;
151 }; 144 };
152 145
153 spi@f00 { 146 spi@f00 {
154 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; 147 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
155 reg = <0xf00 0x20>; 148 reg = <0xf00 0x20>;
156 interrupts = <2 13 0 2 14 0>; 149 interrupts = <2 13 0 2 14 0>;
157 interrupt-parent = <&mpc5200_pic>;
158 }; 150 };
159 151
160 usb@1000 { 152 usb@1000 {
161 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; 153 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
162 reg = <0x1000 0xff>; 154 reg = <0x1000 0xff>;
163 interrupts = <2 6 0>; 155 interrupts = <2 6 0>;
164 interrupt-parent = <&mpc5200_pic>;
165 }; 156 };
166 157
167 dma-controller@1200 { 158 dma-controller@1200 {
@@ -171,7 +162,6 @@
171 3 4 0 3 5 0 3 6 0 3 7 0 162 3 4 0 3 5 0 3 6 0 3 7 0
172 3 8 0 3 9 0 3 10 0 3 11 0 163 3 8 0 3 9 0 3 10 0 3 11 0
173 3 12 0 3 13 0 3 14 0 3 15 0>; 164 3 12 0 3 13 0 3 14 0 3 15 0>;
174 interrupt-parent = <&mpc5200_pic>;
175 }; 165 };
176 166
177 xlb@1f00 { 167 xlb@1f00 {
@@ -180,12 +170,9 @@
180 }; 170 };
181 171
182 serial@2000 { // PSC1 172 serial@2000 { // PSC1
183 device_type = "serial";
184 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 173 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
185 port-number = <0>; // Logical port assignment
186 reg = <0x2000 0x100>; 174 reg = <0x2000 0x100>;
187 interrupts = <2 1 0>; 175 interrupts = <2 1 0>;
188 interrupt-parent = <&mpc5200_pic>;
189 }; 176 };
190 177
191 // PSC2 in spi master mode 178 // PSC2 in spi master mode
@@ -194,26 +181,20 @@
194 cell-index = <1>; 181 cell-index = <1>;
195 reg = <0x2200 0x100>; 182 reg = <0x2200 0x100>;
196 interrupts = <2 2 0>; 183 interrupts = <2 2 0>;
197 interrupt-parent = <&mpc5200_pic>;
198 }; 184 };
199 185
200 // PSC5 in uart mode 186 // PSC5 in uart mode
201 serial@2800 { // PSC5 187 serial@2800 { // PSC5
202 device_type = "serial";
203 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 188 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
204 port-number = <4>; // Logical port assignment
205 reg = <0x2800 0x100>; 189 reg = <0x2800 0x100>;
206 interrupts = <2 12 0>; 190 interrupts = <2 12 0>;
207 interrupt-parent = <&mpc5200_pic>;
208 }; 191 };
209 192
210 ethernet@3000 { 193 ethernet@3000 {
211 device_type = "network";
212 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; 194 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
213 reg = <0x3000 0x400>; 195 reg = <0x3000 0x400>;
214 local-mac-address = [ 00 00 00 00 00 00 ]; 196 local-mac-address = [ 00 00 00 00 00 00 ];
215 interrupts = <2 5 0>; 197 interrupts = <2 5 0>;
216 interrupt-parent = <&mpc5200_pic>;
217 phy-handle = <&phy0>; 198 phy-handle = <&phy0>;
218 }; 199 };
219 200
@@ -223,10 +204,8 @@
223 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; 204 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
224 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 205 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
225 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 206 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
226 interrupt-parent = <&mpc5200_pic>;
227 207
228 phy0: ethernet-phy@2 { 208 phy0: ethernet-phy@2 {
229 device_type = "ethernet-phy";
230 reg = <2>; 209 reg = <2>;
231 }; 210 };
232 }; 211 };
@@ -235,7 +214,6 @@
235 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; 214 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
236 reg = <0x3a00 0x100>; 215 reg = <0x3a00 0x100>;
237 interrupts = <2 7 0>; 216 interrupts = <2 7 0>;
238 interrupt-parent = <&mpc5200_pic>;
239 }; 217 };
240 218
241 i2c@3d40 { 219 i2c@3d40 {
@@ -244,7 +222,6 @@
244 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 222 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
245 reg = <0x3d40 0x40>; 223 reg = <0x3d40 0x40>;
246 interrupts = <2 16 0>; 224 interrupts = <2 16 0>;
247 interrupt-parent = <&mpc5200_pic>;
248 fsl5200-clocking; 225 fsl5200-clocking;
249 226
250 rtc@68 { 227 rtc@68 {
@@ -259,8 +236,8 @@
259 }; 236 };
260 }; 237 };
261 238
262 lpb { 239 localbus {
263 compatible = "fsl,lpb"; 240 compatible = "fsl,mpc5200b-lpb","simple-bus";
264 #address-cells = <2>; 241 #address-cells = <2>;
265 #size-cells = <1>; 242 #size-cells = <1>;
266 ranges = <0 0 0xff000000 0x01000000 243 ranges = <0 0 0xff000000 0x01000000
@@ -273,7 +250,6 @@
273 compatible = "promess,motionpro-kollmorgen"; 250 compatible = "promess,motionpro-kollmorgen";
274 reg = <1 0 0x10000>; 251 reg = <1 0 0x10000>;
275 interrupts = <1 1 0>; 252 interrupts = <1 1 0>;
276 interrupt-parent = <&mpc5200_pic>;
277 }; 253 };
278 254
279 // 8-bit board CPLD on LocalPlus Bus CS2 255 // 8-bit board CPLD on LocalPlus Bus CS2
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 3ebf7ec0484c..761faa7b6964 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -180,7 +180,7 @@
180 #address-cells = <1>; 180 #address-cells = <1>;
181 #size-cells = <1>; 181 #size-cells = <1>;
182 sleep = <&pmc 0x20000000>; 182 sleep = <&pmc 0x20000000>;
183 ranges; 183 ranges = <0x0 0x24000 0x1000>;
184 184
185 cell-index = <0>; 185 cell-index = <0>;
186 device_type = "network"; 186 device_type = "network";
@@ -195,11 +195,11 @@
195 fixed-link = <1 1 1000 0 0>; 195 fixed-link = <1 1 1000 0 0>;
196 fsl,magic-packet; 196 fsl,magic-packet;
197 197
198 mdio@24520 { 198 mdio@520 {
199 #address-cells = <1>; 199 #address-cells = <1>;
200 #size-cells = <0>; 200 #size-cells = <0>;
201 compatible = "fsl,gianfar-mdio"; 201 compatible = "fsl,gianfar-mdio";
202 reg = <0x24520 0x20>; 202 reg = <0x520 0x20>;
203 phy4: ethernet-phy@4 { 203 phy4: ethernet-phy@4 {
204 interrupt-parent = <&ipic>; 204 interrupt-parent = <&ipic>;
205 interrupts = <20 0x8>; 205 interrupts = <20 0x8>;
@@ -221,6 +221,7 @@
221 model = "eTSEC"; 221 model = "eTSEC";
222 compatible = "gianfar"; 222 compatible = "gianfar";
223 reg = <0x25000 0x1000>; 223 reg = <0x25000 0x1000>;
224 ranges = <0x0 0x25000 0x1000>;
224 local-mac-address = [ 00 00 00 00 00 00 ]; 225 local-mac-address = [ 00 00 00 00 00 00 ];
225 interrupts = <34 0x8 33 0x8 32 0x8>; 226 interrupts = <34 0x8 33 0x8 32 0x8>;
226 interrupt-parent = <&ipic>; 227 interrupt-parent = <&ipic>;
@@ -229,11 +230,11 @@
229 sleep = <&pmc 0x10000000>; 230 sleep = <&pmc 0x10000000>;
230 fsl,magic-packet; 231 fsl,magic-packet;
231 232
232 mdio@25520 { 233 mdio@520 {
233 #address-cells = <1>; 234 #address-cells = <1>;
234 #size-cells = <0>; 235 #size-cells = <0>;
235 compatible = "fsl,gianfar-tbi"; 236 compatible = "fsl,gianfar-tbi";
236 reg = <0x25520 0x20>; 237 reg = <0x520 0x20>;
237 238
238 tbi1: tbi-phy@11 { 239 tbi1: tbi-phy@11 {
239 reg = <0x11>; 240 reg = <0x11>;
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index 71784165b77e..3f4c5fb988a0 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -22,6 +22,8 @@
22 serial0 = &serial0; 22 serial0 = &serial0;
23 serial1 = &serial1; 23 serial1 = &serial1;
24 pci0 = &pci0; 24 pci0 = &pci0;
25 pci1 = &pci1;
26 pci2 = &pci2;
25 }; 27 };
26 28
27 cpus { 29 cpus {
@@ -188,66 +190,74 @@
188 phy_type = "utmi"; 190 phy_type = "utmi";
189 }; 191 };
190 192
191 mdio@24520 {
192 #address-cells = <1>;
193 #size-cells = <0>;
194 compatible = "fsl,gianfar-mdio";
195 reg = <0x24520 0x20>;
196 phy0: ethernet-phy@0 {
197 interrupt-parent = <&ipic>;
198 interrupts = <20 0x8>;
199 reg = <0x0>;
200 device_type = "ethernet-phy";
201 };
202 phy1: ethernet-phy@1 {
203 interrupt-parent = <&ipic>;
204 interrupts = <19 0x8>;
205 reg = <0x1>;
206 device_type = "ethernet-phy";
207 };
208 tbi0: tbi-phy@11 {
209 reg = <0x11>;
210 device_type = "tbi-phy";
211 };
212 };
213
214 mdio@25520 {
215 #address-cells = <1>;
216 #size-cells = <0>;
217 compatible = "fsl,gianfar-tbi";
218 reg = <0x25520 0x20>;
219
220 tbi1: tbi-phy@11 {
221 reg = <0x11>;
222 device_type = "tbi-phy";
223 };
224 };
225
226
227 enet0: ethernet@24000 { 193 enet0: ethernet@24000 {
194 #address-cells = <1>;
195 #size-cells = <1>;
228 cell-index = <0>; 196 cell-index = <0>;
229 device_type = "network"; 197 device_type = "network";
230 model = "eTSEC"; 198 model = "eTSEC";
231 compatible = "gianfar"; 199 compatible = "gianfar";
232 reg = <0x24000 0x1000>; 200 reg = <0x24000 0x1000>;
201 ranges = <0x0 0x24000 0x1000>;
233 local-mac-address = [ 00 00 00 00 00 00 ]; 202 local-mac-address = [ 00 00 00 00 00 00 ];
234 interrupts = <32 0x8 33 0x8 34 0x8>; 203 interrupts = <32 0x8 33 0x8 34 0x8>;
235 interrupt-parent = <&ipic>; 204 interrupt-parent = <&ipic>;
236 tbi-handle = <&tbi0>; 205 tbi-handle = <&tbi0>;
237 phy-handle = < &phy0 >; 206 phy-handle = < &phy0 >;
207
208 mdio@520 {
209 #address-cells = <1>;
210 #size-cells = <0>;
211 compatible = "fsl,gianfar-mdio";
212 reg = <0x520 0x20>;
213
214 phy0: ethernet-phy@0 {
215 interrupt-parent = <&ipic>;
216 interrupts = <20 0x8>;
217 reg = <0x0>;
218 device_type = "ethernet-phy";
219 };
220
221 phy1: ethernet-phy@1 {
222 interrupt-parent = <&ipic>;
223 interrupts = <19 0x8>;
224 reg = <0x1>;
225 device_type = "ethernet-phy";
226 };
227
228 tbi0: tbi-phy@11 {
229 reg = <0x11>;
230 device_type = "tbi-phy";
231 };
232 };
238 }; 233 };
239 234
240 enet1: ethernet@25000 { 235 enet1: ethernet@25000 {
236 #address-cells = <1>;
237 #size-cells = <1>;
241 cell-index = <1>; 238 cell-index = <1>;
242 device_type = "network"; 239 device_type = "network";
243 model = "eTSEC"; 240 model = "eTSEC";
244 compatible = "gianfar"; 241 compatible = "gianfar";
245 reg = <0x25000 0x1000>; 242 reg = <0x25000 0x1000>;
243 ranges = <0x0 0x25000 0x1000>;
246 local-mac-address = [ 00 00 00 00 00 00 ]; 244 local-mac-address = [ 00 00 00 00 00 00 ];
247 interrupts = <35 0x8 36 0x8 37 0x8>; 245 interrupts = <35 0x8 36 0x8 37 0x8>;
248 interrupt-parent = <&ipic>; 246 interrupt-parent = <&ipic>;
249 tbi-handle = <&tbi1>; 247 tbi-handle = <&tbi1>;
250 phy-handle = < &phy1 >; 248 phy-handle = < &phy1 >;
249
250 mdio@520 {
251 #address-cells = <1>;
252 #size-cells = <0>;
253 compatible = "fsl,gianfar-tbi";
254 reg = <0x520 0x20>;
255
256 tbi1: tbi-phy@11 {
257 reg = <0x11>;
258 device_type = "tbi-phy";
259 };
260 };
251 }; 261 };
252 262
253 serial0: serial@4500 { 263 serial0: serial@4500 {
@@ -349,4 +359,66 @@
349 compatible = "fsl,mpc8349-pci"; 359 compatible = "fsl,mpc8349-pci";
350 device_type = "pci"; 360 device_type = "pci";
351 }; 361 };
362
363 pci1: pcie@e0009000 {
364 #address-cells = <3>;
365 #size-cells = <2>;
366 #interrupt-cells = <1>;
367 device_type = "pci";
368 compatible = "fsl,mpc8315-pcie", "fsl,mpc8314-pcie";
369 reg = <0xe0009000 0x00001000>;
370 ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
371 0x01000000 0 0x00000000 0xb1000000 0 0x00800000>;
372 bus-range = <0 255>;
373 interrupt-map-mask = <0xf800 0 0 7>;
374 interrupt-map = <0 0 0 1 &ipic 1 8
375 0 0 0 2 &ipic 1 8
376 0 0 0 3 &ipic 1 8
377 0 0 0 4 &ipic 1 8>;
378 clock-frequency = <0>;
379
380 pcie@0 {
381 #address-cells = <3>;
382 #size-cells = <2>;
383 device_type = "pci";
384 reg = <0 0 0 0 0>;
385 ranges = <0x02000000 0 0xa0000000
386 0x02000000 0 0xa0000000
387 0 0x10000000
388 0x01000000 0 0x00000000
389 0x01000000 0 0x00000000
390 0 0x00800000>;
391 };
392 };
393
394 pci2: pcie@e000a000 {
395 #address-cells = <3>;
396 #size-cells = <2>;
397 #interrupt-cells = <1>;
398 device_type = "pci";
399 compatible = "fsl,mpc8315-pcie", "fsl,mpc8314-pcie";
400 reg = <0xe000a000 0x00001000>;
401 ranges = <0x02000000 0 0xc0000000 0xc0000000 0 0x10000000
402 0x01000000 0 0x00000000 0xd1000000 0 0x00800000>;
403 bus-range = <0 255>;
404 interrupt-map-mask = <0xf800 0 0 7>;
405 interrupt-map = <0 0 0 1 &ipic 2 8
406 0 0 0 2 &ipic 2 8
407 0 0 0 3 &ipic 2 8
408 0 0 0 4 &ipic 2 8>;
409 clock-frequency = <0>;
410
411 pcie@0 {
412 #address-cells = <3>;
413 #size-cells = <2>;
414 device_type = "pci";
415 reg = <0 0 0 0 0>;
416 ranges = <0x02000000 0 0xc0000000
417 0x02000000 0 0xc0000000
418 0 0x10000000
419 0x01000000 0 0x00000000
420 0x01000000 0 0x00000000
421 0 0x00800000>;
422 };
423 };
352}; 424};
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index dea30910c136..4319bd70a580 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -152,10 +152,21 @@
152 }; 152 };
153 153
154 par_io@1400 { 154 par_io@1400 {
155 #address-cells = <1>;
156 #size-cells = <1>;
155 reg = <0x1400 0x100>; 157 reg = <0x1400 0x100>;
158 ranges = <3 0x1448 0x18>;
159 compatible = "fsl,mpc8323-qe-pario";
156 device_type = "par_io"; 160 device_type = "par_io";
157 num-ports = <7>; 161 num-ports = <7>;
158 162
163 qe_pio_d: gpio-controller@1448 {
164 #gpio-cells = <2>;
165 compatible = "fsl,mpc8323-qe-pario-bank";
166 reg = <3 0x18>;
167 gpio-controller;
168 };
169
159 ucc2pio:ucc_pin@02 { 170 ucc2pio:ucc_pin@02 {
160 pio-map = < 171 pio-map = <
161 /* port pin dir open_drain assignment has_irq */ 172 /* port pin dir open_drain assignment has_irq */
@@ -225,12 +236,25 @@
225 }; 236 };
226 237
227 spi@4c0 { 238 spi@4c0 {
239 #address-cells = <1>;
240 #size-cells = <0>;
228 cell-index = <0>; 241 cell-index = <0>;
229 compatible = "fsl,spi"; 242 compatible = "fsl,spi";
230 reg = <0x4c0 0x40>; 243 reg = <0x4c0 0x40>;
231 interrupts = <2>; 244 interrupts = <2>;
232 interrupt-parent = <&qeic>; 245 interrupt-parent = <&qeic>;
246 gpios = <&qe_pio_d 13 0>;
233 mode = "cpu-qe"; 247 mode = "cpu-qe";
248
249 mmc-slot@0 {
250 compatible = "fsl,mpc8323rdb-mmc-slot",
251 "mmc-spi-slot";
252 reg = <0>;
253 gpios = <&qe_pio_d 14 1
254 &qe_pio_d 15 0>;
255 voltage-ranges = <3300 3300>;
256 spi-max-frequency = <50000000>;
257 };
234 }; 258 };
235 259
236 spi@500 { 260 spi@500 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index b5eda94a8e2a..1ae38f0ddef8 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -170,57 +170,52 @@
170 phy_type = "ulpi"; 170 phy_type = "ulpi";
171 }; 171 };
172 172
173 mdio@24520 {
174 #address-cells = <1>;
175 #size-cells = <0>;
176 compatible = "fsl,gianfar-mdio";
177 reg = <0x24520 0x20>;
178
179 /* Vitesse 8201 */
180 phy1c: ethernet-phy@1c {
181 interrupt-parent = <&ipic>;
182 interrupts = <18 0x8>;
183 reg = <0x1c>;
184 device_type = "ethernet-phy";
185 };
186 tbi0: tbi-phy@11 {
187 reg = <0x11>;
188 device_type = "tbi-phy";
189 };
190 };
191
192 mdio@25520 {
193 #address-cells = <1>;
194 #size-cells = <0>;
195 compatible = "fsl,gianfar-tbi";
196 reg = <0x25520 0x20>;
197
198 tbi1: tbi-phy@11 {
199 reg = <0x11>;
200 device_type = "tbi-phy";
201 };
202 };
203
204 enet0: ethernet@24000 { 173 enet0: ethernet@24000 {
174 #address-cells = <1>;
175 #size-cells = <1>;
205 cell-index = <0>; 176 cell-index = <0>;
206 device_type = "network"; 177 device_type = "network";
207 model = "TSEC"; 178 model = "TSEC";
208 compatible = "gianfar"; 179 compatible = "gianfar";
209 reg = <0x24000 0x1000>; 180 reg = <0x24000 0x1000>;
181 ranges = <0x0 0x24000 0x1000>;
210 local-mac-address = [ 00 00 00 00 00 00 ]; 182 local-mac-address = [ 00 00 00 00 00 00 ];
211 interrupts = <32 0x8 33 0x8 34 0x8>; 183 interrupts = <32 0x8 33 0x8 34 0x8>;
212 interrupt-parent = <&ipic>; 184 interrupt-parent = <&ipic>;
213 tbi-handle = <&tbi0>; 185 tbi-handle = <&tbi0>;
214 phy-handle = <&phy1c>; 186 phy-handle = <&phy1c>;
215 linux,network-index = <0>; 187 linux,network-index = <0>;
188
189 mdio@520 {
190 #address-cells = <1>;
191 #size-cells = <0>;
192 compatible = "fsl,gianfar-mdio";
193 reg = <0x520 0x20>;
194
195 /* Vitesse 8201 */
196 phy1c: ethernet-phy@1c {
197 interrupt-parent = <&ipic>;
198 interrupts = <18 0x8>;
199 reg = <0x1c>;
200 device_type = "ethernet-phy";
201 };
202
203 tbi0: tbi-phy@11 {
204 reg = <0x11>;
205 device_type = "tbi-phy";
206 };
207 };
216 }; 208 };
217 209
218 enet1: ethernet@25000 { 210 enet1: ethernet@25000 {
211 #address-cells = <1>;
212 #size-cells = <1>;
219 cell-index = <1>; 213 cell-index = <1>;
220 device_type = "network"; 214 device_type = "network";
221 model = "TSEC"; 215 model = "TSEC";
222 compatible = "gianfar"; 216 compatible = "gianfar";
223 reg = <0x25000 0x1000>; 217 reg = <0x25000 0x1000>;
218 ranges = <0x0 0x25000 0x1000>;
224 local-mac-address = [ 00 00 00 00 00 00 ]; 219 local-mac-address = [ 00 00 00 00 00 00 ];
225 interrupts = <35 0x8 36 0x8 37 0x8>; 220 interrupts = <35 0x8 36 0x8 37 0x8>;
226 interrupt-parent = <&ipic>; 221 interrupt-parent = <&ipic>;
@@ -228,6 +223,18 @@
228 fixed-link = <1 1 1000 0 0>; 223 fixed-link = <1 1 1000 0 0>;
229 linux,network-index = <1>; 224 linux,network-index = <1>;
230 tbi-handle = <&tbi1>; 225 tbi-handle = <&tbi1>;
226
227 mdio@520 {
228 #address-cells = <1>;
229 #size-cells = <0>;
230 compatible = "fsl,gianfar-tbi";
231 reg = <0x520 0x20>;
232
233 tbi1: tbi-phy@11 {
234 reg = <0x11>;
235 device_type = "tbi-phy";
236 };
237 };
231 }; 238 };
232 239
233 serial0: serial@4500 { 240 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index c87a6015e165..662abe1fb804 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -149,37 +149,41 @@
149 phy_type = "ulpi"; 149 phy_type = "ulpi";
150 }; 150 };
151 151
152 mdio@24520 {
153 #address-cells = <1>;
154 #size-cells = <0>;
155 compatible = "fsl,gianfar-mdio";
156 reg = <0x24520 0x20>;
157
158 /* Vitesse 8201 */
159 phy1c: ethernet-phy@1c {
160 interrupt-parent = <&ipic>;
161 interrupts = <18 0x8>;
162 reg = <0x1c>;
163 device_type = "ethernet-phy";
164 };
165 tbi0: tbi-phy@11 {
166 reg = <0x11>;
167 device_type = "tbi-phy";
168 };
169 };
170
171 enet0: ethernet@24000 { 152 enet0: ethernet@24000 {
153 #address-cells = <1>;
154 #size-cells = <1>;
172 cell-index = <0>; 155 cell-index = <0>;
173 device_type = "network"; 156 device_type = "network";
174 model = "TSEC"; 157 model = "TSEC";
175 compatible = "gianfar"; 158 compatible = "gianfar";
176 reg = <0x24000 0x1000>; 159 reg = <0x24000 0x1000>;
160 ranges = <0x0 0x24000 0x1000>;
177 local-mac-address = [ 00 00 00 00 00 00 ]; 161 local-mac-address = [ 00 00 00 00 00 00 ];
178 interrupts = <32 0x8 33 0x8 34 0x8>; 162 interrupts = <32 0x8 33 0x8 34 0x8>;
179 interrupt-parent = <&ipic>; 163 interrupt-parent = <&ipic>;
180 tbi-handle = <&tbi0>; 164 tbi-handle = <&tbi0>;
181 phy-handle = <&phy1c>; 165 phy-handle = <&phy1c>;
182 linux,network-index = <0>; 166 linux,network-index = <0>;
167
168 mdio@520 {
169 #address-cells = <1>;
170 #size-cells = <0>;
171 compatible = "fsl,gianfar-mdio";
172 reg = <0x520 0x20>;
173
174 /* Vitesse 8201 */
175 phy1c: ethernet-phy@1c {
176 interrupt-parent = <&ipic>;
177 interrupts = <18 0x8>;
178 reg = <0x1c>;
179 device_type = "ethernet-phy";
180 };
181
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
183 }; 187 };
184 188
185 serial0: serial@4500 { 189 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index d9adba01c09c..d9f0a2325fa4 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -167,69 +167,76 @@
167 phy_type = "ulpi"; 167 phy_type = "ulpi";
168 }; 168 };
169 169
170 mdio@24520 {
171 #address-cells = <1>;
172 #size-cells = <0>;
173 compatible = "fsl,gianfar-mdio";
174 reg = <0x24520 0x20>;
175
176 phy0: ethernet-phy@0 {
177 interrupt-parent = <&ipic>;
178 interrupts = <17 0x8>;
179 reg = <0x0>;
180 device_type = "ethernet-phy";
181 };
182 phy1: ethernet-phy@1 {
183 interrupt-parent = <&ipic>;
184 interrupts = <18 0x8>;
185 reg = <0x1>;
186 device_type = "ethernet-phy";
187 };
188 tbi0: tbi-phy@11 {
189 reg = <0x11>;
190 device_type = "tbi-phy";
191 };
192 };
193
194 mdio@25520 {
195 #address-cells = <1>;
196 #size-cells = <0>;
197 compatible = "fsl,gianfar-tbi";
198 reg = <0x25520 0x20>;
199
200 tbi1: tbi-phy@11 {
201 reg = <0x11>;
202 device_type = "tbi-phy";
203 };
204 };
205
206
207 enet0: ethernet@24000 { 170 enet0: ethernet@24000 {
171 #address-cells = <1>;
172 #size-cells = <1>;
208 cell-index = <0>; 173 cell-index = <0>;
209 device_type = "network"; 174 device_type = "network";
210 model = "TSEC"; 175 model = "TSEC";
211 compatible = "gianfar"; 176 compatible = "gianfar";
212 reg = <0x24000 0x1000>; 177 reg = <0x24000 0x1000>;
178 ranges = <0x0 0x24000 0x1000>;
213 local-mac-address = [ 00 00 00 00 00 00 ]; 179 local-mac-address = [ 00 00 00 00 00 00 ];
214 interrupts = <32 0x8 33 0x8 34 0x8>; 180 interrupts = <32 0x8 33 0x8 34 0x8>;
215 interrupt-parent = <&ipic>; 181 interrupt-parent = <&ipic>;
216 tbi-handle = <&tbi0>; 182 tbi-handle = <&tbi0>;
217 phy-handle = <&phy0>; 183 phy-handle = <&phy0>;
218 linux,network-index = <0>; 184 linux,network-index = <0>;
185
186 mdio@520 {
187 #address-cells = <1>;
188 #size-cells = <0>;
189 compatible = "fsl,gianfar-mdio";
190 reg = <0x520 0x20>;
191
192 phy0: ethernet-phy@0 {
193 interrupt-parent = <&ipic>;
194 interrupts = <17 0x8>;
195 reg = <0x0>;
196 device_type = "ethernet-phy";
197 };
198
199 phy1: ethernet-phy@1 {
200 interrupt-parent = <&ipic>;
201 interrupts = <18 0x8>;
202 reg = <0x1>;
203 device_type = "ethernet-phy";
204 };
205
206 tbi0: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
219 }; 211 };
220 212
221 enet1: ethernet@25000 { 213 enet1: ethernet@25000 {
214 #address-cells = <1>;
215 #size-cells = <1>;
222 cell-index = <1>; 216 cell-index = <1>;
223 device_type = "network"; 217 device_type = "network";
224 model = "TSEC"; 218 model = "TSEC";
225 compatible = "gianfar"; 219 compatible = "gianfar";
226 reg = <0x25000 0x1000>; 220 reg = <0x25000 0x1000>;
221 ranges = <0x0 0x25000 0x1000>;
227 local-mac-address = [ 00 00 00 00 00 00 ]; 222 local-mac-address = [ 00 00 00 00 00 00 ];
228 interrupts = <35 0x8 36 0x8 37 0x8>; 223 interrupts = <35 0x8 36 0x8 37 0x8>;
229 interrupt-parent = <&ipic>; 224 interrupt-parent = <&ipic>;
230 tbi-handle = <&tbi1>; 225 tbi-handle = <&tbi1>;
231 phy-handle = <&phy1>; 226 phy-handle = <&phy1>;
232 linux,network-index = <1>; 227 linux,network-index = <1>;
228
229 mdio@520 {
230 #address-cells = <1>;
231 #size-cells = <0>;
232 compatible = "fsl,gianfar-tbi";
233 reg = <0x520 0x20>;
234
235 tbi1: tbi-phy@11 {
236 reg = <0x11>;
237 device_type = "tbi-phy";
238 };
239 };
233 }; 240 };
234 241
235 serial0: serial@4500 { 242 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 1d14d7052e6d..963708017e6c 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -23,6 +23,8 @@
23 serial0 = &serial0; 23 serial0 = &serial0;
24 serial1 = &serial1; 24 serial1 = &serial1;
25 pci0 = &pci0; 25 pci0 = &pci0;
26 pci1 = &pci1;
27 pci2 = &pci2;
26 }; 28 };
27 29
28 cpus { 30 cpus {
@@ -127,21 +129,38 @@
127 reg = <0x200 0x100>; 129 reg = <0x200 0x100>;
128 }; 130 };
129 131
130 i2c@3000 { 132 sleep-nexus {
131 #address-cells = <1>; 133 #address-cells = <1>;
132 #size-cells = <0>; 134 #size-cells = <1>;
133 cell-index = <0>; 135 compatible = "simple-bus";
134 compatible = "fsl-i2c"; 136 sleep = <&pmc 0x0c000000>;
135 reg = <0x3000 0x100>; 137 ranges;
136 interrupts = <14 0x8>; 138
137 interrupt-parent = <&ipic>; 139 i2c@3000 {
138 dfsrr; 140 #address-cells = <1>;
141 #size-cells = <0>;
142 cell-index = <0>;
143 compatible = "fsl-i2c";
144 reg = <0x3000 0x100>;
145 interrupts = <14 0x8>;
146 interrupt-parent = <&ipic>;
147 dfsrr;
148
149 rtc@68 {
150 compatible = "dallas,ds1374";
151 reg = <0x68>;
152 interrupts = <19 0x8>;
153 interrupt-parent = <&ipic>;
154 };
155 };
139 156
140 rtc@68 { 157 sdhci@2e000 {
141 compatible = "dallas,ds1374"; 158 compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc";
142 reg = <0x68>; 159 reg = <0x2e000 0x1000>;
143 interrupts = <19 0x8>; 160 interrupts = <42 0x8>;
144 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
162 /* Filled in by U-Boot */
163 clock-frequency = <0>;
145 }; 164 };
146 }; 165 };
147 166
@@ -174,70 +193,83 @@
174 interrupts = <38 0x8>; 193 interrupts = <38 0x8>;
175 dr_mode = "host"; 194 dr_mode = "host";
176 phy_type = "ulpi"; 195 phy_type = "ulpi";
196 sleep = <&pmc 0x00c00000>;
177 }; 197 };
178 198
179 mdio@24520 {
180 #address-cells = <1>;
181 #size-cells = <0>;
182 compatible = "fsl,gianfar-mdio";
183 reg = <0x24520 0x20>;
184 phy2: ethernet-phy@2 {
185 interrupt-parent = <&ipic>;
186 interrupts = <17 0x8>;
187 reg = <0x2>;
188 device_type = "ethernet-phy";
189 };
190 phy3: ethernet-phy@3 {
191 interrupt-parent = <&ipic>;
192 interrupts = <18 0x8>;
193 reg = <0x3>;
194 device_type = "ethernet-phy";
195 };
196 tbi0: tbi-phy@11 {
197 reg = <0x11>;
198 device_type = "tbi-phy";
199 };
200 };
201
202 mdio@25520 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,gianfar-tbi";
206 reg = <0x25520 0x20>;
207
208 tbi1: tbi-phy@11 {
209 reg = <0x11>;
210 device_type = "tbi-phy";
211 };
212 };
213
214
215 enet0: ethernet@24000 { 199 enet0: ethernet@24000 {
200 #address-cells = <1>;
201 #size-cells = <1>;
216 cell-index = <0>; 202 cell-index = <0>;
217 device_type = "network"; 203 device_type = "network";
218 model = "eTSEC"; 204 model = "eTSEC";
219 compatible = "gianfar"; 205 compatible = "gianfar";
220 reg = <0x24000 0x1000>; 206 reg = <0x24000 0x1000>;
207 ranges = <0x0 0x24000 0x1000>;
221 local-mac-address = [ 00 00 00 00 00 00 ]; 208 local-mac-address = [ 00 00 00 00 00 00 ];
222 interrupts = <32 0x8 33 0x8 34 0x8>; 209 interrupts = <32 0x8 33 0x8 34 0x8>;
223 phy-connection-type = "mii"; 210 phy-connection-type = "mii";
224 interrupt-parent = <&ipic>; 211 interrupt-parent = <&ipic>;
225 tbi-handle = <&tbi0>; 212 tbi-handle = <&tbi0>;
226 phy-handle = <&phy2>; 213 phy-handle = <&phy2>;
214 sleep = <&pmc 0xc0000000>;
215 fsl,magic-packet;
216
217 mdio@520 {
218 #address-cells = <1>;
219 #size-cells = <0>;
220 compatible = "fsl,gianfar-mdio";
221 reg = <0x520 0x20>;
222
223 phy2: ethernet-phy@2 {
224 interrupt-parent = <&ipic>;
225 interrupts = <17 0x8>;
226 reg = <0x2>;
227 device_type = "ethernet-phy";
228 };
229
230 phy3: ethernet-phy@3 {
231 interrupt-parent = <&ipic>;
232 interrupts = <18 0x8>;
233 reg = <0x3>;
234 device_type = "ethernet-phy";
235 };
236
237 tbi0: tbi-phy@11 {
238 reg = <0x11>;
239 device_type = "tbi-phy";
240 };
241 };
227 }; 242 };
228 243
229 enet1: ethernet@25000 { 244 enet1: ethernet@25000 {
245 #address-cells = <1>;
246 #size-cells = <1>;
230 cell-index = <1>; 247 cell-index = <1>;
231 device_type = "network"; 248 device_type = "network";
232 model = "eTSEC"; 249 model = "eTSEC";
233 compatible = "gianfar"; 250 compatible = "gianfar";
234 reg = <0x25000 0x1000>; 251 reg = <0x25000 0x1000>;
252 ranges = <0x0 0x25000 0x1000>;
235 local-mac-address = [ 00 00 00 00 00 00 ]; 253 local-mac-address = [ 00 00 00 00 00 00 ];
236 interrupts = <35 0x8 36 0x8 37 0x8>; 254 interrupts = <35 0x8 36 0x8 37 0x8>;
237 phy-connection-type = "mii"; 255 phy-connection-type = "mii";
238 interrupt-parent = <&ipic>; 256 interrupt-parent = <&ipic>;
239 tbi-handle = <&tbi1>; 257 tbi-handle = <&tbi1>;
240 phy-handle = <&phy3>; 258 phy-handle = <&phy3>;
259 sleep = <&pmc 0x30000000>;
260 fsl,magic-packet;
261
262 mdio@520 {
263 #address-cells = <1>;
264 #size-cells = <0>;
265 compatible = "fsl,gianfar-tbi";
266 reg = <0x520 0x20>;
267
268 tbi1: tbi-phy@11 {
269 reg = <0x11>;
270 device_type = "tbi-phy";
271 };
272 };
241 }; 273 };
242 274
243 serial0: serial@4500 { 275 serial0: serial@4500 {
@@ -309,14 +341,7 @@
309 fsl,channel-fifo-len = <24>; 341 fsl,channel-fifo-len = <24>;
310 fsl,exec-units-mask = <0x9fe>; 342 fsl,exec-units-mask = <0x9fe>;
311 fsl,descriptor-types-mask = <0x3ab0ebf>; 343 fsl,descriptor-types-mask = <0x3ab0ebf>;
312 }; 344 sleep = <&pmc 0x03000000>;
313
314 sdhc@2e000 {
315 model = "eSDHC";
316 compatible = "fsl,esdhc";
317 reg = <0x2e000 0x1000>;
318 interrupts = <42 0x8>;
319 interrupt-parent = <&ipic>;
320 }; 345 };
321 346
322 sata@18000 { 347 sata@18000 {
@@ -324,6 +349,7 @@
324 reg = <0x18000 0x1000>; 349 reg = <0x18000 0x1000>;
325 interrupts = <44 0x8>; 350 interrupts = <44 0x8>;
326 interrupt-parent = <&ipic>; 351 interrupt-parent = <&ipic>;
352 sleep = <&pmc 0x000000c0>;
327 }; 353 };
328 354
329 sata@19000 { 355 sata@19000 {
@@ -331,6 +357,7 @@
331 reg = <0x19000 0x1000>; 357 reg = <0x19000 0x1000>;
332 interrupts = <45 0x8>; 358 interrupts = <45 0x8>;
333 interrupt-parent = <&ipic>; 359 interrupt-parent = <&ipic>;
360 sleep = <&pmc 0x00000030>;
334 }; 361 };
335 362
336 /* IPIC 363 /* IPIC
@@ -346,6 +373,13 @@
346 #interrupt-cells = <2>; 373 #interrupt-cells = <2>;
347 reg = <0x700 0x100>; 374 reg = <0x700 0x100>;
348 }; 375 };
376
377 pmc: power@b00 {
378 compatible = "fsl,mpc8377-pmc", "fsl,mpc8349-pmc";
379 reg = <0xb00 0x100 0xa00 0x100>;
380 interrupts = <80 0x8>;
381 interrupt-parent = <&ipic>;
382 };
349 }; 383 };
350 384
351 pci0: pci@e0008500 { 385 pci0: pci@e0008500 {
@@ -400,6 +434,7 @@
400 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 434 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
401 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 435 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
402 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>; 436 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
437 sleep = <&pmc 0x00010000>;
403 clock-frequency = <0>; 438 clock-frequency = <0>;
404 #interrupt-cells = <1>; 439 #interrupt-cells = <1>;
405 #size-cells = <2>; 440 #size-cells = <2>;
@@ -409,4 +444,68 @@
409 compatible = "fsl,mpc8349-pci"; 444 compatible = "fsl,mpc8349-pci";
410 device_type = "pci"; 445 device_type = "pci";
411 }; 446 };
447
448 pci1: pcie@e0009000 {
449 #address-cells = <3>;
450 #size-cells = <2>;
451 #interrupt-cells = <1>;
452 device_type = "pci";
453 compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
454 reg = <0xe0009000 0x00001000>;
455 ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000
456 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>;
457 bus-range = <0 255>;
458 interrupt-map-mask = <0xf800 0 0 7>;
459 interrupt-map = <0 0 0 1 &ipic 1 8
460 0 0 0 2 &ipic 1 8
461 0 0 0 3 &ipic 1 8
462 0 0 0 4 &ipic 1 8>;
463 sleep = <&pmc 0x00300000>;
464 clock-frequency = <0>;
465
466 pcie@0 {
467 #address-cells = <3>;
468 #size-cells = <2>;
469 device_type = "pci";
470 reg = <0 0 0 0 0>;
471 ranges = <0x02000000 0 0xa8000000
472 0x02000000 0 0xa8000000
473 0 0x10000000
474 0x01000000 0 0x00000000
475 0x01000000 0 0x00000000
476 0 0x00800000>;
477 };
478 };
479
480 pci2: pcie@e000a000 {
481 #address-cells = <3>;
482 #size-cells = <2>;
483 #interrupt-cells = <1>;
484 device_type = "pci";
485 compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
486 reg = <0xe000a000 0x00001000>;
487 ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000
488 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>;
489 bus-range = <0 255>;
490 interrupt-map-mask = <0xf800 0 0 7>;
491 interrupt-map = <0 0 0 1 &ipic 2 8
492 0 0 0 2 &ipic 2 8
493 0 0 0 3 &ipic 2 8
494 0 0 0 4 &ipic 2 8>;
495 sleep = <&pmc 0x000c0000>;
496 clock-frequency = <0>;
497
498 pcie@0 {
499 #address-cells = <3>;
500 #size-cells = <2>;
501 device_type = "pci";
502 reg = <0 0 0 0 0>;
503 ranges = <0x02000000 0 0xc8000000
504 0x02000000 0 0xc8000000
505 0 0x10000000
506 0x01000000 0 0x00000000
507 0x01000000 0 0x00000000
508 0 0x00800000>;
509 };
510 };
412}; 511};
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 9413af3b9925..053339390c22 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -22,6 +22,8 @@
22 serial0 = &serial0; 22 serial0 = &serial0;
23 serial1 = &serial1; 23 serial1 = &serial1;
24 pci0 = &pci0; 24 pci0 = &pci0;
25 pci1 = &pci1;
26 pci2 = &pci2;
25 }; 27 };
26 28
27 cpus { 29 cpus {
@@ -107,26 +109,72 @@
107 reg = <0x200 0x100>; 109 reg = <0x200 0x100>;
108 }; 110 };
109 111
110 i2c@3000 { 112 gpio1: gpio-controller@c00 {
111 #address-cells = <1>; 113 #gpio-cells = <2>;
112 #size-cells = <0>; 114 compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio";
113 cell-index = <0>; 115 reg = <0xc00 0x100>;
114 compatible = "fsl-i2c"; 116 interrupts = <74 0x8>;
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>; 117 interrupt-parent = <&ipic>;
118 dfsrr; 118 gpio-controller;
119 rtc@68 { 119 };
120 compatible = "dallas,ds1339"; 120
121 reg = <0x68>; 121 gpio2: gpio-controller@d00 {
122 #gpio-cells = <2>;
123 compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio";
124 reg = <0xd00 0x100>;
125 interrupts = <75 0x8>;
126 interrupt-parent = <&ipic>;
127 gpio-controller;
128 };
129
130 sleep-nexus {
131 #address-cells = <1>;
132 #size-cells = <1>;
133 compatible = "simple-bus";
134 sleep = <&pmc 0x0c000000>;
135 ranges;
136
137 i2c@3000 {
138 #address-cells = <1>;
139 #size-cells = <0>;
140 cell-index = <0>;
141 compatible = "fsl-i2c";
142 reg = <0x3000 0x100>;
143 interrupts = <14 0x8>;
144 interrupt-parent = <&ipic>;
145 dfsrr;
146
147 dtt@48 {
148 compatible = "national,lm75";
149 reg = <0x48>;
150 };
151
152 at24@50 {
153 compatible = "at24,24c256";
154 reg = <0x50>;
155 };
156
157 rtc@68 {
158 compatible = "dallas,ds1339";
159 reg = <0x68>;
160 };
161
162 mcu_pio: mcu@a {
163 #gpio-cells = <2>;
164 compatible = "fsl,mc9s08qg8-mpc8377erdb",
165 "fsl,mcu-mpc8349emitx";
166 reg = <0x0a>;
167 gpio-controller;
168 };
122 }; 169 };
123 170
124 mcu_pio: mcu@a { 171 sdhci@2e000 {
125 #gpio-cells = <2>; 172 compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc";
126 compatible = "fsl,mc9s08qg8-mpc8377erdb", 173 reg = <0x2e000 0x1000>;
127 "fsl,mcu-mpc8349emitx"; 174 interrupts = <42 0x8>;
128 reg = <0x0a>; 175 interrupt-parent = <&ipic>;
129 gpio-controller; 176 /* Filled in by U-Boot */
177 clock-frequency = <0>;
130 }; 178 };
131 }; 179 };
132 180
@@ -197,64 +245,76 @@
197 interrupt-parent = <&ipic>; 245 interrupt-parent = <&ipic>;
198 interrupts = <38 0x8>; 246 interrupts = <38 0x8>;
199 phy_type = "ulpi"; 247 phy_type = "ulpi";
248 sleep = <&pmc 0x00c00000>;
200 }; 249 };
201 250
202 mdio@24520 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,gianfar-mdio";
206 reg = <0x24520 0x20>;
207 phy2: ethernet-phy@2 {
208 interrupt-parent = <&ipic>;
209 interrupts = <17 0x8>;
210 reg = <0x2>;
211 device_type = "ethernet-phy";
212 };
213 tbi0: tbi-phy@11 {
214 reg = <0x11>;
215 device_type = "tbi-phy";
216 };
217 };
218
219 mdio@25520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-tbi";
223 reg = <0x25520 0x20>;
224
225 tbi1: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
230
231
232 enet0: ethernet@24000 { 251 enet0: ethernet@24000 {
252 #address-cells = <1>;
253 #size-cells = <1>;
233 cell-index = <0>; 254 cell-index = <0>;
234 device_type = "network"; 255 device_type = "network";
235 model = "eTSEC"; 256 model = "eTSEC";
236 compatible = "gianfar"; 257 compatible = "gianfar";
237 reg = <0x24000 0x1000>; 258 reg = <0x24000 0x1000>;
259 ranges = <0x0 0x24000 0x1000>;
238 local-mac-address = [ 00 00 00 00 00 00 ]; 260 local-mac-address = [ 00 00 00 00 00 00 ];
239 interrupts = <32 0x8 33 0x8 34 0x8>; 261 interrupts = <32 0x8 33 0x8 34 0x8>;
240 phy-connection-type = "mii"; 262 phy-connection-type = "mii";
241 interrupt-parent = <&ipic>; 263 interrupt-parent = <&ipic>;
242 tbi-handle = <&tbi0>; 264 tbi-handle = <&tbi0>;
243 phy-handle = <&phy2>; 265 phy-handle = <&phy2>;
266 sleep = <&pmc 0xc0000000>;
267 fsl,magic-packet;
268
269 mdio@520 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 compatible = "fsl,gianfar-mdio";
273 reg = <0x520 0x20>;
274
275 phy2: ethernet-phy@2 {
276 interrupt-parent = <&ipic>;
277 interrupts = <17 0x8>;
278 reg = <0x2>;
279 device_type = "ethernet-phy";
280 };
281
282 tbi0: tbi-phy@11 {
283 reg = <0x11>;
284 device_type = "tbi-phy";
285 };
286 };
244 }; 287 };
245 288
246 enet1: ethernet@25000 { 289 enet1: ethernet@25000 {
290 #address-cells = <1>;
291 #size-cells = <1>;
247 cell-index = <1>; 292 cell-index = <1>;
248 device_type = "network"; 293 device_type = "network";
249 model = "eTSEC"; 294 model = "eTSEC";
250 compatible = "gianfar"; 295 compatible = "gianfar";
251 reg = <0x25000 0x1000>; 296 reg = <0x25000 0x1000>;
297 ranges = <0x0 0x25000 0x1000>;
252 local-mac-address = [ 00 00 00 00 00 00 ]; 298 local-mac-address = [ 00 00 00 00 00 00 ];
253 interrupts = <35 0x8 36 0x8 37 0x8>; 299 interrupts = <35 0x8 36 0x8 37 0x8>;
254 phy-connection-type = "mii"; 300 phy-connection-type = "mii";
255 interrupt-parent = <&ipic>; 301 interrupt-parent = <&ipic>;
256 fixed-link = <1 1 1000 0 0>; 302 fixed-link = <1 1 1000 0 0>;
257 tbi-handle = <&tbi1>; 303 tbi-handle = <&tbi1>;
304 sleep = <&pmc 0x30000000>;
305 fsl,magic-packet;
306
307 mdio@520 {
308 #address-cells = <1>;
309 #size-cells = <0>;
310 compatible = "fsl,gianfar-tbi";
311 reg = <0x520 0x20>;
312
313 tbi1: tbi-phy@11 {
314 reg = <0x11>;
315 device_type = "tbi-phy";
316 };
317 };
258 }; 318 };
259 319
260 serial0: serial@4500 { 320 serial0: serial@4500 {
@@ -287,6 +347,7 @@
287 fsl,channel-fifo-len = <24>; 347 fsl,channel-fifo-len = <24>;
288 fsl,exec-units-mask = <0x9fe>; 348 fsl,exec-units-mask = <0x9fe>;
289 fsl,descriptor-types-mask = <0x3ab0ebf>; 349 fsl,descriptor-types-mask = <0x3ab0ebf>;
350 sleep = <&pmc 0x03000000>;
290 }; 351 };
291 352
292 sata@18000 { 353 sata@18000 {
@@ -294,6 +355,7 @@
294 reg = <0x18000 0x1000>; 355 reg = <0x18000 0x1000>;
295 interrupts = <44 0x8>; 356 interrupts = <44 0x8>;
296 interrupt-parent = <&ipic>; 357 interrupt-parent = <&ipic>;
358 sleep = <&pmc 0x000000c0>;
297 }; 359 };
298 360
299 sata@19000 { 361 sata@19000 {
@@ -301,6 +363,7 @@
301 reg = <0x19000 0x1000>; 363 reg = <0x19000 0x1000>;
302 interrupts = <45 0x8>; 364 interrupts = <45 0x8>;
303 interrupt-parent = <&ipic>; 365 interrupt-parent = <&ipic>;
366 sleep = <&pmc 0x00000030>;
304 }; 367 };
305 368
306 /* IPIC 369 /* IPIC
@@ -316,6 +379,13 @@
316 #interrupt-cells = <2>; 379 #interrupt-cells = <2>;
317 reg = <0x700 0x100>; 380 reg = <0x700 0x100>;
318 }; 381 };
382
383 pmc: power@b00 {
384 compatible = "fsl,mpc8377-pmc", "fsl,mpc8349-pmc";
385 reg = <0xb00 0x100 0xa00 0x100>;
386 interrupts = <80 0x8>;
387 interrupt-parent = <&ipic>;
388 };
319 }; 389 };
320 390
321 pci0: pci@e0008500 { 391 pci0: pci@e0008500 {
@@ -341,6 +411,7 @@
341 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 411 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
342 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 412 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
343 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 413 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
414 sleep = <&pmc 0x00010000>;
344 clock-frequency = <66666666>; 415 clock-frequency = <66666666>;
345 #interrupt-cells = <1>; 416 #interrupt-cells = <1>;
346 #size-cells = <2>; 417 #size-cells = <2>;
@@ -350,4 +421,68 @@
350 compatible = "fsl,mpc8349-pci"; 421 compatible = "fsl,mpc8349-pci";
351 device_type = "pci"; 422 device_type = "pci";
352 }; 423 };
424
425 pci1: pcie@e0009000 {
426 #address-cells = <3>;
427 #size-cells = <2>;
428 #interrupt-cells = <1>;
429 device_type = "pci";
430 compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
431 reg = <0xe0009000 0x00001000>;
432 ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000
433 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>;
434 bus-range = <0 255>;
435 interrupt-map-mask = <0xf800 0 0 7>;
436 interrupt-map = <0 0 0 1 &ipic 1 8
437 0 0 0 2 &ipic 1 8
438 0 0 0 3 &ipic 1 8
439 0 0 0 4 &ipic 1 8>;
440 sleep = <&pmc 0x00300000>;
441 clock-frequency = <0>;
442
443 pcie@0 {
444 #address-cells = <3>;
445 #size-cells = <2>;
446 device_type = "pci";
447 reg = <0 0 0 0 0>;
448 ranges = <0x02000000 0 0xa8000000
449 0x02000000 0 0xa8000000
450 0 0x10000000
451 0x01000000 0 0x00000000
452 0x01000000 0 0x00000000
453 0 0x00800000>;
454 };
455 };
456
457 pci2: pcie@e000a000 {
458 #address-cells = <3>;
459 #size-cells = <2>;
460 #interrupt-cells = <1>;
461 device_type = "pci";
462 compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
463 reg = <0xe000a000 0x00001000>;
464 ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000
465 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>;
466 bus-range = <0 255>;
467 interrupt-map-mask = <0xf800 0 0 7>;
468 interrupt-map = <0 0 0 1 &ipic 2 8
469 0 0 0 2 &ipic 2 8
470 0 0 0 3 &ipic 2 8
471 0 0 0 4 &ipic 2 8>;
472 sleep = <&pmc 0x000c0000>;
473 clock-frequency = <0>;
474
475 pcie@0 {
476 #address-cells = <3>;
477 #size-cells = <2>;
478 device_type = "pci";
479 reg = <0 0 0 0 0>;
480 ranges = <0x02000000 0 0xc8000000
481 0x02000000 0 0xc8000000
482 0 0x10000000
483 0x01000000 0 0x00000000
484 0x01000000 0 0x00000000
485 0 0x00800000>;
486 };
487 };
353}; 488};
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index b85fc02682d2..651ff2f9db2d 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -23,6 +23,8 @@
23 serial0 = &serial0; 23 serial0 = &serial0;
24 serial1 = &serial1; 24 serial1 = &serial1;
25 pci0 = &pci0; 25 pci0 = &pci0;
26 pci1 = &pci1;
27 pci2 = &pci2;
26 }; 28 };
27 29
28 cpus { 30 cpus {
@@ -127,21 +129,38 @@
127 reg = <0x200 0x100>; 129 reg = <0x200 0x100>;
128 }; 130 };
129 131
130 i2c@3000 { 132 sleep-nexus {
131 #address-cells = <1>; 133 #address-cells = <1>;
132 #size-cells = <0>; 134 #size-cells = <1>;
133 cell-index = <0>; 135 compatible = "simple-bus";
134 compatible = "fsl-i2c"; 136 sleep = <&pmc 0x0c000000>;
135 reg = <0x3000 0x100>; 137 ranges;
136 interrupts = <14 0x8>; 138
137 interrupt-parent = <&ipic>; 139 i2c@3000 {
138 dfsrr; 140 #address-cells = <1>;
141 #size-cells = <0>;
142 cell-index = <0>;
143 compatible = "fsl-i2c";
144 reg = <0x3000 0x100>;
145 interrupts = <14 0x8>;
146 interrupt-parent = <&ipic>;
147 dfsrr;
148
149 rtc@68 {
150 compatible = "dallas,ds1374";
151 reg = <0x68>;
152 interrupts = <19 0x8>;
153 interrupt-parent = <&ipic>;
154 };
155 };
139 156
140 rtc@68 { 157 sdhci@2e000 {
141 compatible = "dallas,ds1374"; 158 compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc";
142 reg = <0x68>; 159 reg = <0x2e000 0x1000>;
143 interrupts = <19 0x8>; 160 interrupts = <42 0x8>;
144 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
162 /* Filled in by U-Boot */
163 clock-frequency = <0>;
145 }; 164 };
146 }; 165 };
147 166
@@ -213,70 +232,83 @@
213 interrupts = <38 0x8>; 232 interrupts = <38 0x8>;
214 dr_mode = "host"; 233 dr_mode = "host";
215 phy_type = "ulpi"; 234 phy_type = "ulpi";
235 sleep = <&pmc 0x00c00000>;
216 }; 236 };
217 237
218 mdio@24520 {
219 #address-cells = <1>;
220 #size-cells = <0>;
221 compatible = "fsl,gianfar-mdio";
222 reg = <0x24520 0x20>;
223 phy2: ethernet-phy@2 {
224 interrupt-parent = <&ipic>;
225 interrupts = <17 0x8>;
226 reg = <0x2>;
227 device_type = "ethernet-phy";
228 };
229 phy3: ethernet-phy@3 {
230 interrupt-parent = <&ipic>;
231 interrupts = <18 0x8>;
232 reg = <0x3>;
233 device_type = "ethernet-phy";
234 };
235 tbi0: tbi-phy@11 {
236 reg = <0x11>;
237 device_type = "tbi-phy";
238 };
239 };
240
241 mdio@25520 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,gianfar-tbi";
245 reg = <0x25520 0x20>;
246
247 tbi1: tbi-phy@11 {
248 reg = <0x11>;
249 device_type = "tbi-phy";
250 };
251 };
252
253
254 enet0: ethernet@24000 { 238 enet0: ethernet@24000 {
239 #address-cells = <1>;
240 #size-cells = <1>;
255 cell-index = <0>; 241 cell-index = <0>;
256 device_type = "network"; 242 device_type = "network";
257 model = "eTSEC"; 243 model = "eTSEC";
258 compatible = "gianfar"; 244 compatible = "gianfar";
259 reg = <0x24000 0x1000>; 245 reg = <0x24000 0x1000>;
246 ranges = <0x0 0x24000 0x1000>;
260 local-mac-address = [ 00 00 00 00 00 00 ]; 247 local-mac-address = [ 00 00 00 00 00 00 ];
261 interrupts = <32 0x8 33 0x8 34 0x8>; 248 interrupts = <32 0x8 33 0x8 34 0x8>;
262 phy-connection-type = "mii"; 249 phy-connection-type = "mii";
263 interrupt-parent = <&ipic>; 250 interrupt-parent = <&ipic>;
264 tbi-handle = <&tbi0>; 251 tbi-handle = <&tbi0>;
265 phy-handle = <&phy2>; 252 phy-handle = <&phy2>;
253 sleep = <&pmc 0xc0000000>;
254 fsl,magic-packet;
255
256 mdio@520 {
257 #address-cells = <1>;
258 #size-cells = <0>;
259 compatible = "fsl,gianfar-mdio";
260 reg = <0x520 0x20>;
261
262 phy2: ethernet-phy@2 {
263 interrupt-parent = <&ipic>;
264 interrupts = <17 0x8>;
265 reg = <0x2>;
266 device_type = "ethernet-phy";
267 };
268
269 phy3: ethernet-phy@3 {
270 interrupt-parent = <&ipic>;
271 interrupts = <18 0x8>;
272 reg = <0x3>;
273 device_type = "ethernet-phy";
274 };
275
276 tbi0: tbi-phy@11 {
277 reg = <0x11>;
278 device_type = "tbi-phy";
279 };
280 };
266 }; 281 };
267 282
268 enet1: ethernet@25000 { 283 enet1: ethernet@25000 {
284 #address-cells = <1>;
285 #size-cells = <1>;
269 cell-index = <1>; 286 cell-index = <1>;
270 device_type = "network"; 287 device_type = "network";
271 model = "eTSEC"; 288 model = "eTSEC";
272 compatible = "gianfar"; 289 compatible = "gianfar";
273 reg = <0x25000 0x1000>; 290 reg = <0x25000 0x1000>;
291 ranges = <0x0 0x25000 0x1000>;
274 local-mac-address = [ 00 00 00 00 00 00 ]; 292 local-mac-address = [ 00 00 00 00 00 00 ];
275 interrupts = <35 0x8 36 0x8 37 0x8>; 293 interrupts = <35 0x8 36 0x8 37 0x8>;
276 phy-connection-type = "mii"; 294 phy-connection-type = "mii";
277 interrupt-parent = <&ipic>; 295 interrupt-parent = <&ipic>;
278 tbi-handle = <&tbi1>; 296 tbi-handle = <&tbi1>;
279 phy-handle = <&phy3>; 297 phy-handle = <&phy3>;
298 sleep = <&pmc 0x30000000>;
299 fsl,magic-packet;
300
301 mdio@520 {
302 #address-cells = <1>;
303 #size-cells = <0>;
304 compatible = "fsl,gianfar-tbi";
305 reg = <0x520 0x20>;
306
307 tbi1: tbi-phy@11 {
308 reg = <0x11>;
309 device_type = "tbi-phy";
310 };
311 };
280 }; 312 };
281 313
282 serial0: serial@4500 { 314 serial0: serial@4500 {
@@ -309,14 +341,7 @@
309 fsl,channel-fifo-len = <24>; 341 fsl,channel-fifo-len = <24>;
310 fsl,exec-units-mask = <0x9fe>; 342 fsl,exec-units-mask = <0x9fe>;
311 fsl,descriptor-types-mask = <0x3ab0ebf>; 343 fsl,descriptor-types-mask = <0x3ab0ebf>;
312 }; 344 sleep = <&pmc 0x03000000>;
313
314 sdhc@2e000 {
315 model = "eSDHC";
316 compatible = "fsl,esdhc";
317 reg = <0x2e000 0x1000>;
318 interrupts = <42 0x8>;
319 interrupt-parent = <&ipic>;
320 }; 345 };
321 346
322 /* IPIC 347 /* IPIC
@@ -332,6 +357,13 @@
332 #interrupt-cells = <2>; 357 #interrupt-cells = <2>;
333 reg = <0x700 0x100>; 358 reg = <0x700 0x100>;
334 }; 359 };
360
361 pmc: power@b00 {
362 compatible = "fsl,mpc8378-pmc", "fsl,mpc8349-pmc";
363 reg = <0xb00 0x100 0xa00 0x100>;
364 interrupts = <80 0x8>;
365 interrupt-parent = <&ipic>;
366 };
335 }; 367 };
336 368
337 pci0: pci@e0008500 { 369 pci0: pci@e0008500 {
@@ -387,6 +419,7 @@
387 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 419 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
388 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>; 420 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
389 clock-frequency = <0>; 421 clock-frequency = <0>;
422 sleep = <&pmc 0x00010000>;
390 #interrupt-cells = <1>; 423 #interrupt-cells = <1>;
391 #size-cells = <2>; 424 #size-cells = <2>;
392 #address-cells = <3>; 425 #address-cells = <3>;
@@ -395,4 +428,68 @@
395 compatible = "fsl,mpc8349-pci"; 428 compatible = "fsl,mpc8349-pci";
396 device_type = "pci"; 429 device_type = "pci";
397 }; 430 };
431
432 pci1: pcie@e0009000 {
433 #address-cells = <3>;
434 #size-cells = <2>;
435 #interrupt-cells = <1>;
436 device_type = "pci";
437 compatible = "fsl,mpc8378-pcie", "fsl,mpc8314-pcie";
438 reg = <0xe0009000 0x00001000>;
439 ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000
440 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>;
441 bus-range = <0 255>;
442 interrupt-map-mask = <0xf800 0 0 7>;
443 interrupt-map = <0 0 0 1 &ipic 1 8
444 0 0 0 2 &ipic 1 8
445 0 0 0 3 &ipic 1 8
446 0 0 0 4 &ipic 1 8>;
447 sleep = <&pmc 0x00300000>;
448 clock-frequency = <0>;
449
450 pcie@0 {
451 #address-cells = <3>;
452 #size-cells = <2>;
453 device_type = "pci";
454 reg = <0 0 0 0 0>;
455 ranges = <0x02000000 0 0xa8000000
456 0x02000000 0 0xa8000000
457 0 0x10000000
458 0x01000000 0 0x00000000
459 0x01000000 0 0x00000000
460 0 0x00800000>;
461 };
462 };
463
464 pci2: pcie@e000a000 {
465 #address-cells = <3>;
466 #size-cells = <2>;
467 #interrupt-cells = <1>;
468 device_type = "pci";
469 compatible = "fsl,mpc8378-pcie", "fsl,mpc8314-pcie";
470 reg = <0xe000a000 0x00001000>;
471 ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000
472 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>;
473 bus-range = <0 255>;
474 interrupt-map-mask = <0xf800 0 0 7>;
475 interrupt-map = <0 0 0 1 &ipic 2 8
476 0 0 0 2 &ipic 2 8
477 0 0 0 3 &ipic 2 8
478 0 0 0 4 &ipic 2 8>;
479 sleep = <&pmc 0x000c0000>;
480 clock-frequency = <0>;
481
482 pcie@0 {
483 #address-cells = <3>;
484 #size-cells = <2>;
485 device_type = "pci";
486 reg = <0 0 0 0 0>;
487 ranges = <0x02000000 0 0xc8000000
488 0x02000000 0 0xc8000000
489 0 0x10000000
490 0x01000000 0 0x00000000
491 0x01000000 0 0x00000000
492 0 0x00800000>;
493 };
494 };
398}; 495};
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 23c10ce22c2c..5d90e85704c3 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -22,6 +22,8 @@
22 serial0 = &serial0; 22 serial0 = &serial0;
23 serial1 = &serial1; 23 serial1 = &serial1;
24 pci0 = &pci0; 24 pci0 = &pci0;
25 pci1 = &pci1;
26 pci2 = &pci2;
25 }; 27 };
26 28
27 cpus { 29 cpus {
@@ -107,26 +109,72 @@
107 reg = <0x200 0x100>; 109 reg = <0x200 0x100>;
108 }; 110 };
109 111
110 i2c@3000 { 112 gpio1: gpio-controller@c00 {
111 #address-cells = <1>; 113 #gpio-cells = <2>;
112 #size-cells = <0>; 114 compatible = "fsl,mpc8378-gpio", "fsl,mpc8349-gpio";
113 cell-index = <0>; 115 reg = <0xc00 0x100>;
114 compatible = "fsl-i2c"; 116 interrupts = <74 0x8>;
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>; 117 interrupt-parent = <&ipic>;
118 dfsrr; 118 gpio-controller;
119 rtc@68 { 119 };
120 compatible = "dallas,ds1339"; 120
121 reg = <0x68>; 121 gpio2: gpio-controller@d00 {
122 #gpio-cells = <2>;
123 compatible = "fsl,mpc8378-gpio", "fsl,mpc8349-gpio";
124 reg = <0xd00 0x100>;
125 interrupts = <75 0x8>;
126 interrupt-parent = <&ipic>;
127 gpio-controller;
128 };
129
130 sleep-nexus {
131 #address-cells = <1>;
132 #size-cells = <1>;
133 compatible = "simple-bus";
134 sleep = <&pmc 0x0c000000>;
135 ranges;
136
137 i2c@3000 {
138 #address-cells = <1>;
139 #size-cells = <0>;
140 cell-index = <0>;
141 compatible = "fsl-i2c";
142 reg = <0x3000 0x100>;
143 interrupts = <14 0x8>;
144 interrupt-parent = <&ipic>;
145 dfsrr;
146
147 dtt@48 {
148 compatible = "national,lm75";
149 reg = <0x48>;
150 };
151
152 at24@50 {
153 compatible = "at24,24c256";
154 reg = <0x50>;
155 };
156
157 rtc@68 {
158 compatible = "dallas,ds1339";
159 reg = <0x68>;
160 };
161
162 mcu_pio: mcu@a {
163 #gpio-cells = <2>;
164 compatible = "fsl,mc9s08qg8-mpc8378erdb",
165 "fsl,mcu-mpc8349emitx";
166 reg = <0x0a>;
167 gpio-controller;
168 };
122 }; 169 };
123 170
124 mcu_pio: mcu@a { 171 sdhci@2e000 {
125 #gpio-cells = <2>; 172 compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc";
126 compatible = "fsl,mc9s08qg8-mpc8378erdb", 173 reg = <0x2e000 0x1000>;
127 "fsl,mcu-mpc8349emitx"; 174 interrupts = <42 0x8>;
128 reg = <0x0a>; 175 interrupt-parent = <&ipic>;
129 gpio-controller; 176 /* Filled in by U-Boot */
177 clock-frequency = <0>;
130 }; 178 };
131 }; 179 };
132 180
@@ -197,62 +245,76 @@
197 interrupt-parent = <&ipic>; 245 interrupt-parent = <&ipic>;
198 interrupts = <38 0x8>; 246 interrupts = <38 0x8>;
199 phy_type = "ulpi"; 247 phy_type = "ulpi";
248 sleep = <&pmc 0x00c00000>;
200 }; 249 };
201 250
202 mdio@24520 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,gianfar-mdio";
206 reg = <0x24520 0x20>;
207 phy2: ethernet-phy@2 {
208 interrupt-parent = <&ipic>;
209 interrupts = <17 0x8>;
210 reg = <0x2>;
211 device_type = "ethernet-phy";
212 };
213 tbi0: tbi-phy@11 {
214 reg = <0x11>;
215 device_type = "tbi-phy";
216 };
217 };
218
219 mdio@25520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-tbi";
223 reg = <0x25520 0x20>;
224
225 tbi1: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
230
231
232 enet0: ethernet@24000 { 251 enet0: ethernet@24000 {
252 #address-cells = <1>;
253 #size-cells = <1>;
233 cell-index = <0>; 254 cell-index = <0>;
234 device_type = "network"; 255 device_type = "network";
235 model = "eTSEC"; 256 model = "eTSEC";
236 compatible = "gianfar"; 257 compatible = "gianfar";
237 reg = <0x24000 0x1000>; 258 reg = <0x24000 0x1000>;
259 ranges = <0x0 0x24000 0x1000>;
238 local-mac-address = [ 00 00 00 00 00 00 ]; 260 local-mac-address = [ 00 00 00 00 00 00 ];
239 interrupts = <32 0x8 33 0x8 34 0x8>; 261 interrupts = <32 0x8 33 0x8 34 0x8>;
240 phy-connection-type = "mii"; 262 phy-connection-type = "mii";
241 interrupt-parent = <&ipic>; 263 interrupt-parent = <&ipic>;
264 tbi-handle = <&tbi0>;
242 phy-handle = <&phy2>; 265 phy-handle = <&phy2>;
266 sleep = <&pmc 0xc0000000>;
267 fsl,magic-packet;
268
269 mdio@520 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 compatible = "fsl,gianfar-mdio";
273 reg = <0x520 0x20>;
274
275 phy2: ethernet-phy@2 {
276 interrupt-parent = <&ipic>;
277 interrupts = <17 0x8>;
278 reg = <0x2>;
279 device_type = "ethernet-phy";
280 };
281
282 tbi0: tbi-phy@11 {
283 reg = <0x11>;
284 device_type = "tbi-phy";
285 };
286 };
243 }; 287 };
244 288
245 enet1: ethernet@25000 { 289 enet1: ethernet@25000 {
290 #address-cells = <1>;
291 #size-cells = <1>;
246 cell-index = <1>; 292 cell-index = <1>;
247 device_type = "network"; 293 device_type = "network";
248 model = "eTSEC"; 294 model = "eTSEC";
249 compatible = "gianfar"; 295 compatible = "gianfar";
250 reg = <0x25000 0x1000>; 296 reg = <0x25000 0x1000>;
297 ranges = <0x0 0x25000 0x1000>;
251 local-mac-address = [ 00 00 00 00 00 00 ]; 298 local-mac-address = [ 00 00 00 00 00 00 ];
252 interrupts = <35 0x8 36 0x8 37 0x8>; 299 interrupts = <35 0x8 36 0x8 37 0x8>;
253 phy-connection-type = "mii"; 300 phy-connection-type = "mii";
254 interrupt-parent = <&ipic>; 301 interrupt-parent = <&ipic>;
255 fixed-link = <1 1 1000 0 0>; 302 fixed-link = <1 1 1000 0 0>;
303 tbi-handle = <&tbi1>;
304 sleep = <&pmc 0x30000000>;
305 fsl,magic-packet;
306
307 mdio@520 {
308 #address-cells = <1>;
309 #size-cells = <0>;
310 compatible = "fsl,gianfar-tbi";
311 reg = <0x520 0x20>;
312
313 tbi1: tbi-phy@11 {
314 reg = <0x11>;
315 device_type = "tbi-phy";
316 };
317 };
256 }; 318 };
257 319
258 serial0: serial@4500 { 320 serial0: serial@4500 {
@@ -285,6 +347,7 @@
285 fsl,channel-fifo-len = <24>; 347 fsl,channel-fifo-len = <24>;
286 fsl,exec-units-mask = <0x9fe>; 348 fsl,exec-units-mask = <0x9fe>;
287 fsl,descriptor-types-mask = <0x3ab0ebf>; 349 fsl,descriptor-types-mask = <0x3ab0ebf>;
350 sleep = <&pmc 0x03000000>;
288 }; 351 };
289 352
290 /* IPIC 353 /* IPIC
@@ -300,6 +363,13 @@
300 #interrupt-cells = <2>; 363 #interrupt-cells = <2>;
301 reg = <0x700 0x100>; 364 reg = <0x700 0x100>;
302 }; 365 };
366
367 pmc: power@b00 {
368 compatible = "fsl,mpc8378-pmc", "fsl,mpc8349-pmc";
369 reg = <0xb00 0x100 0xa00 0x100>;
370 interrupts = <80 0x8>;
371 interrupt-parent = <&ipic>;
372 };
303 }; 373 };
304 374
305 pci0: pci@e0008500 { 375 pci0: pci@e0008500 {
@@ -325,6 +395,7 @@
325 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 395 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
326 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 396 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
327 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 397 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
398 sleep = <&pmc 0x00010000>;
328 clock-frequency = <66666666>; 399 clock-frequency = <66666666>;
329 #interrupt-cells = <1>; 400 #interrupt-cells = <1>;
330 #size-cells = <2>; 401 #size-cells = <2>;
@@ -334,4 +405,68 @@
334 compatible = "fsl,mpc8349-pci"; 405 compatible = "fsl,mpc8349-pci";
335 device_type = "pci"; 406 device_type = "pci";
336 }; 407 };
408
409 pci1: pcie@e0009000 {
410 #address-cells = <3>;
411 #size-cells = <2>;
412 #interrupt-cells = <1>;
413 device_type = "pci";
414 compatible = "fsl,mpc8378-pcie", "fsl,mpc8314-pcie";
415 reg = <0xe0009000 0x00001000>;
416 ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000
417 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>;
418 bus-range = <0 255>;
419 interrupt-map-mask = <0xf800 0 0 7>;
420 interrupt-map = <0 0 0 1 &ipic 1 8
421 0 0 0 2 &ipic 1 8
422 0 0 0 3 &ipic 1 8
423 0 0 0 4 &ipic 1 8>;
424 sleep = <&pmc 0x00300000>;
425 clock-frequency = <0>;
426
427 pcie@0 {
428 #address-cells = <3>;
429 #size-cells = <2>;
430 device_type = "pci";
431 reg = <0 0 0 0 0>;
432 ranges = <0x02000000 0 0xa8000000
433 0x02000000 0 0xa8000000
434 0 0x10000000
435 0x01000000 0 0x00000000
436 0x01000000 0 0x00000000
437 0 0x00800000>;
438 };
439 };
440
441 pci2: pcie@e000a000 {
442 #address-cells = <3>;
443 #size-cells = <2>;
444 #interrupt-cells = <1>;
445 device_type = "pci";
446 compatible = "fsl,mpc8378-pcie", "fsl,mpc8314-pcie";
447 reg = <0xe000a000 0x00001000>;
448 ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000
449 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>;
450 bus-range = <0 255>;
451 interrupt-map-mask = <0xf800 0 0 7>;
452 interrupt-map = <0 0 0 1 &ipic 2 8
453 0 0 0 2 &ipic 2 8
454 0 0 0 3 &ipic 2 8
455 0 0 0 4 &ipic 2 8>;
456 sleep = <&pmc 0x000c0000>;
457 clock-frequency = <0>;
458
459 pcie@0 {
460 #address-cells = <3>;
461 #size-cells = <2>;
462 device_type = "pci";
463 reg = <0 0 0 0 0>;
464 ranges = <0x02000000 0 0xc8000000
465 0x02000000 0 0xc8000000
466 0 0x10000000
467 0x01000000 0 0x00000000
468 0x01000000 0 0x00000000
469 0 0x00800000>;
470 };
471 };
337}; 472};
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index acf06c438dbf..d6f208b8297a 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -127,21 +127,38 @@
127 reg = <0x200 0x100>; 127 reg = <0x200 0x100>;
128 }; 128 };
129 129
130 i2c@3000 { 130 sleep-nexus {
131 #address-cells = <1>; 131 #address-cells = <1>;
132 #size-cells = <0>; 132 #size-cells = <1>;
133 cell-index = <0>; 133 compatible = "simple-bus";
134 compatible = "fsl-i2c"; 134 sleep = <&pmc 0x0c000000>;
135 reg = <0x3000 0x100>; 135 ranges;
136 interrupts = <14 0x8>; 136
137 interrupt-parent = <&ipic>; 137 i2c@3000 {
138 dfsrr; 138 #address-cells = <1>;
139 #size-cells = <0>;
140 cell-index = <0>;
141 compatible = "fsl-i2c";
142 reg = <0x3000 0x100>;
143 interrupts = <14 0x8>;
144 interrupt-parent = <&ipic>;
145 dfsrr;
146
147 rtc@68 {
148 compatible = "dallas,ds1374";
149 reg = <0x68>;
150 interrupts = <19 0x8>;
151 interrupt-parent = <&ipic>;
152 };
153 };
139 154
140 rtc@68 { 155 sdhci@2e000 {
141 compatible = "dallas,ds1374"; 156 compatible = "fsl,mpc8379-esdhc";
142 reg = <0x68>; 157 reg = <0x2e000 0x1000>;
143 interrupts = <19 0x8>; 158 interrupts = <42 0x8>;
144 interrupt-parent = <&ipic>; 159 interrupt-parent = <&ipic>;
160 /* Filled in by U-Boot */
161 clock-frequency = <0>;
145 }; 162 };
146 }; 163 };
147 164
@@ -213,69 +230,83 @@
213 interrupts = <38 0x8>; 230 interrupts = <38 0x8>;
214 dr_mode = "host"; 231 dr_mode = "host";
215 phy_type = "ulpi"; 232 phy_type = "ulpi";
216 }; 233 sleep = <&pmc 0x00c00000>;
217
218 mdio@24520 {
219 #address-cells = <1>;
220 #size-cells = <0>;
221 compatible = "fsl,gianfar-mdio";
222 reg = <0x24520 0x20>;
223 phy2: ethernet-phy@2 {
224 interrupt-parent = <&ipic>;
225 interrupts = <17 0x8>;
226 reg = <0x2>;
227 device_type = "ethernet-phy";
228 };
229 phy3: ethernet-phy@3 {
230 interrupt-parent = <&ipic>;
231 interrupts = <18 0x8>;
232 reg = <0x3>;
233 device_type = "ethernet-phy";
234 };
235 tbi0: tbi-phy@11 {
236 reg = <0x11>;
237 device_type = "tbi-phy";
238 };
239 };
240
241 mdio@25520 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,gianfar-tbi";
245 reg = <0x25520 0x20>;
246
247 tbi1: tbi-phy@11 {
248 reg = <0x11>;
249 device_type = "tbi-phy";
250 };
251 }; 234 };
252 235
253 enet0: ethernet@24000 { 236 enet0: ethernet@24000 {
237 #address-cells = <1>;
238 #size-cells = <1>;
254 cell-index = <0>; 239 cell-index = <0>;
255 device_type = "network"; 240 device_type = "network";
256 model = "eTSEC"; 241 model = "eTSEC";
257 compatible = "gianfar"; 242 compatible = "gianfar";
258 reg = <0x24000 0x1000>; 243 reg = <0x24000 0x1000>;
244 ranges = <0x0 0x24000 0x1000>;
259 local-mac-address = [ 00 00 00 00 00 00 ]; 245 local-mac-address = [ 00 00 00 00 00 00 ];
260 interrupts = <32 0x8 33 0x8 34 0x8>; 246 interrupts = <32 0x8 33 0x8 34 0x8>;
261 phy-connection-type = "mii"; 247 phy-connection-type = "mii";
262 interrupt-parent = <&ipic>; 248 interrupt-parent = <&ipic>;
263 tbi-handle = <&tbi0>; 249 tbi-handle = <&tbi0>;
264 phy-handle = <&phy2>; 250 phy-handle = <&phy2>;
251 sleep = <&pmc 0xc0000000>;
252 fsl,magic-packet;
253
254 mdio@520 {
255 #address-cells = <1>;
256 #size-cells = <0>;
257 compatible = "fsl,gianfar-mdio";
258 reg = <0x520 0x20>;
259
260 phy2: ethernet-phy@2 {
261 interrupt-parent = <&ipic>;
262 interrupts = <17 0x8>;
263 reg = <0x2>;
264 device_type = "ethernet-phy";
265 };
266
267 phy3: ethernet-phy@3 {
268 interrupt-parent = <&ipic>;
269 interrupts = <18 0x8>;
270 reg = <0x3>;
271 device_type = "ethernet-phy";
272 };
273
274 tbi0: tbi-phy@11 {
275 reg = <0x11>;
276 device_type = "tbi-phy";
277 };
278 };
265 }; 279 };
266 280
267 enet1: ethernet@25000 { 281 enet1: ethernet@25000 {
282 #address-cells = <1>;
283 #size-cells = <1>;
268 cell-index = <1>; 284 cell-index = <1>;
269 device_type = "network"; 285 device_type = "network";
270 model = "eTSEC"; 286 model = "eTSEC";
271 compatible = "gianfar"; 287 compatible = "gianfar";
272 reg = <0x25000 0x1000>; 288 reg = <0x25000 0x1000>;
289 ranges = <0x0 0x25000 0x1000>;
273 local-mac-address = [ 00 00 00 00 00 00 ]; 290 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <35 0x8 36 0x8 37 0x8>; 291 interrupts = <35 0x8 36 0x8 37 0x8>;
275 phy-connection-type = "mii"; 292 phy-connection-type = "mii";
276 interrupt-parent = <&ipic>; 293 interrupt-parent = <&ipic>;
277 tbi-handle = <&tbi1>; 294 tbi-handle = <&tbi1>;
278 phy-handle = <&phy3>; 295 phy-handle = <&phy3>;
296 sleep = <&pmc 0x30000000>;
297 fsl,magic-packet;
298
299 mdio@520 {
300 #address-cells = <1>;
301 #size-cells = <0>;
302 compatible = "fsl,gianfar-tbi";
303 reg = <0x520 0x20>;
304
305 tbi1: tbi-phy@11 {
306 reg = <0x11>;
307 device_type = "tbi-phy";
308 };
309 };
279 }; 310 };
280 311
281 serial0: serial@4500 { 312 serial0: serial@4500 {
@@ -308,14 +339,7 @@
308 fsl,channel-fifo-len = <24>; 339 fsl,channel-fifo-len = <24>;
309 fsl,exec-units-mask = <0x9fe>; 340 fsl,exec-units-mask = <0x9fe>;
310 fsl,descriptor-types-mask = <0x3ab0ebf>; 341 fsl,descriptor-types-mask = <0x3ab0ebf>;
311 }; 342 sleep = <&pmc 0x03000000>;
312
313 sdhc@2e000 {
314 model = "eSDHC";
315 compatible = "fsl,esdhc";
316 reg = <0x2e000 0x1000>;
317 interrupts = <42 0x8>;
318 interrupt-parent = <&ipic>;
319 }; 343 };
320 344
321 sata@18000 { 345 sata@18000 {
@@ -323,6 +347,7 @@
323 reg = <0x18000 0x1000>; 347 reg = <0x18000 0x1000>;
324 interrupts = <44 0x8>; 348 interrupts = <44 0x8>;
325 interrupt-parent = <&ipic>; 349 interrupt-parent = <&ipic>;
350 sleep = <&pmc 0x000000c0>;
326 }; 351 };
327 352
328 sata@19000 { 353 sata@19000 {
@@ -330,6 +355,7 @@
330 reg = <0x19000 0x1000>; 355 reg = <0x19000 0x1000>;
331 interrupts = <45 0x8>; 356 interrupts = <45 0x8>;
332 interrupt-parent = <&ipic>; 357 interrupt-parent = <&ipic>;
358 sleep = <&pmc 0x00000030>;
333 }; 359 };
334 360
335 sata@1a000 { 361 sata@1a000 {
@@ -337,6 +363,7 @@
337 reg = <0x1a000 0x1000>; 363 reg = <0x1a000 0x1000>;
338 interrupts = <46 0x8>; 364 interrupts = <46 0x8>;
339 interrupt-parent = <&ipic>; 365 interrupt-parent = <&ipic>;
366 sleep = <&pmc 0x0000000c>;
340 }; 367 };
341 368
342 sata@1b000 { 369 sata@1b000 {
@@ -344,6 +371,7 @@
344 reg = <0x1b000 0x1000>; 371 reg = <0x1b000 0x1000>;
345 interrupts = <47 0x8>; 372 interrupts = <47 0x8>;
346 interrupt-parent = <&ipic>; 373 interrupt-parent = <&ipic>;
374 sleep = <&pmc 0x00000003>;
347 }; 375 };
348 376
349 /* IPIC 377 /* IPIC
@@ -359,6 +387,13 @@
359 #interrupt-cells = <2>; 387 #interrupt-cells = <2>;
360 reg = <0x700 0x100>; 388 reg = <0x700 0x100>;
361 }; 389 };
390
391 pmc: power@b00 {
392 compatible = "fsl,mpc8379-pmc", "fsl,mpc8349-pmc";
393 reg = <0xb00 0x100 0xa00 0x100>;
394 interrupts = <80 0x8>;
395 interrupt-parent = <&ipic>;
396 };
362 }; 397 };
363 398
364 pci0: pci@e0008500 { 399 pci0: pci@e0008500 {
@@ -413,6 +448,7 @@
413 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 448 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
414 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 449 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
415 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>; 450 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
451 sleep = <&pmc 0x00010000>;
416 clock-frequency = <0>; 452 clock-frequency = <0>;
417 #interrupt-cells = <1>; 453 #interrupt-cells = <1>;
418 #size-cells = <2>; 454 #size-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index 72cdc3c4c7e3..98ae95bd18f4 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -107,26 +107,72 @@
107 reg = <0x200 0x100>; 107 reg = <0x200 0x100>;
108 }; 108 };
109 109
110 i2c@3000 { 110 gpio1: gpio-controller@c00 {
111 #address-cells = <1>; 111 #gpio-cells = <2>;
112 #size-cells = <0>; 112 compatible = "fsl,mpc8379-gpio", "fsl,mpc8349-gpio";
113 cell-index = <0>; 113 reg = <0xc00 0x100>;
114 compatible = "fsl-i2c"; 114 interrupts = <74 0x8>;
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>; 115 interrupt-parent = <&ipic>;
118 dfsrr; 116 gpio-controller;
119 rtc@68 { 117 };
120 compatible = "dallas,ds1339"; 118
121 reg = <0x68>; 119 gpio2: gpio-controller@d00 {
120 #gpio-cells = <2>;
121 compatible = "fsl,mpc8379-gpio", "fsl,mpc8349-gpio";
122 reg = <0xd00 0x100>;
123 interrupts = <75 0x8>;
124 interrupt-parent = <&ipic>;
125 gpio-controller;
126 };
127
128 sleep-nexus {
129 #address-cells = <1>;
130 #size-cells = <1>;
131 compatible = "simple-bus";
132 sleep = <&pmc 0x0c000000>;
133 ranges;
134
135 i2c@3000 {
136 #address-cells = <1>;
137 #size-cells = <0>;
138 cell-index = <0>;
139 compatible = "fsl-i2c";
140 reg = <0x3000 0x100>;
141 interrupts = <14 0x8>;
142 interrupt-parent = <&ipic>;
143 dfsrr;
144
145 dtt@48 {
146 compatible = "national,lm75";
147 reg = <0x48>;
148 };
149
150 at24@50 {
151 compatible = "at24,24c256";
152 reg = <0x50>;
153 };
154
155 rtc@68 {
156 compatible = "dallas,ds1339";
157 reg = <0x68>;
158 };
159
160 mcu_pio: mcu@a {
161 #gpio-cells = <2>;
162 compatible = "fsl,mc9s08qg8-mpc8379erdb",
163 "fsl,mcu-mpc8349emitx";
164 reg = <0x0a>;
165 gpio-controller;
166 };
122 }; 167 };
123 168
124 mcu_pio: mcu@a { 169 sdhci@2e000 {
125 #gpio-cells = <2>; 170 compatible = "fsl,mpc8379-esdhc";
126 compatible = "fsl,mc9s08qg8-mpc8379erdb", 171 reg = <0x2e000 0x1000>;
127 "fsl,mcu-mpc8349emitx"; 172 interrupts = <42 0x8>;
128 reg = <0x0a>; 173 interrupt-parent = <&ipic>;
129 gpio-controller; 174 /* Filled in by U-Boot */
175 clock-frequency = <0>;
130 }; 176 };
131 }; 177 };
132 178
@@ -197,63 +243,76 @@
197 interrupt-parent = <&ipic>; 243 interrupt-parent = <&ipic>;
198 interrupts = <38 0x8>; 244 interrupts = <38 0x8>;
199 phy_type = "ulpi"; 245 phy_type = "ulpi";
200 }; 246 sleep = <&pmc 0x00c00000>;
201
202 mdio@24520 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,gianfar-mdio";
206 reg = <0x24520 0x20>;
207 phy2: ethernet-phy@2 {
208 interrupt-parent = <&ipic>;
209 interrupts = <17 0x8>;
210 reg = <0x2>;
211 device_type = "ethernet-phy";
212 };
213 tbi0: tbi-phy@11 {
214 reg = <0x11>;
215 device_type = "tbi-phy";
216 };
217 };
218
219 mdio@25520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-tbi";
223 reg = <0x25520 0x20>;
224
225 tbi1: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 }; 247 };
230 248
231 enet0: ethernet@24000 { 249 enet0: ethernet@24000 {
250 #address-cells = <1>;
251 #size-cells = <1>;
232 cell-index = <0>; 252 cell-index = <0>;
233 device_type = "network"; 253 device_type = "network";
234 model = "eTSEC"; 254 model = "eTSEC";
235 compatible = "gianfar"; 255 compatible = "gianfar";
236 reg = <0x24000 0x1000>; 256 reg = <0x24000 0x1000>;
257 ranges = <0x0 0x24000 0x1000>;
237 local-mac-address = [ 00 00 00 00 00 00 ]; 258 local-mac-address = [ 00 00 00 00 00 00 ];
238 interrupts = <32 0x8 33 0x8 34 0x8>; 259 interrupts = <32 0x8 33 0x8 34 0x8>;
239 phy-connection-type = "mii"; 260 phy-connection-type = "mii";
240 interrupt-parent = <&ipic>; 261 interrupt-parent = <&ipic>;
241 tbi-handle = <&tbi0>; 262 tbi-handle = <&tbi0>;
242 phy-handle = <&phy2>; 263 phy-handle = <&phy2>;
264 sleep = <&pmc 0xc0000000>;
265 fsl,magic-packet;
266
267 mdio@520 {
268 #address-cells = <1>;
269 #size-cells = <0>;
270 compatible = "fsl,gianfar-mdio";
271 reg = <0x520 0x20>;
272
273 phy2: ethernet-phy@2 {
274 interrupt-parent = <&ipic>;
275 interrupts = <17 0x8>;
276 reg = <0x2>;
277 device_type = "ethernet-phy";
278 };
279
280 tbi0: tbi-phy@11 {
281 reg = <0x11>;
282 device_type = "tbi-phy";
283 };
284 };
243 }; 285 };
244 286
245 enet1: ethernet@25000 { 287 enet1: ethernet@25000 {
288 #address-cells = <1>;
289 #size-cells = <1>;
246 cell-index = <1>; 290 cell-index = <1>;
247 device_type = "network"; 291 device_type = "network";
248 model = "eTSEC"; 292 model = "eTSEC";
249 compatible = "gianfar"; 293 compatible = "gianfar";
250 reg = <0x25000 0x1000>; 294 reg = <0x25000 0x1000>;
295 ranges = <0x0 0x25000 0x1000>;
251 local-mac-address = [ 00 00 00 00 00 00 ]; 296 local-mac-address = [ 00 00 00 00 00 00 ];
252 interrupts = <35 0x8 36 0x8 37 0x8>; 297 interrupts = <35 0x8 36 0x8 37 0x8>;
253 phy-connection-type = "mii"; 298 phy-connection-type = "mii";
254 interrupt-parent = <&ipic>; 299 interrupt-parent = <&ipic>;
255 fixed-link = <1 1 1000 0 0>; 300 fixed-link = <1 1 1000 0 0>;
256 tbi-handle = <&tbi1>; 301 tbi-handle = <&tbi1>;
302 sleep = <&pmc 0x30000000>;
303 fsl,magic-packet;
304
305 mdio@520 {
306 #address-cells = <1>;
307 #size-cells = <0>;
308 compatible = "fsl,gianfar-tbi";
309 reg = <0x520 0x20>;
310
311 tbi1: tbi-phy@11 {
312 reg = <0x11>;
313 device_type = "tbi-phy";
314 };
315 };
257 }; 316 };
258 317
259 serial0: serial@4500 { 318 serial0: serial@4500 {
@@ -286,6 +345,7 @@
286 fsl,channel-fifo-len = <24>; 345 fsl,channel-fifo-len = <24>;
287 fsl,exec-units-mask = <0x9fe>; 346 fsl,exec-units-mask = <0x9fe>;
288 fsl,descriptor-types-mask = <0x3ab0ebf>; 347 fsl,descriptor-types-mask = <0x3ab0ebf>;
348 sleep = <&pmc 0x03000000>;
289 }; 349 };
290 350
291 sata@18000 { 351 sata@18000 {
@@ -293,6 +353,7 @@
293 reg = <0x18000 0x1000>; 353 reg = <0x18000 0x1000>;
294 interrupts = <44 0x8>; 354 interrupts = <44 0x8>;
295 interrupt-parent = <&ipic>; 355 interrupt-parent = <&ipic>;
356 sleep = <&pmc 0x000000c0>;
296 }; 357 };
297 358
298 sata@19000 { 359 sata@19000 {
@@ -300,6 +361,7 @@
300 reg = <0x19000 0x1000>; 361 reg = <0x19000 0x1000>;
301 interrupts = <45 0x8>; 362 interrupts = <45 0x8>;
302 interrupt-parent = <&ipic>; 363 interrupt-parent = <&ipic>;
364 sleep = <&pmc 0x00000030>;
303 }; 365 };
304 366
305 sata@1a000 { 367 sata@1a000 {
@@ -307,6 +369,7 @@
307 reg = <0x1a000 0x1000>; 369 reg = <0x1a000 0x1000>;
308 interrupts = <46 0x8>; 370 interrupts = <46 0x8>;
309 interrupt-parent = <&ipic>; 371 interrupt-parent = <&ipic>;
372 sleep = <&pmc 0x0000000c>;
310 }; 373 };
311 374
312 sata@1b000 { 375 sata@1b000 {
@@ -314,6 +377,7 @@
314 reg = <0x1b000 0x1000>; 377 reg = <0x1b000 0x1000>;
315 interrupts = <47 0x8>; 378 interrupts = <47 0x8>;
316 interrupt-parent = <&ipic>; 379 interrupt-parent = <&ipic>;
380 sleep = <&pmc 0x00000003>;
317 }; 381 };
318 382
319 /* IPIC 383 /* IPIC
@@ -329,6 +393,13 @@
329 #interrupt-cells = <2>; 393 #interrupt-cells = <2>;
330 reg = <0x700 0x100>; 394 reg = <0x700 0x100>;
331 }; 395 };
396
397 pmc: power@b00 {
398 compatible = "fsl,mpc8379-pmc", "fsl,mpc8349-pmc";
399 reg = <0xb00 0x100 0xa00 0x100>;
400 interrupts = <80 0x8>;
401 interrupt-parent = <&ipic>;
402 };
332 }; 403 };
333 404
334 pci0: pci@e0008500 { 405 pci0: pci@e0008500 {
@@ -354,6 +425,7 @@
354 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 425 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
355 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 426 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
356 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 427 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
428 sleep = <&pmc 0x00010000>;
357 clock-frequency = <66666666>; 429 clock-frequency = <66666666>;
358 #interrupt-cells = <1>; 430 #interrupt-cells = <1>;
359 #size-cells = <2>; 431 #size-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts
index 3c905df1812c..b31c5041350b 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/mpc8536ds.dts
@@ -137,42 +137,6 @@
137 }; 137 };
138 }; 138 };
139 139
140 mdio@24520 {
141 #address-cells = <1>;
142 #size-cells = <0>;
143 compatible = "fsl,gianfar-mdio";
144 reg = <0x24520 0x20>;
145
146 phy0: ethernet-phy@0 {
147 interrupt-parent = <&mpic>;
148 interrupts = <10 0x1>;
149 reg = <0>;
150 device_type = "ethernet-phy";
151 };
152 phy1: ethernet-phy@1 {
153 interrupt-parent = <&mpic>;
154 interrupts = <10 0x1>;
155 reg = <1>;
156 device_type = "ethernet-phy";
157 };
158 tbi0: tbi-phy@11 {
159 reg = <0x11>;
160 device_type = "tbi-phy";
161 };
162 };
163
164 mdio@26520 {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 compatible = "fsl,gianfar-tbi";
168 reg = <0x26520 0x20>;
169
170 tbi1: tbi-phy@11 {
171 reg = <0x11>;
172 device_type = "tbi-phy";
173 };
174 };
175
176 usb@22000 { 140 usb@22000 {
177 compatible = "fsl,mpc8536-usb2-mph", "fsl-usb2-mph"; 141 compatible = "fsl,mpc8536-usb2-mph", "fsl-usb2-mph";
178 reg = <0x22000 0x1000>; 142 reg = <0x22000 0x1000>;
@@ -194,31 +158,73 @@
194 }; 158 };
195 159
196 enet0: ethernet@24000 { 160 enet0: ethernet@24000 {
161 #address-cells = <1>;
162 #size-cells = <1>;
197 cell-index = <0>; 163 cell-index = <0>;
198 device_type = "network"; 164 device_type = "network";
199 model = "eTSEC"; 165 model = "eTSEC";
200 compatible = "gianfar"; 166 compatible = "gianfar";
201 reg = <0x24000 0x1000>; 167 reg = <0x24000 0x1000>;
168 ranges = <0x0 0x24000 0x1000>;
202 local-mac-address = [ 00 00 00 00 00 00 ]; 169 local-mac-address = [ 00 00 00 00 00 00 ];
203 interrupts = <29 2 30 2 34 2>; 170 interrupts = <29 2 30 2 34 2>;
204 interrupt-parent = <&mpic>; 171 interrupt-parent = <&mpic>;
205 tbi-handle = <&tbi0>; 172 tbi-handle = <&tbi0>;
206 phy-handle = <&phy1>; 173 phy-handle = <&phy1>;
207 phy-connection-type = "rgmii-id"; 174 phy-connection-type = "rgmii-id";
175
176 mdio@520 {
177 #address-cells = <1>;
178 #size-cells = <0>;
179 compatible = "fsl,gianfar-mdio";
180 reg = <0x520 0x20>;
181
182 phy0: ethernet-phy@0 {
183 interrupt-parent = <&mpic>;
184 interrupts = <10 0x1>;
185 reg = <0>;
186 device_type = "ethernet-phy";
187 };
188 phy1: ethernet-phy@1 {
189 interrupt-parent = <&mpic>;
190 interrupts = <10 0x1>;
191 reg = <1>;
192 device_type = "ethernet-phy";
193 };
194 tbi0: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
208 }; 199 };
209 200
210 enet1: ethernet@26000 { 201 enet1: ethernet@26000 {
202 #address-cells = <1>;
203 #size-cells = <1>;
211 cell-index = <1>; 204 cell-index = <1>;
212 device_type = "network"; 205 device_type = "network";
213 model = "eTSEC"; 206 model = "eTSEC";
214 compatible = "gianfar"; 207 compatible = "gianfar";
215 reg = <0x26000 0x1000>; 208 reg = <0x26000 0x1000>;
209 ranges = <0x0 0x26000 0x1000>;
216 local-mac-address = [ 00 00 00 00 00 00 ]; 210 local-mac-address = [ 00 00 00 00 00 00 ];
217 interrupts = <31 2 32 2 33 2>; 211 interrupts = <31 2 32 2 33 2>;
218 interrupt-parent = <&mpic>; 212 interrupt-parent = <&mpic>;
219 tbi-handle = <&tbi1>; 213 tbi-handle = <&tbi1>;
220 phy-handle = <&phy0>; 214 phy-handle = <&phy0>;
221 phy-connection-type = "rgmii-id"; 215 phy-connection-type = "rgmii-id";
216
217 mdio@520 {
218 #address-cells = <1>;
219 #size-cells = <0>;
220 compatible = "fsl,gianfar-tbi";
221 reg = <0x520 0x20>;
222
223 tbi1: tbi-phy@11 {
224 reg = <0x11>;
225 device_type = "tbi-phy";
226 };
227 };
222 }; 228 };
223 229
224 usb@2b000 { 230 usb@2b000 {
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 79570ffe41b9..ddd67be10b03 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -126,97 +126,106 @@
126 }; 126 };
127 }; 127 };
128 128
129 mdio@24520 {
130 #address-cells = <1>;
131 #size-cells = <0>;
132 compatible = "fsl,gianfar-mdio";
133 reg = <0x24520 0x20>;
134
135 phy0: ethernet-phy@0 {
136 interrupt-parent = <&mpic>;
137 interrupts = <5 1>;
138 reg = <0x0>;
139 device_type = "ethernet-phy";
140 };
141 phy1: ethernet-phy@1 {
142 interrupt-parent = <&mpic>;
143 interrupts = <5 1>;
144 reg = <0x1>;
145 device_type = "ethernet-phy";
146 };
147 phy3: ethernet-phy@3 {
148 interrupt-parent = <&mpic>;
149 interrupts = <7 1>;
150 reg = <0x3>;
151 device_type = "ethernet-phy";
152 };
153 tbi0: tbi-phy@11 {
154 reg = <0x11>;
155 device_type = "tbi-phy";
156 };
157 };
158
159 mdio@25520 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 compatible = "fsl,gianfar-tbi";
163 reg = <0x25520 0x20>;
164
165 tbi1: tbi-phy@11 {
166 reg = <0x11>;
167 device_type = "tbi-phy";
168 };
169 };
170
171 mdio@26520 {
172 #address-cells = <1>;
173 #size-cells = <0>;
174 compatible = "fsl,gianfar-tbi";
175 reg = <0x26520 0x20>;
176
177 tbi2: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
181 };
182
183 enet0: ethernet@24000 { 129 enet0: ethernet@24000 {
130 #address-cells = <1>;
131 #size-cells = <1>;
184 cell-index = <0>; 132 cell-index = <0>;
185 device_type = "network"; 133 device_type = "network";
186 model = "TSEC"; 134 model = "TSEC";
187 compatible = "gianfar"; 135 compatible = "gianfar";
188 reg = <0x24000 0x1000>; 136 reg = <0x24000 0x1000>;
137 ranges = <0x0 0x24000 0x1000>;
189 local-mac-address = [ 00 00 00 00 00 00 ]; 138 local-mac-address = [ 00 00 00 00 00 00 ];
190 interrupts = <29 2 30 2 34 2>; 139 interrupts = <29 2 30 2 34 2>;
191 interrupt-parent = <&mpic>; 140 interrupt-parent = <&mpic>;
192 tbi-handle = <&tbi0>; 141 tbi-handle = <&tbi0>;
193 phy-handle = <&phy0>; 142 phy-handle = <&phy0>;
143
144 mdio@520 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 compatible = "fsl,gianfar-mdio";
148 reg = <0x520 0x20>;
149
150 phy0: ethernet-phy@0 {
151 interrupt-parent = <&mpic>;
152 interrupts = <5 1>;
153 reg = <0x0>;
154 device_type = "ethernet-phy";
155 };
156 phy1: ethernet-phy@1 {
157 interrupt-parent = <&mpic>;
158 interrupts = <5 1>;
159 reg = <0x1>;
160 device_type = "ethernet-phy";
161 };
162 phy3: ethernet-phy@3 {
163 interrupt-parent = <&mpic>;
164 interrupts = <7 1>;
165 reg = <0x3>;
166 device_type = "ethernet-phy";
167 };
168 tbi0: tbi-phy@11 {
169 reg = <0x11>;
170 device_type = "tbi-phy";
171 };
172 };
194 }; 173 };
195 174
196 enet1: ethernet@25000 { 175 enet1: ethernet@25000 {
176 #address-cells = <1>;
177 #size-cells = <1>;
197 cell-index = <1>; 178 cell-index = <1>;
198 device_type = "network"; 179 device_type = "network";
199 model = "TSEC"; 180 model = "TSEC";
200 compatible = "gianfar"; 181 compatible = "gianfar";
201 reg = <0x25000 0x1000>; 182 reg = <0x25000 0x1000>;
183 ranges = <0x0 0x25000 0x1000>;
202 local-mac-address = [ 00 00 00 00 00 00 ]; 184 local-mac-address = [ 00 00 00 00 00 00 ];
203 interrupts = <35 2 36 2 40 2>; 185 interrupts = <35 2 36 2 40 2>;
204 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
205 tbi-handle = <&tbi1>; 187 tbi-handle = <&tbi1>;
206 phy-handle = <&phy1>; 188 phy-handle = <&phy1>;
189
190 mdio@520 {
191 #address-cells = <1>;
192 #size-cells = <0>;
193 compatible = "fsl,gianfar-tbi";
194 reg = <0x520 0x20>;
195
196 tbi1: tbi-phy@11 {
197 reg = <0x11>;
198 device_type = "tbi-phy";
199 };
200 };
207 }; 201 };
208 202
209 enet2: ethernet@26000 { 203 enet2: ethernet@26000 {
204 #address-cells = <1>;
205 #size-cells = <1>;
210 cell-index = <2>; 206 cell-index = <2>;
211 device_type = "network"; 207 device_type = "network";
212 model = "FEC"; 208 model = "FEC";
213 compatible = "gianfar"; 209 compatible = "gianfar";
214 reg = <0x26000 0x1000>; 210 reg = <0x26000 0x1000>;
211 ranges = <0x0 0x26000 0x1000>;
215 local-mac-address = [ 00 00 00 00 00 00 ]; 212 local-mac-address = [ 00 00 00 00 00 00 ];
216 interrupts = <41 2>; 213 interrupts = <41 2>;
217 interrupt-parent = <&mpic>; 214 interrupt-parent = <&mpic>;
218 tbi-handle = <&tbi2>; 215 tbi-handle = <&tbi2>;
219 phy-handle = <&phy3>; 216 phy-handle = <&phy3>;
217
218 mdio@520 {
219 #address-cells = <1>;
220 #size-cells = <0>;
221 compatible = "fsl,gianfar-tbi";
222 reg = <0x520 0x20>;
223
224 tbi2: tbi-phy@11 {
225 reg = <0x11>;
226 device_type = "tbi-phy";
227 };
228 };
220 }; 229 };
221 230
222 serial0: serial@4500 { 231 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 221036a8ce23..e45097f44fbd 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -126,66 +126,72 @@
126 }; 126 };
127 }; 127 };
128 128
129 mdio@24520 {
130 #address-cells = <1>;
131 #size-cells = <0>;
132 compatible = "fsl,gianfar-mdio";
133 reg = <0x24520 0x20>;
134
135 phy0: ethernet-phy@0 {
136 interrupt-parent = <&mpic>;
137 interrupts = <5 1>;
138 reg = <0x0>;
139 device_type = "ethernet-phy";
140 };
141 phy1: ethernet-phy@1 {
142 interrupt-parent = <&mpic>;
143 interrupts = <5 1>;
144 reg = <0x1>;
145 device_type = "ethernet-phy";
146 };
147 tbi0: tbi-phy@11 {
148 reg = <0x11>;
149 device_type = "tbi-phy";
150 };
151 };
152
153 mdio@25520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-tbi";
157 reg = <0x25520 0x20>;
158
159 tbi1: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
163 };
164
165 enet0: ethernet@24000 { 129 enet0: ethernet@24000 {
130 #address-cells = <1>;
131 #size-cells = <1>;
166 cell-index = <0>; 132 cell-index = <0>;
167 device_type = "network"; 133 device_type = "network";
168 model = "TSEC"; 134 model = "TSEC";
169 compatible = "gianfar"; 135 compatible = "gianfar";
170 reg = <0x24000 0x1000>; 136 reg = <0x24000 0x1000>;
137 ranges = <0x0 0x24000 0x1000>;
171 local-mac-address = [ 00 00 00 00 00 00 ]; 138 local-mac-address = [ 00 00 00 00 00 00 ];
172 interrupts = <29 2 30 2 34 2>; 139 interrupts = <29 2 30 2 34 2>;
173 interrupt-parent = <&mpic>; 140 interrupt-parent = <&mpic>;
174 tbi-handle = <&tbi0>; 141 tbi-handle = <&tbi0>;
175 phy-handle = <&phy0>; 142 phy-handle = <&phy0>;
143
144 mdio@520 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 compatible = "fsl,gianfar-mdio";
148 reg = <0x520 0x20>;
149
150 phy0: ethernet-phy@0 {
151 interrupt-parent = <&mpic>;
152 interrupts = <5 1>;
153 reg = <0x0>;
154 device_type = "ethernet-phy";
155 };
156 phy1: ethernet-phy@1 {
157 interrupt-parent = <&mpic>;
158 interrupts = <5 1>;
159 reg = <0x1>;
160 device_type = "ethernet-phy";
161 };
162 tbi0: tbi-phy@11 {
163 reg = <0x11>;
164 device_type = "tbi-phy";
165 };
166 };
176 }; 167 };
177 168
178 enet1: ethernet@25000 { 169 enet1: ethernet@25000 {
170 #address-cells = <1>;
171 #size-cells = <1>;
179 cell-index = <1>; 172 cell-index = <1>;
180 device_type = "network"; 173 device_type = "network";
181 model = "TSEC"; 174 model = "TSEC";
182 compatible = "gianfar"; 175 compatible = "gianfar";
183 reg = <0x25000 0x1000>; 176 reg = <0x25000 0x1000>;
177 ranges = <0x0 0x25000 0x1000>;
184 local-mac-address = [ 00 00 00 00 00 00 ]; 178 local-mac-address = [ 00 00 00 00 00 00 ];
185 interrupts = <35 2 36 2 40 2>; 179 interrupts = <35 2 36 2 40 2>;
186 interrupt-parent = <&mpic>; 180 interrupt-parent = <&mpic>;
187 tbi-handle = <&tbi1>; 181 tbi-handle = <&tbi1>;
188 phy-handle = <&phy1>; 182 phy-handle = <&phy1>;
183
184 mdio@520 {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "fsl,gianfar-tbi";
188 reg = <0x520 0x20>;
189
190 tbi1: tbi-phy@11 {
191 reg = <0x11>;
192 device_type = "tbi-phy";
193 };
194 };
189 }; 195 };
190 196
191 serial0: serial@4500 { 197 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 0668d1048779..7c6932be0197 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -98,44 +98,6 @@
98 dfsrr; 98 dfsrr;
99 }; 99 };
100 100
101 mdio@24520 {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 compatible = "fsl,gianfar-mdio";
105 reg = <0x24520 0x20>;
106
107 phy0: ethernet-phy@0 {
108 interrupt-parent = <&mpic>;
109 interrupts = <10 1>;
110 reg = <0x0>;
111 device_type = "ethernet-phy";
112 };
113 phy1: ethernet-phy@1 {
114 interrupt-parent = <&mpic>;
115 interrupts = <10 1>;
116 reg = <0x1>;
117 device_type = "ethernet-phy";
118 };
119
120 tbi0: tbi-phy@11 {
121 reg = <0x11>;
122 device_type = "tbi-phy";
123 };
124 };
125
126 mdio@26520 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 compatible = "fsl,gianfar-tbi";
130 reg = <0x26520 0x20>;
131
132 tbi1: tbi-phy@11 {
133 reg = <0x11>;
134 device_type = "tbi-phy";
135 };
136 };
137
138
139 dma@21300 { 101 dma@21300 {
140 #address-cells = <1>; 102 #address-cells = <1>;
141 #size-cells = <1>; 103 #size-cells = <1>;
@@ -178,31 +140,74 @@
178 }; 140 };
179 141
180 enet0: ethernet@24000 { 142 enet0: ethernet@24000 {
143 #address-cells = <1>;
144 #size-cells = <1>;
181 cell-index = <0>; 145 cell-index = <0>;
182 device_type = "network"; 146 device_type = "network";
183 model = "TSEC"; 147 model = "TSEC";
184 compatible = "gianfar"; 148 compatible = "gianfar";
185 reg = <0x24000 0x1000>; 149 reg = <0x24000 0x1000>;
150 ranges = <0x0 0x24000 0x1000>;
186 local-mac-address = [ 00 00 00 00 00 00 ]; 151 local-mac-address = [ 00 00 00 00 00 00 ];
187 interrupts = <29 2 30 2 34 2>; 152 interrupts = <29 2 30 2 34 2>;
188 interrupt-parent = <&mpic>; 153 interrupt-parent = <&mpic>;
189 phy-handle = <&phy0>; 154 phy-handle = <&phy0>;
190 tbi-handle = <&tbi0>; 155 tbi-handle = <&tbi0>;
191 phy-connection-type = "rgmii-id"; 156 phy-connection-type = "rgmii-id";
157
158 mdio@520 {
159 #address-cells = <1>;
160 #size-cells = <0>;
161 compatible = "fsl,gianfar-mdio";
162 reg = <0x520 0x20>;
163
164 phy0: ethernet-phy@0 {
165 interrupt-parent = <&mpic>;
166 interrupts = <10 1>;
167 reg = <0x0>;
168 device_type = "ethernet-phy";
169 };
170 phy1: ethernet-phy@1 {
171 interrupt-parent = <&mpic>;
172 interrupts = <10 1>;
173 reg = <0x1>;
174 device_type = "ethernet-phy";
175 };
176
177 tbi0: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
181 };
192 }; 182 };
193 183
194 enet1: ethernet@26000 { 184 enet1: ethernet@26000 {
185 #address-cells = <1>;
186 #size-cells = <1>;
195 cell-index = <1>; 187 cell-index = <1>;
196 device_type = "network"; 188 device_type = "network";
197 model = "TSEC"; 189 model = "TSEC";
198 compatible = "gianfar"; 190 compatible = "gianfar";
199 reg = <0x26000 0x1000>; 191 reg = <0x26000 0x1000>;
192 ranges = <0x0 0x26000 0x1000>;
200 local-mac-address = [ 00 00 00 00 00 00 ]; 193 local-mac-address = [ 00 00 00 00 00 00 ];
201 interrupts = <31 2 32 2 33 2>; 194 interrupts = <31 2 32 2 33 2>;
202 interrupt-parent = <&mpic>; 195 interrupt-parent = <&mpic>;
203 phy-handle = <&phy1>; 196 phy-handle = <&phy1>;
204 tbi-handle = <&tbi1>; 197 tbi-handle = <&tbi1>;
205 phy-connection-type = "rgmii-id"; 198 phy-connection-type = "rgmii-id";
199
200 mdio@520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-tbi";
204 reg = <0x520 0x20>;
205
206 tbi1: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
206 }; 211 };
207 212
208 serial0: serial@4500 { 213 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index df774a7088ff..804e90353293 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -142,129 +142,141 @@
142 }; 142 };
143 }; 143 };
144 144
145 mdio@24520 {
146 #address-cells = <1>;
147 #size-cells = <0>;
148 compatible = "fsl,gianfar-mdio";
149 reg = <0x24520 0x20>;
150
151 phy0: ethernet-phy@0 {
152 interrupt-parent = <&mpic>;
153 interrupts = <5 1>;
154 reg = <0x0>;
155 device_type = "ethernet-phy";
156 };
157 phy1: ethernet-phy@1 {
158 interrupt-parent = <&mpic>;
159 interrupts = <5 1>;
160 reg = <0x1>;
161 device_type = "ethernet-phy";
162 };
163 phy2: ethernet-phy@2 {
164 interrupt-parent = <&mpic>;
165 interrupts = <5 1>;
166 reg = <0x2>;
167 device_type = "ethernet-phy";
168 };
169 phy3: ethernet-phy@3 {
170 interrupt-parent = <&mpic>;
171 interrupts = <5 1>;
172 reg = <0x3>;
173 device_type = "ethernet-phy";
174 };
175 tbi0: tbi-phy@11 {
176 reg = <0x11>;
177 device_type = "tbi-phy";
178 };
179 };
180
181 mdio@25520 {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 compatible = "fsl,gianfar-tbi";
185 reg = <0x25520 0x20>;
186
187 tbi1: tbi-phy@11 {
188 reg = <0x11>;
189 device_type = "tbi-phy";
190 };
191 };
192
193 mdio@26520 {
194 #address-cells = <1>;
195 #size-cells = <0>;
196 compatible = "fsl,gianfar-tbi";
197 reg = <0x26520 0x20>;
198
199 tbi2: tbi-phy@11 {
200 reg = <0x11>;
201 device_type = "tbi-phy";
202 };
203 };
204
205 mdio@27520 {
206 #address-cells = <1>;
207 #size-cells = <0>;
208 compatible = "fsl,gianfar-tbi";
209 reg = <0x27520 0x20>;
210
211 tbi3: tbi-phy@11 {
212 reg = <0x11>;
213 device_type = "tbi-phy";
214 };
215 };
216
217 enet0: ethernet@24000 { 145 enet0: ethernet@24000 {
146 #address-cells = <1>;
147 #size-cells = <1>;
218 cell-index = <0>; 148 cell-index = <0>;
219 device_type = "network"; 149 device_type = "network";
220 model = "eTSEC"; 150 model = "eTSEC";
221 compatible = "gianfar"; 151 compatible = "gianfar";
222 reg = <0x24000 0x1000>; 152 reg = <0x24000 0x1000>;
153 ranges = <0x0 0x24000 0x1000>;
223 local-mac-address = [ 00 00 00 00 00 00 ]; 154 local-mac-address = [ 00 00 00 00 00 00 ];
224 interrupts = <29 2 30 2 34 2>; 155 interrupts = <29 2 30 2 34 2>;
225 interrupt-parent = <&mpic>; 156 interrupt-parent = <&mpic>;
226 tbi-handle = <&tbi0>; 157 tbi-handle = <&tbi0>;
227 phy-handle = <&phy0>; 158 phy-handle = <&phy0>;
159
160 mdio@520 {
161 #address-cells = <1>;
162 #size-cells = <0>;
163 compatible = "fsl,gianfar-mdio";
164 reg = <0x520 0x20>;
165
166 phy0: ethernet-phy@0 {
167 interrupt-parent = <&mpic>;
168 interrupts = <5 1>;
169 reg = <0x0>;
170 device_type = "ethernet-phy";
171 };
172 phy1: ethernet-phy@1 {
173 interrupt-parent = <&mpic>;
174 interrupts = <5 1>;
175 reg = <0x1>;
176 device_type = "ethernet-phy";
177 };
178 phy2: ethernet-phy@2 {
179 interrupt-parent = <&mpic>;
180 interrupts = <5 1>;
181 reg = <0x2>;
182 device_type = "ethernet-phy";
183 };
184 phy3: ethernet-phy@3 {
185 interrupt-parent = <&mpic>;
186 interrupts = <5 1>;
187 reg = <0x3>;
188 device_type = "ethernet-phy";
189 };
190 tbi0: tbi-phy@11 {
191 reg = <0x11>;
192 device_type = "tbi-phy";
193 };
194 };
228 }; 195 };
229 196
230 enet1: ethernet@25000 { 197 enet1: ethernet@25000 {
198 #address-cells = <1>;
199 #size-cells = <1>;
231 cell-index = <1>; 200 cell-index = <1>;
232 device_type = "network"; 201 device_type = "network";
233 model = "eTSEC"; 202 model = "eTSEC";
234 compatible = "gianfar"; 203 compatible = "gianfar";
235 reg = <0x25000 0x1000>; 204 reg = <0x25000 0x1000>;
205 ranges = <0x0 0x25000 0x1000>;
236 local-mac-address = [ 00 00 00 00 00 00 ]; 206 local-mac-address = [ 00 00 00 00 00 00 ];
237 interrupts = <35 2 36 2 40 2>; 207 interrupts = <35 2 36 2 40 2>;
238 interrupt-parent = <&mpic>; 208 interrupt-parent = <&mpic>;
239 tbi-handle = <&tbi1>; 209 tbi-handle = <&tbi1>;
240 phy-handle = <&phy1>; 210 phy-handle = <&phy1>;
211
212 mdio@520 {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 compatible = "fsl,gianfar-tbi";
216 reg = <0x520 0x20>;
217
218 tbi1: tbi-phy@11 {
219 reg = <0x11>;
220 device_type = "tbi-phy";
221 };
222 };
241 }; 223 };
242 224
243/* eTSEC 3/4 are currently broken 225/* eTSEC 3/4 are currently broken
244 enet2: ethernet@26000 { 226 enet2: ethernet@26000 {
227 #address-cells = <1>;
228 #size-cells = <1>;
245 cell-index = <2>; 229 cell-index = <2>;
246 device_type = "network"; 230 device_type = "network";
247 model = "eTSEC"; 231 model = "eTSEC";
248 compatible = "gianfar"; 232 compatible = "gianfar";
249 reg = <0x26000 0x1000>; 233 reg = <0x26000 0x1000>;
234 ranges = <0x0 0x26000 0x1000>;
250 local-mac-address = [ 00 00 00 00 00 00 ]; 235 local-mac-address = [ 00 00 00 00 00 00 ];
251 interrupts = <31 2 32 2 33 2>; 236 interrupts = <31 2 32 2 33 2>;
252 interrupt-parent = <&mpic>; 237 interrupt-parent = <&mpic>;
253 tbi-handle = <&tbi2>; 238 tbi-handle = <&tbi2>;
254 phy-handle = <&phy2>; 239 phy-handle = <&phy2>;
240
241 mdio@520 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,gianfar-tbi";
245 reg = <0x520 0x20>;
246
247 tbi2: tbi-phy@11 {
248 reg = <0x11>;
249 device_type = "tbi-phy";
250 };
251 };
255 }; 252 };
256 253
257 enet3: ethernet@27000 { 254 enet3: ethernet@27000 {
255 #address-cells = <1>;
256 #size-cells = <1>;
258 cell-index = <3>; 257 cell-index = <3>;
259 device_type = "network"; 258 device_type = "network";
260 model = "eTSEC"; 259 model = "eTSEC";
261 compatible = "gianfar"; 260 compatible = "gianfar";
262 reg = <0x27000 0x1000>; 261 reg = <0x27000 0x1000>;
262 ranges = <0x0 0x27000 0x1000>;
263 local-mac-address = [ 00 00 00 00 00 00 ]; 263 local-mac-address = [ 00 00 00 00 00 00 ];
264 interrupts = <37 2 38 2 39 2>; 264 interrupts = <37 2 38 2 39 2>;
265 interrupt-parent = <&mpic>; 265 interrupt-parent = <&mpic>;
266 tbi-handle = <&tbi3>; 266 tbi-handle = <&tbi3>;
267 phy-handle = <&phy3>; 267 phy-handle = <&phy3>;
268
269 mdio@520 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 compatible = "fsl,gianfar-tbi";
273 reg = <0x520 0x20>;
274
275 tbi3: tbi-phy@11 {
276 reg = <0x11>;
277 device_type = "tbi-phy";
278 };
279 };
268 }; 280 };
269 */ 281 */
270 282
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 053b01e1c93b..9484f0729b10 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -126,66 +126,72 @@
126 }; 126 };
127 }; 127 };
128 128
129 mdio@24520 {
130 #address-cells = <1>;
131 #size-cells = <0>;
132 compatible = "fsl,gianfar-mdio";
133 reg = <0x24520 0x20>;
134
135 phy0: ethernet-phy@0 {
136 interrupt-parent = <&mpic>;
137 interrupts = <5 1>;
138 reg = <0x0>;
139 device_type = "ethernet-phy";
140 };
141 phy1: ethernet-phy@1 {
142 interrupt-parent = <&mpic>;
143 interrupts = <5 1>;
144 reg = <0x1>;
145 device_type = "ethernet-phy";
146 };
147 tbi0: tbi-phy@11 {
148 reg = <0x11>;
149 device_type = "tbi-phy";
150 };
151 };
152
153 mdio@25520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-tbi";
157 reg = <0x25520 0x20>;
158
159 tbi1: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
163 };
164
165 enet0: ethernet@24000 { 129 enet0: ethernet@24000 {
130 #address-cells = <1>;
131 #size-cells = <1>;
166 cell-index = <0>; 132 cell-index = <0>;
167 device_type = "network"; 133 device_type = "network";
168 model = "TSEC"; 134 model = "TSEC";
169 compatible = "gianfar"; 135 compatible = "gianfar";
170 reg = <0x24000 0x1000>; 136 reg = <0x24000 0x1000>;
137 ranges = <0x0 0x24000 0x1000>;
171 local-mac-address = [ 00 00 00 00 00 00 ]; 138 local-mac-address = [ 00 00 00 00 00 00 ];
172 interrupts = <29 2 30 2 34 2>; 139 interrupts = <29 2 30 2 34 2>;
173 interrupt-parent = <&mpic>; 140 interrupt-parent = <&mpic>;
174 tbi-handle = <&tbi0>; 141 tbi-handle = <&tbi0>;
175 phy-handle = <&phy0>; 142 phy-handle = <&phy0>;
143
144 mdio@520 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 compatible = "fsl,gianfar-mdio";
148 reg = <0x520 0x20>;
149
150 phy0: ethernet-phy@0 {
151 interrupt-parent = <&mpic>;
152 interrupts = <5 1>;
153 reg = <0x0>;
154 device_type = "ethernet-phy";
155 };
156 phy1: ethernet-phy@1 {
157 interrupt-parent = <&mpic>;
158 interrupts = <5 1>;
159 reg = <0x1>;
160 device_type = "ethernet-phy";
161 };
162 tbi0: tbi-phy@11 {
163 reg = <0x11>;
164 device_type = "tbi-phy";
165 };
166 };
176 }; 167 };
177 168
178 enet1: ethernet@25000 { 169 enet1: ethernet@25000 {
170 #address-cells = <1>;
171 #size-cells = <1>;
179 cell-index = <1>; 172 cell-index = <1>;
180 device_type = "network"; 173 device_type = "network";
181 model = "TSEC"; 174 model = "TSEC";
182 compatible = "gianfar"; 175 compatible = "gianfar";
183 reg = <0x25000 0x1000>; 176 reg = <0x25000 0x1000>;
177 ranges = <0x0 0x25000 0x1000>;
184 local-mac-address = [ 00 00 00 00 00 00 ]; 178 local-mac-address = [ 00 00 00 00 00 00 ];
185 interrupts = <35 2 36 2 40 2>; 179 interrupts = <35 2 36 2 40 2>;
186 interrupt-parent = <&mpic>; 180 interrupt-parent = <&mpic>;
187 tbi-handle = <&tbi1>; 181 tbi-handle = <&tbi1>;
188 phy-handle = <&phy1>; 182 phy-handle = <&phy1>;
183
184 mdio@520 {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "fsl,gianfar-tbi";
188 reg = <0x520 0x20>;
189
190 tbi1: tbi-phy@11 {
191 reg = <0x11>;
192 device_type = "tbi-phy";
193 };
194 };
189 }; 195 };
190 196
191 serial0: serial@4500 { 197 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 11b1bcbe14ce..cc2acf87d02f 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -115,78 +115,84 @@
115 }; 115 };
116 }; 116 };
117 117
118 mdio@24520 {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 compatible = "fsl,gianfar-mdio";
122 reg = <0x24520 0x20>;
123
124 phy0: ethernet-phy@0 {
125 interrupt-parent = <&mpic>;
126 interrupts = <5 1>;
127 reg = <0x0>;
128 device_type = "ethernet-phy";
129 };
130 phy1: ethernet-phy@1 {
131 interrupt-parent = <&mpic>;
132 interrupts = <5 1>;
133 reg = <0x1>;
134 device_type = "ethernet-phy";
135 };
136 phy2: ethernet-phy@2 {
137 interrupt-parent = <&mpic>;
138 interrupts = <7 1>;
139 reg = <0x2>;
140 device_type = "ethernet-phy";
141 };
142 phy3: ethernet-phy@3 {
143 interrupt-parent = <&mpic>;
144 interrupts = <7 1>;
145 reg = <0x3>;
146 device_type = "ethernet-phy";
147 };
148 tbi0: tbi-phy@11 {
149 reg = <0x11>;
150 device_type = "tbi-phy";
151 };
152 };
153
154 mdio@25520 {
155 #address-cells = <1>;
156 #size-cells = <0>;
157 compatible = "fsl,gianfar-tbi";
158 reg = <0x25520 0x20>;
159
160 tbi1: tbi-phy@11 {
161 reg = <0x11>;
162 device_type = "tbi-phy";
163 };
164 };
165
166 enet0: ethernet@24000 { 118 enet0: ethernet@24000 {
119 #address-cells = <1>;
120 #size-cells = <1>;
167 cell-index = <0>; 121 cell-index = <0>;
168 device_type = "network"; 122 device_type = "network";
169 model = "TSEC"; 123 model = "TSEC";
170 compatible = "gianfar"; 124 compatible = "gianfar";
171 reg = <0x24000 0x1000>; 125 reg = <0x24000 0x1000>;
126 ranges = <0x0 0x24000 0x1000>;
172 local-mac-address = [ 00 00 00 00 00 00 ]; 127 local-mac-address = [ 00 00 00 00 00 00 ];
173 interrupts = <29 2 30 2 34 2>; 128 interrupts = <29 2 30 2 34 2>;
174 interrupt-parent = <&mpic>; 129 interrupt-parent = <&mpic>;
175 tbi-handle = <&tbi0>; 130 tbi-handle = <&tbi0>;
176 phy-handle = <&phy0>; 131 phy-handle = <&phy0>;
132
133 mdio@520 {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 compatible = "fsl,gianfar-mdio";
137 reg = <0x520 0x20>;
138
139 phy0: ethernet-phy@0 {
140 interrupt-parent = <&mpic>;
141 interrupts = <5 1>;
142 reg = <0x0>;
143 device_type = "ethernet-phy";
144 };
145 phy1: ethernet-phy@1 {
146 interrupt-parent = <&mpic>;
147 interrupts = <5 1>;
148 reg = <0x1>;
149 device_type = "ethernet-phy";
150 };
151 phy2: ethernet-phy@2 {
152 interrupt-parent = <&mpic>;
153 interrupts = <7 1>;
154 reg = <0x2>;
155 device_type = "ethernet-phy";
156 };
157 phy3: ethernet-phy@3 {
158 interrupt-parent = <&mpic>;
159 interrupts = <7 1>;
160 reg = <0x3>;
161 device_type = "ethernet-phy";
162 };
163 tbi0: tbi-phy@11 {
164 reg = <0x11>;
165 device_type = "tbi-phy";
166 };
167 };
177 }; 168 };
178 169
179 enet1: ethernet@25000 { 170 enet1: ethernet@25000 {
171 #address-cells = <1>;
172 #size-cells = <1>;
180 cell-index = <1>; 173 cell-index = <1>;
181 device_type = "network"; 174 device_type = "network";
182 model = "TSEC"; 175 model = "TSEC";
183 compatible = "gianfar"; 176 compatible = "gianfar";
184 reg = <0x25000 0x1000>; 177 reg = <0x25000 0x1000>;
178 ranges = <0x0 0x25000 0x1000>;
185 local-mac-address = [ 00 00 00 00 00 00 ]; 179 local-mac-address = [ 00 00 00 00 00 00 ];
186 interrupts = <35 2 36 2 40 2>; 180 interrupts = <35 2 36 2 40 2>;
187 interrupt-parent = <&mpic>; 181 interrupt-parent = <&mpic>;
188 tbi-handle = <&tbi1>; 182 tbi-handle = <&tbi1>;
189 phy-handle = <&phy1>; 183 phy-handle = <&phy1>;
184
185 mdio@520 {
186 #address-cells = <1>;
187 #size-cells = <0>;
188 compatible = "fsl,gianfar-tbi";
189 reg = <0x520 0x20>;
190
191 tbi1: tbi-phy@11 {
192 reg = <0x11>;
193 device_type = "tbi-phy";
194 };
195 };
190 }; 196 };
191 197
192 mpic: pic@40000 { 198 mpic: pic@40000 {
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 1955bd9e113d..9d52e3b25047 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -149,78 +149,84 @@
149 }; 149 };
150 }; 150 };
151 151
152 mdio@24520 {
153 #address-cells = <1>;
154 #size-cells = <0>;
155 compatible = "fsl,gianfar-mdio";
156 reg = <0x24520 0x20>;
157
158 phy0: ethernet-phy@7 {
159 interrupt-parent = <&mpic>;
160 interrupts = <1 1>;
161 reg = <0x7>;
162 device_type = "ethernet-phy";
163 };
164 phy1: ethernet-phy@1 {
165 interrupt-parent = <&mpic>;
166 interrupts = <2 1>;
167 reg = <0x1>;
168 device_type = "ethernet-phy";
169 };
170 phy2: ethernet-phy@2 {
171 interrupt-parent = <&mpic>;
172 interrupts = <1 1>;
173 reg = <0x2>;
174 device_type = "ethernet-phy";
175 };
176 phy3: ethernet-phy@3 {
177 interrupt-parent = <&mpic>;
178 interrupts = <2 1>;
179 reg = <0x3>;
180 device_type = "ethernet-phy";
181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
199
200 enet0: ethernet@24000 { 152 enet0: ethernet@24000 {
153 #address-cells = <1>;
154 #size-cells = <1>;
201 cell-index = <0>; 155 cell-index = <0>;
202 device_type = "network"; 156 device_type = "network";
203 model = "eTSEC"; 157 model = "eTSEC";
204 compatible = "gianfar"; 158 compatible = "gianfar";
205 reg = <0x24000 0x1000>; 159 reg = <0x24000 0x1000>;
160 ranges = <0x0 0x24000 0x1000>;
206 local-mac-address = [ 00 00 00 00 00 00 ]; 161 local-mac-address = [ 00 00 00 00 00 00 ];
207 interrupts = <29 2 30 2 34 2>; 162 interrupts = <29 2 30 2 34 2>;
208 interrupt-parent = <&mpic>; 163 interrupt-parent = <&mpic>;
209 tbi-handle = <&tbi0>; 164 tbi-handle = <&tbi0>;
210 phy-handle = <&phy2>; 165 phy-handle = <&phy2>;
166
167 mdio@520 {
168 #address-cells = <1>;
169 #size-cells = <0>;
170 compatible = "fsl,gianfar-mdio";
171 reg = <0x520 0x20>;
172
173 phy0: ethernet-phy@7 {
174 interrupt-parent = <&mpic>;
175 interrupts = <1 1>;
176 reg = <0x7>;
177 device_type = "ethernet-phy";
178 };
179 phy1: ethernet-phy@1 {
180 interrupt-parent = <&mpic>;
181 interrupts = <2 1>;
182 reg = <0x1>;
183 device_type = "ethernet-phy";
184 };
185 phy2: ethernet-phy@2 {
186 interrupt-parent = <&mpic>;
187 interrupts = <1 1>;
188 reg = <0x2>;
189 device_type = "ethernet-phy";
190 };
191 phy3: ethernet-phy@3 {
192 interrupt-parent = <&mpic>;
193 interrupts = <2 1>;
194 reg = <0x3>;
195 device_type = "ethernet-phy";
196 };
197 tbi0: tbi-phy@11 {
198 reg = <0x11>;
199 device_type = "tbi-phy";
200 };
201 };
211 }; 202 };
212 203
213 enet1: ethernet@25000 { 204 enet1: ethernet@25000 {
205 #address-cells = <1>;
206 #size-cells = <1>;
214 cell-index = <1>; 207 cell-index = <1>;
215 device_type = "network"; 208 device_type = "network";
216 model = "eTSEC"; 209 model = "eTSEC";
217 compatible = "gianfar"; 210 compatible = "gianfar";
218 reg = <0x25000 0x1000>; 211 reg = <0x25000 0x1000>;
212 ranges = <0x0 0x25000 0x1000>;
219 local-mac-address = [ 00 00 00 00 00 00 ]; 213 local-mac-address = [ 00 00 00 00 00 00 ];
220 interrupts = <35 2 36 2 40 2>; 214 interrupts = <35 2 36 2 40 2>;
221 interrupt-parent = <&mpic>; 215 interrupt-parent = <&mpic>;
222 tbi-handle = <&tbi1>; 216 tbi-handle = <&tbi1>;
223 phy-handle = <&phy3>; 217 phy-handle = <&phy3>;
218
219 mdio@520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-tbi";
223 reg = <0x520 0x20>;
224
225 tbi1: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
224 }; 230 };
225 231
226 serial0: serial@4500 { 232 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index 359c3b727420..6e79a4169088 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8572 DS Device Tree Source 2 * MPC8572 DS Device Tree Source
3 * 3 *
4 * Copyright 2007, 2008 Freescale Semiconductor Inc. 4 * Copyright 2007-2009 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -312,129 +312,141 @@
312 }; 312 };
313 }; 313 };
314 314
315 mdio@24520 {
316 #address-cells = <1>;
317 #size-cells = <0>;
318 compatible = "fsl,gianfar-mdio";
319 reg = <0x24520 0x20>;
320
321 phy0: ethernet-phy@0 {
322 interrupt-parent = <&mpic>;
323 interrupts = <10 1>;
324 reg = <0x0>;
325 };
326 phy1: ethernet-phy@1 {
327 interrupt-parent = <&mpic>;
328 interrupts = <10 1>;
329 reg = <0x1>;
330 };
331 phy2: ethernet-phy@2 {
332 interrupt-parent = <&mpic>;
333 interrupts = <10 1>;
334 reg = <0x2>;
335 };
336 phy3: ethernet-phy@3 {
337 interrupt-parent = <&mpic>;
338 interrupts = <10 1>;
339 reg = <0x3>;
340 };
341
342 tbi0: tbi-phy@11 {
343 reg = <0x11>;
344 device_type = "tbi-phy";
345 };
346 };
347
348 mdio@25520 {
349 #address-cells = <1>;
350 #size-cells = <0>;
351 compatible = "fsl,gianfar-tbi";
352 reg = <0x25520 0x20>;
353
354 tbi1: tbi-phy@11 {
355 reg = <0x11>;
356 device_type = "tbi-phy";
357 };
358 };
359
360 mdio@26520 {
361 #address-cells = <1>;
362 #size-cells = <0>;
363 compatible = "fsl,gianfar-tbi";
364 reg = <0x26520 0x20>;
365
366 tbi2: tbi-phy@11 {
367 reg = <0x11>;
368 device_type = "tbi-phy";
369 };
370 };
371
372 mdio@27520 {
373 #address-cells = <1>;
374 #size-cells = <0>;
375 compatible = "fsl,gianfar-tbi";
376 reg = <0x27520 0x20>;
377
378 tbi3: tbi-phy@11 {
379 reg = <0x11>;
380 device_type = "tbi-phy";
381 };
382 };
383
384 enet0: ethernet@24000 { 315 enet0: ethernet@24000 {
316 #address-cells = <1>;
317 #size-cells = <1>;
385 cell-index = <0>; 318 cell-index = <0>;
386 device_type = "network"; 319 device_type = "network";
387 model = "eTSEC"; 320 model = "eTSEC";
388 compatible = "gianfar"; 321 compatible = "gianfar";
389 reg = <0x24000 0x1000>; 322 reg = <0x24000 0x1000>;
323 ranges = <0x0 0x24000 0x1000>;
390 local-mac-address = [ 00 00 00 00 00 00 ]; 324 local-mac-address = [ 00 00 00 00 00 00 ];
391 interrupts = <29 2 30 2 34 2>; 325 interrupts = <29 2 30 2 34 2>;
392 interrupt-parent = <&mpic>; 326 interrupt-parent = <&mpic>;
393 tbi-handle = <&tbi0>; 327 tbi-handle = <&tbi0>;
394 phy-handle = <&phy0>; 328 phy-handle = <&phy0>;
395 phy-connection-type = "rgmii-id"; 329 phy-connection-type = "rgmii-id";
330
331 mdio@520 {
332 #address-cells = <1>;
333 #size-cells = <0>;
334 compatible = "fsl,gianfar-mdio";
335 reg = <0x520 0x20>;
336
337 phy0: ethernet-phy@0 {
338 interrupt-parent = <&mpic>;
339 interrupts = <10 1>;
340 reg = <0x0>;
341 };
342 phy1: ethernet-phy@1 {
343 interrupt-parent = <&mpic>;
344 interrupts = <10 1>;
345 reg = <0x1>;
346 };
347 phy2: ethernet-phy@2 {
348 interrupt-parent = <&mpic>;
349 interrupts = <10 1>;
350 reg = <0x2>;
351 };
352 phy3: ethernet-phy@3 {
353 interrupt-parent = <&mpic>;
354 interrupts = <10 1>;
355 reg = <0x3>;
356 };
357
358 tbi0: tbi-phy@11 {
359 reg = <0x11>;
360 device_type = "tbi-phy";
361 };
362 };
396 }; 363 };
397 364
398 enet1: ethernet@25000 { 365 enet1: ethernet@25000 {
366 #address-cells = <1>;
367 #size-cells = <1>;
399 cell-index = <1>; 368 cell-index = <1>;
400 device_type = "network"; 369 device_type = "network";
401 model = "eTSEC"; 370 model = "eTSEC";
402 compatible = "gianfar"; 371 compatible = "gianfar";
403 reg = <0x25000 0x1000>; 372 reg = <0x25000 0x1000>;
373 ranges = <0x0 0x25000 0x1000>;
404 local-mac-address = [ 00 00 00 00 00 00 ]; 374 local-mac-address = [ 00 00 00 00 00 00 ];
405 interrupts = <35 2 36 2 40 2>; 375 interrupts = <35 2 36 2 40 2>;
406 interrupt-parent = <&mpic>; 376 interrupt-parent = <&mpic>;
407 tbi-handle = <&tbi1>; 377 tbi-handle = <&tbi1>;
408 phy-handle = <&phy1>; 378 phy-handle = <&phy1>;
409 phy-connection-type = "rgmii-id"; 379 phy-connection-type = "rgmii-id";
380
381 mdio@520 {
382 #address-cells = <1>;
383 #size-cells = <0>;
384 compatible = "fsl,gianfar-tbi";
385 reg = <0x520 0x20>;
386
387 tbi1: tbi-phy@11 {
388 reg = <0x11>;
389 device_type = "tbi-phy";
390 };
391 };
410 }; 392 };
411 393
412 enet2: ethernet@26000 { 394 enet2: ethernet@26000 {
395 #address-cells = <1>;
396 #size-cells = <1>;
413 cell-index = <2>; 397 cell-index = <2>;
414 device_type = "network"; 398 device_type = "network";
415 model = "eTSEC"; 399 model = "eTSEC";
416 compatible = "gianfar"; 400 compatible = "gianfar";
417 reg = <0x26000 0x1000>; 401 reg = <0x26000 0x1000>;
402 ranges = <0x0 0x26000 0x1000>;
418 local-mac-address = [ 00 00 00 00 00 00 ]; 403 local-mac-address = [ 00 00 00 00 00 00 ];
419 interrupts = <31 2 32 2 33 2>; 404 interrupts = <31 2 32 2 33 2>;
420 interrupt-parent = <&mpic>; 405 interrupt-parent = <&mpic>;
421 tbi-handle = <&tbi2>; 406 tbi-handle = <&tbi2>;
422 phy-handle = <&phy2>; 407 phy-handle = <&phy2>;
423 phy-connection-type = "rgmii-id"; 408 phy-connection-type = "rgmii-id";
409
410 mdio@520 {
411 #address-cells = <1>;
412 #size-cells = <0>;
413 compatible = "fsl,gianfar-tbi";
414 reg = <0x520 0x20>;
415
416 tbi2: tbi-phy@11 {
417 reg = <0x11>;
418 device_type = "tbi-phy";
419 };
420 };
424 }; 421 };
425 422
426 enet3: ethernet@27000 { 423 enet3: ethernet@27000 {
424 #address-cells = <1>;
425 #size-cells = <1>;
427 cell-index = <3>; 426 cell-index = <3>;
428 device_type = "network"; 427 device_type = "network";
429 model = "eTSEC"; 428 model = "eTSEC";
430 compatible = "gianfar"; 429 compatible = "gianfar";
431 reg = <0x27000 0x1000>; 430 reg = <0x27000 0x1000>;
431 ranges = <0x0 0x27000 0x1000>;
432 local-mac-address = [ 00 00 00 00 00 00 ]; 432 local-mac-address = [ 00 00 00 00 00 00 ];
433 interrupts = <37 2 38 2 39 2>; 433 interrupts = <37 2 38 2 39 2>;
434 interrupt-parent = <&mpic>; 434 interrupt-parent = <&mpic>;
435 tbi-handle = <&tbi3>; 435 tbi-handle = <&tbi3>;
436 phy-handle = <&phy3>; 436 phy-handle = <&phy3>;
437 phy-connection-type = "rgmii-id"; 437 phy-connection-type = "rgmii-id";
438
439 mdio@520 {
440 #address-cells = <1>;
441 #size-cells = <0>;
442 compatible = "fsl,gianfar-tbi";
443 reg = <0x520 0x20>;
444
445 tbi3: tbi-phy@11 {
446 reg = <0x11>;
447 device_type = "tbi-phy";
448 };
449 };
438 }; 450 };
439 451
440 serial0: serial@4500 { 452 serial0: serial@4500 {
@@ -643,7 +655,7 @@
643 655
644 0x1000000 0x0 0x0 656 0x1000000 0x0 0x0
645 0x1000000 0x0 0x0 657 0x1000000 0x0 0x0
646 0x0 0x100000>; 658 0x0 0x10000>;
647 uli1575@0 { 659 uli1575@0 {
648 reg = <0x0 0x0 0x0 0x0 0x0>; 660 reg = <0x0 0x0 0x0 0x0 0x0>;
649 #size-cells = <2>; 661 #size-cells = <2>;
@@ -654,7 +666,7 @@
654 666
655 0x1000000 0x0 0x0 667 0x1000000 0x0 0x0
656 0x1000000 0x0 0x0 668 0x1000000 0x0 0x0
657 0x0 0x100000>; 669 0x0 0x10000>;
658 isa@1e { 670 isa@1e {
659 device_type = "isa"; 671 device_type = "isa";
660 #interrupt-cells = <2>; 672 #interrupt-cells = <2>;
@@ -744,7 +756,7 @@
744 756
745 0x1000000 0x0 0x0 757 0x1000000 0x0 0x0
746 0x1000000 0x0 0x0 758 0x1000000 0x0 0x0
747 0x0 0x100000>; 759 0x0 0x10000>;
748 }; 760 };
749 }; 761 };
750 762
@@ -781,7 +793,7 @@
781 793
782 0x1000000 0x0 0x0 794 0x1000000 0x0 0x0
783 0x1000000 0x0 0x0 795 0x1000000 0x0 0x0
784 0x0 0x100000>; 796 0x0 0x10000>;
785 }; 797 };
786 }; 798 };
787}; 799};
diff --git a/arch/powerpc/boot/dts/mpc8572ds_36b.dts b/arch/powerpc/boot/dts/mpc8572ds_36b.dts
new file mode 100644
index 000000000000..dbd81a764742
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8572ds_36b.dts
@@ -0,0 +1,799 @@
1/*
2 * MPC8572 DS Device Tree Source
3 *
4 * Copyright 2007-2009 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/dts-v1/;
13/ {
14 model = "fsl,MPC8572DS";
15 compatible = "fsl,MPC8572DS";
16 #address-cells = <2>;
17 #size-cells = <2>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 ethernet2 = &enet2;
23 ethernet3 = &enet3;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 pci1 = &pci1;
28 pci2 = &pci2;
29 };
30
31 cpus {
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 PowerPC,8572@0 {
36 device_type = "cpu";
37 reg = <0x0>;
38 d-cache-line-size = <32>; // 32 bytes
39 i-cache-line-size = <32>; // 32 bytes
40 d-cache-size = <0x8000>; // L1, 32K
41 i-cache-size = <0x8000>; // L1, 32K
42 timebase-frequency = <0>;
43 bus-frequency = <0>;
44 clock-frequency = <0>;
45 next-level-cache = <&L2>;
46 };
47
48 PowerPC,8572@1 {
49 device_type = "cpu";
50 reg = <0x1>;
51 d-cache-line-size = <32>; // 32 bytes
52 i-cache-line-size = <32>; // 32 bytes
53 d-cache-size = <0x8000>; // L1, 32K
54 i-cache-size = <0x8000>; // L1, 32K
55 timebase-frequency = <0>;
56 bus-frequency = <0>;
57 clock-frequency = <0>;
58 next-level-cache = <&L2>;
59 };
60 };
61
62 memory {
63 device_type = "memory";
64 };
65
66 localbus@fffe05000 {
67 #address-cells = <2>;
68 #size-cells = <1>;
69 compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
70 reg = <0xf 0xffe05000 0 0x1000>;
71 interrupts = <19 2>;
72 interrupt-parent = <&mpic>;
73
74 ranges = <0x0 0x0 0xf 0xe8000000 0x08000000
75 0x1 0x0 0xf 0xe0000000 0x08000000
76 0x2 0x0 0xf 0xffa00000 0x00040000
77 0x3 0x0 0xf 0xffdf0000 0x00008000
78 0x4 0x0 0xf 0xffa40000 0x00040000
79 0x5 0x0 0xf 0xffa80000 0x00040000
80 0x6 0x0 0xf 0xffac0000 0x00040000>;
81
82 nor@0,0 {
83 #address-cells = <1>;
84 #size-cells = <1>;
85 compatible = "cfi-flash";
86 reg = <0x0 0x0 0x8000000>;
87 bank-width = <2>;
88 device-width = <1>;
89
90 ramdisk@0 {
91 reg = <0x0 0x03000000>;
92 read-only;
93 };
94
95 diagnostic@3000000 {
96 reg = <0x03000000 0x00e00000>;
97 read-only;
98 };
99
100 dink@3e00000 {
101 reg = <0x03e00000 0x00200000>;
102 read-only;
103 };
104
105 kernel@4000000 {
106 reg = <0x04000000 0x00400000>;
107 read-only;
108 };
109
110 jffs2@4400000 {
111 reg = <0x04400000 0x03b00000>;
112 };
113
114 dtb@7f00000 {
115 reg = <0x07f00000 0x00080000>;
116 read-only;
117 };
118
119 u-boot@7f80000 {
120 reg = <0x07f80000 0x00080000>;
121 read-only;
122 };
123 };
124
125 nand@2,0 {
126 #address-cells = <1>;
127 #size-cells = <1>;
128 compatible = "fsl,mpc8572-fcm-nand",
129 "fsl,elbc-fcm-nand";
130 reg = <0x2 0x0 0x40000>;
131
132 u-boot@0 {
133 reg = <0x0 0x02000000>;
134 read-only;
135 };
136
137 jffs2@2000000 {
138 reg = <0x02000000 0x10000000>;
139 };
140
141 ramdisk@12000000 {
142 reg = <0x12000000 0x08000000>;
143 read-only;
144 };
145
146 kernel@1a000000 {
147 reg = <0x1a000000 0x04000000>;
148 };
149
150 dtb@1e000000 {
151 reg = <0x1e000000 0x01000000>;
152 read-only;
153 };
154
155 empty@1f000000 {
156 reg = <0x1f000000 0x21000000>;
157 };
158 };
159
160 nand@4,0 {
161 compatible = "fsl,mpc8572-fcm-nand",
162 "fsl,elbc-fcm-nand";
163 reg = <0x4 0x0 0x40000>;
164 };
165
166 nand@5,0 {
167 compatible = "fsl,mpc8572-fcm-nand",
168 "fsl,elbc-fcm-nand";
169 reg = <0x5 0x0 0x40000>;
170 };
171
172 nand@6,0 {
173 compatible = "fsl,mpc8572-fcm-nand",
174 "fsl,elbc-fcm-nand";
175 reg = <0x6 0x0 0x40000>;
176 };
177 };
178
179 soc8572@fffe00000 {
180 #address-cells = <1>;
181 #size-cells = <1>;
182 device_type = "soc";
183 compatible = "simple-bus";
184 ranges = <0x0 0xf 0xffe00000 0x100000>;
185 reg = <0xf 0xffe00000 0 0x1000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed
186 bus-frequency = <0>; // Filled out by uboot.
187
188 memory-controller@2000 {
189 compatible = "fsl,mpc8572-memory-controller";
190 reg = <0x2000 0x1000>;
191 interrupt-parent = <&mpic>;
192 interrupts = <18 2>;
193 };
194
195 memory-controller@6000 {
196 compatible = "fsl,mpc8572-memory-controller";
197 reg = <0x6000 0x1000>;
198 interrupt-parent = <&mpic>;
199 interrupts = <18 2>;
200 };
201
202 L2: l2-cache-controller@20000 {
203 compatible = "fsl,mpc8572-l2-cache-controller";
204 reg = <0x20000 0x1000>;
205 cache-line-size = <32>; // 32 bytes
206 cache-size = <0x100000>; // L2, 1M
207 interrupt-parent = <&mpic>;
208 interrupts = <16 2>;
209 };
210
211 i2c@3000 {
212 #address-cells = <1>;
213 #size-cells = <0>;
214 cell-index = <0>;
215 compatible = "fsl-i2c";
216 reg = <0x3000 0x100>;
217 interrupts = <43 2>;
218 interrupt-parent = <&mpic>;
219 dfsrr;
220 };
221
222 i2c@3100 {
223 #address-cells = <1>;
224 #size-cells = <0>;
225 cell-index = <1>;
226 compatible = "fsl-i2c";
227 reg = <0x3100 0x100>;
228 interrupts = <43 2>;
229 interrupt-parent = <&mpic>;
230 dfsrr;
231 };
232
233 dma@c300 {
234 #address-cells = <1>;
235 #size-cells = <1>;
236 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
237 reg = <0xc300 0x4>;
238 ranges = <0x0 0xc100 0x200>;
239 cell-index = <1>;
240 dma-channel@0 {
241 compatible = "fsl,mpc8572-dma-channel",
242 "fsl,eloplus-dma-channel";
243 reg = <0x0 0x80>;
244 cell-index = <0>;
245 interrupt-parent = <&mpic>;
246 interrupts = <76 2>;
247 };
248 dma-channel@80 {
249 compatible = "fsl,mpc8572-dma-channel",
250 "fsl,eloplus-dma-channel";
251 reg = <0x80 0x80>;
252 cell-index = <1>;
253 interrupt-parent = <&mpic>;
254 interrupts = <77 2>;
255 };
256 dma-channel@100 {
257 compatible = "fsl,mpc8572-dma-channel",
258 "fsl,eloplus-dma-channel";
259 reg = <0x100 0x80>;
260 cell-index = <2>;
261 interrupt-parent = <&mpic>;
262 interrupts = <78 2>;
263 };
264 dma-channel@180 {
265 compatible = "fsl,mpc8572-dma-channel",
266 "fsl,eloplus-dma-channel";
267 reg = <0x180 0x80>;
268 cell-index = <3>;
269 interrupt-parent = <&mpic>;
270 interrupts = <79 2>;
271 };
272 };
273
274 dma@21300 {
275 #address-cells = <1>;
276 #size-cells = <1>;
277 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
278 reg = <0x21300 0x4>;
279 ranges = <0x0 0x21100 0x200>;
280 cell-index = <0>;
281 dma-channel@0 {
282 compatible = "fsl,mpc8572-dma-channel",
283 "fsl,eloplus-dma-channel";
284 reg = <0x0 0x80>;
285 cell-index = <0>;
286 interrupt-parent = <&mpic>;
287 interrupts = <20 2>;
288 };
289 dma-channel@80 {
290 compatible = "fsl,mpc8572-dma-channel",
291 "fsl,eloplus-dma-channel";
292 reg = <0x80 0x80>;
293 cell-index = <1>;
294 interrupt-parent = <&mpic>;
295 interrupts = <21 2>;
296 };
297 dma-channel@100 {
298 compatible = "fsl,mpc8572-dma-channel",
299 "fsl,eloplus-dma-channel";
300 reg = <0x100 0x80>;
301 cell-index = <2>;
302 interrupt-parent = <&mpic>;
303 interrupts = <22 2>;
304 };
305 dma-channel@180 {
306 compatible = "fsl,mpc8572-dma-channel",
307 "fsl,eloplus-dma-channel";
308 reg = <0x180 0x80>;
309 cell-index = <3>;
310 interrupt-parent = <&mpic>;
311 interrupts = <23 2>;
312 };
313 };
314
315 enet0: ethernet@24000 {
316 #address-cells = <1>;
317 #size-cells = <1>;
318 cell-index = <0>;
319 device_type = "network";
320 model = "eTSEC";
321 compatible = "gianfar";
322 reg = <0x24000 0x1000>;
323 ranges = <0x0 0x24000 0x1000>;
324 local-mac-address = [ 00 00 00 00 00 00 ];
325 interrupts = <29 2 30 2 34 2>;
326 interrupt-parent = <&mpic>;
327 tbi-handle = <&tbi0>;
328 phy-handle = <&phy0>;
329 phy-connection-type = "rgmii-id";
330
331 mdio@520 {
332 #address-cells = <1>;
333 #size-cells = <0>;
334 compatible = "fsl,gianfar-mdio";
335 reg = <0x520 0x20>;
336
337 phy0: ethernet-phy@0 {
338 interrupt-parent = <&mpic>;
339 interrupts = <10 1>;
340 reg = <0x0>;
341 };
342 phy1: ethernet-phy@1 {
343 interrupt-parent = <&mpic>;
344 interrupts = <10 1>;
345 reg = <0x1>;
346 };
347 phy2: ethernet-phy@2 {
348 interrupt-parent = <&mpic>;
349 interrupts = <10 1>;
350 reg = <0x2>;
351 };
352 phy3: ethernet-phy@3 {
353 interrupt-parent = <&mpic>;
354 interrupts = <10 1>;
355 reg = <0x3>;
356 };
357
358 tbi0: tbi-phy@11 {
359 reg = <0x11>;
360 device_type = "tbi-phy";
361 };
362 };
363 };
364
365 enet1: ethernet@25000 {
366 #address-cells = <1>;
367 #size-cells = <1>;
368 cell-index = <1>;
369 device_type = "network";
370 model = "eTSEC";
371 compatible = "gianfar";
372 reg = <0x25000 0x1000>;
373 ranges = <0x0 0x25000 0x1000>;
374 local-mac-address = [ 00 00 00 00 00 00 ];
375 interrupts = <35 2 36 2 40 2>;
376 interrupt-parent = <&mpic>;
377 tbi-handle = <&tbi1>;
378 phy-handle = <&phy1>;
379 phy-connection-type = "rgmii-id";
380
381 mdio@520 {
382 #address-cells = <1>;
383 #size-cells = <0>;
384 compatible = "fsl,gianfar-tbi";
385 reg = <0x520 0x20>;
386
387 tbi1: tbi-phy@11 {
388 reg = <0x11>;
389 device_type = "tbi-phy";
390 };
391 };
392 };
393
394 enet2: ethernet@26000 {
395 #address-cells = <1>;
396 #size-cells = <1>;
397 cell-index = <2>;
398 device_type = "network";
399 model = "eTSEC";
400 compatible = "gianfar";
401 reg = <0x26000 0x1000>;
402 ranges = <0x0 0x26000 0x1000>;
403 local-mac-address = [ 00 00 00 00 00 00 ];
404 interrupts = <31 2 32 2 33 2>;
405 interrupt-parent = <&mpic>;
406 tbi-handle = <&tbi2>;
407 phy-handle = <&phy2>;
408 phy-connection-type = "rgmii-id";
409
410 mdio@520 {
411 #address-cells = <1>;
412 #size-cells = <0>;
413 compatible = "fsl,gianfar-tbi";
414 reg = <0x520 0x20>;
415
416 tbi2: tbi-phy@11 {
417 reg = <0x11>;
418 device_type = "tbi-phy";
419 };
420 };
421 };
422
423 enet3: ethernet@27000 {
424 #address-cells = <1>;
425 #size-cells = <1>;
426 cell-index = <3>;
427 device_type = "network";
428 model = "eTSEC";
429 compatible = "gianfar";
430 reg = <0x27000 0x1000>;
431 ranges = <0x0 0x27000 0x1000>;
432 local-mac-address = [ 00 00 00 00 00 00 ];
433 interrupts = <37 2 38 2 39 2>;
434 interrupt-parent = <&mpic>;
435 tbi-handle = <&tbi3>;
436 phy-handle = <&phy3>;
437 phy-connection-type = "rgmii-id";
438
439 mdio@520 {
440 #address-cells = <1>;
441 #size-cells = <0>;
442 compatible = "fsl,gianfar-tbi";
443 reg = <0x520 0x20>;
444
445 tbi3: tbi-phy@11 {
446 reg = <0x11>;
447 device_type = "tbi-phy";
448 };
449 };
450 };
451
452 serial0: serial@4500 {
453 cell-index = <0>;
454 device_type = "serial";
455 compatible = "ns16550";
456 reg = <0x4500 0x100>;
457 clock-frequency = <0>;
458 interrupts = <42 2>;
459 interrupt-parent = <&mpic>;
460 };
461
462 serial1: serial@4600 {
463 cell-index = <1>;
464 device_type = "serial";
465 compatible = "ns16550";
466 reg = <0x4600 0x100>;
467 clock-frequency = <0>;
468 interrupts = <42 2>;
469 interrupt-parent = <&mpic>;
470 };
471
472 global-utilities@e0000 { //global utilities block
473 compatible = "fsl,mpc8572-guts";
474 reg = <0xe0000 0x1000>;
475 fsl,has-rstcr;
476 };
477
478 msi@41600 {
479 compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
480 reg = <0x41600 0x80>;
481 msi-available-ranges = <0 0x100>;
482 interrupts = <
483 0xe0 0
484 0xe1 0
485 0xe2 0
486 0xe3 0
487 0xe4 0
488 0xe5 0
489 0xe6 0
490 0xe7 0>;
491 interrupt-parent = <&mpic>;
492 };
493
494 crypto@30000 {
495 compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
496 "fsl,sec2.1", "fsl,sec2.0";
497 reg = <0x30000 0x10000>;
498 interrupts = <45 2 58 2>;
499 interrupt-parent = <&mpic>;
500 fsl,num-channels = <4>;
501 fsl,channel-fifo-len = <24>;
502 fsl,exec-units-mask = <0x9fe>;
503 fsl,descriptor-types-mask = <0x3ab0ebf>;
504 };
505
506 mpic: pic@40000 {
507 interrupt-controller;
508 #address-cells = <0>;
509 #interrupt-cells = <2>;
510 reg = <0x40000 0x40000>;
511 compatible = "chrp,open-pic";
512 device_type = "open-pic";
513 };
514 };
515
516 pci0: pcie@fffe08000 {
517 cell-index = <0>;
518 compatible = "fsl,mpc8548-pcie";
519 device_type = "pci";
520 #interrupt-cells = <1>;
521 #size-cells = <2>;
522 #address-cells = <3>;
523 reg = <0xf 0xffe08000 0 0x1000>;
524 bus-range = <0 255>;
525 ranges = <0x2000000 0x0 0xc0000000 0xc 0x00000000 0x0 0x20000000
526 0x1000000 0x0 0x00000000 0xf 0xffc00000 0x0 0x00010000>;
527 clock-frequency = <33333333>;
528 interrupt-parent = <&mpic>;
529 interrupts = <24 2>;
530 interrupt-map-mask = <0xff00 0x0 0x0 0x7>;
531 interrupt-map = <
532 /* IDSEL 0x11 func 0 - PCI slot 1 */
533 0x8800 0x0 0x0 0x1 &mpic 0x2 0x1
534 0x8800 0x0 0x0 0x2 &mpic 0x3 0x1
535 0x8800 0x0 0x0 0x3 &mpic 0x4 0x1
536 0x8800 0x0 0x0 0x4 &mpic 0x1 0x1
537
538 /* IDSEL 0x11 func 1 - PCI slot 1 */
539 0x8900 0x0 0x0 0x1 &mpic 0x2 0x1
540 0x8900 0x0 0x0 0x2 &mpic 0x3 0x1
541 0x8900 0x0 0x0 0x3 &mpic 0x4 0x1
542 0x8900 0x0 0x0 0x4 &mpic 0x1 0x1
543
544 /* IDSEL 0x11 func 2 - PCI slot 1 */
545 0x8a00 0x0 0x0 0x1 &mpic 0x2 0x1
546 0x8a00 0x0 0x0 0x2 &mpic 0x3 0x1
547 0x8a00 0x0 0x0 0x3 &mpic 0x4 0x1
548 0x8a00 0x0 0x0 0x4 &mpic 0x1 0x1
549
550 /* IDSEL 0x11 func 3 - PCI slot 1 */
551 0x8b00 0x0 0x0 0x1 &mpic 0x2 0x1
552 0x8b00 0x0 0x0 0x2 &mpic 0x3 0x1
553 0x8b00 0x0 0x0 0x3 &mpic 0x4 0x1
554 0x8b00 0x0 0x0 0x4 &mpic 0x1 0x1
555
556 /* IDSEL 0x11 func 4 - PCI slot 1 */
557 0x8c00 0x0 0x0 0x1 &mpic 0x2 0x1
558 0x8c00 0x0 0x0 0x2 &mpic 0x3 0x1
559 0x8c00 0x0 0x0 0x3 &mpic 0x4 0x1
560 0x8c00 0x0 0x0 0x4 &mpic 0x1 0x1
561
562 /* IDSEL 0x11 func 5 - PCI slot 1 */
563 0x8d00 0x0 0x0 0x1 &mpic 0x2 0x1
564 0x8d00 0x0 0x0 0x2 &mpic 0x3 0x1
565 0x8d00 0x0 0x0 0x3 &mpic 0x4 0x1
566 0x8d00 0x0 0x0 0x4 &mpic 0x1 0x1
567
568 /* IDSEL 0x11 func 6 - PCI slot 1 */
569 0x8e00 0x0 0x0 0x1 &mpic 0x2 0x1
570 0x8e00 0x0 0x0 0x2 &mpic 0x3 0x1
571 0x8e00 0x0 0x0 0x3 &mpic 0x4 0x1
572 0x8e00 0x0 0x0 0x4 &mpic 0x1 0x1
573
574 /* IDSEL 0x11 func 7 - PCI slot 1 */
575 0x8f00 0x0 0x0 0x1 &mpic 0x2 0x1
576 0x8f00 0x0 0x0 0x2 &mpic 0x3 0x1
577 0x8f00 0x0 0x0 0x3 &mpic 0x4 0x1
578 0x8f00 0x0 0x0 0x4 &mpic 0x1 0x1
579
580 /* IDSEL 0x12 func 0 - PCI slot 2 */
581 0x9000 0x0 0x0 0x1 &mpic 0x3 0x1
582 0x9000 0x0 0x0 0x2 &mpic 0x4 0x1
583 0x9000 0x0 0x0 0x3 &mpic 0x1 0x1
584 0x9000 0x0 0x0 0x4 &mpic 0x2 0x1
585
586 /* IDSEL 0x12 func 1 - PCI slot 2 */
587 0x9100 0x0 0x0 0x1 &mpic 0x3 0x1
588 0x9100 0x0 0x0 0x2 &mpic 0x4 0x1
589 0x9100 0x0 0x0 0x3 &mpic 0x1 0x1
590 0x9100 0x0 0x0 0x4 &mpic 0x2 0x1
591
592 /* IDSEL 0x12 func 2 - PCI slot 2 */
593 0x9200 0x0 0x0 0x1 &mpic 0x3 0x1
594 0x9200 0x0 0x0 0x2 &mpic 0x4 0x1
595 0x9200 0x0 0x0 0x3 &mpic 0x1 0x1
596 0x9200 0x0 0x0 0x4 &mpic 0x2 0x1
597
598 /* IDSEL 0x12 func 3 - PCI slot 2 */
599 0x9300 0x0 0x0 0x1 &mpic 0x3 0x1
600 0x9300 0x0 0x0 0x2 &mpic 0x4 0x1
601 0x9300 0x0 0x0 0x3 &mpic 0x1 0x1
602 0x9300 0x0 0x0 0x4 &mpic 0x2 0x1
603
604 /* IDSEL 0x12 func 4 - PCI slot 2 */
605 0x9400 0x0 0x0 0x1 &mpic 0x3 0x1
606 0x9400 0x0 0x0 0x2 &mpic 0x4 0x1
607 0x9400 0x0 0x0 0x3 &mpic 0x1 0x1
608 0x9400 0x0 0x0 0x4 &mpic 0x2 0x1
609
610 /* IDSEL 0x12 func 5 - PCI slot 2 */
611 0x9500 0x0 0x0 0x1 &mpic 0x3 0x1
612 0x9500 0x0 0x0 0x2 &mpic 0x4 0x1
613 0x9500 0x0 0x0 0x3 &mpic 0x1 0x1
614 0x9500 0x0 0x0 0x4 &mpic 0x2 0x1
615
616 /* IDSEL 0x12 func 6 - PCI slot 2 */
617 0x9600 0x0 0x0 0x1 &mpic 0x3 0x1
618 0x9600 0x0 0x0 0x2 &mpic 0x4 0x1
619 0x9600 0x0 0x0 0x3 &mpic 0x1 0x1
620 0x9600 0x0 0x0 0x4 &mpic 0x2 0x1
621
622 /* IDSEL 0x12 func 7 - PCI slot 2 */
623 0x9700 0x0 0x0 0x1 &mpic 0x3 0x1
624 0x9700 0x0 0x0 0x2 &mpic 0x4 0x1
625 0x9700 0x0 0x0 0x3 &mpic 0x1 0x1
626 0x9700 0x0 0x0 0x4 &mpic 0x2 0x1
627
628 // IDSEL 0x1c USB
629 0xe000 0x0 0x0 0x1 &i8259 0xc 0x2
630 0xe100 0x0 0x0 0x2 &i8259 0x9 0x2
631 0xe200 0x0 0x0 0x3 &i8259 0xa 0x2
632 0xe300 0x0 0x0 0x4 &i8259 0xb 0x2
633
634 // IDSEL 0x1d Audio
635 0xe800 0x0 0x0 0x1 &i8259 0x6 0x2
636
637 // IDSEL 0x1e Legacy
638 0xf000 0x0 0x0 0x1 &i8259 0x7 0x2
639 0xf100 0x0 0x0 0x1 &i8259 0x7 0x2
640
641 // IDSEL 0x1f IDE/SATA
642 0xf800 0x0 0x0 0x1 &i8259 0xe 0x2
643 0xf900 0x0 0x0 0x1 &i8259 0x5 0x2
644
645 >;
646
647 pcie@0 {
648 reg = <0x0 0x0 0x0 0x0 0x0>;
649 #size-cells = <2>;
650 #address-cells = <3>;
651 device_type = "pci";
652 ranges = <0x2000000 0x0 0xc0000000
653 0x2000000 0x0 0xc0000000
654 0x0 0x20000000
655
656 0x1000000 0x0 0x0
657 0x1000000 0x0 0x0
658 0x0 0x10000>;
659 uli1575@0 {
660 reg = <0x0 0x0 0x0 0x0 0x0>;
661 #size-cells = <2>;
662 #address-cells = <3>;
663 ranges = <0x2000000 0x0 0xc0000000
664 0x2000000 0x0 0xc0000000
665 0x0 0x20000000
666
667 0x1000000 0x0 0x0
668 0x1000000 0x0 0x0
669 0x0 0x10000>;
670 isa@1e {
671 device_type = "isa";
672 #interrupt-cells = <2>;
673 #size-cells = <1>;
674 #address-cells = <2>;
675 reg = <0xf000 0x0 0x0 0x0 0x0>;
676 ranges = <0x1 0x0 0x1000000 0x0 0x0
677 0x1000>;
678 interrupt-parent = <&i8259>;
679
680 i8259: interrupt-controller@20 {
681 reg = <0x1 0x20 0x2
682 0x1 0xa0 0x2
683 0x1 0x4d0 0x2>;
684 interrupt-controller;
685 device_type = "interrupt-controller";
686 #address-cells = <0>;
687 #interrupt-cells = <2>;
688 compatible = "chrp,iic";
689 interrupts = <9 2>;
690 interrupt-parent = <&mpic>;
691 };
692
693 i8042@60 {
694 #size-cells = <0>;
695 #address-cells = <1>;
696 reg = <0x1 0x60 0x1 0x1 0x64 0x1>;
697 interrupts = <1 3 12 3>;
698 interrupt-parent =
699 <&i8259>;
700
701 keyboard@0 {
702 reg = <0x0>;
703 compatible = "pnpPNP,303";
704 };
705
706 mouse@1 {
707 reg = <0x1>;
708 compatible = "pnpPNP,f03";
709 };
710 };
711
712 rtc@70 {
713 compatible = "pnpPNP,b00";
714 reg = <0x1 0x70 0x2>;
715 };
716
717 gpio@400 {
718 reg = <0x1 0x400 0x80>;
719 };
720 };
721 };
722 };
723
724 };
725
726 pci1: pcie@fffe09000 {
727 cell-index = <1>;
728 compatible = "fsl,mpc8548-pcie";
729 device_type = "pci";
730 #interrupt-cells = <1>;
731 #size-cells = <2>;
732 #address-cells = <3>;
733 reg = <0xf 0xffe09000 0 0x1000>;
734 bus-range = <0 255>;
735 ranges = <0x2000000 0x0 0xc0000000 0xc 0x20000000 0x0 0x20000000
736 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x00010000>;
737 clock-frequency = <33333333>;
738 interrupt-parent = <&mpic>;
739 interrupts = <25 2>;
740 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
741 interrupt-map = <
742 /* IDSEL 0x0 */
743 0000 0x0 0x0 0x1 &mpic 0x4 0x1
744 0000 0x0 0x0 0x2 &mpic 0x5 0x1
745 0000 0x0 0x0 0x3 &mpic 0x6 0x1
746 0000 0x0 0x0 0x4 &mpic 0x7 0x1
747 >;
748 pcie@0 {
749 reg = <0x0 0x0 0x0 0x0 0x0>;
750 #size-cells = <2>;
751 #address-cells = <3>;
752 device_type = "pci";
753 ranges = <0x2000000 0x0 0xc0000000
754 0x2000000 0x0 0xc0000000
755 0x0 0x20000000
756
757 0x1000000 0x0 0x0
758 0x1000000 0x0 0x0
759 0x0 0x10000>;
760 };
761 };
762
763 pci2: pcie@fffe0a000 {
764 cell-index = <2>;
765 compatible = "fsl,mpc8548-pcie";
766 device_type = "pci";
767 #interrupt-cells = <1>;
768 #size-cells = <2>;
769 #address-cells = <3>;
770 reg = <0xf 0xffe0a000 0 0x1000>;
771 bus-range = <0 255>;
772 ranges = <0x2000000 0x0 0xc0000000 0xc 0x40000000 0x0 0x20000000
773 0x1000000 0x0 0x00000000 0xf 0xffc20000 0x0 0x00010000>;
774 clock-frequency = <33333333>;
775 interrupt-parent = <&mpic>;
776 interrupts = <26 2>;
777 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
778 interrupt-map = <
779 /* IDSEL 0x0 */
780 0000 0x0 0x0 0x1 &mpic 0x0 0x1
781 0000 0x0 0x0 0x2 &mpic 0x1 0x1
782 0000 0x0 0x0 0x3 &mpic 0x2 0x1
783 0000 0x0 0x0 0x4 &mpic 0x3 0x1
784 >;
785 pcie@0 {
786 reg = <0x0 0x0 0x0 0x0 0x0>;
787 #size-cells = <2>;
788 #address-cells = <3>;
789 device_type = "pci";
790 ranges = <0x2000000 0x0 0xc0000000
791 0x2000000 0x0 0xc0000000
792 0x0 0x20000000
793
794 0x1000000 0x0 0x0
795 0x1000000 0x0 0x0
796 0x0 0x10000>;
797 };
798 };
799};
diff --git a/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts b/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts
index fd462efa9e61..2bc0c7189653 100644
--- a/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts
@@ -6,7 +6,7 @@
6 * This dts file allows core0 to have memory, l2, i2c, dma1, global-util, eth0, 6 * This dts file allows core0 to have memory, l2, i2c, dma1, global-util, eth0,
7 * eth1, crypto, pci0, pci1. 7 * eth1, crypto, pci0, pci1.
8 * 8 *
9 * Copyright 2007, 2008 Freescale Semiconductor Inc. 9 * Copyright 2007-2009 Freescale Semiconductor Inc.
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify it 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 12 * under the terms of the GNU General Public License as published by the
@@ -148,35 +148,38 @@
148 }; 148 };
149 }; 149 };
150 150
151 mdio@24520 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "fsl,gianfar-mdio";
155 reg = <0x24520 0x20>;
156
157 phy0: ethernet-phy@0 {
158 interrupt-parent = <&mpic>;
159 interrupts = <10 1>;
160 reg = <0x0>;
161 };
162 phy1: ethernet-phy@1 {
163 interrupt-parent = <&mpic>;
164 interrupts = <10 1>;
165 reg = <0x1>;
166 };
167 };
168
169 enet0: ethernet@24000 { 151 enet0: ethernet@24000 {
152 #address-cells = <1>;
153 #size-cells = <1>;
170 cell-index = <0>; 154 cell-index = <0>;
171 device_type = "network"; 155 device_type = "network";
172 model = "eTSEC"; 156 model = "eTSEC";
173 compatible = "gianfar"; 157 compatible = "gianfar";
174 reg = <0x24000 0x1000>; 158 reg = <0x24000 0x1000>;
159 ranges = <0x0 0x24000 0x1000>;
175 local-mac-address = [ 00 00 00 00 00 00 ]; 160 local-mac-address = [ 00 00 00 00 00 00 ];
176 interrupts = <29 2 30 2 34 2>; 161 interrupts = <29 2 30 2 34 2>;
177 interrupt-parent = <&mpic>; 162 interrupt-parent = <&mpic>;
178 phy-handle = <&phy0>; 163 phy-handle = <&phy0>;
179 phy-connection-type = "rgmii-id"; 164 phy-connection-type = "rgmii-id";
165
166 mdio@520 {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 compatible = "fsl,gianfar-mdio";
170 reg = <0x520 0x20>;
171
172 phy0: ethernet-phy@0 {
173 interrupt-parent = <&mpic>;
174 interrupts = <10 1>;
175 reg = <0x0>;
176 };
177 phy1: ethernet-phy@1 {
178 interrupt-parent = <&mpic>;
179 interrupts = <10 1>;
180 reg = <0x1>;
181 };
182 };
180 }; 183 };
181 184
182 enet1: ethernet@25000 { 185 enet1: ethernet@25000 {
@@ -227,7 +230,7 @@
227 device_type = "open-pic"; 230 device_type = "open-pic";
228 protected-sources = < 231 protected-sources = <
229 31 32 33 37 38 39 /* enet2 enet3 */ 232 31 32 33 37 38 39 /* enet2 enet3 */
230 76 77 78 79 27 42 /* dma2 pci2 serial*/ 233 76 77 78 79 26 42 /* dma2 pci2 serial*/
231 0xe0 0xe1 0xe2 0xe3 /* msi */ 234 0xe0 0xe1 0xe2 0xe3 /* msi */
232 0xe4 0xe5 0xe6 0xe7 235 0xe4 0xe5 0xe6 0xe7
233 >; 236 >;
@@ -376,7 +379,7 @@
376 379
377 0x1000000 0x0 0x0 380 0x1000000 0x0 0x0
378 0x1000000 0x0 0x0 381 0x1000000 0x0 0x0
379 0x0 0x100000>; 382 0x0 0x10000>;
380 uli1575@0 { 383 uli1575@0 {
381 reg = <0x0 0x0 0x0 0x0 0x0>; 384 reg = <0x0 0x0 0x0 0x0 0x0>;
382 #size-cells = <2>; 385 #size-cells = <2>;
@@ -387,7 +390,7 @@
387 390
388 0x1000000 0x0 0x0 391 0x1000000 0x0 0x0
389 0x1000000 0x0 0x0 392 0x1000000 0x0 0x0
390 0x0 0x100000>; 393 0x0 0x10000>;
391 isa@1e { 394 isa@1e {
392 device_type = "isa"; 395 device_type = "isa";
393 #interrupt-cells = <2>; 396 #interrupt-cells = <2>;
@@ -477,7 +480,7 @@
477 480
478 0x1000000 0x0 0x0 481 0x1000000 0x0 0x0
479 0x1000000 0x0 0x0 482 0x1000000 0x0 0x0
480 0x0 0x100000>; 483 0x0 0x10000>;
481 }; 484 };
482 }; 485 };
483}; 486};
diff --git a/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts b/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts
index e35230f2ac93..159cb3a875f0 100644
--- a/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts
@@ -7,7 +7,7 @@
7 * 7 *
8 * Please note to add "-b 1" for core1's dts compiling. 8 * Please note to add "-b 1" for core1's dts compiling.
9 * 9 *
10 * Copyright 2007, 2008 Freescale Semiconductor Inc. 10 * Copyright 2007-2009 Freescale Semiconductor Inc.
11 * 11 *
12 * This program is free software; you can redistribute it and/or modify it 12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the 13 * under the terms of the GNU General Public License as published by the
@@ -186,7 +186,7 @@
186 protected-sources = < 186 protected-sources = <
187 18 16 10 42 45 58 /* MEM L2 mdio serial crypto */ 187 18 16 10 42 45 58 /* MEM L2 mdio serial crypto */
188 29 30 34 35 36 40 /* enet0 enet1 */ 188 29 30 34 35 36 40 /* enet0 enet1 */
189 24 26 20 21 22 23 /* pcie0 pcie1 dma1 */ 189 24 25 20 21 22 23 /* pci0 pci1 dma1 */
190 43 /* i2c */ 190 43 /* i2c */
191 0x1 0x2 0x3 0x4 /* pci slot */ 191 0x1 0x2 0x3 0x4 /* pci slot */
192 0x9 0xa 0xb 0xc /* usb */ 192 0x9 0xa 0xb 0xc /* usb */
@@ -228,7 +228,7 @@
228 228
229 0x1000000 0x0 0x0 229 0x1000000 0x0 0x0
230 0x1000000 0x0 0x0 230 0x1000000 0x0 0x0
231 0x0 0x100000>; 231 0x0 0x10000>;
232 }; 232 };
233 }; 233 };
234}; 234};
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index f724d72c7b92..1bd3ebe11437 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -217,6 +217,7 @@
217 codec-handle = <&cs4270>; 217 codec-handle = <&cs4270>;
218 fsl,playback-dma = <&dma00>; 218 fsl,playback-dma = <&dma00>;
219 fsl,capture-dma = <&dma01>; 219 fsl,capture-dma = <&dma01>;
220 fsl,fifo-depth = <8>;
220 }; 221 };
221 222
222 ssi@16100 { 223 ssi@16100 {
@@ -225,6 +226,7 @@
225 reg = <0x16100 0x100>; 226 reg = <0x16100 0x100>;
226 interrupt-parent = <&mpic>; 227 interrupt-parent = <&mpic>;
227 interrupts = <63 2>; 228 interrupts = <63 2>;
229 fsl,fifo-depth = <8>;
228 }; 230 };
229 231
230 dma@21300 { 232 dma@21300 {
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 4481532cbe77..d72beb192460 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -180,133 +180,144 @@
180 }; 180 };
181 }; 181 };
182 182
183 mdio@24520 {
184 #address-cells = <1>;
185 #size-cells = <0>;
186 compatible = "fsl,gianfar-mdio";
187 reg = <0x24520 0x20>;
188
189 phy0: ethernet-phy@0 {
190 interrupt-parent = <&mpic>;
191 interrupts = <10 1>;
192 reg = <0>;
193 device_type = "ethernet-phy";
194 };
195 phy1: ethernet-phy@1 {
196 interrupt-parent = <&mpic>;
197 interrupts = <10 1>;
198 reg = <1>;
199 device_type = "ethernet-phy";
200 };
201 phy2: ethernet-phy@2 {
202 interrupt-parent = <&mpic>;
203 interrupts = <10 1>;
204 reg = <2>;
205 device_type = "ethernet-phy";
206 };
207 phy3: ethernet-phy@3 {
208 interrupt-parent = <&mpic>;
209 interrupts = <10 1>;
210 reg = <3>;
211 device_type = "ethernet-phy";
212 };
213 tbi0: tbi-phy@11 {
214 reg = <0x11>;
215 device_type = "tbi-phy";
216 };
217 };
218
219 mdio@25520 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "fsl,gianfar-tbi";
223 reg = <0x25520 0x20>;
224
225 tbi1: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
230
231 mdio@26520 {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 compatible = "fsl,gianfar-tbi";
235 reg = <0x26520 0x20>;
236
237 tbi2: tbi-phy@11 {
238 reg = <0x11>;
239 device_type = "tbi-phy";
240 };
241 };
242
243 mdio@27520 {
244 #address-cells = <1>;
245 #size-cells = <0>;
246 compatible = "fsl,gianfar-tbi";
247 reg = <0x27520 0x20>;
248
249 tbi3: tbi-phy@11 {
250 reg = <0x11>;
251 device_type = "tbi-phy";
252 };
253 };
254
255
256 enet0: ethernet@24000 { 183 enet0: ethernet@24000 {
184 #address-cells = <1>;
185 #size-cells = <1>;
257 cell-index = <0>; 186 cell-index = <0>;
258 device_type = "network"; 187 device_type = "network";
259 model = "TSEC"; 188 model = "TSEC";
260 compatible = "gianfar"; 189 compatible = "gianfar";
261 reg = <0x24000 0x1000>; 190 reg = <0x24000 0x1000>;
191 ranges = <0x0 0x24000 0x1000>;
262 local-mac-address = [ 00 00 00 00 00 00 ]; 192 local-mac-address = [ 00 00 00 00 00 00 ];
263 interrupts = <29 2 30 2 34 2>; 193 interrupts = <29 2 30 2 34 2>;
264 interrupt-parent = <&mpic>; 194 interrupt-parent = <&mpic>;
265 tbi-handle = <&tbi0>; 195 tbi-handle = <&tbi0>;
266 phy-handle = <&phy0>; 196 phy-handle = <&phy0>;
267 phy-connection-type = "rgmii-id"; 197 phy-connection-type = "rgmii-id";
198
199 mdio@520 {
200 #address-cells = <1>;
201 #size-cells = <0>;
202 compatible = "fsl,gianfar-mdio";
203 reg = <0x520 0x20>;
204
205 phy0: ethernet-phy@0 {
206 interrupt-parent = <&mpic>;
207 interrupts = <10 1>;
208 reg = <0>;
209 device_type = "ethernet-phy";
210 };
211 phy1: ethernet-phy@1 {
212 interrupt-parent = <&mpic>;
213 interrupts = <10 1>;
214 reg = <1>;
215 device_type = "ethernet-phy";
216 };
217 phy2: ethernet-phy@2 {
218 interrupt-parent = <&mpic>;
219 interrupts = <10 1>;
220 reg = <2>;
221 device_type = "ethernet-phy";
222 };
223 phy3: ethernet-phy@3 {
224 interrupt-parent = <&mpic>;
225 interrupts = <10 1>;
226 reg = <3>;
227 device_type = "ethernet-phy";
228 };
229 tbi0: tbi-phy@11 {
230 reg = <0x11>;
231 device_type = "tbi-phy";
232 };
233 };
268 }; 234 };
269 235
270 enet1: ethernet@25000 { 236 enet1: ethernet@25000 {
237 #address-cells = <1>;
238 #size-cells = <1>;
271 cell-index = <1>; 239 cell-index = <1>;
272 device_type = "network"; 240 device_type = "network";
273 model = "TSEC"; 241 model = "TSEC";
274 compatible = "gianfar"; 242 compatible = "gianfar";
275 reg = <0x25000 0x1000>; 243 reg = <0x25000 0x1000>;
244 ranges = <0x0 0x25000 0x1000>;
276 local-mac-address = [ 00 00 00 00 00 00 ]; 245 local-mac-address = [ 00 00 00 00 00 00 ];
277 interrupts = <35 2 36 2 40 2>; 246 interrupts = <35 2 36 2 40 2>;
278 interrupt-parent = <&mpic>; 247 interrupt-parent = <&mpic>;
279 tbi-handle = <&tbi1>; 248 tbi-handle = <&tbi1>;
280 phy-handle = <&phy1>; 249 phy-handle = <&phy1>;
281 phy-connection-type = "rgmii-id"; 250 phy-connection-type = "rgmii-id";
251
252 mdio@520 {
253 #address-cells = <1>;
254 #size-cells = <0>;
255 compatible = "fsl,gianfar-tbi";
256 reg = <0x520 0x20>;
257
258 tbi1: tbi-phy@11 {
259 reg = <0x11>;
260 device_type = "tbi-phy";
261 };
262 };
282 }; 263 };
283 264
284 enet2: ethernet@26000 { 265 enet2: ethernet@26000 {
266 #address-cells = <1>;
267 #size-cells = <1>;
285 cell-index = <2>; 268 cell-index = <2>;
286 device_type = "network"; 269 device_type = "network";
287 model = "TSEC"; 270 model = "TSEC";
288 compatible = "gianfar"; 271 compatible = "gianfar";
289 reg = <0x26000 0x1000>; 272 reg = <0x26000 0x1000>;
273 ranges = <0x0 0x26000 0x1000>;
290 local-mac-address = [ 00 00 00 00 00 00 ]; 274 local-mac-address = [ 00 00 00 00 00 00 ];
291 interrupts = <31 2 32 2 33 2>; 275 interrupts = <31 2 32 2 33 2>;
292 interrupt-parent = <&mpic>; 276 interrupt-parent = <&mpic>;
293 tbi-handle = <&tbi2>; 277 tbi-handle = <&tbi2>;
294 phy-handle = <&phy2>; 278 phy-handle = <&phy2>;
295 phy-connection-type = "rgmii-id"; 279 phy-connection-type = "rgmii-id";
280
281 mdio@520 {
282 #address-cells = <1>;
283 #size-cells = <0>;
284 compatible = "fsl,gianfar-tbi";
285 reg = <0x520 0x20>;
286
287 tbi2: tbi-phy@11 {
288 reg = <0x11>;
289 device_type = "tbi-phy";
290 };
291 };
296 }; 292 };
297 293
298 enet3: ethernet@27000 { 294 enet3: ethernet@27000 {
295 #address-cells = <1>;
296 #size-cells = <1>;
299 cell-index = <3>; 297 cell-index = <3>;
300 device_type = "network"; 298 device_type = "network";
301 model = "TSEC"; 299 model = "TSEC";
302 compatible = "gianfar"; 300 compatible = "gianfar";
303 reg = <0x27000 0x1000>; 301 reg = <0x27000 0x1000>;
302 ranges = <0x0 0x27000 0x1000>;
304 local-mac-address = [ 00 00 00 00 00 00 ]; 303 local-mac-address = [ 00 00 00 00 00 00 ];
305 interrupts = <37 2 38 2 39 2>; 304 interrupts = <37 2 38 2 39 2>;
306 interrupt-parent = <&mpic>; 305 interrupt-parent = <&mpic>;
307 tbi-handle = <&tbi3>; 306 tbi-handle = <&tbi3>;
308 phy-handle = <&phy3>; 307 phy-handle = <&phy3>;
309 phy-connection-type = "rgmii-id"; 308 phy-connection-type = "rgmii-id";
309
310 mdio@520 {
311 #address-cells = <1>;
312 #size-cells = <0>;
313 compatible = "fsl,gianfar-tbi";
314 reg = <0x520 0x20>;
315
316 tbi3: tbi-phy@11 {
317 reg = <0x11>;
318 device_type = "tbi-phy";
319 };
320 };
310 }; 321 };
311 322
312 serial0: serial@4500 { 323 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts
index be2c11ca0594..895834713894 100644
--- a/arch/powerpc/boot/dts/pcm030.dts
+++ b/arch/powerpc/boot/dts/pcm030.dts
@@ -19,6 +19,7 @@
19 compatible = "phytec,pcm030"; 19 compatible = "phytec,pcm030";
20 #address-cells = <1>; 20 #address-cells = <1>;
21 #size-cells = <1>; 21 #size-cells = <1>;
22 interrupt-parent = <&mpc5200_pic>;
22 23
23 cpus { 24 cpus {
24 #address-cells = <1>; 25 #address-cells = <1>;
@@ -29,26 +30,26 @@
29 reg = <0>; 30 reg = <0>;
30 d-cache-line-size = <32>; 31 d-cache-line-size = <32>;
31 i-cache-line-size = <32>; 32 i-cache-line-size = <32>;
32 d-cache-size = <0x4000>; /* L1, 16K */ 33 d-cache-size = <0x4000>; // L1, 16K
33 i-cache-size = <0x4000>; /* L1, 16K */ 34 i-cache-size = <0x4000>; // L1, 16K
34 timebase-frequency = <0>; /* From Bootloader */ 35 timebase-frequency = <0>; // from bootloader
35 bus-frequency = <0>; /* From Bootloader */ 36 bus-frequency = <0>; // from bootloader
36 clock-frequency = <0>; /* From Bootloader */ 37 clock-frequency = <0>; // from bootloader
37 }; 38 };
38 }; 39 };
39 40
40 memory { 41 memory {
41 device_type = "memory"; 42 device_type = "memory";
42 reg = <0x00000000 0x04000000>; /* 64MB */ 43 reg = <0x00000000 0x04000000>; // 64MB
43 }; 44 };
44 45
45 soc5200@f0000000 { 46 soc5200@f0000000 {
46 #address-cells = <1>; 47 #address-cells = <1>;
47 #size-cells = <1>; 48 #size-cells = <1>;
48 compatible = "fsl,mpc5200b-immr"; 49 compatible = "fsl,mpc5200b-immr";
49 ranges = <0x0 0xf0000000 0x0000c000>; 50 ranges = <0 0xf0000000 0x0000c000>;
50 bus-frequency = <0>; /* From bootloader */ 51 bus-frequency = <0>; // from bootloader
51 system-frequency = <0>; /* From bootloader */ 52 system-frequency = <0>; // from bootloader
52 53
53 cdm@200 { 54 cdm@200 {
54 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; 55 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
@@ -56,87 +57,70 @@
56 }; 57 };
57 58
58 mpc5200_pic: interrupt-controller@500 { 59 mpc5200_pic: interrupt-controller@500 {
59 /* 5200 interrupts are encoded into two levels; */ 60 // 5200 interrupts are encoded into two levels;
60 interrupt-controller; 61 interrupt-controller;
61 #interrupt-cells = <3>; 62 #interrupt-cells = <3>;
62 device_type = "interrupt-controller";
63 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; 63 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
64 reg = <0x500 0x80>; 64 reg = <0x500 0x80>;
65 }; 65 };
66 66
67 timer@600 { /* General Purpose Timer */ 67 timer@600 { // General Purpose Timer
68 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 68 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
69 cell-index = <0>;
70 reg = <0x600 0x10>; 69 reg = <0x600 0x10>;
71 interrupts = <0x1 0x9 0x0>; 70 interrupts = <1 9 0>;
72 interrupt-parent = <&mpc5200_pic>;
73 fsl,has-wdt; 71 fsl,has-wdt;
74 }; 72 };
75 73
76 timer@610 { /* General Purpose Timer */ 74 timer@610 { // General Purpose Timer
77 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 75 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
78 cell-index = <1>;
79 reg = <0x610 0x10>; 76 reg = <0x610 0x10>;
80 interrupts = <0x1 0xa 0x0>; 77 interrupts = <1 10 0>;
81 interrupt-parent = <&mpc5200_pic>;
82 }; 78 };
83 79
84 gpt2: timer@620 { /* General Purpose Timer in GPIO mode */ 80 gpt2: timer@620 { // General Purpose Timer in GPIO mode
85 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 81 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
86 cell-index = <2>;
87 reg = <0x620 0x10>; 82 reg = <0x620 0x10>;
88 interrupts = <0x1 0xb 0x0>; 83 interrupts = <1 11 0>;
89 interrupt-parent = <&mpc5200_pic>;
90 gpio-controller; 84 gpio-controller;
91 #gpio-cells = <2>; 85 #gpio-cells = <2>;
92 }; 86 };
93 87
94 gpt3: timer@630 { /* General Purpose Timer in GPIO mode */ 88 gpt3: timer@630 { // General Purpose Timer in GPIO mode
95 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 89 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
96 cell-index = <3>;
97 reg = <0x630 0x10>; 90 reg = <0x630 0x10>;
98 interrupts = <0x1 0xc 0x0>; 91 interrupts = <1 12 0>;
99 interrupt-parent = <&mpc5200_pic>;
100 gpio-controller; 92 gpio-controller;
101 #gpio-cells = <2>; 93 #gpio-cells = <2>;
102 }; 94 };
103 95
104 gpt4: timer@640 { /* General Purpose Timer in GPIO mode */ 96 gpt4: timer@640 { // General Purpose Timer in GPIO mode
105 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 97 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
106 cell-index = <4>;
107 reg = <0x640 0x10>; 98 reg = <0x640 0x10>;
108 interrupts = <0x1 0xd 0x0>; 99 interrupts = <1 13 0>;
109 interrupt-parent = <&mpc5200_pic>;
110 gpio-controller; 100 gpio-controller;
111 #gpio-cells = <2>; 101 #gpio-cells = <2>;
112 }; 102 };
113 103
114 gpt5: timer@650 { /* General Purpose Timer in GPIO mode */ 104 gpt5: timer@650 { // General Purpose Timer in GPIO mode
115 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 105 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
116 cell-index = <5>;
117 reg = <0x650 0x10>; 106 reg = <0x650 0x10>;
118 interrupts = <0x1 0xe 0x0>; 107 interrupts = <1 14 0>;
119 interrupt-parent = <&mpc5200_pic>;
120 gpio-controller; 108 gpio-controller;
121 #gpio-cells = <2>; 109 #gpio-cells = <2>;
122 }; 110 };
123 111
124 gpt6: timer@660 { /* General Purpose Timer in GPIO mode */ 112 gpt6: timer@660 { // General Purpose Timer in GPIO mode
125 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 113 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
126 cell-index = <6>;
127 reg = <0x660 0x10>; 114 reg = <0x660 0x10>;
128 interrupts = <0x1 0xf 0x0>; 115 interrupts = <1 15 0>;
129 interrupt-parent = <&mpc5200_pic>;
130 gpio-controller; 116 gpio-controller;
131 #gpio-cells = <2>; 117 #gpio-cells = <2>;
132 }; 118 };
133 119
134 gpt7: timer@670 { /* General Purpose Timer in GPIO mode */ 120 gpt7: timer@670 { // General Purpose Timer in GPIO mode
135 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; 121 compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
136 cell-index = <7>;
137 reg = <0x670 0x10>; 122 reg = <0x670 0x10>;
138 interrupts = <0x1 0x10 0x0>; 123 interrupts = <1 16 0>;
139 interrupt-parent = <&mpc5200_pic>;
140 gpio-controller; 124 gpio-controller;
141 #gpio-cells = <2>; 125 #gpio-cells = <2>;
142 }; 126 };
@@ -144,40 +128,33 @@
144 rtc@800 { // Real time clock 128 rtc@800 { // Real time clock
145 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; 129 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
146 reg = <0x800 0x100>; 130 reg = <0x800 0x100>;
147 interrupts = <0x1 0x5 0x0 0x1 0x6 0x0>; 131 interrupts = <1 5 0 1 6 0>;
148 interrupt-parent = <&mpc5200_pic>;
149 }; 132 };
150 133
151 can@900 { 134 can@900 {
152 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; 135 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
153 cell-index = <0>; 136 interrupts = <2 17 0>;
154 interrupts = <0x2 0x11 0x0>;
155 interrupt-parent = <&mpc5200_pic>;
156 reg = <0x900 0x80>; 137 reg = <0x900 0x80>;
157 }; 138 };
158 139
159 can@980 { 140 can@980 {
160 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; 141 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
161 cell-index = <1>; 142 interrupts = <2 18 0>;
162 interrupts = <0x2 0x12 0x0>;
163 interrupt-parent = <&mpc5200_pic>;
164 reg = <0x980 0x80>; 143 reg = <0x980 0x80>;
165 }; 144 };
166 145
167 gpio_simple: gpio@b00 { 146 gpio_simple: gpio@b00 {
168 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; 147 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
169 reg = <0xb00 0x40>; 148 reg = <0xb00 0x40>;
170 interrupts = <0x1 0x7 0x0>; 149 interrupts = <1 7 0>;
171 interrupt-parent = <&mpc5200_pic>;
172 gpio-controller; 150 gpio-controller;
173 #gpio-cells = <2>; 151 #gpio-cells = <2>;
174 }; 152 };
175 153
176 gpio_wkup: gpio-wkup@c00 { 154 gpio_wkup: gpio@c00 {
177 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; 155 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
178 reg = <0xc00 0x40>; 156 reg = <0xc00 0x40>;
179 interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>; 157 interrupts = <1 8 0 0 3 0>;
180 interrupt-parent = <&mpc5200_pic>;
181 gpio-controller; 158 gpio-controller;
182 #gpio-cells = <2>; 159 #gpio-cells = <2>;
183 }; 160 };
@@ -185,26 +162,22 @@
185 spi@f00 { 162 spi@f00 {
186 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; 163 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
187 reg = <0xf00 0x20>; 164 reg = <0xf00 0x20>;
188 interrupts = <0x2 0xd 0x0 0x2 0xe 0x0>; 165 interrupts = <2 13 0 2 14 0>;
189 interrupt-parent = <&mpc5200_pic>;
190 }; 166 };
191 167
192 usb@1000 { 168 usb@1000 {
193 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; 169 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
194 reg = <0x1000 0xff>; 170 reg = <0x1000 0xff>;
195 interrupts = <0x2 0x6 0x0>; 171 interrupts = <2 6 0>;
196 interrupt-parent = <&mpc5200_pic>;
197 }; 172 };
198 173
199 dma-controller@1200 { 174 dma-controller@1200 {
200 device_type = "dma-controller";
201 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; 175 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
202 reg = <0x1200 0x80>; 176 reg = <0x1200 0x80>;
203 interrupts = <0x3 0x0 0x0 0x3 0x1 0x0 0x3 0x2 0x0 0x3 0x3 0x0 177 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
204 0x3 0x4 0x0 0x3 0x5 0x0 0x3 0x6 0x0 0x3 0x7 0x0 178 3 4 0 3 5 0 3 6 0 3 7 0
205 0x3 0x8 0x0 0x3 0x9 0x0 0x3 0xa 0x0 0x3 0xb 0x0 179 3 8 0 3 9 0 3 10 0 3 11 0
206 0x3 0xc 0x0 0x3 0xd 0x0 0x3 0xe 0x0 0x3 0xf 0x0>; 180 3 12 0 3 13 0 3 14 0 3 15 0>;
207 interrupt-parent = <&mpc5200_pic>;
208 }; 181 };
209 182
210 xlb@1f00 { 183 xlb@1f00 {
@@ -213,24 +186,19 @@
213 }; 186 };
214 187
215 ac97@2000 { /* PSC1 in ac97 mode */ 188 ac97@2000 { /* PSC1 in ac97 mode */
216 device_type = "sound";
217 compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97"; 189 compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97";
218 cell-index = <0>; 190 cell-index = <0>;
219 reg = <0x2000 0x100>; 191 reg = <0x2000 0x100>;
220 interrupts = <0x2 0x2 0x0>; 192 interrupts = <2 1 0>;
221 interrupt-parent = <&mpc5200_pic>;
222 }; 193 };
223 194
224 /* PSC2 port is used by CAN1/2 */ 195 /* PSC2 port is used by CAN1/2 */
225 196
226 serial@2400 { /* PSC3 in UART mode */ 197 serial@2400 { /* PSC3 in UART mode */
227 device_type = "serial";
228 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 198 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
229 port-number = <0>;
230 cell-index = <2>; 199 cell-index = <2>;
231 reg = <0x2400 0x100>; 200 reg = <0x2400 0x100>;
232 interrupts = <0x2 0x3 0x0>; 201 interrupts = <2 3 0>;
233 interrupt-parent = <&mpc5200_pic>;
234 }; 202 };
235 203
236 /* PSC4 is ??? */ 204 /* PSC4 is ??? */
@@ -238,55 +206,44 @@
238 /* PSC5 is ??? */ 206 /* PSC5 is ??? */
239 207
240 serial@2c00 { /* PSC6 in UART mode */ 208 serial@2c00 { /* PSC6 in UART mode */
241 device_type = "serial";
242 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; 209 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
243 port-number = <1>;
244 cell-index = <5>; 210 cell-index = <5>;
245 reg = <0x2c00 0x100>; 211 reg = <0x2c00 0x100>;
246 interrupts = <0x2 0x4 0x0>; 212 interrupts = <2 4 0>;
247 interrupt-parent = <&mpc5200_pic>;
248 }; 213 };
249 214
250 ethernet@3000 { 215 ethernet@3000 {
251 device_type = "network";
252 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; 216 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
253 reg = <0x3000 0x400>; 217 reg = <0x3000 0x400>;
254 local-mac-address = [00 00 00 00 00 00]; 218 local-mac-address = [ 00 00 00 00 00 00 ];
255 interrupts = <0x2 0x5 0x0>; 219 interrupts = <2 5 0>;
256 interrupt-parent = <&mpc5200_pic>;
257 phy-handle = <&phy0>; 220 phy-handle = <&phy0>;
258 }; 221 };
259 222
260 mdio@3000 { 223 mdio@3000 {
261 #address-cells = <1>; 224 #address-cells = <1>;
262 #size-cells = <0>; 225 #size-cells = <0>;
263 compatible = "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; 226 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
264 reg = <0x3000 0x400>; /* fec range, since we need to setup fec interrupts */ 227 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
265 interrupts = <0x2 0x5 0x0>; /* these are for "mii command finished", not link changes & co. */ 228 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
266 interrupt-parent = <&mpc5200_pic>; 229
267 230 phy0: ethernet-phy@0 {
268 phy0:ethernet-phy@0 { 231 reg = <0>;
269 device_type = "ethernet-phy";
270 reg = <0x0>;
271 }; 232 };
272 }; 233 };
273 234
274 ata@3a00 { 235 ata@3a00 {
275 device_type = "ata";
276 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; 236 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
277 reg = <0x3a00 0x100>; 237 reg = <0x3a00 0x100>;
278 interrupts = <0x2 0x7 0x0>; 238 interrupts = <2 7 0>;
279 interrupt-parent = <&mpc5200_pic>;
280 }; 239 };
281 240
282 i2c@3d00 { 241 i2c@3d00 {
283 #address-cells = <1>; 242 #address-cells = <1>;
284 #size-cells = <0>; 243 #size-cells = <0>;
285 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 244 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
286 cell-index = <0>;
287 reg = <0x3d00 0x40>; 245 reg = <0x3d00 0x40>;
288 interrupts = <0x2 0xf 0x0>; 246 interrupts = <2 15 0>;
289 interrupt-parent = <&mpc5200_pic>;
290 fsl5200-clocking; 247 fsl5200-clocking;
291 }; 248 };
292 249
@@ -294,10 +251,8 @@
294 #address-cells = <1>; 251 #address-cells = <1>;
295 #size-cells = <0>; 252 #size-cells = <0>;
296 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 253 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
297 cell-index = <1>;
298 reg = <0x3d40 0x40>; 254 reg = <0x3d40 0x40>;
299 interrupts = <0x2 0x10 0x0>; 255 interrupts = <2 16 0>;
300 interrupt-parent = <&mpc5200_pic>;
301 fsl5200-clocking; 256 fsl5200-clocking;
302 rtc@51 { 257 rtc@51 {
303 compatible = "nxp,pcf8563"; 258 compatible = "nxp,pcf8563";
@@ -307,7 +262,7 @@
307 }; 262 };
308 263
309 sram@8000 { 264 sram@8000 {
310 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram"; 265 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
311 reg = <0x8000 0x4000>; 266 reg = <0x8000 0x4000>;
312 }; 267 };
313 268
@@ -340,22 +295,21 @@
340 device_type = "pci"; 295 device_type = "pci";
341 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci"; 296 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
342 reg = <0xf0000d00 0x100>; 297 reg = <0xf0000d00 0x100>;
343 interrupt-map-mask = <0xf800 0x0 0x0 0x7>; 298 interrupt-map-mask = <0xf800 0 0 7>;
344 interrupt-map = <0xc000 0x0 0x0 0x1 &mpc5200_pic 0x0 0x0 0x3 /* 1st slot */ 299 interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
345 0xc000 0x0 0x0 0x2 &mpc5200_pic 0x1 0x1 0x3 300 0xc000 0 0 2 &mpc5200_pic 1 1 3
346 0xc000 0x0 0x0 0x3 &mpc5200_pic 0x1 0x2 0x3 301 0xc000 0 0 3 &mpc5200_pic 1 2 3
347 0xc000 0x0 0x0 0x4 &mpc5200_pic 0x1 0x3 0x3 302 0xc000 0 0 4 &mpc5200_pic 1 3 3
348 303
349 0xc800 0x0 0x0 0x1 &mpc5200_pic 0x1 0x1 0x3 /* 2nd slot */ 304 0xc800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
350 0xc800 0x0 0x0 0x2 &mpc5200_pic 0x1 0x2 0x3 305 0xc800 0 0 2 &mpc5200_pic 1 2 3
351 0xc800 0x0 0x0 0x3 &mpc5200_pic 0x1 0x3 0x3 306 0xc800 0 0 3 &mpc5200_pic 1 3 3
352 0xc800 0x0 0x0 0x4 &mpc5200_pic 0x0 0x0 0x3>; 307 0xc800 0 0 4 &mpc5200_pic 0 0 3>;
353 clock-frequency = <0>; // From boot loader 308 clock-frequency = <0>; // From boot loader
354 interrupts = <0x2 0x8 0x0 0x2 0x9 0x0 0x2 0xa 0x0>; 309 interrupts = <2 8 0 2 9 0 2 10 0>;
355 interrupt-parent = <&mpc5200_pic>;
356 bus-range = <0 0>; 310 bus-range = <0 0>;
357 ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x20000000 311 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
358 0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 312 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
359 0x01000000 0x0 0x00000000 0xb0000000 0x0 0x01000000>; 313 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
360 }; 314 };
361}; 315};
diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts
new file mode 100644
index 000000000000..030042678392
--- /dev/null
+++ b/arch/powerpc/boot/dts/pcm032.dts
@@ -0,0 +1,392 @@
1/*
2 * phyCORE-MPC5200B-IO (pcm032) board Device Tree Source
3 *
4 * Copyright (C) 2006-2009 Pengutronix
5 * Sascha Hauer <s.hauer@pengutronix.de>
6 * Juergen Beisert <j.beisert@pengutronix.de>
7 * Wolfram Sang <w.sang@pengutronix.de>
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/dts-v1/;
16
17/ {
18 model = "phytec,pcm032";
19 compatible = "phytec,pcm032";
20 #address-cells = <1>;
21 #size-cells = <1>;
22 interrupt-parent = <&mpc5200_pic>;
23
24 cpus {
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 PowerPC,5200@0 {
29 device_type = "cpu";
30 reg = <0>;
31 d-cache-line-size = <32>;
32 i-cache-line-size = <32>;
33 d-cache-size = <0x4000>; // L1, 16K
34 i-cache-size = <0x4000>; // L1, 16K
35 timebase-frequency = <0>; // from bootloader
36 bus-frequency = <0>; // from bootloader
37 clock-frequency = <0>; // from bootloader
38 };
39 };
40
41 memory {
42 device_type = "memory";
43 reg = <0x00000000 0x08000000>; // 128MB
44 };
45
46 soc5200@f0000000 {
47 #address-cells = <1>;
48 #size-cells = <1>;
49 compatible = "fsl,mpc5200b-immr";
50 ranges = <0 0xf0000000 0x0000c000>;
51 bus-frequency = <0>; // from bootloader
52 system-frequency = <0>; // from bootloader
53
54 cdm@200 {
55 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
56 reg = <0x200 0x38>;
57 };
58
59 mpc5200_pic: interrupt-controller@500 {
60 // 5200 interrupts are encoded into two levels;
61 interrupt-controller;
62 #interrupt-cells = <3>;
63 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
64 reg = <0x500 0x80>;
65 };
66
67 timer@600 { // General Purpose Timer
68 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
69 reg = <0x600 0x10>;
70 interrupts = <1 9 0>;
71 fsl,has-wdt;
72 };
73
74 timer@610 { // General Purpose Timer
75 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
76 reg = <0x610 0x10>;
77 interrupts = <1 10 0>;
78 };
79
80 gpt2: timer@620 { // General Purpose Timer in GPIO mode
81 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
82 reg = <0x620 0x10>;
83 interrupts = <1 11 0>;
84 gpio-controller;
85 #gpio-cells = <2>;
86 };
87
88 gpt3: timer@630 { // General Purpose Timer in GPIO mode
89 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
90 reg = <0x630 0x10>;
91 interrupts = <1 12 0>;
92 gpio-controller;
93 #gpio-cells = <2>;
94 };
95
96 gpt4: timer@640 { // General Purpose Timer in GPIO mode
97 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
98 reg = <0x640 0x10>;
99 interrupts = <1 13 0>;
100 gpio-controller;
101 #gpio-cells = <2>;
102 };
103
104 gpt5: timer@650 { // General Purpose Timer in GPIO mode
105 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
106 reg = <0x650 0x10>;
107 interrupts = <1 14 0>;
108 gpio-controller;
109 #gpio-cells = <2>;
110 };
111
112 gpt6: timer@660 { // General Purpose Timer in GPIO mode
113 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
114 reg = <0x660 0x10>;
115 interrupts = <1 15 0>;
116 gpio-controller;
117 #gpio-cells = <2>;
118 };
119
120 gpt7: timer@670 { // General Purpose Timer in GPIO mode
121 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
122 reg = <0x670 0x10>;
123 interrupts = <1 16 0>;
124 gpio-controller;
125 #gpio-cells = <2>;
126 };
127
128 rtc@800 { // Real time clock
129 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
130 reg = <0x800 0x100>;
131 interrupts = <1 5 0 1 6 0>;
132 };
133
134 can@900 {
135 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
136 interrupts = <2 17 0>;
137 reg = <0x900 0x80>;
138 };
139
140 can@980 {
141 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
142 interrupts = <2 18 0>;
143 reg = <0x980 0x80>;
144 };
145
146 gpio_simple: gpio@b00 {
147 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
148 reg = <0xb00 0x40>;
149 interrupts = <1 7 0>;
150 gpio-controller;
151 #gpio-cells = <2>;
152 };
153
154 gpio_wkup: gpio@c00 {
155 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
156 reg = <0xc00 0x40>;
157 interrupts = <1 8 0 0 3 0>;
158 gpio-controller;
159 #gpio-cells = <2>;
160 };
161
162 spi@f00 {
163 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
164 reg = <0xf00 0x20>;
165 interrupts = <2 13 0 2 14 0>;
166 };
167
168 usb@1000 {
169 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
170 reg = <0x1000 0xff>;
171 interrupts = <2 6 0>;
172 };
173
174 dma-controller@1200 {
175 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
176 reg = <0x1200 0x80>;
177 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
178 3 4 0 3 5 0 3 6 0 3 7 0
179 3 8 0 3 9 0 3 10 0 3 11 0
180 3 12 0 3 13 0 3 14 0 3 15 0>;
181 };
182
183 xlb@1f00 {
184 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
185 reg = <0x1f00 0x100>;
186 };
187
188 ac97@2000 { /* PSC1 is ac97 */
189 compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
190 cell-index = <0>;
191 reg = <0x2000 0x100>;
192 interrupts = <2 1 0>;
193 };
194
195 /* PSC2 port is used by CAN1/2 */
196
197 serial@2400 { /* PSC3 in UART mode */
198 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
199 cell-index = <2>;
200 reg = <0x2400 0x100>;
201 interrupts = <2 3 0>;
202 };
203
204 /* PSC4 is ??? */
205
206 /* PSC5 is ??? */
207
208 serial@2c00 { /* PSC6 in UART mode */
209 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
210 cell-index = <5>;
211 reg = <0x2c00 0x100>;
212 interrupts = <2 4 0>;
213 };
214
215 ethernet@3000 {
216 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
217 reg = <0x3000 0x400>;
218 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <2 5 0>;
220 phy-handle = <&phy0>;
221 };
222
223 mdio@3000 {
224 #address-cells = <1>;
225 #size-cells = <0>;
226 compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
227 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
228 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
229
230 phy0: ethernet-phy@0 {
231 reg = <0>;
232 };
233 };
234
235 ata@3a00 {
236 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
237 reg = <0x3a00 0x100>;
238 interrupts = <2 7 0>;
239 };
240
241 i2c@3d00 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
245 reg = <0x3d00 0x40>;
246 interrupts = <2 15 0>;
247 fsl5200-clocking;
248 };
249
250 i2c@3d40 {
251 #address-cells = <1>;
252 #size-cells = <0>;
253 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
254 reg = <0x3d40 0x40>;
255 interrupts = <2 16 0>;
256 fsl5200-clocking;
257 rtc@51 {
258 compatible = "nxp,pcf8563";
259 reg = <0x51>;
260 };
261 eeprom@52 {
262 compatible = "at24,24c32";
263 reg = <0x52>;
264 };
265 };
266
267 sram@8000 {
268 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
269 reg = <0x8000 0x4000>;
270 };
271 };
272
273 pci@f0000d00 {
274 #interrupt-cells = <1>;
275 #size-cells = <2>;
276 #address-cells = <3>;
277 device_type = "pci";
278 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
279 reg = <0xf0000d00 0x100>;
280 interrupt-map-mask = <0xf800 0 0 7>;
281 interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
282 0xc000 0 0 2 &mpc5200_pic 1 1 3
283 0xc000 0 0 3 &mpc5200_pic 1 2 3
284 0xc000 0 0 4 &mpc5200_pic 1 3 3
285
286 0xc800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
287 0xc800 0 0 2 &mpc5200_pic 1 2 3
288 0xc800 0 0 3 &mpc5200_pic 1 3 3
289 0xc800 0 0 4 &mpc5200_pic 0 0 3>;
290 clock-frequency = <0>; // From boot loader
291 interrupts = <2 8 0 2 9 0 2 10 0>;
292 bus-range = <0 0>;
293 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
294 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
295 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
296 };
297
298 localbus {
299 compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
300
301 #address-cells = <2>;
302 #size-cells = <1>;
303
304 ranges = <0 0 0xfe000000 0x02000000
305 1 0 0xfc000000 0x02000000
306 2 0 0xfbe00000 0x00200000
307 3 0 0xf9e00000 0x02000000
308 4 0 0xf7e00000 0x02000000
309 5 0 0xe6000000 0x02000000
310 6 0 0xe8000000 0x02000000
311 7 0 0xea000000 0x02000000>;
312
313 flash@0,0 {
314 compatible = "cfi-flash";
315 reg = <0 0 0x02000000>;
316 bank-width = <4>;
317 #size-cells = <1>;
318 #address-cells = <1>;
319
320 partition@0 {
321 label = "ubootl";
322 reg = <0x00000000 0x00040000>;
323 };
324 partition@40000 {
325 label = "kernel";
326 reg = <0x00040000 0x001c0000>;
327 };
328 partition@200000 {
329 label = "jffs2";
330 reg = <0x00200000 0x01d00000>;
331 };
332 partition@1f00000 {
333 label = "uboot";
334 reg = <0x01f00000 0x00040000>;
335 };
336 partition@1f40000 {
337 label = "env";
338 reg = <0x01f40000 0x00040000>;
339 };
340 partition@1f80000 {
341 label = "oftree";
342 reg = <0x01f80000 0x00040000>;
343 };
344 partition@1fc0000 {
345 label = "space";
346 reg = <0x01fc0000 0x00040000>;
347 };
348 };
349
350 sram@2,0 {
351 compatible = "mtd-ram";
352 reg = <2 0 0x00200000>;
353 bank-width = <2>;
354 };
355
356 /*
357 * example snippets for FPGA
358 *
359 * fpga@3,0 {
360 * compatible = "fpga_driver";
361 * reg = <3 0 0x02000000>;
362 * bank-width = <4>;
363 * };
364 *
365 * fpga@4,0 {
366 * compatible = "fpga_driver";
367 * reg = <4 0 0x02000000>;
368 * bank-width = <4>;
369 * };
370 */
371
372 /*
373 * example snippets for free chipselects
374 *
375 * device@5,0 {
376 * compatible = "custom_driver";
377 * reg = <5 0 0x02000000>;
378 * };
379 *
380 * device@6,0 {
381 * compatible = "custom_driver";
382 * reg = <6 0 0x02000000>;
383 * };
384 *
385 * device@7,0 {
386 * compatible = "custom_driver";
387 * reg = <7 0 0x02000000>;
388 * };
389 */
390 };
391};
392
diff --git a/arch/powerpc/boot/dts/pq2fads.dts b/arch/powerpc/boot/dts/pq2fads.dts
index b2d61091b36d..0bb669376743 100644
--- a/arch/powerpc/boot/dts/pq2fads.dts
+++ b/arch/powerpc/boot/dts/pq2fads.dts
@@ -17,6 +17,14 @@
17 #address-cells = <1>; 17 #address-cells = <1>;
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
20 cpus { 28 cpus {
21 #address-cells = <1>; 29 #address-cells = <1>;
22 #size-cells = <0>; 30 #size-cells = <0>;
@@ -45,7 +53,7 @@
45 #size-cells = <1>; 53 #size-cells = <1>;
46 reg = <0xf0010100 0x60>; 54 reg = <0xf0010100 0x60>;
47 55
48 ranges = <0x0 0x0 0xfe000000 0x800000 56 ranges = <0x0 0x0 0xff800000 0x800000
49 0x1 0x0 0xf4500000 0x8000 57 0x1 0x0 0xf4500000 0x8000
50 0x8 0x0 0xf8200000 0x8000>; 58 0x8 0x0 0xf8200000 0x8000>;
51 59
@@ -71,7 +79,7 @@
71 }; 79 };
72 }; 80 };
73 81
74 pci@f0010800 { 82 pci0: pci@f0010800 {
75 device_type = "pci"; 83 device_type = "pci";
76 reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>; 84 reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
77 compatible = "fsl,mpc8280-pci", "fsl,pq2-pci"; 85 compatible = "fsl,mpc8280-pci", "fsl,pq2-pci";
@@ -142,7 +150,7 @@
142 reg = <0x119f0 0x10 0x115f0 0x10>; 150 reg = <0x119f0 0x10 0x115f0 0x10>;
143 }; 151 };
144 152
145 serial@11a00 { 153 serial0: serial@11a00 {
146 device_type = "serial"; 154 device_type = "serial";
147 compatible = "fsl,mpc8280-scc-uart", 155 compatible = "fsl,mpc8280-scc-uart",
148 "fsl,cpm2-scc-uart"; 156 "fsl,cpm2-scc-uart";
@@ -153,7 +161,7 @@
153 fsl,cpm-command = <0x800000>; 161 fsl,cpm-command = <0x800000>;
154 }; 162 };
155 163
156 serial@11a20 { 164 serial1: serial@11a20 {
157 device_type = "serial"; 165 device_type = "serial";
158 compatible = "fsl,mpc8280-scc-uart", 166 compatible = "fsl,mpc8280-scc-uart",
159 "fsl,cpm2-scc-uart"; 167 "fsl,cpm2-scc-uart";
@@ -164,7 +172,7 @@
164 fsl,cpm-command = <0x4a00000>; 172 fsl,cpm-command = <0x4a00000>;
165 }; 173 };
166 174
167 ethernet@11320 { 175 enet0: ethernet@11320 {
168 device_type = "network"; 176 device_type = "network";
169 compatible = "fsl,mpc8280-fcc-enet", 177 compatible = "fsl,mpc8280-fcc-enet",
170 "fsl,cpm2-fcc-enet"; 178 "fsl,cpm2-fcc-enet";
@@ -176,7 +184,7 @@
176 fsl,cpm-command = <0x16200300>; 184 fsl,cpm-command = <0x16200300>;
177 }; 185 };
178 186
179 ethernet@11340 { 187 enet1: ethernet@11340 {
180 device_type = "network"; 188 device_type = "network";
181 compatible = "fsl,mpc8280-fcc-enet", 189 compatible = "fsl,mpc8280-fcc-enet",
182 "fsl,cpm2-fcc-enet"; 190 "fsl,cpm2-fcc-enet";
diff --git a/arch/powerpc/boot/dts/redwood.dts b/arch/powerpc/boot/dts/redwood.dts
new file mode 100644
index 000000000000..ad402c488741
--- /dev/null
+++ b/arch/powerpc/boot/dts/redwood.dts
@@ -0,0 +1,244 @@
1/*
2 * Device Tree Source for AMCC Redwood(460SX)
3 *
4 * Copyright 2008 AMCC <tmarri@amcc.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without
8 * any warranty of any kind, whether express or implied.
9 */
10
11/dts-v1/;
12
13/ {
14 #address-cells = <2>;
15 #size-cells = <1>;
16 model = "amcc,redwood";
17 compatible = "amcc,redwood";
18 dcr-parent = <&{/cpus/cpu@0}>;
19
20 aliases {
21 ethernet0 = &EMAC0;
22 serial0 = &UART0;
23 };
24
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 cpu@0 {
30 device_type = "cpu";
31 model = "PowerPC,460SX";
32 reg = <0x00000000>;
33 clock-frequency = <0>; /* Filled in by U-Boot */
34 timebase-frequency = <0>; /* Filled in by U-Boot */
35 i-cache-line-size = <32>;
36 d-cache-line-size = <32>;
37 i-cache-size = <32768>;
38 d-cache-size = <32768>;
39 dcr-controller;
40 dcr-access-method = "native";
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x00000000 0x00000000>; /* Filled in by U-Boot */
47 };
48
49 UIC0: interrupt-controller0 {
50 compatible = "ibm,uic-460sx","ibm,uic";
51 interrupt-controller;
52 cell-index = <0>;
53 dcr-reg = <0x0c0 0x009>;
54 #address-cells = <0>;
55 #size-cells = <0>;
56 #interrupt-cells = <2>;
57 };
58
59 UIC1: interrupt-controller1 {
60 compatible = "ibm,uic-460sx","ibm,uic";
61 interrupt-controller;
62 cell-index = <1>;
63 dcr-reg = <0x0d0 0x009>;
64 #address-cells = <0>;
65 #size-cells = <0>;
66 #interrupt-cells = <2>;
67 interrupts = <0x1e 0x4 0x1f 0x4>; /* cascade */
68 interrupt-parent = <&UIC0>;
69 };
70
71 UIC2: interrupt-controller2 {
72 compatible = "ibm,uic-460sx","ibm,uic";
73 interrupt-controller;
74 cell-index = <2>;
75 dcr-reg = <0x0e0 0x009>;
76 #address-cells = <0>;
77 #size-cells = <0>;
78 #interrupt-cells = <2>;
79 interrupts = <0xa 0x4 0xb 0x4>; /* cascade */
80 interrupt-parent = <&UIC0>;
81 };
82
83 UIC3: interrupt-controller3 {
84 compatible = "ibm,uic-460sx","ibm,uic";
85 interrupt-controller;
86 cell-index = <3>;
87 dcr-reg = <0x0f0 0x009>;
88 #address-cells = <0>;
89 #size-cells = <0>;
90 #interrupt-cells = <2>;
91 interrupts = <0x10 0x4 0x11 0x4>; /* cascade */
92 interrupt-parent = <&UIC0>;
93 };
94
95 SDR0: sdr {
96 compatible = "ibm,sdr-460sx";
97 dcr-reg = <0x00e 0x002>;
98 };
99
100 CPR0: cpr {
101 compatible = "ibm,cpr-460sx";
102 dcr-reg = <0x00c 0x002>;
103 };
104
105 plb {
106 compatible = "ibm,plb-460sx", "ibm,plb4";
107 #address-cells = <2>;
108 #size-cells = <1>;
109 ranges;
110 clock-frequency = <0>; /* Filled in by U-Boot */
111
112 SDRAM0: sdram {
113 compatible = "ibm,sdram-460sx", "ibm,sdram-405gp";
114 dcr-reg = <0x010 0x002>;
115 };
116
117 MAL0: mcmal {
118 compatible = "ibm,mcmal-460sx", "ibm,mcmal2";
119 dcr-reg = <0x180 0x62>;
120 num-tx-chans = <4>;
121 num-rx-chans = <32>;
122 #address-cells = <1>;
123 #size-cells = <1>;
124 interrupt-parent = <&UIC1>;
125 interrupts = < /*TXEOB*/ 0x6 0x4
126 /*RXEOB*/ 0x7 0x4
127 /*SERR*/ 0x1 0x4
128 /*TXDE*/ 0x2 0x4
129 /*RXDE*/ 0x3 0x4
130 /*COAL TX0*/ 0x18 0x2
131 /*COAL TX1*/ 0x19 0x2
132 /*COAL TX2*/ 0x1a 0x2
133 /*COAL TX3*/ 0x1b 0x2
134 /*COAL RX0*/ 0x1c 0x2
135 /*COAL RX1*/ 0x1d 0x2
136 /*COAL RX2*/ 0x1e 0x2
137 /*COAL RX3*/ 0x1f 0x2>;
138 };
139
140 POB0: opb {
141 compatible = "ibm,opb-460sx", "ibm,opb";
142 #address-cells = <1>;
143 #size-cells = <1>;
144 ranges = <0xb0000000 0x00000004 0xb0000000 0x50000000>;
145 clock-frequency = <0>; /* Filled in by U-Boot */
146
147 EBC0: ebc {
148 compatible = "ibm,ebc-460sx", "ibm,ebc";
149 dcr-reg = <0x012 0x002>;
150 #address-cells = <2>;
151 #size-cells = <1>;
152 clock-frequency = <0>; /* Filled in by U-Boot */
153 /* ranges property is supplied by U-Boot */
154 interrupts = <0x6 0x4>;
155 interrupt-parent = <&UIC1>;
156
157 nor_flash@0,0 {
158 compatible = "amd,s29gl512n", "cfi-flash";
159 bank-width = <2>;
160 reg = <0x0000000 0x00000000 0x04000000>;
161 #address-cells = <1>;
162 #size-cells = <1>;
163 partition@0 {
164 label = "kernel";
165 reg = <0x00000000 0x001e0000>;
166 };
167 partition@1e0000 {
168 label = "dtb";
169 reg = <0x001e0000 0x00020000>;
170 };
171 partition@200000 {
172 label = "ramdisk";
173 reg = <0x00200000 0x01400000>;
174 };
175 partition@1600000 {
176 label = "jffs2";
177 reg = <0x01600000 0x00400000>;
178 };
179 partition@1a00000 {
180 label = "user";
181 reg = <0x01a00000 0x02560000>;
182 };
183 partition@3f60000 {
184 label = "env";
185 reg = <0x03f60000 0x00040000>;
186 };
187 partition@3fa0000 {
188 label = "u-boot";
189 reg = <0x03fa0000 0x00060000>;
190 };
191 };
192 };
193
194 UART0: serial@ef600200 {
195 device_type = "serial";
196 compatible = "ns16550";
197 reg = <0xef600200 0x00000008>;
198 virtual-reg = <0xef600200>;
199 clock-frequency = <0>; /* Filled in by U-Boot */
200 current-speed = <0>; /* Filled in by U-Boot */
201 interrupt-parent = <&UIC0>;
202 interrupts = <0x0 0x4>;
203 };
204
205 RGMII0: emac-rgmii@ef600900 {
206 compatible = "ibm,rgmii-460sx", "ibm,rgmii";
207 reg = <0xef600900 0x00000008>;
208 };
209
210 EMAC0: ethernet@ef600a00 {
211 device_type = "network";
212 compatible = "ibm,emac-460sx", "ibm,emac4";
213 interrupt-parent = <&EMAC0>;
214 interrupts = <0x0 0x1>;
215 #interrupt-cells = <1>;
216 #address-cells = <0>;
217 #size-cells = <0>;
218 interrupt-map = </*Status*/ 0x0 &UIC0 0x13 0x4
219 /*Wake*/ 0x1 &UIC2 0x1d 0x4>;
220 reg = <0xef600a00 0x00000070>;
221 local-mac-address = [000000000000]; /* Filled in by U-Boot */
222 mal-device = <&MAL0>;
223 mal-tx-channel = <0>;
224 mal-rx-channel = <0>;
225 cell-index = <0>;
226 max-frame-size = <9000>;
227 rx-fifo-size = <4096>;
228 tx-fifo-size = <2048>;
229 phy-mode = "rgmii";
230 phy-map = <0x00000000>;
231 rgmii-device = <&RGMII0>;
232 rgmii-channel = <0>;
233 has-inverted-stacr-oc;
234 has-new-stacr-staopc;
235 };
236
237 };
238
239 };
240 chosen {
241 linux,stdout-path = "/plb/opb/serial@ef600200";
242 };
243
244};
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts
index 8d365a57ebc1..a36dbbc48694 100644
--- a/arch/powerpc/boot/dts/sbc8349.dts
+++ b/arch/powerpc/boot/dts/sbc8349.dts
@@ -159,68 +159,76 @@
159 phy_type = "ulpi"; 159 phy_type = "ulpi";
160 }; 160 };
161 161
162 mdio@24520 {
163 #address-cells = <1>;
164 #size-cells = <0>;
165 compatible = "fsl,gianfar-mdio";
166 reg = <0x24520 0x20>;
167
168 phy0: ethernet-phy@19 {
169 interrupt-parent = <&ipic>;
170 interrupts = <20 0x8>;
171 reg = <0x19>;
172 device_type = "ethernet-phy";
173 };
174 phy1: ethernet-phy@1a {
175 interrupt-parent = <&ipic>;
176 interrupts = <21 0x8>;
177 reg = <0x1a>;
178 device_type = "ethernet-phy";
179 };
180 tbi0: tbi-phy@11 {
181 reg = <0x11>;
182 device_type = "tbi-phy";
183 };
184 };
185
186 mdio@25520 {
187 #address-cells = <1>;
188 #size-cells = <0>;
189 compatible = "fsl,gianfar-tbi";
190 reg = <0x25520 0x20>;
191
192 tbi1: tbi-phy@11 {
193 reg = <0x11>;
194 device_type = "tbi-phy";
195 };
196 };
197
198 enet0: ethernet@24000 { 162 enet0: ethernet@24000 {
163 #address-cells = <1>;
164 #size-cells = <1>;
199 cell-index = <0>; 165 cell-index = <0>;
200 device_type = "network"; 166 device_type = "network";
201 model = "TSEC"; 167 model = "TSEC";
202 compatible = "gianfar"; 168 compatible = "gianfar";
203 reg = <0x24000 0x1000>; 169 reg = <0x24000 0x1000>;
170 ranges = <0x0 0x24000 0x1000>;
204 local-mac-address = [ 00 00 00 00 00 00 ]; 171 local-mac-address = [ 00 00 00 00 00 00 ];
205 interrupts = <32 0x8 33 0x8 34 0x8>; 172 interrupts = <32 0x8 33 0x8 34 0x8>;
206 interrupt-parent = <&ipic>; 173 interrupt-parent = <&ipic>;
207 tbi-handle = <&tbi0>; 174 tbi-handle = <&tbi0>;
208 phy-handle = <&phy0>; 175 phy-handle = <&phy0>;
209 linux,network-index = <0>; 176 linux,network-index = <0>;
177
178 mdio@520 {
179 #address-cells = <1>;
180 #size-cells = <0>;
181 compatible = "fsl,gianfar-mdio";
182 reg = <0x520 0x20>;
183
184 phy0: ethernet-phy@19 {
185 interrupt-parent = <&ipic>;
186 interrupts = <20 0x8>;
187 reg = <0x19>;
188 device_type = "ethernet-phy";
189 };
190
191 phy1: ethernet-phy@1a {
192 interrupt-parent = <&ipic>;
193 interrupts = <21 0x8>;
194 reg = <0x1a>;
195 device_type = "ethernet-phy";
196 };
197
198 tbi0: tbi-phy@11 {
199 reg = <0x11>;
200 device_type = "tbi-phy";
201 };
202 };
210 }; 203 };
211 204
212 enet1: ethernet@25000 { 205 enet1: ethernet@25000 {
206 #address-cells = <1>;
207 #size-cells = <1>;
213 cell-index = <1>; 208 cell-index = <1>;
214 device_type = "network"; 209 device_type = "network";
215 model = "TSEC"; 210 model = "TSEC";
216 compatible = "gianfar"; 211 compatible = "gianfar";
217 reg = <0x25000 0x1000>; 212 reg = <0x25000 0x1000>;
213 ranges = <0x0 0x25000 0x1000>;
218 local-mac-address = [ 00 00 00 00 00 00 ]; 214 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <35 0x8 36 0x8 37 0x8>; 215 interrupts = <35 0x8 36 0x8 37 0x8>;
220 interrupt-parent = <&ipic>; 216 interrupt-parent = <&ipic>;
221 tbi-handle = <&tbi1>; 217 tbi-handle = <&tbi1>;
222 phy-handle = <&phy1>; 218 phy-handle = <&phy1>;
223 linux,network-index = <1>; 219 linux,network-index = <1>;
220
221 mdio@520 {
222 #address-cells = <1>;
223 #size-cells = <0>;
224 compatible = "fsl,gianfar-tbi";
225 reg = <0x520 0x20>;
226
227 tbi1: tbi-phy@11 {
228 reg = <0x11>;
229 device_type = "tbi-phy";
230 };
231 };
224 }; 232 };
225 233
226 serial0: serial@4500 { 234 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts
index 2baf4a51f224..b1f1416ac998 100644
--- a/arch/powerpc/boot/dts/sbc8548.dts
+++ b/arch/powerpc/boot/dts/sbc8548.dts
@@ -156,14 +156,14 @@
156 compatible = "simple-bus"; 156 compatible = "simple-bus";
157 157
158 memory-controller@2000 { 158 memory-controller@2000 {
159 compatible = "fsl,8548-memory-controller"; 159 compatible = "fsl,mpc8548-memory-controller";
160 reg = <0x2000 0x1000>; 160 reg = <0x2000 0x1000>;
161 interrupt-parent = <&mpic>; 161 interrupt-parent = <&mpic>;
162 interrupts = <0x12 0x2>; 162 interrupts = <0x12 0x2>;
163 }; 163 };
164 164
165 L2: l2-cache-controller@20000 { 165 L2: l2-cache-controller@20000 {
166 compatible = "fsl,8548-l2-cache-controller"; 166 compatible = "fsl,mpc8548-l2-cache-controller";
167 reg = <0x20000 0x1000>; 167 reg = <0x20000 0x1000>;
168 cache-line-size = <0x20>; // 32 bytes 168 cache-line-size = <0x20>; // 32 bytes
169 cache-size = <0x80000>; // L2, 512K 169 cache-size = <0x80000>; // L2, 512K
@@ -234,66 +234,72 @@
234 }; 234 };
235 }; 235 };
236 236
237 mdio@24520 {
238 #address-cells = <1>;
239 #size-cells = <0>;
240 compatible = "fsl,gianfar-mdio";
241 reg = <0x24520 0x20>;
242
243 phy0: ethernet-phy@19 {
244 interrupt-parent = <&mpic>;
245 interrupts = <0x6 0x1>;
246 reg = <0x19>;
247 device_type = "ethernet-phy";
248 };
249 phy1: ethernet-phy@1a {
250 interrupt-parent = <&mpic>;
251 interrupts = <0x7 0x1>;
252 reg = <0x1a>;
253 device_type = "ethernet-phy";
254 };
255 tbi0: tbi-phy@11 {
256 reg = <0x11>;
257 device_type = "tbi-phy";
258 };
259 };
260
261 mdio@25520 {
262 #address-cells = <1>;
263 #size-cells = <0>;
264 compatible = "fsl,gianfar-tbi";
265 reg = <0x25520 0x20>;
266
267 tbi1: tbi-phy@11 {
268 reg = <0x11>;
269 device_type = "tbi-phy";
270 };
271 };
272
273 enet0: ethernet@24000 { 237 enet0: ethernet@24000 {
238 #address-cells = <1>;
239 #size-cells = <1>;
274 cell-index = <0>; 240 cell-index = <0>;
275 device_type = "network"; 241 device_type = "network";
276 model = "eTSEC"; 242 model = "eTSEC";
277 compatible = "gianfar"; 243 compatible = "gianfar";
278 reg = <0x24000 0x1000>; 244 reg = <0x24000 0x1000>;
245 ranges = <0x0 0x24000 0x1000>;
279 local-mac-address = [ 00 00 00 00 00 00 ]; 246 local-mac-address = [ 00 00 00 00 00 00 ];
280 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 247 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
281 interrupt-parent = <&mpic>; 248 interrupt-parent = <&mpic>;
282 tbi-handle = <&tbi0>; 249 tbi-handle = <&tbi0>;
283 phy-handle = <&phy0>; 250 phy-handle = <&phy0>;
251
252 mdio@520 {
253 #address-cells = <1>;
254 #size-cells = <0>;
255 compatible = "fsl,gianfar-mdio";
256 reg = <0x520 0x20>;
257
258 phy0: ethernet-phy@19 {
259 interrupt-parent = <&mpic>;
260 interrupts = <0x6 0x1>;
261 reg = <0x19>;
262 device_type = "ethernet-phy";
263 };
264 phy1: ethernet-phy@1a {
265 interrupt-parent = <&mpic>;
266 interrupts = <0x7 0x1>;
267 reg = <0x1a>;
268 device_type = "ethernet-phy";
269 };
270 tbi0: tbi-phy@11 {
271 reg = <0x11>;
272 device_type = "tbi-phy";
273 };
274 };
284 }; 275 };
285 276
286 enet1: ethernet@25000 { 277 enet1: ethernet@25000 {
278 #address-cells = <1>;
279 #size-cells = <1>;
287 cell-index = <1>; 280 cell-index = <1>;
288 device_type = "network"; 281 device_type = "network";
289 model = "eTSEC"; 282 model = "eTSEC";
290 compatible = "gianfar"; 283 compatible = "gianfar";
291 reg = <0x25000 0x1000>; 284 reg = <0x25000 0x1000>;
285 ranges = <0x0 0x25000 0x1000>;
292 local-mac-address = [ 00 00 00 00 00 00 ]; 286 local-mac-address = [ 00 00 00 00 00 00 ];
293 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 287 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
294 interrupt-parent = <&mpic>; 288 interrupt-parent = <&mpic>;
295 tbi-handle = <&tbi1>; 289 tbi-handle = <&tbi1>;
296 phy-handle = <&phy1>; 290 phy-handle = <&phy1>;
291
292 mdio@520 {
293 #address-cells = <1>;
294 #size-cells = <0>;
295 compatible = "fsl,gianfar-tbi";
296 reg = <0x520 0x20>;
297
298 tbi1: tbi-phy@11 {
299 reg = <0x11>;
300 device_type = "tbi-phy";
301 };
302 };
297 }; 303 };
298 304
299 serial0: serial@4500 { 305 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/sbc8560.dts b/arch/powerpc/boot/dts/sbc8560.dts
index 01542f7062ab..c4564b81e473 100644
--- a/arch/powerpc/boot/dts/sbc8560.dts
+++ b/arch/powerpc/boot/dts/sbc8560.dts
@@ -61,14 +61,14 @@
61 clock-frequency = <0>; 61 clock-frequency = <0>;
62 62
63 memory-controller@2000 { 63 memory-controller@2000 {
64 compatible = "fsl,8560-memory-controller"; 64 compatible = "fsl,mpc8560-memory-controller";
65 reg = <0x2000 0x1000>; 65 reg = <0x2000 0x1000>;
66 interrupt-parent = <&mpic>; 66 interrupt-parent = <&mpic>;
67 interrupts = <0x12 0x2>; 67 interrupts = <0x12 0x2>;
68 }; 68 };
69 69
70 L2: l2-cache-controller@20000 { 70 L2: l2-cache-controller@20000 {
71 compatible = "fsl,8560-l2-cache-controller"; 71 compatible = "fsl,mpc8560-l2-cache-controller";
72 reg = <0x20000 0x1000>; 72 reg = <0x20000 0x1000>;
73 cache-line-size = <0x20>; // 32 bytes 73 cache-line-size = <0x20>; // 32 bytes
74 cache-size = <0x40000>; // L2, 256K 74 cache-size = <0x40000>; // L2, 256K
@@ -139,77 +139,83 @@
139 }; 139 };
140 }; 140 };
141 141
142 mdio@24520 {
143 #address-cells = <1>;
144 #size-cells = <0>;
145 compatible = "fsl,gianfar-mdio";
146 reg = <0x24520 0x20>;
147 phy0: ethernet-phy@19 {
148 interrupt-parent = <&mpic>;
149 interrupts = <0x6 0x1>;
150 reg = <0x19>;
151 device_type = "ethernet-phy";
152 };
153 phy1: ethernet-phy@1a {
154 interrupt-parent = <&mpic>;
155 interrupts = <0x7 0x1>;
156 reg = <0x1a>;
157 device_type = "ethernet-phy";
158 };
159 phy2: ethernet-phy@1b {
160 interrupt-parent = <&mpic>;
161 interrupts = <0x8 0x1>;
162 reg = <0x1b>;
163 device_type = "ethernet-phy";
164 };
165 phy3: ethernet-phy@1c {
166 interrupt-parent = <&mpic>;
167 interrupts = <0x8 0x1>;
168 reg = <0x1c>;
169 device_type = "ethernet-phy";
170 };
171 tbi0: tbi-phy@11 {
172 reg = <0x11>;
173 device_type = "tbi-phy";
174 };
175 };
176
177 mdio@25520 {
178 #address-cells = <1>;
179 #size-cells = <0>;
180 compatible = "fsl,gianfar-tbi";
181 reg = <0x25520 0x20>;
182
183 tbi1: tbi-phy@11 {
184 reg = <0x11>;
185 device_type = "tbi-phy";
186 };
187 };
188
189 enet0: ethernet@24000 { 142 enet0: ethernet@24000 {
143 #address-cells = <1>;
144 #size-cells = <1>;
190 cell-index = <0>; 145 cell-index = <0>;
191 device_type = "network"; 146 device_type = "network";
192 model = "TSEC"; 147 model = "TSEC";
193 compatible = "gianfar"; 148 compatible = "gianfar";
194 reg = <0x24000 0x1000>; 149 reg = <0x24000 0x1000>;
150 ranges = <0x0 0x24000 0x1000>;
195 local-mac-address = [ 00 00 00 00 00 00 ]; 151 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 152 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
197 interrupt-parent = <&mpic>; 153 interrupt-parent = <&mpic>;
198 tbi-handle = <&tbi0>; 154 tbi-handle = <&tbi0>;
199 phy-handle = <&phy0>; 155 phy-handle = <&phy0>;
156
157 mdio@520 {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 compatible = "fsl,gianfar-mdio";
161 reg = <0x520 0x20>;
162 phy0: ethernet-phy@19 {
163 interrupt-parent = <&mpic>;
164 interrupts = <0x6 0x1>;
165 reg = <0x19>;
166 device_type = "ethernet-phy";
167 };
168 phy1: ethernet-phy@1a {
169 interrupt-parent = <&mpic>;
170 interrupts = <0x7 0x1>;
171 reg = <0x1a>;
172 device_type = "ethernet-phy";
173 };
174 phy2: ethernet-phy@1b {
175 interrupt-parent = <&mpic>;
176 interrupts = <0x8 0x1>;
177 reg = <0x1b>;
178 device_type = "ethernet-phy";
179 };
180 phy3: ethernet-phy@1c {
181 interrupt-parent = <&mpic>;
182 interrupts = <0x8 0x1>;
183 reg = <0x1c>;
184 device_type = "ethernet-phy";
185 };
186 tbi0: tbi-phy@11 {
187 reg = <0x11>;
188 device_type = "tbi-phy";
189 };
190 };
200 }; 191 };
201 192
202 enet1: ethernet@25000 { 193 enet1: ethernet@25000 {
194 #address-cells = <1>;
195 #size-cells = <1>;
203 cell-index = <1>; 196 cell-index = <1>;
204 device_type = "network"; 197 device_type = "network";
205 model = "TSEC"; 198 model = "TSEC";
206 compatible = "gianfar"; 199 compatible = "gianfar";
207 reg = <0x25000 0x1000>; 200 reg = <0x25000 0x1000>;
201 ranges = <0x0 0x25000 0x1000>;
208 local-mac-address = [ 00 00 00 00 00 00 ]; 202 local-mac-address = [ 00 00 00 00 00 00 ];
209 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 203 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
210 interrupt-parent = <&mpic>; 204 interrupt-parent = <&mpic>;
211 tbi-handle = <&tbi1>; 205 tbi-handle = <&tbi1>;
212 phy-handle = <&phy1>; 206 phy-handle = <&phy1>;
207
208 mdio@520 {
209 #address-cells = <1>;
210 #size-cells = <0>;
211 compatible = "fsl,gianfar-tbi";
212 reg = <0x520 0x20>;
213
214 tbi1: tbi-phy@11 {
215 reg = <0x11>;
216 device_type = "tbi-phy";
217 };
218 };
213 }; 219 };
214 220
215 mpic: pic@40000 { 221 mpic: pic@40000 {
diff --git a/arch/powerpc/boot/dts/sbc8641d.dts b/arch/powerpc/boot/dts/sbc8641d.dts
index 36db981548e4..e3e914e78caa 100644
--- a/arch/powerpc/boot/dts/sbc8641d.dts
+++ b/arch/powerpc/boot/dts/sbc8641d.dts
@@ -192,132 +192,144 @@
192 }; 192 };
193 }; 193 };
194 194
195 mdio@24520 {
196 #address-cells = <1>;
197 #size-cells = <0>;
198 compatible = "fsl,gianfar-mdio";
199 reg = <0x24520 0x20>;
200
201 phy0: ethernet-phy@1f {
202 interrupt-parent = <&mpic>;
203 interrupts = <10 1>;
204 reg = <0x1f>;
205 device_type = "ethernet-phy";
206 };
207 phy1: ethernet-phy@0 {
208 interrupt-parent = <&mpic>;
209 interrupts = <10 1>;
210 reg = <0>;
211 device_type = "ethernet-phy";
212 };
213 phy2: ethernet-phy@1 {
214 interrupt-parent = <&mpic>;
215 interrupts = <10 1>;
216 reg = <1>;
217 device_type = "ethernet-phy";
218 };
219 phy3: ethernet-phy@2 {
220 interrupt-parent = <&mpic>;
221 interrupts = <10 1>;
222 reg = <2>;
223 device_type = "ethernet-phy";
224 };
225 tbi0: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
230
231 mdio@25520 {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 compatible = "fsl,gianfar-tbi";
235 reg = <0x25520 0x20>;
236
237 tbi1: tbi-phy@11 {
238 reg = <0x11>;
239 device_type = "tbi-phy";
240 };
241 };
242
243 mdio@26520 {
244 #address-cells = <1>;
245 #size-cells = <0>;
246 compatible = "fsl,gianfar-tbi";
247 reg = <0x26520 0x20>;
248
249 tbi2: tbi-phy@11 {
250 reg = <0x11>;
251 device_type = "tbi-phy";
252 };
253 };
254
255 mdio@27520 {
256 #address-cells = <1>;
257 #size-cells = <0>;
258 compatible = "fsl,gianfar-tbi";
259 reg = <0x27520 0x20>;
260
261 tbi3: tbi-phy@11 {
262 reg = <0x11>;
263 device_type = "tbi-phy";
264 };
265 };
266
267 enet0: ethernet@24000 { 195 enet0: ethernet@24000 {
196 #address-cells = <1>;
197 #size-cells = <1>;
268 cell-index = <0>; 198 cell-index = <0>;
269 device_type = "network"; 199 device_type = "network";
270 model = "TSEC"; 200 model = "TSEC";
271 compatible = "gianfar"; 201 compatible = "gianfar";
272 reg = <0x24000 0x1000>; 202 reg = <0x24000 0x1000>;
203 ranges = <0x0 0x24000 0x1000>;
273 local-mac-address = [ 00 00 00 00 00 00 ]; 204 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <29 2 30 2 34 2>; 205 interrupts = <29 2 30 2 34 2>;
275 interrupt-parent = <&mpic>; 206 interrupt-parent = <&mpic>;
276 tbi-handle = <&tbi0>; 207 tbi-handle = <&tbi0>;
277 phy-handle = <&phy0>; 208 phy-handle = <&phy0>;
278 phy-connection-type = "rgmii-id"; 209 phy-connection-type = "rgmii-id";
210
211 mdio@520 {
212 #address-cells = <1>;
213 #size-cells = <0>;
214 compatible = "fsl,gianfar-mdio";
215 reg = <0x520 0x20>;
216
217 phy0: ethernet-phy@1f {
218 interrupt-parent = <&mpic>;
219 interrupts = <10 1>;
220 reg = <0x1f>;
221 device_type = "ethernet-phy";
222 };
223 phy1: ethernet-phy@0 {
224 interrupt-parent = <&mpic>;
225 interrupts = <10 1>;
226 reg = <0>;
227 device_type = "ethernet-phy";
228 };
229 phy2: ethernet-phy@1 {
230 interrupt-parent = <&mpic>;
231 interrupts = <10 1>;
232 reg = <1>;
233 device_type = "ethernet-phy";
234 };
235 phy3: ethernet-phy@2 {
236 interrupt-parent = <&mpic>;
237 interrupts = <10 1>;
238 reg = <2>;
239 device_type = "ethernet-phy";
240 };
241 tbi0: tbi-phy@11 {
242 reg = <0x11>;
243 device_type = "tbi-phy";
244 };
245 };
279 }; 246 };
280 247
281 enet1: ethernet@25000 { 248 enet1: ethernet@25000 {
249 #address-cells = <1>;
250 #size-cells = <1>;
282 cell-index = <1>; 251 cell-index = <1>;
283 device_type = "network"; 252 device_type = "network";
284 model = "TSEC"; 253 model = "TSEC";
285 compatible = "gianfar"; 254 compatible = "gianfar";
286 reg = <0x25000 0x1000>; 255 reg = <0x25000 0x1000>;
256 ranges = <0x0 0x25000 0x1000>;
287 local-mac-address = [ 00 00 00 00 00 00 ]; 257 local-mac-address = [ 00 00 00 00 00 00 ];
288 interrupts = <35 2 36 2 40 2>; 258 interrupts = <35 2 36 2 40 2>;
289 interrupt-parent = <&mpic>; 259 interrupt-parent = <&mpic>;
290 tbi-handle = <&tbi1>; 260 tbi-handle = <&tbi1>;
291 phy-handle = <&phy1>; 261 phy-handle = <&phy1>;
292 phy-connection-type = "rgmii-id"; 262 phy-connection-type = "rgmii-id";
263
264 mdio@520 {
265 #address-cells = <1>;
266 #size-cells = <0>;
267 compatible = "fsl,gianfar-tbi";
268 reg = <0x520 0x20>;
269
270 tbi1: tbi-phy@11 {
271 reg = <0x11>;
272 device_type = "tbi-phy";
273 };
274 };
293 }; 275 };
294 276
295 enet2: ethernet@26000 { 277 enet2: ethernet@26000 {
278 #address-cells = <1>;
279 #size-cells = <1>;
296 cell-index = <2>; 280 cell-index = <2>;
297 device_type = "network"; 281 device_type = "network";
298 model = "TSEC"; 282 model = "TSEC";
299 compatible = "gianfar"; 283 compatible = "gianfar";
300 reg = <0x26000 0x1000>; 284 reg = <0x26000 0x1000>;
285 ranges = <0x0 0x26000 0x1000>;
301 local-mac-address = [ 00 00 00 00 00 00 ]; 286 local-mac-address = [ 00 00 00 00 00 00 ];
302 interrupts = <31 2 32 2 33 2>; 287 interrupts = <31 2 32 2 33 2>;
303 interrupt-parent = <&mpic>; 288 interrupt-parent = <&mpic>;
304 tbi-handle = <&tbi2>; 289 tbi-handle = <&tbi2>;
305 phy-handle = <&phy2>; 290 phy-handle = <&phy2>;
306 phy-connection-type = "rgmii-id"; 291 phy-connection-type = "rgmii-id";
292
293 mdio@520 {
294 #address-cells = <1>;
295 #size-cells = <0>;
296 compatible = "fsl,gianfar-tbi";
297 reg = <0x520 0x20>;
298
299 tbi2: tbi-phy@11 {
300 reg = <0x11>;
301 device_type = "tbi-phy";
302 };
303 };
307 }; 304 };
308 305
309 enet3: ethernet@27000 { 306 enet3: ethernet@27000 {
307 #address-cells = <1>;
308 #size-cells = <1>;
310 cell-index = <3>; 309 cell-index = <3>;
311 device_type = "network"; 310 device_type = "network";
312 model = "TSEC"; 311 model = "TSEC";
313 compatible = "gianfar"; 312 compatible = "gianfar";
314 reg = <0x27000 0x1000>; 313 reg = <0x27000 0x1000>;
314 ranges = <0x0 0x27000 0x1000>;
315 local-mac-address = [ 00 00 00 00 00 00 ]; 315 local-mac-address = [ 00 00 00 00 00 00 ];
316 interrupts = <37 2 38 2 39 2>; 316 interrupts = <37 2 38 2 39 2>;
317 interrupt-parent = <&mpic>; 317 interrupt-parent = <&mpic>;
318 tbi-handle = <&tbi3>; 318 tbi-handle = <&tbi3>;
319 phy-handle = <&phy3>; 319 phy-handle = <&phy3>;
320 phy-connection-type = "rgmii-id"; 320 phy-connection-type = "rgmii-id";
321
322 mdio@520 {
323 #address-cells = <1>;
324 #size-cells = <0>;
325 compatible = "fsl,gianfar-tbi";
326 reg = <0x520 0x20>;
327
328 tbi3: tbi-phy@11 {
329 reg = <0x11>;
330 device_type = "tbi-phy";
331 };
332 };
321 }; 333 };
322 334
323 serial0: serial@4500 { 335 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/socrates.dts b/arch/powerpc/boot/dts/socrates.dts
new file mode 100644
index 000000000000..7a6ae75a1e57
--- /dev/null
+++ b/arch/powerpc/boot/dts/socrates.dts
@@ -0,0 +1,339 @@
1/*
2 * Device Tree Source for the Socrates board (MPC8544).
3 *
4 * Copyright (c) 2008 Emcraft Systems.
5 * Sergei Poselenov, <sposelenov@emcraft.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/dts-v1/;
14
15/ {
16 model = "abb,socrates";
17 compatible = "abb,socrates";
18 #address-cells = <1>;
19 #size-cells = <1>;
20
21 aliases {
22 ethernet0 = &enet0;
23 ethernet1 = &enet1;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 PowerPC,8544@0 {
34 device_type = "cpu";
35 reg = <0>;
36 d-cache-line-size = <32>;
37 i-cache-line-size = <32>;
38 d-cache-size = <0x8000>; // L1, 32K
39 i-cache-size = <0x8000>; // L1, 32K
40 timebase-frequency = <0>;
41 bus-frequency = <0>;
42 clock-frequency = <0>;
43 next-level-cache = <&L2>;
44 };
45 };
46
47 memory {
48 device_type = "memory";
49 reg = <0x00000000 0x00000000>; // Filled in by U-Boot
50 };
51
52 soc8544@e0000000 {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 device_type = "soc";
56
57 ranges = <0x00000000 0xe0000000 0x00100000>;
58 reg = <0xe0000000 0x00001000>; // CCSRBAR 1M
59 bus-frequency = <0>; // Filled in by U-Boot
60 compatible = "fsl,mpc8544-immr", "simple-bus";
61
62 memory-controller@2000 {
63 compatible = "fsl,mpc8544-memory-controller";
64 reg = <0x2000 0x1000>;
65 interrupt-parent = <&mpic>;
66 interrupts = <18 2>;
67 };
68
69 L2: l2-cache-controller@20000 {
70 compatible = "fsl,mpc8544-l2-cache-controller";
71 reg = <0x20000 0x1000>;
72 cache-line-size = <32>;
73 cache-size = <0x40000>; // L2, 256K
74 interrupt-parent = <&mpic>;
75 interrupts = <16 2>;
76 };
77
78 i2c@3000 {
79 #address-cells = <1>;
80 #size-cells = <0>;
81 cell-index = <0>;
82 compatible = "fsl,mpc8544-i2c", "fsl-i2c";
83 reg = <0x3000 0x100>;
84 interrupts = <43 2>;
85 interrupt-parent = <&mpic>;
86 fsl,preserve-clocking;
87
88 dtt@28 {
89 compatible = "winbond,w83782d";
90 reg = <0x28>;
91 };
92 rtc@32 {
93 compatible = "epson,rx8025";
94 reg = <0x32>;
95 interrupts = <7 1>;
96 interrupt-parent = <&mpic>;
97 };
98 dtt@4c {
99 compatible = "dallas,ds75";
100 reg = <0x4c>;
101 };
102 ts@4a {
103 compatible = "ti,tsc2003";
104 reg = <0x4a>;
105 interrupt-parent = <&mpic>;
106 interrupts = <8 1>;
107 };
108 };
109
110 i2c@3100 {
111 #address-cells = <1>;
112 #size-cells = <0>;
113 cell-index = <1>;
114 compatible = "fsl,mpc8544-i2c", "fsl-i2c";
115 reg = <0x3100 0x100>;
116 interrupts = <43 2>;
117 interrupt-parent = <&mpic>;
118 fsl,preserve-clocking;
119 };
120
121 enet0: ethernet@24000 {
122 #address-cells = <1>;
123 #size-cells = <1>;
124 cell-index = <0>;
125 device_type = "network";
126 model = "eTSEC";
127 compatible = "gianfar";
128 reg = <0x24000 0x1000>;
129 ranges = <0x0 0x24000 0x1000>;
130 local-mac-address = [ 00 00 00 00 00 00 ];
131 interrupts = <29 2 30 2 34 2>;
132 interrupt-parent = <&mpic>;
133 phy-handle = <&phy0>;
134 tbi-handle = <&tbi0>;
135 phy-connection-type = "rgmii-id";
136
137 mdio@520 {
138 #address-cells = <1>;
139 #size-cells = <0>;
140 compatible = "fsl,gianfar-mdio";
141 reg = <0x520 0x20>;
142
143 phy0: ethernet-phy@0 {
144 interrupt-parent = <&mpic>;
145 interrupts = <0 1>;
146 reg = <0>;
147 };
148 phy1: ethernet-phy@1 {
149 interrupt-parent = <&mpic>;
150 interrupts = <0 1>;
151 reg = <1>;
152 };
153 tbi0: tbi-phy@11 {
154 reg = <0x11>;
155 };
156 };
157 };
158
159 enet1: ethernet@26000 {
160 #address-cells = <1>;
161 #size-cells = <1>;
162 cell-index = <1>;
163 device_type = "network";
164 model = "eTSEC";
165 compatible = "gianfar";
166 reg = <0x26000 0x1000>;
167 ranges = <0x0 0x26000 0x1000>;
168 local-mac-address = [ 00 00 00 00 00 00 ];
169 interrupts = <31 2 32 2 33 2>;
170 interrupt-parent = <&mpic>;
171 phy-handle = <&phy1>;
172 tbi-handle = <&tbi1>;
173 phy-connection-type = "rgmii-id";
174
175 mdio@520 {
176 #address-cells = <1>;
177 #size-cells = <0>;
178 compatible = "fsl,gianfar-tbi";
179 reg = <0x520 0x20>;
180
181 tbi1: tbi-phy@11 {
182 reg = <0x11>;
183 };
184 };
185 };
186
187 serial0: serial@4500 {
188 cell-index = <0>;
189 device_type = "serial";
190 compatible = "ns16550";
191 reg = <0x4500 0x100>;
192 clock-frequency = <0>;
193 interrupts = <42 2>;
194 interrupt-parent = <&mpic>;
195 };
196
197 serial1: serial@4600 {
198 cell-index = <1>;
199 device_type = "serial";
200 compatible = "ns16550";
201 reg = <0x4600 0x100>;
202 clock-frequency = <0>;
203 interrupts = <42 2>;
204 interrupt-parent = <&mpic>;
205 };
206
207 global-utilities@e0000 { //global utilities block
208 compatible = "fsl,mpc8548-guts";
209 reg = <0xe0000 0x1000>;
210 fsl,has-rstcr;
211 };
212
213 mpic: pic@40000 {
214 interrupt-controller;
215 #address-cells = <0>;
216 #interrupt-cells = <2>;
217 reg = <0x40000 0x40000>;
218 compatible = "chrp,open-pic";
219 device_type = "open-pic";
220 };
221 };
222
223
224 localbus {
225 compatible = "fsl,mpc8544-localbus",
226 "fsl,pq3-localbus",
227 "simple-bus";
228 #address-cells = <2>;
229 #size-cells = <1>;
230 reg = <0xe0005000 0x40>;
231
232 ranges = <0 0 0xfc000000 0x04000000
233 2 0 0xc8000000 0x04000000
234 3 0 0xc0000000 0x00100000
235 >; /* Overwritten by U-Boot */
236
237 nor_flash@0,0 {
238 compatible = "amd,s29gl256n", "cfi-flash";
239 bank-width = <2>;
240 reg = <0x0 0x000000 0x4000000>;
241 #address-cells = <1>;
242 #size-cells = <1>;
243 partition@0 {
244 label = "kernel";
245 reg = <0x0 0x1e0000>;
246 read-only;
247 };
248 partition@1e0000 {
249 label = "dtb";
250 reg = <0x1e0000 0x20000>;
251 };
252 partition@200000 {
253 label = "root";
254 reg = <0x200000 0x200000>;
255 };
256 partition@400000 {
257 label = "user";
258 reg = <0x400000 0x3b80000>;
259 };
260 partition@3f80000 {
261 label = "env";
262 reg = <0x3f80000 0x40000>;
263 read-only;
264 };
265 partition@3fc0000 {
266 label = "u-boot";
267 reg = <0x3fc0000 0x40000>;
268 read-only;
269 };
270 };
271
272 display@2,0 {
273 compatible = "fujitsu,lime";
274 reg = <2 0x0 0x4000000>;
275 interrupt-parent = <&mpic>;
276 interrupts = <6 1>;
277 };
278
279 fpga_pic: fpga-pic@3,10 {
280 compatible = "abb,socrates-fpga-pic";
281 reg = <3 0x10 0x10>;
282 interrupt-controller;
283 /* IRQs 2, 10, 11, active low, level-sensitive */
284 interrupts = <2 1 10 1 11 1>;
285 interrupt-parent = <&mpic>;
286 #interrupt-cells = <3>;
287 };
288
289 spi@3,60 {
290 compatible = "abb,socrates-spi";
291 reg = <3 0x60 0x10>;
292 interrupts = <8 4 0>; // number, type, routing
293 interrupt-parent = <&fpga_pic>;
294 };
295
296 nand@3,70 {
297 compatible = "abb,socrates-nand";
298 reg = <3 0x70 0x04>;
299 bank-width = <1>;
300 #address-cells = <1>;
301 #size-cells = <1>;
302 data@0 {
303 label = "data";
304 reg = <0x0 0x40000000>;
305 };
306 };
307
308 can@3,100 {
309 compatible = "philips,sja1000";
310 reg = <3 0x100 0x80>;
311 interrupts = <2 8 1>; // number, type, routing
312 interrupt-parent = <&fpga_pic>;
313 };
314 };
315
316 pci0: pci@e0008000 {
317 cell-index = <0>;
318 #interrupt-cells = <1>;
319 #size-cells = <2>;
320 #address-cells = <3>;
321 compatible = "fsl,mpc8540-pci";
322 device_type = "pci";
323 reg = <0xe0008000 0x1000>;
324 clock-frequency = <66666666>;
325
326 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
327 interrupt-map = <
328 /* IDSEL 0x11 */
329 0x8800 0x0 0x0 1 &mpic 5 1
330 /* IDSEL 0x12 */
331 0x9000 0x0 0x0 1 &mpic 4 1>;
332 interrupt-parent = <&mpic>;
333 interrupts = <24 2>;
334 bus-range = <0x0 0x0>;
335 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000
336 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x01000000>;
337 };
338
339};
diff --git a/arch/powerpc/boot/dts/stx_gp3_8560.dts b/arch/powerpc/boot/dts/stx_gp3_8560.dts
index fff33fe6efc6..ea6b15152de3 100644
--- a/arch/powerpc/boot/dts/stx_gp3_8560.dts
+++ b/arch/powerpc/boot/dts/stx_gp3_8560.dts
@@ -57,14 +57,14 @@
57 compatible = "fsl,mpc8560-immr", "simple-bus"; 57 compatible = "fsl,mpc8560-immr", "simple-bus";
58 58
59 memory-controller@2000 { 59 memory-controller@2000 {
60 compatible = "fsl,8540-memory-controller"; 60 compatible = "fsl,mpc8540-memory-controller";
61 reg = <0x2000 0x1000>; 61 reg = <0x2000 0x1000>;
62 interrupt-parent = <&mpic>; 62 interrupt-parent = <&mpic>;
63 interrupts = <18 2>; 63 interrupts = <18 2>;
64 }; 64 };
65 65
66 L2: l2-cache-controller@20000 { 66 L2: l2-cache-controller@20000 {
67 compatible = "fsl,8540-l2-cache-controller"; 67 compatible = "fsl,mpc8540-l2-cache-controller";
68 reg = <0x20000 0x1000>; 68 reg = <0x20000 0x1000>;
69 cache-line-size = <32>; 69 cache-line-size = <32>;
70 cache-size = <0x40000>; // L2, 256K 70 cache-size = <0x40000>; // L2, 256K
@@ -124,66 +124,72 @@
124 }; 124 };
125 }; 125 };
126 126
127 mdio@24520 {
128 #address-cells = <1>;
129 #size-cells = <0>;
130 compatible = "fsl,gianfar-mdio";
131 reg = <0x24520 0x20>;
132
133 phy2: ethernet-phy@2 {
134 interrupt-parent = <&mpic>;
135 interrupts = <5 4>;
136 reg = <2>;
137 device_type = "ethernet-phy";
138 };
139 phy4: ethernet-phy@4 {
140 interrupt-parent = <&mpic>;
141 interrupts = <5 4>;
142 reg = <4>;
143 device_type = "ethernet-phy";
144 };
145 tbi0: tbi-phy@11 {
146 reg = <0x11>;
147 device_type = "tbi-phy";
148 };
149 };
150
151 mdio@25520 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "fsl,gianfar-tbi";
155 reg = <0x25520 0x20>;
156
157 tbi1: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163 enet0: ethernet@24000 { 127 enet0: ethernet@24000 {
128 #address-cells = <1>;
129 #size-cells = <1>;
164 cell-index = <0>; 130 cell-index = <0>;
165 device_type = "network"; 131 device_type = "network";
166 model = "TSEC"; 132 model = "TSEC";
167 compatible = "gianfar"; 133 compatible = "gianfar";
168 reg = <0x24000 0x1000>; 134 reg = <0x24000 0x1000>;
135 ranges = <0x0 0x24000 0x1000>;
169 local-mac-address = [ 00 00 00 00 00 00 ]; 136 local-mac-address = [ 00 00 00 00 00 00 ];
170 interrupts = <29 2 30 2 34 2>; 137 interrupts = <29 2 30 2 34 2>;
171 interrupt-parent = <&mpic>; 138 interrupt-parent = <&mpic>;
172 tbi-handle = <&tbi0>; 139 tbi-handle = <&tbi0>;
173 phy-handle = <&phy2>; 140 phy-handle = <&phy2>;
141
142 mdio@520 {
143 #address-cells = <1>;
144 #size-cells = <0>;
145 compatible = "fsl,gianfar-mdio";
146 reg = <0x520 0x20>;
147
148 phy2: ethernet-phy@2 {
149 interrupt-parent = <&mpic>;
150 interrupts = <5 4>;
151 reg = <2>;
152 device_type = "ethernet-phy";
153 };
154 phy4: ethernet-phy@4 {
155 interrupt-parent = <&mpic>;
156 interrupts = <5 4>;
157 reg = <4>;
158 device_type = "ethernet-phy";
159 };
160 tbi0: tbi-phy@11 {
161 reg = <0x11>;
162 device_type = "tbi-phy";
163 };
164 };
174 }; 165 };
175 166
176 enet1: ethernet@25000 { 167 enet1: ethernet@25000 {
168 #address-cells = <1>;
169 #size-cells = <1>;
177 cell-index = <1>; 170 cell-index = <1>;
178 device_type = "network"; 171 device_type = "network";
179 model = "TSEC"; 172 model = "TSEC";
180 compatible = "gianfar"; 173 compatible = "gianfar";
181 reg = <0x25000 0x1000>; 174 reg = <0x25000 0x1000>;
175 ranges = <0x0 0x25000 0x1000>;
182 local-mac-address = [ 00 00 00 00 00 00 ]; 176 local-mac-address = [ 00 00 00 00 00 00 ];
183 interrupts = <35 2 36 2 40 2>; 177 interrupts = <35 2 36 2 40 2>;
184 interrupt-parent = <&mpic>; 178 interrupt-parent = <&mpic>;
185 tbi-handle = <&tbi1>; 179 tbi-handle = <&tbi1>;
186 phy-handle = <&phy4>; 180 phy-handle = <&phy4>;
181
182 mdio@520 {
183 #address-cells = <1>;
184 #size-cells = <0>;
185 compatible = "fsl,gianfar-tbi";
186 reg = <0x520 0x20>;
187
188 tbi1: tbi-phy@11 {
189 reg = <0x11>;
190 device_type = "tbi-phy";
191 };
192 };
187 }; 193 };
188 194
189 mpic: pic@40000 { 195 mpic: pic@40000 {
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index 906302e26a62..c9590b58b7b0 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -17,6 +17,7 @@
17 compatible = "tqc,tqm5200"; 17 compatible = "tqc,tqm5200";
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 interrupt-parent = <&mpc5200_pic>;
20 21
21 cpus { 22 cpus {
22 #address-cells = <1>; 23 #address-cells = <1>;
@@ -66,36 +67,33 @@
66 compatible = "fsl,mpc5200-gpt"; 67 compatible = "fsl,mpc5200-gpt";
67 reg = <0x600 0x10>; 68 reg = <0x600 0x10>;
68 interrupts = <1 9 0>; 69 interrupts = <1 9 0>;
69 interrupt-parent = <&mpc5200_pic>;
70 fsl,has-wdt; 70 fsl,has-wdt;
71 }; 71 };
72 72
73 can@900 { 73 can@900 {
74 compatible = "fsl,mpc5200-mscan"; 74 compatible = "fsl,mpc5200-mscan";
75 interrupts = <2 17 0>; 75 interrupts = <2 17 0>;
76 interrupt-parent = <&mpc5200_pic>;
77 reg = <0x900 0x80>; 76 reg = <0x900 0x80>;
78 }; 77 };
79 78
80 can@980 { 79 can@980 {
81 compatible = "fsl,mpc5200-mscan"; 80 compatible = "fsl,mpc5200-mscan";
82 interrupts = <2 18 0>; 81 interrupts = <2 18 0>;
83 interrupt-parent = <&mpc5200_pic>;
84 reg = <0x980 0x80>; 82 reg = <0x980 0x80>;
85 }; 83 };
86 84
87 gpio@b00 { 85 gpio_simple: gpio@b00 {
88 compatible = "fsl,mpc5200-gpio"; 86 compatible = "fsl,mpc5200-gpio";
89 reg = <0xb00 0x40>; 87 reg = <0xb00 0x40>;
90 interrupts = <1 7 0>; 88 interrupts = <1 7 0>;
91 interrupt-parent = <&mpc5200_pic>; 89 gpio-controller;
90 #gpio-cells = <2>;
92 }; 91 };
93 92
94 usb@1000 { 93 usb@1000 {
95 compatible = "fsl,mpc5200-ohci","ohci-be"; 94 compatible = "fsl,mpc5200-ohci","ohci-be";
96 reg = <0x1000 0xff>; 95 reg = <0x1000 0xff>;
97 interrupts = <2 6 0>; 96 interrupts = <2 6 0>;
98 interrupt-parent = <&mpc5200_pic>;
99 }; 97 };
100 98
101 dma-controller@1200 { 99 dma-controller@1200 {
@@ -105,7 +103,6 @@
105 3 4 0 3 5 0 3 6 0 3 7 0 103 3 4 0 3 5 0 3 6 0 3 7 0
106 3 8 0 3 9 0 3 10 0 3 11 0 104 3 8 0 3 9 0 3 10 0 3 11 0
107 3 12 0 3 13 0 3 14 0 3 15 0>; 105 3 12 0 3 13 0 3 14 0 3 15 0>;
108 interrupt-parent = <&mpc5200_pic>;
109 }; 106 };
110 107
111 xlb@1f00 { 108 xlb@1f00 {
@@ -114,39 +111,28 @@
114 }; 111 };
115 112
116 serial@2000 { // PSC1 113 serial@2000 { // PSC1
117 device_type = "serial";
118 compatible = "fsl,mpc5200-psc-uart"; 114 compatible = "fsl,mpc5200-psc-uart";
119 port-number = <0>; // Logical port assignment
120 reg = <0x2000 0x100>; 115 reg = <0x2000 0x100>;
121 interrupts = <2 1 0>; 116 interrupts = <2 1 0>;
122 interrupt-parent = <&mpc5200_pic>;
123 }; 117 };
124 118
125 serial@2200 { // PSC2 119 serial@2200 { // PSC2
126 device_type = "serial";
127 compatible = "fsl,mpc5200-psc-uart"; 120 compatible = "fsl,mpc5200-psc-uart";
128 port-number = <1>; // Logical port assignment
129 reg = <0x2200 0x100>; 121 reg = <0x2200 0x100>;
130 interrupts = <2 2 0>; 122 interrupts = <2 2 0>;
131 interrupt-parent = <&mpc5200_pic>;
132 }; 123 };
133 124
134 serial@2400 { // PSC3 125 serial@2400 { // PSC3
135 device_type = "serial";
136 compatible = "fsl,mpc5200-psc-uart"; 126 compatible = "fsl,mpc5200-psc-uart";
137 port-number = <2>; // Logical port assignment
138 reg = <0x2400 0x100>; 127 reg = <0x2400 0x100>;
139 interrupts = <2 3 0>; 128 interrupts = <2 3 0>;
140 interrupt-parent = <&mpc5200_pic>;
141 }; 129 };
142 130
143 ethernet@3000 { 131 ethernet@3000 {
144 device_type = "network";
145 compatible = "fsl,mpc5200-fec"; 132 compatible = "fsl,mpc5200-fec";
146 reg = <0x3000 0x400>; 133 reg = <0x3000 0x400>;
147 local-mac-address = [ 00 00 00 00 00 00 ]; 134 local-mac-address = [ 00 00 00 00 00 00 ];
148 interrupts = <2 5 0>; 135 interrupts = <2 5 0>;
149 interrupt-parent = <&mpc5200_pic>;
150 phy-handle = <&phy0>; 136 phy-handle = <&phy0>;
151 }; 137 };
152 138
@@ -156,10 +142,8 @@
156 compatible = "fsl,mpc5200-mdio"; 142 compatible = "fsl,mpc5200-mdio";
157 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 143 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
158 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 144 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
159 interrupt-parent = <&mpc5200_pic>;
160 145
161 phy0: ethernet-phy@0 { 146 phy0: ethernet-phy@0 {
162 device_type = "ethernet-phy";
163 reg = <0>; 147 reg = <0>;
164 }; 148 };
165 }; 149 };
@@ -168,7 +152,6 @@
168 compatible = "fsl,mpc5200-ata"; 152 compatible = "fsl,mpc5200-ata";
169 reg = <0x3a00 0x100>; 153 reg = <0x3a00 0x100>;
170 interrupts = <2 7 0>; 154 interrupts = <2 7 0>;
171 interrupt-parent = <&mpc5200_pic>;
172 }; 155 };
173 156
174 i2c@3d40 { 157 i2c@3d40 {
@@ -177,7 +160,6 @@
177 compatible = "fsl,mpc5200-i2c","fsl-i2c"; 160 compatible = "fsl,mpc5200-i2c","fsl-i2c";
178 reg = <0x3d40 0x40>; 161 reg = <0x3d40 0x40>;
179 interrupts = <2 16 0>; 162 interrupts = <2 16 0>;
180 interrupt-parent = <&mpc5200_pic>;
181 fsl5200-clocking; 163 fsl5200-clocking;
182 164
183 rtc@68 { 165 rtc@68 {
@@ -192,9 +174,8 @@
192 }; 174 };
193 }; 175 };
194 176
195 lpb { 177 localbus {
196 model = "fsl,lpb"; 178 compatible = "fsl,mpc5200-lpb","simple-bus";
197 compatible = "fsl,lpb";
198 #address-cells = <2>; 179 #address-cells = <2>;
199 #size-cells = <1>; 180 #size-cells = <1>;
200 ranges = <0 0 0xfc000000 0x02000000>; 181 ranges = <0 0 0xfc000000 0x02000000>;
@@ -223,7 +204,6 @@
223 0xc000 0 0 4 &mpc5200_pic 0 0 3>; 204 0xc000 0 0 4 &mpc5200_pic 0 0 3>;
224 clock-frequency = <0>; // From boot loader 205 clock-frequency = <0>; // From boot loader
225 interrupts = <2 8 0 2 9 0 2 10 0>; 206 interrupts = <2 8 0 2 9 0 2 10 0>;
226 interrupt-parent = <&mpc5200_pic>;
227 bus-range = <0 0>; 207 bus-range = <0 0>;
228 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000 208 ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
229 0x02000000 0 0x90000000 0x90000000 0 0x10000000 209 0x02000000 0 0x90000000 0x90000000 0 0x10000000
diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts
index a693f01c21aa..231bae756637 100644
--- a/arch/powerpc/boot/dts/tqm8540.dts
+++ b/arch/powerpc/boot/dts/tqm8540.dts
@@ -59,14 +59,14 @@
59 compatible = "fsl,mpc8540-immr", "simple-bus"; 59 compatible = "fsl,mpc8540-immr", "simple-bus";
60 60
61 memory-controller@2000 { 61 memory-controller@2000 {
62 compatible = "fsl,8540-memory-controller"; 62 compatible = "fsl,mpc8540-memory-controller";
63 reg = <0x2000 0x1000>; 63 reg = <0x2000 0x1000>;
64 interrupt-parent = <&mpic>; 64 interrupt-parent = <&mpic>;
65 interrupts = <18 2>; 65 interrupts = <18 2>;
66 }; 66 };
67 67
68 L2: l2-cache-controller@20000 { 68 L2: l2-cache-controller@20000 {
69 compatible = "fsl,8540-l2-cache-controller"; 69 compatible = "fsl,mpc8540-l2-cache-controller";
70 reg = <0x20000 0x1000>; 70 reg = <0x20000 0x1000>;
71 cache-line-size = <32>; 71 cache-line-size = <32>;
72 cache-size = <0x40000>; // L2, 256K 72 cache-size = <0x40000>; // L2, 256K
@@ -84,6 +84,11 @@
84 interrupt-parent = <&mpic>; 84 interrupt-parent = <&mpic>;
85 dfsrr; 85 dfsrr;
86 86
87 dtt@50 {
88 compatible = "national,lm75";
89 reg = <0x50>;
90 };
91
87 rtc@68 { 92 rtc@68 {
88 compatible = "dallas,ds1337"; 93 compatible = "dallas,ds1337";
89 reg = <0x68>; 94 reg = <0x68>;
@@ -131,94 +136,103 @@
131 }; 136 };
132 }; 137 };
133 138
134 mdio@24520 {
135 #address-cells = <1>;
136 #size-cells = <0>;
137 compatible = "fsl,gianfar-mdio";
138 reg = <0x24520 0x20>;
139
140 phy1: ethernet-phy@1 {
141 interrupt-parent = <&mpic>;
142 interrupts = <8 1>;
143 reg = <1>;
144 device_type = "ethernet-phy";
145 };
146 phy2: ethernet-phy@2 {
147 interrupt-parent = <&mpic>;
148 interrupts = <8 1>;
149 reg = <2>;
150 device_type = "ethernet-phy";
151 };
152 phy3: ethernet-phy@3 {
153 interrupt-parent = <&mpic>;
154 interrupts = <8 1>;
155 reg = <3>;
156 device_type = "ethernet-phy";
157 };
158 tbi0: tbi-phy@11 {
159 reg = <0x11>;
160 device_type = "tbi-phy";
161 };
162 };
163
164 mdio@25520 {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 compatible = "fsl,gianfar-tbi";
168 reg = <0x25520 0x20>;
169
170 tbi1: tbi-phy@11 {
171 reg = <0x11>;
172 device_type = "tbi-phy";
173 };
174 };
175
176 mdio@26520 {
177 #address-cells = <1>;
178 #size-cells = <0>;
179 compatible = "fsl,gianfar-tbi";
180 reg = <0x26520 0x20>;
181
182 tbi2: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 enet0: ethernet@24000 { 139 enet0: ethernet@24000 {
140 #address-cells = <1>;
141 #size-cells = <1>;
189 cell-index = <0>; 142 cell-index = <0>;
190 device_type = "network"; 143 device_type = "network";
191 model = "TSEC"; 144 model = "TSEC";
192 compatible = "gianfar"; 145 compatible = "gianfar";
193 reg = <0x24000 0x1000>; 146 reg = <0x24000 0x1000>;
147 ranges = <0x0 0x24000 0x1000>;
194 local-mac-address = [ 00 00 00 00 00 00 ]; 148 local-mac-address = [ 00 00 00 00 00 00 ];
195 interrupts = <29 2 30 2 34 2>; 149 interrupts = <29 2 30 2 34 2>;
196 interrupt-parent = <&mpic>; 150 interrupt-parent = <&mpic>;
197 phy-handle = <&phy2>; 151 phy-handle = <&phy2>;
152
153 mdio@520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-mdio";
157 reg = <0x520 0x20>;
158
159 phy1: ethernet-phy@1 {
160 interrupt-parent = <&mpic>;
161 interrupts = <8 1>;
162 reg = <1>;
163 device_type = "ethernet-phy";
164 };
165 phy2: ethernet-phy@2 {
166 interrupt-parent = <&mpic>;
167 interrupts = <8 1>;
168 reg = <2>;
169 device_type = "ethernet-phy";
170 };
171 phy3: ethernet-phy@3 {
172 interrupt-parent = <&mpic>;
173 interrupts = <8 1>;
174 reg = <3>;
175 device_type = "ethernet-phy";
176 };
177 tbi0: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
181 };
198 }; 182 };
199 183
200 enet1: ethernet@25000 { 184 enet1: ethernet@25000 {
185 #address-cells = <1>;
186 #size-cells = <1>;
201 cell-index = <1>; 187 cell-index = <1>;
202 device_type = "network"; 188 device_type = "network";
203 model = "TSEC"; 189 model = "TSEC";
204 compatible = "gianfar"; 190 compatible = "gianfar";
205 reg = <0x25000 0x1000>; 191 reg = <0x25000 0x1000>;
192 ranges = <0x0 0x25000 0x1000>;
206 local-mac-address = [ 00 00 00 00 00 00 ]; 193 local-mac-address = [ 00 00 00 00 00 00 ];
207 interrupts = <35 2 36 2 40 2>; 194 interrupts = <35 2 36 2 40 2>;
208 interrupt-parent = <&mpic>; 195 interrupt-parent = <&mpic>;
209 phy-handle = <&phy1>; 196 phy-handle = <&phy1>;
197
198 mdio@520 {
199 #address-cells = <1>;
200 #size-cells = <0>;
201 compatible = "fsl,gianfar-tbi";
202 reg = <0x520 0x20>;
203
204 tbi1: tbi-phy@11 {
205 reg = <0x11>;
206 device_type = "tbi-phy";
207 };
208 };
210 }; 209 };
211 210
212 enet2: ethernet@26000 { 211 enet2: ethernet@26000 {
212 #address-cells = <1>;
213 #size-cells = <1>;
213 cell-index = <2>; 214 cell-index = <2>;
214 device_type = "network"; 215 device_type = "network";
215 model = "FEC"; 216 model = "FEC";
216 compatible = "gianfar"; 217 compatible = "gianfar";
217 reg = <0x26000 0x1000>; 218 reg = <0x26000 0x1000>;
219 ranges = <0x0 0x26000 0x1000>;
218 local-mac-address = [ 00 00 00 00 00 00 ]; 220 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <41 2>; 221 interrupts = <41 2>;
220 interrupt-parent = <&mpic>; 222 interrupt-parent = <&mpic>;
221 phy-handle = <&phy3>; 223 phy-handle = <&phy3>;
224
225 mdio@520 {
226 #address-cells = <1>;
227 #size-cells = <0>;
228 compatible = "fsl,gianfar-tbi";
229 reg = <0x520 0x20>;
230
231 tbi2: tbi-phy@11 {
232 reg = <0x11>;
233 device_type = "tbi-phy";
234 };
235 };
222 }; 236 };
223 237
224 serial0: serial@4500 { 238 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts
index 9e3f5f0dde20..4356a1f08295 100644
--- a/arch/powerpc/boot/dts/tqm8541.dts
+++ b/arch/powerpc/boot/dts/tqm8541.dts
@@ -58,14 +58,14 @@
58 compatible = "fsl,mpc8541-immr", "simple-bus"; 58 compatible = "fsl,mpc8541-immr", "simple-bus";
59 59
60 memory-controller@2000 { 60 memory-controller@2000 {
61 compatible = "fsl,8540-memory-controller"; 61 compatible = "fsl,mpc8540-memory-controller";
62 reg = <0x2000 0x1000>; 62 reg = <0x2000 0x1000>;
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <18 2>; 64 interrupts = <18 2>;
65 }; 65 };
66 66
67 L2: l2-cache-controller@20000 { 67 L2: l2-cache-controller@20000 {
68 compatible = "fsl,8540-l2-cache-controller"; 68 compatible = "fsl,mpc8540-l2-cache-controller";
69 reg = <0x20000 0x1000>; 69 reg = <0x20000 0x1000>;
70 cache-line-size = <32>; 70 cache-line-size = <32>;
71 cache-size = <0x40000>; // L2, 256K 71 cache-size = <0x40000>; // L2, 256K
@@ -83,6 +83,11 @@
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 dfsrr; 84 dfsrr;
85 85
86 dtt@50 {
87 compatible = "national,lm75";
88 reg = <0x50>;
89 };
90
86 rtc@68 { 91 rtc@68 {
87 compatible = "dallas,ds1337"; 92 compatible = "dallas,ds1337";
88 reg = <0x68>; 93 reg = <0x68>;
@@ -130,72 +135,78 @@
130 }; 135 };
131 }; 136 };
132 137
133 mdio@24520 {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 compatible = "fsl,gianfar-mdio";
137 reg = <0x24520 0x20>;
138
139 phy1: ethernet-phy@1 {
140 interrupt-parent = <&mpic>;
141 interrupts = <8 1>;
142 reg = <1>;
143 device_type = "ethernet-phy";
144 };
145 phy2: ethernet-phy@2 {
146 interrupt-parent = <&mpic>;
147 interrupts = <8 1>;
148 reg = <2>;
149 device_type = "ethernet-phy";
150 };
151 phy3: ethernet-phy@3 {
152 interrupt-parent = <&mpic>;
153 interrupts = <8 1>;
154 reg = <3>;
155 device_type = "ethernet-phy";
156 };
157 tbi0: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163 mdio@25520 {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 compatible = "fsl,gianfar-tbi";
167 reg = <0x25520 0x20>;
168
169 tbi1: tbi-phy@11 {
170 reg = <0x11>;
171 device_type = "tbi-phy";
172 };
173 };
174
175 enet0: ethernet@24000 { 138 enet0: ethernet@24000 {
139 #address-cells = <1>;
140 #size-cells = <1>;
176 cell-index = <0>; 141 cell-index = <0>;
177 device_type = "network"; 142 device_type = "network";
178 model = "TSEC"; 143 model = "TSEC";
179 compatible = "gianfar"; 144 compatible = "gianfar";
180 reg = <0x24000 0x1000>; 145 reg = <0x24000 0x1000>;
146 ranges = <0x0 0x24000 0x1000>;
181 local-mac-address = [ 00 00 00 00 00 00 ]; 147 local-mac-address = [ 00 00 00 00 00 00 ];
182 interrupts = <29 2 30 2 34 2>; 148 interrupts = <29 2 30 2 34 2>;
183 interrupt-parent = <&mpic>; 149 interrupt-parent = <&mpic>;
184 tbi-handle = <&tbi0>; 150 tbi-handle = <&tbi0>;
185 phy-handle = <&phy2>; 151 phy-handle = <&phy2>;
152
153 mdio@520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-mdio";
157 reg = <0x520 0x20>;
158
159 phy1: ethernet-phy@1 {
160 interrupt-parent = <&mpic>;
161 interrupts = <8 1>;
162 reg = <1>;
163 device_type = "ethernet-phy";
164 };
165 phy2: ethernet-phy@2 {
166 interrupt-parent = <&mpic>;
167 interrupts = <8 1>;
168 reg = <2>;
169 device_type = "ethernet-phy";
170 };
171 phy3: ethernet-phy@3 {
172 interrupt-parent = <&mpic>;
173 interrupts = <8 1>;
174 reg = <3>;
175 device_type = "ethernet-phy";
176 };
177 tbi0: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
181 };
186 }; 182 };
187 183
188 enet1: ethernet@25000 { 184 enet1: ethernet@25000 {
185 #address-cells = <1>;
186 #size-cells = <1>;
189 cell-index = <1>; 187 cell-index = <1>;
190 device_type = "network"; 188 device_type = "network";
191 model = "TSEC"; 189 model = "TSEC";
192 compatible = "gianfar"; 190 compatible = "gianfar";
193 reg = <0x25000 0x1000>; 191 reg = <0x25000 0x1000>;
192 ranges = <0x0 0x25000 0x1000>;
194 local-mac-address = [ 00 00 00 00 00 00 ]; 193 local-mac-address = [ 00 00 00 00 00 00 ];
195 interrupts = <35 2 36 2 40 2>; 194 interrupts = <35 2 36 2 40 2>;
196 interrupt-parent = <&mpic>; 195 interrupt-parent = <&mpic>;
197 tbi-handle = <&tbi1>; 196 tbi-handle = <&tbi1>;
198 phy-handle = <&phy1>; 197 phy-handle = <&phy1>;
198
199 mdio@520 {
200 #address-cells = <1>;
201 #size-cells = <0>;
202 compatible = "fsl,gianfar-tbi";
203 reg = <0x520 0x20>;
204
205 tbi1: tbi-phy@11 {
206 reg = <0x11>;
207 device_type = "tbi-phy";
208 };
209 };
199 }; 210 };
200 211
201 serial0: serial@4500 { 212 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/tqm8548-bigflash.dts b/arch/powerpc/boot/dts/tqm8548-bigflash.dts
index 15086eb65c50..19aa72301c83 100644
--- a/arch/powerpc/boot/dts/tqm8548-bigflash.dts
+++ b/arch/powerpc/boot/dts/tqm8548-bigflash.dts
@@ -85,6 +85,11 @@
85 interrupt-parent = <&mpic>; 85 interrupt-parent = <&mpic>;
86 dfsrr; 86 dfsrr;
87 87
88 dtt@50 {
89 compatible = "national,lm75";
90 reg = <0x50>;
91 };
92
88 rtc@68 { 93 rtc@68 {
89 compatible = "dallas,ds1337"; 94 compatible = "dallas,ds1337";
90 reg = <0x68>; 95 reg = <0x68>;
@@ -143,134 +148,146 @@
143 }; 148 };
144 }; 149 };
145 150
146 mdio@24520 {
147 #address-cells = <1>;
148 #size-cells = <0>;
149 compatible = "fsl,gianfar-mdio";
150 reg = <0x24520 0x20>;
151
152 phy1: ethernet-phy@0 {
153 interrupt-parent = <&mpic>;
154 interrupts = <8 1>;
155 reg = <1>;
156 device_type = "ethernet-phy";
157 };
158 phy2: ethernet-phy@1 {
159 interrupt-parent = <&mpic>;
160 interrupts = <8 1>;
161 reg = <2>;
162 device_type = "ethernet-phy";
163 };
164 phy3: ethernet-phy@3 {
165 interrupt-parent = <&mpic>;
166 interrupts = <8 1>;
167 reg = <3>;
168 device_type = "ethernet-phy";
169 };
170 phy4: ethernet-phy@4 {
171 interrupt-parent = <&mpic>;
172 interrupts = <8 1>;
173 reg = <4>;
174 device_type = "ethernet-phy";
175 };
176 phy5: ethernet-phy@5 {
177 interrupt-parent = <&mpic>;
178 interrupts = <8 1>;
179 reg = <5>;
180 device_type = "ethernet-phy";
181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
199
200 mdio@26520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-tbi";
204 reg = <0x26520 0x20>;
205
206 tbi2: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
211
212 mdio@27520 {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 compatible = "fsl,gianfar-tbi";
216 reg = <0x27520 0x20>;
217
218 tbi3: tbi-phy@11 {
219 reg = <0x11>;
220 device_type = "tbi-phy";
221 };
222 };
223
224 enet0: ethernet@24000 { 151 enet0: ethernet@24000 {
152 #address-cells = <1>;
153 #size-cells = <1>;
225 cell-index = <0>; 154 cell-index = <0>;
226 device_type = "network"; 155 device_type = "network";
227 model = "eTSEC"; 156 model = "eTSEC";
228 compatible = "gianfar"; 157 compatible = "gianfar";
229 reg = <0x24000 0x1000>; 158 reg = <0x24000 0x1000>;
159 ranges = <0x0 0x24000 0x1000>;
230 local-mac-address = [ 00 00 00 00 00 00 ]; 160 local-mac-address = [ 00 00 00 00 00 00 ];
231 interrupts = <29 2 30 2 34 2>; 161 interrupts = <29 2 30 2 34 2>;
232 interrupt-parent = <&mpic>; 162 interrupt-parent = <&mpic>;
233 tbi-handle = <&tbi0>; 163 tbi-handle = <&tbi0>;
234 phy-handle = <&phy2>; 164 phy-handle = <&phy2>;
165
166 mdio@520 {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 compatible = "fsl,gianfar-mdio";
170 reg = <0x520 0x20>;
171
172 phy1: ethernet-phy@0 {
173 interrupt-parent = <&mpic>;
174 interrupts = <8 1>;
175 reg = <1>;
176 device_type = "ethernet-phy";
177 };
178 phy2: ethernet-phy@1 {
179 interrupt-parent = <&mpic>;
180 interrupts = <8 1>;
181 reg = <2>;
182 device_type = "ethernet-phy";
183 };
184 phy3: ethernet-phy@3 {
185 interrupt-parent = <&mpic>;
186 interrupts = <8 1>;
187 reg = <3>;
188 device_type = "ethernet-phy";
189 };
190 phy4: ethernet-phy@4 {
191 interrupt-parent = <&mpic>;
192 interrupts = <8 1>;
193 reg = <4>;
194 device_type = "ethernet-phy";
195 };
196 phy5: ethernet-phy@5 {
197 interrupt-parent = <&mpic>;
198 interrupts = <8 1>;
199 reg = <5>;
200 device_type = "ethernet-phy";
201 };
202 tbi0: tbi-phy@11 {
203 reg = <0x11>;
204 device_type = "tbi-phy";
205 };
206 };
235 }; 207 };
236 208
237 enet1: ethernet@25000 { 209 enet1: ethernet@25000 {
210 #address-cells = <1>;
211 #size-cells = <1>;
238 cell-index = <1>; 212 cell-index = <1>;
239 device_type = "network"; 213 device_type = "network";
240 model = "eTSEC"; 214 model = "eTSEC";
241 compatible = "gianfar"; 215 compatible = "gianfar";
242 reg = <0x25000 0x1000>; 216 reg = <0x25000 0x1000>;
217 ranges = <0x0 0x25000 0x1000>;
243 local-mac-address = [ 00 00 00 00 00 00 ]; 218 local-mac-address = [ 00 00 00 00 00 00 ];
244 interrupts = <35 2 36 2 40 2>; 219 interrupts = <35 2 36 2 40 2>;
245 interrupt-parent = <&mpic>; 220 interrupt-parent = <&mpic>;
246 tbi-handle = <&tbi1>; 221 tbi-handle = <&tbi1>;
247 phy-handle = <&phy1>; 222 phy-handle = <&phy1>;
223
224 mdio@520 {
225 #address-cells = <1>;
226 #size-cells = <0>;
227 compatible = "fsl,gianfar-tbi";
228 reg = <0x520 0x20>;
229
230 tbi1: tbi-phy@11 {
231 reg = <0x11>;
232 device_type = "tbi-phy";
233 };
234 };
248 }; 235 };
249 236
250 enet2: ethernet@26000 { 237 enet2: ethernet@26000 {
238 #address-cells = <1>;
239 #size-cells = <1>;
251 cell-index = <2>; 240 cell-index = <2>;
252 device_type = "network"; 241 device_type = "network";
253 model = "eTSEC"; 242 model = "eTSEC";
254 compatible = "gianfar"; 243 compatible = "gianfar";
255 reg = <0x26000 0x1000>; 244 reg = <0x26000 0x1000>;
245 ranges = <0x0 0x26000 0x1000>;
256 local-mac-address = [ 00 00 00 00 00 00 ]; 246 local-mac-address = [ 00 00 00 00 00 00 ];
257 interrupts = <31 2 32 2 33 2>; 247 interrupts = <31 2 32 2 33 2>;
258 interrupt-parent = <&mpic>; 248 interrupt-parent = <&mpic>;
259 tbi-handle = <&tbi2>; 249 tbi-handle = <&tbi2>;
260 phy-handle = <&phy3>; 250 phy-handle = <&phy3>;
251
252 mdio@520 {
253 #address-cells = <1>;
254 #size-cells = <0>;
255 compatible = "fsl,gianfar-tbi";
256 reg = <0x520 0x20>;
257
258 tbi2: tbi-phy@11 {
259 reg = <0x11>;
260 device_type = "tbi-phy";
261 };
262 };
261 }; 263 };
262 264
263 enet3: ethernet@27000 { 265 enet3: ethernet@27000 {
266 #address-cells = <1>;
267 #size-cells = <1>;
264 cell-index = <3>; 268 cell-index = <3>;
265 device_type = "network"; 269 device_type = "network";
266 model = "eTSEC"; 270 model = "eTSEC";
267 compatible = "gianfar"; 271 compatible = "gianfar";
268 reg = <0x27000 0x1000>; 272 reg = <0x27000 0x1000>;
273 ranges = <0x0 0x27000 0x1000>;
269 local-mac-address = [ 00 00 00 00 00 00 ]; 274 local-mac-address = [ 00 00 00 00 00 00 ];
270 interrupts = <37 2 38 2 39 2>; 275 interrupts = <37 2 38 2 39 2>;
271 interrupt-parent = <&mpic>; 276 interrupt-parent = <&mpic>;
272 tbi-handle = <&tbi3>; 277 tbi-handle = <&tbi3>;
273 phy-handle = <&phy4>; 278 phy-handle = <&phy4>;
279
280 mdio@520 {
281 #address-cells = <1>;
282 #size-cells = <0>;
283 compatible = "fsl,gianfar-tbi";
284 reg = <0x520 0x20>;
285
286 tbi3: tbi-phy@11 {
287 reg = <0x11>;
288 device_type = "tbi-phy";
289 };
290 };
274 }; 291 };
275 292
276 serial0: serial@4500 { 293 serial0: serial@4500 {
@@ -365,14 +382,14 @@
365 can0@2,0 { 382 can0@2,0 {
366 compatible = "intel,82527"; // Bosch CC770 383 compatible = "intel,82527"; // Bosch CC770
367 reg = <2 0x0 0x100>; 384 reg = <2 0x0 0x100>;
368 interrupts = <4 0>; 385 interrupts = <4 1>;
369 interrupt-parent = <&mpic>; 386 interrupt-parent = <&mpic>;
370 }; 387 };
371 388
372 can1@2,100 { 389 can1@2,100 {
373 compatible = "intel,82527"; // Bosch CC770 390 compatible = "intel,82527"; // Bosch CC770
374 reg = <2 0x100 0x100>; 391 reg = <2 0x100 0x100>;
375 interrupts = <4 0>; 392 interrupts = <4 1>;
376 interrupt-parent = <&mpic>; 393 interrupt-parent = <&mpic>;
377 }; 394 };
378 395
@@ -380,10 +397,13 @@
380 upm@3,0 { 397 upm@3,0 {
381 #address-cells = <0>; 398 #address-cells = <0>;
382 #size-cells = <0>; 399 #size-cells = <0>;
383 compatible = "fsl,upm-nand"; 400 compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
384 reg = <3 0x0 0x800>; 401 reg = <3 0x0 0x800>;
385 fsl,upm-addr-offset = <0x10>; 402 fsl,upm-addr-offset = <0x10>;
386 fsl,upm-cmd-offset = <0x08>; 403 fsl,upm-cmd-offset = <0x08>;
404 /* Micron MT29F8G08FAB multi-chip device */
405 fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
406 fsl,upm-wait-flags = <0x5>;
387 chip-delay = <25>; // in micro-seconds 407 chip-delay = <25>; // in micro-seconds
388 408
389 nand@0 { 409 nand@0 {
@@ -392,7 +412,7 @@
392 412
393 partition@0 { 413 partition@0 {
394 label = "fs"; 414 label = "fs";
395 reg = <0x00000000 0x01000000>; 415 reg = <0x00000000 0x10000000>;
396 }; 416 };
397 }; 417 };
398 }; 418 };
diff --git a/arch/powerpc/boot/dts/tqm8548.dts b/arch/powerpc/boot/dts/tqm8548.dts
index b7b65f5e79b6..49145a04fc6c 100644
--- a/arch/powerpc/boot/dts/tqm8548.dts
+++ b/arch/powerpc/boot/dts/tqm8548.dts
@@ -85,6 +85,11 @@
85 interrupt-parent = <&mpic>; 85 interrupt-parent = <&mpic>;
86 dfsrr; 86 dfsrr;
87 87
88 dtt@50 {
89 compatible = "national,lm75";
90 reg = <0x50>;
91 };
92
88 rtc@68 { 93 rtc@68 {
89 compatible = "dallas,ds1337"; 94 compatible = "dallas,ds1337";
90 reg = <0x68>; 95 reg = <0x68>;
@@ -143,134 +148,146 @@
143 }; 148 };
144 }; 149 };
145 150
146 mdio@24520 {
147 #address-cells = <1>;
148 #size-cells = <0>;
149 compatible = "fsl,gianfar-mdio";
150 reg = <0x24520 0x20>;
151
152 phy1: ethernet-phy@0 {
153 interrupt-parent = <&mpic>;
154 interrupts = <8 1>;
155 reg = <1>;
156 device_type = "ethernet-phy";
157 };
158 phy2: ethernet-phy@1 {
159 interrupt-parent = <&mpic>;
160 interrupts = <8 1>;
161 reg = <2>;
162 device_type = "ethernet-phy";
163 };
164 phy3: ethernet-phy@3 {
165 interrupt-parent = <&mpic>;
166 interrupts = <8 1>;
167 reg = <3>;
168 device_type = "ethernet-phy";
169 };
170 phy4: ethernet-phy@4 {
171 interrupt-parent = <&mpic>;
172 interrupts = <8 1>;
173 reg = <4>;
174 device_type = "ethernet-phy";
175 };
176 phy5: ethernet-phy@5 {
177 interrupt-parent = <&mpic>;
178 interrupts = <8 1>;
179 reg = <5>;
180 device_type = "ethernet-phy";
181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
199
200 mdio@26520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-tbi";
204 reg = <0x26520 0x20>;
205
206 tbi2: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
211
212 mdio@27520 {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 compatible = "fsl,gianfar-tbi";
216 reg = <0x27520 0x20>;
217
218 tbi3: tbi-phy@11 {
219 reg = <0x11>;
220 device_type = "tbi-phy";
221 };
222 };
223
224 enet0: ethernet@24000 { 151 enet0: ethernet@24000 {
152 #address-cells = <1>;
153 #size-cells = <1>;
225 cell-index = <0>; 154 cell-index = <0>;
226 device_type = "network"; 155 device_type = "network";
227 model = "eTSEC"; 156 model = "eTSEC";
228 compatible = "gianfar"; 157 compatible = "gianfar";
229 reg = <0x24000 0x1000>; 158 reg = <0x24000 0x1000>;
159 ranges = <0x0 0x24000 0x1000>;
230 local-mac-address = [ 00 00 00 00 00 00 ]; 160 local-mac-address = [ 00 00 00 00 00 00 ];
231 interrupts = <29 2 30 2 34 2>; 161 interrupts = <29 2 30 2 34 2>;
232 interrupt-parent = <&mpic>; 162 interrupt-parent = <&mpic>;
233 tbi-handle = <&tbi0>; 163 tbi-handle = <&tbi0>;
234 phy-handle = <&phy2>; 164 phy-handle = <&phy2>;
165
166 mdio@520 {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 compatible = "fsl,gianfar-mdio";
170 reg = <0x520 0x20>;
171
172 phy1: ethernet-phy@0 {
173 interrupt-parent = <&mpic>;
174 interrupts = <8 1>;
175 reg = <1>;
176 device_type = "ethernet-phy";
177 };
178 phy2: ethernet-phy@1 {
179 interrupt-parent = <&mpic>;
180 interrupts = <8 1>;
181 reg = <2>;
182 device_type = "ethernet-phy";
183 };
184 phy3: ethernet-phy@3 {
185 interrupt-parent = <&mpic>;
186 interrupts = <8 1>;
187 reg = <3>;
188 device_type = "ethernet-phy";
189 };
190 phy4: ethernet-phy@4 {
191 interrupt-parent = <&mpic>;
192 interrupts = <8 1>;
193 reg = <4>;
194 device_type = "ethernet-phy";
195 };
196 phy5: ethernet-phy@5 {
197 interrupt-parent = <&mpic>;
198 interrupts = <8 1>;
199 reg = <5>;
200 device_type = "ethernet-phy";
201 };
202 tbi0: tbi-phy@11 {
203 reg = <0x11>;
204 device_type = "tbi-phy";
205 };
206 };
235 }; 207 };
236 208
237 enet1: ethernet@25000 { 209 enet1: ethernet@25000 {
210 #address-cells = <1>;
211 #size-cells = <1>;
238 cell-index = <1>; 212 cell-index = <1>;
239 device_type = "network"; 213 device_type = "network";
240 model = "eTSEC"; 214 model = "eTSEC";
241 compatible = "gianfar"; 215 compatible = "gianfar";
242 reg = <0x25000 0x1000>; 216 reg = <0x25000 0x1000>;
217 ranges = <0x0 0x25000 0x1000>;
243 local-mac-address = [ 00 00 00 00 00 00 ]; 218 local-mac-address = [ 00 00 00 00 00 00 ];
244 interrupts = <35 2 36 2 40 2>; 219 interrupts = <35 2 36 2 40 2>;
245 interrupt-parent = <&mpic>; 220 interrupt-parent = <&mpic>;
246 tbi-handle = <&tbi1>; 221 tbi-handle = <&tbi1>;
247 phy-handle = <&phy1>; 222 phy-handle = <&phy1>;
223
224 mdio@520 {
225 #address-cells = <1>;
226 #size-cells = <0>;
227 compatible = "fsl,gianfar-tbi";
228 reg = <0x520 0x20>;
229
230 tbi1: tbi-phy@11 {
231 reg = <0x11>;
232 device_type = "tbi-phy";
233 };
234 };
248 }; 235 };
249 236
250 enet2: ethernet@26000 { 237 enet2: ethernet@26000 {
238 #address-cells = <1>;
239 #size-cells = <1>;
251 cell-index = <2>; 240 cell-index = <2>;
252 device_type = "network"; 241 device_type = "network";
253 model = "eTSEC"; 242 model = "eTSEC";
254 compatible = "gianfar"; 243 compatible = "gianfar";
255 reg = <0x26000 0x1000>; 244 reg = <0x26000 0x1000>;
245 ranges = <0x0 0x26000 0x1000>;
256 local-mac-address = [ 00 00 00 00 00 00 ]; 246 local-mac-address = [ 00 00 00 00 00 00 ];
257 interrupts = <31 2 32 2 33 2>; 247 interrupts = <31 2 32 2 33 2>;
258 interrupt-parent = <&mpic>; 248 interrupt-parent = <&mpic>;
259 tbi-handle = <&tbi2>; 249 tbi-handle = <&tbi2>;
260 phy-handle = <&phy3>; 250 phy-handle = <&phy3>;
251
252 mdio@520 {
253 #address-cells = <1>;
254 #size-cells = <0>;
255 compatible = "fsl,gianfar-tbi";
256 reg = <0x520 0x20>;
257
258 tbi2: tbi-phy@11 {
259 reg = <0x11>;
260 device_type = "tbi-phy";
261 };
262 };
261 }; 263 };
262 264
263 enet3: ethernet@27000 { 265 enet3: ethernet@27000 {
266 #address-cells = <1>;
267 #size-cells = <1>;
264 cell-index = <3>; 268 cell-index = <3>;
265 device_type = "network"; 269 device_type = "network";
266 model = "eTSEC"; 270 model = "eTSEC";
267 compatible = "gianfar"; 271 compatible = "gianfar";
268 reg = <0x27000 0x1000>; 272 reg = <0x27000 0x1000>;
273 ranges = <0x0 0x27000 0x1000>;
269 local-mac-address = [ 00 00 00 00 00 00 ]; 274 local-mac-address = [ 00 00 00 00 00 00 ];
270 interrupts = <37 2 38 2 39 2>; 275 interrupts = <37 2 38 2 39 2>;
271 interrupt-parent = <&mpic>; 276 interrupt-parent = <&mpic>;
272 tbi-handle = <&tbi3>; 277 tbi-handle = <&tbi3>;
273 phy-handle = <&phy4>; 278 phy-handle = <&phy4>;
279
280 mdio@520 {
281 #address-cells = <1>;
282 #size-cells = <0>;
283 compatible = "fsl,gianfar-tbi";
284 reg = <0x520 0x20>;
285
286 tbi3: tbi-phy@11 {
287 reg = <0x11>;
288 device_type = "tbi-phy";
289 };
290 };
274 }; 291 };
275 292
276 serial0: serial@4500 { 293 serial0: serial@4500 {
@@ -365,14 +382,14 @@
365 can0@2,0 { 382 can0@2,0 {
366 compatible = "intel,82527"; // Bosch CC770 383 compatible = "intel,82527"; // Bosch CC770
367 reg = <2 0x0 0x100>; 384 reg = <2 0x0 0x100>;
368 interrupts = <4 0>; 385 interrupts = <4 1>;
369 interrupt-parent = <&mpic>; 386 interrupt-parent = <&mpic>;
370 }; 387 };
371 388
372 can1@2,100 { 389 can1@2,100 {
373 compatible = "intel,82527"; // Bosch CC770 390 compatible = "intel,82527"; // Bosch CC770
374 reg = <2 0x100 0x100>; 391 reg = <2 0x100 0x100>;
375 interrupts = <4 0>; 392 interrupts = <4 1>;
376 interrupt-parent = <&mpic>; 393 interrupt-parent = <&mpic>;
377 }; 394 };
378 395
@@ -380,10 +397,13 @@
380 upm@3,0 { 397 upm@3,0 {
381 #address-cells = <0>; 398 #address-cells = <0>;
382 #size-cells = <0>; 399 #size-cells = <0>;
383 compatible = "fsl,upm-nand"; 400 compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
384 reg = <3 0x0 0x800>; 401 reg = <3 0x0 0x800>;
385 fsl,upm-addr-offset = <0x10>; 402 fsl,upm-addr-offset = <0x10>;
386 fsl,upm-cmd-offset = <0x08>; 403 fsl,upm-cmd-offset = <0x08>;
404 /* Micron MT29F8G08FAB multi-chip device */
405 fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
406 fsl,upm-wait-flags = <0x5>;
387 chip-delay = <25>; // in micro-seconds 407 chip-delay = <25>; // in micro-seconds
388 408
389 nand@0 { 409 nand@0 {
@@ -392,7 +412,7 @@
392 412
393 partition@0 { 413 partition@0 {
394 label = "fs"; 414 label = "fs";
395 reg = <0x00000000 0x01000000>; 415 reg = <0x00000000 0x10000000>;
396 }; 416 };
397 }; 417 };
398 }; 418 };
diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts
index cf92b4e7945e..06d366ebbda3 100644
--- a/arch/powerpc/boot/dts/tqm8555.dts
+++ b/arch/powerpc/boot/dts/tqm8555.dts
@@ -58,14 +58,14 @@
58 compatible = "fsl,mpc8555-immr", "simple-bus"; 58 compatible = "fsl,mpc8555-immr", "simple-bus";
59 59
60 memory-controller@2000 { 60 memory-controller@2000 {
61 compatible = "fsl,8540-memory-controller"; 61 compatible = "fsl,mpc8540-memory-controller";
62 reg = <0x2000 0x1000>; 62 reg = <0x2000 0x1000>;
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <18 2>; 64 interrupts = <18 2>;
65 }; 65 };
66 66
67 L2: l2-cache-controller@20000 { 67 L2: l2-cache-controller@20000 {
68 compatible = "fsl,8540-l2-cache-controller"; 68 compatible = "fsl,mpc8540-l2-cache-controller";
69 reg = <0x20000 0x1000>; 69 reg = <0x20000 0x1000>;
70 cache-line-size = <32>; 70 cache-line-size = <32>;
71 cache-size = <0x40000>; // L2, 256K 71 cache-size = <0x40000>; // L2, 256K
@@ -83,6 +83,11 @@
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 dfsrr; 84 dfsrr;
85 85
86 dtt@50 {
87 compatible = "national,lm75";
88 reg = <0x50>;
89 };
90
86 rtc@68 { 91 rtc@68 {
87 compatible = "dallas,ds1337"; 92 compatible = "dallas,ds1337";
88 reg = <0x68>; 93 reg = <0x68>;
@@ -130,72 +135,78 @@
130 }; 135 };
131 }; 136 };
132 137
133 mdio@24520 {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 compatible = "fsl,gianfar-mdio";
137 reg = <0x24520 0x20>;
138
139 phy1: ethernet-phy@1 {
140 interrupt-parent = <&mpic>;
141 interrupts = <8 1>;
142 reg = <1>;
143 device_type = "ethernet-phy";
144 };
145 phy2: ethernet-phy@2 {
146 interrupt-parent = <&mpic>;
147 interrupts = <8 1>;
148 reg = <2>;
149 device_type = "ethernet-phy";
150 };
151 phy3: ethernet-phy@3 {
152 interrupt-parent = <&mpic>;
153 interrupts = <8 1>;
154 reg = <3>;
155 device_type = "ethernet-phy";
156 };
157 tbi0: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163 mdio@25520 {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 compatible = "fsl,gianfar-tbi";
167 reg = <0x25520 0x20>;
168
169 tbi1: tbi-phy@11 {
170 reg = <0x11>;
171 device_type = "tbi-phy";
172 };
173 };
174
175 enet0: ethernet@24000 { 138 enet0: ethernet@24000 {
139 #address-cells = <1>;
140 #size-cells = <1>;
176 cell-index = <0>; 141 cell-index = <0>;
177 device_type = "network"; 142 device_type = "network";
178 model = "TSEC"; 143 model = "TSEC";
179 compatible = "gianfar"; 144 compatible = "gianfar";
180 reg = <0x24000 0x1000>; 145 reg = <0x24000 0x1000>;
146 ranges = <0x0 0x24000 0x1000>;
181 local-mac-address = [ 00 00 00 00 00 00 ]; 147 local-mac-address = [ 00 00 00 00 00 00 ];
182 interrupts = <29 2 30 2 34 2>; 148 interrupts = <29 2 30 2 34 2>;
183 interrupt-parent = <&mpic>; 149 interrupt-parent = <&mpic>;
184 tbi-handle = <&tbi0>; 150 tbi-handle = <&tbi0>;
185 phy-handle = <&phy2>; 151 phy-handle = <&phy2>;
152
153 mdio@520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-mdio";
157 reg = <0x520 0x20>;
158
159 phy1: ethernet-phy@1 {
160 interrupt-parent = <&mpic>;
161 interrupts = <8 1>;
162 reg = <1>;
163 device_type = "ethernet-phy";
164 };
165 phy2: ethernet-phy@2 {
166 interrupt-parent = <&mpic>;
167 interrupts = <8 1>;
168 reg = <2>;
169 device_type = "ethernet-phy";
170 };
171 phy3: ethernet-phy@3 {
172 interrupt-parent = <&mpic>;
173 interrupts = <8 1>;
174 reg = <3>;
175 device_type = "ethernet-phy";
176 };
177 tbi0: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
181 };
186 }; 182 };
187 183
188 enet1: ethernet@25000 { 184 enet1: ethernet@25000 {
185 #address-cells = <1>;
186 #size-cells = <1>;
189 cell-index = <1>; 187 cell-index = <1>;
190 device_type = "network"; 188 device_type = "network";
191 model = "TSEC"; 189 model = "TSEC";
192 compatible = "gianfar"; 190 compatible = "gianfar";
193 reg = <0x25000 0x1000>; 191 reg = <0x25000 0x1000>;
192 ranges = <0x0 0x25000 0x1000>;
194 local-mac-address = [ 00 00 00 00 00 00 ]; 193 local-mac-address = [ 00 00 00 00 00 00 ];
195 interrupts = <35 2 36 2 40 2>; 194 interrupts = <35 2 36 2 40 2>;
196 interrupt-parent = <&mpic>; 195 interrupt-parent = <&mpic>;
197 tbi-handle = <&tbi1>; 196 tbi-handle = <&tbi1>;
198 phy-handle = <&phy1>; 197 phy-handle = <&phy1>;
198
199 mdio@520 {
200 #address-cells = <1>;
201 #size-cells = <0>;
202 compatible = "fsl,gianfar-tbi";
203 reg = <0x520 0x20>;
204
205 tbi1: tbi-phy@11 {
206 reg = <0x11>;
207 device_type = "tbi-phy";
208 };
209 };
199 }; 210 };
200 211
201 serial0: serial@4500 { 212 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts
index 9e1ab2d2f669..feff915e0492 100644
--- a/arch/powerpc/boot/dts/tqm8560.dts
+++ b/arch/powerpc/boot/dts/tqm8560.dts
@@ -60,14 +60,14 @@
60 compatible = "fsl,mpc8560-immr", "simple-bus"; 60 compatible = "fsl,mpc8560-immr", "simple-bus";
61 61
62 memory-controller@2000 { 62 memory-controller@2000 {
63 compatible = "fsl,8540-memory-controller"; 63 compatible = "fsl,mpc8540-memory-controller";
64 reg = <0x2000 0x1000>; 64 reg = <0x2000 0x1000>;
65 interrupt-parent = <&mpic>; 65 interrupt-parent = <&mpic>;
66 interrupts = <18 2>; 66 interrupts = <18 2>;
67 }; 67 };
68 68
69 L2: l2-cache-controller@20000 { 69 L2: l2-cache-controller@20000 {
70 compatible = "fsl,8540-l2-cache-controller"; 70 compatible = "fsl,mpc8540-l2-cache-controller";
71 reg = <0x20000 0x1000>; 71 reg = <0x20000 0x1000>;
72 cache-line-size = <32>; 72 cache-line-size = <32>;
73 cache-size = <0x40000>; // L2, 256K 73 cache-size = <0x40000>; // L2, 256K
@@ -85,6 +85,11 @@
85 interrupt-parent = <&mpic>; 85 interrupt-parent = <&mpic>;
86 dfsrr; 86 dfsrr;
87 87
88 dtt@50 {
89 compatible = "national,lm75";
90 reg = <0x50>;
91 };
92
88 rtc@68 { 93 rtc@68 {
89 compatible = "dallas,ds1337"; 94 compatible = "dallas,ds1337";
90 reg = <0x68>; 95 reg = <0x68>;
@@ -132,72 +137,78 @@
132 }; 137 };
133 }; 138 };
134 139
135 mdio@24520 {
136 #address-cells = <1>;
137 #size-cells = <0>;
138 compatible = "fsl,gianfar-mdio";
139 reg = <0x24520 0x20>;
140
141 phy1: ethernet-phy@1 {
142 interrupt-parent = <&mpic>;
143 interrupts = <8 1>;
144 reg = <1>;
145 device_type = "ethernet-phy";
146 };
147 phy2: ethernet-phy@2 {
148 interrupt-parent = <&mpic>;
149 interrupts = <8 1>;
150 reg = <2>;
151 device_type = "ethernet-phy";
152 };
153 phy3: ethernet-phy@3 {
154 interrupt-parent = <&mpic>;
155 interrupts = <8 1>;
156 reg = <3>;
157 device_type = "ethernet-phy";
158 };
159 tbi0: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
163 };
164
165 mdio@25520 {
166 #address-cells = <1>;
167 #size-cells = <0>;
168 compatible = "fsl,gianfar-tbi";
169 reg = <0x25520 0x20>;
170
171 tbi1: tbi-phy@11 {
172 reg = <0x11>;
173 device_type = "tbi-phy";
174 };
175 };
176
177 enet0: ethernet@24000 { 140 enet0: ethernet@24000 {
141 #address-cells = <1>;
142 #size-cells = <1>;
178 cell-index = <0>; 143 cell-index = <0>;
179 device_type = "network"; 144 device_type = "network";
180 model = "TSEC"; 145 model = "TSEC";
181 compatible = "gianfar"; 146 compatible = "gianfar";
182 reg = <0x24000 0x1000>; 147 reg = <0x24000 0x1000>;
148 ranges = <0x0 0x24000 0x1000>;
183 local-mac-address = [ 00 00 00 00 00 00 ]; 149 local-mac-address = [ 00 00 00 00 00 00 ];
184 interrupts = <29 2 30 2 34 2>; 150 interrupts = <29 2 30 2 34 2>;
185 interrupt-parent = <&mpic>; 151 interrupt-parent = <&mpic>;
186 tbi-handle = <&tbi0>; 152 tbi-handle = <&tbi0>;
187 phy-handle = <&phy2>; 153 phy-handle = <&phy2>;
154
155 mdio@520 {
156 #address-cells = <1>;
157 #size-cells = <0>;
158 compatible = "fsl,gianfar-mdio";
159 reg = <0x520 0x20>;
160
161 phy1: ethernet-phy@1 {
162 interrupt-parent = <&mpic>;
163 interrupts = <8 1>;
164 reg = <1>;
165 device_type = "ethernet-phy";
166 };
167 phy2: ethernet-phy@2 {
168 interrupt-parent = <&mpic>;
169 interrupts = <8 1>;
170 reg = <2>;
171 device_type = "ethernet-phy";
172 };
173 phy3: ethernet-phy@3 {
174 interrupt-parent = <&mpic>;
175 interrupts = <8 1>;
176 reg = <3>;
177 device_type = "ethernet-phy";
178 };
179 tbi0: tbi-phy@11 {
180 reg = <0x11>;
181 device_type = "tbi-phy";
182 };
183 };
188 }; 184 };
189 185
190 enet1: ethernet@25000 { 186 enet1: ethernet@25000 {
187 #address-cells = <1>;
188 #size-cells = <1>;
191 cell-index = <1>; 189 cell-index = <1>;
192 device_type = "network"; 190 device_type = "network";
193 model = "TSEC"; 191 model = "TSEC";
194 compatible = "gianfar"; 192 compatible = "gianfar";
195 reg = <0x25000 0x1000>; 193 reg = <0x25000 0x1000>;
194 ranges = <0x0 0x25000 0x1000>;
196 local-mac-address = [ 00 00 00 00 00 00 ]; 195 local-mac-address = [ 00 00 00 00 00 00 ];
197 interrupts = <35 2 36 2 40 2>; 196 interrupts = <35 2 36 2 40 2>;
198 interrupt-parent = <&mpic>; 197 interrupt-parent = <&mpic>;
199 tbi-handle = <&tbi1>; 198 tbi-handle = <&tbi1>;
200 phy-handle = <&phy1>; 199 phy-handle = <&phy1>;
200
201 mdio@520 {
202 #address-cells = <1>;
203 #size-cells = <0>;
204 compatible = "fsl,gianfar-tbi";
205 reg = <0x520 0x20>;
206
207 tbi1: tbi-phy@11 {
208 reg = <0x11>;
209 device_type = "tbi-phy";
210 };
211 };
201 }; 212 };
202 213
203 mpic: pic@40000 { 214 mpic: pic@40000 {
@@ -335,14 +346,14 @@
335 can0@2,0 { 346 can0@2,0 {
336 compatible = "intel,82527"; // Bosch CC770 347 compatible = "intel,82527"; // Bosch CC770
337 reg = <2 0x0 0x100>; 348 reg = <2 0x0 0x100>;
338 interrupts = <4 0>; 349 interrupts = <4 1>;
339 interrupt-parent = <&mpic>; 350 interrupt-parent = <&mpic>;
340 }; 351 };
341 352
342 can1@2,100 { 353 can1@2,100 {
343 compatible = "intel,82527"; // Bosch CC770 354 compatible = "intel,82527"; // Bosch CC770
344 reg = <2 0x100 0x100>; 355 reg = <2 0x100 0x100>;
345 interrupts = <4 0>; 356 interrupts = <4 1>;
346 interrupt-parent = <&mpic>; 357 interrupt-parent = <&mpic>;
347 }; 358 };
348 }; 359 };
diff --git a/arch/powerpc/boot/dts/virtex440-ml507.dts b/arch/powerpc/boot/dts/virtex440-ml507.dts
index dc8e78e2dceb..52d8c1ad26a1 100644
--- a/arch/powerpc/boot/dts/virtex440-ml507.dts
+++ b/arch/powerpc/boot/dts/virtex440-ml507.dts
@@ -7,6 +7,15 @@
7 * This file is licensed under the terms of the GNU General Public License 7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any 8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied. 9 * kind, whether express or implied.
10 *
11 * ---
12 *
13 * Device Tree Generator version: 1.1
14 *
15 * CAUTION: This file is automatically generated by libgen.
16 * Version: Xilinx EDK 10.1.03 EDK_K_SP3.6
17 *
18 * XPS project directory: ml507_ppc440_emb_ref
10 */ 19 */
11 20
12/dts-v1/; 21/dts-v1/;
@@ -22,8 +31,8 @@
22 reg = < 0 0x10000000 >; 31 reg = < 0 0x10000000 >;
23 } ; 32 } ;
24 chosen { 33 chosen {
25 bootargs = "console=ttyS0 ip=on root=/dev/ram"; 34 bootargs = "console=ttyS0 root=/dev/ram";
26 linux,stdout-path = "/plb@0/serial@83e00000"; 35 linux,stdout-path = &RS232_Uart_1;
27 } ; 36 } ;
28 cpus { 37 cpus {
29 #address-cells = <1>; 38 #address-cells = <1>;
@@ -136,19 +145,19 @@
136 compatible = "xlnx,ll-dma-1.00.a"; 145 compatible = "xlnx,ll-dma-1.00.a";
137 dcr-reg = < 0x80 0x11 >; 146 dcr-reg = < 0x80 0x11 >;
138 interrupt-parent = <&xps_intc_0>; 147 interrupt-parent = <&xps_intc_0>;
139 interrupts = < 9 2 0xa 2 >; 148 interrupts = < 10 2 11 2 >;
140 } ; 149 } ;
141 } ; 150 } ;
142 } ; 151 } ;
143 plb_v46_0: plb@0 { 152 plb_v46_0: plb@0 {
144 #address-cells = <1>; 153 #address-cells = <1>;
145 #size-cells = <1>; 154 #size-cells = <1>;
146 compatible = "xlnx,plb-v46-1.02.a", "simple-bus"; 155 compatible = "xlnx,plb-v46-1.03.a", "simple-bus";
147 ranges ; 156 ranges ;
148 DIP_Switches_8Bit: gpio@81460000 { 157 DIP_Switches_8Bit: gpio@81460000 {
149 compatible = "xlnx,xps-gpio-1.00.a"; 158 compatible = "xlnx,xps-gpio-1.00.a";
150 interrupt-parent = <&xps_intc_0>; 159 interrupt-parent = <&xps_intc_0>;
151 interrupts = < 6 2 >; 160 interrupts = < 7 2 >;
152 reg = < 0x81460000 0x10000 >; 161 reg = < 0x81460000 0x10000 >;
153 xlnx,all-inputs = <1>; 162 xlnx,all-inputs = <1>;
154 xlnx,all-inputs-2 = <0>; 163 xlnx,all-inputs-2 = <0>;
@@ -163,6 +172,86 @@
163 xlnx,tri-default = <0xffffffff>; 172 xlnx,tri-default = <0xffffffff>;
164 xlnx,tri-default-2 = <0xffffffff>; 173 xlnx,tri-default-2 = <0xffffffff>;
165 } ; 174 } ;
175 FLASH: flash@fc000000 {
176 bank-width = <2>;
177 compatible = "xlnx,xps-mch-emc-2.00.a", "cfi-flash";
178 reg = < 0xfc000000 0x2000000 >;
179 xlnx,family = "virtex5";
180 xlnx,include-datawidth-matching-0 = <0x1>;
181 xlnx,include-datawidth-matching-1 = <0x0>;
182 xlnx,include-datawidth-matching-2 = <0x0>;
183 xlnx,include-datawidth-matching-3 = <0x0>;
184 xlnx,include-negedge-ioregs = <0x0>;
185 xlnx,include-plb-ipif = <0x1>;
186 xlnx,include-wrbuf = <0x1>;
187 xlnx,max-mem-width = <0x10>;
188 xlnx,mch-native-dwidth = <0x20>;
189 xlnx,mch-plb-clk-period-ps = <0x2710>;
190 xlnx,mch-splb-awidth = <0x20>;
191 xlnx,mch0-accessbuf-depth = <0x10>;
192 xlnx,mch0-protocol = <0x0>;
193 xlnx,mch0-rddatabuf-depth = <0x10>;
194 xlnx,mch1-accessbuf-depth = <0x10>;
195 xlnx,mch1-protocol = <0x0>;
196 xlnx,mch1-rddatabuf-depth = <0x10>;
197 xlnx,mch2-accessbuf-depth = <0x10>;
198 xlnx,mch2-protocol = <0x0>;
199 xlnx,mch2-rddatabuf-depth = <0x10>;
200 xlnx,mch3-accessbuf-depth = <0x10>;
201 xlnx,mch3-protocol = <0x0>;
202 xlnx,mch3-rddatabuf-depth = <0x10>;
203 xlnx,mem0-width = <0x10>;
204 xlnx,mem1-width = <0x20>;
205 xlnx,mem2-width = <0x20>;
206 xlnx,mem3-width = <0x20>;
207 xlnx,num-banks-mem = <0x1>;
208 xlnx,num-channels = <0x2>;
209 xlnx,priority-mode = <0x0>;
210 xlnx,synch-mem-0 = <0x0>;
211 xlnx,synch-mem-1 = <0x0>;
212 xlnx,synch-mem-2 = <0x0>;
213 xlnx,synch-mem-3 = <0x0>;
214 xlnx,synch-pipedelay-0 = <0x2>;
215 xlnx,synch-pipedelay-1 = <0x2>;
216 xlnx,synch-pipedelay-2 = <0x2>;
217 xlnx,synch-pipedelay-3 = <0x2>;
218 xlnx,tavdv-ps-mem-0 = <0x1adb0>;
219 xlnx,tavdv-ps-mem-1 = <0x3a98>;
220 xlnx,tavdv-ps-mem-2 = <0x3a98>;
221 xlnx,tavdv-ps-mem-3 = <0x3a98>;
222 xlnx,tcedv-ps-mem-0 = <0x1adb0>;
223 xlnx,tcedv-ps-mem-1 = <0x3a98>;
224 xlnx,tcedv-ps-mem-2 = <0x3a98>;
225 xlnx,tcedv-ps-mem-3 = <0x3a98>;
226 xlnx,thzce-ps-mem-0 = <0x88b8>;
227 xlnx,thzce-ps-mem-1 = <0x1b58>;
228 xlnx,thzce-ps-mem-2 = <0x1b58>;
229 xlnx,thzce-ps-mem-3 = <0x1b58>;
230 xlnx,thzoe-ps-mem-0 = <0x1b58>;
231 xlnx,thzoe-ps-mem-1 = <0x1b58>;
232 xlnx,thzoe-ps-mem-2 = <0x1b58>;
233 xlnx,thzoe-ps-mem-3 = <0x1b58>;
234 xlnx,tlzwe-ps-mem-0 = <0x88b8>;
235 xlnx,tlzwe-ps-mem-1 = <0x0>;
236 xlnx,tlzwe-ps-mem-2 = <0x0>;
237 xlnx,tlzwe-ps-mem-3 = <0x0>;
238 xlnx,twc-ps-mem-0 = <0x2af8>;
239 xlnx,twc-ps-mem-1 = <0x3a98>;
240 xlnx,twc-ps-mem-2 = <0x3a98>;
241 xlnx,twc-ps-mem-3 = <0x3a98>;
242 xlnx,twp-ps-mem-0 = <0x11170>;
243 xlnx,twp-ps-mem-1 = <0x2ee0>;
244 xlnx,twp-ps-mem-2 = <0x2ee0>;
245 xlnx,twp-ps-mem-3 = <0x2ee0>;
246 xlnx,xcl0-linesize = <0x4>;
247 xlnx,xcl0-writexfer = <0x1>;
248 xlnx,xcl1-linesize = <0x4>;
249 xlnx,xcl1-writexfer = <0x1>;
250 xlnx,xcl2-linesize = <0x4>;
251 xlnx,xcl2-writexfer = <0x1>;
252 xlnx,xcl3-linesize = <0x4>;
253 xlnx,xcl3-writexfer = <0x1>;
254 } ;
166 Hard_Ethernet_MAC: xps-ll-temac@81c00000 { 255 Hard_Ethernet_MAC: xps-ll-temac@81c00000 {
167 #address-cells = <1>; 256 #address-cells = <1>;
168 #size-cells = <1>; 257 #size-cells = <1>;
@@ -185,6 +274,19 @@
185 xlnx,txfifo = <0x1000>; 274 xlnx,txfifo = <0x1000>;
186 } ; 275 } ;
187 } ; 276 } ;
277 IIC_EEPROM: i2c@81600000 {
278 compatible = "xlnx,xps-iic-2.00.a";
279 interrupt-parent = <&xps_intc_0>;
280 interrupts = < 6 2 >;
281 reg = < 0x81600000 0x10000 >;
282 xlnx,clk-freq = <0x5f5e100>;
283 xlnx,family = "virtex5";
284 xlnx,gpo-width = <0x1>;
285 xlnx,iic-freq = <0x186a0>;
286 xlnx,scl-inertial-delay = <0x0>;
287 xlnx,sda-inertial-delay = <0x0>;
288 xlnx,ten-bit-adr = <0x0>;
289 } ;
188 LEDs_8Bit: gpio@81400000 { 290 LEDs_8Bit: gpio@81400000 {
189 compatible = "xlnx,xps-gpio-1.00.a"; 291 compatible = "xlnx,xps-gpio-1.00.a";
190 reg = < 0x81400000 0x10000 >; 292 reg = < 0x81400000 0x10000 >;
@@ -220,7 +322,7 @@
220 Push_Buttons_5Bit: gpio@81440000 { 322 Push_Buttons_5Bit: gpio@81440000 {
221 compatible = "xlnx,xps-gpio-1.00.a"; 323 compatible = "xlnx,xps-gpio-1.00.a";
222 interrupt-parent = <&xps_intc_0>; 324 interrupt-parent = <&xps_intc_0>;
223 interrupts = < 7 2 >; 325 interrupts = < 8 2 >;
224 reg = < 0x81440000 0x10000 >; 326 reg = < 0x81440000 0x10000 >;
225 xlnx,all-inputs = <1>; 327 xlnx,all-inputs = <1>;
226 xlnx,all-inputs-2 = <0>; 328 xlnx,all-inputs-2 = <0>;
@@ -237,13 +339,13 @@
237 } ; 339 } ;
238 RS232_Uart_1: serial@83e00000 { 340 RS232_Uart_1: serial@83e00000 {
239 clock-frequency = <100000000>; 341 clock-frequency = <100000000>;
240 compatible = "xlnx,xps-uart16550-2.00.a", "ns16550"; 342 compatible = "xlnx,xps-uart16550-2.00.b", "ns16550";
241 current-speed = <0x2580>; 343 current-speed = <9600>;
242 device_type = "serial"; 344 device_type = "serial";
243 interrupt-parent = <&xps_intc_0>; 345 interrupt-parent = <&xps_intc_0>;
244 interrupts = < 8 2 >; 346 interrupts = < 9 2 >;
245 reg = < 0x83e00000 0x10000 >; 347 reg = < 0x83e00000 0x10000 >;
246 reg-offset = <3>; 348 reg-offset = <0x1003>;
247 reg-shift = <2>; 349 reg-shift = <2>;
248 xlnx,family = "virtex5"; 350 xlnx,family = "virtex5";
249 xlnx,has-external-rclk = <0>; 351 xlnx,has-external-rclk = <0>;
@@ -268,7 +370,7 @@
268 compatible = "xlnx,xps-intc-1.00.a"; 370 compatible = "xlnx,xps-intc-1.00.a";
269 interrupt-controller ; 371 interrupt-controller ;
270 reg = < 0x81800000 0x10000 >; 372 reg = < 0x81800000 0x10000 >;
271 xlnx,num-intr-inputs = <0xb>; 373 xlnx,num-intr-inputs = <0xc>;
272 } ; 374 } ;
273 xps_timebase_wdt_1: xps-timebase-wdt@83a00000 { 375 xps_timebase_wdt_1: xps-timebase-wdt@83a00000 {
274 compatible = "xlnx,xps-timebase-wdt-1.00.b"; 376 compatible = "xlnx,xps-timebase-wdt-1.00.b";
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index 8b3607cb53fb..f2156f07571f 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -117,7 +117,8 @@ int serial_console_init(void)
117 if (devp == NULL) 117 if (devp == NULL)
118 goto err_out; 118 goto err_out;
119 119
120 if (dt_is_compatible(devp, "ns16550")) 120 if (dt_is_compatible(devp, "ns16550") ||
121 dt_is_compatible(devp, "pnpPNP,501"))
121 rc = ns16550_console_init(devp, &serial_cd); 122 rc = ns16550_console_init(devp, &serial_cd);
122 else if (dt_is_compatible(devp, "marvell,mv64360-mpsc")) 123 else if (dt_is_compatible(devp, "marvell,mv64360-mpsc"))
123 rc = mpsc_console_init(devp, &serial_cd); 124 rc = mpsc_console_init(devp, &serial_cd);
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 965c237c122d..3ac75aecdb94 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -186,6 +186,9 @@ cuboot*)
186 *-mpc85*|*-tqm85*|*-sbc85*) 186 *-mpc85*|*-tqm85*|*-sbc85*)
187 platformo=$object/cuboot-85xx.o 187 platformo=$object/cuboot-85xx.o
188 ;; 188 ;;
189 *-amigaone)
190 link_address='0x800000'
191 ;;
189 esac 192 esac
190 ;; 193 ;;
191ps3) 194ps3)
@@ -211,11 +214,11 @@ simpleboot-virtex405-*)
211 binary=y 214 binary=y
212 ;; 215 ;;
213simpleboot-virtex440-*) 216simpleboot-virtex440-*)
214 platformo="$object/simpleboot.o $object/virtex.o" 217 platformo="$object/fixed-head.o $object/simpleboot.o $object/virtex.o"
215 binary=y 218 binary=y
216 ;; 219 ;;
217simpleboot-*) 220simpleboot-*)
218 platformo="$object/simpleboot.o" 221 platformo="$object/fixed-head.o $object/simpleboot.o"
219 binary=y 222 binary=y
220 ;; 223 ;;
221asp834x-redboot) 224asp834x-redboot)
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
index 81cdcc4b9278..f9a08ee49b96 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc2 3# Linux kernel version: 2.6.29-rc3
4# Tue Jan 20 08:22:35 2009 4# Mon Feb 2 13:13:04 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -74,6 +74,15 @@ CONFIG_POSIX_MQUEUE=y
74# CONFIG_BSD_PROCESS_ACCT is not set 74# CONFIG_BSD_PROCESS_ACCT is not set
75# CONFIG_TASKSTATS is not set 75# CONFIG_TASKSTATS is not set
76# CONFIG_AUDIT is not set 76# CONFIG_AUDIT is not set
77
78#
79# RCU Subsystem
80#
81CONFIG_CLASSIC_RCU=y
82# CONFIG_TREE_RCU is not set
83# CONFIG_PREEMPT_RCU is not set
84# CONFIG_TREE_RCU_TRACE is not set
85# CONFIG_PREEMPT_RCU_TRACE is not set
77# CONFIG_IKCONFIG is not set 86# CONFIG_IKCONFIG is not set
78CONFIG_LOG_BUF_SHIFT=14 87CONFIG_LOG_BUF_SHIFT=14
79# CONFIG_GROUP_SCHED is not set 88# CONFIG_GROUP_SCHED is not set
@@ -147,11 +156,6 @@ CONFIG_DEFAULT_AS=y
147# CONFIG_DEFAULT_CFQ is not set 156# CONFIG_DEFAULT_CFQ is not set
148# CONFIG_DEFAULT_NOOP is not set 157# CONFIG_DEFAULT_NOOP is not set
149CONFIG_DEFAULT_IOSCHED="anticipatory" 158CONFIG_DEFAULT_IOSCHED="anticipatory"
150CONFIG_CLASSIC_RCU=y
151# CONFIG_TREE_RCU is not set
152# CONFIG_PREEMPT_RCU is not set
153# CONFIG_TREE_RCU_TRACE is not set
154# CONFIG_PREEMPT_RCU_TRACE is not set
155# CONFIG_FREEZER is not set 159# CONFIG_FREEZER is not set
156CONFIG_PPC4xx_PCI_EXPRESS=y 160CONFIG_PPC4xx_PCI_EXPRESS=y
157 161
@@ -373,6 +377,7 @@ CONFIG_CONNECTOR=y
373CONFIG_PROC_EVENTS=y 377CONFIG_PROC_EVENTS=y
374# CONFIG_MTD is not set 378# CONFIG_MTD is not set
375CONFIG_OF_DEVICE=y 379CONFIG_OF_DEVICE=y
380CONFIG_OF_I2C=y
376# CONFIG_PARPORT is not set 381# CONFIG_PARPORT is not set
377CONFIG_BLK_DEV=y 382CONFIG_BLK_DEV=y
378# CONFIG_BLK_DEV_FD is not set 383# CONFIG_BLK_DEV_FD is not set
@@ -384,6 +389,7 @@ CONFIG_BLK_DEV=y
384# CONFIG_BLK_DEV_LOOP is not set 389# CONFIG_BLK_DEV_LOOP is not set
385# CONFIG_BLK_DEV_NBD is not set 390# CONFIG_BLK_DEV_NBD is not set
386# CONFIG_BLK_DEV_SX8 is not set 391# CONFIG_BLK_DEV_SX8 is not set
392# CONFIG_BLK_DEV_UB is not set
387CONFIG_BLK_DEV_RAM=y 393CONFIG_BLK_DEV_RAM=y
388CONFIG_BLK_DEV_RAM_COUNT=16 394CONFIG_BLK_DEV_RAM_COUNT=16
389CONFIG_BLK_DEV_RAM_SIZE=35000 395CONFIG_BLK_DEV_RAM_SIZE=35000
@@ -466,6 +472,15 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
466# 472#
467# Enable WiMAX (Networking options) to see the WiMAX drivers 473# Enable WiMAX (Networking options) to see the WiMAX drivers
468# 474#
475
476#
477# USB Network Adapters
478#
479# CONFIG_USB_CATC is not set
480# CONFIG_USB_KAWETH is not set
481# CONFIG_USB_PEGASUS is not set
482# CONFIG_USB_RTL8150 is not set
483# CONFIG_USB_USBNET is not set
469# CONFIG_WAN is not set 484# CONFIG_WAN is not set
470# CONFIG_FDDI is not set 485# CONFIG_FDDI is not set
471# CONFIG_HIPPI is not set 486# CONFIG_HIPPI is not set
@@ -533,13 +548,136 @@ CONFIG_LEGACY_PTY_COUNT=256
533# CONFIG_RAW_DRIVER is not set 548# CONFIG_RAW_DRIVER is not set
534# CONFIG_TCG_TPM is not set 549# CONFIG_TCG_TPM is not set
535CONFIG_DEVPORT=y 550CONFIG_DEVPORT=y
536# CONFIG_I2C is not set 551CONFIG_I2C=y
552CONFIG_I2C_BOARDINFO=y
553CONFIG_I2C_CHARDEV=y
554CONFIG_I2C_HELPER_AUTO=y
555
556#
557# I2C Hardware Bus support
558#
559
560#
561# PC SMBus host controller drivers
562#
563# CONFIG_I2C_ALI1535 is not set
564# CONFIG_I2C_ALI1563 is not set
565# CONFIG_I2C_ALI15X3 is not set
566# CONFIG_I2C_AMD756 is not set
567# CONFIG_I2C_AMD8111 is not set
568# CONFIG_I2C_I801 is not set
569# CONFIG_I2C_ISCH is not set
570# CONFIG_I2C_PIIX4 is not set
571# CONFIG_I2C_NFORCE2 is not set
572# CONFIG_I2C_SIS5595 is not set
573# CONFIG_I2C_SIS630 is not set
574# CONFIG_I2C_SIS96X is not set
575# CONFIG_I2C_VIA is not set
576# CONFIG_I2C_VIAPRO is not set
577
578#
579# I2C system bus drivers (mostly embedded / system-on-chip)
580#
581CONFIG_I2C_IBM_IIC=y
582# CONFIG_I2C_MPC is not set
583# CONFIG_I2C_OCORES is not set
584# CONFIG_I2C_SIMTEC is not set
585
586#
587# External I2C/SMBus adapter drivers
588#
589# CONFIG_I2C_PARPORT_LIGHT is not set
590# CONFIG_I2C_TAOS_EVM is not set
591# CONFIG_I2C_TINY_USB is not set
592
593#
594# Graphics adapter I2C/DDC channel drivers
595#
596# CONFIG_I2C_VOODOO3 is not set
597
598#
599# Other I2C/SMBus bus drivers
600#
601# CONFIG_I2C_PCA_PLATFORM is not set
602# CONFIG_I2C_STUB is not set
603
604#
605# Miscellaneous I2C Chip support
606#
607# CONFIG_DS1682 is not set
608# CONFIG_SENSORS_PCF8574 is not set
609# CONFIG_PCF8575 is not set
610# CONFIG_SENSORS_PCA9539 is not set
611# CONFIG_SENSORS_PCF8591 is not set
612# CONFIG_SENSORS_MAX6875 is not set
613# CONFIG_SENSORS_TSL2550 is not set
614# CONFIG_I2C_DEBUG_CORE is not set
615# CONFIG_I2C_DEBUG_ALGO is not set
616# CONFIG_I2C_DEBUG_BUS is not set
617# CONFIG_I2C_DEBUG_CHIP is not set
537# CONFIG_SPI is not set 618# CONFIG_SPI is not set
538CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 619CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
539# CONFIG_GPIOLIB is not set 620# CONFIG_GPIOLIB is not set
540# CONFIG_W1 is not set 621# CONFIG_W1 is not set
541# CONFIG_POWER_SUPPLY is not set 622# CONFIG_POWER_SUPPLY is not set
542# CONFIG_HWMON is not set 623CONFIG_HWMON=y
624# CONFIG_HWMON_VID is not set
625CONFIG_SENSORS_AD7414=y
626# CONFIG_SENSORS_AD7418 is not set
627# CONFIG_SENSORS_ADM1021 is not set
628# CONFIG_SENSORS_ADM1025 is not set
629# CONFIG_SENSORS_ADM1026 is not set
630# CONFIG_SENSORS_ADM1029 is not set
631# CONFIG_SENSORS_ADM1031 is not set
632# CONFIG_SENSORS_ADM9240 is not set
633# CONFIG_SENSORS_ADT7462 is not set
634# CONFIG_SENSORS_ADT7470 is not set
635# CONFIG_SENSORS_ADT7473 is not set
636# CONFIG_SENSORS_ADT7475 is not set
637# CONFIG_SENSORS_ATXP1 is not set
638# CONFIG_SENSORS_DS1621 is not set
639# CONFIG_SENSORS_I5K_AMB is not set
640# CONFIG_SENSORS_F71805F is not set
641# CONFIG_SENSORS_F71882FG is not set
642# CONFIG_SENSORS_F75375S is not set
643# CONFIG_SENSORS_GL518SM is not set
644# CONFIG_SENSORS_GL520SM is not set
645# CONFIG_SENSORS_IT87 is not set
646# CONFIG_SENSORS_LM63 is not set
647# CONFIG_SENSORS_LM75 is not set
648# CONFIG_SENSORS_LM77 is not set
649# CONFIG_SENSORS_LM78 is not set
650# CONFIG_SENSORS_LM80 is not set
651# CONFIG_SENSORS_LM83 is not set
652# CONFIG_SENSORS_LM85 is not set
653# CONFIG_SENSORS_LM87 is not set
654# CONFIG_SENSORS_LM90 is not set
655# CONFIG_SENSORS_LM92 is not set
656# CONFIG_SENSORS_LM93 is not set
657# CONFIG_SENSORS_LTC4245 is not set
658# CONFIG_SENSORS_MAX1619 is not set
659# CONFIG_SENSORS_MAX6650 is not set
660# CONFIG_SENSORS_PC87360 is not set
661# CONFIG_SENSORS_PC87427 is not set
662# CONFIG_SENSORS_SIS5595 is not set
663# CONFIG_SENSORS_DME1737 is not set
664# CONFIG_SENSORS_SMSC47M1 is not set
665# CONFIG_SENSORS_SMSC47M192 is not set
666# CONFIG_SENSORS_SMSC47B397 is not set
667# CONFIG_SENSORS_ADS7828 is not set
668# CONFIG_SENSORS_THMC50 is not set
669# CONFIG_SENSORS_VIA686A is not set
670# CONFIG_SENSORS_VT1211 is not set
671# CONFIG_SENSORS_VT8231 is not set
672# CONFIG_SENSORS_W83781D is not set
673# CONFIG_SENSORS_W83791D is not set
674# CONFIG_SENSORS_W83792D is not set
675# CONFIG_SENSORS_W83793 is not set
676# CONFIG_SENSORS_W83L785TS is not set
677# CONFIG_SENSORS_W83L786NG is not set
678# CONFIG_SENSORS_W83627HF is not set
679# CONFIG_SENSORS_W83627EHF is not set
680# CONFIG_HWMON_DEBUG_CHIP is not set
543# CONFIG_THERMAL is not set 681# CONFIG_THERMAL is not set
544# CONFIG_THERMAL_HWMON is not set 682# CONFIG_THERMAL_HWMON is not set
545# CONFIG_WATCHDOG is not set 683# CONFIG_WATCHDOG is not set
@@ -556,7 +694,12 @@ CONFIG_SSB_POSSIBLE=y
556# CONFIG_MFD_CORE is not set 694# CONFIG_MFD_CORE is not set
557# CONFIG_MFD_SM501 is not set 695# CONFIG_MFD_SM501 is not set
558# CONFIG_HTC_PASIC3 is not set 696# CONFIG_HTC_PASIC3 is not set
697# CONFIG_TWL4030_CORE is not set
559# CONFIG_MFD_TMIO is not set 698# CONFIG_MFD_TMIO is not set
699# CONFIG_PMIC_DA903X is not set
700# CONFIG_MFD_WM8400 is not set
701# CONFIG_MFD_WM8350_I2C is not set
702# CONFIG_MFD_PCF50633 is not set
560# CONFIG_REGULATOR is not set 703# CONFIG_REGULATOR is not set
561 704
562# 705#
@@ -574,6 +717,7 @@ CONFIG_SSB_POSSIBLE=y
574# Multimedia drivers 717# Multimedia drivers
575# 718#
576CONFIG_DAB=y 719CONFIG_DAB=y
720# CONFIG_USB_DABUSB is not set
577 721
578# 722#
579# Graphics support 723# Graphics support
@@ -590,7 +734,109 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
590# 734#
591# CONFIG_DISPLAY_SUPPORT is not set 735# CONFIG_DISPLAY_SUPPORT is not set
592# CONFIG_SOUND is not set 736# CONFIG_SOUND is not set
593# CONFIG_USB_SUPPORT is not set 737CONFIG_USB_SUPPORT=y
738CONFIG_USB_ARCH_HAS_HCD=y
739CONFIG_USB_ARCH_HAS_OHCI=y
740CONFIG_USB_ARCH_HAS_EHCI=y
741CONFIG_USB=y
742# CONFIG_USB_DEBUG is not set
743CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
744
745#
746# Miscellaneous USB options
747#
748CONFIG_USB_DEVICEFS=y
749CONFIG_USB_DEVICE_CLASS=y
750# CONFIG_USB_DYNAMIC_MINORS is not set
751# CONFIG_USB_OTG is not set
752# CONFIG_USB_OTG_WHITELIST is not set
753# CONFIG_USB_OTG_BLACKLIST_HUB is not set
754CONFIG_USB_MON=y
755# CONFIG_USB_WUSB is not set
756# CONFIG_USB_WUSB_CBAF is not set
757
758#
759# USB Host Controller Drivers
760#
761# CONFIG_USB_C67X00_HCD is not set
762CONFIG_USB_EHCI_HCD=m
763# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
764# CONFIG_USB_EHCI_TT_NEWSCHED is not set
765CONFIG_USB_EHCI_HCD_PPC_OF=y
766# CONFIG_USB_OXU210HP_HCD is not set
767# CONFIG_USB_ISP116X_HCD is not set
768# CONFIG_USB_ISP1760_HCD is not set
769CONFIG_USB_OHCI_HCD=y
770CONFIG_USB_OHCI_HCD_PPC_OF=y
771CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
772CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
773CONFIG_USB_OHCI_HCD_PCI=y
774CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
775CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
776CONFIG_USB_OHCI_LITTLE_ENDIAN=y
777# CONFIG_USB_UHCI_HCD is not set
778# CONFIG_USB_SL811_HCD is not set
779# CONFIG_USB_R8A66597_HCD is not set
780# CONFIG_USB_WHCI_HCD is not set
781# CONFIG_USB_HWA_HCD is not set
782
783#
784# USB Device Class drivers
785#
786# CONFIG_USB_ACM is not set
787# CONFIG_USB_PRINTER is not set
788# CONFIG_USB_WDM is not set
789# CONFIG_USB_TMC is not set
790
791#
792# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
793#
794
795#
796# see USB_STORAGE Help for more information
797#
798CONFIG_USB_LIBUSUAL=y
799
800#
801# USB Imaging devices
802#
803# CONFIG_USB_MDC800 is not set
804
805#
806# USB port drivers
807#
808# CONFIG_USB_SERIAL is not set
809
810#
811# USB Miscellaneous drivers
812#
813# CONFIG_USB_EMI62 is not set
814# CONFIG_USB_EMI26 is not set
815# CONFIG_USB_ADUTUX is not set
816# CONFIG_USB_SEVSEG is not set
817# CONFIG_USB_RIO500 is not set
818# CONFIG_USB_LEGOTOWER is not set
819# CONFIG_USB_LCD is not set
820# CONFIG_USB_BERRY_CHARGE is not set
821# CONFIG_USB_LED is not set
822# CONFIG_USB_CYPRESS_CY7C63 is not set
823# CONFIG_USB_CYTHERM is not set
824# CONFIG_USB_PHIDGET is not set
825# CONFIG_USB_IDMOUSE is not set
826# CONFIG_USB_FTDI_ELAN is not set
827# CONFIG_USB_APPLEDISPLAY is not set
828# CONFIG_USB_SISUSBVGA is not set
829# CONFIG_USB_LD is not set
830# CONFIG_USB_TRANCEVIBRATOR is not set
831# CONFIG_USB_IOWARRIOR is not set
832# CONFIG_USB_TEST is not set
833# CONFIG_USB_ISIGHTFW is not set
834# CONFIG_USB_VST is not set
835# CONFIG_USB_GADGET is not set
836
837#
838# OTG and related infrastructure
839#
594# CONFIG_UWB is not set 840# CONFIG_UWB is not set
595# CONFIG_MMC is not set 841# CONFIG_MMC is not set
596# CONFIG_MEMSTICK is not set 842# CONFIG_MEMSTICK is not set
diff --git a/arch/powerpc/configs/44x/redwood_defconfig b/arch/powerpc/configs/44x/redwood_defconfig
new file mode 100644
index 000000000000..e665433762ba
--- /dev/null
+++ b/arch/powerpc/configs/44x/redwood_defconfig
@@ -0,0 +1,1176 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc3
4# Wed Feb 4 14:31:09 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_4xx=y
19CONFIG_BOOKE=y
20CONFIG_PTE_64BIT=y
21CONFIG_PHYS_64BIT=y
22CONFIG_PPC_MMU_NOHASH=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_NOT_COHERENT_CACHE=y
25CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32
27CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
28CONFIG_MMU=y
29CONFIG_GENERIC_CMOS_UPDATE=y
30CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y
46CONFIG_EARLY_PRINTK=y
47CONFIG_GENERIC_NVRAM=y
48CONFIG_SCHED_OMIT_FRAME_POINTER=y
49CONFIG_ARCH_MAY_HAVE_PC_FDC=y
50CONFIG_PPC_OF=y
51CONFIG_OF=y
52CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y
56# CONFIG_DEFAULT_UIMAGE is not set
57CONFIG_PPC_DCR_NATIVE=y
58# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_PPC_DCR=y
60CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
61
62#
63# General setup
64#
65CONFIG_EXPERIMENTAL=y
66CONFIG_BROKEN_ON_SMP=y
67CONFIG_INIT_ENV_ARG_LIMIT=32
68CONFIG_LOCALVERSION=""
69CONFIG_LOCALVERSION_AUTO=y
70CONFIG_SWAP=y
71CONFIG_SYSVIPC=y
72CONFIG_SYSVIPC_SYSCTL=y
73CONFIG_POSIX_MQUEUE=y
74# CONFIG_BSD_PROCESS_ACCT is not set
75# CONFIG_TASKSTATS is not set
76# CONFIG_AUDIT is not set
77
78#
79# RCU Subsystem
80#
81CONFIG_CLASSIC_RCU=y
82# CONFIG_TREE_RCU is not set
83# CONFIG_PREEMPT_RCU is not set
84# CONFIG_TREE_RCU_TRACE is not set
85# CONFIG_PREEMPT_RCU_TRACE is not set
86# CONFIG_IKCONFIG is not set
87CONFIG_LOG_BUF_SHIFT=14
88# CONFIG_GROUP_SCHED is not set
89# CONFIG_CGROUPS is not set
90CONFIG_SYSFS_DEPRECATED=y
91CONFIG_SYSFS_DEPRECATED_V2=y
92# CONFIG_RELAY is not set
93# CONFIG_NAMESPACES is not set
94CONFIG_BLK_DEV_INITRD=y
95CONFIG_INITRAMFS_SOURCE=""
96# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
97CONFIG_SYSCTL=y
98CONFIG_EMBEDDED=y
99CONFIG_SYSCTL_SYSCALL=y
100CONFIG_KALLSYMS=y
101# CONFIG_KALLSYMS_ALL is not set
102# CONFIG_KALLSYMS_EXTRA_PASS is not set
103CONFIG_HOTPLUG=y
104CONFIG_PRINTK=y
105CONFIG_BUG=y
106CONFIG_ELF_CORE=y
107CONFIG_COMPAT_BRK=y
108CONFIG_BASE_FULL=y
109CONFIG_FUTEX=y
110CONFIG_ANON_INODES=y
111CONFIG_EPOLL=y
112CONFIG_SIGNALFD=y
113CONFIG_TIMERFD=y
114CONFIG_EVENTFD=y
115CONFIG_SHMEM=y
116CONFIG_AIO=y
117CONFIG_VM_EVENT_COUNTERS=y
118CONFIG_PCI_QUIRKS=y
119CONFIG_SLUB_DEBUG=y
120# CONFIG_SLAB is not set
121CONFIG_SLUB=y
122# CONFIG_SLOB is not set
123# CONFIG_PROFILING is not set
124CONFIG_HAVE_OPROFILE=y
125# CONFIG_KPROBES is not set
126CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
127CONFIG_HAVE_IOREMAP_PROT=y
128CONFIG_HAVE_KPROBES=y
129CONFIG_HAVE_KRETPROBES=y
130CONFIG_HAVE_ARCH_TRACEHOOK=y
131# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
132CONFIG_SLABINFO=y
133CONFIG_RT_MUTEXES=y
134CONFIG_BASE_SMALL=0
135CONFIG_MODULES=y
136# CONFIG_MODULE_FORCE_LOAD is not set
137CONFIG_MODULE_UNLOAD=y
138# CONFIG_MODULE_FORCE_UNLOAD is not set
139# CONFIG_MODVERSIONS is not set
140# CONFIG_MODULE_SRCVERSION_ALL is not set
141CONFIG_BLOCK=y
142CONFIG_LBD=y
143# CONFIG_BLK_DEV_IO_TRACE is not set
144# CONFIG_BLK_DEV_BSG is not set
145# CONFIG_BLK_DEV_INTEGRITY is not set
146
147#
148# IO Schedulers
149#
150CONFIG_IOSCHED_NOOP=y
151CONFIG_IOSCHED_AS=y
152CONFIG_IOSCHED_DEADLINE=y
153CONFIG_IOSCHED_CFQ=y
154CONFIG_DEFAULT_AS=y
155# CONFIG_DEFAULT_DEADLINE is not set
156# CONFIG_DEFAULT_CFQ is not set
157# CONFIG_DEFAULT_NOOP is not set
158CONFIG_DEFAULT_IOSCHED="anticipatory"
159# CONFIG_FREEZER is not set
160CONFIG_PPC4xx_PCI_EXPRESS=y
161
162#
163# Platform support
164#
165# CONFIG_PPC_CELL is not set
166# CONFIG_PPC_CELL_NATIVE is not set
167# CONFIG_PQ2ADS is not set
168# CONFIG_BAMBOO is not set
169# CONFIG_EBONY is not set
170# CONFIG_SAM440EP is not set
171# CONFIG_SEQUOIA is not set
172# CONFIG_TAISHAN is not set
173# CONFIG_KATMAI is not set
174# CONFIG_RAINIER is not set
175# CONFIG_WARP is not set
176# CONFIG_ARCHES is not set
177# CONFIG_CANYONLANDS is not set
178# CONFIG_GLACIER is not set
179CONFIG_REDWOOD=y
180# CONFIG_YOSEMITE is not set
181# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
182CONFIG_PPC44x_SIMPLE=y
183# CONFIG_PPC4xx_GPIO is not set
184CONFIG_460SX=y
185# CONFIG_IPIC is not set
186# CONFIG_MPIC is not set
187# CONFIG_MPIC_WEIRD is not set
188# CONFIG_PPC_I8259 is not set
189# CONFIG_PPC_RTAS is not set
190# CONFIG_MMIO_NVRAM is not set
191# CONFIG_PPC_MPC106 is not set
192# CONFIG_PPC_970_NAP is not set
193# CONFIG_PPC_INDIRECT_IO is not set
194# CONFIG_GENERIC_IOMAP is not set
195# CONFIG_CPU_FREQ is not set
196# CONFIG_FSL_ULI1575 is not set
197# CONFIG_SIMPLE_GPIO is not set
198
199#
200# Kernel options
201#
202# CONFIG_HIGHMEM is not set
203CONFIG_TICK_ONESHOT=y
204CONFIG_NO_HZ=y
205CONFIG_HIGH_RES_TIMERS=y
206CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
207# CONFIG_HZ_100 is not set
208CONFIG_HZ_250=y
209# CONFIG_HZ_300 is not set
210# CONFIG_HZ_1000 is not set
211CONFIG_HZ=250
212CONFIG_SCHED_HRTICK=y
213CONFIG_PREEMPT_NONE=y
214# CONFIG_PREEMPT_VOLUNTARY is not set
215# CONFIG_PREEMPT is not set
216CONFIG_BINFMT_ELF=y
217# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
218# CONFIG_HAVE_AOUT is not set
219# CONFIG_BINFMT_MISC is not set
220# CONFIG_MATH_EMULATION is not set
221# CONFIG_IOMMU_HELPER is not set
222CONFIG_PPC_NEED_DMA_SYNC_OPS=y
223CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
224CONFIG_ARCH_HAS_WALK_MEMORY=y
225CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
226CONFIG_ARCH_FLATMEM_ENABLE=y
227CONFIG_ARCH_POPULATES_NODE_MAP=y
228CONFIG_SELECT_MEMORY_MODEL=y
229CONFIG_FLATMEM_MANUAL=y
230# CONFIG_DISCONTIGMEM_MANUAL is not set
231# CONFIG_SPARSEMEM_MANUAL is not set
232CONFIG_FLATMEM=y
233CONFIG_FLAT_NODE_MEM_MAP=y
234CONFIG_PAGEFLAGS_EXTENDED=y
235CONFIG_SPLIT_PTLOCK_CPUS=4
236CONFIG_MIGRATION=y
237CONFIG_PHYS_ADDR_T_64BIT=y
238CONFIG_ZONE_DMA_FLAG=1
239CONFIG_BOUNCE=y
240CONFIG_VIRT_TO_BUS=y
241CONFIG_UNEVICTABLE_LRU=y
242CONFIG_PPC_4K_PAGES=y
243# CONFIG_PPC_16K_PAGES is not set
244# CONFIG_PPC_64K_PAGES is not set
245CONFIG_FORCE_MAX_ZONEORDER=11
246CONFIG_PROC_DEVICETREE=y
247CONFIG_CMDLINE_BOOL=y
248CONFIG_CMDLINE=""
249CONFIG_EXTRA_TARGETS=""
250CONFIG_SECCOMP=y
251CONFIG_ISA_DMA_API=y
252
253#
254# Bus options
255#
256CONFIG_ZONE_DMA=y
257CONFIG_PPC_INDIRECT_PCI=y
258CONFIG_4xx_SOC=y
259CONFIG_PPC_PCI_CHOICE=y
260CONFIG_PCI=y
261CONFIG_PCI_DOMAINS=y
262CONFIG_PCI_SYSCALL=y
263CONFIG_PCIEPORTBUS=y
264CONFIG_PCIEAER=y
265# CONFIG_PCIEASPM is not set
266CONFIG_ARCH_SUPPORTS_MSI=y
267# CONFIG_PCI_MSI is not set
268CONFIG_PCI_LEGACY=y
269# CONFIG_PCI_DEBUG is not set
270# CONFIG_PCI_STUB is not set
271# CONFIG_PCCARD is not set
272# CONFIG_HOTPLUG_PCI is not set
273# CONFIG_HAS_RAPIDIO is not set
274
275#
276# Advanced setup
277#
278# CONFIG_ADVANCED_OPTIONS is not set
279
280#
281# Default settings for advanced configuration options are used
282#
283CONFIG_LOWMEM_SIZE=0x30000000
284CONFIG_PAGE_OFFSET=0xc0000000
285CONFIG_KERNEL_START=0xc0000000
286CONFIG_PHYSICAL_START=0x00000000
287CONFIG_TASK_SIZE=0xc0000000
288CONFIG_CONSISTENT_START=0xff100000
289CONFIG_CONSISTENT_SIZE=0x00200000
290CONFIG_NET=y
291
292#
293# Networking options
294#
295CONFIG_COMPAT_NET_DEV_OPS=y
296CONFIG_PACKET=y
297# CONFIG_PACKET_MMAP is not set
298CONFIG_UNIX=y
299# CONFIG_NET_KEY is not set
300CONFIG_INET=y
301# CONFIG_IP_MULTICAST is not set
302# CONFIG_IP_ADVANCED_ROUTER is not set
303CONFIG_IP_FIB_HASH=y
304CONFIG_IP_PNP=y
305CONFIG_IP_PNP_DHCP=y
306CONFIG_IP_PNP_BOOTP=y
307# CONFIG_IP_PNP_RARP is not set
308# CONFIG_NET_IPIP is not set
309# CONFIG_NET_IPGRE is not set
310# CONFIG_ARPD is not set
311# CONFIG_SYN_COOKIES is not set
312# CONFIG_INET_AH is not set
313# CONFIG_INET_ESP is not set
314# CONFIG_INET_IPCOMP is not set
315# CONFIG_INET_XFRM_TUNNEL is not set
316# CONFIG_INET_TUNNEL is not set
317# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
318# CONFIG_INET_XFRM_MODE_TUNNEL is not set
319# CONFIG_INET_XFRM_MODE_BEET is not set
320# CONFIG_INET_LRO is not set
321CONFIG_INET_DIAG=y
322CONFIG_INET_TCP_DIAG=y
323# CONFIG_TCP_CONG_ADVANCED is not set
324CONFIG_TCP_CONG_CUBIC=y
325CONFIG_DEFAULT_TCP_CONG="cubic"
326# CONFIG_TCP_MD5SIG is not set
327# CONFIG_IPV6 is not set
328# CONFIG_NETWORK_SECMARK is not set
329# CONFIG_NETFILTER is not set
330# CONFIG_IP_DCCP is not set
331# CONFIG_IP_SCTP is not set
332# CONFIG_TIPC is not set
333# CONFIG_ATM is not set
334# CONFIG_BRIDGE is not set
335# CONFIG_NET_DSA is not set
336# CONFIG_VLAN_8021Q is not set
337# CONFIG_DECNET is not set
338# CONFIG_LLC2 is not set
339# CONFIG_IPX is not set
340# CONFIG_ATALK is not set
341# CONFIG_X25 is not set
342# CONFIG_LAPB is not set
343# CONFIG_ECONET is not set
344# CONFIG_WAN_ROUTER is not set
345# CONFIG_NET_SCHED is not set
346# CONFIG_DCB is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_HAMRADIO is not set
353# CONFIG_CAN is not set
354# CONFIG_IRDA is not set
355# CONFIG_BT is not set
356# CONFIG_AF_RXRPC is not set
357# CONFIG_PHONET is not set
358CONFIG_WIRELESS=y
359# CONFIG_CFG80211 is not set
360CONFIG_WIRELESS_OLD_REGULATORY=y
361# CONFIG_WIRELESS_EXT is not set
362# CONFIG_LIB80211 is not set
363# CONFIG_MAC80211 is not set
364# CONFIG_WIMAX is not set
365# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set
367
368#
369# Device Drivers
370#
371
372#
373# Generic Driver Options
374#
375CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
376CONFIG_STANDALONE=y
377CONFIG_PREVENT_FIRMWARE_BUILD=y
378CONFIG_FW_LOADER=y
379CONFIG_FIRMWARE_IN_KERNEL=y
380CONFIG_EXTRA_FIRMWARE=""
381# CONFIG_DEBUG_DRIVER is not set
382# CONFIG_DEBUG_DEVRES is not set
383# CONFIG_SYS_HYPERVISOR is not set
384CONFIG_CONNECTOR=y
385CONFIG_PROC_EVENTS=y
386CONFIG_MTD=y
387# CONFIG_MTD_DEBUG is not set
388CONFIG_MTD_CONCAT=y
389CONFIG_MTD_PARTITIONS=y
390# CONFIG_MTD_TESTS is not set
391# CONFIG_MTD_REDBOOT_PARTS is not set
392CONFIG_MTD_CMDLINE_PARTS=y
393CONFIG_MTD_OF_PARTS=y
394# CONFIG_MTD_AR7_PARTS is not set
395
396#
397# User Modules And Translation Layers
398#
399CONFIG_MTD_CHAR=y
400CONFIG_MTD_BLKDEVS=y
401CONFIG_MTD_BLOCK=y
402# CONFIG_FTL is not set
403# CONFIG_NFTL is not set
404# CONFIG_INFTL is not set
405# CONFIG_RFD_FTL is not set
406# CONFIG_SSFDC is not set
407# CONFIG_MTD_OOPS is not set
408
409#
410# RAM/ROM/Flash chip drivers
411#
412CONFIG_MTD_CFI=y
413# CONFIG_MTD_JEDECPROBE is not set
414CONFIG_MTD_GEN_PROBE=y
415# CONFIG_MTD_CFI_ADV_OPTIONS is not set
416CONFIG_MTD_MAP_BANK_WIDTH_1=y
417CONFIG_MTD_MAP_BANK_WIDTH_2=y
418CONFIG_MTD_MAP_BANK_WIDTH_4=y
419# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
420# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
421# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
422CONFIG_MTD_CFI_I1=y
423CONFIG_MTD_CFI_I2=y
424# CONFIG_MTD_CFI_I4 is not set
425# CONFIG_MTD_CFI_I8 is not set
426# CONFIG_MTD_CFI_INTELEXT is not set
427CONFIG_MTD_CFI_AMDSTD=y
428# CONFIG_MTD_CFI_STAA is not set
429CONFIG_MTD_CFI_UTIL=y
430# CONFIG_MTD_RAM is not set
431# CONFIG_MTD_ROM is not set
432# CONFIG_MTD_ABSENT is not set
433
434#
435# Mapping drivers for chip access
436#
437# CONFIG_MTD_COMPLEX_MAPPINGS is not set
438# CONFIG_MTD_PHYSMAP is not set
439CONFIG_MTD_PHYSMAP_OF=y
440# CONFIG_MTD_INTEL_VR_NOR is not set
441# CONFIG_MTD_PLATRAM is not set
442
443#
444# Self-contained MTD device drivers
445#
446# CONFIG_MTD_PMC551 is not set
447# CONFIG_MTD_SLRAM is not set
448# CONFIG_MTD_PHRAM is not set
449# CONFIG_MTD_MTDRAM is not set
450# CONFIG_MTD_BLOCK2MTD is not set
451
452#
453# Disk-On-Chip Device Drivers
454#
455# CONFIG_MTD_DOC2000 is not set
456# CONFIG_MTD_DOC2001 is not set
457# CONFIG_MTD_DOC2001PLUS is not set
458# CONFIG_MTD_NAND is not set
459# CONFIG_MTD_ONENAND is not set
460
461#
462# LPDDR flash memory drivers
463#
464# CONFIG_MTD_LPDDR is not set
465# CONFIG_MTD_QINFO_PROBE is not set
466
467#
468# UBI - Unsorted block images
469#
470# CONFIG_MTD_UBI is not set
471CONFIG_OF_DEVICE=y
472CONFIG_OF_I2C=y
473# CONFIG_PARPORT is not set
474CONFIG_BLK_DEV=y
475# CONFIG_BLK_DEV_FD is not set
476# CONFIG_BLK_CPQ_DA is not set
477# CONFIG_BLK_CPQ_CISS_DA is not set
478# CONFIG_BLK_DEV_DAC960 is not set
479# CONFIG_BLK_DEV_UMEM is not set
480# CONFIG_BLK_DEV_COW_COMMON is not set
481# CONFIG_BLK_DEV_LOOP is not set
482# CONFIG_BLK_DEV_NBD is not set
483# CONFIG_BLK_DEV_SX8 is not set
484CONFIG_BLK_DEV_RAM=y
485CONFIG_BLK_DEV_RAM_COUNT=16
486CONFIG_BLK_DEV_RAM_SIZE=35000
487# CONFIG_BLK_DEV_XIP is not set
488# CONFIG_CDROM_PKTCDVD is not set
489# CONFIG_ATA_OVER_ETH is not set
490# CONFIG_XILINX_SYSACE is not set
491# CONFIG_BLK_DEV_HD is not set
492# CONFIG_MISC_DEVICES is not set
493CONFIG_HAVE_IDE=y
494# CONFIG_IDE is not set
495
496#
497# SCSI device support
498#
499# CONFIG_RAID_ATTRS is not set
500CONFIG_SCSI=y
501CONFIG_SCSI_DMA=y
502# CONFIG_SCSI_TGT is not set
503# CONFIG_SCSI_NETLINK is not set
504CONFIG_SCSI_PROC_FS=y
505
506#
507# SCSI support type (disk, tape, CD-ROM)
508#
509CONFIG_BLK_DEV_SD=y
510# CONFIG_CHR_DEV_ST is not set
511# CONFIG_CHR_DEV_OSST is not set
512# CONFIG_BLK_DEV_SR is not set
513CONFIG_CHR_DEV_SG=y
514# CONFIG_CHR_DEV_SCH is not set
515
516#
517# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
518#
519# CONFIG_SCSI_MULTI_LUN is not set
520# CONFIG_SCSI_CONSTANTS is not set
521# CONFIG_SCSI_LOGGING is not set
522# CONFIG_SCSI_SCAN_ASYNC is not set
523CONFIG_SCSI_WAIT_SCAN=m
524
525#
526# SCSI Transports
527#
528# CONFIG_SCSI_SPI_ATTRS is not set
529# CONFIG_SCSI_FC_ATTRS is not set
530# CONFIG_SCSI_ISCSI_ATTRS is not set
531CONFIG_SCSI_SAS_ATTRS=y
532# CONFIG_SCSI_SAS_LIBSAS is not set
533# CONFIG_SCSI_SRP_ATTRS is not set
534CONFIG_SCSI_LOWLEVEL=y
535# CONFIG_ISCSI_TCP is not set
536# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
537# CONFIG_SCSI_3W_9XXX is not set
538# CONFIG_SCSI_ACARD is not set
539# CONFIG_SCSI_AACRAID is not set
540# CONFIG_SCSI_AIC7XXX is not set
541# CONFIG_SCSI_AIC7XXX_OLD is not set
542# CONFIG_SCSI_AIC79XX is not set
543# CONFIG_SCSI_AIC94XX is not set
544# CONFIG_SCSI_DPT_I2O is not set
545# CONFIG_SCSI_ADVANSYS is not set
546# CONFIG_SCSI_ARCMSR is not set
547# CONFIG_MEGARAID_NEWGEN is not set
548# CONFIG_MEGARAID_LEGACY is not set
549# CONFIG_MEGARAID_SAS is not set
550# CONFIG_SCSI_HPTIOP is not set
551# CONFIG_SCSI_BUSLOGIC is not set
552# CONFIG_LIBFC is not set
553# CONFIG_FCOE is not set
554# CONFIG_SCSI_DMX3191D is not set
555# CONFIG_SCSI_EATA is not set
556# CONFIG_SCSI_FUTURE_DOMAIN is not set
557# CONFIG_SCSI_GDTH is not set
558# CONFIG_SCSI_IPS is not set
559# CONFIG_SCSI_INITIO is not set
560# CONFIG_SCSI_INIA100 is not set
561# CONFIG_SCSI_MVSAS is not set
562# CONFIG_SCSI_STEX is not set
563# CONFIG_SCSI_SYM53C8XX_2 is not set
564# CONFIG_SCSI_QLOGIC_1280 is not set
565# CONFIG_SCSI_QLA_FC is not set
566# CONFIG_SCSI_QLA_ISCSI is not set
567# CONFIG_SCSI_LPFC is not set
568# CONFIG_SCSI_DC395x is not set
569# CONFIG_SCSI_DC390T is not set
570# CONFIG_SCSI_NSP32 is not set
571# CONFIG_SCSI_DEBUG is not set
572# CONFIG_SCSI_SRP is not set
573# CONFIG_SCSI_DH is not set
574# CONFIG_ATA is not set
575# CONFIG_MD is not set
576CONFIG_FUSION=y
577# CONFIG_FUSION_SPI is not set
578# CONFIG_FUSION_FC is not set
579CONFIG_FUSION_SAS=y
580CONFIG_FUSION_MAX_SGE=128
581# CONFIG_FUSION_CTL is not set
582# CONFIG_FUSION_LOGGING is not set
583
584#
585# IEEE 1394 (FireWire) support
586#
587
588#
589# Enable only one of the two stacks, unless you know what you are doing
590#
591# CONFIG_FIREWIRE is not set
592# CONFIG_IEEE1394 is not set
593CONFIG_I2O=y
594CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
595CONFIG_I2O_EXT_ADAPTEC=y
596# CONFIG_I2O_CONFIG is not set
597# CONFIG_I2O_BUS is not set
598# CONFIG_I2O_BLOCK is not set
599# CONFIG_I2O_SCSI is not set
600# CONFIG_I2O_PROC is not set
601# CONFIG_MACINTOSH_DRIVERS is not set
602CONFIG_NETDEVICES=y
603# CONFIG_DUMMY is not set
604# CONFIG_BONDING is not set
605# CONFIG_MACVLAN is not set
606# CONFIG_EQUALIZER is not set
607# CONFIG_TUN is not set
608# CONFIG_VETH is not set
609# CONFIG_ARCNET is not set
610# CONFIG_PHYLIB is not set
611CONFIG_NET_ETHERNET=y
612# CONFIG_MII is not set
613# CONFIG_HAPPYMEAL is not set
614# CONFIG_SUNGEM is not set
615# CONFIG_CASSINI is not set
616# CONFIG_NET_VENDOR_3COM is not set
617# CONFIG_NET_TULIP is not set
618# CONFIG_HP100 is not set
619CONFIG_IBM_NEW_EMAC=y
620CONFIG_IBM_NEW_EMAC_RXB=256
621CONFIG_IBM_NEW_EMAC_TXB=256
622CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
623CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
624CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
625CONFIG_IBM_NEW_EMAC_DEBUG=y
626CONFIG_IBM_NEW_EMAC_ZMII=y
627CONFIG_IBM_NEW_EMAC_RGMII=y
628CONFIG_IBM_NEW_EMAC_TAH=y
629CONFIG_IBM_NEW_EMAC_EMAC4=y
630# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
631# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
632# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
633# CONFIG_NET_PCI is not set
634# CONFIG_B44 is not set
635# CONFIG_ATL2 is not set
636CONFIG_NETDEV_1000=y
637# CONFIG_ACENIC is not set
638# CONFIG_DL2K is not set
639# CONFIG_E1000 is not set
640CONFIG_E1000E=y
641# CONFIG_IP1000 is not set
642# CONFIG_IGB is not set
643# CONFIG_NS83820 is not set
644# CONFIG_HAMACHI is not set
645# CONFIG_YELLOWFIN is not set
646# CONFIG_R8169 is not set
647# CONFIG_SIS190 is not set
648# CONFIG_SKGE is not set
649# CONFIG_SKY2 is not set
650# CONFIG_VIA_VELOCITY is not set
651# CONFIG_TIGON3 is not set
652# CONFIG_BNX2 is not set
653# CONFIG_QLA3XXX is not set
654# CONFIG_ATL1 is not set
655# CONFIG_ATL1E is not set
656# CONFIG_JME is not set
657# CONFIG_NETDEV_10000 is not set
658# CONFIG_TR is not set
659
660#
661# Wireless LAN
662#
663# CONFIG_WLAN_PRE80211 is not set
664# CONFIG_WLAN_80211 is not set
665# CONFIG_IWLWIFI_LEDS is not set
666
667#
668# Enable WiMAX (Networking options) to see the WiMAX drivers
669#
670# CONFIG_WAN is not set
671# CONFIG_FDDI is not set
672# CONFIG_HIPPI is not set
673# CONFIG_PPP is not set
674# CONFIG_SLIP is not set
675# CONFIG_NET_FC is not set
676# CONFIG_NETCONSOLE is not set
677# CONFIG_NETPOLL is not set
678# CONFIG_NET_POLL_CONTROLLER is not set
679# CONFIG_ISDN is not set
680# CONFIG_PHONE is not set
681
682#
683# Input device support
684#
685# CONFIG_INPUT is not set
686
687#
688# Hardware I/O ports
689#
690# CONFIG_SERIO is not set
691# CONFIG_GAMEPORT is not set
692
693#
694# Character devices
695#
696# CONFIG_VT is not set
697CONFIG_DEVKMEM=y
698# CONFIG_SERIAL_NONSTANDARD is not set
699# CONFIG_NOZOMI is not set
700
701#
702# Serial drivers
703#
704CONFIG_SERIAL_8250=y
705CONFIG_SERIAL_8250_CONSOLE=y
706# CONFIG_SERIAL_8250_PCI is not set
707CONFIG_SERIAL_8250_NR_UARTS=1
708CONFIG_SERIAL_8250_RUNTIME_UARTS=1
709CONFIG_SERIAL_8250_EXTENDED=y
710# CONFIG_SERIAL_8250_MANY_PORTS is not set
711CONFIG_SERIAL_8250_SHARE_IRQ=y
712# CONFIG_SERIAL_8250_DETECT_IRQ is not set
713# CONFIG_SERIAL_8250_RSA is not set
714
715#
716# Non-8250 serial port support
717#
718# CONFIG_SERIAL_UARTLITE is not set
719CONFIG_SERIAL_CORE=y
720CONFIG_SERIAL_CORE_CONSOLE=y
721# CONFIG_SERIAL_JSM is not set
722CONFIG_SERIAL_OF_PLATFORM=y
723# CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set
724CONFIG_UNIX98_PTYS=y
725# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
726CONFIG_LEGACY_PTYS=y
727CONFIG_LEGACY_PTY_COUNT=256
728# CONFIG_HVC_UDBG is not set
729# CONFIG_IPMI_HANDLER is not set
730# CONFIG_HW_RANDOM is not set
731# CONFIG_NVRAM is not set
732# CONFIG_GEN_RTC is not set
733# CONFIG_R3964 is not set
734# CONFIG_APPLICOM is not set
735# CONFIG_RAW_DRIVER is not set
736# CONFIG_TCG_TPM is not set
737CONFIG_DEVPORT=y
738CONFIG_I2C=y
739CONFIG_I2C_BOARDINFO=y
740CONFIG_I2C_CHARDEV=y
741CONFIG_I2C_HELPER_AUTO=y
742
743#
744# I2C Hardware Bus support
745#
746
747#
748# PC SMBus host controller drivers
749#
750# CONFIG_I2C_ALI1535 is not set
751# CONFIG_I2C_ALI1563 is not set
752# CONFIG_I2C_ALI15X3 is not set
753# CONFIG_I2C_AMD756 is not set
754# CONFIG_I2C_AMD8111 is not set
755# CONFIG_I2C_I801 is not set
756# CONFIG_I2C_ISCH is not set
757# CONFIG_I2C_PIIX4 is not set
758# CONFIG_I2C_NFORCE2 is not set
759# CONFIG_I2C_SIS5595 is not set
760# CONFIG_I2C_SIS630 is not set
761# CONFIG_I2C_SIS96X is not set
762# CONFIG_I2C_VIA is not set
763# CONFIG_I2C_VIAPRO is not set
764
765#
766# I2C system bus drivers (mostly embedded / system-on-chip)
767#
768CONFIG_I2C_IBM_IIC=y
769# CONFIG_I2C_MPC is not set
770# CONFIG_I2C_OCORES is not set
771# CONFIG_I2C_SIMTEC is not set
772
773#
774# External I2C/SMBus adapter drivers
775#
776# CONFIG_I2C_PARPORT_LIGHT is not set
777# CONFIG_I2C_TAOS_EVM is not set
778
779#
780# Graphics adapter I2C/DDC channel drivers
781#
782# CONFIG_I2C_VOODOO3 is not set
783
784#
785# Other I2C/SMBus bus drivers
786#
787# CONFIG_I2C_PCA_PLATFORM is not set
788# CONFIG_I2C_STUB is not set
789
790#
791# Miscellaneous I2C Chip support
792#
793# CONFIG_DS1682 is not set
794# CONFIG_SENSORS_PCF8574 is not set
795# CONFIG_PCF8575 is not set
796# CONFIG_SENSORS_PCA9539 is not set
797# CONFIG_SENSORS_PCF8591 is not set
798# CONFIG_SENSORS_MAX6875 is not set
799# CONFIG_SENSORS_TSL2550 is not set
800CONFIG_I2C_DEBUG_CORE=y
801CONFIG_I2C_DEBUG_ALGO=y
802CONFIG_I2C_DEBUG_BUS=y
803CONFIG_I2C_DEBUG_CHIP=y
804# CONFIG_SPI is not set
805CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
806# CONFIG_GPIOLIB is not set
807# CONFIG_W1 is not set
808# CONFIG_POWER_SUPPLY is not set
809# CONFIG_HWMON is not set
810# CONFIG_THERMAL is not set
811# CONFIG_THERMAL_HWMON is not set
812# CONFIG_WATCHDOG is not set
813CONFIG_SSB_POSSIBLE=y
814
815#
816# Sonics Silicon Backplane
817#
818# CONFIG_SSB is not set
819
820#
821# Multifunction device drivers
822#
823# CONFIG_MFD_CORE is not set
824# CONFIG_MFD_SM501 is not set
825# CONFIG_HTC_PASIC3 is not set
826# CONFIG_TWL4030_CORE is not set
827# CONFIG_MFD_TMIO is not set
828# CONFIG_PMIC_DA903X is not set
829# CONFIG_MFD_WM8400 is not set
830# CONFIG_MFD_WM8350_I2C is not set
831# CONFIG_MFD_PCF50633 is not set
832# CONFIG_REGULATOR is not set
833
834#
835# Multimedia devices
836#
837
838#
839# Multimedia core support
840#
841# CONFIG_VIDEO_DEV is not set
842# CONFIG_DVB_CORE is not set
843# CONFIG_VIDEO_MEDIA is not set
844
845#
846# Multimedia drivers
847#
848CONFIG_DAB=y
849
850#
851# Graphics support
852#
853# CONFIG_AGP is not set
854# CONFIG_DRM is not set
855# CONFIG_VGASTATE is not set
856CONFIG_VIDEO_OUTPUT_CONTROL=m
857# CONFIG_FB is not set
858# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
859
860#
861# Display device support
862#
863# CONFIG_DISPLAY_SUPPORT is not set
864# CONFIG_SOUND is not set
865# CONFIG_USB_SUPPORT is not set
866# CONFIG_UWB is not set
867# CONFIG_MMC is not set
868# CONFIG_MEMSTICK is not set
869# CONFIG_NEW_LEDS is not set
870# CONFIG_ACCESSIBILITY is not set
871# CONFIG_INFINIBAND is not set
872# CONFIG_EDAC is not set
873# CONFIG_RTC_CLASS is not set
874CONFIG_DMADEVICES=y
875
876#
877# DMA Devices
878#
879# CONFIG_UIO is not set
880# CONFIG_STAGING is not set
881
882#
883# File systems
884#
885CONFIG_EXT2_FS=y
886# CONFIG_EXT2_FS_XATTR is not set
887# CONFIG_EXT2_FS_XIP is not set
888# CONFIG_EXT3_FS is not set
889# CONFIG_EXT4_FS is not set
890# CONFIG_REISERFS_FS is not set
891# CONFIG_JFS_FS is not set
892# CONFIG_FS_POSIX_ACL is not set
893CONFIG_FILE_LOCKING=y
894# CONFIG_XFS_FS is not set
895# CONFIG_GFS2_FS is not set
896# CONFIG_OCFS2_FS is not set
897# CONFIG_BTRFS_FS is not set
898CONFIG_DNOTIFY=y
899CONFIG_INOTIFY=y
900CONFIG_INOTIFY_USER=y
901# CONFIG_QUOTA is not set
902# CONFIG_AUTOFS_FS is not set
903# CONFIG_AUTOFS4_FS is not set
904# CONFIG_FUSE_FS is not set
905
906#
907# CD-ROM/DVD Filesystems
908#
909# CONFIG_ISO9660_FS is not set
910# CONFIG_UDF_FS is not set
911
912#
913# DOS/FAT/NT Filesystems
914#
915# CONFIG_MSDOS_FS is not set
916# CONFIG_VFAT_FS is not set
917# CONFIG_NTFS_FS is not set
918
919#
920# Pseudo filesystems
921#
922CONFIG_PROC_FS=y
923CONFIG_PROC_KCORE=y
924CONFIG_PROC_SYSCTL=y
925CONFIG_PROC_PAGE_MONITOR=y
926CONFIG_SYSFS=y
927CONFIG_TMPFS=y
928# CONFIG_TMPFS_POSIX_ACL is not set
929# CONFIG_HUGETLB_PAGE is not set
930# CONFIG_CONFIGFS_FS is not set
931CONFIG_MISC_FILESYSTEMS=y
932# CONFIG_ADFS_FS is not set
933# CONFIG_AFFS_FS is not set
934# CONFIG_HFS_FS is not set
935# CONFIG_HFSPLUS_FS is not set
936# CONFIG_BEFS_FS is not set
937# CONFIG_BFS_FS is not set
938# CONFIG_EFS_FS is not set
939# CONFIG_JFFS2_FS is not set
940CONFIG_CRAMFS=y
941# CONFIG_SQUASHFS is not set
942# CONFIG_VXFS_FS is not set
943# CONFIG_MINIX_FS is not set
944# CONFIG_OMFS_FS is not set
945# CONFIG_HPFS_FS is not set
946# CONFIG_QNX4FS_FS is not set
947# CONFIG_ROMFS_FS is not set
948# CONFIG_SYSV_FS is not set
949# CONFIG_UFS_FS is not set
950CONFIG_NETWORK_FILESYSTEMS=y
951CONFIG_NFS_FS=y
952CONFIG_NFS_V3=y
953# CONFIG_NFS_V3_ACL is not set
954# CONFIG_NFS_V4 is not set
955CONFIG_ROOT_NFS=y
956# CONFIG_NFSD is not set
957CONFIG_LOCKD=y
958CONFIG_LOCKD_V4=y
959CONFIG_NFS_COMMON=y
960CONFIG_SUNRPC=y
961# CONFIG_SUNRPC_REGISTER_V4 is not set
962# CONFIG_RPCSEC_GSS_KRB5 is not set
963# CONFIG_RPCSEC_GSS_SPKM3 is not set
964# CONFIG_SMB_FS is not set
965# CONFIG_CIFS is not set
966# CONFIG_NCP_FS is not set
967# CONFIG_CODA_FS is not set
968# CONFIG_AFS_FS is not set
969
970#
971# Partition Types
972#
973# CONFIG_PARTITION_ADVANCED is not set
974CONFIG_MSDOS_PARTITION=y
975# CONFIG_NLS is not set
976# CONFIG_DLM is not set
977
978#
979# Library routines
980#
981CONFIG_BITREVERSE=y
982CONFIG_GENERIC_FIND_LAST_BIT=y
983# CONFIG_CRC_CCITT is not set
984# CONFIG_CRC16 is not set
985# CONFIG_CRC_T10DIF is not set
986# CONFIG_CRC_ITU_T is not set
987CONFIG_CRC32=y
988# CONFIG_CRC7 is not set
989# CONFIG_LIBCRC32C is not set
990CONFIG_ZLIB_INFLATE=y
991CONFIG_PLIST=y
992CONFIG_HAS_IOMEM=y
993CONFIG_HAS_IOPORT=y
994CONFIG_HAS_DMA=y
995CONFIG_HAVE_LMB=y
996
997#
998# Kernel hacking
999#
1000# CONFIG_PRINTK_TIME is not set
1001CONFIG_ENABLE_WARN_DEPRECATED=y
1002CONFIG_ENABLE_MUST_CHECK=y
1003CONFIG_FRAME_WARN=1024
1004CONFIG_MAGIC_SYSRQ=y
1005# CONFIG_UNUSED_SYMBOLS is not set
1006CONFIG_DEBUG_FS=y
1007# CONFIG_HEADERS_CHECK is not set
1008CONFIG_DEBUG_KERNEL=y
1009# CONFIG_DEBUG_SHIRQ is not set
1010CONFIG_DETECT_SOFTLOCKUP=y
1011# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1012CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1013CONFIG_SCHED_DEBUG=y
1014# CONFIG_SCHEDSTATS is not set
1015# CONFIG_TIMER_STATS is not set
1016# CONFIG_DEBUG_OBJECTS is not set
1017# CONFIG_SLUB_DEBUG_ON is not set
1018# CONFIG_SLUB_STATS is not set
1019# CONFIG_DEBUG_RT_MUTEXES is not set
1020# CONFIG_RT_MUTEX_TESTER is not set
1021# CONFIG_DEBUG_SPINLOCK is not set
1022# CONFIG_DEBUG_MUTEXES is not set
1023# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1024# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1025# CONFIG_DEBUG_KOBJECT is not set
1026# CONFIG_DEBUG_BUGVERBOSE is not set
1027# CONFIG_DEBUG_INFO is not set
1028# CONFIG_DEBUG_VM is not set
1029# CONFIG_DEBUG_WRITECOUNT is not set
1030# CONFIG_DEBUG_MEMORY_INIT is not set
1031# CONFIG_DEBUG_LIST is not set
1032# CONFIG_DEBUG_SG is not set
1033# CONFIG_DEBUG_NOTIFIERS is not set
1034# CONFIG_BOOT_PRINTK_DELAY is not set
1035# CONFIG_RCU_TORTURE_TEST is not set
1036# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1037# CONFIG_BACKTRACE_SELF_TEST is not set
1038# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1039# CONFIG_FAULT_INJECTION is not set
1040# CONFIG_LATENCYTOP is not set
1041CONFIG_SYSCTL_SYSCALL_CHECK=y
1042CONFIG_HAVE_FUNCTION_TRACER=y
1043CONFIG_HAVE_DYNAMIC_FTRACE=y
1044CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1045
1046#
1047# Tracers
1048#
1049# CONFIG_FUNCTION_TRACER is not set
1050# CONFIG_SCHED_TRACER is not set
1051# CONFIG_CONTEXT_SWITCH_TRACER is not set
1052# CONFIG_BOOT_TRACER is not set
1053# CONFIG_TRACE_BRANCH_PROFILING is not set
1054# CONFIG_STACK_TRACER is not set
1055# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1056# CONFIG_SAMPLES is not set
1057CONFIG_HAVE_ARCH_KGDB=y
1058# CONFIG_KGDB is not set
1059CONFIG_PRINT_STACK_DEPTH=64
1060# CONFIG_DEBUG_STACKOVERFLOW is not set
1061# CONFIG_DEBUG_STACK_USAGE is not set
1062# CONFIG_DEBUG_PAGEALLOC is not set
1063# CONFIG_CODE_PATCHING_SELFTEST is not set
1064# CONFIG_FTR_FIXUP_SELFTEST is not set
1065# CONFIG_MSI_BITMAP_SELFTEST is not set
1066# CONFIG_XMON is not set
1067# CONFIG_IRQSTACKS is not set
1068# CONFIG_VIRQ_DEBUG is not set
1069# CONFIG_BDI_SWITCH is not set
1070# CONFIG_PPC_EARLY_DEBUG is not set
1071
1072#
1073# Security options
1074#
1075# CONFIG_KEYS is not set
1076# CONFIG_SECURITY is not set
1077# CONFIG_SECURITYFS is not set
1078# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1079CONFIG_CRYPTO=y
1080
1081#
1082# Crypto core or helper
1083#
1084# CONFIG_CRYPTO_FIPS is not set
1085CONFIG_CRYPTO_ALGAPI=y
1086CONFIG_CRYPTO_ALGAPI2=y
1087CONFIG_CRYPTO_AEAD=y
1088CONFIG_CRYPTO_AEAD2=y
1089CONFIG_CRYPTO_BLKCIPHER=y
1090CONFIG_CRYPTO_BLKCIPHER2=y
1091CONFIG_CRYPTO_HASH=y
1092CONFIG_CRYPTO_HASH2=y
1093CONFIG_CRYPTO_RNG=y
1094CONFIG_CRYPTO_RNG2=y
1095CONFIG_CRYPTO_MANAGER=y
1096CONFIG_CRYPTO_MANAGER2=y
1097CONFIG_CRYPTO_GF128MUL=y
1098# CONFIG_CRYPTO_NULL is not set
1099CONFIG_CRYPTO_CRYPTD=y
1100CONFIG_CRYPTO_AUTHENC=y
1101# CONFIG_CRYPTO_TEST is not set
1102
1103#
1104# Authenticated Encryption with Associated Data
1105#
1106CONFIG_CRYPTO_CCM=y
1107CONFIG_CRYPTO_GCM=y
1108CONFIG_CRYPTO_SEQIV=y
1109
1110#
1111# Block modes
1112#
1113CONFIG_CRYPTO_CBC=y
1114CONFIG_CRYPTO_CTR=y
1115CONFIG_CRYPTO_CTS=y
1116CONFIG_CRYPTO_ECB=y
1117CONFIG_CRYPTO_LRW=y
1118CONFIG_CRYPTO_PCBC=y
1119CONFIG_CRYPTO_XTS=y
1120
1121#
1122# Hash modes
1123#
1124CONFIG_CRYPTO_HMAC=y
1125CONFIG_CRYPTO_XCBC=y
1126
1127#
1128# Digest
1129#
1130# CONFIG_CRYPTO_CRC32C is not set
1131CONFIG_CRYPTO_MD4=y
1132CONFIG_CRYPTO_MD5=y
1133# CONFIG_CRYPTO_MICHAEL_MIC is not set
1134# CONFIG_CRYPTO_RMD128 is not set
1135# CONFIG_CRYPTO_RMD160 is not set
1136# CONFIG_CRYPTO_RMD256 is not set
1137# CONFIG_CRYPTO_RMD320 is not set
1138CONFIG_CRYPTO_SHA1=y
1139CONFIG_CRYPTO_SHA256=y
1140CONFIG_CRYPTO_SHA512=y
1141# CONFIG_CRYPTO_TGR192 is not set
1142# CONFIG_CRYPTO_WP512 is not set
1143
1144#
1145# Ciphers
1146#
1147CONFIG_CRYPTO_AES=y
1148# CONFIG_CRYPTO_ANUBIS is not set
1149CONFIG_CRYPTO_ARC4=y
1150CONFIG_CRYPTO_BLOWFISH=y
1151# CONFIG_CRYPTO_CAMELLIA is not set
1152# CONFIG_CRYPTO_CAST5 is not set
1153# CONFIG_CRYPTO_CAST6 is not set
1154CONFIG_CRYPTO_DES=y
1155# CONFIG_CRYPTO_FCRYPT is not set
1156# CONFIG_CRYPTO_KHAZAD is not set
1157# CONFIG_CRYPTO_SALSA20 is not set
1158# CONFIG_CRYPTO_SEED is not set
1159# CONFIG_CRYPTO_SERPENT is not set
1160# CONFIG_CRYPTO_TEA is not set
1161# CONFIG_CRYPTO_TWOFISH is not set
1162
1163#
1164# Compression
1165#
1166# CONFIG_CRYPTO_DEFLATE is not set
1167# CONFIG_CRYPTO_LZO is not set
1168
1169#
1170# Random Number Generation
1171#
1172# CONFIG_CRYPTO_ANSI_CPRNG is not set
1173CONFIG_CRYPTO_HW=y
1174# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1175# CONFIG_PPC_CLOCK is not set
1176# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/socrates_defconfig b/arch/powerpc/configs/85xx/socrates_defconfig
new file mode 100644
index 000000000000..0cc9048290a8
--- /dev/null
+++ b/arch/powerpc/configs/85xx/socrates_defconfig
@@ -0,0 +1,1410 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26.2
4# Sat Oct 18 11:06:13 2008
5#
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_E500=y
18CONFIG_BOOKE=y
19CONFIG_FSL_BOOKE=y
20CONFIG_FSL_EMB_PERFMON=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
38CONFIG_ARCH_HAS_ILOG2_U32=y
39CONFIG_GENERIC_HWEIGHT=y
40CONFIG_GENERIC_CALIBRATE_DELAY=y
41CONFIG_GENERIC_FIND_NEXT_BIT=y
42# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
43CONFIG_PPC=y
44CONFIG_EARLY_PRINTK=y
45CONFIG_GENERIC_NVRAM=y
46CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
47CONFIG_ARCH_MAY_HAVE_PC_FDC=y
48CONFIG_PPC_OF=y
49CONFIG_OF=y
50CONFIG_PPC_UDBG_16550=y
51# CONFIG_GENERIC_TBSYNC is not set
52CONFIG_AUDIT_ARCH=y
53CONFIG_GENERIC_BUG=y
54CONFIG_DEFAULT_UIMAGE=y
55# CONFIG_PPC_DCR_NATIVE is not set
56# CONFIG_PPC_DCR_MMIO is not set
57CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
58
59#
60# General setup
61#
62CONFIG_EXPERIMENTAL=y
63CONFIG_BROKEN_ON_SMP=y
64CONFIG_INIT_ENV_ARG_LIMIT=32
65CONFIG_LOCALVERSION=""
66CONFIG_LOCALVERSION_AUTO=y
67CONFIG_SWAP=y
68CONFIG_SYSVIPC=y
69CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_POSIX_MQUEUE is not set
71# CONFIG_BSD_PROCESS_ACCT is not set
72# CONFIG_TASKSTATS is not set
73# CONFIG_AUDIT is not set
74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=16
76# CONFIG_CGROUPS is not set
77CONFIG_GROUP_SCHED=y
78CONFIG_FAIR_GROUP_SCHED=y
79# CONFIG_RT_GROUP_SCHED is not set
80CONFIG_USER_SCHED=y
81# CONFIG_CGROUP_SCHED is not set
82CONFIG_SYSFS_DEPRECATED=y
83CONFIG_SYSFS_DEPRECATED_V2=y
84# CONFIG_RELAY is not set
85# CONFIG_NAMESPACES is not set
86CONFIG_BLK_DEV_INITRD=y
87CONFIG_INITRAMFS_SOURCE=""
88# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
89CONFIG_SYSCTL=y
90CONFIG_EMBEDDED=y
91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
93# CONFIG_KALLSYMS is not set
94# CONFIG_HOTPLUG is not set
95CONFIG_PRINTK=y
96CONFIG_BUG=y
97CONFIG_ELF_CORE=y
98CONFIG_COMPAT_BRK=y
99CONFIG_BASE_FULL=y
100CONFIG_FUTEX=y
101CONFIG_ANON_INODES=y
102# CONFIG_EPOLL is not set
103CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y
105CONFIG_EVENTFD=y
106CONFIG_SHMEM=y
107CONFIG_VM_EVENT_COUNTERS=y
108CONFIG_SLUB_DEBUG=y
109# CONFIG_SLAB is not set
110CONFIG_SLUB=y
111# CONFIG_SLOB is not set
112# CONFIG_PROFILING is not set
113# CONFIG_MARKERS is not set
114CONFIG_HAVE_OPROFILE=y
115CONFIG_HAVE_KPROBES=y
116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
118CONFIG_PROC_PAGE_MONITOR=y
119CONFIG_SLABINFO=y
120CONFIG_RT_MUTEXES=y
121# CONFIG_TINY_SHMEM is not set
122CONFIG_BASE_SMALL=0
123CONFIG_MODULES=y
124# CONFIG_MODULE_FORCE_LOAD is not set
125CONFIG_MODULE_UNLOAD=y
126CONFIG_MODULE_FORCE_UNLOAD=y
127# CONFIG_MODVERSIONS is not set
128# CONFIG_MODULE_SRCVERSION_ALL is not set
129# CONFIG_KMOD is not set
130CONFIG_BLOCK=y
131# CONFIG_LBD is not set
132# CONFIG_BLK_DEV_IO_TRACE is not set
133# CONFIG_LSF is not set
134# CONFIG_BLK_DEV_BSG is not set
135
136#
137# IO Schedulers
138#
139CONFIG_IOSCHED_NOOP=y
140CONFIG_IOSCHED_AS=y
141CONFIG_IOSCHED_DEADLINE=y
142CONFIG_IOSCHED_CFQ=y
143CONFIG_DEFAULT_AS=y
144# CONFIG_DEFAULT_DEADLINE is not set
145# CONFIG_DEFAULT_CFQ is not set
146# CONFIG_DEFAULT_NOOP is not set
147CONFIG_DEFAULT_IOSCHED="anticipatory"
148CONFIG_CLASSIC_RCU=y
149
150#
151# Platform support
152#
153# CONFIG_PPC_MPC512x is not set
154# CONFIG_PPC_MPC5121 is not set
155# CONFIG_PPC_CELL is not set
156# CONFIG_PPC_CELL_NATIVE is not set
157# CONFIG_PQ2ADS is not set
158CONFIG_MPC85xx=y
159# CONFIG_MPC8540_ADS is not set
160# CONFIG_MPC8560_ADS is not set
161# CONFIG_MPC85xx_CDS is not set
162# CONFIG_MPC85xx_MDS is not set
163# CONFIG_MPC85xx_DS is not set
164CONFIG_SOCRATES=y
165# CONFIG_KSI8560 is not set
166# CONFIG_STX_GP3 is not set
167# CONFIG_TQM8540 is not set
168# CONFIG_TQM8541 is not set
169# CONFIG_TQM8555 is not set
170# CONFIG_TQM8560 is not set
171# CONFIG_SBC8548 is not set
172# CONFIG_SBC8560 is not set
173# CONFIG_IPIC is not set
174CONFIG_MPIC=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177# CONFIG_PPC_RTAS is not set
178# CONFIG_MMIO_NVRAM is not set
179# CONFIG_PPC_MPC106 is not set
180# CONFIG_PPC_970_NAP is not set
181# CONFIG_PPC_INDIRECT_IO is not set
182# CONFIG_GENERIC_IOMAP is not set
183# CONFIG_CPU_FREQ is not set
184# CONFIG_CPM2 is not set
185# CONFIG_FSL_ULI1575 is not set
186
187#
188# Kernel options
189#
190# CONFIG_HIGHMEM is not set
191# CONFIG_TICK_ONESHOT is not set
192# CONFIG_NO_HZ is not set
193# CONFIG_HIGH_RES_TIMERS is not set
194CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
195# CONFIG_HZ_100 is not set
196CONFIG_HZ_250=y
197# CONFIG_HZ_300 is not set
198# CONFIG_HZ_1000 is not set
199CONFIG_HZ=250
200# CONFIG_SCHED_HRTICK is not set
201CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT_VOLUNTARY is not set
203# CONFIG_PREEMPT is not set
204CONFIG_BINFMT_ELF=y
205# CONFIG_BINFMT_MISC is not set
206CONFIG_MATH_EMULATION=y
207# CONFIG_IOMMU_HELPER is not set
208CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
209CONFIG_ARCH_HAS_WALK_MEMORY=y
210CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
211CONFIG_ARCH_FLATMEM_ENABLE=y
212CONFIG_ARCH_POPULATES_NODE_MAP=y
213CONFIG_SELECT_MEMORY_MODEL=y
214CONFIG_FLATMEM_MANUAL=y
215# CONFIG_DISCONTIGMEM_MANUAL is not set
216# CONFIG_SPARSEMEM_MANUAL is not set
217CONFIG_FLATMEM=y
218CONFIG_FLAT_NODE_MEM_MAP=y
219# CONFIG_SPARSEMEM_STATIC is not set
220# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
221CONFIG_PAGEFLAGS_EXTENDED=y
222CONFIG_SPLIT_PTLOCK_CPUS=4
223# CONFIG_RESOURCES_64BIT is not set
224CONFIG_ZONE_DMA_FLAG=1
225CONFIG_BOUNCE=y
226CONFIG_VIRT_TO_BUS=y
227CONFIG_FORCE_MAX_ZONEORDER=11
228# CONFIG_PROC_DEVICETREE is not set
229# CONFIG_CMDLINE_BOOL is not set
230# CONFIG_PM is not set
231CONFIG_SECCOMP=y
232CONFIG_ISA_DMA_API=y
233
234#
235# Bus options
236#
237CONFIG_ZONE_DMA=y
238CONFIG_PPC_INDIRECT_PCI=y
239CONFIG_FSL_SOC=y
240CONFIG_FSL_PCI=y
241CONFIG_PCI=y
242CONFIG_PCI_DOMAINS=y
243CONFIG_PCI_SYSCALL=y
244# CONFIG_PCIEPORTBUS is not set
245CONFIG_ARCH_SUPPORTS_MSI=y
246# CONFIG_PCI_MSI is not set
247CONFIG_PCI_LEGACY=y
248# CONFIG_HAS_RAPIDIO is not set
249
250#
251# Advanced setup
252#
253# CONFIG_ADVANCED_OPTIONS is not set
254
255#
256# Default settings for advanced configuration options are used
257#
258CONFIG_LOWMEM_SIZE=0x30000000
259CONFIG_PAGE_OFFSET=0xc0000000
260CONFIG_KERNEL_START=0xc0000000
261CONFIG_PHYSICAL_START=0x00000000
262CONFIG_PHYSICAL_ALIGN=0x10000000
263CONFIG_TASK_SIZE=0xc0000000
264
265#
266# Networking
267#
268CONFIG_NET=y
269
270#
271# Networking options
272#
273CONFIG_PACKET=y
274# CONFIG_PACKET_MMAP is not set
275CONFIG_UNIX=y
276CONFIG_XFRM=y
277# CONFIG_XFRM_USER is not set
278# CONFIG_XFRM_SUB_POLICY is not set
279# CONFIG_XFRM_MIGRATE is not set
280# CONFIG_XFRM_STATISTICS is not set
281# CONFIG_NET_KEY is not set
282CONFIG_INET=y
283CONFIG_IP_MULTICAST=y
284# CONFIG_IP_ADVANCED_ROUTER is not set
285CONFIG_IP_FIB_HASH=y
286CONFIG_IP_PNP=y
287CONFIG_IP_PNP_DHCP=y
288CONFIG_IP_PNP_BOOTP=y
289# CONFIG_IP_PNP_RARP is not set
290# CONFIG_NET_IPIP is not set
291# CONFIG_NET_IPGRE is not set
292# CONFIG_IP_MROUTE is not set
293# CONFIG_ARPD is not set
294CONFIG_SYN_COOKIES=y
295# CONFIG_INET_AH is not set
296# CONFIG_INET_ESP is not set
297# CONFIG_INET_IPCOMP is not set
298# CONFIG_INET_XFRM_TUNNEL is not set
299# CONFIG_INET_TUNNEL is not set
300CONFIG_INET_XFRM_MODE_TRANSPORT=y
301CONFIG_INET_XFRM_MODE_TUNNEL=y
302CONFIG_INET_XFRM_MODE_BEET=y
303# CONFIG_INET_LRO is not set
304CONFIG_INET_DIAG=y
305CONFIG_INET_TCP_DIAG=y
306# CONFIG_TCP_CONG_ADVANCED is not set
307CONFIG_TCP_CONG_CUBIC=y
308CONFIG_DEFAULT_TCP_CONG="cubic"
309# CONFIG_TCP_MD5SIG is not set
310# CONFIG_IPV6 is not set
311# CONFIG_NETWORK_SECMARK is not set
312# CONFIG_NETFILTER is not set
313# CONFIG_IP_DCCP is not set
314# CONFIG_IP_SCTP is not set
315# CONFIG_TIPC is not set
316# CONFIG_ATM is not set
317# CONFIG_BRIDGE is not set
318# CONFIG_VLAN_8021Q is not set
319# CONFIG_DECNET is not set
320# CONFIG_LLC2 is not set
321# CONFIG_IPX is not set
322# CONFIG_ATALK is not set
323# CONFIG_X25 is not set
324# CONFIG_LAPB is not set
325# CONFIG_ECONET is not set
326# CONFIG_WAN_ROUTER is not set
327# CONFIG_NET_SCHED is not set
328
329#
330# Network testing
331#
332# CONFIG_NET_PKTGEN is not set
333# CONFIG_HAMRADIO is not set
334CONFIG_CAN=y
335CONFIG_CAN_RAW=y
336CONFIG_CAN_BCM=y
337
338#
339# CAN Device Drivers
340#
341# CONFIG_CAN_VCAN is not set
342# CONFIG_CAN_OLD_DRIVERS is not set
343# CONFIG_CAN_SLCAN is not set
344CONFIG_CAN_SJA1000=y
345CONFIG_CAN_SJA1000_MEM_OF=y
346# CONFIG_CAN_EMS_PCI is not set
347# CONFIG_CAN_IXXAT_PCI is not set
348# CONFIG_CAN_PEAK_PCI is not set
349# CONFIG_CAN_KVASER_PCI is not set
350# CONFIG_CAN_MSCAN is not set
351# CONFIG_CAN_DEBUG_DEVICES is not set
352# CONFIG_IRDA is not set
353# CONFIG_BT is not set
354# CONFIG_AF_RXRPC is not set
355
356#
357# Wireless
358#
359# CONFIG_CFG80211 is not set
360# CONFIG_WIRELESS_EXT is not set
361# CONFIG_MAC80211 is not set
362# CONFIG_IEEE80211 is not set
363# CONFIG_RFKILL is not set
364# CONFIG_NET_9P is not set
365
366#
367# Device Drivers
368#
369
370#
371# Generic Driver Options
372#
373CONFIG_STANDALONE=y
374CONFIG_PREVENT_FIRMWARE_BUILD=y
375# CONFIG_SYS_HYPERVISOR is not set
376# CONFIG_CONNECTOR is not set
377CONFIG_MTD=y
378# CONFIG_MTD_DEBUG is not set
379CONFIG_MTD_CONCAT=y
380CONFIG_MTD_PARTITIONS=y
381# CONFIG_MTD_REDBOOT_PARTS is not set
382CONFIG_MTD_CMDLINE_PARTS=y
383CONFIG_MTD_OF_PARTS=y
384# CONFIG_MTD_AR7_PARTS is not set
385
386#
387# User Modules And Translation Layers
388#
389CONFIG_MTD_CHAR=y
390CONFIG_MTD_BLKDEVS=y
391CONFIG_MTD_BLOCK=y
392# CONFIG_FTL is not set
393# CONFIG_NFTL is not set
394# CONFIG_INFTL is not set
395# CONFIG_RFD_FTL is not set
396# CONFIG_SSFDC is not set
397# CONFIG_MTD_OOPS is not set
398
399#
400# RAM/ROM/Flash chip drivers
401#
402CONFIG_MTD_CFI=y
403CONFIG_MTD_JEDECPROBE=y
404CONFIG_MTD_GEN_PROBE=y
405# CONFIG_MTD_CFI_ADV_OPTIONS is not set
406CONFIG_MTD_MAP_BANK_WIDTH_1=y
407CONFIG_MTD_MAP_BANK_WIDTH_2=y
408CONFIG_MTD_MAP_BANK_WIDTH_4=y
409# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
410# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
411# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
412CONFIG_MTD_CFI_I1=y
413CONFIG_MTD_CFI_I2=y
414# CONFIG_MTD_CFI_I4 is not set
415# CONFIG_MTD_CFI_I8 is not set
416# CONFIG_MTD_CFI_INTELEXT is not set
417CONFIG_MTD_CFI_AMDSTD=y
418# CONFIG_MTD_CFI_STAA is not set
419CONFIG_MTD_CFI_UTIL=y
420# CONFIG_MTD_RAM is not set
421# CONFIG_MTD_ROM is not set
422# CONFIG_MTD_ABSENT is not set
423
424#
425# Mapping drivers for chip access
426#
427# CONFIG_MTD_COMPLEX_MAPPINGS is not set
428# CONFIG_MTD_PHYSMAP is not set
429CONFIG_MTD_PHYSMAP_OF=y
430# CONFIG_MTD_INTEL_VR_NOR is not set
431# CONFIG_MTD_PLATRAM is not set
432
433#
434# Self-contained MTD device drivers
435#
436# CONFIG_MTD_PMC551 is not set
437# CONFIG_MTD_DATAFLASH is not set
438# CONFIG_MTD_M25P80 is not set
439# CONFIG_MTD_SLRAM is not set
440# CONFIG_MTD_PHRAM is not set
441# CONFIG_MTD_MTDRAM is not set
442# CONFIG_MTD_BLOCK2MTD is not set
443
444#
445# Disk-On-Chip Device Drivers
446#
447# CONFIG_MTD_DOC2000 is not set
448# CONFIG_MTD_DOC2001 is not set
449# CONFIG_MTD_DOC2001PLUS is not set
450CONFIG_MTD_NAND=y
451# CONFIG_MTD_NAND_VERIFY_WRITE is not set
452# CONFIG_MTD_NAND_ECC_SMC is not set
453# CONFIG_MTD_NAND_MUSEUM_IDS is not set
454CONFIG_MTD_NAND_IDS=y
455# CONFIG_MTD_NAND_DISKONCHIP is not set
456# CONFIG_MTD_NAND_CAFE is not set
457# CONFIG_MTD_NAND_NANDSIM is not set
458# CONFIG_MTD_NAND_PLATFORM is not set
459# CONFIG_MTD_ALAUDA is not set
460# CONFIG_MTD_NAND_FSL_ELBC is not set
461CONFIG_MTD_NAND_SOCRATES=y
462# CONFIG_MTD_ONENAND is not set
463
464#
465# UBI - Unsorted block images
466#
467# CONFIG_MTD_UBI is not set
468CONFIG_OF_DEVICE=y
469CONFIG_OF_I2C=y
470# CONFIG_PARPORT is not set
471CONFIG_BLK_DEV=y
472# CONFIG_BLK_DEV_FD is not set
473# CONFIG_BLK_CPQ_DA is not set
474# CONFIG_BLK_CPQ_CISS_DA is not set
475# CONFIG_BLK_DEV_DAC960 is not set
476# CONFIG_BLK_DEV_UMEM is not set
477# CONFIG_BLK_DEV_COW_COMMON is not set
478CONFIG_BLK_DEV_LOOP=y
479# CONFIG_BLK_DEV_CRYPTOLOOP is not set
480# CONFIG_BLK_DEV_NBD is not set
481# CONFIG_BLK_DEV_SX8 is not set
482# CONFIG_BLK_DEV_UB is not set
483CONFIG_BLK_DEV_RAM=y
484CONFIG_BLK_DEV_RAM_COUNT=16
485CONFIG_BLK_DEV_RAM_SIZE=32768
486# CONFIG_BLK_DEV_XIP is not set
487# CONFIG_CDROM_PKTCDVD is not set
488# CONFIG_ATA_OVER_ETH is not set
489CONFIG_MISC_DEVICES=y
490# CONFIG_PHANTOM is not set
491# CONFIG_EEPROM_93CX6 is not set
492# CONFIG_SGI_IOC4 is not set
493# CONFIG_TIFM_CORE is not set
494# CONFIG_ENCLOSURE_SERVICES is not set
495CONFIG_HAVE_IDE=y
496# CONFIG_IDE is not set
497
498#
499# SCSI device support
500#
501# CONFIG_RAID_ATTRS is not set
502CONFIG_SCSI=y
503CONFIG_SCSI_DMA=y
504# CONFIG_SCSI_TGT is not set
505# CONFIG_SCSI_NETLINK is not set
506CONFIG_SCSI_PROC_FS=y
507
508#
509# SCSI support type (disk, tape, CD-ROM)
510#
511CONFIG_BLK_DEV_SD=y
512# CONFIG_CHR_DEV_ST is not set
513# CONFIG_CHR_DEV_OSST is not set
514# CONFIG_BLK_DEV_SR is not set
515# CONFIG_CHR_DEV_SG is not set
516# CONFIG_CHR_DEV_SCH is not set
517
518#
519# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
520#
521# CONFIG_SCSI_MULTI_LUN is not set
522# CONFIG_SCSI_CONSTANTS is not set
523# CONFIG_SCSI_LOGGING is not set
524# CONFIG_SCSI_SCAN_ASYNC is not set
525CONFIG_SCSI_WAIT_SCAN=m
526
527#
528# SCSI Transports
529#
530# CONFIG_SCSI_SPI_ATTRS is not set
531# CONFIG_SCSI_FC_ATTRS is not set
532# CONFIG_SCSI_ISCSI_ATTRS is not set
533# CONFIG_SCSI_SAS_LIBSAS is not set
534# CONFIG_SCSI_SRP_ATTRS is not set
535# CONFIG_SCSI_LOWLEVEL is not set
536# CONFIG_ATA is not set
537# CONFIG_MD is not set
538# CONFIG_FUSION is not set
539
540#
541# IEEE 1394 (FireWire) support
542#
543
544#
545# Enable only one of the two stacks, unless you know what you are doing
546#
547# CONFIG_FIREWIRE is not set
548# CONFIG_IEEE1394 is not set
549# CONFIG_I2O is not set
550# CONFIG_MACINTOSH_DRIVERS is not set
551CONFIG_NETDEVICES=y
552# CONFIG_NETDEVICES_MULTIQUEUE is not set
553# CONFIG_DUMMY is not set
554# CONFIG_BONDING is not set
555# CONFIG_MACVLAN is not set
556# CONFIG_EQUALIZER is not set
557# CONFIG_TUN is not set
558# CONFIG_VETH is not set
559# CONFIG_ARCNET is not set
560CONFIG_PHYLIB=y
561
562#
563# MII PHY device drivers
564#
565CONFIG_MARVELL_PHY=y
566# CONFIG_DAVICOM_PHY is not set
567# CONFIG_QSEMI_PHY is not set
568# CONFIG_LXT_PHY is not set
569# CONFIG_CICADA_PHY is not set
570# CONFIG_VITESSE_PHY is not set
571# CONFIG_SMSC_PHY is not set
572# CONFIG_BROADCOM_PHY is not set
573# CONFIG_ICPLUS_PHY is not set
574# CONFIG_REALTEK_PHY is not set
575# CONFIG_FIXED_PHY is not set
576# CONFIG_MDIO_BITBANG is not set
577CONFIG_NET_ETHERNET=y
578CONFIG_MII=y
579# CONFIG_HAPPYMEAL is not set
580# CONFIG_SUNGEM is not set
581# CONFIG_CASSINI is not set
582# CONFIG_NET_VENDOR_3COM is not set
583# CONFIG_ENC28J60 is not set
584# CONFIG_NET_TULIP is not set
585# CONFIG_HP100 is not set
586# CONFIG_IBM_NEW_EMAC_ZMII is not set
587# CONFIG_IBM_NEW_EMAC_RGMII is not set
588# CONFIG_IBM_NEW_EMAC_TAH is not set
589# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
590# CONFIG_NET_PCI is not set
591# CONFIG_B44 is not set
592CONFIG_NETDEV_1000=y
593# CONFIG_ACENIC is not set
594# CONFIG_DL2K is not set
595# CONFIG_E1000 is not set
596# CONFIG_E1000E is not set
597# CONFIG_E1000E_ENABLED is not set
598# CONFIG_IP1000 is not set
599# CONFIG_IGB is not set
600# CONFIG_NS83820 is not set
601# CONFIG_HAMACHI is not set
602# CONFIG_YELLOWFIN is not set
603# CONFIG_R8169 is not set
604# CONFIG_SIS190 is not set
605# CONFIG_SKGE is not set
606# CONFIG_SKY2 is not set
607# CONFIG_VIA_VELOCITY is not set
608# CONFIG_TIGON3 is not set
609# CONFIG_BNX2 is not set
610CONFIG_GIANFAR=y
611CONFIG_GFAR_NAPI=y
612# CONFIG_QLA3XXX is not set
613# CONFIG_ATL1 is not set
614# CONFIG_NETDEV_10000 is not set
615# CONFIG_TR is not set
616
617#
618# Wireless LAN
619#
620# CONFIG_WLAN_PRE80211 is not set
621# CONFIG_WLAN_80211 is not set
622# CONFIG_IWLWIFI_LEDS is not set
623
624#
625# USB Network Adapters
626#
627# CONFIG_USB_CATC is not set
628# CONFIG_USB_KAWETH is not set
629# CONFIG_USB_PEGASUS is not set
630# CONFIG_USB_RTL8150 is not set
631# CONFIG_USB_USBNET is not set
632# CONFIG_WAN is not set
633# CONFIG_FDDI is not set
634# CONFIG_HIPPI is not set
635# CONFIG_PPP is not set
636# CONFIG_SLIP is not set
637# CONFIG_NET_FC is not set
638# CONFIG_NETCONSOLE is not set
639# CONFIG_NETPOLL is not set
640# CONFIG_NET_POLL_CONTROLLER is not set
641# CONFIG_ISDN is not set
642# CONFIG_PHONE is not set
643
644#
645# Input device support
646#
647CONFIG_INPUT=y
648# CONFIG_INPUT_FF_MEMLESS is not set
649# CONFIG_INPUT_POLLDEV is not set
650
651#
652# Userland interfaces
653#
654CONFIG_INPUT_MOUSEDEV=y
655CONFIG_INPUT_MOUSEDEV_PSAUX=y
656CONFIG_INPUT_MOUSEDEV_SCREEN_X=800
657CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
658# CONFIG_INPUT_JOYDEV is not set
659CONFIG_INPUT_EVDEV=y
660# CONFIG_INPUT_EVBUG is not set
661
662#
663# Input Device Drivers
664#
665# CONFIG_INPUT_KEYBOARD is not set
666# CONFIG_INPUT_MOUSE is not set
667# CONFIG_INPUT_JOYSTICK is not set
668# CONFIG_INPUT_TABLET is not set
669CONFIG_INPUT_TOUCHSCREEN=y
670# CONFIG_TOUCHSCREEN_ADS7846 is not set
671# CONFIG_TOUCHSCREEN_FUJITSU is not set
672# CONFIG_TOUCHSCREEN_GUNZE is not set
673# CONFIG_TOUCHSCREEN_ELO is not set
674# CONFIG_TOUCHSCREEN_MTOUCH is not set
675# CONFIG_TOUCHSCREEN_MK712 is not set
676# CONFIG_TOUCHSCREEN_PENMOUNT is not set
677# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
678# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
679# CONFIG_TOUCHSCREEN_UCB1400 is not set
680CONFIG_TOUCHSCREEN_TSC2003=y
681# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
682# CONFIG_INPUT_MISC is not set
683
684#
685# Hardware I/O ports
686#
687# CONFIG_SERIO is not set
688# CONFIG_GAMEPORT is not set
689
690#
691# Character devices
692#
693CONFIG_VT=y
694CONFIG_VT_CONSOLE=y
695CONFIG_HW_CONSOLE=y
696# CONFIG_VT_HW_CONSOLE_BINDING is not set
697CONFIG_DEVKMEM=y
698# CONFIG_SERIAL_NONSTANDARD is not set
699# CONFIG_NOZOMI is not set
700
701#
702# Serial drivers
703#
704CONFIG_SERIAL_8250=y
705CONFIG_SERIAL_8250_CONSOLE=y
706CONFIG_SERIAL_8250_PCI=y
707CONFIG_SERIAL_8250_NR_UARTS=2
708CONFIG_SERIAL_8250_RUNTIME_UARTS=2
709CONFIG_SERIAL_8250_EXTENDED=y
710CONFIG_SERIAL_8250_MANY_PORTS=y
711CONFIG_SERIAL_8250_SHARE_IRQ=y
712CONFIG_SERIAL_8250_DETECT_IRQ=y
713CONFIG_SERIAL_8250_RSA=y
714
715#
716# Non-8250 serial port support
717#
718# CONFIG_SERIAL_UARTLITE is not set
719CONFIG_SERIAL_CORE=y
720CONFIG_SERIAL_CORE_CONSOLE=y
721# CONFIG_SERIAL_JSM is not set
722# CONFIG_SERIAL_OF_PLATFORM is not set
723CONFIG_UNIX98_PTYS=y
724CONFIG_LEGACY_PTYS=y
725CONFIG_LEGACY_PTY_COUNT=256
726# CONFIG_IPMI_HANDLER is not set
727CONFIG_HW_RANDOM=y
728# CONFIG_NVRAM is not set
729# CONFIG_R3964 is not set
730# CONFIG_APPLICOM is not set
731# CONFIG_RAW_DRIVER is not set
732# CONFIG_TCG_TPM is not set
733CONFIG_DEVPORT=y
734CONFIG_I2C=y
735CONFIG_I2C_BOARDINFO=y
736CONFIG_I2C_CHARDEV=y
737
738#
739# I2C Hardware Bus support
740#
741# CONFIG_I2C_ALI1535 is not set
742# CONFIG_I2C_ALI1563 is not set
743# CONFIG_I2C_ALI15X3 is not set
744# CONFIG_I2C_AMD756 is not set
745# CONFIG_I2C_AMD8111 is not set
746# CONFIG_I2C_I801 is not set
747# CONFIG_I2C_I810 is not set
748# CONFIG_I2C_PIIX4 is not set
749CONFIG_I2C_MPC=y
750# CONFIG_I2C_NFORCE2 is not set
751# CONFIG_I2C_OCORES is not set
752# CONFIG_I2C_PARPORT_LIGHT is not set
753# CONFIG_I2C_PROSAVAGE is not set
754# CONFIG_I2C_SAVAGE4 is not set
755# CONFIG_I2C_SIMTEC is not set
756# CONFIG_I2C_SIS5595 is not set
757# CONFIG_I2C_SIS630 is not set
758# CONFIG_I2C_SIS96X is not set
759# CONFIG_I2C_TAOS_EVM is not set
760# CONFIG_I2C_STUB is not set
761# CONFIG_I2C_TINY_USB is not set
762# CONFIG_I2C_VIA is not set
763# CONFIG_I2C_VIAPRO is not set
764# CONFIG_I2C_VOODOO3 is not set
765# CONFIG_I2C_PCA_PLATFORM is not set
766
767#
768# Miscellaneous I2C Chip support
769#
770# CONFIG_DS1682 is not set
771# CONFIG_SENSORS_EEPROM is not set
772# CONFIG_SENSORS_PCF8574 is not set
773# CONFIG_PCF8575 is not set
774# CONFIG_SENSORS_PCF8591 is not set
775# CONFIG_SENSORS_MAX6875 is not set
776# CONFIG_SENSORS_TSL2550 is not set
777# CONFIG_I2C_DEBUG_CORE is not set
778# CONFIG_I2C_DEBUG_ALGO is not set
779# CONFIG_I2C_DEBUG_BUS is not set
780# CONFIG_I2C_DEBUG_CHIP is not set
781CONFIG_SPI=y
782CONFIG_SPI_MASTER=y
783
784#
785# SPI Master Controller Drivers
786#
787# CONFIG_SPI_BITBANG is not set
788CONFIG_SPI_SOCRATES=y
789
790#
791# SPI Protocol Masters
792#
793# CONFIG_SPI_AT25 is not set
794# CONFIG_SPI_SPIDEV is not set
795# CONFIG_SPI_TLE62X0 is not set
796# CONFIG_W1 is not set
797# CONFIG_POWER_SUPPLY is not set
798CONFIG_HWMON=y
799CONFIG_HWMON_VID=y
800# CONFIG_SENSORS_AD7418 is not set
801# CONFIG_SENSORS_ADM1021 is not set
802# CONFIG_SENSORS_ADM1025 is not set
803# CONFIG_SENSORS_ADM1026 is not set
804# CONFIG_SENSORS_ADM1029 is not set
805# CONFIG_SENSORS_ADM1031 is not set
806# CONFIG_SENSORS_ADM9240 is not set
807# CONFIG_SENSORS_ADT7470 is not set
808# CONFIG_SENSORS_ADT7473 is not set
809# CONFIG_SENSORS_ATXP1 is not set
810# CONFIG_SENSORS_DS1621 is not set
811# CONFIG_SENSORS_I5K_AMB is not set
812# CONFIG_SENSORS_F71805F is not set
813# CONFIG_SENSORS_F71882FG is not set
814# CONFIG_SENSORS_F75375S is not set
815# CONFIG_SENSORS_GL518SM is not set
816# CONFIG_SENSORS_GL520SM is not set
817# CONFIG_SENSORS_IT87 is not set
818# CONFIG_SENSORS_LM63 is not set
819# CONFIG_SENSORS_LM70 is not set
820CONFIG_SENSORS_LM75=y
821# CONFIG_SENSORS_LM77 is not set
822# CONFIG_SENSORS_LM78 is not set
823# CONFIG_SENSORS_LM80 is not set
824# CONFIG_SENSORS_LM83 is not set
825# CONFIG_SENSORS_LM85 is not set
826# CONFIG_SENSORS_LM87 is not set
827# CONFIG_SENSORS_LM90 is not set
828# CONFIG_SENSORS_LM92 is not set
829# CONFIG_SENSORS_LM93 is not set
830# CONFIG_SENSORS_MAX1619 is not set
831# CONFIG_SENSORS_MAX6650 is not set
832# CONFIG_SENSORS_PC87360 is not set
833# CONFIG_SENSORS_PC87427 is not set
834# CONFIG_SENSORS_SIS5595 is not set
835# CONFIG_SENSORS_DME1737 is not set
836# CONFIG_SENSORS_SMSC47M1 is not set
837# CONFIG_SENSORS_SMSC47M192 is not set
838# CONFIG_SENSORS_SMSC47B397 is not set
839# CONFIG_SENSORS_ADS7828 is not set
840# CONFIG_SENSORS_THMC50 is not set
841# CONFIG_SENSORS_VIA686A is not set
842# CONFIG_SENSORS_VT1211 is not set
843# CONFIG_SENSORS_VT8231 is not set
844CONFIG_SENSORS_W83781D=y
845# CONFIG_SENSORS_W83791D is not set
846# CONFIG_SENSORS_W83792D is not set
847# CONFIG_SENSORS_W83793 is not set
848# CONFIG_SENSORS_W83L785TS is not set
849# CONFIG_SENSORS_W83L786NG is not set
850# CONFIG_SENSORS_W83627HF is not set
851# CONFIG_SENSORS_W83627EHF is not set
852CONFIG_HWMON_DEBUG_CHIP=y
853# CONFIG_THERMAL is not set
854# CONFIG_THERMAL_HWMON is not set
855# CONFIG_WATCHDOG is not set
856
857#
858# Sonics Silicon Backplane
859#
860CONFIG_SSB_POSSIBLE=y
861# CONFIG_SSB is not set
862
863#
864# Multifunction device drivers
865#
866# CONFIG_MFD_SM501 is not set
867# CONFIG_HTC_PASIC3 is not set
868
869#
870# Multimedia devices
871#
872
873#
874# Multimedia core support
875#
876# CONFIG_VIDEO_DEV is not set
877# CONFIG_DVB_CORE is not set
878# CONFIG_VIDEO_MEDIA is not set
879
880#
881# Multimedia drivers
882#
883CONFIG_DAB=y
884# CONFIG_USB_DABUSB is not set
885
886#
887# Graphics support
888#
889# CONFIG_AGP is not set
890# CONFIG_DRM is not set
891# CONFIG_VGASTATE is not set
892# CONFIG_VIDEO_OUTPUT_CONTROL is not set
893CONFIG_FB=y
894# CONFIG_FIRMWARE_EDID is not set
895# CONFIG_FB_DDC is not set
896CONFIG_FB_CFB_FILLRECT=y
897CONFIG_FB_CFB_COPYAREA=y
898CONFIG_FB_CFB_IMAGEBLIT=y
899# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
900# CONFIG_FB_SYS_FILLRECT is not set
901# CONFIG_FB_SYS_COPYAREA is not set
902# CONFIG_FB_SYS_IMAGEBLIT is not set
903CONFIG_FB_FOREIGN_ENDIAN=y
904CONFIG_FB_BOTH_ENDIAN=y
905# CONFIG_FB_BIG_ENDIAN is not set
906# CONFIG_FB_LITTLE_ENDIAN is not set
907# CONFIG_FB_SYS_FOPS is not set
908# CONFIG_FB_SVGALIB is not set
909# CONFIG_FB_MACMODES is not set
910# CONFIG_FB_BACKLIGHT is not set
911# CONFIG_FB_MODE_HELPERS is not set
912# CONFIG_FB_TILEBLITTING is not set
913
914#
915# Frame buffer hardware drivers
916#
917CONFIG_FB_MB862XX=y
918# CONFIG_FB_MB862XX_PCI_GDC is not set
919CONFIG_FB_MB862XX_LIME=y
920# CONFIG_FB_PRE_INIT_FB is not set
921# CONFIG_FB_CIRRUS is not set
922# CONFIG_FB_PM2 is not set
923# CONFIG_FB_CYBER2000 is not set
924# CONFIG_FB_OF is not set
925# CONFIG_FB_CT65550 is not set
926# CONFIG_FB_ASILIANT is not set
927# CONFIG_FB_IMSTT is not set
928# CONFIG_FB_VGA16 is not set
929# CONFIG_FB_S1D13XXX is not set
930# CONFIG_FB_NVIDIA is not set
931# CONFIG_FB_RIVA is not set
932# CONFIG_FB_MATROX is not set
933# CONFIG_FB_RADEON is not set
934# CONFIG_FB_ATY128 is not set
935# CONFIG_FB_ATY is not set
936# CONFIG_FB_S3 is not set
937# CONFIG_FB_SAVAGE is not set
938# CONFIG_FB_SIS is not set
939# CONFIG_FB_NEOMAGIC is not set
940# CONFIG_FB_KYRO is not set
941# CONFIG_FB_3DFX is not set
942# CONFIG_FB_VOODOO1 is not set
943# CONFIG_FB_VT8623 is not set
944# CONFIG_FB_TRIDENT is not set
945# CONFIG_FB_ARK is not set
946# CONFIG_FB_PM3 is not set
947# CONFIG_FB_FSL_DIU is not set
948# CONFIG_FB_IBM_GXT4500 is not set
949# CONFIG_FB_VIRTUAL is not set
950# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
951
952#
953# Display device support
954#
955# CONFIG_DISPLAY_SUPPORT is not set
956
957#
958# Console display driver support
959#
960# CONFIG_VGA_CONSOLE is not set
961CONFIG_DUMMY_CONSOLE=y
962CONFIG_FRAMEBUFFER_CONSOLE=y
963# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
964# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
965CONFIG_FONTS=y
966# CONFIG_FONT_8x8 is not set
967CONFIG_FONT_8x16=y
968# CONFIG_FONT_6x11 is not set
969# CONFIG_FONT_7x14 is not set
970# CONFIG_FONT_PEARL_8x8 is not set
971# CONFIG_FONT_ACORN_8x8 is not set
972# CONFIG_FONT_MINI_4x6 is not set
973# CONFIG_FONT_SUN8x16 is not set
974# CONFIG_FONT_SUN12x22 is not set
975# CONFIG_FONT_10x18 is not set
976# CONFIG_LOGO is not set
977
978#
979# Sound
980#
981# CONFIG_SOUND is not set
982CONFIG_HID_SUPPORT=y
983CONFIG_HID=y
984# CONFIG_HID_DEBUG is not set
985# CONFIG_HIDRAW is not set
986
987#
988# USB Input Devices
989#
990CONFIG_USB_HID=y
991# CONFIG_USB_HIDINPUT_POWERBOOK is not set
992# CONFIG_HID_FF is not set
993# CONFIG_USB_HIDDEV is not set
994CONFIG_USB_SUPPORT=y
995CONFIG_USB_ARCH_HAS_HCD=y
996CONFIG_USB_ARCH_HAS_OHCI=y
997CONFIG_USB_ARCH_HAS_EHCI=y
998CONFIG_USB=y
999# CONFIG_USB_DEBUG is not set
1000CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
1001
1002#
1003# Miscellaneous USB options
1004#
1005CONFIG_USB_DEVICEFS=y
1006CONFIG_USB_DEVICE_CLASS=y
1007# CONFIG_USB_DYNAMIC_MINORS is not set
1008# CONFIG_USB_OTG is not set
1009# CONFIG_USB_OTG_WHITELIST is not set
1010# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1011
1012#
1013# USB Host Controller Drivers
1014#
1015# CONFIG_USB_C67X00_HCD is not set
1016CONFIG_USB_EHCI_HCD=y
1017# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1018# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1019# CONFIG_USB_EHCI_FSL is not set
1020CONFIG_USB_EHCI_HCD_PPC_OF=y
1021# CONFIG_USB_ISP116X_HCD is not set
1022# CONFIG_USB_ISP1760_HCD is not set
1023CONFIG_USB_OHCI_HCD=y
1024CONFIG_USB_OHCI_HCD_PPC_OF=y
1025CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1026# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1027CONFIG_USB_OHCI_HCD_PCI=y
1028CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1029CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1030CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1031# CONFIG_USB_UHCI_HCD is not set
1032# CONFIG_USB_SL811_HCD is not set
1033# CONFIG_USB_R8A66597_HCD is not set
1034
1035#
1036# USB Device Class drivers
1037#
1038# CONFIG_USB_ACM is not set
1039# CONFIG_USB_PRINTER is not set
1040# CONFIG_USB_WDM is not set
1041
1042#
1043# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1044#
1045
1046#
1047# may also be needed; see USB_STORAGE Help for more information
1048#
1049CONFIG_USB_STORAGE=y
1050# CONFIG_USB_STORAGE_DEBUG is not set
1051# CONFIG_USB_STORAGE_DATAFAB is not set
1052# CONFIG_USB_STORAGE_FREECOM is not set
1053# CONFIG_USB_STORAGE_ISD200 is not set
1054# CONFIG_USB_STORAGE_DPCM is not set
1055# CONFIG_USB_STORAGE_USBAT is not set
1056# CONFIG_USB_STORAGE_SDDR09 is not set
1057# CONFIG_USB_STORAGE_SDDR55 is not set
1058# CONFIG_USB_STORAGE_JUMPSHOT is not set
1059# CONFIG_USB_STORAGE_ALAUDA is not set
1060# CONFIG_USB_STORAGE_ONETOUCH is not set
1061# CONFIG_USB_STORAGE_KARMA is not set
1062# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1063# CONFIG_USB_LIBUSUAL is not set
1064
1065#
1066# USB Imaging devices
1067#
1068# CONFIG_USB_MDC800 is not set
1069# CONFIG_USB_MICROTEK is not set
1070CONFIG_USB_MON=y
1071
1072#
1073# USB port drivers
1074#
1075# CONFIG_USB_SERIAL is not set
1076
1077#
1078# USB Miscellaneous drivers
1079#
1080# CONFIG_USB_EMI62 is not set
1081# CONFIG_USB_EMI26 is not set
1082# CONFIG_USB_ADUTUX is not set
1083# CONFIG_USB_AUERSWALD is not set
1084# CONFIG_USB_RIO500 is not set
1085# CONFIG_USB_LEGOTOWER is not set
1086# CONFIG_USB_LCD is not set
1087# CONFIG_USB_BERRY_CHARGE is not set
1088# CONFIG_USB_LED is not set
1089# CONFIG_USB_CYPRESS_CY7C63 is not set
1090# CONFIG_USB_CYTHERM is not set
1091# CONFIG_USB_PHIDGET is not set
1092# CONFIG_USB_IDMOUSE is not set
1093# CONFIG_USB_FTDI_ELAN is not set
1094# CONFIG_USB_APPLEDISPLAY is not set
1095# CONFIG_USB_SISUSBVGA is not set
1096# CONFIG_USB_LD is not set
1097# CONFIG_USB_TRANCEVIBRATOR is not set
1098# CONFIG_USB_IOWARRIOR is not set
1099# CONFIG_USB_TEST is not set
1100# CONFIG_USB_ISIGHTFW is not set
1101# CONFIG_USB_GADGET is not set
1102# CONFIG_MMC is not set
1103# CONFIG_MEMSTICK is not set
1104# CONFIG_NEW_LEDS is not set
1105# CONFIG_ACCESSIBILITY is not set
1106# CONFIG_INFINIBAND is not set
1107# CONFIG_EDAC is not set
1108CONFIG_RTC_LIB=y
1109CONFIG_RTC_CLASS=y
1110CONFIG_RTC_HCTOSYS=y
1111CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1112# CONFIG_RTC_DEBUG is not set
1113
1114#
1115# RTC interfaces
1116#
1117CONFIG_RTC_INTF_SYSFS=y
1118CONFIG_RTC_INTF_PROC=y
1119CONFIG_RTC_INTF_DEV=y
1120# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1121# CONFIG_RTC_DRV_TEST is not set
1122
1123#
1124# I2C RTC drivers
1125#
1126# CONFIG_RTC_DRV_DS1307 is not set
1127# CONFIG_RTC_DRV_DS1374 is not set
1128# CONFIG_RTC_DRV_DS1672 is not set
1129# CONFIG_RTC_DRV_MAX6900 is not set
1130# CONFIG_RTC_DRV_RS5C372 is not set
1131# CONFIG_RTC_DRV_ISL1208 is not set
1132# CONFIG_RTC_DRV_X1205 is not set
1133# CONFIG_RTC_DRV_PCF8563 is not set
1134# CONFIG_RTC_DRV_PCF8583 is not set
1135# CONFIG_RTC_DRV_M41T80 is not set
1136# CONFIG_RTC_DRV_S35390A is not set
1137# CONFIG_RTC_DRV_FM3130 is not set
1138CONFIG_RTC_DRV_RX8025=y
1139
1140#
1141# SPI RTC drivers
1142#
1143# CONFIG_RTC_DRV_MAX6902 is not set
1144# CONFIG_RTC_DRV_R9701 is not set
1145# CONFIG_RTC_DRV_RS5C348 is not set
1146
1147#
1148# Platform RTC drivers
1149#
1150# CONFIG_RTC_DRV_CMOS is not set
1151# CONFIG_RTC_DRV_DS1511 is not set
1152# CONFIG_RTC_DRV_DS1553 is not set
1153# CONFIG_RTC_DRV_DS1742 is not set
1154# CONFIG_RTC_DRV_STK17TA8 is not set
1155# CONFIG_RTC_DRV_M48T86 is not set
1156# CONFIG_RTC_DRV_M48T59 is not set
1157# CONFIG_RTC_DRV_V3020 is not set
1158
1159#
1160# on-CPU RTC drivers
1161#
1162CONFIG_RTC_DRV_PPC=y
1163# CONFIG_DMADEVICES is not set
1164# CONFIG_UIO is not set
1165
1166#
1167# File systems
1168#
1169CONFIG_EXT2_FS=y
1170# CONFIG_EXT2_FS_XATTR is not set
1171# CONFIG_EXT2_FS_XIP is not set
1172CONFIG_EXT3_FS=y
1173CONFIG_EXT3_FS_XATTR=y
1174# CONFIG_EXT3_FS_POSIX_ACL is not set
1175# CONFIG_EXT3_FS_SECURITY is not set
1176# CONFIG_EXT4DEV_FS is not set
1177CONFIG_JBD=y
1178CONFIG_FS_MBCACHE=y
1179# CONFIG_REISERFS_FS is not set
1180# CONFIG_JFS_FS is not set
1181# CONFIG_FS_POSIX_ACL is not set
1182# CONFIG_XFS_FS is not set
1183# CONFIG_OCFS2_FS is not set
1184CONFIG_DNOTIFY=y
1185CONFIG_INOTIFY=y
1186CONFIG_INOTIFY_USER=y
1187# CONFIG_QUOTA is not set
1188# CONFIG_AUTOFS_FS is not set
1189# CONFIG_AUTOFS4_FS is not set
1190# CONFIG_FUSE_FS is not set
1191
1192#
1193# CD-ROM/DVD Filesystems
1194#
1195# CONFIG_ISO9660_FS is not set
1196# CONFIG_UDF_FS is not set
1197
1198#
1199# DOS/FAT/NT Filesystems
1200#
1201# CONFIG_MSDOS_FS is not set
1202# CONFIG_VFAT_FS is not set
1203# CONFIG_NTFS_FS is not set
1204
1205#
1206# Pseudo filesystems
1207#
1208CONFIG_PROC_FS=y
1209CONFIG_PROC_KCORE=y
1210CONFIG_PROC_SYSCTL=y
1211CONFIG_SYSFS=y
1212CONFIG_TMPFS=y
1213# CONFIG_TMPFS_POSIX_ACL is not set
1214# CONFIG_HUGETLB_PAGE is not set
1215# CONFIG_CONFIGFS_FS is not set
1216
1217#
1218# Miscellaneous filesystems
1219#
1220# CONFIG_ADFS_FS is not set
1221# CONFIG_AFFS_FS is not set
1222# CONFIG_HFS_FS is not set
1223# CONFIG_HFSPLUS_FS is not set
1224# CONFIG_BEFS_FS is not set
1225# CONFIG_BFS_FS is not set
1226# CONFIG_EFS_FS is not set
1227CONFIG_JFFS2_FS=y
1228CONFIG_JFFS2_FS_DEBUG=0
1229CONFIG_JFFS2_FS_WRITEBUFFER=y
1230# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1231# CONFIG_JFFS2_SUMMARY is not set
1232# CONFIG_JFFS2_FS_XATTR is not set
1233# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1234CONFIG_JFFS2_ZLIB=y
1235# CONFIG_JFFS2_LZO is not set
1236CONFIG_JFFS2_RTIME=y
1237# CONFIG_JFFS2_RUBIN is not set
1238CONFIG_CRAMFS=y
1239# CONFIG_VXFS_FS is not set
1240# CONFIG_MINIX_FS is not set
1241# CONFIG_HPFS_FS is not set
1242# CONFIG_QNX4FS_FS is not set
1243# CONFIG_ROMFS_FS is not set
1244# CONFIG_SYSV_FS is not set
1245# CONFIG_UFS_FS is not set
1246CONFIG_NETWORK_FILESYSTEMS=y
1247CONFIG_NFS_FS=y
1248CONFIG_NFS_V3=y
1249# CONFIG_NFS_V3_ACL is not set
1250# CONFIG_NFS_V4 is not set
1251# CONFIG_NFSD is not set
1252CONFIG_ROOT_NFS=y
1253CONFIG_LOCKD=y
1254CONFIG_LOCKD_V4=y
1255CONFIG_NFS_COMMON=y
1256CONFIG_SUNRPC=y
1257# CONFIG_SUNRPC_BIND34 is not set
1258# CONFIG_RPCSEC_GSS_KRB5 is not set
1259# CONFIG_RPCSEC_GSS_SPKM3 is not set
1260# CONFIG_SMB_FS is not set
1261# CONFIG_CIFS is not set
1262# CONFIG_NCP_FS is not set
1263# CONFIG_CODA_FS is not set
1264# CONFIG_AFS_FS is not set
1265
1266#
1267# Partition Types
1268#
1269CONFIG_PARTITION_ADVANCED=y
1270# CONFIG_ACORN_PARTITION is not set
1271# CONFIG_OSF_PARTITION is not set
1272# CONFIG_AMIGA_PARTITION is not set
1273# CONFIG_ATARI_PARTITION is not set
1274# CONFIG_MAC_PARTITION is not set
1275CONFIG_MSDOS_PARTITION=y
1276# CONFIG_BSD_DISKLABEL is not set
1277# CONFIG_MINIX_SUBPARTITION is not set
1278# CONFIG_SOLARIS_X86_PARTITION is not set
1279# CONFIG_UNIXWARE_DISKLABEL is not set
1280# CONFIG_LDM_PARTITION is not set
1281# CONFIG_SGI_PARTITION is not set
1282# CONFIG_ULTRIX_PARTITION is not set
1283# CONFIG_SUN_PARTITION is not set
1284# CONFIG_KARMA_PARTITION is not set
1285# CONFIG_EFI_PARTITION is not set
1286# CONFIG_SYSV68_PARTITION is not set
1287# CONFIG_NLS is not set
1288# CONFIG_DLM is not set
1289
1290#
1291# Library routines
1292#
1293CONFIG_BITREVERSE=y
1294# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1295# CONFIG_CRC_CCITT is not set
1296# CONFIG_CRC16 is not set
1297# CONFIG_CRC_ITU_T is not set
1298CONFIG_CRC32=y
1299# CONFIG_CRC7 is not set
1300# CONFIG_LIBCRC32C is not set
1301CONFIG_ZLIB_INFLATE=y
1302CONFIG_ZLIB_DEFLATE=y
1303CONFIG_PLIST=y
1304CONFIG_HAS_IOMEM=y
1305CONFIG_HAS_IOPORT=y
1306CONFIG_HAS_DMA=y
1307CONFIG_HAVE_LMB=y
1308
1309#
1310# Kernel hacking
1311#
1312# CONFIG_PRINTK_TIME is not set
1313CONFIG_ENABLE_WARN_DEPRECATED=y
1314CONFIG_ENABLE_MUST_CHECK=y
1315CONFIG_FRAME_WARN=1024
1316# CONFIG_MAGIC_SYSRQ is not set
1317# CONFIG_UNUSED_SYMBOLS is not set
1318# CONFIG_DEBUG_FS is not set
1319# CONFIG_HEADERS_CHECK is not set
1320# CONFIG_DEBUG_KERNEL is not set
1321# CONFIG_SLUB_DEBUG_ON is not set
1322# CONFIG_SLUB_STATS is not set
1323# CONFIG_DEBUG_BUGVERBOSE is not set
1324# CONFIG_SAMPLES is not set
1325# CONFIG_IRQSTACKS is not set
1326# CONFIG_PPC_EARLY_DEBUG is not set
1327
1328#
1329# Security options
1330#
1331# CONFIG_KEYS is not set
1332# CONFIG_SECURITY is not set
1333# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1334CONFIG_CRYPTO=y
1335
1336#
1337# Crypto core or helper
1338#
1339# CONFIG_CRYPTO_MANAGER is not set
1340# CONFIG_CRYPTO_GF128MUL is not set
1341# CONFIG_CRYPTO_NULL is not set
1342# CONFIG_CRYPTO_CRYPTD is not set
1343# CONFIG_CRYPTO_AUTHENC is not set
1344# CONFIG_CRYPTO_TEST is not set
1345
1346#
1347# Authenticated Encryption with Associated Data
1348#
1349# CONFIG_CRYPTO_CCM is not set
1350# CONFIG_CRYPTO_GCM is not set
1351# CONFIG_CRYPTO_SEQIV is not set
1352
1353#
1354# Block modes
1355#
1356# CONFIG_CRYPTO_CBC is not set
1357# CONFIG_CRYPTO_CTR is not set
1358# CONFIG_CRYPTO_CTS is not set
1359# CONFIG_CRYPTO_ECB is not set
1360# CONFIG_CRYPTO_LRW is not set
1361# CONFIG_CRYPTO_PCBC is not set
1362# CONFIG_CRYPTO_XTS is not set
1363
1364#
1365# Hash modes
1366#
1367# CONFIG_CRYPTO_HMAC is not set
1368# CONFIG_CRYPTO_XCBC is not set
1369
1370#
1371# Digest
1372#
1373# CONFIG_CRYPTO_CRC32C is not set
1374# CONFIG_CRYPTO_MD4 is not set
1375# CONFIG_CRYPTO_MD5 is not set
1376# CONFIG_CRYPTO_MICHAEL_MIC is not set
1377# CONFIG_CRYPTO_SHA1 is not set
1378# CONFIG_CRYPTO_SHA256 is not set
1379# CONFIG_CRYPTO_SHA512 is not set
1380# CONFIG_CRYPTO_TGR192 is not set
1381# CONFIG_CRYPTO_WP512 is not set
1382
1383#
1384# Ciphers
1385#
1386# CONFIG_CRYPTO_AES is not set
1387# CONFIG_CRYPTO_ANUBIS is not set
1388# CONFIG_CRYPTO_ARC4 is not set
1389# CONFIG_CRYPTO_BLOWFISH is not set
1390# CONFIG_CRYPTO_CAMELLIA is not set
1391# CONFIG_CRYPTO_CAST5 is not set
1392# CONFIG_CRYPTO_CAST6 is not set
1393# CONFIG_CRYPTO_DES is not set
1394# CONFIG_CRYPTO_FCRYPT is not set
1395# CONFIG_CRYPTO_KHAZAD is not set
1396# CONFIG_CRYPTO_SALSA20 is not set
1397# CONFIG_CRYPTO_SEED is not set
1398# CONFIG_CRYPTO_SERPENT is not set
1399# CONFIG_CRYPTO_TEA is not set
1400# CONFIG_CRYPTO_TWOFISH is not set
1401
1402#
1403# Compression
1404#
1405# CONFIG_CRYPTO_DEFLATE is not set
1406# CONFIG_CRYPTO_LZO is not set
1407CONFIG_CRYPTO_HW=y
1408# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1409# CONFIG_PPC_CLOCK is not set
1410# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
new file mode 100644
index 000000000000..df2c16337794
--- /dev/null
+++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
@@ -0,0 +1,1889 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc7
4# Fri Mar 13 15:36:11 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
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_PPC_FPU=y
18# CONFIG_PHYS_64BIT is not set
19CONFIG_ALTIVEC=y
20CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set
23CONFIG_SMP=y
24CONFIG_NR_CPUS=2
25CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32
27# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
28CONFIG_MMU=y
29CONFIG_GENERIC_CMOS_UPDATE=y
30CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_GENERIC_LOCKBREAK=y
41CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y
45CONFIG_GENERIC_GPIO=y
46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
47CONFIG_PPC=y
48CONFIG_EARLY_PRINTK=y
49CONFIG_GENERIC_NVRAM=y
50CONFIG_SCHED_OMIT_FRAME_POINTER=y
51CONFIG_ARCH_MAY_HAVE_PC_FDC=y
52CONFIG_PPC_OF=y
53CONFIG_OF=y
54CONFIG_PPC_UDBG_16550=y
55CONFIG_GENERIC_TBSYNC=y
56CONFIG_AUDIT_ARCH=y
57CONFIG_GENERIC_BUG=y
58CONFIG_DEFAULT_UIMAGE=y
59# CONFIG_PPC_DCR_NATIVE is not set
60# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
62
63#
64# General setup
65#
66CONFIG_EXPERIMENTAL=y
67CONFIG_LOCK_KERNEL=y
68CONFIG_INIT_ENV_ARG_LIMIT=32
69CONFIG_LOCALVERSION=""
70CONFIG_LOCALVERSION_AUTO=y
71CONFIG_SWAP=y
72CONFIG_SYSVIPC=y
73CONFIG_SYSVIPC_SYSCTL=y
74CONFIG_POSIX_MQUEUE=y
75CONFIG_BSD_PROCESS_ACCT=y
76CONFIG_BSD_PROCESS_ACCT_V3=y
77# CONFIG_TASKSTATS is not set
78# CONFIG_AUDIT is not set
79
80#
81# RCU Subsystem
82#
83CONFIG_CLASSIC_RCU=y
84# CONFIG_TREE_RCU is not set
85# CONFIG_PREEMPT_RCU is not set
86# CONFIG_TREE_RCU_TRACE is not set
87# CONFIG_PREEMPT_RCU_TRACE is not set
88CONFIG_IKCONFIG=y
89CONFIG_IKCONFIG_PROC=y
90CONFIG_LOG_BUF_SHIFT=14
91CONFIG_GROUP_SCHED=y
92CONFIG_FAIR_GROUP_SCHED=y
93# CONFIG_RT_GROUP_SCHED is not set
94CONFIG_USER_SCHED=y
95# CONFIG_CGROUP_SCHED is not set
96# CONFIG_CGROUPS is not set
97CONFIG_SYSFS_DEPRECATED=y
98CONFIG_SYSFS_DEPRECATED_V2=y
99CONFIG_RELAY=y
100# CONFIG_NAMESPACES is not set
101CONFIG_BLK_DEV_INITRD=y
102CONFIG_INITRAMFS_SOURCE=""
103# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
104CONFIG_SYSCTL=y
105CONFIG_EMBEDDED=y
106CONFIG_SYSCTL_SYSCALL=y
107CONFIG_KALLSYMS=y
108# CONFIG_KALLSYMS_ALL is not set
109# CONFIG_KALLSYMS_EXTRA_PASS is not set
110CONFIG_HOTPLUG=y
111CONFIG_PRINTK=y
112CONFIG_BUG=y
113CONFIG_ELF_CORE=y
114CONFIG_COMPAT_BRK=y
115CONFIG_BASE_FULL=y
116CONFIG_FUTEX=y
117CONFIG_ANON_INODES=y
118CONFIG_EPOLL=y
119CONFIG_SIGNALFD=y
120CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y
122CONFIG_SHMEM=y
123CONFIG_AIO=y
124CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_PCI_QUIRKS=y
126CONFIG_SLAB=y
127# CONFIG_SLUB is not set
128# CONFIG_SLOB is not set
129# CONFIG_PROFILING is not set
130CONFIG_HAVE_OPROFILE=y
131# CONFIG_KPROBES is not set
132CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
133CONFIG_HAVE_IOREMAP_PROT=y
134CONFIG_HAVE_KPROBES=y
135CONFIG_HAVE_KRETPROBES=y
136CONFIG_HAVE_ARCH_TRACEHOOK=y
137CONFIG_USE_GENERIC_SMP_HELPERS=y
138# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
139CONFIG_SLABINFO=y
140CONFIG_RT_MUTEXES=y
141CONFIG_BASE_SMALL=0
142CONFIG_MODULES=y
143# CONFIG_MODULE_FORCE_LOAD is not set
144CONFIG_MODULE_UNLOAD=y
145# CONFIG_MODULE_FORCE_UNLOAD is not set
146# CONFIG_MODVERSIONS is not set
147# CONFIG_MODULE_SRCVERSION_ALL is not set
148CONFIG_STOP_MACHINE=y
149CONFIG_BLOCK=y
150# CONFIG_LBD is not set
151# CONFIG_BLK_DEV_IO_TRACE is not set
152# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set
154
155#
156# IO Schedulers
157#
158CONFIG_IOSCHED_NOOP=y
159CONFIG_IOSCHED_AS=y
160CONFIG_IOSCHED_DEADLINE=y
161CONFIG_IOSCHED_CFQ=y
162# CONFIG_DEFAULT_AS is not set
163# CONFIG_DEFAULT_DEADLINE is not set
164CONFIG_DEFAULT_CFQ=y
165# CONFIG_DEFAULT_NOOP is not set
166CONFIG_DEFAULT_IOSCHED="cfq"
167# CONFIG_FREEZER is not set
168
169#
170# Platform support
171#
172CONFIG_PPC_MULTIPLATFORM=y
173CONFIG_CLASSIC32=y
174# CONFIG_PPC_CHRP is not set
175# CONFIG_MPC5121_ADS is not set
176# CONFIG_MPC5121_GENERIC is not set
177# CONFIG_PPC_MPC52xx is not set
178# CONFIG_PPC_PMAC is not set
179# CONFIG_PPC_CELL is not set
180# CONFIG_PPC_CELL_NATIVE is not set
181# CONFIG_PPC_82xx is not set
182# CONFIG_PQ2ADS is not set
183# CONFIG_PPC_83xx is not set
184CONFIG_PPC_86xx=y
185# CONFIG_MPC8641_HPCN is not set
186# CONFIG_SBC8641D is not set
187# CONFIG_MPC8610_HPCD is not set
188CONFIG_GEF_PPC9A=y
189# CONFIG_GEF_SBC310 is not set
190# CONFIG_GEF_SBC610 is not set
191CONFIG_MPC8641=y
192# CONFIG_IPIC is not set
193CONFIG_MPIC=y
194# CONFIG_MPIC_WEIRD is not set
195# CONFIG_PPC_I8259 is not set
196# CONFIG_PPC_RTAS is not set
197# CONFIG_MMIO_NVRAM is not set
198# CONFIG_PPC_MPC106 is not set
199# CONFIG_PPC_970_NAP is not set
200# CONFIG_PPC_INDIRECT_IO is not set
201# CONFIG_GENERIC_IOMAP is not set
202# CONFIG_CPU_FREQ is not set
203# CONFIG_TAU is not set
204# CONFIG_QUICC_ENGINE is not set
205# CONFIG_FSL_ULI1575 is not set
206# CONFIG_MPC8xxx_GPIO is not set
207# CONFIG_SIMPLE_GPIO is not set
208
209#
210# Kernel options
211#
212# CONFIG_HIGHMEM is not set
213CONFIG_TICK_ONESHOT=y
214# CONFIG_NO_HZ is not set
215CONFIG_HIGH_RES_TIMERS=y
216CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
217# CONFIG_HZ_100 is not set
218# CONFIG_HZ_250 is not set
219# CONFIG_HZ_300 is not set
220CONFIG_HZ_1000=y
221CONFIG_HZ=1000
222CONFIG_SCHED_HRTICK=y
223# CONFIG_PREEMPT_NONE is not set
224# CONFIG_PREEMPT_VOLUNTARY is not set
225CONFIG_PREEMPT=y
226CONFIG_BINFMT_ELF=y
227# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
228# CONFIG_HAVE_AOUT is not set
229CONFIG_BINFMT_MISC=m
230# CONFIG_IOMMU_HELPER is not set
231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
232CONFIG_ARCH_HAS_WALK_MEMORY=y
233CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
234# CONFIG_KEXEC is not set
235# CONFIG_CRASH_DUMP is not set
236CONFIG_IRQ_ALL_CPUS=y
237CONFIG_ARCH_FLATMEM_ENABLE=y
238CONFIG_ARCH_POPULATES_NODE_MAP=y
239CONFIG_SELECT_MEMORY_MODEL=y
240CONFIG_FLATMEM_MANUAL=y
241# CONFIG_DISCONTIGMEM_MANUAL is not set
242# CONFIG_SPARSEMEM_MANUAL is not set
243CONFIG_FLATMEM=y
244CONFIG_FLAT_NODE_MEM_MAP=y
245CONFIG_PAGEFLAGS_EXTENDED=y
246CONFIG_SPLIT_PTLOCK_CPUS=4
247CONFIG_MIGRATION=y
248# CONFIG_PHYS_ADDR_T_64BIT is not set
249CONFIG_ZONE_DMA_FLAG=1
250CONFIG_BOUNCE=y
251CONFIG_VIRT_TO_BUS=y
252CONFIG_UNEVICTABLE_LRU=y
253CONFIG_PPC_4K_PAGES=y
254# CONFIG_PPC_16K_PAGES is not set
255# CONFIG_PPC_64K_PAGES is not set
256CONFIG_FORCE_MAX_ZONEORDER=11
257# CONFIG_PROC_DEVICETREE is not set
258# CONFIG_CMDLINE_BOOL is not set
259CONFIG_EXTRA_TARGETS=""
260# CONFIG_PM is not set
261CONFIG_SECCOMP=y
262CONFIG_ISA_DMA_API=y
263
264#
265# Bus options
266#
267CONFIG_ZONE_DMA=y
268CONFIG_GENERIC_ISA_DMA=y
269CONFIG_PPC_INDIRECT_PCI=y
270CONFIG_FSL_SOC=y
271CONFIG_FSL_PCI=y
272CONFIG_PPC_PCI_CHOICE=y
273CONFIG_PCI=y
274CONFIG_PCI_DOMAINS=y
275CONFIG_PCI_SYSCALL=y
276CONFIG_PCIEPORTBUS=y
277CONFIG_PCIEAER=y
278# CONFIG_PCIEASPM is not set
279CONFIG_ARCH_SUPPORTS_MSI=y
280# CONFIG_PCI_MSI is not set
281# CONFIG_PCI_LEGACY is not set
282CONFIG_PCI_DEBUG=y
283# CONFIG_PCI_STUB is not set
284# CONFIG_PCCARD is not set
285# CONFIG_HOTPLUG_PCI is not set
286# CONFIG_HAS_RAPIDIO is not set
287
288#
289# Advanced setup
290#
291# CONFIG_ADVANCED_OPTIONS is not set
292
293#
294# Default settings for advanced configuration options are used
295#
296CONFIG_LOWMEM_SIZE=0x30000000
297CONFIG_PAGE_OFFSET=0xc0000000
298CONFIG_KERNEL_START=0xc0000000
299CONFIG_PHYSICAL_START=0x00000000
300CONFIG_TASK_SIZE=0xc0000000
301CONFIG_NET=y
302
303#
304# Networking options
305#
306CONFIG_COMPAT_NET_DEV_OPS=y
307CONFIG_PACKET=y
308CONFIG_PACKET_MMAP=y
309CONFIG_UNIX=y
310CONFIG_XFRM=y
311CONFIG_XFRM_USER=m
312# CONFIG_XFRM_SUB_POLICY is not set
313# CONFIG_XFRM_MIGRATE is not set
314# CONFIG_XFRM_STATISTICS is not set
315CONFIG_XFRM_IPCOMP=m
316CONFIG_NET_KEY=m
317# CONFIG_NET_KEY_MIGRATE is not set
318CONFIG_INET=y
319CONFIG_IP_MULTICAST=y
320CONFIG_IP_ADVANCED_ROUTER=y
321CONFIG_ASK_IP_FIB_HASH=y
322# CONFIG_IP_FIB_TRIE is not set
323CONFIG_IP_FIB_HASH=y
324CONFIG_IP_MULTIPLE_TABLES=y
325CONFIG_IP_ROUTE_MULTIPATH=y
326CONFIG_IP_ROUTE_VERBOSE=y
327CONFIG_IP_PNP=y
328CONFIG_IP_PNP_DHCP=y
329CONFIG_IP_PNP_BOOTP=y
330CONFIG_IP_PNP_RARP=y
331CONFIG_NET_IPIP=m
332CONFIG_NET_IPGRE=m
333CONFIG_NET_IPGRE_BROADCAST=y
334CONFIG_IP_MROUTE=y
335CONFIG_IP_PIMSM_V1=y
336CONFIG_IP_PIMSM_V2=y
337# CONFIG_ARPD is not set
338CONFIG_SYN_COOKIES=y
339CONFIG_INET_AH=m
340CONFIG_INET_ESP=m
341CONFIG_INET_IPCOMP=m
342CONFIG_INET_XFRM_TUNNEL=m
343CONFIG_INET_TUNNEL=m
344CONFIG_INET_XFRM_MODE_TRANSPORT=y
345CONFIG_INET_XFRM_MODE_TUNNEL=y
346CONFIG_INET_XFRM_MODE_BEET=y
347# CONFIG_INET_LRO is not set
348CONFIG_INET_DIAG=y
349CONFIG_INET_TCP_DIAG=y
350# CONFIG_TCP_CONG_ADVANCED is not set
351CONFIG_TCP_CONG_CUBIC=y
352CONFIG_DEFAULT_TCP_CONG="cubic"
353# CONFIG_TCP_MD5SIG is not set
354CONFIG_IPV6=m
355# CONFIG_IPV6_PRIVACY is not set
356# CONFIG_IPV6_ROUTER_PREF is not set
357# CONFIG_IPV6_OPTIMISTIC_DAD is not set
358CONFIG_INET6_AH=m
359CONFIG_INET6_ESP=m
360CONFIG_INET6_IPCOMP=m
361# CONFIG_IPV6_MIP6 is not set
362CONFIG_INET6_XFRM_TUNNEL=m
363CONFIG_INET6_TUNNEL=m
364CONFIG_INET6_XFRM_MODE_TRANSPORT=m
365CONFIG_INET6_XFRM_MODE_TUNNEL=m
366CONFIG_INET6_XFRM_MODE_BEET=m
367# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
368CONFIG_IPV6_SIT=m
369CONFIG_IPV6_NDISC_NODETYPE=y
370CONFIG_IPV6_TUNNEL=m
371# CONFIG_IPV6_MULTIPLE_TABLES is not set
372# CONFIG_IPV6_MROUTE is not set
373# CONFIG_NETLABEL is not set
374# CONFIG_NETWORK_SECMARK is not set
375CONFIG_NETFILTER=y
376# CONFIG_NETFILTER_DEBUG is not set
377CONFIG_NETFILTER_ADVANCED=y
378CONFIG_BRIDGE_NETFILTER=y
379
380#
381# Core Netfilter Configuration
382#
383# CONFIG_NETFILTER_NETLINK_QUEUE is not set
384# CONFIG_NETFILTER_NETLINK_LOG is not set
385# CONFIG_NF_CONNTRACK is not set
386CONFIG_NETFILTER_XTABLES=m
387# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
388# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
389# CONFIG_NETFILTER_XT_TARGET_MARK is not set
390# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
391# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
392# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
393# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
394# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
395# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
396# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
397# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
398# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
399# CONFIG_NETFILTER_XT_MATCH_ESP is not set
400# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
401# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
402# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
403# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
404# CONFIG_NETFILTER_XT_MATCH_MAC is not set
405# CONFIG_NETFILTER_XT_MATCH_MARK is not set
406# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
407# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
408# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
409# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
410# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
411# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
412# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
413# CONFIG_NETFILTER_XT_MATCH_REALM is not set
414# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
415# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
416# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
417# CONFIG_NETFILTER_XT_MATCH_STRING is not set
418# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
419# CONFIG_NETFILTER_XT_MATCH_TIME is not set
420# CONFIG_NETFILTER_XT_MATCH_U32 is not set
421# CONFIG_IP_VS is not set
422
423#
424# IP: Netfilter Configuration
425#
426# CONFIG_NF_DEFRAG_IPV4 is not set
427CONFIG_IP_NF_QUEUE=m
428CONFIG_IP_NF_IPTABLES=m
429CONFIG_IP_NF_MATCH_ADDRTYPE=m
430# CONFIG_IP_NF_MATCH_AH is not set
431CONFIG_IP_NF_MATCH_ECN=m
432CONFIG_IP_NF_MATCH_TTL=m
433CONFIG_IP_NF_FILTER=m
434CONFIG_IP_NF_TARGET_REJECT=m
435CONFIG_IP_NF_TARGET_LOG=m
436CONFIG_IP_NF_TARGET_ULOG=m
437CONFIG_IP_NF_MANGLE=m
438CONFIG_IP_NF_TARGET_ECN=m
439# CONFIG_IP_NF_TARGET_TTL is not set
440CONFIG_IP_NF_RAW=m
441# CONFIG_IP_NF_SECURITY is not set
442CONFIG_IP_NF_ARPTABLES=m
443CONFIG_IP_NF_ARPFILTER=m
444CONFIG_IP_NF_ARP_MANGLE=m
445
446#
447# IPv6: Netfilter Configuration
448#
449CONFIG_IP6_NF_QUEUE=m
450CONFIG_IP6_NF_IPTABLES=m
451# CONFIG_IP6_NF_MATCH_AH is not set
452CONFIG_IP6_NF_MATCH_EUI64=m
453CONFIG_IP6_NF_MATCH_FRAG=m
454CONFIG_IP6_NF_MATCH_OPTS=m
455CONFIG_IP6_NF_MATCH_HL=m
456CONFIG_IP6_NF_MATCH_IPV6HEADER=m
457# CONFIG_IP6_NF_MATCH_MH is not set
458CONFIG_IP6_NF_MATCH_RT=m
459CONFIG_IP6_NF_TARGET_LOG=m
460CONFIG_IP6_NF_FILTER=m
461# CONFIG_IP6_NF_TARGET_REJECT is not set
462CONFIG_IP6_NF_MANGLE=m
463# CONFIG_IP6_NF_TARGET_HL is not set
464CONFIG_IP6_NF_RAW=m
465# CONFIG_IP6_NF_SECURITY is not set
466# CONFIG_BRIDGE_NF_EBTABLES is not set
467# CONFIG_IP_DCCP is not set
468CONFIG_IP_SCTP=m
469# CONFIG_SCTP_DBG_MSG is not set
470# CONFIG_SCTP_DBG_OBJCNT is not set
471# CONFIG_SCTP_HMAC_NONE is not set
472# CONFIG_SCTP_HMAC_SHA1 is not set
473CONFIG_SCTP_HMAC_MD5=y
474CONFIG_TIPC=m
475# CONFIG_TIPC_ADVANCED is not set
476# CONFIG_TIPC_DEBUG is not set
477CONFIG_ATM=m
478CONFIG_ATM_CLIP=m
479# CONFIG_ATM_CLIP_NO_ICMP is not set
480CONFIG_ATM_LANE=m
481CONFIG_ATM_MPOA=m
482CONFIG_ATM_BR2684=m
483# CONFIG_ATM_BR2684_IPFILTER is not set
484CONFIG_STP=m
485CONFIG_BRIDGE=m
486# CONFIG_NET_DSA is not set
487CONFIG_VLAN_8021Q=m
488# CONFIG_VLAN_8021Q_GVRP is not set
489# CONFIG_DECNET is not set
490CONFIG_LLC=m
491# CONFIG_LLC2 is not set
492# CONFIG_IPX is not set
493# CONFIG_ATALK is not set
494# CONFIG_X25 is not set
495# CONFIG_LAPB is not set
496# CONFIG_ECONET is not set
497CONFIG_WAN_ROUTER=m
498CONFIG_NET_SCHED=y
499
500#
501# Queueing/Scheduling
502#
503CONFIG_NET_SCH_CBQ=m
504CONFIG_NET_SCH_HTB=m
505CONFIG_NET_SCH_HFSC=m
506CONFIG_NET_SCH_ATM=m
507CONFIG_NET_SCH_PRIO=m
508# CONFIG_NET_SCH_MULTIQ is not set
509CONFIG_NET_SCH_RED=m
510CONFIG_NET_SCH_SFQ=m
511CONFIG_NET_SCH_TEQL=m
512CONFIG_NET_SCH_TBF=m
513CONFIG_NET_SCH_GRED=m
514CONFIG_NET_SCH_DSMARK=m
515CONFIG_NET_SCH_NETEM=m
516# CONFIG_NET_SCH_DRR is not set
517
518#
519# Classification
520#
521CONFIG_NET_CLS=y
522# CONFIG_NET_CLS_BASIC is not set
523CONFIG_NET_CLS_TCINDEX=m
524CONFIG_NET_CLS_ROUTE4=m
525CONFIG_NET_CLS_ROUTE=y
526CONFIG_NET_CLS_FW=m
527CONFIG_NET_CLS_U32=m
528# CONFIG_CLS_U32_PERF is not set
529# CONFIG_CLS_U32_MARK is not set
530CONFIG_NET_CLS_RSVP=m
531CONFIG_NET_CLS_RSVP6=m
532# CONFIG_NET_CLS_FLOW is not set
533# CONFIG_NET_EMATCH is not set
534# CONFIG_NET_CLS_ACT is not set
535# CONFIG_NET_CLS_IND is not set
536CONFIG_NET_SCH_FIFO=y
537# CONFIG_DCB is not set
538
539#
540# Network testing
541#
542CONFIG_NET_PKTGEN=m
543# CONFIG_HAMRADIO is not set
544# CONFIG_CAN is not set
545# CONFIG_IRDA is not set
546# CONFIG_BT is not set
547# CONFIG_AF_RXRPC is not set
548# CONFIG_PHONET is not set
549CONFIG_FIB_RULES=y
550CONFIG_WIRELESS=y
551# CONFIG_CFG80211 is not set
552CONFIG_WIRELESS_OLD_REGULATORY=y
553# CONFIG_WIRELESS_EXT is not set
554# CONFIG_LIB80211 is not set
555# CONFIG_MAC80211 is not set
556# CONFIG_WIMAX is not set
557# CONFIG_RFKILL is not set
558# CONFIG_NET_9P is not set
559
560#
561# Device Drivers
562#
563
564#
565# Generic Driver Options
566#
567CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
568CONFIG_STANDALONE=y
569CONFIG_PREVENT_FIRMWARE_BUILD=y
570# CONFIG_FW_LOADER is not set
571# CONFIG_DEBUG_DRIVER is not set
572# CONFIG_DEBUG_DEVRES is not set
573# CONFIG_SYS_HYPERVISOR is not set
574# CONFIG_CONNECTOR is not set
575CONFIG_MTD=y
576# CONFIG_MTD_DEBUG is not set
577CONFIG_MTD_CONCAT=y
578CONFIG_MTD_PARTITIONS=y
579# CONFIG_MTD_TESTS is not set
580# CONFIG_MTD_REDBOOT_PARTS is not set
581# CONFIG_MTD_CMDLINE_PARTS is not set
582CONFIG_MTD_OF_PARTS=y
583# CONFIG_MTD_AR7_PARTS is not set
584
585#
586# User Modules And Translation Layers
587#
588CONFIG_MTD_CHAR=y
589CONFIG_MTD_BLKDEVS=y
590CONFIG_MTD_BLOCK=y
591# CONFIG_FTL is not set
592# CONFIG_NFTL is not set
593# CONFIG_INFTL is not set
594# CONFIG_RFD_FTL is not set
595# CONFIG_SSFDC is not set
596# CONFIG_MTD_OOPS is not set
597
598#
599# RAM/ROM/Flash chip drivers
600#
601CONFIG_MTD_CFI=y
602CONFIG_MTD_JEDECPROBE=y
603CONFIG_MTD_GEN_PROBE=y
604# CONFIG_MTD_CFI_ADV_OPTIONS is not set
605CONFIG_MTD_MAP_BANK_WIDTH_1=y
606CONFIG_MTD_MAP_BANK_WIDTH_2=y
607CONFIG_MTD_MAP_BANK_WIDTH_4=y
608# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
609# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
610# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
611CONFIG_MTD_CFI_I1=y
612CONFIG_MTD_CFI_I2=y
613# CONFIG_MTD_CFI_I4 is not set
614# CONFIG_MTD_CFI_I8 is not set
615CONFIG_MTD_CFI_INTELEXT=y
616CONFIG_MTD_CFI_AMDSTD=y
617# CONFIG_MTD_CFI_STAA is not set
618CONFIG_MTD_CFI_UTIL=y
619# CONFIG_MTD_RAM is not set
620# CONFIG_MTD_ROM is not set
621# CONFIG_MTD_ABSENT is not set
622
623#
624# Mapping drivers for chip access
625#
626# CONFIG_MTD_COMPLEX_MAPPINGS is not set
627# CONFIG_MTD_PHYSMAP is not set
628CONFIG_MTD_PHYSMAP_OF=y
629# CONFIG_MTD_INTEL_VR_NOR is not set
630# CONFIG_MTD_PLATRAM is not set
631
632#
633# Self-contained MTD device drivers
634#
635# CONFIG_MTD_PMC551 is not set
636# CONFIG_MTD_SLRAM is not set
637# CONFIG_MTD_PHRAM is not set
638# CONFIG_MTD_MTDRAM is not set
639# CONFIG_MTD_BLOCK2MTD is not set
640
641#
642# Disk-On-Chip Device Drivers
643#
644# CONFIG_MTD_DOC2000 is not set
645# CONFIG_MTD_DOC2001 is not set
646# CONFIG_MTD_DOC2001PLUS is not set
647# CONFIG_MTD_NAND is not set
648# CONFIG_MTD_ONENAND is not set
649
650#
651# LPDDR flash memory drivers
652#
653# CONFIG_MTD_LPDDR is not set
654
655#
656# UBI - Unsorted block images
657#
658# CONFIG_MTD_UBI is not set
659CONFIG_OF_DEVICE=y
660CONFIG_OF_GPIO=y
661CONFIG_OF_I2C=y
662# CONFIG_PARPORT is not set
663CONFIG_BLK_DEV=y
664# CONFIG_BLK_DEV_FD is not set
665# CONFIG_BLK_CPQ_DA is not set
666# CONFIG_BLK_CPQ_CISS_DA is not set
667# CONFIG_BLK_DEV_DAC960 is not set
668# CONFIG_BLK_DEV_UMEM is not set
669# CONFIG_BLK_DEV_COW_COMMON is not set
670CONFIG_BLK_DEV_LOOP=m
671CONFIG_BLK_DEV_CRYPTOLOOP=m
672CONFIG_BLK_DEV_NBD=m
673# CONFIG_BLK_DEV_SX8 is not set
674# CONFIG_BLK_DEV_UB is not set
675CONFIG_BLK_DEV_RAM=y
676CONFIG_BLK_DEV_RAM_COUNT=16
677CONFIG_BLK_DEV_RAM_SIZE=131072
678# CONFIG_BLK_DEV_XIP is not set
679# CONFIG_CDROM_PKTCDVD is not set
680# CONFIG_ATA_OVER_ETH is not set
681# CONFIG_BLK_DEV_HD is not set
682CONFIG_MISC_DEVICES=y
683# CONFIG_PHANTOM is not set
684# CONFIG_SGI_IOC4 is not set
685# CONFIG_TIFM_CORE is not set
686# CONFIG_ICS932S401 is not set
687# CONFIG_ENCLOSURE_SERVICES is not set
688# CONFIG_HP_ILO is not set
689# CONFIG_C2PORT is not set
690
691#
692# EEPROM support
693#
694# CONFIG_EEPROM_AT24 is not set
695# CONFIG_EEPROM_LEGACY is not set
696# CONFIG_EEPROM_93CX6 is not set
697CONFIG_HAVE_IDE=y
698# CONFIG_IDE is not set
699
700#
701# SCSI device support
702#
703# CONFIG_RAID_ATTRS is not set
704CONFIG_SCSI=y
705CONFIG_SCSI_DMA=y
706# CONFIG_SCSI_TGT is not set
707# CONFIG_SCSI_NETLINK is not set
708CONFIG_SCSI_PROC_FS=y
709
710#
711# SCSI support type (disk, tape, CD-ROM)
712#
713CONFIG_BLK_DEV_SD=y
714CONFIG_CHR_DEV_ST=y
715# CONFIG_CHR_DEV_OSST is not set
716CONFIG_BLK_DEV_SR=y
717# CONFIG_BLK_DEV_SR_VENDOR is not set
718# CONFIG_CHR_DEV_SG is not set
719# CONFIG_CHR_DEV_SCH is not set
720
721#
722# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
723#
724# CONFIG_SCSI_MULTI_LUN is not set
725# CONFIG_SCSI_CONSTANTS is not set
726# CONFIG_SCSI_LOGGING is not set
727# CONFIG_SCSI_SCAN_ASYNC is not set
728CONFIG_SCSI_WAIT_SCAN=m
729
730#
731# SCSI Transports
732#
733# CONFIG_SCSI_SPI_ATTRS is not set
734# CONFIG_SCSI_FC_ATTRS is not set
735# CONFIG_SCSI_ISCSI_ATTRS is not set
736# CONFIG_SCSI_SAS_LIBSAS is not set
737# CONFIG_SCSI_SRP_ATTRS is not set
738CONFIG_SCSI_LOWLEVEL=y
739# CONFIG_ISCSI_TCP is not set
740# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
741# CONFIG_SCSI_3W_9XXX is not set
742# CONFIG_SCSI_ACARD is not set
743# CONFIG_SCSI_AACRAID is not set
744# CONFIG_SCSI_AIC7XXX is not set
745# CONFIG_SCSI_AIC7XXX_OLD is not set
746# CONFIG_SCSI_AIC79XX is not set
747# CONFIG_SCSI_AIC94XX is not set
748# CONFIG_SCSI_DPT_I2O is not set
749# CONFIG_SCSI_ADVANSYS is not set
750# CONFIG_SCSI_ARCMSR is not set
751# CONFIG_MEGARAID_NEWGEN is not set
752# CONFIG_MEGARAID_LEGACY is not set
753# CONFIG_MEGARAID_SAS is not set
754# CONFIG_SCSI_HPTIOP is not set
755# CONFIG_SCSI_BUSLOGIC is not set
756# CONFIG_LIBFC is not set
757# CONFIG_FCOE is not set
758# CONFIG_SCSI_DMX3191D is not set
759# CONFIG_SCSI_EATA is not set
760# CONFIG_SCSI_FUTURE_DOMAIN is not set
761# CONFIG_SCSI_GDTH is not set
762# CONFIG_SCSI_IPS is not set
763# CONFIG_SCSI_INITIO is not set
764# CONFIG_SCSI_INIA100 is not set
765# CONFIG_SCSI_MVSAS is not set
766# CONFIG_SCSI_STEX is not set
767# CONFIG_SCSI_SYM53C8XX_2 is not set
768# CONFIG_SCSI_IPR is not set
769# CONFIG_SCSI_QLOGIC_1280 is not set
770# CONFIG_SCSI_QLA_FC is not set
771# CONFIG_SCSI_QLA_ISCSI is not set
772# CONFIG_SCSI_LPFC is not set
773# CONFIG_SCSI_DC395x is not set
774# CONFIG_SCSI_DC390T is not set
775# CONFIG_SCSI_NSP32 is not set
776# CONFIG_SCSI_DEBUG is not set
777# CONFIG_SCSI_SRP is not set
778# CONFIG_SCSI_DH is not set
779CONFIG_ATA=y
780# CONFIG_ATA_NONSTANDARD is not set
781CONFIG_SATA_PMP=y
782# CONFIG_SATA_AHCI is not set
783# CONFIG_SATA_SIL24 is not set
784# CONFIG_SATA_FSL is not set
785CONFIG_ATA_SFF=y
786# CONFIG_SATA_SVW is not set
787# CONFIG_ATA_PIIX is not set
788# CONFIG_SATA_MV is not set
789# CONFIG_SATA_NV is not set
790# CONFIG_PDC_ADMA is not set
791# CONFIG_SATA_QSTOR is not set
792# CONFIG_SATA_PROMISE is not set
793# CONFIG_SATA_SX4 is not set
794CONFIG_SATA_SIL=y
795# CONFIG_SATA_SIS is not set
796# CONFIG_SATA_ULI is not set
797# CONFIG_SATA_VIA is not set
798# CONFIG_SATA_VITESSE is not set
799# CONFIG_SATA_INIC162X is not set
800# CONFIG_PATA_ALI is not set
801# CONFIG_PATA_AMD is not set
802# CONFIG_PATA_ARTOP is not set
803# CONFIG_PATA_ATIIXP is not set
804# CONFIG_PATA_CMD640_PCI is not set
805# CONFIG_PATA_CMD64X is not set
806# CONFIG_PATA_CS5520 is not set
807# CONFIG_PATA_CS5530 is not set
808# CONFIG_PATA_CYPRESS is not set
809# CONFIG_PATA_EFAR is not set
810# CONFIG_ATA_GENERIC is not set
811# CONFIG_PATA_HPT366 is not set
812# CONFIG_PATA_HPT37X is not set
813# CONFIG_PATA_HPT3X2N is not set
814# CONFIG_PATA_HPT3X3 is not set
815# CONFIG_PATA_IT821X is not set
816# CONFIG_PATA_IT8213 is not set
817# CONFIG_PATA_JMICRON is not set
818# CONFIG_PATA_TRIFLEX is not set
819# CONFIG_PATA_MARVELL is not set
820# CONFIG_PATA_MPIIX is not set
821# CONFIG_PATA_OLDPIIX is not set
822# CONFIG_PATA_NETCELL is not set
823# CONFIG_PATA_NINJA32 is not set
824# CONFIG_PATA_NS87410 is not set
825# CONFIG_PATA_NS87415 is not set
826# CONFIG_PATA_OPTI is not set
827# CONFIG_PATA_OPTIDMA is not set
828# CONFIG_PATA_PDC_OLD is not set
829# CONFIG_PATA_RADISYS is not set
830# CONFIG_PATA_RZ1000 is not set
831# CONFIG_PATA_SC1200 is not set
832# CONFIG_PATA_SERVERWORKS is not set
833# CONFIG_PATA_PDC2027X is not set
834# CONFIG_PATA_SIL680 is not set
835# CONFIG_PATA_SIS is not set
836# CONFIG_PATA_VIA is not set
837# CONFIG_PATA_WINBOND is not set
838# CONFIG_PATA_PLATFORM is not set
839# CONFIG_PATA_SCH is not set
840# CONFIG_MD is not set
841# CONFIG_FUSION is not set
842
843#
844# IEEE 1394 (FireWire) support
845#
846
847#
848# Enable only one of the two stacks, unless you know what you are doing
849#
850# CONFIG_FIREWIRE is not set
851# CONFIG_IEEE1394 is not set
852# CONFIG_I2O is not set
853# CONFIG_MACINTOSH_DRIVERS is not set
854CONFIG_NETDEVICES=y
855CONFIG_DUMMY=m
856CONFIG_BONDING=m
857# CONFIG_MACVLAN is not set
858# CONFIG_EQUALIZER is not set
859CONFIG_TUN=m
860# CONFIG_VETH is not set
861# CONFIG_ARCNET is not set
862CONFIG_PHYLIB=y
863
864#
865# MII PHY device drivers
866#
867# CONFIG_MARVELL_PHY is not set
868# CONFIG_DAVICOM_PHY is not set
869# CONFIG_QSEMI_PHY is not set
870# CONFIG_LXT_PHY is not set
871# CONFIG_CICADA_PHY is not set
872# CONFIG_VITESSE_PHY is not set
873# CONFIG_SMSC_PHY is not set
874# CONFIG_BROADCOM_PHY is not set
875# CONFIG_ICPLUS_PHY is not set
876# CONFIG_REALTEK_PHY is not set
877# CONFIG_NATIONAL_PHY is not set
878# CONFIG_STE10XP is not set
879# CONFIG_LSI_ET1011C_PHY is not set
880# CONFIG_FIXED_PHY is not set
881# CONFIG_MDIO_BITBANG is not set
882CONFIG_NET_ETHERNET=y
883CONFIG_MII=y
884# CONFIG_HAPPYMEAL is not set
885# CONFIG_SUNGEM is not set
886# CONFIG_CASSINI is not set
887# CONFIG_NET_VENDOR_3COM is not set
888# CONFIG_NET_TULIP is not set
889# CONFIG_HP100 is not set
890# CONFIG_IBM_NEW_EMAC_ZMII is not set
891# CONFIG_IBM_NEW_EMAC_RGMII is not set
892# CONFIG_IBM_NEW_EMAC_TAH is not set
893# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
894# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
895# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
896# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
897# CONFIG_NET_PCI is not set
898# CONFIG_B44 is not set
899# CONFIG_ATL2 is not set
900CONFIG_NETDEV_1000=y
901# CONFIG_ACENIC is not set
902# CONFIG_DL2K is not set
903# CONFIG_E1000 is not set
904# CONFIG_E1000E is not set
905# CONFIG_IP1000 is not set
906# CONFIG_IGB is not set
907# CONFIG_NS83820 is not set
908# CONFIG_HAMACHI is not set
909# CONFIG_YELLOWFIN is not set
910# CONFIG_R8169 is not set
911# CONFIG_SIS190 is not set
912# CONFIG_SKGE is not set
913# CONFIG_SKY2 is not set
914# CONFIG_VIA_VELOCITY is not set
915# CONFIG_TIGON3 is not set
916# CONFIG_BNX2 is not set
917CONFIG_GIANFAR=y
918# CONFIG_MV643XX_ETH is not set
919# CONFIG_QLA3XXX is not set
920# CONFIG_ATL1 is not set
921# CONFIG_ATL1E is not set
922# CONFIG_ATL1C is not set
923# CONFIG_JME is not set
924# CONFIG_NETDEV_10000 is not set
925# CONFIG_TR is not set
926
927#
928# Wireless LAN
929#
930# CONFIG_WLAN_PRE80211 is not set
931# CONFIG_WLAN_80211 is not set
932# CONFIG_IWLWIFI_LEDS is not set
933
934#
935# Enable WiMAX (Networking options) to see the WiMAX drivers
936#
937
938#
939# USB Network Adapters
940#
941# CONFIG_USB_CATC is not set
942# CONFIG_USB_KAWETH is not set
943# CONFIG_USB_PEGASUS is not set
944# CONFIG_USB_RTL8150 is not set
945# CONFIG_USB_USBNET is not set
946# CONFIG_WAN is not set
947CONFIG_ATM_DRIVERS=y
948# CONFIG_ATM_DUMMY is not set
949# CONFIG_ATM_TCP is not set
950# CONFIG_ATM_LANAI is not set
951# CONFIG_ATM_ENI is not set
952# CONFIG_ATM_FIRESTREAM is not set
953# CONFIG_ATM_ZATM is not set
954# CONFIG_ATM_NICSTAR is not set
955# CONFIG_ATM_IDT77252 is not set
956# CONFIG_ATM_AMBASSADOR is not set
957# CONFIG_ATM_HORIZON is not set
958# CONFIG_ATM_IA is not set
959# CONFIG_ATM_FORE200E is not set
960# CONFIG_ATM_HE is not set
961# CONFIG_ATM_SOLOS is not set
962# CONFIG_FDDI is not set
963# CONFIG_HIPPI is not set
964CONFIG_PPP=m
965CONFIG_PPP_MULTILINK=y
966CONFIG_PPP_FILTER=y
967CONFIG_PPP_ASYNC=m
968CONFIG_PPP_SYNC_TTY=m
969CONFIG_PPP_DEFLATE=m
970CONFIG_PPP_BSDCOMP=m
971# CONFIG_PPP_MPPE is not set
972CONFIG_PPPOE=m
973CONFIG_PPPOATM=m
974# CONFIG_PPPOL2TP is not set
975CONFIG_SLIP=m
976CONFIG_SLIP_COMPRESSED=y
977CONFIG_SLHC=m
978CONFIG_SLIP_SMART=y
979CONFIG_SLIP_MODE_SLIP6=y
980# CONFIG_NET_FC is not set
981CONFIG_NETCONSOLE=y
982# CONFIG_NETCONSOLE_DYNAMIC is not set
983CONFIG_NETPOLL=y
984CONFIG_NETPOLL_TRAP=y
985CONFIG_NET_POLL_CONTROLLER=y
986# CONFIG_ISDN is not set
987# CONFIG_PHONE is not set
988
989#
990# Input device support
991#
992CONFIG_INPUT=y
993CONFIG_INPUT_FF_MEMLESS=m
994# CONFIG_INPUT_POLLDEV is not set
995
996#
997# Userland interfaces
998#
999CONFIG_INPUT_MOUSEDEV=y
1000CONFIG_INPUT_MOUSEDEV_PSAUX=y
1001CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1002CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1003# CONFIG_INPUT_JOYDEV is not set
1004# CONFIG_INPUT_EVDEV is not set
1005# CONFIG_INPUT_EVBUG is not set
1006
1007#
1008# Input Device Drivers
1009#
1010# CONFIG_INPUT_KEYBOARD is not set
1011# CONFIG_INPUT_MOUSE is not set
1012# CONFIG_INPUT_JOYSTICK is not set
1013# CONFIG_INPUT_TABLET is not set
1014# CONFIG_INPUT_TOUCHSCREEN is not set
1015# CONFIG_INPUT_MISC is not set
1016
1017#
1018# Hardware I/O ports
1019#
1020# CONFIG_SERIO is not set
1021# CONFIG_GAMEPORT is not set
1022
1023#
1024# Character devices
1025#
1026CONFIG_VT=y
1027CONFIG_CONSOLE_TRANSLATIONS=y
1028CONFIG_VT_CONSOLE=y
1029CONFIG_HW_CONSOLE=y
1030# CONFIG_VT_HW_CONSOLE_BINDING is not set
1031CONFIG_DEVKMEM=y
1032# CONFIG_SERIAL_NONSTANDARD is not set
1033# CONFIG_NOZOMI is not set
1034
1035#
1036# Serial drivers
1037#
1038CONFIG_SERIAL_8250=y
1039CONFIG_SERIAL_8250_CONSOLE=y
1040# CONFIG_SERIAL_8250_PCI is not set
1041CONFIG_SERIAL_8250_NR_UARTS=2
1042CONFIG_SERIAL_8250_RUNTIME_UARTS=2
1043# CONFIG_SERIAL_8250_EXTENDED is not set
1044
1045#
1046# Non-8250 serial port support
1047#
1048# CONFIG_SERIAL_UARTLITE is not set
1049CONFIG_SERIAL_CORE=y
1050CONFIG_SERIAL_CORE_CONSOLE=y
1051# CONFIG_SERIAL_JSM is not set
1052# CONFIG_SERIAL_OF_PLATFORM is not set
1053CONFIG_UNIX98_PTYS=y
1054# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1055# CONFIG_LEGACY_PTYS is not set
1056# CONFIG_HVC_UDBG is not set
1057# CONFIG_IPMI_HANDLER is not set
1058CONFIG_HW_RANDOM=y
1059CONFIG_NVRAM=y
1060# CONFIG_R3964 is not set
1061# CONFIG_APPLICOM is not set
1062# CONFIG_RAW_DRIVER is not set
1063# CONFIG_TCG_TPM is not set
1064CONFIG_DEVPORT=y
1065CONFIG_I2C=y
1066CONFIG_I2C_BOARDINFO=y
1067CONFIG_I2C_CHARDEV=y
1068CONFIG_I2C_HELPER_AUTO=y
1069
1070#
1071# I2C Hardware Bus support
1072#
1073
1074#
1075# PC SMBus host controller drivers
1076#
1077# CONFIG_I2C_ALI1535 is not set
1078# CONFIG_I2C_ALI1563 is not set
1079# CONFIG_I2C_ALI15X3 is not set
1080# CONFIG_I2C_AMD756 is not set
1081# CONFIG_I2C_AMD8111 is not set
1082# CONFIG_I2C_I801 is not set
1083# CONFIG_I2C_ISCH is not set
1084# CONFIG_I2C_PIIX4 is not set
1085# CONFIG_I2C_NFORCE2 is not set
1086# CONFIG_I2C_SIS5595 is not set
1087# CONFIG_I2C_SIS630 is not set
1088# CONFIG_I2C_SIS96X is not set
1089# CONFIG_I2C_VIA is not set
1090# CONFIG_I2C_VIAPRO is not set
1091
1092#
1093# I2C system bus drivers (mostly embedded / system-on-chip)
1094#
1095# CONFIG_I2C_GPIO is not set
1096CONFIG_I2C_MPC=y
1097# CONFIG_I2C_OCORES is not set
1098# CONFIG_I2C_SIMTEC is not set
1099
1100#
1101# External I2C/SMBus adapter drivers
1102#
1103# CONFIG_I2C_PARPORT_LIGHT is not set
1104# CONFIG_I2C_TAOS_EVM is not set
1105# CONFIG_I2C_TINY_USB is not set
1106
1107#
1108# Graphics adapter I2C/DDC channel drivers
1109#
1110# CONFIG_I2C_VOODOO3 is not set
1111
1112#
1113# Other I2C/SMBus bus drivers
1114#
1115# CONFIG_I2C_PCA_PLATFORM is not set
1116# CONFIG_I2C_STUB is not set
1117
1118#
1119# Miscellaneous I2C Chip support
1120#
1121CONFIG_DS1682=y
1122# CONFIG_SENSORS_PCF8574 is not set
1123# CONFIG_PCF8575 is not set
1124# CONFIG_SENSORS_PCA9539 is not set
1125# CONFIG_SENSORS_PCF8591 is not set
1126# CONFIG_SENSORS_MAX6875 is not set
1127# CONFIG_SENSORS_TSL2550 is not set
1128# CONFIG_I2C_DEBUG_CORE is not set
1129# CONFIG_I2C_DEBUG_ALGO is not set
1130# CONFIG_I2C_DEBUG_BUS is not set
1131# CONFIG_I2C_DEBUG_CHIP is not set
1132# CONFIG_SPI is not set
1133CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1134CONFIG_ARCH_REQUIRE_GPIOLIB=y
1135CONFIG_GPIOLIB=y
1136# CONFIG_DEBUG_GPIO is not set
1137# CONFIG_GPIO_SYSFS is not set
1138
1139#
1140# Memory mapped GPIO expanders:
1141#
1142# CONFIG_GPIO_XILINX is not set
1143
1144#
1145# I2C GPIO expanders:
1146#
1147# CONFIG_GPIO_MAX732X is not set
1148# CONFIG_GPIO_PCA953X is not set
1149# CONFIG_GPIO_PCF857X is not set
1150
1151#
1152# PCI GPIO expanders:
1153#
1154# CONFIG_GPIO_BT8XX is not set
1155
1156#
1157# SPI GPIO expanders:
1158#
1159# CONFIG_W1 is not set
1160# CONFIG_POWER_SUPPLY is not set
1161CONFIG_HWMON=y
1162# CONFIG_HWMON_VID is not set
1163# CONFIG_SENSORS_AD7414 is not set
1164# CONFIG_SENSORS_AD7418 is not set
1165# CONFIG_SENSORS_ADM1021 is not set
1166# CONFIG_SENSORS_ADM1025 is not set
1167# CONFIG_SENSORS_ADM1026 is not set
1168# CONFIG_SENSORS_ADM1029 is not set
1169# CONFIG_SENSORS_ADM1031 is not set
1170# CONFIG_SENSORS_ADM9240 is not set
1171# CONFIG_SENSORS_ADT7462 is not set
1172# CONFIG_SENSORS_ADT7470 is not set
1173# CONFIG_SENSORS_ADT7473 is not set
1174# CONFIG_SENSORS_ADT7475 is not set
1175# CONFIG_SENSORS_ATXP1 is not set
1176# CONFIG_SENSORS_DS1621 is not set
1177# CONFIG_SENSORS_I5K_AMB is not set
1178# CONFIG_SENSORS_F71805F is not set
1179# CONFIG_SENSORS_F71882FG is not set
1180# CONFIG_SENSORS_F75375S is not set
1181# CONFIG_SENSORS_GL518SM is not set
1182# CONFIG_SENSORS_GL520SM is not set
1183# CONFIG_SENSORS_IT87 is not set
1184# CONFIG_SENSORS_LM63 is not set
1185# CONFIG_SENSORS_LM75 is not set
1186# CONFIG_SENSORS_LM77 is not set
1187# CONFIG_SENSORS_LM78 is not set
1188# CONFIG_SENSORS_LM80 is not set
1189# CONFIG_SENSORS_LM83 is not set
1190# CONFIG_SENSORS_LM85 is not set
1191# CONFIG_SENSORS_LM87 is not set
1192CONFIG_SENSORS_LM90=y
1193CONFIG_SENSORS_LM92=y
1194# CONFIG_SENSORS_LM93 is not set
1195# CONFIG_SENSORS_LTC4245 is not set
1196# CONFIG_SENSORS_MAX1619 is not set
1197# CONFIG_SENSORS_MAX6650 is not set
1198# CONFIG_SENSORS_PC87360 is not set
1199# CONFIG_SENSORS_PC87427 is not set
1200# CONFIG_SENSORS_SIS5595 is not set
1201# CONFIG_SENSORS_DME1737 is not set
1202# CONFIG_SENSORS_SMSC47M1 is not set
1203# CONFIG_SENSORS_SMSC47M192 is not set
1204# CONFIG_SENSORS_SMSC47B397 is not set
1205# CONFIG_SENSORS_ADS7828 is not set
1206# CONFIG_SENSORS_THMC50 is not set
1207# CONFIG_SENSORS_VIA686A is not set
1208# CONFIG_SENSORS_VT1211 is not set
1209# CONFIG_SENSORS_VT8231 is not set
1210# CONFIG_SENSORS_W83781D is not set
1211# CONFIG_SENSORS_W83791D is not set
1212# CONFIG_SENSORS_W83792D is not set
1213# CONFIG_SENSORS_W83793 is not set
1214# CONFIG_SENSORS_W83L785TS is not set
1215# CONFIG_SENSORS_W83L786NG is not set
1216# CONFIG_SENSORS_W83627HF is not set
1217# CONFIG_SENSORS_W83627EHF is not set
1218# CONFIG_HWMON_DEBUG_CHIP is not set
1219# CONFIG_THERMAL is not set
1220# CONFIG_THERMAL_HWMON is not set
1221CONFIG_WATCHDOG=y
1222# CONFIG_WATCHDOG_NOWAYOUT is not set
1223
1224#
1225# Watchdog Device Drivers
1226#
1227# CONFIG_SOFT_WATCHDOG is not set
1228# CONFIG_ALIM7101_WDT is not set
1229CONFIG_GEF_WDT=y
1230# CONFIG_8xxx_WDT is not set
1231
1232#
1233# PCI-based Watchdog Cards
1234#
1235# CONFIG_PCIPCWATCHDOG is not set
1236# CONFIG_WDTPCI is not set
1237
1238#
1239# USB-based Watchdog Cards
1240#
1241# CONFIG_USBPCWATCHDOG is not set
1242CONFIG_SSB_POSSIBLE=y
1243
1244#
1245# Sonics Silicon Backplane
1246#
1247# CONFIG_SSB is not set
1248
1249#
1250# Multifunction device drivers
1251#
1252# CONFIG_MFD_CORE is not set
1253# CONFIG_MFD_SM501 is not set
1254# CONFIG_HTC_PASIC3 is not set
1255# CONFIG_TPS65010 is not set
1256# CONFIG_TWL4030_CORE is not set
1257# CONFIG_MFD_TMIO is not set
1258# CONFIG_PMIC_DA903X is not set
1259# CONFIG_MFD_WM8400 is not set
1260# CONFIG_MFD_WM8350_I2C is not set
1261# CONFIG_MFD_PCF50633 is not set
1262# CONFIG_REGULATOR is not set
1263
1264#
1265# Multimedia devices
1266#
1267
1268#
1269# Multimedia core support
1270#
1271# CONFIG_VIDEO_DEV is not set
1272# CONFIG_DVB_CORE is not set
1273# CONFIG_VIDEO_MEDIA is not set
1274
1275#
1276# Multimedia drivers
1277#
1278CONFIG_DAB=y
1279# CONFIG_USB_DABUSB is not set
1280
1281#
1282# Graphics support
1283#
1284# CONFIG_AGP is not set
1285# CONFIG_DRM is not set
1286# CONFIG_VGASTATE is not set
1287CONFIG_VIDEO_OUTPUT_CONTROL=m
1288# CONFIG_FB is not set
1289# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1290
1291#
1292# Display device support
1293#
1294# CONFIG_DISPLAY_SUPPORT is not set
1295
1296#
1297# Console display driver support
1298#
1299CONFIG_VGA_CONSOLE=y
1300# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1301CONFIG_DUMMY_CONSOLE=y
1302# CONFIG_SOUND is not set
1303CONFIG_HID_SUPPORT=y
1304CONFIG_HID=y
1305# CONFIG_HID_DEBUG is not set
1306# CONFIG_HIDRAW is not set
1307
1308#
1309# USB Input Devices
1310#
1311CONFIG_USB_HID=y
1312# CONFIG_HID_PID is not set
1313# CONFIG_USB_HIDDEV is not set
1314
1315#
1316# Special HID drivers
1317#
1318CONFIG_HID_COMPAT=y
1319CONFIG_HID_A4TECH=y
1320CONFIG_HID_APPLE=y
1321CONFIG_HID_BELKIN=y
1322CONFIG_HID_CHERRY=y
1323CONFIG_HID_CHICONY=y
1324CONFIG_HID_CYPRESS=y
1325CONFIG_HID_EZKEY=y
1326CONFIG_HID_GYRATION=y
1327CONFIG_HID_LOGITECH=y
1328# CONFIG_LOGITECH_FF is not set
1329# CONFIG_LOGIRUMBLEPAD2_FF is not set
1330CONFIG_HID_MICROSOFT=y
1331CONFIG_HID_MONTEREY=y
1332# CONFIG_HID_NTRIG is not set
1333CONFIG_HID_PANTHERLORD=y
1334# CONFIG_PANTHERLORD_FF is not set
1335CONFIG_HID_PETALYNX=y
1336CONFIG_HID_SAMSUNG=y
1337CONFIG_HID_SONY=y
1338CONFIG_HID_SUNPLUS=y
1339# CONFIG_GREENASIA_FF is not set
1340# CONFIG_HID_TOPSEED is not set
1341CONFIG_THRUSTMASTER_FF=m
1342CONFIG_ZEROPLUS_FF=m
1343CONFIG_USB_SUPPORT=y
1344CONFIG_USB_ARCH_HAS_HCD=y
1345CONFIG_USB_ARCH_HAS_OHCI=y
1346CONFIG_USB_ARCH_HAS_EHCI=y
1347CONFIG_USB=y
1348# CONFIG_USB_DEBUG is not set
1349# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1350
1351#
1352# Miscellaneous USB options
1353#
1354# CONFIG_USB_DEVICEFS is not set
1355# CONFIG_USB_DEVICE_CLASS is not set
1356# CONFIG_USB_DYNAMIC_MINORS is not set
1357# CONFIG_USB_OTG is not set
1358# CONFIG_USB_OTG_WHITELIST is not set
1359# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1360# CONFIG_USB_MON is not set
1361# CONFIG_USB_WUSB is not set
1362# CONFIG_USB_WUSB_CBAF is not set
1363
1364#
1365# USB Host Controller Drivers
1366#
1367# CONFIG_USB_C67X00_HCD is not set
1368CONFIG_USB_EHCI_HCD=y
1369# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1370# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1371# CONFIG_USB_EHCI_FSL is not set
1372# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1373# CONFIG_USB_OXU210HP_HCD is not set
1374# CONFIG_USB_ISP116X_HCD is not set
1375# CONFIG_USB_ISP1760_HCD is not set
1376CONFIG_USB_OHCI_HCD=y
1377# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1378# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1379# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1380CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1381# CONFIG_USB_UHCI_HCD is not set
1382# CONFIG_USB_SL811_HCD is not set
1383# CONFIG_USB_R8A66597_HCD is not set
1384# CONFIG_USB_WHCI_HCD is not set
1385# CONFIG_USB_HWA_HCD is not set
1386
1387#
1388# USB Device Class drivers
1389#
1390# CONFIG_USB_ACM is not set
1391# CONFIG_USB_PRINTER is not set
1392# CONFIG_USB_WDM is not set
1393# CONFIG_USB_TMC is not set
1394
1395#
1396# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1397#
1398
1399#
1400# see USB_STORAGE Help for more information
1401#
1402CONFIG_USB_STORAGE=y
1403# CONFIG_USB_STORAGE_DEBUG is not set
1404# CONFIG_USB_STORAGE_DATAFAB is not set
1405# CONFIG_USB_STORAGE_FREECOM is not set
1406# CONFIG_USB_STORAGE_ISD200 is not set
1407# CONFIG_USB_STORAGE_USBAT is not set
1408# CONFIG_USB_STORAGE_SDDR09 is not set
1409# CONFIG_USB_STORAGE_SDDR55 is not set
1410# CONFIG_USB_STORAGE_JUMPSHOT is not set
1411# CONFIG_USB_STORAGE_ALAUDA is not set
1412# CONFIG_USB_STORAGE_ONETOUCH is not set
1413# CONFIG_USB_STORAGE_KARMA is not set
1414# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1415# CONFIG_USB_LIBUSUAL is not set
1416
1417#
1418# USB Imaging devices
1419#
1420# CONFIG_USB_MDC800 is not set
1421# CONFIG_USB_MICROTEK is not set
1422
1423#
1424# USB port drivers
1425#
1426# CONFIG_USB_SERIAL is not set
1427
1428#
1429# USB Miscellaneous drivers
1430#
1431# CONFIG_USB_EMI62 is not set
1432# CONFIG_USB_EMI26 is not set
1433# CONFIG_USB_ADUTUX is not set
1434# CONFIG_USB_SEVSEG is not set
1435# CONFIG_USB_RIO500 is not set
1436# CONFIG_USB_LEGOTOWER is not set
1437# CONFIG_USB_LCD is not set
1438# CONFIG_USB_BERRY_CHARGE is not set
1439# CONFIG_USB_LED is not set
1440# CONFIG_USB_CYPRESS_CY7C63 is not set
1441# CONFIG_USB_CYTHERM is not set
1442# CONFIG_USB_PHIDGET is not set
1443# CONFIG_USB_IDMOUSE is not set
1444# CONFIG_USB_FTDI_ELAN is not set
1445# CONFIG_USB_APPLEDISPLAY is not set
1446# CONFIG_USB_SISUSBVGA is not set
1447# CONFIG_USB_LD is not set
1448# CONFIG_USB_TRANCEVIBRATOR is not set
1449# CONFIG_USB_IOWARRIOR is not set
1450# CONFIG_USB_ISIGHTFW is not set
1451# CONFIG_USB_VST is not set
1452# CONFIG_USB_ATM is not set
1453# CONFIG_USB_GADGET is not set
1454
1455#
1456# OTG and related infrastructure
1457#
1458# CONFIG_USB_GPIO_VBUS is not set
1459# CONFIG_UWB is not set
1460# CONFIG_MMC is not set
1461# CONFIG_MEMSTICK is not set
1462# CONFIG_NEW_LEDS is not set
1463# CONFIG_ACCESSIBILITY is not set
1464# CONFIG_INFINIBAND is not set
1465# CONFIG_EDAC is not set
1466CONFIG_RTC_LIB=y
1467CONFIG_RTC_CLASS=y
1468CONFIG_RTC_HCTOSYS=y
1469CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1470# CONFIG_RTC_DEBUG is not set
1471
1472#
1473# RTC interfaces
1474#
1475CONFIG_RTC_INTF_SYSFS=y
1476# CONFIG_RTC_INTF_PROC is not set
1477CONFIG_RTC_INTF_DEV=y
1478# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1479# CONFIG_RTC_DRV_TEST is not set
1480
1481#
1482# I2C RTC drivers
1483#
1484# CONFIG_RTC_DRV_DS1307 is not set
1485# CONFIG_RTC_DRV_DS1374 is not set
1486# CONFIG_RTC_DRV_DS1672 is not set
1487# CONFIG_RTC_DRV_MAX6900 is not set
1488# CONFIG_RTC_DRV_RS5C372 is not set
1489# CONFIG_RTC_DRV_ISL1208 is not set
1490# CONFIG_RTC_DRV_X1205 is not set
1491# CONFIG_RTC_DRV_PCF8563 is not set
1492# CONFIG_RTC_DRV_PCF8583 is not set
1493# CONFIG_RTC_DRV_M41T80 is not set
1494# CONFIG_RTC_DRV_S35390A is not set
1495# CONFIG_RTC_DRV_FM3130 is not set
1496CONFIG_RTC_DRV_RX8581=y
1497
1498#
1499# SPI RTC drivers
1500#
1501
1502#
1503# Platform RTC drivers
1504#
1505# CONFIG_RTC_DRV_CMOS is not set
1506# CONFIG_RTC_DRV_DS1286 is not set
1507# CONFIG_RTC_DRV_DS1511 is not set
1508# CONFIG_RTC_DRV_DS1553 is not set
1509# CONFIG_RTC_DRV_DS1742 is not set
1510# CONFIG_RTC_DRV_STK17TA8 is not set
1511# CONFIG_RTC_DRV_M48T86 is not set
1512# CONFIG_RTC_DRV_M48T35 is not set
1513# CONFIG_RTC_DRV_M48T59 is not set
1514# CONFIG_RTC_DRV_BQ4802 is not set
1515# CONFIG_RTC_DRV_V3020 is not set
1516
1517#
1518# on-CPU RTC drivers
1519#
1520# CONFIG_RTC_DRV_PPC is not set
1521# CONFIG_DMADEVICES is not set
1522# CONFIG_UIO is not set
1523# CONFIG_STAGING is not set
1524
1525#
1526# File systems
1527#
1528CONFIG_EXT2_FS=y
1529CONFIG_EXT2_FS_XATTR=y
1530CONFIG_EXT2_FS_POSIX_ACL=y
1531# CONFIG_EXT2_FS_SECURITY is not set
1532# CONFIG_EXT2_FS_XIP is not set
1533CONFIG_EXT3_FS=y
1534CONFIG_EXT3_FS_XATTR=y
1535CONFIG_EXT3_FS_POSIX_ACL=y
1536# CONFIG_EXT3_FS_SECURITY is not set
1537# CONFIG_EXT4_FS is not set
1538CONFIG_JBD=y
1539CONFIG_FS_MBCACHE=y
1540# CONFIG_REISERFS_FS is not set
1541# CONFIG_JFS_FS is not set
1542CONFIG_FS_POSIX_ACL=y
1543CONFIG_FILE_LOCKING=y
1544# CONFIG_XFS_FS is not set
1545# CONFIG_OCFS2_FS is not set
1546# CONFIG_BTRFS_FS is not set
1547CONFIG_DNOTIFY=y
1548CONFIG_INOTIFY=y
1549CONFIG_INOTIFY_USER=y
1550# CONFIG_QUOTA is not set
1551# CONFIG_AUTOFS_FS is not set
1552# CONFIG_AUTOFS4_FS is not set
1553# CONFIG_FUSE_FS is not set
1554
1555#
1556# CD-ROM/DVD Filesystems
1557#
1558# CONFIG_ISO9660_FS is not set
1559# CONFIG_UDF_FS is not set
1560
1561#
1562# DOS/FAT/NT Filesystems
1563#
1564CONFIG_FAT_FS=y
1565CONFIG_MSDOS_FS=y
1566CONFIG_VFAT_FS=y
1567CONFIG_FAT_DEFAULT_CODEPAGE=437
1568CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1569# CONFIG_NTFS_FS is not set
1570
1571#
1572# Pseudo filesystems
1573#
1574CONFIG_PROC_FS=y
1575CONFIG_PROC_KCORE=y
1576CONFIG_PROC_SYSCTL=y
1577CONFIG_PROC_PAGE_MONITOR=y
1578CONFIG_SYSFS=y
1579CONFIG_TMPFS=y
1580# CONFIG_TMPFS_POSIX_ACL is not set
1581# CONFIG_HUGETLB_PAGE is not set
1582# CONFIG_CONFIGFS_FS is not set
1583CONFIG_MISC_FILESYSTEMS=y
1584# CONFIG_ADFS_FS is not set
1585# CONFIG_AFFS_FS is not set
1586# CONFIG_HFS_FS is not set
1587# CONFIG_HFSPLUS_FS is not set
1588# CONFIG_BEFS_FS is not set
1589# CONFIG_BFS_FS is not set
1590# CONFIG_EFS_FS is not set
1591CONFIG_JFFS2_FS=y
1592CONFIG_JFFS2_FS_DEBUG=0
1593CONFIG_JFFS2_FS_WRITEBUFFER=y
1594# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1595# CONFIG_JFFS2_SUMMARY is not set
1596# CONFIG_JFFS2_FS_XATTR is not set
1597# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1598CONFIG_JFFS2_ZLIB=y
1599# CONFIG_JFFS2_LZO is not set
1600CONFIG_JFFS2_RTIME=y
1601# CONFIG_JFFS2_RUBIN is not set
1602# CONFIG_CRAMFS is not set
1603# CONFIG_SQUASHFS is not set
1604# CONFIG_VXFS_FS is not set
1605# CONFIG_MINIX_FS is not set
1606# CONFIG_OMFS_FS is not set
1607# CONFIG_HPFS_FS is not set
1608# CONFIG_QNX4FS_FS is not set
1609# CONFIG_ROMFS_FS is not set
1610# CONFIG_SYSV_FS is not set
1611# CONFIG_UFS_FS is not set
1612CONFIG_NETWORK_FILESYSTEMS=y
1613CONFIG_NFS_FS=y
1614CONFIG_NFS_V3=y
1615# CONFIG_NFS_V3_ACL is not set
1616CONFIG_NFS_V4=y
1617CONFIG_ROOT_NFS=y
1618# CONFIG_NFSD is not set
1619CONFIG_LOCKD=y
1620CONFIG_LOCKD_V4=y
1621CONFIG_NFS_COMMON=y
1622CONFIG_SUNRPC=y
1623CONFIG_SUNRPC_GSS=y
1624# CONFIG_SUNRPC_REGISTER_V4 is not set
1625CONFIG_RPCSEC_GSS_KRB5=y
1626# CONFIG_RPCSEC_GSS_SPKM3 is not set
1627# CONFIG_SMB_FS is not set
1628CONFIG_CIFS=m
1629# CONFIG_CIFS_STATS is not set
1630# CONFIG_CIFS_WEAK_PW_HASH is not set
1631CONFIG_CIFS_XATTR=y
1632CONFIG_CIFS_POSIX=y
1633# CONFIG_CIFS_DEBUG2 is not set
1634# CONFIG_CIFS_EXPERIMENTAL is not set
1635# CONFIG_NCP_FS is not set
1636# CONFIG_CODA_FS is not set
1637# CONFIG_AFS_FS is not set
1638
1639#
1640# Partition Types
1641#
1642# CONFIG_PARTITION_ADVANCED is not set
1643CONFIG_MSDOS_PARTITION=y
1644CONFIG_NLS=y
1645CONFIG_NLS_DEFAULT="iso8859-1"
1646CONFIG_NLS_CODEPAGE_437=m
1647CONFIG_NLS_CODEPAGE_737=m
1648CONFIG_NLS_CODEPAGE_775=m
1649CONFIG_NLS_CODEPAGE_850=m
1650CONFIG_NLS_CODEPAGE_852=m
1651CONFIG_NLS_CODEPAGE_855=m
1652CONFIG_NLS_CODEPAGE_857=m
1653CONFIG_NLS_CODEPAGE_860=m
1654CONFIG_NLS_CODEPAGE_861=m
1655CONFIG_NLS_CODEPAGE_862=m
1656CONFIG_NLS_CODEPAGE_863=m
1657CONFIG_NLS_CODEPAGE_864=m
1658CONFIG_NLS_CODEPAGE_865=m
1659CONFIG_NLS_CODEPAGE_866=m
1660CONFIG_NLS_CODEPAGE_869=m
1661CONFIG_NLS_CODEPAGE_936=m
1662CONFIG_NLS_CODEPAGE_950=m
1663CONFIG_NLS_CODEPAGE_932=m
1664CONFIG_NLS_CODEPAGE_949=m
1665CONFIG_NLS_CODEPAGE_874=m
1666CONFIG_NLS_ISO8859_8=m
1667CONFIG_NLS_CODEPAGE_1250=m
1668CONFIG_NLS_CODEPAGE_1251=m
1669CONFIG_NLS_ASCII=m
1670CONFIG_NLS_ISO8859_1=m
1671CONFIG_NLS_ISO8859_2=m
1672CONFIG_NLS_ISO8859_3=m
1673CONFIG_NLS_ISO8859_4=m
1674CONFIG_NLS_ISO8859_5=m
1675CONFIG_NLS_ISO8859_6=m
1676CONFIG_NLS_ISO8859_7=m
1677CONFIG_NLS_ISO8859_9=m
1678CONFIG_NLS_ISO8859_13=m
1679CONFIG_NLS_ISO8859_14=m
1680CONFIG_NLS_ISO8859_15=m
1681CONFIG_NLS_KOI8_R=m
1682CONFIG_NLS_KOI8_U=m
1683CONFIG_NLS_UTF8=m
1684# CONFIG_DLM is not set
1685
1686#
1687# Library routines
1688#
1689CONFIG_BITREVERSE=y
1690CONFIG_GENERIC_FIND_LAST_BIT=y
1691CONFIG_CRC_CCITT=m
1692# CONFIG_CRC16 is not set
1693# CONFIG_CRC_T10DIF is not set
1694# CONFIG_CRC_ITU_T is not set
1695CONFIG_CRC32=y
1696# CONFIG_CRC7 is not set
1697CONFIG_LIBCRC32C=m
1698CONFIG_ZLIB_INFLATE=y
1699CONFIG_ZLIB_DEFLATE=y
1700CONFIG_PLIST=y
1701CONFIG_HAS_IOMEM=y
1702CONFIG_HAS_IOPORT=y
1703CONFIG_HAS_DMA=y
1704CONFIG_HAVE_LMB=y
1705
1706#
1707# Kernel hacking
1708#
1709# CONFIG_PRINTK_TIME is not set
1710CONFIG_ENABLE_WARN_DEPRECATED=y
1711CONFIG_ENABLE_MUST_CHECK=y
1712CONFIG_FRAME_WARN=1024
1713CONFIG_MAGIC_SYSRQ=y
1714# CONFIG_UNUSED_SYMBOLS is not set
1715# CONFIG_DEBUG_FS is not set
1716# CONFIG_HEADERS_CHECK is not set
1717CONFIG_DEBUG_KERNEL=y
1718# CONFIG_DEBUG_SHIRQ is not set
1719CONFIG_DETECT_SOFTLOCKUP=y
1720# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1721CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1722CONFIG_SCHED_DEBUG=y
1723# CONFIG_SCHEDSTATS is not set
1724# CONFIG_TIMER_STATS is not set
1725# CONFIG_DEBUG_OBJECTS is not set
1726# CONFIG_DEBUG_SLAB is not set
1727# CONFIG_DEBUG_RT_MUTEXES is not set
1728# CONFIG_RT_MUTEX_TESTER is not set
1729# CONFIG_DEBUG_SPINLOCK is not set
1730# CONFIG_DEBUG_MUTEXES is not set
1731# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1732# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1733# CONFIG_DEBUG_KOBJECT is not set
1734# CONFIG_DEBUG_BUGVERBOSE is not set
1735CONFIG_DEBUG_INFO=y
1736# CONFIG_DEBUG_VM is not set
1737# CONFIG_DEBUG_WRITECOUNT is not set
1738# CONFIG_DEBUG_MEMORY_INIT is not set
1739# CONFIG_DEBUG_LIST is not set
1740# CONFIG_DEBUG_SG is not set
1741# CONFIG_DEBUG_NOTIFIERS is not set
1742# CONFIG_BOOT_PRINTK_DELAY is not set
1743# CONFIG_RCU_TORTURE_TEST is not set
1744# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1745# CONFIG_BACKTRACE_SELF_TEST is not set
1746# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1747# CONFIG_FAULT_INJECTION is not set
1748# CONFIG_LATENCYTOP is not set
1749CONFIG_SYSCTL_SYSCALL_CHECK=y
1750CONFIG_HAVE_FUNCTION_TRACER=y
1751CONFIG_HAVE_DYNAMIC_FTRACE=y
1752CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1753
1754#
1755# Tracers
1756#
1757# CONFIG_FUNCTION_TRACER is not set
1758# CONFIG_PREEMPT_TRACER is not set
1759# CONFIG_SCHED_TRACER is not set
1760# CONFIG_CONTEXT_SWITCH_TRACER is not set
1761# CONFIG_BOOT_TRACER is not set
1762# CONFIG_TRACE_BRANCH_PROFILING is not set
1763# CONFIG_STACK_TRACER is not set
1764# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1765# CONFIG_SAMPLES is not set
1766CONFIG_HAVE_ARCH_KGDB=y
1767# CONFIG_KGDB is not set
1768CONFIG_PRINT_STACK_DEPTH=64
1769# CONFIG_DEBUG_STACKOVERFLOW is not set
1770# CONFIG_DEBUG_STACK_USAGE is not set
1771# CONFIG_DEBUG_PAGEALLOC is not set
1772# CONFIG_CODE_PATCHING_SELFTEST is not set
1773# CONFIG_FTR_FIXUP_SELFTEST is not set
1774# CONFIG_MSI_BITMAP_SELFTEST is not set
1775# CONFIG_XMON is not set
1776# CONFIG_IRQSTACKS is not set
1777# CONFIG_BDI_SWITCH is not set
1778# CONFIG_BOOTX_TEXT is not set
1779# CONFIG_PPC_EARLY_DEBUG is not set
1780
1781#
1782# Security options
1783#
1784# CONFIG_KEYS is not set
1785CONFIG_SECURITY=y
1786# CONFIG_SECURITYFS is not set
1787CONFIG_SECURITY_NETWORK=y
1788# CONFIG_SECURITY_NETWORK_XFRM is not set
1789# CONFIG_SECURITY_PATH is not set
1790# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1791# CONFIG_SECURITY_ROOTPLUG is not set
1792CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1793CONFIG_CRYPTO=y
1794
1795#
1796# Crypto core or helper
1797#
1798# CONFIG_CRYPTO_FIPS is not set
1799CONFIG_CRYPTO_ALGAPI=y
1800CONFIG_CRYPTO_ALGAPI2=y
1801CONFIG_CRYPTO_AEAD=m
1802CONFIG_CRYPTO_AEAD2=y
1803CONFIG_CRYPTO_BLKCIPHER=y
1804CONFIG_CRYPTO_BLKCIPHER2=y
1805CONFIG_CRYPTO_HASH=y
1806CONFIG_CRYPTO_HASH2=y
1807CONFIG_CRYPTO_RNG2=y
1808CONFIG_CRYPTO_MANAGER=y
1809CONFIG_CRYPTO_MANAGER2=y
1810# CONFIG_CRYPTO_GF128MUL is not set
1811CONFIG_CRYPTO_NULL=m
1812# CONFIG_CRYPTO_CRYPTD is not set
1813CONFIG_CRYPTO_AUTHENC=m
1814CONFIG_CRYPTO_TEST=m
1815
1816#
1817# Authenticated Encryption with Associated Data
1818#
1819# CONFIG_CRYPTO_CCM is not set
1820# CONFIG_CRYPTO_GCM is not set
1821# CONFIG_CRYPTO_SEQIV is not set
1822
1823#
1824# Block modes
1825#
1826CONFIG_CRYPTO_CBC=y
1827# CONFIG_CRYPTO_CTR is not set
1828# CONFIG_CRYPTO_CTS is not set
1829CONFIG_CRYPTO_ECB=m
1830# CONFIG_CRYPTO_LRW is not set
1831CONFIG_CRYPTO_PCBC=m
1832# CONFIG_CRYPTO_XTS is not set
1833
1834#
1835# Hash modes
1836#
1837CONFIG_CRYPTO_HMAC=y
1838# CONFIG_CRYPTO_XCBC is not set
1839
1840#
1841# Digest
1842#
1843CONFIG_CRYPTO_CRC32C=m
1844CONFIG_CRYPTO_MD4=m
1845CONFIG_CRYPTO_MD5=y
1846CONFIG_CRYPTO_MICHAEL_MIC=m
1847# CONFIG_CRYPTO_RMD128 is not set
1848# CONFIG_CRYPTO_RMD160 is not set
1849# CONFIG_CRYPTO_RMD256 is not set
1850# CONFIG_CRYPTO_RMD320 is not set
1851CONFIG_CRYPTO_SHA1=m
1852CONFIG_CRYPTO_SHA256=m
1853CONFIG_CRYPTO_SHA512=m
1854# CONFIG_CRYPTO_TGR192 is not set
1855CONFIG_CRYPTO_WP512=m
1856
1857#
1858# Ciphers
1859#
1860CONFIG_CRYPTO_AES=m
1861CONFIG_CRYPTO_ANUBIS=m
1862CONFIG_CRYPTO_ARC4=m
1863CONFIG_CRYPTO_BLOWFISH=m
1864# CONFIG_CRYPTO_CAMELLIA is not set
1865CONFIG_CRYPTO_CAST5=m
1866CONFIG_CRYPTO_CAST6=m
1867CONFIG_CRYPTO_DES=y
1868# CONFIG_CRYPTO_FCRYPT is not set
1869CONFIG_CRYPTO_KHAZAD=m
1870# CONFIG_CRYPTO_SALSA20 is not set
1871# CONFIG_CRYPTO_SEED is not set
1872CONFIG_CRYPTO_SERPENT=m
1873CONFIG_CRYPTO_TEA=m
1874CONFIG_CRYPTO_TWOFISH=m
1875CONFIG_CRYPTO_TWOFISH_COMMON=m
1876
1877#
1878# Compression
1879#
1880CONFIG_CRYPTO_DEFLATE=m
1881# CONFIG_CRYPTO_LZO is not set
1882
1883#
1884# Random Number Generation
1885#
1886# CONFIG_CRYPTO_ANSI_CPRNG is not set
1887# CONFIG_CRYPTO_HW is not set
1888# CONFIG_PPC_CLOCK is not set
1889# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
new file mode 100644
index 000000000000..bd236b3d915a
--- /dev/null
+++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
@@ -0,0 +1,1613 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc3
4# Wed Jan 28 23:05:34 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
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_PPC_FPU=y
18# CONFIG_PHYS_64BIT is not set
19CONFIG_ALTIVEC=y
20CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set
23CONFIG_SMP=y
24CONFIG_NR_CPUS=2
25CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32
27# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
28CONFIG_MMU=y
29CONFIG_GENERIC_CMOS_UPDATE=y
30CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_GENERIC_LOCKBREAK=y
41CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y
45CONFIG_GENERIC_GPIO=y
46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
47CONFIG_PPC=y
48CONFIG_EARLY_PRINTK=y
49CONFIG_GENERIC_NVRAM=y
50CONFIG_SCHED_OMIT_FRAME_POINTER=y
51CONFIG_ARCH_MAY_HAVE_PC_FDC=y
52CONFIG_PPC_OF=y
53CONFIG_OF=y
54CONFIG_PPC_UDBG_16550=y
55CONFIG_GENERIC_TBSYNC=y
56CONFIG_AUDIT_ARCH=y
57CONFIG_GENERIC_BUG=y
58CONFIG_DEFAULT_UIMAGE=y
59# CONFIG_PPC_DCR_NATIVE is not set
60# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
62
63#
64# General setup
65#
66CONFIG_EXPERIMENTAL=y
67CONFIG_LOCK_KERNEL=y
68CONFIG_INIT_ENV_ARG_LIMIT=32
69CONFIG_LOCALVERSION=""
70CONFIG_LOCALVERSION_AUTO=y
71CONFIG_SWAP=y
72CONFIG_SYSVIPC=y
73CONFIG_SYSVIPC_SYSCTL=y
74CONFIG_POSIX_MQUEUE=y
75CONFIG_BSD_PROCESS_ACCT=y
76CONFIG_BSD_PROCESS_ACCT_V3=y
77# CONFIG_TASKSTATS is not set
78# CONFIG_AUDIT is not set
79
80#
81# RCU Subsystem
82#
83CONFIG_CLASSIC_RCU=y
84# CONFIG_TREE_RCU is not set
85# CONFIG_PREEMPT_RCU is not set
86# CONFIG_TREE_RCU_TRACE is not set
87# CONFIG_PREEMPT_RCU_TRACE is not set
88CONFIG_IKCONFIG=y
89CONFIG_IKCONFIG_PROC=y
90CONFIG_LOG_BUF_SHIFT=14
91# CONFIG_GROUP_SCHED is not set
92# CONFIG_CGROUPS is not set
93CONFIG_SYSFS_DEPRECATED=y
94CONFIG_SYSFS_DEPRECATED_V2=y
95CONFIG_RELAY=y
96# CONFIG_NAMESPACES is not set
97CONFIG_BLK_DEV_INITRD=y
98CONFIG_INITRAMFS_SOURCE=""
99# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
100CONFIG_SYSCTL=y
101CONFIG_EMBEDDED=y
102CONFIG_SYSCTL_SYSCALL=y
103CONFIG_KALLSYMS=y
104# CONFIG_KALLSYMS_EXTRA_PASS is not set
105CONFIG_HOTPLUG=y
106CONFIG_PRINTK=y
107CONFIG_BUG=y
108CONFIG_ELF_CORE=y
109CONFIG_COMPAT_BRK=y
110CONFIG_BASE_FULL=y
111CONFIG_FUTEX=y
112CONFIG_ANON_INODES=y
113CONFIG_EPOLL=y
114CONFIG_SIGNALFD=y
115CONFIG_TIMERFD=y
116CONFIG_EVENTFD=y
117CONFIG_SHMEM=y
118CONFIG_AIO=y
119CONFIG_VM_EVENT_COUNTERS=y
120CONFIG_PCI_QUIRKS=y
121CONFIG_SLAB=y
122# CONFIG_SLUB is not set
123# CONFIG_SLOB is not set
124# CONFIG_PROFILING is not set
125CONFIG_HAVE_OPROFILE=y
126# CONFIG_KPROBES is not set
127CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
128CONFIG_HAVE_IOREMAP_PROT=y
129CONFIG_HAVE_KPROBES=y
130CONFIG_HAVE_KRETPROBES=y
131CONFIG_HAVE_ARCH_TRACEHOOK=y
132CONFIG_USE_GENERIC_SMP_HELPERS=y
133# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
134CONFIG_SLABINFO=y
135CONFIG_RT_MUTEXES=y
136CONFIG_BASE_SMALL=0
137CONFIG_MODULES=y
138# CONFIG_MODULE_FORCE_LOAD is not set
139CONFIG_MODULE_UNLOAD=y
140# CONFIG_MODULE_FORCE_UNLOAD is not set
141# CONFIG_MODVERSIONS is not set
142# CONFIG_MODULE_SRCVERSION_ALL is not set
143CONFIG_STOP_MACHINE=y
144CONFIG_BLOCK=y
145# CONFIG_LBD is not set
146# CONFIG_BLK_DEV_IO_TRACE is not set
147# CONFIG_BLK_DEV_BSG is not set
148# CONFIG_BLK_DEV_INTEGRITY is not set
149
150#
151# IO Schedulers
152#
153CONFIG_IOSCHED_NOOP=y
154CONFIG_IOSCHED_AS=y
155CONFIG_IOSCHED_DEADLINE=y
156CONFIG_IOSCHED_CFQ=y
157# CONFIG_DEFAULT_AS is not set
158# CONFIG_DEFAULT_DEADLINE is not set
159CONFIG_DEFAULT_CFQ=y
160# CONFIG_DEFAULT_NOOP is not set
161CONFIG_DEFAULT_IOSCHED="cfq"
162# CONFIG_FREEZER is not set
163CONFIG_PPC_MSI_BITMAP=y
164
165#
166# Platform support
167#
168CONFIG_PPC_MULTIPLATFORM=y
169CONFIG_CLASSIC32=y
170# CONFIG_PPC_CHRP is not set
171# CONFIG_MPC5121_ADS is not set
172# CONFIG_MPC5121_GENERIC is not set
173# CONFIG_PPC_MPC52xx is not set
174# CONFIG_PPC_PMAC is not set
175# CONFIG_PPC_CELL is not set
176# CONFIG_PPC_CELL_NATIVE is not set
177# CONFIG_PPC_82xx is not set
178# CONFIG_PQ2ADS is not set
179# CONFIG_PPC_83xx is not set
180CONFIG_PPC_86xx=y
181# CONFIG_MPC8641_HPCN is not set
182# CONFIG_SBC8641D is not set
183# CONFIG_MPC8610_HPCD is not set
184CONFIG_GEF_SBC310=y
185# CONFIG_GEF_SBC610 is not set
186CONFIG_MPC8641=y
187# CONFIG_IPIC is not set
188CONFIG_MPIC=y
189# CONFIG_MPIC_WEIRD is not set
190# CONFIG_PPC_I8259 is not set
191# CONFIG_PPC_RTAS is not set
192# CONFIG_MMIO_NVRAM is not set
193# CONFIG_PPC_MPC106 is not set
194# CONFIG_PPC_970_NAP is not set
195# CONFIG_PPC_INDIRECT_IO is not set
196# CONFIG_GENERIC_IOMAP is not set
197# CONFIG_CPU_FREQ is not set
198# CONFIG_TAU is not set
199# CONFIG_QUICC_ENGINE is not set
200# CONFIG_FSL_ULI1575 is not set
201# CONFIG_MPC8xxx_GPIO is not set
202# CONFIG_SIMPLE_GPIO is not set
203
204#
205# Kernel options
206#
207# CONFIG_HIGHMEM is not set
208CONFIG_TICK_ONESHOT=y
209# CONFIG_NO_HZ is not set
210CONFIG_HIGH_RES_TIMERS=y
211CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
212# CONFIG_HZ_100 is not set
213# CONFIG_HZ_250 is not set
214# CONFIG_HZ_300 is not set
215CONFIG_HZ_1000=y
216CONFIG_HZ=1000
217CONFIG_SCHED_HRTICK=y
218# CONFIG_PREEMPT_NONE is not set
219# CONFIG_PREEMPT_VOLUNTARY is not set
220CONFIG_PREEMPT=y
221CONFIG_BINFMT_ELF=y
222# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
223# CONFIG_HAVE_AOUT is not set
224CONFIG_BINFMT_MISC=y
225# CONFIG_IOMMU_HELPER is not set
226CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
227CONFIG_ARCH_HAS_WALK_MEMORY=y
228CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
229# CONFIG_KEXEC is not set
230# CONFIG_CRASH_DUMP is not set
231CONFIG_IRQ_ALL_CPUS=y
232CONFIG_ARCH_FLATMEM_ENABLE=y
233CONFIG_ARCH_POPULATES_NODE_MAP=y
234CONFIG_SELECT_MEMORY_MODEL=y
235CONFIG_FLATMEM_MANUAL=y
236# CONFIG_DISCONTIGMEM_MANUAL is not set
237# CONFIG_SPARSEMEM_MANUAL is not set
238CONFIG_FLATMEM=y
239CONFIG_FLAT_NODE_MEM_MAP=y
240CONFIG_PAGEFLAGS_EXTENDED=y
241CONFIG_SPLIT_PTLOCK_CPUS=4
242CONFIG_MIGRATION=y
243# CONFIG_PHYS_ADDR_T_64BIT is not set
244CONFIG_ZONE_DMA_FLAG=1
245CONFIG_BOUNCE=y
246CONFIG_VIRT_TO_BUS=y
247CONFIG_UNEVICTABLE_LRU=y
248CONFIG_PPC_4K_PAGES=y
249# CONFIG_PPC_16K_PAGES is not set
250# CONFIG_PPC_64K_PAGES is not set
251CONFIG_FORCE_MAX_ZONEORDER=11
252# CONFIG_PROC_DEVICETREE is not set
253# CONFIG_CMDLINE_BOOL is not set
254CONFIG_EXTRA_TARGETS=""
255# CONFIG_PM is not set
256CONFIG_SECCOMP=y
257CONFIG_ISA_DMA_API=y
258
259#
260# Bus options
261#
262CONFIG_ZONE_DMA=y
263CONFIG_GENERIC_ISA_DMA=y
264CONFIG_PPC_INDIRECT_PCI=y
265CONFIG_FSL_SOC=y
266CONFIG_FSL_PCI=y
267CONFIG_PPC_PCI_CHOICE=y
268CONFIG_PCI=y
269CONFIG_PCI_DOMAINS=y
270CONFIG_PCI_SYSCALL=y
271CONFIG_PCIEPORTBUS=y
272CONFIG_PCIEAER=y
273# CONFIG_PCIEASPM is not set
274CONFIG_ARCH_SUPPORTS_MSI=y
275CONFIG_PCI_MSI=y
276# CONFIG_PCI_LEGACY is not set
277# CONFIG_PCI_STUB is not set
278# CONFIG_PCCARD is not set
279# CONFIG_HOTPLUG_PCI is not set
280# CONFIG_HAS_RAPIDIO is not set
281
282#
283# Advanced setup
284#
285# CONFIG_ADVANCED_OPTIONS is not set
286
287#
288# Default settings for advanced configuration options are used
289#
290CONFIG_LOWMEM_SIZE=0x30000000
291CONFIG_LOWMEM_CAM_NUM=3
292CONFIG_PAGE_OFFSET=0xc0000000
293CONFIG_KERNEL_START=0xc0000000
294CONFIG_PHYSICAL_START=0x00000000
295CONFIG_TASK_SIZE=0xc0000000
296CONFIG_NET=y
297
298#
299# Networking options
300#
301CONFIG_COMPAT_NET_DEV_OPS=y
302CONFIG_PACKET=y
303CONFIG_PACKET_MMAP=y
304CONFIG_UNIX=y
305CONFIG_XFRM=y
306CONFIG_XFRM_USER=m
307# CONFIG_XFRM_SUB_POLICY is not set
308# CONFIG_XFRM_MIGRATE is not set
309# CONFIG_XFRM_STATISTICS is not set
310CONFIG_XFRM_IPCOMP=m
311CONFIG_NET_KEY=m
312# CONFIG_NET_KEY_MIGRATE is not set
313CONFIG_INET=y
314CONFIG_IP_MULTICAST=y
315CONFIG_IP_ADVANCED_ROUTER=y
316CONFIG_ASK_IP_FIB_HASH=y
317# CONFIG_IP_FIB_TRIE is not set
318CONFIG_IP_FIB_HASH=y
319CONFIG_IP_MULTIPLE_TABLES=y
320CONFIG_IP_ROUTE_MULTIPATH=y
321CONFIG_IP_ROUTE_VERBOSE=y
322CONFIG_IP_PNP=y
323CONFIG_IP_PNP_DHCP=y
324CONFIG_IP_PNP_BOOTP=y
325CONFIG_IP_PNP_RARP=y
326CONFIG_NET_IPIP=m
327CONFIG_NET_IPGRE=m
328CONFIG_NET_IPGRE_BROADCAST=y
329CONFIG_IP_MROUTE=y
330CONFIG_IP_PIMSM_V1=y
331CONFIG_IP_PIMSM_V2=y
332# CONFIG_ARPD is not set
333CONFIG_SYN_COOKIES=y
334CONFIG_INET_AH=m
335CONFIG_INET_ESP=m
336CONFIG_INET_IPCOMP=m
337CONFIG_INET_XFRM_TUNNEL=m
338CONFIG_INET_TUNNEL=m
339CONFIG_INET_XFRM_MODE_TRANSPORT=y
340CONFIG_INET_XFRM_MODE_TUNNEL=y
341# CONFIG_INET_XFRM_MODE_BEET is not set
342CONFIG_INET_LRO=y
343CONFIG_INET_DIAG=y
344CONFIG_INET_TCP_DIAG=y
345# CONFIG_TCP_CONG_ADVANCED is not set
346CONFIG_TCP_CONG_CUBIC=y
347CONFIG_DEFAULT_TCP_CONG="cubic"
348# CONFIG_TCP_MD5SIG is not set
349CONFIG_IPV6=m
350# CONFIG_IPV6_PRIVACY is not set
351# CONFIG_IPV6_ROUTER_PREF is not set
352# CONFIG_IPV6_OPTIMISTIC_DAD is not set
353CONFIG_INET6_AH=m
354CONFIG_INET6_ESP=m
355CONFIG_INET6_IPCOMP=m
356# CONFIG_IPV6_MIP6 is not set
357CONFIG_INET6_XFRM_TUNNEL=m
358CONFIG_INET6_TUNNEL=m
359CONFIG_INET6_XFRM_MODE_TRANSPORT=m
360CONFIG_INET6_XFRM_MODE_TUNNEL=m
361CONFIG_INET6_XFRM_MODE_BEET=m
362# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
363CONFIG_IPV6_SIT=m
364CONFIG_IPV6_NDISC_NODETYPE=y
365CONFIG_IPV6_TUNNEL=m
366# CONFIG_IPV6_MULTIPLE_TABLES is not set
367# CONFIG_IPV6_MROUTE is not set
368# CONFIG_NETWORK_SECMARK is not set
369# CONFIG_NETFILTER is not set
370# CONFIG_IP_DCCP is not set
371# CONFIG_IP_SCTP is not set
372# CONFIG_TIPC is not set
373# CONFIG_ATM is not set
374# CONFIG_BRIDGE is not set
375# CONFIG_NET_DSA is not set
376# CONFIG_VLAN_8021Q is not set
377# CONFIG_DECNET is not set
378# CONFIG_LLC2 is not set
379# CONFIG_IPX is not set
380# CONFIG_ATALK is not set
381# CONFIG_X25 is not set
382# CONFIG_LAPB is not set
383# CONFIG_ECONET is not set
384# CONFIG_WAN_ROUTER is not set
385# CONFIG_NET_SCHED is not set
386# CONFIG_DCB is not set
387
388#
389# Network testing
390#
391CONFIG_NET_PKTGEN=m
392# CONFIG_HAMRADIO is not set
393# CONFIG_CAN is not set
394# CONFIG_IRDA is not set
395# CONFIG_BT is not set
396# CONFIG_AF_RXRPC is not set
397# CONFIG_PHONET is not set
398CONFIG_FIB_RULES=y
399# CONFIG_WIRELESS is not set
400# CONFIG_WIMAX is not set
401# CONFIG_RFKILL is not set
402# CONFIG_NET_9P is not set
403
404#
405# Device Drivers
406#
407
408#
409# Generic Driver Options
410#
411CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
412CONFIG_STANDALONE=y
413CONFIG_PREVENT_FIRMWARE_BUILD=y
414# CONFIG_FW_LOADER is not set
415# CONFIG_SYS_HYPERVISOR is not set
416# CONFIG_CONNECTOR is not set
417CONFIG_MTD=y
418# CONFIG_MTD_DEBUG is not set
419CONFIG_MTD_CONCAT=y
420CONFIG_MTD_PARTITIONS=y
421# CONFIG_MTD_TESTS is not set
422# CONFIG_MTD_REDBOOT_PARTS is not set
423# CONFIG_MTD_CMDLINE_PARTS is not set
424CONFIG_MTD_OF_PARTS=y
425# CONFIG_MTD_AR7_PARTS is not set
426
427#
428# User Modules And Translation Layers
429#
430CONFIG_MTD_CHAR=y
431CONFIG_MTD_BLKDEVS=y
432CONFIG_MTD_BLOCK=y
433# CONFIG_FTL is not set
434# CONFIG_NFTL is not set
435# CONFIG_INFTL is not set
436# CONFIG_RFD_FTL is not set
437# CONFIG_SSFDC is not set
438# CONFIG_MTD_OOPS is not set
439
440#
441# RAM/ROM/Flash chip drivers
442#
443CONFIG_MTD_CFI=y
444CONFIG_MTD_JEDECPROBE=y
445CONFIG_MTD_GEN_PROBE=y
446# CONFIG_MTD_CFI_ADV_OPTIONS is not set
447CONFIG_MTD_MAP_BANK_WIDTH_1=y
448CONFIG_MTD_MAP_BANK_WIDTH_2=y
449CONFIG_MTD_MAP_BANK_WIDTH_4=y
450# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
451# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
452# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
453CONFIG_MTD_CFI_I1=y
454CONFIG_MTD_CFI_I2=y
455# CONFIG_MTD_CFI_I4 is not set
456# CONFIG_MTD_CFI_I8 is not set
457CONFIG_MTD_CFI_INTELEXT=y
458CONFIG_MTD_CFI_AMDSTD=y
459# CONFIG_MTD_CFI_STAA is not set
460CONFIG_MTD_CFI_UTIL=y
461# CONFIG_MTD_RAM is not set
462# CONFIG_MTD_ROM is not set
463# CONFIG_MTD_ABSENT is not set
464
465#
466# Mapping drivers for chip access
467#
468# CONFIG_MTD_COMPLEX_MAPPINGS is not set
469# CONFIG_MTD_PHYSMAP is not set
470CONFIG_MTD_PHYSMAP_OF=y
471# CONFIG_MTD_INTEL_VR_NOR is not set
472# CONFIG_MTD_PLATRAM is not set
473
474#
475# Self-contained MTD device drivers
476#
477# CONFIG_MTD_PMC551 is not set
478# CONFIG_MTD_SLRAM is not set
479# CONFIG_MTD_PHRAM is not set
480# CONFIG_MTD_MTDRAM is not set
481# CONFIG_MTD_BLOCK2MTD is not set
482
483#
484# Disk-On-Chip Device Drivers
485#
486# CONFIG_MTD_DOC2000 is not set
487# CONFIG_MTD_DOC2001 is not set
488# CONFIG_MTD_DOC2001PLUS is not set
489# CONFIG_MTD_NAND is not set
490# CONFIG_MTD_ONENAND is not set
491
492#
493# LPDDR flash memory drivers
494#
495# CONFIG_MTD_LPDDR is not set
496# CONFIG_MTD_QINFO_PROBE is not set
497
498#
499# UBI - Unsorted block images
500#
501# CONFIG_MTD_UBI is not set
502CONFIG_OF_DEVICE=y
503CONFIG_OF_GPIO=y
504CONFIG_OF_I2C=y
505# CONFIG_PARPORT is not set
506CONFIG_BLK_DEV=y
507# CONFIG_BLK_DEV_FD is not set
508# CONFIG_BLK_CPQ_DA is not set
509# CONFIG_BLK_CPQ_CISS_DA is not set
510# CONFIG_BLK_DEV_DAC960 is not set
511# CONFIG_BLK_DEV_UMEM is not set
512# CONFIG_BLK_DEV_COW_COMMON is not set
513CONFIG_BLK_DEV_LOOP=m
514CONFIG_BLK_DEV_CRYPTOLOOP=m
515CONFIG_BLK_DEV_NBD=m
516# CONFIG_BLK_DEV_SX8 is not set
517# CONFIG_BLK_DEV_UB is not set
518CONFIG_BLK_DEV_RAM=y
519CONFIG_BLK_DEV_RAM_COUNT=16
520CONFIG_BLK_DEV_RAM_SIZE=131072
521# CONFIG_BLK_DEV_XIP is not set
522# CONFIG_CDROM_PKTCDVD is not set
523# CONFIG_ATA_OVER_ETH is not set
524# CONFIG_BLK_DEV_HD is not set
525CONFIG_MISC_DEVICES=y
526# CONFIG_PHANTOM is not set
527# CONFIG_SGI_IOC4 is not set
528# CONFIG_TIFM_CORE is not set
529# CONFIG_ICS932S401 is not set
530# CONFIG_ENCLOSURE_SERVICES is not set
531# CONFIG_HP_ILO is not set
532# CONFIG_C2PORT is not set
533
534#
535# EEPROM support
536#
537# CONFIG_EEPROM_AT24 is not set
538# CONFIG_EEPROM_LEGACY is not set
539# CONFIG_EEPROM_93CX6 is not set
540CONFIG_HAVE_IDE=y
541# CONFIG_IDE is not set
542
543#
544# SCSI device support
545#
546# CONFIG_RAID_ATTRS is not set
547CONFIG_SCSI=y
548CONFIG_SCSI_DMA=y
549# CONFIG_SCSI_TGT is not set
550# CONFIG_SCSI_NETLINK is not set
551CONFIG_SCSI_PROC_FS=y
552
553#
554# SCSI support type (disk, tape, CD-ROM)
555#
556CONFIG_BLK_DEV_SD=y
557CONFIG_CHR_DEV_ST=y
558# CONFIG_CHR_DEV_OSST is not set
559CONFIG_BLK_DEV_SR=y
560# CONFIG_BLK_DEV_SR_VENDOR is not set
561# CONFIG_CHR_DEV_SG is not set
562# CONFIG_CHR_DEV_SCH is not set
563
564#
565# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
566#
567# CONFIG_SCSI_MULTI_LUN is not set
568# CONFIG_SCSI_CONSTANTS is not set
569# CONFIG_SCSI_LOGGING is not set
570# CONFIG_SCSI_SCAN_ASYNC is not set
571CONFIG_SCSI_WAIT_SCAN=m
572
573#
574# SCSI Transports
575#
576# CONFIG_SCSI_SPI_ATTRS is not set
577# CONFIG_SCSI_FC_ATTRS is not set
578# CONFIG_SCSI_ISCSI_ATTRS is not set
579# CONFIG_SCSI_SAS_LIBSAS is not set
580# CONFIG_SCSI_SRP_ATTRS is not set
581CONFIG_SCSI_LOWLEVEL=y
582# CONFIG_ISCSI_TCP is not set
583# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
584# CONFIG_SCSI_3W_9XXX is not set
585# CONFIG_SCSI_ACARD is not set
586# CONFIG_SCSI_AACRAID is not set
587# CONFIG_SCSI_AIC7XXX is not set
588# CONFIG_SCSI_AIC7XXX_OLD is not set
589# CONFIG_SCSI_AIC79XX is not set
590# CONFIG_SCSI_AIC94XX is not set
591# CONFIG_SCSI_DPT_I2O is not set
592# CONFIG_SCSI_ADVANSYS is not set
593# CONFIG_SCSI_ARCMSR is not set
594# CONFIG_MEGARAID_NEWGEN is not set
595# CONFIG_MEGARAID_LEGACY is not set
596# CONFIG_MEGARAID_SAS is not set
597# CONFIG_SCSI_HPTIOP is not set
598# CONFIG_SCSI_BUSLOGIC is not set
599# CONFIG_LIBFC is not set
600# CONFIG_FCOE is not set
601# CONFIG_SCSI_DMX3191D is not set
602# CONFIG_SCSI_EATA is not set
603# CONFIG_SCSI_FUTURE_DOMAIN is not set
604# CONFIG_SCSI_GDTH is not set
605# CONFIG_SCSI_IPS is not set
606# CONFIG_SCSI_INITIO is not set
607# CONFIG_SCSI_INIA100 is not set
608# CONFIG_SCSI_MVSAS is not set
609# CONFIG_SCSI_STEX is not set
610# CONFIG_SCSI_SYM53C8XX_2 is not set
611# CONFIG_SCSI_IPR is not set
612# CONFIG_SCSI_QLOGIC_1280 is not set
613# CONFIG_SCSI_QLA_FC is not set
614# CONFIG_SCSI_QLA_ISCSI is not set
615# CONFIG_SCSI_LPFC is not set
616# CONFIG_SCSI_DC395x is not set
617# CONFIG_SCSI_DC390T is not set
618# CONFIG_SCSI_NSP32 is not set
619# CONFIG_SCSI_DEBUG is not set
620# CONFIG_SCSI_SRP is not set
621# CONFIG_SCSI_DH is not set
622CONFIG_ATA=y
623# CONFIG_ATA_NONSTANDARD is not set
624CONFIG_SATA_PMP=y
625# CONFIG_SATA_AHCI is not set
626CONFIG_SATA_SIL24=y
627# CONFIG_SATA_FSL is not set
628# CONFIG_ATA_SFF is not set
629# CONFIG_MD is not set
630# CONFIG_FUSION is not set
631
632#
633# IEEE 1394 (FireWire) support
634#
635
636#
637# Enable only one of the two stacks, unless you know what you are doing
638#
639# CONFIG_FIREWIRE is not set
640# CONFIG_IEEE1394 is not set
641# CONFIG_I2O is not set
642# CONFIG_MACINTOSH_DRIVERS is not set
643CONFIG_NETDEVICES=y
644CONFIG_DUMMY=m
645CONFIG_BONDING=m
646# CONFIG_MACVLAN is not set
647# CONFIG_EQUALIZER is not set
648CONFIG_TUN=m
649# CONFIG_VETH is not set
650# CONFIG_ARCNET is not set
651CONFIG_PHYLIB=y
652
653#
654# MII PHY device drivers
655#
656# CONFIG_MARVELL_PHY is not set
657# CONFIG_DAVICOM_PHY is not set
658# CONFIG_QSEMI_PHY is not set
659# CONFIG_LXT_PHY is not set
660# CONFIG_CICADA_PHY is not set
661# CONFIG_VITESSE_PHY is not set
662# CONFIG_SMSC_PHY is not set
663# CONFIG_BROADCOM_PHY is not set
664# CONFIG_ICPLUS_PHY is not set
665# CONFIG_REALTEK_PHY is not set
666# CONFIG_NATIONAL_PHY is not set
667# CONFIG_STE10XP is not set
668# CONFIG_LSI_ET1011C_PHY is not set
669# CONFIG_FIXED_PHY is not set
670# CONFIG_MDIO_BITBANG is not set
671CONFIG_NET_ETHERNET=y
672CONFIG_MII=y
673# CONFIG_HAPPYMEAL is not set
674# CONFIG_SUNGEM is not set
675# CONFIG_CASSINI is not set
676# CONFIG_NET_VENDOR_3COM is not set
677# CONFIG_NET_TULIP is not set
678# CONFIG_HP100 is not set
679# CONFIG_IBM_NEW_EMAC_ZMII is not set
680# CONFIG_IBM_NEW_EMAC_RGMII is not set
681# CONFIG_IBM_NEW_EMAC_TAH is not set
682# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
683# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
684# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
685# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
686# CONFIG_NET_PCI is not set
687# CONFIG_B44 is not set
688# CONFIG_ATL2 is not set
689CONFIG_NETDEV_1000=y
690# CONFIG_ACENIC is not set
691# CONFIG_DL2K is not set
692# CONFIG_E1000 is not set
693# CONFIG_E1000E is not set
694# CONFIG_IP1000 is not set
695# CONFIG_IGB is not set
696# CONFIG_NS83820 is not set
697# CONFIG_HAMACHI is not set
698# CONFIG_YELLOWFIN is not set
699# CONFIG_R8169 is not set
700# CONFIG_SIS190 is not set
701# CONFIG_SKGE is not set
702# CONFIG_SKY2 is not set
703# CONFIG_VIA_VELOCITY is not set
704# CONFIG_TIGON3 is not set
705# CONFIG_BNX2 is not set
706CONFIG_GIANFAR=y
707# CONFIG_MV643XX_ETH is not set
708# CONFIG_QLA3XXX is not set
709# CONFIG_ATL1 is not set
710# CONFIG_ATL1E is not set
711# CONFIG_JME is not set
712# CONFIG_NETDEV_10000 is not set
713# CONFIG_TR is not set
714
715#
716# Wireless LAN
717#
718# CONFIG_WLAN_PRE80211 is not set
719# CONFIG_WLAN_80211 is not set
720# CONFIG_IWLWIFI_LEDS is not set
721
722#
723# Enable WiMAX (Networking options) to see the WiMAX drivers
724#
725
726#
727# USB Network Adapters
728#
729# CONFIG_USB_CATC is not set
730# CONFIG_USB_KAWETH is not set
731# CONFIG_USB_PEGASUS is not set
732# CONFIG_USB_RTL8150 is not set
733# CONFIG_USB_USBNET is not set
734# CONFIG_WAN is not set
735# CONFIG_FDDI is not set
736# CONFIG_HIPPI is not set
737CONFIG_PPP=m
738CONFIG_PPP_MULTILINK=y
739CONFIG_PPP_FILTER=y
740CONFIG_PPP_ASYNC=m
741CONFIG_PPP_SYNC_TTY=m
742CONFIG_PPP_DEFLATE=m
743CONFIG_PPP_BSDCOMP=m
744# CONFIG_PPP_MPPE is not set
745CONFIG_PPPOE=m
746# CONFIG_PPPOL2TP is not set
747CONFIG_SLIP=m
748CONFIG_SLIP_COMPRESSED=y
749CONFIG_SLHC=m
750CONFIG_SLIP_SMART=y
751CONFIG_SLIP_MODE_SLIP6=y
752# CONFIG_NET_FC is not set
753CONFIG_NETCONSOLE=y
754# CONFIG_NETCONSOLE_DYNAMIC is not set
755CONFIG_NETPOLL=y
756CONFIG_NETPOLL_TRAP=y
757CONFIG_NET_POLL_CONTROLLER=y
758# CONFIG_ISDN is not set
759# CONFIG_PHONE is not set
760
761#
762# Input device support
763#
764CONFIG_INPUT=y
765# CONFIG_INPUT_FF_MEMLESS is not set
766# CONFIG_INPUT_POLLDEV is not set
767
768#
769# Userland interfaces
770#
771CONFIG_INPUT_MOUSEDEV=y
772CONFIG_INPUT_MOUSEDEV_PSAUX=y
773CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
774CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
775# CONFIG_INPUT_JOYDEV is not set
776# CONFIG_INPUT_EVDEV is not set
777# CONFIG_INPUT_EVBUG is not set
778
779#
780# Input Device Drivers
781#
782# CONFIG_INPUT_KEYBOARD is not set
783# CONFIG_INPUT_MOUSE is not set
784# CONFIG_INPUT_JOYSTICK is not set
785# CONFIG_INPUT_TABLET is not set
786# CONFIG_INPUT_TOUCHSCREEN is not set
787# CONFIG_INPUT_MISC is not set
788
789#
790# Hardware I/O ports
791#
792# CONFIG_SERIO is not set
793# CONFIG_GAMEPORT is not set
794
795#
796# Character devices
797#
798CONFIG_VT=y
799CONFIG_CONSOLE_TRANSLATIONS=y
800CONFIG_VT_CONSOLE=y
801CONFIG_HW_CONSOLE=y
802# CONFIG_VT_HW_CONSOLE_BINDING is not set
803CONFIG_DEVKMEM=y
804# CONFIG_SERIAL_NONSTANDARD is not set
805# CONFIG_NOZOMI is not set
806
807#
808# Serial drivers
809#
810CONFIG_SERIAL_8250=y
811CONFIG_SERIAL_8250_CONSOLE=y
812# CONFIG_SERIAL_8250_PCI is not set
813CONFIG_SERIAL_8250_NR_UARTS=2
814CONFIG_SERIAL_8250_RUNTIME_UARTS=2
815# CONFIG_SERIAL_8250_EXTENDED is not set
816
817#
818# Non-8250 serial port support
819#
820# CONFIG_SERIAL_UARTLITE is not set
821CONFIG_SERIAL_CORE=y
822CONFIG_SERIAL_CORE_CONSOLE=y
823# CONFIG_SERIAL_JSM is not set
824# CONFIG_SERIAL_OF_PLATFORM is not set
825CONFIG_UNIX98_PTYS=y
826# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
827# CONFIG_LEGACY_PTYS is not set
828# CONFIG_HVC_UDBG is not set
829# CONFIG_IPMI_HANDLER is not set
830CONFIG_HW_RANDOM=y
831CONFIG_NVRAM=y
832# CONFIG_R3964 is not set
833# CONFIG_APPLICOM is not set
834# CONFIG_RAW_DRIVER is not set
835# CONFIG_TCG_TPM is not set
836CONFIG_DEVPORT=y
837CONFIG_I2C=y
838CONFIG_I2C_BOARDINFO=y
839CONFIG_I2C_CHARDEV=y
840CONFIG_I2C_HELPER_AUTO=y
841
842#
843# I2C Hardware Bus support
844#
845
846#
847# PC SMBus host controller drivers
848#
849# CONFIG_I2C_ALI1535 is not set
850# CONFIG_I2C_ALI1563 is not set
851# CONFIG_I2C_ALI15X3 is not set
852# CONFIG_I2C_AMD756 is not set
853# CONFIG_I2C_AMD8111 is not set
854# CONFIG_I2C_I801 is not set
855# CONFIG_I2C_ISCH is not set
856# CONFIG_I2C_PIIX4 is not set
857# CONFIG_I2C_NFORCE2 is not set
858# CONFIG_I2C_SIS5595 is not set
859# CONFIG_I2C_SIS630 is not set
860# CONFIG_I2C_SIS96X is not set
861# CONFIG_I2C_VIA is not set
862# CONFIG_I2C_VIAPRO is not set
863
864#
865# I2C system bus drivers (mostly embedded / system-on-chip)
866#
867# CONFIG_I2C_GPIO is not set
868CONFIG_I2C_MPC=y
869# CONFIG_I2C_OCORES is not set
870# CONFIG_I2C_SIMTEC is not set
871
872#
873# External I2C/SMBus adapter drivers
874#
875# CONFIG_I2C_PARPORT_LIGHT is not set
876# CONFIG_I2C_TAOS_EVM is not set
877# CONFIG_I2C_TINY_USB is not set
878
879#
880# Graphics adapter I2C/DDC channel drivers
881#
882# CONFIG_I2C_VOODOO3 is not set
883
884#
885# Other I2C/SMBus bus drivers
886#
887# CONFIG_I2C_PCA_PLATFORM is not set
888# CONFIG_I2C_STUB is not set
889
890#
891# Miscellaneous I2C Chip support
892#
893CONFIG_DS1682=y
894# CONFIG_SENSORS_PCF8574 is not set
895# CONFIG_PCF8575 is not set
896# CONFIG_SENSORS_PCA9539 is not set
897# CONFIG_SENSORS_PCF8591 is not set
898# CONFIG_SENSORS_MAX6875 is not set
899# CONFIG_SENSORS_TSL2550 is not set
900# CONFIG_I2C_DEBUG_CORE is not set
901# CONFIG_I2C_DEBUG_ALGO is not set
902# CONFIG_I2C_DEBUG_BUS is not set
903# CONFIG_I2C_DEBUG_CHIP is not set
904# CONFIG_SPI is not set
905CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
906CONFIG_ARCH_REQUIRE_GPIOLIB=y
907CONFIG_GPIOLIB=y
908CONFIG_GPIO_SYSFS=y
909
910#
911# Memory mapped GPIO expanders:
912#
913# CONFIG_GPIO_XILINX is not set
914
915#
916# I2C GPIO expanders:
917#
918# CONFIG_GPIO_MAX732X is not set
919# CONFIG_GPIO_PCA953X is not set
920# CONFIG_GPIO_PCF857X is not set
921
922#
923# PCI GPIO expanders:
924#
925# CONFIG_GPIO_BT8XX is not set
926
927#
928# SPI GPIO expanders:
929#
930# CONFIG_W1 is not set
931# CONFIG_POWER_SUPPLY is not set
932CONFIG_HWMON=y
933# CONFIG_HWMON_VID is not set
934# CONFIG_SENSORS_AD7414 is not set
935# CONFIG_SENSORS_AD7418 is not set
936# CONFIG_SENSORS_ADM1021 is not set
937# CONFIG_SENSORS_ADM1025 is not set
938# CONFIG_SENSORS_ADM1026 is not set
939# CONFIG_SENSORS_ADM1029 is not set
940# CONFIG_SENSORS_ADM1031 is not set
941# CONFIG_SENSORS_ADM9240 is not set
942# CONFIG_SENSORS_ADT7462 is not set
943# CONFIG_SENSORS_ADT7470 is not set
944# CONFIG_SENSORS_ADT7473 is not set
945# CONFIG_SENSORS_ADT7475 is not set
946# CONFIG_SENSORS_ATXP1 is not set
947# CONFIG_SENSORS_DS1621 is not set
948# CONFIG_SENSORS_I5K_AMB is not set
949# CONFIG_SENSORS_F71805F is not set
950# CONFIG_SENSORS_F71882FG is not set
951# CONFIG_SENSORS_F75375S is not set
952# CONFIG_SENSORS_GL518SM is not set
953# CONFIG_SENSORS_GL520SM is not set
954# CONFIG_SENSORS_IT87 is not set
955# CONFIG_SENSORS_LM63 is not set
956# CONFIG_SENSORS_LM75 is not set
957# CONFIG_SENSORS_LM77 is not set
958# CONFIG_SENSORS_LM78 is not set
959# CONFIG_SENSORS_LM80 is not set
960# CONFIG_SENSORS_LM83 is not set
961# CONFIG_SENSORS_LM85 is not set
962# CONFIG_SENSORS_LM87 is not set
963CONFIG_SENSORS_LM90=y
964CONFIG_SENSORS_LM92=y
965# CONFIG_SENSORS_LM93 is not set
966# CONFIG_SENSORS_LTC4245 is not set
967# CONFIG_SENSORS_MAX1619 is not set
968# CONFIG_SENSORS_MAX6650 is not set
969# CONFIG_SENSORS_PC87360 is not set
970# CONFIG_SENSORS_PC87427 is not set
971# CONFIG_SENSORS_SIS5595 is not set
972# CONFIG_SENSORS_DME1737 is not set
973# CONFIG_SENSORS_SMSC47M1 is not set
974# CONFIG_SENSORS_SMSC47M192 is not set
975# CONFIG_SENSORS_SMSC47B397 is not set
976# CONFIG_SENSORS_ADS7828 is not set
977# CONFIG_SENSORS_THMC50 is not set
978# CONFIG_SENSORS_VIA686A is not set
979# CONFIG_SENSORS_VT1211 is not set
980# CONFIG_SENSORS_VT8231 is not set
981# CONFIG_SENSORS_W83781D is not set
982# CONFIG_SENSORS_W83791D is not set
983# CONFIG_SENSORS_W83792D is not set
984# CONFIG_SENSORS_W83793 is not set
985# CONFIG_SENSORS_W83L785TS is not set
986# CONFIG_SENSORS_W83L786NG is not set
987# CONFIG_SENSORS_W83627HF is not set
988# CONFIG_SENSORS_W83627EHF is not set
989# CONFIG_HWMON_DEBUG_CHIP is not set
990# CONFIG_THERMAL is not set
991# CONFIG_THERMAL_HWMON is not set
992CONFIG_WATCHDOG=y
993# CONFIG_WATCHDOG_NOWAYOUT is not set
994
995#
996# Watchdog Device Drivers
997#
998# CONFIG_SOFT_WATCHDOG is not set
999# CONFIG_ALIM7101_WDT is not set
1000CONFIG_GEF_WDT=y
1001# CONFIG_8xxx_WDT is not set
1002
1003#
1004# PCI-based Watchdog Cards
1005#
1006# CONFIG_PCIPCWATCHDOG is not set
1007# CONFIG_WDTPCI is not set
1008
1009#
1010# USB-based Watchdog Cards
1011#
1012# CONFIG_USBPCWATCHDOG is not set
1013CONFIG_SSB_POSSIBLE=y
1014
1015#
1016# Sonics Silicon Backplane
1017#
1018# CONFIG_SSB is not set
1019
1020#
1021# Multifunction device drivers
1022#
1023# CONFIG_MFD_CORE is not set
1024# CONFIG_MFD_SM501 is not set
1025# CONFIG_HTC_PASIC3 is not set
1026# CONFIG_TPS65010 is not set
1027# CONFIG_TWL4030_CORE is not set
1028# CONFIG_MFD_TMIO is not set
1029# CONFIG_PMIC_DA903X is not set
1030# CONFIG_MFD_WM8400 is not set
1031# CONFIG_MFD_WM8350_I2C is not set
1032# CONFIG_MFD_PCF50633 is not set
1033# CONFIG_REGULATOR is not set
1034
1035#
1036# Multimedia devices
1037#
1038
1039#
1040# Multimedia core support
1041#
1042# CONFIG_VIDEO_DEV is not set
1043# CONFIG_DVB_CORE is not set
1044# CONFIG_VIDEO_MEDIA is not set
1045
1046#
1047# Multimedia drivers
1048#
1049CONFIG_DAB=y
1050# CONFIG_USB_DABUSB is not set
1051
1052#
1053# Graphics support
1054#
1055# CONFIG_AGP is not set
1056# CONFIG_DRM is not set
1057# CONFIG_VGASTATE is not set
1058CONFIG_VIDEO_OUTPUT_CONTROL=m
1059# CONFIG_FB is not set
1060# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1061
1062#
1063# Display device support
1064#
1065# CONFIG_DISPLAY_SUPPORT is not set
1066
1067#
1068# Console display driver support
1069#
1070CONFIG_VGA_CONSOLE=y
1071# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1072CONFIG_DUMMY_CONSOLE=y
1073# CONFIG_SOUND is not set
1074CONFIG_HID_SUPPORT=y
1075CONFIG_HID=y
1076# CONFIG_HID_DEBUG is not set
1077# CONFIG_HIDRAW is not set
1078
1079#
1080# USB Input Devices
1081#
1082CONFIG_USB_HID=y
1083# CONFIG_HID_PID is not set
1084# CONFIG_USB_HIDDEV is not set
1085
1086#
1087# Special HID drivers
1088#
1089CONFIG_HID_COMPAT=y
1090CONFIG_HID_A4TECH=y
1091CONFIG_HID_APPLE=y
1092CONFIG_HID_BELKIN=y
1093CONFIG_HID_CHERRY=y
1094CONFIG_HID_CHICONY=y
1095CONFIG_HID_CYPRESS=y
1096CONFIG_HID_EZKEY=y
1097CONFIG_HID_GYRATION=y
1098CONFIG_HID_LOGITECH=y
1099# CONFIG_LOGITECH_FF is not set
1100# CONFIG_LOGIRUMBLEPAD2_FF is not set
1101CONFIG_HID_MICROSOFT=y
1102CONFIG_HID_MONTEREY=y
1103# CONFIG_HID_NTRIG is not set
1104CONFIG_HID_PANTHERLORD=y
1105# CONFIG_PANTHERLORD_FF is not set
1106CONFIG_HID_PETALYNX=y
1107CONFIG_HID_SAMSUNG=y
1108CONFIG_HID_SONY=y
1109CONFIG_HID_SUNPLUS=y
1110# CONFIG_GREENASIA_FF is not set
1111# CONFIG_HID_TOPSEED is not set
1112# CONFIG_THRUSTMASTER_FF is not set
1113# CONFIG_ZEROPLUS_FF is not set
1114CONFIG_USB_SUPPORT=y
1115CONFIG_USB_ARCH_HAS_HCD=y
1116CONFIG_USB_ARCH_HAS_OHCI=y
1117CONFIG_USB_ARCH_HAS_EHCI=y
1118CONFIG_USB=y
1119# CONFIG_USB_DEBUG is not set
1120# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1121
1122#
1123# Miscellaneous USB options
1124#
1125# CONFIG_USB_DEVICEFS is not set
1126# CONFIG_USB_DEVICE_CLASS is not set
1127# CONFIG_USB_DYNAMIC_MINORS is not set
1128# CONFIG_USB_OTG is not set
1129# CONFIG_USB_OTG_WHITELIST is not set
1130# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1131# CONFIG_USB_MON is not set
1132# CONFIG_USB_WUSB is not set
1133# CONFIG_USB_WUSB_CBAF is not set
1134
1135#
1136# USB Host Controller Drivers
1137#
1138# CONFIG_USB_C67X00_HCD is not set
1139CONFIG_USB_EHCI_HCD=y
1140# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1141# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1142# CONFIG_USB_EHCI_FSL is not set
1143# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1144# CONFIG_USB_OXU210HP_HCD is not set
1145# CONFIG_USB_ISP116X_HCD is not set
1146# CONFIG_USB_ISP1760_HCD is not set
1147CONFIG_USB_OHCI_HCD=y
1148# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1149# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1150# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1151CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1152# CONFIG_USB_UHCI_HCD is not set
1153# CONFIG_USB_SL811_HCD is not set
1154# CONFIG_USB_R8A66597_HCD is not set
1155# CONFIG_USB_WHCI_HCD is not set
1156# CONFIG_USB_HWA_HCD is not set
1157
1158#
1159# USB Device Class drivers
1160#
1161# CONFIG_USB_ACM is not set
1162# CONFIG_USB_PRINTER is not set
1163# CONFIG_USB_WDM is not set
1164# CONFIG_USB_TMC is not set
1165
1166#
1167# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1168#
1169
1170#
1171# see USB_STORAGE Help for more information
1172#
1173CONFIG_USB_STORAGE=y
1174# CONFIG_USB_STORAGE_DEBUG is not set
1175# CONFIG_USB_STORAGE_DATAFAB is not set
1176# CONFIG_USB_STORAGE_FREECOM is not set
1177# CONFIG_USB_STORAGE_ISD200 is not set
1178# CONFIG_USB_STORAGE_USBAT is not set
1179# CONFIG_USB_STORAGE_SDDR09 is not set
1180# CONFIG_USB_STORAGE_SDDR55 is not set
1181# CONFIG_USB_STORAGE_JUMPSHOT is not set
1182# CONFIG_USB_STORAGE_ALAUDA is not set
1183# CONFIG_USB_STORAGE_ONETOUCH is not set
1184# CONFIG_USB_STORAGE_KARMA is not set
1185# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1186# CONFIG_USB_LIBUSUAL is not set
1187
1188#
1189# USB Imaging devices
1190#
1191# CONFIG_USB_MDC800 is not set
1192# CONFIG_USB_MICROTEK is not set
1193
1194#
1195# USB port drivers
1196#
1197# CONFIG_USB_SERIAL is not set
1198
1199#
1200# USB Miscellaneous drivers
1201#
1202# CONFIG_USB_EMI62 is not set
1203# CONFIG_USB_EMI26 is not set
1204# CONFIG_USB_ADUTUX is not set
1205# CONFIG_USB_SEVSEG is not set
1206# CONFIG_USB_RIO500 is not set
1207# CONFIG_USB_LEGOTOWER is not set
1208# CONFIG_USB_LCD is not set
1209# CONFIG_USB_BERRY_CHARGE is not set
1210# CONFIG_USB_LED is not set
1211# CONFIG_USB_CYPRESS_CY7C63 is not set
1212# CONFIG_USB_CYTHERM is not set
1213# CONFIG_USB_PHIDGET is not set
1214# CONFIG_USB_IDMOUSE is not set
1215# CONFIG_USB_FTDI_ELAN is not set
1216# CONFIG_USB_APPLEDISPLAY is not set
1217# CONFIG_USB_SISUSBVGA is not set
1218# CONFIG_USB_LD is not set
1219# CONFIG_USB_TRANCEVIBRATOR is not set
1220# CONFIG_USB_IOWARRIOR is not set
1221# CONFIG_USB_ISIGHTFW is not set
1222# CONFIG_USB_VST is not set
1223# CONFIG_USB_GADGET is not set
1224
1225#
1226# OTG and related infrastructure
1227#
1228# CONFIG_USB_GPIO_VBUS is not set
1229# CONFIG_UWB is not set
1230# CONFIG_MMC is not set
1231# CONFIG_MEMSTICK is not set
1232# CONFIG_NEW_LEDS is not set
1233# CONFIG_ACCESSIBILITY is not set
1234# CONFIG_INFINIBAND is not set
1235# CONFIG_EDAC is not set
1236CONFIG_RTC_LIB=y
1237CONFIG_RTC_CLASS=y
1238CONFIG_RTC_HCTOSYS=y
1239CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1240# CONFIG_RTC_DEBUG is not set
1241
1242#
1243# RTC interfaces
1244#
1245CONFIG_RTC_INTF_SYSFS=y
1246# CONFIG_RTC_INTF_PROC is not set
1247CONFIG_RTC_INTF_DEV=y
1248# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1249# CONFIG_RTC_DRV_TEST is not set
1250
1251#
1252# I2C RTC drivers
1253#
1254# CONFIG_RTC_DRV_DS1307 is not set
1255# CONFIG_RTC_DRV_DS1374 is not set
1256# CONFIG_RTC_DRV_DS1672 is not set
1257# CONFIG_RTC_DRV_MAX6900 is not set
1258# CONFIG_RTC_DRV_RS5C372 is not set
1259# CONFIG_RTC_DRV_ISL1208 is not set
1260# CONFIG_RTC_DRV_X1205 is not set
1261# CONFIG_RTC_DRV_PCF8563 is not set
1262# CONFIG_RTC_DRV_PCF8583 is not set
1263# CONFIG_RTC_DRV_M41T80 is not set
1264# CONFIG_RTC_DRV_S35390A is not set
1265# CONFIG_RTC_DRV_FM3130 is not set
1266CONFIG_RTC_DRV_RX8581=y
1267
1268#
1269# SPI RTC drivers
1270#
1271
1272#
1273# Platform RTC drivers
1274#
1275# CONFIG_RTC_DRV_CMOS is not set
1276# CONFIG_RTC_DRV_DS1286 is not set
1277# CONFIG_RTC_DRV_DS1511 is not set
1278# CONFIG_RTC_DRV_DS1553 is not set
1279# CONFIG_RTC_DRV_DS1742 is not set
1280# CONFIG_RTC_DRV_STK17TA8 is not set
1281# CONFIG_RTC_DRV_M48T86 is not set
1282# CONFIG_RTC_DRV_M48T35 is not set
1283# CONFIG_RTC_DRV_M48T59 is not set
1284# CONFIG_RTC_DRV_BQ4802 is not set
1285# CONFIG_RTC_DRV_V3020 is not set
1286
1287#
1288# on-CPU RTC drivers
1289#
1290# CONFIG_RTC_DRV_PPC is not set
1291# CONFIG_DMADEVICES is not set
1292# CONFIG_UIO is not set
1293# CONFIG_STAGING is not set
1294
1295#
1296# File systems
1297#
1298CONFIG_EXT2_FS=y
1299CONFIG_EXT2_FS_XATTR=y
1300CONFIG_EXT2_FS_POSIX_ACL=y
1301# CONFIG_EXT2_FS_SECURITY is not set
1302# CONFIG_EXT2_FS_XIP is not set
1303CONFIG_EXT3_FS=y
1304CONFIG_EXT3_FS_XATTR=y
1305CONFIG_EXT3_FS_POSIX_ACL=y
1306# CONFIG_EXT3_FS_SECURITY is not set
1307# CONFIG_EXT4_FS is not set
1308CONFIG_JBD=y
1309CONFIG_FS_MBCACHE=y
1310# CONFIG_REISERFS_FS is not set
1311# CONFIG_JFS_FS is not set
1312CONFIG_FS_POSIX_ACL=y
1313CONFIG_FILE_LOCKING=y
1314# CONFIG_XFS_FS is not set
1315# CONFIG_OCFS2_FS is not set
1316# CONFIG_BTRFS_FS is not set
1317CONFIG_DNOTIFY=y
1318CONFIG_INOTIFY=y
1319CONFIG_INOTIFY_USER=y
1320# CONFIG_QUOTA is not set
1321# CONFIG_AUTOFS_FS is not set
1322# CONFIG_AUTOFS4_FS is not set
1323# CONFIG_FUSE_FS is not set
1324
1325#
1326# CD-ROM/DVD Filesystems
1327#
1328CONFIG_ISO9660_FS=y
1329CONFIG_JOLIET=y
1330CONFIG_ZISOFS=y
1331CONFIG_UDF_FS=y
1332CONFIG_UDF_NLS=y
1333
1334#
1335# DOS/FAT/NT Filesystems
1336#
1337CONFIG_FAT_FS=y
1338CONFIG_MSDOS_FS=y
1339CONFIG_VFAT_FS=y
1340CONFIG_FAT_DEFAULT_CODEPAGE=850
1341CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
1342# CONFIG_NTFS_FS is not set
1343
1344#
1345# Pseudo filesystems
1346#
1347CONFIG_PROC_FS=y
1348CONFIG_PROC_KCORE=y
1349CONFIG_PROC_SYSCTL=y
1350CONFIG_PROC_PAGE_MONITOR=y
1351CONFIG_SYSFS=y
1352CONFIG_TMPFS=y
1353# CONFIG_TMPFS_POSIX_ACL is not set
1354# CONFIG_HUGETLB_PAGE is not set
1355# CONFIG_CONFIGFS_FS is not set
1356CONFIG_MISC_FILESYSTEMS=y
1357# CONFIG_ADFS_FS is not set
1358# CONFIG_AFFS_FS is not set
1359# CONFIG_HFS_FS is not set
1360# CONFIG_HFSPLUS_FS is not set
1361# CONFIG_BEFS_FS is not set
1362# CONFIG_BFS_FS is not set
1363# CONFIG_EFS_FS is not set
1364CONFIG_JFFS2_FS=y
1365CONFIG_JFFS2_FS_DEBUG=0
1366CONFIG_JFFS2_FS_WRITEBUFFER=y
1367# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1368# CONFIG_JFFS2_SUMMARY is not set
1369# CONFIG_JFFS2_FS_XATTR is not set
1370# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1371CONFIG_JFFS2_ZLIB=y
1372# CONFIG_JFFS2_LZO is not set
1373CONFIG_JFFS2_RTIME=y
1374# CONFIG_JFFS2_RUBIN is not set
1375# CONFIG_CRAMFS is not set
1376# CONFIG_SQUASHFS is not set
1377# CONFIG_VXFS_FS is not set
1378# CONFIG_MINIX_FS is not set
1379# CONFIG_OMFS_FS is not set
1380# CONFIG_HPFS_FS is not set
1381# CONFIG_QNX4FS_FS is not set
1382# CONFIG_ROMFS_FS is not set
1383# CONFIG_SYSV_FS is not set
1384# CONFIG_UFS_FS is not set
1385CONFIG_NETWORK_FILESYSTEMS=y
1386CONFIG_NFS_FS=y
1387CONFIG_NFS_V3=y
1388# CONFIG_NFS_V3_ACL is not set
1389CONFIG_NFS_V4=y
1390CONFIG_ROOT_NFS=y
1391# CONFIG_NFSD is not set
1392CONFIG_LOCKD=y
1393CONFIG_LOCKD_V4=y
1394CONFIG_NFS_COMMON=y
1395CONFIG_SUNRPC=y
1396CONFIG_SUNRPC_GSS=y
1397# CONFIG_SUNRPC_REGISTER_V4 is not set
1398CONFIG_RPCSEC_GSS_KRB5=y
1399# CONFIG_RPCSEC_GSS_SPKM3 is not set
1400# CONFIG_SMB_FS is not set
1401CONFIG_CIFS=m
1402# CONFIG_CIFS_STATS is not set
1403# CONFIG_CIFS_WEAK_PW_HASH is not set
1404CONFIG_CIFS_XATTR=y
1405CONFIG_CIFS_POSIX=y
1406# CONFIG_CIFS_DEBUG2 is not set
1407# CONFIG_CIFS_EXPERIMENTAL is not set
1408# CONFIG_NCP_FS is not set
1409# CONFIG_CODA_FS is not set
1410# CONFIG_AFS_FS is not set
1411
1412#
1413# Partition Types
1414#
1415# CONFIG_PARTITION_ADVANCED is not set
1416CONFIG_MSDOS_PARTITION=y
1417CONFIG_NLS=y
1418CONFIG_NLS_DEFAULT="iso8859-1"
1419CONFIG_NLS_CODEPAGE_437=m
1420CONFIG_NLS_CODEPAGE_737=m
1421CONFIG_NLS_CODEPAGE_775=m
1422CONFIG_NLS_CODEPAGE_850=m
1423CONFIG_NLS_CODEPAGE_852=m
1424CONFIG_NLS_CODEPAGE_855=m
1425CONFIG_NLS_CODEPAGE_857=m
1426CONFIG_NLS_CODEPAGE_860=m
1427CONFIG_NLS_CODEPAGE_861=m
1428CONFIG_NLS_CODEPAGE_862=m
1429CONFIG_NLS_CODEPAGE_863=m
1430CONFIG_NLS_CODEPAGE_864=m
1431CONFIG_NLS_CODEPAGE_865=m
1432CONFIG_NLS_CODEPAGE_866=m
1433CONFIG_NLS_CODEPAGE_869=m
1434CONFIG_NLS_CODEPAGE_936=m
1435CONFIG_NLS_CODEPAGE_950=m
1436CONFIG_NLS_CODEPAGE_932=m
1437CONFIG_NLS_CODEPAGE_949=m
1438CONFIG_NLS_CODEPAGE_874=m
1439CONFIG_NLS_ISO8859_8=m
1440CONFIG_NLS_CODEPAGE_1250=m
1441CONFIG_NLS_CODEPAGE_1251=m
1442CONFIG_NLS_ASCII=m
1443CONFIG_NLS_ISO8859_1=m
1444CONFIG_NLS_ISO8859_2=m
1445CONFIG_NLS_ISO8859_3=m
1446CONFIG_NLS_ISO8859_4=m
1447CONFIG_NLS_ISO8859_5=m
1448CONFIG_NLS_ISO8859_6=m
1449CONFIG_NLS_ISO8859_7=m
1450CONFIG_NLS_ISO8859_9=m
1451CONFIG_NLS_ISO8859_13=m
1452CONFIG_NLS_ISO8859_14=m
1453CONFIG_NLS_ISO8859_15=m
1454CONFIG_NLS_KOI8_R=m
1455CONFIG_NLS_KOI8_U=m
1456CONFIG_NLS_UTF8=m
1457# CONFIG_DLM is not set
1458
1459#
1460# Library routines
1461#
1462CONFIG_BITREVERSE=y
1463CONFIG_GENERIC_FIND_LAST_BIT=y
1464CONFIG_CRC_CCITT=y
1465# CONFIG_CRC16 is not set
1466CONFIG_CRC_T10DIF=y
1467CONFIG_CRC_ITU_T=y
1468CONFIG_CRC32=y
1469# CONFIG_CRC7 is not set
1470CONFIG_LIBCRC32C=y
1471CONFIG_ZLIB_INFLATE=y
1472CONFIG_ZLIB_DEFLATE=y
1473CONFIG_PLIST=y
1474CONFIG_HAS_IOMEM=y
1475CONFIG_HAS_IOPORT=y
1476CONFIG_HAS_DMA=y
1477CONFIG_HAVE_LMB=y
1478
1479#
1480# Kernel hacking
1481#
1482# CONFIG_PRINTK_TIME is not set
1483CONFIG_ENABLE_WARN_DEPRECATED=y
1484CONFIG_ENABLE_MUST_CHECK=y
1485CONFIG_FRAME_WARN=1024
1486CONFIG_MAGIC_SYSRQ=y
1487# CONFIG_UNUSED_SYMBOLS is not set
1488# CONFIG_DEBUG_FS is not set
1489# CONFIG_HEADERS_CHECK is not set
1490# CONFIG_DEBUG_KERNEL is not set
1491# CONFIG_DEBUG_BUGVERBOSE is not set
1492# CONFIG_DEBUG_MEMORY_INIT is not set
1493# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1494# CONFIG_LATENCYTOP is not set
1495CONFIG_SYSCTL_SYSCALL_CHECK=y
1496CONFIG_HAVE_FUNCTION_TRACER=y
1497CONFIG_HAVE_DYNAMIC_FTRACE=y
1498CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1499
1500#
1501# Tracers
1502#
1503# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1504# CONFIG_SAMPLES is not set
1505CONFIG_HAVE_ARCH_KGDB=y
1506CONFIG_PRINT_STACK_DEPTH=64
1507# CONFIG_IRQSTACKS is not set
1508# CONFIG_BOOTX_TEXT is not set
1509# CONFIG_PPC_EARLY_DEBUG is not set
1510
1511#
1512# Security options
1513#
1514# CONFIG_KEYS is not set
1515# CONFIG_SECURITY is not set
1516# CONFIG_SECURITYFS is not set
1517# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1518CONFIG_CRYPTO=y
1519
1520#
1521# Crypto core or helper
1522#
1523# CONFIG_CRYPTO_FIPS is not set
1524CONFIG_CRYPTO_ALGAPI=y
1525CONFIG_CRYPTO_ALGAPI2=y
1526CONFIG_CRYPTO_AEAD=m
1527CONFIG_CRYPTO_AEAD2=y
1528CONFIG_CRYPTO_BLKCIPHER=y
1529CONFIG_CRYPTO_BLKCIPHER2=y
1530CONFIG_CRYPTO_HASH=y
1531CONFIG_CRYPTO_HASH2=y
1532CONFIG_CRYPTO_RNG2=y
1533CONFIG_CRYPTO_MANAGER=y
1534CONFIG_CRYPTO_MANAGER2=y
1535# CONFIG_CRYPTO_GF128MUL is not set
1536# CONFIG_CRYPTO_NULL is not set
1537# CONFIG_CRYPTO_CRYPTD is not set
1538CONFIG_CRYPTO_AUTHENC=m
1539# CONFIG_CRYPTO_TEST is not set
1540
1541#
1542# Authenticated Encryption with Associated Data
1543#
1544# CONFIG_CRYPTO_CCM is not set
1545# CONFIG_CRYPTO_GCM is not set
1546# CONFIG_CRYPTO_SEQIV is not set
1547
1548#
1549# Block modes
1550#
1551CONFIG_CRYPTO_CBC=y
1552# CONFIG_CRYPTO_CTR is not set
1553# CONFIG_CRYPTO_CTS is not set
1554# CONFIG_CRYPTO_ECB is not set
1555# CONFIG_CRYPTO_LRW is not set
1556# CONFIG_CRYPTO_PCBC is not set
1557# CONFIG_CRYPTO_XTS is not set
1558
1559#
1560# Hash modes
1561#
1562CONFIG_CRYPTO_HMAC=m
1563# CONFIG_CRYPTO_XCBC is not set
1564
1565#
1566# Digest
1567#
1568CONFIG_CRYPTO_CRC32C=y
1569# CONFIG_CRYPTO_MD4 is not set
1570CONFIG_CRYPTO_MD5=y
1571# CONFIG_CRYPTO_MICHAEL_MIC is not set
1572# CONFIG_CRYPTO_RMD128 is not set
1573# CONFIG_CRYPTO_RMD160 is not set
1574# CONFIG_CRYPTO_RMD256 is not set
1575# CONFIG_CRYPTO_RMD320 is not set
1576CONFIG_CRYPTO_SHA1=m
1577# CONFIG_CRYPTO_SHA256 is not set
1578# CONFIG_CRYPTO_SHA512 is not set
1579# CONFIG_CRYPTO_TGR192 is not set
1580# CONFIG_CRYPTO_WP512 is not set
1581
1582#
1583# Ciphers
1584#
1585# CONFIG_CRYPTO_AES is not set
1586# CONFIG_CRYPTO_ANUBIS is not set
1587# CONFIG_CRYPTO_ARC4 is not set
1588# CONFIG_CRYPTO_BLOWFISH is not set
1589# CONFIG_CRYPTO_CAMELLIA is not set
1590# CONFIG_CRYPTO_CAST5 is not set
1591# CONFIG_CRYPTO_CAST6 is not set
1592CONFIG_CRYPTO_DES=y
1593# CONFIG_CRYPTO_FCRYPT is not set
1594# CONFIG_CRYPTO_KHAZAD is not set
1595# CONFIG_CRYPTO_SALSA20 is not set
1596# CONFIG_CRYPTO_SEED is not set
1597# CONFIG_CRYPTO_SERPENT is not set
1598# CONFIG_CRYPTO_TEA is not set
1599# CONFIG_CRYPTO_TWOFISH is not set
1600
1601#
1602# Compression
1603#
1604CONFIG_CRYPTO_DEFLATE=m
1605# CONFIG_CRYPTO_LZO is not set
1606
1607#
1608# Random Number Generation
1609#
1610# CONFIG_CRYPTO_ANSI_CPRNG is not set
1611# CONFIG_CRYPTO_HW is not set
1612# CONFIG_PPC_CLOCK is not set
1613# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
new file mode 100644
index 000000000000..b63cc38df6b1
--- /dev/null
+++ b/arch/powerpc/configs/amigaone_defconfig
@@ -0,0 +1,1636 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc3
4# Sun Feb 1 14:22:42 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
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_PPC_FPU=y
18CONFIG_ALTIVEC=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_NOT_COHERENT_CACHE=y
24CONFIG_CHECK_CACHE_COHERENCY=y
25CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32
27# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
28CONFIG_MMU=y
29CONFIG_GENERIC_CMOS_UPDATE=y
30CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y
46CONFIG_EARLY_PRINTK=y
47CONFIG_GENERIC_NVRAM=y
48CONFIG_SCHED_OMIT_FRAME_POINTER=y
49CONFIG_ARCH_MAY_HAVE_PC_FDC=y
50CONFIG_PPC_OF=y
51CONFIG_OF=y
52CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y
56CONFIG_DEFAULT_UIMAGE=y
57# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
60
61#
62# General setup
63#
64CONFIG_EXPERIMENTAL=y
65CONFIG_BROKEN_ON_SMP=y
66CONFIG_INIT_ENV_ARG_LIMIT=32
67CONFIG_LOCALVERSION=""
68# CONFIG_LOCALVERSION_AUTO is not set
69CONFIG_SWAP=y
70CONFIG_SYSVIPC=y
71CONFIG_SYSVIPC_SYSCTL=y
72CONFIG_POSIX_MQUEUE=y
73# CONFIG_BSD_PROCESS_ACCT is not set
74# CONFIG_TASKSTATS is not set
75# CONFIG_AUDIT is not set
76
77#
78# RCU Subsystem
79#
80CONFIG_CLASSIC_RCU=y
81# CONFIG_TREE_RCU is not set
82# CONFIG_PREEMPT_RCU is not set
83# CONFIG_TREE_RCU_TRACE is not set
84# CONFIG_PREEMPT_RCU_TRACE is not set
85CONFIG_IKCONFIG=y
86CONFIG_IKCONFIG_PROC=y
87CONFIG_LOG_BUF_SHIFT=15
88# CONFIG_GROUP_SCHED is not set
89# CONFIG_CGROUPS is not set
90CONFIG_SYSFS_DEPRECATED=y
91CONFIG_SYSFS_DEPRECATED_V2=y
92# CONFIG_RELAY is not set
93CONFIG_NAMESPACES=y
94# CONFIG_UTS_NS is not set
95# CONFIG_IPC_NS is not set
96# CONFIG_USER_NS is not set
97# CONFIG_PID_NS is not set
98# CONFIG_NET_NS is not set
99CONFIG_BLK_DEV_INITRD=y
100CONFIG_INITRAMFS_SOURCE=""
101CONFIG_CC_OPTIMIZE_FOR_SIZE=y
102CONFIG_SYSCTL=y
103# CONFIG_EMBEDDED is not set
104CONFIG_SYSCTL_SYSCALL=y
105CONFIG_KALLSYMS=y
106# CONFIG_KALLSYMS_ALL is not set
107# CONFIG_KALLSYMS_EXTRA_PASS is not set
108CONFIG_HOTPLUG=y
109CONFIG_PRINTK=y
110CONFIG_BUG=y
111CONFIG_ELF_CORE=y
112CONFIG_PCSPKR_PLATFORM=y
113# CONFIG_COMPAT_BRK is not set
114CONFIG_BASE_FULL=y
115CONFIG_FUTEX=y
116CONFIG_ANON_INODES=y
117CONFIG_EPOLL=y
118CONFIG_SIGNALFD=y
119CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y
121CONFIG_SHMEM=y
122CONFIG_AIO=y
123CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y
126# CONFIG_SLAB is not set
127CONFIG_SLUB=y
128# CONFIG_SLOB is not set
129# CONFIG_PROFILING is not set
130CONFIG_HAVE_OPROFILE=y
131# CONFIG_KPROBES is not set
132CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
133CONFIG_HAVE_IOREMAP_PROT=y
134CONFIG_HAVE_KPROBES=y
135CONFIG_HAVE_KRETPROBES=y
136CONFIG_HAVE_ARCH_TRACEHOOK=y
137# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
138CONFIG_SLABINFO=y
139CONFIG_RT_MUTEXES=y
140CONFIG_BASE_SMALL=0
141CONFIG_MODULES=y
142# CONFIG_MODULE_FORCE_LOAD is not set
143CONFIG_MODULE_UNLOAD=y
144CONFIG_MODULE_FORCE_UNLOAD=y
145# CONFIG_MODVERSIONS is not set
146# CONFIG_MODULE_SRCVERSION_ALL is not set
147CONFIG_BLOCK=y
148CONFIG_LBD=y
149# CONFIG_BLK_DEV_IO_TRACE is not set
150# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set
152
153#
154# IO Schedulers
155#
156CONFIG_IOSCHED_NOOP=y
157CONFIG_IOSCHED_AS=y
158CONFIG_IOSCHED_DEADLINE=y
159CONFIG_IOSCHED_CFQ=y
160CONFIG_DEFAULT_AS=y
161# CONFIG_DEFAULT_DEADLINE is not set
162# CONFIG_DEFAULT_CFQ is not set
163# CONFIG_DEFAULT_NOOP is not set
164CONFIG_DEFAULT_IOSCHED="anticipatory"
165# CONFIG_FREEZER is not set
166
167#
168# Platform support
169#
170CONFIG_PPC_MULTIPLATFORM=y
171CONFIG_CLASSIC32=y
172# CONFIG_PPC_CHRP is not set
173# CONFIG_MPC5121_ADS is not set
174# CONFIG_MPC5121_GENERIC is not set
175# CONFIG_PPC_MPC52xx is not set
176# CONFIG_PPC_PMAC is not set
177# CONFIG_PPC_CELL is not set
178# CONFIG_PPC_CELL_NATIVE is not set
179# CONFIG_PPC_82xx is not set
180# CONFIG_PQ2ADS is not set
181# CONFIG_PPC_83xx is not set
182# CONFIG_PPC_86xx is not set
183# CONFIG_EMBEDDED6xx is not set
184CONFIG_AMIGAONE=y
185# CONFIG_IPIC is not set
186# CONFIG_MPIC is not set
187# CONFIG_MPIC_WEIRD is not set
188CONFIG_PPC_I8259=y
189# CONFIG_PPC_RTAS is not set
190# CONFIG_MMIO_NVRAM is not set
191# CONFIG_PPC_MPC106 is not set
192# CONFIG_PPC_970_NAP is not set
193# CONFIG_PPC_INDIRECT_IO is not set
194# CONFIG_GENERIC_IOMAP is not set
195# CONFIG_CPU_FREQ is not set
196# CONFIG_TAU is not set
197# CONFIG_FSL_ULI1575 is not set
198# CONFIG_SIMPLE_GPIO is not set
199
200#
201# Kernel options
202#
203CONFIG_HIGHMEM=y
204CONFIG_TICK_ONESHOT=y
205CONFIG_NO_HZ=y
206CONFIG_HIGH_RES_TIMERS=y
207CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
208# CONFIG_HZ_100 is not set
209CONFIG_HZ_250=y
210# CONFIG_HZ_300 is not set
211# CONFIG_HZ_1000 is not set
212CONFIG_HZ=250
213CONFIG_SCHED_HRTICK=y
214CONFIG_PREEMPT_NONE=y
215# CONFIG_PREEMPT_VOLUNTARY is not set
216# CONFIG_PREEMPT is not set
217CONFIG_BINFMT_ELF=y
218# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
219# CONFIG_HAVE_AOUT is not set
220CONFIG_BINFMT_MISC=y
221# CONFIG_IOMMU_HELPER is not set
222CONFIG_PPC_NEED_DMA_SYNC_OPS=y
223CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
224CONFIG_ARCH_HAS_WALK_MEMORY=y
225CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
226# CONFIG_KEXEC is not set
227# CONFIG_CRASH_DUMP is not set
228CONFIG_ARCH_FLATMEM_ENABLE=y
229CONFIG_ARCH_POPULATES_NODE_MAP=y
230CONFIG_SELECT_MEMORY_MODEL=y
231CONFIG_FLATMEM_MANUAL=y
232# CONFIG_DISCONTIGMEM_MANUAL is not set
233# CONFIG_SPARSEMEM_MANUAL is not set
234CONFIG_FLATMEM=y
235CONFIG_FLAT_NODE_MEM_MAP=y
236CONFIG_PAGEFLAGS_EXTENDED=y
237CONFIG_SPLIT_PTLOCK_CPUS=4
238# CONFIG_MIGRATION is not set
239# CONFIG_PHYS_ADDR_T_64BIT is not set
240CONFIG_ZONE_DMA_FLAG=1
241CONFIG_BOUNCE=y
242CONFIG_VIRT_TO_BUS=y
243CONFIG_UNEVICTABLE_LRU=y
244CONFIG_PPC_4K_PAGES=y
245# CONFIG_PPC_16K_PAGES is not set
246# CONFIG_PPC_64K_PAGES is not set
247CONFIG_FORCE_MAX_ZONEORDER=11
248CONFIG_PROC_DEVICETREE=y
249# CONFIG_CMDLINE_BOOL is not set
250CONFIG_EXTRA_TARGETS=""
251# CONFIG_PM is not set
252CONFIG_SECCOMP=y
253CONFIG_ISA_DMA_API=y
254
255#
256# Bus options
257#
258CONFIG_ZONE_DMA=y
259CONFIG_GENERIC_ISA_DMA=y
260CONFIG_PPC_INDIRECT_PCI=y
261CONFIG_PCI=y
262CONFIG_PCI_DOMAINS=y
263CONFIG_PCI_SYSCALL=y
264# CONFIG_PCIEPORTBUS is not set
265CONFIG_ARCH_SUPPORTS_MSI=y
266# CONFIG_PCI_MSI is not set
267# CONFIG_PCI_LEGACY is not set
268# CONFIG_PCI_DEBUG is not set
269# CONFIG_PCI_STUB is not set
270# CONFIG_PCCARD is not set
271# CONFIG_HOTPLUG_PCI is not set
272# CONFIG_HAS_RAPIDIO is not set
273
274#
275# Advanced setup
276#
277# CONFIG_ADVANCED_OPTIONS is not set
278
279#
280# Default settings for advanced configuration options are used
281#
282CONFIG_LOWMEM_SIZE=0x30000000
283CONFIG_PAGE_OFFSET=0xc0000000
284CONFIG_KERNEL_START=0xc0000000
285CONFIG_PHYSICAL_START=0x00000000
286CONFIG_TASK_SIZE=0xc0000000
287CONFIG_CONSISTENT_START=0xff100000
288CONFIG_CONSISTENT_SIZE=0x00200000
289CONFIG_NET=y
290
291#
292# Networking options
293#
294CONFIG_COMPAT_NET_DEV_OPS=y
295CONFIG_PACKET=y
296# CONFIG_PACKET_MMAP is not set
297CONFIG_UNIX=y
298# CONFIG_NET_KEY is not set
299CONFIG_INET=y
300CONFIG_IP_MULTICAST=y
301# CONFIG_IP_ADVANCED_ROUTER is not set
302CONFIG_IP_FIB_HASH=y
303# CONFIG_IP_PNP is not set
304# CONFIG_NET_IPIP is not set
305# CONFIG_NET_IPGRE is not set
306# CONFIG_IP_MROUTE is not set
307# CONFIG_ARPD is not set
308CONFIG_SYN_COOKIES=y
309# CONFIG_INET_AH is not set
310# CONFIG_INET_ESP is not set
311# CONFIG_INET_IPCOMP is not set
312# CONFIG_INET_XFRM_TUNNEL is not set
313# CONFIG_INET_TUNNEL is not set
314# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
315# CONFIG_INET_XFRM_MODE_TUNNEL is not set
316# CONFIG_INET_XFRM_MODE_BEET is not set
317# CONFIG_INET_LRO is not set
318CONFIG_INET_DIAG=y
319CONFIG_INET_TCP_DIAG=y
320# CONFIG_TCP_CONG_ADVANCED is not set
321CONFIG_TCP_CONG_CUBIC=y
322CONFIG_DEFAULT_TCP_CONG="cubic"
323# CONFIG_TCP_MD5SIG is not set
324# CONFIG_IPV6 is not set
325# CONFIG_NETWORK_SECMARK is not set
326CONFIG_NETFILTER=y
327# CONFIG_NETFILTER_DEBUG is not set
328# CONFIG_NETFILTER_ADVANCED is not set
329
330#
331# Core Netfilter Configuration
332#
333CONFIG_NETFILTER_NETLINK=m
334CONFIG_NETFILTER_NETLINK_LOG=m
335CONFIG_NF_CONNTRACK=m
336CONFIG_NF_CONNTRACK_FTP=m
337CONFIG_NF_CONNTRACK_IRC=m
338CONFIG_NF_CONNTRACK_SIP=m
339CONFIG_NF_CT_NETLINK=m
340CONFIG_NETFILTER_XTABLES=m
341# CONFIG_NETFILTER_XT_TARGET_MARK is not set
342# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
343# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
344# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
345# CONFIG_NETFILTER_XT_MATCH_MARK is not set
346# CONFIG_NETFILTER_XT_MATCH_STATE is not set
347# CONFIG_IP_VS is not set
348
349#
350# IP: Netfilter Configuration
351#
352CONFIG_NF_DEFRAG_IPV4=m
353CONFIG_NF_CONNTRACK_IPV4=m
354CONFIG_NF_CONNTRACK_PROC_COMPAT=y
355CONFIG_IP_NF_IPTABLES=m
356CONFIG_IP_NF_FILTER=m
357CONFIG_IP_NF_TARGET_REJECT=m
358CONFIG_IP_NF_TARGET_LOG=m
359# CONFIG_IP_NF_TARGET_ULOG is not set
360CONFIG_NF_NAT=m
361CONFIG_NF_NAT_NEEDED=y
362CONFIG_IP_NF_TARGET_MASQUERADE=m
363CONFIG_NF_NAT_FTP=m
364CONFIG_NF_NAT_IRC=m
365# CONFIG_NF_NAT_TFTP is not set
366# CONFIG_NF_NAT_AMANDA is not set
367# CONFIG_NF_NAT_PPTP is not set
368# CONFIG_NF_NAT_H323 is not set
369CONFIG_NF_NAT_SIP=m
370# CONFIG_IP_NF_MANGLE is not set
371# CONFIG_IP_DCCP is not set
372# CONFIG_IP_SCTP is not set
373# CONFIG_TIPC is not set
374# CONFIG_ATM is not set
375# CONFIG_BRIDGE is not set
376# CONFIG_NET_DSA is not set
377# CONFIG_VLAN_8021Q is not set
378# CONFIG_DECNET is not set
379# CONFIG_LLC2 is not set
380# CONFIG_IPX is not set
381# CONFIG_ATALK is not set
382# CONFIG_X25 is not set
383# CONFIG_LAPB is not set
384# CONFIG_ECONET is not set
385# CONFIG_WAN_ROUTER is not set
386# CONFIG_NET_SCHED is not set
387# CONFIG_DCB is not set
388
389#
390# Network testing
391#
392# CONFIG_NET_PKTGEN is not set
393# CONFIG_HAMRADIO is not set
394# CONFIG_CAN is not set
395# CONFIG_IRDA is not set
396# CONFIG_BT is not set
397# CONFIG_AF_RXRPC is not set
398# CONFIG_PHONET is not set
399# CONFIG_WIRELESS is not set
400# CONFIG_WIMAX is not set
401# CONFIG_RFKILL is not set
402# CONFIG_NET_9P is not set
403
404#
405# Device Drivers
406#
407
408#
409# Generic Driver Options
410#
411CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
412# CONFIG_STANDALONE is not set
413CONFIG_PREVENT_FIRMWARE_BUILD=y
414CONFIG_FW_LOADER=y
415CONFIG_FIRMWARE_IN_KERNEL=y
416CONFIG_EXTRA_FIRMWARE=""
417# CONFIG_DEBUG_DRIVER is not set
418# CONFIG_DEBUG_DEVRES is not set
419# CONFIG_SYS_HYPERVISOR is not set
420# CONFIG_CONNECTOR is not set
421# CONFIG_MTD is not set
422CONFIG_OF_DEVICE=y
423CONFIG_OF_I2C=y
424CONFIG_PARPORT=y
425CONFIG_PARPORT_PC=y
426# CONFIG_PARPORT_SERIAL is not set
427CONFIG_PARPORT_PC_FIFO=y
428# CONFIG_PARPORT_PC_SUPERIO is not set
429# CONFIG_PARPORT_GSC is not set
430# CONFIG_PARPORT_AX88796 is not set
431# CONFIG_PARPORT_1284 is not set
432CONFIG_BLK_DEV=y
433CONFIG_BLK_DEV_FD=y
434# CONFIG_PARIDE is not set
435# CONFIG_BLK_CPQ_DA is not set
436# CONFIG_BLK_CPQ_CISS_DA is not set
437# CONFIG_BLK_DEV_DAC960 is not set
438# CONFIG_BLK_DEV_UMEM is not set
439# CONFIG_BLK_DEV_COW_COMMON is not set
440CONFIG_BLK_DEV_LOOP=y
441# CONFIG_BLK_DEV_CRYPTOLOOP is not set
442# CONFIG_BLK_DEV_NBD is not set
443# CONFIG_BLK_DEV_SX8 is not set
444# CONFIG_BLK_DEV_UB is not set
445CONFIG_BLK_DEV_RAM=y
446CONFIG_BLK_DEV_RAM_COUNT=16
447CONFIG_BLK_DEV_RAM_SIZE=4096
448# CONFIG_BLK_DEV_XIP is not set
449# CONFIG_CDROM_PKTCDVD is not set
450# CONFIG_ATA_OVER_ETH is not set
451# CONFIG_BLK_DEV_HD is not set
452CONFIG_MISC_DEVICES=y
453# CONFIG_PHANTOM is not set
454# CONFIG_SGI_IOC4 is not set
455# CONFIG_TIFM_CORE is not set
456# CONFIG_ICS932S401 is not set
457# CONFIG_ENCLOSURE_SERVICES is not set
458# CONFIG_HP_ILO is not set
459# CONFIG_C2PORT is not set
460
461#
462# EEPROM support
463#
464# CONFIG_EEPROM_AT24 is not set
465# CONFIG_EEPROM_LEGACY is not set
466# CONFIG_EEPROM_93CX6 is not set
467CONFIG_HAVE_IDE=y
468CONFIG_IDE=y
469
470#
471# Please see Documentation/ide/ide.txt for help/info on IDE drives
472#
473CONFIG_IDE_TIMINGS=y
474CONFIG_IDE_ATAPI=y
475# CONFIG_BLK_DEV_IDE_SATA is not set
476CONFIG_IDE_GD=y
477CONFIG_IDE_GD_ATA=y
478# CONFIG_IDE_GD_ATAPI is not set
479CONFIG_BLK_DEV_IDECD=y
480CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
481# CONFIG_BLK_DEV_IDETAPE is not set
482# CONFIG_IDE_TASK_IOCTL is not set
483CONFIG_IDE_PROC_FS=y
484
485#
486# IDE chipset support/bugfixes
487#
488# CONFIG_BLK_DEV_PLATFORM is not set
489CONFIG_BLK_DEV_IDEDMA_SFF=y
490
491#
492# PCI IDE chipsets support
493#
494CONFIG_BLK_DEV_IDEPCI=y
495# CONFIG_IDEPCI_PCIBUS_ORDER is not set
496# CONFIG_BLK_DEV_OFFBOARD is not set
497CONFIG_BLK_DEV_GENERIC=y
498# CONFIG_BLK_DEV_OPTI621 is not set
499CONFIG_BLK_DEV_IDEDMA_PCI=y
500# CONFIG_BLK_DEV_AEC62XX is not set
501# CONFIG_BLK_DEV_ALI15X3 is not set
502# CONFIG_BLK_DEV_AMD74XX is not set
503# CONFIG_BLK_DEV_CMD64X is not set
504# CONFIG_BLK_DEV_TRIFLEX is not set
505# CONFIG_BLK_DEV_CS5520 is not set
506# CONFIG_BLK_DEV_CS5530 is not set
507# CONFIG_BLK_DEV_HPT366 is not set
508# CONFIG_BLK_DEV_JMICRON is not set
509# CONFIG_BLK_DEV_SC1200 is not set
510# CONFIG_BLK_DEV_PIIX is not set
511# CONFIG_BLK_DEV_IT8172 is not set
512# CONFIG_BLK_DEV_IT8213 is not set
513# CONFIG_BLK_DEV_IT821X is not set
514# CONFIG_BLK_DEV_NS87415 is not set
515# CONFIG_BLK_DEV_PDC202XX_OLD is not set
516# CONFIG_BLK_DEV_PDC202XX_NEW is not set
517# CONFIG_BLK_DEV_SVWKS is not set
518CONFIG_BLK_DEV_SIIMAGE=y
519# CONFIG_BLK_DEV_SL82C105 is not set
520# CONFIG_BLK_DEV_SLC90E66 is not set
521# CONFIG_BLK_DEV_TRM290 is not set
522CONFIG_BLK_DEV_VIA82CXXX=y
523# CONFIG_BLK_DEV_TC86C001 is not set
524CONFIG_BLK_DEV_IDEDMA=y
525
526#
527# SCSI device support
528#
529# CONFIG_RAID_ATTRS is not set
530CONFIG_SCSI=y
531CONFIG_SCSI_DMA=y
532# CONFIG_SCSI_TGT is not set
533# CONFIG_SCSI_NETLINK is not set
534CONFIG_SCSI_PROC_FS=y
535
536#
537# SCSI support type (disk, tape, CD-ROM)
538#
539CONFIG_BLK_DEV_SD=y
540CONFIG_CHR_DEV_ST=y
541# CONFIG_CHR_DEV_OSST is not set
542CONFIG_BLK_DEV_SR=y
543CONFIG_BLK_DEV_SR_VENDOR=y
544CONFIG_CHR_DEV_SG=y
545# CONFIG_CHR_DEV_SCH is not set
546
547#
548# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
549#
550# CONFIG_SCSI_MULTI_LUN is not set
551CONFIG_SCSI_CONSTANTS=y
552# CONFIG_SCSI_LOGGING is not set
553# CONFIG_SCSI_SCAN_ASYNC is not set
554CONFIG_SCSI_WAIT_SCAN=m
555
556#
557# SCSI Transports
558#
559CONFIG_SCSI_SPI_ATTRS=y
560# CONFIG_SCSI_FC_ATTRS is not set
561# CONFIG_SCSI_ISCSI_ATTRS is not set
562# CONFIG_SCSI_SAS_LIBSAS is not set
563# CONFIG_SCSI_SRP_ATTRS is not set
564CONFIG_SCSI_LOWLEVEL=y
565# CONFIG_ISCSI_TCP is not set
566# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
567# CONFIG_SCSI_3W_9XXX is not set
568# CONFIG_SCSI_ACARD is not set
569# CONFIG_SCSI_AACRAID is not set
570# CONFIG_SCSI_AIC7XXX is not set
571# CONFIG_SCSI_AIC7XXX_OLD is not set
572# CONFIG_SCSI_AIC79XX is not set
573# CONFIG_SCSI_AIC94XX is not set
574# CONFIG_SCSI_DPT_I2O is not set
575# CONFIG_SCSI_ADVANSYS is not set
576# CONFIG_SCSI_ARCMSR is not set
577# CONFIG_MEGARAID_NEWGEN is not set
578# CONFIG_MEGARAID_LEGACY is not set
579# CONFIG_MEGARAID_SAS is not set
580# CONFIG_SCSI_HPTIOP is not set
581# CONFIG_SCSI_BUSLOGIC is not set
582# CONFIG_LIBFC is not set
583# CONFIG_FCOE is not set
584# CONFIG_SCSI_DMX3191D is not set
585# CONFIG_SCSI_EATA is not set
586# CONFIG_SCSI_FUTURE_DOMAIN is not set
587# CONFIG_SCSI_GDTH is not set
588# CONFIG_SCSI_IPS is not set
589# CONFIG_SCSI_INITIO is not set
590# CONFIG_SCSI_INIA100 is not set
591# CONFIG_SCSI_PPA is not set
592# CONFIG_SCSI_IMM is not set
593# CONFIG_SCSI_MVSAS is not set
594# CONFIG_SCSI_STEX is not set
595CONFIG_SCSI_SYM53C8XX_2=y
596CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
597CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
598CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
599# CONFIG_SCSI_SYM53C8XX_MMIO is not set
600# CONFIG_SCSI_QLOGIC_1280 is not set
601# CONFIG_SCSI_QLA_FC is not set
602# CONFIG_SCSI_QLA_ISCSI is not set
603# CONFIG_SCSI_LPFC is not set
604# CONFIG_SCSI_DC395x is not set
605# CONFIG_SCSI_DC390T is not set
606# CONFIG_SCSI_NSP32 is not set
607# CONFIG_SCSI_DEBUG is not set
608# CONFIG_SCSI_SRP is not set
609# CONFIG_SCSI_DH is not set
610# CONFIG_ATA is not set
611# CONFIG_MD is not set
612# CONFIG_FUSION is not set
613
614#
615# IEEE 1394 (FireWire) support
616#
617
618#
619# Enable only one of the two stacks, unless you know what you are doing
620#
621# CONFIG_FIREWIRE is not set
622# CONFIG_IEEE1394 is not set
623# CONFIG_I2O is not set
624# CONFIG_MACINTOSH_DRIVERS is not set
625CONFIG_NETDEVICES=y
626# CONFIG_DUMMY is not set
627# CONFIG_BONDING is not set
628# CONFIG_MACVLAN is not set
629# CONFIG_EQUALIZER is not set
630# CONFIG_TUN is not set
631# CONFIG_VETH is not set
632# CONFIG_ARCNET is not set
633CONFIG_PHYLIB=y
634
635#
636# MII PHY device drivers
637#
638# CONFIG_MARVELL_PHY is not set
639# CONFIG_DAVICOM_PHY is not set
640# CONFIG_QSEMI_PHY is not set
641# CONFIG_LXT_PHY is not set
642# CONFIG_CICADA_PHY is not set
643# CONFIG_VITESSE_PHY is not set
644# CONFIG_SMSC_PHY is not set
645# CONFIG_BROADCOM_PHY is not set
646# CONFIG_ICPLUS_PHY is not set
647# CONFIG_REALTEK_PHY is not set
648# CONFIG_NATIONAL_PHY is not set
649# CONFIG_STE10XP is not set
650# CONFIG_LSI_ET1011C_PHY is not set
651# CONFIG_FIXED_PHY is not set
652# CONFIG_MDIO_BITBANG is not set
653CONFIG_NET_ETHERNET=y
654CONFIG_MII=y
655# CONFIG_HAPPYMEAL is not set
656# CONFIG_SUNGEM is not set
657# CONFIG_CASSINI is not set
658CONFIG_NET_VENDOR_3COM=y
659CONFIG_VORTEX=y
660# CONFIG_TYPHOON is not set
661# CONFIG_NET_TULIP is not set
662# CONFIG_HP100 is not set
663# CONFIG_IBM_NEW_EMAC_ZMII is not set
664# CONFIG_IBM_NEW_EMAC_RGMII is not set
665# CONFIG_IBM_NEW_EMAC_TAH is not set
666# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
667# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
668# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
669# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
670CONFIG_NET_PCI=y
671# CONFIG_PCNET32 is not set
672# CONFIG_AMD8111_ETH is not set
673# CONFIG_ADAPTEC_STARFIRE is not set
674# CONFIG_B44 is not set
675# CONFIG_FORCEDETH is not set
676# CONFIG_E100 is not set
677# CONFIG_FEALNX is not set
678# CONFIG_NATSEMI is not set
679# CONFIG_NE2K_PCI is not set
680CONFIG_8139CP=y
681CONFIG_8139TOO=y
682CONFIG_8139TOO_PIO=y
683# CONFIG_8139TOO_TUNE_TWISTER is not set
684# CONFIG_8139TOO_8129 is not set
685# CONFIG_8139_OLD_RX_RESET is not set
686# CONFIG_R6040 is not set
687# CONFIG_SIS900 is not set
688# CONFIG_EPIC100 is not set
689# CONFIG_SMSC9420 is not set
690# CONFIG_SUNDANCE is not set
691# CONFIG_TLAN is not set
692# CONFIG_VIA_RHINE is not set
693# CONFIG_SC92031 is not set
694# CONFIG_NET_POCKET is not set
695# CONFIG_ATL2 is not set
696# CONFIG_NETDEV_1000 is not set
697# CONFIG_NETDEV_10000 is not set
698# CONFIG_TR is not set
699
700#
701# Wireless LAN
702#
703# CONFIG_WLAN_PRE80211 is not set
704# CONFIG_WLAN_80211 is not set
705# CONFIG_IWLWIFI_LEDS is not set
706
707#
708# Enable WiMAX (Networking options) to see the WiMAX drivers
709#
710
711#
712# USB Network Adapters
713#
714# CONFIG_USB_CATC is not set
715# CONFIG_USB_KAWETH is not set
716# CONFIG_USB_PEGASUS is not set
717# CONFIG_USB_RTL8150 is not set
718# CONFIG_USB_USBNET is not set
719# CONFIG_WAN is not set
720# CONFIG_FDDI is not set
721# CONFIG_HIPPI is not set
722# CONFIG_PLIP is not set
723CONFIG_PPP=m
724CONFIG_PPP_MULTILINK=y
725CONFIG_PPP_FILTER=y
726CONFIG_PPP_ASYNC=m
727CONFIG_PPP_SYNC_TTY=m
728CONFIG_PPP_DEFLATE=m
729CONFIG_PPP_BSDCOMP=m
730CONFIG_PPP_MPPE=m
731CONFIG_PPPOE=m
732# CONFIG_PPPOL2TP is not set
733# CONFIG_SLIP is not set
734CONFIG_SLHC=m
735# CONFIG_NET_FC is not set
736# CONFIG_NETCONSOLE is not set
737# CONFIG_NETPOLL is not set
738# CONFIG_NET_POLL_CONTROLLER is not set
739# CONFIG_ISDN is not set
740# CONFIG_PHONE is not set
741
742#
743# Input device support
744#
745CONFIG_INPUT=y
746# CONFIG_INPUT_FF_MEMLESS is not set
747# CONFIG_INPUT_POLLDEV is not set
748
749#
750# Userland interfaces
751#
752CONFIG_INPUT_MOUSEDEV=y
753CONFIG_INPUT_MOUSEDEV_PSAUX=y
754CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
755CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
756# CONFIG_INPUT_JOYDEV is not set
757CONFIG_INPUT_EVDEV=y
758# CONFIG_INPUT_EVBUG is not set
759
760#
761# Input Device Drivers
762#
763CONFIG_INPUT_KEYBOARD=y
764CONFIG_KEYBOARD_ATKBD=y
765# CONFIG_KEYBOARD_SUNKBD is not set
766# CONFIG_KEYBOARD_LKKBD is not set
767# CONFIG_KEYBOARD_XTKBD is not set
768# CONFIG_KEYBOARD_NEWTON is not set
769# CONFIG_KEYBOARD_STOWAWAY is not set
770CONFIG_INPUT_MOUSE=y
771CONFIG_MOUSE_PS2=y
772CONFIG_MOUSE_PS2_ALPS=y
773CONFIG_MOUSE_PS2_LOGIPS2PP=y
774CONFIG_MOUSE_PS2_SYNAPTICS=y
775CONFIG_MOUSE_PS2_LIFEBOOK=y
776CONFIG_MOUSE_PS2_TRACKPOINT=y
777# CONFIG_MOUSE_PS2_ELANTECH is not set
778# CONFIG_MOUSE_PS2_TOUCHKIT is not set
779# CONFIG_MOUSE_SERIAL is not set
780# CONFIG_MOUSE_APPLETOUCH is not set
781# CONFIG_MOUSE_BCM5974 is not set
782# CONFIG_MOUSE_VSXXXAA is not set
783# CONFIG_INPUT_JOYSTICK is not set
784# CONFIG_INPUT_TABLET is not set
785# CONFIG_INPUT_TOUCHSCREEN is not set
786CONFIG_INPUT_MISC=y
787CONFIG_INPUT_PCSPKR=y
788# CONFIG_INPUT_ATI_REMOTE is not set
789# CONFIG_INPUT_ATI_REMOTE2 is not set
790# CONFIG_INPUT_KEYSPAN_REMOTE is not set
791# CONFIG_INPUT_POWERMATE is not set
792# CONFIG_INPUT_YEALINK is not set
793# CONFIG_INPUT_CM109 is not set
794CONFIG_INPUT_UINPUT=y
795
796#
797# Hardware I/O ports
798#
799CONFIG_SERIO=y
800CONFIG_SERIO_I8042=y
801CONFIG_SERIO_SERPORT=y
802# CONFIG_SERIO_PARKBD is not set
803# CONFIG_SERIO_PCIPS2 is not set
804CONFIG_SERIO_LIBPS2=y
805# CONFIG_SERIO_RAW is not set
806# CONFIG_SERIO_XILINX_XPS_PS2 is not set
807# CONFIG_GAMEPORT is not set
808
809#
810# Character devices
811#
812CONFIG_VT=y
813CONFIG_CONSOLE_TRANSLATIONS=y
814CONFIG_VT_CONSOLE=y
815CONFIG_HW_CONSOLE=y
816# CONFIG_VT_HW_CONSOLE_BINDING is not set
817CONFIG_DEVKMEM=y
818# CONFIG_SERIAL_NONSTANDARD is not set
819# CONFIG_NOZOMI is not set
820
821#
822# Serial drivers
823#
824CONFIG_SERIAL_8250=y
825CONFIG_SERIAL_8250_CONSOLE=y
826CONFIG_SERIAL_8250_PCI=y
827CONFIG_SERIAL_8250_NR_UARTS=4
828CONFIG_SERIAL_8250_RUNTIME_UARTS=4
829# CONFIG_SERIAL_8250_EXTENDED is not set
830
831#
832# Non-8250 serial port support
833#
834# CONFIG_SERIAL_UARTLITE is not set
835CONFIG_SERIAL_CORE=y
836CONFIG_SERIAL_CORE_CONSOLE=y
837# CONFIG_SERIAL_JSM is not set
838# CONFIG_SERIAL_OF_PLATFORM is not set
839CONFIG_UNIX98_PTYS=y
840# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
841CONFIG_LEGACY_PTYS=y
842CONFIG_LEGACY_PTY_COUNT=256
843# CONFIG_PRINTER is not set
844# CONFIG_PPDEV is not set
845# CONFIG_HVC_UDBG is not set
846# CONFIG_IPMI_HANDLER is not set
847# CONFIG_HW_RANDOM is not set
848# CONFIG_NVRAM is not set
849# CONFIG_R3964 is not set
850# CONFIG_APPLICOM is not set
851# CONFIG_RAW_DRIVER is not set
852# CONFIG_TCG_TPM is not set
853CONFIG_DEVPORT=y
854CONFIG_I2C=y
855CONFIG_I2C_BOARDINFO=y
856# CONFIG_I2C_CHARDEV is not set
857CONFIG_I2C_HELPER_AUTO=y
858CONFIG_I2C_ALGOBIT=y
859
860#
861# I2C Hardware Bus support
862#
863
864#
865# PC SMBus host controller drivers
866#
867# CONFIG_I2C_ALI1535 is not set
868# CONFIG_I2C_ALI1563 is not set
869# CONFIG_I2C_ALI15X3 is not set
870# CONFIG_I2C_AMD756 is not set
871# CONFIG_I2C_AMD8111 is not set
872# CONFIG_I2C_I801 is not set
873# CONFIG_I2C_ISCH is not set
874# CONFIG_I2C_PIIX4 is not set
875# CONFIG_I2C_NFORCE2 is not set
876# CONFIG_I2C_SIS5595 is not set
877# CONFIG_I2C_SIS630 is not set
878# CONFIG_I2C_SIS96X is not set
879# CONFIG_I2C_VIA is not set
880# CONFIG_I2C_VIAPRO is not set
881
882#
883# I2C system bus drivers (mostly embedded / system-on-chip)
884#
885# CONFIG_I2C_MPC is not set
886# CONFIG_I2C_OCORES is not set
887# CONFIG_I2C_SIMTEC is not set
888
889#
890# External I2C/SMBus adapter drivers
891#
892# CONFIG_I2C_PARPORT is not set
893# CONFIG_I2C_PARPORT_LIGHT is not set
894# CONFIG_I2C_TAOS_EVM is not set
895# CONFIG_I2C_TINY_USB is not set
896
897#
898# Graphics adapter I2C/DDC channel drivers
899#
900# CONFIG_I2C_VOODOO3 is not set
901
902#
903# Other I2C/SMBus bus drivers
904#
905# CONFIG_I2C_PCA_PLATFORM is not set
906# CONFIG_I2C_STUB is not set
907
908#
909# Miscellaneous I2C Chip support
910#
911# CONFIG_DS1682 is not set
912# CONFIG_SENSORS_PCF8574 is not set
913# CONFIG_PCF8575 is not set
914# CONFIG_SENSORS_PCA9539 is not set
915# CONFIG_SENSORS_PCF8591 is not set
916# CONFIG_SENSORS_MAX6875 is not set
917# CONFIG_SENSORS_TSL2550 is not set
918# CONFIG_I2C_DEBUG_CORE is not set
919# CONFIG_I2C_DEBUG_ALGO is not set
920# CONFIG_I2C_DEBUG_BUS is not set
921# CONFIG_I2C_DEBUG_CHIP is not set
922# CONFIG_SPI is not set
923CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
924# CONFIG_GPIOLIB is not set
925# CONFIG_W1 is not set
926# CONFIG_POWER_SUPPLY is not set
927# CONFIG_HWMON is not set
928# CONFIG_THERMAL is not set
929# CONFIG_THERMAL_HWMON is not set
930# CONFIG_WATCHDOG is not set
931CONFIG_SSB_POSSIBLE=y
932
933#
934# Sonics Silicon Backplane
935#
936# CONFIG_SSB is not set
937
938#
939# Multifunction device drivers
940#
941# CONFIG_MFD_CORE is not set
942# CONFIG_MFD_SM501 is not set
943# CONFIG_HTC_PASIC3 is not set
944# CONFIG_TWL4030_CORE is not set
945# CONFIG_MFD_TMIO is not set
946# CONFIG_PMIC_DA903X is not set
947# CONFIG_MFD_WM8400 is not set
948# CONFIG_MFD_WM8350_I2C is not set
949# CONFIG_MFD_PCF50633 is not set
950# CONFIG_REGULATOR is not set
951
952#
953# Multimedia devices
954#
955
956#
957# Multimedia core support
958#
959# CONFIG_VIDEO_DEV is not set
960# CONFIG_DVB_CORE is not set
961# CONFIG_VIDEO_MEDIA is not set
962
963#
964# Multimedia drivers
965#
966# CONFIG_DAB is not set
967
968#
969# Graphics support
970#
971# CONFIG_AGP is not set
972# CONFIG_DRM is not set
973# CONFIG_VGASTATE is not set
974# CONFIG_VIDEO_OUTPUT_CONTROL is not set
975CONFIG_FB=y
976CONFIG_FIRMWARE_EDID=y
977CONFIG_FB_DDC=y
978# CONFIG_FB_BOOT_VESA_SUPPORT is not set
979CONFIG_FB_CFB_FILLRECT=y
980CONFIG_FB_CFB_COPYAREA=y
981CONFIG_FB_CFB_IMAGEBLIT=y
982# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
983# CONFIG_FB_SYS_FILLRECT is not set
984# CONFIG_FB_SYS_COPYAREA is not set
985# CONFIG_FB_SYS_IMAGEBLIT is not set
986# CONFIG_FB_FOREIGN_ENDIAN is not set
987# CONFIG_FB_SYS_FOPS is not set
988# CONFIG_FB_SVGALIB is not set
989CONFIG_FB_MACMODES=y
990CONFIG_FB_BACKLIGHT=y
991CONFIG_FB_MODE_HELPERS=y
992CONFIG_FB_TILEBLITTING=y
993
994#
995# Frame buffer hardware drivers
996#
997# CONFIG_FB_CIRRUS is not set
998# CONFIG_FB_PM2 is not set
999# CONFIG_FB_CYBER2000 is not set
1000# CONFIG_FB_OF is not set
1001# CONFIG_FB_CT65550 is not set
1002# CONFIG_FB_ASILIANT is not set
1003# CONFIG_FB_IMSTT is not set
1004# CONFIG_FB_VGA16 is not set
1005# CONFIG_FB_S1D13XXX is not set
1006# CONFIG_FB_NVIDIA is not set
1007# CONFIG_FB_RIVA is not set
1008# CONFIG_FB_MATROX is not set
1009CONFIG_FB_RADEON=y
1010CONFIG_FB_RADEON_I2C=y
1011CONFIG_FB_RADEON_BACKLIGHT=y
1012# CONFIG_FB_RADEON_DEBUG is not set
1013# CONFIG_FB_ATY128 is not set
1014# CONFIG_FB_ATY is not set
1015# CONFIG_FB_S3 is not set
1016# CONFIG_FB_SAVAGE is not set
1017# CONFIG_FB_SIS is not set
1018# CONFIG_FB_VIA is not set
1019# CONFIG_FB_NEOMAGIC is not set
1020# CONFIG_FB_KYRO is not set
1021CONFIG_FB_3DFX=y
1022# CONFIG_FB_3DFX_ACCEL is not set
1023# CONFIG_FB_VOODOO1 is not set
1024# CONFIG_FB_VT8623 is not set
1025# CONFIG_FB_TRIDENT is not set
1026# CONFIG_FB_ARK is not set
1027# CONFIG_FB_PM3 is not set
1028# CONFIG_FB_CARMINE is not set
1029# CONFIG_FB_IBM_GXT4500 is not set
1030# CONFIG_FB_VIRTUAL is not set
1031# CONFIG_FB_METRONOME is not set
1032# CONFIG_FB_MB862XX is not set
1033CONFIG_BACKLIGHT_LCD_SUPPORT=y
1034CONFIG_LCD_CLASS_DEVICE=m
1035# CONFIG_LCD_ILI9320 is not set
1036# CONFIG_LCD_PLATFORM is not set
1037CONFIG_BACKLIGHT_CLASS_DEVICE=y
1038CONFIG_BACKLIGHT_GENERIC=y
1039
1040#
1041# Display device support
1042#
1043CONFIG_DISPLAY_SUPPORT=m
1044
1045#
1046# Display hardware drivers
1047#
1048
1049#
1050# Console display driver support
1051#
1052CONFIG_VGA_CONSOLE=y
1053# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1054CONFIG_DUMMY_CONSOLE=y
1055CONFIG_FRAMEBUFFER_CONSOLE=y
1056# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1057# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1058# CONFIG_FONTS is not set
1059CONFIG_FONT_8x8=y
1060CONFIG_FONT_8x16=y
1061CONFIG_LOGO=y
1062CONFIG_LOGO_LINUX_MONO=y
1063CONFIG_LOGO_LINUX_VGA16=y
1064CONFIG_LOGO_LINUX_CLUT224=y
1065# CONFIG_SOUND is not set
1066CONFIG_HID_SUPPORT=y
1067CONFIG_HID=y
1068# CONFIG_HID_DEBUG is not set
1069# CONFIG_HIDRAW is not set
1070
1071#
1072# USB Input Devices
1073#
1074CONFIG_USB_HID=y
1075# CONFIG_HID_PID is not set
1076# CONFIG_USB_HIDDEV is not set
1077
1078#
1079# Special HID drivers
1080#
1081CONFIG_HID_COMPAT=y
1082CONFIG_HID_A4TECH=y
1083CONFIG_HID_APPLE=y
1084CONFIG_HID_BELKIN=y
1085CONFIG_HID_CHERRY=y
1086CONFIG_HID_CHICONY=y
1087CONFIG_HID_CYPRESS=y
1088CONFIG_HID_EZKEY=y
1089CONFIG_HID_GYRATION=y
1090CONFIG_HID_LOGITECH=y
1091# CONFIG_LOGITECH_FF is not set
1092# CONFIG_LOGIRUMBLEPAD2_FF is not set
1093CONFIG_HID_MICROSOFT=y
1094CONFIG_HID_MONTEREY=y
1095CONFIG_HID_NTRIG=y
1096CONFIG_HID_PANTHERLORD=y
1097# CONFIG_PANTHERLORD_FF is not set
1098CONFIG_HID_PETALYNX=y
1099CONFIG_HID_SAMSUNG=y
1100CONFIG_HID_SONY=y
1101CONFIG_HID_SUNPLUS=y
1102# CONFIG_GREENASIA_FF is not set
1103CONFIG_HID_TOPSEED=y
1104# CONFIG_THRUSTMASTER_FF is not set
1105# CONFIG_ZEROPLUS_FF is not set
1106CONFIG_USB_SUPPORT=y
1107CONFIG_USB_ARCH_HAS_HCD=y
1108CONFIG_USB_ARCH_HAS_OHCI=y
1109CONFIG_USB_ARCH_HAS_EHCI=y
1110CONFIG_USB=y
1111# CONFIG_USB_DEBUG is not set
1112# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1113
1114#
1115# Miscellaneous USB options
1116#
1117CONFIG_USB_DEVICEFS=y
1118CONFIG_USB_DEVICE_CLASS=y
1119# CONFIG_USB_DYNAMIC_MINORS is not set
1120# CONFIG_USB_OTG is not set
1121CONFIG_USB_MON=y
1122# CONFIG_USB_WUSB is not set
1123# CONFIG_USB_WUSB_CBAF is not set
1124
1125#
1126# USB Host Controller Drivers
1127#
1128# CONFIG_USB_C67X00_HCD is not set
1129# CONFIG_USB_EHCI_HCD is not set
1130# CONFIG_USB_OXU210HP_HCD is not set
1131# CONFIG_USB_ISP116X_HCD is not set
1132# CONFIG_USB_ISP1760_HCD is not set
1133CONFIG_USB_OHCI_HCD=y
1134# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1135# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1136# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1137CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1138CONFIG_USB_UHCI_HCD=y
1139# CONFIG_USB_SL811_HCD is not set
1140# CONFIG_USB_R8A66597_HCD is not set
1141# CONFIG_USB_WHCI_HCD is not set
1142# CONFIG_USB_HWA_HCD is not set
1143
1144#
1145# USB Device Class drivers
1146#
1147# CONFIG_USB_ACM is not set
1148# CONFIG_USB_PRINTER is not set
1149# CONFIG_USB_WDM is not set
1150# CONFIG_USB_TMC is not set
1151
1152#
1153# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
1154#
1155
1156#
1157# see USB_STORAGE Help for more information
1158#
1159CONFIG_USB_STORAGE=m
1160# CONFIG_USB_STORAGE_DEBUG is not set
1161# CONFIG_USB_STORAGE_DATAFAB is not set
1162# CONFIG_USB_STORAGE_FREECOM is not set
1163# CONFIG_USB_STORAGE_ISD200 is not set
1164# CONFIG_USB_STORAGE_USBAT is not set
1165# CONFIG_USB_STORAGE_SDDR09 is not set
1166# CONFIG_USB_STORAGE_SDDR55 is not set
1167# CONFIG_USB_STORAGE_JUMPSHOT is not set
1168# CONFIG_USB_STORAGE_ALAUDA is not set
1169# CONFIG_USB_STORAGE_ONETOUCH is not set
1170# CONFIG_USB_STORAGE_KARMA is not set
1171# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1172# CONFIG_USB_LIBUSUAL is not set
1173
1174#
1175# USB Imaging devices
1176#
1177# CONFIG_USB_MDC800 is not set
1178# CONFIG_USB_MICROTEK is not set
1179
1180#
1181# USB port drivers
1182#
1183# CONFIG_USB_USS720 is not set
1184# CONFIG_USB_SERIAL is not set
1185
1186#
1187# USB Miscellaneous drivers
1188#
1189# CONFIG_USB_EMI62 is not set
1190# CONFIG_USB_EMI26 is not set
1191# CONFIG_USB_ADUTUX is not set
1192# CONFIG_USB_SEVSEG is not set
1193# CONFIG_USB_RIO500 is not set
1194# CONFIG_USB_LEGOTOWER is not set
1195# CONFIG_USB_LCD is not set
1196# CONFIG_USB_BERRY_CHARGE is not set
1197# CONFIG_USB_LED is not set
1198# CONFIG_USB_CYPRESS_CY7C63 is not set
1199# CONFIG_USB_CYTHERM is not set
1200# CONFIG_USB_PHIDGET is not set
1201# CONFIG_USB_IDMOUSE is not set
1202# CONFIG_USB_FTDI_ELAN is not set
1203# CONFIG_USB_APPLEDISPLAY is not set
1204# CONFIG_USB_LD is not set
1205# CONFIG_USB_TRANCEVIBRATOR is not set
1206# CONFIG_USB_IOWARRIOR is not set
1207# CONFIG_USB_TEST is not set
1208# CONFIG_USB_ISIGHTFW is not set
1209# CONFIG_USB_VST is not set
1210# CONFIG_USB_GADGET is not set
1211
1212#
1213# OTG and related infrastructure
1214#
1215# CONFIG_UWB is not set
1216# CONFIG_MMC is not set
1217# CONFIG_MEMSTICK is not set
1218# CONFIG_NEW_LEDS is not set
1219# CONFIG_ACCESSIBILITY is not set
1220# CONFIG_INFINIBAND is not set
1221# CONFIG_EDAC is not set
1222CONFIG_RTC_LIB=y
1223CONFIG_RTC_CLASS=y
1224CONFIG_RTC_HCTOSYS=y
1225CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1226# CONFIG_RTC_DEBUG is not set
1227
1228#
1229# RTC interfaces
1230#
1231CONFIG_RTC_INTF_SYSFS=y
1232CONFIG_RTC_INTF_PROC=y
1233CONFIG_RTC_INTF_DEV=y
1234# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1235# CONFIG_RTC_DRV_TEST is not set
1236
1237#
1238# I2C RTC drivers
1239#
1240# CONFIG_RTC_DRV_DS1307 is not set
1241# CONFIG_RTC_DRV_DS1374 is not set
1242# CONFIG_RTC_DRV_DS1672 is not set
1243# CONFIG_RTC_DRV_MAX6900 is not set
1244# CONFIG_RTC_DRV_RS5C372 is not set
1245# CONFIG_RTC_DRV_ISL1208 is not set
1246# CONFIG_RTC_DRV_X1205 is not set
1247# CONFIG_RTC_DRV_PCF8563 is not set
1248# CONFIG_RTC_DRV_PCF8583 is not set
1249# CONFIG_RTC_DRV_M41T80 is not set
1250# CONFIG_RTC_DRV_S35390A is not set
1251# CONFIG_RTC_DRV_FM3130 is not set
1252# CONFIG_RTC_DRV_RX8581 is not set
1253
1254#
1255# SPI RTC drivers
1256#
1257
1258#
1259# Platform RTC drivers
1260#
1261CONFIG_RTC_DRV_CMOS=y
1262# CONFIG_RTC_DRV_DS1286 is not set
1263# CONFIG_RTC_DRV_DS1511 is not set
1264# CONFIG_RTC_DRV_DS1553 is not set
1265# CONFIG_RTC_DRV_DS1742 is not set
1266# CONFIG_RTC_DRV_STK17TA8 is not set
1267# CONFIG_RTC_DRV_M48T86 is not set
1268# CONFIG_RTC_DRV_M48T35 is not set
1269# CONFIG_RTC_DRV_M48T59 is not set
1270# CONFIG_RTC_DRV_BQ4802 is not set
1271# CONFIG_RTC_DRV_V3020 is not set
1272
1273#
1274# on-CPU RTC drivers
1275#
1276# CONFIG_RTC_DRV_PPC is not set
1277# CONFIG_DMADEVICES is not set
1278# CONFIG_AUXDISPLAY is not set
1279# CONFIG_UIO is not set
1280# CONFIG_STAGING is not set
1281
1282#
1283# File systems
1284#
1285CONFIG_EXT2_FS=y
1286# CONFIG_EXT2_FS_XATTR is not set
1287# CONFIG_EXT2_FS_XIP is not set
1288CONFIG_EXT3_FS=y
1289CONFIG_EXT3_FS_XATTR=y
1290# CONFIG_EXT3_FS_POSIX_ACL is not set
1291# CONFIG_EXT3_FS_SECURITY is not set
1292CONFIG_EXT4_FS=y
1293# CONFIG_EXT4DEV_COMPAT is not set
1294CONFIG_EXT4_FS_XATTR=y
1295# CONFIG_EXT4_FS_POSIX_ACL is not set
1296# CONFIG_EXT4_FS_SECURITY is not set
1297CONFIG_JBD=y
1298CONFIG_JBD2=y
1299CONFIG_FS_MBCACHE=y
1300# CONFIG_REISERFS_FS is not set
1301# CONFIG_JFS_FS is not set
1302# CONFIG_FS_POSIX_ACL is not set
1303CONFIG_FILE_LOCKING=y
1304# CONFIG_XFS_FS is not set
1305# CONFIG_GFS2_FS is not set
1306# CONFIG_OCFS2_FS is not set
1307# CONFIG_BTRFS_FS is not set
1308CONFIG_DNOTIFY=y
1309CONFIG_INOTIFY=y
1310CONFIG_INOTIFY_USER=y
1311# CONFIG_QUOTA is not set
1312# CONFIG_AUTOFS_FS is not set
1313# CONFIG_AUTOFS4_FS is not set
1314# CONFIG_FUSE_FS is not set
1315
1316#
1317# CD-ROM/DVD Filesystems
1318#
1319CONFIG_ISO9660_FS=y
1320# CONFIG_JOLIET is not set
1321# CONFIG_ZISOFS is not set
1322# CONFIG_UDF_FS is not set
1323
1324#
1325# DOS/FAT/NT Filesystems
1326#
1327CONFIG_FAT_FS=m
1328CONFIG_MSDOS_FS=m
1329CONFIG_VFAT_FS=m
1330CONFIG_FAT_DEFAULT_CODEPAGE=437
1331CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1332# CONFIG_NTFS_FS is not set
1333
1334#
1335# Pseudo filesystems
1336#
1337CONFIG_PROC_FS=y
1338CONFIG_PROC_KCORE=y
1339CONFIG_PROC_SYSCTL=y
1340CONFIG_PROC_PAGE_MONITOR=y
1341CONFIG_SYSFS=y
1342CONFIG_TMPFS=y
1343# CONFIG_TMPFS_POSIX_ACL is not set
1344# CONFIG_HUGETLB_PAGE is not set
1345# CONFIG_CONFIGFS_FS is not set
1346CONFIG_MISC_FILESYSTEMS=y
1347# CONFIG_ADFS_FS is not set
1348CONFIG_AFFS_FS=m
1349# CONFIG_HFS_FS is not set
1350# CONFIG_HFSPLUS_FS is not set
1351# CONFIG_BEFS_FS is not set
1352# CONFIG_BFS_FS is not set
1353# CONFIG_EFS_FS is not set
1354# CONFIG_CRAMFS is not set
1355# CONFIG_SQUASHFS is not set
1356# CONFIG_VXFS_FS is not set
1357# CONFIG_MINIX_FS is not set
1358# CONFIG_OMFS_FS is not set
1359# CONFIG_HPFS_FS is not set
1360# CONFIG_QNX4FS_FS is not set
1361# CONFIG_ROMFS_FS is not set
1362# CONFIG_SYSV_FS is not set
1363# CONFIG_UFS_FS is not set
1364CONFIG_NETWORK_FILESYSTEMS=y
1365# CONFIG_NFS_FS is not set
1366# CONFIG_NFSD is not set
1367# CONFIG_SMB_FS is not set
1368# CONFIG_CIFS is not set
1369# CONFIG_NCP_FS is not set
1370# CONFIG_CODA_FS is not set
1371# CONFIG_AFS_FS is not set
1372
1373#
1374# Partition Types
1375#
1376CONFIG_PARTITION_ADVANCED=y
1377# CONFIG_ACORN_PARTITION is not set
1378# CONFIG_OSF_PARTITION is not set
1379CONFIG_AMIGA_PARTITION=y
1380# CONFIG_ATARI_PARTITION is not set
1381# CONFIG_MAC_PARTITION is not set
1382CONFIG_MSDOS_PARTITION=y
1383# CONFIG_BSD_DISKLABEL is not set
1384# CONFIG_MINIX_SUBPARTITION is not set
1385# CONFIG_SOLARIS_X86_PARTITION is not set
1386# CONFIG_UNIXWARE_DISKLABEL is not set
1387# CONFIG_LDM_PARTITION is not set
1388# CONFIG_SGI_PARTITION is not set
1389# CONFIG_ULTRIX_PARTITION is not set
1390# CONFIG_SUN_PARTITION is not set
1391# CONFIG_KARMA_PARTITION is not set
1392# CONFIG_EFI_PARTITION is not set
1393# CONFIG_SYSV68_PARTITION is not set
1394CONFIG_NLS=y
1395CONFIG_NLS_DEFAULT="iso8859-1"
1396# CONFIG_NLS_CODEPAGE_437 is not set
1397# CONFIG_NLS_CODEPAGE_737 is not set
1398# CONFIG_NLS_CODEPAGE_775 is not set
1399# CONFIG_NLS_CODEPAGE_850 is not set
1400# CONFIG_NLS_CODEPAGE_852 is not set
1401# CONFIG_NLS_CODEPAGE_855 is not set
1402# CONFIG_NLS_CODEPAGE_857 is not set
1403# CONFIG_NLS_CODEPAGE_860 is not set
1404# CONFIG_NLS_CODEPAGE_861 is not set
1405# CONFIG_NLS_CODEPAGE_862 is not set
1406# CONFIG_NLS_CODEPAGE_863 is not set
1407# CONFIG_NLS_CODEPAGE_864 is not set
1408# CONFIG_NLS_CODEPAGE_865 is not set
1409# CONFIG_NLS_CODEPAGE_866 is not set
1410# CONFIG_NLS_CODEPAGE_869 is not set
1411# CONFIG_NLS_CODEPAGE_936 is not set
1412# CONFIG_NLS_CODEPAGE_950 is not set
1413# CONFIG_NLS_CODEPAGE_932 is not set
1414# CONFIG_NLS_CODEPAGE_949 is not set
1415# CONFIG_NLS_CODEPAGE_874 is not set
1416# CONFIG_NLS_ISO8859_8 is not set
1417# CONFIG_NLS_CODEPAGE_1250 is not set
1418# CONFIG_NLS_CODEPAGE_1251 is not set
1419CONFIG_NLS_ASCII=y
1420CONFIG_NLS_ISO8859_1=m
1421# CONFIG_NLS_ISO8859_2 is not set
1422# CONFIG_NLS_ISO8859_3 is not set
1423# CONFIG_NLS_ISO8859_4 is not set
1424# CONFIG_NLS_ISO8859_5 is not set
1425# CONFIG_NLS_ISO8859_6 is not set
1426# CONFIG_NLS_ISO8859_7 is not set
1427# CONFIG_NLS_ISO8859_9 is not set
1428# CONFIG_NLS_ISO8859_13 is not set
1429# CONFIG_NLS_ISO8859_14 is not set
1430# CONFIG_NLS_ISO8859_15 is not set
1431# CONFIG_NLS_KOI8_R is not set
1432# CONFIG_NLS_KOI8_U is not set
1433# CONFIG_NLS_UTF8 is not set
1434# CONFIG_DLM is not set
1435
1436#
1437# Library routines
1438#
1439CONFIG_BITREVERSE=y
1440CONFIG_GENERIC_FIND_LAST_BIT=y
1441CONFIG_CRC_CCITT=m
1442CONFIG_CRC16=y
1443CONFIG_CRC_T10DIF=y
1444# CONFIG_CRC_ITU_T is not set
1445CONFIG_CRC32=y
1446# CONFIG_CRC7 is not set
1447# CONFIG_LIBCRC32C is not set
1448CONFIG_ZLIB_INFLATE=m
1449CONFIG_ZLIB_DEFLATE=m
1450CONFIG_PLIST=y
1451CONFIG_HAS_IOMEM=y
1452CONFIG_HAS_IOPORT=y
1453CONFIG_HAS_DMA=y
1454CONFIG_HAVE_LMB=y
1455
1456#
1457# Kernel hacking
1458#
1459# CONFIG_PRINTK_TIME is not set
1460CONFIG_ENABLE_WARN_DEPRECATED=y
1461CONFIG_ENABLE_MUST_CHECK=y
1462CONFIG_FRAME_WARN=1024
1463CONFIG_MAGIC_SYSRQ=y
1464# CONFIG_UNUSED_SYMBOLS is not set
1465# CONFIG_DEBUG_FS is not set
1466# CONFIG_HEADERS_CHECK is not set
1467CONFIG_DEBUG_KERNEL=y
1468# CONFIG_DEBUG_SHIRQ is not set
1469CONFIG_DETECT_SOFTLOCKUP=y
1470# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1471CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1472CONFIG_SCHED_DEBUG=y
1473# CONFIG_SCHEDSTATS is not set
1474# CONFIG_TIMER_STATS is not set
1475# CONFIG_DEBUG_OBJECTS is not set
1476# CONFIG_SLUB_DEBUG_ON is not set
1477# CONFIG_SLUB_STATS is not set
1478# CONFIG_DEBUG_RT_MUTEXES is not set
1479# CONFIG_RT_MUTEX_TESTER is not set
1480# CONFIG_DEBUG_SPINLOCK is not set
1481CONFIG_DEBUG_MUTEXES=y
1482CONFIG_DEBUG_SPINLOCK_SLEEP=y
1483# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1484# CONFIG_DEBUG_KOBJECT is not set
1485# CONFIG_DEBUG_HIGHMEM is not set
1486CONFIG_DEBUG_BUGVERBOSE=y
1487# CONFIG_DEBUG_INFO is not set
1488# CONFIG_DEBUG_VM is not set
1489# CONFIG_DEBUG_WRITECOUNT is not set
1490CONFIG_DEBUG_MEMORY_INIT=y
1491# CONFIG_DEBUG_LIST is not set
1492# CONFIG_DEBUG_SG is not set
1493# CONFIG_DEBUG_NOTIFIERS is not set
1494# CONFIG_BOOT_PRINTK_DELAY is not set
1495# CONFIG_RCU_TORTURE_TEST is not set
1496# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1497# CONFIG_BACKTRACE_SELF_TEST is not set
1498# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1499# CONFIG_FAULT_INJECTION is not set
1500# CONFIG_LATENCYTOP is not set
1501CONFIG_SYSCTL_SYSCALL_CHECK=y
1502CONFIG_HAVE_FUNCTION_TRACER=y
1503CONFIG_HAVE_DYNAMIC_FTRACE=y
1504CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1505
1506#
1507# Tracers
1508#
1509# CONFIG_FUNCTION_TRACER is not set
1510# CONFIG_SCHED_TRACER is not set
1511# CONFIG_CONTEXT_SWITCH_TRACER is not set
1512# CONFIG_BOOT_TRACER is not set
1513# CONFIG_TRACE_BRANCH_PROFILING is not set
1514# CONFIG_STACK_TRACER is not set
1515# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1516# CONFIG_SAMPLES is not set
1517CONFIG_HAVE_ARCH_KGDB=y
1518# CONFIG_KGDB is not set
1519CONFIG_PRINT_STACK_DEPTH=64
1520# CONFIG_DEBUG_STACKOVERFLOW is not set
1521# CONFIG_DEBUG_STACK_USAGE is not set
1522# CONFIG_DEBUG_PAGEALLOC is not set
1523# CONFIG_CODE_PATCHING_SELFTEST is not set
1524# CONFIG_FTR_FIXUP_SELFTEST is not set
1525# CONFIG_MSI_BITMAP_SELFTEST is not set
1526CONFIG_XMON=y
1527CONFIG_XMON_DEFAULT=y
1528CONFIG_XMON_DISASSEMBLY=y
1529CONFIG_DEBUGGER=y
1530CONFIG_IRQSTACKS=y
1531# CONFIG_BDI_SWITCH is not set
1532# CONFIG_BOOTX_TEXT is not set
1533# CONFIG_PPC_EARLY_DEBUG is not set
1534
1535#
1536# Security options
1537#
1538# CONFIG_KEYS is not set
1539# CONFIG_SECURITY is not set
1540# CONFIG_SECURITYFS is not set
1541# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1542CONFIG_CRYPTO=y
1543
1544#
1545# Crypto core or helper
1546#
1547# CONFIG_CRYPTO_FIPS is not set
1548CONFIG_CRYPTO_ALGAPI=m
1549CONFIG_CRYPTO_ALGAPI2=m
1550CONFIG_CRYPTO_AEAD2=m
1551CONFIG_CRYPTO_BLKCIPHER=m
1552CONFIG_CRYPTO_BLKCIPHER2=m
1553CONFIG_CRYPTO_HASH=m
1554CONFIG_CRYPTO_HASH2=m
1555CONFIG_CRYPTO_RNG2=m
1556CONFIG_CRYPTO_MANAGER=m
1557CONFIG_CRYPTO_MANAGER2=m
1558# CONFIG_CRYPTO_GF128MUL is not set
1559# CONFIG_CRYPTO_NULL is not set
1560# CONFIG_CRYPTO_CRYPTD is not set
1561# CONFIG_CRYPTO_AUTHENC is not set
1562# CONFIG_CRYPTO_TEST is not set
1563
1564#
1565# Authenticated Encryption with Associated Data
1566#
1567# CONFIG_CRYPTO_CCM is not set
1568# CONFIG_CRYPTO_GCM is not set
1569# CONFIG_CRYPTO_SEQIV is not set
1570
1571#
1572# Block modes
1573#
1574CONFIG_CRYPTO_CBC=m
1575# CONFIG_CRYPTO_CTR is not set
1576# CONFIG_CRYPTO_CTS is not set
1577CONFIG_CRYPTO_ECB=m
1578# CONFIG_CRYPTO_LRW is not set
1579CONFIG_CRYPTO_PCBC=m
1580# CONFIG_CRYPTO_XTS is not set
1581
1582#
1583# Hash modes
1584#
1585# CONFIG_CRYPTO_HMAC is not set
1586# CONFIG_CRYPTO_XCBC is not set
1587
1588#
1589# Digest
1590#
1591# CONFIG_CRYPTO_CRC32C is not set
1592# CONFIG_CRYPTO_MD4 is not set
1593# CONFIG_CRYPTO_MD5 is not set
1594# CONFIG_CRYPTO_MICHAEL_MIC is not set
1595# CONFIG_CRYPTO_RMD128 is not set
1596# CONFIG_CRYPTO_RMD160 is not set
1597# CONFIG_CRYPTO_RMD256 is not set
1598# CONFIG_CRYPTO_RMD320 is not set
1599CONFIG_CRYPTO_SHA1=m
1600# CONFIG_CRYPTO_SHA256 is not set
1601# CONFIG_CRYPTO_SHA512 is not set
1602# CONFIG_CRYPTO_TGR192 is not set
1603# CONFIG_CRYPTO_WP512 is not set
1604
1605#
1606# Ciphers
1607#
1608# CONFIG_CRYPTO_AES is not set
1609# CONFIG_CRYPTO_ANUBIS is not set
1610CONFIG_CRYPTO_ARC4=m
1611# CONFIG_CRYPTO_BLOWFISH is not set
1612# CONFIG_CRYPTO_CAMELLIA is not set
1613# CONFIG_CRYPTO_CAST5 is not set
1614# CONFIG_CRYPTO_CAST6 is not set
1615# CONFIG_CRYPTO_DES is not set
1616# CONFIG_CRYPTO_FCRYPT is not set
1617# CONFIG_CRYPTO_KHAZAD is not set
1618# CONFIG_CRYPTO_SALSA20 is not set
1619# CONFIG_CRYPTO_SEED is not set
1620# CONFIG_CRYPTO_SERPENT is not set
1621# CONFIG_CRYPTO_TEA is not set
1622# CONFIG_CRYPTO_TWOFISH is not set
1623
1624#
1625# Compression
1626#
1627# CONFIG_CRYPTO_DEFLATE is not set
1628# CONFIG_CRYPTO_LZO is not set
1629
1630#
1631# Random Number Generation
1632#
1633# CONFIG_CRYPTO_ANSI_CPRNG is not set
1634# CONFIG_CRYPTO_HW is not set
1635# CONFIG_PPC_CLOCK is not set
1636# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index 81afc8b373d7..af0cd55605d0 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc2 3# Linux kernel version: 2.6.29-rc3
4# Mon Jan 26 21:40:44 2009 4# Fri Feb 6 09:48:53 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -388,7 +388,10 @@ CONFIG_MTD=y
388CONFIG_MTD_CONCAT=y 388CONFIG_MTD_CONCAT=y
389CONFIG_MTD_PARTITIONS=y 389CONFIG_MTD_PARTITIONS=y
390# CONFIG_MTD_TESTS is not set 390# CONFIG_MTD_TESTS is not set
391# CONFIG_MTD_REDBOOT_PARTS is not set 391CONFIG_MTD_REDBOOT_PARTS=y
392CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
393# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
394# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
392CONFIG_MTD_CMDLINE_PARTS=y 395CONFIG_MTD_CMDLINE_PARTS=y
393# CONFIG_MTD_OF_PARTS is not set 396# CONFIG_MTD_OF_PARTS is not set
394# CONFIG_MTD_AR7_PARTS is not set 397# CONFIG_MTD_AR7_PARTS is not set
@@ -502,7 +505,7 @@ CONFIG_MISC_DEVICES=y
502# 505#
503# EEPROM support 506# EEPROM support
504# 507#
505# CONFIG_EEPROM_AT24 is not set 508CONFIG_EEPROM_AT24=y
506# CONFIG_EEPROM_LEGACY is not set 509# CONFIG_EEPROM_LEGACY is not set
507# CONFIG_EEPROM_93CX6 is not set 510# CONFIG_EEPROM_93CX6 is not set
508CONFIG_HAVE_IDE=y 511CONFIG_HAVE_IDE=y
@@ -678,7 +681,7 @@ CONFIG_PHYLIB=y
678# CONFIG_MARVELL_PHY is not set 681# CONFIG_MARVELL_PHY is not set
679# CONFIG_DAVICOM_PHY is not set 682# CONFIG_DAVICOM_PHY is not set
680# CONFIG_QSEMI_PHY is not set 683# CONFIG_QSEMI_PHY is not set
681# CONFIG_LXT_PHY is not set 684CONFIG_LXT_PHY=y
682# CONFIG_CICADA_PHY is not set 685# CONFIG_CICADA_PHY is not set
683# CONFIG_VITESSE_PHY is not set 686# CONFIG_VITESSE_PHY is not set
684# CONFIG_SMSC_PHY is not set 687# CONFIG_SMSC_PHY is not set
@@ -815,8 +818,6 @@ CONFIG_LEGACY_PTY_COUNT=256
815# CONFIG_IPMI_HANDLER is not set 818# CONFIG_IPMI_HANDLER is not set
816# CONFIG_HW_RANDOM is not set 819# CONFIG_HW_RANDOM is not set
817# CONFIG_NVRAM is not set 820# CONFIG_NVRAM is not set
818CONFIG_GEN_RTC=y
819# CONFIG_GEN_RTC_X is not set
820# CONFIG_R3964 is not set 821# CONFIG_R3964 is not set
821# CONFIG_APPLICOM is not set 822# CONFIG_APPLICOM is not set
822# CONFIG_RAW_DRIVER is not set 823# CONFIG_RAW_DRIVER is not set
@@ -1281,7 +1282,61 @@ CONFIG_NEW_LEDS=y
1281# CONFIG_ACCESSIBILITY is not set 1282# CONFIG_ACCESSIBILITY is not set
1282# CONFIG_INFINIBAND is not set 1283# CONFIG_INFINIBAND is not set
1283# CONFIG_EDAC is not set 1284# CONFIG_EDAC is not set
1284# CONFIG_RTC_CLASS is not set 1285CONFIG_RTC_LIB=y
1286CONFIG_RTC_CLASS=y
1287CONFIG_RTC_HCTOSYS=y
1288CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1289# CONFIG_RTC_DEBUG is not set
1290
1291#
1292# RTC interfaces
1293#
1294CONFIG_RTC_INTF_SYSFS=y
1295CONFIG_RTC_INTF_PROC=y
1296CONFIG_RTC_INTF_DEV=y
1297# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1298# CONFIG_RTC_DRV_TEST is not set
1299
1300#
1301# I2C RTC drivers
1302#
1303CONFIG_RTC_DRV_DS1307=y
1304# CONFIG_RTC_DRV_DS1374 is not set
1305# CONFIG_RTC_DRV_DS1672 is not set
1306# CONFIG_RTC_DRV_MAX6900 is not set
1307# CONFIG_RTC_DRV_RS5C372 is not set
1308# CONFIG_RTC_DRV_ISL1208 is not set
1309# CONFIG_RTC_DRV_X1205 is not set
1310# CONFIG_RTC_DRV_PCF8563 is not set
1311# CONFIG_RTC_DRV_PCF8583 is not set
1312# CONFIG_RTC_DRV_M41T80 is not set
1313# CONFIG_RTC_DRV_S35390A is not set
1314# CONFIG_RTC_DRV_FM3130 is not set
1315# CONFIG_RTC_DRV_RX8581 is not set
1316
1317#
1318# SPI RTC drivers
1319#
1320
1321#
1322# Platform RTC drivers
1323#
1324# CONFIG_RTC_DRV_CMOS is not set
1325# CONFIG_RTC_DRV_DS1286 is not set
1326# CONFIG_RTC_DRV_DS1511 is not set
1327# CONFIG_RTC_DRV_DS1553 is not set
1328# CONFIG_RTC_DRV_DS1742 is not set
1329# CONFIG_RTC_DRV_STK17TA8 is not set
1330# CONFIG_RTC_DRV_M48T86 is not set
1331# CONFIG_RTC_DRV_M48T35 is not set
1332# CONFIG_RTC_DRV_M48T59 is not set
1333# CONFIG_RTC_DRV_BQ4802 is not set
1334# CONFIG_RTC_DRV_V3020 is not set
1335
1336#
1337# on-CPU RTC drivers
1338#
1339# CONFIG_RTC_DRV_PPC is not set
1285# CONFIG_DMADEVICES is not set 1340# CONFIG_DMADEVICES is not set
1286# CONFIG_UIO is not set 1341# CONFIG_UIO is not set
1287# CONFIG_STAGING is not set 1342# CONFIG_STAGING is not set
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 88c6295b76c1..252401824575 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -2067,9 +2067,9 @@ CONFIG_DEBUG_STACKOVERFLOW=y
2067CONFIG_DEBUG_STACK_USAGE=y 2067CONFIG_DEBUG_STACK_USAGE=y
2068# CONFIG_DEBUG_PAGEALLOC is not set 2068# CONFIG_DEBUG_PAGEALLOC is not set
2069# CONFIG_HCALL_STATS is not set 2069# CONFIG_HCALL_STATS is not set
2070# CONFIG_CODE_PATCHING_SELFTEST is not set 2070CONFIG_CODE_PATCHING_SELFTEST=y
2071# CONFIG_FTR_FIXUP_SELFTEST is not set 2071CONFIG_FTR_FIXUP_SELFTEST=y
2072# CONFIG_MSI_BITMAP_SELFTEST is not set 2072CONFIG_MSI_BITMAP_SELFTEST=y
2073CONFIG_XMON=y 2073CONFIG_XMON=y
2074# CONFIG_XMON_DEFAULT is not set 2074# CONFIG_XMON_DEFAULT is not set
2075CONFIG_XMON_DISASSEMBLY=y 2075CONFIG_XMON_DISASSEMBLY=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 61b100849715..f1889abb89b1 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -95,7 +95,7 @@ CONFIG_CGROUP_CPUACCT=y
95CONFIG_SYSFS_DEPRECATED=y 95CONFIG_SYSFS_DEPRECATED=y
96CONFIG_SYSFS_DEPRECATED_V2=y 96CONFIG_SYSFS_DEPRECATED_V2=y
97CONFIG_PROC_PID_CPUSET=y 97CONFIG_PROC_PID_CPUSET=y
98# CONFIG_RELAY is not set 98CONFIG_RELAY=y
99CONFIG_NAMESPACES=y 99CONFIG_NAMESPACES=y
100# CONFIG_UTS_NS is not set 100# CONFIG_UTS_NS is not set
101# CONFIG_IPC_NS is not set 101# CONFIG_IPC_NS is not set
diff --git a/arch/powerpc/include/asm/code-patching.h b/arch/powerpc/include/asm/code-patching.h
index 107d9b915e33..37c32aba79b7 100644
--- a/arch/powerpc/include/asm/code-patching.h
+++ b/arch/powerpc/include/asm/code-patching.h
@@ -11,9 +11,7 @@
11 */ 11 */
12 12
13#include <asm/types.h> 13#include <asm/types.h>
14 14#include <asm/ppc-opcode.h>
15#define PPC_NOP_INSTR 0x60000000
16#define PPC_LWSYNC_INSTR 0x7c2004ac
17 15
18/* Flags for create_branch: 16/* Flags for create_branch:
19 * "b" == create_branch(addr, target, 0); 17 * "b" == create_branch(addr, target, 0);
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 21172badd708..80f315e8a421 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -145,6 +145,7 @@ extern const char *powerpc_base_platform;
145#define CPU_FTR_USE_TB ASM_CONST(0x0000000000000040) 145#define CPU_FTR_USE_TB ASM_CONST(0x0000000000000040)
146#define CPU_FTR_L2CSR ASM_CONST(0x0000000000000080) 146#define CPU_FTR_L2CSR ASM_CONST(0x0000000000000080)
147#define CPU_FTR_601 ASM_CONST(0x0000000000000100) 147#define CPU_FTR_601 ASM_CONST(0x0000000000000100)
148#define CPU_FTR_DBELL ASM_CONST(0x0000000000000200)
148#define CPU_FTR_CAN_NAP ASM_CONST(0x0000000000000400) 149#define CPU_FTR_CAN_NAP ASM_CONST(0x0000000000000400)
149#define CPU_FTR_L3CR ASM_CONST(0x0000000000000800) 150#define CPU_FTR_L3CR ASM_CONST(0x0000000000000800)
150#define CPU_FTR_L3_DISABLE_NAP ASM_CONST(0x0000000000001000) 151#define CPU_FTR_L3_DISABLE_NAP ASM_CONST(0x0000000000001000)
@@ -375,7 +376,8 @@ extern const char *powerpc_base_platform;
375 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) 376 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
376#define CPU_FTRS_E500MC (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ 377#define CPU_FTRS_E500MC (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \
377 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \ 378 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \
378 CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE) 379 CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \
380 CPU_FTR_DBELL)
379#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) 381#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
380 382
381/* 64-bit CPUs */ 383/* 64-bit CPUs */
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
new file mode 100644
index 000000000000..501189a543d1
--- /dev/null
+++ b/arch/powerpc/include/asm/dbell.h
@@ -0,0 +1,43 @@
1/*
2 * Copyright 2009 Freescale Semicondutor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * provides masks and opcode images for use by code generation, emulation
10 * and for instructions that older assemblers might not know about
11 */
12#ifndef _ASM_POWERPC_DBELL_H
13#define _ASM_POWERPC_DBELL_H
14
15#include <linux/smp.h>
16#include <linux/threads.h>
17
18#include <asm/ppc-opcode.h>
19
20#define PPC_DBELL_MSG_BRDCAST (0x04000000)
21#define PPC_DBELL_TYPE(x) (((x) & 0xf) << 28)
22enum ppc_dbell {
23 PPC_DBELL = 0, /* doorbell */
24 PPC_DBELL_CRIT = 1, /* critical doorbell */
25 PPC_G_DBELL = 2, /* guest doorbell */
26 PPC_G_DBELL_CRIT = 3, /* guest critical doorbell */
27 PPC_G_DBELL_MC = 4, /* guest mcheck doorbell */
28};
29
30#ifdef CONFIG_SMP
31extern unsigned long dbell_smp_message[NR_CPUS];
32extern void smp_dbell_message_pass(int target, int msg);
33#endif
34
35static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag)
36{
37 u32 msg = PPC_DBELL_TYPE(type) | (flags & PPC_DBELL_MSG_BRDCAST) |
38 (tag & 0x07ffffff);
39
40 __asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));
41}
42
43#endif /* _ASM_POWERPC_DBELL_H */
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 86cef7ddc8d5..c69f2b5f0cc4 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -109,18 +109,8 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
109 * only ISA DMA device we support is the floppy and we have a hack 109 * only ISA DMA device we support is the floppy and we have a hack
110 * in the floppy driver directly to get a device for us. 110 * in the floppy driver directly to get a device for us.
111 */ 111 */
112 112 if (unlikely(dev == NULL))
113 if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) {
114#ifdef CONFIG_PPC64
115 return NULL; 113 return NULL;
116#else
117 /* Use default on 32-bit if dma_ops is not set up */
118 /* TODO: Long term, we should fix drivers so that dev and
119 * archdata dma_ops are set up for all buses.
120 */
121 return &dma_direct_ops;
122#endif
123 }
124 114
125 return dev->archdata.dma_ops; 115 return dev->archdata.dma_ops;
126} 116}
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index b5600ce6055e..1a856b15226e 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -8,6 +8,7 @@
8#endif 8#endif
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11
11#include <asm/ptrace.h> 12#include <asm/ptrace.h>
12#include <asm/cputable.h> 13#include <asm/cputable.h>
13#include <asm/auxvec.h> 14#include <asm/auxvec.h>
@@ -178,7 +179,8 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
178 the loader. We need to make sure that it is out of the way of the program 179 the loader. We need to make sure that it is out of the way of the program
179 that it will "exec", and that there is sufficient room for the brk. */ 180 that it will "exec", and that there is sufficient room for the brk. */
180 181
181#define ELF_ET_DYN_BASE (0x20000000) 182extern unsigned long randomize_et_dyn(unsigned long base);
183#define ELF_ET_DYN_BASE (randomize_et_dyn(0x20000000))
182 184
183/* 185/*
184 * Our registers are always unsigned longs, whether we're a 32 bit 186 * Our registers are always unsigned longs, whether we're a 32 bit
@@ -270,6 +272,14 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
270 int uses_interp); 272 int uses_interp);
271#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b); 273#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b);
272 274
275/* 1GB for 64bit, 8MB for 32bit */
276#define STACK_RND_MASK (is_32bit_task() ? \
277 (0x7ff >> (PAGE_SHIFT - 12)) : \
278 (0x3ffff >> (PAGE_SHIFT - 12)))
279
280extern unsigned long arch_randomize_brk(struct mm_struct *mm);
281#define arch_randomize_brk arch_randomize_brk
282
273#endif /* __KERNEL__ */ 283#endif /* __KERNEL__ */
274 284
275/* 285/*
diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h
index 8428b38a3d30..d60fd18f428c 100644
--- a/arch/powerpc/include/asm/fixmap.h
+++ b/arch/powerpc/include/asm/fixmap.h
@@ -61,7 +61,7 @@ extern void __set_fixmap (enum fixed_addresses idx,
61 * Some hardware wants to get fixmapped without caching. 61 * Some hardware wants to get fixmapped without caching.
62 */ 62 */
63#define set_fixmap_nocache(idx, phys) \ 63#define set_fixmap_nocache(idx, phys) \
64 __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) 64 __set_fixmap(idx, phys, PAGE_KERNEL_NCG)
65 65
66#define clear_fixmap(idx) \ 66#define clear_fixmap(idx) \
67 __set_fixmap(idx, 0, __pgprot(0)) 67 __set_fixmap(idx, 0, __pgprot(0))
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h
index e5f2ae8362f7..dde1296b8b41 100644
--- a/arch/powerpc/include/asm/ftrace.h
+++ b/arch/powerpc/include/asm/ftrace.h
@@ -5,7 +5,44 @@
5#define MCOUNT_ADDR ((long)(_mcount)) 5#define MCOUNT_ADDR ((long)(_mcount))
6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ 6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
7 7
8#ifndef __ASSEMBLY__ 8#ifdef __ASSEMBLY__
9
10/* Based off of objdump optput from glibc */
11
12#define MCOUNT_SAVE_FRAME \
13 stwu r1,-48(r1); \
14 stw r3, 12(r1); \
15 stw r4, 16(r1); \
16 stw r5, 20(r1); \
17 stw r6, 24(r1); \
18 mflr r3; \
19 lwz r4, 52(r1); \
20 mfcr r5; \
21 stw r7, 28(r1); \
22 stw r8, 32(r1); \
23 stw r9, 36(r1); \
24 stw r10,40(r1); \
25 stw r3, 44(r1); \
26 stw r5, 8(r1)
27
28#define MCOUNT_RESTORE_FRAME \
29 lwz r6, 8(r1); \
30 lwz r0, 44(r1); \
31 lwz r3, 12(r1); \
32 mtctr r0; \
33 lwz r4, 16(r1); \
34 mtcr r6; \
35 lwz r5, 20(r1); \
36 lwz r6, 24(r1); \
37 lwz r0, 52(r1); \
38 lwz r7, 28(r1); \
39 lwz r8, 32(r1); \
40 mtlr r0; \
41 lwz r9, 36(r1); \
42 lwz r10,40(r1); \
43 addi r1, r1, 48
44
45#else /* !__ASSEMBLY__ */
9extern void _mcount(void); 46extern void _mcount(void);
10 47
11#ifdef CONFIG_DYNAMIC_FTRACE 48#ifdef CONFIG_DYNAMIC_FTRACE
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h
index 04e4a620952e..684a73f4324f 100644
--- a/arch/powerpc/include/asm/highmem.h
+++ b/arch/powerpc/include/asm/highmem.h
@@ -24,6 +24,7 @@
24 24
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/highmem.h>
27#include <asm/kmap_types.h> 28#include <asm/kmap_types.h>
28#include <asm/tlbflush.h> 29#include <asm/tlbflush.h>
29#include <asm/page.h> 30#include <asm/page.h>
@@ -39,15 +40,15 @@ extern pte_t *pkmap_page_table;
39 * chunk of RAM. 40 * chunk of RAM.
40 */ 41 */
41/* 42/*
42 * We use one full pte table with 4K pages. And with 16K/64K pages pte 43 * We use one full pte table with 4K pages. And with 16K/64K/256K pages pte
43 * table covers enough memory (32MB and 512MB resp.) that both FIXMAP 44 * table covers enough memory (32MB/512MB/2GB resp.), so that both FIXMAP
44 * and PKMAP can be placed in single pte table. We use 1024 pages for 45 * and PKMAP can be placed in a single pte table. We use 512 pages for PKMAP
45 * PKMAP in case of 16K/64K pages. 46 * in case of 16K/64K/256K page sizes.
46 */ 47 */
47#ifdef CONFIG_PPC_4K_PAGES 48#ifdef CONFIG_PPC_4K_PAGES
48#define PKMAP_ORDER PTE_SHIFT 49#define PKMAP_ORDER PTE_SHIFT
49#else 50#else
50#define PKMAP_ORDER 10 51#define PKMAP_ORDER 9
51#endif 52#endif
52#define LAST_PKMAP (1 << PKMAP_ORDER) 53#define LAST_PKMAP (1 << PKMAP_ORDER)
53#ifndef CONFIG_PPC_4K_PAGES 54#ifndef CONFIG_PPC_4K_PAGES
@@ -94,12 +95,13 @@ static inline void *kmap_atomic_prot(struct page *page, enum km_type type, pgpro
94 if (!PageHighMem(page)) 95 if (!PageHighMem(page))
95 return page_address(page); 96 return page_address(page);
96 97
98 debug_kmap_atomic(type);
97 idx = type + KM_TYPE_NR*smp_processor_id(); 99 idx = type + KM_TYPE_NR*smp_processor_id();
98 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 100 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
99#ifdef CONFIG_DEBUG_HIGHMEM 101#ifdef CONFIG_DEBUG_HIGHMEM
100 BUG_ON(!pte_none(*(kmap_pte-idx))); 102 BUG_ON(!pte_none(*(kmap_pte-idx)));
101#endif 103#endif
102 __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot)); 104 __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot), 1);
103 local_flush_tlb_page(NULL, vaddr); 105 local_flush_tlb_page(NULL, vaddr);
104 106
105 return (void*) vaddr; 107 return (void*) vaddr;
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index f75a5fc64d2e..b7e034b0a6dd 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -129,7 +129,7 @@ static inline int irqs_disabled_flags(unsigned long flags)
129 * interrupt-retrigger: should we handle this via lost interrupts and IPIs 129 * interrupt-retrigger: should we handle this via lost interrupts and IPIs
130 * or should we not care like we do now ? --BenH. 130 * or should we not care like we do now ? --BenH.
131 */ 131 */
132struct hw_interrupt_type; 132struct irq_chip;
133 133
134#endif /* __KERNEL__ */ 134#endif /* __KERNEL__ */
135#endif /* _ASM_POWERPC_HW_IRQ_H */ 135#endif /* _ASM_POWERPC_HW_IRQ_H */
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 494cd8b0a278..001f2f11c19b 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -632,6 +632,9 @@ static inline void iosync(void)
632 * ioremap_flags and cannot be hooked (but can be used by a hook on one 632 * ioremap_flags and cannot be hooked (but can be used by a hook on one
633 * of the previous ones) 633 * of the previous ones)
634 * 634 *
635 * * __ioremap_caller is the same as above but takes an explicit caller
636 * reference rather than using __builtin_return_address(0)
637 *
635 * * __iounmap, is the low level implementation used by iounmap and cannot 638 * * __iounmap, is the low level implementation used by iounmap and cannot
636 * be hooked (but can be used by a hook on iounmap) 639 * be hooked (but can be used by a hook on iounmap)
637 * 640 *
@@ -646,6 +649,9 @@ extern void iounmap(volatile void __iomem *addr);
646 649
647extern void __iomem *__ioremap(phys_addr_t, unsigned long size, 650extern void __iomem *__ioremap(phys_addr_t, unsigned long size,
648 unsigned long flags); 651 unsigned long flags);
652extern void __iomem *__ioremap_caller(phys_addr_t, unsigned long size,
653 unsigned long flags, void *caller);
654
649extern void __iounmap(volatile void __iomem *addr); 655extern void __iounmap(volatile void __iomem *addr);
650 656
651extern void __iomem * __ioremap_at(phys_addr_t pa, void *ea, 657extern void __iomem * __ioremap_at(phys_addr_t pa, void *ea,
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index 25aaa97facd8..d2a65e8ca6ae 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -97,7 +97,7 @@ struct lppaca {
97 u64 saved_gpr4; // Saved GPR4 x28-x2F 97 u64 saved_gpr4; // Saved GPR4 x28-x2F
98 u64 saved_gpr5; // Saved GPR5 x30-x37 98 u64 saved_gpr5; // Saved GPR5 x30-x37
99 99
100 u8 reserved4; // Reserved x38-x38 100 u8 dtl_enable_mask; // Dispatch Trace Log mask x38-x38
101 u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x39 101 u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x39
102 u8 fpregs_in_use; // FP regs in use x3A-x3A 102 u8 fpregs_in_use; // FP regs in use x3A-x3A
103 u8 pmcregs_in_use; // PMC regs in use x3B-x3B 103 u8 pmcregs_in_use; // PMC regs in use x3B-x3B
@@ -125,7 +125,7 @@ struct lppaca {
125 // NOTE: This value will ALWAYS be zero for dedicated processors and 125 // NOTE: This value will ALWAYS be zero for dedicated processors and
126 // will NEVER be zero for shared processors (ie, initialized to a 1). 126 // will NEVER be zero for shared processors (ie, initialized to a 1).
127 volatile u32 yield_count; // PLIC increments each dispatchx00-x03 127 volatile u32 yield_count; // PLIC increments each dispatchx00-x03
128 u32 reserved6; 128 volatile u32 dispersion_count; // dispatch changed phys cpu x04-x07
129 volatile u64 cmo_faults; // CMO page fault count x08-x0F 129 volatile u64 cmo_faults; // CMO page fault count x08-x0F
130 volatile u64 cmo_fault_time; // CMO page fault time x10-x17 130 volatile u64 cmo_fault_time; // CMO page fault time x10-x17
131 u8 reserved7[104]; // Reserved x18-x7F 131 u8 reserved7[104]; // Reserved x18-x7F
@@ -133,8 +133,10 @@ struct lppaca {
133//============================================================================= 133//=============================================================================
134// CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data 134// CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data
135//============================================================================= 135//=============================================================================
136 u32 page_ins; // CMO Hint - # page ins by OS x00-x04 136 u32 page_ins; // CMO Hint - # page ins by OS x00-x03
137 u8 pmc_save_area[252]; // PMC interrupt Area x04-xFF 137 u8 reserved8[148]; // Reserved x04-x97
138 volatile u64 dtl_idx; // Dispatch Trace Log head idx x98-x9F
139 u8 reserved9[96]; // Reserved xA0-xFF
138} __attribute__((__aligned__(0x400))); 140} __attribute__((__aligned__(0x400)));
139 141
140extern struct lppaca lppaca[]; 142extern struct lppaca lppaca[];
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 2740c44ff717..0efdb1dfdc5f 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -90,7 +90,7 @@ struct machdep_calls {
90 void (*tce_flush)(struct iommu_table *tbl); 90 void (*tce_flush)(struct iommu_table *tbl);
91 91
92 void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size, 92 void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size,
93 unsigned long flags); 93 unsigned long flags, void *caller);
94 void (*iounmap)(volatile void __iomem *token); 94 void (*iounmap)(volatile void __iomem *token);
95 95
96#ifdef CONFIG_PM 96#ifdef CONFIG_PM
@@ -327,8 +327,6 @@ extern void __devinit smp_generic_take_timebase(void);
327 */ 327 */
328/* Print a boot progress message. */ 328/* Print a boot progress message. */
329void ppc64_boot_msg(unsigned int src, const char *msg); 329void ppc64_boot_msg(unsigned int src, const char *msg);
330/* Print a termination message (print only -- does not stop the kernel) */
331void ppc64_terminate_msg(unsigned int src, const char *msg);
332 330
333static inline void log_error(char *buf, unsigned int err_type, int fatal) 331static inline void log_error(char *buf, unsigned int err_type, int fatal)
334{ 332{
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h
index 27cc6fdcd3b7..3c86576bfefa 100644
--- a/arch/powerpc/include/asm/mmu-44x.h
+++ b/arch/powerpc/include/asm/mmu-44x.h
@@ -83,6 +83,8 @@ typedef struct {
83#define PPC44x_TLBE_SIZE PPC44x_TLB_16K 83#define PPC44x_TLBE_SIZE PPC44x_TLB_16K
84#elif (PAGE_SHIFT == 16) 84#elif (PAGE_SHIFT == 16)
85#define PPC44x_TLBE_SIZE PPC44x_TLB_64K 85#define PPC44x_TLBE_SIZE PPC44x_TLB_64K
86#elif (PAGE_SHIFT == 18)
87#define PPC44x_TLBE_SIZE PPC44x_TLB_256K
86#else 88#else
87#error "Unsupported PAGE_SIZE" 89#error "Unsupported PAGE_SIZE"
88#endif 90#endif
diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h b/arch/powerpc/include/asm/mmu-book3e.h
index 4285b64a65e0..7e74cff81d86 100644
--- a/arch/powerpc/include/asm/mmu-fsl-booke.h
+++ b/arch/powerpc/include/asm/mmu-book3e.h
@@ -1,26 +1,42 @@
1#ifndef _ASM_POWERPC_MMU_FSL_BOOKE_H_ 1#ifndef _ASM_POWERPC_MMU_BOOK3E_H_
2#define _ASM_POWERPC_MMU_FSL_BOOKE_H_ 2#define _ASM_POWERPC_MMU_BOOK3E_H_
3/* 3/*
4 * Freescale Book-E MMU support 4 * Freescale Book-E/Book-3e (ISA 2.06+) MMU support
5 */ 5 */
6 6
7/* Book-E defined page sizes */ 7/* Book-3e defined page sizes */
8#define BOOKE_PAGESZ_1K 0 8#define BOOK3E_PAGESZ_1K 0
9#define BOOKE_PAGESZ_4K 1 9#define BOOK3E_PAGESZ_2K 1
10#define BOOKE_PAGESZ_16K 2 10#define BOOK3E_PAGESZ_4K 2
11#define BOOKE_PAGESZ_64K 3 11#define BOOK3E_PAGESZ_8K 3
12#define BOOKE_PAGESZ_256K 4 12#define BOOK3E_PAGESZ_16K 4
13#define BOOKE_PAGESZ_1M 5 13#define BOOK3E_PAGESZ_32K 5
14#define BOOKE_PAGESZ_4M 6 14#define BOOK3E_PAGESZ_64K 6
15#define BOOKE_PAGESZ_16M 7 15#define BOOK3E_PAGESZ_128K 7
16#define BOOKE_PAGESZ_64M 8 16#define BOOK3E_PAGESZ_256K 8
17#define BOOKE_PAGESZ_256M 9 17#define BOOK3E_PAGESZ_512K 9
18#define BOOKE_PAGESZ_1GB 10 18#define BOOK3E_PAGESZ_1M 10
19#define BOOKE_PAGESZ_4GB 11 19#define BOOK3E_PAGESZ_2M 11
20#define BOOKE_PAGESZ_16GB 12 20#define BOOK3E_PAGESZ_4M 12
21#define BOOKE_PAGESZ_64GB 13 21#define BOOK3E_PAGESZ_8M 13
22#define BOOKE_PAGESZ_256GB 14 22#define BOOK3E_PAGESZ_16M 14
23#define BOOKE_PAGESZ_1TB 15 23#define BOOK3E_PAGESZ_32M 15
24#define BOOK3E_PAGESZ_64M 16
25#define BOOK3E_PAGESZ_128M 17
26#define BOOK3E_PAGESZ_256M 18
27#define BOOK3E_PAGESZ_512M 19
28#define BOOK3E_PAGESZ_1GB 20
29#define BOOK3E_PAGESZ_2GB 21
30#define BOOK3E_PAGESZ_4GB 22
31#define BOOK3E_PAGESZ_8GB 23
32#define BOOK3E_PAGESZ_16GB 24
33#define BOOK3E_PAGESZ_32GB 25
34#define BOOK3E_PAGESZ_64GB 26
35#define BOOK3E_PAGESZ_128GB 27
36#define BOOK3E_PAGESZ_256GB 28
37#define BOOK3E_PAGESZ_512GB 29
38#define BOOK3E_PAGESZ_1TB 30
39#define BOOK3E_PAGESZ_2TB 31
24 40
25#define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) 41#define MAS0_TLBSEL(x) ((x << 28) & 0x30000000)
26#define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) 42#define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000)
@@ -29,8 +45,9 @@
29#define MAS1_VALID 0x80000000 45#define MAS1_VALID 0x80000000
30#define MAS1_IPROT 0x40000000 46#define MAS1_IPROT 0x40000000
31#define MAS1_TID(x) ((x << 16) & 0x3FFF0000) 47#define MAS1_TID(x) ((x << 16) & 0x3FFF0000)
48#define MAS1_IND 0x00002000
32#define MAS1_TS 0x00001000 49#define MAS1_TS 0x00001000
33#define MAS1_TSIZE(x) ((x << 8) & 0x00000F00) 50#define MAS1_TSIZE(x) ((x << 7) & 0x00000F80)
34 51
35#define MAS2_EPN 0xFFFFF000 52#define MAS2_EPN 0xFFFFF000
36#define MAS2_X0 0x00000040 53#define MAS2_X0 0x00000040
@@ -40,7 +57,7 @@
40#define MAS2_M 0x00000004 57#define MAS2_M 0x00000004
41#define MAS2_G 0x00000002 58#define MAS2_G 0x00000002
42#define MAS2_E 0x00000001 59#define MAS2_E 0x00000001
43#define MAS2_EPN_MASK(size) (~0 << (2*(size) + 10)) 60#define MAS2_EPN_MASK(size) (~0 << (size + 10))
44#define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags)) 61#define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags))
45 62
46#define MAS3_RPN 0xFFFFF000 63#define MAS3_RPN 0xFFFFF000
@@ -56,7 +73,7 @@
56#define MAS3_SR 0x00000001 73#define MAS3_SR 0x00000001
57 74
58#define MAS4_TLBSELD(x) MAS0_TLBSEL(x) 75#define MAS4_TLBSELD(x) MAS0_TLBSEL(x)
59#define MAS4_TIDDSEL 0x000F0000 76#define MAS4_INDD 0x00008000
60#define MAS4_TSIZED(x) MAS1_TSIZE(x) 77#define MAS4_TSIZED(x) MAS1_TSIZE(x)
61#define MAS4_X0D 0x00000040 78#define MAS4_X0D 0x00000040
62#define MAS4_X1D 0x00000020 79#define MAS4_X1D 0x00000020
@@ -68,6 +85,7 @@
68 85
69#define MAS6_SPID0 0x3FFF0000 86#define MAS6_SPID0 0x3FFF0000
70#define MAS6_SPID1 0x00007FFE 87#define MAS6_SPID1 0x00007FFE
88#define MAS6_ISIZE(x) MAS1_TSIZE(x)
71#define MAS6_SAS 0x00000001 89#define MAS6_SAS 0x00000001
72#define MAS6_SPID MAS6_SPID0 90#define MAS6_SPID MAS6_SPID0
73 91
@@ -84,4 +102,4 @@ typedef struct {
84} mm_context_t; 102} mm_context_t;
85#endif /* !__ASSEMBLY__ */ 103#endif /* !__ASSEMBLY__ */
86 104
87#endif /* _ASM_POWERPC_MMU_FSL_BOOKE_H_ */ 105#endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 68b752626808..98c104a09961 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -284,8 +284,6 @@ extern void add_gpage(unsigned long addr, unsigned long page_size,
284 unsigned long number_of_pages); 284 unsigned long number_of_pages);
285extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); 285extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
286 286
287extern void htab_initialize(void);
288extern void htab_initialize_secondary(void);
289extern void hpte_init_native(void); 287extern void hpte_init_native(void);
290extern void hpte_init_lpar(void); 288extern void hpte_init_lpar(void);
291extern void hpte_init_iSeries(void); 289extern void hpte_init_iSeries(void);
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 6e7639911318..cbf154387091 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -36,9 +36,9 @@
36 */ 36 */
37#define MMU_FTR_USE_TLBIVAX_BCAST ASM_CONST(0x00040000) 37#define MMU_FTR_USE_TLBIVAX_BCAST ASM_CONST(0x00040000)
38 38
39/* Enable use of tlbilx invalidate-by-PID variant. 39/* Enable use of tlbilx invalidate instructions.
40 */ 40 */
41#define MMU_FTR_USE_TLBILX_PID ASM_CONST(0x00080000) 41#define MMU_FTR_USE_TLBILX ASM_CONST(0x00080000)
42 42
43/* This indicates that the processor cannot handle multiple outstanding 43/* This indicates that the processor cannot handle multiple outstanding
44 * broadcast tlbivax or tlbsync. This makes the code use a spinlock 44 * broadcast tlbivax or tlbsync. This makes the code use a spinlock
@@ -46,6 +46,12 @@
46 */ 46 */
47#define MMU_FTR_LOCK_BCAST_INVAL ASM_CONST(0x00100000) 47#define MMU_FTR_LOCK_BCAST_INVAL ASM_CONST(0x00100000)
48 48
49/* This indicates that the processor doesn't handle way selection
50 * properly and needs SW to track and update the LRU state. This
51 * is specific to an errata on e300c2/c3/c4 class parts
52 */
53#define MMU_FTR_NEED_DTLB_SW_LRU ASM_CONST(0x00200000)
54
49#ifndef __ASSEMBLY__ 55#ifndef __ASSEMBLY__
50#include <asm/cputable.h> 56#include <asm/cputable.h>
51 57
@@ -56,6 +62,10 @@ static inline int mmu_has_feature(unsigned long feature)
56 62
57extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup; 63extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
58 64
65/* MMU initialization (64-bit only fo now) */
66extern void early_init_mmu(void);
67extern void early_init_mmu_secondary(void);
68
59#endif /* !__ASSEMBLY__ */ 69#endif /* !__ASSEMBLY__ */
60 70
61 71
@@ -71,9 +81,9 @@ extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
71#elif defined(CONFIG_44x) 81#elif defined(CONFIG_44x)
72/* 44x-style software loaded TLB */ 82/* 44x-style software loaded TLB */
73# include <asm/mmu-44x.h> 83# include <asm/mmu-44x.h>
74#elif defined(CONFIG_FSL_BOOKE) 84#elif defined(CONFIG_PPC_BOOK3E_MMU)
75/* Freescale Book-E software loaded TLB */ 85/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
76# include <asm/mmu-fsl-booke.h> 86# include <asm/mmu-book3e.h>
77#elif defined (CONFIG_PPC_8xx) 87#elif defined (CONFIG_PPC_8xx)
78/* Motorola/Freescale 8xx software loaded TLB */ 88/* Motorola/Freescale 8xx software loaded TLB */
79# include <asm/mmu-8xx.h> 89# include <asm/mmu-8xx.h>
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h
index ab4f19263c42..b7063669f972 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -31,7 +31,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
31 struct task_struct *tsk) 31 struct task_struct *tsk)
32{ 32{
33 /* Mark this context has been used on the new CPU */ 33 /* Mark this context has been used on the new CPU */
34 cpu_set(smp_processor_id(), next->cpu_vm_mask); 34 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
35 35
36 /* 32-bit keeps track of the current PGDIR in the thread struct */ 36 /* 32-bit keeps track of the current PGDIR in the thread struct */
37#ifdef CONFIG_PPC32 37#ifdef CONFIG_PPC32
diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h
index 19f299b7e256..35acac90c8ca 100644
--- a/arch/powerpc/include/asm/mmzone.h
+++ b/arch/powerpc/include/asm/mmzone.h
@@ -8,6 +8,7 @@
8#define _ASM_MMZONE_H_ 8#define _ASM_MMZONE_H_
9#ifdef __KERNEL__ 9#ifdef __KERNEL__
10 10
11#include <linux/cpumask.h>
11 12
12/* 13/*
13 * generic non-linear memory support: 14 * generic non-linear memory support:
diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index 81a23932a160..52e049cd9e68 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -273,6 +273,7 @@ extern void mpc5200_setup_xlb_arbiter(void);
273extern void mpc52xx_declare_of_platform_devices(void); 273extern void mpc52xx_declare_of_platform_devices(void);
274extern void mpc52xx_map_common_devices(void); 274extern void mpc52xx_map_common_devices(void);
275extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); 275extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
276extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
276extern void mpc52xx_restart(char *cmd); 277extern void mpc52xx_restart(char *cmd);
277 278
278/* mpc52xx_pic.c */ 279/* mpc52xx_pic.c */
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
index c2ccca53b991..a002682f3a6d 100644
--- a/arch/powerpc/include/asm/mpic.h
+++ b/arch/powerpc/include/asm/mpic.h
@@ -22,6 +22,14 @@
22#define MPIC_GREG_FEATURE_1 0x00010 22#define MPIC_GREG_FEATURE_1 0x00010
23#define MPIC_GREG_GLOBAL_CONF_0 0x00020 23#define MPIC_GREG_GLOBAL_CONF_0 0x00020
24#define MPIC_GREG_GCONF_RESET 0x80000000 24#define MPIC_GREG_GCONF_RESET 0x80000000
25/* On the FSL mpic implementations the Mode field is expand to be
26 * 2 bits wide:
27 * 0b00 = pass through (interrupts routed to IRQ0)
28 * 0b01 = Mixed mode
29 * 0b10 = reserved
30 * 0b11 = External proxy / coreint
31 */
32#define MPIC_GREG_GCONF_COREINT 0x60000000
25#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 33#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000
26#define MPIC_GREG_GCONF_NO_BIAS 0x10000000 34#define MPIC_GREG_GCONF_NO_BIAS 0x10000000
27#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff 35#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff
@@ -357,6 +365,8 @@ struct mpic
357#define MPIC_BROKEN_FRR_NIRQS 0x00000800 365#define MPIC_BROKEN_FRR_NIRQS 0x00000800
358/* Destination only supports a single CPU at a time */ 366/* Destination only supports a single CPU at a time */
359#define MPIC_SINGLE_DEST_CPU 0x00001000 367#define MPIC_SINGLE_DEST_CPU 0x00001000
368/* Enable CoreInt delivery of interrupts */
369#define MPIC_ENABLE_COREINT 0x00002000
360 370
361/* MPIC HW modification ID */ 371/* MPIC HW modification ID */
362#define MPIC_REGSET_MASK 0xf0000000 372#define MPIC_REGSET_MASK 0xf0000000
@@ -470,6 +480,8 @@ extern void mpic_end_irq(unsigned int irq);
470extern unsigned int mpic_get_one_irq(struct mpic *mpic); 480extern unsigned int mpic_get_one_irq(struct mpic *mpic);
471/* This one gets from the primary mpic */ 481/* This one gets from the primary mpic */
472extern unsigned int mpic_get_irq(void); 482extern unsigned int mpic_get_irq(void);
483/* This one gets from the primary mpic via CoreInt*/
484extern unsigned int mpic_get_coreint_irq(void);
473/* Fetch Machine Check interrupt from primary mpic */ 485/* Fetch Machine Check interrupt from primary mpic */
474extern unsigned int mpic_get_mcirq(void); 486extern unsigned int mpic_get_mcirq(void);
475 487
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 197d569f5bd3..32cbf16f10ea 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -19,12 +19,14 @@
19#include <asm/kdump.h> 19#include <asm/kdump.h>
20 20
21/* 21/*
22 * On regular PPC32 page size is 4K (but we support 4K/16K/64K pages 22 * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages
23 * on PPC44x). For PPC64 we support either 4K or 64K software 23 * on PPC44x). For PPC64 we support either 4K or 64K software
24 * page size. When using 64K pages however, whether we are really supporting 24 * page size. When using 64K pages however, whether we are really supporting
25 * 64K pages in HW or not is irrelevant to those definitions. 25 * 64K pages in HW or not is irrelevant to those definitions.
26 */ 26 */
27#if defined(CONFIG_PPC_64K_PAGES) 27#if defined(CONFIG_PPC_256K_PAGES)
28#define PAGE_SHIFT 18
29#elif defined(CONFIG_PPC_64K_PAGES)
28#define PAGE_SHIFT 16 30#define PAGE_SHIFT 16
29#elif defined(CONFIG_PPC_16K_PAGES) 31#elif defined(CONFIG_PPC_16K_PAGES)
30#define PAGE_SHIFT 14 32#define PAGE_SHIFT 14
diff --git a/arch/powerpc/include/asm/page_32.h b/arch/powerpc/include/asm/page_32.h
index 1458d9500381..a0e3f6e6b4ee 100644
--- a/arch/powerpc/include/asm/page_32.h
+++ b/arch/powerpc/include/asm/page_32.h
@@ -19,7 +19,11 @@
19#define PTE_FLAGS_OFFSET 0 19#define PTE_FLAGS_OFFSET 0
20#endif 20#endif
21 21
22#ifdef CONFIG_PPC_256K_PAGES
23#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2 - 2) /* 1/4 of a page */
24#else
22#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */ 25#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */
26#endif
23 27
24#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
25/* 29/*
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index 3548159a1beb..ba17d5d90a49 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -114,6 +114,10 @@ extern int pci_domain_nr(struct pci_bus *bus);
114/* Decide whether to display the domain number in /proc */ 114/* Decide whether to display the domain number in /proc */
115extern int pci_proc_domain(struct pci_bus *bus); 115extern int pci_proc_domain(struct pci_bus *bus);
116 116
117/* MSI arch hooks */
118#define arch_setup_msi_irqs arch_setup_msi_irqs
119#define arch_teardown_msi_irqs arch_teardown_msi_irqs
120#define arch_msi_check_device arch_msi_check_device
117 121
118struct vm_area_struct; 122struct vm_area_struct;
119/* Map a range of PCI memory or I/O space for a device into user space */ 123/* Map a range of PCI memory or I/O space for a device into user space */
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
index 820b5f0a35ce..ba45c997830f 100644
--- a/arch/powerpc/include/asm/pgtable-ppc32.h
+++ b/arch/powerpc/include/asm/pgtable-ppc32.h
@@ -19,55 +19,6 @@ extern int icache_44x_need_flush;
19#endif /* __ASSEMBLY__ */ 19#endif /* __ASSEMBLY__ */
20 20
21/* 21/*
22 * The PowerPC MMU uses a hash table containing PTEs, together with
23 * a set of 16 segment registers (on 32-bit implementations), to define
24 * the virtual to physical address mapping.
25 *
26 * We use the hash table as an extended TLB, i.e. a cache of currently
27 * active mappings. We maintain a two-level page table tree, much
28 * like that used by the i386, for the sake of the Linux memory
29 * management code. Low-level assembler code in hashtable.S
30 * (procedure hash_page) is responsible for extracting ptes from the
31 * tree and putting them into the hash table when necessary, and
32 * updating the accessed and modified bits in the page table tree.
33 */
34
35/*
36 * The PowerPC MPC8xx uses a TLB with hardware assisted, software tablewalk.
37 * We also use the two level tables, but we can put the real bits in them
38 * needed for the TLB and tablewalk. These definitions require Mx_CTR.PPM = 0,
39 * Mx_CTR.PPCS = 0, and MD_CTR.TWAM = 1. The level 2 descriptor has
40 * additional page protection (when Mx_CTR.PPCS = 1) that allows TLB hit
41 * based upon user/super access. The TLB does not have accessed nor write
42 * protect. We assume that if the TLB get loaded with an entry it is
43 * accessed, and overload the changed bit for write protect. We use
44 * two bits in the software pte that are supposed to be set to zero in
45 * the TLB entry (24 and 25) for these indicators. Although the level 1
46 * descriptor contains the guarded and writethrough/copyback bits, we can
47 * set these at the page level since they get copied from the Mx_TWC
48 * register when the TLB entry is loaded. We will use bit 27 for guard, since
49 * that is where it exists in the MD_TWC, and bit 26 for writethrough.
50 * These will get masked from the level 2 descriptor at TLB load time, and
51 * copied to the MD_TWC before it gets loaded.
52 * Large page sizes added. We currently support two sizes, 4K and 8M.
53 * This also allows a TLB hander optimization because we can directly
54 * load the PMD into MD_TWC. The 8M pages are only used for kernel
55 * mapping of well known areas. The PMD (PGD) entries contain control
56 * flags in addition to the address, so care must be taken that the
57 * software no longer assumes these are only pointers.
58 */
59
60/*
61 * At present, all PowerPC 400-class processors share a similar TLB
62 * architecture. The instruction and data sides share a unified,
63 * 64-entry, fully-associative TLB which is maintained totally under
64 * software control. In addition, the instruction side has a
65 * hardware-managed, 4-entry, fully-associative TLB which serves as a
66 * first level to the shared TLB. These two TLBs are known as the UTLB
67 * and ITLB, respectively (see "mmu.h" for definitions).
68 */
69
70/*
71 * The normal case is that PTEs are 32-bits and we have a 1-page 22 * The normal case is that PTEs are 32-bits and we have a 1-page
72 * 1024-entry pgdir pointing to 1-page 1024-entry PTE pages. -- paulus 23 * 1024-entry pgdir pointing to 1-page 1024-entry PTE pages. -- paulus
73 * 24 *
@@ -135,409 +86,22 @@ extern int icache_44x_need_flush;
135 */ 86 */
136 87
137#if defined(CONFIG_40x) 88#if defined(CONFIG_40x)
138 89#include <asm/pte-40x.h>
139/* There are several potential gotchas here. The 40x hardware TLBLO
140 field looks like this:
141
142 0 1 2 3 4 ... 18 19 20 21 22 23 24 25 26 27 28 29 30 31
143 RPN..................... 0 0 EX WR ZSEL....... W I M G
144
145 Where possible we make the Linux PTE bits match up with this
146
147 - bits 20 and 21 must be cleared, because we use 4k pages (40x can
148 support down to 1k pages), this is done in the TLBMiss exception
149 handler.
150 - We use only zones 0 (for kernel pages) and 1 (for user pages)
151 of the 16 available. Bit 24-26 of the TLB are cleared in the TLB
152 miss handler. Bit 27 is PAGE_USER, thus selecting the correct
153 zone.
154 - PRESENT *must* be in the bottom two bits because swap cache
155 entries use the top 30 bits. Because 40x doesn't support SMP
156 anyway, M is irrelevant so we borrow it for PAGE_PRESENT. Bit 30
157 is cleared in the TLB miss handler before the TLB entry is loaded.
158 - All other bits of the PTE are loaded into TLBLO without
159 modification, leaving us only the bits 20, 21, 24, 25, 26, 30 for
160 software PTE bits. We actually use use bits 21, 24, 25, and
161 30 respectively for the software bits: ACCESSED, DIRTY, RW, and
162 PRESENT.
163*/
164
165/* Definitions for 40x embedded chips. */
166#define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */
167#define _PAGE_FILE 0x001 /* when !present: nonlinear file mapping */
168#define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */
169#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */
170#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */
171#define _PAGE_USER 0x010 /* matches one of the zone permission bits */
172#define _PAGE_RW 0x040 /* software: Writes permitted */
173#define _PAGE_DIRTY 0x080 /* software: dirty page */
174#define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */
175#define _PAGE_HWEXEC 0x200 /* hardware: EX permission */
176#define _PAGE_ACCESSED 0x400 /* software: R: page referenced */
177
178#define _PMD_PRESENT 0x400 /* PMD points to page of PTEs */
179#define _PMD_BAD 0x802
180#define _PMD_SIZE 0x0e0 /* size field, != 0 for large-page PMD entry */
181#define _PMD_SIZE_4M 0x0c0
182#define _PMD_SIZE_16M 0x0e0
183#define PMD_PAGE_SIZE(pmdval) (1024 << (((pmdval) & _PMD_SIZE) >> 4))
184
185/* Until my rework is finished, 40x still needs atomic PTE updates */
186#define PTE_ATOMIC_UPDATES 1
187
188#elif defined(CONFIG_44x) 90#elif defined(CONFIG_44x)
189/* 91#include <asm/pte-44x.h>
190 * Definitions for PPC440
191 *
192 * Because of the 3 word TLB entries to support 36-bit addressing,
193 * the attribute are difficult to map in such a fashion that they
194 * are easily loaded during exception processing. I decided to
195 * organize the entry so the ERPN is the only portion in the
196 * upper word of the PTE and the attribute bits below are packed
197 * in as sensibly as they can be in the area below a 4KB page size
198 * oriented RPN. This at least makes it easy to load the RPN and
199 * ERPN fields in the TLB. -Matt
200 *
201 * Note that these bits preclude future use of a page size
202 * less than 4KB.
203 *
204 *
205 * PPC 440 core has following TLB attribute fields;
206 *
207 * TLB1:
208 * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
209 * RPN................................. - - - - - - ERPN.......
210 *
211 * TLB2:
212 * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
213 * - - - - - - U0 U1 U2 U3 W I M G E - UX UW UR SX SW SR
214 *
215 * Newer 440 cores (440x6 as used on AMCC 460EX/460GT) have additional
216 * TLB2 storage attibute fields. Those are:
217 *
218 * TLB2:
219 * 0...10 11 12 13 14 15 16...31
220 * no change WL1 IL1I IL1D IL2I IL2D no change
221 *
222 * There are some constrains and options, to decide mapping software bits
223 * into TLB entry.
224 *
225 * - PRESENT *must* be in the bottom three bits because swap cache
226 * entries use the top 29 bits for TLB2.
227 *
228 * - FILE *must* be in the bottom three bits because swap cache
229 * entries use the top 29 bits for TLB2.
230 *
231 * - CACHE COHERENT bit (M) has no effect on original PPC440 cores,
232 * because it doesn't support SMP. However, some later 460 variants
233 * have -some- form of SMP support and so I keep the bit there for
234 * future use
235 *
236 * With the PPC 44x Linux implementation, the 0-11th LSBs of the PTE are used
237 * for memory protection related functions (see PTE structure in
238 * include/asm-ppc/mmu.h). The _PAGE_XXX definitions in this file map to the
239 * above bits. Note that the bit values are CPU specific, not architecture
240 * specific.
241 *
242 * The kernel PTE entry holds an arch-dependent swp_entry structure under
243 * certain situations. In other words, in such situations some portion of
244 * the PTE bits are used as a swp_entry. In the PPC implementation, the
245 * 3-24th LSB are shared with swp_entry, however the 0-2nd three LSB still
246 * hold protection values. That means the three protection bits are
247 * reserved for both PTE and SWAP entry at the most significant three
248 * LSBs.
249 *
250 * There are three protection bits available for SWAP entry:
251 * _PAGE_PRESENT
252 * _PAGE_FILE
253 * _PAGE_HASHPTE (if HW has)
254 *
255 * So those three bits have to be inside of 0-2nd LSB of PTE.
256 *
257 */
258
259#define _PAGE_PRESENT 0x00000001 /* S: PTE valid */
260#define _PAGE_RW 0x00000002 /* S: Write permission */
261#define _PAGE_FILE 0x00000004 /* S: nonlinear file mapping */
262#define _PAGE_HWEXEC 0x00000004 /* H: Execute permission */
263#define _PAGE_ACCESSED 0x00000008 /* S: Page referenced */
264#define _PAGE_DIRTY 0x00000010 /* S: Page dirty */
265#define _PAGE_SPECIAL 0x00000020 /* S: Special page */
266#define _PAGE_USER 0x00000040 /* S: User page */
267#define _PAGE_ENDIAN 0x00000080 /* H: E bit */
268#define _PAGE_GUARDED 0x00000100 /* H: G bit */
269#define _PAGE_COHERENT 0x00000200 /* H: M bit */
270#define _PAGE_NO_CACHE 0x00000400 /* H: I bit */
271#define _PAGE_WRITETHRU 0x00000800 /* H: W bit */
272
273/* TODO: Add large page lowmem mapping support */
274#define _PMD_PRESENT 0
275#define _PMD_PRESENT_MASK (PAGE_MASK)
276#define _PMD_BAD (~PAGE_MASK)
277
278/* ERPN in a PTE never gets cleared, ignore it */
279#define _PTE_NONE_MASK 0xffffffff00000000ULL
280
281#define __HAVE_ARCH_PTE_SPECIAL
282
283#elif defined(CONFIG_FSL_BOOKE) 92#elif defined(CONFIG_FSL_BOOKE)
284/* 93#include <asm/pte-fsl-booke.h>
285 MMU Assist Register 3:
286
287 32 33 34 35 36 ... 50 51 52 53 54 55 56 57 58 59 60 61 62 63
288 RPN...................... 0 0 U0 U1 U2 U3 UX SX UW SW UR SR
289
290 - PRESENT *must* be in the bottom three bits because swap cache
291 entries use the top 29 bits.
292
293 - FILE *must* be in the bottom three bits because swap cache
294 entries use the top 29 bits.
295*/
296
297/* Definitions for FSL Book-E Cores */
298#define _PAGE_PRESENT 0x00001 /* S: PTE contains a translation */
299#define _PAGE_USER 0x00002 /* S: User page (maps to UR) */
300#define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */
301#define _PAGE_RW 0x00004 /* S: Write permission (SW) */
302#define _PAGE_DIRTY 0x00008 /* S: Page dirty */
303#define _PAGE_HWEXEC 0x00010 /* H: SX permission */
304#define _PAGE_ACCESSED 0x00020 /* S: Page referenced */
305
306#define _PAGE_ENDIAN 0x00040 /* H: E bit */
307#define _PAGE_GUARDED 0x00080 /* H: G bit */
308#define _PAGE_COHERENT 0x00100 /* H: M bit */
309#define _PAGE_NO_CACHE 0x00200 /* H: I bit */
310#define _PAGE_WRITETHRU 0x00400 /* H: W bit */
311#define _PAGE_SPECIAL 0x00800 /* S: Special page */
312
313#ifdef CONFIG_PTE_64BIT
314/* ERPN in a PTE never gets cleared, ignore it */
315#define _PTE_NONE_MASK 0xffffffffffff0000ULL
316#endif
317
318#define _PMD_PRESENT 0
319#define _PMD_PRESENT_MASK (PAGE_MASK)
320#define _PMD_BAD (~PAGE_MASK)
321
322#define __HAVE_ARCH_PTE_SPECIAL
323
324#elif defined(CONFIG_8xx) 94#elif defined(CONFIG_8xx)
325/* Definitions for 8xx embedded chips. */ 95#include <asm/pte-8xx.h>
326#define _PAGE_PRESENT 0x0001 /* Page is valid */
327#define _PAGE_FILE 0x0002 /* when !present: nonlinear file mapping */
328#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */
329#define _PAGE_SHARED 0x0004 /* No ASID (context) compare */
330
331/* These five software bits must be masked out when the entry is loaded
332 * into the TLB.
333 */
334#define _PAGE_EXEC 0x0008 /* software: i-cache coherency required */
335#define _PAGE_GUARDED 0x0010 /* software: guarded access */
336#define _PAGE_DIRTY 0x0020 /* software: page changed */
337#define _PAGE_RW 0x0040 /* software: user write access allowed */
338#define _PAGE_ACCESSED 0x0080 /* software: page referenced */
339
340/* Setting any bits in the nibble with the follow two controls will
341 * require a TLB exception handler change. It is assumed unused bits
342 * are always zero.
343 */
344#define _PAGE_HWWRITE 0x0100 /* h/w write enable: never set in Linux PTE */
345#define _PAGE_USER 0x0800 /* One of the PP bits, the other is USER&~RW */
346
347#define _PMD_PRESENT 0x0001
348#define _PMD_BAD 0x0ff0
349#define _PMD_PAGE_MASK 0x000c
350#define _PMD_PAGE_8M 0x000c
351
352#define _PTE_NONE_MASK _PAGE_ACCESSED
353
354/* Until my rework is finished, 8xx still needs atomic PTE updates */
355#define PTE_ATOMIC_UPDATES 1
356
357#else /* CONFIG_6xx */ 96#else /* CONFIG_6xx */
358/* Definitions for 60x, 740/750, etc. */ 97#include <asm/pte-hash32.h>
359#define _PAGE_PRESENT 0x001 /* software: pte contains a translation */
360#define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
361#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
362#define _PAGE_USER 0x004 /* usermode access allowed */
363#define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
364#define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
365#define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
366#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
367#define _PAGE_DIRTY 0x080 /* C: page changed */
368#define _PAGE_ACCESSED 0x100 /* R: page referenced */
369#define _PAGE_EXEC 0x200 /* software: i-cache coherency required */
370#define _PAGE_RW 0x400 /* software: user write access allowed */
371#define _PAGE_SPECIAL 0x800 /* software: Special page */
372
373#ifdef CONFIG_PTE_64BIT
374/* We never clear the high word of the pte */
375#define _PTE_NONE_MASK (0xffffffff00000000ULL | _PAGE_HASHPTE)
376#else
377#define _PTE_NONE_MASK _PAGE_HASHPTE
378#endif 98#endif
379 99
380#define _PMD_PRESENT 0 100/* And here we include common definitions */
381#define _PMD_PRESENT_MASK (PAGE_MASK) 101#include <asm/pte-common.h>
382#define _PMD_BAD (~PAGE_MASK)
383
384/* Hash table based platforms need atomic updates of the linux PTE */
385#define PTE_ATOMIC_UPDATES 1
386
387#define __HAVE_ARCH_PTE_SPECIAL
388
389#endif
390
391/*
392 * Some bits are only used on some cpu families...
393 */
394#ifndef _PAGE_HASHPTE
395#define _PAGE_HASHPTE 0
396#endif
397#ifndef _PTE_NONE_MASK
398#define _PTE_NONE_MASK 0
399#endif
400#ifndef _PAGE_SHARED
401#define _PAGE_SHARED 0
402#endif
403#ifndef _PAGE_HWWRITE
404#define _PAGE_HWWRITE 0
405#endif
406#ifndef _PAGE_HWEXEC
407#define _PAGE_HWEXEC 0
408#endif
409#ifndef _PAGE_EXEC
410#define _PAGE_EXEC 0
411#endif
412#ifndef _PAGE_ENDIAN
413#define _PAGE_ENDIAN 0
414#endif
415#ifndef _PAGE_COHERENT
416#define _PAGE_COHERENT 0
417#endif
418#ifndef _PAGE_WRITETHRU
419#define _PAGE_WRITETHRU 0
420#endif
421#ifndef _PAGE_SPECIAL
422#define _PAGE_SPECIAL 0
423#endif
424#ifndef _PMD_PRESENT_MASK
425#define _PMD_PRESENT_MASK _PMD_PRESENT
426#endif
427#ifndef _PMD_SIZE
428#define _PMD_SIZE 0
429#define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
430#endif
431
432#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
433 _PAGE_SPECIAL)
434
435
436#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
437 _PAGE_WRITETHRU | _PAGE_ENDIAN | \
438 _PAGE_USER | _PAGE_ACCESSED | \
439 _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \
440 _PAGE_EXEC | _PAGE_HWEXEC)
441
442/*
443 * We define 2 sets of base prot bits, one for basic pages (ie,
444 * cacheable kernel and user pages) and one for non cacheable
445 * pages. We always set _PAGE_COHERENT when SMP is enabled or
446 * the processor might need it for DMA coherency.
447 */
448#if defined(CONFIG_SMP) || defined(CONFIG_PPC_STD_MMU)
449#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT)
450#else
451#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED)
452#endif
453#define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_NO_CACHE)
454
455#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY | _PAGE_HWWRITE)
456#define _PAGE_KERNEL (_PAGE_BASE | _PAGE_SHARED | _PAGE_WRENABLE)
457#define _PAGE_KERNEL_NC (_PAGE_BASE_NC | _PAGE_SHARED | _PAGE_WRENABLE)
458
459#ifdef CONFIG_PPC_STD_MMU
460/* On standard PPC MMU, no user access implies kernel read/write access,
461 * so to write-protect kernel memory we must turn on user access */
462#define _PAGE_KERNEL_RO (_PAGE_BASE | _PAGE_SHARED | _PAGE_USER)
463#else
464#define _PAGE_KERNEL_RO (_PAGE_BASE | _PAGE_SHARED)
465#endif
466
467#define _PAGE_IO (_PAGE_KERNEL_NC | _PAGE_GUARDED)
468#define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC)
469
470#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
471 defined(CONFIG_KPROBES)
472/* We want the debuggers to be able to set breakpoints anywhere, so
473 * don't write protect the kernel text */
474#define _PAGE_RAM_TEXT _PAGE_RAM
475#else
476#define _PAGE_RAM_TEXT (_PAGE_KERNEL_RO | _PAGE_HWEXEC)
477#endif
478
479#define PAGE_NONE __pgprot(_PAGE_BASE)
480#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
481#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
482#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
483#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
484#define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
485#define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
486
487#define PAGE_KERNEL __pgprot(_PAGE_RAM)
488#define PAGE_KERNEL_NOCACHE __pgprot(_PAGE_IO)
489
490/*
491 * The PowerPC can only do execute protection on a segment (256MB) basis,
492 * not on a page basis. So we consider execute permission the same as read.
493 * Also, write permissions imply read permissions.
494 * This is the closest we can get..
495 */
496#define __P000 PAGE_NONE
497#define __P001 PAGE_READONLY_X
498#define __P010 PAGE_COPY
499#define __P011 PAGE_COPY_X
500#define __P100 PAGE_READONLY
501#define __P101 PAGE_READONLY_X
502#define __P110 PAGE_COPY
503#define __P111 PAGE_COPY_X
504
505#define __S000 PAGE_NONE
506#define __S001 PAGE_READONLY_X
507#define __S010 PAGE_SHARED
508#define __S011 PAGE_SHARED_X
509#define __S100 PAGE_READONLY
510#define __S101 PAGE_READONLY_X
511#define __S110 PAGE_SHARED
512#define __S111 PAGE_SHARED_X
513 102
514#ifndef __ASSEMBLY__ 103#ifndef __ASSEMBLY__
515/* Make sure we get a link error if PMD_PAGE_SIZE is ever called on a
516 * kernel without large page PMD support */
517extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
518
519/*
520 * Conversions between PTE values and page frame numbers.
521 */
522
523/* in some case we want to additionaly adjust where the pfn is in the pte to
524 * allow room for more flags */
525#if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT)
526#define PFN_SHIFT_OFFSET (PAGE_SHIFT + 8)
527#else
528#define PFN_SHIFT_OFFSET (PAGE_SHIFT)
529#endif
530 104
531#define pte_pfn(x) (pte_val(x) >> PFN_SHIFT_OFFSET)
532#define pte_page(x) pfn_to_page(pte_pfn(x))
533
534#define pfn_pte(pfn, prot) __pte(((pte_basic_t)(pfn) << PFN_SHIFT_OFFSET) |\
535 pgprot_val(prot))
536#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
537#endif /* __ASSEMBLY__ */
538
539#define pte_none(pte) ((pte_val(pte) & ~_PTE_NONE_MASK) == 0)
540#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
541#define pte_clear(mm, addr, ptep) \ 105#define pte_clear(mm, addr, ptep) \
542 do { pte_update(ptep, ~_PAGE_HASHPTE, 0); } while (0) 106 do { pte_update(ptep, ~_PAGE_HASHPTE, 0); } while (0)
543 107
@@ -546,43 +110,6 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
546#define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT_MASK) 110#define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT_MASK)
547#define pmd_clear(pmdp) do { pmd_val(*(pmdp)) = 0; } while (0) 111#define pmd_clear(pmdp) do { pmd_val(*(pmdp)) = 0; } while (0)
548 112
549#ifndef __ASSEMBLY__
550/*
551 * The following only work if pte_present() is true.
552 * Undefined behaviour if not..
553 */
554static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
555static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
556static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
557static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
558static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
559
560static inline pte_t pte_wrprotect(pte_t pte) {
561 pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; }
562static inline pte_t pte_mkclean(pte_t pte) {
563 pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; }
564static inline pte_t pte_mkold(pte_t pte) {
565 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
566
567static inline pte_t pte_mkwrite(pte_t pte) {
568 pte_val(pte) |= _PAGE_RW; return pte; }
569static inline pte_t pte_mkdirty(pte_t pte) {
570 pte_val(pte) |= _PAGE_DIRTY; return pte; }
571static inline pte_t pte_mkyoung(pte_t pte) {
572 pte_val(pte) |= _PAGE_ACCESSED; return pte; }
573static inline pte_t pte_mkspecial(pte_t pte) {
574 pte_val(pte) |= _PAGE_SPECIAL; return pte; }
575static inline pgprot_t pte_pgprot(pte_t pte)
576{
577 return __pgprot(pte_val(pte) & PAGE_PROT_BITS);
578}
579
580static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
581{
582 pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
583 return pte;
584}
585
586/* 113/*
587 * When flushing the tlb entry for a page, we also need to flush the hash 114 * When flushing the tlb entry for a page, we also need to flush the hash
588 * table entry. flush_hash_pages is assembler (for speed) in hashtable.S. 115 * table entry. flush_hash_pages is assembler (for speed) in hashtable.S.
@@ -599,11 +126,19 @@ extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep,
599 unsigned long address); 126 unsigned long address);
600 127
601/* 128/*
602 * Atomic PTE updates. 129 * PTE updates. This function is called whenever an existing
130 * valid PTE is updated. This does -not- include set_pte_at()
131 * which nowadays only sets a new PTE.
603 * 132 *
604 * pte_update clears and sets bit atomically, and returns 133 * Depending on the type of MMU, we may need to use atomic updates
605 * the old pte value. In the 64-bit PTE case we lock around the 134 * and the PTE may be either 32 or 64 bit wide. In the later case,
606 * low PTE word since we expect ALL flag bits to be there 135 * when using atomic updates, only the low part of the PTE is
136 * accessed atomically.
137 *
138 * In addition, on 44x, we also maintain a global flag indicating
139 * that an executable user mapping was modified, which is needed
140 * to properly flush the virtually tagged instruction cache of
141 * those implementations.
607 */ 142 */
608#ifndef CONFIG_PTE_64BIT 143#ifndef CONFIG_PTE_64BIT
609static inline unsigned long pte_update(pte_t *p, 144static inline unsigned long pte_update(pte_t *p,
@@ -668,44 +203,6 @@ static inline unsigned long long pte_update(pte_t *p,
668#endif /* CONFIG_PTE_64BIT */ 203#endif /* CONFIG_PTE_64BIT */
669 204
670/* 205/*
671 * set_pte stores a linux PTE into the linux page table.
672 * On machines which use an MMU hash table we avoid changing the
673 * _PAGE_HASHPTE bit.
674 */
675
676static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
677 pte_t *ptep, pte_t pte)
678{
679#if (_PAGE_HASHPTE != 0) && defined(CONFIG_SMP) && !defined(CONFIG_PTE_64BIT)
680 pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte) & ~_PAGE_HASHPTE);
681#elif defined(CONFIG_PTE_64BIT) && defined(CONFIG_SMP)
682#if _PAGE_HASHPTE != 0
683 if (pte_val(*ptep) & _PAGE_HASHPTE)
684 flush_hash_entry(mm, ptep, addr);
685#endif
686 __asm__ __volatile__("\
687 stw%U0%X0 %2,%0\n\
688 eieio\n\
689 stw%U0%X0 %L2,%1"
690 : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4))
691 : "r" (pte) : "memory");
692#else
693 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE)
694 | (pte_val(pte) & ~_PAGE_HASHPTE));
695#endif
696}
697
698
699static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
700 pte_t *ptep, pte_t pte)
701{
702#if defined(CONFIG_PTE_64BIT) && defined(CONFIG_SMP) && defined(CONFIG_DEBUG_VM)
703 WARN_ON(pte_present(*ptep));
704#endif
705 __set_pte_at(mm, addr, ptep, pte);
706}
707
708/*
709 * 2.6 calls this without flushing the TLB entry; this is wrong 206 * 2.6 calls this without flushing the TLB entry; this is wrong
710 * for our hash-based implementation, we fix that up here. 207 * for our hash-based implementation, we fix that up here.
711 */ 208 */
@@ -745,24 +242,14 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
745} 242}
746 243
747 244
748#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 245static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
749static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty)
750{ 246{
751 unsigned long bits = pte_val(entry) & 247 unsigned long bits = pte_val(entry) &
752 (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW); 248 (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW |
249 _PAGE_HWEXEC | _PAGE_EXEC);
753 pte_update(ptep, 0, bits); 250 pte_update(ptep, 0, bits);
754} 251}
755 252
756#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
757({ \
758 int __changed = !pte_same(*(__ptep), __entry); \
759 if (__changed) { \
760 __ptep_set_access_flags(__ptep, __entry, __dirty); \
761 flush_tlb_page_nohash(__vma, __address); \
762 } \
763 __changed; \
764})
765
766#define __HAVE_ARCH_PTE_SAME 253#define __HAVE_ARCH_PTE_SAME
767#define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) 254#define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0)
768 255
diff --git a/arch/powerpc/include/asm/pgtable-4k.h b/arch/powerpc/include/asm/pgtable-ppc64-4k.h
index 1dbca4e7de67..6eefdcffa359 100644
--- a/arch/powerpc/include/asm/pgtable-4k.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64-4k.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_POWERPC_PGTABLE_4K_H 1#ifndef _ASM_POWERPC_PGTABLE_PPC64_4K_H
2#define _ASM_POWERPC_PGTABLE_4K_H 2#define _ASM_POWERPC_PGTABLE_PPC64_4K_H
3/* 3/*
4 * Entries per page directory level. The PTE level must use a 64b record 4 * Entries per page directory level. The PTE level must use a 64b record
5 * for each page table entry. The PMD and PGD level use a 32b record for 5 * for each page table entry. The PMD and PGD level use a 32b record for
@@ -40,28 +40,6 @@
40#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 40#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
41#define PGDIR_MASK (~(PGDIR_SIZE-1)) 41#define PGDIR_MASK (~(PGDIR_SIZE-1))
42 42
43/* PTE bits */
44#define _PAGE_HASHPTE 0x0400 /* software: pte has an associated HPTE */
45#define _PAGE_SECONDARY 0x8000 /* software: HPTE is in secondary group */
46#define _PAGE_GROUP_IX 0x7000 /* software: HPTE index within group */
47#define _PAGE_F_SECOND _PAGE_SECONDARY
48#define _PAGE_F_GIX _PAGE_GROUP_IX
49#define _PAGE_SPECIAL 0x10000 /* software: special page */
50#define __HAVE_ARCH_PTE_SPECIAL
51
52/* PTE flags to conserve for HPTE identification */
53#define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \
54 _PAGE_SECONDARY | _PAGE_GROUP_IX)
55
56/* There is no 4K PFN hack on 4K pages */
57#define _PAGE_4K_PFN 0
58
59/* PAGE_MASK gives the right answer below, but only by accident */
60/* It should be preserving the high 48 bits and then specifically */
61/* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
62#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
63 _PAGE_HPTEFLAGS | _PAGE_SPECIAL)
64
65/* Bits to mask out from a PMD to get to the PTE page */ 43/* Bits to mask out from a PMD to get to the PTE page */
66#define PMD_MASKED_BITS 0 44#define PMD_MASKED_BITS 0
67/* Bits to mask out from a PUD to get to the PMD page */ 45/* Bits to mask out from a PUD to get to the PMD page */
@@ -69,30 +47,6 @@
69/* Bits to mask out from a PGD to get to the PUD page */ 47/* Bits to mask out from a PGD to get to the PUD page */
70#define PGD_MASKED_BITS 0 48#define PGD_MASKED_BITS 0
71 49
72/* shift to put page number into pte */
73#define PTE_RPN_SHIFT (17)
74
75#ifdef STRICT_MM_TYPECHECKS
76#define __real_pte(e,p) ((real_pte_t){(e)})
77#define __rpte_to_pte(r) ((r).pte)
78#else
79#define __real_pte(e,p) (e)
80#define __rpte_to_pte(r) (__pte(r))
81#endif
82#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> 12)
83
84#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
85 do { \
86 index = 0; \
87 shift = mmu_psize_defs[psize].shift; \
88
89#define pte_iterate_hashed_end() } while(0)
90
91#ifdef CONFIG_PPC_HAS_HASH_64K
92#define pte_pagesize_index(mm, addr, pte) get_slice_psize(mm, addr)
93#else
94#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
95#endif
96 50
97/* 51/*
98 * 4-level page tables related bits 52 * 4-level page tables related bits
@@ -112,6 +66,9 @@
112#define pud_ERROR(e) \ 66#define pud_ERROR(e) \
113 printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e)) 67 printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e))
114 68
69/*
70 * On all 4K setups, remap_4k_pfn() equates to remap_pfn_range() */
115#define remap_4k_pfn(vma, addr, pfn, prot) \ 71#define remap_4k_pfn(vma, addr, pfn, prot) \
116 remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, (prot)) 72 remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, (prot))
117#endif /* _ASM_POWERPC_PGTABLE_4K_H */ 73
74#endif /* _ASM_POWERPC_PGTABLE_PPC64_4K_H */
diff --git a/arch/powerpc/include/asm/pgtable-ppc64-64k.h b/arch/powerpc/include/asm/pgtable-ppc64-64k.h
new file mode 100644
index 000000000000..6cc085b945a5
--- /dev/null
+++ b/arch/powerpc/include/asm/pgtable-ppc64-64k.h
@@ -0,0 +1,42 @@
1#ifndef _ASM_POWERPC_PGTABLE_PPC64_64K_H
2#define _ASM_POWERPC_PGTABLE_PPC64_64K_H
3
4#include <asm-generic/pgtable-nopud.h>
5
6
7#define PTE_INDEX_SIZE 12
8#define PMD_INDEX_SIZE 12
9#define PUD_INDEX_SIZE 0
10#define PGD_INDEX_SIZE 4
11
12#ifndef __ASSEMBLY__
13
14#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE)
15#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE)
16#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
17
18#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE)
19#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
20#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE)
21
22/* With 4k base page size, hugepage PTEs go at the PMD level */
23#define MIN_HUGEPTE_SHIFT PAGE_SHIFT
24
25/* PMD_SHIFT determines what a second-level page table entry can map */
26#define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE)
27#define PMD_SIZE (1UL << PMD_SHIFT)
28#define PMD_MASK (~(PMD_SIZE-1))
29
30/* PGDIR_SHIFT determines what a third-level page table entry can map */
31#define PGDIR_SHIFT (PMD_SHIFT + PMD_INDEX_SIZE)
32#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
33#define PGDIR_MASK (~(PGDIR_SIZE-1))
34
35#endif /* __ASSEMBLY__ */
36
37/* Bits to mask out from a PMD to get to the PTE page */
38#define PMD_MASKED_BITS 0x1ff
39/* Bits to mask out from a PGD/PUD to get to the PMD page */
40#define PUD_MASKED_BITS 0x1ff
41
42#endif /* _ASM_POWERPC_PGTABLE_PPC64_64K_H */
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index b0f18be81d9f..c40db05f21e0 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -11,9 +11,9 @@
11#endif /* __ASSEMBLY__ */ 11#endif /* __ASSEMBLY__ */
12 12
13#ifdef CONFIG_PPC_64K_PAGES 13#ifdef CONFIG_PPC_64K_PAGES
14#include <asm/pgtable-64k.h> 14#include <asm/pgtable-ppc64-64k.h>
15#else 15#else
16#include <asm/pgtable-4k.h> 16#include <asm/pgtable-ppc64-4k.h>
17#endif 17#endif
18 18
19#define FIRST_USER_ADDRESS 0 19#define FIRST_USER_ADDRESS 0
@@ -25,6 +25,8 @@
25 PUD_INDEX_SIZE + PGD_INDEX_SIZE + PAGE_SHIFT) 25 PUD_INDEX_SIZE + PGD_INDEX_SIZE + PAGE_SHIFT)
26#define PGTABLE_RANGE (ASM_CONST(1) << PGTABLE_EADDR_SIZE) 26#define PGTABLE_RANGE (ASM_CONST(1) << PGTABLE_EADDR_SIZE)
27 27
28
29/* Some sanity checking */
28#if TASK_SIZE_USER64 > PGTABLE_RANGE 30#if TASK_SIZE_USER64 > PGTABLE_RANGE
29#error TASK_SIZE_USER64 exceeds pagetable range 31#error TASK_SIZE_USER64 exceeds pagetable range
30#endif 32#endif
@@ -33,7 +35,6 @@
33#error TASK_SIZE_USER64 exceeds user VSID range 35#error TASK_SIZE_USER64 exceeds user VSID range
34#endif 36#endif
35 37
36
37/* 38/*
38 * Define the address range of the vmalloc VM area. 39 * Define the address range of the vmalloc VM area.
39 */ 40 */
@@ -76,83 +77,12 @@
76 77
77 78
78/* 79/*
79 * Common bits in a linux-style PTE. These match the bits in the 80 * Include the PTE bits definitions
80 * (hardware-defined) PowerPC PTE as closely as possible. Additional
81 * bits may be defined in pgtable-*.h
82 */ 81 */
83#define _PAGE_PRESENT 0x0001 /* software: pte contains a translation */ 82#include <asm/pte-hash64.h>
84#define _PAGE_USER 0x0002 /* matches one of the PP bits */ 83#include <asm/pte-common.h>
85#define _PAGE_FILE 0x0002 /* (!present only) software: pte holds file offset */
86#define _PAGE_EXEC 0x0004 /* No execute on POWER4 and newer (we invert) */
87#define _PAGE_GUARDED 0x0008
88#define _PAGE_COHERENT 0x0010 /* M: enforce memory coherence (SMP systems) */
89#define _PAGE_NO_CACHE 0x0020 /* I: cache inhibit */
90#define _PAGE_WRITETHRU 0x0040 /* W: cache write-through */
91#define _PAGE_DIRTY 0x0080 /* C: page changed */
92#define _PAGE_ACCESSED 0x0100 /* R: page referenced */
93#define _PAGE_RW 0x0200 /* software: user write access allowed */
94#define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */
95
96/* Strong Access Ordering */
97#define _PAGE_SAO (_PAGE_WRITETHRU | _PAGE_NO_CACHE | _PAGE_COHERENT)
98
99#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT)
100
101#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY)
102
103/* __pgprot defined in arch/powerpc/include/asm/page.h */
104#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
105
106#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER)
107#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER | _PAGE_EXEC)
108#define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
109#define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
110#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
111#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
112#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_WRENABLE)
113#define PAGE_KERNEL_CI __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | \
114 _PAGE_WRENABLE | _PAGE_NO_CACHE | _PAGE_GUARDED)
115#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_EXEC)
116
117#define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE)
118#define HAVE_PAGE_AGP
119
120#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | \
121 _PAGE_NO_CACHE | _PAGE_WRITETHRU | \
122 _PAGE_4K_PFN | _PAGE_RW | _PAGE_USER | \
123 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_EXEC)
124/* PTEIDX nibble */
125#define _PTEIDX_SECONDARY 0x8
126#define _PTEIDX_GROUP_IX 0x7
127 84
128 85
129/*
130 * POWER4 and newer have per page execute protection, older chips can only
131 * do this on a segment (256MB) basis.
132 *
133 * Also, write permissions imply read permissions.
134 * This is the closest we can get..
135 *
136 * Note due to the way vm flags are laid out, the bits are XWR
137 */
138#define __P000 PAGE_NONE
139#define __P001 PAGE_READONLY
140#define __P010 PAGE_COPY
141#define __P011 PAGE_COPY
142#define __P100 PAGE_READONLY_X
143#define __P101 PAGE_READONLY_X
144#define __P110 PAGE_COPY_X
145#define __P111 PAGE_COPY_X
146
147#define __S000 PAGE_NONE
148#define __S001 PAGE_READONLY
149#define __S010 PAGE_SHARED
150#define __S011 PAGE_SHARED
151#define __S100 PAGE_READONLY_X
152#define __S101 PAGE_READONLY_X
153#define __S110 PAGE_SHARED_X
154#define __S111 PAGE_SHARED_X
155
156#ifdef CONFIG_PPC_MM_SLICES 86#ifdef CONFIG_PPC_MM_SLICES
157#define HAVE_ARCH_UNMAPPED_AREA 87#define HAVE_ARCH_UNMAPPED_AREA
158#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 88#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
@@ -161,32 +91,38 @@
161#ifndef __ASSEMBLY__ 91#ifndef __ASSEMBLY__
162 92
163/* 93/*
164 * Conversion functions: convert a page and protection to a page entry, 94 * This is the default implementation of various PTE accessors, it's
165 * and a page entry and page directory to the page they refer to. 95 * used in all cases except Book3S with 64K pages where we have a
166 * 96 * concept of sub-pages
167 * mk_pte takes a (struct page *) as input
168 */ 97 */
169#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) 98#ifndef __real_pte
170 99
171static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) 100#ifdef STRICT_MM_TYPECHECKS
172{ 101#define __real_pte(e,p) ((real_pte_t){(e)})
173 pte_t pte; 102#define __rpte_to_pte(r) ((r).pte)
103#else
104#define __real_pte(e,p) (e)
105#define __rpte_to_pte(r) (__pte(r))
106#endif
107#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> 12)
174 108
109#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
110 do { \
111 index = 0; \
112 shift = mmu_psize_defs[psize].shift; \
175 113
176 pte_val(pte) = (pfn << PTE_RPN_SHIFT) | pgprot_val(pgprot); 114#define pte_iterate_hashed_end() } while(0)
177 return pte;
178}
179 115
180#define pte_modify(_pte, newprot) \ 116#ifdef CONFIG_PPC_HAS_HASH_64K
181 (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))) 117#define pte_pagesize_index(mm, addr, pte) get_slice_psize(mm, addr)
118#else
119#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
120#endif
182 121
183#define pte_none(pte) ((pte_val(pte) & ~_PAGE_HPTEFLAGS) == 0) 122#endif /* __real_pte */
184#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
185 123
186/* pte_clear moved to later in this file */
187 124
188#define pte_pfn(x) ((unsigned long)((pte_val(x)>>PTE_RPN_SHIFT))) 125/* pte_clear moved to later in this file */
189#define pte_page(x) pfn_to_page(pte_pfn(x))
190 126
191#define PMD_BAD_BITS (PTE_TABLE_SIZE-1) 127#define PMD_BAD_BITS (PTE_TABLE_SIZE-1)
192#define PUD_BAD_BITS (PMD_TABLE_SIZE-1) 128#define PUD_BAD_BITS (PMD_TABLE_SIZE-1)
@@ -235,36 +171,6 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
235/* This now only contains the vmalloc pages */ 171/* This now only contains the vmalloc pages */
236#define pgd_offset_k(address) pgd_offset(&init_mm, address) 172#define pgd_offset_k(address) pgd_offset(&init_mm, address)
237 173
238/*
239 * The following only work if pte_present() is true.
240 * Undefined behaviour if not..
241 */
242static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;}
243static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;}
244static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;}
245static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;}
246static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
247
248static inline pte_t pte_wrprotect(pte_t pte) {
249 pte_val(pte) &= ~(_PAGE_RW); return pte; }
250static inline pte_t pte_mkclean(pte_t pte) {
251 pte_val(pte) &= ~(_PAGE_DIRTY); return pte; }
252static inline pte_t pte_mkold(pte_t pte) {
253 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
254static inline pte_t pte_mkwrite(pte_t pte) {
255 pte_val(pte) |= _PAGE_RW; return pte; }
256static inline pte_t pte_mkdirty(pte_t pte) {
257 pte_val(pte) |= _PAGE_DIRTY; return pte; }
258static inline pte_t pte_mkyoung(pte_t pte) {
259 pte_val(pte) |= _PAGE_ACCESSED; return pte; }
260static inline pte_t pte_mkhuge(pte_t pte) {
261 return pte; }
262static inline pte_t pte_mkspecial(pte_t pte) {
263 pte_val(pte) |= _PAGE_SPECIAL; return pte; }
264static inline pgprot_t pte_pgprot(pte_t pte)
265{
266 return __pgprot(pte_val(pte) & PAGE_PROT_BITS);
267}
268 174
269/* Atomic PTE updates */ 175/* Atomic PTE updates */
270static inline unsigned long pte_update(struct mm_struct *mm, 176static inline unsigned long pte_update(struct mm_struct *mm,
@@ -272,6 +178,7 @@ static inline unsigned long pte_update(struct mm_struct *mm,
272 pte_t *ptep, unsigned long clr, 178 pte_t *ptep, unsigned long clr,
273 int huge) 179 int huge)
274{ 180{
181#ifdef PTE_ATOMIC_UPDATES
275 unsigned long old, tmp; 182 unsigned long old, tmp;
276 183
277 __asm__ __volatile__( 184 __asm__ __volatile__(
@@ -284,6 +191,13 @@ static inline unsigned long pte_update(struct mm_struct *mm,
284 : "=&r" (old), "=&r" (tmp), "=m" (*ptep) 191 : "=&r" (old), "=&r" (tmp), "=m" (*ptep)
285 : "r" (ptep), "r" (clr), "m" (*ptep), "i" (_PAGE_BUSY) 192 : "r" (ptep), "r" (clr), "m" (*ptep), "i" (_PAGE_BUSY)
286 : "cc" ); 193 : "cc" );
194#else
195 unsigned long old = pte_val(*ptep);
196 *ptep = __pte(old & ~clr);
197#endif
198 /* huge pages use the old page table lock */
199 if (!huge)
200 assert_pte_locked(mm, addr);
287 201
288 if (old & _PAGE_HASHPTE) 202 if (old & _PAGE_HASHPTE)
289 hpte_need_flush(mm, addr, ptep, old, huge); 203 hpte_need_flush(mm, addr, ptep, old, huge);
@@ -359,26 +273,17 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
359 pte_update(mm, addr, ptep, ~0UL, 0); 273 pte_update(mm, addr, ptep, ~0UL, 0);
360} 274}
361 275
362/*
363 * set_pte stores a linux PTE into the linux page table.
364 */
365static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
366 pte_t *ptep, pte_t pte)
367{
368 if (pte_present(*ptep))
369 pte_clear(mm, addr, ptep);
370 pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS);
371 *ptep = pte;
372}
373 276
374/* Set the dirty and/or accessed bits atomically in a linux PTE, this 277/* Set the dirty and/or accessed bits atomically in a linux PTE, this
375 * function doesn't need to flush the hash entry 278 * function doesn't need to flush the hash entry
376 */ 279 */
377#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 280static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
378static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty)
379{ 281{
380 unsigned long bits = pte_val(entry) & 282 unsigned long bits = pte_val(entry) &
381 (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); 283 (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW |
284 _PAGE_EXEC | _PAGE_HWEXEC);
285
286#ifdef PTE_ATOMIC_UPDATES
382 unsigned long old, tmp; 287 unsigned long old, tmp;
383 288
384 __asm__ __volatile__( 289 __asm__ __volatile__(
@@ -391,16 +296,11 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty)
391 :"=&r" (old), "=&r" (tmp), "=m" (*ptep) 296 :"=&r" (old), "=&r" (tmp), "=m" (*ptep)
392 :"r" (bits), "r" (ptep), "m" (*ptep), "i" (_PAGE_BUSY) 297 :"r" (bits), "r" (ptep), "m" (*ptep), "i" (_PAGE_BUSY)
393 :"cc"); 298 :"cc");
299#else
300 unsigned long old = pte_val(*ptep);
301 *ptep = __pte(old | bits);
302#endif
394} 303}
395#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
396({ \
397 int __changed = !pte_same(*(__ptep), __entry); \
398 if (__changed) { \
399 __ptep_set_access_flags(__ptep, __entry, __dirty); \
400 flush_tlb_page_nohash(__vma, __address); \
401 } \
402 __changed; \
403})
404 304
405#define __HAVE_ARCH_PTE_SAME 305#define __HAVE_ARCH_PTE_SAME
406#define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0) 306#define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0)
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 07f55e601696..eb17da781128 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -6,7 +6,17 @@
6#include <asm/processor.h> /* For TASK_SIZE */ 6#include <asm/processor.h> /* For TASK_SIZE */
7#include <asm/mmu.h> 7#include <asm/mmu.h>
8#include <asm/page.h> 8#include <asm/page.h>
9
9struct mm_struct; 10struct mm_struct;
11
12#ifdef CONFIG_DEBUG_VM
13extern void assert_pte_locked(struct mm_struct *mm, unsigned long addr);
14#else /* CONFIG_DEBUG_VM */
15static inline void assert_pte_locked(struct mm_struct *mm, unsigned long addr)
16{
17}
18#endif /* !CONFIG_DEBUG_VM */
19
10#endif /* !__ASSEMBLY__ */ 20#endif /* !__ASSEMBLY__ */
11 21
12#if defined(CONFIG_PPC64) 22#if defined(CONFIG_PPC64)
@@ -17,6 +27,130 @@ struct mm_struct;
17 27
18#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
19 29
30/* Generic accessors to PTE bits */
31static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
32static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
33static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
34static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
35static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
36static inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_PRESENT; }
37static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; }
38static inline pgprot_t pte_pgprot(pte_t pte) { return __pgprot(pte_val(pte) & PAGE_PROT_BITS); }
39
40/* Conversion functions: convert a page and protection to a page entry,
41 * and a page entry and page directory to the page they refer to.
42 *
43 * Even if PTEs can be unsigned long long, a PFN is always an unsigned
44 * long for now.
45 */
46static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
47 return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
48 pgprot_val(pgprot)); }
49static inline unsigned long pte_pfn(pte_t pte) {
50 return pte_val(pte) >> PTE_RPN_SHIFT; }
51
52/* Keep these as a macros to avoid include dependency mess */
53#define pte_page(x) pfn_to_page(pte_pfn(x))
54#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
55
56/* Generic modifiers for PTE bits */
57static inline pte_t pte_wrprotect(pte_t pte) {
58 pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; }
59static inline pte_t pte_mkclean(pte_t pte) {
60 pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; }
61static inline pte_t pte_mkold(pte_t pte) {
62 pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
63static inline pte_t pte_mkwrite(pte_t pte) {
64 pte_val(pte) |= _PAGE_RW; return pte; }
65static inline pte_t pte_mkdirty(pte_t pte) {
66 pte_val(pte) |= _PAGE_DIRTY; return pte; }
67static inline pte_t pte_mkyoung(pte_t pte) {
68 pte_val(pte) |= _PAGE_ACCESSED; return pte; }
69static inline pte_t pte_mkspecial(pte_t pte) {
70 pte_val(pte) |= _PAGE_SPECIAL; return pte; }
71static inline pte_t pte_mkhuge(pte_t pte) {
72 return pte; }
73static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
74{
75 pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
76 return pte;
77}
78
79
80/* Insert a PTE, top-level function is out of line. It uses an inline
81 * low level function in the respective pgtable-* files
82 */
83extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
84 pte_t pte);
85
86/* This low level function performs the actual PTE insertion
87 * Setting the PTE depends on the MMU type and other factors. It's
88 * an horrible mess that I'm not going to try to clean up now but
89 * I'm keeping it in one place rather than spread around
90 */
91static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
92 pte_t *ptep, pte_t pte, int percpu)
93{
94#if defined(CONFIG_PPC_STD_MMU_32) && defined(CONFIG_SMP) && !defined(CONFIG_PTE_64BIT)
95 /* First case is 32-bit Hash MMU in SMP mode with 32-bit PTEs. We use the
96 * helper pte_update() which does an atomic update. We need to do that
97 * because a concurrent invalidation can clear _PAGE_HASHPTE. If it's a
98 * per-CPU PTE such as a kmap_atomic, we do a simple update preserving
99 * the hash bits instead (ie, same as the non-SMP case)
100 */
101 if (percpu)
102 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE)
103 | (pte_val(pte) & ~_PAGE_HASHPTE));
104 else
105 pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte));
106
107#elif defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT) && defined(CONFIG_SMP)
108 /* Second case is 32-bit with 64-bit PTE in SMP mode. In this case, we
109 * can just store as long as we do the two halves in the right order
110 * with a barrier in between. This is possible because we take care,
111 * in the hash code, to pre-invalidate if the PTE was already hashed,
112 * which synchronizes us with any concurrent invalidation.
113 * In the percpu case, we also fallback to the simple update preserving
114 * the hash bits
115 */
116 if (percpu) {
117 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE)
118 | (pte_val(pte) & ~_PAGE_HASHPTE));
119 return;
120 }
121#if _PAGE_HASHPTE != 0
122 if (pte_val(*ptep) & _PAGE_HASHPTE)
123 flush_hash_entry(mm, ptep, addr);
124#endif
125 __asm__ __volatile__("\
126 stw%U0%X0 %2,%0\n\
127 eieio\n\
128 stw%U0%X0 %L2,%1"
129 : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4))
130 : "r" (pte) : "memory");
131
132#elif defined(CONFIG_PPC_STD_MMU_32)
133 /* Third case is 32-bit hash table in UP mode, we need to preserve
134 * the _PAGE_HASHPTE bit since we may not have invalidated the previous
135 * translation in the hash yet (done in a subsequent flush_tlb_xxx())
136 * and see we need to keep track that this PTE needs invalidating
137 */
138 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE)
139 | (pte_val(pte) & ~_PAGE_HASHPTE));
140
141#else
142 /* Anything else just stores the PTE normally. That covers all 64-bit
143 * cases, and 32-bit non-hash with 64-bit PTEs in UP mode
144 */
145 *ptep = pte;
146#endif
147}
148
149
150#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
151extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address,
152 pte_t *ptep, pte_t entry, int dirty);
153
20/* 154/*
21 * Macro to mark a page protection value as "uncacheable". 155 * Macro to mark a page protection value as "uncacheable".
22 */ 156 */
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
new file mode 100644
index 000000000000..f4a4db8d5555
--- /dev/null
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -0,0 +1,73 @@
1/*
2 * Copyright 2009 Freescale Semicondutor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * provides masks and opcode images for use by code generation, emulation
10 * and for instructions that older assemblers might not know about
11 */
12#ifndef _ASM_POWERPC_PPC_OPCODE_H
13#define _ASM_POWERPC_PPC_OPCODE_H
14
15#include <linux/stringify.h>
16#include <asm/asm-compat.h>
17
18/* sorted alphabetically */
19#define PPC_INST_DCBA 0x7c0005ec
20#define PPC_INST_DCBA_MASK 0xfc0007fe
21#define PPC_INST_DCBAL 0x7c2005ec
22#define PPC_INST_DCBZL 0x7c2007ec
23#define PPC_INST_ISEL 0x7c00001e
24#define PPC_INST_ISEL_MASK 0xfc00003e
25#define PPC_INST_LSWI 0x7c0004aa
26#define PPC_INST_LSWX 0x7c00042a
27#define PPC_INST_LWSYNC 0x7c2004ac
28#define PPC_INST_MCRXR 0x7c000400
29#define PPC_INST_MCRXR_MASK 0xfc0007fe
30#define PPC_INST_MFSPR_PVR 0x7c1f42a6
31#define PPC_INST_MFSPR_PVR_MASK 0xfc1fffff
32#define PPC_INST_MSGSND 0x7c00019c
33#define PPC_INST_NOP 0x60000000
34#define PPC_INST_POPCNTB 0x7c0000f4
35#define PPC_INST_POPCNTB_MASK 0xfc0007fe
36#define PPC_INST_RFCI 0x4c000066
37#define PPC_INST_RFDI 0x4c00004e
38#define PPC_INST_RFMCI 0x4c00004c
39
40#define PPC_INST_STRING 0x7c00042a
41#define PPC_INST_STRING_MASK 0xfc0007fe
42#define PPC_INST_STRING_GEN_MASK 0xfc00067e
43
44#define PPC_INST_STSWI 0x7c0005aa
45#define PPC_INST_STSWX 0x7c00052a
46#define PPC_INST_TLBILX 0x7c000626
47#define PPC_INST_WAIT 0x7c00007c
48
49/* macros to insert fields into opcodes */
50#define __PPC_RA(a) ((a & 0x1f) << 16)
51#define __PPC_RB(b) ((b & 0x1f) << 11)
52#define __PPC_T_TLB(t) ((t & 0x3) << 21)
53#define __PPC_WC(w) ((w & 0x3) << 21)
54
55/* Deal with instructions that older assemblers aren't aware of */
56#define PPC_DCBAL(a, b) stringify_in_c(.long PPC_INST_DCBAL | \
57 __PPC_RA(a) | __PPC_RB(b))
58#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_INST_DCBZL | \
59 __PPC_RA(a) | __PPC_RB(b))
60#define PPC_MSGSND(b) stringify_in_c(.long PPC_INST_MSGSND | \
61 __PPC_RB(b))
62#define PPC_RFCI stringify_in_c(.long PPC_INST_RFCI)
63#define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI)
64#define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI)
65#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_INST_TLBILX | \
66 __PPC_T_TLB(t) | __PPC_RA(a) | __PPC_RB(b))
67#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b)
68#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b)
69#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b)
70#define PPC_WAIT(w) stringify_in_c(.long PPC_INST_WAIT | \
71 __PPC_WC(w))
72
73#endif /* _ASM_POWERPC_PPC_OPCODE_H */
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 1a0d628eb114..f59a66684aed 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -7,6 +7,7 @@
7#include <linux/stringify.h> 7#include <linux/stringify.h>
8#include <asm/asm-compat.h> 8#include <asm/asm-compat.h>
9#include <asm/processor.h> 9#include <asm/processor.h>
10#include <asm/ppc-opcode.h>
10 11
11#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
12#error __FILE__ should only be used in assembler files 13#error __FILE__ should only be used in assembler files
@@ -167,11 +168,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \
167#define HMT_MEDIUM_HIGH or 5,5,5 # medium high priority 168#define HMT_MEDIUM_HIGH or 5,5,5 # medium high priority
168#define HMT_HIGH or 3,3,3 169#define HMT_HIGH or 3,3,3
169 170
170/* handle instructions that older assemblers may not know */
171#define RFCI .long 0x4c000066 /* rfci instruction */
172#define RFDI .long 0x4c00004e /* rfdi instruction */
173#define RFMCI .long 0x4c00004c /* rfmci instruction */
174
175#ifdef __KERNEL__ 171#ifdef __KERNEL__
176#ifdef CONFIG_PPC64 172#ifdef CONFIG_PPC64
177 173
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index d3466490104a..9eed29eee604 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -313,6 +313,25 @@ static inline void prefetchw(const void *x)
313#define HAVE_ARCH_PICK_MMAP_LAYOUT 313#define HAVE_ARCH_PICK_MMAP_LAYOUT
314#endif 314#endif
315 315
316#ifdef CONFIG_PPC64
317static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32)
318{
319 unsigned long sp;
320
321 if (is_32)
322 sp = regs->gpr[1] & 0x0ffffffffUL;
323 else
324 sp = regs->gpr[1];
325
326 return sp;
327}
328#else
329static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32)
330{
331 return regs->gpr[1];
332}
333#endif
334
316#endif /* __KERNEL__ */ 335#endif /* __KERNEL__ */
317#endif /* __ASSEMBLY__ */ 336#endif /* __ASSEMBLY__ */
318#endif /* _ASM_POWERPC_PROCESSOR_H */ 337#endif /* _ASM_POWERPC_PROCESSOR_H */
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812698d2..cdb6fd814de8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
50 50
51enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void); 51enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
52 52
53extern u64 ps3_os_area_get_rtc_diff(void);
54extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
55
53/* dma routines */ 56/* dma routines */
54 57
55enum ps3_dma_page_size { 58enum ps3_dma_page_size {
diff --git a/arch/powerpc/include/asm/ps3av.h b/arch/powerpc/include/asm/ps3av.h
index cd24ac16660a..0427b0b53d2d 100644
--- a/arch/powerpc/include/asm/ps3av.h
+++ b/arch/powerpc/include/asm/ps3av.h
@@ -730,7 +730,7 @@ extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *);
730extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, 730extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *,
731 u32); 731 u32);
732 732
733extern int ps3av_set_video_mode(u32); 733extern int ps3av_set_video_mode(int);
734extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); 734extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
735extern int ps3av_get_auto_mode(void); 735extern int ps3av_get_auto_mode(void);
736extern int ps3av_get_mode(void); 736extern int ps3av_get_mode(void);
diff --git a/arch/powerpc/include/asm/pte-40x.h b/arch/powerpc/include/asm/pte-40x.h
new file mode 100644
index 000000000000..07630faae029
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-40x.h
@@ -0,0 +1,64 @@
1#ifndef _ASM_POWERPC_PTE_40x_H
2#define _ASM_POWERPC_PTE_40x_H
3#ifdef __KERNEL__
4
5/*
6 * At present, all PowerPC 400-class processors share a similar TLB
7 * architecture. The instruction and data sides share a unified,
8 * 64-entry, fully-associative TLB which is maintained totally under
9 * software control. In addition, the instruction side has a
10 * hardware-managed, 4-entry, fully-associative TLB which serves as a
11 * first level to the shared TLB. These two TLBs are known as the UTLB
12 * and ITLB, respectively (see "mmu.h" for definitions).
13 *
14 * There are several potential gotchas here. The 40x hardware TLBLO
15 * field looks like this:
16 *
17 * 0 1 2 3 4 ... 18 19 20 21 22 23 24 25 26 27 28 29 30 31
18 * RPN..................... 0 0 EX WR ZSEL....... W I M G
19 *
20 * Where possible we make the Linux PTE bits match up with this
21 *
22 * - bits 20 and 21 must be cleared, because we use 4k pages (40x can
23 * support down to 1k pages), this is done in the TLBMiss exception
24 * handler.
25 * - We use only zones 0 (for kernel pages) and 1 (for user pages)
26 * of the 16 available. Bit 24-26 of the TLB are cleared in the TLB
27 * miss handler. Bit 27 is PAGE_USER, thus selecting the correct
28 * zone.
29 * - PRESENT *must* be in the bottom two bits because swap cache
30 * entries use the top 30 bits. Because 40x doesn't support SMP
31 * anyway, M is irrelevant so we borrow it for PAGE_PRESENT. Bit 30
32 * is cleared in the TLB miss handler before the TLB entry is loaded.
33 * - All other bits of the PTE are loaded into TLBLO without
34 * modification, leaving us only the bits 20, 21, 24, 25, 26, 30 for
35 * software PTE bits. We actually use use bits 21, 24, 25, and
36 * 30 respectively for the software bits: ACCESSED, DIRTY, RW, and
37 * PRESENT.
38 */
39
40#define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */
41#define _PAGE_FILE 0x001 /* when !present: nonlinear file mapping */
42#define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */
43#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */
44#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */
45#define _PAGE_USER 0x010 /* matches one of the zone permission bits */
46#define _PAGE_RW 0x040 /* software: Writes permitted */
47#define _PAGE_DIRTY 0x080 /* software: dirty page */
48#define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */
49#define _PAGE_HWEXEC 0x200 /* hardware: EX permission */
50#define _PAGE_ACCESSED 0x400 /* software: R: page referenced */
51
52#define _PMD_PRESENT 0x400 /* PMD points to page of PTEs */
53#define _PMD_BAD 0x802
54#define _PMD_SIZE 0x0e0 /* size field, != 0 for large-page PMD entry */
55#define _PMD_SIZE_4M 0x0c0
56#define _PMD_SIZE_16M 0x0e0
57
58#define PMD_PAGE_SIZE(pmdval) (1024 << (((pmdval) & _PMD_SIZE) >> 4))
59
60/* Until my rework is finished, 40x still needs atomic PTE updates */
61#define PTE_ATOMIC_UPDATES 1
62
63#endif /* __KERNEL__ */
64#endif /* _ASM_POWERPC_PTE_40x_H */
diff --git a/arch/powerpc/include/asm/pte-44x.h b/arch/powerpc/include/asm/pte-44x.h
new file mode 100644
index 000000000000..37e98bcf83e0
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-44x.h
@@ -0,0 +1,102 @@
1#ifndef _ASM_POWERPC_PTE_44x_H
2#define _ASM_POWERPC_PTE_44x_H
3#ifdef __KERNEL__
4
5/*
6 * Definitions for PPC440
7 *
8 * Because of the 3 word TLB entries to support 36-bit addressing,
9 * the attribute are difficult to map in such a fashion that they
10 * are easily loaded during exception processing. I decided to
11 * organize the entry so the ERPN is the only portion in the
12 * upper word of the PTE and the attribute bits below are packed
13 * in as sensibly as they can be in the area below a 4KB page size
14 * oriented RPN. This at least makes it easy to load the RPN and
15 * ERPN fields in the TLB. -Matt
16 *
17 * This isn't entirely true anymore, at least some bits are now
18 * easier to move into the TLB from the PTE. -BenH.
19 *
20 * Note that these bits preclude future use of a page size
21 * less than 4KB.
22 *
23 *
24 * PPC 440 core has following TLB attribute fields;
25 *
26 * TLB1:
27 * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
28 * RPN................................. - - - - - - ERPN.......
29 *
30 * TLB2:
31 * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 * - - - - - - U0 U1 U2 U3 W I M G E - UX UW UR SX SW SR
33 *
34 * Newer 440 cores (440x6 as used on AMCC 460EX/460GT) have additional
35 * TLB2 storage attibute fields. Those are:
36 *
37 * TLB2:
38 * 0...10 11 12 13 14 15 16...31
39 * no change WL1 IL1I IL1D IL2I IL2D no change
40 *
41 * There are some constrains and options, to decide mapping software bits
42 * into TLB entry.
43 *
44 * - PRESENT *must* be in the bottom three bits because swap cache
45 * entries use the top 29 bits for TLB2.
46 *
47 * - FILE *must* be in the bottom three bits because swap cache
48 * entries use the top 29 bits for TLB2.
49 *
50 * - CACHE COHERENT bit (M) has no effect on original PPC440 cores,
51 * because it doesn't support SMP. However, some later 460 variants
52 * have -some- form of SMP support and so I keep the bit there for
53 * future use
54 *
55 * With the PPC 44x Linux implementation, the 0-11th LSBs of the PTE are used
56 * for memory protection related functions (see PTE structure in
57 * include/asm-ppc/mmu.h). The _PAGE_XXX definitions in this file map to the
58 * above bits. Note that the bit values are CPU specific, not architecture
59 * specific.
60 *
61 * The kernel PTE entry holds an arch-dependent swp_entry structure under
62 * certain situations. In other words, in such situations some portion of
63 * the PTE bits are used as a swp_entry. In the PPC implementation, the
64 * 3-24th LSB are shared with swp_entry, however the 0-2nd three LSB still
65 * hold protection values. That means the three protection bits are
66 * reserved for both PTE and SWAP entry at the most significant three
67 * LSBs.
68 *
69 * There are three protection bits available for SWAP entry:
70 * _PAGE_PRESENT
71 * _PAGE_FILE
72 * _PAGE_HASHPTE (if HW has)
73 *
74 * So those three bits have to be inside of 0-2nd LSB of PTE.
75 *
76 */
77
78#define _PAGE_PRESENT 0x00000001 /* S: PTE valid */
79#define _PAGE_RW 0x00000002 /* S: Write permission */
80#define _PAGE_FILE 0x00000004 /* S: nonlinear file mapping */
81#define _PAGE_HWEXEC 0x00000004 /* H: Execute permission */
82#define _PAGE_ACCESSED 0x00000008 /* S: Page referenced */
83#define _PAGE_DIRTY 0x00000010 /* S: Page dirty */
84#define _PAGE_SPECIAL 0x00000020 /* S: Special page */
85#define _PAGE_USER 0x00000040 /* S: User page */
86#define _PAGE_ENDIAN 0x00000080 /* H: E bit */
87#define _PAGE_GUARDED 0x00000100 /* H: G bit */
88#define _PAGE_COHERENT 0x00000200 /* H: M bit */
89#define _PAGE_NO_CACHE 0x00000400 /* H: I bit */
90#define _PAGE_WRITETHRU 0x00000800 /* H: W bit */
91
92/* TODO: Add large page lowmem mapping support */
93#define _PMD_PRESENT 0
94#define _PMD_PRESENT_MASK (PAGE_MASK)
95#define _PMD_BAD (~PAGE_MASK)
96
97/* ERPN in a PTE never gets cleared, ignore it */
98#define _PTE_NONE_MASK 0xffffffff00000000ULL
99
100
101#endif /* __KERNEL__ */
102#endif /* _ASM_POWERPC_PTE_44x_H */
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h
new file mode 100644
index 000000000000..8c6e31251034
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-8xx.h
@@ -0,0 +1,67 @@
1#ifndef _ASM_POWERPC_PTE_8xx_H
2#define _ASM_POWERPC_PTE_8xx_H
3#ifdef __KERNEL__
4
5/*
6 * The PowerPC MPC8xx uses a TLB with hardware assisted, software tablewalk.
7 * We also use the two level tables, but we can put the real bits in them
8 * needed for the TLB and tablewalk. These definitions require Mx_CTR.PPM = 0,
9 * Mx_CTR.PPCS = 0, and MD_CTR.TWAM = 1. The level 2 descriptor has
10 * additional page protection (when Mx_CTR.PPCS = 1) that allows TLB hit
11 * based upon user/super access. The TLB does not have accessed nor write
12 * protect. We assume that if the TLB get loaded with an entry it is
13 * accessed, and overload the changed bit for write protect. We use
14 * two bits in the software pte that are supposed to be set to zero in
15 * the TLB entry (24 and 25) for these indicators. Although the level 1
16 * descriptor contains the guarded and writethrough/copyback bits, we can
17 * set these at the page level since they get copied from the Mx_TWC
18 * register when the TLB entry is loaded. We will use bit 27 for guard, since
19 * that is where it exists in the MD_TWC, and bit 26 for writethrough.
20 * These will get masked from the level 2 descriptor at TLB load time, and
21 * copied to the MD_TWC before it gets loaded.
22 * Large page sizes added. We currently support two sizes, 4K and 8M.
23 * This also allows a TLB hander optimization because we can directly
24 * load the PMD into MD_TWC. The 8M pages are only used for kernel
25 * mapping of well known areas. The PMD (PGD) entries contain control
26 * flags in addition to the address, so care must be taken that the
27 * software no longer assumes these are only pointers.
28 */
29
30/* Definitions for 8xx embedded chips. */
31#define _PAGE_PRESENT 0x0001 /* Page is valid */
32#define _PAGE_FILE 0x0002 /* when !present: nonlinear file mapping */
33#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */
34#define _PAGE_SHARED 0x0004 /* No ASID (context) compare */
35
36/* These five software bits must be masked out when the entry is loaded
37 * into the TLB.
38 */
39#define _PAGE_EXEC 0x0008 /* software: i-cache coherency required */
40#define _PAGE_GUARDED 0x0010 /* software: guarded access */
41#define _PAGE_DIRTY 0x0020 /* software: page changed */
42#define _PAGE_RW 0x0040 /* software: user write access allowed */
43#define _PAGE_ACCESSED 0x0080 /* software: page referenced */
44
45/* Setting any bits in the nibble with the follow two controls will
46 * require a TLB exception handler change. It is assumed unused bits
47 * are always zero.
48 */
49#define _PAGE_HWWRITE 0x0100 /* h/w write enable: never set in Linux PTE */
50#define _PAGE_USER 0x0800 /* One of the PP bits, the other is USER&~RW */
51
52#define _PMD_PRESENT 0x0001
53#define _PMD_BAD 0x0ff0
54#define _PMD_PAGE_MASK 0x000c
55#define _PMD_PAGE_8M 0x000c
56
57#define _PTE_NONE_MASK _PAGE_ACCESSED
58
59/* Until my rework is finished, 8xx still needs atomic PTE updates */
60#define PTE_ATOMIC_UPDATES 1
61
62/* We need to add _PAGE_SHARED to kernel pages */
63#define _PAGE_KERNEL_RO (_PAGE_SHARED)
64#define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE)
65
66#endif /* __KERNEL__ */
67#endif /* _ASM_POWERPC_PTE_8xx_H */
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
new file mode 100644
index 000000000000..a7e210b6b48c
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-common.h
@@ -0,0 +1,182 @@
1/* Included from asm/pgtable-*.h only ! */
2
3/*
4 * Some bits are only used on some cpu families... Make sure that all
5 * the undefined gets a sensible default
6 */
7#ifndef _PAGE_HASHPTE
8#define _PAGE_HASHPTE 0
9#endif
10#ifndef _PAGE_SHARED
11#define _PAGE_SHARED 0
12#endif
13#ifndef _PAGE_HWWRITE
14#define _PAGE_HWWRITE 0
15#endif
16#ifndef _PAGE_HWEXEC
17#define _PAGE_HWEXEC 0
18#endif
19#ifndef _PAGE_EXEC
20#define _PAGE_EXEC 0
21#endif
22#ifndef _PAGE_ENDIAN
23#define _PAGE_ENDIAN 0
24#endif
25#ifndef _PAGE_COHERENT
26#define _PAGE_COHERENT 0
27#endif
28#ifndef _PAGE_WRITETHRU
29#define _PAGE_WRITETHRU 0
30#endif
31#ifndef _PAGE_SPECIAL
32#define _PAGE_SPECIAL 0
33#endif
34#ifndef _PAGE_4K_PFN
35#define _PAGE_4K_PFN 0
36#endif
37#ifndef _PAGE_PSIZE
38#define _PAGE_PSIZE 0
39#endif
40#ifndef _PMD_PRESENT_MASK
41#define _PMD_PRESENT_MASK _PMD_PRESENT
42#endif
43#ifndef _PMD_SIZE
44#define _PMD_SIZE 0
45#define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
46#endif
47#ifndef _PAGE_KERNEL_RO
48#define _PAGE_KERNEL_RO 0
49#endif
50#ifndef _PAGE_KERNEL_RW
51#define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE)
52#endif
53#ifndef _PAGE_HPTEFLAGS
54#define _PAGE_HPTEFLAGS _PAGE_HASHPTE
55#endif
56#ifndef _PTE_NONE_MASK
57#define _PTE_NONE_MASK _PAGE_HPTEFLAGS
58#endif
59
60/* Make sure we get a link error if PMD_PAGE_SIZE is ever called on a
61 * kernel without large page PMD support
62 */
63#ifndef __ASSEMBLY__
64extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
65#endif /* __ASSEMBLY__ */
66
67/* Location of the PFN in the PTE. Most 32-bit platforms use the same
68 * as _PAGE_SHIFT here (ie, naturally aligned).
69 * Platform who don't just pre-define the value so we don't override it here
70 */
71#ifndef PTE_RPN_SHIFT
72#define PTE_RPN_SHIFT (PAGE_SHIFT)
73#endif
74
75/* The mask convered by the RPN must be a ULL on 32-bit platforms with
76 * 64-bit PTEs
77 */
78#if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
79#define PTE_RPN_MAX (1ULL << (64 - PTE_RPN_SHIFT))
80#define PTE_RPN_MASK (~((1ULL<<PTE_RPN_SHIFT)-1))
81#else
82#define PTE_RPN_MAX (1UL << (32 - PTE_RPN_SHIFT))
83#define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1))
84#endif
85
86/* _PAGE_CHG_MASK masks of bits that are to be preserved accross
87 * pgprot changes
88 */
89#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
90 _PAGE_ACCESSED | _PAGE_SPECIAL)
91
92/* Mask of bits returned by pte_pgprot() */
93#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
94 _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \
95 _PAGE_USER | _PAGE_ACCESSED | \
96 _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \
97 _PAGE_EXEC | _PAGE_HWEXEC)
98
99/*
100 * We define 2 sets of base prot bits, one for basic pages (ie,
101 * cacheable kernel and user pages) and one for non cacheable
102 * pages. We always set _PAGE_COHERENT when SMP is enabled or
103 * the processor might need it for DMA coherency.
104 */
105#define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_PSIZE)
106#if defined(CONFIG_SMP) || defined(CONFIG_PPC_STD_MMU)
107#define _PAGE_BASE (_PAGE_BASE_NC | _PAGE_COHERENT)
108#else
109#define _PAGE_BASE (_PAGE_BASE_NC)
110#endif
111
112/* Permission masks used to generate the __P and __S table,
113 *
114 * Note:__pgprot is defined in arch/powerpc/include/asm/page.h
115 *
116 * Write permissions imply read permissions for now (we could make write-only
117 * pages on BookE but we don't bother for now). Execute permission control is
118 * possible on platforms that define _PAGE_EXEC
119 *
120 * Note due to the way vm flags are laid out, the bits are XWR
121 */
122#define PAGE_NONE __pgprot(_PAGE_BASE)
123#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
124#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
125#define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
126#define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
127#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
128#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
129
130#define __P000 PAGE_NONE
131#define __P001 PAGE_READONLY
132#define __P010 PAGE_COPY
133#define __P011 PAGE_COPY
134#define __P100 PAGE_READONLY_X
135#define __P101 PAGE_READONLY_X
136#define __P110 PAGE_COPY_X
137#define __P111 PAGE_COPY_X
138
139#define __S000 PAGE_NONE
140#define __S001 PAGE_READONLY
141#define __S010 PAGE_SHARED
142#define __S011 PAGE_SHARED
143#define __S100 PAGE_READONLY_X
144#define __S101 PAGE_READONLY_X
145#define __S110 PAGE_SHARED_X
146#define __S111 PAGE_SHARED_X
147
148/* Permission masks used for kernel mappings */
149#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
150#define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
151 _PAGE_NO_CACHE)
152#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
153 _PAGE_NO_CACHE | _PAGE_GUARDED)
154#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \
155 _PAGE_HWEXEC)
156#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
157#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \
158 _PAGE_HWEXEC)
159
160/* Protection used for kernel text. We want the debuggers to be able to
161 * set breakpoints anywhere, so don't write protect the kernel text
162 * on platforms where such control is possible.
163 */
164#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
165 defined(CONFIG_KPROBES)
166#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
167#else
168#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
169#endif
170
171/* Make modules code happy. We don't set RO yet */
172#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
173
174/* Advertise special mapping type for AGP */
175#define PAGE_AGP (PAGE_KERNEL_NC)
176#define HAVE_PAGE_AGP
177
178/* Advertise support for _PAGE_SPECIAL */
179#ifdef _PAGE_SPECIAL
180#define __HAVE_ARCH_PTE_SPECIAL
181#endif
182
diff --git a/arch/powerpc/include/asm/pte-fsl-booke.h b/arch/powerpc/include/asm/pte-fsl-booke.h
new file mode 100644
index 000000000000..10820f58acf5
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-fsl-booke.h
@@ -0,0 +1,48 @@
1#ifndef _ASM_POWERPC_PTE_FSL_BOOKE_H
2#define _ASM_POWERPC_PTE_FSL_BOOKE_H
3#ifdef __KERNEL__
4
5/* PTE bit definitions for Freescale BookE SW loaded TLB MMU based
6 * processors
7 *
8 MMU Assist Register 3:
9
10 32 33 34 35 36 ... 50 51 52 53 54 55 56 57 58 59 60 61 62 63
11 RPN...................... 0 0 U0 U1 U2 U3 UX SX UW SW UR SR
12
13 - PRESENT *must* be in the bottom three bits because swap cache
14 entries use the top 29 bits.
15
16 - FILE *must* be in the bottom three bits because swap cache
17 entries use the top 29 bits.
18*/
19
20/* Definitions for FSL Book-E Cores */
21#define _PAGE_PRESENT 0x00001 /* S: PTE contains a translation */
22#define _PAGE_USER 0x00002 /* S: User page (maps to UR) */
23#define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */
24#define _PAGE_RW 0x00004 /* S: Write permission (SW) */
25#define _PAGE_DIRTY 0x00008 /* S: Page dirty */
26#define _PAGE_HWEXEC 0x00010 /* H: SX permission */
27#define _PAGE_ACCESSED 0x00020 /* S: Page referenced */
28
29#define _PAGE_ENDIAN 0x00040 /* H: E bit */
30#define _PAGE_GUARDED 0x00080 /* H: G bit */
31#define _PAGE_COHERENT 0x00100 /* H: M bit */
32#define _PAGE_NO_CACHE 0x00200 /* H: I bit */
33#define _PAGE_WRITETHRU 0x00400 /* H: W bit */
34#define _PAGE_SPECIAL 0x00800 /* S: Special page */
35
36#ifdef CONFIG_PTE_64BIT
37/* ERPN in a PTE never gets cleared, ignore it */
38#define _PTE_NONE_MASK 0xffffffffffff0000ULL
39/* We extend the size of the PTE flags area when using 64-bit PTEs */
40#define PTE_RPN_SHIFT (PAGE_SHIFT + 8)
41#endif
42
43#define _PMD_PRESENT 0
44#define _PMD_PRESENT_MASK (PAGE_MASK)
45#define _PMD_BAD (~PAGE_MASK)
46
47#endif /* __KERNEL__ */
48#endif /* _ASM_POWERPC_PTE_FSL_BOOKE_H */
diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
new file mode 100644
index 000000000000..16e571c7f9ef
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-hash32.h
@@ -0,0 +1,48 @@
1#ifndef _ASM_POWERPC_PTE_HASH32_H
2#define _ASM_POWERPC_PTE_HASH32_H
3#ifdef __KERNEL__
4
5/*
6 * The "classic" 32-bit implementation of the PowerPC MMU uses a hash
7 * table containing PTEs, together with a set of 16 segment registers,
8 * to define the virtual to physical address mapping.
9 *
10 * We use the hash table as an extended TLB, i.e. a cache of currently
11 * active mappings. We maintain a two-level page table tree, much
12 * like that used by the i386, for the sake of the Linux memory
13 * management code. Low-level assembler code in hash_low_32.S
14 * (procedure hash_page) is responsible for extracting ptes from the
15 * tree and putting them into the hash table when necessary, and
16 * updating the accessed and modified bits in the page table tree.
17 */
18
19#define _PAGE_PRESENT 0x001 /* software: pte contains a translation */
20#define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
21#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
22#define _PAGE_USER 0x004 /* usermode access allowed */
23#define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
24#define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
25#define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
26#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
27#define _PAGE_DIRTY 0x080 /* C: page changed */
28#define _PAGE_ACCESSED 0x100 /* R: page referenced */
29#define _PAGE_EXEC 0x200 /* software: i-cache coherency required */
30#define _PAGE_RW 0x400 /* software: user write access allowed */
31#define _PAGE_SPECIAL 0x800 /* software: Special page */
32
33#ifdef CONFIG_PTE_64BIT
34/* We never clear the high word of the pte */
35#define _PTE_NONE_MASK (0xffffffff00000000ULL | _PAGE_HASHPTE)
36#else
37#define _PTE_NONE_MASK _PAGE_HASHPTE
38#endif
39
40#define _PMD_PRESENT 0
41#define _PMD_PRESENT_MASK (PAGE_MASK)
42#define _PMD_BAD (~PAGE_MASK)
43
44/* Hash table based platforms need atomic updates of the linux PTE */
45#define PTE_ATOMIC_UPDATES 1
46
47#endif /* __KERNEL__ */
48#endif /* _ASM_POWERPC_PTE_HASH32_H */
diff --git a/arch/powerpc/include/asm/pte-hash64-4k.h b/arch/powerpc/include/asm/pte-hash64-4k.h
new file mode 100644
index 000000000000..c134e809aac3
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-hash64-4k.h
@@ -0,0 +1,17 @@
1/* To be include by pgtable-hash64.h only */
2
3/* PTE bits */
4#define _PAGE_HASHPTE 0x0400 /* software: pte has an associated HPTE */
5#define _PAGE_SECONDARY 0x8000 /* software: HPTE is in secondary group */
6#define _PAGE_GROUP_IX 0x7000 /* software: HPTE index within group */
7#define _PAGE_F_SECOND _PAGE_SECONDARY
8#define _PAGE_F_GIX _PAGE_GROUP_IX
9#define _PAGE_SPECIAL 0x10000 /* software: special page */
10
11/* PTE flags to conserve for HPTE identification */
12#define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \
13 _PAGE_SECONDARY | _PAGE_GROUP_IX)
14
15/* shift to put page number into pte */
16#define PTE_RPN_SHIFT (17)
17
diff --git a/arch/powerpc/include/asm/pgtable-64k.h b/arch/powerpc/include/asm/pte-hash64-64k.h
index 7389003349a6..e05d26fa372f 100644
--- a/arch/powerpc/include/asm/pgtable-64k.h
+++ b/arch/powerpc/include/asm/pte-hash64-64k.h
@@ -1,76 +1,6 @@
1#ifndef _ASM_POWERPC_PGTABLE_64K_H 1/* To be include by pgtable-hash64.h only */
2#define _ASM_POWERPC_PGTABLE_64K_H
3
4#include <asm-generic/pgtable-nopud.h>
5
6
7#define PTE_INDEX_SIZE 12
8#define PMD_INDEX_SIZE 12
9#define PUD_INDEX_SIZE 0
10#define PGD_INDEX_SIZE 4
11
12#ifndef __ASSEMBLY__
13#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE)
14#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE)
15#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
16
17#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE)
18#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
19#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE)
20
21#ifdef CONFIG_PPC_SUBPAGE_PROT
22/*
23 * For the sub-page protection option, we extend the PGD with one of
24 * these. Basically we have a 3-level tree, with the top level being
25 * the protptrs array. To optimize speed and memory consumption when
26 * only addresses < 4GB are being protected, pointers to the first
27 * four pages of sub-page protection words are stored in the low_prot
28 * array.
29 * Each page of sub-page protection words protects 1GB (4 bytes
30 * protects 64k). For the 3-level tree, each page of pointers then
31 * protects 8TB.
32 */
33struct subpage_prot_table {
34 unsigned long maxaddr; /* only addresses < this are protected */
35 unsigned int **protptrs[2];
36 unsigned int *low_prot[4];
37};
38
39#undef PGD_TABLE_SIZE
40#define PGD_TABLE_SIZE ((sizeof(pgd_t) << PGD_INDEX_SIZE) + \
41 sizeof(struct subpage_prot_table))
42
43#define SBP_L1_BITS (PAGE_SHIFT - 2)
44#define SBP_L2_BITS (PAGE_SHIFT - 3)
45#define SBP_L1_COUNT (1 << SBP_L1_BITS)
46#define SBP_L2_COUNT (1 << SBP_L2_BITS)
47#define SBP_L2_SHIFT (PAGE_SHIFT + SBP_L1_BITS)
48#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
49
50extern void subpage_prot_free(pgd_t *pgd);
51
52static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
53{
54 return (struct subpage_prot_table *)(pgd + PTRS_PER_PGD);
55}
56#endif /* CONFIG_PPC_SUBPAGE_PROT */
57#endif /* __ASSEMBLY__ */
58
59/* With 4k base page size, hugepage PTEs go at the PMD level */
60#define MIN_HUGEPTE_SHIFT PAGE_SHIFT
61
62/* PMD_SHIFT determines what a second-level page table entry can map */
63#define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE)
64#define PMD_SIZE (1UL << PMD_SHIFT)
65#define PMD_MASK (~(PMD_SIZE-1))
66
67/* PGDIR_SHIFT determines what a third-level page table entry can map */
68#define PGDIR_SHIFT (PMD_SHIFT + PMD_INDEX_SIZE)
69#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
70#define PGDIR_MASK (~(PGDIR_SIZE-1))
71 2
72/* Additional PTE bits (don't change without checking asm in hash_low.S) */ 3/* Additional PTE bits (don't change without checking asm in hash_low.S) */
73#define __HAVE_ARCH_PTE_SPECIAL
74#define _PAGE_SPECIAL 0x00000400 /* software: special page */ 4#define _PAGE_SPECIAL 0x00000400 /* software: special page */
75#define _PAGE_HPTE_SUB 0x0ffff000 /* combo only: sub pages HPTE bits */ 5#define _PAGE_HPTE_SUB 0x0ffff000 /* combo only: sub pages HPTE bits */
76#define _PAGE_HPTE_SUB0 0x08000000 /* combo only: first sub page */ 6#define _PAGE_HPTE_SUB0 0x08000000 /* combo only: first sub page */
@@ -107,21 +37,15 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
107 * of addressable physical space, or 46 bits for the special 4k PFNs. 37 * of addressable physical space, or 46 bits for the special 4k PFNs.
108 */ 38 */
109#define PTE_RPN_SHIFT (30) 39#define PTE_RPN_SHIFT (30)
110#define PTE_RPN_MAX (1UL << (64 - PTE_RPN_SHIFT))
111#define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1))
112
113/* _PAGE_CHG_MASK masks of bits that are to be preserved accross
114 * pgprot changes
115 */
116#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
117 _PAGE_ACCESSED | _PAGE_SPECIAL)
118 40
119/* Bits to mask out from a PMD to get to the PTE page */ 41#ifndef __ASSEMBLY__
120#define PMD_MASKED_BITS 0x1ff
121/* Bits to mask out from a PGD/PUD to get to the PMD page */
122#define PUD_MASKED_BITS 0x1ff
123 42
124/* Manipulate "rpte" values */ 43/*
44 * With 64K pages on hash table, we have a special PTE format that
45 * uses a second "half" of the page table to encode sub-page information
46 * in order to deal with 64K made of 4K HW pages. Thus we override the
47 * generic accessors and iterators here
48 */
125#define __real_pte(e,p) ((real_pte_t) { \ 49#define __real_pte(e,p) ((real_pte_t) { \
126 (e), pte_val(*((p) + PTRS_PER_PTE)) }) 50 (e), pte_val(*((p) + PTRS_PER_PTE)) })
127#define __rpte_to_hidx(r,index) ((pte_val((r).pte) & _PAGE_COMBO) ? \ 51#define __rpte_to_hidx(r,index) ((pte_val((r).pte) & _PAGE_COMBO) ? \
@@ -130,7 +54,6 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
130#define __rpte_sub_valid(rpte, index) \ 54#define __rpte_sub_valid(rpte, index) \
131 (pte_val(rpte.pte) & (_PAGE_HPTE_SUB0 >> (index))) 55 (pte_val(rpte.pte) & (_PAGE_HPTE_SUB0 >> (index)))
132 56
133
134/* Trick: we set __end to va + 64k, which happens works for 57/* Trick: we set __end to va + 64k, which happens works for
135 * a 16M page as well as we want only one iteration 58 * a 16M page as well as we want only one iteration
136 */ 59 */
@@ -152,4 +75,41 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
152 remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, \ 75 remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, \
153 __pgprot(pgprot_val((prot)) | _PAGE_4K_PFN)) 76 __pgprot(pgprot_val((prot)) | _PAGE_4K_PFN))
154 77
155#endif /* _ASM_POWERPC_PGTABLE_64K_H */ 78
79#ifdef CONFIG_PPC_SUBPAGE_PROT
80/*
81 * For the sub-page protection option, we extend the PGD with one of
82 * these. Basically we have a 3-level tree, with the top level being
83 * the protptrs array. To optimize speed and memory consumption when
84 * only addresses < 4GB are being protected, pointers to the first
85 * four pages of sub-page protection words are stored in the low_prot
86 * array.
87 * Each page of sub-page protection words protects 1GB (4 bytes
88 * protects 64k). For the 3-level tree, each page of pointers then
89 * protects 8TB.
90 */
91struct subpage_prot_table {
92 unsigned long maxaddr; /* only addresses < this are protected */
93 unsigned int **protptrs[2];
94 unsigned int *low_prot[4];
95};
96
97#undef PGD_TABLE_SIZE
98#define PGD_TABLE_SIZE ((sizeof(pgd_t) << PGD_INDEX_SIZE) + \
99 sizeof(struct subpage_prot_table))
100
101#define SBP_L1_BITS (PAGE_SHIFT - 2)
102#define SBP_L2_BITS (PAGE_SHIFT - 3)
103#define SBP_L1_COUNT (1 << SBP_L1_BITS)
104#define SBP_L2_COUNT (1 << SBP_L2_BITS)
105#define SBP_L2_SHIFT (PAGE_SHIFT + SBP_L1_BITS)
106#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
107
108extern void subpage_prot_free(pgd_t *pgd);
109
110static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
111{
112 return (struct subpage_prot_table *)(pgd + PTRS_PER_PGD);
113}
114#endif /* CONFIG_PPC_SUBPAGE_PROT */
115#endif /* __ASSEMBLY__ */
diff --git a/arch/powerpc/include/asm/pte-hash64.h b/arch/powerpc/include/asm/pte-hash64.h
new file mode 100644
index 000000000000..0419eeb53274
--- /dev/null
+++ b/arch/powerpc/include/asm/pte-hash64.h
@@ -0,0 +1,54 @@
1#ifndef _ASM_POWERPC_PTE_HASH64_H
2#define _ASM_POWERPC_PTE_HASH64_H
3#ifdef __KERNEL__
4
5/*
6 * Common bits between 4K and 64K pages in a linux-style PTE.
7 * These match the bits in the (hardware-defined) PowerPC PTE as closely
8 * as possible. Additional bits may be defined in pgtable-hash64-*.h
9 *
10 * Note: We only support user read/write permissions. Supervisor always
11 * have full read/write to pages above PAGE_OFFSET (pages below that
12 * always use the user access permissions).
13 *
14 * We could create separate kernel read-only if we used the 3 PP bits
15 * combinations that newer processors provide but we currently don't.
16 */
17#define _PAGE_PRESENT 0x0001 /* software: pte contains a translation */
18#define _PAGE_USER 0x0002 /* matches one of the PP bits */
19#define _PAGE_FILE 0x0002 /* (!present only) software: pte holds file offset */
20#define _PAGE_EXEC 0x0004 /* No execute on POWER4 and newer (we invert) */
21#define _PAGE_GUARDED 0x0008
22#define _PAGE_COHERENT 0x0010 /* M: enforce memory coherence (SMP systems) */
23#define _PAGE_NO_CACHE 0x0020 /* I: cache inhibit */
24#define _PAGE_WRITETHRU 0x0040 /* W: cache write-through */
25#define _PAGE_DIRTY 0x0080 /* C: page changed */
26#define _PAGE_ACCESSED 0x0100 /* R: page referenced */
27#define _PAGE_RW 0x0200 /* software: user write access allowed */
28#define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */
29
30/* No separate kernel read-only */
31#define _PAGE_KERNEL_RW (_PAGE_RW | _PAGE_DIRTY) /* user access blocked by key */
32#define _PAGE_KERNEL_RO _PAGE_KERNEL_RW
33
34/* Strong Access Ordering */
35#define _PAGE_SAO (_PAGE_WRITETHRU | _PAGE_NO_CACHE | _PAGE_COHERENT)
36
37/* No page size encoding in the linux PTE */
38#define _PAGE_PSIZE 0
39
40/* PTEIDX nibble */
41#define _PTEIDX_SECONDARY 0x8
42#define _PTEIDX_GROUP_IX 0x7
43
44/* Hash table based platforms need atomic updates of the linux PTE */
45#define PTE_ATOMIC_UPDATES 1
46
47#ifdef CONFIG_PPC_64K_PAGES
48#include <asm/pte-hash64-64k.h>
49#else
50#include <asm/pte-hash64-4k.h>
51#endif
52
53#endif /* __KERNEL__ */
54#endif /* _ASM_POWERPC_PTE_HASH64_H */
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index f484a343efba..e8018d540e87 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -143,6 +143,36 @@
143#define FPSCR_NI 0x00000004 /* FPU non IEEE-Mode */ 143#define FPSCR_NI 0x00000004 /* FPU non IEEE-Mode */
144#define FPSCR_RN 0x00000003 /* FPU rounding control */ 144#define FPSCR_RN 0x00000003 /* FPU rounding control */
145 145
146/* Bit definitions for SPEFSCR. */
147#define SPEFSCR_SOVH 0x80000000 /* Summary integer overflow high */
148#define SPEFSCR_OVH 0x40000000 /* Integer overflow high */
149#define SPEFSCR_FGH 0x20000000 /* Embedded FP guard bit high */
150#define SPEFSCR_FXH 0x10000000 /* Embedded FP sticky bit high */
151#define SPEFSCR_FINVH 0x08000000 /* Embedded FP invalid operation high */
152#define SPEFSCR_FDBZH 0x04000000 /* Embedded FP div by zero high */
153#define SPEFSCR_FUNFH 0x02000000 /* Embedded FP underflow high */
154#define SPEFSCR_FOVFH 0x01000000 /* Embedded FP overflow high */
155#define SPEFSCR_FINXS 0x00200000 /* Embedded FP inexact sticky */
156#define SPEFSCR_FINVS 0x00100000 /* Embedded FP invalid op. sticky */
157#define SPEFSCR_FDBZS 0x00080000 /* Embedded FP div by zero sticky */
158#define SPEFSCR_FUNFS 0x00040000 /* Embedded FP underflow sticky */
159#define SPEFSCR_FOVFS 0x00020000 /* Embedded FP overflow sticky */
160#define SPEFSCR_MODE 0x00010000 /* Embedded FP mode */
161#define SPEFSCR_SOV 0x00008000 /* Integer summary overflow */
162#define SPEFSCR_OV 0x00004000 /* Integer overflow */
163#define SPEFSCR_FG 0x00002000 /* Embedded FP guard bit */
164#define SPEFSCR_FX 0x00001000 /* Embedded FP sticky bit */
165#define SPEFSCR_FINV 0x00000800 /* Embedded FP invalid operation */
166#define SPEFSCR_FDBZ 0x00000400 /* Embedded FP div by zero */
167#define SPEFSCR_FUNF 0x00000200 /* Embedded FP underflow */
168#define SPEFSCR_FOVF 0x00000100 /* Embedded FP overflow */
169#define SPEFSCR_FINXE 0x00000040 /* Embedded FP inexact enable */
170#define SPEFSCR_FINVE 0x00000020 /* Embedded FP invalid op. enable */
171#define SPEFSCR_FDBZE 0x00000010 /* Embedded FP div by zero enable */
172#define SPEFSCR_FUNFE 0x00000008 /* Embedded FP underflow enable */
173#define SPEFSCR_FOVFE 0x00000004 /* Embedded FP overflow enable */
174#define SPEFSCR_FRMC 0x00000003 /* Embedded FP rounding mode control */
175
146/* Special Purpose Registers (SPRNs)*/ 176/* Special Purpose Registers (SPRNs)*/
147#define SPRN_CTR 0x009 /* Count Register */ 177#define SPRN_CTR 0x009 /* Count Register */
148#define SPRN_DSCR 0x11 178#define SPRN_DSCR 0x11
@@ -155,6 +185,8 @@
155#define CTRL_RUNLATCH 0x1 185#define CTRL_RUNLATCH 0x1
156#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ 186#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
157#define DABR_TRANSLATION (1UL << 2) 187#define DABR_TRANSLATION (1UL << 2)
188#define DABR_DATA_WRITE (1UL << 1)
189#define DABR_DATA_READ (1UL << 0)
158#define SPRN_DABR2 0x13D /* e300 */ 190#define SPRN_DABR2 0x13D /* e300 */
159#define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */ 191#define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */
160#define DABRX_USER (1UL << 0) 192#define DABRX_USER (1UL << 0)
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 67453766bff1..601ddbc46002 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -10,6 +10,7 @@
10#define __ASM_POWERPC_REG_BOOKE_H__ 10#define __ASM_POWERPC_REG_BOOKE_H__
11 11
12/* Machine State Register (MSR) Fields */ 12/* Machine State Register (MSR) Fields */
13#define MSR_GS (1<<28) /* Guest state */
13#define MSR_UCLE (1<<26) /* User-mode cache lock enable */ 14#define MSR_UCLE (1<<26) /* User-mode cache lock enable */
14#define MSR_SPE (1<<25) /* Enable SPE */ 15#define MSR_SPE (1<<25) /* Enable SPE */
15#define MSR_DWE (1<<10) /* Debug Wait Enable */ 16#define MSR_DWE (1<<10) /* Debug Wait Enable */
@@ -110,6 +111,7 @@
110#define SPRN_L1CSR0 0x3F2 /* L1 Cache Control and Status Register 0 */ 111#define SPRN_L1CSR0 0x3F2 /* L1 Cache Control and Status Register 0 */
111#define SPRN_L1CSR1 0x3F3 /* L1 Cache Control and Status Register 1 */ 112#define SPRN_L1CSR1 0x3F3 /* L1 Cache Control and Status Register 1 */
112#define SPRN_MMUCSR0 0x3F4 /* MMU Control and Status Register 0 */ 113#define SPRN_MMUCSR0 0x3F4 /* MMU Control and Status Register 0 */
114#define SPRN_MMUCFG 0x3F7 /* MMU Configuration Register */
113#define SPRN_PIT 0x3DB /* Programmable Interval Timer */ 115#define SPRN_PIT 0x3DB /* Programmable Interval Timer */
114#define SPRN_BUCSR 0x3F5 /* Branch Unit Control and Status */ 116#define SPRN_BUCSR 0x3F5 /* Branch Unit Control and Status */
115#define SPRN_L2CSR0 0x3F9 /* L2 Data Cache Control and Status Register 0 */ 117#define SPRN_L2CSR0 0x3F9 /* L2 Data Cache Control and Status Register 0 */
@@ -421,36 +423,6 @@
421#define SGR_NORMAL 0 /* Speculative fetching allowed. */ 423#define SGR_NORMAL 0 /* Speculative fetching allowed. */
422#define SGR_GUARDED 1 /* Speculative fetching disallowed. */ 424#define SGR_GUARDED 1 /* Speculative fetching disallowed. */
423 425
424/* Bit definitions for SPEFSCR. */
425#define SPEFSCR_SOVH 0x80000000 /* Summary integer overflow high */
426#define SPEFSCR_OVH 0x40000000 /* Integer overflow high */
427#define SPEFSCR_FGH 0x20000000 /* Embedded FP guard bit high */
428#define SPEFSCR_FXH 0x10000000 /* Embedded FP sticky bit high */
429#define SPEFSCR_FINVH 0x08000000 /* Embedded FP invalid operation high */
430#define SPEFSCR_FDBZH 0x04000000 /* Embedded FP div by zero high */
431#define SPEFSCR_FUNFH 0x02000000 /* Embedded FP underflow high */
432#define SPEFSCR_FOVFH 0x01000000 /* Embedded FP overflow high */
433#define SPEFSCR_FINXS 0x00200000 /* Embedded FP inexact sticky */
434#define SPEFSCR_FINVS 0x00100000 /* Embedded FP invalid op. sticky */
435#define SPEFSCR_FDBZS 0x00080000 /* Embedded FP div by zero sticky */
436#define SPEFSCR_FUNFS 0x00040000 /* Embedded FP underflow sticky */
437#define SPEFSCR_FOVFS 0x00020000 /* Embedded FP overflow sticky */
438#define SPEFSCR_MODE 0x00010000 /* Embedded FP mode */
439#define SPEFSCR_SOV 0x00008000 /* Integer summary overflow */
440#define SPEFSCR_OV 0x00004000 /* Integer overflow */
441#define SPEFSCR_FG 0x00002000 /* Embedded FP guard bit */
442#define SPEFSCR_FX 0x00001000 /* Embedded FP sticky bit */
443#define SPEFSCR_FINV 0x00000800 /* Embedded FP invalid operation */
444#define SPEFSCR_FDBZ 0x00000400 /* Embedded FP div by zero */
445#define SPEFSCR_FUNF 0x00000200 /* Embedded FP underflow */
446#define SPEFSCR_FOVF 0x00000100 /* Embedded FP overflow */
447#define SPEFSCR_FINXE 0x00000040 /* Embedded FP inexact enable */
448#define SPEFSCR_FINVE 0x00000020 /* Embedded FP invalid op. enable */
449#define SPEFSCR_FDBZE 0x00000010 /* Embedded FP div by zero enable */
450#define SPEFSCR_FUNFE 0x00000008 /* Embedded FP underflow enable */
451#define SPEFSCR_FOVFE 0x00000004 /* Embedded FP overflow enable */
452#define SPEFSCR_FRMC 0x00000003 /* Embedded FP rounding mode control */
453
454/* 426/*
455 * The IBM-403 is an even more odd special case, as it is much 427 * The IBM-403 is an even more odd special case, as it is much
456 * older than the IBM-405 series. We put these down here incase someone 428 * older than the IBM-405 series. We put these down here incase someone
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 0aa0315fb7e8..01c12339b304 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -68,7 +68,8 @@ struct rtas_t {
68#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */ 68#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */
69#define RTAS_POWERMGM_EVENTS 0x20000000 /* set bit 2 */ 69#define RTAS_POWERMGM_EVENTS 0x20000000 /* set bit 2 */
70#define RTAS_HOTPLUG_EVENTS 0x10000000 /* set bit 3 */ 70#define RTAS_HOTPLUG_EVENTS 0x10000000 /* set bit 3 */
71#define RTAS_EVENT_SCAN_ALL_EVENTS 0xf0000000 71#define RTAS_IO_EVENTS 0x08000000 /* set bit 4 */
72#define RTAS_EVENT_SCAN_ALL_EVENTS 0xffffffff
72 73
73/* RTAS event severity */ 74/* RTAS event severity */
74#define RTAS_SEVERITY_FATAL 0x5 75#define RTAS_SEVERITY_FATAL 0x5
diff --git a/arch/powerpc/include/asm/sfp-machine.h b/arch/powerpc/include/asm/sfp-machine.h
index 3d9f831c3c55..3a7a67a0d006 100644
--- a/arch/powerpc/include/asm/sfp-machine.h
+++ b/arch/powerpc/include/asm/sfp-machine.h
@@ -29,9 +29,9 @@
29 29
30/* basic word size definitions */ 30/* basic word size definitions */
31#define _FP_W_TYPE_SIZE 32 31#define _FP_W_TYPE_SIZE 32
32#define _FP_W_TYPE unsigned long 32#define _FP_W_TYPE unsigned int
33#define _FP_WS_TYPE signed long 33#define _FP_WS_TYPE signed int
34#define _FP_I_TYPE long 34#define _FP_I_TYPE int
35 35
36#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) 36#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
37#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) 37#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
index 36864364e601..c3b193121f81 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -287,6 +287,9 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
287 rw->lock = 0; 287 rw->lock = 0;
288} 288}
289 289
290#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
291#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
292
290#define _raw_spin_relax(lock) __spin_yield(lock) 293#define _raw_spin_relax(lock) __spin_yield(lock)
291#define _raw_read_relax(lock) __rw_yield(lock) 294#define _raw_read_relax(lock) __rw_yield(lock)
292#define _raw_write_relax(lock) __rw_yield(lock) 295#define _raw_write_relax(lock) __rw_yield(lock)
diff --git a/arch/powerpc/include/asm/suspend.h b/arch/powerpc/include/asm/suspend.h
index cbf2c9404c37..c6efc3466aa6 100644
--- a/arch/powerpc/include/asm/suspend.h
+++ b/arch/powerpc/include/asm/suspend.h
@@ -3,7 +3,4 @@
3 3
4static inline int arch_prepare_suspend(void) { return 0; } 4static inline int arch_prepare_suspend(void) { return 0; }
5 5
6void save_processor_state(void);
7void restore_processor_state(void);
8
9#endif /* __ASM_POWERPC_SUSPEND_H */ 6#endif /* __ASM_POWERPC_SUSPEND_H */
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index fe166491e9dc..d98a30dfd41c 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -322,3 +322,6 @@ SYSCALL_SPU(epoll_create1)
322SYSCALL_SPU(dup3) 322SYSCALL_SPU(dup3)
323SYSCALL_SPU(pipe2) 323SYSCALL_SPU(pipe2)
324SYSCALL(inotify_init1) 324SYSCALL(inotify_init1)
325SYSCALL(ni_syscall)
326COMPAT_SYS_SPU(preadv)
327COMPAT_SYS_SPU(pwritev)
diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h
index 2a4be19a92c4..f612798e1c93 100644
--- a/arch/powerpc/include/asm/system.h
+++ b/arch/powerpc/include/asm/system.h
@@ -531,7 +531,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
531#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 531#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
532#endif 532#endif
533 533
534#define arch_align_stack(x) (x) 534extern unsigned long arch_align_stack(unsigned long sp);
535 535
536/* Used in very early kernel initialization. */ 536/* Used in very early kernel initialization. */
537extern unsigned long reloc_offset(void); 537extern unsigned long reloc_offset(void);
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
index 9665a26a253a..9aba5a38a7c4 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -12,8 +12,10 @@
12 12
13/* We have 8k stacks on ppc32 and 16k on ppc64 */ 13/* We have 8k stacks on ppc32 and 16k on ppc64 */
14 14
15#ifdef CONFIG_PPC64 15#if defined(CONFIG_PPC64)
16#define THREAD_SHIFT 14 16#define THREAD_SHIFT 14
17#elif defined(CONFIG_PPC_256K_PAGES)
18#define THREAD_SHIFT 15
17#else 19#else
18#define THREAD_SHIFT 13 20#define THREAD_SHIFT 13
19#endif 21#endif
@@ -154,6 +156,13 @@ static inline void set_restore_sigmask(void)
154 ti->local_flags |= _TLF_RESTORE_SIGMASK; 156 ti->local_flags |= _TLF_RESTORE_SIGMASK;
155 set_bit(TIF_SIGPENDING, &ti->flags); 157 set_bit(TIF_SIGPENDING, &ti->flags);
156} 158}
159
160#ifdef CONFIG_PPC64
161#define is_32bit_task() (test_thread_flag(TIF_32BIT))
162#else
163#define is_32bit_task() (1)
164#endif
165
157#endif /* !__ASSEMBLY__ */ 166#endif /* !__ASSEMBLY__ */
158 167
159#endif /* __KERNEL__ */ 168#endif /* __KERNEL__ */
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 375258559ae6..054a16d68082 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -24,11 +24,6 @@ static inline cpumask_t node_to_cpumask(int node)
24 24
25#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) 25#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
26 26
27static inline int node_to_first_cpu(int node)
28{
29 return cpumask_first(cpumask_of_node(node));
30}
31
32int of_node_to_nid(struct device_node *device); 27int of_node_to_nid(struct device_node *device);
33 28
34struct pci_bus; 29struct pci_bus;
diff --git a/arch/powerpc/include/asm/udbg.h b/arch/powerpc/include/asm/udbg.h
index 6418ceea44b7..cd21e5e6b04f 100644
--- a/arch/powerpc/include/asm/udbg.h
+++ b/arch/powerpc/include/asm/udbg.h
@@ -15,6 +15,7 @@
15#include <linux/init.h> 15#include <linux/init.h>
16 16
17extern void (*udbg_putc)(char c); 17extern void (*udbg_putc)(char c);
18extern void (*udbg_flush)(void);
18extern int (*udbg_getc)(void); 19extern int (*udbg_getc)(void);
19extern int (*udbg_getc_poll)(void); 20extern int (*udbg_getc_poll)(void);
20 21
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index e07d0c76ed77..3f06f8ec81c5 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -341,10 +341,12 @@
341#define __NR_dup3 316 341#define __NR_dup3 316
342#define __NR_pipe2 317 342#define __NR_pipe2 317
343#define __NR_inotify_init1 318 343#define __NR_inotify_init1 318
344#define __NR_preadv 320
345#define __NR_pwritev 321
344 346
345#ifdef __KERNEL__ 347#ifdef __KERNEL__
346 348
347#define __NR_syscalls 319 349#define __NR_syscalls 322
348 350
349#define __NR__exit __NR_exit 351#define __NR__exit __NR_exit
350#define NR_syscalls __NR_syscalls 352#define NR_syscalls __NR_syscalls
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 8d1a419df35d..71901fbda4a5 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -18,12 +18,10 @@ CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog
18CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog 18CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog
19CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog 19CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog
20CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog 20CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog
21 21# do not trace tracer code
22ifdef CONFIG_DYNAMIC_FTRACE
23# dynamic ftrace setup.
24CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog 22CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog
25endif 23# timers used by tracing
26 24CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog
27endif 25endif
28 26
29obj-y := cputable.o ptrace.o syscalls.o \ 27obj-y := cputable.o ptrace.o syscalls.o \
@@ -61,6 +59,7 @@ obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o \
61obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o 59obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o
62obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o 60obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o
63obj-$(CONFIG_44x) += cpu_setup_44x.o 61obj-$(CONFIG_44x) += cpu_setup_44x.o
62obj-$(CONFIG_FSL_BOOKE) += cpu_setup_fsl_booke.o dbell.o
64 63
65extra-$(CONFIG_PPC_STD_MMU) := head_32.o 64extra-$(CONFIG_PPC_STD_MMU) := head_32.o
66extra-$(CONFIG_PPC64) := head_64.o 65extra-$(CONFIG_PPC64) := head_64.o
@@ -76,7 +75,7 @@ obj-y += time.o prom.o traps.o setup-common.o \
76obj-$(CONFIG_PPC32) += entry_32.o setup_32.o 75obj-$(CONFIG_PPC32) += entry_32.o setup_32.o
77obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o 76obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o
78obj-$(CONFIG_KGDB) += kgdb.o 77obj-$(CONFIG_KGDB) += kgdb.o
79obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o 78obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
80obj-$(CONFIG_MODULES) += ppc_ksyms.o 79obj-$(CONFIG_MODULES) += ppc_ksyms.o
81obj-$(CONFIG_BOOTX_TEXT) += btext.o 80obj-$(CONFIG_BOOTX_TEXT) += btext.o
82obj-$(CONFIG_SMP) += smp.o 81obj-$(CONFIG_SMP) += smp.o
@@ -94,6 +93,7 @@ obj-$(CONFIG_AUDIT) += audit.o
94obj64-$(CONFIG_AUDIT) += compat_audit.o 93obj64-$(CONFIG_AUDIT) += compat_audit.o
95 94
96obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 95obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
96obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
97 97
98obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o 98obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o
99 99
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index 73cb6a3229ae..5ffcfaa77d6a 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -187,7 +187,7 @@ static struct aligninfo aligninfo[128] = {
187 { 4, ST+F+S+U }, /* 11 1 1010: stfsux */ 187 { 4, ST+F+S+U }, /* 11 1 1010: stfsux */
188 { 8, ST+F+U }, /* 11 1 1011: stfdux */ 188 { 8, ST+F+U }, /* 11 1 1011: stfdux */
189 INVALID, /* 11 1 1100 */ 189 INVALID, /* 11 1 1100 */
190 INVALID, /* 11 1 1101 */ 190 { 4, LD+F }, /* 11 1 1101: lfiwzx */
191 INVALID, /* 11 1 1110 */ 191 INVALID, /* 11 1 1110 */
192 INVALID, /* 11 1 1111 */ 192 INVALID, /* 11 1 1111 */
193}; 193};
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 42fe4da4e8ae..1e40bc053946 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -284,9 +284,6 @@ int main(void)
284#endif /* ! CONFIG_PPC64 */ 284#endif /* ! CONFIG_PPC64 */
285 285
286 /* About the CPU features table */ 286 /* About the CPU features table */
287 DEFINE(CPU_SPEC_ENTRY_SIZE, sizeof(struct cpu_spec));
288 DEFINE(CPU_SPEC_PVR_MASK, offsetof(struct cpu_spec, pvr_mask));
289 DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value));
290 DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features)); 287 DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
291 DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup)); 288 DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
292 DEFINE(CPU_SPEC_RESTORE, offsetof(struct cpu_spec, cpu_restore)); 289 DEFINE(CPU_SPEC_RESTORE, offsetof(struct cpu_spec, cpu_restore));
diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S
index 10b4ab1008af..7d606f89a839 100644
--- a/arch/powerpc/kernel/cpu_setup_44x.S
+++ b/arch/powerpc/kernel/cpu_setup_44x.S
@@ -34,6 +34,7 @@ _GLOBAL(__setup_cpu_440grx)
34 blr 34 blr
35_GLOBAL(__setup_cpu_460ex) 35_GLOBAL(__setup_cpu_460ex)
36_GLOBAL(__setup_cpu_460gt) 36_GLOBAL(__setup_cpu_460gt)
37_GLOBAL(__setup_cpu_460sx)
37 mflr r4 38 mflr r4
38 bl __init_fpu_44x 39 bl __init_fpu_44x
39 bl __fixup_440A_mcheck 40 bl __fixup_440A_mcheck
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S
index 72d1d7395254..54f767e31a1a 100644
--- a/arch/powerpc/kernel/cpu_setup_6xx.S
+++ b/arch/powerpc/kernel/cpu_setup_6xx.S
@@ -15,9 +15,14 @@
15#include <asm/ppc_asm.h> 15#include <asm/ppc_asm.h>
16#include <asm/asm-offsets.h> 16#include <asm/asm-offsets.h>
17#include <asm/cache.h> 17#include <asm/cache.h>
18#include <asm/mmu.h>
18 19
19_GLOBAL(__setup_cpu_603) 20_GLOBAL(__setup_cpu_603)
20 mflr r4 21 mflr r4
22BEGIN_MMU_FTR_SECTION
23 li r10,0
24 mtspr SPRN_SPRG4,r10 /* init SW LRU tracking */
25END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
21BEGIN_FTR_SECTION 26BEGIN_FTR_SECTION
22 bl __init_fpu_registers 27 bl __init_fpu_registers
23END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE) 28END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE)
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
new file mode 100644
index 000000000000..eb4b9adcedb4
--- /dev/null
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -0,0 +1,31 @@
1/*
2 * This file contains low level CPU setup functions.
3 * Kumar Gala <galak@kernel.crashing.org>
4 * Copyright 2009 Freescale Semiconductor, Inc.
5 *
6 * Based on cpu_setup_6xx code by
7 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 *
14 */
15
16#include <asm/processor.h>
17#include <asm/cputable.h>
18#include <asm/ppc_asm.h>
19
20_GLOBAL(__setup_cpu_e200)
21 /* enable dedicated debug exception handling resources (Debug APU) */
22 mfspr r3,SPRN_HID0
23 ori r3,r3,HID0_DAPUEN@l
24 mtspr SPRN_HID0,r3
25 b __setup_e200_ivors
26_GLOBAL(__setup_cpu_e500v1)
27_GLOBAL(__setup_cpu_e500v2)
28 b __setup_e500_ivors
29_GLOBAL(__setup_cpu_e500mc)
30 b __setup_e500mc_ivors
31
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 923f87aff20a..cd1b687544f3 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -35,6 +35,10 @@ const char *powerpc_base_platform;
35 * and ppc64 35 * and ppc64
36 */ 36 */
37#ifdef CONFIG_PPC32 37#ifdef CONFIG_PPC32
38extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); 42extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); 43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); 44extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
@@ -43,6 +47,7 @@ extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec); 47extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec); 48extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec); 49extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
50extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
46extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); 51extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); 52extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); 53extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -726,6 +731,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
726 .cpu_setup = __setup_cpu_750, 731 .cpu_setup = __setup_cpu_750,
727 .machine_check = machine_check_generic, 732 .machine_check = machine_check_generic,
728 .platform = "ppc750", 733 .platform = "ppc750",
734 .oprofile_cpu_type = "ppc/750",
735 .oprofile_type = PPC_OPROFILE_G4,
729 }, 736 },
730 { /* 750FX rev 2.0 must disable HID0[DPM] */ 737 { /* 750FX rev 2.0 must disable HID0[DPM] */
731 .pvr_mask = 0xffffffff, 738 .pvr_mask = 0xffffffff,
@@ -741,6 +748,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
741 .cpu_setup = __setup_cpu_750, 748 .cpu_setup = __setup_cpu_750,
742 .machine_check = machine_check_generic, 749 .machine_check = machine_check_generic,
743 .platform = "ppc750", 750 .platform = "ppc750",
751 .oprofile_cpu_type = "ppc/750",
752 .oprofile_type = PPC_OPROFILE_G4,
744 }, 753 },
745 { /* 750FX (All revs except 2.0) */ 754 { /* 750FX (All revs except 2.0) */
746 .pvr_mask = 0xffff0000, 755 .pvr_mask = 0xffff0000,
@@ -756,6 +765,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
756 .cpu_setup = __setup_cpu_750fx, 765 .cpu_setup = __setup_cpu_750fx,
757 .machine_check = machine_check_generic, 766 .machine_check = machine_check_generic,
758 .platform = "ppc750", 767 .platform = "ppc750",
768 .oprofile_cpu_type = "ppc/750",
769 .oprofile_type = PPC_OPROFILE_G4,
759 }, 770 },
760 { /* 750GX */ 771 { /* 750GX */
761 .pvr_mask = 0xffff0000, 772 .pvr_mask = 0xffff0000,
@@ -771,6 +782,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
771 .cpu_setup = __setup_cpu_750fx, 782 .cpu_setup = __setup_cpu_750fx,
772 .machine_check = machine_check_generic, 783 .machine_check = machine_check_generic,
773 .platform = "ppc750", 784 .platform = "ppc750",
785 .oprofile_cpu_type = "ppc/750",
786 .oprofile_type = PPC_OPROFILE_G4,
774 }, 787 },
775 { /* 740/750 (L2CR bit need fixup for 740) */ 788 { /* 740/750 (L2CR bit need fixup for 740) */
776 .pvr_mask = 0xffff0000, 789 .pvr_mask = 0xffff0000,
@@ -1077,7 +1090,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1077 .cpu_name = "e300c2", 1090 .cpu_name = "e300c2",
1078 .cpu_features = CPU_FTRS_E300C2, 1091 .cpu_features = CPU_FTRS_E300C2,
1079 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 1092 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1080 .mmu_features = MMU_FTR_USE_HIGH_BATS, 1093 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1094 MMU_FTR_NEED_DTLB_SW_LRU,
1081 .icache_bsize = 32, 1095 .icache_bsize = 32,
1082 .dcache_bsize = 32, 1096 .dcache_bsize = 32,
1083 .cpu_setup = __setup_cpu_603, 1097 .cpu_setup = __setup_cpu_603,
@@ -1090,7 +1104,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1090 .cpu_name = "e300c3", 1104 .cpu_name = "e300c3",
1091 .cpu_features = CPU_FTRS_E300, 1105 .cpu_features = CPU_FTRS_E300,
1092 .cpu_user_features = COMMON_USER, 1106 .cpu_user_features = COMMON_USER,
1093 .mmu_features = MMU_FTR_USE_HIGH_BATS, 1107 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1108 MMU_FTR_NEED_DTLB_SW_LRU,
1094 .icache_bsize = 32, 1109 .icache_bsize = 32,
1095 .dcache_bsize = 32, 1110 .dcache_bsize = 32,
1096 .cpu_setup = __setup_cpu_603, 1111 .cpu_setup = __setup_cpu_603,
@@ -1105,7 +1120,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1105 .cpu_name = "e300c4", 1120 .cpu_name = "e300c4",
1106 .cpu_features = CPU_FTRS_E300, 1121 .cpu_features = CPU_FTRS_E300,
1107 .cpu_user_features = COMMON_USER, 1122 .cpu_user_features = COMMON_USER,
1108 .mmu_features = MMU_FTR_USE_HIGH_BATS, 1123 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1124 MMU_FTR_NEED_DTLB_SW_LRU,
1109 .icache_bsize = 32, 1125 .icache_bsize = 32,
1110 .dcache_bsize = 32, 1126 .dcache_bsize = 32,
1111 .cpu_setup = __setup_cpu_603, 1127 .cpu_setup = __setup_cpu_603,
@@ -1634,6 +1650,19 @@ static struct cpu_spec __initdata cpu_specs[] = {
1634 .machine_check = machine_check_440A, 1650 .machine_check = machine_check_440A,
1635 .platform = "ppc440", 1651 .platform = "ppc440",
1636 }, 1652 },
1653 { /* 460SX */
1654 .pvr_mask = 0xffffff00,
1655 .pvr_value = 0x13541800,
1656 .cpu_name = "460SX",
1657 .cpu_features = CPU_FTRS_44X,
1658 .cpu_user_features = COMMON_USER_BOOKE,
1659 .mmu_features = MMU_FTR_TYPE_44x,
1660 .icache_bsize = 32,
1661 .dcache_bsize = 32,
1662 .cpu_setup = __setup_cpu_460sx,
1663 .machine_check = machine_check_440A,
1664 .platform = "ppc440",
1665 },
1637 { /* default match */ 1666 { /* default match */
1638 .pvr_mask = 0x00000000, 1667 .pvr_mask = 0x00000000,
1639 .pvr_value = 0x00000000, 1668 .pvr_value = 0x00000000,
@@ -1687,6 +1716,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1687 PPC_FEATURE_UNIFIED_CACHE, 1716 PPC_FEATURE_UNIFIED_CACHE,
1688 .mmu_features = MMU_FTR_TYPE_FSL_E, 1717 .mmu_features = MMU_FTR_TYPE_FSL_E,
1689 .dcache_bsize = 32, 1718 .dcache_bsize = 32,
1719 .cpu_setup = __setup_cpu_e200,
1690 .machine_check = machine_check_e200, 1720 .machine_check = machine_check_e200,
1691 .platform = "ppc5554", 1721 .platform = "ppc5554",
1692 } 1722 }
@@ -1706,6 +1736,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1706 .num_pmcs = 4, 1736 .num_pmcs = 4,
1707 .oprofile_cpu_type = "ppc/e500", 1737 .oprofile_cpu_type = "ppc/e500",
1708 .oprofile_type = PPC_OPROFILE_FSL_EMB, 1738 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1739 .cpu_setup = __setup_cpu_e500v1,
1709 .machine_check = machine_check_e500, 1740 .machine_check = machine_check_e500,
1710 .platform = "ppc8540", 1741 .platform = "ppc8540",
1711 }, 1742 },
@@ -1724,6 +1755,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1724 .num_pmcs = 4, 1755 .num_pmcs = 4,
1725 .oprofile_cpu_type = "ppc/e500", 1756 .oprofile_cpu_type = "ppc/e500",
1726 .oprofile_type = PPC_OPROFILE_FSL_EMB, 1757 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1758 .cpu_setup = __setup_cpu_e500v2,
1727 .machine_check = machine_check_e500, 1759 .machine_check = machine_check_e500,
1728 .platform = "ppc8548", 1760 .platform = "ppc8548",
1729 }, 1761 },
@@ -1733,12 +1765,14 @@ static struct cpu_spec __initdata cpu_specs[] = {
1733 .cpu_name = "e500mc", 1765 .cpu_name = "e500mc",
1734 .cpu_features = CPU_FTRS_E500MC, 1766 .cpu_features = CPU_FTRS_E500MC,
1735 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1767 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1736 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS, 1768 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1769 MMU_FTR_USE_TLBILX,
1737 .icache_bsize = 64, 1770 .icache_bsize = 64,
1738 .dcache_bsize = 64, 1771 .dcache_bsize = 64,
1739 .num_pmcs = 4, 1772 .num_pmcs = 4,
1740 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */ 1773 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1741 .oprofile_type = PPC_OPROFILE_FSL_EMB, 1774 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1775 .cpu_setup = __setup_cpu_e500mc,
1742 .machine_check = machine_check_e500, 1776 .machine_check = machine_check_e500,
1743 .platform = "ppce500mc", 1777 .platform = "ppce500mc",
1744 }, 1778 },
@@ -1762,74 +1796,84 @@ static struct cpu_spec __initdata cpu_specs[] = {
1762 1796
1763static struct cpu_spec the_cpu_spec; 1797static struct cpu_spec the_cpu_spec;
1764 1798
1765struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) 1799static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1766{ 1800{
1767 struct cpu_spec *s = cpu_specs;
1768 struct cpu_spec *t = &the_cpu_spec; 1801 struct cpu_spec *t = &the_cpu_spec;
1769 int i; 1802 struct cpu_spec old;
1770 1803
1771 s = PTRRELOC(s);
1772 t = PTRRELOC(t); 1804 t = PTRRELOC(t);
1805 old = *t;
1773 1806
1774 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) 1807 /* Copy everything, then do fixups */
1775 if ((pvr & s->pvr_mask) == s->pvr_value) { 1808 *t = *s;
1776 /* 1809
1777 * If we are overriding a previous value derived 1810 /*
1778 * from the real PVR with a new value obtained 1811 * If we are overriding a previous value derived from the real
1779 * using a logical PVR value, don't modify the 1812 * PVR with a new value obtained using a logical PVR value,
1780 * performance monitor fields. 1813 * don't modify the performance monitor fields.
1781 */ 1814 */
1782 if (t->num_pmcs && !s->num_pmcs) { 1815 if (old.num_pmcs && !s->num_pmcs) {
1783 t->cpu_name = s->cpu_name; 1816 t->num_pmcs = old.num_pmcs;
1784 t->cpu_features = s->cpu_features; 1817 t->pmc_type = old.pmc_type;
1785 t->cpu_user_features = s->cpu_user_features; 1818 t->oprofile_type = old.oprofile_type;
1786 t->icache_bsize = s->icache_bsize; 1819 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
1787 t->dcache_bsize = s->dcache_bsize; 1820 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
1788 t->cpu_setup = s->cpu_setup; 1821 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
1789 t->cpu_restore = s->cpu_restore; 1822
1790 t->platform = s->platform; 1823 /*
1791 /* 1824 * If we have passed through this logic once before and
1792 * If we have passed through this logic once 1825 * have pulled the default case because the real PVR was
1793 * before and have pulled the default case 1826 * not found inside cpu_specs[], then we are possibly
1794 * because the real PVR was not found inside 1827 * running in compatibility mode. In that case, let the
1795 * cpu_specs[], then we are possibly running in 1828 * oprofiler know which set of compatibility counters to
1796 * compatibility mode. In that case, let the 1829 * pull from by making sure the oprofile_cpu_type string
1797 * oprofiler know which set of compatibility 1830 * is set to that of compatibility mode. If the
1798 * counters to pull from by making sure the 1831 * oprofile_cpu_type already has a value, then we are
1799 * oprofile_cpu_type string is set to that of 1832 * possibly overriding a real PVR with a logical one,
1800 * compatibility mode. If the oprofile_cpu_type 1833 * and, in that case, keep the current value for
1801 * already has a value, then we are possibly 1834 * oprofile_cpu_type.
1802 * overriding a real PVR with a logical one, and, 1835 */
1803 * in that case, keep the current value for 1836 if (old.oprofile_cpu_type == NULL)
1804 * oprofile_cpu_type. 1837 t->oprofile_cpu_type = s->oprofile_cpu_type;
1805 */ 1838 }
1806 if (t->oprofile_cpu_type == NULL)
1807 t->oprofile_cpu_type = s->oprofile_cpu_type;
1808 } else
1809 *t = *s;
1810 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1811 1839
1812 /* 1840 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1813 * Set the base platform string once; assumes 1841
1814 * we're called with real pvr first. 1842 /*
1815 */ 1843 * Set the base platform string once; assumes
1816 if (*PTRRELOC(&powerpc_base_platform) == NULL) 1844 * we're called with real pvr first.
1817 *PTRRELOC(&powerpc_base_platform) = t->platform; 1845 */
1846 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1847 *PTRRELOC(&powerpc_base_platform) = t->platform;
1818 1848
1819#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) 1849#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1820 /* ppc64 and booke expect identify_cpu to also call 1850 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
1821 * setup_cpu for that processor. I will consolidate 1851 * that processor. I will consolidate that at a later time, for now,
1822 * that at a later time, for now, just use #ifdef. 1852 * just use #ifdef. We also don't need to PTRRELOC the function
1823 * we also don't need to PTRRELOC the function pointer 1853 * pointer on ppc64 and booke as we are running at 0 in real mode
1824 * on ppc64 and booke as we are running at 0 in real 1854 * on ppc64 and reloc_offset is always 0 on booke.
1825 * mode on ppc64 and reloc_offset is always 0 on booke. 1855 */
1826 */ 1856 if (s->cpu_setup) {
1827 if (s->cpu_setup) { 1857 s->cpu_setup(offset, s);
1828 s->cpu_setup(offset, s); 1858 }
1829 }
1830#endif /* CONFIG_PPC64 || CONFIG_BOOKE */ 1859#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1860}
1861
1862struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1863{
1864 struct cpu_spec *s = cpu_specs;
1865 int i;
1866
1867 s = PTRRELOC(s);
1868
1869 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
1870 if ((pvr & s->pvr_mask) == s->pvr_value) {
1871 setup_cpu_spec(offset, s);
1831 return s; 1872 return s;
1832 } 1873 }
1874 }
1875
1833 BUG(); 1876 BUG();
1877
1834 return NULL; 1878 return NULL;
1835} 1879}
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 19671aca6591..5fb667a60894 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -48,7 +48,7 @@ static void __init create_trampoline(unsigned long addr)
48 * branch to "addr" we jump to ("addr" + 32 MB). Although it requires 48 * branch to "addr" we jump to ("addr" + 32 MB). Although it requires
49 * two instructions it doesn't require any registers. 49 * two instructions it doesn't require any registers.
50 */ 50 */
51 patch_instruction(p, PPC_NOP_INSTR); 51 patch_instruction(p, PPC_INST_NOP);
52 patch_branch(++p, addr + PHYSICAL_START, 0); 52 patch_branch(++p, addr + PHYSICAL_START, 0);
53} 53}
54 54
diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c
new file mode 100644
index 000000000000..1493734cd871
--- /dev/null
+++ b/arch/powerpc/kernel/dbell.c
@@ -0,0 +1,44 @@
1/*
2 * Author: Kumar Gala <galak@kernel.crashing.org>
3 *
4 * Copyright 2009 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#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/smp.h>
15#include <linux/threads.h>
16
17#include <asm/dbell.h>
18
19#ifdef CONFIG_SMP
20unsigned long dbell_smp_message[NR_CPUS];
21
22void smp_dbell_message_pass(int target, int msg)
23{
24 int i;
25
26 if(target < NR_CPUS) {
27 set_bit(msg, &dbell_smp_message[target]);
28 ppc_msgsnd(PPC_DBELL, 0, target);
29 }
30 else if(target == MSG_ALL_BUT_SELF) {
31 for_each_online_cpu(i) {
32 if (i == smp_processor_id())
33 continue;
34 set_bit(msg, &dbell_smp_message[i]);
35 ppc_msgsnd(PPC_DBELL, 0, i);
36 }
37 }
38 else { /* target == MSG_ALL */
39 for_each_online_cpu(i)
40 set_bit(msg, &dbell_smp_message[i]);
41 ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0);
42 }
43}
44#endif
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 1c5c8a6fc129..53c7788cba78 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
94 * done via some global so platforms can set the limit in case 94 * done via some global so platforms can set the limit in case
95 * they have limited DMA windows 95 * they have limited DMA windows
96 */ 96 */
97 return mask >= DMA_32BIT_MASK; 97 return mask >= DMA_BIT_MASK(32);
98#else 98#else
99 return 1; 99 return 1;
100#endif 100#endif
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 6f7eb7e00c79..4dd38f129153 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -63,7 +63,7 @@ debug_transfer_to_handler:
63 63
64 .globl crit_transfer_to_handler 64 .globl crit_transfer_to_handler
65crit_transfer_to_handler: 65crit_transfer_to_handler:
66#ifdef CONFIG_FSL_BOOKE 66#ifdef CONFIG_PPC_BOOK3E_MMU
67 mfspr r0,SPRN_MAS0 67 mfspr r0,SPRN_MAS0
68 stw r0,MAS0(r11) 68 stw r0,MAS0(r11)
69 mfspr r0,SPRN_MAS1 69 mfspr r0,SPRN_MAS1
@@ -78,7 +78,7 @@ crit_transfer_to_handler:
78 mfspr r0,SPRN_MAS7 78 mfspr r0,SPRN_MAS7
79 stw r0,MAS7(r11) 79 stw r0,MAS7(r11)
80#endif /* CONFIG_PHYS_64BIT */ 80#endif /* CONFIG_PHYS_64BIT */
81#endif /* CONFIG_FSL_BOOKE */ 81#endif /* CONFIG_PPC_BOOK3E_MMU */
82#ifdef CONFIG_44x 82#ifdef CONFIG_44x
83 mfspr r0,SPRN_MMUCR 83 mfspr r0,SPRN_MMUCR
84 stw r0,MMUCR(r11) 84 stw r0,MMUCR(r11)
@@ -914,7 +914,7 @@ exc_exit_restart_end:
914 mtspr SPRN_##exc_lvl_srr0,r9; \ 914 mtspr SPRN_##exc_lvl_srr0,r9; \
915 mtspr SPRN_##exc_lvl_srr1,r10; 915 mtspr SPRN_##exc_lvl_srr1,r10;
916 916
917#if defined(CONFIG_FSL_BOOKE) 917#if defined(CONFIG_PPC_BOOK3E_MMU)
918#ifdef CONFIG_PHYS_64BIT 918#ifdef CONFIG_PHYS_64BIT
919#define RESTORE_MAS7 \ 919#define RESTORE_MAS7 \
920 lwz r11,MAS7(r1); \ 920 lwz r11,MAS7(r1); \
@@ -956,7 +956,7 @@ ret_from_crit_exc:
956 lwz r10,crit_srr1@l(r10); 956 lwz r10,crit_srr1@l(r10);
957 mtspr SPRN_SRR0,r9; 957 mtspr SPRN_SRR0,r9;
958 mtspr SPRN_SRR1,r10; 958 mtspr SPRN_SRR1,r10;
959 RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, RFCI) 959 RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI)
960#endif /* CONFIG_40x */ 960#endif /* CONFIG_40x */
961 961
962#ifdef CONFIG_BOOKE 962#ifdef CONFIG_BOOKE
@@ -967,7 +967,7 @@ ret_from_crit_exc:
967 stw r10,KSP_LIMIT(r9) 967 stw r10,KSP_LIMIT(r9)
968 RESTORE_xSRR(SRR0,SRR1); 968 RESTORE_xSRR(SRR0,SRR1);
969 RESTORE_MMU_REGS; 969 RESTORE_MMU_REGS;
970 RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, RFCI) 970 RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI)
971 971
972 .globl ret_from_debug_exc 972 .globl ret_from_debug_exc
973ret_from_debug_exc: 973ret_from_debug_exc:
@@ -981,7 +981,7 @@ ret_from_debug_exc:
981 RESTORE_xSRR(SRR0,SRR1); 981 RESTORE_xSRR(SRR0,SRR1);
982 RESTORE_xSRR(CSRR0,CSRR1); 982 RESTORE_xSRR(CSRR0,CSRR1);
983 RESTORE_MMU_REGS; 983 RESTORE_MMU_REGS;
984 RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, RFDI) 984 RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, PPC_RFDI)
985 985
986 .globl ret_from_mcheck_exc 986 .globl ret_from_mcheck_exc
987ret_from_mcheck_exc: 987ret_from_mcheck_exc:
@@ -992,7 +992,7 @@ ret_from_mcheck_exc:
992 RESTORE_xSRR(CSRR0,CSRR1); 992 RESTORE_xSRR(CSRR0,CSRR1);
993 RESTORE_xSRR(DSRR0,DSRR1); 993 RESTORE_xSRR(DSRR0,DSRR1);
994 RESTORE_MMU_REGS; 994 RESTORE_MMU_REGS;
995 RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, RFMCI) 995 RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, PPC_RFMCI)
996#endif /* CONFIG_BOOKE */ 996#endif /* CONFIG_BOOKE */
997 997
998/* 998/*
@@ -1176,59 +1176,27 @@ _GLOBAL(_mcount)
1176 bctr 1176 bctr
1177 1177
1178_GLOBAL(ftrace_caller) 1178_GLOBAL(ftrace_caller)
1179 /* Based off of objdump optput from glibc */ 1179 MCOUNT_SAVE_FRAME
1180 stwu r1,-48(r1) 1180 /* r3 ends up with link register */
1181 stw r3, 12(r1)
1182 stw r4, 16(r1)
1183 stw r5, 20(r1)
1184 stw r6, 24(r1)
1185 mflr r3
1186 lwz r4, 52(r1)
1187 mfcr r5
1188 stw r7, 28(r1)
1189 stw r8, 32(r1)
1190 stw r9, 36(r1)
1191 stw r10,40(r1)
1192 stw r3, 44(r1)
1193 stw r5, 8(r1)
1194 subi r3, r3, MCOUNT_INSN_SIZE 1181 subi r3, r3, MCOUNT_INSN_SIZE
1195.globl ftrace_call 1182.globl ftrace_call
1196ftrace_call: 1183ftrace_call:
1197 bl ftrace_stub 1184 bl ftrace_stub
1198 nop 1185 nop
1199 lwz r6, 8(r1) 1186#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1200 lwz r0, 44(r1) 1187.globl ftrace_graph_call
1201 lwz r3, 12(r1) 1188ftrace_graph_call:
1202 mtctr r0 1189 b ftrace_graph_stub
1203 lwz r4, 16(r1) 1190_GLOBAL(ftrace_graph_stub)
1204 mtcr r6 1191#endif
1205 lwz r5, 20(r1) 1192 MCOUNT_RESTORE_FRAME
1206 lwz r6, 24(r1) 1193 /* old link register ends up in ctr reg */
1207 lwz r0, 52(r1)
1208 lwz r7, 28(r1)
1209 lwz r8, 32(r1)
1210 mtlr r0
1211 lwz r9, 36(r1)
1212 lwz r10,40(r1)
1213 addi r1, r1, 48
1214 bctr 1194 bctr
1215#else 1195#else
1216_GLOBAL(mcount) 1196_GLOBAL(mcount)
1217_GLOBAL(_mcount) 1197_GLOBAL(_mcount)
1218 stwu r1,-48(r1) 1198
1219 stw r3, 12(r1) 1199 MCOUNT_SAVE_FRAME
1220 stw r4, 16(r1)
1221 stw r5, 20(r1)
1222 stw r6, 24(r1)
1223 mflr r3
1224 lwz r4, 52(r1)
1225 mfcr r5
1226 stw r7, 28(r1)
1227 stw r8, 32(r1)
1228 stw r9, 36(r1)
1229 stw r10,40(r1)
1230 stw r3, 44(r1)
1231 stw r5, 8(r1)
1232 1200
1233 subi r3, r3, MCOUNT_INSN_SIZE 1201 subi r3, r3, MCOUNT_INSN_SIZE
1234 LOAD_REG_ADDR(r5, ftrace_trace_function) 1202 LOAD_REG_ADDR(r5, ftrace_trace_function)
@@ -1236,28 +1204,55 @@ _GLOBAL(_mcount)
1236 1204
1237 mtctr r5 1205 mtctr r5
1238 bctrl 1206 bctrl
1239
1240 nop 1207 nop
1241 1208
1242 lwz r6, 8(r1) 1209#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1243 lwz r0, 44(r1) 1210 b ftrace_graph_caller
1244 lwz r3, 12(r1) 1211#endif
1245 mtctr r0 1212 MCOUNT_RESTORE_FRAME
1246 lwz r4, 16(r1)
1247 mtcr r6
1248 lwz r5, 20(r1)
1249 lwz r6, 24(r1)
1250 lwz r0, 52(r1)
1251 lwz r7, 28(r1)
1252 lwz r8, 32(r1)
1253 mtlr r0
1254 lwz r9, 36(r1)
1255 lwz r10,40(r1)
1256 addi r1, r1, 48
1257 bctr 1213 bctr
1258#endif 1214#endif
1259 1215
1260_GLOBAL(ftrace_stub) 1216_GLOBAL(ftrace_stub)
1261 blr 1217 blr
1262 1218
1219#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1220_GLOBAL(ftrace_graph_caller)
1221 /* load r4 with local address */
1222 lwz r4, 44(r1)
1223 subi r4, r4, MCOUNT_INSN_SIZE
1224
1225 /* get the parent address */
1226 addi r3, r1, 52
1227
1228 bl prepare_ftrace_return
1229 nop
1230
1231 MCOUNT_RESTORE_FRAME
1232 /* old link register ends up in ctr reg */
1233 bctr
1234
1235_GLOBAL(return_to_handler)
1236 /* need to save return values */
1237 stwu r1, -32(r1)
1238 stw r3, 20(r1)
1239 stw r4, 16(r1)
1240 stw r31, 12(r1)
1241 mr r31, r1
1242
1243 bl ftrace_return_to_handler
1244 nop
1245
1246 /* return value has real return address */
1247 mtlr r3
1248
1249 lwz r3, 20(r1)
1250 lwz r4, 16(r1)
1251 lwz r31,12(r1)
1252 lwz r1, 0(r1)
1253
1254 /* Jump back to real return address */
1255 blr
1256#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
1257
1263#endif /* CONFIG_MCOUNT */ 1258#endif /* CONFIG_MCOUNT */
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 383ed6eb0085..abfc32330479 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -908,6 +908,12 @@ _GLOBAL(ftrace_caller)
908ftrace_call: 908ftrace_call:
909 bl ftrace_stub 909 bl ftrace_stub
910 nop 910 nop
911#ifdef CONFIG_FUNCTION_GRAPH_TRACER
912.globl ftrace_graph_call
913ftrace_graph_call:
914 b ftrace_graph_stub
915_GLOBAL(ftrace_graph_stub)
916#endif
911 ld r0, 128(r1) 917 ld r0, 128(r1)
912 mtlr r0 918 mtlr r0
913 addi r1, r1, 112 919 addi r1, r1, 112
@@ -931,13 +937,90 @@ _GLOBAL(_mcount)
931 ld r5,0(r5) 937 ld r5,0(r5)
932 mtctr r5 938 mtctr r5
933 bctrl 939 bctrl
934
935 nop 940 nop
941
942
943#ifdef CONFIG_FUNCTION_GRAPH_TRACER
944 b ftrace_graph_caller
945#endif
936 ld r0, 128(r1) 946 ld r0, 128(r1)
937 mtlr r0 947 mtlr r0
938 addi r1, r1, 112 948 addi r1, r1, 112
939_GLOBAL(ftrace_stub) 949_GLOBAL(ftrace_stub)
940 blr 950 blr
941 951
942#endif 952#endif /* CONFIG_DYNAMIC_FTRACE */
943#endif 953
954#ifdef CONFIG_FUNCTION_GRAPH_TRACER
955_GLOBAL(ftrace_graph_caller)
956 /* load r4 with local address */
957 ld r4, 128(r1)
958 subi r4, r4, MCOUNT_INSN_SIZE
959
960 /* get the parent address */
961 ld r11, 112(r1)
962 addi r3, r11, 16
963
964 bl .prepare_ftrace_return
965 nop
966
967 ld r0, 128(r1)
968 mtlr r0
969 addi r1, r1, 112
970 blr
971
972_GLOBAL(return_to_handler)
973 /* need to save return values */
974 std r4, -24(r1)
975 std r3, -16(r1)
976 std r31, -8(r1)
977 mr r31, r1
978 stdu r1, -112(r1)
979
980 bl .ftrace_return_to_handler
981 nop
982
983 /* return value has real return address */
984 mtlr r3
985
986 ld r1, 0(r1)
987 ld r4, -24(r1)
988 ld r3, -16(r1)
989 ld r31, -8(r1)
990
991 /* Jump back to real return address */
992 blr
993
994_GLOBAL(mod_return_to_handler)
995 /* need to save return values */
996 std r4, -32(r1)
997 std r3, -24(r1)
998 /* save TOC */
999 std r2, -16(r1)
1000 std r31, -8(r1)
1001 mr r31, r1
1002 stdu r1, -112(r1)
1003
1004 /*
1005 * We are in a module using the module's TOC.
1006 * Switch to our TOC to run inside the core kernel.
1007 */
1008 LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler)
1009 ld r2, 8(r4)
1010
1011 bl .ftrace_return_to_handler
1012 nop
1013
1014 /* return value has real return address */
1015 mtlr r3
1016
1017 ld r1, 0(r1)
1018 ld r4, -32(r1)
1019 ld r3, -24(r1)
1020 ld r2, -16(r1)
1021 ld r31, -8(r1)
1022
1023 /* Jump back to real return address */
1024 blr
1025#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
1026#endif /* CONFIG_FUNCTION_TRACER */
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index a088c064ae40..2436df33c6f4 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -145,6 +145,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
145 beq 1f 145 beq 1f
146 PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5) 146 PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
147 li r3,MSR_FP|MSR_FE0|MSR_FE1 147 li r3,MSR_FP|MSR_FE0|MSR_FE1
148#ifdef CONFIG_VSX
149BEGIN_FTR_SECTION
150 oris r3,r3,MSR_VSX@h
151END_FTR_SECTION_IFSET(CPU_FTR_VSX)
152#endif
148 andc r4,r4,r3 /* disable FP for previous task */ 153 andc r4,r4,r3 /* disable FP for previous task */
149 PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5) 154 PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1501: 1551:
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 60c60ccf5e3c..70e2a736be1f 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -5,6 +5,9 @@
5 * 5 *
6 * Thanks goes out to P.A. Semi, Inc for supplying me with a PPC64 box. 6 * Thanks goes out to P.A. Semi, Inc for supplying me with a PPC64 box.
7 * 7 *
8 * Added function graph tracer code, taken from x86 that was written
9 * by Frederic Weisbecker, and ported to PPC by Steven Rostedt.
10 *
8 */ 11 */
9 12
10#include <linux/spinlock.h> 13#include <linux/spinlock.h>
@@ -20,14 +23,6 @@
20#include <asm/code-patching.h> 23#include <asm/code-patching.h>
21#include <asm/ftrace.h> 24#include <asm/ftrace.h>
22 25
23#if 0
24#define DEBUGP printk
25#else
26#define DEBUGP(fmt , ...) do { } while (0)
27#endif
28
29static unsigned int ftrace_nop = PPC_NOP_INSTR;
30
31#ifdef CONFIG_PPC32 26#ifdef CONFIG_PPC32
32# define GET_ADDR(addr) addr 27# define GET_ADDR(addr) addr
33#else 28#else
@@ -35,37 +30,23 @@ static unsigned int ftrace_nop = PPC_NOP_INSTR;
35# define GET_ADDR(addr) (*(unsigned long *)addr) 30# define GET_ADDR(addr) (*(unsigned long *)addr)
36#endif 31#endif
37 32
38 33#ifdef CONFIG_DYNAMIC_FTRACE
39static unsigned int ftrace_calc_offset(long ip, long addr) 34static unsigned int ftrace_nop_replace(void)
40{ 35{
41 return (int)(addr - ip); 36 return PPC_INST_NOP;
42} 37}
43 38
44static unsigned char *ftrace_nop_replace(void) 39static unsigned int
40ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
45{ 41{
46 return (char *)&ftrace_nop; 42 unsigned int op;
47}
48
49static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
50{
51 static unsigned int op;
52 43
53 /*
54 * It would be nice to just use create_function_call, but that will
55 * update the code itself. Here we need to just return the
56 * instruction that is going to be modified, without modifying the
57 * code.
58 */
59 addr = GET_ADDR(addr); 44 addr = GET_ADDR(addr);
60 45
61 /* Set to "bl addr" */ 46 /* if (link) set op to 'bl' else 'b' */
62 op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc); 47 op = create_branch((unsigned int *)ip, addr, link ? 1 : 0);
63 48
64 /* 49 return op;
65 * No locking needed, this must be called via kstop_machine
66 * which in essence is like running on a uniprocessor machine.
67 */
68 return (unsigned char *)&op;
69} 50}
70 51
71#ifdef CONFIG_PPC64 52#ifdef CONFIG_PPC64
@@ -77,10 +58,9 @@ static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
77#endif 58#endif
78 59
79static int 60static int
80ftrace_modify_code(unsigned long ip, unsigned char *old_code, 61ftrace_modify_code(unsigned long ip, unsigned int old, unsigned int new)
81 unsigned char *new_code)
82{ 62{
83 unsigned char replaced[MCOUNT_INSN_SIZE]; 63 unsigned int replaced;
84 64
85 /* 65 /*
86 * Note: Due to modules and __init, code can 66 * Note: Due to modules and __init, code can
@@ -93,15 +73,15 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code,
93 */ 73 */
94 74
95 /* read the text we want to modify */ 75 /* read the text we want to modify */
96 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) 76 if (probe_kernel_read(&replaced, (void *)ip, MCOUNT_INSN_SIZE))
97 return -EFAULT; 77 return -EFAULT;
98 78
99 /* Make sure it is what we expect it to be */ 79 /* Make sure it is what we expect it to be */
100 if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) 80 if (replaced != old)
101 return -EINVAL; 81 return -EINVAL;
102 82
103 /* replace the text with the new text */ 83 /* replace the text with the new text */
104 if (probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE)) 84 if (probe_kernel_write((void *)ip, &new, MCOUNT_INSN_SIZE))
105 return -EPERM; 85 return -EPERM;
106 86
107 flush_icache_range(ip, ip + 8); 87 flush_icache_range(ip, ip + 8);
@@ -119,6 +99,8 @@ static int test_24bit_addr(unsigned long ip, unsigned long addr)
119 return create_branch((unsigned int *)ip, addr, 0); 99 return create_branch((unsigned int *)ip, addr, 0);
120} 100}
121 101
102#ifdef CONFIG_MODULES
103
122static int is_bl_op(unsigned int op) 104static int is_bl_op(unsigned int op)
123{ 105{
124 return (op & 0xfc000003) == 0x48000001; 106 return (op & 0xfc000003) == 0x48000001;
@@ -175,7 +157,7 @@ __ftrace_make_nop(struct module *mod,
175 * 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12) 157 * 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12)
176 */ 158 */
177 159
178 DEBUGP("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc); 160 pr_debug("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);
179 161
180 /* Find where the trampoline jumps to */ 162 /* Find where the trampoline jumps to */
181 if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { 163 if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
@@ -183,7 +165,7 @@ __ftrace_make_nop(struct module *mod,
183 return -EFAULT; 165 return -EFAULT;
184 } 166 }
185 167
186 DEBUGP(" %08x %08x", jmp[0], jmp[1]); 168 pr_debug(" %08x %08x", jmp[0], jmp[1]);
187 169
188 /* verify that this is what we expect it to be */ 170 /* verify that this is what we expect it to be */
189 if (((jmp[0] & 0xffff0000) != 0x3d820000) || 171 if (((jmp[0] & 0xffff0000) != 0x3d820000) ||
@@ -199,18 +181,18 @@ __ftrace_make_nop(struct module *mod,
199 offset = ((unsigned)((unsigned short)jmp[0]) << 16) + 181 offset = ((unsigned)((unsigned short)jmp[0]) << 16) +
200 (int)((short)jmp[1]); 182 (int)((short)jmp[1]);
201 183
202 DEBUGP(" %x ", offset); 184 pr_debug(" %x ", offset);
203 185
204 /* get the address this jumps too */ 186 /* get the address this jumps too */
205 tramp = mod->arch.toc + offset + 32; 187 tramp = mod->arch.toc + offset + 32;
206 DEBUGP("toc: %lx", tramp); 188 pr_debug("toc: %lx", tramp);
207 189
208 if (probe_kernel_read(jmp, (void *)tramp, 8)) { 190 if (probe_kernel_read(jmp, (void *)tramp, 8)) {
209 printk(KERN_ERR "Failed to read %lx\n", tramp); 191 printk(KERN_ERR "Failed to read %lx\n", tramp);
210 return -EFAULT; 192 return -EFAULT;
211 } 193 }
212 194
213 DEBUGP(" %08x %08x\n", jmp[0], jmp[1]); 195 pr_debug(" %08x %08x\n", jmp[0], jmp[1]);
214 196
215 ptr = ((unsigned long)jmp[0] << 32) + jmp[1]; 197 ptr = ((unsigned long)jmp[0] << 32) + jmp[1];
216 198
@@ -287,7 +269,7 @@ __ftrace_make_nop(struct module *mod,
287 * 0x4e, 0x80, 0x04, 0x20 bctr 269 * 0x4e, 0x80, 0x04, 0x20 bctr
288 */ 270 */
289 271
290 DEBUGP("ip:%lx jumps to %lx", ip, tramp); 272 pr_debug("ip:%lx jumps to %lx", ip, tramp);
291 273
292 /* Find where the trampoline jumps to */ 274 /* Find where the trampoline jumps to */
293 if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { 275 if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
@@ -295,7 +277,7 @@ __ftrace_make_nop(struct module *mod,
295 return -EFAULT; 277 return -EFAULT;
296 } 278 }
297 279
298 DEBUGP(" %08x %08x ", jmp[0], jmp[1]); 280 pr_debug(" %08x %08x ", jmp[0], jmp[1]);
299 281
300 /* verify that this is what we expect it to be */ 282 /* verify that this is what we expect it to be */
301 if (((jmp[0] & 0xffff0000) != 0x3d600000) || 283 if (((jmp[0] & 0xffff0000) != 0x3d600000) ||
@@ -311,7 +293,7 @@ __ftrace_make_nop(struct module *mod,
311 if (tramp & 0x8000) 293 if (tramp & 0x8000)
312 tramp -= 0x10000; 294 tramp -= 0x10000;
313 295
314 DEBUGP(" %x ", tramp); 296 pr_debug(" %lx ", tramp);
315 297
316 if (tramp != addr) { 298 if (tramp != addr) {
317 printk(KERN_ERR 299 printk(KERN_ERR
@@ -320,7 +302,7 @@ __ftrace_make_nop(struct module *mod,
320 return -EINVAL; 302 return -EINVAL;
321 } 303 }
322 304
323 op = PPC_NOP_INSTR; 305 op = PPC_INST_NOP;
324 306
325 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 307 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
326 return -EPERM; 308 return -EPERM;
@@ -330,12 +312,13 @@ __ftrace_make_nop(struct module *mod,
330 return 0; 312 return 0;
331} 313}
332#endif /* PPC64 */ 314#endif /* PPC64 */
315#endif /* CONFIG_MODULES */
333 316
334int ftrace_make_nop(struct module *mod, 317int ftrace_make_nop(struct module *mod,
335 struct dyn_ftrace *rec, unsigned long addr) 318 struct dyn_ftrace *rec, unsigned long addr)
336{ 319{
337 unsigned char *old, *new;
338 unsigned long ip = rec->ip; 320 unsigned long ip = rec->ip;
321 unsigned int old, new;
339 322
340 /* 323 /*
341 * If the calling address is more that 24 bits away, 324 * If the calling address is more that 24 bits away,
@@ -344,11 +327,12 @@ int ftrace_make_nop(struct module *mod,
344 */ 327 */
345 if (test_24bit_addr(ip, addr)) { 328 if (test_24bit_addr(ip, addr)) {
346 /* within range */ 329 /* within range */
347 old = ftrace_call_replace(ip, addr); 330 old = ftrace_call_replace(ip, addr, 1);
348 new = ftrace_nop_replace(); 331 new = ftrace_nop_replace();
349 return ftrace_modify_code(ip, old, new); 332 return ftrace_modify_code(ip, old, new);
350 } 333 }
351 334
335#ifdef CONFIG_MODULES
352 /* 336 /*
353 * Out of range jumps are called from modules. 337 * Out of range jumps are called from modules.
354 * We should either already have a pointer to the module 338 * We should either already have a pointer to the module
@@ -373,9 +357,13 @@ int ftrace_make_nop(struct module *mod,
373 mod = rec->arch.mod; 357 mod = rec->arch.mod;
374 358
375 return __ftrace_make_nop(mod, rec, addr); 359 return __ftrace_make_nop(mod, rec, addr);
376 360#else
361 /* We should not get here without modules */
362 return -EINVAL;
363#endif /* CONFIG_MODULES */
377} 364}
378 365
366#ifdef CONFIG_MODULES
379#ifdef CONFIG_PPC64 367#ifdef CONFIG_PPC64
380static int 368static int
381__ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) 369__ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
@@ -392,7 +380,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
392 * b +8; ld r2,40(r1) 380 * b +8; ld r2,40(r1)
393 */ 381 */
394 if (((op[0] != 0x48000008) || (op[1] != 0xe8410028)) && 382 if (((op[0] != 0x48000008) || (op[1] != 0xe8410028)) &&
395 ((op[0] != PPC_NOP_INSTR) || (op[1] != PPC_NOP_INSTR))) { 383 ((op[0] != PPC_INST_NOP) || (op[1] != PPC_INST_NOP))) {
396 printk(KERN_ERR "Expected NOPs but have %x %x\n", op[0], op[1]); 384 printk(KERN_ERR "Expected NOPs but have %x %x\n", op[0], op[1]);
397 return -EINVAL; 385 return -EINVAL;
398 } 386 }
@@ -414,7 +402,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
414 /* ld r2,40(r1) */ 402 /* ld r2,40(r1) */
415 op[1] = 0xe8410028; 403 op[1] = 0xe8410028;
416 404
417 DEBUGP("write to %lx\n", rec->ip); 405 pr_debug("write to %lx\n", rec->ip);
418 406
419 if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2)) 407 if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
420 return -EPERM; 408 return -EPERM;
@@ -435,7 +423,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
435 return -EFAULT; 423 return -EFAULT;
436 424
437 /* It should be pointing to a nop */ 425 /* It should be pointing to a nop */
438 if (op != PPC_NOP_INSTR) { 426 if (op != PPC_INST_NOP) {
439 printk(KERN_ERR "Expected NOP but have %x\n", op); 427 printk(KERN_ERR "Expected NOP but have %x\n", op);
440 return -EINVAL; 428 return -EINVAL;
441 } 429 }
@@ -454,7 +442,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
454 return -EINVAL; 442 return -EINVAL;
455 } 443 }
456 444
457 DEBUGP("write to %lx\n", rec->ip); 445 pr_debug("write to %lx\n", rec->ip);
458 446
459 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 447 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
460 return -EPERM; 448 return -EPERM;
@@ -464,11 +452,12 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
464 return 0; 452 return 0;
465} 453}
466#endif /* CONFIG_PPC64 */ 454#endif /* CONFIG_PPC64 */
455#endif /* CONFIG_MODULES */
467 456
468int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) 457int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
469{ 458{
470 unsigned char *old, *new;
471 unsigned long ip = rec->ip; 459 unsigned long ip = rec->ip;
460 unsigned int old, new;
472 461
473 /* 462 /*
474 * If the calling address is more that 24 bits away, 463 * If the calling address is more that 24 bits away,
@@ -478,10 +467,11 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
478 if (test_24bit_addr(ip, addr)) { 467 if (test_24bit_addr(ip, addr)) {
479 /* within range */ 468 /* within range */
480 old = ftrace_nop_replace(); 469 old = ftrace_nop_replace();
481 new = ftrace_call_replace(ip, addr); 470 new = ftrace_call_replace(ip, addr, 1);
482 return ftrace_modify_code(ip, old, new); 471 return ftrace_modify_code(ip, old, new);
483 } 472 }
484 473
474#ifdef CONFIG_MODULES
485 /* 475 /*
486 * Out of range jumps are called from modules. 476 * Out of range jumps are called from modules.
487 * Being that we are converting from nop, it had better 477 * Being that we are converting from nop, it had better
@@ -493,16 +483,20 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
493 } 483 }
494 484
495 return __ftrace_make_call(rec, addr); 485 return __ftrace_make_call(rec, addr);
486#else
487 /* We should not get here without modules */
488 return -EINVAL;
489#endif /* CONFIG_MODULES */
496} 490}
497 491
498int ftrace_update_ftrace_func(ftrace_func_t func) 492int ftrace_update_ftrace_func(ftrace_func_t func)
499{ 493{
500 unsigned long ip = (unsigned long)(&ftrace_call); 494 unsigned long ip = (unsigned long)(&ftrace_call);
501 unsigned char old[MCOUNT_INSN_SIZE], *new; 495 unsigned int old, new;
502 int ret; 496 int ret;
503 497
504 memcpy(old, &ftrace_call, MCOUNT_INSN_SIZE); 498 old = *(unsigned int *)&ftrace_call;
505 new = ftrace_call_replace(ip, (unsigned long)func); 499 new = ftrace_call_replace(ip, (unsigned long)func, 1);
506 ret = ftrace_modify_code(ip, old, new); 500 ret = ftrace_modify_code(ip, old, new);
507 501
508 return ret; 502 return ret;
@@ -517,3 +511,111 @@ int __init ftrace_dyn_arch_init(void *data)
517 511
518 return 0; 512 return 0;
519} 513}
514#endif /* CONFIG_DYNAMIC_FTRACE */
515
516#ifdef CONFIG_FUNCTION_GRAPH_TRACER
517
518#ifdef CONFIG_DYNAMIC_FTRACE
519extern void ftrace_graph_call(void);
520extern void ftrace_graph_stub(void);
521
522int ftrace_enable_ftrace_graph_caller(void)
523{
524 unsigned long ip = (unsigned long)(&ftrace_graph_call);
525 unsigned long addr = (unsigned long)(&ftrace_graph_caller);
526 unsigned long stub = (unsigned long)(&ftrace_graph_stub);
527 unsigned int old, new;
528
529 old = ftrace_call_replace(ip, stub, 0);
530 new = ftrace_call_replace(ip, addr, 0);
531
532 return ftrace_modify_code(ip, old, new);
533}
534
535int ftrace_disable_ftrace_graph_caller(void)
536{
537 unsigned long ip = (unsigned long)(&ftrace_graph_call);
538 unsigned long addr = (unsigned long)(&ftrace_graph_caller);
539 unsigned long stub = (unsigned long)(&ftrace_graph_stub);
540 unsigned int old, new;
541
542 old = ftrace_call_replace(ip, addr, 0);
543 new = ftrace_call_replace(ip, stub, 0);
544
545 return ftrace_modify_code(ip, old, new);
546}
547#endif /* CONFIG_DYNAMIC_FTRACE */
548
549#ifdef CONFIG_PPC64
550extern void mod_return_to_handler(void);
551#endif
552
553/*
554 * Hook the return address and push it in the stack of return addrs
555 * in current thread info.
556 */
557void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
558{
559 unsigned long old;
560 int faulted;
561 struct ftrace_graph_ent trace;
562 unsigned long return_hooker = (unsigned long)&return_to_handler;
563
564 if (unlikely(atomic_read(&current->tracing_graph_pause)))
565 return;
566
567#ifdef CONFIG_PPC64
568 /* non core kernel code needs to save and restore the TOC */
569 if (REGION_ID(self_addr) != KERNEL_REGION_ID)
570 return_hooker = (unsigned long)&mod_return_to_handler;
571#endif
572
573 return_hooker = GET_ADDR(return_hooker);
574
575 /*
576 * Protect against fault, even if it shouldn't
577 * happen. This tool is too much intrusive to
578 * ignore such a protection.
579 */
580 asm volatile(
581 "1: " PPC_LL "%[old], 0(%[parent])\n"
582 "2: " PPC_STL "%[return_hooker], 0(%[parent])\n"
583 " li %[faulted], 0\n"
584 "3:\n"
585
586 ".section .fixup, \"ax\"\n"
587 "4: li %[faulted], 1\n"
588 " b 3b\n"
589 ".previous\n"
590
591 ".section __ex_table,\"a\"\n"
592 PPC_LONG_ALIGN "\n"
593 PPC_LONG "1b,4b\n"
594 PPC_LONG "2b,4b\n"
595 ".previous"
596
597 : [old] "=r" (old), [faulted] "=r" (faulted)
598 : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
599 : "memory"
600 );
601
602 if (unlikely(faulted)) {
603 ftrace_graph_stop();
604 WARN_ON(1);
605 return;
606 }
607
608 if (ftrace_push_return_trace(old, self_addr, &trace.depth) == -EBUSY) {
609 *parent = old;
610 return;
611 }
612
613 trace.func = self_addr;
614
615 /* Only trace if the calling function expects to */
616 if (!ftrace_graph_entry(&trace)) {
617 current->curr_ret_stack--;
618 *parent = old;
619 }
620}
621#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index d794a637e421..54e68c11ae15 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -108,18 +108,21 @@ __start:
108 * because OF may have I/O devices mapped into that area 108 * because OF may have I/O devices mapped into that area
109 * (particularly on CHRP). 109 * (particularly on CHRP).
110 */ 110 */
111#ifdef CONFIG_PPC_MULTIPLATFORM
112 cmpwi 0,r5,0 111 cmpwi 0,r5,0
113 beq 1f 112 beq 1f
114 113
114#ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE
115 /* find out where we are now */ 115 /* find out where we are now */
116 bcl 20,31,$+4 116 bcl 20,31,$+4
1170: mflr r8 /* r8 = runtime addr here */ 1170: mflr r8 /* r8 = runtime addr here */
118 addis r8,r8,(_stext - 0b)@ha 118 addis r8,r8,(_stext - 0b)@ha
119 addi r8,r8,(_stext - 0b)@l /* current runtime base addr */ 119 addi r8,r8,(_stext - 0b)@l /* current runtime base addr */
120 bl prom_init 120 bl prom_init
121#endif /* CONFIG_PPC_OF_BOOT_TRAMPOLINE */
122
123 /* We never return. We also hit that trap if trying to boot
124 * from OF while CONFIG_PPC_OF_BOOT_TRAMPOLINE isn't selected */
121 trap 125 trap
122#endif
123 126
124/* 127/*
125 * Check for BootX signature when supporting PowerMac and branch to 128 * Check for BootX signature when supporting PowerMac and branch to
@@ -472,12 +475,11 @@ SystemCall:
472 . = 0x1000 475 . = 0x1000
473InstructionTLBMiss: 476InstructionTLBMiss:
474/* 477/*
475 * r0: stored ctr 478 * r0: scratch
476 * r1: linux style pte ( later becomes ppc hardware pte ) 479 * r1: linux style pte ( later becomes ppc hardware pte )
477 * r2: ptr to linux-style pte 480 * r2: ptr to linux-style pte
478 * r3: scratch 481 * r3: scratch
479 */ 482 */
480 mfctr r0
481 /* Get PTE (linux-style) and check access */ 483 /* Get PTE (linux-style) and check access */
482 mfspr r3,SPRN_IMISS 484 mfspr r3,SPRN_IMISS
483 lis r1,PAGE_OFFSET@h /* check if kernel address */ 485 lis r1,PAGE_OFFSET@h /* check if kernel address */
@@ -496,28 +498,27 @@ InstructionTLBMiss:
496 rlwinm. r2,r2,0,0,19 /* extract address of pte page */ 498 rlwinm. r2,r2,0,0,19 /* extract address of pte page */
497 beq- InstructionAddressInvalid /* return if no mapping */ 499 beq- InstructionAddressInvalid /* return if no mapping */
498 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ 500 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
499 lwz r3,0(r2) /* get linux-style pte */ 501 lwz r0,0(r2) /* get linux-style pte */
500 andc. r1,r1,r3 /* check access & ~permission */ 502 andc. r1,r1,r0 /* check access & ~permission */
501 bne- InstructionAddressInvalid /* return if access not permitted */ 503 bne- InstructionAddressInvalid /* return if access not permitted */
502 ori r3,r3,_PAGE_ACCESSED /* set _PAGE_ACCESSED in pte */ 504 ori r0,r0,_PAGE_ACCESSED /* set _PAGE_ACCESSED in pte */
503 /* 505 /*
504 * NOTE! We are assuming this is not an SMP system, otherwise 506 * NOTE! We are assuming this is not an SMP system, otherwise
505 * we would need to update the pte atomically with lwarx/stwcx. 507 * we would need to update the pte atomically with lwarx/stwcx.
506 */ 508 */
507 stw r3,0(r2) /* update PTE (accessed bit) */ 509 stw r0,0(r2) /* update PTE (accessed bit) */
508 /* Convert linux-style PTE to low word of PPC-style PTE */ 510 /* Convert linux-style PTE to low word of PPC-style PTE */
509 rlwinm r1,r3,32-10,31,31 /* _PAGE_RW -> PP lsb */ 511 rlwinm r1,r0,32-10,31,31 /* _PAGE_RW -> PP lsb */
510 rlwinm r2,r3,32-7,31,31 /* _PAGE_DIRTY -> PP lsb */ 512 rlwinm r2,r0,32-7,31,31 /* _PAGE_DIRTY -> PP lsb */
511 and r1,r1,r2 /* writable if _RW and _DIRTY */ 513 and r1,r1,r2 /* writable if _RW and _DIRTY */
512 rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ 514 rlwimi r0,r0,32-1,30,30 /* _PAGE_USER -> PP msb */
513 rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ 515 rlwimi r0,r0,32-1,31,31 /* _PAGE_USER -> PP lsb */
514 ori r1,r1,0xe04 /* clear out reserved bits */ 516 ori r1,r1,0xe04 /* clear out reserved bits */
515 andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ 517 andc r1,r0,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
516BEGIN_FTR_SECTION 518BEGIN_FTR_SECTION
517 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ 519 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
518END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) 520END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
519 mtspr SPRN_RPA,r1 521 mtspr SPRN_RPA,r1
520 mfspr r3,SPRN_IMISS
521 tlbli r3 522 tlbli r3
522 mfspr r3,SPRN_SRR1 /* Need to restore CR0 */ 523 mfspr r3,SPRN_SRR1 /* Need to restore CR0 */
523 mtcrf 0x80,r3 524 mtcrf 0x80,r3
@@ -528,7 +529,6 @@ InstructionAddressInvalid:
528 529
529 addis r1,r1,0x2000 530 addis r1,r1,0x2000
530 mtspr SPRN_DSISR,r1 /* (shouldn't be needed) */ 531 mtspr SPRN_DSISR,r1 /* (shouldn't be needed) */
531 mtctr r0 /* Restore CTR */
532 andi. r2,r3,0xFFFF /* Clear upper bits of SRR1 */ 532 andi. r2,r3,0xFFFF /* Clear upper bits of SRR1 */
533 or r2,r2,r1 533 or r2,r2,r1
534 mtspr SPRN_SRR1,r2 534 mtspr SPRN_SRR1,r2
@@ -549,12 +549,11 @@ InstructionAddressInvalid:
549 . = 0x1100 549 . = 0x1100
550DataLoadTLBMiss: 550DataLoadTLBMiss:
551/* 551/*
552 * r0: stored ctr 552 * r0: scratch
553 * r1: linux style pte ( later becomes ppc hardware pte ) 553 * r1: linux style pte ( later becomes ppc hardware pte )
554 * r2: ptr to linux-style pte 554 * r2: ptr to linux-style pte
555 * r3: scratch 555 * r3: scratch
556 */ 556 */
557 mfctr r0
558 /* Get PTE (linux-style) and check access */ 557 /* Get PTE (linux-style) and check access */
559 mfspr r3,SPRN_DMISS 558 mfspr r3,SPRN_DMISS
560 lis r1,PAGE_OFFSET@h /* check if kernel address */ 559 lis r1,PAGE_OFFSET@h /* check if kernel address */
@@ -573,38 +572,48 @@ DataLoadTLBMiss:
573 rlwinm. r2,r2,0,0,19 /* extract address of pte page */ 572 rlwinm. r2,r2,0,0,19 /* extract address of pte page */
574 beq- DataAddressInvalid /* return if no mapping */ 573 beq- DataAddressInvalid /* return if no mapping */
575 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ 574 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
576 lwz r3,0(r2) /* get linux-style pte */ 575 lwz r0,0(r2) /* get linux-style pte */
577 andc. r1,r1,r3 /* check access & ~permission */ 576 andc. r1,r1,r0 /* check access & ~permission */
578 bne- DataAddressInvalid /* return if access not permitted */ 577 bne- DataAddressInvalid /* return if access not permitted */
579 ori r3,r3,_PAGE_ACCESSED /* set _PAGE_ACCESSED in pte */ 578 ori r0,r0,_PAGE_ACCESSED /* set _PAGE_ACCESSED in pte */
580 /* 579 /*
581 * NOTE! We are assuming this is not an SMP system, otherwise 580 * NOTE! We are assuming this is not an SMP system, otherwise
582 * we would need to update the pte atomically with lwarx/stwcx. 581 * we would need to update the pte atomically with lwarx/stwcx.
583 */ 582 */
584 stw r3,0(r2) /* update PTE (accessed bit) */ 583 stw r0,0(r2) /* update PTE (accessed bit) */
585 /* Convert linux-style PTE to low word of PPC-style PTE */ 584 /* Convert linux-style PTE to low word of PPC-style PTE */
586 rlwinm r1,r3,32-10,31,31 /* _PAGE_RW -> PP lsb */ 585 rlwinm r1,r0,32-10,31,31 /* _PAGE_RW -> PP lsb */
587 rlwinm r2,r3,32-7,31,31 /* _PAGE_DIRTY -> PP lsb */ 586 rlwinm r2,r0,32-7,31,31 /* _PAGE_DIRTY -> PP lsb */
588 and r1,r1,r2 /* writable if _RW and _DIRTY */ 587 and r1,r1,r2 /* writable if _RW and _DIRTY */
589 rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ 588 rlwimi r0,r0,32-1,30,30 /* _PAGE_USER -> PP msb */
590 rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ 589 rlwimi r0,r0,32-1,31,31 /* _PAGE_USER -> PP lsb */
591 ori r1,r1,0xe04 /* clear out reserved bits */ 590 ori r1,r1,0xe04 /* clear out reserved bits */
592 andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ 591 andc r1,r0,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
593BEGIN_FTR_SECTION 592BEGIN_FTR_SECTION
594 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ 593 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
595END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) 594END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
596 mtspr SPRN_RPA,r1 595 mtspr SPRN_RPA,r1
597 mfspr r3,SPRN_DMISS 596 mfspr r2,SPRN_SRR1 /* Need to restore CR0 */
597 mtcrf 0x80,r2
598BEGIN_MMU_FTR_SECTION
599 li r0,1
600 mfspr r1,SPRN_SPRG4
601 rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */
602 slw r0,r0,r2
603 xor r1,r0,r1
604 srw r0,r1,r2
605 mtspr SPRN_SPRG4,r1
606 mfspr r2,SPRN_SRR1
607 rlwimi r2,r0,31-14,14,14
608 mtspr SPRN_SRR1,r2
609END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
598 tlbld r3 610 tlbld r3
599 mfspr r3,SPRN_SRR1 /* Need to restore CR0 */
600 mtcrf 0x80,r3
601 rfi 611 rfi
602DataAddressInvalid: 612DataAddressInvalid:
603 mfspr r3,SPRN_SRR1 613 mfspr r3,SPRN_SRR1
604 rlwinm r1,r3,9,6,6 /* Get load/store bit */ 614 rlwinm r1,r3,9,6,6 /* Get load/store bit */
605 addis r1,r1,0x2000 615 addis r1,r1,0x2000
606 mtspr SPRN_DSISR,r1 616 mtspr SPRN_DSISR,r1
607 mtctr r0 /* Restore CTR */
608 andi. r2,r3,0xFFFF /* Clear upper bits of SRR1 */ 617 andi. r2,r3,0xFFFF /* Clear upper bits of SRR1 */
609 mtspr SPRN_SRR1,r2 618 mtspr SPRN_SRR1,r2
610 mfspr r1,SPRN_DMISS /* Get failing address */ 619 mfspr r1,SPRN_DMISS /* Get failing address */
@@ -624,12 +633,11 @@ DataAddressInvalid:
624 . = 0x1200 633 . = 0x1200
625DataStoreTLBMiss: 634DataStoreTLBMiss:
626/* 635/*
627 * r0: stored ctr 636 * r0: scratch
628 * r1: linux style pte ( later becomes ppc hardware pte ) 637 * r1: linux style pte ( later becomes ppc hardware pte )
629 * r2: ptr to linux-style pte 638 * r2: ptr to linux-style pte
630 * r3: scratch 639 * r3: scratch
631 */ 640 */
632 mfctr r0
633 /* Get PTE (linux-style) and check access */ 641 /* Get PTE (linux-style) and check access */
634 mfspr r3,SPRN_DMISS 642 mfspr r3,SPRN_DMISS
635 lis r1,PAGE_OFFSET@h /* check if kernel address */ 643 lis r1,PAGE_OFFSET@h /* check if kernel address */
@@ -648,27 +656,38 @@ DataStoreTLBMiss:
648 rlwinm. r2,r2,0,0,19 /* extract address of pte page */ 656 rlwinm. r2,r2,0,0,19 /* extract address of pte page */
649 beq- DataAddressInvalid /* return if no mapping */ 657 beq- DataAddressInvalid /* return if no mapping */
650 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ 658 rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
651 lwz r3,0(r2) /* get linux-style pte */ 659 lwz r0,0(r2) /* get linux-style pte */
652 andc. r1,r1,r3 /* check access & ~permission */ 660 andc. r1,r1,r0 /* check access & ~permission */
653 bne- DataAddressInvalid /* return if access not permitted */ 661 bne- DataAddressInvalid /* return if access not permitted */
654 ori r3,r3,_PAGE_ACCESSED|_PAGE_DIRTY 662 ori r0,r0,_PAGE_ACCESSED|_PAGE_DIRTY
655 /* 663 /*
656 * NOTE! We are assuming this is not an SMP system, otherwise 664 * NOTE! We are assuming this is not an SMP system, otherwise
657 * we would need to update the pte atomically with lwarx/stwcx. 665 * we would need to update the pte atomically with lwarx/stwcx.
658 */ 666 */
659 stw r3,0(r2) /* update PTE (accessed/dirty bits) */ 667 stw r0,0(r2) /* update PTE (accessed/dirty bits) */
660 /* Convert linux-style PTE to low word of PPC-style PTE */ 668 /* Convert linux-style PTE to low word of PPC-style PTE */
661 rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ 669 rlwimi r0,r0,32-1,30,30 /* _PAGE_USER -> PP msb */
662 li r1,0xe05 /* clear out reserved bits & PP lsb */ 670 li r1,0xe05 /* clear out reserved bits & PP lsb */
663 andc r1,r3,r1 /* PP = user? 2: 0 */ 671 andc r1,r0,r1 /* PP = user? 2: 0 */
664BEGIN_FTR_SECTION 672BEGIN_FTR_SECTION
665 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ 673 rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
666END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) 674END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
667 mtspr SPRN_RPA,r1 675 mtspr SPRN_RPA,r1
668 mfspr r3,SPRN_DMISS 676 mfspr r2,SPRN_SRR1 /* Need to restore CR0 */
677 mtcrf 0x80,r2
678BEGIN_MMU_FTR_SECTION
679 li r0,1
680 mfspr r1,SPRN_SPRG4
681 rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */
682 slw r0,r0,r2
683 xor r1,r0,r1
684 srw r0,r1,r2
685 mtspr SPRN_SPRG4,r1
686 mfspr r2,SPRN_SRR1
687 rlwimi r2,r0,31-14,14,14
688 mtspr SPRN_SRR1,r2
689END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
669 tlbld r3 690 tlbld r3
670 mfspr r3,SPRN_SRR1 /* Need to restore CR0 */
671 mtcrf 0x80,r3
672 rfi 691 rfi
673 692
674#ifndef CONFIG_ALTIVEC 693#ifndef CONFIG_ALTIVEC
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index ebaedafc8e67..50ef505b8fb6 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1360,6 +1360,7 @@ _GLOBAL(__start_initialization_multiplatform)
1360 b .__after_prom_start 1360 b .__after_prom_start
1361 1361
1362_INIT_STATIC(__boot_from_prom) 1362_INIT_STATIC(__boot_from_prom)
1363#ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE
1363 /* Save parameters */ 1364 /* Save parameters */
1364 mr r31,r3 1365 mr r31,r3
1365 mr r30,r4 1366 mr r30,r4
@@ -1390,7 +1391,10 @@ _INIT_STATIC(__boot_from_prom)
1390 /* Do all of the interaction with OF client interface */ 1391 /* Do all of the interaction with OF client interface */
1391 mr r8,r26 1392 mr r8,r26
1392 bl .prom_init 1393 bl .prom_init
1393 /* We never return */ 1394#endif /* #CONFIG_PPC_OF_BOOT_TRAMPOLINE */
1395
1396 /* We never return. We also hit that trap if trying to boot
1397 * from OF while CONFIG_PPC_OF_BOOT_TRAMPOLINE isn't selected */
1394 trap 1398 trap
1395 1399
1396_STATIC(__after_prom_start) 1400_STATIC(__after_prom_start)
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index fce2df988504..95f39f1e68d4 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -10,6 +10,15 @@
10 mtspr SPRN_IVOR##vector_number,r26; \ 10 mtspr SPRN_IVOR##vector_number,r26; \
11 sync 11 sync
12 12
13#if (THREAD_SHIFT < 15)
14#define ALLOC_STACK_FRAME(reg, val) \
15 addi reg,reg,val
16#else
17#define ALLOC_STACK_FRAME(reg, val) \
18 addis reg,reg,val@ha; \
19 addi reg,reg,val@l
20#endif
21
13#define NORMAL_EXCEPTION_PROLOG \ 22#define NORMAL_EXCEPTION_PROLOG \
14 mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ 23 mtspr SPRN_SPRG0,r10; /* save two registers to work with */\
15 mtspr SPRN_SPRG1,r11; \ 24 mtspr SPRN_SPRG1,r11; \
@@ -20,7 +29,7 @@
20 beq 1f; \ 29 beq 1f; \
21 mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ 30 mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\
22 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ 31 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\
23 addi r1,r1,THREAD_SIZE; \ 32 ALLOC_STACK_FRAME(r1, THREAD_SIZE); \
241: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ 331: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\
25 mr r11,r1; \ 34 mr r11,r1; \
26 stw r10,_CCR(r11); /* save various registers */\ 35 stw r10,_CCR(r11); /* save various registers */\
@@ -70,10 +79,10 @@
70 79
71/* only on e500mc/e200 */ 80/* only on e500mc/e200 */
72#define DEBUG_STACK_BASE dbgirq_ctx 81#define DEBUG_STACK_BASE dbgirq_ctx
73#ifdef CONFIG_PPC_E500MC 82#ifdef CONFIG_E200
74#define DEBUG_SPRG SPRN_SPRG9
75#else
76#define DEBUG_SPRG SPRN_SPRG6W 83#define DEBUG_SPRG SPRN_SPRG6W
84#else
85#define DEBUG_SPRG SPRN_SPRG9
77#endif 86#endif
78 87
79#define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE) 88#define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE)
@@ -279,7 +288,7 @@ label:
279 lwz r11,GPR11(r8); \ 288 lwz r11,GPR11(r8); \
280 mfspr r8,DEBUG_SPRG; \ 289 mfspr r8,DEBUG_SPRG; \
281 \ 290 \
282 RFDI; \ 291 PPC_RFDI; \
283 b .; \ 292 b .; \
284 \ 293 \
285 /* continue normal handling for a debug exception... */ \ 294 /* continue normal handling for a debug exception... */ \
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 36ffb3504a4f..4c22620d009b 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -103,10 +103,15 @@ invstr: mflr r6 /* Make it accessible */
103 or r7,r7,r4 103 or r7,r7,r4
104 mtspr SPRN_MAS6,r7 104 mtspr SPRN_MAS6,r7
105 tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */ 105 tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
106#ifndef CONFIG_E200
107 mfspr r7,SPRN_MAS1 106 mfspr r7,SPRN_MAS1
108 andis. r7,r7,MAS1_VALID@h 107 andis. r7,r7,MAS1_VALID@h
109 bne match_TLB 108 bne match_TLB
109
110 mfspr r7,SPRN_MMUCFG
111 rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
112 cmpwi r7,3
113 bne match_TLB /* skip if NPIDS != 3 */
114
110 mfspr r7,SPRN_PID1 115 mfspr r7,SPRN_PID1
111 slwi r7,r7,16 116 slwi r7,r7,16
112 or r7,r7,r4 117 or r7,r7,r4
@@ -120,7 +125,7 @@ invstr: mflr r6 /* Make it accessible */
120 or r7,r7,r4 125 or r7,r7,r4
121 mtspr SPRN_MAS6,r7 126 mtspr SPRN_MAS6,r7
122 tlbsx 0,r6 /* Fall through, we had to match */ 127 tlbsx 0,r6 /* Fall through, we had to match */
123#endif 128
124match_TLB: 129match_TLB:
125 mfspr r7,SPRN_MAS0 130 mfspr r7,SPRN_MAS0
126 rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */ 131 rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */
@@ -168,7 +173,7 @@ skpinv: addi r6,r6,1 /* Increment */
168 173
169 /* grab and fixup the RPN */ 174 /* grab and fixup the RPN */
170 mfspr r6,SPRN_MAS1 /* extract MAS1[SIZE] */ 175 mfspr r6,SPRN_MAS1 /* extract MAS1[SIZE] */
171 rlwinm r6,r6,25,27,30 176 rlwinm r6,r6,25,27,31
172 li r8,-1 177 li r8,-1
173 addi r6,r6,10 178 addi r6,r6,10
174 slw r6,r8,r6 /* convert to mask */ 179 slw r6,r8,r6 /* convert to mask */
@@ -194,7 +199,7 @@ skpinv: addi r6,r6,1 /* Increment */
194 xori r6,r4,1 /* Setup TMP mapping in the other Address space */ 199 xori r6,r4,1 /* Setup TMP mapping in the other Address space */
195 slwi r6,r6,12 200 slwi r6,r6,12
196 oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h 201 oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h
197 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l 202 ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_4K))@l
198 mtspr SPRN_MAS1,r6 203 mtspr SPRN_MAS1,r6
199 mfspr r6,SPRN_MAS2 204 mfspr r6,SPRN_MAS2
200 li r7,0 /* temp EPN = 0 */ 205 li r7,0 /* temp EPN = 0 */
@@ -215,14 +220,19 @@ skpinv: addi r6,r6,1 /* Increment */
215 220
216/* 4. Clear out PIDs & Search info */ 221/* 4. Clear out PIDs & Search info */
217 li r6,0 222 li r6,0
223 mtspr SPRN_MAS6,r6
218 mtspr SPRN_PID0,r6 224 mtspr SPRN_PID0,r6
219#ifndef CONFIG_E200 225
226 mfspr r7,SPRN_MMUCFG
227 rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
228 cmpwi r7,3
229 bne 2f /* skip if NPIDS != 3 */
230
220 mtspr SPRN_PID1,r6 231 mtspr SPRN_PID1,r6
221 mtspr SPRN_PID2,r6 232 mtspr SPRN_PID2,r6
222#endif
223 mtspr SPRN_MAS6,r6
224 233
225/* 5. Invalidate mapping we started in */ 234/* 5. Invalidate mapping we started in */
2352:
226 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */ 236 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
227 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 237 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
228 mtspr SPRN_MAS0,r7 238 mtspr SPRN_MAS0,r7
@@ -247,10 +257,10 @@ skpinv: addi r6,r6,1 /* Increment */
247 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */ 257 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
248 mtspr SPRN_MAS0,r6 258 mtspr SPRN_MAS0,r6
249 lis r6,(MAS1_VALID|MAS1_IPROT)@h 259 lis r6,(MAS1_VALID|MAS1_IPROT)@h
250 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_64M))@l 260 ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
251 mtspr SPRN_MAS1,r6 261 mtspr SPRN_MAS1,r6
252 lis r6,MAS2_VAL(PAGE_OFFSET, BOOKE_PAGESZ_64M, M_IF_SMP)@h 262 lis r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@h
253 ori r6,r6,MAS2_VAL(PAGE_OFFSET, BOOKE_PAGESZ_64M, M_IF_SMP)@l 263 ori r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@l
254 mtspr SPRN_MAS2,r6 264 mtspr SPRN_MAS2,r6
255 mtspr SPRN_MAS3,r8 265 mtspr SPRN_MAS3,r8
256 tlbwe 266 tlbwe
@@ -298,26 +308,14 @@ skpinv: addi r6,r6,1 /* Increment */
298 SET_IVOR(12, WatchdogTimer); 308 SET_IVOR(12, WatchdogTimer);
299 SET_IVOR(13, DataTLBError); 309 SET_IVOR(13, DataTLBError);
300 SET_IVOR(14, InstructionTLBError); 310 SET_IVOR(14, InstructionTLBError);
301 SET_IVOR(15, DebugDebug);
302#if defined(CONFIG_E500) && !defined(CONFIG_PPC_E500MC)
303 SET_IVOR(15, DebugCrit); 311 SET_IVOR(15, DebugCrit);
304#endif
305 SET_IVOR(32, SPEUnavailable);
306 SET_IVOR(33, SPEFloatingPointData);
307 SET_IVOR(34, SPEFloatingPointRound);
308#ifndef CONFIG_E200
309 SET_IVOR(35, PerformanceMonitor);
310#endif
311#ifdef CONFIG_PPC_E500MC
312 SET_IVOR(36, Doorbell);
313#endif
314 312
315 /* Establish the interrupt vector base */ 313 /* Establish the interrupt vector base */
316 lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ 314 lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
317 mtspr SPRN_IVPR,r4 315 mtspr SPRN_IVPR,r4
318 316
319 /* Setup the defaults for TLB entries */ 317 /* Setup the defaults for TLB entries */
320 li r2,(MAS4_TSIZED(BOOKE_PAGESZ_4K))@l 318 li r2,(MAS4_TSIZED(BOOK3E_PAGESZ_4K))@l
321#ifdef CONFIG_E200 319#ifdef CONFIG_E200
322 oris r2,r2,MAS4_TLBSELD(1)@h 320 oris r2,r2,MAS4_TLBSELD(1)@h
323#endif 321#endif
@@ -329,12 +327,6 @@ skpinv: addi r6,r6,1 /* Increment */
329 oris r2,r2,HID0_DOZE@h 327 oris r2,r2,HID0_DOZE@h
330 mtspr SPRN_HID0, r2 328 mtspr SPRN_HID0, r2
331#endif 329#endif
332#ifdef CONFIG_E200
333 /* enable dedicated debug exception handling resources (Debug APU) */
334 mfspr r2,SPRN_HID0
335 ori r2,r2,HID0_DAPUEN@l
336 mtspr SPRN_HID0,r2
337#endif
338 330
339#if !defined(CONFIG_BDI_SWITCH) 331#if !defined(CONFIG_BDI_SWITCH)
340 /* 332 /*
@@ -706,15 +698,13 @@ interrupt_base:
706 /* Performance Monitor */ 698 /* Performance Monitor */
707 EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD) 699 EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD)
708 700
709#ifdef CONFIG_PPC_E500MC 701 EXCEPTION(0x2070, Doorbell, doorbell_exception, EXC_XFER_STD)
710 EXCEPTION(0x2070, Doorbell, unknown_exception, EXC_XFER_STD) 702
711#endif 703 CRITICAL_EXCEPTION(0x2080, CriticalDoorbell, unknown_exception)
712 704
713 /* Debug Interrupt */ 705 /* Debug Interrupt */
714 DEBUG_DEBUG_EXCEPTION 706 DEBUG_DEBUG_EXCEPTION
715#if defined(CONFIG_E500) && !defined(CONFIG_PPC_E500MC)
716 DEBUG_CRIT_EXCEPTION 707 DEBUG_CRIT_EXCEPTION
717#endif
718 708
719/* 709/*
720 * Local functions 710 * Local functions
@@ -897,6 +887,47 @@ KernelSPE:
897 * Global functions 887 * Global functions
898 */ 888 */
899 889
890/* Adjust or setup IVORs for e200 */
891_GLOBAL(__setup_e200_ivors)
892 li r3,DebugDebug@l
893 mtspr SPRN_IVOR15,r3
894 li r3,SPEUnavailable@l
895 mtspr SPRN_IVOR32,r3
896 li r3,SPEFloatingPointData@l
897 mtspr SPRN_IVOR33,r3
898 li r3,SPEFloatingPointRound@l
899 mtspr SPRN_IVOR34,r3
900 sync
901 blr
902
903/* Adjust or setup IVORs for e500v1/v2 */
904_GLOBAL(__setup_e500_ivors)
905 li r3,DebugCrit@l
906 mtspr SPRN_IVOR15,r3
907 li r3,SPEUnavailable@l
908 mtspr SPRN_IVOR32,r3
909 li r3,SPEFloatingPointData@l
910 mtspr SPRN_IVOR33,r3
911 li r3,SPEFloatingPointRound@l
912 mtspr SPRN_IVOR34,r3
913 li r3,PerformanceMonitor@l
914 mtspr SPRN_IVOR35,r3
915 sync
916 blr
917
918/* Adjust or setup IVORs for e500mc */
919_GLOBAL(__setup_e500mc_ivors)
920 li r3,DebugDebug@l
921 mtspr SPRN_IVOR15,r3
922 li r3,PerformanceMonitor@l
923 mtspr SPRN_IVOR35,r3
924 li r3,Doorbell@l
925 mtspr SPRN_IVOR36,r3
926 li r3,CriticalDoorbell@l
927 mtspr SPRN_IVOR37,r3
928 sync
929 blr
930
900/* 931/*
901 * extern void loadcam_entry(unsigned int index) 932 * extern void loadcam_entry(unsigned int index)
902 * 933 *
@@ -1089,7 +1120,7 @@ __secondary_start:
1089 mtspr SPRN_SPRG3,r4 1120 mtspr SPRN_SPRG3,r4
1090 1121
1091 /* Setup the defaults for TLB entries */ 1122 /* Setup the defaults for TLB entries */
1092 li r4,(MAS4_TSIZED(BOOKE_PAGESZ_4K))@l 1123 li r4,(MAS4_TSIZED(BOOK3E_PAGESZ_4K))@l
1093 mtspr SPRN_MAS4,r4 1124 mtspr SPRN_MAS4,r4
1094 1125
1095 /* Jump to start_secondary */ 1126 /* Jump to start_secondary */
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 1b55ffdf0026..8c1a4966867e 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v)
171{ 171{
172 int i = *(loff_t *)v, j; 172 int i = *(loff_t *)v, j;
173 struct irqaction *action; 173 struct irqaction *action;
174 irq_desc_t *desc; 174 struct irq_desc *desc;
175 unsigned long flags; 175 unsigned long flags;
176 176
177 if (i == 0) { 177 if (i == 0) {
@@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
672 return NO_IRQ; 672 return NO_IRQ;
673 } 673 }
674 } 674 }
675 pr_debug("irq: -> obtained virq %d\n", virq);
676 675
677 if (irq_setup_virq(host, virq, hwirq)) 676 if (irq_setup_virq(host, virq, hwirq))
678 return NO_IRQ; 677 return NO_IRQ;
679 678
679 printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
680 hwirq, host->of_node ? host->of_node->full_name : "null", virq);
681
680 return virq; 682 return virq;
681} 683}
682EXPORT_SYMBOL_GPL(irq_create_mapping); 684EXPORT_SYMBOL_GPL(irq_create_mapping);
@@ -1038,7 +1040,7 @@ arch_initcall(irq_late_init);
1038static int virq_debug_show(struct seq_file *m, void *private) 1040static int virq_debug_show(struct seq_file *m, void *private)
1039{ 1041{
1040 unsigned long flags; 1042 unsigned long flags;
1041 irq_desc_t *desc; 1043 struct irq_desc *desc;
1042 const char *p; 1044 const char *p;
1043 char none[] = "none"; 1045 char none[] = "none";
1044 int i; 1046 int i;
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 182e0f642f36..78b3f7840ade 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m)
434 seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); 434 seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size());
435} 435}
436 436
437static void splpar_dispatch_data(struct seq_file *m)
438{
439 int cpu;
440 unsigned long dispatches = 0;
441 unsigned long dispatch_dispersions = 0;
442
443 for_each_possible_cpu(cpu) {
444 dispatches += lppaca[cpu].yield_count;
445 dispatch_dispersions += lppaca[cpu].dispersion_count;
446 }
447
448 seq_printf(m, "dispatches=%lu\n", dispatches);
449 seq_printf(m, "dispatch_dispersions=%lu\n", dispatch_dispersions);
450}
451
437static int pseries_lparcfg_data(struct seq_file *m, void *v) 452static int pseries_lparcfg_data(struct seq_file *m, void *v)
438{ 453{
439 int partition_potential_processors; 454 int partition_potential_processors;
@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
460 parse_ppp_data(m); 475 parse_ppp_data(m);
461 parse_mpp_data(m); 476 parse_mpp_data(m);
462 pseries_cmo_data(m); 477 pseries_cmo_data(m);
478 splpar_dispatch_data(m);
463 479
464 seq_printf(m, "purr=%ld\n", get_purr()); 480 seq_printf(m, "purr=%ld\n", get_purr());
465 } else { /* non SPLPAR case */ 481 } else { /* non SPLPAR case */
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 3053fe5c62f2..b9530b2395a2 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -495,7 +495,15 @@ _GLOBAL(giveup_altivec)
495 stvx vr0,r4,r3 495 stvx vr0,r4,r3
496 beq 1f 496 beq 1f
497 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5) 497 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
498#ifdef CONFIG_VSX
499BEGIN_FTR_SECTION
500 lis r3,(MSR_VEC|MSR_VSX)@h
501FTR_SECTION_ELSE
502 lis r3,MSR_VEC@h
503ALT_FTR_SECTION_END_IFSET(CPU_FTR_VSX)
504#else
498 lis r3,MSR_VEC@h 505 lis r3,MSR_VEC@h
506#endif
499 andc r4,r4,r3 /* disable FP for previous task */ 507 andc r4,r4,r3 /* disable FP for previous task */
500 std r4,_MSR-STACK_FRAME_OVERHEAD(r5) 508 std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
5011: 5091:
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 8992b031a7b6..8fbb12508bf3 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -329,7 +329,7 @@ static unsigned long stub_for_addr(Elf64_Shdr *sechdrs,
329 restore r2. */ 329 restore r2. */
330static int restore_r2(u32 *instruction, struct module *me) 330static int restore_r2(u32 *instruction, struct module *me)
331{ 331{
332 if (*instruction != PPC_NOP_INSTR) { 332 if (*instruction != PPC_INST_NOP) {
333 printk("%s: Expect noop after relocate, got %08x\n", 333 printk("%s: Expect noop after relocate, got %08x\n",
334 me->name, *instruction); 334 me->name, *instruction);
335 return 0; 335 return 0;
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c
index 3bb7d3dd28be..8bbc12d20f5c 100644
--- a/arch/powerpc/kernel/msi.c
+++ b/arch/powerpc/kernel/msi.c
@@ -9,6 +9,7 @@
9 9
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/msi.h> 11#include <linux/msi.h>
12#include <linux/pci.h>
12 13
13#include <asm/machdep.h> 14#include <asm/machdep.h>
14 15
@@ -19,6 +20,10 @@ int arch_msi_check_device(struct pci_dev* dev, int nvec, int type)
19 return -ENOSYS; 20 return -ENOSYS;
20 } 21 }
21 22
23 /* PowerPC doesn't support multiple MSI yet */
24 if (type == PCI_CAP_ID_MSI && nvec > 1)
25 return 1;
26
22 if (ppc_md.msi_check_device) { 27 if (ppc_md.msi_check_device) {
23 pr_debug("msi: Using platform check routine.\n"); 28 pr_debug("msi: Using platform check routine.\n");
24 return ppc_md.msi_check_device(dev, nvec, type); 29 return ppc_md.msi_check_device(dev, nvec, type);
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 3f37a6e62771..87df428e3588 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
76 return NULL; 76 return NULL;
77 77
78 dev->dma_mask = 0xffffffffUL; 78 dev->dma_mask = 0xffffffffUL;
79 dev->dev.coherent_dma_mask = DMA_32BIT_MASK; 79 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
80 80
81 dev->dev.bus = &of_platform_bus_type; 81 dev->dev.bus = &of_platform_bus_type;
82 82
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 0f4181272311..9c69e7e145c5 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -38,6 +38,7 @@
38#include <asm/eeh.h> 38#include <asm/eeh.h>
39 39
40static DEFINE_SPINLOCK(hose_spinlock); 40static DEFINE_SPINLOCK(hose_spinlock);
41LIST_HEAD(hose_list);
41 42
42/* XXX kill that some day ... */ 43/* XXX kill that some day ... */
43static int global_phb_number; /* Global phb counter */ 44static int global_phb_number; /* Global phb counter */
@@ -49,7 +50,7 @@ resource_size_t isa_mem_base;
49unsigned int ppc_pci_flags = 0; 50unsigned int ppc_pci_flags = 0;
50 51
51 52
52static struct dma_mapping_ops *pci_dma_ops; 53static struct dma_mapping_ops *pci_dma_ops = &dma_direct_ops;
53 54
54void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) 55void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
55{ 56{
@@ -113,19 +114,24 @@ void pcibios_free_controller(struct pci_controller *phb)
113 kfree(phb); 114 kfree(phb);
114} 115}
115 116
117static resource_size_t pcibios_io_size(const struct pci_controller *hose)
118{
119#ifdef CONFIG_PPC64
120 return hose->pci_io_size;
121#else
122 return hose->io_resource.end - hose->io_resource.start + 1;
123#endif
124}
125
116int pcibios_vaddr_is_ioport(void __iomem *address) 126int pcibios_vaddr_is_ioport(void __iomem *address)
117{ 127{
118 int ret = 0; 128 int ret = 0;
119 struct pci_controller *hose; 129 struct pci_controller *hose;
120 unsigned long size; 130 resource_size_t size;
121 131
122 spin_lock(&hose_spinlock); 132 spin_lock(&hose_spinlock);
123 list_for_each_entry(hose, &hose_list, list_node) { 133 list_for_each_entry(hose, &hose_list, list_node) {
124#ifdef CONFIG_PPC64 134 size = pcibios_io_size(hose);
125 size = hose->pci_io_size;
126#else
127 size = hose->io_resource.end - hose->io_resource.start + 1;
128#endif
129 if (address >= hose->io_base_virt && 135 if (address >= hose->io_base_virt &&
130 address < (hose->io_base_virt + size)) { 136 address < (hose->io_base_virt + size)) {
131 ret = 1; 137 ret = 1;
@@ -136,6 +142,29 @@ int pcibios_vaddr_is_ioport(void __iomem *address)
136 return ret; 142 return ret;
137} 143}
138 144
145unsigned long pci_address_to_pio(phys_addr_t address)
146{
147 struct pci_controller *hose;
148 resource_size_t size;
149 unsigned long ret = ~0;
150
151 spin_lock(&hose_spinlock);
152 list_for_each_entry(hose, &hose_list, list_node) {
153 size = pcibios_io_size(hose);
154 if (address >= hose->io_base_phys &&
155 address < (hose->io_base_phys + size)) {
156 unsigned long base =
157 (unsigned long)hose->io_base_virt - _IO_BASE;
158 ret = base + (address - hose->io_base_phys);
159 break;
160 }
161 }
162 spin_unlock(&hose_spinlock);
163
164 return ret;
165}
166EXPORT_SYMBOL_GPL(pci_address_to_pio);
167
139/* 168/*
140 * Return the domain number for this bus. 169 * Return the domain number for this bus.
141 */ 170 */
@@ -1453,7 +1482,7 @@ void __init pcibios_resource_survey(void)
1453 * we proceed to assigning things that were left unassigned 1482 * we proceed to assigning things that were left unassigned
1454 */ 1483 */
1455 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { 1484 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
1456 pr_debug("PCI: Assigning unassigned resouces...\n"); 1485 pr_debug("PCI: Assigning unassigned resources...\n");
1457 pci_assign_unassigned_resources(); 1486 pci_assign_unassigned_resources();
1458 } 1487 }
1459 1488
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 132cd80afa21..d473634e39e3 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -20,6 +20,7 @@
20#include <asm/prom.h> 20#include <asm/prom.h>
21#include <asm/sections.h> 21#include <asm/sections.h>
22#include <asm/pci-bridge.h> 22#include <asm/pci-bridge.h>
23#include <asm/ppc-pci.h>
23#include <asm/byteorder.h> 24#include <asm/byteorder.h>
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25#include <asm/machdep.h> 26#include <asm/machdep.h>
@@ -43,8 +44,6 @@ static u8* pci_to_OF_bus_map;
43 */ 44 */
44static int pci_assign_all_buses; 45static int pci_assign_all_buses;
45 46
46LIST_HEAD(hose_list);
47
48static int pci_bus_count; 47static int pci_bus_count;
49 48
50/* This will remain NULL for now, until isa-bridge.c is made common 49/* This will remain NULL for now, until isa-bridge.c is made common
@@ -219,16 +218,23 @@ scan_OF_pci_childs(struct device_node *parent, pci_OF_scan_iterator filter, void
219static struct device_node *scan_OF_for_pci_dev(struct device_node *parent, 218static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
220 unsigned int devfn) 219 unsigned int devfn)
221{ 220{
222 struct device_node *np; 221 struct device_node *np, *cnp;
223 const u32 *reg; 222 const u32 *reg;
224 unsigned int psize; 223 unsigned int psize;
225 224
226 for_each_child_of_node(parent, np) { 225 for_each_child_of_node(parent, np) {
227 reg = of_get_property(np, "reg", &psize); 226 reg = of_get_property(np, "reg", &psize);
228 if (reg == NULL || psize < 4) 227 if (reg && psize >= 4 && ((reg[0] >> 8) & 0xff) == devfn)
229 continue;
230 if (((reg[0] >> 8) & 0xff) == devfn)
231 return np; 228 return np;
229
230 /* Note: some OFs create a parent node "multifunc-device" as
231 * a fake root for all functions of a multi-function device,
232 * we go down them as well. */
233 if (!strcmp(np->name, "multifunc-device")) {
234 cnp = scan_OF_for_pci_dev(np, devfn);
235 if (cnp)
236 return cnp;
237 }
232 } 238 }
233 return NULL; 239 return NULL;
234} 240}
@@ -491,24 +497,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
491 return result; 497 return result;
492} 498}
493 499
494unsigned long pci_address_to_pio(phys_addr_t address)
495{
496 struct pci_controller *hose, *tmp;
497
498 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
499 unsigned int size = hose->io_resource.end -
500 hose->io_resource.start + 1;
501 if (address >= hose->io_base_phys &&
502 address < (hose->io_base_phys + size)) {
503 unsigned long base =
504 (unsigned long)hose->io_base_virt - _IO_BASE;
505 return base + (address - hose->io_base_phys);
506 }
507 }
508 return (unsigned int)-1;
509}
510EXPORT_SYMBOL(pci_address_to_pio);
511
512/* 500/*
513 * Null PCI config access functions, for the case when we can't 501 * Null PCI config access functions, for the case when we can't
514 * find a hose. 502 * find a hose.
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index ea8eda8c87cf..be574fc0d92f 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -43,8 +43,6 @@ unsigned long pci_probe_only = 1;
43unsigned long pci_io_base = ISA_IO_BASE; 43unsigned long pci_io_base = ISA_IO_BASE;
44EXPORT_SYMBOL(pci_io_base); 44EXPORT_SYMBOL(pci_io_base);
45 45
46LIST_HEAD(hose_list);
47
48static void fixup_broken_pcnet32(struct pci_dev* dev) 46static void fixup_broken_pcnet32(struct pci_dev* dev)
49{ 47{
50 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { 48 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
@@ -524,23 +522,6 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
524} 522}
525EXPORT_SYMBOL_GPL(pcibios_map_io_space); 523EXPORT_SYMBOL_GPL(pcibios_map_io_space);
526 524
527unsigned long pci_address_to_pio(phys_addr_t address)
528{
529 struct pci_controller *hose, *tmp;
530
531 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
532 if (address >= hose->io_base_phys &&
533 address < (hose->io_base_phys + hose->pci_io_size)) {
534 unsigned long base =
535 (unsigned long)hose->io_base_virt - _IO_BASE;
536 return base + (address - hose->io_base_phys);
537 }
538 }
539 return (unsigned int)-1;
540}
541EXPORT_SYMBOL_GPL(pci_address_to_pio);
542
543
544#define IOBASE_BRIDGE_NUMBER 0 525#define IOBASE_BRIDGE_NUMBER 0
545#define IOBASE_MEMORY 1 526#define IOBASE_MEMORY 1
546#define IOBASE_IO 2 527#define IOBASE_IO 2
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index fb7049c054c0..7b44a33f03c2 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -33,7 +33,10 @@
33#include <linux/mqueue.h> 33#include <linux/mqueue.h>
34#include <linux/hardirq.h> 34#include <linux/hardirq.h>
35#include <linux/utsname.h> 35#include <linux/utsname.h>
36#include <linux/ftrace.h>
36#include <linux/kernel_stat.h> 37#include <linux/kernel_stat.h>
38#include <linux/personality.h>
39#include <linux/random.h>
37 40
38#include <asm/pgtable.h> 41#include <asm/pgtable.h>
39#include <asm/uaccess.h> 42#include <asm/uaccess.h>
@@ -595,7 +598,7 @@ void prepare_to_copy(struct task_struct *tsk)
595/* 598/*
596 * Copy a thread.. 599 * Copy a thread..
597 */ 600 */
598int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 601int copy_thread(unsigned long clone_flags, unsigned long usp,
599 unsigned long unused, struct task_struct *p, 602 unsigned long unused, struct task_struct *p,
600 struct pt_regs *regs) 603 struct pt_regs *regs)
601{ 604{
@@ -1008,6 +1011,14 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
1008 unsigned long sp, ip, lr, newsp; 1011 unsigned long sp, ip, lr, newsp;
1009 int count = 0; 1012 int count = 0;
1010 int firstframe = 1; 1013 int firstframe = 1;
1014#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1015 int curr_frame = current->curr_ret_stack;
1016 extern void return_to_handler(void);
1017 unsigned long addr = (unsigned long)return_to_handler;
1018#ifdef CONFIG_PPC64
1019 addr = *(unsigned long*)addr;
1020#endif
1021#endif
1011 1022
1012 sp = (unsigned long) stack; 1023 sp = (unsigned long) stack;
1013 if (tsk == NULL) 1024 if (tsk == NULL)
@@ -1030,6 +1041,13 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
1030 ip = stack[STACK_FRAME_LR_SAVE]; 1041 ip = stack[STACK_FRAME_LR_SAVE];
1031 if (!firstframe || ip != lr) { 1042 if (!firstframe || ip != lr) {
1032 printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); 1043 printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip);
1044#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1045 if (ip == addr && curr_frame >= 0) {
1046 printk(" (%pS)",
1047 (void *)current->ret_stack[curr_frame].ret);
1048 curr_frame--;
1049 }
1050#endif
1033 if (firstframe) 1051 if (firstframe)
1034 printk(" (unreliable)"); 1052 printk(" (unreliable)");
1035 printk("\n"); 1053 printk("\n");
@@ -1122,3 +1140,43 @@ void thread_info_cache_init(void)
1122} 1140}
1123 1141
1124#endif /* THREAD_SHIFT < PAGE_SHIFT */ 1142#endif /* THREAD_SHIFT < PAGE_SHIFT */
1143
1144unsigned long arch_align_stack(unsigned long sp)
1145{
1146 if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
1147 sp -= get_random_int() & ~PAGE_MASK;
1148 return sp & ~0xf;
1149}
1150
1151static inline unsigned long brk_rnd(void)
1152{
1153 unsigned long rnd = 0;
1154
1155 /* 8MB for 32bit, 1GB for 64bit */
1156 if (is_32bit_task())
1157 rnd = (long)(get_random_int() % (1<<(23-PAGE_SHIFT)));
1158 else
1159 rnd = (long)(get_random_int() % (1<<(30-PAGE_SHIFT)));
1160
1161 return rnd << PAGE_SHIFT;
1162}
1163
1164unsigned long arch_randomize_brk(struct mm_struct *mm)
1165{
1166 unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd());
1167
1168 if (ret < mm->brk)
1169 return mm->brk;
1170
1171 return ret;
1172}
1173
1174unsigned long randomize_et_dyn(unsigned long base)
1175{
1176 unsigned long ret = PAGE_ALIGN(base + brk_rnd());
1177
1178 if (ret < base)
1179 return base;
1180
1181 return ret;
1182}
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index f00f83109ab3..5ec6a9e23933 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1075,11 +1075,6 @@ static void __init early_reserve_mem(void)
1075 DBG("reserving: %llx -> %llx\n", base, size); 1075 DBG("reserving: %llx -> %llx\n", base, size);
1076 lmb_reserve(base, size); 1076 lmb_reserve(base, size);
1077 } 1077 }
1078
1079#if 0
1080 DBG("memory reserved, lmbs :\n");
1081 lmb_dump_all();
1082#endif
1083} 1078}
1084 1079
1085#ifdef CONFIG_PHYP_DUMP 1080#ifdef CONFIG_PHYP_DUMP
@@ -1221,6 +1216,7 @@ void __init early_init_devtree(void *params)
1221 lmb_enforce_memory_limit(limit); 1216 lmb_enforce_memory_limit(limit);
1222 1217
1223 lmb_analyze(); 1218 lmb_analyze();
1219 lmb_dump_all();
1224 1220
1225 DBG("Phys. mem: %lx\n", lmb_phys_mem_size()); 1221 DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
1226 1222
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 7f1b33d5e30d..2f0e64b53642 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -614,7 +614,7 @@ static unsigned char ibm_architecture_vec[] = {
614 W(0xffffffff), /* virt_base */ 614 W(0xffffffff), /* virt_base */
615 W(0xffffffff), /* virt_size */ 615 W(0xffffffff), /* virt_size */
616 W(0xffffffff), /* load_base */ 616 W(0xffffffff), /* load_base */
617 W(64), /* 128MB min RMA */ 617 W(64), /* 64MB min RMA */
618 W(0xffffffff), /* full client load */ 618 W(0xffffffff), /* full client load */
619 0, /* min RMA percentage of total RAM */ 619 0, /* min RMA percentage of total RAM */
620 48, /* max log_2(hash table size) */ 620 48, /* max log_2(hash table size) */
@@ -732,15 +732,17 @@ static void __init prom_send_capabilities(void)
732 root = call_prom("open", 1, 1, ADDR("/")); 732 root = call_prom("open", 1, 1, ADDR("/"));
733 if (root != 0) { 733 if (root != 0) {
734 /* try calling the ibm,client-architecture-support method */ 734 /* try calling the ibm,client-architecture-support method */
735 prom_printf("Calling ibm,client-architecture...");
735 if (call_prom_ret("call-method", 3, 2, &ret, 736 if (call_prom_ret("call-method", 3, 2, &ret,
736 ADDR("ibm,client-architecture-support"), 737 ADDR("ibm,client-architecture-support"),
737 root, 738 root,
738 ADDR(ibm_architecture_vec)) == 0) { 739 ADDR(ibm_architecture_vec)) == 0) {
739 /* the call exists... */ 740 /* the call exists... */
740 if (ret) 741 if (ret)
741 prom_printf("WARNING: ibm,client-architecture" 742 prom_printf("\nWARNING: ibm,client-architecture"
742 "-support call FAILED!\n"); 743 "-support call FAILED!\n");
743 call_prom("close", 1, 0, root); 744 call_prom("close", 1, 0, root);
745 prom_printf(" done\n");
744 return; 746 return;
745 } 747 }
746 call_prom("close", 1, 0, root); 748 call_prom("close", 1, 0, root);
@@ -1083,7 +1085,7 @@ static void __init prom_instantiate_rtas(void)
1083 return; 1085 return;
1084 } 1086 }
1085 1087
1086 prom_printf("instantiating rtas at 0x%x ...", base); 1088 prom_printf("instantiating rtas at 0x%x...", base);
1087 1089
1088 if (call_prom_ret("call-method", 3, 2, &entry, 1090 if (call_prom_ret("call-method", 3, 2, &entry,
1089 ADDR("instantiate-rtas"), 1091 ADDR("instantiate-rtas"),
@@ -1495,7 +1497,7 @@ static int __init prom_find_machine_type(void)
1495 return PLATFORM_GENERIC; 1497 return PLATFORM_GENERIC;
1496 x = prom_getproplen(rtas, "ibm,hypertas-functions"); 1498 x = prom_getproplen(rtas, "ibm,hypertas-functions");
1497 if (x != PROM_ERROR) { 1499 if (x != PROM_ERROR) {
1498 prom_printf("Hypertas detected, assuming LPAR !\n"); 1500 prom_debug("Hypertas detected, assuming LPAR !\n");
1499 return PLATFORM_PSERIES_LPAR; 1501 return PLATFORM_PSERIES_LPAR;
1500 } 1502 }
1501 return PLATFORM_PSERIES; 1503 return PLATFORM_PSERIES;
@@ -1544,7 +1546,7 @@ static void __init prom_check_displays(void)
1544 }; 1546 };
1545 const unsigned char *clut; 1547 const unsigned char *clut;
1546 1548
1547 prom_printf("Looking for displays\n"); 1549 prom_debug("Looking for displays\n");
1548 for (node = 0; prom_next_node(&node); ) { 1550 for (node = 0; prom_next_node(&node); ) {
1549 memset(type, 0, sizeof(type)); 1551 memset(type, 0, sizeof(type));
1550 prom_getprop(node, "device_type", type, sizeof(type)); 1552 prom_getprop(node, "device_type", type, sizeof(type));
@@ -1562,7 +1564,7 @@ static void __init prom_check_displays(void)
1562 if (call_prom("package-to-path", 3, 1, node, path, 1564 if (call_prom("package-to-path", 3, 1, node, path,
1563 PROM_SCRATCH_SIZE-10) == PROM_ERROR) 1565 PROM_SCRATCH_SIZE-10) == PROM_ERROR)
1564 continue; 1566 continue;
1565 prom_printf("found display : %s, opening ... ", path); 1567 prom_printf("found display : %s, opening... ", path);
1566 1568
1567 ih = call_prom("open", 1, 1, path); 1569 ih = call_prom("open", 1, 1, path);
1568 if (ih == 0) { 1570 if (ih == 0) {
@@ -2283,6 +2285,8 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2283 */ 2285 */
2284 prom_init_stdout(); 2286 prom_init_stdout();
2285 2287
2288 prom_printf("Preparing to boot %s", RELOC(linux_banner));
2289
2286 /* 2290 /*
2287 * Get default machine type. At this point, we do not differentiate 2291 * Get default machine type. At this point, we do not differentiate
2288 * between pSeries SMP and pSeries LPAR 2292 * between pSeries SMP and pSeries LPAR
@@ -2385,7 +2389,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2385 /* 2389 /*
2386 * Now finally create the flattened device-tree 2390 * Now finally create the flattened device-tree
2387 */ 2391 */
2388 prom_printf("copying OF device tree ...\n"); 2392 prom_printf("copying OF device tree...\n");
2389 flatten_device_tree(); 2393 flatten_device_tree();
2390 2394
2391 /* 2395 /*
@@ -2400,7 +2404,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2400 * Call OF "quiesce" method to shut down pending DMA's from 2404 * Call OF "quiesce" method to shut down pending DMA's from
2401 * devices etc... 2405 * devices etc...
2402 */ 2406 */
2403 prom_printf("Calling quiesce ...\n"); 2407 prom_printf("Calling quiesce...\n");
2404 call_prom("quiesce", 0, 0); 2408 call_prom("quiesce", 0, 0);
2405 2409
2406 /* 2410 /*
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index ea3a2ec03ffa..1ac136b128f0 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -20,7 +20,7 @@ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
20_end enter_prom memcpy memset reloc_offset __secondary_hold 20_end enter_prom memcpy memset reloc_offset __secondary_hold
21__secondary_hold_acknowledge __secondary_hold_spinloop __start 21__secondary_hold_acknowledge __secondary_hold_spinloop __start
22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
23reloc_got2 kernstart_addr memstart_addr" 23reloc_got2 kernstart_addr memstart_addr linux_banner"
24 24
25NM="$1" 25NM="$1"
26OBJ="$2" 26OBJ="$2"
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 197d49c790ad..297632cba047 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -67,7 +67,8 @@ static long compat_ptrace_old(struct task_struct *child, long request,
67/* Macros to workout the correct index for the FPR in the thread struct */ 67/* Macros to workout the correct index for the FPR in the thread struct */
68#define FPRNUMBER(i) (((i) - PT_FPR0) >> 1) 68#define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
69#define FPRHALF(i) (((i) - PT_FPR0) & 1) 69#define FPRHALF(i) (((i) - PT_FPR0) & 1)
70#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i) 70#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) * 2 + FPRHALF(i)
71#define FPRINDEX_3264(i) (TS_FPRWIDTH * ((i) - PT_FPR0))
71 72
72long compat_arch_ptrace(struct task_struct *child, compat_long_t request, 73long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
73 compat_ulong_t caddr, compat_ulong_t cdata) 74 compat_ulong_t caddr, compat_ulong_t cdata)
@@ -168,8 +169,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
168 CHECK_FULL_REGS(child->thread.regs); 169 CHECK_FULL_REGS(child->thread.regs);
169 if (numReg >= PT_FPR0) { 170 if (numReg >= PT_FPR0) {
170 flush_fp_to_thread(child); 171 flush_fp_to_thread(child);
171 tmp = ((unsigned long int *)child->thread.fpr) 172 /* get 64 bit FPR */
172 [FPRINDEX(numReg)]; 173 tmp = ((u64 *)child->thread.fpr)
174 [FPRINDEX_3264(numReg)];
173 } else { /* register within PT_REGS struct */ 175 } else { /* register within PT_REGS struct */
174 tmp = ptrace_get_reg(child, numReg); 176 tmp = ptrace_get_reg(child, numReg);
175 } 177 }
@@ -262,8 +264,13 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
262 freg = (freg & 0xfffffffful) | (data << 32); 264 freg = (freg & 0xfffffffful) | (data << 32);
263 ret = ptrace_put_reg(child, numReg, freg); 265 ret = ptrace_put_reg(child, numReg, freg);
264 } else { 266 } else {
267 u64 *tmp;
265 flush_fp_to_thread(child); 268 flush_fp_to_thread(child);
266 ((unsigned int *)child->thread.regs)[index] = data; 269 /* get 64 bit FPR ... */
270 tmp = &(((u64 *)child->thread.fpr)
271 [FPRINDEX_3264(numReg)]);
272 /* ... write the 32 bit part we want */
273 ((u32 *)tmp)[index % 2] = data;
267 ret = 0; 274 ret = 0;
268 } 275 }
269 break; 276 break;
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index fdfe14c4bdef..ee4c7609b649 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -46,6 +46,7 @@ EXPORT_SYMBOL(rtas);
46 46
47struct rtas_suspend_me_data { 47struct rtas_suspend_me_data {
48 atomic_t working; /* number of cpus accessing this struct */ 48 atomic_t working; /* number of cpus accessing this struct */
49 atomic_t done;
49 int token; /* ibm,suspend-me */ 50 int token; /* ibm,suspend-me */
50 int error; 51 int error;
51 struct completion *complete; /* wait on this until working == 0 */ 52 struct completion *complete; /* wait on this until working == 0 */
@@ -689,7 +690,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
689#ifdef CONFIG_PPC_PSERIES 690#ifdef CONFIG_PPC_PSERIES
690static void rtas_percpu_suspend_me(void *info) 691static void rtas_percpu_suspend_me(void *info)
691{ 692{
692 long rc; 693 long rc = H_SUCCESS;
693 unsigned long msr_save; 694 unsigned long msr_save;
694 int cpu; 695 int cpu;
695 struct rtas_suspend_me_data *data = 696 struct rtas_suspend_me_data *data =
@@ -701,7 +702,8 @@ static void rtas_percpu_suspend_me(void *info)
701 msr_save = mfmsr(); 702 msr_save = mfmsr();
702 mtmsr(msr_save & ~(MSR_EE)); 703 mtmsr(msr_save & ~(MSR_EE));
703 704
704 rc = plpar_hcall_norets(H_JOIN); 705 while (rc == H_SUCCESS && !atomic_read(&data->done))
706 rc = plpar_hcall_norets(H_JOIN);
705 707
706 mtmsr(msr_save); 708 mtmsr(msr_save);
707 709
@@ -724,6 +726,9 @@ static void rtas_percpu_suspend_me(void *info)
724 smp_processor_id(), rc); 726 smp_processor_id(), rc);
725 data->error = rc; 727 data->error = rc;
726 } 728 }
729
730 atomic_set(&data->done, 1);
731
727 /* This cpu did the suspend or got an error; in either case, 732 /* This cpu did the suspend or got an error; in either case,
728 * we need to prod all other other cpus out of join state. 733 * we need to prod all other other cpus out of join state.
729 * Extra prods are harmless. 734 * Extra prods are harmless.
@@ -766,6 +771,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
766 } 771 }
767 772
768 atomic_set(&data.working, 0); 773 atomic_set(&data.working, 0);
774 atomic_set(&data.done, 0);
769 data.token = rtas_token("ibm,suspend-me"); 775 data.token = rtas_token("ibm,suspend-me");
770 data.error = 0; 776 data.error = 0;
771 data.complete = &done; 777 data.complete = &done;
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 149cb112cd1a..13011a96a977 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -669,7 +669,6 @@ static void remove_flash_pde(struct proc_dir_entry *dp)
669{ 669{
670 if (dp) { 670 if (dp) {
671 kfree(dp->data); 671 kfree(dp->data);
672 dp->owner = NULL;
673 remove_proc_entry(dp->name, dp->parent); 672 remove_proc_entry(dp->name, dp->parent);
674 } 673 }
675} 674}
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 705fc4bf3800..02fed27af7f6 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -35,6 +35,7 @@
35#include <linux/debugfs.h> 35#include <linux/debugfs.h>
36#include <linux/percpu.h> 36#include <linux/percpu.h>
37#include <linux/lmb.h> 37#include <linux/lmb.h>
38#include <linux/of_platform.h>
38#include <asm/io.h> 39#include <asm/io.h>
39#include <asm/prom.h> 40#include <asm/prom.h>
40#include <asm/processor.h> 41#include <asm/processor.h>
@@ -669,3 +670,37 @@ static int powerpc_debugfs_init(void)
669} 670}
670arch_initcall(powerpc_debugfs_init); 671arch_initcall(powerpc_debugfs_init);
671#endif 672#endif
673
674static int ppc_dflt_bus_notify(struct notifier_block *nb,
675 unsigned long action, void *data)
676{
677 struct device *dev = data;
678
679 /* We are only intereted in device addition */
680 if (action != BUS_NOTIFY_ADD_DEVICE)
681 return 0;
682
683 set_dma_ops(dev, &dma_direct_ops);
684
685 return NOTIFY_DONE;
686}
687
688static struct notifier_block ppc_dflt_plat_bus_notifier = {
689 .notifier_call = ppc_dflt_bus_notify,
690 .priority = INT_MAX,
691};
692
693static struct notifier_block ppc_dflt_of_bus_notifier = {
694 .notifier_call = ppc_dflt_bus_notify,
695 .priority = INT_MAX,
696};
697
698static int __init setup_bus_notifier(void)
699{
700 bus_register_notifier(&platform_bus_type, &ppc_dflt_plat_bus_notifier);
701 bus_register_notifier(&of_platform_bus_type, &ppc_dflt_of_bus_notifier);
702
703 return 0;
704}
705
706arch_initcall(setup_bus_notifier);
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 2d34196bba8c..c410c606955d 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -202,8 +202,6 @@ void __init early_setup(unsigned long dt_ptr)
202 202
203 /* Fix up paca fields required for the boot cpu */ 203 /* Fix up paca fields required for the boot cpu */
204 get_paca()->cpu_start = 1; 204 get_paca()->cpu_start = 1;
205 get_paca()->stab_real = __pa((u64)&initial_stab);
206 get_paca()->stab_addr = (u64)&initial_stab;
207 205
208 /* Probe the machine type */ 206 /* Probe the machine type */
209 probe_machine(); 207 probe_machine();
@@ -212,20 +210,8 @@ void __init early_setup(unsigned long dt_ptr)
212 210
213 DBG("Found, Initializing memory management...\n"); 211 DBG("Found, Initializing memory management...\n");
214 212
215 /* 213 /* Initialize the hash table or TLB handling */
216 * Initialize the MMU Hash table and create the linear mapping 214 early_init_mmu();
217 * of memory. Has to be done before stab/slb initialization as
218 * this is currently where the page size encoding is obtained
219 */
220 htab_initialize();
221
222 /*
223 * Initialize stab / SLB management except on iSeries
224 */
225 if (cpu_has_feature(CPU_FTR_SLB))
226 slb_initialize();
227 else if (!firmware_has_feature(FW_FEATURE_ISERIES))
228 stab_initialize(get_paca()->stab_real);
229 215
230 DBG(" <- early_setup()\n"); 216 DBG(" <- early_setup()\n");
231} 217}
@@ -233,22 +219,11 @@ void __init early_setup(unsigned long dt_ptr)
233#ifdef CONFIG_SMP 219#ifdef CONFIG_SMP
234void early_setup_secondary(void) 220void early_setup_secondary(void)
235{ 221{
236 struct paca_struct *lpaca = get_paca();
237
238 /* Mark interrupts enabled in PACA */ 222 /* Mark interrupts enabled in PACA */
239 lpaca->soft_enabled = 0; 223 get_paca()->soft_enabled = 0;
240 224
241 /* Initialize hash table for that CPU */ 225 /* Initialize the hash table or TLB handling */
242 htab_initialize_secondary(); 226 early_init_mmu_secondary();
243
244 /* Initialize STAB/SLB. We use a virtual address as it works
245 * in real mode on pSeries and we want a virutal address on
246 * iSeries anyway
247 */
248 if (cpu_has_feature(CPU_FTR_SLB))
249 slb_initialize();
250 else
251 stab_initialize(lpaca->stab_addr);
252} 227}
253 228
254#endif /* CONFIG_SMP */ 229#endif /* CONFIG_SMP */
@@ -578,13 +553,6 @@ void ppc64_boot_msg(unsigned int src, const char *msg)
578 printk("[boot]%04x %s\n", src, msg); 553 printk("[boot]%04x %s\n", src, msg);
579} 554}
580 555
581/* Print a termination message (print only -- does not stop the kernel) */
582void ppc64_terminate_msg(unsigned int src, const char *msg)
583{
584 ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_TERM_MESSAGE|src, msg);
585 printk("[terminate]%04x %s\n", src, msg);
586}
587
588void cpu_die(void) 556void cpu_die(void)
589{ 557{
590 if (ppc_md.cpu_die) 558 if (ppc_md.cpu_die)
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
index a54405ebd7b0..00b5078da9a3 100644
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -26,12 +26,12 @@ int show_unhandled_signals = 0;
26 * Allocate space for the signal frame 26 * Allocate space for the signal frame
27 */ 27 */
28void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, 28void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
29 size_t frame_size) 29 size_t frame_size, int is_32)
30{ 30{
31 unsigned long oldsp, newsp; 31 unsigned long oldsp, newsp;
32 32
33 /* Default to using normal stack */ 33 /* Default to using normal stack */
34 oldsp = regs->gpr[1]; 34 oldsp = get_clean_sp(regs, is_32);
35 35
36 /* Check for alt stack */ 36 /* Check for alt stack */
37 if ((ka->sa.sa_flags & SA_ONSTACK) && 37 if ((ka->sa.sa_flags & SA_ONSTACK) &&
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
index b427bf8e1d8f..6c0ddfc0603e 100644
--- a/arch/powerpc/kernel/signal.h
+++ b/arch/powerpc/kernel/signal.h
@@ -15,7 +15,7 @@
15extern void do_signal(struct pt_regs *regs, unsigned long thread_info_flags); 15extern void do_signal(struct pt_regs *regs, unsigned long thread_info_flags);
16 16
17extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, 17extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
18 size_t frame_size); 18 size_t frame_size, int is_32);
19extern void restore_sigmask(sigset_t *set); 19extern void restore_sigmask(sigset_t *set);
20 20
21extern int handle_signal32(unsigned long sig, struct k_sigaction *ka, 21extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
@@ -39,22 +39,12 @@ extern unsigned long copy_vsx_from_user(struct task_struct *task,
39 39
40#ifdef CONFIG_PPC64 40#ifdef CONFIG_PPC64
41 41
42static inline int is_32bit_task(void)
43{
44 return test_thread_flag(TIF_32BIT);
45}
46
47extern int handle_rt_signal64(int signr, struct k_sigaction *ka, 42extern int handle_rt_signal64(int signr, struct k_sigaction *ka,
48 siginfo_t *info, sigset_t *set, 43 siginfo_t *info, sigset_t *set,
49 struct pt_regs *regs); 44 struct pt_regs *regs);
50 45
51#else /* CONFIG_PPC64 */ 46#else /* CONFIG_PPC64 */
52 47
53static inline int is_32bit_task(void)
54{
55 return 1;
56}
57
58static inline int handle_rt_signal64(int signr, struct k_sigaction *ka, 48static inline int handle_rt_signal64(int signr, struct k_sigaction *ka,
59 siginfo_t *info, sigset_t *set, 49 siginfo_t *info, sigset_t *set,
60 struct pt_regs *regs) 50 struct pt_regs *regs)
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index b13abf305996..d670429a1608 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -836,7 +836,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
836 836
837 /* Set up Signal Frame */ 837 /* Set up Signal Frame */
838 /* Put a Real Time Context onto stack */ 838 /* Put a Real Time Context onto stack */
839 rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf)); 839 rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf), 1);
840 addr = rt_sf; 840 addr = rt_sf;
841 if (unlikely(rt_sf == NULL)) 841 if (unlikely(rt_sf == NULL))
842 goto badframe; 842 goto badframe;
@@ -1182,7 +1182,7 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,
1182 unsigned long newsp = 0; 1182 unsigned long newsp = 0;
1183 1183
1184 /* Set up Signal Frame */ 1184 /* Set up Signal Frame */
1185 frame = get_sigframe(ka, regs, sizeof(*frame)); 1185 frame = get_sigframe(ka, regs, sizeof(*frame), 1);
1186 if (unlikely(frame == NULL)) 1186 if (unlikely(frame == NULL))
1187 goto badframe; 1187 goto badframe;
1188 sc = (struct sigcontext __user *) &frame->sctx; 1188 sc = (struct sigcontext __user *) &frame->sctx;
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index e132891d3cea..2fe6fc64b614 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -402,7 +402,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
402 unsigned long newsp = 0; 402 unsigned long newsp = 0;
403 long err = 0; 403 long err = 0;
404 404
405 frame = get_sigframe(ka, regs, sizeof(*frame)); 405 frame = get_sigframe(ka, regs, sizeof(*frame), 0);
406 if (unlikely(frame == NULL)) 406 if (unlikely(frame == NULL))
407 goto badframe; 407 goto badframe;
408 408
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 4a2ee08af6a7..f41aec85aa49 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -134,44 +134,23 @@ void ppc_enable_pmcs(void)
134} 134}
135EXPORT_SYMBOL(ppc_enable_pmcs); 135EXPORT_SYMBOL(ppc_enable_pmcs);
136 136
137#if defined(CONFIG_6xx) || defined(CONFIG_PPC64)
138/* XXX convert to rusty's on_one_cpu */
139static unsigned long run_on_cpu(unsigned long cpu,
140 unsigned long (*func)(unsigned long),
141 unsigned long arg)
142{
143 cpumask_t old_affinity = current->cpus_allowed;
144 unsigned long ret;
145
146 /* should return -EINVAL to userspace */
147 if (set_cpus_allowed(current, cpumask_of_cpu(cpu)))
148 return 0;
149
150 ret = func(arg);
151
152 set_cpus_allowed(current, old_affinity);
153
154 return ret;
155}
156#endif
157
158#define SYSFS_PMCSETUP(NAME, ADDRESS) \ 137#define SYSFS_PMCSETUP(NAME, ADDRESS) \
159static unsigned long read_##NAME(unsigned long junk) \ 138static void read_##NAME(void *val) \
160{ \ 139{ \
161 return mfspr(ADDRESS); \ 140 *(unsigned long *)val = mfspr(ADDRESS); \
162} \ 141} \
163static unsigned long write_##NAME(unsigned long val) \ 142static void write_##NAME(void *val) \
164{ \ 143{ \
165 ppc_enable_pmcs(); \ 144 ppc_enable_pmcs(); \
166 mtspr(ADDRESS, val); \ 145 mtspr(ADDRESS, *(unsigned long *)val); \
167 return 0; \
168} \ 146} \
169static ssize_t show_##NAME(struct sys_device *dev, \ 147static ssize_t show_##NAME(struct sys_device *dev, \
170 struct sysdev_attribute *attr, \ 148 struct sysdev_attribute *attr, \
171 char *buf) \ 149 char *buf) \
172{ \ 150{ \
173 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ 151 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
174 unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ 152 unsigned long val; \
153 smp_call_function_single(cpu->sysdev.id, read_##NAME, &val, 1); \
175 return sprintf(buf, "%lx\n", val); \ 154 return sprintf(buf, "%lx\n", val); \
176} \ 155} \
177static ssize_t __used \ 156static ssize_t __used \
@@ -183,7 +162,7 @@ static ssize_t __used \
183 int ret = sscanf(buf, "%lx", &val); \ 162 int ret = sscanf(buf, "%lx", &val); \
184 if (ret != 1) \ 163 if (ret != 1) \
185 return -EINVAL; \ 164 return -EINVAL; \
186 run_on_cpu(cpu->sysdev.id, write_##NAME, val); \ 165 smp_call_function_single(cpu->sysdev.id, write_##NAME, &val, 1); \
187 return count; \ 166 return count; \
188} 167}
189 168
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c9564031a2a9..926ea864e34f 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividend_low,
1127 dr->result_low = ((u64)y << 32) + z; 1127 dr->result_low = ((u64)y << 32) + z;
1128 1128
1129} 1129}
1130
1131static int __init rtc_init(void)
1132{
1133 struct platform_device *pdev;
1134
1135 if (!ppc_md.get_rtc_time)
1136 return -ENODEV;
1137
1138 pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
1139 if (IS_ERR(pdev))
1140 return PTR_ERR(pdev);
1141
1142 return 0;
1143}
1144
1145module_init(rtc_init);
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 5457e9575685..678fbff0d206 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -52,6 +52,10 @@
52#include <asm/processor.h> 52#include <asm/processor.h>
53#endif 53#endif
54#include <asm/kexec.h> 54#include <asm/kexec.h>
55#include <asm/ppc-opcode.h>
56#ifdef CONFIG_FSL_BOOKE
57#include <asm/dbell.h>
58#endif
55 59
56#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 60#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
57int (*__debugger)(struct pt_regs *regs); 61int (*__debugger)(struct pt_regs *regs);
@@ -637,29 +641,6 @@ static void parse_fpe(struct pt_regs *regs)
637 * bits is faster and easier. 641 * bits is faster and easier.
638 * 642 *
639 */ 643 */
640#define INST_MFSPR_PVR 0x7c1f42a6
641#define INST_MFSPR_PVR_MASK 0xfc1fffff
642
643#define INST_DCBA 0x7c0005ec
644#define INST_DCBA_MASK 0xfc0007fe
645
646#define INST_MCRXR 0x7c000400
647#define INST_MCRXR_MASK 0xfc0007fe
648
649#define INST_STRING 0x7c00042a
650#define INST_STRING_MASK 0xfc0007fe
651#define INST_STRING_GEN_MASK 0xfc00067e
652#define INST_LSWI 0x7c0004aa
653#define INST_LSWX 0x7c00042a
654#define INST_STSWI 0x7c0005aa
655#define INST_STSWX 0x7c00052a
656
657#define INST_POPCNTB 0x7c0000f4
658#define INST_POPCNTB_MASK 0xfc0007fe
659
660#define INST_ISEL 0x7c00001e
661#define INST_ISEL_MASK 0xfc00003e
662
663static int emulate_string_inst(struct pt_regs *regs, u32 instword) 644static int emulate_string_inst(struct pt_regs *regs, u32 instword)
664{ 645{
665 u8 rT = (instword >> 21) & 0x1f; 646 u8 rT = (instword >> 21) & 0x1f;
@@ -670,20 +651,20 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword)
670 int pos = 0; 651 int pos = 0;
671 652
672 /* Early out if we are an invalid form of lswx */ 653 /* Early out if we are an invalid form of lswx */
673 if ((instword & INST_STRING_MASK) == INST_LSWX) 654 if ((instword & PPC_INST_STRING_MASK) == PPC_INST_LSWX)
674 if ((rT == rA) || (rT == NB_RB)) 655 if ((rT == rA) || (rT == NB_RB))
675 return -EINVAL; 656 return -EINVAL;
676 657
677 EA = (rA == 0) ? 0 : regs->gpr[rA]; 658 EA = (rA == 0) ? 0 : regs->gpr[rA];
678 659
679 switch (instword & INST_STRING_MASK) { 660 switch (instword & PPC_INST_STRING_MASK) {
680 case INST_LSWX: 661 case PPC_INST_LSWX:
681 case INST_STSWX: 662 case PPC_INST_STSWX:
682 EA += NB_RB; 663 EA += NB_RB;
683 num_bytes = regs->xer & 0x7f; 664 num_bytes = regs->xer & 0x7f;
684 break; 665 break;
685 case INST_LSWI: 666 case PPC_INST_LSWI:
686 case INST_STSWI: 667 case PPC_INST_STSWI:
687 num_bytes = (NB_RB == 0) ? 32 : NB_RB; 668 num_bytes = (NB_RB == 0) ? 32 : NB_RB;
688 break; 669 break;
689 default: 670 default:
@@ -695,9 +676,9 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword)
695 u8 val; 676 u8 val;
696 u32 shift = 8 * (3 - (pos & 0x3)); 677 u32 shift = 8 * (3 - (pos & 0x3));
697 678
698 switch ((instword & INST_STRING_MASK)) { 679 switch ((instword & PPC_INST_STRING_MASK)) {
699 case INST_LSWX: 680 case PPC_INST_LSWX:
700 case INST_LSWI: 681 case PPC_INST_LSWI:
701 if (get_user(val, (u8 __user *)EA)) 682 if (get_user(val, (u8 __user *)EA))
702 return -EFAULT; 683 return -EFAULT;
703 /* first time updating this reg, 684 /* first time updating this reg,
@@ -706,8 +687,8 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword)
706 regs->gpr[rT] = 0; 687 regs->gpr[rT] = 0;
707 regs->gpr[rT] |= val << shift; 688 regs->gpr[rT] |= val << shift;
708 break; 689 break;
709 case INST_STSWI: 690 case PPC_INST_STSWI:
710 case INST_STSWX: 691 case PPC_INST_STSWX:
711 val = regs->gpr[rT] >> shift; 692 val = regs->gpr[rT] >> shift;
712 if (put_user(val, (u8 __user *)EA)) 693 if (put_user(val, (u8 __user *)EA))
713 return -EFAULT; 694 return -EFAULT;
@@ -775,18 +756,18 @@ static int emulate_instruction(struct pt_regs *regs)
775 return -EFAULT; 756 return -EFAULT;
776 757
777 /* Emulate the mfspr rD, PVR. */ 758 /* Emulate the mfspr rD, PVR. */
778 if ((instword & INST_MFSPR_PVR_MASK) == INST_MFSPR_PVR) { 759 if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) {
779 rd = (instword >> 21) & 0x1f; 760 rd = (instword >> 21) & 0x1f;
780 regs->gpr[rd] = mfspr(SPRN_PVR); 761 regs->gpr[rd] = mfspr(SPRN_PVR);
781 return 0; 762 return 0;
782 } 763 }
783 764
784 /* Emulating the dcba insn is just a no-op. */ 765 /* Emulating the dcba insn is just a no-op. */
785 if ((instword & INST_DCBA_MASK) == INST_DCBA) 766 if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA)
786 return 0; 767 return 0;
787 768
788 /* Emulate the mcrxr insn. */ 769 /* Emulate the mcrxr insn. */
789 if ((instword & INST_MCRXR_MASK) == INST_MCRXR) { 770 if ((instword & PPC_INST_MCRXR_MASK) == PPC_INST_MCRXR) {
790 int shift = (instword >> 21) & 0x1c; 771 int shift = (instword >> 21) & 0x1c;
791 unsigned long msk = 0xf0000000UL >> shift; 772 unsigned long msk = 0xf0000000UL >> shift;
792 773
@@ -796,16 +777,16 @@ static int emulate_instruction(struct pt_regs *regs)
796 } 777 }
797 778
798 /* Emulate load/store string insn. */ 779 /* Emulate load/store string insn. */
799 if ((instword & INST_STRING_GEN_MASK) == INST_STRING) 780 if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING)
800 return emulate_string_inst(regs, instword); 781 return emulate_string_inst(regs, instword);
801 782
802 /* Emulate the popcntb (Population Count Bytes) instruction. */ 783 /* Emulate the popcntb (Population Count Bytes) instruction. */
803 if ((instword & INST_POPCNTB_MASK) == INST_POPCNTB) { 784 if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) {
804 return emulate_popcntb_inst(regs, instword); 785 return emulate_popcntb_inst(regs, instword);
805 } 786 }
806 787
807 /* Emulate isel (Integer Select) instruction */ 788 /* Emulate isel (Integer Select) instruction */
808 if ((instword & INST_ISEL_MASK) == INST_ISEL) { 789 if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) {
809 return emulate_isel(regs, instword); 790 return emulate_isel(regs, instword);
810 } 791 }
811 792
@@ -1144,6 +1125,24 @@ void vsx_assist_exception(struct pt_regs *regs)
1144#endif /* CONFIG_VSX */ 1125#endif /* CONFIG_VSX */
1145 1126
1146#ifdef CONFIG_FSL_BOOKE 1127#ifdef CONFIG_FSL_BOOKE
1128
1129void doorbell_exception(struct pt_regs *regs)
1130{
1131#ifdef CONFIG_SMP
1132 int cpu = smp_processor_id();
1133 int msg;
1134
1135 if (num_online_cpus() < 2)
1136 return;
1137
1138 for (msg = 0; msg < 4; msg++)
1139 if (test_and_clear_bit(msg, &dbell_smp_message[cpu]))
1140 smp_message_recv(msg);
1141#else
1142 printk(KERN_WARNING "Received doorbell on non-smp system\n");
1143#endif
1144}
1145
1147void CacheLockingException(struct pt_regs *regs, unsigned long address, 1146void CacheLockingException(struct pt_regs *regs, unsigned long address,
1148 unsigned long error_code) 1147 unsigned long error_code)
1149{ 1148{
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 7d6c9bb8c77f..fc9af47e2128 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -18,6 +18,7 @@
18#include <asm/udbg.h> 18#include <asm/udbg.h>
19 19
20void (*udbg_putc)(char c); 20void (*udbg_putc)(char c);
21void (*udbg_flush)(void);
21int (*udbg_getc)(void); 22int (*udbg_getc)(void);
22int (*udbg_getc_poll)(void); 23int (*udbg_getc_poll)(void);
23 24
@@ -76,6 +77,9 @@ void udbg_puts(const char *s)
76 while ((c = *s++) != '\0') 77 while ((c = *s++) != '\0')
77 udbg_putc(c); 78 udbg_putc(c);
78 } 79 }
80
81 if (udbg_flush)
82 udbg_flush();
79 } 83 }
80#if 0 84#if 0
81 else { 85 else {
@@ -98,6 +102,9 @@ int udbg_write(const char *s, int n)
98 } 102 }
99 } 103 }
100 104
105 if (udbg_flush)
106 udbg_flush();
107
101 return n - remain; 108 return n - remain;
102} 109}
103 110
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 7b7da8cfd5e8..0362a891e54e 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -48,14 +48,21 @@ struct NS16550 {
48 48
49static struct NS16550 __iomem *udbg_comport; 49static struct NS16550 __iomem *udbg_comport;
50 50
51static void udbg_550_putc(char c) 51static void udbg_550_flush(void)
52{ 52{
53 if (udbg_comport) { 53 if (udbg_comport) {
54 while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0) 54 while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0)
55 /* wait for idle */; 55 /* wait for idle */;
56 out_8(&udbg_comport->thr, c); 56 }
57}
58
59static void udbg_550_putc(char c)
60{
61 if (udbg_comport) {
57 if (c == '\n') 62 if (c == '\n')
58 udbg_550_putc('\r'); 63 udbg_550_putc('\r');
64 udbg_550_flush();
65 out_8(&udbg_comport->thr, c);
59 } 66 }
60} 67}
61 68
@@ -108,6 +115,7 @@ void udbg_init_uart(void __iomem *comport, unsigned int speed,
108 /* Clear & enable FIFOs */ 115 /* Clear & enable FIFOs */
109 out_8(&udbg_comport->fcr ,0x07); 116 out_8(&udbg_comport->fcr ,0x07);
110 udbg_putc = udbg_550_putc; 117 udbg_putc = udbg_550_putc;
118 udbg_flush = udbg_550_flush;
111 udbg_getc = udbg_550_getc; 119 udbg_getc = udbg_550_getc;
112 udbg_getc_poll = udbg_550_getc_poll; 120 udbg_getc_poll = udbg_550_getc_poll;
113 } 121 }
@@ -149,14 +157,21 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
149} 157}
150 158
151#ifdef CONFIG_PPC_MAPLE 159#ifdef CONFIG_PPC_MAPLE
152void udbg_maple_real_putc(char c) 160void udbg_maple_real_flush(void)
153{ 161{
154 if (udbg_comport) { 162 if (udbg_comport) {
155 while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) 163 while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
156 /* wait for idle */; 164 /* wait for idle */;
157 real_writeb(c, &udbg_comport->thr); eieio(); 165 }
166}
167
168void udbg_maple_real_putc(char c)
169{
170 if (udbg_comport) {
158 if (c == '\n') 171 if (c == '\n')
159 udbg_maple_real_putc('\r'); 172 udbg_maple_real_putc('\r');
173 udbg_maple_real_flush();
174 real_writeb(c, &udbg_comport->thr); eieio();
160 } 175 }
161} 176}
162 177
@@ -165,20 +180,28 @@ void __init udbg_init_maple_realmode(void)
165 udbg_comport = (struct NS16550 __iomem *)0xf40003f8; 180 udbg_comport = (struct NS16550 __iomem *)0xf40003f8;
166 181
167 udbg_putc = udbg_maple_real_putc; 182 udbg_putc = udbg_maple_real_putc;
183 udbg_flush = udbg_maple_real_flush;
168 udbg_getc = NULL; 184 udbg_getc = NULL;
169 udbg_getc_poll = NULL; 185 udbg_getc_poll = NULL;
170} 186}
171#endif /* CONFIG_PPC_MAPLE */ 187#endif /* CONFIG_PPC_MAPLE */
172 188
173#ifdef CONFIG_PPC_PASEMI 189#ifdef CONFIG_PPC_PASEMI
174void udbg_pas_real_putc(char c) 190void udbg_pas_real_flush(void)
175{ 191{
176 if (udbg_comport) { 192 if (udbg_comport) {
177 while ((real_205_readb(&udbg_comport->lsr) & LSR_THRE) == 0) 193 while ((real_205_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
178 /* wait for idle */; 194 /* wait for idle */;
179 real_205_writeb(c, &udbg_comport->thr); eieio(); 195 }
196}
197
198void udbg_pas_real_putc(char c)
199{
200 if (udbg_comport) {
180 if (c == '\n') 201 if (c == '\n')
181 udbg_pas_real_putc('\r'); 202 udbg_pas_real_putc('\r');
203 udbg_pas_real_flush();
204 real_205_writeb(c, &udbg_comport->thr); eieio();
182 } 205 }
183} 206}
184 207
@@ -187,6 +210,7 @@ void udbg_init_pas_realmode(void)
187 udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL; 210 udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL;
188 211
189 udbg_putc = udbg_pas_real_putc; 212 udbg_putc = udbg_pas_real_putc;
213 udbg_flush = udbg_pas_real_flush;
190 udbg_getc = NULL; 214 udbg_getc = NULL;
191 udbg_getc_poll = NULL; 215 udbg_getc_poll = NULL;
192} 216}
@@ -195,14 +219,21 @@ void udbg_init_pas_realmode(void)
195#ifdef CONFIG_PPC_EARLY_DEBUG_44x 219#ifdef CONFIG_PPC_EARLY_DEBUG_44x
196#include <platforms/44x/44x.h> 220#include <platforms/44x/44x.h>
197 221
198static void udbg_44x_as1_putc(char c) 222static int udbg_44x_as1_flush(void)
199{ 223{
200 if (udbg_comport) { 224 if (udbg_comport) {
201 while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0) 225 while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
202 /* wait for idle */; 226 /* wait for idle */;
203 as1_writeb(c, &udbg_comport->thr); eieio(); 227 }
228}
229
230static void udbg_44x_as1_putc(char c)
231{
232 if (udbg_comport) {
204 if (c == '\n') 233 if (c == '\n')
205 udbg_44x_as1_putc('\r'); 234 udbg_44x_as1_putc('\r');
235 udbg_44x_as1_flush();
236 as1_writeb(c, &udbg_comport->thr); eieio();
206 } 237 }
207} 238}
208 239
@@ -222,19 +253,27 @@ void __init udbg_init_44x_as1(void)
222 (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR; 253 (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
223 254
224 udbg_putc = udbg_44x_as1_putc; 255 udbg_putc = udbg_44x_as1_putc;
256 udbg_flush = udbg_44x_as1_flush;
225 udbg_getc = udbg_44x_as1_getc; 257 udbg_getc = udbg_44x_as1_getc;
226} 258}
227#endif /* CONFIG_PPC_EARLY_DEBUG_44x */ 259#endif /* CONFIG_PPC_EARLY_DEBUG_44x */
228 260
229#ifdef CONFIG_PPC_EARLY_DEBUG_40x 261#ifdef CONFIG_PPC_EARLY_DEBUG_40x
230static void udbg_40x_real_putc(char c) 262static void udbg_40x_real_flush(void)
231{ 263{
232 if (udbg_comport) { 264 if (udbg_comport) {
233 while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) 265 while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
234 /* wait for idle */; 266 /* wait for idle */;
235 real_writeb(c, &udbg_comport->thr); eieio(); 267 }
268}
269
270static void udbg_40x_real_putc(char c)
271{
272 if (udbg_comport) {
236 if (c == '\n') 273 if (c == '\n')
237 udbg_40x_real_putc('\r'); 274 udbg_40x_real_putc('\r');
275 udbg_40x_real_flush();
276 real_writeb(c, &udbg_comport->thr); eieio();
238 } 277 }
239} 278}
240 279
@@ -254,6 +293,7 @@ void __init udbg_init_40x_realmode(void)
254 CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR; 293 CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
255 294
256 udbg_putc = udbg_40x_real_putc; 295 udbg_putc = udbg_40x_real_putc;
296 udbg_flush = udbg_40x_real_flush;
257 udbg_getc = udbg_40x_real_getc; 297 udbg_getc = udbg_40x_real_getc;
258 udbg_getc_poll = NULL; 298 udbg_getc_poll = NULL;
259} 299}
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index d3694498f3af..819e59f6f7c7 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -482,7 +482,7 @@ static void vio_cmo_balance(struct work_struct *work)
482 cmo->excess.size = cmo->entitled - cmo->reserve.size; 482 cmo->excess.size = cmo->entitled - cmo->reserve.size;
483 cmo->excess.free = cmo->excess.size - need; 483 cmo->excess.free = cmo->excess.size - need;
484 484
485 cancel_delayed_work(container_of(work, struct delayed_work, work)); 485 cancel_delayed_work(to_delayed_work(work));
486 spin_unlock_irqrestore(&vio_cmo.lock, flags); 486 spin_unlock_irqrestore(&vio_cmo.lock, flags);
487} 487}
488 488
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 67f07f453385..b9ef1644a722 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -58,6 +58,7 @@ SECTIONS
58 SCHED_TEXT 58 SCHED_TEXT
59 LOCK_TEXT 59 LOCK_TEXT
60 KPROBES_TEXT 60 KPROBES_TEXT
61 IRQENTRY_TEXT
61 62
62#ifdef CONFIG_PPC32 63#ifdef CONFIG_PPC32
63 *(.got1) 64 *(.got1)
diff --git a/arch/powerpc/lib/dma-noncoherent.c b/arch/powerpc/lib/dma-noncoherent.c
index b7dc4c19f582..005a28d380af 100644
--- a/arch/powerpc/lib/dma-noncoherent.c
+++ b/arch/powerpc/lib/dma-noncoherent.c
@@ -29,121 +29,11 @@
29#include <linux/types.h> 29#include <linux/types.h>
30#include <linux/highmem.h> 30#include <linux/highmem.h>
31#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
32#include <linux/vmalloc.h>
32 33
33#include <asm/tlbflush.h> 34#include <asm/tlbflush.h>
34 35
35/* 36/*
36 * This address range defaults to a value that is safe for all
37 * platforms which currently set CONFIG_NOT_COHERENT_CACHE. It
38 * can be further configured for specific applications under
39 * the "Advanced Setup" menu. -Matt
40 */
41#define CONSISTENT_BASE (CONFIG_CONSISTENT_START)
42#define CONSISTENT_END (CONFIG_CONSISTENT_START + CONFIG_CONSISTENT_SIZE)
43#define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT)
44
45/*
46 * This is the page table (2MB) covering uncached, DMA consistent allocations
47 */
48static pte_t *consistent_pte;
49static DEFINE_SPINLOCK(consistent_lock);
50
51/*
52 * VM region handling support.
53 *
54 * This should become something generic, handling VM region allocations for
55 * vmalloc and similar (ioremap, module space, etc).
56 *
57 * I envisage vmalloc()'s supporting vm_struct becoming:
58 *
59 * struct vm_struct {
60 * struct vm_region region;
61 * unsigned long flags;
62 * struct page **pages;
63 * unsigned int nr_pages;
64 * unsigned long phys_addr;
65 * };
66 *
67 * get_vm_area() would then call vm_region_alloc with an appropriate
68 * struct vm_region head (eg):
69 *
70 * struct vm_region vmalloc_head = {
71 * .vm_list = LIST_HEAD_INIT(vmalloc_head.vm_list),
72 * .vm_start = VMALLOC_START,
73 * .vm_end = VMALLOC_END,
74 * };
75 *
76 * However, vmalloc_head.vm_start is variable (typically, it is dependent on
77 * the amount of RAM found at boot time.) I would imagine that get_vm_area()
78 * would have to initialise this each time prior to calling vm_region_alloc().
79 */
80struct ppc_vm_region {
81 struct list_head vm_list;
82 unsigned long vm_start;
83 unsigned long vm_end;
84};
85
86static struct ppc_vm_region consistent_head = {
87 .vm_list = LIST_HEAD_INIT(consistent_head.vm_list),
88 .vm_start = CONSISTENT_BASE,
89 .vm_end = CONSISTENT_END,
90};
91
92static struct ppc_vm_region *
93ppc_vm_region_alloc(struct ppc_vm_region *head, size_t size, gfp_t gfp)
94{
95 unsigned long addr = head->vm_start, end = head->vm_end - size;
96 unsigned long flags;
97 struct ppc_vm_region *c, *new;
98
99 new = kmalloc(sizeof(struct ppc_vm_region), gfp);
100 if (!new)
101 goto out;
102
103 spin_lock_irqsave(&consistent_lock, flags);
104
105 list_for_each_entry(c, &head->vm_list, vm_list) {
106 if ((addr + size) < addr)
107 goto nospc;
108 if ((addr + size) <= c->vm_start)
109 goto found;
110 addr = c->vm_end;
111 if (addr > end)
112 goto nospc;
113 }
114
115 found:
116 /*
117 * Insert this entry _before_ the one we found.
118 */
119 list_add_tail(&new->vm_list, &c->vm_list);
120 new->vm_start = addr;
121 new->vm_end = addr + size;
122
123 spin_unlock_irqrestore(&consistent_lock, flags);
124 return new;
125
126 nospc:
127 spin_unlock_irqrestore(&consistent_lock, flags);
128 kfree(new);
129 out:
130 return NULL;
131}
132
133static struct ppc_vm_region *ppc_vm_region_find(struct ppc_vm_region *head, unsigned long addr)
134{
135 struct ppc_vm_region *c;
136
137 list_for_each_entry(c, &head->vm_list, vm_list) {
138 if (c->vm_start == addr)
139 goto out;
140 }
141 c = NULL;
142 out:
143 return c;
144}
145
146/*
147 * Allocate DMA-coherent memory space and return both the kernel remapped 37 * Allocate DMA-coherent memory space and return both the kernel remapped
148 * virtual and bus address for that space. 38 * virtual and bus address for that space.
149 */ 39 */
@@ -151,21 +41,21 @@ void *
151__dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp) 41__dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp)
152{ 42{
153 struct page *page; 43 struct page *page;
154 struct ppc_vm_region *c;
155 unsigned long order; 44 unsigned long order;
45 int i;
46 unsigned int nr_pages = PAGE_ALIGN(size)>>PAGE_SHIFT;
47 unsigned int array_size = nr_pages * sizeof(struct page *);
48 struct page **pages;
49 struct page *end;
156 u64 mask = 0x00ffffff, limit; /* ISA default */ 50 u64 mask = 0x00ffffff, limit; /* ISA default */
51 struct vm_struct *area;
157 52
158 if (!consistent_pte) { 53 BUG_ON(!mem_init_done);
159 printk(KERN_ERR "%s: not initialised\n", __func__);
160 dump_stack();
161 return NULL;
162 }
163
164 size = PAGE_ALIGN(size); 54 size = PAGE_ALIGN(size);
165 limit = (mask + 1) & ~mask; 55 limit = (mask + 1) & ~mask;
166 if ((limit && size >= limit) || size >= (CONSISTENT_END - CONSISTENT_BASE)) { 56 if (limit && size >= limit) {
167 printk(KERN_WARNING "coherent allocation too big (requested %#x mask %#Lx)\n", 57 printk(KERN_WARNING "coherent allocation too big (requested "
168 size, mask); 58 "%#x mask %#Lx)\n", size, mask);
169 return NULL; 59 return NULL;
170 } 60 }
171 61
@@ -178,6 +68,8 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp)
178 if (!page) 68 if (!page)
179 goto no_page; 69 goto no_page;
180 70
71 end = page + (1 << order);
72
181 /* 73 /*
182 * Invalidate any data that might be lurking in the 74 * Invalidate any data that might be lurking in the
183 * kernel direct-mapped region for device DMA. 75 * kernel direct-mapped region for device DMA.
@@ -188,48 +80,59 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp)
188 flush_dcache_range(kaddr, kaddr + size); 80 flush_dcache_range(kaddr, kaddr + size);
189 } 81 }
190 82
83 split_page(page, order);
84
191 /* 85 /*
192 * Allocate a virtual address in the consistent mapping region. 86 * Set the "dma handle"
193 */ 87 */
194 c = ppc_vm_region_alloc(&consistent_head, size, 88 *handle = page_to_phys(page);
195 gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); 89
196 if (c) { 90 area = get_vm_area_caller(size, VM_IOREMAP,
197 unsigned long vaddr = c->vm_start; 91 __builtin_return_address(1));
198 pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr); 92 if (!area)
199 struct page *end = page + (1 << order); 93 goto out_free_pages;
200 94
201 split_page(page, order); 95 if (array_size > PAGE_SIZE) {
202 96 pages = vmalloc(array_size);
203 /* 97 area->flags |= VM_VPAGES;
204 * Set the "dma handle" 98 } else {
205 */ 99 pages = kmalloc(array_size, GFP_KERNEL);
206 *handle = page_to_phys(page); 100 }
101 if (!pages)
102 goto out_free_area;
207 103
208 do { 104 area->pages = pages;
209 BUG_ON(!pte_none(*pte)); 105 area->nr_pages = nr_pages;
210 106
211 SetPageReserved(page); 107 for (i = 0; i < nr_pages; i++)
212 set_pte_at(&init_mm, vaddr, 108 pages[i] = page + i;
213 pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL)));
214 page++;
215 pte++;
216 vaddr += PAGE_SIZE;
217 } while (size -= PAGE_SIZE);
218 109
219 /* 110 if (map_vm_area(area, pgprot_noncached(PAGE_KERNEL), &pages))
220 * Free the otherwise unused pages. 111 goto out_unmap;
221 */
222 while (page < end) {
223 __free_page(page);
224 page++;
225 }
226 112
227 return (void *)c->vm_start; 113 /*
114 * Free the otherwise unused pages.
115 */
116 page += nr_pages;
117 while (page < end) {
118 __free_page(page);
119 page++;
228 } 120 }
229 121
122 return area->addr;
123out_unmap:
124 vunmap(area->addr);
125 if (array_size > PAGE_SIZE)
126 vfree(pages);
127 else
128 kfree(pages);
129 goto out_free_pages;
130out_free_area:
131 free_vm_area(area);
132out_free_pages:
230 if (page) 133 if (page)
231 __free_pages(page, order); 134 __free_pages(page, order);
232 no_page: 135no_page:
233 return NULL; 136 return NULL;
234} 137}
235EXPORT_SYMBOL(__dma_alloc_coherent); 138EXPORT_SYMBOL(__dma_alloc_coherent);
@@ -239,104 +142,12 @@ EXPORT_SYMBOL(__dma_alloc_coherent);
239 */ 142 */
240void __dma_free_coherent(size_t size, void *vaddr) 143void __dma_free_coherent(size_t size, void *vaddr)
241{ 144{
242 struct ppc_vm_region *c; 145 vfree(vaddr);
243 unsigned long flags, addr;
244 pte_t *ptep;
245
246 size = PAGE_ALIGN(size);
247
248 spin_lock_irqsave(&consistent_lock, flags);
249
250 c = ppc_vm_region_find(&consistent_head, (unsigned long)vaddr);
251 if (!c)
252 goto no_area;
253
254 if ((c->vm_end - c->vm_start) != size) {
255 printk(KERN_ERR "%s: freeing wrong coherent size (%ld != %d)\n",
256 __func__, c->vm_end - c->vm_start, size);
257 dump_stack();
258 size = c->vm_end - c->vm_start;
259 }
260
261 ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start);
262 addr = c->vm_start;
263 do {
264 pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep);
265 unsigned long pfn;
266
267 ptep++;
268 addr += PAGE_SIZE;
269 146
270 if (!pte_none(pte) && pte_present(pte)) {
271 pfn = pte_pfn(pte);
272
273 if (pfn_valid(pfn)) {
274 struct page *page = pfn_to_page(pfn);
275 ClearPageReserved(page);
276
277 __free_page(page);
278 continue;
279 }
280 }
281
282 printk(KERN_CRIT "%s: bad page in kernel page table\n",
283 __func__);
284 } while (size -= PAGE_SIZE);
285
286 flush_tlb_kernel_range(c->vm_start, c->vm_end);
287
288 list_del(&c->vm_list);
289
290 spin_unlock_irqrestore(&consistent_lock, flags);
291
292 kfree(c);
293 return;
294
295 no_area:
296 spin_unlock_irqrestore(&consistent_lock, flags);
297 printk(KERN_ERR "%s: trying to free invalid coherent area: %p\n",
298 __func__, vaddr);
299 dump_stack();
300} 147}
301EXPORT_SYMBOL(__dma_free_coherent); 148EXPORT_SYMBOL(__dma_free_coherent);
302 149
303/* 150/*
304 * Initialise the consistent memory allocation.
305 */
306static int __init dma_alloc_init(void)
307{
308 pgd_t *pgd;
309 pud_t *pud;
310 pmd_t *pmd;
311 pte_t *pte;
312 int ret = 0;
313
314 do {
315 pgd = pgd_offset(&init_mm, CONSISTENT_BASE);
316 pud = pud_alloc(&init_mm, pgd, CONSISTENT_BASE);
317 pmd = pmd_alloc(&init_mm, pud, CONSISTENT_BASE);
318 if (!pmd) {
319 printk(KERN_ERR "%s: no pmd tables\n", __func__);
320 ret = -ENOMEM;
321 break;
322 }
323
324 pte = pte_alloc_kernel(pmd, CONSISTENT_BASE);
325 if (!pte) {
326 printk(KERN_ERR "%s: no pte tables\n", __func__);
327 ret = -ENOMEM;
328 break;
329 }
330
331 consistent_pte = pte;
332 } while (0);
333
334 return ret;
335}
336
337core_initcall(dma_alloc_init);
338
339/*
340 * make an area consistent. 151 * make an area consistent.
341 */ 152 */
342void __dma_sync(void *vaddr, size_t size, int direction) 153void __dma_sync(void *vaddr, size_t size, int direction)
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index 8c5a03be31e0..7e8865bcd683 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -85,7 +85,7 @@ static int patch_feature_section(unsigned long value, struct fixup_entry *fcur)
85 } 85 }
86 86
87 for (; dest < end; dest++) 87 for (; dest < end; dest++)
88 patch_instruction(dest, PPC_NOP_INSTR); 88 patch_instruction(dest, PPC_INST_NOP);
89 89
90 return 0; 90 return 0;
91} 91}
@@ -122,7 +122,7 @@ void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
122 122
123 for (; start < end; start++) { 123 for (; start < end; start++) {
124 dest = (void *)start + *start; 124 dest = (void *)start + *start;
125 patch_instruction(dest, PPC_LWSYNC_INSTR); 125 patch_instruction(dest, PPC_INST_LWSYNC);
126 } 126 }
127} 127}
128 128
diff --git a/arch/powerpc/math-emu/Makefile b/arch/powerpc/math-emu/Makefile
index f9e506a735ae..0c16ab947f1f 100644
--- a/arch/powerpc/math-emu/Makefile
+++ b/arch/powerpc/math-emu/Makefile
@@ -1,6 +1,4 @@
1 1
2obj-y := math.o fmr.o lfd.o stfd.o
3
4obj-$(CONFIG_MATH_EMULATION) += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \ 2obj-$(CONFIG_MATH_EMULATION) += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \
5 fctiw.o fctiwz.o fdiv.o fdivs.o \ 3 fctiw.o fctiwz.o fdiv.o fdivs.o \
6 fmadd.o fmadds.o fmsub.o fmsubs.o \ 4 fmadd.o fmadds.o fmsub.o fmsubs.o \
@@ -9,7 +7,8 @@ obj-$(CONFIG_MATH_EMULATION) += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \
9 fres.o frsp.o frsqrte.o fsel.o lfs.o \ 7 fres.o frsp.o frsqrte.o fsel.o lfs.o \
10 fsqrt.o fsqrts.o fsub.o fsubs.o \ 8 fsqrt.o fsqrts.o fsub.o fsubs.o \
11 mcrfs.o mffs.o mtfsb0.o mtfsb1.o \ 9 mcrfs.o mffs.o mtfsb0.o mtfsb1.o \
12 mtfsf.o mtfsfi.o stfiwx.o stfs.o 10 mtfsf.o mtfsfi.o stfiwx.o stfs.o \
11 math.o fmr.o lfd.o stfd.o
13 12
14obj-$(CONFIG_SPE) += math_efp.o 13obj-$(CONFIG_SPE) += math_efp.o
15 14
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 953cc4a1cde5..17290bcedc5e 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -6,7 +6,7 @@ ifeq ($(CONFIG_PPC64),y)
6EXTRA_CFLAGS += -mno-minimal-toc 6EXTRA_CFLAGS += -mno-minimal-toc
7endif 7endif
8 8
9obj-y := fault.o mem.o pgtable.o \ 9obj-y := fault.o mem.o pgtable.o gup.o \
10 init_$(CONFIG_WORD_SIZE).o \ 10 init_$(CONFIG_WORD_SIZE).o \
11 pgtable_$(CONFIG_WORD_SIZE).o 11 pgtable_$(CONFIG_WORD_SIZE).o
12obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \ 12obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
@@ -14,7 +14,7 @@ obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
14hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o 14hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o
15obj-$(CONFIG_PPC64) += hash_utils_64.o \ 15obj-$(CONFIG_PPC64) += hash_utils_64.o \
16 slb_low.o slb.o stab.o \ 16 slb_low.o slb.o stab.o \
17 gup.o mmap.o $(hash-y) 17 mmap_64.o $(hash-y)
18obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o 18obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o
19obj-$(CONFIG_PPC_STD_MMU) += hash_low_$(CONFIG_WORD_SIZE).o \ 19obj-$(CONFIG_PPC_STD_MMU) += hash_low_$(CONFIG_WORD_SIZE).o \
20 tlb_hash$(CONFIG_WORD_SIZE).o \ 20 tlb_hash$(CONFIG_WORD_SIZE).o \
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 91c7b8636b8a..76993941cac9 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -253,45 +253,33 @@ good_area:
253#endif /* CONFIG_8xx */ 253#endif /* CONFIG_8xx */
254 254
255 if (is_exec) { 255 if (is_exec) {
256#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) 256#ifdef CONFIG_PPC_STD_MMU
257 /* protection fault */ 257 /* Protection fault on exec go straight to failure on
258 * Hash based MMUs as they either don't support per-page
259 * execute permission, or if they do, it's handled already
260 * at the hash level. This test would probably have to
261 * be removed if we change the way this works to make hash
262 * processors use the same I/D cache coherency mechanism
263 * as embedded.
264 */
258 if (error_code & DSISR_PROTFAULT) 265 if (error_code & DSISR_PROTFAULT)
259 goto bad_area; 266 goto bad_area;
267#endif /* CONFIG_PPC_STD_MMU */
268
260 /* 269 /*
261 * Allow execution from readable areas if the MMU does not 270 * Allow execution from readable areas if the MMU does not
262 * provide separate controls over reading and executing. 271 * provide separate controls over reading and executing.
272 *
273 * Note: That code used to not be enabled for 4xx/BookE.
274 * It is now as I/D cache coherency for these is done at
275 * set_pte_at() time and I see no reason why the test
276 * below wouldn't be valid on those processors. This -may-
277 * break programs compiled with a really old ABI though.
263 */ 278 */
264 if (!(vma->vm_flags & VM_EXEC) && 279 if (!(vma->vm_flags & VM_EXEC) &&
265 (cpu_has_feature(CPU_FTR_NOEXECUTE) || 280 (cpu_has_feature(CPU_FTR_NOEXECUTE) ||
266 !(vma->vm_flags & (VM_READ | VM_WRITE)))) 281 !(vma->vm_flags & (VM_READ | VM_WRITE))))
267 goto bad_area; 282 goto bad_area;
268#else
269 pte_t *ptep;
270 pmd_t *pmdp;
271
272 /* Since 4xx/Book-E supports per-page execute permission,
273 * we lazily flush dcache to icache. */
274 ptep = NULL;
275 if (get_pteptr(mm, address, &ptep, &pmdp)) {
276 spinlock_t *ptl = pte_lockptr(mm, pmdp);
277 spin_lock(ptl);
278 if (pte_present(*ptep)) {
279 struct page *page = pte_page(*ptep);
280
281 if (!test_bit(PG_arch_1, &page->flags)) {
282 flush_dcache_icache_page(page);
283 set_bit(PG_arch_1, &page->flags);
284 }
285 pte_update(ptep, 0, _PAGE_HWEXEC |
286 _PAGE_ACCESSED);
287 local_flush_tlb_page(vma, address);
288 pte_unmap_unlock(ptep, ptl);
289 up_read(&mm->mmap_sem);
290 return 0;
291 }
292 pte_unmap_unlock(ptep, ptl);
293 }
294#endif
295 /* a write */ 283 /* a write */
296 } else if (is_write) { 284 } else if (is_write) {
297 if (!(vma->vm_flags & VM_WRITE)) 285 if (!(vma->vm_flags & VM_WRITE))
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index ea6e41e39d9f..bb3d65998e6b 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -56,10 +56,14 @@
56 56
57extern void loadcam_entry(unsigned int index); 57extern void loadcam_entry(unsigned int index);
58unsigned int tlbcam_index; 58unsigned int tlbcam_index;
59static unsigned long __cam0, __cam1, __cam2; 59static unsigned long cam[CONFIG_LOWMEM_CAM_NUM];
60 60
61#define NUM_TLBCAMS (16) 61#define NUM_TLBCAMS (16)
62 62
63#if defined(CONFIG_LOWMEM_CAM_NUM_BOOL) && (CONFIG_LOWMEM_CAM_NUM >= NUM_TLBCAMS)
64#error "LOWMEM_CAM_NUM must be less than NUM_TLBCAMS"
65#endif
66
63struct tlbcam TLBCAM[NUM_TLBCAMS]; 67struct tlbcam TLBCAM[NUM_TLBCAMS];
64 68
65struct tlbcamrange { 69struct tlbcamrange {
@@ -107,7 +111,7 @@ void settlbcam(int index, unsigned long virt, phys_addr_t phys,
107 unsigned int tsize, lz; 111 unsigned int tsize, lz;
108 112
109 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size)); 113 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
110 tsize = (21 - lz) / 2; 114 tsize = 21 - lz;
111 115
112#ifdef CONFIG_SMP 116#ifdef CONFIG_SMP
113 if ((flags & _PAGE_NO_CACHE) == 0) 117 if ((flags & _PAGE_NO_CACHE) == 0)
@@ -152,19 +156,19 @@ void invalidate_tlbcam_entry(int index)
152 loadcam_entry(index); 156 loadcam_entry(index);
153} 157}
154 158
155void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1, 159unsigned long __init mmu_mapin_ram(void)
156 unsigned long cam2)
157{ 160{
158 settlbcam(0, PAGE_OFFSET, memstart_addr, cam0, _PAGE_KERNEL, 0); 161 unsigned long virt = PAGE_OFFSET;
159 tlbcam_index++; 162 phys_addr_t phys = memstart_addr;
160 if (cam1) { 163
161 tlbcam_index++; 164 while (cam[tlbcam_index] && tlbcam_index < ARRAY_SIZE(cam)) {
162 settlbcam(1, PAGE_OFFSET+cam0, memstart_addr+cam0, cam1, _PAGE_KERNEL, 0); 165 settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], PAGE_KERNEL_X, 0);
163 } 166 virt += cam[tlbcam_index];
164 if (cam2) { 167 phys += cam[tlbcam_index];
165 tlbcam_index++; 168 tlbcam_index++;
166 settlbcam(2, PAGE_OFFSET+cam0+cam1, memstart_addr+cam0+cam1, cam2, _PAGE_KERNEL, 0);
167 } 169 }
170
171 return virt - PAGE_OFFSET;
168} 172}
169 173
170/* 174/*
@@ -175,51 +179,46 @@ void __init MMU_init_hw(void)
175 flush_instruction_cache(); 179 flush_instruction_cache();
176} 180}
177 181
178unsigned long __init mmu_mapin_ram(void)
179{
180 cam_mapin_ram(__cam0, __cam1, __cam2);
181
182 return __cam0 + __cam1 + __cam2;
183}
184
185
186void __init 182void __init
187adjust_total_lowmem(void) 183adjust_total_lowmem(void)
188{ 184{
189 phys_addr_t max_lowmem_size = __max_low_memory;
190 phys_addr_t cam_max_size = 0x10000000;
191 phys_addr_t ram; 185 phys_addr_t ram;
186 unsigned int max_cam = (mfspr(SPRN_TLB1CFG) >> 16) & 0xff;
187 char buf[ARRAY_SIZE(cam) * 5 + 1], *p = buf;
188 int i;
189 unsigned long virt = PAGE_OFFSET & 0xffffffffUL;
190 unsigned long phys = memstart_addr & 0xffffffffUL;
192 191
193 /* adjust CAM size to max_lowmem_size */ 192 /* Convert (4^max) kB to (2^max) bytes */
194 if (max_lowmem_size < cam_max_size) 193 max_cam = max_cam * 2 + 10;
195 cam_max_size = max_lowmem_size;
196 194
197 /* adjust lowmem size to max_lowmem_size */ 195 /* adjust lowmem size to __max_low_memory */
198 ram = min(max_lowmem_size, total_lowmem); 196 ram = min((phys_addr_t)__max_low_memory, (phys_addr_t)total_lowmem);
199 197
200 /* Calculate CAM values */ 198 /* Calculate CAM values */
201 __cam0 = 1UL << 2 * (__ilog2(ram) / 2); 199 __max_low_memory = 0;
202 if (__cam0 > cam_max_size) 200 for (i = 0; ram && i < ARRAY_SIZE(cam); i++) {
203 __cam0 = cam_max_size; 201 unsigned int camsize = __ilog2(ram) & ~1U;
204 ram -= __cam0; 202 unsigned int align = __ffs(virt | phys) & ~1U;
205 if (ram) { 203
206 __cam1 = 1UL << 2 * (__ilog2(ram) / 2); 204 if (camsize > align)
207 if (__cam1 > cam_max_size) 205 camsize = align;
208 __cam1 = cam_max_size; 206 if (camsize > max_cam)
209 ram -= __cam1; 207 camsize = max_cam;
210 } 208
211 if (ram) { 209 cam[i] = 1UL << camsize;
212 __cam2 = 1UL << 2 * (__ilog2(ram) / 2); 210 ram -= cam[i];
213 if (__cam2 > cam_max_size) 211 __max_low_memory += cam[i];
214 __cam2 = cam_max_size; 212 virt += cam[i];
215 ram -= __cam2; 213 phys += cam[i];
214
215 p += sprintf(p, "%lu/", cam[i] >> 20);
216 } 216 }
217 for (; i < ARRAY_SIZE(cam); i++)
218 p += sprintf(p, "0/");
219 p[-1] = '\0';
217 220
218 printk(KERN_INFO "Memory CAM mapping: CAM0=%ldMb, CAM1=%ldMb," 221 pr_info("Memory CAM mapping: %s Mb, residual: %dMb\n", buf,
219 " CAM2=%ldMb residual: %ldMb\n", 222 (unsigned int)((total_lowmem - __max_low_memory) >> 20));
220 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
221 (long int)((total_lowmem - __cam0 - __cam1 - __cam2)
222 >> 20));
223 __max_low_memory = __cam0 + __cam1 + __cam2;
224 __initial_memory_limit_addr = memstart_addr + __max_low_memory; 223 __initial_memory_limit_addr = memstart_addr + __max_low_memory;
225} 224}
diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c
index 28a114db3ba0..bc400c78c97f 100644
--- a/arch/powerpc/mm/gup.c
+++ b/arch/powerpc/mm/gup.c
@@ -14,6 +14,8 @@
14#include <linux/rwsem.h> 14#include <linux/rwsem.h>
15#include <asm/pgtable.h> 15#include <asm/pgtable.h>
16 16
17#ifdef __HAVE_ARCH_PTE_SPECIAL
18
17/* 19/*
18 * The performance critical leaf functions are made noinline otherwise gcc 20 * The performance critical leaf functions are made noinline otherwise gcc
19 * inlines everything into a single function which results in too much 21 * inlines everything into a single function which results in too much
@@ -151,8 +153,11 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
151 unsigned long addr, len, end; 153 unsigned long addr, len, end;
152 unsigned long next; 154 unsigned long next;
153 pgd_t *pgdp; 155 pgd_t *pgdp;
154 int psize, nr = 0; 156 int nr = 0;
157#ifdef CONFIG_PPC64
155 unsigned int shift; 158 unsigned int shift;
159 int psize;
160#endif
156 161
157 pr_debug("%s(%lx,%x,%s)\n", __func__, start, nr_pages, write ? "write" : "read"); 162 pr_debug("%s(%lx,%x,%s)\n", __func__, start, nr_pages, write ? "write" : "read");
158 163
@@ -205,8 +210,13 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
205 */ 210 */
206 local_irq_disable(); 211 local_irq_disable();
207 212
213#ifdef CONFIG_PPC64
214 /* Those bits are related to hugetlbfs implementation and only exist
215 * on 64-bit for now
216 */
208 psize = get_slice_psize(mm, addr); 217 psize = get_slice_psize(mm, addr);
209 shift = mmu_psize_defs[psize].shift; 218 shift = mmu_psize_defs[psize].shift;
219#endif /* CONFIG_PPC64 */
210 220
211#ifdef CONFIG_HUGETLB_PAGE 221#ifdef CONFIG_HUGETLB_PAGE
212 if (unlikely(mmu_huge_psizes[psize])) { 222 if (unlikely(mmu_huge_psizes[psize])) {
@@ -236,7 +246,9 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
236 do { 246 do {
237 pgd_t pgd = *pgdp; 247 pgd_t pgd = *pgdp;
238 248
249#ifdef CONFIG_PPC64
239 VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, addr)].shift); 250 VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, addr)].shift);
251#endif
240 pr_debug(" %016lx: normal pgd %p\n", addr, 252 pr_debug(" %016lx: normal pgd %p\n", addr,
241 (void *)pgd_val(pgd)); 253 (void *)pgd_val(pgd));
242 next = pgd_addr_end(addr, end); 254 next = pgd_addr_end(addr, end);
@@ -279,3 +291,5 @@ slow_irqon:
279 return ret; 291 return ret;
280 } 292 }
281} 293}
294
295#endif /* __HAVE_ARCH_PTE_SPECIAL */
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 8d5b4758c13a..db556d25c3a7 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -516,7 +516,7 @@ static int __init htab_dt_scan_pftsize(unsigned long node,
516 516
517static unsigned long __init htab_get_table_size(void) 517static unsigned long __init htab_get_table_size(void)
518{ 518{
519 unsigned long mem_size, rnd_mem_size, pteg_count; 519 unsigned long mem_size, rnd_mem_size, pteg_count, psize;
520 520
521 /* If hash size isn't already provided by the platform, we try to 521 /* If hash size isn't already provided by the platform, we try to
522 * retrieve it from the device-tree. If it's not there neither, we 522 * retrieve it from the device-tree. If it's not there neither, we
@@ -534,7 +534,8 @@ static unsigned long __init htab_get_table_size(void)
534 rnd_mem_size <<= 1; 534 rnd_mem_size <<= 1;
535 535
536 /* # pages / 2 */ 536 /* # pages / 2 */
537 pteg_count = max(rnd_mem_size >> (12 + 1), 1UL << 11); 537 psize = mmu_psize_defs[mmu_virtual_psize].shift;
538 pteg_count = max(rnd_mem_size >> (psize + 1), 1UL << 11);
538 539
539 return pteg_count << 7; 540 return pteg_count << 7;
540} 541}
@@ -589,7 +590,7 @@ static void __init htab_finish_init(void)
589 make_bl(htab_call_hpte_updatepp, ppc_md.hpte_updatepp); 590 make_bl(htab_call_hpte_updatepp, ppc_md.hpte_updatepp);
590} 591}
591 592
592void __init htab_initialize(void) 593static void __init htab_initialize(void)
593{ 594{
594 unsigned long table; 595 unsigned long table;
595 unsigned long pteg_count; 596 unsigned long pteg_count;
@@ -731,11 +732,43 @@ void __init htab_initialize(void)
731#undef KB 732#undef KB
732#undef MB 733#undef MB
733 734
734void htab_initialize_secondary(void) 735void __init early_init_mmu(void)
735{ 736{
737 /* Setup initial STAB address in the PACA */
738 get_paca()->stab_real = __pa((u64)&initial_stab);
739 get_paca()->stab_addr = (u64)&initial_stab;
740
741 /* Initialize the MMU Hash table and create the linear mapping
742 * of memory. Has to be done before stab/slb initialization as
743 * this is currently where the page size encoding is obtained
744 */
745 htab_initialize();
746
747 /* Initialize stab / SLB management except on iSeries
748 */
749 if (cpu_has_feature(CPU_FTR_SLB))
750 slb_initialize();
751 else if (!firmware_has_feature(FW_FEATURE_ISERIES))
752 stab_initialize(get_paca()->stab_real);
753}
754
755#ifdef CONFIG_SMP
756void __init early_init_mmu_secondary(void)
757{
758 /* Initialize hash table for that CPU */
736 if (!firmware_has_feature(FW_FEATURE_LPAR)) 759 if (!firmware_has_feature(FW_FEATURE_LPAR))
737 mtspr(SPRN_SDR1, _SDR1); 760 mtspr(SPRN_SDR1, _SDR1);
761
762 /* Initialize STAB/SLB. We use a virtual address as it works
763 * in real mode on pSeries and we want a virutal address on
764 * iSeries anyway
765 */
766 if (cpu_has_feature(CPU_FTR_SLB))
767 slb_initialize();
768 else
769 stab_initialize(get_paca()->stab_addr);
738} 770}
771#endif /* CONFIG_SMP */
739 772
740/* 773/*
741 * Called by asm hashtable.S for doing lazy icache flush 774 * Called by asm hashtable.S for doing lazy icache flush
@@ -858,7 +891,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
858 unsigned long vsid; 891 unsigned long vsid;
859 struct mm_struct *mm; 892 struct mm_struct *mm;
860 pte_t *ptep; 893 pte_t *ptep;
861 cpumask_t tmp; 894 const struct cpumask *tmp;
862 int rc, user_region = 0, local = 0; 895 int rc, user_region = 0, local = 0;
863 int psize, ssize; 896 int psize, ssize;
864 897
@@ -906,8 +939,8 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
906 return 1; 939 return 1;
907 940
908 /* Check CPU locality */ 941 /* Check CPU locality */
909 tmp = cpumask_of_cpu(smp_processor_id()); 942 tmp = cpumask_of(smp_processor_id());
910 if (user_region && cpus_equal(mm->cpu_vm_mask, tmp)) 943 if (user_region && cpumask_equal(mm_cpumask(mm), tmp))
911 local = 1; 944 local = 1;
912 945
913#ifdef CONFIG_HUGETLB_PAGE 946#ifdef CONFIG_HUGETLB_PAGE
@@ -1023,7 +1056,6 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
1023 unsigned long vsid; 1056 unsigned long vsid;
1024 void *pgdir; 1057 void *pgdir;
1025 pte_t *ptep; 1058 pte_t *ptep;
1026 cpumask_t mask;
1027 unsigned long flags; 1059 unsigned long flags;
1028 int local = 0; 1060 int local = 0;
1029 int ssize; 1061 int ssize;
@@ -1066,8 +1098,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
1066 local_irq_save(flags); 1098 local_irq_save(flags);
1067 1099
1068 /* Is that local to this CPU ? */ 1100 /* Is that local to this CPU ? */
1069 mask = cpumask_of_cpu(smp_processor_id()); 1101 if (cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id())))
1070 if (cpus_equal(mm->cpu_vm_mask, mask))
1071 local = 1; 1102 local = 1;
1072 1103
1073 /* Hash it in */ 1104 /* Hash it in */
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f00f09a77f12..f668fa9ba804 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -472,40 +472,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
472{ 472{
473#ifdef CONFIG_PPC_STD_MMU 473#ifdef CONFIG_PPC_STD_MMU
474 unsigned long access = 0, trap; 474 unsigned long access = 0, trap;
475#endif
476 unsigned long pfn = pte_pfn(pte);
477
478 /* handle i-cache coherency */
479 if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) &&
480 !cpu_has_feature(CPU_FTR_NOEXECUTE) &&
481 pfn_valid(pfn)) {
482 struct page *page = pfn_to_page(pfn);
483#ifdef CONFIG_8xx
484 /* On 8xx, cache control instructions (particularly
485 * "dcbst" from flush_dcache_icache) fault as write
486 * operation if there is an unpopulated TLB entry
487 * for the address in question. To workaround that,
488 * we invalidate the TLB here, thus avoiding dcbst
489 * misbehaviour.
490 */
491 _tlbil_va(address, 0 /* 8xx doesn't care about PID */);
492#endif
493 /* The _PAGE_USER test should really be _PAGE_EXEC, but
494 * older glibc versions execute some code from no-exec
495 * pages, which for now we are supporting. If exec-only
496 * pages are ever implemented, this will have to change.
497 */
498 if (!PageReserved(page) && (pte_val(pte) & _PAGE_USER)
499 && !test_bit(PG_arch_1, &page->flags)) {
500 if (vma->vm_mm == current->active_mm) {
501 __flush_dcache_icache((void *) address);
502 } else
503 flush_dcache_icache_page(page);
504 set_bit(PG_arch_1, &page->flags);
505 }
506 }
507 475
508#ifdef CONFIG_PPC_STD_MMU
509 /* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */ 476 /* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
510 if (!pte_young(pte) || address >= TASK_SIZE) 477 if (!pte_young(pte) || address >= TASK_SIZE)
511 return; 478 return;
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap_64.c
index 86010fc7d3b1..0d957a4c70fe 100644
--- a/arch/powerpc/mm/mmap.c
+++ b/arch/powerpc/mm/mmap_64.c
@@ -24,36 +24,26 @@
24 24
25#include <linux/personality.h> 25#include <linux/personality.h>
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <linux/random.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28 29
29/* 30/*
30 * Top of mmap area (just below the process stack). 31 * Top of mmap area (just below the process stack).
31 * 32 *
32 * Leave an at least ~128 MB hole. 33 * Leave at least a ~128 MB hole on 32bit applications.
34 *
35 * On 64bit applications we randomise the stack by 1GB so we need to
36 * space our mmap start address by a further 1GB, otherwise there is a
37 * chance the mmap area will end up closer to the stack than our ulimit
38 * requires.
33 */ 39 */
34#define MIN_GAP (128*1024*1024) 40#define MIN_GAP32 (128*1024*1024)
41#define MIN_GAP64 ((128 + 1024)*1024*1024UL)
42#define MIN_GAP ((is_32bit_task()) ? MIN_GAP32 : MIN_GAP64)
35#define MAX_GAP (TASK_SIZE/6*5) 43#define MAX_GAP (TASK_SIZE/6*5)
36 44
37static inline unsigned long mmap_base(void)
38{
39 unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur;
40
41 if (gap < MIN_GAP)
42 gap = MIN_GAP;
43 else if (gap > MAX_GAP)
44 gap = MAX_GAP;
45
46 return TASK_SIZE - (gap & PAGE_MASK);
47}
48
49static inline int mmap_is_legacy(void) 45static inline int mmap_is_legacy(void)
50{ 46{
51 /*
52 * Force standard allocation for 64 bit programs.
53 */
54 if (!test_thread_flag(TIF_32BIT))
55 return 1;
56
57 if (current->personality & ADDR_COMPAT_LAYOUT) 47 if (current->personality & ADDR_COMPAT_LAYOUT)
58 return 1; 48 return 1;
59 49
@@ -64,6 +54,40 @@ static inline int mmap_is_legacy(void)
64} 54}
65 55
66/* 56/*
57 * Since get_random_int() returns the same value within a 1 jiffy window,
58 * we will almost always get the same randomisation for the stack and mmap
59 * region. This will mean the relative distance between stack and mmap will
60 * be the same.
61 *
62 * To avoid this we can shift the randomness by 1 bit.
63 */
64static unsigned long mmap_rnd(void)
65{
66 unsigned long rnd = 0;
67
68 if (current->flags & PF_RANDOMIZE) {
69 /* 8MB for 32bit, 1GB for 64bit */
70 if (is_32bit_task())
71 rnd = (long)(get_random_int() % (1<<(22-PAGE_SHIFT)));
72 else
73 rnd = (long)(get_random_int() % (1<<(29-PAGE_SHIFT)));
74 }
75 return (rnd << PAGE_SHIFT) * 2;
76}
77
78static inline unsigned long mmap_base(void)
79{
80 unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur;
81
82 if (gap < MIN_GAP)
83 gap = MIN_GAP;
84 else if (gap > MAX_GAP)
85 gap = MAX_GAP;
86
87 return PAGE_ALIGN(TASK_SIZE - gap - mmap_rnd());
88}
89
90/*
67 * This function, called very early during the creation of a new 91 * This function, called very early during the creation of a new
68 * process VM image, sets up which VM layout function to use: 92 * process VM image, sets up which VM layout function to use:
69 */ 93 */
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index 52a0cfc38b64..a70e311bd457 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -97,7 +97,7 @@ static unsigned int steal_context_smp(unsigned int id)
97 mm->context.id = MMU_NO_CONTEXT; 97 mm->context.id = MMU_NO_CONTEXT;
98 98
99 /* Mark it stale on all CPUs that used this mm */ 99 /* Mark it stale on all CPUs that used this mm */
100 for_each_cpu_mask_nr(cpu, mm->cpu_vm_mask) 100 for_each_cpu(cpu, mm_cpumask(mm))
101 __set_bit(id, stale_map[cpu]); 101 __set_bit(id, stale_map[cpu]);
102 return id; 102 return id;
103 } 103 }
@@ -380,7 +380,7 @@ void __init mmu_context_init(void)
380#endif 380#endif
381 381
382 printk(KERN_INFO 382 printk(KERN_INFO
383 "MMU: Allocated %d bytes of context maps for %d contexts\n", 383 "MMU: Allocated %zu bytes of context maps for %d contexts\n",
384 2 * CTX_MAP_SIZE + (sizeof(void *) * (last_context + 1)), 384 2 * CTX_MAP_SIZE + (sizeof(void *) * (last_context + 1)),
385 last_context - first_context + 1); 385 last_context - first_context + 1);
386 386
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 5ac08b8ab654..9047145095aa 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -158,35 +158,6 @@ static void unmap_cpu_from_node(unsigned long cpu)
158} 158}
159#endif /* CONFIG_HOTPLUG_CPU */ 159#endif /* CONFIG_HOTPLUG_CPU */
160 160
161static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
162{
163 unsigned int hw_cpuid = get_hard_smp_processor_id(cpu);
164 struct device_node *cpu_node = NULL;
165 const unsigned int *interrupt_server, *reg;
166 int len;
167
168 while ((cpu_node = of_find_node_by_type(cpu_node, "cpu")) != NULL) {
169 /* Try interrupt server first */
170 interrupt_server = of_get_property(cpu_node,
171 "ibm,ppc-interrupt-server#s", &len);
172
173 len = len / sizeof(u32);
174
175 if (interrupt_server && (len > 0)) {
176 while (len--) {
177 if (interrupt_server[len] == hw_cpuid)
178 return cpu_node;
179 }
180 } else {
181 reg = of_get_property(cpu_node, "reg", &len);
182 if (reg && (len > 0) && (reg[0] == hw_cpuid))
183 return cpu_node;
184 }
185 }
186
187 return NULL;
188}
189
190/* must hold reference to node during call */ 161/* must hold reference to node during call */
191static const int *of_get_associativity(struct device_node *dev) 162static const int *of_get_associativity(struct device_node *dev)
192{ 163{
@@ -290,7 +261,7 @@ static int __init find_min_common_depth(void)
290 ref_points = of_get_property(rtas_root, 261 ref_points = of_get_property(rtas_root,
291 "ibm,associativity-reference-points", &len); 262 "ibm,associativity-reference-points", &len);
292 263
293 if ((len >= 1) && ref_points) { 264 if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
294 depth = ref_points[1]; 265 depth = ref_points[1];
295 } else { 266 } else {
296 dbg("NUMA: ibm,associativity-reference-points not found.\n"); 267 dbg("NUMA: ibm,associativity-reference-points not found.\n");
@@ -470,7 +441,7 @@ static int of_drconf_to_nid_single(struct of_drconf_cell *drmem,
470static int __cpuinit numa_setup_cpu(unsigned long lcpu) 441static int __cpuinit numa_setup_cpu(unsigned long lcpu)
471{ 442{
472 int nid = 0; 443 int nid = 0;
473 struct device_node *cpu = find_cpu_node(lcpu); 444 struct device_node *cpu = of_get_cpu_node(lcpu, NULL);
474 445
475 if (!cpu) { 446 if (!cpu) {
476 WARN_ON(1); 447 WARN_ON(1);
@@ -652,7 +623,7 @@ static int __init parse_numa_properties(void)
652 for_each_present_cpu(i) { 623 for_each_present_cpu(i) {
653 int nid; 624 int nid;
654 625
655 cpu = find_cpu_node(i); 626 cpu = of_get_cpu_node(i, NULL);
656 BUG_ON(!cpu); 627 BUG_ON(!cpu);
657 nid = of_node_to_nid_single(cpu); 628 nid = of_node_to_nid_single(cpu);
658 of_node_put(cpu); 629 of_node_put(cpu);
@@ -1041,57 +1012,32 @@ early_param("numa", early_numa);
1041 1012
1042#ifdef CONFIG_MEMORY_HOTPLUG 1013#ifdef CONFIG_MEMORY_HOTPLUG
1043/* 1014/*
1044 * Validate the node associated with the memory section we are 1015 * Find the node associated with a hot added memory section for
1045 * trying to add. 1016 * memory represented in the device tree by the property
1046 */ 1017 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
1047int valid_hot_add_scn(int *nid, unsigned long start, u32 lmb_size,
1048 unsigned long scn_addr)
1049{
1050 nodemask_t nodes;
1051
1052 if (*nid < 0 || !node_online(*nid))
1053 *nid = any_online_node(NODE_MASK_ALL);
1054
1055 if ((scn_addr >= start) && (scn_addr < (start + lmb_size))) {
1056 nodes_setall(nodes);
1057 while (NODE_DATA(*nid)->node_spanned_pages == 0) {
1058 node_clear(*nid, nodes);
1059 *nid = any_online_node(nodes);
1060 }
1061
1062 return 1;
1063 }
1064
1065 return 0;
1066}
1067
1068/*
1069 * Find the node associated with a hot added memory section represented
1070 * by the ibm,dynamic-reconfiguration-memory node.
1071 */ 1018 */
1072static int hot_add_drconf_scn_to_nid(struct device_node *memory, 1019static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1073 unsigned long scn_addr) 1020 unsigned long scn_addr)
1074{ 1021{
1075 const u32 *dm; 1022 const u32 *dm;
1076 unsigned int n, rc; 1023 unsigned int drconf_cell_cnt, rc;
1077 unsigned long lmb_size; 1024 unsigned long lmb_size;
1078 int default_nid = any_online_node(NODE_MASK_ALL);
1079 int nid;
1080 struct assoc_arrays aa; 1025 struct assoc_arrays aa;
1026 int nid = -1;
1081 1027
1082 n = of_get_drconf_memory(memory, &dm); 1028 drconf_cell_cnt = of_get_drconf_memory(memory, &dm);
1083 if (!n) 1029 if (!drconf_cell_cnt)
1084 return default_nid;; 1030 return -1;
1085 1031
1086 lmb_size = of_get_lmb_size(memory); 1032 lmb_size = of_get_lmb_size(memory);
1087 if (!lmb_size) 1033 if (!lmb_size)
1088 return default_nid; 1034 return -1;
1089 1035
1090 rc = of_get_assoc_arrays(memory, &aa); 1036 rc = of_get_assoc_arrays(memory, &aa);
1091 if (rc) 1037 if (rc)
1092 return default_nid; 1038 return -1;
1093 1039
1094 for (; n != 0; --n) { 1040 for (; drconf_cell_cnt != 0; --drconf_cell_cnt) {
1095 struct of_drconf_cell drmem; 1041 struct of_drconf_cell drmem;
1096 1042
1097 read_drconf_cell(&drmem, &dm); 1043 read_drconf_cell(&drmem, &dm);
@@ -1102,15 +1048,57 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1102 || !(drmem.flags & DRCONF_MEM_ASSIGNED)) 1048 || !(drmem.flags & DRCONF_MEM_ASSIGNED))
1103 continue; 1049 continue;
1104 1050
1051 if ((scn_addr < drmem.base_addr)
1052 || (scn_addr >= (drmem.base_addr + lmb_size)))
1053 continue;
1054
1105 nid = of_drconf_to_nid_single(&drmem, &aa); 1055 nid = of_drconf_to_nid_single(&drmem, &aa);
1056 break;
1057 }
1058
1059 return nid;
1060}
1106 1061
1107 if (valid_hot_add_scn(&nid, drmem.base_addr, lmb_size, 1062/*
1108 scn_addr)) 1063 * Find the node associated with a hot added memory section for memory
1109 return nid; 1064 * represented in the device tree as a node (i.e. memory@XXXX) for
1065 * each lmb.
1066 */
1067int hot_add_node_scn_to_nid(unsigned long scn_addr)
1068{
1069 struct device_node *memory = NULL;
1070 int nid = -1;
1071
1072 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
1073 unsigned long start, size;
1074 int ranges;
1075 const unsigned int *memcell_buf;
1076 unsigned int len;
1077
1078 memcell_buf = of_get_property(memory, "reg", &len);
1079 if (!memcell_buf || len <= 0)
1080 continue;
1081
1082 /* ranges in cell */
1083 ranges = (len >> 2) / (n_mem_addr_cells + n_mem_size_cells);
1084
1085 while (ranges--) {
1086 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
1087 size = read_n_cells(n_mem_size_cells, &memcell_buf);
1088
1089 if ((scn_addr < start) || (scn_addr >= (start + size)))
1090 continue;
1091
1092 nid = of_node_to_nid_single(memory);
1093 break;
1094 }
1095
1096 of_node_put(memory);
1097 if (nid >= 0)
1098 break;
1110 } 1099 }
1111 1100
1112 BUG(); /* section address should be found above */ 1101 return nid;
1113 return 0;
1114} 1102}
1115 1103
1116/* 1104/*
@@ -1121,7 +1109,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1121int hot_add_scn_to_nid(unsigned long scn_addr) 1109int hot_add_scn_to_nid(unsigned long scn_addr)
1122{ 1110{
1123 struct device_node *memory = NULL; 1111 struct device_node *memory = NULL;
1124 int nid; 1112 int nid, found = 0;
1125 1113
1126 if (!numa_enabled || (min_common_depth < 0)) 1114 if (!numa_enabled || (min_common_depth < 0))
1127 return any_online_node(NODE_MASK_ALL); 1115 return any_online_node(NODE_MASK_ALL);
@@ -1130,35 +1118,25 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
1130 if (memory) { 1118 if (memory) {
1131 nid = hot_add_drconf_scn_to_nid(memory, scn_addr); 1119 nid = hot_add_drconf_scn_to_nid(memory, scn_addr);
1132 of_node_put(memory); 1120 of_node_put(memory);
1133 return nid; 1121 } else {
1122 nid = hot_add_node_scn_to_nid(scn_addr);
1134 } 1123 }
1135 1124
1136 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { 1125 if (nid < 0 || !node_online(nid))
1137 unsigned long start, size; 1126 nid = any_online_node(NODE_MASK_ALL);
1138 int ranges;
1139 const unsigned int *memcell_buf;
1140 unsigned int len;
1141
1142 memcell_buf = of_get_property(memory, "reg", &len);
1143 if (!memcell_buf || len <= 0)
1144 continue;
1145 1127
1146 /* ranges in cell */ 1128 if (NODE_DATA(nid)->node_spanned_pages)
1147 ranges = (len >> 2) / (n_mem_addr_cells + n_mem_size_cells); 1129 return nid;
1148ha_new_range:
1149 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
1150 size = read_n_cells(n_mem_size_cells, &memcell_buf);
1151 nid = of_node_to_nid_single(memory);
1152 1130
1153 if (valid_hot_add_scn(&nid, start, size, scn_addr)) { 1131 for_each_online_node(nid) {
1154 of_node_put(memory); 1132 if (NODE_DATA(nid)->node_spanned_pages) {
1155 return nid; 1133 found = 1;
1134 break;
1156 } 1135 }
1157
1158 if (--ranges) /* process all ranges in cell */
1159 goto ha_new_range;
1160 } 1136 }
1161 BUG(); /* section address should be found above */ 1137
1162 return 0; 1138 BUG_ON(!found);
1139 return nid;
1163} 1140}
1141
1164#endif /* CONFIG_MEMORY_HOTPLUG */ 1142#endif /* CONFIG_MEMORY_HOTPLUG */
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index 6d94116fdea1..f5c6fd42265c 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * This file contains common routines for dealing with free of page tables 2 * This file contains common routines for dealing with free of page tables
3 * Along with common page table handling code
3 * 4 *
4 * Derived from arch/powerpc/mm/tlb_64.c: 5 * Derived from arch/powerpc/mm/tlb_64.c:
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 6 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
@@ -81,11 +82,10 @@ static void pte_free_submit(struct pte_freelist_batch *batch)
81void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) 82void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
82{ 83{
83 /* This is safe since tlb_gather_mmu has disabled preemption */ 84 /* This is safe since tlb_gather_mmu has disabled preemption */
84 cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
85 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); 85 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
86 86
87 if (atomic_read(&tlb->mm->mm_users) < 2 || 87 if (atomic_read(&tlb->mm->mm_users) < 2 ||
88 cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) { 88 cpumask_equal(mm_cpumask(tlb->mm), cpumask_of(smp_processor_id()))){
89 pgtable_free(pgf); 89 pgtable_free(pgf);
90 return; 90 return;
91 } 91 }
@@ -115,3 +115,133 @@ void pte_free_finish(void)
115 pte_free_submit(*batchp); 115 pte_free_submit(*batchp);
116 *batchp = NULL; 116 *batchp = NULL;
117} 117}
118
119/*
120 * Handle i/d cache flushing, called from set_pte_at() or ptep_set_access_flags()
121 */
122static pte_t do_dcache_icache_coherency(pte_t pte)
123{
124 unsigned long pfn = pte_pfn(pte);
125 struct page *page;
126
127 if (unlikely(!pfn_valid(pfn)))
128 return pte;
129 page = pfn_to_page(pfn);
130
131 if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) {
132 pr_debug("do_dcache_icache_coherency... flushing\n");
133 flush_dcache_icache_page(page);
134 set_bit(PG_arch_1, &page->flags);
135 }
136 else
137 pr_debug("do_dcache_icache_coherency... already clean\n");
138 return __pte(pte_val(pte) | _PAGE_HWEXEC);
139}
140
141static inline int is_exec_fault(void)
142{
143 return current->thread.regs && TRAP(current->thread.regs) == 0x400;
144}
145
146/* We only try to do i/d cache coherency on stuff that looks like
147 * reasonably "normal" PTEs. We currently require a PTE to be present
148 * and we avoid _PAGE_SPECIAL and _PAGE_NO_CACHE
149 */
150static inline int pte_looks_normal(pte_t pte)
151{
152 return (pte_val(pte) &
153 (_PAGE_PRESENT | _PAGE_SPECIAL | _PAGE_NO_CACHE)) ==
154 (_PAGE_PRESENT);
155}
156
157#if defined(CONFIG_PPC_STD_MMU)
158/* Server-style MMU handles coherency when hashing if HW exec permission
159 * is supposed per page (currently 64-bit only). Else, we always flush
160 * valid PTEs in set_pte.
161 */
162static inline int pte_need_exec_flush(pte_t pte, int set_pte)
163{
164 return set_pte && pte_looks_normal(pte) &&
165 !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) ||
166 cpu_has_feature(CPU_FTR_NOEXECUTE));
167}
168#elif _PAGE_HWEXEC == 0
169/* Embedded type MMU without HW exec support (8xx only so far), we flush
170 * the cache for any present PTE
171 */
172static inline int pte_need_exec_flush(pte_t pte, int set_pte)
173{
174 return set_pte && pte_looks_normal(pte);
175}
176#else
177/* Other embedded CPUs with HW exec support per-page, we flush on exec
178 * fault if HWEXEC is not set
179 */
180static inline int pte_need_exec_flush(pte_t pte, int set_pte)
181{
182 return pte_looks_normal(pte) && is_exec_fault() &&
183 !(pte_val(pte) & _PAGE_HWEXEC);
184}
185#endif
186
187/*
188 * set_pte stores a linux PTE into the linux page table.
189 */
190void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
191{
192#ifdef CONFIG_DEBUG_VM
193 WARN_ON(pte_present(*ptep));
194#endif
195 /* Note: mm->context.id might not yet have been assigned as
196 * this context might not have been activated yet when this
197 * is called.
198 */
199 pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS);
200 if (pte_need_exec_flush(pte, 1))
201 pte = do_dcache_icache_coherency(pte);
202
203 /* Perform the setting of the PTE */
204 __set_pte_at(mm, addr, ptep, pte, 0);
205}
206
207/*
208 * This is called when relaxing access to a PTE. It's also called in the page
209 * fault path when we don't hit any of the major fault cases, ie, a minor
210 * update of _PAGE_ACCESSED, _PAGE_DIRTY, etc... The generic code will have
211 * handled those two for us, we additionally deal with missing execute
212 * permission here on some processors
213 */
214int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address,
215 pte_t *ptep, pte_t entry, int dirty)
216{
217 int changed;
218 if (!dirty && pte_need_exec_flush(entry, 0))
219 entry = do_dcache_icache_coherency(entry);
220 changed = !pte_same(*(ptep), entry);
221 if (changed) {
222 assert_pte_locked(vma->vm_mm, address);
223 __ptep_set_access_flags(ptep, entry);
224 flush_tlb_page_nohash(vma, address);
225 }
226 return changed;
227}
228
229#ifdef CONFIG_DEBUG_VM
230void assert_pte_locked(struct mm_struct *mm, unsigned long addr)
231{
232 pgd_t *pgd;
233 pud_t *pud;
234 pmd_t *pmd;
235
236 if (mm == &init_mm)
237 return;
238 pgd = mm->pgd + pgd_index(addr);
239 BUG_ON(pgd_none(*pgd));
240 pud = pud_offset(pgd, addr);
241 BUG_ON(pud_none(*pud));
242 pmd = pmd_offset(pud, addr);
243 BUG_ON(!pmd_present(*pmd));
244 BUG_ON(!spin_is_locked(pte_lockptr(mm, pmd)));
245}
246#endif /* CONFIG_DEBUG_VM */
247
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 58bcaeba728d..430d0908fa50 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -129,7 +129,8 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
129void __iomem * 129void __iomem *
130ioremap(phys_addr_t addr, unsigned long size) 130ioremap(phys_addr_t addr, unsigned long size)
131{ 131{
132 return __ioremap(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED); 132 return __ioremap_caller(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED,
133 __builtin_return_address(0));
133} 134}
134EXPORT_SYMBOL(ioremap); 135EXPORT_SYMBOL(ioremap);
135 136
@@ -143,20 +144,27 @@ ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags)
143 /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ 144 /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */
144 flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC); 145 flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC);
145 146
146 return __ioremap(addr, size, flags); 147 return __ioremap_caller(addr, size, flags, __builtin_return_address(0));
147} 148}
148EXPORT_SYMBOL(ioremap_flags); 149EXPORT_SYMBOL(ioremap_flags);
149 150
150void __iomem * 151void __iomem *
151__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) 152__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
152{ 153{
154 return __ioremap_caller(addr, size, flags, __builtin_return_address(0));
155}
156
157void __iomem *
158__ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags,
159 void *caller)
160{
153 unsigned long v, i; 161 unsigned long v, i;
154 phys_addr_t p; 162 phys_addr_t p;
155 int err; 163 int err;
156 164
157 /* Make sure we have the base flags */ 165 /* Make sure we have the base flags */
158 if ((flags & _PAGE_PRESENT) == 0) 166 if ((flags & _PAGE_PRESENT) == 0)
159 flags |= _PAGE_KERNEL; 167 flags |= PAGE_KERNEL;
160 168
161 /* Non-cacheable page cannot be coherent */ 169 /* Non-cacheable page cannot be coherent */
162 if (flags & _PAGE_NO_CACHE) 170 if (flags & _PAGE_NO_CACHE)
@@ -212,7 +220,7 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
212 220
213 if (mem_init_done) { 221 if (mem_init_done) {
214 struct vm_struct *area; 222 struct vm_struct *area;
215 area = get_vm_area(size, VM_IOREMAP); 223 area = get_vm_area_caller(size, VM_IOREMAP, caller);
216 if (area == 0) 224 if (area == 0)
217 return NULL; 225 return NULL;
218 v = (unsigned long) area->addr; 226 v = (unsigned long) area->addr;
@@ -288,7 +296,7 @@ void __init mapin_ram(void)
288 p = memstart_addr + s; 296 p = memstart_addr + s;
289 for (; s < total_lowmem; s += PAGE_SIZE) { 297 for (; s < total_lowmem; s += PAGE_SIZE) {
290 ktext = ((char *) v >= _stext && (char *) v < etext); 298 ktext = ((char *) v >= _stext && (char *) v < etext);
291 f = ktext ?_PAGE_RAM_TEXT : _PAGE_RAM; 299 f = ktext ? PAGE_KERNEL_TEXT : PAGE_KERNEL;
292 map_page(v, p, f); 300 map_page(v, p, f);
293#ifdef CONFIG_PPC_STD_MMU_32 301#ifdef CONFIG_PPC_STD_MMU_32
294 if (ktext) 302 if (ktext)
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 365e61ae5dbc..bfa7db6b2fd5 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -144,8 +144,8 @@ void __iounmap_at(void *ea, unsigned long size)
144 unmap_kernel_range((unsigned long)ea, size); 144 unmap_kernel_range((unsigned long)ea, size);
145} 145}
146 146
147void __iomem * __ioremap(phys_addr_t addr, unsigned long size, 147void __iomem * __ioremap_caller(phys_addr_t addr, unsigned long size,
148 unsigned long flags) 148 unsigned long flags, void *caller)
149{ 149{
150 phys_addr_t paligned; 150 phys_addr_t paligned;
151 void __iomem *ret; 151 void __iomem *ret;
@@ -168,8 +168,9 @@ void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
168 if (mem_init_done) { 168 if (mem_init_done) {
169 struct vm_struct *area; 169 struct vm_struct *area;
170 170
171 area = __get_vm_area(size, VM_IOREMAP, 171 area = __get_vm_area_caller(size, VM_IOREMAP,
172 ioremap_bot, IOREMAP_END); 172 ioremap_bot, IOREMAP_END,
173 caller);
173 if (area == NULL) 174 if (area == NULL)
174 return NULL; 175 return NULL;
175 ret = __ioremap_at(paligned, area->addr, size, flags); 176 ret = __ioremap_at(paligned, area->addr, size, flags);
@@ -186,19 +187,27 @@ void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
186 return ret; 187 return ret;
187} 188}
188 189
190void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
191 unsigned long flags)
192{
193 return __ioremap_caller(addr, size, flags, __builtin_return_address(0));
194}
189 195
190void __iomem * ioremap(phys_addr_t addr, unsigned long size) 196void __iomem * ioremap(phys_addr_t addr, unsigned long size)
191{ 197{
192 unsigned long flags = _PAGE_NO_CACHE | _PAGE_GUARDED; 198 unsigned long flags = _PAGE_NO_CACHE | _PAGE_GUARDED;
199 void *caller = __builtin_return_address(0);
193 200
194 if (ppc_md.ioremap) 201 if (ppc_md.ioremap)
195 return ppc_md.ioremap(addr, size, flags); 202 return ppc_md.ioremap(addr, size, flags, caller);
196 return __ioremap(addr, size, flags); 203 return __ioremap_caller(addr, size, flags, caller);
197} 204}
198 205
199void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size, 206void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
200 unsigned long flags) 207 unsigned long flags)
201{ 208{
209 void *caller = __builtin_return_address(0);
210
202 /* writeable implies dirty for kernel addresses */ 211 /* writeable implies dirty for kernel addresses */
203 if (flags & _PAGE_RW) 212 if (flags & _PAGE_RW)
204 flags |= _PAGE_DIRTY; 213 flags |= _PAGE_DIRTY;
@@ -207,8 +216,8 @@ void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
207 flags &= ~(_PAGE_USER | _PAGE_EXEC); 216 flags &= ~(_PAGE_USER | _PAGE_EXEC);
208 217
209 if (ppc_md.ioremap) 218 if (ppc_md.ioremap)
210 return ppc_md.ioremap(addr, size, flags); 219 return ppc_md.ioremap(addr, size, flags, caller);
211 return __ioremap(addr, size, flags); 220 return __ioremap_caller(addr, size, flags, caller);
212} 221}
213 222
214 223
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index fe65c405412c..2d2a87e10154 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -74,9 +74,6 @@ unsigned long p_mapped_by_bats(phys_addr_t pa)
74 74
75unsigned long __init mmu_mapin_ram(void) 75unsigned long __init mmu_mapin_ram(void)
76{ 76{
77#ifdef CONFIG_POWER4
78 return 0;
79#else
80 unsigned long tot, bl, done; 77 unsigned long tot, bl, done;
81 unsigned long max_size = (256<<20); 78 unsigned long max_size = (256<<20);
82 79
@@ -95,7 +92,7 @@ unsigned long __init mmu_mapin_ram(void)
95 break; 92 break;
96 } 93 }
97 94
98 setbat(2, PAGE_OFFSET, 0, bl, _PAGE_RAM); 95 setbat(2, PAGE_OFFSET, 0, bl, PAGE_KERNEL_X);
99 done = (unsigned long)bat_addrs[2].limit - PAGE_OFFSET + 1; 96 done = (unsigned long)bat_addrs[2].limit - PAGE_OFFSET + 1;
100 if ((done < tot) && !bat_addrs[3].limit) { 97 if ((done < tot) && !bat_addrs[3].limit) {
101 /* use BAT3 to cover a bit more */ 98 /* use BAT3 to cover a bit more */
@@ -103,12 +100,11 @@ unsigned long __init mmu_mapin_ram(void)
103 for (bl = 128<<10; bl < max_size; bl <<= 1) 100 for (bl = 128<<10; bl < max_size; bl <<= 1)
104 if (bl * 2 > tot) 101 if (bl * 2 > tot)
105 break; 102 break;
106 setbat(3, PAGE_OFFSET+done, done, bl, _PAGE_RAM); 103 setbat(3, PAGE_OFFSET+done, done, bl, PAGE_KERNEL_X);
107 done = (unsigned long)bat_addrs[3].limit - PAGE_OFFSET + 1; 104 done = (unsigned long)bat_addrs[3].limit - PAGE_OFFSET + 1;
108 } 105 }
109 106
110 return done; 107 return done;
111#endif
112} 108}
113 109
114/* 110/*
@@ -136,9 +132,7 @@ void __init setbat(int index, unsigned long virt, phys_addr_t phys,
136 wimgxpp |= (flags & _PAGE_RW)? BPP_RW: BPP_RX; 132 wimgxpp |= (flags & _PAGE_RW)? BPP_RW: BPP_RX;
137 bat[1].batu = virt | (bl << 2) | 2; /* Vs=1, Vp=0 */ 133 bat[1].batu = virt | (bl << 2) | 2; /* Vs=1, Vp=0 */
138 bat[1].batl = BAT_PHYS_ADDR(phys) | wimgxpp; 134 bat[1].batl = BAT_PHYS_ADDR(phys) | wimgxpp;
139#ifndef CONFIG_KGDB /* want user access for breakpoints */
140 if (flags & _PAGE_USER) 135 if (flags & _PAGE_USER)
141#endif
142 bat[1].batu |= 1; /* Vp = 1 */ 136 bat[1].batu |= 1; /* Vp = 1 */
143 if (flags & _PAGE_GUARDED) { 137 if (flags & _PAGE_GUARDED) {
144 /* G bit must be zero in IBATs */ 138 /* G bit must be zero in IBATs */
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index c931bc7d1079..1be1b5e59796 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -139,12 +139,12 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
139 */ 139 */
140void __flush_tlb_pending(struct ppc64_tlb_batch *batch) 140void __flush_tlb_pending(struct ppc64_tlb_batch *batch)
141{ 141{
142 cpumask_t tmp; 142 const struct cpumask *tmp;
143 int i, local = 0; 143 int i, local = 0;
144 144
145 i = batch->index; 145 i = batch->index;
146 tmp = cpumask_of_cpu(smp_processor_id()); 146 tmp = cpumask_of(smp_processor_id());
147 if (cpus_equal(batch->mm->cpu_vm_mask, tmp)) 147 if (cpumask_equal(mm_cpumask(batch->mm), tmp))
148 local = 1; 148 local = 1;
149 if (i == 1) 149 if (i == 1)
150 flush_hash_page(batch->vaddr[0], batch->pte[0], 150 flush_hash_page(batch->vaddr[0], batch->pte[0],
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 39ac22b13c73..7af72970faed 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -132,11 +132,11 @@ void flush_tlb_mm(struct mm_struct *mm)
132 pid = mm->context.id; 132 pid = mm->context.id;
133 if (unlikely(pid == MMU_NO_CONTEXT)) 133 if (unlikely(pid == MMU_NO_CONTEXT))
134 goto no_context; 134 goto no_context;
135 cpu_mask = mm->cpu_vm_mask; 135 if (!cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
136 cpu_clear(smp_processor_id(), cpu_mask);
137 if (!cpus_empty(cpu_mask)) {
138 struct tlb_flush_param p = { .pid = pid }; 136 struct tlb_flush_param p = { .pid = pid };
139 smp_call_function_mask(cpu_mask, do_flush_tlb_mm_ipi, &p, 1); 137 /* Ignores smp_processor_id() even if set. */
138 smp_call_function_many(mm_cpumask(mm),
139 do_flush_tlb_mm_ipi, &p, 1);
140 } 140 }
141 _tlbil_pid(pid); 141 _tlbil_pid(pid);
142 no_context: 142 no_context:
@@ -146,16 +146,15 @@ EXPORT_SYMBOL(flush_tlb_mm);
146 146
147void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 147void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
148{ 148{
149 cpumask_t cpu_mask; 149 struct cpumask *cpu_mask;
150 unsigned int pid; 150 unsigned int pid;
151 151
152 preempt_disable(); 152 preempt_disable();
153 pid = vma ? vma->vm_mm->context.id : 0; 153 pid = vma ? vma->vm_mm->context.id : 0;
154 if (unlikely(pid == MMU_NO_CONTEXT)) 154 if (unlikely(pid == MMU_NO_CONTEXT))
155 goto bail; 155 goto bail;
156 cpu_mask = vma->vm_mm->cpu_vm_mask; 156 cpu_mask = mm_cpumask(vma->vm_mm);
157 cpu_clear(smp_processor_id(), cpu_mask); 157 if (!cpumask_equal(cpu_mask, cpumask_of(smp_processor_id()))) {
158 if (!cpus_empty(cpu_mask)) {
159 /* If broadcast tlbivax is supported, use it */ 158 /* If broadcast tlbivax is supported, use it */
160 if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) { 159 if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
161 int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL); 160 int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
@@ -167,7 +166,8 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
167 goto bail; 166 goto bail;
168 } else { 167 } else {
169 struct tlb_flush_param p = { .pid = pid, .addr = vmaddr }; 168 struct tlb_flush_param p = { .pid = pid, .addr = vmaddr };
170 smp_call_function_mask(cpu_mask, 169 /* Ignores smp_processor_id() even if set in cpu_mask */
170 smp_call_function_many(cpu_mask,
171 do_flush_tlb_page_ipi, &p, 1); 171 do_flush_tlb_page_ipi, &p, 1);
172 } 172 }
173 } 173 }
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S
index f900a39e6ec4..788b87c36f77 100644
--- a/arch/powerpc/mm/tlb_nohash_low.S
+++ b/arch/powerpc/mm/tlb_nohash_low.S
@@ -118,25 +118,50 @@ _GLOBAL(_tlbil_pid)
118 118
119#elif defined(CONFIG_FSL_BOOKE) 119#elif defined(CONFIG_FSL_BOOKE)
120/* 120/*
121 * FSL BookE implementations. Currently _pid and _all are the 121 * FSL BookE implementations.
122 * same. This will change when tlbilx is actually supported and 122 *
123 * performs invalidate-by-PID. This change will be driven by 123 * Since feature sections are using _SECTION_ELSE we need
124 * mmu_features conditional 124 * to have the larger code path before the _SECTION_ELSE
125 */ 125 */
126 126
127#define MMUCSR0_TLBFI (MMUCSR0_TLB0FI | MMUCSR0_TLB1FI | \
128 MMUCSR0_TLB2FI | MMUCSR0_TLB3FI)
127/* 129/*
128 * Flush MMU TLB on the local processor 130 * Flush MMU TLB on the local processor
129 */ 131 */
130_GLOBAL(_tlbil_pid)
131_GLOBAL(_tlbil_all) 132_GLOBAL(_tlbil_all)
132#define MMUCSR0_TLBFI (MMUCSR0_TLB0FI | MMUCSR0_TLB1FI | \ 133BEGIN_MMU_FTR_SECTION
133 MMUCSR0_TLB2FI | MMUCSR0_TLB3FI) 134 li r3,(MMUCSR0_TLBFI)@l
135 mtspr SPRN_MMUCSR0, r3
1361:
137 mfspr r3,SPRN_MMUCSR0
138 andi. r3,r3,MMUCSR0_TLBFI@l
139 bne 1b
140MMU_FTR_SECTION_ELSE
141 PPC_TLBILX_ALL(0,0)
142ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
143 msync
144 isync
145 blr
146
147_GLOBAL(_tlbil_pid)
148BEGIN_MMU_FTR_SECTION
149 slwi r3,r3,16
150 mfmsr r10
151 wrteei 0
152 mfspr r4,SPRN_MAS6 /* save MAS6 */
153 mtspr SPRN_MAS6,r3
154 PPC_TLBILX_PID(0,0)
155 mtspr SPRN_MAS6,r4 /* restore MAS6 */
156 wrtee r10
157MMU_FTR_SECTION_ELSE
134 li r3,(MMUCSR0_TLBFI)@l 158 li r3,(MMUCSR0_TLBFI)@l
135 mtspr SPRN_MMUCSR0, r3 159 mtspr SPRN_MMUCSR0, r3
1361: 1601:
137 mfspr r3,SPRN_MMUCSR0 161 mfspr r3,SPRN_MMUCSR0
138 andi. r3,r3,MMUCSR0_TLBFI@l 162 andi. r3,r3,MMUCSR0_TLBFI@l
139 bne 1b 163 bne 1b
164ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBILX)
140 msync 165 msync
141 isync 166 isync
142 blr 167 blr
@@ -149,7 +174,9 @@ _GLOBAL(_tlbil_va)
149 mfmsr r10 174 mfmsr r10
150 wrteei 0 175 wrteei 0
151 slwi r4,r4,16 176 slwi r4,r4,16
177 ori r4,r4,(MAS6_ISIZE(BOOK3E_PAGESZ_4K))@l
152 mtspr SPRN_MAS6,r4 /* assume AS=0 for now */ 178 mtspr SPRN_MAS6,r4 /* assume AS=0 for now */
179BEGIN_MMU_FTR_SECTION
153 tlbsx 0,r3 180 tlbsx 0,r3
154 mfspr r4,SPRN_MAS1 /* check valid */ 181 mfspr r4,SPRN_MAS1 /* check valid */
155 andis. r3,r4,MAS1_VALID@h 182 andis. r3,r4,MAS1_VALID@h
@@ -157,6 +184,9 @@ _GLOBAL(_tlbil_va)
157 rlwinm r4,r4,0,1,31 184 rlwinm r4,r4,0,1,31
158 mtspr SPRN_MAS1,r4 185 mtspr SPRN_MAS1,r4
159 tlbwe 186 tlbwe
187MMU_FTR_SECTION_ELSE
188 PPC_TLBILX_VA(0,r3)
189ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
160 msync 190 msync
161 isync 191 isync
1621: wrtee r10 1921: wrtee r10
diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c
index cc599eb8768b..f8d36f940e88 100644
--- a/arch/powerpc/oprofile/op_model_7450.c
+++ b/arch/powerpc/oprofile/op_model_7450.c
@@ -29,7 +29,7 @@
29static unsigned long reset_value[OP_MAX_COUNTER]; 29static unsigned long reset_value[OP_MAX_COUNTER];
30 30
31static int oprofile_running; 31static int oprofile_running;
32static u32 mmcr0_val, mmcr1_val, mmcr2_val; 32static u32 mmcr0_val, mmcr1_val, mmcr2_val, num_pmcs;
33 33
34#define MMCR0_PMC1_SHIFT 6 34#define MMCR0_PMC1_SHIFT 6
35#define MMCR0_PMC2_SHIFT 0 35#define MMCR0_PMC2_SHIFT 0
@@ -88,13 +88,12 @@ static int fsl7450_cpu_setup(struct op_counter_config *ctr)
88 88
89 mtspr(SPRN_MMCR0, mmcr0_val); 89 mtspr(SPRN_MMCR0, mmcr0_val);
90 mtspr(SPRN_MMCR1, mmcr1_val); 90 mtspr(SPRN_MMCR1, mmcr1_val);
91 mtspr(SPRN_MMCR2, mmcr2_val); 91 if (num_pmcs > 4)
92 mtspr(SPRN_MMCR2, mmcr2_val);
92 93
93 return 0; 94 return 0;
94} 95}
95 96
96#define NUM_CTRS 6
97
98/* Configures the global settings for the countes on all CPUs. */ 97/* Configures the global settings for the countes on all CPUs. */
99static int fsl7450_reg_setup(struct op_counter_config *ctr, 98static int fsl7450_reg_setup(struct op_counter_config *ctr,
100 struct op_system_config *sys, 99 struct op_system_config *sys,
@@ -102,12 +101,13 @@ static int fsl7450_reg_setup(struct op_counter_config *ctr,
102{ 101{
103 int i; 102 int i;
104 103
104 num_pmcs = num_ctrs;
105 /* Our counters count up, and "count" refers to 105 /* Our counters count up, and "count" refers to
106 * how much before the next interrupt, and we interrupt 106 * how much before the next interrupt, and we interrupt
107 * on overflow. So we calculate the starting value 107 * on overflow. So we calculate the starting value
108 * which will give us "count" until overflow. 108 * which will give us "count" until overflow.
109 * Then we set the events on the enabled counters */ 109 * Then we set the events on the enabled counters */
110 for (i = 0; i < NUM_CTRS; ++i) 110 for (i = 0; i < num_ctrs; ++i)
111 reset_value[i] = 0x80000000UL - ctr[i].count; 111 reset_value[i] = 0x80000000UL - ctr[i].count;
112 112
113 /* Set events for Counters 1 & 2 */ 113 /* Set events for Counters 1 & 2 */
@@ -123,9 +123,10 @@ static int fsl7450_reg_setup(struct op_counter_config *ctr,
123 123
124 /* Set events for Counters 3-6 */ 124 /* Set events for Counters 3-6 */
125 mmcr1_val = mmcr1_event3(ctr[2].event) 125 mmcr1_val = mmcr1_event3(ctr[2].event)
126 | mmcr1_event4(ctr[3].event) 126 | mmcr1_event4(ctr[3].event);
127 | mmcr1_event5(ctr[4].event) 127 if (num_ctrs > 4)
128 | mmcr1_event6(ctr[5].event); 128 mmcr1_val |= mmcr1_event5(ctr[4].event)
129 | mmcr1_event6(ctr[5].event);
129 130
130 mmcr2_val = 0; 131 mmcr2_val = 0;
131 132
@@ -139,7 +140,7 @@ static int fsl7450_start(struct op_counter_config *ctr)
139 140
140 mtmsr(mfmsr() | MSR_PMM); 141 mtmsr(mfmsr() | MSR_PMM);
141 142
142 for (i = 0; i < NUM_CTRS; ++i) { 143 for (i = 0; i < num_pmcs; ++i) {
143 if (ctr[i].enabled) 144 if (ctr[i].enabled)
144 classic_ctr_write(i, reset_value[i]); 145 classic_ctr_write(i, reset_value[i]);
145 else 146 else
@@ -184,7 +185,7 @@ static void fsl7450_handle_interrupt(struct pt_regs *regs,
184 pc = mfspr(SPRN_SIAR); 185 pc = mfspr(SPRN_SIAR);
185 is_kernel = is_kernel_addr(pc); 186 is_kernel = is_kernel_addr(pc);
186 187
187 for (i = 0; i < NUM_CTRS; ++i) { 188 for (i = 0; i < num_pmcs; ++i) {
188 val = classic_ctr_read(i); 189 val = classic_ctr_read(i);
189 if (val < 0) { 190 if (val < 0) {
190 if (oprofile_running && ctr[i].enabled) { 191 if (oprofile_running && ctr[i].enabled) {
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 3496bc05058e..bf5c7ff2e6e5 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -118,6 +118,17 @@ config GLACIER
118 help 118 help
119 This option enables support for the AMCC PPC460GT evaluation board. 119 This option enables support for the AMCC PPC460GT evaluation board.
120 120
121config REDWOOD
122 bool "Redwood"
123 depends on 44x
124 default n
125 select PPC44x_SIMPLE
126 select 460SX
127 select PCI
128 select PPC4xx_PCI_EXPRESS
129 help
130 This option enables support for the AMCC PPC460SX Redwood board.
131
121config YOSEMITE 132config YOSEMITE
122 bool "Yosemite" 133 bool "Yosemite"
123 depends on 44x 134 depends on 44x
@@ -220,6 +231,14 @@ config 460EX
220 select IBM_NEW_EMAC_EMAC4 231 select IBM_NEW_EMAC_EMAC4
221 select IBM_NEW_EMAC_TAH 232 select IBM_NEW_EMAC_TAH
222 233
234config 460SX
235 bool
236 select PPC_FPU
237 select IBM_NEW_EMAC_EMAC4
238 select IBM_NEW_EMAC_RGMII
239 select IBM_NEW_EMAC_ZMII
240 select IBM_NEW_EMAC_TAH
241
223# 44x errata/workaround config symbols, selected by the CPU models above 242# 44x errata/workaround config symbols, selected by the CPU models above
224config IBM440EP_ERR42 243config IBM440EP_ERR42
225 bool 244 bool
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c
index 76fdc51dac8b..5bcd441885e8 100644
--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
@@ -57,6 +57,7 @@ static char *board[] __initdata = {
57 "ibm,ebony", 57 "ibm,ebony",
58 "amcc,katmai", 58 "amcc,katmai",
59 "amcc,rainier", 59 "amcc,rainier",
60 "amcc,redwood",
60 "amcc,sequoia", 61 "amcc,sequoia",
61 "amcc,taishan", 62 "amcc,taishan",
62 "amcc,yosemite" 63 "amcc,yosemite"
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index 326852c78b8f..4dac9b0525a4 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -12,7 +12,7 @@ config PPC_MPC5121
12 12
13config MPC5121_ADS 13config MPC5121_ADS
14 bool "Freescale MPC5121E ADS" 14 bool "Freescale MPC5121E ADS"
15 depends on PPC_MULTIPLATFORM && PPC32 15 depends on 6xx
16 select DEFAULT_UIMAGE 16 select DEFAULT_UIMAGE
17 select PPC_MPC5121 17 select PPC_MPC5121
18 select MPC5121_ADS_CPLD 18 select MPC5121_ADS_CPLD
@@ -21,7 +21,7 @@ config MPC5121_ADS
21 21
22config MPC5121_GENERIC 22config MPC5121_GENERIC
23 bool "Generic support for simple MPC5121 based boards" 23 bool "Generic support for simple MPC5121 based boards"
24 depends on PPC_MULTIPLATFORM && PPC32 24 depends on 6xx
25 select DEFAULT_UIMAGE 25 select DEFAULT_UIMAGE
26 select PPC_MPC5121 26 select PPC_MPC5121
27 help 27 help
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index 696a5ee4962d..8b8e9560a315 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -1,6 +1,6 @@
1config PPC_MPC52xx 1config PPC_MPC52xx
2 bool "52xx-based boards" 2 bool "52xx-based boards"
3 depends on PPC_MULTIPLATFORM && PPC32 3 depends on 6xx
4 select PPC_CLOCK 4 select PPC_CLOCK
5 select PPC_PCI_CHOICE 5 select PPC_PCI_CHOICE
6 6
@@ -21,7 +21,13 @@ config PPC_MPC5200_SIMPLE
21 and if there is a PCI bus node defined in the device tree. 21 and if there is a PCI bus node defined in the device tree.
22 22
23 Boards that are compatible with this generic platform support 23 Boards that are compatible with this generic platform support
24 are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'. 24 are:
25 intercontrol,digsy-mtc
26 phytec,pcm030
27 phytec,pcm032
28 promess,motionpro
29 schindler,cm5200
30 tqc,tqm5200
25 31
26config PPC_EFIKA 32config PPC_EFIKA
27 bool "bPlan Efika 5k2. MPC5200B based computer" 33 bool "bPlan Efika 5k2. MPC5200B based computer"
@@ -35,6 +41,11 @@ config PPC_LITE5200
35 depends on PPC_MPC52xx 41 depends on PPC_MPC52xx
36 select DEFAULT_UIMAGE 42 select DEFAULT_UIMAGE
37 43
44config PPC_MEDIA5200
45 bool "Freescale Media5200 Eval Board"
46 depends on PPC_MPC52xx
47 select DEFAULT_UIMAGE
48
38config PPC_MPC5200_BUGFIX 49config PPC_MPC5200_BUGFIX
39 bool "MPC5200 (L25R) bugfix support" 50 bool "MPC5200 (L25R) bugfix support"
40 depends on PPC_MPC52xx 51 depends on PPC_MPC52xx
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile
index b8a52062738a..bfd4f52cf3dd 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -1,12 +1,13 @@
1# 1#
2# Makefile for 52xx based boards 2# Makefile for 52xx based boards
3# 3#
4obj-y += mpc52xx_pic.o mpc52xx_common.o 4obj-y += mpc52xx_pic.o mpc52xx_common.o mpc52xx_gpt.o
5obj-$(CONFIG_PCI) += mpc52xx_pci.o 5obj-$(CONFIG_PCI) += mpc52xx_pci.o
6 6
7obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o 7obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
8obj-$(CONFIG_PPC_EFIKA) += efika.o 8obj-$(CONFIG_PPC_EFIKA) += efika.o
9obj-$(CONFIG_PPC_LITE5200) += lite5200.o 9obj-$(CONFIG_PPC_LITE5200) += lite5200.o
10obj-$(CONFIG_PPC_MEDIA5200) += media5200.o
10 11
11obj-$(CONFIG_PM) += mpc52xx_sleep.o mpc52xx_pm.o 12obj-$(CONFIG_PM) += mpc52xx_sleep.o mpc52xx_pm.o
12ifeq ($(CONFIG_PPC_LITE5200),y) 13ifeq ($(CONFIG_PPC_LITE5200),y)
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
new file mode 100644
index 000000000000..68e4f1696d14
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -0,0 +1,273 @@
1/*
2 * Support for 'media5200-platform' compatible boards.
3 *
4 * Copyright (C) 2008 Secret Lab Technologies Ltd.
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 * Description:
12 * This code implements support for the Freescape Media5200 platform
13 * (built around the MPC5200 SoC).
14 *
15 * Notable characteristic of the Media5200 is the presence of an FPGA
16 * that has all external IRQ lines routed through it. This file implements
17 * a cascaded interrupt controller driver which attaches itself to the
18 * Virtual IRQ subsystem after the primary mpc5200 interrupt controller
19 * is initialized.
20 *
21 */
22
23#undef DEBUG
24
25#include <linux/irq.h>
26#include <linux/interrupt.h>
27#include <linux/io.h>
28#include <asm/time.h>
29#include <asm/prom.h>
30#include <asm/machdep.h>
31#include <asm/mpc52xx.h>
32
33static struct of_device_id mpc5200_gpio_ids[] __initdata = {
34 { .compatible = "fsl,mpc5200-gpio", },
35 { .compatible = "mpc5200-gpio", },
36 {}
37};
38
39/* FPGA register set */
40#define MEDIA5200_IRQ_ENABLE (0x40c)
41#define MEDIA5200_IRQ_STATUS (0x410)
42#define MEDIA5200_NUM_IRQS (6)
43#define MEDIA5200_IRQ_SHIFT (32 - MEDIA5200_NUM_IRQS)
44
45struct media5200_irq {
46 void __iomem *regs;
47 spinlock_t lock;
48 struct irq_host *irqhost;
49};
50struct media5200_irq media5200_irq;
51
52static void media5200_irq_unmask(unsigned int virq)
53{
54 unsigned long flags;
55 u32 val;
56
57 spin_lock_irqsave(&media5200_irq.lock, flags);
58 val = in_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE);
59 val |= 1 << (MEDIA5200_IRQ_SHIFT + irq_map[virq].hwirq);
60 out_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE, val);
61 spin_unlock_irqrestore(&media5200_irq.lock, flags);
62}
63
64static void media5200_irq_mask(unsigned int virq)
65{
66 unsigned long flags;
67 u32 val;
68
69 spin_lock_irqsave(&media5200_irq.lock, flags);
70 val = in_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE);
71 val &= ~(1 << (MEDIA5200_IRQ_SHIFT + irq_map[virq].hwirq));
72 out_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE, val);
73 spin_unlock_irqrestore(&media5200_irq.lock, flags);
74}
75
76static struct irq_chip media5200_irq_chip = {
77 .typename = "Media5200 FPGA",
78 .unmask = media5200_irq_unmask,
79 .mask = media5200_irq_mask,
80 .mask_ack = media5200_irq_mask,
81};
82
83void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
84{
85 int sub_virq, val;
86 u32 status, enable;
87
88 /* Mask off the cascaded IRQ */
89 spin_lock(&desc->lock);
90 desc->chip->mask(virq);
91 spin_unlock(&desc->lock);
92
93 /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs
94 * are pending. 'ffs()' is 1 based */
95 status = in_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE);
96 enable = in_be32(media5200_irq.regs + MEDIA5200_IRQ_STATUS);
97 val = ffs((status & enable) >> MEDIA5200_IRQ_SHIFT);
98 if (val) {
99 sub_virq = irq_linear_revmap(media5200_irq.irqhost, val - 1);
100 /* pr_debug("%s: virq=%i s=%.8x e=%.8x hwirq=%i subvirq=%i\n",
101 * __func__, virq, status, enable, val - 1, sub_virq);
102 */
103 generic_handle_irq(sub_virq);
104 }
105
106 /* Processing done; can reenable the cascade now */
107 spin_lock(&desc->lock);
108 desc->chip->ack(virq);
109 if (!(desc->status & IRQ_DISABLED))
110 desc->chip->unmask(virq);
111 spin_unlock(&desc->lock);
112}
113
114static int media5200_irq_map(struct irq_host *h, unsigned int virq,
115 irq_hw_number_t hw)
116{
117 struct irq_desc *desc = get_irq_desc(virq);
118
119 pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw);
120 set_irq_chip_data(virq, &media5200_irq);
121 set_irq_chip_and_handler(virq, &media5200_irq_chip, handle_level_irq);
122 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
123 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
124 desc->status |= IRQ_TYPE_LEVEL_LOW | IRQ_LEVEL;
125
126 return 0;
127}
128
129static int media5200_irq_xlate(struct irq_host *h, struct device_node *ct,
130 u32 *intspec, unsigned int intsize,
131 irq_hw_number_t *out_hwirq,
132 unsigned int *out_flags)
133{
134 if (intsize != 2)
135 return -1;
136
137 pr_debug("%s: bank=%i, number=%i\n", __func__, intspec[0], intspec[1]);
138 *out_hwirq = intspec[1];
139 *out_flags = IRQ_TYPE_NONE;
140 return 0;
141}
142
143static struct irq_host_ops media5200_irq_ops = {
144 .map = media5200_irq_map,
145 .xlate = media5200_irq_xlate,
146};
147
148/*
149 * Setup Media5200 IRQ mapping
150 */
151static void __init media5200_init_irq(void)
152{
153 struct device_node *fpga_np;
154 int cascade_virq;
155
156 /* First setup the regular MPC5200 interrupt controller */
157 mpc52xx_init_irq();
158
159 /* Now find the FPGA IRQ */
160 fpga_np = of_find_compatible_node(NULL, NULL, "fsl,media5200-fpga");
161 if (!fpga_np)
162 goto out;
163 pr_debug("%s: found fpga node: %s\n", __func__, fpga_np->full_name);
164
165 media5200_irq.regs = of_iomap(fpga_np, 0);
166 if (!media5200_irq.regs)
167 goto out;
168 pr_debug("%s: mapped to %p\n", __func__, media5200_irq.regs);
169
170 cascade_virq = irq_of_parse_and_map(fpga_np, 0);
171 if (!cascade_virq)
172 goto out;
173 pr_debug("%s: cascaded on virq=%i\n", __func__, cascade_virq);
174
175 /* Disable all FPGA IRQs */
176 out_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE, 0);
177
178 spin_lock_init(&media5200_irq.lock);
179
180 media5200_irq.irqhost = irq_alloc_host(fpga_np, IRQ_HOST_MAP_LINEAR,
181 MEDIA5200_NUM_IRQS,
182 &media5200_irq_ops, -1);
183 if (!media5200_irq.irqhost)
184 goto out;
185 pr_debug("%s: allocated irqhost\n", __func__);
186
187 media5200_irq.irqhost->host_data = &media5200_irq;
188
189 set_irq_data(cascade_virq, &media5200_irq);
190 set_irq_chained_handler(cascade_virq, media5200_irq_cascade);
191
192 return;
193
194 out:
195 pr_err("Could not find Media5200 FPGA; PCI interrupts will not work\n");
196}
197
198/*
199 * Setup the architecture
200 */
201static void __init media5200_setup_arch(void)
202{
203
204 struct device_node *np;
205 struct mpc52xx_gpio __iomem *gpio;
206 u32 port_config;
207
208 if (ppc_md.progress)
209 ppc_md.progress("media5200_setup_arch()", 0);
210
211 /* Map important registers from the internal memory map */
212 mpc52xx_map_common_devices();
213
214 /* Some mpc5200 & mpc5200b related configuration */
215 mpc5200_setup_xlb_arbiter();
216
217 mpc52xx_setup_pci();
218
219 np = of_find_matching_node(NULL, mpc5200_gpio_ids);
220 gpio = of_iomap(np, 0);
221 of_node_put(np);
222 if (!gpio) {
223 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
224 __func__);
225 return;
226 }
227
228 /* Set port config */
229 port_config = in_be32(&gpio->port_config);
230
231 port_config &= ~0x03000000; /* ATA CS is on csb_4/5 */
232 port_config |= 0x01000000;
233
234 out_be32(&gpio->port_config, port_config);
235
236 /* Unmap zone */
237 iounmap(gpio);
238
239}
240
241/* list of the supported boards */
242static char *board[] __initdata = {
243 "fsl,media5200",
244 NULL
245};
246
247/*
248 * Called very early, MMU is off, device-tree isn't unflattened
249 */
250static int __init media5200_probe(void)
251{
252 unsigned long node = of_get_flat_dt_root();
253 int i = 0;
254
255 while (board[i]) {
256 if (of_flat_dt_is_compatible(node, board[i]))
257 break;
258 i++;
259 }
260
261 return (board[i] != NULL);
262}
263
264define_machine(media5200_platform) {
265 .name = "media5200-platform",
266 .probe = media5200_probe,
267 .setup_arch = media5200_setup_arch,
268 .init = mpc52xx_declare_of_platform_devices,
269 .init_IRQ = media5200_init_irq,
270 .get_irq = mpc52xx_get_irq,
271 .restart = mpc52xx_restart,
272 .calibrate_decr = generic_calibrate_decr,
273};
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index a3bda0b9f1ff..c31e5b534f0a 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -50,8 +50,10 @@ static void __init mpc5200_simple_setup_arch(void)
50 50
51/* list of the supported boards */ 51/* list of the supported boards */
52static char *board[] __initdata = { 52static char *board[] __initdata = {
53 "promess,motionpro", 53 "intercontrol,digsy-mtc",
54 "phytec,pcm030", 54 "phytec,pcm030",
55 "phytec,pcm032",
56 "promess,motionpro",
55 "schindler,cm5200", 57 "schindler,cm5200",
56 "tqc,tqm5200", 58 "tqc,tqm5200",
57 NULL 59 NULL
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 98367a0255f3..8e3dd5a0f228 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -28,9 +28,10 @@ static struct of_device_id mpc52xx_xlb_ids[] __initdata = {
28static struct of_device_id mpc52xx_bus_ids[] __initdata = { 28static struct of_device_id mpc52xx_bus_ids[] __initdata = {
29 { .compatible = "fsl,mpc5200-immr", }, 29 { .compatible = "fsl,mpc5200-immr", },
30 { .compatible = "fsl,mpc5200b-immr", }, 30 { .compatible = "fsl,mpc5200b-immr", },
31 { .compatible = "fsl,lpb", }, 31 { .compatible = "simple-bus", },
32 32
33 /* depreciated matches; shouldn't be used in new device trees */ 33 /* depreciated matches; shouldn't be used in new device trees */
34 { .compatible = "fsl,lpb", },
34 { .type = "builtin", .compatible = "mpc5200", }, /* efika */ 35 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
35 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */ 36 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
36 {} 37 {}
@@ -205,6 +206,43 @@ int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
205EXPORT_SYMBOL(mpc52xx_set_psc_clkdiv); 206EXPORT_SYMBOL(mpc52xx_set_psc_clkdiv);
206 207
207/** 208/**
209 * mpc52xx_get_xtal_freq - Get SYS_XTAL_IN frequency for a device
210 *
211 * @node: device node
212 *
213 * Returns the frequency of the external oscillator clock connected
214 * to the SYS_XTAL_IN pin, or 0 if it cannot be determined.
215 */
216unsigned int mpc52xx_get_xtal_freq(struct device_node *node)
217{
218 u32 val;
219 unsigned int freq;
220
221 if (!mpc52xx_cdm)
222 return 0;
223
224 freq = mpc52xx_find_ipb_freq(node);
225 if (!freq)
226 return 0;
227
228 if (in_8(&mpc52xx_cdm->ipb_clk_sel) & 0x1)
229 freq *= 2;
230
231 val = in_be32(&mpc52xx_cdm->rstcfg);
232 if (val & (1 << 5))
233 freq *= 8;
234 else
235 freq *= 4;
236 if (val & (1 << 6))
237 freq /= 12;
238 else
239 freq /= 16;
240
241 return freq;
242}
243EXPORT_SYMBOL(mpc52xx_get_xtal_freq);
244
245/**
208 * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer 246 * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
209 */ 247 */
210void 248void
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 07f89ae46d04..2b8d8ef32e4e 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -354,88 +354,6 @@ static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
354 .remove = mpc52xx_gpiochip_remove, 354 .remove = mpc52xx_gpiochip_remove,
355}; 355};
356 356
357/*
358 * GPIO LIB API implementation for gpt GPIOs.
359 *
360 * Each gpt only has a single GPIO.
361 */
362static int mpc52xx_gpt_gpio_get(struct gpio_chip *gc, unsigned int gpio)
363{
364 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
365 struct mpc52xx_gpt __iomem *regs = mm_gc->regs;
366
367 return (in_be32(&regs->status) & (1 << (31 - 23))) ? 1 : 0;
368}
369
370static void
371mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
372{
373 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
374 struct mpc52xx_gpt __iomem *regs = mm_gc->regs;
375
376 if (val)
377 out_be32(&regs->mode, 0x34);
378 else
379 out_be32(&regs->mode, 0x24);
380
381 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
382}
383
384static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
385{
386 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
387 struct mpc52xx_gpt __iomem *regs = mm_gc->regs;
388
389 out_be32(&regs->mode, 0x04);
390
391 return 0;
392}
393
394static int
395mpc52xx_gpt_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
396{
397 mpc52xx_gpt_gpio_set(gc, gpio, val);
398 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
399
400 return 0;
401}
402
403static int __devinit mpc52xx_gpt_gpiochip_probe(struct of_device *ofdev,
404 const struct of_device_id *match)
405{
406 struct of_mm_gpio_chip *mmchip;
407 struct of_gpio_chip *chip;
408
409 mmchip = kzalloc(sizeof(*mmchip), GFP_KERNEL);
410 if (!mmchip)
411 return -ENOMEM;
412
413 chip = &mmchip->of_gc;
414
415 chip->gpio_cells = 2;
416 chip->gc.ngpio = 1;
417 chip->gc.direction_input = mpc52xx_gpt_gpio_dir_in;
418 chip->gc.direction_output = mpc52xx_gpt_gpio_dir_out;
419 chip->gc.get = mpc52xx_gpt_gpio_get;
420 chip->gc.set = mpc52xx_gpt_gpio_set;
421
422 return of_mm_gpiochip_add(ofdev->node, mmchip);
423}
424
425static const struct of_device_id mpc52xx_gpt_gpiochip_match[] = {
426 {
427 .compatible = "fsl,mpc5200-gpt-gpio",
428 },
429 {}
430};
431
432static struct of_platform_driver mpc52xx_gpt_gpiochip_driver = {
433 .name = "gpio_gpt",
434 .match_table = mpc52xx_gpt_gpiochip_match,
435 .probe = mpc52xx_gpt_gpiochip_probe,
436 .remove = mpc52xx_gpiochip_remove,
437};
438
439static int __init mpc52xx_gpio_init(void) 357static int __init mpc52xx_gpio_init(void)
440{ 358{
441 if (of_register_platform_driver(&mpc52xx_wkup_gpiochip_driver)) 359 if (of_register_platform_driver(&mpc52xx_wkup_gpiochip_driver))
@@ -444,9 +362,6 @@ static int __init mpc52xx_gpio_init(void)
444 if (of_register_platform_driver(&mpc52xx_simple_gpiochip_driver)) 362 if (of_register_platform_driver(&mpc52xx_simple_gpiochip_driver))
445 printk(KERN_ERR "Unable to register simple GPIO driver\n"); 363 printk(KERN_ERR "Unable to register simple GPIO driver\n");
446 364
447 if (of_register_platform_driver(&mpc52xx_gpt_gpiochip_driver))
448 printk(KERN_ERR "Unable to register gpt GPIO driver\n");
449
450 return 0; 365 return 0;
451} 366}
452 367
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
new file mode 100644
index 000000000000..bfbcd418e690
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -0,0 +1,396 @@
1/*
2 * MPC5200 General Purpose Timer device driver
3 *
4 * Copyright (c) 2009 Secret Lab Technologies Ltd.
5 * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * This file is a driver for the the General Purpose Timer (gpt) devices
13 * found on the MPC5200 SoC. Each timer has an IO pin which can be used
14 * for GPIO or can be used to raise interrupts. The timer function can
15 * be used independently from the IO pin, or it can be used to control
16 * output signals or measure input signals.
17 *
18 * This driver supports the GPIO and IRQ controller functions of the GPT
19 * device. Timer functions are not yet supported, nor is the watchdog
20 * timer.
21 *
22 * To use the GPIO function, the following two properties must be added
23 * to the device tree node for the gpt device (typically in the .dts file
24 * for the board):
25 * gpio-controller;
26 * #gpio-cells = < 2 >;
27 * This driver will register the GPIO pin if it finds the gpio-controller
28 * property in the device tree.
29 *
30 * To use the IRQ controller function, the following two properties must
31 * be added to the device tree node for the gpt device:
32 * interrupt-controller;
33 * #interrupt-cells = < 1 >;
34 * The IRQ controller binding only uses one cell to specify the interrupt,
35 * and the IRQ flags are encoded in the cell. A cell is not used to encode
36 * the IRQ number because the GPT only has a single IRQ source. For flags,
37 * a value of '1' means rising edge sensitive and '2' means falling edge.
38 *
39 * The GPIO and the IRQ controller functions can be used at the same time,
40 * but in this use case the IO line will only work as an input. Trying to
41 * use it as a GPIO output will not work.
42 *
43 * When using the GPIO line as an output, it can either be driven as normal
44 * IO, or it can be an Open Collector (OC) output. At the moment it is the
45 * responsibility of either the bootloader or the platform setup code to set
46 * the output mode. This driver does not change the output mode setting.
47 */
48
49#include <linux/irq.h>
50#include <linux/interrupt.h>
51#include <linux/io.h>
52#include <linux/of.h>
53#include <linux/of_platform.h>
54#include <linux/of_gpio.h>
55#include <linux/kernel.h>
56#include <asm/mpc52xx.h>
57
58MODULE_DESCRIPTION("Freescale MPC52xx gpt driver");
59MODULE_AUTHOR("Sascha Hauer, Grant Likely");
60MODULE_LICENSE("GPL");
61
62/**
63 * struct mpc52xx_gpt - Private data structure for MPC52xx GPT driver
64 * @dev: pointer to device structure
65 * @regs: virtual address of GPT registers
66 * @lock: spinlock to coordinate between different functions.
67 * @of_gc: of_gpio_chip instance structure; used when GPIO is enabled
68 * @irqhost: Pointer to irq_host instance; used when IRQ mode is supported
69 */
70struct mpc52xx_gpt_priv {
71 struct device *dev;
72 struct mpc52xx_gpt __iomem *regs;
73 spinlock_t lock;
74 struct irq_host *irqhost;
75
76#if defined(CONFIG_GPIOLIB)
77 struct of_gpio_chip of_gc;
78#endif
79};
80
81#define MPC52xx_GPT_MODE_MS_MASK (0x07)
82#define MPC52xx_GPT_MODE_MS_IC (0x01)
83#define MPC52xx_GPT_MODE_MS_OC (0x02)
84#define MPC52xx_GPT_MODE_MS_PWM (0x03)
85#define MPC52xx_GPT_MODE_MS_GPIO (0x04)
86
87#define MPC52xx_GPT_MODE_GPIO_MASK (0x30)
88#define MPC52xx_GPT_MODE_GPIO_OUT_LOW (0x20)
89#define MPC52xx_GPT_MODE_GPIO_OUT_HIGH (0x30)
90
91#define MPC52xx_GPT_MODE_IRQ_EN (0x0100)
92
93#define MPC52xx_GPT_MODE_ICT_MASK (0x030000)
94#define MPC52xx_GPT_MODE_ICT_RISING (0x010000)
95#define MPC52xx_GPT_MODE_ICT_FALLING (0x020000)
96#define MPC52xx_GPT_MODE_ICT_TOGGLE (0x030000)
97
98#define MPC52xx_GPT_STATUS_IRQMASK (0x000f)
99
100/* ---------------------------------------------------------------------
101 * Cascaded interrupt controller hooks
102 */
103
104static void mpc52xx_gpt_irq_unmask(unsigned int virq)
105{
106 struct mpc52xx_gpt_priv *gpt = get_irq_chip_data(virq);
107 unsigned long flags;
108
109 spin_lock_irqsave(&gpt->lock, flags);
110 setbits32(&gpt->regs->mode, MPC52xx_GPT_MODE_IRQ_EN);
111 spin_unlock_irqrestore(&gpt->lock, flags);
112}
113
114static void mpc52xx_gpt_irq_mask(unsigned int virq)
115{
116 struct mpc52xx_gpt_priv *gpt = get_irq_chip_data(virq);
117 unsigned long flags;
118
119 spin_lock_irqsave(&gpt->lock, flags);
120 clrbits32(&gpt->regs->mode, MPC52xx_GPT_MODE_IRQ_EN);
121 spin_unlock_irqrestore(&gpt->lock, flags);
122}
123
124static void mpc52xx_gpt_irq_ack(unsigned int virq)
125{
126 struct mpc52xx_gpt_priv *gpt = get_irq_chip_data(virq);
127
128 out_be32(&gpt->regs->status, MPC52xx_GPT_STATUS_IRQMASK);
129}
130
131static int mpc52xx_gpt_irq_set_type(unsigned int virq, unsigned int flow_type)
132{
133 struct mpc52xx_gpt_priv *gpt = get_irq_chip_data(virq);
134 unsigned long flags;
135 u32 reg;
136
137 dev_dbg(gpt->dev, "%s: virq=%i type=%x\n", __func__, virq, flow_type);
138
139 spin_lock_irqsave(&gpt->lock, flags);
140 reg = in_be32(&gpt->regs->mode) & ~MPC52xx_GPT_MODE_ICT_MASK;
141 if (flow_type & IRQF_TRIGGER_RISING)
142 reg |= MPC52xx_GPT_MODE_ICT_RISING;
143 if (flow_type & IRQF_TRIGGER_FALLING)
144 reg |= MPC52xx_GPT_MODE_ICT_FALLING;
145 out_be32(&gpt->regs->mode, reg);
146 spin_unlock_irqrestore(&gpt->lock, flags);
147
148 return 0;
149}
150
151static struct irq_chip mpc52xx_gpt_irq_chip = {
152 .typename = "MPC52xx GPT",
153 .unmask = mpc52xx_gpt_irq_unmask,
154 .mask = mpc52xx_gpt_irq_mask,
155 .ack = mpc52xx_gpt_irq_ack,
156 .set_type = mpc52xx_gpt_irq_set_type,
157};
158
159void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc)
160{
161 struct mpc52xx_gpt_priv *gpt = get_irq_data(virq);
162 int sub_virq;
163 u32 status;
164
165 status = in_be32(&gpt->regs->status) & MPC52xx_GPT_STATUS_IRQMASK;
166 if (status) {
167 sub_virq = irq_linear_revmap(gpt->irqhost, 0);
168 generic_handle_irq(sub_virq);
169 }
170}
171
172static int mpc52xx_gpt_irq_map(struct irq_host *h, unsigned int virq,
173 irq_hw_number_t hw)
174{
175 struct mpc52xx_gpt_priv *gpt = h->host_data;
176
177 dev_dbg(gpt->dev, "%s: h=%p, virq=%i\n", __func__, h, virq);
178 set_irq_chip_data(virq, gpt);
179 set_irq_chip_and_handler(virq, &mpc52xx_gpt_irq_chip, handle_edge_irq);
180
181 return 0;
182}
183
184static int mpc52xx_gpt_irq_xlate(struct irq_host *h, struct device_node *ct,
185 u32 *intspec, unsigned int intsize,
186 irq_hw_number_t *out_hwirq,
187 unsigned int *out_flags)
188{
189 struct mpc52xx_gpt_priv *gpt = h->host_data;
190
191 dev_dbg(gpt->dev, "%s: flags=%i\n", __func__, intspec[0]);
192
193 if ((intsize < 1) || (intspec[0] < 1) || (intspec[0] > 3)) {
194 dev_err(gpt->dev, "bad irq specifier in %s\n", ct->full_name);
195 return -EINVAL;
196 }
197
198 *out_hwirq = 0; /* The GPT only has 1 IRQ line */
199 *out_flags = intspec[0];
200
201 return 0;
202}
203
204static struct irq_host_ops mpc52xx_gpt_irq_ops = {
205 .map = mpc52xx_gpt_irq_map,
206 .xlate = mpc52xx_gpt_irq_xlate,
207};
208
209static void
210mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)
211{
212 int cascade_virq;
213 unsigned long flags;
214
215 /* Only setup cascaded IRQ if device tree claims the GPT is
216 * an interrupt controller */
217 if (!of_find_property(node, "interrupt-controller", NULL))
218 return;
219
220 cascade_virq = irq_of_parse_and_map(node, 0);
221
222 gpt->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 1,
223 &mpc52xx_gpt_irq_ops, -1);
224 if (!gpt->irqhost) {
225 dev_err(gpt->dev, "irq_alloc_host() failed\n");
226 return;
227 }
228
229 gpt->irqhost->host_data = gpt;
230
231 set_irq_data(cascade_virq, gpt);
232 set_irq_chained_handler(cascade_virq, mpc52xx_gpt_irq_cascade);
233
234 /* Set to Input Capture mode */
235 spin_lock_irqsave(&gpt->lock, flags);
236 clrsetbits_be32(&gpt->regs->mode, MPC52xx_GPT_MODE_MS_MASK,
237 MPC52xx_GPT_MODE_MS_IC);
238 spin_unlock_irqrestore(&gpt->lock, flags);
239
240 dev_dbg(gpt->dev, "%s() complete. virq=%i\n", __func__, cascade_virq);
241}
242
243
244/* ---------------------------------------------------------------------
245 * GPIOLIB hooks
246 */
247#if defined(CONFIG_GPIOLIB)
248static inline struct mpc52xx_gpt_priv *gc_to_mpc52xx_gpt(struct gpio_chip *gc)
249{
250 return container_of(to_of_gpio_chip(gc), struct mpc52xx_gpt_priv,of_gc);
251}
252
253static int mpc52xx_gpt_gpio_get(struct gpio_chip *gc, unsigned int gpio)
254{
255 struct mpc52xx_gpt_priv *gpt = gc_to_mpc52xx_gpt(gc);
256
257 return (in_be32(&gpt->regs->status) >> 8) & 1;
258}
259
260static void
261mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int v)
262{
263 struct mpc52xx_gpt_priv *gpt = gc_to_mpc52xx_gpt(gc);
264 unsigned long flags;
265 u32 r;
266
267 dev_dbg(gpt->dev, "%s: gpio:%d v:%d\n", __func__, gpio, v);
268 r = v ? MPC52xx_GPT_MODE_GPIO_OUT_HIGH : MPC52xx_GPT_MODE_GPIO_OUT_LOW;
269
270 spin_lock_irqsave(&gpt->lock, flags);
271 clrsetbits_be32(&gpt->regs->mode, MPC52xx_GPT_MODE_GPIO_MASK, r);
272 spin_unlock_irqrestore(&gpt->lock, flags);
273}
274
275static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
276{
277 struct mpc52xx_gpt_priv *gpt = gc_to_mpc52xx_gpt(gc);
278 unsigned long flags;
279
280 dev_dbg(gpt->dev, "%s: gpio:%d\n", __func__, gpio);
281
282 spin_lock_irqsave(&gpt->lock, flags);
283 clrbits32(&gpt->regs->mode, MPC52xx_GPT_MODE_GPIO_MASK);
284 spin_unlock_irqrestore(&gpt->lock, flags);
285
286 return 0;
287}
288
289static int
290mpc52xx_gpt_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
291{
292 mpc52xx_gpt_gpio_set(gc, gpio, val);
293 return 0;
294}
295
296static void
297mpc52xx_gpt_gpio_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)
298{
299 int rc;
300
301 /* Only setup GPIO if the device tree claims the GPT is
302 * a GPIO controller */
303 if (!of_find_property(node, "gpio-controller", NULL))
304 return;
305
306 gpt->of_gc.gc.label = kstrdup(node->full_name, GFP_KERNEL);
307 if (!gpt->of_gc.gc.label) {
308 dev_err(gpt->dev, "out of memory\n");
309 return;
310 }
311
312 gpt->of_gc.gpio_cells = 2;
313 gpt->of_gc.gc.ngpio = 1;
314 gpt->of_gc.gc.direction_input = mpc52xx_gpt_gpio_dir_in;
315 gpt->of_gc.gc.direction_output = mpc52xx_gpt_gpio_dir_out;
316 gpt->of_gc.gc.get = mpc52xx_gpt_gpio_get;
317 gpt->of_gc.gc.set = mpc52xx_gpt_gpio_set;
318 gpt->of_gc.gc.base = -1;
319 gpt->of_gc.xlate = of_gpio_simple_xlate;
320 node->data = &gpt->of_gc;
321 of_node_get(node);
322
323 /* Setup external pin in GPIO mode */
324 clrsetbits_be32(&gpt->regs->mode, MPC52xx_GPT_MODE_MS_MASK,
325 MPC52xx_GPT_MODE_MS_GPIO);
326
327 rc = gpiochip_add(&gpt->of_gc.gc);
328 if (rc)
329 dev_err(gpt->dev, "gpiochip_add() failed; rc=%i\n", rc);
330
331 dev_dbg(gpt->dev, "%s() complete.\n", __func__);
332}
333#else /* defined(CONFIG_GPIOLIB) */
334static void
335mpc52xx_gpt_gpio_setup(struct mpc52xx_gpt_priv *p, struct device_node *np) { }
336#endif /* defined(CONFIG_GPIOLIB) */
337
338/* ---------------------------------------------------------------------
339 * of_platform bus binding code
340 */
341static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
342 const struct of_device_id *match)
343{
344 struct mpc52xx_gpt_priv *gpt;
345
346 gpt = kzalloc(sizeof *gpt, GFP_KERNEL);
347 if (!gpt)
348 return -ENOMEM;
349
350 spin_lock_init(&gpt->lock);
351 gpt->dev = &ofdev->dev;
352 gpt->regs = of_iomap(ofdev->node, 0);
353 if (!gpt->regs) {
354 kfree(gpt);
355 return -ENOMEM;
356 }
357
358 dev_set_drvdata(&ofdev->dev, gpt);
359
360 mpc52xx_gpt_gpio_setup(gpt, ofdev->node);
361 mpc52xx_gpt_irq_setup(gpt, ofdev->node);
362
363 return 0;
364}
365
366static int mpc52xx_gpt_remove(struct of_device *ofdev)
367{
368 return -EBUSY;
369}
370
371static const struct of_device_id mpc52xx_gpt_match[] = {
372 { .compatible = "fsl,mpc5200-gpt", },
373
374 /* Depreciated compatible values; don't use for new dts files */
375 { .compatible = "fsl,mpc5200-gpt-gpio", },
376 { .compatible = "mpc5200-gpt", },
377 {}
378};
379
380static struct of_platform_driver mpc52xx_gpt_driver = {
381 .name = "mpc52xx-gpt",
382 .match_table = mpc52xx_gpt_match,
383 .probe = mpc52xx_gpt_probe,
384 .remove = mpc52xx_gpt_remove,
385};
386
387static int __init mpc52xx_gpt_init(void)
388{
389 if (of_register_platform_driver(&mpc52xx_gpt_driver))
390 pr_err("error registering MPC52xx GPT driver\n");
391
392 return 0;
393}
394
395/* Make sure GPIOs and IRQs get set up before anyone tries to use them */
396subsys_initcall(mpc52xx_gpt_init);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 0a093f03c758..480f806fd0a9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -163,8 +163,6 @@ static void mpc52xx_extirq_mask(unsigned int virq)
163 irq = irq_map[virq].hwirq; 163 irq = irq_map[virq].hwirq;
164 l2irq = irq & MPC52xx_IRQ_L2_MASK; 164 l2irq = irq & MPC52xx_IRQ_L2_MASK;
165 165
166 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
167
168 io_be_clrbit(&intr->ctrl, 11 - l2irq); 166 io_be_clrbit(&intr->ctrl, 11 - l2irq);
169} 167}
170 168
@@ -176,8 +174,6 @@ static void mpc52xx_extirq_unmask(unsigned int virq)
176 irq = irq_map[virq].hwirq; 174 irq = irq_map[virq].hwirq;
177 l2irq = irq & MPC52xx_IRQ_L2_MASK; 175 l2irq = irq & MPC52xx_IRQ_L2_MASK;
178 176
179 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
180
181 io_be_setbit(&intr->ctrl, 11 - l2irq); 177 io_be_setbit(&intr->ctrl, 11 - l2irq);
182} 178}
183 179
@@ -189,17 +185,15 @@ static void mpc52xx_extirq_ack(unsigned int virq)
189 irq = irq_map[virq].hwirq; 185 irq = irq_map[virq].hwirq;
190 l2irq = irq & MPC52xx_IRQ_L2_MASK; 186 l2irq = irq & MPC52xx_IRQ_L2_MASK;
191 187
192 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
193
194 io_be_setbit(&intr->ctrl, 27-l2irq); 188 io_be_setbit(&intr->ctrl, 27-l2irq);
195} 189}
196 190
197static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) 191static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
198{ 192{
199 struct irq_desc *desc = get_irq_desc(virq);
200 u32 ctrl_reg, type; 193 u32 ctrl_reg, type;
201 int irq; 194 int irq;
202 int l2irq; 195 int l2irq;
196 void *handler = handle_level_irq;
203 197
204 irq = irq_map[virq].hwirq; 198 irq = irq_map[virq].hwirq;
205 l2irq = irq & MPC52xx_IRQ_L2_MASK; 199 l2irq = irq & MPC52xx_IRQ_L2_MASK;
@@ -207,32 +201,21 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
207 pr_debug("%s: irq=%x. l2=%d flow_type=%d\n", __func__, irq, l2irq, flow_type); 201 pr_debug("%s: irq=%x. l2=%d flow_type=%d\n", __func__, irq, l2irq, flow_type);
208 202
209 switch (flow_type) { 203 switch (flow_type) {
210 case IRQF_TRIGGER_HIGH: 204 case IRQF_TRIGGER_HIGH: type = 0; break;
211 type = 0; 205 case IRQF_TRIGGER_RISING: type = 1; handler = handle_edge_irq; break;
212 break; 206 case IRQF_TRIGGER_FALLING: type = 2; handler = handle_edge_irq; break;
213 case IRQF_TRIGGER_RISING: 207 case IRQF_TRIGGER_LOW: type = 3; break;
214 type = 1;
215 break;
216 case IRQF_TRIGGER_FALLING:
217 type = 2;
218 break;
219 case IRQF_TRIGGER_LOW:
220 type = 3;
221 break;
222 default: 208 default:
223 type = 0; 209 type = 0;
224 } 210 }
225 211
226 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
227 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
228 if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
229 desc->status |= IRQ_LEVEL;
230
231 ctrl_reg = in_be32(&intr->ctrl); 212 ctrl_reg = in_be32(&intr->ctrl);
232 ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); 213 ctrl_reg &= ~(0x3 << (22 - (l2irq * 2)));
233 ctrl_reg |= (type << (22 - (l2irq * 2))); 214 ctrl_reg |= (type << (22 - (l2irq * 2)));
234 out_be32(&intr->ctrl, ctrl_reg); 215 out_be32(&intr->ctrl, ctrl_reg);
235 216
217 __set_irq_handler_unlocked(virq, handler);
218
236 return 0; 219 return 0;
237} 220}
238 221
@@ -247,6 +230,11 @@ static struct irq_chip mpc52xx_extirq_irqchip = {
247/* 230/*
248 * Main interrupt irq_chip 231 * Main interrupt irq_chip
249 */ 232 */
233static int mpc52xx_null_set_type(unsigned int virq, unsigned int flow_type)
234{
235 return 0; /* Do nothing so that the sense mask will get updated */
236}
237
250static void mpc52xx_main_mask(unsigned int virq) 238static void mpc52xx_main_mask(unsigned int virq)
251{ 239{
252 int irq; 240 int irq;
@@ -255,8 +243,6 @@ static void mpc52xx_main_mask(unsigned int virq)
255 irq = irq_map[virq].hwirq; 243 irq = irq_map[virq].hwirq;
256 l2irq = irq & MPC52xx_IRQ_L2_MASK; 244 l2irq = irq & MPC52xx_IRQ_L2_MASK;
257 245
258 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
259
260 io_be_setbit(&intr->main_mask, 16 - l2irq); 246 io_be_setbit(&intr->main_mask, 16 - l2irq);
261} 247}
262 248
@@ -268,8 +254,6 @@ static void mpc52xx_main_unmask(unsigned int virq)
268 irq = irq_map[virq].hwirq; 254 irq = irq_map[virq].hwirq;
269 l2irq = irq & MPC52xx_IRQ_L2_MASK; 255 l2irq = irq & MPC52xx_IRQ_L2_MASK;
270 256
271 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
272
273 io_be_clrbit(&intr->main_mask, 16 - l2irq); 257 io_be_clrbit(&intr->main_mask, 16 - l2irq);
274} 258}
275 259
@@ -278,6 +262,7 @@ static struct irq_chip mpc52xx_main_irqchip = {
278 .mask = mpc52xx_main_mask, 262 .mask = mpc52xx_main_mask,
279 .mask_ack = mpc52xx_main_mask, 263 .mask_ack = mpc52xx_main_mask,
280 .unmask = mpc52xx_main_unmask, 264 .unmask = mpc52xx_main_unmask,
265 .set_type = mpc52xx_null_set_type,
281}; 266};
282 267
283/* 268/*
@@ -291,8 +276,6 @@ static void mpc52xx_periph_mask(unsigned int virq)
291 irq = irq_map[virq].hwirq; 276 irq = irq_map[virq].hwirq;
292 l2irq = irq & MPC52xx_IRQ_L2_MASK; 277 l2irq = irq & MPC52xx_IRQ_L2_MASK;
293 278
294 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
295
296 io_be_setbit(&intr->per_mask, 31 - l2irq); 279 io_be_setbit(&intr->per_mask, 31 - l2irq);
297} 280}
298 281
@@ -304,8 +287,6 @@ static void mpc52xx_periph_unmask(unsigned int virq)
304 irq = irq_map[virq].hwirq; 287 irq = irq_map[virq].hwirq;
305 l2irq = irq & MPC52xx_IRQ_L2_MASK; 288 l2irq = irq & MPC52xx_IRQ_L2_MASK;
306 289
307 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
308
309 io_be_clrbit(&intr->per_mask, 31 - l2irq); 290 io_be_clrbit(&intr->per_mask, 31 - l2irq);
310} 291}
311 292
@@ -314,6 +295,7 @@ static struct irq_chip mpc52xx_periph_irqchip = {
314 .mask = mpc52xx_periph_mask, 295 .mask = mpc52xx_periph_mask,
315 .mask_ack = mpc52xx_periph_mask, 296 .mask_ack = mpc52xx_periph_mask,
316 .unmask = mpc52xx_periph_unmask, 297 .unmask = mpc52xx_periph_unmask,
298 .set_type = mpc52xx_null_set_type,
317}; 299};
318 300
319/* 301/*
@@ -327,8 +309,6 @@ static void mpc52xx_sdma_mask(unsigned int virq)
327 irq = irq_map[virq].hwirq; 309 irq = irq_map[virq].hwirq;
328 l2irq = irq & MPC52xx_IRQ_L2_MASK; 310 l2irq = irq & MPC52xx_IRQ_L2_MASK;
329 311
330 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
331
332 io_be_setbit(&sdma->IntMask, l2irq); 312 io_be_setbit(&sdma->IntMask, l2irq);
333} 313}
334 314
@@ -340,8 +320,6 @@ static void mpc52xx_sdma_unmask(unsigned int virq)
340 irq = irq_map[virq].hwirq; 320 irq = irq_map[virq].hwirq;
341 l2irq = irq & MPC52xx_IRQ_L2_MASK; 321 l2irq = irq & MPC52xx_IRQ_L2_MASK;
342 322
343 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
344
345 io_be_clrbit(&sdma->IntMask, l2irq); 323 io_be_clrbit(&sdma->IntMask, l2irq);
346} 324}
347 325
@@ -353,8 +331,6 @@ static void mpc52xx_sdma_ack(unsigned int virq)
353 irq = irq_map[virq].hwirq; 331 irq = irq_map[virq].hwirq;
354 l2irq = irq & MPC52xx_IRQ_L2_MASK; 332 l2irq = irq & MPC52xx_IRQ_L2_MASK;
355 333
356 pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
357
358 out_be32(&sdma->IntPend, 1 << l2irq); 334 out_be32(&sdma->IntPend, 1 << l2irq);
359} 335}
360 336
@@ -363,9 +339,19 @@ static struct irq_chip mpc52xx_sdma_irqchip = {
363 .mask = mpc52xx_sdma_mask, 339 .mask = mpc52xx_sdma_mask,
364 .unmask = mpc52xx_sdma_unmask, 340 .unmask = mpc52xx_sdma_unmask,
365 .ack = mpc52xx_sdma_ack, 341 .ack = mpc52xx_sdma_ack,
342 .set_type = mpc52xx_null_set_type,
366}; 343};
367 344
368/** 345/**
346 * mpc52xx_is_extirq - Returns true if hwirq number is for an external IRQ
347 */
348static int mpc52xx_is_extirq(int l1, int l2)
349{
350 return ((l1 == 0) && (l2 == 0)) ||
351 ((l1 == 1) && (l2 >= 1) && (l2 <= 3));
352}
353
354/**
369 * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property 355 * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property
370 */ 356 */
371static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, 357static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct,
@@ -383,38 +369,23 @@ static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct,
383 369
384 intrvect_l1 = (int)intspec[0]; 370 intrvect_l1 = (int)intspec[0];
385 intrvect_l2 = (int)intspec[1]; 371 intrvect_l2 = (int)intspec[1];
386 intrvect_type = (int)intspec[2]; 372 intrvect_type = (int)intspec[2] & 0x3;
387 373
388 intrvect_linux = (intrvect_l1 << MPC52xx_IRQ_L1_OFFSET) & 374 intrvect_linux = (intrvect_l1 << MPC52xx_IRQ_L1_OFFSET) &
389 MPC52xx_IRQ_L1_MASK; 375 MPC52xx_IRQ_L1_MASK;
390 intrvect_linux |= intrvect_l2 & MPC52xx_IRQ_L2_MASK; 376 intrvect_linux |= intrvect_l2 & MPC52xx_IRQ_L2_MASK;
391 377
392 pr_debug("return %x, l1=%d, l2=%d\n", intrvect_linux, intrvect_l1,
393 intrvect_l2);
394
395 *out_hwirq = intrvect_linux; 378 *out_hwirq = intrvect_linux;
396 *out_flags = mpc52xx_map_senses[intrvect_type]; 379 *out_flags = IRQ_TYPE_LEVEL_LOW;
380 if (mpc52xx_is_extirq(intrvect_l1, intrvect_l2))
381 *out_flags = mpc52xx_map_senses[intrvect_type];
397 382
383 pr_debug("return %x, l1=%d, l2=%d\n", intrvect_linux, intrvect_l1,
384 intrvect_l2);
398 return 0; 385 return 0;
399} 386}
400 387
401/** 388/**
402 * mpc52xx_irqx_gettype - determine the IRQ sense type (level/edge)
403 *
404 * Only external IRQs need this.
405 */
406static int mpc52xx_irqx_gettype(int irq)
407{
408 int type;
409 u32 ctrl_reg;
410
411 ctrl_reg = in_be32(&intr->ctrl);
412 type = (ctrl_reg >> (22 - irq * 2)) & 0x3;
413
414 return mpc52xx_map_senses[type];
415}
416
417/**
418 * mpc52xx_irqhost_map - Hook to map from virq to an irq_chip structure 389 * mpc52xx_irqhost_map - Hook to map from virq to an irq_chip structure
419 */ 390 */
420static int mpc52xx_irqhost_map(struct irq_host *h, unsigned int virq, 391static int mpc52xx_irqhost_map(struct irq_host *h, unsigned int virq,
@@ -422,68 +393,46 @@ static int mpc52xx_irqhost_map(struct irq_host *h, unsigned int virq,
422{ 393{
423 int l1irq; 394 int l1irq;
424 int l2irq; 395 int l2irq;
425 struct irq_chip *good_irqchip; 396 struct irq_chip *irqchip;
426 void *good_handle; 397 void *hndlr;
427 int type; 398 int type;
399 u32 reg;
428 400
429 l1irq = (irq & MPC52xx_IRQ_L1_MASK) >> MPC52xx_IRQ_L1_OFFSET; 401 l1irq = (irq & MPC52xx_IRQ_L1_MASK) >> MPC52xx_IRQ_L1_OFFSET;
430 l2irq = irq & MPC52xx_IRQ_L2_MASK; 402 l2irq = irq & MPC52xx_IRQ_L2_MASK;
431 403
432 /* 404 /*
433 * Most of ours IRQs will be level low 405 * External IRQs are handled differently by the hardware so they are
434 * Only external IRQs on some platform may be others 406 * handled by a dedicated irq_chip structure.
435 */ 407 */
436 type = IRQ_TYPE_LEVEL_LOW; 408 if (mpc52xx_is_extirq(l1irq, l2irq)) {
409 reg = in_be32(&intr->ctrl);
410 type = mpc52xx_map_senses[(reg >> (22 - l2irq * 2)) & 0x3];
411 if ((type == IRQ_TYPE_EDGE_FALLING) ||
412 (type == IRQ_TYPE_EDGE_RISING))
413 hndlr = handle_edge_irq;
414 else
415 hndlr = handle_level_irq;
416
417 set_irq_chip_and_handler(virq, &mpc52xx_extirq_irqchip, hndlr);
418 pr_debug("%s: External IRQ%i virq=%x, hw=%x. type=%x\n",
419 __func__, l2irq, virq, (int)irq, type);
420 return 0;
421 }
437 422
423 /* It is an internal SOC irq. Choose the correct irq_chip */
438 switch (l1irq) { 424 switch (l1irq) {
439 case MPC52xx_IRQ_L1_CRIT: 425 case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break;
440 pr_debug("%s: Critical. l2=%x\n", __func__, l2irq); 426 case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break;
441 427 case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break;
442 BUG_ON(l2irq != 0);
443
444 type = mpc52xx_irqx_gettype(l2irq);
445 good_irqchip = &mpc52xx_extirq_irqchip;
446 break;
447
448 case MPC52xx_IRQ_L1_MAIN:
449 pr_debug("%s: Main IRQ[1-3] l2=%x\n", __func__, l2irq);
450
451 if ((l2irq >= 1) && (l2irq <= 3)) {
452 type = mpc52xx_irqx_gettype(l2irq);
453 good_irqchip = &mpc52xx_extirq_irqchip;
454 } else {
455 good_irqchip = &mpc52xx_main_irqchip;
456 }
457 break;
458
459 case MPC52xx_IRQ_L1_PERP:
460 pr_debug("%s: Peripherals. l2=%x\n", __func__, l2irq);
461 good_irqchip = &mpc52xx_periph_irqchip;
462 break;
463
464 case MPC52xx_IRQ_L1_SDMA:
465 pr_debug("%s: SDMA. l2=%x\n", __func__, l2irq);
466 good_irqchip = &mpc52xx_sdma_irqchip;
467 break;
468
469 default: 428 default:
470 pr_err("%s: invalid virq requested (0x%x)\n", __func__, virq); 429 pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n",
430 __func__, virq, l1irq, l2irq);
471 return -EINVAL; 431 return -EINVAL;
472 } 432 }
473 433
474 switch (type) { 434 set_irq_chip_and_handler(virq, irqchip, handle_level_irq);
475 case IRQ_TYPE_EDGE_FALLING: 435 pr_debug("%s: virq=%x, l1=%i, l2=%i\n", __func__, virq, l1irq, l2irq);
476 case IRQ_TYPE_EDGE_RISING:
477 good_handle = handle_edge_irq;
478 break;
479 default:
480 good_handle = handle_level_irq;
481 }
482
483 set_irq_chip_and_handler(virq, good_irqchip, good_handle);
484
485 pr_debug("%s: virq=%x, hw=%x. type=%x\n", __func__, virq,
486 (int)irq, type);
487 436
488 return 0; 437 return 0;
489} 438}
@@ -522,6 +471,8 @@ void __init mpc52xx_init_irq(void)
522 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. " 471 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
523 "Check node !"); 472 "Check node !");
524 473
474 pr_debug("MPC5200 IRQ controller mapped to 0x%p\n", intr);
475
525 /* Disable all interrupt sources. */ 476 /* Disable all interrupt sources. */
526 out_be32(&sdma->IntPend, 0xffffffff); /* 1 means clear pending */ 477 out_be32(&sdma->IntPend, 0xffffffff); /* 1 means clear pending */
527 out_be32(&sdma->IntMask, 0xffffffff); /* 1 means disabled */ 478 out_be32(&sdma->IntMask, 0xffffffff); /* 1 means disabled */
@@ -613,8 +564,5 @@ unsigned int mpc52xx_get_irq(void)
613 } 564 }
614 } 565 }
615 566
616 pr_debug("%s: irq=%x. virq=%d\n", __func__, irq,
617 irq_linear_revmap(mpc52xx_irqhost, irq));
618
619 return irq_linear_revmap(mpc52xx_irqhost, irq); 567 return irq_linear_revmap(mpc52xx_irqhost, irq);
620} 568}
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index 30f008b2f92e..7c7df4003820 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -1,6 +1,6 @@
1menuconfig PPC_82xx 1menuconfig PPC_82xx
2 bool "82xx-based boards (PQ II)" 2 bool "82xx-based boards (PQ II)"
3 depends on 6xx && PPC_MULTIPLATFORM 3 depends on 6xx
4 4
5if PPC_82xx 5if PPC_82xx
6 6
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 83c664afc897..437d29a59d72 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -1,6 +1,6 @@
1menuconfig PPC_83xx 1menuconfig PPC_83xx
2 bool "83xx-based boards" 2 bool "83xx-based boards"
3 depends on 6xx && PPC_MULTIPLATFORM 3 depends on 6xx
4 select PPC_UDBG_16550 4 select PPC_UDBG_16550
5 select PPC_PCI_CHOICE 5 select PPC_PCI_CHOICE
6 select FSL_PCI if PCI 6 select FSL_PCI if PCI
diff --git a/arch/powerpc/platforms/83xx/asp834x.c b/arch/powerpc/platforms/83xx/asp834x.c
index bb30d67ad0a2..aa0d84d22585 100644
--- a/arch/powerpc/platforms/83xx/asp834x.c
+++ b/arch/powerpc/platforms/83xx/asp834x.c
@@ -58,6 +58,7 @@ static struct __initdata of_device_id asp8347_ids[] = {
58 { .type = "soc", }, 58 { .type = "soc", },
59 { .compatible = "soc", }, 59 { .compatible = "soc", },
60 { .compatible = "simple-bus", }, 60 { .compatible = "simple-bus", },
61 { .compatible = "gianfar", },
61 {}, 62 {},
62}; 63};
63 64
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index 91a2c80b9d72..0b4f883b20eb 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -38,6 +38,8 @@ static void __init mpc831x_rdb_setup_arch(void)
38#ifdef CONFIG_PCI 38#ifdef CONFIG_PCI
39 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") 39 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
40 mpc83xx_add_bridge(np); 40 mpc83xx_add_bridge(np);
41 for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
42 mpc83xx_add_bridge(np);
41#endif 43#endif
42 mpc831x_usb_cfg(); 44 mpc831x_usb_cfg();
43} 45}
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 2a1295f19832..567ded7c3b9b 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -20,6 +20,7 @@
20#include <linux/spi/mmc_spi.h> 20#include <linux/spi/mmc_spi.h>
21#include <linux/mmc/host.h> 21#include <linux/mmc/host.h>
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <linux/fsl_devices.h>
23 24
24#include <asm/time.h> 25#include <asm/time.h>
25#include <asm/ipic.h> 26#include <asm/ipic.h>
@@ -39,16 +40,116 @@
39#endif 40#endif
40 41
41#ifdef CONFIG_QUICC_ENGINE 42#ifdef CONFIG_QUICC_ENGINE
42static void mpc83xx_spi_activate_cs(u8 cs, u8 polarity) 43static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
44 struct spi_board_info *board_infos,
45 unsigned int num_board_infos,
46 void (*cs_control)(struct spi_device *dev,
47 bool on))
43{ 48{
44 pr_debug("%s %d %d\n", __func__, cs, polarity); 49 struct device_node *np;
45 par_io_data_set(3, 13, polarity); 50 unsigned int i = 0;
51
52 for_each_compatible_node(np, type, compatible) {
53 int ret;
54 unsigned int j;
55 const void *prop;
56 struct resource res[2];
57 struct platform_device *pdev;
58 struct fsl_spi_platform_data pdata = {
59 .cs_control = cs_control,
60 };
61
62 memset(res, 0, sizeof(res));
63
64 pdata.sysclk = sysclk;
65
66 prop = of_get_property(np, "reg", NULL);
67 if (!prop)
68 goto err;
69 pdata.bus_num = *(u32 *)prop;
70
71 prop = of_get_property(np, "cell-index", NULL);
72 if (prop)
73 i = *(u32 *)prop;
74
75 prop = of_get_property(np, "mode", NULL);
76 if (prop && !strcmp(prop, "cpu-qe"))
77 pdata.qe_mode = 1;
78
79 for (j = 0; j < num_board_infos; j++) {
80 if (board_infos[j].bus_num == pdata.bus_num)
81 pdata.max_chipselect++;
82 }
83
84 if (!pdata.max_chipselect)
85 continue;
86
87 ret = of_address_to_resource(np, 0, &res[0]);
88 if (ret)
89 goto err;
90
91 ret = of_irq_to_resource(np, 0, &res[1]);
92 if (ret == NO_IRQ)
93 goto err;
94
95 pdev = platform_device_alloc("mpc83xx_spi", i);
96 if (!pdev)
97 goto err;
98
99 ret = platform_device_add_data(pdev, &pdata, sizeof(pdata));
100 if (ret)
101 goto unreg;
102
103 ret = platform_device_add_resources(pdev, res,
104 ARRAY_SIZE(res));
105 if (ret)
106 goto unreg;
107
108 ret = platform_device_add(pdev);
109 if (ret)
110 goto unreg;
111
112 goto next;
113unreg:
114 platform_device_del(pdev);
115err:
116 pr_err("%s: registration failed\n", np->full_name);
117next:
118 i++;
119 }
120
121 return i;
46} 122}
47 123
48static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity) 124static int __init fsl_spi_init(struct spi_board_info *board_infos,
125 unsigned int num_board_infos,
126 void (*cs_control)(struct spi_device *spi,
127 bool on))
49{ 128{
50 pr_debug("%s %d %d\n", __func__, cs, polarity); 129 u32 sysclk = -1;
51 par_io_data_set(3, 13, !polarity); 130 int ret;
131
132 /* SPI controller is either clocked from QE or SoC clock */
133 sysclk = get_brgfreq();
134 if (sysclk == -1) {
135 sysclk = fsl_get_sys_freq();
136 if (sysclk == -1)
137 return -ENODEV;
138 }
139
140 ret = of_fsl_spi_probe(NULL, "fsl,spi", sysclk, board_infos,
141 num_board_infos, cs_control);
142 if (!ret)
143 of_fsl_spi_probe("spi", "fsl_spi", sysclk, board_infos,
144 num_board_infos, cs_control);
145
146 return spi_register_board_info(board_infos, num_board_infos);
147}
148
149static void mpc83xx_spi_cs_control(struct spi_device *spi, bool on)
150{
151 pr_debug("%s %d %d\n", __func__, spi->chip_select, on);
152 par_io_data_set(3, 13, on);
52} 153}
53 154
54static struct mmc_spi_platform_data mpc832x_mmc_pdata = { 155static struct mmc_spi_platform_data mpc832x_mmc_pdata = {
@@ -74,9 +175,13 @@ static int __init mpc832x_spi_init(void)
74 par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */ 175 par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */
75 par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */ 176 par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */
76 177
77 return fsl_spi_init(&mpc832x_spi_boardinfo, 1, 178 /*
78 mpc83xx_spi_activate_cs, 179 * Don't bother with legacy stuff when device tree contains
79 mpc83xx_spi_deactivate_cs); 180 * mmc-spi-slot node.
181 */
182 if (of_find_compatible_node(NULL, NULL, "mmc-spi-slot"))
183 return 0;
184 return fsl_spi_init(&mpc832x_spi_boardinfo, 1, mpc83xx_spi_cs_control);
80} 185}
81machine_device_initcall(mpc832x_rdb, mpc832x_spi_init); 186machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
82#endif /* CONFIG_QUICC_ENGINE */ 187#endif /* CONFIG_QUICC_ENGINE */
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 76092d37c7d9..81e44fa1c644 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -42,6 +42,7 @@
42static struct of_device_id __initdata mpc834x_itx_ids[] = { 42static struct of_device_id __initdata mpc834x_itx_ids[] = {
43 { .compatible = "fsl,pq2pro-localbus", }, 43 { .compatible = "fsl,pq2pro-localbus", },
44 { .compatible = "simple-bus", }, 44 { .compatible = "simple-bus", },
45 { .compatible = "gianfar", },
45 {}, 46 {},
46}; 47};
47 48
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index fc3f2ed1f3e9..d0a634b056ca 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -112,6 +112,7 @@ static struct of_device_id mpc834x_ids[] = {
112 { .type = "soc", }, 112 { .type = "soc", },
113 { .compatible = "soc", }, 113 { .compatible = "soc", },
114 { .compatible = "simple-bus", }, 114 { .compatible = "simple-bus", },
115 { .compatible = "gianfar", },
115 {}, 116 {},
116}; 117};
117 118
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 530ef990ca7c..51df7e754698 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -84,14 +84,10 @@ static void __init mpc837x_mds_setup_arch(void)
84 ppc_md.progress("mpc837x_mds_setup_arch()", 0); 84 ppc_md.progress("mpc837x_mds_setup_arch()", 0);
85 85
86#ifdef CONFIG_PCI 86#ifdef CONFIG_PCI
87 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") { 87 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
88 if (!of_device_is_available(np)) { 88 mpc83xx_add_bridge(np);
89 pr_warning("%s: disabled by the firmware.\n", 89 for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
90 np->full_name);
91 continue;
92 }
93 mpc83xx_add_bridge(np); 90 mpc83xx_add_bridge(np);
94 }
95#endif 91#endif
96 mpc837xmds_usb_cfg(); 92 mpc837xmds_usb_cfg();
97} 93}
@@ -100,6 +96,7 @@ static struct of_device_id mpc837x_ids[] = {
100 { .type = "soc", }, 96 { .type = "soc", },
101 { .compatible = "soc", }, 97 { .compatible = "soc", },
102 { .compatible = "simple-bus", }, 98 { .compatible = "simple-bus", },
99 { .compatible = "gianfar", },
103 {}, 100 {},
104}; 101};
105 102
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 1d096545322b..76f3b32a155e 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -38,6 +38,8 @@ static void __init mpc837x_rdb_setup_arch(void)
38#ifdef CONFIG_PCI 38#ifdef CONFIG_PCI
39 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") 39 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
40 mpc83xx_add_bridge(np); 40 mpc83xx_add_bridge(np);
41 for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
42 mpc83xx_add_bridge(np);
41#endif 43#endif
42 mpc837x_usb_cfg(); 44 mpc837x_usb_cfg();
43} 45}
@@ -46,6 +48,7 @@ static struct of_device_id mpc837x_ids[] = {
46 { .type = "soc", }, 48 { .type = "soc", },
47 { .compatible = "soc", }, 49 { .compatible = "soc", },
48 { .compatible = "simple-bus", }, 50 { .compatible = "simple-bus", },
51 { .compatible = "gianfar", },
49 {}, 52 {},
50}; 53};
51 54
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
index 156c4e218009..49023dbe1576 100644
--- a/arch/powerpc/platforms/83xx/sbc834x.c
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -84,6 +84,7 @@ static struct __initdata of_device_id sbc834x_ids[] = {
84 { .type = "soc", }, 84 { .type = "soc", },
85 { .compatible = "soc", }, 85 { .compatible = "soc", },
86 { .compatible = "simple-bus", }, 86 { .compatible = "simple-bus", },
87 { .compatible = "gianfar", },
87 {}, 88 {},
88}; 89};
89 90
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index cc99c280aad9..11e1fac17c7f 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -14,6 +14,7 @@
14#include <linux/stddef.h> 14#include <linux/stddef.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/of.h>
17 18
18#include <asm/io.h> 19#include <asm/io.h>
19#include <asm/prom.h> 20#include <asm/prom.h>
@@ -210,7 +211,7 @@ int mpc837x_usb_cfg(void)
210 int ret = 0; 211 int ret = 0;
211 212
212 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); 213 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
213 if (!np) 214 if (!np || !of_device_is_available(np))
214 return -ENODEV; 215 return -ENODEV;
215 prop = of_get_property(np, "phy_type", NULL); 216 prop = of_get_property(np, "phy_type", NULL);
216 217
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index b79dc710ed34..7f066adc068c 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -51,6 +51,12 @@ config MPC85xx_DS
51 help 51 help
52 This option enables support for the MPC85xx DS (MPC8544 DS) board 52 This option enables support for the MPC85xx DS (MPC8544 DS) board
53 53
54config SOCRATES
55 bool "Socrates"
56 select DEFAULT_UIMAGE
57 help
58 This option enables support for the Socrates board.
59
54config KSI8560 60config KSI8560
55 bool "Emerson KSI8560" 61 bool "Emerson KSI8560"
56 select DEFAULT_UIMAGE 62 select DEFAULT_UIMAGE
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index f0798c09980f..a857b35b9828 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -13,4 +13,5 @@ obj-$(CONFIG_STX_GP3) += stx_gp3.o
13obj-$(CONFIG_TQM85xx) += tqm85xx.o 13obj-$(CONFIG_TQM85xx) += tqm85xx.o
14obj-$(CONFIG_SBC8560) += sbc8560.o 14obj-$(CONFIG_SBC8560) += sbc8560.o
15obj-$(CONFIG_SBC8548) += sbc8548.o 15obj-$(CONFIG_SBC8548) += sbc8548.o
16obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o
16obj-$(CONFIG_KSI8560) += ksi8560.o 17obj-$(CONFIG_KSI8560) += ksi8560.o
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
index 81cee7bbf2d2..f4d36b5a2e00 100644
--- a/arch/powerpc/platforms/85xx/ksi8560.c
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -106,8 +106,6 @@ static void __init ksi8560_pic_init(void)
106 cpm2_pic_init(np); 106 cpm2_pic_init(np);
107 of_node_put(np); 107 of_node_put(np);
108 set_irq_chained_handler(irq, cpm2_cascade); 108 set_irq_chained_handler(irq, cpm2_cascade);
109
110 setup_irq(0, NULL);
111#endif 109#endif
112} 110}
113 111
@@ -221,6 +219,7 @@ static struct of_device_id __initdata of_bus_ids[] = {
221 { .type = "simple-bus", }, 219 { .type = "simple-bus", },
222 { .name = "cpm", }, 220 { .name = "cpm", },
223 { .name = "localbus", }, 221 { .name = "localbus", },
222 { .compatible = "gianfar", },
224 {}, 223 {},
225}; 224};
226 225
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 1bf5aefdfeb1..63efca20d7bd 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -92,6 +92,7 @@ static struct of_device_id __initdata mpc8536_ds_ids[] = {
92 { .type = "soc", }, 92 { .type = "soc", },
93 { .compatible = "soc", }, 93 { .compatible = "soc", },
94 { .compatible = "simple-bus", }, 94 { .compatible = "simple-bus", },
95 { .compatible = "gianfar", },
95 {}, 96 {},
96}; 97};
97 98
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 21f009023e26..9438a892afc4 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -226,6 +226,7 @@ static struct of_device_id __initdata of_bus_ids[] = {
226 { .name = "cpm", }, 226 { .name = "cpm", },
227 { .name = "localbus", }, 227 { .name = "localbus", },
228 { .compatible = "simple-bus", }, 228 { .compatible = "simple-bus", },
229 { .compatible = "gianfar", },
229 {}, 230 {},
230}; 231};
231 232
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index aeb6a5bc5522..458d91fba91d 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -179,7 +179,6 @@ static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id)
179static struct irqaction mpc85xxcds_8259_irqaction = { 179static struct irqaction mpc85xxcds_8259_irqaction = {
180 .handler = mpc85xx_8259_cascade_action, 180 .handler = mpc85xx_8259_cascade_action,
181 .flags = IRQF_SHARED, 181 .flags = IRQF_SHARED,
182 .mask = CPU_MASK_NONE,
183 .name = "8259 cascade", 182 .name = "8259 cascade",
184}; 183};
185#endif /* PPC_I8259 */ 184#endif /* PPC_I8259 */
@@ -336,6 +335,7 @@ static struct of_device_id __initdata of_bus_ids[] = {
336 { .type = "soc", }, 335 { .type = "soc", },
337 { .compatible = "soc", }, 336 { .compatible = "soc", },
338 { .compatible = "simple-bus", }, 337 { .compatible = "simple-bus", },
338 { .compatible = "gianfar", },
339 {}, 339 {},
340}; 340};
341 341
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 7326d904202c..de66de7a9ca2 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -204,6 +204,7 @@ static struct of_device_id __initdata mpc85xxds_ids[] = {
204 { .type = "soc", }, 204 { .type = "soc", },
205 { .compatible = "soc", }, 205 { .compatible = "soc", },
206 { .compatible = "simple-bus", }, 206 { .compatible = "simple-bus", },
207 { .compatible = "gianfar", },
207 {}, 208 {},
208}; 209};
209 210
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 658a36fab3ab..7dd029034aec 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -265,6 +265,7 @@ static struct of_device_id mpc85xx_ids[] = {
265 { .compatible = "simple-bus", }, 265 { .compatible = "simple-bus", },
266 { .type = "qe", }, 266 { .type = "qe", },
267 { .compatible = "fsl,qe", }, 267 { .compatible = "fsl,qe", },
268 { .compatible = "gianfar", },
268 {}, 269 {},
269}; 270};
270 271
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
index 7ec77ce12dad..ecdd8c09e4ed 100644
--- a/arch/powerpc/platforms/85xx/sbc8548.c
+++ b/arch/powerpc/platforms/85xx/sbc8548.c
@@ -154,6 +154,7 @@ static struct of_device_id __initdata of_bus_ids[] = {
154 { .name = "soc", }, 154 { .name = "soc", },
155 { .type = "soc", }, 155 { .type = "soc", },
156 { .compatible = "simple-bus", }, 156 { .compatible = "simple-bus", },
157 { .compatible = "gianfar", },
157 {}, 158 {},
158}; 159};
159 160
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
index 472f254a19d2..cc27807a8b64 100644
--- a/arch/powerpc/platforms/85xx/sbc8560.c
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -213,6 +213,7 @@ static struct of_device_id __initdata of_bus_ids[] = {
213 { .name = "cpm", }, 213 { .name = "cpm", },
214 { .name = "localbus", }, 214 { .name = "localbus", },
215 { .compatible = "simple-bus", }, 215 { .compatible = "simple-bus", },
216 { .compatible = "gianfar", },
216 {}, 217 {},
217}; 218};
218 219
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 79a0df17078b..cc0b0db8a6f3 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -21,6 +21,7 @@
21#include <asm/page.h> 21#include <asm/page.h>
22#include <asm/mpic.h> 22#include <asm/mpic.h>
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/dbell.h>
24 25
25#include <sysdev/fsl_soc.h> 26#include <sysdev/fsl_soc.h>
26 27
@@ -80,10 +81,8 @@ smp_85xx_kick_cpu(int nr)
80} 81}
81 82
82static void __init 83static void __init
83smp_85xx_setup_cpu(int cpu_nr) 84smp_85xx_basic_setup(int cpu_nr)
84{ 85{
85 mpic_setup_this_cpu();
86
87 /* Clear any pending timer interrupts */ 86 /* Clear any pending timer interrupts */
88 mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); 87 mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
89 88
@@ -91,15 +90,43 @@ smp_85xx_setup_cpu(int cpu_nr)
91 mtspr(SPRN_TCR, TCR_DIE); 90 mtspr(SPRN_TCR, TCR_DIE);
92} 91}
93 92
93static void __init
94smp_85xx_setup_cpu(int cpu_nr)
95{
96 mpic_setup_this_cpu();
97
98 smp_85xx_basic_setup(cpu_nr);
99}
100
94struct smp_ops_t smp_85xx_ops = { 101struct smp_ops_t smp_85xx_ops = {
95 .message_pass = smp_mpic_message_pass,
96 .probe = smp_mpic_probe,
97 .kick_cpu = smp_85xx_kick_cpu, 102 .kick_cpu = smp_85xx_kick_cpu,
98 .setup_cpu = smp_85xx_setup_cpu,
99}; 103};
100 104
101void __init 105static int __init smp_dummy_probe(void)
102mpc85xx_smp_init(void)
103{ 106{
107 return NR_CPUS;
108}
109
110void __init mpc85xx_smp_init(void)
111{
112 struct device_node *np;
113
114 smp_85xx_ops.message_pass = NULL;
115
116 np = of_find_node_by_type(NULL, "open-pic");
117 if (np) {
118 smp_85xx_ops.probe = smp_mpic_probe;
119 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
120 smp_85xx_ops.message_pass = smp_mpic_message_pass;
121 } else {
122 smp_85xx_ops.probe = smp_dummy_probe;
123 smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
124 }
125
126 if (cpu_has_feature(CPU_FTR_DBELL))
127 smp_85xx_ops.message_pass = smp_dbell_message_pass;
128
129 BUG_ON(!smp_85xx_ops.message_pass);
130
104 smp_ops = &smp_85xx_ops; 131 smp_ops = &smp_85xx_ops;
105} 132}
diff --git a/arch/powerpc/platforms/85xx/socrates.c b/arch/powerpc/platforms/85xx/socrates.c
new file mode 100644
index 000000000000..d0e8443b12c6
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/socrates.c
@@ -0,0 +1,133 @@
1/*
2 * Copyright (c) 2008 Emcraft Systems
3 * Sergei Poselenov <sposelenov@emcraft.com>
4 *
5 * Based on MPC8560 ADS and arch/ppc tqm85xx ports
6 *
7 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
8 *
9 * Copyright 2008 Freescale Semiconductor Inc.
10 *
11 * Copyright (c) 2005-2006 DENX Software Engineering
12 * Stefan Roese <sr@denx.de>
13 *
14 * Based on original work by
15 * Kumar Gala <kumar.gala@freescale.com>
16 * Copyright 2004 Freescale Semiconductor Inc.
17 *
18 * This program is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU General Public License as published by the
20 * Free Software Foundation; either version 2 of the License, or (at your
21 * option) any later version.
22 */
23
24#include <linux/stddef.h>
25#include <linux/kernel.h>
26#include <linux/pci.h>
27#include <linux/kdev_t.h>
28#include <linux/delay.h>
29#include <linux/seq_file.h>
30#include <linux/of_platform.h>
31
32#include <asm/system.h>
33#include <asm/time.h>
34#include <asm/machdep.h>
35#include <asm/pci-bridge.h>
36#include <asm/mpic.h>
37#include <asm/prom.h>
38#include <mm/mmu_decl.h>
39#include <asm/udbg.h>
40
41#include <sysdev/fsl_soc.h>
42#include <sysdev/fsl_pci.h>
43
44#include "socrates_fpga_pic.h"
45
46static void __init socrates_pic_init(void)
47{
48 struct mpic *mpic;
49 struct resource r;
50 struct device_node *np;
51
52 np = of_find_node_by_type(NULL, "open-pic");
53 if (!np) {
54 printk(KERN_ERR "Could not find open-pic node\n");
55 return;
56 }
57
58 if (of_address_to_resource(np, 0, &r)) {
59 printk(KERN_ERR "Could not map mpic register space\n");
60 of_node_put(np);
61 return;
62 }
63
64 mpic = mpic_alloc(np, r.start,
65 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
66 0, 256, " OpenPIC ");
67 BUG_ON(mpic == NULL);
68 of_node_put(np);
69
70 mpic_init(mpic);
71
72 np = of_find_compatible_node(NULL, NULL, "abb,socrates-fpga-pic");
73 if (!np) {
74 printk(KERN_ERR "Could not find socrates-fpga-pic node\n");
75 return;
76 }
77 socrates_fpga_pic_init(np);
78 of_node_put(np);
79}
80
81/*
82 * Setup the architecture
83 */
84static void __init socrates_setup_arch(void)
85{
86#ifdef CONFIG_PCI
87 struct device_node *np;
88#endif
89
90 if (ppc_md.progress)
91 ppc_md.progress("socrates_setup_arch()", 0);
92
93#ifdef CONFIG_PCI
94 for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
95 fsl_add_bridge(np, 1);
96#endif
97}
98
99static struct of_device_id __initdata socrates_of_bus_ids[] = {
100 { .compatible = "simple-bus", },
101 { .compatible = "gianfar", },
102 {},
103};
104
105static void __init socrates_init(void)
106{
107 of_platform_bus_probe(NULL, socrates_of_bus_ids, NULL);
108}
109
110/*
111 * Called very early, device-tree isn't unflattened
112 */
113static int __init socrates_probe(void)
114{
115 unsigned long root = of_get_flat_dt_root();
116
117 if (of_flat_dt_is_compatible(root, "abb,socrates"))
118 return 1;
119
120 return 0;
121}
122
123define_machine(socrates) {
124 .name = "Socrates",
125 .probe = socrates_probe,
126 .setup_arch = socrates_setup_arch,
127 .init = socrates_init,
128 .init_IRQ = socrates_pic_init,
129 .get_irq = mpic_get_irq,
130 .restart = fsl_rstcr_restart,
131 .calibrate_decr = generic_calibrate_decr,
132 .progress = udbg_progress,
133};
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
new file mode 100644
index 000000000000..60edf63d0157
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
@@ -0,0 +1,327 @@
1/*
2 * Copyright (C) 2008 Ilya Yanok, Emcraft Systems
3 *
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 */
10
11#include <linux/irq.h>
12#include <linux/of_platform.h>
13#include <linux/io.h>
14
15/*
16 * The FPGA supports 9 interrupt sources, which can be routed to 3
17 * interrupt request lines of the MPIC. The line to be used can be
18 * specified through the third cell of FDT property "interrupts".
19 */
20
21#define SOCRATES_FPGA_NUM_IRQS 9
22
23#define FPGA_PIC_IRQCFG (0x0)
24#define FPGA_PIC_IRQMASK(n) (0x4 + 0x4 * (n))
25
26#define SOCRATES_FPGA_IRQ_MASK ((1 << SOCRATES_FPGA_NUM_IRQS) - 1)
27
28struct socrates_fpga_irq_info {
29 unsigned int irq_line;
30 int type;
31};
32
33/*
34 * Interrupt routing and type table
35 *
36 * IRQ_TYPE_NONE means the interrupt type is configurable,
37 * otherwise it's fixed to the specified value.
38 */
39static struct socrates_fpga_irq_info fpga_irqs[SOCRATES_FPGA_NUM_IRQS] = {
40 [0] = {0, IRQ_TYPE_NONE},
41 [1] = {0, IRQ_TYPE_LEVEL_HIGH},
42 [2] = {0, IRQ_TYPE_LEVEL_LOW},
43 [3] = {0, IRQ_TYPE_NONE},
44 [4] = {0, IRQ_TYPE_NONE},
45 [5] = {0, IRQ_TYPE_NONE},
46 [6] = {0, IRQ_TYPE_NONE},
47 [7] = {0, IRQ_TYPE_NONE},
48 [8] = {0, IRQ_TYPE_LEVEL_HIGH},
49};
50
51#define socrates_fpga_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
52
53static DEFINE_SPINLOCK(socrates_fpga_pic_lock);
54
55static void __iomem *socrates_fpga_pic_iobase;
56static struct irq_host *socrates_fpga_pic_irq_host;
57static unsigned int socrates_fpga_irqs[3];
58
59static inline uint32_t socrates_fpga_pic_read(int reg)
60{
61 return in_be32(socrates_fpga_pic_iobase + reg);
62}
63
64static inline void socrates_fpga_pic_write(int reg, uint32_t val)
65{
66 out_be32(socrates_fpga_pic_iobase + reg, val);
67}
68
69static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)
70{
71 uint32_t cause;
72 unsigned long flags;
73 int i;
74
75 /* Check irq line routed to the MPIC */
76 for (i = 0; i < 3; i++) {
77 if (irq == socrates_fpga_irqs[i])
78 break;
79 }
80 if (i == 3)
81 return NO_IRQ;
82
83 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
84 cause = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(i));
85 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
86 for (i = SOCRATES_FPGA_NUM_IRQS - 1; i >= 0; i--) {
87 if (cause >> (i + 16))
88 break;
89 }
90 return irq_linear_revmap(socrates_fpga_pic_irq_host,
91 (irq_hw_number_t)i);
92}
93
94void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc)
95{
96 unsigned int cascade_irq;
97
98 /*
99 * See if we actually have an interrupt, call generic handling code if
100 * we do.
101 */
102 cascade_irq = socrates_fpga_pic_get_irq(irq);
103
104 if (cascade_irq != NO_IRQ)
105 generic_handle_irq(cascade_irq);
106 desc->chip->eoi(irq);
107
108}
109
110static void socrates_fpga_pic_ack(unsigned int virq)
111{
112 unsigned long flags;
113 unsigned int hwirq, irq_line;
114 uint32_t mask;
115
116 hwirq = socrates_fpga_irq_to_hw(virq);
117
118 irq_line = fpga_irqs[hwirq].irq_line;
119 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
120 mask = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(irq_line))
121 & SOCRATES_FPGA_IRQ_MASK;
122 mask |= (1 << (hwirq + 16));
123 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(irq_line), mask);
124 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
125}
126
127static void socrates_fpga_pic_mask(unsigned int virq)
128{
129 unsigned long flags;
130 unsigned int hwirq;
131 int irq_line;
132 u32 mask;
133
134 hwirq = socrates_fpga_irq_to_hw(virq);
135
136 irq_line = fpga_irqs[hwirq].irq_line;
137 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
138 mask = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(irq_line))
139 & SOCRATES_FPGA_IRQ_MASK;
140 mask &= ~(1 << hwirq);
141 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(irq_line), mask);
142 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
143}
144
145static void socrates_fpga_pic_mask_ack(unsigned int virq)
146{
147 unsigned long flags;
148 unsigned int hwirq;
149 int irq_line;
150 u32 mask;
151
152 hwirq = socrates_fpga_irq_to_hw(virq);
153
154 irq_line = fpga_irqs[hwirq].irq_line;
155 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
156 mask = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(irq_line))
157 & SOCRATES_FPGA_IRQ_MASK;
158 mask &= ~(1 << hwirq);
159 mask |= (1 << (hwirq + 16));
160 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(irq_line), mask);
161 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
162}
163
164static void socrates_fpga_pic_unmask(unsigned int virq)
165{
166 unsigned long flags;
167 unsigned int hwirq;
168 int irq_line;
169 u32 mask;
170
171 hwirq = socrates_fpga_irq_to_hw(virq);
172
173 irq_line = fpga_irqs[hwirq].irq_line;
174 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
175 mask = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(irq_line))
176 & SOCRATES_FPGA_IRQ_MASK;
177 mask |= (1 << hwirq);
178 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(irq_line), mask);
179 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
180}
181
182static void socrates_fpga_pic_eoi(unsigned int virq)
183{
184 unsigned long flags;
185 unsigned int hwirq;
186 int irq_line;
187 u32 mask;
188
189 hwirq = socrates_fpga_irq_to_hw(virq);
190
191 irq_line = fpga_irqs[hwirq].irq_line;
192 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
193 mask = socrates_fpga_pic_read(FPGA_PIC_IRQMASK(irq_line))
194 & SOCRATES_FPGA_IRQ_MASK;
195 mask |= (1 << (hwirq + 16));
196 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(irq_line), mask);
197 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
198}
199
200static int socrates_fpga_pic_set_type(unsigned int virq,
201 unsigned int flow_type)
202{
203 unsigned long flags;
204 unsigned int hwirq;
205 int polarity;
206 u32 mask;
207
208 hwirq = socrates_fpga_irq_to_hw(virq);
209
210 if (fpga_irqs[hwirq].type != IRQ_TYPE_NONE)
211 return -EINVAL;
212
213 switch (flow_type & IRQ_TYPE_SENSE_MASK) {
214 case IRQ_TYPE_LEVEL_HIGH:
215 polarity = 1;
216 break;
217 case IRQ_TYPE_LEVEL_LOW:
218 polarity = 0;
219 break;
220 default:
221 return -EINVAL;
222 }
223 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
224 mask = socrates_fpga_pic_read(FPGA_PIC_IRQCFG);
225 if (polarity)
226 mask |= (1 << hwirq);
227 else
228 mask &= ~(1 << hwirq);
229 socrates_fpga_pic_write(FPGA_PIC_IRQCFG, mask);
230 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
231 return 0;
232}
233
234static struct irq_chip socrates_fpga_pic_chip = {
235 .typename = " FPGA-PIC ",
236 .ack = socrates_fpga_pic_ack,
237 .mask = socrates_fpga_pic_mask,
238 .mask_ack = socrates_fpga_pic_mask_ack,
239 .unmask = socrates_fpga_pic_unmask,
240 .eoi = socrates_fpga_pic_eoi,
241 .set_type = socrates_fpga_pic_set_type,
242};
243
244static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq,
245 irq_hw_number_t hwirq)
246{
247 /* All interrupts are LEVEL sensitive */
248 get_irq_desc(virq)->status |= IRQ_LEVEL;
249 set_irq_chip_and_handler(virq, &socrates_fpga_pic_chip,
250 handle_fasteoi_irq);
251
252 return 0;
253}
254
255static int socrates_fpga_pic_host_xlate(struct irq_host *h,
256 struct device_node *ct, u32 *intspec, unsigned int intsize,
257 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
258{
259 struct socrates_fpga_irq_info *fpga_irq = &fpga_irqs[intspec[0]];
260
261 *out_hwirq = intspec[0];
262 if (fpga_irq->type == IRQ_TYPE_NONE) {
263 /* type is configurable */
264 if (intspec[1] != IRQ_TYPE_LEVEL_LOW &&
265 intspec[1] != IRQ_TYPE_LEVEL_HIGH) {
266 pr_warning("FPGA PIC: invalid irq type, "
267 "setting default active low\n");
268 *out_flags = IRQ_TYPE_LEVEL_LOW;
269 } else {
270 *out_flags = intspec[1];
271 }
272 } else {
273 /* type is fixed */
274 *out_flags = fpga_irq->type;
275 }
276
277 /* Use specified interrupt routing */
278 if (intspec[2] <= 2)
279 fpga_irq->irq_line = intspec[2];
280 else
281 pr_warning("FPGA PIC: invalid irq routing\n");
282
283 return 0;
284}
285
286static struct irq_host_ops socrates_fpga_pic_host_ops = {
287 .map = socrates_fpga_pic_host_map,
288 .xlate = socrates_fpga_pic_host_xlate,
289};
290
291void socrates_fpga_pic_init(struct device_node *pic)
292{
293 unsigned long flags;
294 int i;
295
296 /* Setup an irq_host structure */
297 socrates_fpga_pic_irq_host = irq_alloc_host(pic, IRQ_HOST_MAP_LINEAR,
298 SOCRATES_FPGA_NUM_IRQS, &socrates_fpga_pic_host_ops,
299 SOCRATES_FPGA_NUM_IRQS);
300 if (socrates_fpga_pic_irq_host == NULL) {
301 pr_err("FPGA PIC: Unable to allocate host\n");
302 return;
303 }
304
305 for (i = 0; i < 3; i++) {
306 socrates_fpga_irqs[i] = irq_of_parse_and_map(pic, i);
307 if (socrates_fpga_irqs[i] == NO_IRQ) {
308 pr_warning("FPGA PIC: can't get irq%d.\n", i);
309 continue;
310 }
311 set_irq_chained_handler(socrates_fpga_irqs[i],
312 socrates_fpga_pic_cascade);
313 }
314
315 socrates_fpga_pic_iobase = of_iomap(pic, 0);
316
317 spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
318 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(0),
319 SOCRATES_FPGA_IRQ_MASK << 16);
320 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(1),
321 SOCRATES_FPGA_IRQ_MASK << 16);
322 socrates_fpga_pic_write(FPGA_PIC_IRQMASK(2),
323 SOCRATES_FPGA_IRQ_MASK << 16);
324 spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
325
326 pr_info("FPGA PIC: Setting up Socrates FPGA PIC\n");
327}
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.h b/arch/powerpc/platforms/85xx/socrates_fpga_pic.h
new file mode 100644
index 000000000000..21d7d8e42199
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.h
@@ -0,0 +1,16 @@
1/*
2 * Copyright (C) 2008 Ilya Yanok, Emcraft Systems
3 *
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 */
10
11#ifndef SOCRATES_FPGA_PIC_H
12#define SOCRATES_FPGA_PIC_H
13
14void socrates_fpga_pic_init(struct device_node *pic);
15
16#endif
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
index 0cca8f5cb272..f559918f3c6f 100644
--- a/arch/powerpc/platforms/85xx/stx_gp3.c
+++ b/arch/powerpc/platforms/85xx/stx_gp3.c
@@ -145,6 +145,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m)
145 145
146static struct of_device_id __initdata of_bus_ids[] = { 146static struct of_device_id __initdata of_bus_ids[] = {
147 { .compatible = "simple-bus", }, 147 { .compatible = "simple-bus", },
148 { .compatible = "gianfar", },
148 {}, 149 {},
149}; 150};
150 151
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 2933a8e827d9..5b0ab9966e90 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -153,6 +153,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m)
153 153
154static struct of_device_id __initdata of_bus_ids[] = { 154static struct of_device_id __initdata of_bus_ids[] = {
155 { .compatible = "simple-bus", }, 155 { .compatible = "simple-bus", },
156 { .compatible = "gianfar", },
156 {}, 157 {},
157}; 158};
158 159
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 8e5693935975..fdaf4ddaa955 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -1,7 +1,7 @@
1config PPC_86xx 1config PPC_86xx
2menuconfig PPC_86xx 2menuconfig PPC_86xx
3 bool "86xx-based boards" 3 bool "86xx-based boards"
4 depends on 6xx && PPC_MULTIPLATFORM 4 depends on 6xx
5 select FSL_SOC 5 select FSL_SOC
6 select ALTIVEC 6 select ALTIVEC
7 help 7 help
@@ -31,6 +31,22 @@ config MPC8610_HPCD
31 help 31 help
32 This option enables support for the MPC8610 HPCD board. 32 This option enables support for the MPC8610 HPCD board.
33 33
34config GEF_PPC9A
35 bool "GE Fanuc PPC9A"
36 select DEFAULT_UIMAGE
37 select GENERIC_GPIO
38 select ARCH_REQUIRE_GPIOLIB
39 help
40 This option enables support for GE Fanuc's PPC9A.
41
42config GEF_SBC310
43 bool "GE Fanuc SBC310"
44 select DEFAULT_UIMAGE
45 select GENERIC_GPIO
46 select ARCH_REQUIRE_GPIOLIB
47 help
48 This option enables support for GE Fanuc's SBC310.
49
34config GEF_SBC610 50config GEF_SBC610
35 bool "GE Fanuc SBC610" 51 bool "GE Fanuc SBC610"
36 select DEFAULT_UIMAGE 52 select DEFAULT_UIMAGE
@@ -48,7 +64,7 @@ config MPC8641
48 select FSL_PCI if PCI 64 select FSL_PCI if PCI
49 select PPC_UDBG_16550 65 select PPC_UDBG_16550
50 select MPIC 66 select MPIC
51 default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 67 default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 || GEF_SBC310 || GEF_PPC9A
52 68
53config MPC8610 69config MPC8610
54 bool 70 bool
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index 31e540c2ebbc..4b0d7b1aa005 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -9,3 +9,5 @@ obj-$(CONFIG_SBC8641D) += sbc8641d.o
9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o 9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o
10gef-gpio-$(CONFIG_GPIOLIB) += gef_gpio.o 10gef-gpio-$(CONFIG_GPIOLIB) += gef_gpio.o
11obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o gef_pic.o $(gef-gpio-y) 11obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o gef_pic.o $(gef-gpio-y)
12obj-$(CONFIG_GEF_SBC310) += gef_sbc310.o gef_pic.o $(gef-gpio-y)
13obj-$(CONFIG_GEF_PPC9A) += gef_ppc9a.o gef_pic.o $(gef-gpio-y)
diff --git a/arch/powerpc/platforms/86xx/gef_gpio.c b/arch/powerpc/platforms/86xx/gef_gpio.c
index 85b2800f4cb7..b2ea8875adba 100644
--- a/arch/powerpc/platforms/86xx/gef_gpio.c
+++ b/arch/powerpc/platforms/86xx/gef_gpio.c
@@ -37,8 +37,6 @@
37#define GEF_GPIO_OVERRUN 0x1C 37#define GEF_GPIO_OVERRUN 0x1C
38#define GEF_GPIO_MODE 0x20 38#define GEF_GPIO_MODE 0x20
39 39
40#define NUM_GPIO 19
41
42static void _gef_gpio_set(void __iomem *reg, unsigned int offset, int value) 40static void _gef_gpio_set(void __iomem *reg, unsigned int offset, int value)
43{ 41{
44 unsigned int data; 42 unsigned int data;
@@ -103,10 +101,10 @@ static void gef_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
103static int __init gef_gpio_init(void) 101static int __init gef_gpio_init(void)
104{ 102{
105 struct device_node *np; 103 struct device_node *np;
104 int retval;
105 struct of_mm_gpio_chip *gef_gpio_chip;
106 106
107 for_each_compatible_node(np, NULL, "gef,sbc610-gpio") { 107 for_each_compatible_node(np, NULL, "gef,sbc610-gpio") {
108 int retval;
109 struct of_mm_gpio_chip *gef_gpio_chip;
110 108
111 pr_debug("%s: Initialising GEF GPIO\n", np->full_name); 109 pr_debug("%s: Initialising GEF GPIO\n", np->full_name);
112 110
@@ -120,7 +118,35 @@ static int __init gef_gpio_init(void)
120 118
121 /* Setup pointers to chip functions */ 119 /* Setup pointers to chip functions */
122 gef_gpio_chip->of_gc.gpio_cells = 2; 120 gef_gpio_chip->of_gc.gpio_cells = 2;
123 gef_gpio_chip->of_gc.gc.ngpio = NUM_GPIO; 121 gef_gpio_chip->of_gc.gc.ngpio = 19;
122 gef_gpio_chip->of_gc.gc.direction_input = gef_gpio_dir_in;
123 gef_gpio_chip->of_gc.gc.direction_output = gef_gpio_dir_out;
124 gef_gpio_chip->of_gc.gc.get = gef_gpio_get;
125 gef_gpio_chip->of_gc.gc.set = gef_gpio_set;
126
127 /* This function adds a memory mapped GPIO chip */
128 retval = of_mm_gpiochip_add(np, gef_gpio_chip);
129 if (retval) {
130 kfree(gef_gpio_chip);
131 pr_err("%s: Unable to add GPIO\n", np->full_name);
132 }
133 }
134
135 for_each_compatible_node(np, NULL, "gef,sbc310-gpio") {
136
137 pr_debug("%s: Initialising GEF GPIO\n", np->full_name);
138
139 /* Allocate chip structure */
140 gef_gpio_chip = kzalloc(sizeof(*gef_gpio_chip), GFP_KERNEL);
141 if (!gef_gpio_chip) {
142 pr_err("%s: Unable to allocate structure\n",
143 np->full_name);
144 continue;
145 }
146
147 /* Setup pointers to chip functions */
148 gef_gpio_chip->of_gc.gpio_cells = 2;
149 gef_gpio_chip->of_gc.gc.ngpio = 6;
124 gef_gpio_chip->of_gc.gc.direction_input = gef_gpio_dir_in; 150 gef_gpio_chip->of_gc.gc.direction_input = gef_gpio_dir_in;
125 gef_gpio_chip->of_gc.gc.direction_output = gef_gpio_dir_out; 151 gef_gpio_chip->of_gc.gc.direction_output = gef_gpio_dir_out;
126 gef_gpio_chip->of_gc.gc.get = gef_gpio_get; 152 gef_gpio_chip->of_gc.gc.get = gef_gpio_get;
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c
new file mode 100644
index 000000000000..d79104669cdc
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c
@@ -0,0 +1,224 @@
1/*
2 * GE Fanuc PPC9A board support
3 *
4 * Author: Martyn Welch <martyn.welch@gefanuc.com>
5 *
6 * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
14 * Copyright 2006 Freescale Semiconductor Inc.
15 *
16 * NEC fixup adapted from arch/mips/pci/fixup-lm2e.c
17 */
18
19#include <linux/stddef.h>
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/kdev_t.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/of_platform.h>
26
27#include <asm/system.h>
28#include <asm/time.h>
29#include <asm/machdep.h>
30#include <asm/pci-bridge.h>
31#include <asm/mpc86xx.h>
32#include <asm/prom.h>
33#include <mm/mmu_decl.h>
34#include <asm/udbg.h>
35
36#include <asm/mpic.h>
37
38#include <sysdev/fsl_pci.h>
39#include <sysdev/fsl_soc.h>
40
41#include "mpc86xx.h"
42#include "gef_pic.h"
43
44#undef DEBUG
45
46#ifdef DEBUG
47#define DBG (fmt...) do { printk(KERN_ERR "PPC9A: " fmt); } while (0)
48#else
49#define DBG (fmt...) do { } while (0)
50#endif
51
52void __iomem *ppc9a_regs;
53
54static void __init gef_ppc9a_init_irq(void)
55{
56 struct device_node *cascade_node = NULL;
57
58 mpc86xx_init_irq();
59
60 /*
61 * There is a simple interrupt handler in the main FPGA, this needs
62 * to be cascaded into the MPIC
63 */
64 cascade_node = of_find_compatible_node(NULL, NULL, "gef,fpga-pic-1.00");
65 if (!cascade_node) {
66 printk(KERN_WARNING "PPC9A: No FPGA PIC\n");
67 return;
68 }
69
70 gef_pic_init(cascade_node);
71 of_node_put(cascade_node);
72}
73
74static void __init gef_ppc9a_setup_arch(void)
75{
76 struct device_node *regs;
77#ifdef CONFIG_PCI
78 struct device_node *np;
79
80 for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
81 fsl_add_bridge(np, 1);
82 }
83#endif
84
85 printk(KERN_INFO "GE Fanuc Intelligent Platforms PPC9A 6U VME SBC\n");
86
87#ifdef CONFIG_SMP
88 mpc86xx_smp_init();
89#endif
90
91 /* Remap basic board registers */
92 regs = of_find_compatible_node(NULL, NULL, "gef,ppc9a-fpga-regs");
93 if (regs) {
94 ppc9a_regs = of_iomap(regs, 0);
95 if (ppc9a_regs == NULL)
96 printk(KERN_WARNING "Unable to map board registers\n");
97 of_node_put(regs);
98 }
99}
100
101/* Return the PCB revision */
102static unsigned int gef_ppc9a_get_pcb_rev(void)
103{
104 unsigned int reg;
105
106 reg = ioread32(ppc9a_regs);
107 return (reg >> 8) & 0xff;
108}
109
110/* Return the board (software) revision */
111static unsigned int gef_ppc9a_get_board_rev(void)
112{
113 unsigned int reg;
114
115 reg = ioread32(ppc9a_regs);
116 return (reg >> 16) & 0xff;
117}
118
119/* Return the FPGA revision */
120static unsigned int gef_ppc9a_get_fpga_rev(void)
121{
122 unsigned int reg;
123
124 reg = ioread32(ppc9a_regs);
125 return (reg >> 24) & 0xf;
126}
127
128static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
129{
130 uint svid = mfspr(SPRN_SVR);
131
132 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
133
134 seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(),
135 ('A' + gef_ppc9a_get_board_rev() - 1));
136 seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev());
137
138 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
139}
140
141static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev)
142{
143 unsigned int val;
144
145 /* Do not do the fixup on other platforms! */
146 if (!machine_is(gef_ppc9a))
147 return;
148
149 printk(KERN_INFO "Running NEC uPD720101 Fixup\n");
150
151 /* Ensure ports 1, 2, 3, 4 & 5 are enabled */
152 pci_read_config_dword(pdev, 0xe0, &val);
153 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x5);
154
155 /* System clock is 48-MHz Oscillator and EHCI Enabled. */
156 pci_write_config_dword(pdev, 0xe4, 1 << 5);
157}
158DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
159 gef_ppc9a_nec_fixup);
160
161/*
162 * Called very early, device-tree isn't unflattened
163 *
164 * This function is called to determine whether the BSP is compatible with the
165 * supplied device-tree, which is assumed to be the correct one for the actual
166 * board. It is expected thati, in the future, a kernel may support multiple
167 * boards.
168 */
169static int __init gef_ppc9a_probe(void)
170{
171 unsigned long root = of_get_flat_dt_root();
172
173 if (of_flat_dt_is_compatible(root, "gef,ppc9a"))
174 return 1;
175
176 return 0;
177}
178
179static long __init mpc86xx_time_init(void)
180{
181 unsigned int temp;
182
183 /* Set the time base to zero */
184 mtspr(SPRN_TBWL, 0);
185 mtspr(SPRN_TBWU, 0);
186
187 temp = mfspr(SPRN_HID0);
188 temp |= HID0_TBEN;
189 mtspr(SPRN_HID0, temp);
190 asm volatile("isync");
191
192 return 0;
193}
194
195static __initdata struct of_device_id of_bus_ids[] = {
196 { .compatible = "simple-bus", },
197 { .compatible = "gianfar", },
198 {},
199};
200
201static int __init declare_of_platform_devices(void)
202{
203 printk(KERN_DEBUG "Probe platform devices\n");
204 of_platform_bus_probe(NULL, of_bus_ids, NULL);
205
206 return 0;
207}
208machine_device_initcall(gef_ppc9a, declare_of_platform_devices);
209
210define_machine(gef_ppc9a) {
211 .name = "GE Fanuc PPC9A",
212 .probe = gef_ppc9a_probe,
213 .setup_arch = gef_ppc9a_setup_arch,
214 .init_IRQ = gef_ppc9a_init_irq,
215 .show_cpuinfo = gef_ppc9a_show_cpuinfo,
216 .get_irq = mpic_get_irq,
217 .restart = fsl_rstcr_restart,
218 .time_init = mpc86xx_time_init,
219 .calibrate_decr = generic_calibrate_decr,
220 .progress = udbg_progress,
221#ifdef CONFIG_PCI
222 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
223#endif
224};
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c
new file mode 100644
index 000000000000..af14f852d747
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/gef_sbc310.c
@@ -0,0 +1,235 @@
1/*
2 * GE Fanuc SBC310 board support
3 *
4 * Author: Martyn Welch <martyn.welch@gefanuc.com>
5 *
6 * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
14 * Copyright 2006 Freescale Semiconductor Inc.
15 *
16 * NEC fixup adapted from arch/mips/pci/fixup-lm2e.c
17 */
18
19#include <linux/stddef.h>
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/kdev_t.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/of_platform.h>
26
27#include <asm/system.h>
28#include <asm/time.h>
29#include <asm/machdep.h>
30#include <asm/pci-bridge.h>
31#include <asm/mpc86xx.h>
32#include <asm/prom.h>
33#include <mm/mmu_decl.h>
34#include <asm/udbg.h>
35
36#include <asm/mpic.h>
37
38#include <sysdev/fsl_pci.h>
39#include <sysdev/fsl_soc.h>
40
41#include "mpc86xx.h"
42#include "gef_pic.h"
43
44#undef DEBUG
45
46#ifdef DEBUG
47#define DBG (fmt...) do { printk(KERN_ERR "SBC310: " fmt); } while (0)
48#else
49#define DBG (fmt...) do { } while (0)
50#endif
51
52void __iomem *sbc310_regs;
53
54static void __init gef_sbc310_init_irq(void)
55{
56 struct device_node *cascade_node = NULL;
57
58 mpc86xx_init_irq();
59
60 /*
61 * There is a simple interrupt handler in the main FPGA, this needs
62 * to be cascaded into the MPIC
63 */
64 cascade_node = of_find_compatible_node(NULL, NULL, "gef,fpga-pic");
65 if (!cascade_node) {
66 printk(KERN_WARNING "SBC310: No FPGA PIC\n");
67 return;
68 }
69
70 gef_pic_init(cascade_node);
71 of_node_put(cascade_node);
72}
73
74static void __init gef_sbc310_setup_arch(void)
75{
76 struct device_node *regs;
77#ifdef CONFIG_PCI
78 struct device_node *np;
79
80 for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
81 fsl_add_bridge(np, 1);
82 }
83#endif
84
85 printk(KERN_INFO "GE Fanuc Intelligent Platforms SBC310 6U VPX SBC\n");
86
87#ifdef CONFIG_SMP
88 mpc86xx_smp_init();
89#endif
90
91 /* Remap basic board registers */
92 regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs");
93 if (regs) {
94 sbc310_regs = of_iomap(regs, 0);
95 if (sbc310_regs == NULL)
96 printk(KERN_WARNING "Unable to map board registers\n");
97 of_node_put(regs);
98 }
99}
100
101/* Return the PCB revision */
102static unsigned int gef_sbc310_get_board_id(void)
103{
104 unsigned int reg;
105
106 reg = ioread32(sbc310_regs);
107 return reg & 0xff;
108}
109
110/* Return the PCB revision */
111static unsigned int gef_sbc310_get_pcb_rev(void)
112{
113 unsigned int reg;
114
115 reg = ioread32(sbc310_regs);
116 return (reg >> 8) & 0xff;
117}
118
119/* Return the board (software) revision */
120static unsigned int gef_sbc310_get_board_rev(void)
121{
122 unsigned int reg;
123
124 reg = ioread32(sbc310_regs);
125 return (reg >> 16) & 0xff;
126}
127
128/* Return the FPGA revision */
129static unsigned int gef_sbc310_get_fpga_rev(void)
130{
131 unsigned int reg;
132
133 reg = ioread32(sbc310_regs);
134 return (reg >> 24) & 0xf;
135}
136
137static void gef_sbc310_show_cpuinfo(struct seq_file *m)
138{
139 uint svid = mfspr(SPRN_SVR);
140
141 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
142
143 seq_printf(m, "Board ID\t: 0x%2.2x\n", gef_sbc310_get_board_id());
144 seq_printf(m, "Revision\t: %u%c\n", gef_sbc310_get_pcb_rev(),
145 ('A' + gef_sbc310_get_board_rev() - 1));
146 seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc310_get_fpga_rev());
147
148 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
149
150}
151
152static void __init gef_sbc310_nec_fixup(struct pci_dev *pdev)
153{
154 unsigned int val;
155
156 /* Do not do the fixup on other platforms! */
157 if (!machine_is(gef_sbc310))
158 return;
159
160 printk(KERN_INFO "Running NEC uPD720101 Fixup\n");
161
162 /* Ensure only ports 1 & 2 are enabled */
163 pci_read_config_dword(pdev, 0xe0, &val);
164 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x2);
165
166 /* System clock is 48-MHz Oscillator and EHCI Enabled. */
167 pci_write_config_dword(pdev, 0xe4, 1 << 5);
168}
169DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
170 gef_sbc310_nec_fixup);
171
172/*
173 * Called very early, device-tree isn't unflattened
174 *
175 * This function is called to determine whether the BSP is compatible with the
176 * supplied device-tree, which is assumed to be the correct one for the actual
177 * board. It is expected thati, in the future, a kernel may support multiple
178 * boards.
179 */
180static int __init gef_sbc310_probe(void)
181{
182 unsigned long root = of_get_flat_dt_root();
183
184 if (of_flat_dt_is_compatible(root, "gef,sbc310"))
185 return 1;
186
187 return 0;
188}
189
190static long __init mpc86xx_time_init(void)
191{
192 unsigned int temp;
193
194 /* Set the time base to zero */
195 mtspr(SPRN_TBWL, 0);
196 mtspr(SPRN_TBWU, 0);
197
198 temp = mfspr(SPRN_HID0);
199 temp |= HID0_TBEN;
200 mtspr(SPRN_HID0, temp);
201 asm volatile("isync");
202
203 return 0;
204}
205
206static __initdata struct of_device_id of_bus_ids[] = {
207 { .compatible = "simple-bus", },
208 { .compatible = "gianfar", },
209 {},
210};
211
212static int __init declare_of_platform_devices(void)
213{
214 printk(KERN_DEBUG "Probe platform devices\n");
215 of_platform_bus_probe(NULL, of_bus_ids, NULL);
216
217 return 0;
218}
219machine_device_initcall(gef_sbc310, declare_of_platform_devices);
220
221define_machine(gef_sbc310) {
222 .name = "GE Fanuc SBC310",
223 .probe = gef_sbc310_probe,
224 .setup_arch = gef_sbc310_setup_arch,
225 .init_IRQ = gef_sbc310_init_irq,
226 .show_cpuinfo = gef_sbc310_show_cpuinfo,
227 .get_irq = mpic_get_irq,
228 .restart = fsl_rstcr_restart,
229 .time_init = mpc86xx_time_init,
230 .calibrate_decr = generic_calibrate_decr,
231 .progress = udbg_progress,
232#ifdef CONFIG_PCI
233 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
234#endif
235};
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index d6b772ba3b8f..ea2360639652 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -194,6 +194,7 @@ static long __init mpc86xx_time_init(void)
194 194
195static __initdata struct of_device_id of_bus_ids[] = { 195static __initdata struct of_device_id of_bus_ids[] = {
196 { .compatible = "simple-bus", }, 196 { .compatible = "simple-bus", },
197 { .compatible = "gianfar", },
197 {}, 198 {},
198}; 199};
199 200
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index e8d54ac5292c..3f49a6f893a3 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -46,6 +46,7 @@ static unsigned char *pixis_bdcfg0, *pixis_arch;
46static struct of_device_id __initdata mpc8610_ids[] = { 46static struct of_device_id __initdata mpc8610_ids[] = {
47 { .compatible = "fsl,mpc8610-immr", }, 47 { .compatible = "fsl,mpc8610-immr", },
48 { .compatible = "simple-bus", }, 48 { .compatible = "simple-bus", },
49 { .compatible = "gianfar", },
49 {} 50 {}
50}; 51};
51 52
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 27e0e682d8e1..c4ec49b5f7f8 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -148,6 +148,7 @@ mpc86xx_time_init(void)
148static __initdata struct of_device_id of_bus_ids[] = { 148static __initdata struct of_device_id of_bus_ids[] = {
149 { .compatible = "simple-bus", }, 149 { .compatible = "simple-bus", },
150 { .compatible = "fsl,rapidio-delta", }, 150 { .compatible = "fsl,rapidio-delta", },
151 { .compatible = "gianfar", },
151 {}, 152 {},
152}; 153};
153 154
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c
index 5fd7ed40986f..2886a36fc085 100644
--- a/arch/powerpc/platforms/86xx/sbc8641d.c
+++ b/arch/powerpc/platforms/86xx/sbc8641d.c
@@ -103,6 +103,7 @@ mpc86xx_time_init(void)
103 103
104static __initdata struct of_device_id of_bus_ids[] = { 104static __initdata struct of_device_id of_bus_ids[] = {
105 { .compatible = "simple-bus", }, 105 { .compatible = "simple-bus", },
106 { .compatible = "gianfar", },
106 {}, 107 {},
107}; 108};
108 109
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index 0d9f75c74f8c..385acfc48397 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -44,7 +44,6 @@ static irqreturn_t timebase_interrupt(int irq, void *dev)
44 44
45static struct irqaction tbint_irqaction = { 45static struct irqaction tbint_irqaction = {
46 .handler = timebase_interrupt, 46 .handler = timebase_interrupt,
47 .mask = CPU_MASK_NONE,
48 .name = "tbint", 47 .name = "tbint",
49}; 48};
50 49
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 200b9cb900ea..e3e87078d03f 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -1,14 +1,5 @@
1menu "Platform support" 1menu "Platform support"
2 2
3config PPC_MULTIPLATFORM
4 bool
5 depends on PPC64 || 6xx
6 default y
7
8config CLASSIC32
9 def_bool y
10 depends on 6xx && PPC_MULTIPLATFORM
11
12source "arch/powerpc/platforms/pseries/Kconfig" 3source "arch/powerpc/platforms/pseries/Kconfig"
13source "arch/powerpc/platforms/iseries/Kconfig" 4source "arch/powerpc/platforms/iseries/Kconfig"
14source "arch/powerpc/platforms/chrp/Kconfig" 5source "arch/powerpc/platforms/chrp/Kconfig"
@@ -28,15 +19,28 @@ source "arch/powerpc/platforms/86xx/Kconfig"
28source "arch/powerpc/platforms/embedded6xx/Kconfig" 19source "arch/powerpc/platforms/embedded6xx/Kconfig"
29source "arch/powerpc/platforms/44x/Kconfig" 20source "arch/powerpc/platforms/44x/Kconfig"
30source "arch/powerpc/platforms/40x/Kconfig" 21source "arch/powerpc/platforms/40x/Kconfig"
22source "arch/powerpc/platforms/amigaone/Kconfig"
31 23
32config PPC_NATIVE 24config PPC_NATIVE
33 bool 25 bool
34 depends on PPC_MULTIPLATFORM 26 depends on 6xx || PPC64
35 help 27 help
36 Support for running natively on the hardware, i.e. without 28 Support for running natively on the hardware, i.e. without
37 a hypervisor. This option is not user-selectable but should 29 a hypervisor. This option is not user-selectable but should
38 be selected by all platforms that need it. 30 be selected by all platforms that need it.
39 31
32config PPC_OF_BOOT_TRAMPOLINE
33 bool "Support booting from Open Firmware or yaboot"
34 depends on 6xx || PPC64
35 default y
36 help
37 Support from booting from Open Firmware or yaboot using an
38 Open Firmware client interface. This enables the kernel to
39 communicate with open firmware to retrieve system informations
40 such as the device tree.
41
42 In case of doubt, say Y
43
40config UDBG_RTAS_CONSOLE 44config UDBG_RTAS_CONSOLE
41 bool "RTAS based debug console" 45 bool "RTAS based debug console"
42 depends on PPC_RTAS 46 depends on PPC_RTAS
@@ -70,7 +74,7 @@ config PPC_I8259
70 74
71config U3_DART 75config U3_DART
72 bool 76 bool
73 depends on PPC_MULTIPLATFORM && PPC64 77 depends on PPC64
74 default n 78 default n
75 79
76config PPC_RTAS 80config PPC_RTAS
@@ -91,15 +95,6 @@ config RTAS_FLASH
91 tristate "Firmware flash interface" 95 tristate "Firmware flash interface"
92 depends on PPC64 && RTAS_PROC 96 depends on PPC64 && RTAS_PROC
93 97
94config PPC_PMI
95 tristate "Support for PMI"
96 depends on PPC_IBM_CELL_BLADE
97 help
98 PMI (Platform Management Interrupt) is a way to
99 communicate with the BMC (Baseboard Management Controller).
100 It is used in some IBM Cell blades.
101 default m
102
103config MMIO_NVRAM 98config MMIO_NVRAM
104 bool 99 bool
105 default n 100 default n
@@ -196,7 +191,7 @@ config PPC601_SYNC_FIX
196 191
197config TAU 192config TAU
198 bool "On-chip CPU temperature sensor support" 193 bool "On-chip CPU temperature sensor support"
199 depends on CLASSIC32 194 depends on 6xx
200 help 195 help
201 G3 and G4 processors have an on-chip temperature sensor called the 196 G3 and G4 processors have an on-chip temperature sensor called the
202 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die 197 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die
@@ -274,7 +269,7 @@ config CPM2
274 269
275config AXON_RAM 270config AXON_RAM
276 tristate "Axon DDR2 memory device driver" 271 tristate "Axon DDR2 memory device driver"
277 depends on PPC_IBM_CELL_BLADE 272 depends on PPC_IBM_CELL_BLADE && BLOCK
278 default m 273 default m
279 help 274 help
280 It registers one block device per Axon's DDR2 memory bank found 275 It registers one block device per Axon's DDR2 memory bank found
@@ -298,7 +293,7 @@ config CPM
298config OF_RTC 293config OF_RTC
299 bool 294 bool
300 help 295 help
301 Uses information from the OF or flattened device tree to instatiate 296 Uses information from the OF or flattened device tree to instantiate
302 platform devices for direct mapped RTC chips like the DS1742 or DS1743. 297 platform devices for direct mapped RTC chips like the DS1742 or DS1743.
303 298
304source "arch/powerpc/sysdev/bestcomm/Kconfig" 299source "arch/powerpc/sysdev/bestcomm/Kconfig"
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index e868b5c50723..9da795e49337 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -57,9 +57,17 @@ config E200
57 57
58endchoice 58endchoice
59 59
60# Until we have a choice of exclusive CPU types on 64-bit, we always
61# use PPC_BOOK3S. On 32-bit, this is equivalent to 6xx which is
62# "classic" MMU
63
64config PPC_BOOK3S
65 def_bool y
66 depends on PPC64 || 6xx
67
60config POWER4_ONLY 68config POWER4_ONLY
61 bool "Optimize for POWER4" 69 bool "Optimize for POWER4"
62 depends on PPC64 70 depends on PPC64 && PPC_BOOK3S
63 default n 71 default n
64 ---help--- 72 ---help---
65 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors. 73 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
@@ -68,16 +76,16 @@ config POWER4_ONLY
68 76
69config POWER3 77config POWER3
70 bool 78 bool
71 depends on PPC64 79 depends on PPC64 && PPC_BOOK3S
72 default y if !POWER4_ONLY 80 default y if !POWER4_ONLY
73 81
74config POWER4 82config POWER4
75 depends on PPC64 83 depends on PPC64 && PPC_BOOK3S
76 def_bool y 84 def_bool y
77 85
78config TUNE_CELL 86config TUNE_CELL
79 bool "Optimize for Cell Broadband Engine" 87 bool "Optimize for Cell Broadband Engine"
80 depends on PPC64 88 depends on PPC64 && PPC_BOOK3S
81 help 89 help
82 Cause the compiler to optimize for the PPE of the Cell Broadband 90 Cause the compiler to optimize for the PPE of the Cell Broadband
83 Engine. This will make the code run considerably faster on Cell 91 Engine. This will make the code run considerably faster on Cell
@@ -147,7 +155,7 @@ config PHYS_64BIT
147 155
148config ALTIVEC 156config ALTIVEC
149 bool "AltiVec Support" 157 bool "AltiVec Support"
150 depends on CLASSIC32 || POWER4 158 depends on 6xx || POWER4
151 ---help--- 159 ---help---
152 This option enables kernel support for the Altivec extensions to the 160 This option enables kernel support for the Altivec extensions to the
153 PowerPC processor. The kernel currently supports saving and restoring 161 PowerPC processor. The kernel currently supports saving and restoring
@@ -210,6 +218,10 @@ config PPC_MMU_NOHASH
210 def_bool y 218 def_bool y
211 depends on !PPC_STD_MMU 219 depends on !PPC_STD_MMU
212 220
221config PPC_BOOK3E_MMU
222 def_bool y
223 depends on FSL_BOOKE
224
213config PPC_MM_SLICES 225config PPC_MM_SLICES
214 bool 226 bool
215 default y if HUGETLB_PAGE || (PPC_STD_MMU_64 && PPC_64K_PAGES) 227 default y if HUGETLB_PAGE || (PPC_STD_MMU_64 && PPC_64K_PAGES)
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 8079e0b4fd69..f7419198e635 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -19,3 +19,4 @@ obj-$(CONFIG_PPC_PASEMI) += pasemi/
19obj-$(CONFIG_PPC_CELL) += cell/ 19obj-$(CONFIG_PPC_CELL) += cell/
20obj-$(CONFIG_PPC_PS3) += ps3/ 20obj-$(CONFIG_PPC_PS3) += ps3/
21obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/ 21obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
22obj-$(CONFIG_AMIGAONE) += amigaone/
diff --git a/arch/powerpc/platforms/amigaone/Kconfig b/arch/powerpc/platforms/amigaone/Kconfig
new file mode 100644
index 000000000000..022476717718
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/Kconfig
@@ -0,0 +1,18 @@
1config AMIGAONE
2 bool "Eyetech AmigaOne/MAI Teron"
3 depends on 6xx && BROKEN_ON_SMP
4 select PPC_I8259
5 select PPC_INDIRECT_PCI
6 select PPC_UDBG_16550
7 select PCI
8 select NOT_COHERENT_CACHE
9 select CHECK_CACHE_COHERENCY
10 select DEFAULT_UIMAGE
11 select PCSPKR_PLATFORM
12 help
13 Select AmigaOne for the following machines:
14 - AmigaOne SE/Teron CX (G3 only)
15 - AmigaOne XE/Teron PX
16 - uA1/Teron mini
17 More information is available at:
18 <http://amigaone-linux.sourceforge.net/>.
diff --git a/arch/powerpc/platforms/amigaone/Makefile b/arch/powerpc/platforms/amigaone/Makefile
new file mode 100644
index 000000000000..e6885b3b2ee7
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/Makefile
@@ -0,0 +1 @@
obj-y += setup.o
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c
new file mode 100644
index 000000000000..443035366c12
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/setup.c
@@ -0,0 +1,170 @@
1/*
2 * AmigaOne platform setup
3 *
4 * Copyright 2008 Gerhard Pircher (gerhard_pircher@gmx.net)
5 *
6 * Based on original amigaone_setup.c source code
7 * Copyright 2003 by Hans-Joerg Frieden and Thomas Frieden
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/kernel.h>
16#include <linux/seq_file.h>
17#include <linux/utsrelease.h>
18
19#include <asm/machdep.h>
20#include <asm/cputable.h>
21#include <asm/prom.h>
22#include <asm/pci-bridge.h>
23#include <asm/i8259.h>
24#include <asm/time.h>
25#include <asm/udbg.h>
26
27extern void __flush_disable_L1(void);
28
29void amigaone_show_cpuinfo(struct seq_file *m)
30{
31 seq_printf(m, "vendor\t\t: Eyetech Ltd.\n");
32}
33
34static int __init amigaone_add_bridge(struct device_node *dev)
35{
36 const u32 *cfg_addr, *cfg_data;
37 int len;
38 const int *bus_range;
39 struct pci_controller *hose;
40
41 printk(KERN_INFO "Adding PCI host bridge %s\n", dev->full_name);
42
43 cfg_addr = of_get_address(dev, 0, NULL, NULL);
44 cfg_data = of_get_address(dev, 1, NULL, NULL);
45 if ((cfg_addr == NULL) || (cfg_data == NULL))
46 return -ENODEV;
47
48 bus_range = of_get_property(dev, "bus-range", &len);
49 if ((bus_range == NULL) || (len < 2 * sizeof(int)))
50 printk(KERN_WARNING "Can't get bus-range for %s, assume"
51 " bus 0\n", dev->full_name);
52
53 hose = pcibios_alloc_controller(dev);
54 if (hose == NULL)
55 return -ENOMEM;
56
57 hose->first_busno = bus_range ? bus_range[0] : 0;
58 hose->last_busno = bus_range ? bus_range[1] : 0xff;
59
60 setup_indirect_pci(hose, cfg_addr[0], cfg_data[0], 0);
61
62 /* Interpret the "ranges" property */
63 /* This also maps the I/O region and sets isa_io/mem_base */
64 pci_process_bridge_OF_ranges(hose, dev, 1);
65
66 return 0;
67}
68
69void __init amigaone_setup_arch(void)
70{
71 struct device_node *np;
72 int phb = -ENODEV;
73
74 /* Lookup PCI host bridges. */
75 for_each_compatible_node(np, "pci", "mai-logic,articia-s")
76 phb = amigaone_add_bridge(np);
77
78 BUG_ON(phb != 0);
79
80 if (ppc_md.progress)
81 ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0);
82}
83
84void __init amigaone_init_IRQ(void)
85{
86 struct device_node *pic, *np = NULL;
87 const unsigned long *prop = NULL;
88 unsigned long int_ack = 0;
89
90 /* Search for ISA interrupt controller. */
91 pic = of_find_compatible_node(NULL, "interrupt-controller",
92 "pnpPNP,000");
93 BUG_ON(pic == NULL);
94
95 /* Look for interrupt acknowledge address in the PCI root node. */
96 np = of_find_compatible_node(NULL, "pci", "mai-logic,articia-s");
97 if (np) {
98 prop = of_get_property(np, "8259-interrupt-acknowledge", NULL);
99 if (prop)
100 int_ack = prop[0];
101 of_node_put(np);
102 }
103
104 if (int_ack == 0)
105 printk(KERN_WARNING "Cannot find PCI interrupt acknowledge"
106 " address, polling\n");
107
108 i8259_init(pic, int_ack);
109 ppc_md.get_irq = i8259_irq;
110 irq_set_default_host(i8259_get_host());
111}
112
113void __init amigaone_init(void)
114{
115 request_region(0x00, 0x20, "dma1");
116 request_region(0x40, 0x20, "timer");
117 request_region(0x80, 0x10, "dma page reg");
118 request_region(0xc0, 0x20, "dma2");
119}
120
121void amigaone_restart(char *cmd)
122{
123 local_irq_disable();
124
125 /* Flush and disable caches. */
126 __flush_disable_L1();
127
128 /* Set SRR0 to the reset vector and turn on MSR_IP. */
129 mtspr(SPRN_SRR0, 0xfff00100);
130 mtspr(SPRN_SRR1, MSR_IP);
131
132 /* Do an rfi to jump back to firmware. */
133 __asm__ __volatile__("rfi" : : : "memory");
134
135 /* Not reached. */
136 while (1);
137}
138
139static int __init amigaone_probe(void)
140{
141 unsigned long root = of_get_flat_dt_root();
142
143 if (of_flat_dt_is_compatible(root, "eyetech,amigaone")) {
144 /*
145 * Coherent memory access cause complete system lockup! Thus
146 * disable this CPU feature, even if the CPU needs it.
147 */
148 cur_cpu_spec->cpu_features &= ~CPU_FTR_NEED_COHERENT;
149
150 ISA_DMA_THRESHOLD = 0x00ffffff;
151 DMA_MODE_READ = 0x44;
152 DMA_MODE_WRITE = 0x48;
153
154 return 1;
155 }
156
157 return 0;
158}
159
160define_machine(amigaone) {
161 .name = "AmigaOne",
162 .probe = amigaone_probe,
163 .setup_arch = amigaone_setup_arch,
164 .init = amigaone_init,
165 .show_cpuinfo = amigaone_show_cpuinfo,
166 .init_IRQ = amigaone_init_IRQ,
167 .restart = amigaone_restart,
168 .calibrate_decr = generic_calibrate_decr,
169 .progress = udbg_progress,
170};
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 5cc3279559a4..40e24c39ad06 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -23,7 +23,7 @@ config PPC_CELL_NATIVE
23 23
24config PPC_IBM_CELL_BLADE 24config PPC_IBM_CELL_BLADE
25 bool "IBM Cell Blade" 25 bool "IBM Cell Blade"
26 depends on PPC_MULTIPLATFORM && PPC64 26 depends on PPC64 && PPC_BOOK3S
27 select PPC_CELL_NATIVE 27 select PPC_CELL_NATIVE
28 select MMIO_NVRAM 28 select MMIO_NVRAM
29 select PPC_UDBG_16550 29 select PPC_UDBG_16550
@@ -31,7 +31,7 @@ config PPC_IBM_CELL_BLADE
31 31
32config PPC_CELLEB 32config PPC_CELLEB
33 bool "Toshiba's Cell Reference Set 'Celleb' Architecture" 33 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
34 depends on PPC_MULTIPLATFORM && PPC64 34 depends on PPC64 && PPC_BOOK3S
35 select PPC_CELL_NATIVE 35 select PPC_CELL_NATIVE
36 select HAS_TXX9_SERIAL 36 select HAS_TXX9_SERIAL
37 select PPC_UDBG_BEAT 37 select PPC_UDBG_BEAT
@@ -40,9 +40,14 @@ config PPC_CELLEB
40 40
41config PPC_CELL_QPACE 41config PPC_CELL_QPACE
42 bool "IBM Cell - QPACE" 42 bool "IBM Cell - QPACE"
43 depends on PPC_MULTIPLATFORM && PPC64 43 depends on PPC64 && PPC_BOOK3S
44 select PPC_CELL_COMMON 44 select PPC_CELL_COMMON
45 45
46config AXON_MSI
47 bool
48 depends on PPC_IBM_CELL_BLADE && PCI_MSI
49 default y
50
46menu "Cell Broadband Engine options" 51menu "Cell Broadband Engine options"
47 depends on PPC_CELL 52 depends on PPC_CELL
48 53
@@ -98,7 +103,7 @@ config PPC_IBM_CELL_RESETBUTTON
98 103
99config PPC_IBM_CELL_POWERBUTTON 104config PPC_IBM_CELL_POWERBUTTON
100 tristate "IBM Cell Blade power button" 105 tristate "IBM Cell Blade power button"
101 depends on PPC_IBM_CELL_BLADE && PPC_PMI && INPUT_EVDEV 106 depends on PPC_IBM_CELL_BLADE && INPUT_EVDEV
102 default y 107 default y
103 help 108 help
104 Support Powerbutton on IBM Cell blades. 109 Support Powerbutton on IBM Cell blades.
@@ -118,9 +123,9 @@ config CBE_CPUFREQ
118 For details, take a look at <file:Documentation/cpu-freq/>. 123 For details, take a look at <file:Documentation/cpu-freq/>.
119 If you don't have such processor, say N 124 If you don't have such processor, say N
120 125
121config CBE_CPUFREQ_PMI 126config CBE_CPUFREQ_PMI_ENABLE
122 tristate "CBE frequency scaling using PMI interface" 127 bool "CBE frequency scaling using PMI interface"
123 depends on CBE_CPUFREQ && PPC_PMI && EXPERIMENTAL 128 depends on CBE_CPUFREQ && EXPERIMENTAL
124 default n 129 default n
125 help 130 help
126 Select this, if you want to use the PMI interface 131 Select this, if you want to use the PMI interface
@@ -128,6 +133,20 @@ config CBE_CPUFREQ_PMI
128 processor will not only be able to run at lower speed, 133 processor will not only be able to run at lower speed,
129 but also at lower core voltage. 134 but also at lower core voltage.
130 135
136config CBE_CPUFREQ_PMI
137 tristate
138 depends on CBE_CPUFREQ_PMI_ENABLE
139 default CBE_CPUFREQ
140
141config PPC_PMI
142 tristate
143 default y
144 depends on CBE_CPUFREQ_PMI || PPC_IBM_CELL_POWERBUTTON
145 help
146 PMI (Platform Management Interrupt) is a way to
147 communicate with the BMC (Baseboard Management Controller).
148 It is used in some IBM Cell blades.
149
131config CBE_CPUFREQ_SPU_GOVERNOR 150config CBE_CPUFREQ_SPU_GOVERNOR
132 tristate "CBE frequency scaling based on SPU usage" 151 tristate "CBE frequency scaling based on SPU usage"
133 depends on SPU_FS && CPU_FREQ 152 depends on SPU_FS && CPU_FREQ
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 43eccb270301..83fafe922641 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -28,7 +28,7 @@ obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
28 $(spu-manage-y) \ 28 $(spu-manage-y) \
29 spufs/ 29 spufs/
30 30
31obj-$(CONFIG_PCI_MSI) += axon_msi.o 31obj-$(CONFIG_AXON_MSI) += axon_msi.o
32 32
33# qpace setup 33# qpace setup
34obj-$(CONFIG_PPC_CELL_QPACE) += qpace_setup.o 34obj-$(CONFIG_PPC_CELL_QPACE) += qpace_setup.o
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 059cad6c3f69..5c1118e31940 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -131,10 +131,10 @@ static const struct ppc_pci_io __devinitconst iowa_pci_io = {
131}; 131};
132 132
133static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size, 133static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
134 unsigned long flags) 134 unsigned long flags, void *caller)
135{ 135{
136 struct iowa_bus *bus; 136 struct iowa_bus *bus;
137 void __iomem *res = __ioremap(addr, size, flags); 137 void __iomem *res = __ioremap_caller(addr, size, flags, caller);
138 int busno; 138 int busno;
139 139
140 bus = iowa_pci_find(0, (unsigned long)addr); 140 bus = iowa_pci_find(0, (unsigned long)addr);
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index ee5033eddf01..bed4690de394 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -74,7 +74,7 @@
74#define IOC_IO_ExcpStat_V 0x8000000000000000ul 74#define IOC_IO_ExcpStat_V 0x8000000000000000ul
75#define IOC_IO_ExcpStat_SPF_Mask 0x6000000000000000ul 75#define IOC_IO_ExcpStat_SPF_Mask 0x6000000000000000ul
76#define IOC_IO_ExcpStat_SPF_S 0x6000000000000000ul 76#define IOC_IO_ExcpStat_SPF_S 0x6000000000000000ul
77#define IOC_IO_ExcpStat_SPF_P 0x4000000000000000ul 77#define IOC_IO_ExcpStat_SPF_P 0x2000000000000000ul
78#define IOC_IO_ExcpStat_ADDR_Mask 0x00000007fffff000ul 78#define IOC_IO_ExcpStat_ADDR_Mask 0x00000007fffff000ul
79#define IOC_IO_ExcpStat_RW_Mask 0x0000000000000800ul 79#define IOC_IO_ExcpStat_RW_Mask 0x0000000000000800ul
80#define IOC_IO_ExcpStat_IOID_Mask 0x00000000000007fful 80#define IOC_IO_ExcpStat_IOID_Mask 0x00000000000007fful
@@ -247,17 +247,18 @@ static void tce_free_cell(struct iommu_table *tbl, long index, long npages)
247 247
248static irqreturn_t ioc_interrupt(int irq, void *data) 248static irqreturn_t ioc_interrupt(int irq, void *data)
249{ 249{
250 unsigned long stat; 250 unsigned long stat, spf;
251 struct cbe_iommu *iommu = data; 251 struct cbe_iommu *iommu = data;
252 252
253 stat = in_be64(iommu->xlate_regs + IOC_IO_ExcpStat); 253 stat = in_be64(iommu->xlate_regs + IOC_IO_ExcpStat);
254 spf = stat & IOC_IO_ExcpStat_SPF_Mask;
254 255
255 /* Might want to rate limit it */ 256 /* Might want to rate limit it */
256 printk(KERN_ERR "iommu: DMA exception 0x%016lx\n", stat); 257 printk(KERN_ERR "iommu: DMA exception 0x%016lx\n", stat);
257 printk(KERN_ERR " V=%d, SPF=[%c%c], RW=%s, IOID=0x%04x\n", 258 printk(KERN_ERR " V=%d, SPF=[%c%c], RW=%s, IOID=0x%04x\n",
258 !!(stat & IOC_IO_ExcpStat_V), 259 !!(stat & IOC_IO_ExcpStat_V),
259 (stat & IOC_IO_ExcpStat_SPF_S) ? 'S' : ' ', 260 (spf == IOC_IO_ExcpStat_SPF_S) ? 'S' : ' ',
260 (stat & IOC_IO_ExcpStat_SPF_P) ? 'P' : ' ', 261 (spf == IOC_IO_ExcpStat_SPF_P) ? 'P' : ' ',
261 (stat & IOC_IO_ExcpStat_RW_Mask) ? "Read" : "Write", 262 (stat & IOC_IO_ExcpStat_RW_Mask) ? "Read" : "Write",
262 (unsigned int)(stat & IOC_IO_ExcpStat_IOID_Mask)); 263 (unsigned int)(stat & IOC_IO_ExcpStat_IOID_Mask));
263 printk(KERN_ERR " page=0x%016lx\n", 264 printk(KERN_ERR " page=0x%016lx\n",
@@ -643,7 +644,7 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
643 644
644static int dma_fixed_dma_supported(struct device *dev, u64 mask) 645static int dma_fixed_dma_supported(struct device *dev, u64 mask)
645{ 646{
646 return mask == DMA_64BIT_MASK; 647 return mask == DMA_BIT_MASK(64);
647} 648}
648 649
649static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); 650static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index be84e6a16b30..c5ce02e84c8e 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -81,16 +81,6 @@ static int __init qpace_publish_devices(void)
81} 81}
82machine_subsys_initcall(qpace, qpace_publish_devices); 82machine_subsys_initcall(qpace, qpace_publish_devices);
83 83
84extern int qpace_notify(struct device *dev)
85{
86 /* set dma_ops for of_platform bus */
87 if (dev->bus && dev->bus->name
88 && !strcmp(dev->bus->name, "of_platform"))
89 set_dma_ops(dev, &dma_direct_ops);
90
91 return 0;
92}
93
94static void __init qpace_setup_arch(void) 84static void __init qpace_setup_arch(void)
95{ 85{
96#ifdef CONFIG_SPU_BASE 86#ifdef CONFIG_SPU_BASE
@@ -115,9 +105,6 @@ static void __init qpace_setup_arch(void)
115#ifdef CONFIG_DUMMY_CONSOLE 105#ifdef CONFIG_DUMMY_CONSOLE
116 conswitchp = &dummy_con; 106 conswitchp = &dummy_con;
117#endif 107#endif
118
119 /* set notifier function */
120 platform_notify = &qpace_notify;
121} 108}
122 109
123static int __init qpace_probe(void) 110static int __init qpace_probe(void)
@@ -141,6 +128,8 @@ define_machine(qpace) {
141 .power_off = rtas_power_off, 128 .power_off = rtas_power_off,
142 .halt = rtas_halt, 129 .halt = rtas_halt,
143 .get_boot_time = rtas_get_boot_time, 130 .get_boot_time = rtas_get_boot_time,
131 .get_rtc_time = rtas_get_rtc_time,
132 .set_rtc_time = rtas_set_rtc_time,
144 .calibrate_decr = generic_calibrate_decr, 133 .calibrate_decr = generic_calibrate_decr,
145 .progress = qpace_progress, 134 .progress = qpace_progress,
146 .init_IRQ = iic_init_IRQ, 135 .init_IRQ = iic_init_IRQ,
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index e487ad68ac11..9abd210d87c1 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -114,7 +114,7 @@ static inline void mm_needs_global_tlbie(struct mm_struct *mm)
114 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1; 114 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1;
115 115
116 /* Global TLBIE broadcast required with SPEs. */ 116 /* Global TLBIE broadcast required with SPEs. */
117 __cpus_setall(&mm->cpu_vm_mask, nr); 117 bitmap_fill(cpumask_bits(mm_cpumask(mm)), nr);
118} 118}
119 119
120void spu_associate_mm(struct spu *spu, struct mm_struct *mm) 120void spu_associate_mm(struct spu *spu, struct mm_struct *mm)
diff --git a/arch/powerpc/platforms/cell/spu_fault.c b/arch/powerpc/platforms/cell/spu_fault.c
index c8b1cd42905d..95d8dadf2d87 100644
--- a/arch/powerpc/platforms/cell/spu_fault.c
+++ b/arch/powerpc/platforms/cell/spu_fault.c
@@ -39,60 +39,56 @@ int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
39 unsigned long is_write; 39 unsigned long is_write;
40 int ret; 40 int ret;
41 41
42#if 0 42 if (mm == NULL)
43 if (!IS_VALID_EA(ea)) {
44 return -EFAULT; 43 return -EFAULT;
45 } 44
46#endif /* XXX */ 45 if (mm->pgd == NULL)
47 if (mm == NULL) {
48 return -EFAULT;
49 }
50 if (mm->pgd == NULL) {
51 return -EFAULT; 46 return -EFAULT;
52 }
53 47
54 down_read(&mm->mmap_sem); 48 down_read(&mm->mmap_sem);
49 ret = -EFAULT;
55 vma = find_vma(mm, ea); 50 vma = find_vma(mm, ea);
56 if (!vma) 51 if (!vma)
57 goto bad_area; 52 goto out_unlock;
58 if (vma->vm_start <= ea) 53
59 goto good_area; 54 if (ea < vma->vm_start) {
60 if (!(vma->vm_flags & VM_GROWSDOWN)) 55 if (!(vma->vm_flags & VM_GROWSDOWN))
61 goto bad_area; 56 goto out_unlock;
62 if (expand_stack(vma, ea)) 57 if (expand_stack(vma, ea))
63 goto bad_area; 58 goto out_unlock;
64good_area: 59 }
60
65 is_write = dsisr & MFC_DSISR_ACCESS_PUT; 61 is_write = dsisr & MFC_DSISR_ACCESS_PUT;
66 if (is_write) { 62 if (is_write) {
67 if (!(vma->vm_flags & VM_WRITE)) 63 if (!(vma->vm_flags & VM_WRITE))
68 goto bad_area; 64 goto out_unlock;
69 } else { 65 } else {
70 if (dsisr & MFC_DSISR_ACCESS_DENIED) 66 if (dsisr & MFC_DSISR_ACCESS_DENIED)
71 goto bad_area; 67 goto out_unlock;
72 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) 68 if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
73 goto bad_area; 69 goto out_unlock;
74 } 70 }
71
75 ret = 0; 72 ret = 0;
76 *flt = handle_mm_fault(mm, vma, ea, is_write); 73 *flt = handle_mm_fault(mm, vma, ea, is_write);
77 if (unlikely(*flt & VM_FAULT_ERROR)) { 74 if (unlikely(*flt & VM_FAULT_ERROR)) {
78 if (*flt & VM_FAULT_OOM) { 75 if (*flt & VM_FAULT_OOM) {
79 ret = -ENOMEM; 76 ret = -ENOMEM;
80 goto bad_area; 77 goto out_unlock;
81 } else if (*flt & VM_FAULT_SIGBUS) { 78 } else if (*flt & VM_FAULT_SIGBUS) {
82 ret = -EFAULT; 79 ret = -EFAULT;
83 goto bad_area; 80 goto out_unlock;
84 } 81 }
85 BUG(); 82 BUG();
86 } 83 }
84
87 if (*flt & VM_FAULT_MAJOR) 85 if (*flt & VM_FAULT_MAJOR)
88 current->maj_flt++; 86 current->maj_flt++;
89 else 87 else
90 current->min_flt++; 88 current->min_flt++;
91 up_read(&mm->mmap_sem);
92 return ret;
93 89
94bad_area: 90out_unlock:
95 up_read(&mm->mmap_sem); 91 up_read(&mm->mmap_sem);
96 return -EFAULT; 92 return ret;
97} 93}
98EXPORT_SYMBOL_GPL(spu_handle_mm_fault); 94EXPORT_SYMBOL_GPL(spu_handle_mm_fault);
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 6653ddbed048..db5398c0339f 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -35,6 +35,8 @@ atomic_t nr_spu_contexts = ATOMIC_INIT(0);
35struct spu_context *alloc_spu_context(struct spu_gang *gang) 35struct spu_context *alloc_spu_context(struct spu_gang *gang)
36{ 36{
37 struct spu_context *ctx; 37 struct spu_context *ctx;
38 struct timespec ts;
39
38 ctx = kzalloc(sizeof *ctx, GFP_KERNEL); 40 ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
39 if (!ctx) 41 if (!ctx)
40 goto out; 42 goto out;
@@ -64,6 +66,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
64 __spu_update_sched_info(ctx); 66 __spu_update_sched_info(ctx);
65 spu_set_timeslice(ctx); 67 spu_set_timeslice(ctx);
66 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED; 68 ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
69 ktime_get_ts(&ts);
70 ctx->stats.tstamp = timespec_to_ns(&ts);
67 71
68 atomic_inc(&nr_spu_contexts); 72 atomic_inc(&nr_spu_contexts);
69 goto out; 73 goto out;
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 0da7f2bf5ee1..d6a519e6e1c1 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -568,16 +568,17 @@ spufs_regs_write(struct file *file, const char __user *buffer,
568 struct spu_lscsa *lscsa = ctx->csa.lscsa; 568 struct spu_lscsa *lscsa = ctx->csa.lscsa;
569 int ret; 569 int ret;
570 570
571 size = min_t(ssize_t, sizeof lscsa->gprs - *pos, size); 571 if (*pos >= sizeof(lscsa->gprs))
572 if (size <= 0)
573 return -EFBIG; 572 return -EFBIG;
573
574 size = min_t(ssize_t, sizeof(lscsa->gprs) - *pos, size);
574 *pos += size; 575 *pos += size;
575 576
576 ret = spu_acquire_saved(ctx); 577 ret = spu_acquire_saved(ctx);
577 if (ret) 578 if (ret)
578 return ret; 579 return ret;
579 580
580 ret = copy_from_user(lscsa->gprs + *pos - size, 581 ret = copy_from_user((char *)lscsa->gprs + *pos - size,
581 buffer, size) ? -EFAULT : size; 582 buffer, size) ? -EFAULT : size;
582 583
583 spu_release_saved(ctx); 584 spu_release_saved(ctx);
@@ -623,10 +624,11 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
623 struct spu_lscsa *lscsa = ctx->csa.lscsa; 624 struct spu_lscsa *lscsa = ctx->csa.lscsa;
624 int ret; 625 int ret;
625 626
626 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size); 627 if (*pos >= sizeof(lscsa->fpcr))
627 if (size <= 0)
628 return -EFBIG; 628 return -EFBIG;
629 629
630 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
631
630 ret = spu_acquire_saved(ctx); 632 ret = spu_acquire_saved(ctx);
631 if (ret) 633 if (ret)
632 return ret; 634 return ret;
@@ -2665,7 +2667,7 @@ static const struct file_operations spufs_ctx_fops = {
2665 .release = single_release, 2667 .release = single_release,
2666}; 2668};
2667 2669
2668struct spufs_tree_descr spufs_dir_contents[] = { 2670const struct spufs_tree_descr spufs_dir_contents[] = {
2669 { "capabilities", &spufs_caps_fops, 0444, }, 2671 { "capabilities", &spufs_caps_fops, 0444, },
2670 { "mem", &spufs_mem_fops, 0666, LS_SIZE, }, 2672 { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
2671 { "regs", &spufs_regs_fops, 0666, sizeof(struct spu_reg128[128]), }, 2673 { "regs", &spufs_regs_fops, 0666, sizeof(struct spu_reg128[128]), },
@@ -2706,7 +2708,7 @@ struct spufs_tree_descr spufs_dir_contents[] = {
2706 {}, 2708 {},
2707}; 2709};
2708 2710
2709struct spufs_tree_descr spufs_dir_nosched_contents[] = { 2711const struct spufs_tree_descr spufs_dir_nosched_contents[] = {
2710 { "capabilities", &spufs_caps_fops, 0444, }, 2712 { "capabilities", &spufs_caps_fops, 0444, },
2711 { "mem", &spufs_mem_fops, 0666, LS_SIZE, }, 2713 { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
2712 { "mbox", &spufs_mbox_fops, 0444, }, 2714 { "mbox", &spufs_mbox_fops, 0444, },
@@ -2731,12 +2733,12 @@ struct spufs_tree_descr spufs_dir_nosched_contents[] = {
2731 {}, 2733 {},
2732}; 2734};
2733 2735
2734struct spufs_tree_descr spufs_dir_debug_contents[] = { 2736const struct spufs_tree_descr spufs_dir_debug_contents[] = {
2735 { ".ctx", &spufs_ctx_fops, 0444, }, 2737 { ".ctx", &spufs_ctx_fops, 0444, },
2736 {}, 2738 {},
2737}; 2739};
2738 2740
2739struct spufs_coredump_reader spufs_coredump_read[] = { 2741const struct spufs_coredump_reader spufs_coredump_read[] = {
2740 { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])}, 2742 { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])},
2741 { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) }, 2743 { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) },
2742 { "lslr", NULL, spufs_lslr_get, 19 }, 2744 { "lslr", NULL, spufs_lslr_get, 19 },
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index e309ef70a531..706eb5c7e2ee 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -186,8 +186,9 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
186 return simple_rmdir(parent, dir); 186 return simple_rmdir(parent, dir);
187} 187}
188 188
189static int spufs_fill_dir(struct dentry *dir, struct spufs_tree_descr *files, 189static int spufs_fill_dir(struct dentry *dir,
190 int mode, struct spu_context *ctx) 190 const struct spufs_tree_descr *files, int mode,
191 struct spu_context *ctx)
191{ 192{
192 struct dentry *dentry, *tmp; 193 struct dentry *dentry, *tmp;
193 int ret; 194 int ret;
@@ -634,7 +635,7 @@ long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode,
634 if (dentry->d_inode) 635 if (dentry->d_inode)
635 goto out_dput; 636 goto out_dput;
636 637
637 mode &= ~current->fs->umask; 638 mode &= ~current_umask();
638 639
639 if (flags & SPU_CREATE_GANG) 640 if (flags & SPU_CREATE_GANG)
640 ret = spufs_create_gang(nd->path.dentry->d_inode, 641 ret = spufs_create_gang(nd->path.dentry->d_inode,
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index c58bd36b0c5b..4ddf769a64e5 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -117,6 +117,9 @@ static int spu_setup_isolated(struct spu_context *ctx)
117 cond_resched(); 117 cond_resched();
118 } 118 }
119 119
120 /* clear purge status */
121 out_be64(mfc_cntl, 0);
122
120 /* put the SPE in kernel mode to allow access to the loader */ 123 /* put the SPE in kernel mode to allow access to the loader */
121 sr1 = spu_mfc_sr1_get(ctx->spu); 124 sr1 = spu_mfc_sr1_get(ctx->spu);
122 sr1 &= ~MFC_STATE1_PROBLEM_STATE_MASK; 125 sr1 &= ~MFC_STATE1_PROBLEM_STATE_MASK;
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 3bf908e2873a..ae31573bea4a 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -241,9 +241,9 @@ struct spufs_tree_descr {
241 size_t size; 241 size_t size;
242}; 242};
243 243
244extern struct spufs_tree_descr spufs_dir_contents[]; 244extern const struct spufs_tree_descr spufs_dir_contents[];
245extern struct spufs_tree_descr spufs_dir_nosched_contents[]; 245extern const struct spufs_tree_descr spufs_dir_nosched_contents[];
246extern struct spufs_tree_descr spufs_dir_debug_contents[]; 246extern const struct spufs_tree_descr spufs_dir_debug_contents[];
247 247
248/* system call implementation */ 248/* system call implementation */
249extern struct spufs_calls spufs_calls; 249extern struct spufs_calls spufs_calls;
@@ -358,7 +358,7 @@ struct spufs_coredump_reader {
358 u64 (*get)(struct spu_context *ctx); 358 u64 (*get)(struct spu_context *ctx);
359 size_t size; 359 size_t size;
360}; 360};
361extern struct spufs_coredump_reader spufs_coredump_read[]; 361extern const struct spufs_coredump_reader spufs_coredump_read[];
362extern int spufs_coredump_num_notes; 362extern int spufs_coredump_num_notes;
363 363
364extern int spu_init_csa(struct spu_state *csa); 364extern int spu_init_csa(struct spu_state *csa);
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig
index 22b4b4e3b6f0..37d438bd5b7a 100644
--- a/arch/powerpc/platforms/chrp/Kconfig
+++ b/arch/powerpc/platforms/chrp/Kconfig
@@ -1,6 +1,6 @@
1config PPC_CHRP 1config PPC_CHRP
2 bool "Common Hardware Reference Platform (CHRP) based machines" 2 bool "Common Hardware Reference Platform (CHRP) based machines"
3 depends on PPC_MULTIPLATFORM && PPC32 3 depends on 6xx
4 select MPIC 4 select MPIC
5 select PPC_I8259 5 select PPC_I8259
6 select PPC_INDIRECT_PCI 6 select PPC_INDIRECT_PCI
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 130ff72d99dd..039fc8e82199 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -21,8 +21,8 @@
21#define PEGASOS2_SRAM_BASE (0xf2000000) 21#define PEGASOS2_SRAM_BASE (0xf2000000)
22#define PEGASOS2_SRAM_SIZE (256*1024) 22#define PEGASOS2_SRAM_SIZE (256*1024)
23 23
24#define PEGASOS2_SRAM_BASE_ETH0 (PEGASOS2_SRAM_BASE) 24#define PEGASOS2_SRAM_BASE_ETH_PORT0 (PEGASOS2_SRAM_BASE)
25#define PEGASOS2_SRAM_BASE_ETH1 (PEGASOS2_SRAM_BASE_ETH0 + (PEGASOS2_SRAM_SIZE / 2) ) 25#define PEGASOS2_SRAM_BASE_ETH_PORT1 (PEGASOS2_SRAM_BASE_ETH_PORT0 + (PEGASOS2_SRAM_SIZE / 2) )
26 26
27 27
28#define PEGASOS2_SRAM_RXRING_SIZE (PEGASOS2_SRAM_SIZE/4) 28#define PEGASOS2_SRAM_RXRING_SIZE (PEGASOS2_SRAM_SIZE/4)
@@ -47,75 +47,42 @@ static struct platform_device mv643xx_eth_shared_device = {
47 .resource = mv643xx_eth_shared_resources, 47 .resource = mv643xx_eth_shared_resources,
48}; 48};
49 49
50static struct resource mv643xx_eth0_resources[] = { 50static struct resource mv643xx_eth_port1_resources[] = {
51 [0] = { 51 [0] = {
52 .name = "eth0 irq", 52 .name = "eth port1 irq",
53 .start = 9, 53 .start = 9,
54 .end = 9, 54 .end = 9,
55 .flags = IORESOURCE_IRQ, 55 .flags = IORESOURCE_IRQ,
56 }, 56 },
57}; 57};
58 58
59 59static struct mv643xx_eth_platform_data eth_port1_pd = {
60static struct mv643xx_eth_platform_data eth0_pd = {
61 .shared = &mv643xx_eth_shared_device,
62 .port_number = 0,
63
64 .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0,
65 .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
66 .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
67
68 .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH0 + PEGASOS2_SRAM_TXRING_SIZE,
69 .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE,
70 .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16,
71};
72
73static struct platform_device eth0_device = {
74 .name = MV643XX_ETH_NAME,
75 .id = 0,
76 .num_resources = ARRAY_SIZE(mv643xx_eth0_resources),
77 .resource = mv643xx_eth0_resources,
78 .dev = {
79 .platform_data = &eth0_pd,
80 },
81};
82
83static struct resource mv643xx_eth1_resources[] = {
84 [0] = {
85 .name = "eth1 irq",
86 .start = 9,
87 .end = 9,
88 .flags = IORESOURCE_IRQ,
89 },
90};
91
92static struct mv643xx_eth_platform_data eth1_pd = {
93 .shared = &mv643xx_eth_shared_device, 60 .shared = &mv643xx_eth_shared_device,
94 .port_number = 1, 61 .port_number = 1,
62 .phy_addr = MV643XX_ETH_PHY_ADDR(7),
95 63
96 .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1, 64 .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH_PORT1,
97 .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, 65 .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
98 .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, 66 .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
99 67
100 .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH1 + PEGASOS2_SRAM_TXRING_SIZE, 68 .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH_PORT1 + PEGASOS2_SRAM_TXRING_SIZE,
101 .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE, 69 .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE,
102 .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16, 70 .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16,
103}; 71};
104 72
105static struct platform_device eth1_device = { 73static struct platform_device eth_port1_device = {
106 .name = MV643XX_ETH_NAME, 74 .name = MV643XX_ETH_NAME,
107 .id = 1, 75 .id = 1,
108 .num_resources = ARRAY_SIZE(mv643xx_eth1_resources), 76 .num_resources = ARRAY_SIZE(mv643xx_eth_port1_resources),
109 .resource = mv643xx_eth1_resources, 77 .resource = mv643xx_eth_port1_resources,
110 .dev = { 78 .dev = {
111 .platform_data = &eth1_pd, 79 .platform_data = &eth_port1_pd,
112 }, 80 },
113}; 81};
114 82
115static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { 83static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
116 &mv643xx_eth_shared_device, 84 &mv643xx_eth_shared_device,
117 &eth0_device, 85 &eth_port1_device,
118 &eth1_device,
119}; 86};
120 87
121/***********/ 88/***********/
@@ -191,15 +158,10 @@ static int __init mv643xx_eth_add_pds(void)
191 158
192 if ( Enable_SRAM() < 0) 159 if ( Enable_SRAM() < 0)
193 { 160 {
194 eth0_pd.tx_sram_addr = 0; 161 eth_port1_pd.tx_sram_addr = 0;
195 eth0_pd.tx_sram_size = 0; 162 eth_port1_pd.tx_sram_size = 0;
196 eth0_pd.rx_sram_addr = 0; 163 eth_port1_pd.rx_sram_addr = 0;
197 eth0_pd.rx_sram_size = 0; 164 eth_port1_pd.rx_sram_size = 0;
198
199 eth1_pd.tx_sram_addr = 0;
200 eth1_pd.tx_sram_size = 0;
201 eth1_pd.rx_sram_addr = 0;
202 eth1_pd.rx_sram_size = 0;
203 165
204#ifdef BE_VERBOSE 166#ifdef BE_VERBOSE
205 printk("Pegasos II/Marvell MV64361: Can't enable the " 167 printk("Pegasos II/Marvell MV64361: Can't enable the "
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 272d79a8d289..cd4ad9aea760 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -472,7 +472,6 @@ static void __init chrp_find_openpic(void)
472#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) 472#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
473static struct irqaction xmon_irqaction = { 473static struct irqaction xmon_irqaction = {
474 .handler = xmon_irq, 474 .handler = xmon_irq,
475 .mask = CPU_MASK_NONE,
476 .name = "XMON break", 475 .name = "XMON break",
477}; 476};
478#endif 477#endif
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 4f9f8184d164..291ac9d8cbee 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -1,6 +1,6 @@
1config EMBEDDED6xx 1config EMBEDDED6xx
2 bool "Embedded 6xx/7xx/7xxx-based boards" 2 bool "Embedded 6xx/7xx/7xxx-based boards"
3 depends on PPC32 && BROKEN_ON_SMP && PPC_MULTIPLATFORM 3 depends on 6xx && BROKEN_ON_SMP
4 4
5config LINKSTATION 5config LINKSTATION
6 bool "Linkstation / Kurobox(HG) from Buffalo" 6 bool "Linkstation / Kurobox(HG) from Buffalo"
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index 7ddd0a2c8027..647e87787437 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -1,6 +1,6 @@
1config PPC_ISERIES 1config PPC_ISERIES
2 bool "IBM Legacy iSeries" 2 bool "IBM Legacy iSeries"
3 depends on PPC_MULTIPLATFORM && PPC64 3 depends on PPC64 && PPC_BOOK3S
4 select PPC_INDIRECT_IO 4 select PPC_INDIRECT_IO
5 select PPC_PCI_CHOICE if EMBEDDED 5 select PPC_PCI_CHOICE if EMBEDDED
6 6
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 6ed75bffc8ab..ff43f1fd8343 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -202,7 +202,7 @@ static struct iommu_table vio_iommu_table;
202void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag) 202void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag)
203{ 203{
204 return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle, 204 return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle,
205 DMA_32BIT_MASK, flag, -1); 205 DMA_BIT_MASK(32), flag, -1);
206} 206}
207EXPORT_SYMBOL_GPL(iseries_hv_alloc); 207EXPORT_SYMBOL_GPL(iseries_hv_alloc);
208 208
@@ -217,7 +217,7 @@ dma_addr_t iseries_hv_map(void *vaddr, size_t size,
217{ 217{
218 return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr), 218 return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
219 (unsigned long)vaddr % PAGE_SIZE, size, 219 (unsigned long)vaddr % PAGE_SIZE, size,
220 DMA_32BIT_MASK, direction, NULL); 220 DMA_BIT_MASK(32), direction, NULL);
221} 221}
222 222
223void iseries_hv_unmap(dma_addr_t dma_handle, size_t size, 223void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index 701d9297c207..94f444758836 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -214,7 +214,7 @@ void __init iSeries_activate_IRQs()
214 unsigned long flags; 214 unsigned long flags;
215 215
216 for_each_irq (irq) { 216 for_each_irq (irq) {
217 irq_desc_t *desc = get_irq_desc(irq); 217 struct irq_desc *desc = get_irq_desc(irq);
218 218
219 if (desc && desc->chip && desc->chip->startup) { 219 if (desc && desc->chip && desc->chip->startup) {
220 spin_lock_irqsave(&desc->lock, flags); 220 spin_lock_irqsave(&desc->lock, flags);
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 24519b96d6ad..a6cd3394feaa 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -617,7 +617,7 @@ static void iseries_dedicated_idle(void)
617} 617}
618 618
619static void __iomem *iseries_ioremap(phys_addr_t address, unsigned long size, 619static void __iomem *iseries_ioremap(phys_addr_t address, unsigned long size,
620 unsigned long flags) 620 unsigned long flags, void *caller)
621{ 621{
622 return (void __iomem *)address; 622 return (void __iomem *)address;
623} 623}
diff --git a/arch/powerpc/platforms/maple/Kconfig b/arch/powerpc/platforms/maple/Kconfig
index a6467a5591fa..1ea621a94c3b 100644
--- a/arch/powerpc/platforms/maple/Kconfig
+++ b/arch/powerpc/platforms/maple/Kconfig
@@ -1,5 +1,5 @@
1config PPC_MAPLE 1config PPC_MAPLE
2 depends on PPC_MULTIPLATFORM && PPC64 2 depends on PPC64 && PPC_BOOK3S
3 bool "Maple 970FX Evaluation Board" 3 bool "Maple 970FX Evaluation Board"
4 select PCI 4 select PCI
5 select MPIC 5 select MPIC
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index 348e0619e3e5..a2aeb327d185 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -1,5 +1,5 @@
1config PPC_PASEMI 1config PPC_PASEMI
2 depends on PPC_MULTIPLATFORM && PPC64 2 depends on PPC64 && PPC_BOOK3S
3 bool "PA Semi SoC-based platforms" 3 bool "PA Semi SoC-based platforms"
4 default n 4 default n
5 select MPIC 5 select MPIC
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig
index 055990ca8ce6..1e1a0873e1dd 100644
--- a/arch/powerpc/platforms/powermac/Kconfig
+++ b/arch/powerpc/platforms/powermac/Kconfig
@@ -1,6 +1,6 @@
1config PPC_PMAC 1config PPC_PMAC
2 bool "Apple PowerMac based machines" 2 bool "Apple PowerMac based machines"
3 depends on PPC_MULTIPLATFORM 3 depends on PPC_BOOK3S
4 select MPIC 4 select MPIC
5 select PCI 5 select PCI
6 select PPC_INDIRECT_PCI if PPC32 6 select PPC_INDIRECT_PCI if PPC32
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index beb38333b6d2..22ecfbe7183d 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -86,6 +86,7 @@ static int (*g5_query_freq)(void);
86 86
87static DEFINE_MUTEX(g5_switch_mutex); 87static DEFINE_MUTEX(g5_switch_mutex);
88 88
89static unsigned long transition_latency;
89 90
90#ifdef CONFIG_PMAC_SMU 91#ifdef CONFIG_PMAC_SMU
91 92
@@ -357,7 +358,7 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
357 358
358static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) 359static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
359{ 360{
360 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 361 policy->cpuinfo.transition_latency = transition_latency;
361 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency; 362 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
362 /* secondary CPUs are tied to the primary one by the 363 /* secondary CPUs are tied to the primary one by the
363 * cpufreq core if in the secondary policy we tell it that 364 * cpufreq core if in the secondary policy we tell it that
@@ -500,6 +501,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
500 g5_cpu_freqs[1].frequency = max_freq/2; 501 g5_cpu_freqs[1].frequency = max_freq/2;
501 502
502 /* Set callbacks */ 503 /* Set callbacks */
504 transition_latency = 12000;
503 g5_switch_freq = g5_scom_switch_freq; 505 g5_switch_freq = g5_scom_switch_freq;
504 g5_query_freq = g5_scom_query_freq; 506 g5_query_freq = g5_scom_query_freq;
505 freq_method = "SCOM"; 507 freq_method = "SCOM";
@@ -675,6 +677,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
675 g5_cpu_freqs[1].frequency = min_freq; 677 g5_cpu_freqs[1].frequency = min_freq;
676 678
677 /* Set callbacks */ 679 /* Set callbacks */
680 transition_latency = CPUFREQ_ETERNAL;
678 g5_switch_volt = g5_pfunc_switch_volt; 681 g5_switch_volt = g5_pfunc_switch_volt;
679 g5_switch_freq = g5_pfunc_switch_freq; 682 g5_switch_freq = g5_pfunc_switch_freq;
680 g5_query_freq = g5_pfunc_query_freq; 683 g5_query_freq = g5_pfunc_query_freq;
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 6d149ae8ffa7..7039d8f1d3ba 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -266,7 +266,6 @@ static unsigned int pmac_pic_get_irq(void)
266static struct irqaction xmon_action = { 266static struct irqaction xmon_action = {
267 .handler = xmon_irq, 267 .handler = xmon_irq,
268 .flags = 0, 268 .flags = 0,
269 .mask = CPU_MASK_NONE,
270 .name = "NMI - XMON" 269 .name = "NMI - XMON"
271}; 270};
272#endif 271#endif
@@ -274,7 +273,6 @@ static struct irqaction xmon_action = {
274static struct irqaction gatwick_cascade_action = { 273static struct irqaction gatwick_cascade_action = {
275 .handler = gatwick_action, 274 .handler = gatwick_action,
276 .flags = IRQF_DISABLED, 275 .flags = IRQF_DISABLED,
277 .mask = CPU_MASK_NONE,
278 .name = "cascade", 276 .name = "cascade",
279}; 277};
280 278
diff --git a/arch/powerpc/platforms/powermac/pic.h b/arch/powerpc/platforms/powermac/pic.h
index c44c89f5e532..d622a8345aaa 100644
--- a/arch/powerpc/platforms/powermac/pic.h
+++ b/arch/powerpc/platforms/powermac/pic.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/irq.h> 4#include <linux/irq.h>
5 5
6extern struct hw_interrupt_type pmac_pic; 6extern struct irq_chip pmac_pic;
7 7
8extern void pmac_pic_init(void); 8extern void pmac_pic_init(void);
9extern int pmac_get_irq(void); 9extern int pmac_get_irq(void);
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 9b78f5300c24..45936c9ed0ec 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -746,4 +746,7 @@ define_machine(powermac) {
746#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64) 746#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64)
747 .cpu_die = pmac_cpu_die, 747 .cpu_die = pmac_cpu_die,
748#endif 748#endif
749#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
750 .cpu_die = generic_mach_cpu_die,
751#endif
749}; 752};
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index bd8817b00fa4..cf1dbe758890 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -385,7 +385,6 @@ static void __init psurge_dual_sync_tb(int cpu_nr)
385static struct irqaction psurge_irqaction = { 385static struct irqaction psurge_irqaction = {
386 .handler = psurge_primary_intr, 386 .handler = psurge_primary_intr,
387 .flags = IRQF_DISABLED, 387 .flags = IRQF_DISABLED,
388 .mask = CPU_MASK_NONE,
389 .name = "primary IPI", 388 .name = "primary IPI",
390}; 389};
391 390
diff --git a/arch/powerpc/platforms/prep/Kconfig b/arch/powerpc/platforms/prep/Kconfig
index 29d411279b0c..bf8330ef2e76 100644
--- a/arch/powerpc/platforms/prep/Kconfig
+++ b/arch/powerpc/platforms/prep/Kconfig
@@ -1,6 +1,6 @@
1config PPC_PREP 1config PPC_PREP
2 bool "PowerPC Reference Platform (PReP) based machines" 2 bool "PowerPC Reference Platform (PReP) based machines"
3 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN 3 depends on 6xx && BROKEN
4 select MPIC 4 select MPIC
5 select PPC_I8259 5 select PPC_I8259
6 select PPC_INDIRECT_PCI 6 select PPC_INDIRECT_PCI
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 740ef56a1550..dfe316b161a9 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -1,6 +1,6 @@
1config PPC_PS3 1config PPC_PS3
2 bool "Sony PS3" 2 bool "Sony PS3"
3 depends on PPC_MULTIPLATFORM && PPC64 3 depends on PPC64 && PPC_BOOK3S
4 select PPC_CELL 4 select PPC_CELL
5 select USB_ARCH_HAS_OHCI 5 select USB_ARCH_HAS_OHCI
6 select USB_OHCI_LITTLE_ENDIAN 6 select USB_OHCI_LITTLE_ENDIAN
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index d281cc0bca71..9a2b6d948610 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -311,7 +311,7 @@ static int __init ps3_mm_add_memory(void)
311 result = add_memory(0, start_addr, map.r1.size); 311 result = add_memory(0, start_addr, map.r1.size);
312 312
313 if (result) { 313 if (result) {
314 DBG("%s:%d: add_memory failed: (%d)\n", 314 pr_err("%s:%d: add_memory failed: (%d)\n",
315 __func__, __LINE__, result); 315 __func__, __LINE__, result);
316 return result; 316 return result;
317 } 317 }
@@ -322,7 +322,7 @@ static int __init ps3_mm_add_memory(void)
322 result = online_pages(start_pfn, nr_pages); 322 result = online_pages(start_pfn, nr_pages);
323 323
324 if (result) 324 if (result)
325 DBG("%s:%d: online_pages failed: (%d)\n", 325 pr_err("%s:%d: online_pages failed: (%d)\n",
326 __func__, __LINE__, result); 326 __func__, __LINE__, result);
327 327
328 return result; 328 return result;
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c23b435..86e392b1b049 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
808{ 808{
809 return saved_params.rtc_diff; 809 return saved_params.rtc_diff;
810} 810}
811EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
811 812
812/** 813/**
813 * ps3_os_area_set_rtc_diff - Set the rtc diff value. 814 * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
823 os_area_queue_work(); 824 os_area_queue_work();
824 } 825 }
825} 826}
827EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
826 828
827/** 829/**
828 * ps3_os_area_get_av_multi_out - Returns the default video mode. 830 * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13ebacd9..136aa0637d9c 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
64 64
65void __init ps3_os_area_save_params(void); 65void __init ps3_os_area_save_params(void);
66void __init ps3_os_area_init(void); 66void __init ps3_os_area_init(void);
67u64 ps3_os_area_get_rtc_diff(void);
68void ps3_os_area_set_rtc_diff(u64 rtc_diff);
69 67
70/* spu */ 68/* spu */
71 69
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccbb8d38..66181821322a 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
270 .init_IRQ = ps3_init_IRQ, 270 .init_IRQ = ps3_init_IRQ,
271 .panic = ps3_panic, 271 .panic = ps3_panic,
272 .get_boot_time = ps3_get_boot_time, 272 .get_boot_time = ps3_get_boot_time,
273 .set_rtc_time = ps3_set_rtc_time,
274 .get_rtc_time = ps3_get_rtc_time,
275 .set_dabr = ps3_set_dabr, 273 .set_dabr = ps3_set_dabr,
276 .calibrate_decr = ps3_calibrate_decr, 274 .calibrate_decr = ps3_calibrate_decr,
277 .progress = ps3_progress, 275 .progress = ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index a705fffbb498..9a73d0238639 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -689,7 +689,7 @@ static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
689 689
690static int ps3_dma_supported(struct device *_dev, u64 mask) 690static int ps3_dma_supported(struct device *_dev, u64 mask)
691{ 691{
692 return mask >= DMA_32BIT_MASK; 692 return mask >= DMA_BIT_MASK(32);
693} 693}
694 694
695static struct dma_mapping_ops ps3_sb_dma_ops = { 695static struct dma_mapping_ops ps3_sb_dma_ops = {
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d6d3b2..b178a1e66c91 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
19 */ 19 */
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/platform_device.h>
22 23
23#include <asm/rtc.h> 24#include <asm/rtc.h>
24#include <asm/lv1call.h> 25#include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
74 return rtc_val; 75 return rtc_val;
75} 76}
76 77
77int ps3_set_rtc_time(struct rtc_time *tm) 78unsigned long __init ps3_get_boot_time(void)
78{ 79{
79 u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, 80 return read_rtc() + ps3_os_area_get_rtc_diff();
80 tm->tm_hour, tm->tm_min, tm->tm_sec);
81
82 ps3_os_area_set_rtc_diff(now - read_rtc());
83 return 0;
84} 81}
85 82
86void ps3_get_rtc_time(struct rtc_time *tm) 83static int __init ps3_rtc_init(void)
87{ 84{
88 to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm); 85 struct platform_device *pdev;
89 tm->tm_year -= 1900;
90 tm->tm_mon -= 1;
91}
92 86
93unsigned long __init ps3_get_boot_time(void) 87 pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
94{ 88 if (IS_ERR(pdev))
95 return read_rtc() + ps3_os_area_get_rtc_diff(); 89 return PTR_ERR(pdev);
90
91 return 0;
96} 92}
93
94module_init(ps3_rtc_init);
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index ddc2a307cd50..f0e6f28427bd 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -1,5 +1,5 @@
1config PPC_PSERIES 1config PPC_PSERIES
2 depends on PPC_MULTIPLATFORM && PPC64 2 depends on PPC64 && PPC_BOOK3S
3 bool "IBM pSeries & new (POWER5-based) iSeries" 3 bool "IBM pSeries & new (POWER5-based) iSeries"
4 select MPIC 4 select MPIC
5 select PPC_I8259 5 select PPC_I8259
@@ -25,6 +25,11 @@ config EEH
25 depends on PPC_PSERIES && PCI 25 depends on PPC_PSERIES && PCI
26 default y if !EMBEDDED 26 default y if !EMBEDDED
27 27
28config PSERIES_MSI
29 bool
30 depends on PCI_MSI && EEH
31 default y
32
28config SCANLOG 33config SCANLOG
29 tristate "Scanlog dump interface" 34 tristate "Scanlog dump interface"
30 depends on RTAS_PROC && PPC_PSERIES 35 depends on RTAS_PROC && PPC_PSERIES
@@ -63,3 +68,13 @@ config CMM
63 makes sense for a system running in an LPAR where the unused pages 68 makes sense for a system running in an LPAR where the unused pages
64 will be reused for other LPARs. The interface allows firmware to 69 will be reused for other LPARs. The interface allows firmware to
65 balance memory across many LPARs. 70 balance memory across many LPARs.
71
72config DTL
73 bool "Dispatch Trace Log"
74 depends on PPC_SPLPAR && DEBUG_FS
75 help
76 SPLPAR machines can log hypervisor preempt & dispatch events to a
77 kernel buffer. Saying Y here will enable logging these events,
78 which are accessible through a debugfs file.
79
80 Say N if you are unsure.
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index dfe574af2dc0..790c0b872d4f 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_SCANLOG) += scanlog.o
15obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o eeh_sysfs.o 15obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o eeh_sysfs.o
16obj-$(CONFIG_KEXEC) += kexec.o 16obj-$(CONFIG_KEXEC) += kexec.o
17obj-$(CONFIG_PCI) += pci.o pci_dlpar.o 17obj-$(CONFIG_PCI) += pci.o pci_dlpar.o
18obj-$(CONFIG_PCI_MSI) += msi.o 18obj-$(CONFIG_PSERIES_MSI) += msi.o
19 19
20obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o 20obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
21obj-$(CONFIG_MEMORY_HOTPLUG) += hotplug-memory.o 21obj-$(CONFIG_MEMORY_HOTPLUG) += hotplug-memory.o
@@ -25,3 +25,4 @@ obj-$(CONFIG_HVCS) += hvcserver.o
25obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o 25obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o
26obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o 26obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o
27obj-$(CONFIG_CMM) += cmm.o 27obj-$(CONFIG_CMM) += cmm.o
28obj-$(CONFIG_DTL) += dtl.o
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c
new file mode 100644
index 000000000000..fafcaa0e81ef
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -0,0 +1,278 @@
1/*
2 * Virtual Processor Dispatch Trace Log
3 *
4 * (C) Copyright IBM Corporation 2009
5 *
6 * Author: Jeremy Kerr <jk@ozlabs.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/init.h>
24#include <linux/debugfs.h>
25#include <asm/smp.h>
26#include <asm/system.h>
27#include <asm/uaccess.h>
28
29#include "plpar_wrappers.h"
30
31/*
32 * Layout of entries in the hypervisor's DTL buffer. Although we don't
33 * actually access the internals of an entry (we only need to know the size),
34 * we might as well define it here for reference.
35 */
36struct dtl_entry {
37 u8 dispatch_reason;
38 u8 preempt_reason;
39 u16 processor_id;
40 u32 enqueue_to_dispatch_time;
41 u32 ready_to_enqueue_time;
42 u32 waiting_to_ready_time;
43 u64 timebase;
44 u64 fault_addr;
45 u64 srr0;
46 u64 srr1;
47};
48
49struct dtl {
50 struct dtl_entry *buf;
51 struct dentry *file;
52 int cpu;
53 int buf_entries;
54 u64 last_idx;
55};
56static DEFINE_PER_CPU(struct dtl, dtl);
57
58/*
59 * Dispatch trace log event mask:
60 * 0x7: 0x1: voluntary virtual processor waits
61 * 0x2: time-slice preempts
62 * 0x4: virtual partition memory page faults
63 */
64static u8 dtl_event_mask = 0x7;
65
66
67/*
68 * Size of per-cpu log buffers. Default is just under 16 pages worth.
69 */
70static int dtl_buf_entries = (16 * 85);
71
72
73static int dtl_enable(struct dtl *dtl)
74{
75 unsigned long addr;
76 int ret, hwcpu;
77
78 /* only allow one reader */
79 if (dtl->buf)
80 return -EBUSY;
81
82 /* we need to store the original allocation size for use during read */
83 dtl->buf_entries = dtl_buf_entries;
84
85 dtl->buf = kmalloc_node(dtl->buf_entries * sizeof(struct dtl_entry),
86 GFP_KERNEL, cpu_to_node(dtl->cpu));
87 if (!dtl->buf) {
88 printk(KERN_WARNING "%s: buffer alloc failed for cpu %d\n",
89 __func__, dtl->cpu);
90 return -ENOMEM;
91 }
92
93 /* Register our dtl buffer with the hypervisor. The HV expects the
94 * buffer size to be passed in the second word of the buffer */
95 ((u32 *)dtl->buf)[1] = dtl->buf_entries * sizeof(struct dtl_entry);
96
97 hwcpu = get_hard_smp_processor_id(dtl->cpu);
98 addr = __pa(dtl->buf);
99 ret = register_dtl(hwcpu, addr);
100 if (ret) {
101 printk(KERN_WARNING "%s: DTL registration for cpu %d (hw %d) "
102 "failed with %d\n", __func__, dtl->cpu, hwcpu, ret);
103 kfree(dtl->buf);
104 return -EIO;
105 }
106
107 /* set our initial buffer indices */
108 dtl->last_idx = lppaca[dtl->cpu].dtl_idx = 0;
109
110 /* ensure that our updates to the lppaca fields have occurred before
111 * we actually enable the logging */
112 smp_wmb();
113
114 /* enable event logging */
115 lppaca[dtl->cpu].dtl_enable_mask = dtl_event_mask;
116
117 return 0;
118}
119
120static void dtl_disable(struct dtl *dtl)
121{
122 int hwcpu = get_hard_smp_processor_id(dtl->cpu);
123
124 lppaca[dtl->cpu].dtl_enable_mask = 0x0;
125
126 unregister_dtl(hwcpu, __pa(dtl->buf));
127
128 kfree(dtl->buf);
129 dtl->buf = NULL;
130 dtl->buf_entries = 0;
131}
132
133/* file interface */
134
135static int dtl_file_open(struct inode *inode, struct file *filp)
136{
137 struct dtl *dtl = inode->i_private;
138 int rc;
139
140 rc = dtl_enable(dtl);
141 if (rc)
142 return rc;
143
144 filp->private_data = dtl;
145 return 0;
146}
147
148static int dtl_file_release(struct inode *inode, struct file *filp)
149{
150 struct dtl *dtl = inode->i_private;
151 dtl_disable(dtl);
152 return 0;
153}
154
155static ssize_t dtl_file_read(struct file *filp, char __user *buf, size_t len,
156 loff_t *pos)
157{
158 int rc, cur_idx, last_idx, n_read, n_req, read_size;
159 struct dtl *dtl;
160
161 if ((len % sizeof(struct dtl_entry)) != 0)
162 return -EINVAL;
163
164 dtl = filp->private_data;
165
166 /* requested number of entries to read */
167 n_req = len / sizeof(struct dtl_entry);
168
169 /* actual number of entries read */
170 n_read = 0;
171
172 cur_idx = lppaca[dtl->cpu].dtl_idx;
173 last_idx = dtl->last_idx;
174
175 if (cur_idx - last_idx > dtl->buf_entries) {
176 pr_debug("%s: hv buffer overflow for cpu %d, samples lost\n",
177 __func__, dtl->cpu);
178 }
179
180 cur_idx %= dtl->buf_entries;
181 last_idx %= dtl->buf_entries;
182
183 /* read the tail of the buffer if we've wrapped */
184 if (last_idx > cur_idx) {
185 read_size = min(n_req, dtl->buf_entries - last_idx);
186
187 rc = copy_to_user(buf, &dtl->buf[last_idx],
188 read_size * sizeof(struct dtl_entry));
189 if (rc)
190 return -EFAULT;
191
192 last_idx = 0;
193 n_req -= read_size;
194 n_read += read_size;
195 buf += read_size * sizeof(struct dtl_entry);
196 }
197
198 /* .. and now the head */
199 read_size = min(n_req, cur_idx - last_idx);
200 rc = copy_to_user(buf, &dtl->buf[last_idx],
201 read_size * sizeof(struct dtl_entry));
202 if (rc)
203 return -EFAULT;
204
205 n_read += read_size;
206 dtl->last_idx += n_read;
207
208 return n_read * sizeof(struct dtl_entry);
209}
210
211static struct file_operations dtl_fops = {
212 .open = dtl_file_open,
213 .release = dtl_file_release,
214 .read = dtl_file_read,
215 .llseek = no_llseek,
216};
217
218static struct dentry *dtl_dir;
219
220static int dtl_setup_file(struct dtl *dtl)
221{
222 char name[10];
223
224 sprintf(name, "cpu-%d", dtl->cpu);
225
226 dtl->file = debugfs_create_file(name, 0400, dtl_dir, dtl, &dtl_fops);
227 if (!dtl->file)
228 return -ENOMEM;
229
230 return 0;
231}
232
233static int dtl_init(void)
234{
235 struct dentry *event_mask_file, *buf_entries_file;
236 int rc, i;
237
238 if (!firmware_has_feature(FW_FEATURE_SPLPAR))
239 return -ENODEV;
240
241 /* set up common debugfs structure */
242
243 rc = -ENOMEM;
244 dtl_dir = debugfs_create_dir("dtl", powerpc_debugfs_root);
245 if (!dtl_dir) {
246 printk(KERN_WARNING "%s: can't create dtl root dir\n",
247 __func__);
248 goto err;
249 }
250
251 event_mask_file = debugfs_create_x8("dtl_event_mask", 0600,
252 dtl_dir, &dtl_event_mask);
253 buf_entries_file = debugfs_create_u32("dtl_buf_entries", 0600,
254 dtl_dir, &dtl_buf_entries);
255
256 if (!event_mask_file || !buf_entries_file) {
257 printk(KERN_WARNING "%s: can't create dtl files\n", __func__);
258 goto err_remove_dir;
259 }
260
261 /* set up the per-cpu log structures */
262 for_each_possible_cpu(i) {
263 struct dtl *dtl = &per_cpu(dtl, i);
264 dtl->cpu = i;
265
266 rc = dtl_setup_file(dtl);
267 if (rc)
268 goto err_remove_dir;
269 }
270
271 return 0;
272
273err_remove_dir:
274 debugfs_remove_recursive(dtl_dir);
275err:
276 return rc;
277}
278arch_initcall(dtl_init);
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 0ad56ff7b4a0..380420f8c400 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -79,6 +79,40 @@ static int irq_in_use(unsigned int irq)
79 return rc; 79 return rc;
80} 80}
81 81
82/**
83 * eeh_disable_irq - disable interrupt for the recovering device
84 */
85static void eeh_disable_irq(struct pci_dev *dev)
86{
87 struct device_node *dn = pci_device_to_OF_node(dev);
88
89 /* Don't disable MSI and MSI-X interrupts. They are
90 * effectively disabled by the DMA Stopped state
91 * when an EEH error occurs.
92 */
93 if (dev->msi_enabled || dev->msix_enabled)
94 return;
95
96 if (!irq_in_use(dev->irq))
97 return;
98
99 PCI_DN(dn)->eeh_mode |= EEH_MODE_IRQ_DISABLED;
100 disable_irq_nosync(dev->irq);
101}
102
103/**
104 * eeh_enable_irq - enable interrupt for the recovering device
105 */
106static void eeh_enable_irq(struct pci_dev *dev)
107{
108 struct device_node *dn = pci_device_to_OF_node(dev);
109
110 if ((PCI_DN(dn)->eeh_mode) & EEH_MODE_IRQ_DISABLED) {
111 PCI_DN(dn)->eeh_mode &= ~EEH_MODE_IRQ_DISABLED;
112 enable_irq(dev->irq);
113 }
114}
115
82/* ------------------------------------------------------- */ 116/* ------------------------------------------------------- */
83/** 117/**
84 * eeh_report_error - report pci error to each device driver 118 * eeh_report_error - report pci error to each device driver
@@ -98,11 +132,8 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata)
98 if (!driver) 132 if (!driver)
99 return; 133 return;
100 134
101 if (irq_in_use (dev->irq)) { 135 eeh_disable_irq(dev);
102 struct device_node *dn = pci_device_to_OF_node(dev); 136
103 PCI_DN(dn)->eeh_mode |= EEH_MODE_IRQ_DISABLED;
104 disable_irq_nosync(dev->irq);
105 }
106 if (!driver->err_handler || 137 if (!driver->err_handler ||
107 !driver->err_handler->error_detected) 138 !driver->err_handler->error_detected)
108 return; 139 return;
@@ -147,15 +178,12 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata)
147{ 178{
148 enum pci_ers_result rc, *res = userdata; 179 enum pci_ers_result rc, *res = userdata;
149 struct pci_driver *driver = dev->driver; 180 struct pci_driver *driver = dev->driver;
150 struct device_node *dn = pci_device_to_OF_node(dev);
151 181
152 if (!driver) 182 if (!driver)
153 return; 183 return;
154 184
155 if ((PCI_DN(dn)->eeh_mode) & EEH_MODE_IRQ_DISABLED) { 185 eeh_enable_irq(dev);
156 PCI_DN(dn)->eeh_mode &= ~EEH_MODE_IRQ_DISABLED; 186
157 enable_irq(dev->irq);
158 }
159 if (!driver->err_handler || 187 if (!driver->err_handler ||
160 !driver->err_handler->slot_reset) 188 !driver->err_handler->slot_reset)
161 return; 189 return;
@@ -174,17 +202,14 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata)
174static void eeh_report_resume(struct pci_dev *dev, void *userdata) 202static void eeh_report_resume(struct pci_dev *dev, void *userdata)
175{ 203{
176 struct pci_driver *driver = dev->driver; 204 struct pci_driver *driver = dev->driver;
177 struct device_node *dn = pci_device_to_OF_node(dev);
178 205
179 dev->error_state = pci_channel_io_normal; 206 dev->error_state = pci_channel_io_normal;
180 207
181 if (!driver) 208 if (!driver)
182 return; 209 return;
183 210
184 if ((PCI_DN(dn)->eeh_mode) & EEH_MODE_IRQ_DISABLED) { 211 eeh_enable_irq(dev);
185 PCI_DN(dn)->eeh_mode &= ~EEH_MODE_IRQ_DISABLED; 212
186 enable_irq(dev->irq);
187 }
188 if (!driver->err_handler || 213 if (!driver->err_handler ||
189 !driver->err_handler->resume) 214 !driver->err_handler->resume)
190 return; 215 return;
@@ -208,15 +233,12 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata)
208 if (!driver) 233 if (!driver)
209 return; 234 return;
210 235
211 if (irq_in_use (dev->irq)) { 236 eeh_disable_irq(dev);
212 struct device_node *dn = pci_device_to_OF_node(dev); 237
213 PCI_DN(dn)->eeh_mode |= EEH_MODE_IRQ_DISABLED; 238 if (!driver->err_handler ||
214 disable_irq_nosync(dev->irq); 239 !driver->err_handler->error_detected)
215 }
216 if (!driver->err_handler)
217 return;
218 if (!driver->err_handler->error_detected)
219 return; 240 return;
241
220 driver->err_handler->error_detected(dev, pci_channel_io_perm_failure); 242 driver->err_handler->error_detected(dev, pci_channel_io_perm_failure);
221} 243}
222 244
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index f15222bbe136..bf2e1ac41308 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -71,11 +71,13 @@ static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs)
71 } while (rtas_busy_delay(rc)); 71 } while (rtas_busy_delay(rc));
72 72
73 /* 73 /*
74 * If the RTAS call succeeded, check the number of irqs is actually 74 * If the RTAS call succeeded, return the number of irqs allocated.
75 * what we asked for. If not, return an error. 75 * If not, make sure we return a negative error code.
76 */ 76 */
77 if (rc == 0 && rtas_ret[0] != num_irqs) 77 if (rc == 0)
78 rc = -ENOSPC; 78 rc = rtas_ret[0];
79 else if (rc > 0)
80 rc = -rc;
79 81
80 pr_debug("rtas_msi: ibm,change_msi(func=%d,num=%d), got %d rc = %d\n", 82 pr_debug("rtas_msi: ibm,change_msi(func=%d,num=%d), got %d rc = %d\n",
81 func, num_irqs, rtas_ret[0], rc); 83 func, num_irqs, rtas_ret[0], rc);
@@ -91,7 +93,7 @@ static void rtas_disable_msi(struct pci_dev *pdev)
91 if (!pdn) 93 if (!pdn)
92 return; 94 return;
93 95
94 if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0)) 96 if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0)
95 pr_debug("rtas_msi: Setting MSIs to 0 failed!\n"); 97 pr_debug("rtas_msi: Setting MSIs to 0 failed!\n");
96} 98}
97 99
@@ -132,7 +134,7 @@ static void rtas_teardown_msi_irqs(struct pci_dev *pdev)
132 rtas_disable_msi(pdev); 134 rtas_disable_msi(pdev);
133} 135}
134 136
135static int check_req_msi(struct pci_dev *pdev, int nvec) 137static int check_req(struct pci_dev *pdev, int nvec, char *prop_name)
136{ 138{
137 struct device_node *dn; 139 struct device_node *dn;
138 struct pci_dn *pdn; 140 struct pci_dn *pdn;
@@ -144,26 +146,235 @@ static int check_req_msi(struct pci_dev *pdev, int nvec)
144 146
145 dn = pdn->node; 147 dn = pdn->node;
146 148
147 req_msi = of_get_property(dn, "ibm,req#msi", NULL); 149 req_msi = of_get_property(dn, prop_name, NULL);
148 if (!req_msi) { 150 if (!req_msi) {
149 pr_debug("rtas_msi: No ibm,req#msi on %s\n", dn->full_name); 151 pr_debug("rtas_msi: No %s on %s\n", prop_name, dn->full_name);
150 return -ENOENT; 152 return -ENOENT;
151 } 153 }
152 154
153 if (*req_msi < nvec) { 155 if (*req_msi < nvec) {
154 pr_debug("rtas_msi: ibm,req#msi requests < %d MSIs\n", nvec); 156 pr_debug("rtas_msi: %s requests < %d MSIs\n", prop_name, nvec);
155 return -ENOSPC; 157
158 if (*req_msi == 0) /* Be paranoid */
159 return -ENOSPC;
160
161 return *req_msi;
156 } 162 }
157 163
158 return 0; 164 return 0;
159} 165}
160 166
167static int check_req_msi(struct pci_dev *pdev, int nvec)
168{
169 return check_req(pdev, nvec, "ibm,req#msi");
170}
171
172static int check_req_msix(struct pci_dev *pdev, int nvec)
173{
174 return check_req(pdev, nvec, "ibm,req#msi-x");
175}
176
177/* Quota calculation */
178
179static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)
180{
181 struct device_node *dn;
182 const u32 *p;
183
184 dn = of_node_get(pci_device_to_OF_node(dev));
185 while (dn) {
186 p = of_get_property(dn, "ibm,pe-total-#msi", NULL);
187 if (p) {
188 pr_debug("rtas_msi: found prop on dn %s\n",
189 dn->full_name);
190 *total = *p;
191 return dn;
192 }
193
194 dn = of_get_next_parent(dn);
195 }
196
197 return NULL;
198}
199
200static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)
201{
202 struct device_node *dn;
203
204 /* Found our PE and assume 8 at that point. */
205
206 dn = pci_device_to_OF_node(dev);
207 if (!dn)
208 return NULL;
209
210 dn = find_device_pe(dn);
211 if (!dn)
212 return NULL;
213
214 /* We actually want the parent */
215 dn = of_get_parent(dn);
216 if (!dn)
217 return NULL;
218
219 /* Hardcode of 8 for old firmwares */
220 *total = 8;
221 pr_debug("rtas_msi: using PE dn %s\n", dn->full_name);
222
223 return dn;
224}
225
226struct msi_counts {
227 struct device_node *requestor;
228 int num_devices;
229 int request;
230 int quota;
231 int spare;
232 int over_quota;
233};
234
235static void *count_non_bridge_devices(struct device_node *dn, void *data)
236{
237 struct msi_counts *counts = data;
238 const u32 *p;
239 u32 class;
240
241 pr_debug("rtas_msi: counting %s\n", dn->full_name);
242
243 p = of_get_property(dn, "class-code", NULL);
244 class = p ? *p : 0;
245
246 if ((class >> 8) != PCI_CLASS_BRIDGE_PCI)
247 counts->num_devices++;
248
249 return NULL;
250}
251
252static void *count_spare_msis(struct device_node *dn, void *data)
253{
254 struct msi_counts *counts = data;
255 const u32 *p;
256 int req;
257
258 if (dn == counts->requestor)
259 req = counts->request;
260 else {
261 /* We don't know if a driver will try to use MSI or MSI-X,
262 * so we just have to punt and use the larger of the two. */
263 req = 0;
264 p = of_get_property(dn, "ibm,req#msi", NULL);
265 if (p)
266 req = *p;
267
268 p = of_get_property(dn, "ibm,req#msi-x", NULL);
269 if (p)
270 req = max(req, (int)*p);
271 }
272
273 if (req < counts->quota)
274 counts->spare += counts->quota - req;
275 else if (req > counts->quota)
276 counts->over_quota++;
277
278 return NULL;
279}
280
281static int msi_quota_for_device(struct pci_dev *dev, int request)
282{
283 struct device_node *pe_dn;
284 struct msi_counts counts;
285 int total;
286
287 pr_debug("rtas_msi: calc quota for %s, request %d\n", pci_name(dev),
288 request);
289
290 pe_dn = find_pe_total_msi(dev, &total);
291 if (!pe_dn)
292 pe_dn = find_pe_dn(dev, &total);
293
294 if (!pe_dn) {
295 pr_err("rtas_msi: couldn't find PE for %s\n", pci_name(dev));
296 goto out;
297 }
298
299 pr_debug("rtas_msi: found PE %s\n", pe_dn->full_name);
300
301 memset(&counts, 0, sizeof(struct msi_counts));
302
303 /* Work out how many devices we have below this PE */
304 traverse_pci_devices(pe_dn, count_non_bridge_devices, &counts);
305
306 if (counts.num_devices == 0) {
307 pr_err("rtas_msi: found 0 devices under PE for %s\n",
308 pci_name(dev));
309 goto out;
310 }
311
312 counts.quota = total / counts.num_devices;
313 if (request <= counts.quota)
314 goto out;
315
316 /* else, we have some more calculating to do */
317 counts.requestor = pci_device_to_OF_node(dev);
318 counts.request = request;
319 traverse_pci_devices(pe_dn, count_spare_msis, &counts);
320
321 /* If the quota isn't an integer multiple of the total, we can
322 * use the remainder as spare MSIs for anyone that wants them. */
323 counts.spare += total % counts.num_devices;
324
325 /* Divide any spare by the number of over-quota requestors */
326 if (counts.over_quota)
327 counts.quota += counts.spare / counts.over_quota;
328
329 /* And finally clamp the request to the possibly adjusted quota */
330 request = min(counts.quota, request);
331
332 pr_debug("rtas_msi: request clamped to quota %d\n", request);
333out:
334 of_node_put(pe_dn);
335
336 return request;
337}
338
161static int rtas_msi_check_device(struct pci_dev *pdev, int nvec, int type) 339static int rtas_msi_check_device(struct pci_dev *pdev, int nvec, int type)
162{ 340{
341 int quota, rc;
342
163 if (type == PCI_CAP_ID_MSIX) 343 if (type == PCI_CAP_ID_MSIX)
164 pr_debug("rtas_msi: MSI-X untested, trying anyway.\n"); 344 rc = check_req_msix(pdev, nvec);
345 else
346 rc = check_req_msi(pdev, nvec);
347
348 if (rc)
349 return rc;
350
351 quota = msi_quota_for_device(pdev, nvec);
165 352
166 return check_req_msi(pdev, nvec); 353 if (quota && quota < nvec)
354 return quota;
355
356 return 0;
357}
358
359static int check_msix_entries(struct pci_dev *pdev)
360{
361 struct msi_desc *entry;
362 int expected;
363
364 /* There's no way for us to express to firmware that we want
365 * a discontiguous, or non-zero based, range of MSI-X entries.
366 * So we must reject such requests. */
367
368 expected = 0;
369 list_for_each_entry(entry, &pdev->msi_list, list) {
370 if (entry->msi_attrib.entry_nr != expected) {
371 pr_debug("rtas_msi: bad MSI-X entries.\n");
372 return -EINVAL;
373 }
374 expected++;
375 }
376
377 return 0;
167} 378}
168 379
169static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) 380static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
@@ -177,6 +388,9 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
177 if (!pdn) 388 if (!pdn)
178 return -ENODEV; 389 return -ENODEV;
179 390
391 if (type == PCI_CAP_ID_MSIX && check_msix_entries(pdev))
392 return -EINVAL;
393
180 /* 394 /*
181 * Try the new more explicit firmware interface, if that fails fall 395 * Try the new more explicit firmware interface, if that fails fall
182 * back to the old interface. The old interface is known to never 396 * back to the old interface. The old interface is known to never
@@ -185,21 +399,21 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
185 if (type == PCI_CAP_ID_MSI) { 399 if (type == PCI_CAP_ID_MSI) {
186 rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, nvec); 400 rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, nvec);
187 401
188 if (rc) { 402 if (rc < 0) {
189 pr_debug("rtas_msi: trying the old firmware call.\n"); 403 pr_debug("rtas_msi: trying the old firmware call.\n");
190 rc = rtas_change_msi(pdn, RTAS_CHANGE_FN, nvec); 404 rc = rtas_change_msi(pdn, RTAS_CHANGE_FN, nvec);
191 } 405 }
192 } else 406 } else
193 rc = rtas_change_msi(pdn, RTAS_CHANGE_MSIX_FN, nvec); 407 rc = rtas_change_msi(pdn, RTAS_CHANGE_MSIX_FN, nvec);
194 408
195 if (rc) { 409 if (rc != nvec) {
196 pr_debug("rtas_msi: rtas_change_msi() failed\n"); 410 pr_debug("rtas_msi: rtas_change_msi() failed\n");
197 return rc; 411 return rc;
198 } 412 }
199 413
200 i = 0; 414 i = 0;
201 list_for_each_entry(entry, &pdev->msi_list, list) { 415 list_for_each_entry(entry, &pdev->msi_list, list) {
202 hwirq = rtas_query_irq_number(pdn, i); 416 hwirq = rtas_query_irq_number(pdn, i++);
203 if (hwirq < 0) { 417 if (hwirq < 0) {
204 pr_debug("rtas_msi: error (%d) getting hwirq\n", rc); 418 pr_debug("rtas_msi: error (%d) getting hwirq\n", rc);
205 return hwirq; 419 return hwirq;
@@ -234,8 +448,8 @@ static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev)
234 } 448 }
235 449
236 /* No MSI -> MSIs can't have been assigned by fw, leave LSI */ 450 /* No MSI -> MSIs can't have been assigned by fw, leave LSI */
237 if (check_req_msi(pdev, 1)) { 451 if (check_req_msi(pdev, 1) && check_req_msix(pdev, 1)) {
238 dev_dbg(&pdev->dev, "rtas_msi: no req#msi, nothing to do.\n"); 452 dev_dbg(&pdev->dev, "rtas_msi: no req#msi/x, nothing to do.\n");
239 return; 453 return;
240 } 454 }
241 455
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 5e1ed3d60ee5..ad152a0e3946 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -137,11 +137,9 @@ EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
137struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) 137struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
138{ 138{
139 struct pci_controller *phb; 139 struct pci_controller *phb;
140 int primary;
141 140
142 pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name); 141 pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name);
143 142
144 primary = list_empty(&hose_list);
145 phb = pcibios_alloc_controller(dn); 143 phb = pcibios_alloc_controller(dn);
146 if (!phb) 144 if (!phb)
147 return NULL; 145 return NULL;
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index d967c1893ab5..a24a6b2333b2 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -43,6 +43,16 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa)
43 return vpa_call(0x3, cpu, vpa); 43 return vpa_call(0x3, cpu, vpa);
44} 44}
45 45
46static inline long unregister_dtl(unsigned long cpu, unsigned long vpa)
47{
48 return vpa_call(0x6, cpu, vpa);
49}
50
51static inline long register_dtl(unsigned long cpu, unsigned long vpa)
52{
53 return vpa_call(0x2, cpu, vpa);
54}
55
46static inline long plpar_page_set_loaned(unsigned long vpa) 56static inline long plpar_page_set_loaned(unsigned long vpa)
47{ 57{
48 unsigned long cmo_page_sz = cmo_get_page_size(); 58 unsigned long cmo_page_sz = cmo_get_page_size();
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index c591a25b0b0d..b6f1b137d427 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -468,9 +468,13 @@ static int do_update_property(char *buf, size_t bufsize)
468 468
469 rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, 469 rc = blocking_notifier_call_chain(&pSeries_reconfig_chain,
470 action, value); 470 action, value);
471 if (rc == NOTIFY_BAD) {
472 rc = prom_update_property(np, oldprop, newprop);
473 return -ENOMEM;
474 }
471 } 475 }
472 476
473 return rc; 477 return 0;
474} 478}
475 479
476/** 480/**
diff --git a/arch/powerpc/sysdev/bestcomm/Kconfig b/arch/powerpc/sysdev/bestcomm/Kconfig
index 0b192a1c429d..29e427085efb 100644
--- a/arch/powerpc/sysdev/bestcomm/Kconfig
+++ b/arch/powerpc/sysdev/bestcomm/Kconfig
@@ -9,8 +9,8 @@ config PPC_BESTCOMM
9 select PPC_LIB_RHEAP 9 select PPC_LIB_RHEAP
10 help 10 help
11 BestComm is the name of the communication coprocessor found 11 BestComm is the name of the communication coprocessor found
12 on the Freescale MPC5200 family of processor. It's usage is 12 on the Freescale MPC5200 family of processor. Its usage is
13 optionnal for some drivers (like ATA), but required for 13 optional for some drivers (like ATA), but required for
14 others (like FEC). 14 others (like FEC).
15 15
16 If you want to use drivers that require DMA operations, 16 If you want to use drivers that require DMA operations,
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c
index 490473ce8103..82424cd7e128 100644
--- a/arch/powerpc/sysdev/cpm1.c
+++ b/arch/powerpc/sysdev/cpm1.c
@@ -119,7 +119,6 @@ static irqreturn_t cpm_error_interrupt(int irq, void *dev)
119 119
120static struct irqaction cpm_error_irqaction = { 120static struct irqaction cpm_error_irqaction = {
121 .handler = cpm_error_interrupt, 121 .handler = cpm_error_interrupt,
122 .mask = CPU_MASK_NONE,
123 .name = "error", 122 .name = "error",
124}; 123};
125 124
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c
index f1c3395633b9..fd969f0e3121 100644
--- a/arch/powerpc/sysdev/cpm2.c
+++ b/arch/powerpc/sysdev/cpm2.c
@@ -52,6 +52,7 @@ cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */
52 * the communication processor devices. 52 * the communication processor devices.
53 */ 53 */
54cpm2_map_t __iomem *cpm2_immr; 54cpm2_map_t __iomem *cpm2_immr;
55EXPORT_SYMBOL(cpm2_immr);
55 56
56#define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount 57#define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount
57 of space for CPM as it is larger 58 of space for CPM as it is larger
@@ -129,7 +130,8 @@ void __cpm2_setbrg(uint brg, uint rate, uint clk, int div16, int src)
129 brg -= 4; 130 brg -= 4;
130 } 131 }
131 bp += brg; 132 bp += brg;
132 val = (((clk / rate) - 1) << 1) | CPM_BRG_EN | src; 133 /* Round the clock divider to the nearest integer. */
134 val = (((clk * 2 / rate) - 1) & ~1) | CPM_BRG_EN | src;
133 if (div16) 135 if (div16)
134 val |= CPM_BRG_DIV16; 136 val |= CPM_BRG_DIV16;
135 137
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index 00d3d17c84a3..e4b6d66d93de 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -56,7 +56,7 @@ void __init udbg_init_cpm(void)
56{ 56{
57 if (cpm_udbg_txdesc) { 57 if (cpm_udbg_txdesc) {
58#ifdef CONFIG_CPM2 58#ifdef CONFIG_CPM2
59 setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO); 59 setbat(1, 0xf0000000, 0xf0000000, 1024*1024, PAGE_KERNEL_NCG);
60#endif 60#endif
61 udbg_putc = udbg_putc_cpm; 61 udbg_putc = udbg_putc_cpm;
62 } 62 }
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
index 0494ee55920f..dceb8d1a843d 100644
--- a/arch/powerpc/sysdev/fsl_lbc.c
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -150,7 +150,7 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar)
150 150
151 spin_lock_irqsave(&fsl_lbc_lock, flags); 151 spin_lock_irqsave(&fsl_lbc_lock, flags);
152 152
153 out_be32(&fsl_lbc_regs->mar, mar << (32 - upm->width)); 153 out_be32(&fsl_lbc_regs->mar, mar);
154 154
155 switch (upm->width) { 155 switch (upm->width) {
156 case 8: 156 case 8:
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 9817f63723dd..78021d8afc53 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1,12 +1,16 @@
1/* 1/*
2 * MPC83xx/85xx/86xx PCI/PCIE support routing. 2 * MPC83xx/85xx/86xx PCI/PCIE support routing.
3 * 3 *
4 * Copyright 2007,2008 Freescale Semiconductor, Inc 4 * Copyright 2007-2009 Freescale Semiconductor, Inc.
5 * Copyright 2008-2009 MontaVista Software, Inc.
5 * 6 *
6 * Initial author: Xianghua Xiao <x.xiao@freescale.com> 7 * Initial author: Xianghua Xiao <x.xiao@freescale.com>
7 * Recode: ZHANG WEI <wei.zhang@freescale.com> 8 * Recode: ZHANG WEI <wei.zhang@freescale.com>
8 * Rewrite the routing for Frescale PCI and PCI Express 9 * Rewrite the routing for Frescale PCI and PCI Express
9 * Roy Zang <tie-fei.zang@freescale.com> 10 * Roy Zang <tie-fei.zang@freescale.com>
11 * MPC83xx PCI-Express support:
12 * Tony Li <tony.li@freescale.com>
13 * Anton Vorontsov <avorontsov@ru.mvista.com>
10 * 14 *
11 * This program is free software; you can redistribute it and/or modify it 15 * 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 16 * under the terms of the GNU General Public License as published by the
@@ -27,6 +31,29 @@
27#include <sysdev/fsl_soc.h> 31#include <sysdev/fsl_soc.h>
28#include <sysdev/fsl_pci.h> 32#include <sysdev/fsl_pci.h>
29 33
34static int fsl_pcie_bus_fixup;
35
36static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
37{
38 /* if we aren't a PCIe don't bother */
39 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
40 return;
41
42 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
43 fsl_pcie_bus_fixup = 1;
44 return;
45}
46
47static int __init fsl_pcie_check_link(struct pci_controller *hose)
48{
49 u32 val;
50
51 early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val);
52 if (val < PCIE_LTSSM_L0)
53 return 1;
54 return 0;
55}
56
30#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx) 57#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx)
31static int __init setup_one_atmu(struct ccsr_pci __iomem *pci, 58static int __init setup_one_atmu(struct ccsr_pci __iomem *pci,
32 unsigned int index, const struct resource *res, 59 unsigned int index, const struct resource *res,
@@ -159,28 +186,6 @@ static void __init setup_pci_pcsrbar(struct pci_controller *hose)
159#endif 186#endif
160} 187}
161 188
162static int fsl_pcie_bus_fixup;
163
164static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
165{
166 /* if we aren't a PCIe don't bother */
167 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
168 return ;
169
170 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
171 fsl_pcie_bus_fixup = 1;
172 return ;
173}
174
175static int __init fsl_pcie_check_link(struct pci_controller *hose)
176{
177 u32 val;
178 early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val);
179 if (val < PCIE_LTSSM_L0)
180 return 1;
181 return 0;
182}
183
184void fsl_pcibios_fixup_bus(struct pci_bus *bus) 189void fsl_pcibios_fixup_bus(struct pci_bus *bus)
185{ 190{
186 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 191 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
@@ -294,8 +299,184 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
294#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */ 299#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
295 300
296#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x) 301#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
302DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8314E, quirk_fsl_pcie_header);
303DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8314, quirk_fsl_pcie_header);
304DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8315E, quirk_fsl_pcie_header);
305DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8315, quirk_fsl_pcie_header);
306DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8377E, quirk_fsl_pcie_header);
307DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8377, quirk_fsl_pcie_header);
308DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8378E, quirk_fsl_pcie_header);
309DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8378, quirk_fsl_pcie_header);
310
311struct mpc83xx_pcie_priv {
312 void __iomem *cfg_type0;
313 void __iomem *cfg_type1;
314 u32 dev_base;
315};
316
317/*
318 * With the convention of u-boot, the PCIE outbound window 0 serves
319 * as configuration transactions outbound.
320 */
321#define PEX_OUTWIN0_BAR 0xCA4
322#define PEX_OUTWIN0_TAL 0xCA8
323#define PEX_OUTWIN0_TAH 0xCAC
324
325static int mpc83xx_pcie_exclude_device(struct pci_bus *bus, unsigned int devfn)
326{
327 struct pci_controller *hose = bus->sysdata;
328
329 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)
330 return PCIBIOS_DEVICE_NOT_FOUND;
331 /*
332 * Workaround for the HW bug: for Type 0 configure transactions the
333 * PCI-E controller does not check the device number bits and just
334 * assumes that the device number bits are 0.
335 */
336 if (bus->number == hose->first_busno ||
337 bus->primary == hose->first_busno) {
338 if (devfn & 0xf8)
339 return PCIBIOS_DEVICE_NOT_FOUND;
340 }
341
342 if (ppc_md.pci_exclude_device) {
343 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
344 return PCIBIOS_DEVICE_NOT_FOUND;
345 }
346
347 return PCIBIOS_SUCCESSFUL;
348}
349
350static void __iomem *mpc83xx_pcie_remap_cfg(struct pci_bus *bus,
351 unsigned int devfn, int offset)
352{
353 struct pci_controller *hose = bus->sysdata;
354 struct mpc83xx_pcie_priv *pcie = hose->dn->data;
355 u8 bus_no = bus->number - hose->first_busno;
356 u32 dev_base = bus_no << 24 | devfn << 16;
357 int ret;
358
359 ret = mpc83xx_pcie_exclude_device(bus, devfn);
360 if (ret)
361 return NULL;
362
363 offset &= 0xfff;
364
365 /* Type 0 */
366 if (bus->number == hose->first_busno)
367 return pcie->cfg_type0 + offset;
368
369 if (pcie->dev_base == dev_base)
370 goto mapped;
371
372 out_le32(pcie->cfg_type0 + PEX_OUTWIN0_TAL, dev_base);
373
374 pcie->dev_base = dev_base;
375mapped:
376 return pcie->cfg_type1 + offset;
377}
378
379static int mpc83xx_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
380 int offset, int len, u32 *val)
381{
382 void __iomem *cfg_addr;
383
384 cfg_addr = mpc83xx_pcie_remap_cfg(bus, devfn, offset);
385 if (!cfg_addr)
386 return PCIBIOS_DEVICE_NOT_FOUND;
387
388 switch (len) {
389 case 1:
390 *val = in_8(cfg_addr);
391 break;
392 case 2:
393 *val = in_le16(cfg_addr);
394 break;
395 default:
396 *val = in_le32(cfg_addr);
397 break;
398 }
399
400 return PCIBIOS_SUCCESSFUL;
401}
402
403static int mpc83xx_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
404 int offset, int len, u32 val)
405{
406 void __iomem *cfg_addr;
407
408 cfg_addr = mpc83xx_pcie_remap_cfg(bus, devfn, offset);
409 if (!cfg_addr)
410 return PCIBIOS_DEVICE_NOT_FOUND;
411
412 switch (len) {
413 case 1:
414 out_8(cfg_addr, val);
415 break;
416 case 2:
417 out_le16(cfg_addr, val);
418 break;
419 default:
420 out_le32(cfg_addr, val);
421 break;
422 }
423
424 return PCIBIOS_SUCCESSFUL;
425}
426
427static struct pci_ops mpc83xx_pcie_ops = {
428 .read = mpc83xx_pcie_read_config,
429 .write = mpc83xx_pcie_write_config,
430};
431
432static int __init mpc83xx_pcie_setup(struct pci_controller *hose,
433 struct resource *reg)
434{
435 struct mpc83xx_pcie_priv *pcie;
436 u32 cfg_bar;
437 int ret = -ENOMEM;
438
439 pcie = zalloc_maybe_bootmem(sizeof(*pcie), GFP_KERNEL);
440 if (!pcie)
441 return ret;
442
443 pcie->cfg_type0 = ioremap(reg->start, resource_size(reg));
444 if (!pcie->cfg_type0)
445 goto err0;
446
447 cfg_bar = in_le32(pcie->cfg_type0 + PEX_OUTWIN0_BAR);
448 if (!cfg_bar) {
449 /* PCI-E isn't configured. */
450 ret = -ENODEV;
451 goto err1;
452 }
453
454 pcie->cfg_type1 = ioremap(cfg_bar, 0x1000);
455 if (!pcie->cfg_type1)
456 goto err1;
457
458 WARN_ON(hose->dn->data);
459 hose->dn->data = pcie;
460 hose->ops = &mpc83xx_pcie_ops;
461
462 out_le32(pcie->cfg_type0 + PEX_OUTWIN0_TAH, 0);
463 out_le32(pcie->cfg_type0 + PEX_OUTWIN0_TAL, 0);
464
465 if (fsl_pcie_check_link(hose))
466 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
467
468 return 0;
469err1:
470 iounmap(pcie->cfg_type0);
471err0:
472 kfree(pcie);
473 return ret;
474
475}
476
297int __init mpc83xx_add_bridge(struct device_node *dev) 477int __init mpc83xx_add_bridge(struct device_node *dev)
298{ 478{
479 int ret;
299 int len; 480 int len;
300 struct pci_controller *hose; 481 struct pci_controller *hose;
301 struct resource rsrc_reg; 482 struct resource rsrc_reg;
@@ -303,6 +484,11 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
303 const int *bus_range; 484 const int *bus_range;
304 int primary; 485 int primary;
305 486
487 if (!of_device_is_available(dev)) {
488 pr_warning("%s: disabled by the firmware.\n",
489 dev->full_name);
490 return -ENODEV;
491 }
306 pr_debug("Adding PCI host bridge %s\n", dev->full_name); 492 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
307 493
308 /* Fetch host bridge registers address */ 494 /* Fetch host bridge registers address */
@@ -350,7 +536,14 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
350 hose->first_busno = bus_range ? bus_range[0] : 0; 536 hose->first_busno = bus_range ? bus_range[0] : 0;
351 hose->last_busno = bus_range ? bus_range[1] : 0xff; 537 hose->last_busno = bus_range ? bus_range[1] : 0xff;
352 538
353 setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0); 539 if (of_device_is_compatible(dev, "fsl,mpc8314-pcie")) {
540 ret = mpc83xx_pcie_setup(hose, &rsrc_reg);
541 if (ret)
542 goto err0;
543 } else {
544 setup_indirect_pci(hose, rsrc_cfg.start,
545 rsrc_cfg.start + 4, 0);
546 }
354 547
355 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. " 548 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
356 "Firmware bus number: %d->%d\n", 549 "Firmware bus number: %d->%d\n",
@@ -365,5 +558,8 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
365 pci_process_bridge_OF_ranges(hose, dev, primary); 558 pci_process_bridge_OF_ranges(hose, dev, primary);
366 559
367 return 0; 560 return 0;
561err0:
562 pcibios_free_controller(hose);
563 return ret;
368} 564}
369#endif /* CONFIG_PPC_83xx */ 565#endif /* CONFIG_PPC_83xx */
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 115cb16351fd..afe8dbc964aa 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -22,6 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/of.h>
25#include <linux/of_platform.h> 26#include <linux/of_platform.h>
26#include <linux/phy.h> 27#include <linux/phy.h>
27#include <linux/phy_fixed.h> 28#include <linux/phy_fixed.h>
@@ -328,6 +329,9 @@ static int __init fsl_usb_of_init(void)
328 struct fsl_usb2_platform_data usb_data; 329 struct fsl_usb2_platform_data usb_data;
329 const unsigned char *prop = NULL; 330 const unsigned char *prop = NULL;
330 331
332 if (!of_device_is_available(np))
333 continue;
334
331 memset(&r, 0, sizeof(r)); 335 memset(&r, 0, sizeof(r));
332 memset(&usb_data, 0, sizeof(usb_data)); 336 memset(&usb_data, 0, sizeof(usb_data));
333 337
@@ -413,115 +417,6 @@ err:
413 417
414arch_initcall(fsl_usb_of_init); 418arch_initcall(fsl_usb_of_init);
415 419
416static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
417 struct spi_board_info *board_infos,
418 unsigned int num_board_infos,
419 void (*activate_cs)(u8 cs, u8 polarity),
420 void (*deactivate_cs)(u8 cs, u8 polarity))
421{
422 struct device_node *np;
423 unsigned int i = 0;
424
425 for_each_compatible_node(np, type, compatible) {
426 int ret;
427 unsigned int j;
428 const void *prop;
429 struct resource res[2];
430 struct platform_device *pdev;
431 struct fsl_spi_platform_data pdata = {
432 .activate_cs = activate_cs,
433 .deactivate_cs = deactivate_cs,
434 };
435
436 memset(res, 0, sizeof(res));
437
438 pdata.sysclk = sysclk;
439
440 prop = of_get_property(np, "reg", NULL);
441 if (!prop)
442 goto err;
443 pdata.bus_num = *(u32 *)prop;
444
445 prop = of_get_property(np, "cell-index", NULL);
446 if (prop)
447 i = *(u32 *)prop;
448
449 prop = of_get_property(np, "mode", NULL);
450 if (prop && !strcmp(prop, "cpu-qe"))
451 pdata.qe_mode = 1;
452
453 for (j = 0; j < num_board_infos; j++) {
454 if (board_infos[j].bus_num == pdata.bus_num)
455 pdata.max_chipselect++;
456 }
457
458 if (!pdata.max_chipselect)
459 continue;
460
461 ret = of_address_to_resource(np, 0, &res[0]);
462 if (ret)
463 goto err;
464
465 ret = of_irq_to_resource(np, 0, &res[1]);
466 if (ret == NO_IRQ)
467 goto err;
468
469 pdev = platform_device_alloc("mpc83xx_spi", i);
470 if (!pdev)
471 goto err;
472
473 ret = platform_device_add_data(pdev, &pdata, sizeof(pdata));
474 if (ret)
475 goto unreg;
476
477 ret = platform_device_add_resources(pdev, res,
478 ARRAY_SIZE(res));
479 if (ret)
480 goto unreg;
481
482 ret = platform_device_add(pdev);
483 if (ret)
484 goto unreg;
485
486 goto next;
487unreg:
488 platform_device_del(pdev);
489err:
490 pr_err("%s: registration failed\n", np->full_name);
491next:
492 i++;
493 }
494
495 return i;
496}
497
498int __init fsl_spi_init(struct spi_board_info *board_infos,
499 unsigned int num_board_infos,
500 void (*activate_cs)(u8 cs, u8 polarity),
501 void (*deactivate_cs)(u8 cs, u8 polarity))
502{
503 u32 sysclk = -1;
504 int ret;
505
506#ifdef CONFIG_QUICC_ENGINE
507 /* SPI controller is either clocked from QE or SoC clock */
508 sysclk = get_brgfreq();
509#endif
510 if (sysclk == -1) {
511 sysclk = fsl_get_sys_freq();
512 if (sysclk == -1)
513 return -ENODEV;
514 }
515
516 ret = of_fsl_spi_probe(NULL, "fsl,spi", sysclk, board_infos,
517 num_board_infos, activate_cs, deactivate_cs);
518 if (!ret)
519 of_fsl_spi_probe("spi", "fsl_spi", sysclk, board_infos,
520 num_board_infos, activate_cs, deactivate_cs);
521
522 return spi_register_board_info(board_infos, num_board_infos);
523}
524
525#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx) 420#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx)
526static __be32 __iomem *rstcr; 421static __be32 __iomem *rstcr;
527 422
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 9c744e4285a0..42381bb6cd51 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -4,6 +4,8 @@
4 4
5#include <asm/mmu.h> 5#include <asm/mmu.h>
6 6
7struct spi_device;
8
7extern phys_addr_t get_immrbase(void); 9extern phys_addr_t get_immrbase(void);
8#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx) 10#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
9extern u32 get_brgfreq(void); 11extern u32 get_brgfreq(void);
@@ -17,11 +19,6 @@ extern u32 fsl_get_sys_freq(void);
17struct spi_board_info; 19struct spi_board_info;
18struct device_node; 20struct device_node;
19 21
20extern int fsl_spi_init(struct spi_board_info *board_infos,
21 unsigned int num_board_infos,
22 void (*activate_cs)(u8 cs, u8 polarity),
23 void (*deactivate_cs)(u8 cs, u8 polarity));
24
25extern void fsl_rstcr_restart(char *cmd); 22extern void fsl_rstcr_restart(char *cmd);
26 23
27#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 24#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 9a89cd3e80a2..a86d3ce01ead 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int virq)
568 568
569 spin_lock_irqsave(&ipic_lock, flags); 569 spin_lock_irqsave(&ipic_lock, flags);
570 570
571 temp = ipic_read(ipic->regs, ipic_info[src].ack); 571 temp = 1 << (31 - ipic_info[src].bit);
572 temp |= (1 << (31 - ipic_info[src].bit));
573 ipic_write(ipic->regs, ipic_info[src].ack, temp); 572 ipic_write(ipic->regs, ipic_info[src].ack, temp);
574 573
575 /* mb() can't guarantee that ack is finished. But it does finish 574 /* mb() can't guarantee that ack is finished. But it does finish
@@ -592,8 +591,7 @@ static void ipic_mask_irq_and_ack(unsigned int virq)
592 temp &= ~(1 << (31 - ipic_info[src].bit)); 591 temp &= ~(1 << (31 - ipic_info[src].bit));
593 ipic_write(ipic->regs, ipic_info[src].mask, temp); 592 ipic_write(ipic->regs, ipic_info[src].mask, temp);
594 593
595 temp = ipic_read(ipic->regs, ipic_info[src].ack); 594 temp = 1 << (31 - ipic_info[src].bit);
596 temp |= (1 << (31 - ipic_info[src].bit));
597 ipic_write(ipic->regs, ipic_info[src].ack, temp); 595 ipic_write(ipic->regs, ipic_info[src].ack, temp);
598 596
599 /* mb() can't guarantee that ack is finished. But it does finish 597 /* mb() can't guarantee that ack is finished. But it does finish
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 532e205303a2..21b956701596 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1170,6 +1170,12 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1170 mb(); 1170 mb();
1171 } 1171 }
1172 1172
1173 /* CoreInt */
1174 if (flags & MPIC_ENABLE_COREINT)
1175 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1176 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1177 | MPIC_GREG_GCONF_COREINT);
1178
1173 if (flags & MPIC_ENABLE_MCK) 1179 if (flags & MPIC_ENABLE_MCK)
1174 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), 1180 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1175 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) 1181 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
@@ -1525,6 +1531,34 @@ unsigned int mpic_get_irq(void)
1525 return mpic_get_one_irq(mpic); 1531 return mpic_get_one_irq(mpic);
1526} 1532}
1527 1533
1534unsigned int mpic_get_coreint_irq(void)
1535{
1536#ifdef CONFIG_BOOKE
1537 struct mpic *mpic = mpic_primary;
1538 u32 src;
1539
1540 BUG_ON(mpic == NULL);
1541
1542 src = mfspr(SPRN_EPR);
1543
1544 if (unlikely(src == mpic->spurious_vec)) {
1545 if (mpic->flags & MPIC_SPV_EOI)
1546 mpic_eoi(mpic);
1547 return NO_IRQ;
1548 }
1549 if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
1550 if (printk_ratelimit())
1551 printk(KERN_WARNING "%s: Got protected source %d !\n",
1552 mpic->name, (int)src);
1553 return NO_IRQ;
1554 }
1555
1556 return irq_linear_revmap(mpic->irqhost, src);
1557#else
1558 return NO_IRQ;
1559#endif
1560}
1561
1528unsigned int mpic_get_mcirq(void) 1562unsigned int mpic_get_mcirq(void)
1529{ 1563{
1530 struct mpic *mpic = mpic_primary; 1564 struct mpic *mpic = mpic_primary;
diff --git a/arch/powerpc/sysdev/msi_bitmap.c b/arch/powerpc/sysdev/msi_bitmap.c
index f84217b8863a..5a32cbef9b6c 100644
--- a/arch/powerpc/sysdev/msi_bitmap.c
+++ b/arch/powerpc/sysdev/msi_bitmap.c
@@ -141,7 +141,7 @@ void msi_bitmap_free(struct msi_bitmap *bmp)
141#define check(x) \ 141#define check(x) \
142 if (!(x)) printk("msi_bitmap: test failed at line %d\n", __LINE__); 142 if (!(x)) printk("msi_bitmap: test failed at line %d\n", __LINE__);
143 143
144void test_basics(void) 144void __init test_basics(void)
145{ 145{
146 struct msi_bitmap bmp; 146 struct msi_bitmap bmp;
147 int i, size = 512; 147 int i, size = 512;
@@ -186,7 +186,7 @@ void test_basics(void)
186 kfree(bmp.bitmap); 186 kfree(bmp.bitmap);
187} 187}
188 188
189void test_of_node(void) 189void __init test_of_node(void)
190{ 190{
191 u32 prop_data[] = { 10, 10, 25, 3, 40, 1, 100, 100, 200, 20 }; 191 u32 prop_data[] = { 10, 10, 25, 3, 40, 1, 100, 100, 200, 20 };
192 const char *expected_str = "0-9,20-24,28-39,41-99,220-255"; 192 const char *expected_str = "0-9,20-24,28-39,41-99,220-255";
@@ -234,7 +234,7 @@ void test_of_node(void)
234 kfree(bmp.bitmap); 234 kfree(bmp.bitmap);
235} 235}
236 236
237int msi_bitmap_selftest(void) 237int __init msi_bitmap_selftest(void)
238{ 238{
239 printk(KERN_DEBUG "Running MSI bitmap self-tests ...\n"); 239 printk(KERN_DEBUG "Running MSI bitmap self-tests ...\n");
240 240
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index c858749263e0..aaa915998eb6 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -50,7 +50,7 @@ struct pmi_data {
50 50
51static struct pmi_data *data; 51static struct pmi_data *data;
52 52
53static int pmi_irq_handler(int irq, void *dev_id) 53static irqreturn_t pmi_irq_handler(int irq, void *dev_id)
54{ 54{
55 u8 type; 55 u8 type;
56 int rc; 56 int rc;
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index 5558d932b4d5..6a2d473c345a 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1839,6 +1839,8 @@ static int __init ppc4xx_pci_find_bridges(void)
1839{ 1839{
1840 struct device_node *np; 1840 struct device_node *np;
1841 1841
1842 ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0;
1843
1842#ifdef CONFIG_PPC4xx_PCI_EXPRESS 1844#ifdef CONFIG_PPC4xx_PCI_EXPRESS
1843 for_each_compatible_node(np, NULL, "ibm,plb-pciex") 1845 for_each_compatible_node(np, NULL, "ibm,plb-pciex")
1844 ppc4xx_probe_pciex_bridge(np); 1846 ppc4xx_probe_pciex_bridge(np);
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 2a8af5e16345..dcb667c4375a 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -72,6 +72,9 @@ config PGSTE
72config VIRT_CPU_ACCOUNTING 72config VIRT_CPU_ACCOUNTING
73 def_bool y 73 def_bool y
74 74
75config ARCH_SUPPORTS_DEBUG_PAGEALLOC
76 def_bool y
77
75mainmenu "Linux Kernel Configuration" 78mainmenu "Linux Kernel Configuration"
76 79
77config S390 80config S390
diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug
index 4599fa06bd82..2283933a9a93 100644
--- a/arch/s390/Kconfig.debug
+++ b/arch/s390/Kconfig.debug
@@ -6,12 +6,4 @@ config TRACE_IRQFLAGS_SUPPORT
6 6
7source "lib/Kconfig.debug" 7source "lib/Kconfig.debug"
8 8
9config DEBUG_PAGEALLOC
10 bool "Debug page memory allocations"
11 depends on DEBUG_KERNEL
12 help
13 Unmap pages from the kernel linear mapping after free_pages().
14 This results in a slowdown, but helps to find certain types of
15 memory corruptions.
16
17endmenu 9endmenu
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index b1e892a43816..704dd396257b 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -12,6 +12,8 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/gfp.h>
16#include <linux/slab.h>
15#include <linux/string.h> 17#include <linux/string.h>
16#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
17#include <asm/ebcdic.h> 19#include <asm/ebcdic.h>
diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h
index 6dccb071aec3..619bf94b11f1 100644
--- a/arch/s390/include/asm/cio.h
+++ b/arch/s390/include/asm/cio.h
@@ -456,6 +456,8 @@ struct ciw {
456#define CIO_OPER 0x0004 456#define CIO_OPER 0x0004
457/* Sick revalidation of device. */ 457/* Sick revalidation of device. */
458#define CIO_REVALIDATE 0x0008 458#define CIO_REVALIDATE 0x0008
459/* Device did not respond in time. */
460#define CIO_BOXED 0x0010
459 461
460/** 462/**
461 * struct ccw_dev_id - unique identifier for ccw devices 463 * struct ccw_dev_id - unique identifier for ccw devices
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index 2009158a4502..72137bc907ac 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -92,12 +92,6 @@ extern void arch_send_call_function_ipi(cpumask_t mask);
92#endif 92#endif
93 93
94#ifndef CONFIG_SMP 94#ifndef CONFIG_SMP
95static inline void smp_send_stop(void)
96{
97 /* Disable all interrupts/machine checks */
98 __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK);
99}
100
101#define hard_smp_processor_id() 0 95#define hard_smp_processor_id() 0
102#define smp_cpu_not_running(cpu) 1 96#define smp_cpu_not_running(cpu) 1
103#endif 97#endif
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h
index df84ae96915f..f3861b09ebb0 100644
--- a/arch/s390/include/asm/spinlock.h
+++ b/arch/s390/include/asm/spinlock.h
@@ -172,6 +172,9 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
172 return _raw_write_trylock_retry(rw); 172 return _raw_write_trylock_retry(rw);
173} 173}
174 174
175#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
176#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
177
175#define _raw_read_relax(lock) cpu_relax() 178#define _raw_read_relax(lock) cpu_relax()
176#define _raw_write_relax(lock) cpu_relax() 179#define _raw_write_relax(lock) cpu_relax()
177 180
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index b48e961a38f6..a3acd8e60aff 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -160,7 +160,7 @@ void release_thread(struct task_struct *dead_task)
160{ 160{
161} 161}
162 162
163int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, 163int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
164 unsigned long unused, 164 unsigned long unused,
165 struct task_struct *p, struct pt_regs *regs) 165 struct task_struct *p, struct pt_regs *regs)
166{ 166{
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d50d527c595..5e4babecf934 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -28,6 +28,7 @@ config SUPERH32
28 select HAVE_FTRACE_MCOUNT_RECORD 28 select HAVE_FTRACE_MCOUNT_RECORD
29 select HAVE_DYNAMIC_FTRACE 29 select HAVE_DYNAMIC_FTRACE
30 select HAVE_ARCH_KGDB 30 select HAVE_ARCH_KGDB
31 select ARCH_HIBERNATION_POSSIBLE if MMU
31 32
32config SUPERH64 33config SUPERH64
33 def_bool y if CPU_SH5 34 def_bool y if CPU_SH5
@@ -129,6 +130,9 @@ config ARCH_HAS_ILOG2_U64
129config ARCH_NO_VIRT_TO_BUS 130config ARCH_NO_VIRT_TO_BUS
130 def_bool y 131 def_bool y
131 132
133config ARCH_HAS_DEFAULT_IDLE
134 def_bool y
135
132config IO_TRAPPED 136config IO_TRAPPED
133 bool 137 bool
134 138
@@ -530,7 +534,7 @@ source kernel/Kconfig.hz
530 534
531config KEXEC 535config KEXEC
532 bool "kexec system call (EXPERIMENTAL)" 536 bool "kexec system call (EXPERIMENTAL)"
533 depends on SUPERH32 && EXPERIMENTAL 537 depends on SUPERH32 && EXPERIMENTAL && MMU
534 help 538 help
535 kexec is a system call that implements the ability to shutdown your 539 kexec is a system call that implements the ability to shutdown your
536 current kernel, and to start another kernel. It is like a reboot 540 current kernel, and to start another kernel. It is like a reboot
@@ -640,10 +644,10 @@ config GUSA_RB
640 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A) 644 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
641 help 645 help
642 Enabling this option will allow the kernel to implement some 646 Enabling this option will allow the kernel to implement some
643 atomic operations using a software implemention of load-locked/ 647 atomic operations using a software implementation of load-locked/
644 store-conditional (LLSC). On machines which do not have hardware 648 store-conditional (LLSC). On machines which do not have hardware
645 LLSC, this should be more efficient than the other alternative of 649 LLSC, this should be more efficient than the other alternative of
646 disabling insterrupts around the atomic sequence. 650 disabling interrupts around the atomic sequence.
647 651
648endmenu 652endmenu
649 653
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index a64e38841c49..912458f666eb 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -22,6 +22,7 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/spi/spi.h> 23#include <linux/spi/spi.h>
24#include <linux/spi/spi_gpio.h> 24#include <linux/spi/spi_gpio.h>
25#include <media/ov772x.h>
25#include <media/soc_camera.h> 26#include <media/soc_camera.h>
26#include <media/soc_camera_platform.h> 27#include <media/soc_camera_platform.h>
27#include <media/sh_mobile_ceu.h> 28#include <media/sh_mobile_ceu.h>
@@ -235,6 +236,7 @@ static void camera_power(int val)
235} 236}
236 237
237#ifdef CONFIG_I2C 238#ifdef CONFIG_I2C
239/* support for the old ncm03j camera */
238static unsigned char camera_ncm03j_magic[] = 240static unsigned char camera_ncm03j_magic[] =
239{ 241{
240 0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8, 242 0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8,
@@ -255,6 +257,23 @@ static unsigned char camera_ncm03j_magic[] =
255 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F, 257 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F,
256}; 258};
257 259
260static int camera_probe(void)
261{
262 struct i2c_adapter *a = i2c_get_adapter(0);
263 struct i2c_msg msg;
264 int ret;
265
266 camera_power(1);
267 msg.addr = 0x6e;
268 msg.buf = camera_ncm03j_magic;
269 msg.len = 2;
270 msg.flags = 0;
271 ret = i2c_transfer(a, &msg, 1);
272 camera_power(0);
273
274 return ret;
275}
276
258static int camera_set_capture(struct soc_camera_platform_info *info, 277static int camera_set_capture(struct soc_camera_platform_info *info,
259 int enable) 278 int enable)
260{ 279{
@@ -306,11 +325,37 @@ static struct platform_device camera_device = {
306 .platform_data = &camera_info, 325 .platform_data = &camera_info,
307 }, 326 },
308}; 327};
328
329static int __init camera_setup(void)
330{
331 if (camera_probe() > 0)
332 platform_device_register(&camera_device);
333
334 return 0;
335}
336late_initcall(camera_setup);
337
309#endif /* CONFIG_I2C */ 338#endif /* CONFIG_I2C */
310 339
340static int ov7725_power(struct device *dev, int mode)
341{
342 camera_power(0);
343 if (mode)
344 camera_power(1);
345
346 return 0;
347}
348
349static struct ov772x_camera_info ov7725_info = {
350 .buswidth = SOCAM_DATAWIDTH_8,
351 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
352 .link = {
353 .power = ov7725_power,
354 },
355};
356
311static struct sh_mobile_ceu_info sh_mobile_ceu_info = { 357static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
312 .flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | 358 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
313 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
314}; 359};
315 360
316static struct resource ceu_resources[] = { 361static struct resource ceu_resources[] = {
@@ -358,9 +403,6 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
358 &ap325rxa_nor_flash_device, 403 &ap325rxa_nor_flash_device,
359 &lcdc_device, 404 &lcdc_device,
360 &ceu_device, 405 &ceu_device,
361#ifdef CONFIG_I2C
362 &camera_device,
363#endif
364 &nand_flash_device, 406 &nand_flash_device,
365 &sdcard_cn3_device, 407 &sdcard_cn3_device,
366}; 408};
@@ -369,6 +411,10 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
369 { 411 {
370 I2C_BOARD_INFO("pcf8563", 0x51), 412 I2C_BOARD_INFO("pcf8563", 0x51),
371 }, 413 },
414 {
415 I2C_BOARD_INFO("ov772x", 0x21),
416 .platform_data = &ov7725_info,
417 },
372}; 418};
373 419
374static struct spi_board_info ap325rxa_spi_devices[] = { 420static struct spi_board_info ap325rxa_spi_devices[] = {
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
index 17036ce20086..8367d1d789c3 100644
--- a/arch/sh/boards/board-urquell.c
+++ b/arch/sh/boards/board-urquell.c
@@ -129,6 +129,10 @@ static int __init urquell_devices_setup(void)
129 gpio_request(GPIO_FN_USB_OVC0, NULL); 129 gpio_request(GPIO_FN_USB_OVC0, NULL);
130 gpio_request(GPIO_FN_USB_PENC0, NULL); 130 gpio_request(GPIO_FN_USB_PENC0, NULL);
131 131
132 /* enable LAN */
133 __raw_writew(__raw_readw(UBOARDREG(IRL2MSKR)) & ~0x00000001,
134 UBOARDREG(IRL2MSKR));
135
132 return platform_add_devices(urquell_devices, 136 return platform_add_devices(urquell_devices,
133 ARRAY_SIZE(urquell_devices)); 137 ARRAY_SIZE(urquell_devices));
134} 138}
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index bc35b4cae6b3..1ee1de0bc1c3 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -352,8 +352,7 @@ static int tw9910_power(struct device *dev, int mode)
352} 352}
353 353
354static struct sh_mobile_ceu_info sh_mobile_ceu_info = { 354static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
355 .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ 355 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
356 | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
357}; 356};
358 357
359static struct resource migor_ceu_resources[] = { 358static struct resource migor_ceu_resources[] = {
diff --git a/arch/sh/configs/ap325rxa_defconfig b/arch/sh/configs/ap325rxa_defconfig
index 352f87d50fdc..c8d982a8a2e6 100644
--- a/arch/sh/configs/ap325rxa_defconfig
+++ b/arch/sh/configs/ap325rxa_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc2 3# Linux kernel version: 2.6.29
4# Tue Jan 27 11:45:08 2009 4# Thu Apr 2 17:46:53 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,14 +16,16 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_CMT=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 30
29# 31#
@@ -43,6 +45,15 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_BSD_PROCESS_ACCT_V3 is not set 45# CONFIG_BSD_PROCESS_ACCT_V3 is not set
44# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
45# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
46# CONFIG_IKCONFIG is not set 57# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14 58CONFIG_LOG_BUF_SHIFT=14
48CONFIG_GROUP_SCHED=y 59CONFIG_GROUP_SCHED=y
@@ -58,6 +69,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
58# CONFIG_BLK_DEV_INITRD is not set 69# CONFIG_BLK_DEV_INITRD is not set
59CONFIG_CC_OPTIMIZE_FOR_SIZE=y 70CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
72CONFIG_ANON_INODES=y
61CONFIG_EMBEDDED=y 73CONFIG_EMBEDDED=y
62CONFIG_UID16=y 74CONFIG_UID16=y
63CONFIG_SYSCTL_SYSCALL=y 75CONFIG_SYSCTL_SYSCALL=y
@@ -66,10 +78,8 @@ CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y 78CONFIG_PRINTK=y
67CONFIG_BUG=y 79CONFIG_BUG=y
68CONFIG_ELF_CORE=y 80CONFIG_ELF_CORE=y
69CONFIG_COMPAT_BRK=y
70CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
71CONFIG_FUTEX=y 82CONFIG_FUTEX=y
72CONFIG_ANON_INODES=y
73CONFIG_EPOLL=y 83CONFIG_EPOLL=y
74CONFIG_SIGNALFD=y 84CONFIG_SIGNALFD=y
75CONFIG_TIMERFD=y 85CONFIG_TIMERFD=y
@@ -77,6 +87,7 @@ CONFIG_EVENTFD=y
77CONFIG_SHMEM=y 87CONFIG_SHMEM=y
78CONFIG_AIO=y 88CONFIG_AIO=y
79CONFIG_VM_EVENT_COUNTERS=y 89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_COMPAT_BRK=y
80CONFIG_SLAB=y 91CONFIG_SLAB=y
81# CONFIG_SLUB is not set 92# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set 93# CONFIG_SLOB is not set
@@ -115,11 +126,6 @@ CONFIG_IOSCHED_CFQ=y
115CONFIG_DEFAULT_CFQ=y 126CONFIG_DEFAULT_CFQ=y
116# CONFIG_DEFAULT_NOOP is not set 127# CONFIG_DEFAULT_NOOP is not set
117CONFIG_DEFAULT_IOSCHED="cfq" 128CONFIG_DEFAULT_IOSCHED="cfq"
118CONFIG_CLASSIC_RCU=y
119# CONFIG_TREE_RCU is not set
120# CONFIG_PREEMPT_RCU is not set
121# CONFIG_TREE_RCU_TRACE is not set
122# CONFIG_PREEMPT_RCU_TRACE is not set
123# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
124 130
125# 131#
@@ -128,6 +134,7 @@ CONFIG_CLASSIC_RCU=y
128CONFIG_CPU_SH4=y 134CONFIG_CPU_SH4=y
129CONFIG_CPU_SH4A=y 135CONFIG_CPU_SH4A=y
130CONFIG_CPU_SHX2=y 136CONFIG_CPU_SHX2=y
137CONFIG_ARCH_SHMOBILE=y
131# CONFIG_CPU_SUBTYPE_SH7619 is not set 138# CONFIG_CPU_SUBTYPE_SH7619 is not set
132# CONFIG_CPU_SUBTYPE_SH7201 is not set 139# CONFIG_CPU_SUBTYPE_SH7201 is not set
133# CONFIG_CPU_SUBTYPE_SH7203 is not set 140# CONFIG_CPU_SUBTYPE_SH7203 is not set
@@ -156,6 +163,7 @@ CONFIG_CPU_SUBTYPE_SH7723=y
156# CONFIG_CPU_SUBTYPE_SH7770 is not set 163# CONFIG_CPU_SUBTYPE_SH7770 is not set
157# CONFIG_CPU_SUBTYPE_SH7780 is not set 164# CONFIG_CPU_SUBTYPE_SH7780 is not set
158# CONFIG_CPU_SUBTYPE_SH7785 is not set 165# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# CONFIG_CPU_SUBTYPE_SH7786 is not set
159# CONFIG_CPU_SUBTYPE_SHX3 is not set 167# CONFIG_CPU_SUBTYPE_SHX3 is not set
160# CONFIG_CPU_SUBTYPE_SH7343 is not set 168# CONFIG_CPU_SUBTYPE_SH7343 is not set
161# CONFIG_CPU_SUBTYPE_SH7722 is not set 169# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -198,11 +206,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
198CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
199CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
200CONFIG_UNEVICTABLE_LRU=y 208CONFIG_UNEVICTABLE_LRU=y
209CONFIG_HAVE_MLOCK=y
210CONFIG_HAVE_MLOCKED_PAGE_BIT=y
201 211
202# 212#
203# Cache configuration 213# Cache configuration
204# 214#
205# CONFIG_SH_DIRECT_MAPPED is not set
206CONFIG_CACHE_WRITEBACK=y 215CONFIG_CACHE_WRITEBACK=y
207# CONFIG_CACHE_WRITETHROUGH is not set 216# CONFIG_CACHE_WRITETHROUGH is not set
208# CONFIG_CACHE_OFF is not set 217# CONFIG_CACHE_OFF is not set
@@ -228,6 +237,7 @@ CONFIG_SH_AP325RXA=y
228# Timer and clock configuration 237# Timer and clock configuration
229# 238#
230CONFIG_SH_TMU=y 239CONFIG_SH_TMU=y
240# CONFIG_SH_TIMER_CMT is not set
231CONFIG_SH_TIMER_IRQ=16 241CONFIG_SH_TIMER_IRQ=16
232CONFIG_SH_PCLK_FREQ=33333333 242CONFIG_SH_PCLK_FREQ=33333333
233CONFIG_TICK_ONESHOT=y 243CONFIG_TICK_ONESHOT=y
@@ -304,7 +314,6 @@ CONFIG_NET=y
304# 314#
305# Networking options 315# Networking options
306# 316#
307CONFIG_COMPAT_NET_DEV_OPS=y
308CONFIG_PACKET=y 317CONFIG_PACKET=y
309# CONFIG_PACKET_MMAP is not set 318# CONFIG_PACKET_MMAP is not set
310CONFIG_UNIX=y 319CONFIG_UNIX=y
@@ -359,6 +368,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
359# CONFIG_LAPB is not set 368# CONFIG_LAPB is not set
360# CONFIG_ECONET is not set 369# CONFIG_ECONET is not set
361# CONFIG_WAN_ROUTER is not set 370# CONFIG_WAN_ROUTER is not set
371# CONFIG_PHONET is not set
362# CONFIG_NET_SCHED is not set 372# CONFIG_NET_SCHED is not set
363# CONFIG_DCB is not set 373# CONFIG_DCB is not set
364 374
@@ -371,7 +381,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_IRDA is not set 381# CONFIG_IRDA is not set
372# CONFIG_BT is not set 382# CONFIG_BT is not set
373# CONFIG_AF_RXRPC is not set 383# CONFIG_AF_RXRPC is not set
374# CONFIG_PHONET is not set
375CONFIG_WIRELESS=y 384CONFIG_WIRELESS=y
376# CONFIG_CFG80211 is not set 385# CONFIG_CFG80211 is not set
377# CONFIG_WIRELESS_OLD_REGULATORY is not set 386# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -483,7 +492,6 @@ CONFIG_MTD_NAND_SH_FLCTL=y
483# LPDDR flash memory drivers 492# LPDDR flash memory drivers
484# 493#
485# CONFIG_MTD_LPDDR is not set 494# CONFIG_MTD_LPDDR is not set
486# CONFIG_MTD_QINFO_PROBE is not set
487 495
488# 496#
489# UBI - Unsorted block images 497# UBI - Unsorted block images
@@ -510,10 +518,18 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
510# CONFIG_ATA_OVER_ETH is not set 518# CONFIG_ATA_OVER_ETH is not set
511# CONFIG_BLK_DEV_HD is not set 519# CONFIG_BLK_DEV_HD is not set
512CONFIG_MISC_DEVICES=y 520CONFIG_MISC_DEVICES=y
513# CONFIG_EEPROM_93CX6 is not set
514# CONFIG_ICS932S401 is not set 521# CONFIG_ICS932S401 is not set
515# CONFIG_ENCLOSURE_SERVICES is not set 522# CONFIG_ENCLOSURE_SERVICES is not set
523# CONFIG_ISL29003 is not set
516# CONFIG_C2PORT is not set 524# CONFIG_C2PORT is not set
525
526#
527# EEPROM support
528#
529# CONFIG_EEPROM_AT24 is not set
530# CONFIG_EEPROM_AT25 is not set
531# CONFIG_EEPROM_LEGACY is not set
532# CONFIG_EEPROM_93CX6 is not set
517CONFIG_HAVE_IDE=y 533CONFIG_HAVE_IDE=y
518# CONFIG_IDE is not set 534# CONFIG_IDE is not set
519 535
@@ -559,9 +575,11 @@ CONFIG_SCSI_LOWLEVEL=y
559# CONFIG_LIBFC is not set 575# CONFIG_LIBFC is not set
560# CONFIG_SCSI_DEBUG is not set 576# CONFIG_SCSI_DEBUG is not set
561# CONFIG_SCSI_DH is not set 577# CONFIG_SCSI_DH is not set
578# CONFIG_SCSI_OSD_INITIATOR is not set
562# CONFIG_ATA is not set 579# CONFIG_ATA is not set
563# CONFIG_MD is not set 580# CONFIG_MD is not set
564CONFIG_NETDEVICES=y 581CONFIG_NETDEVICES=y
582CONFIG_COMPAT_NET_DEV_OPS=y
565# CONFIG_DUMMY is not set 583# CONFIG_DUMMY is not set
566# CONFIG_BONDING is not set 584# CONFIG_BONDING is not set
567# CONFIG_MACVLAN is not set 585# CONFIG_MACVLAN is not set
@@ -594,8 +612,10 @@ CONFIG_MII=y
594# CONFIG_STNIC is not set 612# CONFIG_STNIC is not set
595# CONFIG_SMC91X is not set 613# CONFIG_SMC91X is not set
596# CONFIG_ENC28J60 is not set 614# CONFIG_ENC28J60 is not set
615# CONFIG_ETHOC is not set
597# CONFIG_SMC911X is not set 616# CONFIG_SMC911X is not set
598CONFIG_SMSC911X=y 617CONFIG_SMSC911X=y
618# CONFIG_DNET is not set
599# CONFIG_IBM_NEW_EMAC_ZMII is not set 619# CONFIG_IBM_NEW_EMAC_ZMII is not set
600# CONFIG_IBM_NEW_EMAC_RGMII is not set 620# CONFIG_IBM_NEW_EMAC_RGMII is not set
601# CONFIG_IBM_NEW_EMAC_TAH is not set 621# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -612,7 +632,6 @@ CONFIG_SMSC911X=y
612# 632#
613# CONFIG_WLAN_PRE80211 is not set 633# CONFIG_WLAN_PRE80211 is not set
614# CONFIG_WLAN_80211 is not set 634# CONFIG_WLAN_80211 is not set
615# CONFIG_IWLWIFI_LEDS is not set
616 635
617# 636#
618# Enable WiMAX (Networking options) to see the WiMAX drivers 637# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -687,6 +706,7 @@ CONFIG_LEGACY_PTYS=y
687CONFIG_LEGACY_PTY_COUNT=256 706CONFIG_LEGACY_PTY_COUNT=256
688# CONFIG_IPMI_HANDLER is not set 707# CONFIG_IPMI_HANDLER is not set
689CONFIG_HW_RANDOM=y 708CONFIG_HW_RANDOM=y
709# CONFIG_HW_RANDOM_TIMERIOMEM is not set
690# CONFIG_R3964 is not set 710# CONFIG_R3964 is not set
691# CONFIG_RAW_DRIVER is not set 711# CONFIG_RAW_DRIVER is not set
692# CONFIG_TCG_TPM is not set 712# CONFIG_TCG_TPM is not set
@@ -723,12 +743,9 @@ CONFIG_I2C_SH_MOBILE=y
723# Miscellaneous I2C Chip support 743# Miscellaneous I2C Chip support
724# 744#
725# CONFIG_DS1682 is not set 745# CONFIG_DS1682 is not set
726# CONFIG_AT24 is not set
727# CONFIG_SENSORS_EEPROM is not set
728# CONFIG_SENSORS_PCF8574 is not set 746# CONFIG_SENSORS_PCF8574 is not set
729# CONFIG_PCF8575 is not set 747# CONFIG_PCF8575 is not set
730# CONFIG_SENSORS_PCA9539 is not set 748# CONFIG_SENSORS_PCA9539 is not set
731# CONFIG_SENSORS_PCF8591 is not set
732# CONFIG_SENSORS_MAX6875 is not set 749# CONFIG_SENSORS_MAX6875 is not set
733# CONFIG_SENSORS_TSL2550 is not set 750# CONFIG_SENSORS_TSL2550 is not set
734# CONFIG_I2C_DEBUG_CORE is not set 751# CONFIG_I2C_DEBUG_CORE is not set
@@ -748,7 +765,6 @@ CONFIG_SPI_GPIO=y
748# 765#
749# SPI Protocol Masters 766# SPI Protocol Masters
750# 767#
751# CONFIG_SPI_AT25 is not set
752# CONFIG_SPI_SPIDEV is not set 768# CONFIG_SPI_SPIDEV is not set
753# CONFIG_SPI_TLE62X0 is not set 769# CONFIG_SPI_TLE62X0 is not set
754CONFIG_ARCH_REQUIRE_GPIOLIB=y 770CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -822,7 +838,7 @@ CONFIG_VIDEO_MEDIA=y
822# 838#
823# CONFIG_MEDIA_ATTACH is not set 839# CONFIG_MEDIA_ATTACH is not set
824CONFIG_MEDIA_TUNER=y 840CONFIG_MEDIA_TUNER=y
825# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set 841# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
826CONFIG_MEDIA_TUNER_SIMPLE=y 842CONFIG_MEDIA_TUNER_SIMPLE=y
827CONFIG_MEDIA_TUNER_TDA8290=y 843CONFIG_MEDIA_TUNER_TDA8290=y
828CONFIG_MEDIA_TUNER_TDA9887=y 844CONFIG_MEDIA_TUNER_TDA9887=y
@@ -831,6 +847,7 @@ CONFIG_MEDIA_TUNER_TEA5767=y
831CONFIG_MEDIA_TUNER_MT20XX=y 847CONFIG_MEDIA_TUNER_MT20XX=y
832CONFIG_MEDIA_TUNER_XC2028=y 848CONFIG_MEDIA_TUNER_XC2028=y
833CONFIG_MEDIA_TUNER_XC5000=y 849CONFIG_MEDIA_TUNER_XC5000=y
850CONFIG_MEDIA_TUNER_MC44S803=y
834CONFIG_VIDEO_V4L2=y 851CONFIG_VIDEO_V4L2=y
835CONFIG_VIDEOBUF_GEN=y 852CONFIG_VIDEOBUF_GEN=y
836CONFIG_VIDEOBUF_DMA_CONTIG=y 853CONFIG_VIDEOBUF_DMA_CONTIG=y
@@ -886,6 +903,7 @@ CONFIG_FB_SH_MOBILE_LCDC=y
886# CONFIG_FB_VIRTUAL is not set 903# CONFIG_FB_VIRTUAL is not set
887# CONFIG_FB_METRONOME is not set 904# CONFIG_FB_METRONOME is not set
888# CONFIG_FB_MB862XX is not set 905# CONFIG_FB_MB862XX is not set
906# CONFIG_FB_BROADSHEET is not set
889# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 907# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
890 908
891# 909#
@@ -995,6 +1013,7 @@ CONFIG_RTC_DRV_PCF8563=y
995# 1013#
996# CONFIG_RTC_DRV_SH is not set 1014# CONFIG_RTC_DRV_SH is not set
997# CONFIG_DMADEVICES is not set 1015# CONFIG_DMADEVICES is not set
1016# CONFIG_AUXDISPLAY is not set
998CONFIG_UIO=y 1017CONFIG_UIO=y
999# CONFIG_UIO_PDRV is not set 1018# CONFIG_UIO_PDRV is not set
1000CONFIG_UIO_PDRV_GENIRQ=y 1019CONFIG_UIO_PDRV_GENIRQ=y
@@ -1096,7 +1115,6 @@ CONFIG_LOCKD_V4=y
1096CONFIG_EXPORTFS=y 1115CONFIG_EXPORTFS=y
1097CONFIG_NFS_COMMON=y 1116CONFIG_NFS_COMMON=y
1098CONFIG_SUNRPC=y 1117CONFIG_SUNRPC=y
1099# CONFIG_SUNRPC_REGISTER_V4 is not set
1100# CONFIG_RPCSEC_GSS_KRB5 is not set 1118# CONFIG_RPCSEC_GSS_KRB5 is not set
1101# CONFIG_RPCSEC_GSS_SPKM3 is not set 1119# CONFIG_RPCSEC_GSS_SPKM3 is not set
1102# CONFIG_SMB_FS is not set 1120# CONFIG_SMB_FS is not set
@@ -1177,7 +1195,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1177# 1195#
1178# Tracers 1196# Tracers
1179# 1197#
1180# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1181# CONFIG_SAMPLES is not set 1198# CONFIG_SAMPLES is not set
1182CONFIG_HAVE_ARCH_KGDB=y 1199CONFIG_HAVE_ARCH_KGDB=y
1183# CONFIG_SH_STANDARD_BIOS is not set 1200# CONFIG_SH_STANDARD_BIOS is not set
@@ -1204,10 +1221,12 @@ CONFIG_CRYPTO_BLKCIPHER=y
1204CONFIG_CRYPTO_BLKCIPHER2=y 1221CONFIG_CRYPTO_BLKCIPHER2=y
1205CONFIG_CRYPTO_HASH2=y 1222CONFIG_CRYPTO_HASH2=y
1206CONFIG_CRYPTO_RNG2=y 1223CONFIG_CRYPTO_RNG2=y
1224CONFIG_CRYPTO_PCOMP=y
1207CONFIG_CRYPTO_MANAGER=y 1225CONFIG_CRYPTO_MANAGER=y
1208CONFIG_CRYPTO_MANAGER2=y 1226CONFIG_CRYPTO_MANAGER2=y
1209# CONFIG_CRYPTO_GF128MUL is not set 1227# CONFIG_CRYPTO_GF128MUL is not set
1210# CONFIG_CRYPTO_NULL is not set 1228# CONFIG_CRYPTO_NULL is not set
1229CONFIG_CRYPTO_WORKQUEUE=y
1211# CONFIG_CRYPTO_CRYPTD is not set 1230# CONFIG_CRYPTO_CRYPTD is not set
1212# CONFIG_CRYPTO_AUTHENC is not set 1231# CONFIG_CRYPTO_AUTHENC is not set
1213# CONFIG_CRYPTO_TEST is not set 1232# CONFIG_CRYPTO_TEST is not set
@@ -1276,6 +1295,7 @@ CONFIG_CRYPTO_CBC=y
1276# Compression 1295# Compression
1277# 1296#
1278# CONFIG_CRYPTO_DEFLATE is not set 1297# CONFIG_CRYPTO_DEFLATE is not set
1298# CONFIG_CRYPTO_ZLIB is not set
1279# CONFIG_CRYPTO_LZO is not set 1299# CONFIG_CRYPTO_LZO is not set
1280 1300
1281# 1301#
@@ -1296,7 +1316,7 @@ CONFIG_CRC_ITU_T=y
1296CONFIG_CRC32=y 1316CONFIG_CRC32=y
1297CONFIG_CRC7=y 1317CONFIG_CRC7=y
1298# CONFIG_LIBCRC32C is not set 1318# CONFIG_LIBCRC32C is not set
1299CONFIG_PLIST=y
1300CONFIG_HAS_IOMEM=y 1319CONFIG_HAS_IOMEM=y
1301CONFIG_HAS_IOPORT=y 1320CONFIG_HAS_IOPORT=y
1302CONFIG_HAS_DMA=y 1321CONFIG_HAS_DMA=y
1322CONFIG_NLATTR=y
diff --git a/arch/sh/configs/cayman_defconfig b/arch/sh/configs/cayman_defconfig
index 92895013813d..fa5fc1e1e980 100644
--- a/arch/sh/configs/cayman_defconfig
+++ b/arch/sh/configs/cayman_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27 3# Linux kernel version: 2.6.29
4# Wed Oct 22 18:04:52 2008 4# Thu Apr 2 17:49:14 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7# CONFIG_SUPERH32 is not set 7# CONFIG_SUPERH32 is not set
@@ -16,6 +16,8 @@ CONFIG_GENERIC_IRQ_PROBE=y
16# CONFIG_GENERIC_GPIO is not set 16# CONFIG_GENERIC_GPIO is not set
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18# CONFIG_GENERIC_CLOCKEVENTS is not set 18# CONFIG_GENERIC_CLOCKEVENTS is not set
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
19CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
20CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -23,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
23# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
24# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
25CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27 30
28# 31#
@@ -40,10 +43,19 @@ CONFIG_POSIX_MQUEUE=y
40# CONFIG_BSD_PROCESS_ACCT is not set 43# CONFIG_BSD_PROCESS_ACCT is not set
41# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
43# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
44CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_CGROUPS is not set
46# CONFIG_GROUP_SCHED is not set 57# CONFIG_GROUP_SCHED is not set
58# CONFIG_CGROUPS is not set
47CONFIG_SYSFS_DEPRECATED=y 59CONFIG_SYSFS_DEPRECATED=y
48CONFIG_SYSFS_DEPRECATED_V2=y 60CONFIG_SYSFS_DEPRECATED_V2=y
49# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
@@ -51,6 +63,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_BLK_DEV_INITRD is not set 63# CONFIG_BLK_DEV_INITRD is not set
52# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 64# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
53CONFIG_SYSCTL=y 65CONFIG_SYSCTL=y
66CONFIG_ANON_INODES=y
54CONFIG_EMBEDDED=y 67CONFIG_EMBEDDED=y
55CONFIG_UID16=y 68CONFIG_UID16=y
56CONFIG_SYSCTL_SYSCALL=y 69CONFIG_SYSCTL_SYSCALL=y
@@ -61,10 +74,8 @@ CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y 74CONFIG_PRINTK=y
62CONFIG_BUG=y 75CONFIG_BUG=y
63CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
64CONFIG_COMPAT_BRK=y
65CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
66CONFIG_FUTEX=y 78CONFIG_FUTEX=y
67CONFIG_ANON_INODES=y
68CONFIG_EPOLL=y 79CONFIG_EPOLL=y
69CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
70CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -73,18 +84,18 @@ CONFIG_SHMEM=y
73CONFIG_AIO=y 84CONFIG_AIO=y
74CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_PCI_QUIRKS=y 86CONFIG_PCI_QUIRKS=y
87CONFIG_COMPAT_BRK=y
76CONFIG_SLAB=y 88CONFIG_SLAB=y
77# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
78# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
79# CONFIG_PROFILING is not set 91# CONFIG_PROFILING is not set
80# CONFIG_MARKERS is not set
81CONFIG_HAVE_OPROFILE=y 92CONFIG_HAVE_OPROFILE=y
82CONFIG_HAVE_IOREMAP_PROT=y 93CONFIG_HAVE_IOREMAP_PROT=y
94CONFIG_HAVE_ARCH_TRACEHOOK=y
83CONFIG_HAVE_CLK=y 95CONFIG_HAVE_CLK=y
84CONFIG_HAVE_GENERIC_DMA_COHERENT=y 96CONFIG_HAVE_GENERIC_DMA_COHERENT=y
85CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
86CONFIG_RT_MUTEXES=y 98CONFIG_RT_MUTEXES=y
87# CONFIG_TINY_SHMEM is not set
88CONFIG_BASE_SMALL=0 99CONFIG_BASE_SMALL=0
89CONFIG_MODULES=y 100CONFIG_MODULES=y
90# CONFIG_MODULE_FORCE_LOAD is not set 101# CONFIG_MODULE_FORCE_LOAD is not set
@@ -92,11 +103,9 @@ CONFIG_MODULE_UNLOAD=y
92# CONFIG_MODULE_FORCE_UNLOAD is not set 103# CONFIG_MODULE_FORCE_UNLOAD is not set
93# CONFIG_MODVERSIONS is not set 104# CONFIG_MODVERSIONS is not set
94# CONFIG_MODULE_SRCVERSION_ALL is not set 105# CONFIG_MODULE_SRCVERSION_ALL is not set
95CONFIG_KMOD=y
96CONFIG_BLOCK=y 106CONFIG_BLOCK=y
97# CONFIG_LBD is not set 107# CONFIG_LBD is not set
98# CONFIG_BLK_DEV_IO_TRACE is not set 108# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set
100# CONFIG_BLK_DEV_BSG is not set 109# CONFIG_BLK_DEV_BSG is not set
101# CONFIG_BLK_DEV_INTEGRITY is not set 110# CONFIG_BLK_DEV_INTEGRITY is not set
102 111
@@ -112,7 +121,6 @@ CONFIG_IOSCHED_CFQ=y
112CONFIG_DEFAULT_CFQ=y 121CONFIG_DEFAULT_CFQ=y
113# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="cfq" 123CONFIG_DEFAULT_IOSCHED="cfq"
115CONFIG_CLASSIC_RCU=y
116# CONFIG_FREEZER is not set 124# CONFIG_FREEZER is not set
117 125
118# 126#
@@ -120,6 +128,7 @@ CONFIG_CLASSIC_RCU=y
120# 128#
121CONFIG_CPU_SH5=y 129CONFIG_CPU_SH5=y
122# CONFIG_CPU_SUBTYPE_SH7619 is not set 130# CONFIG_CPU_SUBTYPE_SH7619 is not set
131# CONFIG_CPU_SUBTYPE_SH7201 is not set
123# CONFIG_CPU_SUBTYPE_SH7203 is not set 132# CONFIG_CPU_SUBTYPE_SH7203 is not set
124# CONFIG_CPU_SUBTYPE_SH7206 is not set 133# CONFIG_CPU_SUBTYPE_SH7206 is not set
125# CONFIG_CPU_SUBTYPE_SH7263 is not set 134# CONFIG_CPU_SUBTYPE_SH7263 is not set
@@ -146,6 +155,7 @@ CONFIG_CPU_SH5=y
146# CONFIG_CPU_SUBTYPE_SH7770 is not set 155# CONFIG_CPU_SUBTYPE_SH7770 is not set
147# CONFIG_CPU_SUBTYPE_SH7780 is not set 156# CONFIG_CPU_SUBTYPE_SH7780 is not set
148# CONFIG_CPU_SUBTYPE_SH7785 is not set 157# CONFIG_CPU_SUBTYPE_SH7785 is not set
158# CONFIG_CPU_SUBTYPE_SH7786 is not set
149# CONFIG_CPU_SUBTYPE_SHX3 is not set 159# CONFIG_CPU_SUBTYPE_SHX3 is not set
150# CONFIG_CPU_SUBTYPE_SH7343 is not set 160# CONFIG_CPU_SUBTYPE_SH7343 is not set
151# CONFIG_CPU_SUBTYPE_SH7722 is not set 161# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -188,16 +198,16 @@ CONFIG_FLAT_NODE_MEM_MAP=y
188CONFIG_SPARSEMEM_STATIC=y 198CONFIG_SPARSEMEM_STATIC=y
189CONFIG_PAGEFLAGS_EXTENDED=y 199CONFIG_PAGEFLAGS_EXTENDED=y
190CONFIG_SPLIT_PTLOCK_CPUS=4 200CONFIG_SPLIT_PTLOCK_CPUS=4
191CONFIG_RESOURCES_64BIT=y
192# CONFIG_PHYS_ADDR_T_64BIT is not set 201# CONFIG_PHYS_ADDR_T_64BIT is not set
193CONFIG_ZONE_DMA_FLAG=0 202CONFIG_ZONE_DMA_FLAG=0
194CONFIG_NR_QUICK=2 203CONFIG_NR_QUICK=2
195CONFIG_UNEVICTABLE_LRU=y 204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y
196 207
197# 208#
198# Cache configuration 209# Cache configuration
199# 210#
200# CONFIG_SH_DIRECT_MAPPED is not set
201# CONFIG_CACHE_WRITEBACK is not set 211# CONFIG_CACHE_WRITEBACK is not set
202# CONFIG_CACHE_WRITETHROUGH is not set 212# CONFIG_CACHE_WRITETHROUGH is not set
203CONFIG_CACHE_OFF=y 213CONFIG_CACHE_OFF=y
@@ -256,7 +266,6 @@ CONFIG_HZ=250
256# CONFIG_PREEMPT_NONE is not set 266# CONFIG_PREEMPT_NONE is not set
257# CONFIG_PREEMPT_VOLUNTARY is not set 267# CONFIG_PREEMPT_VOLUNTARY is not set
258CONFIG_PREEMPT=y 268CONFIG_PREEMPT=y
259# CONFIG_PREEMPT_RCU is not set
260 269
261# 270#
262# Boot options 271# Boot options
@@ -272,9 +281,12 @@ CONFIG_PCI=y
272CONFIG_SH_PCIDMA_NONCOHERENT=y 281CONFIG_SH_PCIDMA_NONCOHERENT=y
273CONFIG_PCI_AUTO=y 282CONFIG_PCI_AUTO=y
274CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 283CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
284# CONFIG_PCIEPORTBUS is not set
275# CONFIG_ARCH_SUPPORTS_MSI is not set 285# CONFIG_ARCH_SUPPORTS_MSI is not set
276CONFIG_PCI_LEGACY=y 286CONFIG_PCI_LEGACY=y
277# CONFIG_PCI_DEBUG is not set 287# CONFIG_PCI_DEBUG is not set
288# CONFIG_PCI_STUB is not set
289# CONFIG_PCI_IOV is not set
278# CONFIG_PCCARD is not set 290# CONFIG_PCCARD is not set
279# CONFIG_HOTPLUG_PCI is not set 291# CONFIG_HOTPLUG_PCI is not set
280 292
@@ -285,6 +297,12 @@ CONFIG_BINFMT_ELF=y
285# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 297# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
286# CONFIG_HAVE_AOUT is not set 298# CONFIG_HAVE_AOUT is not set
287# CONFIG_BINFMT_MISC is not set 299# CONFIG_BINFMT_MISC is not set
300
301#
302# Power management options (EXPERIMENTAL)
303#
304# CONFIG_PM is not set
305# CONFIG_CPU_IDLE is not set
288CONFIG_NET=y 306CONFIG_NET=y
289 307
290# 308#
@@ -344,7 +362,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
344# CONFIG_LAPB is not set 362# CONFIG_LAPB is not set
345# CONFIG_ECONET is not set 363# CONFIG_ECONET is not set
346# CONFIG_WAN_ROUTER is not set 364# CONFIG_WAN_ROUTER is not set
365# CONFIG_PHONET is not set
347# CONFIG_NET_SCHED is not set 366# CONFIG_NET_SCHED is not set
367# CONFIG_DCB is not set
348 368
349# 369#
350# Network testing 370# Network testing
@@ -355,13 +375,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_IRDA is not set 375# CONFIG_IRDA is not set
356# CONFIG_BT is not set 376# CONFIG_BT is not set
357# CONFIG_AF_RXRPC is not set 377# CONFIG_AF_RXRPC is not set
358# CONFIG_PHONET is not set
359CONFIG_WIRELESS=y 378CONFIG_WIRELESS=y
360# CONFIG_CFG80211 is not set 379# CONFIG_CFG80211 is not set
361# CONFIG_WIRELESS_OLD_REGULATORY is not set 380# CONFIG_WIRELESS_OLD_REGULATORY is not set
362# CONFIG_WIRELESS_EXT is not set 381# CONFIG_WIRELESS_EXT is not set
382# CONFIG_LIB80211 is not set
363# CONFIG_MAC80211 is not set 383# CONFIG_MAC80211 is not set
364# CONFIG_IEEE80211 is not set 384# CONFIG_WIMAX is not set
365# CONFIG_RFKILL is not set 385# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set 386# CONFIG_NET_9P is not set
367 387
@@ -400,11 +420,20 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
400# CONFIG_BLK_DEV_HD is not set 420# CONFIG_BLK_DEV_HD is not set
401CONFIG_MISC_DEVICES=y 421CONFIG_MISC_DEVICES=y
402# CONFIG_PHANTOM is not set 422# CONFIG_PHANTOM is not set
403# CONFIG_EEPROM_93CX6 is not set
404# CONFIG_SGI_IOC4 is not set 423# CONFIG_SGI_IOC4 is not set
405# CONFIG_TIFM_CORE is not set 424# CONFIG_TIFM_CORE is not set
425# CONFIG_ICS932S401 is not set
406# CONFIG_ENCLOSURE_SERVICES is not set 426# CONFIG_ENCLOSURE_SERVICES is not set
407# CONFIG_HP_ILO is not set 427# CONFIG_HP_ILO is not set
428# CONFIG_ISL29003 is not set
429# CONFIG_C2PORT is not set
430
431#
432# EEPROM support
433#
434# CONFIG_EEPROM_AT24 is not set
435# CONFIG_EEPROM_LEGACY is not set
436# CONFIG_EEPROM_93CX6 is not set
408CONFIG_HAVE_IDE=y 437CONFIG_HAVE_IDE=y
409# CONFIG_IDE is not set 438# CONFIG_IDE is not set
410 439
@@ -447,6 +476,7 @@ CONFIG_SCSI_SPI_ATTRS=y
447# CONFIG_SCSI_SRP_ATTRS is not set 476# CONFIG_SCSI_SRP_ATTRS is not set
448CONFIG_SCSI_LOWLEVEL=y 477CONFIG_SCSI_LOWLEVEL=y
449# CONFIG_ISCSI_TCP is not set 478# CONFIG_ISCSI_TCP is not set
479# CONFIG_SCSI_CXGB3_ISCSI is not set
450# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 480# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
451# CONFIG_SCSI_3W_9XXX is not set 481# CONFIG_SCSI_3W_9XXX is not set
452# CONFIG_SCSI_ACARD is not set 482# CONFIG_SCSI_ACARD is not set
@@ -459,7 +489,10 @@ CONFIG_SCSI_LOWLEVEL=y
459# CONFIG_MEGARAID_NEWGEN is not set 489# CONFIG_MEGARAID_NEWGEN is not set
460# CONFIG_MEGARAID_LEGACY is not set 490# CONFIG_MEGARAID_LEGACY is not set
461# CONFIG_MEGARAID_SAS is not set 491# CONFIG_MEGARAID_SAS is not set
492# CONFIG_SCSI_MPT2SAS is not set
462# CONFIG_SCSI_HPTIOP is not set 493# CONFIG_SCSI_HPTIOP is not set
494# CONFIG_LIBFC is not set
495# CONFIG_FCOE is not set
463# CONFIG_SCSI_DMX3191D is not set 496# CONFIG_SCSI_DMX3191D is not set
464# CONFIG_SCSI_FUTURE_DOMAIN is not set 497# CONFIG_SCSI_FUTURE_DOMAIN is not set
465# CONFIG_SCSI_IPS is not set 498# CONFIG_SCSI_IPS is not set
@@ -478,6 +511,7 @@ CONFIG_SCSI_LOWLEVEL=y
478# CONFIG_SCSI_DEBUG is not set 511# CONFIG_SCSI_DEBUG is not set
479# CONFIG_SCSI_SRP is not set 512# CONFIG_SCSI_SRP is not set
480# CONFIG_SCSI_DH is not set 513# CONFIG_SCSI_DH is not set
514# CONFIG_SCSI_OSD_INITIATOR is not set
481# CONFIG_ATA is not set 515# CONFIG_ATA is not set
482# CONFIG_MD is not set 516# CONFIG_MD is not set
483# CONFIG_FUSION is not set 517# CONFIG_FUSION is not set
@@ -493,6 +527,7 @@ CONFIG_SCSI_LOWLEVEL=y
493# CONFIG_IEEE1394 is not set 527# CONFIG_IEEE1394 is not set
494# CONFIG_I2O is not set 528# CONFIG_I2O is not set
495CONFIG_NETDEVICES=y 529CONFIG_NETDEVICES=y
530CONFIG_COMPAT_NET_DEV_OPS=y
496# CONFIG_DUMMY is not set 531# CONFIG_DUMMY is not set
497# CONFIG_BONDING is not set 532# CONFIG_BONDING is not set
498# CONFIG_MACVLAN is not set 533# CONFIG_MACVLAN is not set
@@ -510,7 +545,10 @@ CONFIG_NET_ETHERNET=y
510# CONFIG_CASSINI is not set 545# CONFIG_CASSINI is not set
511# CONFIG_NET_VENDOR_3COM is not set 546# CONFIG_NET_VENDOR_3COM is not set
512# CONFIG_SMC91X is not set 547# CONFIG_SMC91X is not set
548# CONFIG_ETHOC is not set
513# CONFIG_SMC911X is not set 549# CONFIG_SMC911X is not set
550# CONFIG_SMSC911X is not set
551# CONFIG_DNET is not set
514# CONFIG_NET_TULIP is not set 552# CONFIG_NET_TULIP is not set
515# CONFIG_HP100 is not set 553# CONFIG_HP100 is not set
516# CONFIG_IBM_NEW_EMAC_ZMII is not set 554# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -543,9 +581,11 @@ CONFIG_NETDEV_1000=y
543# CONFIG_QLA3XXX is not set 581# CONFIG_QLA3XXX is not set
544# CONFIG_ATL1 is not set 582# CONFIG_ATL1 is not set
545# CONFIG_ATL1E is not set 583# CONFIG_ATL1E is not set
584# CONFIG_ATL1C is not set
546# CONFIG_JME is not set 585# CONFIG_JME is not set
547CONFIG_NETDEV_10000=y 586CONFIG_NETDEV_10000=y
548# CONFIG_CHELSIO_T1 is not set 587# CONFIG_CHELSIO_T1 is not set
588CONFIG_CHELSIO_T3_DEPENDS=y
549# CONFIG_CHELSIO_T3 is not set 589# CONFIG_CHELSIO_T3 is not set
550# CONFIG_ENIC is not set 590# CONFIG_ENIC is not set
551# CONFIG_IXGBE is not set 591# CONFIG_IXGBE is not set
@@ -554,11 +594,13 @@ CONFIG_NETDEV_10000=y
554# CONFIG_MYRI10GE is not set 594# CONFIG_MYRI10GE is not set
555# CONFIG_NETXEN_NIC is not set 595# CONFIG_NETXEN_NIC is not set
556# CONFIG_NIU is not set 596# CONFIG_NIU is not set
597# CONFIG_MLX4_EN is not set
557# CONFIG_MLX4_CORE is not set 598# CONFIG_MLX4_CORE is not set
558# CONFIG_TEHUTI is not set 599# CONFIG_TEHUTI is not set
559# CONFIG_BNX2X is not set 600# CONFIG_BNX2X is not set
560# CONFIG_QLGE is not set 601# CONFIG_QLGE is not set
561# CONFIG_SFC is not set 602# CONFIG_SFC is not set
603# CONFIG_BE2NET is not set
562# CONFIG_TR is not set 604# CONFIG_TR is not set
563 605
564# 606#
@@ -566,7 +608,10 @@ CONFIG_NETDEV_10000=y
566# 608#
567# CONFIG_WLAN_PRE80211 is not set 609# CONFIG_WLAN_PRE80211 is not set
568# CONFIG_WLAN_80211 is not set 610# CONFIG_WLAN_80211 is not set
569# CONFIG_IWLWIFI_LEDS is not set 611
612#
613# Enable WiMAX (Networking options) to see the WiMAX drivers
614#
570# CONFIG_WAN is not set 615# CONFIG_WAN is not set
571# CONFIG_FDDI is not set 616# CONFIG_FDDI is not set
572# CONFIG_HIPPI is not set 617# CONFIG_HIPPI is not set
@@ -636,10 +681,12 @@ CONFIG_DEVKMEM=y
636# CONFIG_SERIAL_SH_SCI is not set 681# CONFIG_SERIAL_SH_SCI is not set
637# CONFIG_SERIAL_JSM is not set 682# CONFIG_SERIAL_JSM is not set
638CONFIG_UNIX98_PTYS=y 683CONFIG_UNIX98_PTYS=y
684# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
639CONFIG_LEGACY_PTYS=y 685CONFIG_LEGACY_PTYS=y
640CONFIG_LEGACY_PTY_COUNT=256 686CONFIG_LEGACY_PTY_COUNT=256
641# CONFIG_IPMI_HANDLER is not set 687# CONFIG_IPMI_HANDLER is not set
642CONFIG_HW_RANDOM=y 688CONFIG_HW_RANDOM=y
689# CONFIG_HW_RANDOM_TIMERIOMEM is not set
643# CONFIG_R3964 is not set 690# CONFIG_R3964 is not set
644# CONFIG_APPLICOM is not set 691# CONFIG_APPLICOM is not set
645# CONFIG_RAW_DRIVER is not set 692# CONFIG_RAW_DRIVER is not set
@@ -700,12 +747,9 @@ CONFIG_I2C_HELPER_AUTO=y
700# Miscellaneous I2C Chip support 747# Miscellaneous I2C Chip support
701# 748#
702# CONFIG_DS1682 is not set 749# CONFIG_DS1682 is not set
703# CONFIG_EEPROM_AT24 is not set
704# CONFIG_EEPROM_LEGACY is not set
705# CONFIG_SENSORS_PCF8574 is not set 750# CONFIG_SENSORS_PCF8574 is not set
706# CONFIG_PCF8575 is not set 751# CONFIG_PCF8575 is not set
707# CONFIG_SENSORS_PCA9539 is not set 752# CONFIG_SENSORS_PCA9539 is not set
708# CONFIG_SENSORS_PCF8591 is not set
709# CONFIG_SENSORS_MAX6875 is not set 753# CONFIG_SENSORS_MAX6875 is not set
710# CONFIG_SENSORS_TSL2550 is not set 754# CONFIG_SENSORS_TSL2550 is not set
711# CONFIG_I2C_DEBUG_CORE is not set 755# CONFIG_I2C_DEBUG_CORE is not set
@@ -725,8 +769,10 @@ CONFIG_HWMON=y
725# CONFIG_SENSORS_ADM1029 is not set 769# CONFIG_SENSORS_ADM1029 is not set
726# CONFIG_SENSORS_ADM1031 is not set 770# CONFIG_SENSORS_ADM1031 is not set
727# CONFIG_SENSORS_ADM9240 is not set 771# CONFIG_SENSORS_ADM9240 is not set
772# CONFIG_SENSORS_ADT7462 is not set
728# CONFIG_SENSORS_ADT7470 is not set 773# CONFIG_SENSORS_ADT7470 is not set
729# CONFIG_SENSORS_ADT7473 is not set 774# CONFIG_SENSORS_ADT7473 is not set
775# CONFIG_SENSORS_ADT7475 is not set
730# CONFIG_SENSORS_ATXP1 is not set 776# CONFIG_SENSORS_ATXP1 is not set
731# CONFIG_SENSORS_DS1621 is not set 777# CONFIG_SENSORS_DS1621 is not set
732# CONFIG_SENSORS_I5K_AMB is not set 778# CONFIG_SENSORS_I5K_AMB is not set
@@ -747,10 +793,14 @@ CONFIG_HWMON=y
747# CONFIG_SENSORS_LM90 is not set 793# CONFIG_SENSORS_LM90 is not set
748# CONFIG_SENSORS_LM92 is not set 794# CONFIG_SENSORS_LM92 is not set
749# CONFIG_SENSORS_LM93 is not set 795# CONFIG_SENSORS_LM93 is not set
796# CONFIG_SENSORS_LTC4215 is not set
797# CONFIG_SENSORS_LTC4245 is not set
798# CONFIG_SENSORS_LM95241 is not set
750# CONFIG_SENSORS_MAX1619 is not set 799# CONFIG_SENSORS_MAX1619 is not set
751# CONFIG_SENSORS_MAX6650 is not set 800# CONFIG_SENSORS_MAX6650 is not set
752# CONFIG_SENSORS_PC87360 is not set 801# CONFIG_SENSORS_PC87360 is not set
753# CONFIG_SENSORS_PC87427 is not set 802# CONFIG_SENSORS_PC87427 is not set
803# CONFIG_SENSORS_PCF8591 is not set
754# CONFIG_SENSORS_SIS5595 is not set 804# CONFIG_SENSORS_SIS5595 is not set
755# CONFIG_SENSORS_DME1737 is not set 805# CONFIG_SENSORS_DME1737 is not set
756# CONFIG_SENSORS_SMSC47M1 is not set 806# CONFIG_SENSORS_SMSC47M1 is not set
@@ -786,11 +836,11 @@ CONFIG_WATCHDOG=y
786# 836#
787# CONFIG_PCIPCWATCHDOG is not set 837# CONFIG_PCIPCWATCHDOG is not set
788# CONFIG_WDTPCI is not set 838# CONFIG_WDTPCI is not set
839CONFIG_SSB_POSSIBLE=y
789 840
790# 841#
791# Sonics Silicon Backplane 842# Sonics Silicon Backplane
792# 843#
793CONFIG_SSB_POSSIBLE=y
794# CONFIG_SSB is not set 844# CONFIG_SSB is not set
795 845
796# 846#
@@ -802,6 +852,8 @@ CONFIG_SSB_POSSIBLE=y
802# CONFIG_MFD_TMIO is not set 852# CONFIG_MFD_TMIO is not set
803# CONFIG_MFD_WM8400 is not set 853# CONFIG_MFD_WM8400 is not set
804# CONFIG_MFD_WM8350_I2C is not set 854# CONFIG_MFD_WM8350_I2C is not set
855# CONFIG_MFD_PCF50633 is not set
856# CONFIG_REGULATOR is not set
805 857
806# 858#
807# Multimedia devices 859# Multimedia devices
@@ -822,7 +874,7 @@ CONFIG_VIDEO_MEDIA=m
822# 874#
823# CONFIG_MEDIA_ATTACH is not set 875# CONFIG_MEDIA_ATTACH is not set
824CONFIG_MEDIA_TUNER=m 876CONFIG_MEDIA_TUNER=m
825# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set 877# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
826CONFIG_MEDIA_TUNER_SIMPLE=m 878CONFIG_MEDIA_TUNER_SIMPLE=m
827CONFIG_MEDIA_TUNER_TDA8290=m 879CONFIG_MEDIA_TUNER_TDA8290=m
828CONFIG_MEDIA_TUNER_TDA9887=m 880CONFIG_MEDIA_TUNER_TDA9887=m
@@ -831,6 +883,7 @@ CONFIG_MEDIA_TUNER_TEA5767=m
831CONFIG_MEDIA_TUNER_MT20XX=m 883CONFIG_MEDIA_TUNER_MT20XX=m
832CONFIG_MEDIA_TUNER_XC2028=m 884CONFIG_MEDIA_TUNER_XC2028=m
833CONFIG_MEDIA_TUNER_XC5000=m 885CONFIG_MEDIA_TUNER_XC5000=m
886CONFIG_MEDIA_TUNER_MC44S803=m
834CONFIG_VIDEO_V4L2=m 887CONFIG_VIDEO_V4L2=m
835CONFIG_VIDEO_V4L1=m 888CONFIG_VIDEO_V4L1=m
836CONFIG_VIDEO_CAPTURE_DRIVERS=y 889CONFIG_VIDEO_CAPTURE_DRIVERS=y
@@ -853,6 +906,7 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
853# CONFIG_VIDEO_CAFE_CCIC is not set 906# CONFIG_VIDEO_CAFE_CCIC is not set
854# CONFIG_SOC_CAMERA is not set 907# CONFIG_SOC_CAMERA is not set
855# CONFIG_RADIO_ADAPTERS is not set 908# CONFIG_RADIO_ADAPTERS is not set
909# CONFIG_DVB_DYNAMIC_MINORS is not set
856CONFIG_DVB_CAPTURE_DRIVERS=y 910CONFIG_DVB_CAPTURE_DRIVERS=y
857 911
858# 912#
@@ -884,89 +938,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
884# 938#
885# Supported DVB Frontends 939# Supported DVB Frontends
886# 940#
887
888#
889# Customise DVB Frontends
890#
891# CONFIG_DVB_FE_CUSTOMISE is not set 941# CONFIG_DVB_FE_CUSTOMISE is not set
892
893#
894# DVB-S (satellite) frontends
895#
896# CONFIG_DVB_CX24110 is not set
897# CONFIG_DVB_CX24123 is not set
898# CONFIG_DVB_MT312 is not set
899# CONFIG_DVB_S5H1420 is not set
900# CONFIG_DVB_STV0288 is not set
901# CONFIG_DVB_STB6000 is not set
902# CONFIG_DVB_STV0299 is not set
903# CONFIG_DVB_TDA8083 is not set
904# CONFIG_DVB_TDA10086 is not set
905# CONFIG_DVB_VES1X93 is not set
906# CONFIG_DVB_TUNER_ITD1000 is not set
907# CONFIG_DVB_TDA826X is not set
908# CONFIG_DVB_TUA6100 is not set
909# CONFIG_DVB_CX24116 is not set
910# CONFIG_DVB_SI21XX is not set
911
912#
913# DVB-T (terrestrial) frontends
914#
915# CONFIG_DVB_SP8870 is not set
916# CONFIG_DVB_SP887X is not set
917# CONFIG_DVB_CX22700 is not set
918# CONFIG_DVB_CX22702 is not set
919# CONFIG_DVB_DRX397XD is not set
920# CONFIG_DVB_L64781 is not set
921# CONFIG_DVB_TDA1004X is not set
922# CONFIG_DVB_NXT6000 is not set
923# CONFIG_DVB_MT352 is not set
924# CONFIG_DVB_ZL10353 is not set
925# CONFIG_DVB_DIB3000MB is not set
926# CONFIG_DVB_DIB3000MC is not set
927# CONFIG_DVB_DIB7000M is not set
928# CONFIG_DVB_DIB7000P is not set
929# CONFIG_DVB_TDA10048 is not set
930
931#
932# DVB-C (cable) frontends
933#
934# CONFIG_DVB_VES1820 is not set
935# CONFIG_DVB_TDA10021 is not set
936# CONFIG_DVB_TDA10023 is not set
937# CONFIG_DVB_STV0297 is not set
938
939#
940# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
941#
942# CONFIG_DVB_NXT200X is not set
943# CONFIG_DVB_OR51211 is not set
944# CONFIG_DVB_OR51132 is not set
945# CONFIG_DVB_BCM3510 is not set
946# CONFIG_DVB_LGDT330X is not set
947# CONFIG_DVB_S5H1409 is not set
948# CONFIG_DVB_AU8522 is not set
949# CONFIG_DVB_S5H1411 is not set
950
951#
952# Digital terrestrial only tuners/PLL
953#
954# CONFIG_DVB_PLL is not set
955# CONFIG_DVB_TUNER_DIB0070 is not set
956
957#
958# SEC control devices for DVB-S
959#
960# CONFIG_DVB_LNBP21 is not set
961# CONFIG_DVB_ISL6405 is not set
962# CONFIG_DVB_ISL6421 is not set
963# CONFIG_DVB_LGS8GL5 is not set
964
965#
966# Tools to develop new frontends
967#
968# CONFIG_DVB_DUMMY_FE is not set
969# CONFIG_DVB_AF9013 is not set
970CONFIG_DAB=y 942CONFIG_DAB=y
971 943
972# 944#
@@ -979,15 +951,16 @@ CONFIG_FB=y
979CONFIG_FIRMWARE_EDID=y 951CONFIG_FIRMWARE_EDID=y
980# CONFIG_FB_DDC is not set 952# CONFIG_FB_DDC is not set
981# CONFIG_FB_BOOT_VESA_SUPPORT is not set 953# CONFIG_FB_BOOT_VESA_SUPPORT is not set
982CONFIG_FB_CFB_FILLRECT=m 954# CONFIG_FB_CFB_FILLRECT is not set
983CONFIG_FB_CFB_COPYAREA=m 955# CONFIG_FB_CFB_COPYAREA is not set
984CONFIG_FB_CFB_IMAGEBLIT=m 956# CONFIG_FB_CFB_IMAGEBLIT is not set
985# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set 957# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
986# CONFIG_FB_SYS_FILLRECT is not set 958CONFIG_FB_SYS_FILLRECT=m
987# CONFIG_FB_SYS_COPYAREA is not set 959CONFIG_FB_SYS_COPYAREA=m
988# CONFIG_FB_SYS_IMAGEBLIT is not set 960CONFIG_FB_SYS_IMAGEBLIT=m
989# CONFIG_FB_FOREIGN_ENDIAN is not set 961# CONFIG_FB_FOREIGN_ENDIAN is not set
990# CONFIG_FB_SYS_FOPS is not set 962CONFIG_FB_SYS_FOPS=m
963CONFIG_FB_DEFERRED_IO=y
991# CONFIG_FB_SVGALIB is not set 964# CONFIG_FB_SVGALIB is not set
992# CONFIG_FB_MACMODES is not set 965# CONFIG_FB_MACMODES is not set
993# CONFIG_FB_BACKLIGHT is not set 966# CONFIG_FB_BACKLIGHT is not set
@@ -1025,6 +998,8 @@ CONFIG_FB_MODE_HELPERS=y
1025CONFIG_FB_SH_MOBILE_LCDC=m 998CONFIG_FB_SH_MOBILE_LCDC=m
1026# CONFIG_FB_VIRTUAL is not set 999# CONFIG_FB_VIRTUAL is not set
1027# CONFIG_FB_METRONOME is not set 1000# CONFIG_FB_METRONOME is not set
1001# CONFIG_FB_MB862XX is not set
1002# CONFIG_FB_BROADSHEET is not set
1028# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1003# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1029 1004
1030# 1005#
@@ -1081,9 +1056,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1081# 1056#
1082 1057
1083# 1058#
1084# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1059# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1085# 1060#
1086# CONFIG_USB_GADGET is not set 1061# CONFIG_USB_GADGET is not set
1062
1063#
1064# OTG and related infrastructure
1065#
1066# CONFIG_UWB is not set
1087# CONFIG_MMC is not set 1067# CONFIG_MMC is not set
1088# CONFIG_MEMSTICK is not set 1068# CONFIG_MEMSTICK is not set
1089# CONFIG_NEW_LEDS is not set 1069# CONFIG_NEW_LEDS is not set
@@ -1091,6 +1071,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1091# CONFIG_INFINIBAND is not set 1071# CONFIG_INFINIBAND is not set
1092# CONFIG_RTC_CLASS is not set 1072# CONFIG_RTC_CLASS is not set
1093# CONFIG_DMADEVICES is not set 1073# CONFIG_DMADEVICES is not set
1074# CONFIG_AUXDISPLAY is not set
1094# CONFIG_UIO is not set 1075# CONFIG_UIO is not set
1095# CONFIG_STAGING is not set 1076# CONFIG_STAGING is not set
1096 1077
@@ -1114,6 +1095,7 @@ CONFIG_FS_MBCACHE=y
1114CONFIG_FILE_LOCKING=y 1095CONFIG_FILE_LOCKING=y
1115# CONFIG_XFS_FS is not set 1096# CONFIG_XFS_FS is not set
1116# CONFIG_OCFS2_FS is not set 1097# CONFIG_OCFS2_FS is not set
1098# CONFIG_BTRFS_FS is not set
1117CONFIG_DNOTIFY=y 1099CONFIG_DNOTIFY=y
1118CONFIG_INOTIFY=y 1100CONFIG_INOTIFY=y
1119CONFIG_INOTIFY_USER=y 1101CONFIG_INOTIFY_USER=y
@@ -1148,10 +1130,7 @@ CONFIG_TMPFS=y
1148CONFIG_HUGETLBFS=y 1130CONFIG_HUGETLBFS=y
1149CONFIG_HUGETLB_PAGE=y 1131CONFIG_HUGETLB_PAGE=y
1150# CONFIG_CONFIGFS_FS is not set 1132# CONFIG_CONFIGFS_FS is not set
1151 1133CONFIG_MISC_FILESYSTEMS=y
1152#
1153# Miscellaneous filesystems
1154#
1155# CONFIG_ADFS_FS is not set 1134# CONFIG_ADFS_FS is not set
1156# CONFIG_AFFS_FS is not set 1135# CONFIG_AFFS_FS is not set
1157# CONFIG_HFS_FS is not set 1136# CONFIG_HFS_FS is not set
@@ -1160,6 +1139,7 @@ CONFIG_HUGETLB_PAGE=y
1160# CONFIG_BFS_FS is not set 1139# CONFIG_BFS_FS is not set
1161# CONFIG_EFS_FS is not set 1140# CONFIG_EFS_FS is not set
1162# CONFIG_CRAMFS is not set 1141# CONFIG_CRAMFS is not set
1142# CONFIG_SQUASHFS is not set
1163# CONFIG_VXFS_FS is not set 1143# CONFIG_VXFS_FS is not set
1164CONFIG_MINIX_FS=y 1144CONFIG_MINIX_FS=y
1165# CONFIG_OMFS_FS is not set 1145# CONFIG_OMFS_FS is not set
@@ -1179,7 +1159,6 @@ CONFIG_LOCKD=y
1179CONFIG_LOCKD_V4=y 1159CONFIG_LOCKD_V4=y
1180CONFIG_NFS_COMMON=y 1160CONFIG_NFS_COMMON=y
1181CONFIG_SUNRPC=y 1161CONFIG_SUNRPC=y
1182# CONFIG_SUNRPC_REGISTER_V4 is not set
1183# CONFIG_RPCSEC_GSS_KRB5 is not set 1162# CONFIG_RPCSEC_GSS_KRB5 is not set
1184# CONFIG_RPCSEC_GSS_SPKM3 is not set 1163# CONFIG_RPCSEC_GSS_SPKM3 is not set
1185# CONFIG_SMB_FS is not set 1164# CONFIG_SMB_FS is not set
@@ -1252,6 +1231,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1252# CONFIG_DEBUG_MEMORY_INIT is not set 1231# CONFIG_DEBUG_MEMORY_INIT is not set
1253# CONFIG_DEBUG_LIST is not set 1232# CONFIG_DEBUG_LIST is not set
1254# CONFIG_DEBUG_SG is not set 1233# CONFIG_DEBUG_SG is not set
1234# CONFIG_DEBUG_NOTIFIERS is not set
1255CONFIG_FRAME_POINTER=y 1235CONFIG_FRAME_POINTER=y
1256# CONFIG_RCU_TORTURE_TEST is not set 1236# CONFIG_RCU_TORTURE_TEST is not set
1257# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1237# CONFIG_RCU_CPU_STALL_DETECTOR is not set
@@ -1260,17 +1240,25 @@ CONFIG_FRAME_POINTER=y
1260# CONFIG_FAULT_INJECTION is not set 1240# CONFIG_FAULT_INJECTION is not set
1261# CONFIG_LATENCYTOP is not set 1241# CONFIG_LATENCYTOP is not set
1262# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1242# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1263# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1243# CONFIG_PAGE_POISONING is not set
1244
1245#
1246# Tracers
1247#
1248# CONFIG_SCHED_TRACER is not set
1249# CONFIG_CONTEXT_SWITCH_TRACER is not set
1250# CONFIG_BOOT_TRACER is not set
1251# CONFIG_TRACE_BRANCH_PROFILING is not set
1252# CONFIG_DYNAMIC_DEBUG is not set
1264# CONFIG_SAMPLES is not set 1253# CONFIG_SAMPLES is not set
1265# CONFIG_EARLY_SCIF_CONSOLE is not set 1254# CONFIG_EARLY_SCIF_CONSOLE is not set
1266# CONFIG_DEBUG_BOOTMEM is not set 1255# CONFIG_DEBUG_BOOTMEM is not set
1267# CONFIG_DEBUG_STACK_USAGE is not set 1256# CONFIG_DEBUG_STACK_USAGE is not set
1268# CONFIG_4KSTACKS is not set 1257# CONFIG_4KSTACKS is not set
1269CONFIG_SH64_PROC_ASIDS=y 1258# CONFIG_SH_NO_BSS_INIT is not set
1259# CONFIG_MORE_COMPILE_OPTIONS is not set
1270CONFIG_SH64_SR_WATCH=y 1260CONFIG_SH64_SR_WATCH=y
1271# CONFIG_POOR_MANS_STRACE is not set 1261# CONFIG_POOR_MANS_STRACE is not set
1272# CONFIG_SH_ALPHANUMERIC is not set
1273# CONFIG_SH_NO_BSS_INIT is not set
1274 1262
1275# 1263#
1276# Security options 1264# Security options
@@ -1286,6 +1274,7 @@ CONFIG_CRYPTO=y
1286# 1274#
1287# CONFIG_CRYPTO_FIPS is not set 1275# CONFIG_CRYPTO_FIPS is not set
1288# CONFIG_CRYPTO_MANAGER is not set 1276# CONFIG_CRYPTO_MANAGER is not set
1277# CONFIG_CRYPTO_MANAGER2 is not set
1289# CONFIG_CRYPTO_GF128MUL is not set 1278# CONFIG_CRYPTO_GF128MUL is not set
1290# CONFIG_CRYPTO_NULL is not set 1279# CONFIG_CRYPTO_NULL is not set
1291# CONFIG_CRYPTO_CRYPTD is not set 1280# CONFIG_CRYPTO_CRYPTD is not set
@@ -1356,6 +1345,7 @@ CONFIG_CRYPTO=y
1356# Compression 1345# Compression
1357# 1346#
1358# CONFIG_CRYPTO_DEFLATE is not set 1347# CONFIG_CRYPTO_DEFLATE is not set
1348# CONFIG_CRYPTO_ZLIB is not set
1359# CONFIG_CRYPTO_LZO is not set 1349# CONFIG_CRYPTO_LZO is not set
1360 1350
1361# 1351#
@@ -1369,6 +1359,7 @@ CONFIG_CRYPTO_HW=y
1369# Library routines 1359# Library routines
1370# 1360#
1371CONFIG_BITREVERSE=y 1361CONFIG_BITREVERSE=y
1362CONFIG_GENERIC_FIND_LAST_BIT=y
1372# CONFIG_CRC_CCITT is not set 1363# CONFIG_CRC_CCITT is not set
1373# CONFIG_CRC16 is not set 1364# CONFIG_CRC16 is not set
1374# CONFIG_CRC_T10DIF is not set 1365# CONFIG_CRC_T10DIF is not set
@@ -1376,7 +1367,7 @@ CONFIG_BITREVERSE=y
1376CONFIG_CRC32=y 1367CONFIG_CRC32=y
1377# CONFIG_CRC7 is not set 1368# CONFIG_CRC7 is not set
1378# CONFIG_LIBCRC32C is not set 1369# CONFIG_LIBCRC32C is not set
1379CONFIG_PLIST=y
1380CONFIG_HAS_IOMEM=y 1370CONFIG_HAS_IOMEM=y
1381CONFIG_HAS_IOPORT=y 1371CONFIG_HAS_IOPORT=y
1382CONFIG_HAS_DMA=y 1372CONFIG_HAS_DMA=y
1373CONFIG_NLATTR=y
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 2d86e0487517..5c1123640142 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 16:54:55 2009 4# Thu Apr 2 17:51:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -44,10 +45,19 @@ CONFIG_BSD_PROCESS_ACCT=y
44# CONFIG_BSD_PROCESS_ACCT_V3 is not set 45# CONFIG_BSD_PROCESS_ACCT_V3 is not set
45# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
47# CONFIG_IKCONFIG is not set 57# CONFIG_IKCONFIG is not set
48CONFIG_LOG_BUF_SHIFT=14 58CONFIG_LOG_BUF_SHIFT=14
49# CONFIG_CGROUPS is not set
50# CONFIG_GROUP_SCHED is not set 59# CONFIG_GROUP_SCHED is not set
60# CONFIG_CGROUPS is not set
51CONFIG_SYSFS_DEPRECATED=y 61CONFIG_SYSFS_DEPRECATED=y
52CONFIG_SYSFS_DEPRECATED_V2=y 62CONFIG_SYSFS_DEPRECATED_V2=y
53# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
@@ -55,6 +65,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
55# CONFIG_BLK_DEV_INITRD is not set 65# CONFIG_BLK_DEV_INITRD is not set
56CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
57CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
58CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
59CONFIG_UID16=y 70CONFIG_UID16=y
60# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
@@ -64,10 +75,8 @@ CONFIG_HOTPLUG=y
64CONFIG_PRINTK=y 75CONFIG_PRINTK=y
65CONFIG_BUG=y 76CONFIG_BUG=y
66CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
67CONFIG_COMPAT_BRK=y
68CONFIG_BASE_FULL=y 78CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y 79CONFIG_FUTEX=y
70CONFIG_ANON_INODES=y
71CONFIG_EPOLL=y 80CONFIG_EPOLL=y
72CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
73CONFIG_TIMERFD=y 82CONFIG_TIMERFD=y
@@ -76,6 +85,7 @@ CONFIG_SHMEM=y
76CONFIG_AIO=y 85CONFIG_AIO=y
77CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
78CONFIG_PCI_QUIRKS=y 87CONFIG_PCI_QUIRKS=y
88CONFIG_COMPAT_BRK=y
79CONFIG_SLAB=y 89CONFIG_SLAB=y
80# CONFIG_SLUB is not set 90# CONFIG_SLUB is not set
81# CONFIG_SLOB is not set 91# CONFIG_SLOB is not set
@@ -116,11 +126,6 @@ CONFIG_DEFAULT_AS=y
116# CONFIG_DEFAULT_CFQ is not set 126# CONFIG_DEFAULT_CFQ is not set
117# CONFIG_DEFAULT_NOOP is not set 127# CONFIG_DEFAULT_NOOP is not set
118CONFIG_DEFAULT_IOSCHED="anticipatory" 128CONFIG_DEFAULT_IOSCHED="anticipatory"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
125 130
126# 131#
@@ -155,6 +160,7 @@ CONFIG_CPU_SUBTYPE_SH7091=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 160# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 161# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 162# CONFIG_CPU_SUBTYPE_SH7785 is not set
163# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 164# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 165# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 166# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -202,11 +208,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
202CONFIG_ZONE_DMA_FLAG=0 208CONFIG_ZONE_DMA_FLAG=0
203CONFIG_NR_QUICK=2 209CONFIG_NR_QUICK=2
204CONFIG_UNEVICTABLE_LRU=y 210CONFIG_UNEVICTABLE_LRU=y
211CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y
205 213
206# 214#
207# Cache configuration 215# Cache configuration
208# 216#
209# CONFIG_SH_DIRECT_MAPPED is not set
210CONFIG_CACHE_WRITEBACK=y 217CONFIG_CACHE_WRITEBACK=y
211# CONFIG_CACHE_WRITETHROUGH is not set 218# CONFIG_CACHE_WRITETHROUGH is not set
212# CONFIG_CACHE_OFF is not set 219# CONFIG_CACHE_OFF is not set
@@ -263,9 +270,12 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
263# 270#
264CONFIG_SH_DMA_API=y 271CONFIG_SH_DMA_API=y
265CONFIG_SH_DMA=y 272CONFIG_SH_DMA=y
266CONFIG_NR_ONCHIP_DMA_CHANNELS=4 273CONFIG_SH_DMA_IRQ_MULTI=y
274CONFIG_NR_ONCHIP_DMA_CHANNELS=6
267CONFIG_NR_DMA_CHANNELS_BOOL=y 275CONFIG_NR_DMA_CHANNELS_BOOL=y
268CONFIG_NR_DMA_CHANNELS=9 276CONFIG_NR_DMA_CHANNELS=9
277# CONFIG_PVR2_DMA is not set
278# CONFIG_G2_DMA is not set
269 279
270# 280#
271# Companion Chips 281# Companion Chips
@@ -314,6 +324,8 @@ CONFIG_PCI_AUTO=y
314# CONFIG_PCIEPORTBUS is not set 324# CONFIG_PCIEPORTBUS is not set
315# CONFIG_ARCH_SUPPORTS_MSI is not set 325# CONFIG_ARCH_SUPPORTS_MSI is not set
316CONFIG_PCI_LEGACY=y 326CONFIG_PCI_LEGACY=y
327# CONFIG_PCI_STUB is not set
328# CONFIG_PCI_IOV is not set
317# CONFIG_PCCARD is not set 329# CONFIG_PCCARD is not set
318# CONFIG_HOTPLUG_PCI is not set 330# CONFIG_HOTPLUG_PCI is not set
319 331
@@ -335,7 +347,6 @@ CONFIG_NET=y
335# 347#
336# Networking options 348# Networking options
337# 349#
338CONFIG_COMPAT_NET_DEV_OPS=y
339CONFIG_PACKET=y 350CONFIG_PACKET=y
340# CONFIG_PACKET_MMAP is not set 351# CONFIG_PACKET_MMAP is not set
341CONFIG_UNIX=y 352CONFIG_UNIX=y
@@ -387,6 +398,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
387# CONFIG_LAPB is not set 398# CONFIG_LAPB is not set
388# CONFIG_ECONET is not set 399# CONFIG_ECONET is not set
389# CONFIG_WAN_ROUTER is not set 400# CONFIG_WAN_ROUTER is not set
401# CONFIG_PHONET is not set
390# CONFIG_NET_SCHED is not set 402# CONFIG_NET_SCHED is not set
391# CONFIG_DCB is not set 403# CONFIG_DCB is not set
392 404
@@ -399,13 +411,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
399# CONFIG_IRDA is not set 411# CONFIG_IRDA is not set
400# CONFIG_BT is not set 412# CONFIG_BT is not set
401# CONFIG_AF_RXRPC is not set 413# CONFIG_AF_RXRPC is not set
402# CONFIG_PHONET is not set
403CONFIG_WIRELESS=y 414CONFIG_WIRELESS=y
404# CONFIG_CFG80211 is not set 415# CONFIG_CFG80211 is not set
405# CONFIG_WIRELESS_OLD_REGULATORY is not set 416# CONFIG_WIRELESS_OLD_REGULATORY is not set
406# CONFIG_WIRELESS_EXT is not set 417# CONFIG_WIRELESS_EXT is not set
407# CONFIG_LIB80211 is not set 418# CONFIG_LIB80211 is not set
408# CONFIG_MAC80211 is not set 419# CONFIG_MAC80211 is not set
420# CONFIG_WIMAX is not set
409# CONFIG_RFKILL is not set 421# CONFIG_RFKILL is not set
410# CONFIG_NET_9P is not set 422# CONFIG_NET_9P is not set
411 423
@@ -439,12 +451,16 @@ CONFIG_GDROM=y
439# CONFIG_BLK_DEV_HD is not set 451# CONFIG_BLK_DEV_HD is not set
440CONFIG_MISC_DEVICES=y 452CONFIG_MISC_DEVICES=y
441# CONFIG_PHANTOM is not set 453# CONFIG_PHANTOM is not set
442# CONFIG_EEPROM_93CX6 is not set
443# CONFIG_SGI_IOC4 is not set 454# CONFIG_SGI_IOC4 is not set
444# CONFIG_TIFM_CORE is not set 455# CONFIG_TIFM_CORE is not set
445# CONFIG_ENCLOSURE_SERVICES is not set 456# CONFIG_ENCLOSURE_SERVICES is not set
446# CONFIG_HP_ILO is not set 457# CONFIG_HP_ILO is not set
447# CONFIG_C2PORT is not set 458# CONFIG_C2PORT is not set
459
460#
461# EEPROM support
462#
463# CONFIG_EEPROM_93CX6 is not set
448CONFIG_HAVE_IDE=y 464CONFIG_HAVE_IDE=y
449# CONFIG_IDE is not set 465# CONFIG_IDE is not set
450 466
@@ -470,6 +486,7 @@ CONFIG_HAVE_IDE=y
470# CONFIG_IEEE1394 is not set 486# CONFIG_IEEE1394 is not set
471# CONFIG_I2O is not set 487# CONFIG_I2O is not set
472CONFIG_NETDEVICES=y 488CONFIG_NETDEVICES=y
489CONFIG_COMPAT_NET_DEV_OPS=y
473# CONFIG_DUMMY is not set 490# CONFIG_DUMMY is not set
474# CONFIG_BONDING is not set 491# CONFIG_BONDING is not set
475# CONFIG_MACVLAN is not set 492# CONFIG_MACVLAN is not set
@@ -487,8 +504,10 @@ CONFIG_MII=y
487# CONFIG_CASSINI is not set 504# CONFIG_CASSINI is not set
488# CONFIG_NET_VENDOR_3COM is not set 505# CONFIG_NET_VENDOR_3COM is not set
489# CONFIG_SMC91X is not set 506# CONFIG_SMC91X is not set
507# CONFIG_ETHOC is not set
490# CONFIG_SMC911X is not set 508# CONFIG_SMC911X is not set
491# CONFIG_SMSC911X is not set 509# CONFIG_SMSC911X is not set
510# CONFIG_DNET is not set
492# CONFIG_NET_TULIP is not set 511# CONFIG_NET_TULIP is not set
493# CONFIG_HP100 is not set 512# CONFIG_HP100 is not set
494# CONFIG_IBM_NEW_EMAC_ZMII is not set 513# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -532,7 +551,10 @@ CONFIG_8139TOO=y
532# 551#
533# CONFIG_WLAN_PRE80211 is not set 552# CONFIG_WLAN_PRE80211 is not set
534# CONFIG_WLAN_80211 is not set 553# CONFIG_WLAN_80211 is not set
535# CONFIG_IWLWIFI_LEDS is not set 554
555#
556# Enable WiMAX (Networking options) to see the WiMAX drivers
557#
536# CONFIG_WAN is not set 558# CONFIG_WAN is not set
537# CONFIG_FDDI is not set 559# CONFIG_FDDI is not set
538# CONFIG_HIPPI is not set 560# CONFIG_HIPPI is not set
@@ -628,6 +650,7 @@ CONFIG_LEGACY_PTYS=y
628CONFIG_LEGACY_PTY_COUNT=256 650CONFIG_LEGACY_PTY_COUNT=256
629# CONFIG_IPMI_HANDLER is not set 651# CONFIG_IPMI_HANDLER is not set
630CONFIG_HW_RANDOM=y 652CONFIG_HW_RANDOM=y
653# CONFIG_HW_RANDOM_TIMERIOMEM is not set
631# CONFIG_R3964 is not set 654# CONFIG_R3964 is not set
632# CONFIG_APPLICOM is not set 655# CONFIG_APPLICOM is not set
633# CONFIG_RAW_DRIVER is not set 656# CONFIG_RAW_DRIVER is not set
@@ -746,6 +769,7 @@ CONFIG_FB_PVR2=y
746# CONFIG_FB_VIRTUAL is not set 769# CONFIG_FB_VIRTUAL is not set
747# CONFIG_FB_METRONOME is not set 770# CONFIG_FB_METRONOME is not set
748# CONFIG_FB_MB862XX is not set 771# CONFIG_FB_MB862XX is not set
772# CONFIG_FB_BROADSHEET is not set
749# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 773# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
750 774
751# 775#
@@ -802,9 +826,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
802# 826#
803 827
804# 828#
805# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 829# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
806# 830#
807# CONFIG_USB_GADGET is not set 831# CONFIG_USB_GADGET is not set
832
833#
834# OTG and related infrastructure
835#
808# CONFIG_UWB is not set 836# CONFIG_UWB is not set
809# CONFIG_MMC is not set 837# CONFIG_MMC is not set
810# CONFIG_MEMSTICK is not set 838# CONFIG_MEMSTICK is not set
@@ -813,6 +841,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
813# CONFIG_INFINIBAND is not set 841# CONFIG_INFINIBAND is not set
814# CONFIG_RTC_CLASS is not set 842# CONFIG_RTC_CLASS is not set
815# CONFIG_DMADEVICES is not set 843# CONFIG_DMADEVICES is not set
844# CONFIG_AUXDISPLAY is not set
816# CONFIG_UIO is not set 845# CONFIG_UIO is not set
817# CONFIG_STAGING is not set 846# CONFIG_STAGING is not set
818 847
@@ -828,6 +857,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
828CONFIG_FILE_LOCKING=y 857CONFIG_FILE_LOCKING=y
829# CONFIG_XFS_FS is not set 858# CONFIG_XFS_FS is not set
830# CONFIG_OCFS2_FS is not set 859# CONFIG_OCFS2_FS is not set
860# CONFIG_BTRFS_FS is not set
831# CONFIG_DNOTIFY is not set 861# CONFIG_DNOTIFY is not set
832CONFIG_INOTIFY=y 862CONFIG_INOTIFY=y
833CONFIG_INOTIFY_USER=y 863CONFIG_INOTIFY_USER=y
@@ -871,6 +901,7 @@ CONFIG_MISC_FILESYSTEMS=y
871# CONFIG_BFS_FS is not set 901# CONFIG_BFS_FS is not set
872# CONFIG_EFS_FS is not set 902# CONFIG_EFS_FS is not set
873# CONFIG_CRAMFS is not set 903# CONFIG_CRAMFS is not set
904# CONFIG_SQUASHFS is not set
874# CONFIG_VXFS_FS is not set 905# CONFIG_VXFS_FS is not set
875# CONFIG_MINIX_FS is not set 906# CONFIG_MINIX_FS is not set
876# CONFIG_OMFS_FS is not set 907# CONFIG_OMFS_FS is not set
@@ -920,7 +951,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
920# 951#
921# Tracers 952# Tracers
922# 953#
923# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
924# CONFIG_SAMPLES is not set 954# CONFIG_SAMPLES is not set
925CONFIG_HAVE_ARCH_KGDB=y 955CONFIG_HAVE_ARCH_KGDB=y
926# CONFIG_SH_STANDARD_BIOS is not set 956# CONFIG_SH_STANDARD_BIOS is not set
@@ -1012,6 +1042,7 @@ CONFIG_CRYPTO=y
1012# Compression 1042# Compression
1013# 1043#
1014# CONFIG_CRYPTO_DEFLATE is not set 1044# CONFIG_CRYPTO_DEFLATE is not set
1045# CONFIG_CRYPTO_ZLIB is not set
1015# CONFIG_CRYPTO_LZO is not set 1046# CONFIG_CRYPTO_LZO is not set
1016 1047
1017# 1048#
@@ -1033,7 +1064,7 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1033CONFIG_CRC32=y 1064CONFIG_CRC32=y
1034# CONFIG_CRC7 is not set 1065# CONFIG_CRC7 is not set
1035# CONFIG_LIBCRC32C is not set 1066# CONFIG_LIBCRC32C is not set
1036CONFIG_PLIST=y
1037CONFIG_HAS_IOMEM=y 1067CONFIG_HAS_IOMEM=y
1038CONFIG_HAS_IOPORT=y 1068CONFIG_HAS_IOPORT=y
1039CONFIG_HAS_DMA=y 1069CONFIG_HAS_DMA=y
1070CONFIG_NLATTR=y
diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk7705_defconfig
index 461bfb350221..f4c34b039312 100644
--- a/arch/sh/configs/edosk7705_defconfig
+++ b/arch/sh/configs/edosk7705_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 16:55:29 2009 4# Thu Apr 2 17:54:02 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,13 +16,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y 16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_CLOCKEVENTS=y 17CONFIG_GENERIC_CLOCKEVENTS=y
18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
19# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 19CONFIG_ARCH_HIBERNATION_POSSIBLE=y
20CONFIG_STACKTRACE_SUPPORT=y 20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y 21CONFIG_LOCKDEP_SUPPORT=y
22CONFIG_HAVE_LATENCYTOP_SUPPORT=y 22CONFIG_HAVE_LATENCYTOP_SUPPORT=y
23# CONFIG_ARCH_HAS_ILOG2_U32 is not set 23# CONFIG_ARCH_HAS_ILOG2_U32 is not set
24# CONFIG_ARCH_HAS_ILOG2_U64 is not set 24# CONFIG_ARCH_HAS_ILOG2_U64 is not set
25CONFIG_ARCH_NO_VIRT_TO_BUS=y 25CONFIG_ARCH_NO_VIRT_TO_BUS=y
26CONFIG_ARCH_HAS_DEFAULT_IDLE=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27 28
28# 29#
@@ -35,6 +36,15 @@ CONFIG_LOCALVERSION=""
35# CONFIG_LOCALVERSION_AUTO is not set 36# CONFIG_LOCALVERSION_AUTO is not set
36# CONFIG_SYSVIPC is not set 37# CONFIG_SYSVIPC is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 38# CONFIG_BSD_PROCESS_ACCT is not set
39
40#
41# RCU Subsystem
42#
43CONFIG_CLASSIC_RCU=y
44# CONFIG_TREE_RCU is not set
45# CONFIG_PREEMPT_RCU is not set
46# CONFIG_TREE_RCU_TRACE is not set
47# CONFIG_PREEMPT_RCU_TRACE is not set
38# CONFIG_IKCONFIG is not set 48# CONFIG_IKCONFIG is not set
39CONFIG_LOG_BUF_SHIFT=17 49CONFIG_LOG_BUF_SHIFT=17
40# CONFIG_CGROUPS is not set 50# CONFIG_CGROUPS is not set
@@ -50,7 +60,6 @@ CONFIG_EMBEDDED=y
50# CONFIG_PRINTK is not set 60# CONFIG_PRINTK is not set
51# CONFIG_BUG is not set 61# CONFIG_BUG is not set
52# CONFIG_ELF_CORE is not set 62# CONFIG_ELF_CORE is not set
53# CONFIG_COMPAT_BRK is not set
54# CONFIG_BASE_FULL is not set 63# CONFIG_BASE_FULL is not set
55# CONFIG_FUTEX is not set 64# CONFIG_FUTEX is not set
56# CONFIG_EPOLL is not set 65# CONFIG_EPOLL is not set
@@ -60,6 +69,7 @@ CONFIG_EMBEDDED=y
60CONFIG_SHMEM=y 69CONFIG_SHMEM=y
61# CONFIG_AIO is not set 70# CONFIG_AIO is not set
62# CONFIG_VM_EVENT_COUNTERS is not set 71# CONFIG_VM_EVENT_COUNTERS is not set
72# CONFIG_COMPAT_BRK is not set
63# CONFIG_SLAB is not set 73# CONFIG_SLAB is not set
64CONFIG_SLUB=y 74CONFIG_SLUB=y
65# CONFIG_SLOB is not set 75# CONFIG_SLOB is not set
@@ -74,11 +84,6 @@ CONFIG_HAVE_GENERIC_DMA_COHERENT=y
74CONFIG_BASE_SMALL=1 84CONFIG_BASE_SMALL=1
75# CONFIG_MODULES is not set 85# CONFIG_MODULES is not set
76# CONFIG_BLOCK is not set 86# CONFIG_BLOCK is not set
77CONFIG_CLASSIC_RCU=y
78# CONFIG_TREE_RCU is not set
79# CONFIG_PREEMPT_RCU is not set
80# CONFIG_TREE_RCU_TRACE is not set
81# CONFIG_PREEMPT_RCU_TRACE is not set
82# CONFIG_FREEZER is not set 87# CONFIG_FREEZER is not set
83 88
84# 89#
@@ -113,6 +118,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
113# CONFIG_CPU_SUBTYPE_SH7770 is not set 118# CONFIG_CPU_SUBTYPE_SH7770 is not set
114# CONFIG_CPU_SUBTYPE_SH7780 is not set 119# CONFIG_CPU_SUBTYPE_SH7780 is not set
115# CONFIG_CPU_SUBTYPE_SH7785 is not set 120# CONFIG_CPU_SUBTYPE_SH7785 is not set
121# CONFIG_CPU_SUBTYPE_SH7786 is not set
116# CONFIG_CPU_SUBTYPE_SHX3 is not set 122# CONFIG_CPU_SUBTYPE_SHX3 is not set
117# CONFIG_CPU_SUBTYPE_SH7343 is not set 123# CONFIG_CPU_SUBTYPE_SH7343 is not set
118# CONFIG_CPU_SUBTYPE_SH7722 is not set 124# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -157,12 +163,13 @@ CONFIG_MIGRATION=y
157CONFIG_ZONE_DMA_FLAG=0 163CONFIG_ZONE_DMA_FLAG=0
158CONFIG_NR_QUICK=2 164CONFIG_NR_QUICK=2
159CONFIG_UNEVICTABLE_LRU=y 165CONFIG_UNEVICTABLE_LRU=y
166CONFIG_HAVE_MLOCK=y
167CONFIG_HAVE_MLOCKED_PAGE_BIT=y
160 168
161# 169#
162# Cache configuration 170# Cache configuration
163# 171#
164CONFIG_SH7705_CACHE_32KB=y 172CONFIG_SH7705_CACHE_32KB=y
165# CONFIG_SH_DIRECT_MAPPED is not set
166CONFIG_CACHE_WRITEBACK=y 173CONFIG_CACHE_WRITEBACK=y
167# CONFIG_CACHE_WRITETHROUGH is not set 174# CONFIG_CACHE_WRITETHROUGH is not set
168# CONFIG_CACHE_OFF is not set 175# CONFIG_CACHE_OFF is not set
@@ -243,7 +250,6 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
243# Executable file formats 250# Executable file formats
244# 251#
245CONFIG_BINFMT_ELF=y 252CONFIG_BINFMT_ELF=y
246# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
247# CONFIG_HAVE_AOUT is not set 253# CONFIG_HAVE_AOUT is not set
248# CONFIG_BINFMT_MISC is not set 254# CONFIG_BINFMT_MISC is not set
249# CONFIG_NET is not set 255# CONFIG_NET is not set
@@ -361,6 +367,7 @@ CONFIG_SSB_POSSIBLE=y
361# CONFIG_ACCESSIBILITY is not set 367# CONFIG_ACCESSIBILITY is not set
362# CONFIG_RTC_CLASS is not set 368# CONFIG_RTC_CLASS is not set
363# CONFIG_DMADEVICES is not set 369# CONFIG_DMADEVICES is not set
370# CONFIG_AUXDISPLAY is not set
364# CONFIG_UIO is not set 371# CONFIG_UIO is not set
365# CONFIG_STAGING is not set 372# CONFIG_STAGING is not set
366 373
diff --git a/arch/sh/configs/edosk7760_defconfig b/arch/sh/configs/edosk7760_defconfig
index 14d4b35685a1..7825c2699f18 100644
--- a/arch/sh/configs/edosk7760_defconfig
+++ b/arch/sh/configs/edosk7760_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 16:55:48 2009 4# Thu Apr 2 17:54:57 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -43,34 +44,45 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_BSD_PROCESS_ACCT_V3 is not set 44# CONFIG_BSD_PROCESS_ACCT_V3 is not set
44# CONFIG_TASKSTATS is not set 45# CONFIG_TASKSTATS is not set
45# CONFIG_AUDIT is not set 46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
46CONFIG_IKCONFIG=y 56CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y 57CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=17 58CONFIG_LOG_BUF_SHIFT=17
49# CONFIG_CGROUPS is not set
50# CONFIG_GROUP_SCHED is not set 59# CONFIG_GROUP_SCHED is not set
60# CONFIG_CGROUPS is not set
51CONFIG_SYSFS_DEPRECATED=y 61CONFIG_SYSFS_DEPRECATED=y
52CONFIG_SYSFS_DEPRECATED_V2=y 62CONFIG_SYSFS_DEPRECATED_V2=y
53# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
54# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
55CONFIG_BLK_DEV_INITRD=y 65CONFIG_BLK_DEV_INITRD=y
56CONFIG_INITRAMFS_SOURCE="" 66CONFIG_INITRAMFS_SOURCE=""
67CONFIG_RD_GZIP=y
68# CONFIG_RD_BZIP2 is not set
69# CONFIG_RD_LZMA is not set
70CONFIG_INITRAMFS_COMPRESSION_NONE=y
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 71CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 74CONFIG_EMBEDDED=y
60CONFIG_UID16=y 75CONFIG_UID16=y
61CONFIG_SYSCTL_SYSCALL=y 76CONFIG_SYSCTL_SYSCALL=y
62CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
63CONFIG_KALLSYMS_ALL=y 78CONFIG_KALLSYMS_ALL=y
64CONFIG_KALLSYMS_STRIP_GENERATED=y
65# CONFIG_KALLSYMS_EXTRA_PASS is not set 79# CONFIG_KALLSYMS_EXTRA_PASS is not set
66CONFIG_HOTPLUG=y 80CONFIG_HOTPLUG=y
67CONFIG_PRINTK=y 81CONFIG_PRINTK=y
68CONFIG_BUG=y 82CONFIG_BUG=y
69CONFIG_ELF_CORE=y 83CONFIG_ELF_CORE=y
70CONFIG_COMPAT_BRK=y
71CONFIG_BASE_FULL=y 84CONFIG_BASE_FULL=y
72CONFIG_FUTEX=y 85CONFIG_FUTEX=y
73CONFIG_ANON_INODES=y
74CONFIG_EPOLL=y 86CONFIG_EPOLL=y
75CONFIG_SIGNALFD=y 87CONFIG_SIGNALFD=y
76CONFIG_TIMERFD=y 88CONFIG_TIMERFD=y
@@ -79,6 +91,7 @@ CONFIG_SHMEM=y
79CONFIG_AIO=y 91CONFIG_AIO=y
80CONFIG_VM_EVENT_COUNTERS=y 92CONFIG_VM_EVENT_COUNTERS=y
81CONFIG_SLUB_DEBUG=y 93CONFIG_SLUB_DEBUG=y
94CONFIG_COMPAT_BRK=y
82# CONFIG_SLAB is not set 95# CONFIG_SLAB is not set
83CONFIG_SLUB=y 96CONFIG_SLUB=y
84# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
@@ -118,11 +131,6 @@ CONFIG_IOSCHED_CFQ=y
118CONFIG_DEFAULT_CFQ=y 131CONFIG_DEFAULT_CFQ=y
119# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
120CONFIG_DEFAULT_IOSCHED="cfq" 133CONFIG_DEFAULT_IOSCHED="cfq"
121CONFIG_CLASSIC_RCU=y
122# CONFIG_TREE_RCU is not set
123# CONFIG_PREEMPT_RCU is not set
124# CONFIG_TREE_RCU_TRACE is not set
125# CONFIG_PREEMPT_RCU_TRACE is not set
126# CONFIG_FREEZER is not set 134# CONFIG_FREEZER is not set
127 135
128# 136#
@@ -157,6 +165,7 @@ CONFIG_CPU_SUBTYPE_SH7760=y
157# CONFIG_CPU_SUBTYPE_SH7770 is not set 165# CONFIG_CPU_SUBTYPE_SH7770 is not set
158# CONFIG_CPU_SUBTYPE_SH7780 is not set 166# CONFIG_CPU_SUBTYPE_SH7780 is not set
159# CONFIG_CPU_SUBTYPE_SH7785 is not set 167# CONFIG_CPU_SUBTYPE_SH7785 is not set
168# CONFIG_CPU_SUBTYPE_SH7786 is not set
160# CONFIG_CPU_SUBTYPE_SHX3 is not set 169# CONFIG_CPU_SUBTYPE_SHX3 is not set
161# CONFIG_CPU_SUBTYPE_SH7343 is not set 170# CONFIG_CPU_SUBTYPE_SH7343 is not set
162# CONFIG_CPU_SUBTYPE_SH7722 is not set 171# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -198,11 +207,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
198CONFIG_ZONE_DMA_FLAG=0 207CONFIG_ZONE_DMA_FLAG=0
199CONFIG_NR_QUICK=2 208CONFIG_NR_QUICK=2
200CONFIG_UNEVICTABLE_LRU=y 209CONFIG_UNEVICTABLE_LRU=y
210CONFIG_HAVE_MLOCK=y
211CONFIG_HAVE_MLOCKED_PAGE_BIT=y
201 212
202# 213#
203# Cache configuration 214# Cache configuration
204# 215#
205# CONFIG_SH_DIRECT_MAPPED is not set
206CONFIG_CACHE_WRITEBACK=y 216CONFIG_CACHE_WRITEBACK=y
207# CONFIG_CACHE_WRITETHROUGH is not set 217# CONFIG_CACHE_WRITETHROUGH is not set
208# CONFIG_CACHE_OFF is not set 218# CONFIG_CACHE_OFF is not set
@@ -245,7 +255,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
245# 255#
246CONFIG_SH_DMA_API=y 256CONFIG_SH_DMA_API=y
247CONFIG_SH_DMA=y 257CONFIG_SH_DMA=y
248CONFIG_NR_ONCHIP_DMA_CHANNELS=4 258CONFIG_NR_ONCHIP_DMA_CHANNELS=8
249# CONFIG_NR_DMA_CHANNELS_BOOL is not set 259# CONFIG_NR_DMA_CHANNELS_BOOL is not set
250# CONFIG_SH_DMABRG is not set 260# CONFIG_SH_DMABRG is not set
251 261
@@ -310,7 +320,6 @@ CONFIG_NET=y
310# 320#
311# Networking options 321# Networking options
312# 322#
313CONFIG_COMPAT_NET_DEV_OPS=y
314CONFIG_PACKET=y 323CONFIG_PACKET=y
315# CONFIG_PACKET_MMAP is not set 324# CONFIG_PACKET_MMAP is not set
316CONFIG_UNIX=y 325CONFIG_UNIX=y
@@ -360,6 +369,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
360# CONFIG_LAPB is not set 369# CONFIG_LAPB is not set
361# CONFIG_ECONET is not set 370# CONFIG_ECONET is not set
362# CONFIG_WAN_ROUTER is not set 371# CONFIG_WAN_ROUTER is not set
372# CONFIG_PHONET is not set
363# CONFIG_NET_SCHED is not set 373# CONFIG_NET_SCHED is not set
364# CONFIG_DCB is not set 374# CONFIG_DCB is not set
365 375
@@ -372,13 +382,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
372# CONFIG_IRDA is not set 382# CONFIG_IRDA is not set
373# CONFIG_BT is not set 383# CONFIG_BT is not set
374# CONFIG_AF_RXRPC is not set 384# CONFIG_AF_RXRPC is not set
375# CONFIG_PHONET is not set
376CONFIG_WIRELESS=y 385CONFIG_WIRELESS=y
377# CONFIG_CFG80211 is not set 386# CONFIG_CFG80211 is not set
378# CONFIG_WIRELESS_OLD_REGULATORY is not set 387# CONFIG_WIRELESS_OLD_REGULATORY is not set
379# CONFIG_WIRELESS_EXT is not set 388# CONFIG_WIRELESS_EXT is not set
380# CONFIG_LIB80211 is not set 389# CONFIG_LIB80211 is not set
381# CONFIG_MAC80211 is not set 390# CONFIG_MAC80211 is not set
391# CONFIG_WIMAX is not set
382# CONFIG_RFKILL is not set 392# CONFIG_RFKILL is not set
383# CONFIG_NET_9P is not set 393# CONFIG_NET_9P is not set
384 394
@@ -402,6 +412,7 @@ CONFIG_MTD_DEBUG=y
402CONFIG_MTD_DEBUG_VERBOSE=0 412CONFIG_MTD_DEBUG_VERBOSE=0
403CONFIG_MTD_CONCAT=y 413CONFIG_MTD_CONCAT=y
404CONFIG_MTD_PARTITIONS=y 414CONFIG_MTD_PARTITIONS=y
415# CONFIG_MTD_TESTS is not set
405# CONFIG_MTD_REDBOOT_PARTS is not set 416# CONFIG_MTD_REDBOOT_PARTS is not set
406CONFIG_MTD_CMDLINE_PARTS=y 417CONFIG_MTD_CMDLINE_PARTS=y
407# CONFIG_MTD_AR7_PARTS is not set 418# CONFIG_MTD_AR7_PARTS is not set
@@ -454,9 +465,7 @@ CONFIG_MTD_ABSENT=y
454# 465#
455# CONFIG_MTD_COMPLEX_MAPPINGS is not set 466# CONFIG_MTD_COMPLEX_MAPPINGS is not set
456CONFIG_MTD_PHYSMAP=y 467CONFIG_MTD_PHYSMAP=y
457CONFIG_MTD_PHYSMAP_START=0xffffffff 468# CONFIG_MTD_PHYSMAP_COMPAT is not set
458CONFIG_MTD_PHYSMAP_LEN=0x0
459CONFIG_MTD_PHYSMAP_BANKWIDTH=4
460# CONFIG_MTD_PLATRAM is not set 469# CONFIG_MTD_PLATRAM is not set
461 470
462# 471#
@@ -477,6 +486,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
477# CONFIG_MTD_ONENAND is not set 486# CONFIG_MTD_ONENAND is not set
478 487
479# 488#
489# LPDDR flash memory drivers
490#
491# CONFIG_MTD_LPDDR is not set
492
493#
480# UBI - Unsorted block images 494# UBI - Unsorted block images
481# 495#
482# CONFIG_MTD_UBI is not set 496# CONFIG_MTD_UBI is not set
@@ -506,6 +520,7 @@ CONFIG_HAVE_IDE=y
506# CONFIG_ATA is not set 520# CONFIG_ATA is not set
507# CONFIG_MD is not set 521# CONFIG_MD is not set
508CONFIG_NETDEVICES=y 522CONFIG_NETDEVICES=y
523CONFIG_COMPAT_NET_DEV_OPS=y
509# CONFIG_DUMMY is not set 524# CONFIG_DUMMY is not set
510# CONFIG_BONDING is not set 525# CONFIG_BONDING is not set
511# CONFIG_MACVLAN is not set 526# CONFIG_MACVLAN is not set
@@ -518,8 +533,10 @@ CONFIG_MII=y
518# CONFIG_AX88796 is not set 533# CONFIG_AX88796 is not set
519# CONFIG_STNIC is not set 534# CONFIG_STNIC is not set
520CONFIG_SMC91X=y 535CONFIG_SMC91X=y
536# CONFIG_ETHOC is not set
521# CONFIG_SMC911X is not set 537# CONFIG_SMC911X is not set
522# CONFIG_SMSC911X is not set 538# CONFIG_SMSC911X is not set
539# CONFIG_DNET is not set
523# CONFIG_IBM_NEW_EMAC_ZMII is not set 540# CONFIG_IBM_NEW_EMAC_ZMII is not set
524# CONFIG_IBM_NEW_EMAC_RGMII is not set 541# CONFIG_IBM_NEW_EMAC_RGMII is not set
525# CONFIG_IBM_NEW_EMAC_TAH is not set 542# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -536,7 +553,10 @@ CONFIG_SMC91X=y
536# 553#
537# CONFIG_WLAN_PRE80211 is not set 554# CONFIG_WLAN_PRE80211 is not set
538# CONFIG_WLAN_80211 is not set 555# CONFIG_WLAN_80211 is not set
539# CONFIG_IWLWIFI_LEDS is not set 556
557#
558# Enable WiMAX (Networking options) to see the WiMAX drivers
559#
540# CONFIG_WAN is not set 560# CONFIG_WAN is not set
541# CONFIG_PPP is not set 561# CONFIG_PPP is not set
542# CONFIG_SLIP is not set 562# CONFIG_SLIP is not set
@@ -607,6 +627,7 @@ CONFIG_LEGACY_PTYS=y
607CONFIG_LEGACY_PTY_COUNT=256 627CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_IPMI_HANDLER is not set 628# CONFIG_IPMI_HANDLER is not set
609CONFIG_HW_RANDOM=y 629CONFIG_HW_RANDOM=y
630# CONFIG_HW_RANDOM_TIMERIOMEM is not set
610# CONFIG_R3964 is not set 631# CONFIG_R3964 is not set
611# CONFIG_RAW_DRIVER is not set 632# CONFIG_RAW_DRIVER is not set
612# CONFIG_TCG_TPM is not set 633# CONFIG_TCG_TPM is not set
@@ -643,12 +664,9 @@ CONFIG_I2C_SH7760=y
643# Miscellaneous I2C Chip support 664# Miscellaneous I2C Chip support
644# 665#
645# CONFIG_DS1682 is not set 666# CONFIG_DS1682 is not set
646# CONFIG_EEPROM_AT24 is not set
647# CONFIG_EEPROM_LEGACY is not set
648# CONFIG_SENSORS_PCF8574 is not set 667# CONFIG_SENSORS_PCF8574 is not set
649# CONFIG_PCF8575 is not set 668# CONFIG_PCF8575 is not set
650# CONFIG_SENSORS_PCA9539 is not set 669# CONFIG_SENSORS_PCA9539 is not set
651# CONFIG_SENSORS_PCF8591 is not set
652# CONFIG_SENSORS_MAX6875 is not set 670# CONFIG_SENSORS_MAX6875 is not set
653# CONFIG_SENSORS_TSL2550 is not set 671# CONFIG_SENSORS_TSL2550 is not set
654CONFIG_I2C_DEBUG_CORE=y 672CONFIG_I2C_DEBUG_CORE=y
@@ -680,6 +698,7 @@ CONFIG_SSB_POSSIBLE=y
680# CONFIG_PMIC_DA903X is not set 698# CONFIG_PMIC_DA903X is not set
681# CONFIG_MFD_WM8400 is not set 699# CONFIG_MFD_WM8400 is not set
682# CONFIG_MFD_WM8350_I2C is not set 700# CONFIG_MFD_WM8350_I2C is not set
701# CONFIG_MFD_PCF50633 is not set
683# CONFIG_REGULATOR is not set 702# CONFIG_REGULATOR is not set
684 703
685# 704#
@@ -732,6 +751,7 @@ CONFIG_FB_SH_MOBILE_LCDC=m
732# CONFIG_FB_VIRTUAL is not set 751# CONFIG_FB_VIRTUAL is not set
733# CONFIG_FB_METRONOME is not set 752# CONFIG_FB_METRONOME is not set
734# CONFIG_FB_MB862XX is not set 753# CONFIG_FB_MB862XX is not set
754# CONFIG_FB_BROADSHEET is not set
735# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 755# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
736 756
737# 757#
@@ -750,6 +770,7 @@ CONFIG_SOUND=y
750CONFIG_SND=y 770CONFIG_SND=y
751CONFIG_SND_TIMER=y 771CONFIG_SND_TIMER=y
752CONFIG_SND_PCM=y 772CONFIG_SND_PCM=y
773CONFIG_SND_JACK=y
753# CONFIG_SND_SEQUENCER is not set 774# CONFIG_SND_SEQUENCER is not set
754# CONFIG_SND_MIXER_OSS is not set 775# CONFIG_SND_MIXER_OSS is not set
755# CONFIG_SND_PCM_OSS is not set 776# CONFIG_SND_PCM_OSS is not set
@@ -781,6 +802,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
781# CONFIG_ACCESSIBILITY is not set 802# CONFIG_ACCESSIBILITY is not set
782# CONFIG_RTC_CLASS is not set 803# CONFIG_RTC_CLASS is not set
783# CONFIG_DMADEVICES is not set 804# CONFIG_DMADEVICES is not set
805# CONFIG_AUXDISPLAY is not set
784# CONFIG_UIO is not set 806# CONFIG_UIO is not set
785# CONFIG_STAGING is not set 807# CONFIG_STAGING is not set
786 808
@@ -806,6 +828,7 @@ CONFIG_FS_POSIX_ACL=y
806CONFIG_FILE_LOCKING=y 828CONFIG_FILE_LOCKING=y
807# CONFIG_XFS_FS is not set 829# CONFIG_XFS_FS is not set
808# CONFIG_OCFS2_FS is not set 830# CONFIG_OCFS2_FS is not set
831# CONFIG_BTRFS_FS is not set
809CONFIG_DNOTIFY=y 832CONFIG_DNOTIFY=y
810CONFIG_INOTIFY=y 833CONFIG_INOTIFY=y
811CONFIG_INOTIFY_USER=y 834CONFIG_INOTIFY_USER=y
@@ -851,6 +874,7 @@ CONFIG_MISC_FILESYSTEMS=y
851# CONFIG_EFS_FS is not set 874# CONFIG_EFS_FS is not set
852# CONFIG_JFFS2_FS is not set 875# CONFIG_JFFS2_FS is not set
853# CONFIG_CRAMFS is not set 876# CONFIG_CRAMFS is not set
877# CONFIG_SQUASHFS is not set
854# CONFIG_VXFS_FS is not set 878# CONFIG_VXFS_FS is not set
855# CONFIG_MINIX_FS is not set 879# CONFIG_MINIX_FS is not set
856# CONFIG_OMFS_FS is not set 880# CONFIG_OMFS_FS is not set
@@ -868,7 +892,6 @@ CONFIG_ROOT_NFS=y
868CONFIG_LOCKD=y 892CONFIG_LOCKD=y
869CONFIG_NFS_COMMON=y 893CONFIG_NFS_COMMON=y
870CONFIG_SUNRPC=y 894CONFIG_SUNRPC=y
871# CONFIG_SUNRPC_REGISTER_V4 is not set
872# CONFIG_RPCSEC_GSS_KRB5 is not set 895# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set 896# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set 897# CONFIG_SMB_FS is not set
@@ -974,6 +997,7 @@ CONFIG_DEBUG_INFO=y
974# CONFIG_FAULT_INJECTION is not set 997# CONFIG_FAULT_INJECTION is not set
975# CONFIG_LATENCYTOP is not set 998# CONFIG_LATENCYTOP is not set
976CONFIG_SYSCTL_SYSCALL_CHECK=y 999CONFIG_SYSCTL_SYSCALL_CHECK=y
1000# CONFIG_PAGE_POISONING is not set
977CONFIG_HAVE_FUNCTION_TRACER=y 1001CONFIG_HAVE_FUNCTION_TRACER=y
978CONFIG_HAVE_DYNAMIC_FTRACE=y 1002CONFIG_HAVE_DYNAMIC_FTRACE=y
979CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1003CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -989,7 +1013,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
989# CONFIG_BOOT_TRACER is not set 1013# CONFIG_BOOT_TRACER is not set
990# CONFIG_TRACE_BRANCH_PROFILING is not set 1014# CONFIG_TRACE_BRANCH_PROFILING is not set
991# CONFIG_STACK_TRACER is not set 1015# CONFIG_STACK_TRACER is not set
992# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
993# CONFIG_SAMPLES is not set 1016# CONFIG_SAMPLES is not set
994CONFIG_HAVE_ARCH_KGDB=y 1017CONFIG_HAVE_ARCH_KGDB=y
995# CONFIG_KGDB is not set 1018# CONFIG_KGDB is not set
@@ -1095,6 +1118,7 @@ CONFIG_CRYPTO_DES=y
1095# Compression 1118# Compression
1096# 1119#
1097# CONFIG_CRYPTO_DEFLATE is not set 1120# CONFIG_CRYPTO_DEFLATE is not set
1121# CONFIG_CRYPTO_ZLIB is not set
1098# CONFIG_CRYPTO_LZO is not set 1122# CONFIG_CRYPTO_LZO is not set
1099 1123
1100# 1124#
@@ -1115,7 +1139,9 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1115CONFIG_CRC32=y 1139CONFIG_CRC32=y
1116# CONFIG_CRC7 is not set 1140# CONFIG_CRC7 is not set
1117# CONFIG_LIBCRC32C is not set 1141# CONFIG_LIBCRC32C is not set
1118CONFIG_PLIST=y 1142CONFIG_ZLIB_INFLATE=y
1143CONFIG_DECOMPRESS_GZIP=y
1119CONFIG_HAS_IOMEM=y 1144CONFIG_HAS_IOMEM=y
1120CONFIG_HAS_IOPORT=y 1145CONFIG_HAS_IOPORT=y
1121CONFIG_HAS_DMA=y 1146CONFIG_HAS_DMA=y
1147CONFIG_NLATTR=y
diff --git a/arch/sh/configs/espt_defconfig b/arch/sh/configs/espt_defconfig
index 873ec42c6e69..ebb4c37abaa6 100644
--- a/arch/sh/configs/espt_defconfig
+++ b/arch/sh/configs/espt_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc7 3# Linux kernel version: 2.6.29
4# Tue Mar 17 13:25:58 2009 4# Thu Apr 2 17:58:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -71,6 +72,7 @@ CONFIG_IPC_NS=y
71# CONFIG_BLK_DEV_INITRD is not set 72# CONFIG_BLK_DEV_INITRD is not set
72CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
73CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
74CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
75CONFIG_UID16=y 77CONFIG_UID16=y
76# CONFIG_SYSCTL_SYSCALL is not set 78# CONFIG_SYSCTL_SYSCALL is not set
@@ -80,10 +82,8 @@ CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y 82CONFIG_PRINTK=y
81CONFIG_BUG=y 83CONFIG_BUG=y
82CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
83CONFIG_COMPAT_BRK=y
84CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 86CONFIG_FUTEX=y
86CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 87CONFIG_EPOLL=y
88CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
89CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -91,6 +91,7 @@ CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 91CONFIG_SHMEM=y
92CONFIG_AIO=y 92CONFIG_AIO=y
93CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 95CONFIG_SLAB=y
95# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
@@ -213,11 +214,12 @@ CONFIG_MIGRATION=y
213CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
215CONFIG_UNEVICTABLE_LRU=y 216CONFIG_UNEVICTABLE_LRU=y
217CONFIG_HAVE_MLOCK=y
218CONFIG_HAVE_MLOCKED_PAGE_BIT=y
216 219
217# 220#
218# Cache configuration 221# Cache configuration
219# 222#
220# CONFIG_SH_DIRECT_MAPPED is not set
221CONFIG_CACHE_WRITEBACK=y 223CONFIG_CACHE_WRITEBACK=y
222# CONFIG_CACHE_WRITETHROUGH is not set 224# CONFIG_CACHE_WRITETHROUGH is not set
223# CONFIG_CACHE_OFF is not set 225# CONFIG_CACHE_OFF is not set
@@ -318,7 +320,6 @@ CONFIG_NET=y
318# 320#
319# Networking options 321# Networking options
320# 322#
321CONFIG_COMPAT_NET_DEV_OPS=y
322CONFIG_PACKET=y 323CONFIG_PACKET=y
323# CONFIG_PACKET_MMAP is not set 324# CONFIG_PACKET_MMAP is not set
324CONFIG_UNIX=y 325CONFIG_UNIX=y
@@ -373,6 +374,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_LAPB is not set 374# CONFIG_LAPB is not set
374# CONFIG_ECONET is not set 375# CONFIG_ECONET is not set
375# CONFIG_WAN_ROUTER is not set 376# CONFIG_WAN_ROUTER is not set
377# CONFIG_PHONET is not set
376# CONFIG_NET_SCHED is not set 378# CONFIG_NET_SCHED is not set
377# CONFIG_DCB is not set 379# CONFIG_DCB is not set
378 380
@@ -380,12 +382,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
380# Network testing 382# Network testing
381# 383#
382# CONFIG_NET_PKTGEN is not set 384# CONFIG_NET_PKTGEN is not set
385# CONFIG_NET_DROP_MONITOR is not set
383# CONFIG_HAMRADIO is not set 386# CONFIG_HAMRADIO is not set
384# CONFIG_CAN is not set 387# CONFIG_CAN is not set
385# CONFIG_IRDA is not set 388# CONFIG_IRDA is not set
386# CONFIG_BT is not set 389# CONFIG_BT is not set
387# CONFIG_AF_RXRPC is not set 390# CONFIG_AF_RXRPC is not set
388# CONFIG_PHONET is not set
389# CONFIG_WIRELESS is not set 391# CONFIG_WIRELESS is not set
390# CONFIG_WIMAX is not set 392# CONFIG_WIMAX is not set
391# CONFIG_RFKILL is not set 393# CONFIG_RFKILL is not set
@@ -548,9 +550,11 @@ CONFIG_SCSI_LOWLEVEL=y
548# CONFIG_LIBFC is not set 550# CONFIG_LIBFC is not set
549# CONFIG_SCSI_DEBUG is not set 551# CONFIG_SCSI_DEBUG is not set
550# CONFIG_SCSI_DH is not set 552# CONFIG_SCSI_DH is not set
553# CONFIG_SCSI_OSD_INITIATOR is not set
551# CONFIG_ATA is not set 554# CONFIG_ATA is not set
552# CONFIG_MD is not set 555# CONFIG_MD is not set
553CONFIG_NETDEVICES=y 556CONFIG_NETDEVICES=y
557CONFIG_COMPAT_NET_DEV_OPS=y
554# CONFIG_DUMMY is not set 558# CONFIG_DUMMY is not set
555# CONFIG_BONDING is not set 559# CONFIG_BONDING is not set
556# CONFIG_MACVLAN is not set 560# CONFIG_MACVLAN is not set
@@ -583,8 +587,10 @@ CONFIG_MII=y
583# CONFIG_STNIC is not set 587# CONFIG_STNIC is not set
584CONFIG_SH_ETH=y 588CONFIG_SH_ETH=y
585# CONFIG_SMC91X is not set 589# CONFIG_SMC91X is not set
590# CONFIG_ETHOC is not set
586# CONFIG_SMC911X is not set 591# CONFIG_SMC911X is not set
587# CONFIG_SMSC911X is not set 592# CONFIG_SMSC911X is not set
593# CONFIG_DNET is not set
588# CONFIG_IBM_NEW_EMAC_ZMII is not set 594# CONFIG_IBM_NEW_EMAC_ZMII is not set
589# CONFIG_IBM_NEW_EMAC_RGMII is not set 595# CONFIG_IBM_NEW_EMAC_RGMII is not set
590# CONFIG_IBM_NEW_EMAC_TAH is not set 596# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -601,7 +607,6 @@ CONFIG_SH_ETH=y
601# 607#
602# CONFIG_WLAN_PRE80211 is not set 608# CONFIG_WLAN_PRE80211 is not set
603# CONFIG_WLAN_80211 is not set 609# CONFIG_WLAN_80211 is not set
604# CONFIG_IWLWIFI_LEDS is not set
605 610
606# 611#
607# Enable WiMAX (Networking options) to see the WiMAX drivers 612# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -685,6 +690,7 @@ CONFIG_LEGACY_PTYS=y
685CONFIG_LEGACY_PTY_COUNT=256 690CONFIG_LEGACY_PTY_COUNT=256
686# CONFIG_IPMI_HANDLER is not set 691# CONFIG_IPMI_HANDLER is not set
687CONFIG_HW_RANDOM=y 692CONFIG_HW_RANDOM=y
693# CONFIG_HW_RANDOM_TIMERIOMEM is not set
688# CONFIG_R3964 is not set 694# CONFIG_R3964 is not set
689# CONFIG_RAW_DRIVER is not set 695# CONFIG_RAW_DRIVER is not set
690# CONFIG_TCG_TPM is not set 696# CONFIG_TCG_TPM is not set
@@ -764,6 +770,7 @@ CONFIG_FB_SH7760=y
764# CONFIG_FB_VIRTUAL is not set 770# CONFIG_FB_VIRTUAL is not set
765# CONFIG_FB_METRONOME is not set 771# CONFIG_FB_METRONOME is not set
766# CONFIG_FB_MB862XX is not set 772# CONFIG_FB_MB862XX is not set
773# CONFIG_FB_BROADSHEET is not set
767# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 774# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
768 775
769# 776#
@@ -817,6 +824,7 @@ CONFIG_USB_MON=y
817# CONFIG_USB_C67X00_HCD is not set 824# CONFIG_USB_C67X00_HCD is not set
818# CONFIG_USB_OXU210HP_HCD is not set 825# CONFIG_USB_OXU210HP_HCD is not set
819# CONFIG_USB_ISP116X_HCD is not set 826# CONFIG_USB_ISP116X_HCD is not set
827# CONFIG_USB_ISP1760_HCD is not set
820CONFIG_USB_OHCI_HCD=y 828CONFIG_USB_OHCI_HCD=y
821# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 829# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
822# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 830# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -834,11 +842,11 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
834# CONFIG_USB_TMC is not set 842# CONFIG_USB_TMC is not set
835 843
836# 844#
837# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 845# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
838# 846#
839 847
840# 848#
841# see USB_STORAGE Help for more information 849# also be needed; see USB_STORAGE Help for more info
842# 850#
843CONFIG_USB_STORAGE=y 851CONFIG_USB_STORAGE=y
844# CONFIG_USB_STORAGE_DEBUG is not set 852# CONFIG_USB_STORAGE_DEBUG is not set
@@ -880,7 +888,6 @@ CONFIG_USB_STORAGE=y
880# CONFIG_USB_LED is not set 888# CONFIG_USB_LED is not set
881# CONFIG_USB_CYPRESS_CY7C63 is not set 889# CONFIG_USB_CYPRESS_CY7C63 is not set
882# CONFIG_USB_CYTHERM is not set 890# CONFIG_USB_CYTHERM is not set
883# CONFIG_USB_PHIDGET is not set
884# CONFIG_USB_IDMOUSE is not set 891# CONFIG_USB_IDMOUSE is not set
885# CONFIG_USB_FTDI_ELAN is not set 892# CONFIG_USB_FTDI_ELAN is not set
886# CONFIG_USB_APPLEDISPLAY is not set 893# CONFIG_USB_APPLEDISPLAY is not set
@@ -894,12 +901,14 @@ CONFIG_USB_STORAGE=y
894# 901#
895# OTG and related infrastructure 902# OTG and related infrastructure
896# 903#
904# CONFIG_NOP_USB_XCEIV is not set
897# CONFIG_MMC is not set 905# CONFIG_MMC is not set
898# CONFIG_MEMSTICK is not set 906# CONFIG_MEMSTICK is not set
899# CONFIG_NEW_LEDS is not set 907# CONFIG_NEW_LEDS is not set
900# CONFIG_ACCESSIBILITY is not set 908# CONFIG_ACCESSIBILITY is not set
901# CONFIG_RTC_CLASS is not set 909# CONFIG_RTC_CLASS is not set
902# CONFIG_DMADEVICES is not set 910# CONFIG_DMADEVICES is not set
911# CONFIG_AUXDISPLAY is not set
903# CONFIG_UIO is not set 912# CONFIG_UIO is not set
904# CONFIG_STAGING is not set 913# CONFIG_STAGING is not set
905 914
@@ -987,7 +996,6 @@ CONFIG_ROOT_NFS=y
987CONFIG_LOCKD=y 996CONFIG_LOCKD=y
988CONFIG_NFS_COMMON=y 997CONFIG_NFS_COMMON=y
989CONFIG_SUNRPC=y 998CONFIG_SUNRPC=y
990# CONFIG_SUNRPC_REGISTER_V4 is not set
991# CONFIG_RPCSEC_GSS_KRB5 is not set 999# CONFIG_RPCSEC_GSS_KRB5 is not set
992# CONFIG_RPCSEC_GSS_SPKM3 is not set 1000# CONFIG_RPCSEC_GSS_SPKM3 is not set
993# CONFIG_SMB_FS is not set 1001# CONFIG_SMB_FS is not set
@@ -1071,7 +1079,7 @@ CONFIG_TRACING=y
1071# 1079#
1072# Tracers 1080# Tracers
1073# 1081#
1074# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1082# CONFIG_DYNAMIC_DEBUG is not set
1075# CONFIG_SAMPLES is not set 1083# CONFIG_SAMPLES is not set
1076CONFIG_HAVE_ARCH_KGDB=y 1084CONFIG_HAVE_ARCH_KGDB=y
1077# CONFIG_SH_STANDARD_BIOS is not set 1085# CONFIG_SH_STANDARD_BIOS is not set
@@ -1163,6 +1171,7 @@ CONFIG_CRYPTO=y
1163# Compression 1171# Compression
1164# 1172#
1165# CONFIG_CRYPTO_DEFLATE is not set 1173# CONFIG_CRYPTO_DEFLATE is not set
1174# CONFIG_CRYPTO_ZLIB is not set
1166# CONFIG_CRYPTO_LZO is not set 1175# CONFIG_CRYPTO_LZO is not set
1167 1176
1168# 1177#
@@ -1184,7 +1193,7 @@ CONFIG_CRC32=y
1184# CONFIG_CRC7 is not set 1193# CONFIG_CRC7 is not set
1185# CONFIG_LIBCRC32C is not set 1194# CONFIG_LIBCRC32C is not set
1186CONFIG_ZLIB_INFLATE=y 1195CONFIG_ZLIB_INFLATE=y
1187CONFIG_PLIST=y
1188CONFIG_HAS_IOMEM=y 1196CONFIG_HAS_IOMEM=y
1189CONFIG_HAS_IOPORT=y 1197CONFIG_HAS_IOPORT=y
1190CONFIG_HAS_DMA=y 1198CONFIG_HAS_DMA=y
1199CONFIG_NLATTR=y
diff --git a/arch/sh/configs/hp6xx_defconfig b/arch/sh/configs/hp6xx_defconfig
index 847a25106635..82b113af08d3 100644
--- a/arch/sh/configs/hp6xx_defconfig
+++ b/arch/sh/configs/hp6xx_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 16:56:55 2009 4# Thu Apr 2 18:01:05 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19CONFIG_ARCH_SUSPEND_POSSIBLE=y 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_APM_EMULATION=y 21CONFIG_SYS_SUPPORTS_APM_EMULATION=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -39,11 +40,20 @@ CONFIG_SWAP=y
39# CONFIG_SYSVIPC is not set 40# CONFIG_SYSVIPC is not set
40CONFIG_BSD_PROCESS_ACCT=y 41CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_CLASSIC_RCU=y
48# CONFIG_TREE_RCU is not set
49# CONFIG_PREEMPT_RCU is not set
50# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_PREEMPT_RCU_TRACE is not set
42CONFIG_IKCONFIG=y 52CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y 53CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14 54CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_CGROUPS is not set
46# CONFIG_GROUP_SCHED is not set 55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
47CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
48CONFIG_SYSFS_DEPRECATED_V2=y 58CONFIG_SYSFS_DEPRECATED_V2=y
49# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
@@ -51,6 +61,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_BLK_DEV_INITRD is not set 61# CONFIG_BLK_DEV_INITRD is not set
52# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 62# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
53CONFIG_SYSCTL=y 63CONFIG_SYSCTL=y
64CONFIG_ANON_INODES=y
54CONFIG_EMBEDDED=y 65CONFIG_EMBEDDED=y
55CONFIG_UID16=y 66CONFIG_UID16=y
56# CONFIG_SYSCTL_SYSCALL is not set 67# CONFIG_SYSCTL_SYSCALL is not set
@@ -60,10 +71,8 @@ CONFIG_HOTPLUG=y
60CONFIG_PRINTK=y 71CONFIG_PRINTK=y
61CONFIG_BUG=y 72CONFIG_BUG=y
62CONFIG_ELF_CORE=y 73CONFIG_ELF_CORE=y
63CONFIG_COMPAT_BRK=y
64CONFIG_BASE_FULL=y 74CONFIG_BASE_FULL=y
65CONFIG_FUTEX=y 75CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
67CONFIG_EPOLL=y 76CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y 77CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y 78CONFIG_TIMERFD=y
@@ -71,6 +80,7 @@ CONFIG_EVENTFD=y
71CONFIG_SHMEM=y 80CONFIG_SHMEM=y
72CONFIG_AIO=y 81CONFIG_AIO=y
73CONFIG_VM_EVENT_COUNTERS=y 82CONFIG_VM_EVENT_COUNTERS=y
83CONFIG_COMPAT_BRK=y
74CONFIG_SLAB=y 84CONFIG_SLAB=y
75# CONFIG_SLUB is not set 85# CONFIG_SLUB is not set
76# CONFIG_SLOB is not set 86# CONFIG_SLOB is not set
@@ -104,11 +114,6 @@ CONFIG_DEFAULT_AS=y
104# CONFIG_DEFAULT_CFQ is not set 114# CONFIG_DEFAULT_CFQ is not set
105# CONFIG_DEFAULT_NOOP is not set 115# CONFIG_DEFAULT_NOOP is not set
106CONFIG_DEFAULT_IOSCHED="anticipatory" 116CONFIG_DEFAULT_IOSCHED="anticipatory"
107CONFIG_CLASSIC_RCU=y
108# CONFIG_TREE_RCU is not set
109# CONFIG_PREEMPT_RCU is not set
110# CONFIG_TREE_RCU_TRACE is not set
111# CONFIG_PREEMPT_RCU_TRACE is not set
112CONFIG_FREEZER=y 117CONFIG_FREEZER=y
113 118
114# 119#
@@ -143,6 +148,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
143# CONFIG_CPU_SUBTYPE_SH7770 is not set 148# CONFIG_CPU_SUBTYPE_SH7770 is not set
144# CONFIG_CPU_SUBTYPE_SH7780 is not set 149# CONFIG_CPU_SUBTYPE_SH7780 is not set
145# CONFIG_CPU_SUBTYPE_SH7785 is not set 150# CONFIG_CPU_SUBTYPE_SH7785 is not set
151# CONFIG_CPU_SUBTYPE_SH7786 is not set
146# CONFIG_CPU_SUBTYPE_SHX3 is not set 152# CONFIG_CPU_SUBTYPE_SHX3 is not set
147# CONFIG_CPU_SUBTYPE_SH7343 is not set 153# CONFIG_CPU_SUBTYPE_SH7343 is not set
148# CONFIG_CPU_SUBTYPE_SH7722 is not set 154# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -184,11 +190,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
184CONFIG_ZONE_DMA_FLAG=0 190CONFIG_ZONE_DMA_FLAG=0
185CONFIG_NR_QUICK=2 191CONFIG_NR_QUICK=2
186CONFIG_UNEVICTABLE_LRU=y 192CONFIG_UNEVICTABLE_LRU=y
193CONFIG_HAVE_MLOCK=y
194CONFIG_HAVE_MLOCKED_PAGE_BIT=y
187 195
188# 196#
189# Cache configuration 197# Cache configuration
190# 198#
191# CONFIG_SH_DIRECT_MAPPED is not set
192CONFIG_CACHE_WRITEBACK=y 199CONFIG_CACHE_WRITEBACK=y
193# CONFIG_CACHE_WRITETHROUGH is not set 200# CONFIG_CACHE_WRITETHROUGH is not set
194# CONFIG_CACHE_OFF is not set 201# CONFIG_CACHE_OFF is not set
@@ -208,6 +215,7 @@ CONFIG_CPU_HAS_SR_RB=y
208# 215#
209# CONFIG_SH_SOLUTION_ENGINE is not set 216# CONFIG_SH_SOLUTION_ENGINE is not set
210CONFIG_SH_HP6XX=y 217CONFIG_SH_HP6XX=y
218# CONFIG_SH_POLARIS is not set
211 219
212# 220#
213# Timer and clock configuration 221# Timer and clock configuration
@@ -229,7 +237,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
229# 237#
230CONFIG_SH_DMA_API=y 238CONFIG_SH_DMA_API=y
231CONFIG_SH_DMA=y 239CONFIG_SH_DMA=y
232CONFIG_NR_ONCHIP_DMA_CHANNELS=4 240CONFIG_NR_ONCHIP_DMA_CHANNELS=6
233# CONFIG_NR_DMA_CHANNELS_BOOL is not set 241# CONFIG_NR_DMA_CHANNELS_BOOL is not set
234 242
235# 243#
@@ -302,6 +310,7 @@ CONFIG_PM=y
302CONFIG_PM_SLEEP=y 310CONFIG_PM_SLEEP=y
303CONFIG_SUSPEND=y 311CONFIG_SUSPEND=y
304CONFIG_SUSPEND_FREEZER=y 312CONFIG_SUSPEND_FREEZER=y
313# CONFIG_HIBERNATION is not set
305CONFIG_APM_EMULATION=y 314CONFIG_APM_EMULATION=y
306# CONFIG_CPU_IDLE is not set 315# CONFIG_CPU_IDLE is not set
307# CONFIG_NET is not set 316# CONFIG_NET is not set
@@ -329,9 +338,13 @@ CONFIG_BLK_DEV=y
329# CONFIG_CDROM_PKTCDVD is not set 338# CONFIG_CDROM_PKTCDVD is not set
330# CONFIG_BLK_DEV_HD is not set 339# CONFIG_BLK_DEV_HD is not set
331CONFIG_MISC_DEVICES=y 340CONFIG_MISC_DEVICES=y
332# CONFIG_EEPROM_93CX6 is not set
333# CONFIG_ENCLOSURE_SERVICES is not set 341# CONFIG_ENCLOSURE_SERVICES is not set
334# CONFIG_C2PORT is not set 342# CONFIG_C2PORT is not set
343
344#
345# EEPROM support
346#
347# CONFIG_EEPROM_93CX6 is not set
335CONFIG_HAVE_IDE=y 348CONFIG_HAVE_IDE=y
336# CONFIG_IDE is not set 349# CONFIG_IDE is not set
337 350
@@ -375,6 +388,7 @@ CONFIG_SCSI_LOWLEVEL=y
375# CONFIG_SCSI_DEBUG is not set 388# CONFIG_SCSI_DEBUG is not set
376# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 389# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
377# CONFIG_SCSI_DH is not set 390# CONFIG_SCSI_DH is not set
391# CONFIG_SCSI_OSD_INITIATOR is not set
378CONFIG_ATA=y 392CONFIG_ATA=y
379# CONFIG_ATA_NONSTANDARD is not set 393# CONFIG_ATA_NONSTANDARD is not set
380CONFIG_SATA_PMP=y 394CONFIG_SATA_PMP=y
@@ -471,6 +485,7 @@ CONFIG_LEGACY_PTYS=y
471CONFIG_LEGACY_PTY_COUNT=64 485CONFIG_LEGACY_PTY_COUNT=64
472# CONFIG_IPMI_HANDLER is not set 486# CONFIG_IPMI_HANDLER is not set
473CONFIG_HW_RANDOM=y 487CONFIG_HW_RANDOM=y
488# CONFIG_HW_RANDOM_TIMERIOMEM is not set
474# CONFIG_R3964 is not set 489# CONFIG_R3964 is not set
475 490
476# 491#
@@ -554,12 +569,13 @@ CONFIG_FB_SH_MOBILE_LCDC=y
554# CONFIG_FB_VIRTUAL is not set 569# CONFIG_FB_VIRTUAL is not set
555# CONFIG_FB_METRONOME is not set 570# CONFIG_FB_METRONOME is not set
556# CONFIG_FB_MB862XX is not set 571# CONFIG_FB_MB862XX is not set
572# CONFIG_FB_BROADSHEET is not set
557CONFIG_BACKLIGHT_LCD_SUPPORT=y 573CONFIG_BACKLIGHT_LCD_SUPPORT=y
558CONFIG_LCD_CLASS_DEVICE=y 574CONFIG_LCD_CLASS_DEVICE=y
559# CONFIG_LCD_ILI9320 is not set 575# CONFIG_LCD_ILI9320 is not set
560# CONFIG_LCD_PLATFORM is not set 576# CONFIG_LCD_PLATFORM is not set
561CONFIG_BACKLIGHT_CLASS_DEVICE=y 577CONFIG_BACKLIGHT_CLASS_DEVICE=y
562# CONFIG_BACKLIGHT_CORGI is not set 578CONFIG_BACKLIGHT_GENERIC=y
563CONFIG_BACKLIGHT_HP680=y 579CONFIG_BACKLIGHT_HP680=y
564 580
565# 581#
@@ -631,6 +647,7 @@ CONFIG_RTC_INTF_DEV=y
631# 647#
632CONFIG_RTC_DRV_SH=y 648CONFIG_RTC_DRV_SH=y
633# CONFIG_DMADEVICES is not set 649# CONFIG_DMADEVICES is not set
650# CONFIG_AUXDISPLAY is not set
634# CONFIG_UIO is not set 651# CONFIG_UIO is not set
635# CONFIG_STAGING is not set 652# CONFIG_STAGING is not set
636 653
@@ -647,6 +664,7 @@ CONFIG_EXT2_FS=y
647# CONFIG_FS_POSIX_ACL is not set 664# CONFIG_FS_POSIX_ACL is not set
648CONFIG_FILE_LOCKING=y 665CONFIG_FILE_LOCKING=y
649# CONFIG_XFS_FS is not set 666# CONFIG_XFS_FS is not set
667# CONFIG_BTRFS_FS is not set
650CONFIG_DNOTIFY=y 668CONFIG_DNOTIFY=y
651CONFIG_INOTIFY=y 669CONFIG_INOTIFY=y
652CONFIG_INOTIFY_USER=y 670CONFIG_INOTIFY_USER=y
@@ -692,6 +710,7 @@ CONFIG_MISC_FILESYSTEMS=y
692# CONFIG_BFS_FS is not set 710# CONFIG_BFS_FS is not set
693# CONFIG_EFS_FS is not set 711# CONFIG_EFS_FS is not set
694# CONFIG_CRAMFS is not set 712# CONFIG_CRAMFS is not set
713# CONFIG_SQUASHFS is not set
695# CONFIG_VXFS_FS is not set 714# CONFIG_VXFS_FS is not set
696# CONFIG_MINIX_FS is not set 715# CONFIG_MINIX_FS is not set
697# CONFIG_OMFS_FS is not set 716# CONFIG_OMFS_FS is not set
@@ -771,7 +790,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
771# 790#
772# Tracers 791# Tracers
773# 792#
774# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
775# CONFIG_SAMPLES is not set 793# CONFIG_SAMPLES is not set
776CONFIG_HAVE_ARCH_KGDB=y 794CONFIG_HAVE_ARCH_KGDB=y
777# CONFIG_SH_STANDARD_BIOS is not set 795# CONFIG_SH_STANDARD_BIOS is not set
@@ -799,10 +817,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
799CONFIG_CRYPTO_HASH=y 817CONFIG_CRYPTO_HASH=y
800CONFIG_CRYPTO_HASH2=y 818CONFIG_CRYPTO_HASH2=y
801CONFIG_CRYPTO_RNG2=y 819CONFIG_CRYPTO_RNG2=y
820CONFIG_CRYPTO_PCOMP=y
802CONFIG_CRYPTO_MANAGER=y 821CONFIG_CRYPTO_MANAGER=y
803CONFIG_CRYPTO_MANAGER2=y 822CONFIG_CRYPTO_MANAGER2=y
804# CONFIG_CRYPTO_GF128MUL is not set 823# CONFIG_CRYPTO_GF128MUL is not set
805# CONFIG_CRYPTO_NULL is not set 824# CONFIG_CRYPTO_NULL is not set
825CONFIG_CRYPTO_WORKQUEUE=y
806# CONFIG_CRYPTO_CRYPTD is not set 826# CONFIG_CRYPTO_CRYPTD is not set
807# CONFIG_CRYPTO_AUTHENC is not set 827# CONFIG_CRYPTO_AUTHENC is not set
808 828
@@ -870,6 +890,7 @@ CONFIG_CRYPTO_MD5=y
870# Compression 890# Compression
871# 891#
872# CONFIG_CRYPTO_DEFLATE is not set 892# CONFIG_CRYPTO_DEFLATE is not set
893# CONFIG_CRYPTO_ZLIB is not set
873# CONFIG_CRYPTO_LZO is not set 894# CONFIG_CRYPTO_LZO is not set
874 895
875# 896#
@@ -890,7 +911,6 @@ CONFIG_CRC_T10DIF=y
890CONFIG_CRC32=y 911CONFIG_CRC32=y
891# CONFIG_CRC7 is not set 912# CONFIG_CRC7 is not set
892# CONFIG_LIBCRC32C is not set 913# CONFIG_LIBCRC32C is not set
893CONFIG_PLIST=y
894CONFIG_HAS_IOMEM=y 914CONFIG_HAS_IOMEM=y
895CONFIG_HAS_IOPORT=y 915CONFIG_HAS_IOPORT=y
896CONFIG_HAS_DMA=y 916CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig
index d3bbbb037716..b6fa4a7599d0 100644
--- a/arch/sh/configs/landisk_defconfig
+++ b/arch/sh/configs/landisk_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 16:58:46 2009 4# Thu Apr 2 18:02:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -42,10 +43,19 @@ CONFIG_SYSVIPC_SYSCTL=y
42# CONFIG_BSD_PROCESS_ACCT is not set 43# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48# CONFIG_GROUP_SCHED is not set 57# CONFIG_GROUP_SCHED is not set
58# CONFIG_CGROUPS is not set
49CONFIG_SYSFS_DEPRECATED=y 59CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y 60CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
@@ -53,6 +63,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
53# CONFIG_BLK_DEV_INITRD is not set 63# CONFIG_BLK_DEV_INITRD is not set
54CONFIG_CC_OPTIMIZE_FOR_SIZE=y 64CONFIG_CC_OPTIMIZE_FOR_SIZE=y
55CONFIG_SYSCTL=y 65CONFIG_SYSCTL=y
66CONFIG_ANON_INODES=y
56CONFIG_EMBEDDED=y 67CONFIG_EMBEDDED=y
57CONFIG_UID16=y 68CONFIG_UID16=y
58# CONFIG_SYSCTL_SYSCALL is not set 69# CONFIG_SYSCTL_SYSCALL is not set
@@ -62,10 +73,8 @@ CONFIG_HOTPLUG=y
62CONFIG_PRINTK=y 73CONFIG_PRINTK=y
63CONFIG_BUG=y 74CONFIG_BUG=y
64CONFIG_ELF_CORE=y 75CONFIG_ELF_CORE=y
65CONFIG_COMPAT_BRK=y
66CONFIG_BASE_FULL=y 76CONFIG_BASE_FULL=y
67CONFIG_FUTEX=y 77CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y 78CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y 79CONFIG_SIGNALFD=y
71CONFIG_TIMERFD=y 80CONFIG_TIMERFD=y
@@ -74,6 +83,7 @@ CONFIG_SHMEM=y
74CONFIG_AIO=y 83CONFIG_AIO=y
75CONFIG_VM_EVENT_COUNTERS=y 84CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_PCI_QUIRKS=y 85CONFIG_PCI_QUIRKS=y
86CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 87CONFIG_SLAB=y
78# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
@@ -113,11 +123,6 @@ CONFIG_DEFAULT_AS=y
113# CONFIG_DEFAULT_CFQ is not set 123# CONFIG_DEFAULT_CFQ is not set
114# CONFIG_DEFAULT_NOOP is not set 124# CONFIG_DEFAULT_NOOP is not set
115CONFIG_DEFAULT_IOSCHED="anticipatory" 125CONFIG_DEFAULT_IOSCHED="anticipatory"
116CONFIG_CLASSIC_RCU=y
117# CONFIG_TREE_RCU is not set
118# CONFIG_PREEMPT_RCU is not set
119# CONFIG_TREE_RCU_TRACE is not set
120# CONFIG_PREEMPT_RCU_TRACE is not set
121# CONFIG_FREEZER is not set 126# CONFIG_FREEZER is not set
122 127
123# 128#
@@ -152,6 +157,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
152# CONFIG_CPU_SUBTYPE_SH7770 is not set 157# CONFIG_CPU_SUBTYPE_SH7770 is not set
153# CONFIG_CPU_SUBTYPE_SH7780 is not set 158# CONFIG_CPU_SUBTYPE_SH7780 is not set
154# CONFIG_CPU_SUBTYPE_SH7785 is not set 159# CONFIG_CPU_SUBTYPE_SH7785 is not set
160# CONFIG_CPU_SUBTYPE_SH7786 is not set
155# CONFIG_CPU_SUBTYPE_SHX3 is not set 161# CONFIG_CPU_SUBTYPE_SHX3 is not set
156# CONFIG_CPU_SUBTYPE_SH7343 is not set 162# CONFIG_CPU_SUBTYPE_SH7343 is not set
157# CONFIG_CPU_SUBTYPE_SH7722 is not set 163# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -193,11 +199,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
193CONFIG_ZONE_DMA_FLAG=0 199CONFIG_ZONE_DMA_FLAG=0
194CONFIG_NR_QUICK=2 200CONFIG_NR_QUICK=2
195CONFIG_UNEVICTABLE_LRU=y 201CONFIG_UNEVICTABLE_LRU=y
202CONFIG_HAVE_MLOCK=y
203CONFIG_HAVE_MLOCKED_PAGE_BIT=y
196 204
197# 205#
198# Cache configuration 206# Cache configuration
199# 207#
200# CONFIG_SH_DIRECT_MAPPED is not set
201CONFIG_CACHE_WRITEBACK=y 208CONFIG_CACHE_WRITEBACK=y
202# CONFIG_CACHE_WRITETHROUGH is not set 209# CONFIG_CACHE_WRITETHROUGH is not set
203# CONFIG_CACHE_OFF is not set 210# CONFIG_CACHE_OFF is not set
@@ -290,6 +297,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
290# CONFIG_PCIEPORTBUS is not set 297# CONFIG_PCIEPORTBUS is not set
291# CONFIG_ARCH_SUPPORTS_MSI is not set 298# CONFIG_ARCH_SUPPORTS_MSI is not set
292CONFIG_PCI_LEGACY=y 299CONFIG_PCI_LEGACY=y
300# CONFIG_PCI_STUB is not set
301# CONFIG_PCI_IOV is not set
293CONFIG_PCCARD=y 302CONFIG_PCCARD=y
294# CONFIG_PCMCIA_DEBUG is not set 303# CONFIG_PCMCIA_DEBUG is not set
295CONFIG_PCMCIA=y 304CONFIG_PCMCIA=y
@@ -329,7 +338,6 @@ CONFIG_NET=y
329# 338#
330# Networking options 339# Networking options
331# 340#
332CONFIG_COMPAT_NET_DEV_OPS=y
333CONFIG_PACKET=y 341CONFIG_PACKET=y
334# CONFIG_PACKET_MMAP is not set 342# CONFIG_PACKET_MMAP is not set
335CONFIG_UNIX=y 343CONFIG_UNIX=y
@@ -410,6 +418,7 @@ CONFIG_ATALK=m
410# CONFIG_LAPB is not set 418# CONFIG_LAPB is not set
411# CONFIG_ECONET is not set 419# CONFIG_ECONET is not set
412# CONFIG_WAN_ROUTER is not set 420# CONFIG_WAN_ROUTER is not set
421# CONFIG_PHONET is not set
413# CONFIG_NET_SCHED is not set 422# CONFIG_NET_SCHED is not set
414# CONFIG_DCB is not set 423# CONFIG_DCB is not set
415 424
@@ -422,13 +431,13 @@ CONFIG_ATALK=m
422# CONFIG_IRDA is not set 431# CONFIG_IRDA is not set
423# CONFIG_BT is not set 432# CONFIG_BT is not set
424# CONFIG_AF_RXRPC is not set 433# CONFIG_AF_RXRPC is not set
425# CONFIG_PHONET is not set
426CONFIG_WIRELESS=y 434CONFIG_WIRELESS=y
427# CONFIG_CFG80211 is not set 435# CONFIG_CFG80211 is not set
428# CONFIG_WIRELESS_OLD_REGULATORY is not set 436# CONFIG_WIRELESS_OLD_REGULATORY is not set
429# CONFIG_WIRELESS_EXT is not set 437# CONFIG_WIRELESS_EXT is not set
430# CONFIG_LIB80211 is not set 438# CONFIG_LIB80211 is not set
431# CONFIG_MAC80211 is not set 439# CONFIG_MAC80211 is not set
440# CONFIG_WIMAX is not set
432# CONFIG_RFKILL is not set 441# CONFIG_RFKILL is not set
433# CONFIG_NET_9P is not set 442# CONFIG_NET_9P is not set
434 443
@@ -468,18 +477,23 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
468# CONFIG_BLK_DEV_HD is not set 477# CONFIG_BLK_DEV_HD is not set
469CONFIG_MISC_DEVICES=y 478CONFIG_MISC_DEVICES=y
470# CONFIG_PHANTOM is not set 479# CONFIG_PHANTOM is not set
471# CONFIG_EEPROM_93CX6 is not set
472# CONFIG_SGI_IOC4 is not set 480# CONFIG_SGI_IOC4 is not set
473# CONFIG_TIFM_CORE is not set 481# CONFIG_TIFM_CORE is not set
474# CONFIG_ENCLOSURE_SERVICES is not set 482# CONFIG_ENCLOSURE_SERVICES is not set
475# CONFIG_HP_ILO is not set 483# CONFIG_HP_ILO is not set
476# CONFIG_C2PORT is not set 484# CONFIG_C2PORT is not set
485
486#
487# EEPROM support
488#
489# CONFIG_EEPROM_93CX6 is not set
477CONFIG_HAVE_IDE=y 490CONFIG_HAVE_IDE=y
478CONFIG_IDE=y 491CONFIG_IDE=y
479 492
480# 493#
481# Please see Documentation/ide/ide.txt for help/info on IDE drives 494# Please see Documentation/ide/ide.txt for help/info on IDE drives
482# 495#
496CONFIG_IDE_XFER_MODE=y
483CONFIG_IDE_ATAPI=y 497CONFIG_IDE_ATAPI=y
484# CONFIG_BLK_DEV_IDE_SATA is not set 498# CONFIG_BLK_DEV_IDE_SATA is not set
485CONFIG_IDE_GD=y 499CONFIG_IDE_GD=y
@@ -585,6 +599,7 @@ CONFIG_SCSI_LOWLEVEL=y
585# CONFIG_MEGARAID_NEWGEN is not set 599# CONFIG_MEGARAID_NEWGEN is not set
586# CONFIG_MEGARAID_LEGACY is not set 600# CONFIG_MEGARAID_LEGACY is not set
587# CONFIG_MEGARAID_SAS is not set 601# CONFIG_MEGARAID_SAS is not set
602# CONFIG_SCSI_MPT2SAS is not set
588# CONFIG_SCSI_HPTIOP is not set 603# CONFIG_SCSI_HPTIOP is not set
589# CONFIG_LIBFC is not set 604# CONFIG_LIBFC is not set
590# CONFIG_FCOE is not set 605# CONFIG_FCOE is not set
@@ -607,6 +622,7 @@ CONFIG_SCSI_LOWLEVEL=y
607# CONFIG_SCSI_SRP is not set 622# CONFIG_SCSI_SRP is not set
608# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 623# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
609# CONFIG_SCSI_DH is not set 624# CONFIG_SCSI_DH is not set
625# CONFIG_SCSI_OSD_INITIATOR is not set
610# CONFIG_ATA is not set 626# CONFIG_ATA is not set
611CONFIG_MD=y 627CONFIG_MD=y
612CONFIG_BLK_DEV_MD=m 628CONFIG_BLK_DEV_MD=m
@@ -631,6 +647,7 @@ CONFIG_MD_RAID1=m
631# CONFIG_IEEE1394 is not set 647# CONFIG_IEEE1394 is not set
632# CONFIG_I2O is not set 648# CONFIG_I2O is not set
633CONFIG_NETDEVICES=y 649CONFIG_NETDEVICES=y
650CONFIG_COMPAT_NET_DEV_OPS=y
634# CONFIG_DUMMY is not set 651# CONFIG_DUMMY is not set
635# CONFIG_BONDING is not set 652# CONFIG_BONDING is not set
636# CONFIG_MACVLAN is not set 653# CONFIG_MACVLAN is not set
@@ -648,8 +665,10 @@ CONFIG_MII=y
648# CONFIG_CASSINI is not set 665# CONFIG_CASSINI is not set
649# CONFIG_NET_VENDOR_3COM is not set 666# CONFIG_NET_VENDOR_3COM is not set
650# CONFIG_SMC91X is not set 667# CONFIG_SMC91X is not set
668# CONFIG_ETHOC is not set
651# CONFIG_SMC911X is not set 669# CONFIG_SMC911X is not set
652# CONFIG_SMSC911X is not set 670# CONFIG_SMSC911X is not set
671# CONFIG_DNET is not set
653# CONFIG_NET_TULIP is not set 672# CONFIG_NET_TULIP is not set
654# CONFIG_HP100 is not set 673# CONFIG_HP100 is not set
655# CONFIG_IBM_NEW_EMAC_ZMII is not set 674# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -700,6 +719,7 @@ CONFIG_NETDEV_1000=y
700# CONFIG_QLA3XXX is not set 719# CONFIG_QLA3XXX is not set
701# CONFIG_ATL1 is not set 720# CONFIG_ATL1 is not set
702# CONFIG_ATL1E is not set 721# CONFIG_ATL1E is not set
722# CONFIG_ATL1C is not set
703# CONFIG_JME is not set 723# CONFIG_JME is not set
704CONFIG_NETDEV_10000=y 724CONFIG_NETDEV_10000=y
705# CONFIG_CHELSIO_T1 is not set 725# CONFIG_CHELSIO_T1 is not set
@@ -718,6 +738,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
718# CONFIG_BNX2X is not set 738# CONFIG_BNX2X is not set
719# CONFIG_QLGE is not set 739# CONFIG_QLGE is not set
720# CONFIG_SFC is not set 740# CONFIG_SFC is not set
741# CONFIG_BE2NET is not set
721# CONFIG_TR is not set 742# CONFIG_TR is not set
722 743
723# 744#
@@ -725,7 +746,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
725# 746#
726# CONFIG_WLAN_PRE80211 is not set 747# CONFIG_WLAN_PRE80211 is not set
727# CONFIG_WLAN_80211 is not set 748# CONFIG_WLAN_80211 is not set
728# CONFIG_IWLWIFI_LEDS is not set 749
750#
751# Enable WiMAX (Networking options) to see the WiMAX drivers
752#
729 753
730# 754#
731# USB Network Adapters 755# USB Network Adapters
@@ -814,6 +838,7 @@ CONFIG_LEGACY_PTYS=y
814CONFIG_LEGACY_PTY_COUNT=256 838CONFIG_LEGACY_PTY_COUNT=256
815# CONFIG_IPMI_HANDLER is not set 839# CONFIG_IPMI_HANDLER is not set
816CONFIG_HW_RANDOM=y 840CONFIG_HW_RANDOM=y
841# CONFIG_HW_RANDOM_TIMERIOMEM is not set
817# CONFIG_R3964 is not set 842# CONFIG_R3964 is not set
818# CONFIG_APPLICOM is not set 843# CONFIG_APPLICOM is not set
819 844
@@ -898,6 +923,7 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
898CONFIG_V4L_USB_DRIVERS=y 923CONFIG_V4L_USB_DRIVERS=y
899# CONFIG_USB_VIDEO_CLASS is not set 924# CONFIG_USB_VIDEO_CLASS is not set
900# CONFIG_USB_GSPCA is not set 925# CONFIG_USB_GSPCA is not set
926# CONFIG_VIDEO_HDPVR is not set
901CONFIG_VIDEO_USBVIDEO=m 927CONFIG_VIDEO_USBVIDEO=m
902CONFIG_USB_VICAM=m 928CONFIG_USB_VICAM=m
903CONFIG_USB_IBMCAM=m 929CONFIG_USB_IBMCAM=m
@@ -911,6 +937,7 @@ CONFIG_USB_STV680=m
911# CONFIG_USB_ZC0301 is not set 937# CONFIG_USB_ZC0301 is not set
912CONFIG_USB_PWC=m 938CONFIG_USB_PWC=m
913# CONFIG_USB_PWC_DEBUG is not set 939# CONFIG_USB_PWC_DEBUG is not set
940CONFIG_USB_PWC_INPUT_EVDEV=y
914# CONFIG_USB_ZR364XX is not set 941# CONFIG_USB_ZR364XX is not set
915# CONFIG_USB_STKWEBCAM is not set 942# CONFIG_USB_STKWEBCAM is not set
916# CONFIG_USB_S2255 is not set 943# CONFIG_USB_S2255 is not set
@@ -1020,6 +1047,7 @@ CONFIG_USB_MON=y
1020CONFIG_USB_EHCI_HCD=y 1047CONFIG_USB_EHCI_HCD=y
1021# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1048# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1022# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1049# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1050# CONFIG_USB_OXU210HP_HCD is not set
1023# CONFIG_USB_ISP116X_HCD is not set 1051# CONFIG_USB_ISP116X_HCD is not set
1024# CONFIG_USB_ISP1760_HCD is not set 1052# CONFIG_USB_ISP1760_HCD is not set
1025CONFIG_USB_OHCI_HCD=y 1053CONFIG_USB_OHCI_HCD=y
@@ -1041,22 +1069,21 @@ CONFIG_USB_PRINTER=m
1041# CONFIG_USB_TMC is not set 1069# CONFIG_USB_TMC is not set
1042 1070
1043# 1071#
1044# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1072# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1045# 1073#
1046 1074
1047# 1075#
1048# see USB_STORAGE Help for more information 1076# also be needed; see USB_STORAGE Help for more info
1049# 1077#
1050CONFIG_USB_STORAGE=m 1078CONFIG_USB_STORAGE=m
1051# CONFIG_USB_STORAGE_DEBUG is not set 1079# CONFIG_USB_STORAGE_DEBUG is not set
1052CONFIG_USB_STORAGE_DATAFAB=y 1080CONFIG_USB_STORAGE_DATAFAB=m
1053CONFIG_USB_STORAGE_FREECOM=y 1081CONFIG_USB_STORAGE_FREECOM=m
1054CONFIG_USB_STORAGE_ISD200=y 1082CONFIG_USB_STORAGE_ISD200=m
1055CONFIG_USB_STORAGE_DPCM=y
1056# CONFIG_USB_STORAGE_USBAT is not set 1083# CONFIG_USB_STORAGE_USBAT is not set
1057CONFIG_USB_STORAGE_SDDR09=y 1084CONFIG_USB_STORAGE_SDDR09=m
1058CONFIG_USB_STORAGE_SDDR55=y 1085CONFIG_USB_STORAGE_SDDR55=m
1059CONFIG_USB_STORAGE_JUMPSHOT=y 1086CONFIG_USB_STORAGE_JUMPSHOT=m
1060# CONFIG_USB_STORAGE_ALAUDA is not set 1087# CONFIG_USB_STORAGE_ALAUDA is not set
1061# CONFIG_USB_STORAGE_ONETOUCH is not set 1088# CONFIG_USB_STORAGE_ONETOUCH is not set
1062# CONFIG_USB_STORAGE_KARMA is not set 1089# CONFIG_USB_STORAGE_KARMA is not set
@@ -1081,7 +1108,7 @@ CONFIG_USB_SERIAL=m
1081# CONFIG_USB_SERIAL_CH341 is not set 1108# CONFIG_USB_SERIAL_CH341 is not set
1082# CONFIG_USB_SERIAL_WHITEHEAT is not set 1109# CONFIG_USB_SERIAL_WHITEHEAT is not set
1083# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 1110# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1084# CONFIG_USB_SERIAL_CP2101 is not set 1111# CONFIG_USB_SERIAL_CP210X is not set
1085# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 1112# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1086# CONFIG_USB_SERIAL_EMPEG is not set 1113# CONFIG_USB_SERIAL_EMPEG is not set
1087CONFIG_USB_SERIAL_FTDI_SIO=m 1114CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -1105,15 +1132,19 @@ CONFIG_USB_SERIAL_FTDI_SIO=m
1105# CONFIG_USB_SERIAL_NAVMAN is not set 1132# CONFIG_USB_SERIAL_NAVMAN is not set
1106CONFIG_USB_SERIAL_PL2303=m 1133CONFIG_USB_SERIAL_PL2303=m
1107# CONFIG_USB_SERIAL_OTI6858 is not set 1134# CONFIG_USB_SERIAL_OTI6858 is not set
1135# CONFIG_USB_SERIAL_QUALCOMM is not set
1108# CONFIG_USB_SERIAL_SPCP8X5 is not set 1136# CONFIG_USB_SERIAL_SPCP8X5 is not set
1109# CONFIG_USB_SERIAL_HP4X is not set 1137# CONFIG_USB_SERIAL_HP4X is not set
1110# CONFIG_USB_SERIAL_SAFE is not set 1138# CONFIG_USB_SERIAL_SAFE is not set
1139# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1111# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1140# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1141# CONFIG_USB_SERIAL_SYMBOL is not set
1112# CONFIG_USB_SERIAL_TI is not set 1142# CONFIG_USB_SERIAL_TI is not set
1113# CONFIG_USB_SERIAL_CYBERJACK is not set 1143# CONFIG_USB_SERIAL_CYBERJACK is not set
1114# CONFIG_USB_SERIAL_XIRCOM is not set 1144# CONFIG_USB_SERIAL_XIRCOM is not set
1115# CONFIG_USB_SERIAL_OPTION is not set 1145# CONFIG_USB_SERIAL_OPTION is not set
1116# CONFIG_USB_SERIAL_OMNINET is not set 1146# CONFIG_USB_SERIAL_OMNINET is not set
1147# CONFIG_USB_SERIAL_OPTICON is not set
1117# CONFIG_USB_SERIAL_DEBUG is not set 1148# CONFIG_USB_SERIAL_DEBUG is not set
1118 1149
1119# 1150#
@@ -1130,7 +1161,6 @@ CONFIG_USB_EMI26=m
1130# CONFIG_USB_LED is not set 1161# CONFIG_USB_LED is not set
1131# CONFIG_USB_CYPRESS_CY7C63 is not set 1162# CONFIG_USB_CYPRESS_CY7C63 is not set
1132# CONFIG_USB_CYTHERM is not set 1163# CONFIG_USB_CYTHERM is not set
1133# CONFIG_USB_PHIDGET is not set
1134# CONFIG_USB_IDMOUSE is not set 1164# CONFIG_USB_IDMOUSE is not set
1135# CONFIG_USB_FTDI_ELAN is not set 1165# CONFIG_USB_FTDI_ELAN is not set
1136# CONFIG_USB_APPLEDISPLAY is not set 1166# CONFIG_USB_APPLEDISPLAY is not set
@@ -1143,6 +1173,11 @@ CONFIG_USB_SISUSBVGA_CON=y
1143# CONFIG_USB_ISIGHTFW is not set 1173# CONFIG_USB_ISIGHTFW is not set
1144# CONFIG_USB_VST is not set 1174# CONFIG_USB_VST is not set
1145# CONFIG_USB_GADGET is not set 1175# CONFIG_USB_GADGET is not set
1176
1177#
1178# OTG and related infrastructure
1179#
1180# CONFIG_NOP_USB_XCEIV is not set
1146# CONFIG_UWB is not set 1181# CONFIG_UWB is not set
1147# CONFIG_MMC is not set 1182# CONFIG_MMC is not set
1148# CONFIG_MEMSTICK is not set 1183# CONFIG_MEMSTICK is not set
@@ -1151,6 +1186,7 @@ CONFIG_USB_SISUSBVGA_CON=y
1151# CONFIG_INFINIBAND is not set 1186# CONFIG_INFINIBAND is not set
1152# CONFIG_RTC_CLASS is not set 1187# CONFIG_RTC_CLASS is not set
1153# CONFIG_DMADEVICES is not set 1188# CONFIG_DMADEVICES is not set
1189# CONFIG_AUXDISPLAY is not set
1154# CONFIG_UIO is not set 1190# CONFIG_UIO is not set
1155# CONFIG_STAGING is not set 1191# CONFIG_STAGING is not set
1156 1192
@@ -1176,6 +1212,7 @@ CONFIG_REISERFS_FS=y
1176CONFIG_FILE_LOCKING=y 1212CONFIG_FILE_LOCKING=y
1177# CONFIG_XFS_FS is not set 1213# CONFIG_XFS_FS is not set
1178# CONFIG_OCFS2_FS is not set 1214# CONFIG_OCFS2_FS is not set
1215# CONFIG_BTRFS_FS is not set
1179CONFIG_DNOTIFY=y 1216CONFIG_DNOTIFY=y
1180CONFIG_INOTIFY=y 1217CONFIG_INOTIFY=y
1181CONFIG_INOTIFY_USER=y 1218CONFIG_INOTIFY_USER=y
@@ -1226,6 +1263,7 @@ CONFIG_MISC_FILESYSTEMS=y
1226# CONFIG_BFS_FS is not set 1263# CONFIG_BFS_FS is not set
1227# CONFIG_EFS_FS is not set 1264# CONFIG_EFS_FS is not set
1228# CONFIG_CRAMFS is not set 1265# CONFIG_CRAMFS is not set
1266# CONFIG_SQUASHFS is not set
1229# CONFIG_VXFS_FS is not set 1267# CONFIG_VXFS_FS is not set
1230# CONFIG_MINIX_FS is not set 1268# CONFIG_MINIX_FS is not set
1231# CONFIG_OMFS_FS is not set 1269# CONFIG_OMFS_FS is not set
@@ -1250,7 +1288,6 @@ CONFIG_LOCKD_V4=y
1250CONFIG_EXPORTFS=m 1288CONFIG_EXPORTFS=m
1251CONFIG_NFS_COMMON=y 1289CONFIG_NFS_COMMON=y
1252CONFIG_SUNRPC=m 1290CONFIG_SUNRPC=m
1253# CONFIG_SUNRPC_REGISTER_V4 is not set
1254# CONFIG_RPCSEC_GSS_KRB5 is not set 1291# CONFIG_RPCSEC_GSS_KRB5 is not set
1255# CONFIG_RPCSEC_GSS_SPKM3 is not set 1292# CONFIG_RPCSEC_GSS_SPKM3 is not set
1256CONFIG_SMB_FS=m 1293CONFIG_SMB_FS=m
@@ -1331,7 +1368,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1331# 1368#
1332# Tracers 1369# Tracers
1333# 1370#
1334# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1335# CONFIG_SAMPLES is not set 1371# CONFIG_SAMPLES is not set
1336CONFIG_HAVE_ARCH_KGDB=y 1372CONFIG_HAVE_ARCH_KGDB=y
1337CONFIG_SH_STANDARD_BIOS=y 1373CONFIG_SH_STANDARD_BIOS=y
@@ -1424,6 +1460,7 @@ CONFIG_CRYPTO=y
1424# Compression 1460# Compression
1425# 1461#
1426# CONFIG_CRYPTO_DEFLATE is not set 1462# CONFIG_CRYPTO_DEFLATE is not set
1463# CONFIG_CRYPTO_ZLIB is not set
1427# CONFIG_CRYPTO_LZO is not set 1464# CONFIG_CRYPTO_LZO is not set
1428 1465
1429# 1466#
@@ -1445,7 +1482,7 @@ CONFIG_CRC_T10DIF=y
1445CONFIG_CRC32=y 1482CONFIG_CRC32=y
1446# CONFIG_CRC7 is not set 1483# CONFIG_CRC7 is not set
1447# CONFIG_LIBCRC32C is not set 1484# CONFIG_LIBCRC32C is not set
1448CONFIG_PLIST=y
1449CONFIG_HAS_IOMEM=y 1485CONFIG_HAS_IOMEM=y
1450CONFIG_HAS_IOPORT=y 1486CONFIG_HAS_IOPORT=y
1451CONFIG_HAS_DMA=y 1487CONFIG_HAS_DMA=y
1488CONFIG_NLATTR=y
diff --git a/arch/sh/configs/lboxre2_defconfig b/arch/sh/configs/lboxre2_defconfig
index d5c5a1dbaa62..92c515c4199f 100644
--- a/arch/sh/configs/lboxre2_defconfig
+++ b/arch/sh/configs/lboxre2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:02:46 2009 4# Thu Apr 2 18:06:51 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -42,10 +43,19 @@ CONFIG_SYSVIPC_SYSCTL=y
42# CONFIG_BSD_PROCESS_ACCT is not set 43# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48# CONFIG_GROUP_SCHED is not set 57# CONFIG_GROUP_SCHED is not set
58# CONFIG_CGROUPS is not set
49CONFIG_SYSFS_DEPRECATED=y 59CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y 60CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
@@ -53,6 +63,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
53# CONFIG_BLK_DEV_INITRD is not set 63# CONFIG_BLK_DEV_INITRD is not set
54CONFIG_CC_OPTIMIZE_FOR_SIZE=y 64CONFIG_CC_OPTIMIZE_FOR_SIZE=y
55CONFIG_SYSCTL=y 65CONFIG_SYSCTL=y
66CONFIG_ANON_INODES=y
56CONFIG_EMBEDDED=y 67CONFIG_EMBEDDED=y
57CONFIG_UID16=y 68CONFIG_UID16=y
58# CONFIG_SYSCTL_SYSCALL is not set 69# CONFIG_SYSCTL_SYSCALL is not set
@@ -62,10 +73,8 @@ CONFIG_HOTPLUG=y
62CONFIG_PRINTK=y 73CONFIG_PRINTK=y
63CONFIG_BUG=y 74CONFIG_BUG=y
64CONFIG_ELF_CORE=y 75CONFIG_ELF_CORE=y
65CONFIG_COMPAT_BRK=y
66CONFIG_BASE_FULL=y 76CONFIG_BASE_FULL=y
67CONFIG_FUTEX=y 77CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y 78CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y 79CONFIG_SIGNALFD=y
71CONFIG_TIMERFD=y 80CONFIG_TIMERFD=y
@@ -74,6 +83,7 @@ CONFIG_SHMEM=y
74CONFIG_AIO=y 83CONFIG_AIO=y
75CONFIG_VM_EVENT_COUNTERS=y 84CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_PCI_QUIRKS=y 85CONFIG_PCI_QUIRKS=y
86CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 87CONFIG_SLAB=y
78# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
@@ -113,11 +123,6 @@ CONFIG_DEFAULT_AS=y
113# CONFIG_DEFAULT_CFQ is not set 123# CONFIG_DEFAULT_CFQ is not set
114# CONFIG_DEFAULT_NOOP is not set 124# CONFIG_DEFAULT_NOOP is not set
115CONFIG_DEFAULT_IOSCHED="anticipatory" 125CONFIG_DEFAULT_IOSCHED="anticipatory"
116CONFIG_CLASSIC_RCU=y
117# CONFIG_TREE_RCU is not set
118# CONFIG_PREEMPT_RCU is not set
119# CONFIG_TREE_RCU_TRACE is not set
120# CONFIG_PREEMPT_RCU_TRACE is not set
121# CONFIG_FREEZER is not set 126# CONFIG_FREEZER is not set
122 127
123# 128#
@@ -152,6 +157,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
152# CONFIG_CPU_SUBTYPE_SH7770 is not set 157# CONFIG_CPU_SUBTYPE_SH7770 is not set
153# CONFIG_CPU_SUBTYPE_SH7780 is not set 158# CONFIG_CPU_SUBTYPE_SH7780 is not set
154# CONFIG_CPU_SUBTYPE_SH7785 is not set 159# CONFIG_CPU_SUBTYPE_SH7785 is not set
160# CONFIG_CPU_SUBTYPE_SH7786 is not set
155# CONFIG_CPU_SUBTYPE_SHX3 is not set 161# CONFIG_CPU_SUBTYPE_SHX3 is not set
156# CONFIG_CPU_SUBTYPE_SH7343 is not set 162# CONFIG_CPU_SUBTYPE_SH7343 is not set
157# CONFIG_CPU_SUBTYPE_SH7722 is not set 163# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -193,11 +199,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
193CONFIG_ZONE_DMA_FLAG=0 199CONFIG_ZONE_DMA_FLAG=0
194CONFIG_NR_QUICK=2 200CONFIG_NR_QUICK=2
195CONFIG_UNEVICTABLE_LRU=y 201CONFIG_UNEVICTABLE_LRU=y
202CONFIG_HAVE_MLOCK=y
203CONFIG_HAVE_MLOCKED_PAGE_BIT=y
196 204
197# 205#
198# Cache configuration 206# Cache configuration
199# 207#
200# CONFIG_SH_DIRECT_MAPPED is not set
201CONFIG_CACHE_WRITEBACK=y 208CONFIG_CACHE_WRITEBACK=y
202# CONFIG_CACHE_WRITETHROUGH is not set 209# CONFIG_CACHE_WRITETHROUGH is not set
203# CONFIG_CACHE_OFF is not set 210# CONFIG_CACHE_OFF is not set
@@ -291,6 +298,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
291# CONFIG_PCIEPORTBUS is not set 298# CONFIG_PCIEPORTBUS is not set
292# CONFIG_ARCH_SUPPORTS_MSI is not set 299# CONFIG_ARCH_SUPPORTS_MSI is not set
293CONFIG_PCI_LEGACY=y 300CONFIG_PCI_LEGACY=y
301# CONFIG_PCI_STUB is not set
302# CONFIG_PCI_IOV is not set
294CONFIG_PCCARD=y 303CONFIG_PCCARD=y
295CONFIG_PCMCIA_DEBUG=y 304CONFIG_PCMCIA_DEBUG=y
296CONFIG_PCMCIA=y 305CONFIG_PCMCIA=y
@@ -329,7 +338,6 @@ CONFIG_NET=y
329# 338#
330# Networking options 339# Networking options
331# 340#
332CONFIG_COMPAT_NET_DEV_OPS=y
333CONFIG_PACKET=y 341CONFIG_PACKET=y
334# CONFIG_PACKET_MMAP is not set 342# CONFIG_PACKET_MMAP is not set
335CONFIG_UNIX=y 343CONFIG_UNIX=y
@@ -408,6 +416,7 @@ CONFIG_NETFILTER_ADVANCED=y
408# CONFIG_LAPB is not set 416# CONFIG_LAPB is not set
409# CONFIG_ECONET is not set 417# CONFIG_ECONET is not set
410# CONFIG_WAN_ROUTER is not set 418# CONFIG_WAN_ROUTER is not set
419# CONFIG_PHONET is not set
411# CONFIG_NET_SCHED is not set 420# CONFIG_NET_SCHED is not set
412# CONFIG_DCB is not set 421# CONFIG_DCB is not set
413 422
@@ -420,13 +429,13 @@ CONFIG_NETFILTER_ADVANCED=y
420# CONFIG_IRDA is not set 429# CONFIG_IRDA is not set
421# CONFIG_BT is not set 430# CONFIG_BT is not set
422# CONFIG_AF_RXRPC is not set 431# CONFIG_AF_RXRPC is not set
423# CONFIG_PHONET is not set
424CONFIG_WIRELESS=y 432CONFIG_WIRELESS=y
425# CONFIG_CFG80211 is not set 433# CONFIG_CFG80211 is not set
426# CONFIG_WIRELESS_OLD_REGULATORY is not set 434# CONFIG_WIRELESS_OLD_REGULATORY is not set
427# CONFIG_WIRELESS_EXT is not set 435# CONFIG_WIRELESS_EXT is not set
428# CONFIG_LIB80211 is not set 436# CONFIG_LIB80211 is not set
429# CONFIG_MAC80211 is not set 437# CONFIG_MAC80211 is not set
438# CONFIG_WIMAX is not set
430# CONFIG_RFKILL is not set 439# CONFIG_RFKILL is not set
431# CONFIG_NET_9P is not set 440# CONFIG_NET_9P is not set
432 441
@@ -465,12 +474,16 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
465# CONFIG_BLK_DEV_HD is not set 474# CONFIG_BLK_DEV_HD is not set
466CONFIG_MISC_DEVICES=y 475CONFIG_MISC_DEVICES=y
467# CONFIG_PHANTOM is not set 476# CONFIG_PHANTOM is not set
468# CONFIG_EEPROM_93CX6 is not set
469# CONFIG_SGI_IOC4 is not set 477# CONFIG_SGI_IOC4 is not set
470# CONFIG_TIFM_CORE is not set 478# CONFIG_TIFM_CORE is not set
471# CONFIG_ENCLOSURE_SERVICES is not set 479# CONFIG_ENCLOSURE_SERVICES is not set
472# CONFIG_HP_ILO is not set 480# CONFIG_HP_ILO is not set
473# CONFIG_C2PORT is not set 481# CONFIG_C2PORT is not set
482
483#
484# EEPROM support
485#
486# CONFIG_EEPROM_93CX6 is not set
474CONFIG_HAVE_IDE=y 487CONFIG_HAVE_IDE=y
475# CONFIG_IDE is not set 488# CONFIG_IDE is not set
476 489
@@ -526,6 +539,7 @@ CONFIG_SCSI_LOWLEVEL=y
526# CONFIG_MEGARAID_NEWGEN is not set 539# CONFIG_MEGARAID_NEWGEN is not set
527# CONFIG_MEGARAID_LEGACY is not set 540# CONFIG_MEGARAID_LEGACY is not set
528# CONFIG_MEGARAID_SAS is not set 541# CONFIG_MEGARAID_SAS is not set
542# CONFIG_SCSI_MPT2SAS is not set
529# CONFIG_SCSI_HPTIOP is not set 543# CONFIG_SCSI_HPTIOP is not set
530# CONFIG_LIBFC is not set 544# CONFIG_LIBFC is not set
531# CONFIG_FCOE is not set 545# CONFIG_FCOE is not set
@@ -549,6 +563,7 @@ CONFIG_SCSI_LOWLEVEL=y
549# CONFIG_SCSI_SRP is not set 563# CONFIG_SCSI_SRP is not set
550# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 564# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
551# CONFIG_SCSI_DH is not set 565# CONFIG_SCSI_DH is not set
566# CONFIG_SCSI_OSD_INITIATOR is not set
552CONFIG_ATA=y 567CONFIG_ATA=y
553# CONFIG_ATA_NONSTANDARD is not set 568# CONFIG_ATA_NONSTANDARD is not set
554CONFIG_SATA_PMP=y 569CONFIG_SATA_PMP=y
@@ -624,6 +639,7 @@ CONFIG_PATA_PLATFORM=y
624# CONFIG_IEEE1394 is not set 639# CONFIG_IEEE1394 is not set
625# CONFIG_I2O is not set 640# CONFIG_I2O is not set
626CONFIG_NETDEVICES=y 641CONFIG_NETDEVICES=y
642CONFIG_COMPAT_NET_DEV_OPS=y
627# CONFIG_DUMMY is not set 643# CONFIG_DUMMY is not set
628# CONFIG_BONDING is not set 644# CONFIG_BONDING is not set
629# CONFIG_MACVLAN is not set 645# CONFIG_MACVLAN is not set
@@ -641,8 +657,10 @@ CONFIG_MII=y
641# CONFIG_CASSINI is not set 657# CONFIG_CASSINI is not set
642# CONFIG_NET_VENDOR_3COM is not set 658# CONFIG_NET_VENDOR_3COM is not set
643# CONFIG_SMC91X is not set 659# CONFIG_SMC91X is not set
660# CONFIG_ETHOC is not set
644# CONFIG_SMC911X is not set 661# CONFIG_SMC911X is not set
645# CONFIG_SMSC911X is not set 662# CONFIG_SMSC911X is not set
663# CONFIG_DNET is not set
646# CONFIG_NET_TULIP is not set 664# CONFIG_NET_TULIP is not set
647# CONFIG_HP100 is not set 665# CONFIG_HP100 is not set
648# CONFIG_IBM_NEW_EMAC_ZMII is not set 666# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -697,6 +715,7 @@ CONFIG_NETDEV_1000=y
697# CONFIG_QLA3XXX is not set 715# CONFIG_QLA3XXX is not set
698# CONFIG_ATL1 is not set 716# CONFIG_ATL1 is not set
699# CONFIG_ATL1E is not set 717# CONFIG_ATL1E is not set
718# CONFIG_ATL1C is not set
700# CONFIG_JME is not set 719# CONFIG_JME is not set
701CONFIG_NETDEV_10000=y 720CONFIG_NETDEV_10000=y
702# CONFIG_CHELSIO_T1 is not set 721# CONFIG_CHELSIO_T1 is not set
@@ -715,6 +734,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
715# CONFIG_BNX2X is not set 734# CONFIG_BNX2X is not set
716# CONFIG_QLGE is not set 735# CONFIG_QLGE is not set
717# CONFIG_SFC is not set 736# CONFIG_SFC is not set
737# CONFIG_BE2NET is not set
718# CONFIG_TR is not set 738# CONFIG_TR is not set
719 739
720# 740#
@@ -722,7 +742,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
722# 742#
723# CONFIG_WLAN_PRE80211 is not set 743# CONFIG_WLAN_PRE80211 is not set
724# CONFIG_WLAN_80211 is not set 744# CONFIG_WLAN_80211 is not set
725# CONFIG_IWLWIFI_LEDS is not set 745
746#
747# Enable WiMAX (Networking options) to see the WiMAX drivers
748#
726CONFIG_NET_PCMCIA=y 749CONFIG_NET_PCMCIA=y
727# CONFIG_PCMCIA_3C589 is not set 750# CONFIG_PCMCIA_3C589 is not set
728# CONFIG_PCMCIA_3C574 is not set 751# CONFIG_PCMCIA_3C574 is not set
@@ -810,6 +833,7 @@ CONFIG_LEGACY_PTYS=y
810CONFIG_LEGACY_PTY_COUNT=256 833CONFIG_LEGACY_PTY_COUNT=256
811# CONFIG_IPMI_HANDLER is not set 834# CONFIG_IPMI_HANDLER is not set
812CONFIG_HW_RANDOM=y 835CONFIG_HW_RANDOM=y
836# CONFIG_HW_RANDOM_TIMERIOMEM is not set
813# CONFIG_R3964 is not set 837# CONFIG_R3964 is not set
814# CONFIG_APPLICOM is not set 838# CONFIG_APPLICOM is not set
815 839
@@ -921,9 +945,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
921# 945#
922 946
923# 947#
924# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 948# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
925# 949#
926# CONFIG_USB_GADGET is not set 950# CONFIG_USB_GADGET is not set
951
952#
953# OTG and related infrastructure
954#
927# CONFIG_UWB is not set 955# CONFIG_UWB is not set
928# CONFIG_MMC is not set 956# CONFIG_MMC is not set
929# CONFIG_MEMSTICK is not set 957# CONFIG_MEMSTICK is not set
@@ -968,6 +996,7 @@ CONFIG_RTC_INTF_DEV=y
968# 996#
969# CONFIG_RTC_DRV_SH is not set 997# CONFIG_RTC_DRV_SH is not set
970# CONFIG_DMADEVICES is not set 998# CONFIG_DMADEVICES is not set
999# CONFIG_AUXDISPLAY is not set
971# CONFIG_UIO is not set 1000# CONFIG_UIO is not set
972# CONFIG_STAGING is not set 1001# CONFIG_STAGING is not set
973 1002
@@ -990,6 +1019,7 @@ CONFIG_FS_MBCACHE=y
990CONFIG_FILE_LOCKING=y 1019CONFIG_FILE_LOCKING=y
991# CONFIG_XFS_FS is not set 1020# CONFIG_XFS_FS is not set
992# CONFIG_OCFS2_FS is not set 1021# CONFIG_OCFS2_FS is not set
1022# CONFIG_BTRFS_FS is not set
993CONFIG_DNOTIFY=y 1023CONFIG_DNOTIFY=y
994CONFIG_INOTIFY=y 1024CONFIG_INOTIFY=y
995CONFIG_INOTIFY_USER=y 1025CONFIG_INOTIFY_USER=y
@@ -1036,6 +1066,7 @@ CONFIG_MISC_FILESYSTEMS=y
1036# CONFIG_BFS_FS is not set 1066# CONFIG_BFS_FS is not set
1037# CONFIG_EFS_FS is not set 1067# CONFIG_EFS_FS is not set
1038# CONFIG_CRAMFS is not set 1068# CONFIG_CRAMFS is not set
1069# CONFIG_SQUASHFS is not set
1039# CONFIG_VXFS_FS is not set 1070# CONFIG_VXFS_FS is not set
1040# CONFIG_MINIX_FS is not set 1071# CONFIG_MINIX_FS is not set
1041# CONFIG_OMFS_FS is not set 1072# CONFIG_OMFS_FS is not set
@@ -1124,7 +1155,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1124# 1155#
1125# Tracers 1156# Tracers
1126# 1157#
1127# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1128# CONFIG_SAMPLES is not set 1158# CONFIG_SAMPLES is not set
1129CONFIG_HAVE_ARCH_KGDB=y 1159CONFIG_HAVE_ARCH_KGDB=y
1130CONFIG_SH_STANDARD_BIOS=y 1160CONFIG_SH_STANDARD_BIOS=y
@@ -1217,6 +1247,7 @@ CONFIG_CRYPTO=y
1217# Compression 1247# Compression
1218# 1248#
1219# CONFIG_CRYPTO_DEFLATE is not set 1249# CONFIG_CRYPTO_DEFLATE is not set
1250# CONFIG_CRYPTO_ZLIB is not set
1220# CONFIG_CRYPTO_LZO is not set 1251# CONFIG_CRYPTO_LZO is not set
1221 1252
1222# 1253#
@@ -1238,7 +1269,7 @@ CONFIG_CRC_T10DIF=y
1238CONFIG_CRC32=y 1269CONFIG_CRC32=y
1239# CONFIG_CRC7 is not set 1270# CONFIG_CRC7 is not set
1240# CONFIG_LIBCRC32C is not set 1271# CONFIG_LIBCRC32C is not set
1241CONFIG_PLIST=y
1242CONFIG_HAS_IOMEM=y 1272CONFIG_HAS_IOMEM=y
1243CONFIG_HAS_IOPORT=y 1273CONFIG_HAS_IOPORT=y
1244CONFIG_HAS_DMA=y 1274CONFIG_HAS_DMA=y
1275CONFIG_NLATTR=y
diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magicpanelr2_defconfig
index 125d8019dc2f..26586c2d64ca 100644
--- a/arch/sh/configs/magicpanelr2_defconfig
+++ b/arch/sh/configs/magicpanelr2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:03:37 2009 4# Thu Apr 2 18:07:39 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_GPIO=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -43,33 +44,44 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44CONFIG_AUDIT=y 45CONFIG_AUDIT=y
45# CONFIG_AUDITSYSCALL is not set 46# CONFIG_AUDITSYSCALL is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
46# CONFIG_IKCONFIG is not set 56# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=17 57CONFIG_LOG_BUF_SHIFT=17
48# CONFIG_CGROUPS is not set
49# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
50CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
51CONFIG_SYSFS_DEPRECATED_V2=y 61CONFIG_SYSFS_DEPRECATED_V2=y
52CONFIG_RELAY=y 62CONFIG_RELAY=y
53# CONFIG_NAMESPACES is not set 63# CONFIG_NAMESPACES is not set
54CONFIG_BLK_DEV_INITRD=y 64CONFIG_BLK_DEV_INITRD=y
55CONFIG_INITRAMFS_SOURCE="" 65CONFIG_INITRAMFS_SOURCE=""
66CONFIG_RD_GZIP=y
67# CONFIG_RD_BZIP2 is not set
68# CONFIG_RD_LZMA is not set
69CONFIG_INITRAMFS_COMPRESSION_NONE=y
56# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 70# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
57CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
72CONFIG_ANON_INODES=y
58CONFIG_EMBEDDED=y 73CONFIG_EMBEDDED=y
59CONFIG_UID16=y 74CONFIG_UID16=y
60CONFIG_SYSCTL_SYSCALL=y 75CONFIG_SYSCTL_SYSCALL=y
61CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
62CONFIG_KALLSYMS_ALL=y 77CONFIG_KALLSYMS_ALL=y
63CONFIG_KALLSYMS_STRIP_GENERATED=y
64# CONFIG_KALLSYMS_EXTRA_PASS is not set 78# CONFIG_KALLSYMS_EXTRA_PASS is not set
65CONFIG_HOTPLUG=y 79CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y 80CONFIG_PRINTK=y
67CONFIG_BUG=y 81CONFIG_BUG=y
68CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
69CONFIG_COMPAT_BRK=y
70CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
71CONFIG_FUTEX=y 84CONFIG_FUTEX=y
72CONFIG_ANON_INODES=y
73CONFIG_EPOLL=y 85CONFIG_EPOLL=y
74CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
75CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -77,6 +89,7 @@ CONFIG_EVENTFD=y
77CONFIG_SHMEM=y 89CONFIG_SHMEM=y
78CONFIG_AIO=y 90CONFIG_AIO=y
79CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_COMPAT_BRK=y
80CONFIG_SLAB=y 93CONFIG_SLAB=y
81# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
@@ -116,11 +129,6 @@ CONFIG_IOSCHED_NOOP=y
116# CONFIG_DEFAULT_CFQ is not set 129# CONFIG_DEFAULT_CFQ is not set
117CONFIG_DEFAULT_NOOP=y 130CONFIG_DEFAULT_NOOP=y
118CONFIG_DEFAULT_IOSCHED="noop" 131CONFIG_DEFAULT_IOSCHED="noop"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 132# CONFIG_FREEZER is not set
125 133
126# 134#
@@ -155,6 +163,7 @@ CONFIG_CPU_SUBTYPE_SH7720=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 163# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 164# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 165# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 167# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 168# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 169# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +205,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 205CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 206CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 207CONFIG_UNEVICTABLE_LRU=y
208CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 210
200# 211#
201# Cache configuration 212# Cache configuration
202# 213#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 214CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 215# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 216# CONFIG_CACHE_OFF is not set
@@ -309,7 +319,6 @@ CONFIG_NET=y
309# 319#
310# Networking options 320# Networking options
311# 321#
312CONFIG_COMPAT_NET_DEV_OPS=y
313CONFIG_PACKET=y 322CONFIG_PACKET=y
314CONFIG_PACKET_MMAP=y 323CONFIG_PACKET_MMAP=y
315CONFIG_UNIX=y 324CONFIG_UNIX=y
@@ -359,6 +368,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
359# CONFIG_LAPB is not set 368# CONFIG_LAPB is not set
360# CONFIG_ECONET is not set 369# CONFIG_ECONET is not set
361# CONFIG_WAN_ROUTER is not set 370# CONFIG_WAN_ROUTER is not set
371# CONFIG_PHONET is not set
362# CONFIG_NET_SCHED is not set 372# CONFIG_NET_SCHED is not set
363# CONFIG_DCB is not set 373# CONFIG_DCB is not set
364 374
@@ -371,13 +381,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_IRDA is not set 381# CONFIG_IRDA is not set
372# CONFIG_BT is not set 382# CONFIG_BT is not set
373# CONFIG_AF_RXRPC is not set 383# CONFIG_AF_RXRPC is not set
374# CONFIG_PHONET is not set
375CONFIG_WIRELESS=y 384CONFIG_WIRELESS=y
376# CONFIG_CFG80211 is not set 385# CONFIG_CFG80211 is not set
377# CONFIG_WIRELESS_OLD_REGULATORY is not set 386# CONFIG_WIRELESS_OLD_REGULATORY is not set
378# CONFIG_WIRELESS_EXT is not set 387# CONFIG_WIRELESS_EXT is not set
379# CONFIG_LIB80211 is not set 388# CONFIG_LIB80211 is not set
380# CONFIG_MAC80211 is not set 389# CONFIG_MAC80211 is not set
390# CONFIG_WIMAX is not set
381# CONFIG_RFKILL is not set 391# CONFIG_RFKILL is not set
382# CONFIG_NET_9P is not set 392# CONFIG_NET_9P is not set
383 393
@@ -402,6 +412,7 @@ CONFIG_MTD=y
402# CONFIG_MTD_DEBUG is not set 412# CONFIG_MTD_DEBUG is not set
403# CONFIG_MTD_CONCAT is not set 413# CONFIG_MTD_CONCAT is not set
404CONFIG_MTD_PARTITIONS=y 414CONFIG_MTD_PARTITIONS=y
415# CONFIG_MTD_TESTS is not set
405CONFIG_MTD_REDBOOT_PARTS=y 416CONFIG_MTD_REDBOOT_PARTS=y
406CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 417CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
407# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 418# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -452,9 +463,7 @@ CONFIG_MTD_CFI_UTIL=y
452# 463#
453# CONFIG_MTD_COMPLEX_MAPPINGS is not set 464# CONFIG_MTD_COMPLEX_MAPPINGS is not set
454CONFIG_MTD_PHYSMAP=y 465CONFIG_MTD_PHYSMAP=y
455CONFIG_MTD_PHYSMAP_START=0x0000000 466# CONFIG_MTD_PHYSMAP_COMPAT is not set
456CONFIG_MTD_PHYSMAP_LEN=0
457CONFIG_MTD_PHYSMAP_BANKWIDTH=0
458# CONFIG_MTD_PLATRAM is not set 467# CONFIG_MTD_PLATRAM is not set
459 468
460# 469#
@@ -475,6 +484,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
475# CONFIG_MTD_ONENAND is not set 484# CONFIG_MTD_ONENAND is not set
476 485
477# 486#
487# LPDDR flash memory drivers
488#
489# CONFIG_MTD_LPDDR is not set
490
491#
478# UBI - Unsorted block images 492# UBI - Unsorted block images
479# 493#
480# CONFIG_MTD_UBI is not set 494# CONFIG_MTD_UBI is not set
@@ -491,9 +505,13 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
491# CONFIG_ATA_OVER_ETH is not set 505# CONFIG_ATA_OVER_ETH is not set
492# CONFIG_BLK_DEV_HD is not set 506# CONFIG_BLK_DEV_HD is not set
493CONFIG_MISC_DEVICES=y 507CONFIG_MISC_DEVICES=y
494# CONFIG_EEPROM_93CX6 is not set
495# CONFIG_ENCLOSURE_SERVICES is not set 508# CONFIG_ENCLOSURE_SERVICES is not set
496# CONFIG_C2PORT is not set 509# CONFIG_C2PORT is not set
510
511#
512# EEPROM support
513#
514# CONFIG_EEPROM_93CX6 is not set
497CONFIG_HAVE_IDE=y 515CONFIG_HAVE_IDE=y
498# CONFIG_IDE is not set 516# CONFIG_IDE is not set
499 517
@@ -507,6 +525,7 @@ CONFIG_HAVE_IDE=y
507# CONFIG_ATA is not set 525# CONFIG_ATA is not set
508# CONFIG_MD is not set 526# CONFIG_MD is not set
509CONFIG_NETDEVICES=y 527CONFIG_NETDEVICES=y
528CONFIG_COMPAT_NET_DEV_OPS=y
510# CONFIG_DUMMY is not set 529# CONFIG_DUMMY is not set
511# CONFIG_BONDING is not set 530# CONFIG_BONDING is not set
512# CONFIG_MACVLAN is not set 531# CONFIG_MACVLAN is not set
@@ -538,8 +557,10 @@ CONFIG_MII=y
538# CONFIG_AX88796 is not set 557# CONFIG_AX88796 is not set
539# CONFIG_STNIC is not set 558# CONFIG_STNIC is not set
540# CONFIG_SMC91X is not set 559# CONFIG_SMC91X is not set
560# CONFIG_ETHOC is not set
541# CONFIG_SMC911X is not set 561# CONFIG_SMC911X is not set
542CONFIG_SMSC911X=y 562CONFIG_SMSC911X=y
563# CONFIG_DNET is not set
543# CONFIG_IBM_NEW_EMAC_ZMII is not set 564# CONFIG_IBM_NEW_EMAC_ZMII is not set
544# CONFIG_IBM_NEW_EMAC_RGMII is not set 565# CONFIG_IBM_NEW_EMAC_RGMII is not set
545# CONFIG_IBM_NEW_EMAC_TAH is not set 566# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -556,7 +577,10 @@ CONFIG_SMSC911X=y
556# 577#
557# CONFIG_WLAN_PRE80211 is not set 578# CONFIG_WLAN_PRE80211 is not set
558# CONFIG_WLAN_80211 is not set 579# CONFIG_WLAN_80211 is not set
559# CONFIG_IWLWIFI_LEDS is not set 580
581#
582# Enable WiMAX (Networking options) to see the WiMAX drivers
583#
560# CONFIG_WAN is not set 584# CONFIG_WAN is not set
561# CONFIG_PPP is not set 585# CONFIG_PPP is not set
562# CONFIG_SLIP is not set 586# CONFIG_SLIP is not set
@@ -778,6 +802,7 @@ CONFIG_RTC_INTF_DEV=y
778# 802#
779CONFIG_RTC_DRV_SH=y 803CONFIG_RTC_DRV_SH=y
780# CONFIG_DMADEVICES is not set 804# CONFIG_DMADEVICES is not set
805# CONFIG_AUXDISPLAY is not set
781# CONFIG_UIO is not set 806# CONFIG_UIO is not set
782# CONFIG_STAGING is not set 807# CONFIG_STAGING is not set
783 808
@@ -797,6 +822,7 @@ CONFIG_JBD=y
797CONFIG_FILE_LOCKING=y 822CONFIG_FILE_LOCKING=y
798# CONFIG_XFS_FS is not set 823# CONFIG_XFS_FS is not set
799# CONFIG_OCFS2_FS is not set 824# CONFIG_OCFS2_FS is not set
825# CONFIG_BTRFS_FS is not set
800# CONFIG_DNOTIFY is not set 826# CONFIG_DNOTIFY is not set
801# CONFIG_INOTIFY is not set 827# CONFIG_INOTIFY is not set
802# CONFIG_QUOTA is not set 828# CONFIG_QUOTA is not set
@@ -849,6 +875,7 @@ CONFIG_JFFS2_ZLIB=y
849CONFIG_JFFS2_RTIME=y 875CONFIG_JFFS2_RTIME=y
850# CONFIG_JFFS2_RUBIN is not set 876# CONFIG_JFFS2_RUBIN is not set
851# CONFIG_CRAMFS is not set 877# CONFIG_CRAMFS is not set
878# CONFIG_SQUASHFS is not set
852# CONFIG_VXFS_FS is not set 879# CONFIG_VXFS_FS is not set
853# CONFIG_MINIX_FS is not set 880# CONFIG_MINIX_FS is not set
854# CONFIG_OMFS_FS is not set 881# CONFIG_OMFS_FS is not set
@@ -868,7 +895,6 @@ CONFIG_LOCKD=y
868CONFIG_LOCKD_V4=y 895CONFIG_LOCKD_V4=y
869CONFIG_NFS_COMMON=y 896CONFIG_NFS_COMMON=y
870CONFIG_SUNRPC=y 897CONFIG_SUNRPC=y
871# CONFIG_SUNRPC_REGISTER_V4 is not set
872# CONFIG_RPCSEC_GSS_KRB5 is not set 898# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set 899# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set 900# CONFIG_SMB_FS is not set
@@ -970,6 +996,7 @@ CONFIG_FRAME_POINTER=y
970# CONFIG_FAULT_INJECTION is not set 996# CONFIG_FAULT_INJECTION is not set
971# CONFIG_LATENCYTOP is not set 997# CONFIG_LATENCYTOP is not set
972CONFIG_SYSCTL_SYSCALL_CHECK=y 998CONFIG_SYSCTL_SYSCALL_CHECK=y
999# CONFIG_PAGE_POISONING is not set
973CONFIG_HAVE_FUNCTION_TRACER=y 1000CONFIG_HAVE_FUNCTION_TRACER=y
974CONFIG_HAVE_DYNAMIC_FTRACE=y 1001CONFIG_HAVE_DYNAMIC_FTRACE=y
975CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1002CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -984,7 +1011,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
984# CONFIG_BOOT_TRACER is not set 1011# CONFIG_BOOT_TRACER is not set
985# CONFIG_TRACE_BRANCH_PROFILING is not set 1012# CONFIG_TRACE_BRANCH_PROFILING is not set
986# CONFIG_STACK_TRACER is not set 1013# CONFIG_STACK_TRACER is not set
987# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
988# CONFIG_SAMPLES is not set 1014# CONFIG_SAMPLES is not set
989CONFIG_HAVE_ARCH_KGDB=y 1015CONFIG_HAVE_ARCH_KGDB=y
990# CONFIG_KGDB is not set 1016# CONFIG_KGDB is not set
@@ -1025,7 +1051,8 @@ CONFIG_CRC32=y
1025CONFIG_AUDIT_GENERIC=y 1051CONFIG_AUDIT_GENERIC=y
1026CONFIG_ZLIB_INFLATE=y 1052CONFIG_ZLIB_INFLATE=y
1027CONFIG_ZLIB_DEFLATE=y 1053CONFIG_ZLIB_DEFLATE=y
1028CONFIG_PLIST=y 1054CONFIG_DECOMPRESS_GZIP=y
1029CONFIG_HAS_IOMEM=y 1055CONFIG_HAS_IOMEM=y
1030CONFIG_HAS_IOPORT=y 1056CONFIG_HAS_IOPORT=y
1031CONFIG_HAS_DMA=y 1057CONFIG_HAS_DMA=y
1058CONFIG_NLATTR=y
diff --git a/arch/sh/configs/microdev_defconfig b/arch/sh/configs/microdev_defconfig
index 5a1c0485a354..75178355d69a 100644
--- a/arch/sh/configs/microdev_defconfig
+++ b/arch/sh/configs/microdev_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:06:47 2009 4# Thu Apr 2 18:11:13 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -42,18 +43,32 @@ CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set 43# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48# CONFIG_GROUP_SCHED is not set 57# CONFIG_GROUP_SCHED is not set
58# CONFIG_CGROUPS is not set
49CONFIG_SYSFS_DEPRECATED=y 59CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y 60CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
52# CONFIG_NAMESPACES is not set 62# CONFIG_NAMESPACES is not set
53CONFIG_BLK_DEV_INITRD=y 63CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE="" 64CONFIG_INITRAMFS_SOURCE=""
65CONFIG_RD_GZIP=y
66# CONFIG_RD_BZIP2 is not set
67# CONFIG_RD_LZMA is not set
68CONFIG_INITRAMFS_COMPRESSION_NONE=y
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y 70CONFIG_SYSCTL=y
71CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 72CONFIG_EMBEDDED=y
58CONFIG_UID16=y 73CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set 74# CONFIG_SYSCTL_SYSCALL is not set
@@ -63,10 +78,8 @@ CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 78CONFIG_PRINTK=y
64CONFIG_BUG=y 79CONFIG_BUG=y
65CONFIG_ELF_CORE=y 80CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 82CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 83CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 84CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 85CONFIG_TIMERFD=y
@@ -74,6 +87,7 @@ CONFIG_EVENTFD=y
74CONFIG_SHMEM=y 87CONFIG_SHMEM=y
75CONFIG_AIO=y 88CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 91CONFIG_SLAB=y
78# CONFIG_SLUB is not set 92# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 93# CONFIG_SLOB is not set
@@ -107,11 +121,6 @@ CONFIG_DEFAULT_AS=y
107# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
108# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
109CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
110CONFIG_CLASSIC_RCU=y
111# CONFIG_TREE_RCU is not set
112# CONFIG_PREEMPT_RCU is not set
113# CONFIG_TREE_RCU_TRACE is not set
114# CONFIG_PREEMPT_RCU_TRACE is not set
115# CONFIG_FREEZER is not set 124# CONFIG_FREEZER is not set
116 125
117# 126#
@@ -146,6 +155,7 @@ CONFIG_CPU_SUBTYPE_SH4_202=y
146# CONFIG_CPU_SUBTYPE_SH7770 is not set 155# CONFIG_CPU_SUBTYPE_SH7770 is not set
147# CONFIG_CPU_SUBTYPE_SH7780 is not set 156# CONFIG_CPU_SUBTYPE_SH7780 is not set
148# CONFIG_CPU_SUBTYPE_SH7785 is not set 157# CONFIG_CPU_SUBTYPE_SH7785 is not set
158# CONFIG_CPU_SUBTYPE_SH7786 is not set
149# CONFIG_CPU_SUBTYPE_SHX3 is not set 159# CONFIG_CPU_SUBTYPE_SHX3 is not set
150# CONFIG_CPU_SUBTYPE_SH7343 is not set 160# CONFIG_CPU_SUBTYPE_SH7343 is not set
151# CONFIG_CPU_SUBTYPE_SH7722 is not set 161# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -193,11 +203,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
193CONFIG_ZONE_DMA_FLAG=0 203CONFIG_ZONE_DMA_FLAG=0
194CONFIG_NR_QUICK=2 204CONFIG_NR_QUICK=2
195CONFIG_UNEVICTABLE_LRU=y 205CONFIG_UNEVICTABLE_LRU=y
206CONFIG_HAVE_MLOCK=y
207CONFIG_HAVE_MLOCKED_PAGE_BIT=y
196 208
197# 209#
198# Cache configuration 210# Cache configuration
199# 211#
200# CONFIG_SH_DIRECT_MAPPED is not set
201CONFIG_CACHE_WRITEBACK=y 212CONFIG_CACHE_WRITEBACK=y
202# CONFIG_CACHE_WRITETHROUGH is not set 213# CONFIG_CACHE_WRITETHROUGH is not set
203# CONFIG_CACHE_OFF is not set 214# CONFIG_CACHE_OFF is not set
@@ -239,7 +250,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
239# 250#
240CONFIG_SH_DMA_API=y 251CONFIG_SH_DMA_API=y
241CONFIG_SH_DMA=y 252CONFIG_SH_DMA=y
242CONFIG_NR_ONCHIP_DMA_CHANNELS=4 253CONFIG_NR_ONCHIP_DMA_CHANNELS=6
243# CONFIG_NR_DMA_CHANNELS_BOOL is not set 254# CONFIG_NR_DMA_CHANNELS_BOOL is not set
244 255
245# 256#
@@ -304,7 +315,6 @@ CONFIG_NET=y
304# 315#
305# Networking options 316# Networking options
306# 317#
307CONFIG_COMPAT_NET_DEV_OPS=y
308# CONFIG_PACKET is not set 318# CONFIG_PACKET is not set
309# CONFIG_UNIX is not set 319# CONFIG_UNIX is not set
310CONFIG_XFRM=y 320CONFIG_XFRM=y
@@ -358,6 +368,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_LAPB is not set 368# CONFIG_LAPB is not set
359# CONFIG_ECONET is not set 369# CONFIG_ECONET is not set
360# CONFIG_WAN_ROUTER is not set 370# CONFIG_WAN_ROUTER is not set
371# CONFIG_PHONET is not set
361# CONFIG_NET_SCHED is not set 372# CONFIG_NET_SCHED is not set
362# CONFIG_DCB is not set 373# CONFIG_DCB is not set
363 374
@@ -370,13 +381,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
370# CONFIG_IRDA is not set 381# CONFIG_IRDA is not set
371# CONFIG_BT is not set 382# CONFIG_BT is not set
372# CONFIG_AF_RXRPC is not set 383# CONFIG_AF_RXRPC is not set
373# CONFIG_PHONET is not set
374CONFIG_WIRELESS=y 384CONFIG_WIRELESS=y
375# CONFIG_CFG80211 is not set 385# CONFIG_CFG80211 is not set
376# CONFIG_WIRELESS_OLD_REGULATORY is not set 386# CONFIG_WIRELESS_OLD_REGULATORY is not set
377# CONFIG_WIRELESS_EXT is not set 387# CONFIG_WIRELESS_EXT is not set
378# CONFIG_LIB80211 is not set 388# CONFIG_LIB80211 is not set
379# CONFIG_MAC80211 is not set 389# CONFIG_MAC80211 is not set
390# CONFIG_WIMAX is not set
380# CONFIG_RFKILL is not set 391# CONFIG_RFKILL is not set
381# CONFIG_NET_9P is not set 392# CONFIG_NET_9P is not set
382 393
@@ -407,9 +418,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
407# CONFIG_ATA_OVER_ETH is not set 418# CONFIG_ATA_OVER_ETH is not set
408# CONFIG_BLK_DEV_HD is not set 419# CONFIG_BLK_DEV_HD is not set
409CONFIG_MISC_DEVICES=y 420CONFIG_MISC_DEVICES=y
410# CONFIG_EEPROM_93CX6 is not set
411# CONFIG_ENCLOSURE_SERVICES is not set 421# CONFIG_ENCLOSURE_SERVICES is not set
412# CONFIG_C2PORT is not set 422# CONFIG_C2PORT is not set
423
424#
425# EEPROM support
426#
427# CONFIG_EEPROM_93CX6 is not set
413CONFIG_HAVE_IDE=y 428CONFIG_HAVE_IDE=y
414CONFIG_IDE=y 429CONFIG_IDE=y
415 430
@@ -443,6 +458,7 @@ CONFIG_IDE_PROC_FS=y
443# CONFIG_ATA is not set 458# CONFIG_ATA is not set
444# CONFIG_MD is not set 459# CONFIG_MD is not set
445CONFIG_NETDEVICES=y 460CONFIG_NETDEVICES=y
461CONFIG_COMPAT_NET_DEV_OPS=y
446# CONFIG_DUMMY is not set 462# CONFIG_DUMMY is not set
447# CONFIG_BONDING is not set 463# CONFIG_BONDING is not set
448# CONFIG_MACVLAN is not set 464# CONFIG_MACVLAN is not set
@@ -455,8 +471,10 @@ CONFIG_MII=y
455# CONFIG_AX88796 is not set 471# CONFIG_AX88796 is not set
456# CONFIG_STNIC is not set 472# CONFIG_STNIC is not set
457CONFIG_SMC91X=y 473CONFIG_SMC91X=y
474# CONFIG_ETHOC is not set
458# CONFIG_SMC911X is not set 475# CONFIG_SMC911X is not set
459# CONFIG_SMSC911X is not set 476# CONFIG_SMSC911X is not set
477# CONFIG_DNET is not set
460# CONFIG_IBM_NEW_EMAC_ZMII is not set 478# CONFIG_IBM_NEW_EMAC_ZMII is not set
461# CONFIG_IBM_NEW_EMAC_RGMII is not set 479# CONFIG_IBM_NEW_EMAC_RGMII is not set
462# CONFIG_IBM_NEW_EMAC_TAH is not set 480# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -473,7 +491,10 @@ CONFIG_NETDEV_10000=y
473# 491#
474# CONFIG_WLAN_PRE80211 is not set 492# CONFIG_WLAN_PRE80211 is not set
475# CONFIG_WLAN_80211 is not set 493# CONFIG_WLAN_80211 is not set
476# CONFIG_IWLWIFI_LEDS is not set 494
495#
496# Enable WiMAX (Networking options) to see the WiMAX drivers
497#
477# CONFIG_WAN is not set 498# CONFIG_WAN is not set
478# CONFIG_PPP is not set 499# CONFIG_PPP is not set
479# CONFIG_SLIP is not set 500# CONFIG_SLIP is not set
@@ -520,6 +541,7 @@ CONFIG_LEGACY_PTYS=y
520CONFIG_LEGACY_PTY_COUNT=256 541CONFIG_LEGACY_PTY_COUNT=256
521# CONFIG_IPMI_HANDLER is not set 542# CONFIG_IPMI_HANDLER is not set
522CONFIG_HW_RANDOM=y 543CONFIG_HW_RANDOM=y
544# CONFIG_HW_RANDOM_TIMERIOMEM is not set
523# CONFIG_R3964 is not set 545# CONFIG_R3964 is not set
524# CONFIG_RAW_DRIVER is not set 546# CONFIG_RAW_DRIVER is not set
525# CONFIG_TCG_TPM is not set 547# CONFIG_TCG_TPM is not set
@@ -601,15 +623,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
601# 623#
602 624
603# 625#
604# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 626# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
605# 627#
606# CONFIG_USB_GADGET is not set 628# CONFIG_USB_GADGET is not set
629
630#
631# OTG and related infrastructure
632#
607# CONFIG_MMC is not set 633# CONFIG_MMC is not set
608# CONFIG_MEMSTICK is not set 634# CONFIG_MEMSTICK is not set
609# CONFIG_NEW_LEDS is not set 635# CONFIG_NEW_LEDS is not set
610# CONFIG_ACCESSIBILITY is not set 636# CONFIG_ACCESSIBILITY is not set
611# CONFIG_RTC_CLASS is not set 637# CONFIG_RTC_CLASS is not set
612# CONFIG_DMADEVICES is not set 638# CONFIG_DMADEVICES is not set
639# CONFIG_AUXDISPLAY is not set
613# CONFIG_UIO is not set 640# CONFIG_UIO is not set
614# CONFIG_STAGING is not set 641# CONFIG_STAGING is not set
615 642
@@ -632,6 +659,7 @@ CONFIG_FS_MBCACHE=y
632CONFIG_FILE_LOCKING=y 659CONFIG_FILE_LOCKING=y
633# CONFIG_XFS_FS is not set 660# CONFIG_XFS_FS is not set
634# CONFIG_OCFS2_FS is not set 661# CONFIG_OCFS2_FS is not set
662# CONFIG_BTRFS_FS is not set
635CONFIG_DNOTIFY=y 663CONFIG_DNOTIFY=y
636CONFIG_INOTIFY=y 664CONFIG_INOTIFY=y
637CONFIG_INOTIFY_USER=y 665CONFIG_INOTIFY_USER=y
@@ -678,6 +706,7 @@ CONFIG_MISC_FILESYSTEMS=y
678# CONFIG_BFS_FS is not set 706# CONFIG_BFS_FS is not set
679# CONFIG_EFS_FS is not set 707# CONFIG_EFS_FS is not set
680# CONFIG_CRAMFS is not set 708# CONFIG_CRAMFS is not set
709# CONFIG_SQUASHFS is not set
681# CONFIG_VXFS_FS is not set 710# CONFIG_VXFS_FS is not set
682# CONFIG_MINIX_FS is not set 711# CONFIG_MINIX_FS is not set
683# CONFIG_OMFS_FS is not set 712# CONFIG_OMFS_FS is not set
@@ -698,7 +727,6 @@ CONFIG_LOCKD_V4=y
698CONFIG_NFS_COMMON=y 727CONFIG_NFS_COMMON=y
699CONFIG_SUNRPC=y 728CONFIG_SUNRPC=y
700CONFIG_SUNRPC_GSS=y 729CONFIG_SUNRPC_GSS=y
701# CONFIG_SUNRPC_REGISTER_V4 is not set
702CONFIG_RPCSEC_GSS_KRB5=y 730CONFIG_RPCSEC_GSS_KRB5=y
703# CONFIG_RPCSEC_GSS_SPKM3 is not set 731# CONFIG_RPCSEC_GSS_SPKM3 is not set
704# CONFIG_SMB_FS is not set 732# CONFIG_SMB_FS is not set
@@ -778,7 +806,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
778# 806#
779# Tracers 807# Tracers
780# 808#
781# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
782# CONFIG_SAMPLES is not set 809# CONFIG_SAMPLES is not set
783CONFIG_HAVE_ARCH_KGDB=y 810CONFIG_HAVE_ARCH_KGDB=y
784# CONFIG_SH_STANDARD_BIOS is not set 811# CONFIG_SH_STANDARD_BIOS is not set
@@ -806,10 +833,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
806CONFIG_CRYPTO_HASH=y 833CONFIG_CRYPTO_HASH=y
807CONFIG_CRYPTO_HASH2=y 834CONFIG_CRYPTO_HASH2=y
808CONFIG_CRYPTO_RNG2=y 835CONFIG_CRYPTO_RNG2=y
836CONFIG_CRYPTO_PCOMP=y
809CONFIG_CRYPTO_MANAGER=y 837CONFIG_CRYPTO_MANAGER=y
810CONFIG_CRYPTO_MANAGER2=y 838CONFIG_CRYPTO_MANAGER2=y
811# CONFIG_CRYPTO_GF128MUL is not set 839# CONFIG_CRYPTO_GF128MUL is not set
812# CONFIG_CRYPTO_NULL is not set 840# CONFIG_CRYPTO_NULL is not set
841CONFIG_CRYPTO_WORKQUEUE=y
813# CONFIG_CRYPTO_CRYPTD is not set 842# CONFIG_CRYPTO_CRYPTD is not set
814# CONFIG_CRYPTO_AUTHENC is not set 843# CONFIG_CRYPTO_AUTHENC is not set
815 844
@@ -877,6 +906,7 @@ CONFIG_CRYPTO_DES=y
877# Compression 906# Compression
878# 907#
879# CONFIG_CRYPTO_DEFLATE is not set 908# CONFIG_CRYPTO_DEFLATE is not set
909# CONFIG_CRYPTO_ZLIB is not set
880# CONFIG_CRYPTO_LZO is not set 910# CONFIG_CRYPTO_LZO is not set
881 911
882# 912#
@@ -897,7 +927,9 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
897CONFIG_CRC32=y 927CONFIG_CRC32=y
898# CONFIG_CRC7 is not set 928# CONFIG_CRC7 is not set
899# CONFIG_LIBCRC32C is not set 929# CONFIG_LIBCRC32C is not set
900CONFIG_PLIST=y 930CONFIG_ZLIB_INFLATE=y
931CONFIG_DECOMPRESS_GZIP=y
901CONFIG_HAS_IOMEM=y 932CONFIG_HAS_IOMEM=y
902CONFIG_HAS_IOPORT=y 933CONFIG_HAS_IOPORT=y
903CONFIG_HAS_DMA=y 934CONFIG_HAS_DMA=y
935CONFIG_NLATTR=y
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index 678576796bdf..a8720f9c6047 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc1 3# Linux kernel version: 2.6.29
4# Thu Jan 22 09:16:16 2009 4# Thu Apr 2 18:14:03 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,15 +16,17 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_CMT=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 31
30# 32#
@@ -42,14 +44,19 @@ CONFIG_SYSVIPC_SYSCTL=y
42# CONFIG_BSD_PROCESS_ACCT is not set 44# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set 45# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
45CONFIG_IKCONFIG=y 56CONFIG_IKCONFIG=y
46CONFIG_IKCONFIG_PROC=y 57CONFIG_IKCONFIG_PROC=y
47CONFIG_LOG_BUF_SHIFT=14 58CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_GROUP_SCHED is not set 59# CONFIG_GROUP_SCHED is not set
49
50#
51# Control Group support
52#
53# CONFIG_CGROUPS is not set 60# CONFIG_CGROUPS is not set
54CONFIG_SYSFS_DEPRECATED=y 61CONFIG_SYSFS_DEPRECATED=y
55CONFIG_SYSFS_DEPRECATED_V2=y 62CONFIG_SYSFS_DEPRECATED_V2=y
@@ -57,8 +64,13 @@ CONFIG_SYSFS_DEPRECATED_V2=y
57# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
58CONFIG_BLK_DEV_INITRD=y 65CONFIG_BLK_DEV_INITRD=y
59CONFIG_INITRAMFS_SOURCE="" 66CONFIG_INITRAMFS_SOURCE=""
67CONFIG_RD_GZIP=y
68# CONFIG_RD_BZIP2 is not set
69# CONFIG_RD_LZMA is not set
70CONFIG_INITRAMFS_COMPRESSION_NONE=y
60# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 71# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
61CONFIG_SYSCTL=y 72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
62CONFIG_EMBEDDED=y 74CONFIG_EMBEDDED=y
63CONFIG_UID16=y 75CONFIG_UID16=y
64# CONFIG_SYSCTL_SYSCALL is not set 76# CONFIG_SYSCTL_SYSCALL is not set
@@ -68,10 +80,8 @@ CONFIG_HOTPLUG=y
68CONFIG_PRINTK=y 80CONFIG_PRINTK=y
69CONFIG_BUG=y 81CONFIG_BUG=y
70CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
71CONFIG_COMPAT_BRK=y
72CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
73CONFIG_FUTEX=y 84CONFIG_FUTEX=y
74CONFIG_ANON_INODES=y
75CONFIG_EPOLL=y 85CONFIG_EPOLL=y
76CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
77CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -79,6 +89,7 @@ CONFIG_EVENTFD=y
79CONFIG_SHMEM=y 89CONFIG_SHMEM=y
80CONFIG_AIO=y 90CONFIG_AIO=y
81CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_COMPAT_BRK=y
82CONFIG_SLAB=y 93CONFIG_SLAB=y
83# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
84# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
@@ -120,11 +131,6 @@ CONFIG_DEFAULT_AS=y
120# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
123CONFIG_CLASSIC_RCU=y
124# CONFIG_TREE_RCU is not set
125# CONFIG_PREEMPT_RCU is not set
126# CONFIG_TREE_RCU_TRACE is not set
127# CONFIG_PREEMPT_RCU_TRACE is not set
128# CONFIG_FREEZER is not set 134# CONFIG_FREEZER is not set
129 135
130# 136#
@@ -134,6 +140,7 @@ CONFIG_CPU_SH4=y
134CONFIG_CPU_SH4A=y 140CONFIG_CPU_SH4A=y
135CONFIG_CPU_SH4AL_DSP=y 141CONFIG_CPU_SH4AL_DSP=y
136CONFIG_CPU_SHX2=y 142CONFIG_CPU_SHX2=y
143CONFIG_ARCH_SHMOBILE=y
137# CONFIG_CPU_SUBTYPE_SH7619 is not set 144# CONFIG_CPU_SUBTYPE_SH7619 is not set
138# CONFIG_CPU_SUBTYPE_SH7201 is not set 145# CONFIG_CPU_SUBTYPE_SH7201 is not set
139# CONFIG_CPU_SUBTYPE_SH7203 is not set 146# CONFIG_CPU_SUBTYPE_SH7203 is not set
@@ -162,6 +169,7 @@ CONFIG_CPU_SHX2=y
162# CONFIG_CPU_SUBTYPE_SH7770 is not set 169# CONFIG_CPU_SUBTYPE_SH7770 is not set
163# CONFIG_CPU_SUBTYPE_SH7780 is not set 170# CONFIG_CPU_SUBTYPE_SH7780 is not set
164# CONFIG_CPU_SUBTYPE_SH7785 is not set 171# CONFIG_CPU_SUBTYPE_SH7785 is not set
172# CONFIG_CPU_SUBTYPE_SH7786 is not set
165# CONFIG_CPU_SUBTYPE_SHX3 is not set 173# CONFIG_CPU_SUBTYPE_SHX3 is not set
166# CONFIG_CPU_SUBTYPE_SH7343 is not set 174# CONFIG_CPU_SUBTYPE_SH7343 is not set
167CONFIG_CPU_SUBTYPE_SH7722=y 175CONFIG_CPU_SUBTYPE_SH7722=y
@@ -209,11 +217,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
209CONFIG_ZONE_DMA_FLAG=0 217CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 218CONFIG_NR_QUICK=2
211CONFIG_UNEVICTABLE_LRU=y 219CONFIG_UNEVICTABLE_LRU=y
220CONFIG_HAVE_MLOCK=y
221CONFIG_HAVE_MLOCKED_PAGE_BIT=y
212 222
213# 223#
214# Cache configuration 224# Cache configuration
215# 225#
216# CONFIG_SH_DIRECT_MAPPED is not set
217CONFIG_CACHE_WRITEBACK=y 226CONFIG_CACHE_WRITEBACK=y
218# CONFIG_CACHE_WRITETHROUGH is not set 227# CONFIG_CACHE_WRITETHROUGH is not set
219# CONFIG_CACHE_OFF is not set 228# CONFIG_CACHE_OFF is not set
@@ -243,6 +252,7 @@ CONFIG_SH_MIGOR_QVGA=y
243# Timer and clock configuration 252# Timer and clock configuration
244# 253#
245CONFIG_SH_TMU=y 254CONFIG_SH_TMU=y
255# CONFIG_SH_TIMER_CMT is not set
246CONFIG_SH_TIMER_IRQ=16 256CONFIG_SH_TIMER_IRQ=16
247CONFIG_SH_PCLK_FREQ=33333333 257CONFIG_SH_PCLK_FREQ=33333333
248# CONFIG_NO_HZ is not set 258# CONFIG_NO_HZ is not set
@@ -318,7 +328,6 @@ CONFIG_NET=y
318# 328#
319# Networking options 329# Networking options
320# 330#
321CONFIG_COMPAT_NET_DEV_OPS=y
322CONFIG_PACKET=y 331CONFIG_PACKET=y
323# CONFIG_PACKET_MMAP is not set 332# CONFIG_PACKET_MMAP is not set
324CONFIG_UNIX=y 333CONFIG_UNIX=y
@@ -373,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_LAPB is not set 382# CONFIG_LAPB is not set
374# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
375# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
385# CONFIG_PHONET is not set
376# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
377# CONFIG_DCB is not set 387# CONFIG_DCB is not set
378 388
@@ -380,12 +390,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
380# Network testing 390# Network testing
381# 391#
382# CONFIG_NET_PKTGEN is not set 392# CONFIG_NET_PKTGEN is not set
393# CONFIG_NET_DROP_MONITOR is not set
383# CONFIG_HAMRADIO is not set 394# CONFIG_HAMRADIO is not set
384# CONFIG_CAN is not set 395# CONFIG_CAN is not set
385# CONFIG_IRDA is not set 396# CONFIG_IRDA is not set
386# CONFIG_BT is not set 397# CONFIG_BT is not set
387# CONFIG_AF_RXRPC is not set 398# CONFIG_AF_RXRPC is not set
388# CONFIG_PHONET is not set
389CONFIG_WIRELESS=y 399CONFIG_WIRELESS=y
390# CONFIG_CFG80211 is not set 400# CONFIG_CFG80211 is not set
391# CONFIG_WIRELESS_OLD_REGULATORY is not set 401# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -495,7 +505,6 @@ CONFIG_MTD_NAND_PLATFORM=y
495# LPDDR flash memory drivers 505# LPDDR flash memory drivers
496# 506#
497# CONFIG_MTD_LPDDR is not set 507# CONFIG_MTD_LPDDR is not set
498# CONFIG_MTD_QINFO_PROBE is not set
499 508
500# 509#
501# UBI - Unsorted block images 510# UBI - Unsorted block images
@@ -514,10 +523,17 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
514# CONFIG_ATA_OVER_ETH is not set 523# CONFIG_ATA_OVER_ETH is not set
515# CONFIG_BLK_DEV_HD is not set 524# CONFIG_BLK_DEV_HD is not set
516CONFIG_MISC_DEVICES=y 525CONFIG_MISC_DEVICES=y
517# CONFIG_EEPROM_93CX6 is not set
518# CONFIG_ICS932S401 is not set 526# CONFIG_ICS932S401 is not set
519# CONFIG_ENCLOSURE_SERVICES is not set 527# CONFIG_ENCLOSURE_SERVICES is not set
528# CONFIG_ISL29003 is not set
520# CONFIG_C2PORT is not set 529# CONFIG_C2PORT is not set
530
531#
532# EEPROM support
533#
534# CONFIG_EEPROM_AT24 is not set
535# CONFIG_EEPROM_LEGACY is not set
536# CONFIG_EEPROM_93CX6 is not set
521CONFIG_HAVE_IDE=y 537CONFIG_HAVE_IDE=y
522# CONFIG_IDE is not set 538# CONFIG_IDE is not set
523 539
@@ -563,9 +579,11 @@ CONFIG_SCSI_LOWLEVEL=y
563# CONFIG_LIBFC is not set 579# CONFIG_LIBFC is not set
564# CONFIG_SCSI_DEBUG is not set 580# CONFIG_SCSI_DEBUG is not set
565# CONFIG_SCSI_DH is not set 581# CONFIG_SCSI_DH is not set
582# CONFIG_SCSI_OSD_INITIATOR is not set
566# CONFIG_ATA is not set 583# CONFIG_ATA is not set
567# CONFIG_MD is not set 584# CONFIG_MD is not set
568CONFIG_NETDEVICES=y 585CONFIG_NETDEVICES=y
586CONFIG_COMPAT_NET_DEV_OPS=y
569# CONFIG_DUMMY is not set 587# CONFIG_DUMMY is not set
570# CONFIG_BONDING is not set 588# CONFIG_BONDING is not set
571# CONFIG_MACVLAN is not set 589# CONFIG_MACVLAN is not set
@@ -578,8 +596,10 @@ CONFIG_MII=y
578# CONFIG_AX88796 is not set 596# CONFIG_AX88796 is not set
579# CONFIG_STNIC is not set 597# CONFIG_STNIC is not set
580CONFIG_SMC91X=y 598CONFIG_SMC91X=y
599# CONFIG_ETHOC is not set
581# CONFIG_SMC911X is not set 600# CONFIG_SMC911X is not set
582# CONFIG_SMSC911X is not set 601# CONFIG_SMSC911X is not set
602# CONFIG_DNET is not set
583# CONFIG_IBM_NEW_EMAC_ZMII is not set 603# CONFIG_IBM_NEW_EMAC_ZMII is not set
584# CONFIG_IBM_NEW_EMAC_RGMII is not set 604# CONFIG_IBM_NEW_EMAC_RGMII is not set
585# CONFIG_IBM_NEW_EMAC_TAH is not set 605# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -596,7 +616,6 @@ CONFIG_SMC91X=y
596# 616#
597# CONFIG_WLAN_PRE80211 is not set 617# CONFIG_WLAN_PRE80211 is not set
598# CONFIG_WLAN_80211 is not set 618# CONFIG_WLAN_80211 is not set
599# CONFIG_IWLWIFI_LEDS is not set
600 619
601# 620#
602# Enable WiMAX (Networking options) to see the WiMAX drivers 621# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -679,6 +698,7 @@ CONFIG_LEGACY_PTYS=y
679CONFIG_LEGACY_PTY_COUNT=256 698CONFIG_LEGACY_PTY_COUNT=256
680# CONFIG_IPMI_HANDLER is not set 699# CONFIG_IPMI_HANDLER is not set
681CONFIG_HW_RANDOM=y 700CONFIG_HW_RANDOM=y
701# CONFIG_HW_RANDOM_TIMERIOMEM is not set
682# CONFIG_R3964 is not set 702# CONFIG_R3964 is not set
683# CONFIG_RAW_DRIVER is not set 703# CONFIG_RAW_DRIVER is not set
684# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
@@ -715,12 +735,9 @@ CONFIG_I2C_SH_MOBILE=y
715# Miscellaneous I2C Chip support 735# Miscellaneous I2C Chip support
716# 736#
717# CONFIG_DS1682 is not set 737# CONFIG_DS1682 is not set
718# CONFIG_EEPROM_AT24 is not set
719# CONFIG_EEPROM_LEGACY is not set
720# CONFIG_SENSORS_PCF8574 is not set 738# CONFIG_SENSORS_PCF8574 is not set
721# CONFIG_PCF8575 is not set 739# CONFIG_PCF8575 is not set
722# CONFIG_SENSORS_PCA9539 is not set 740# CONFIG_SENSORS_PCA9539 is not set
723# CONFIG_SENSORS_PCF8591 is not set
724# CONFIG_SENSORS_MAX6875 is not set 741# CONFIG_SENSORS_MAX6875 is not set
725# CONFIG_SENSORS_TSL2550 is not set 742# CONFIG_SENSORS_TSL2550 is not set
726# CONFIG_I2C_DEBUG_CORE is not set 743# CONFIG_I2C_DEBUG_CORE is not set
@@ -797,7 +814,7 @@ CONFIG_VIDEO_MEDIA=y
797# 814#
798# CONFIG_MEDIA_ATTACH is not set 815# CONFIG_MEDIA_ATTACH is not set
799CONFIG_MEDIA_TUNER=y 816CONFIG_MEDIA_TUNER=y
800# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set 817# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
801CONFIG_MEDIA_TUNER_SIMPLE=y 818CONFIG_MEDIA_TUNER_SIMPLE=y
802CONFIG_MEDIA_TUNER_TDA8290=y 819CONFIG_MEDIA_TUNER_TDA8290=y
803CONFIG_MEDIA_TUNER_TDA9887=y 820CONFIG_MEDIA_TUNER_TDA9887=y
@@ -806,6 +823,7 @@ CONFIG_MEDIA_TUNER_TEA5767=y
806CONFIG_MEDIA_TUNER_MT20XX=y 823CONFIG_MEDIA_TUNER_MT20XX=y
807CONFIG_MEDIA_TUNER_XC2028=y 824CONFIG_MEDIA_TUNER_XC2028=y
808CONFIG_MEDIA_TUNER_XC5000=y 825CONFIG_MEDIA_TUNER_XC5000=y
826CONFIG_MEDIA_TUNER_MC44S803=y
809CONFIG_VIDEO_V4L2=y 827CONFIG_VIDEO_V4L2=y
810CONFIG_VIDEOBUF_GEN=y 828CONFIG_VIDEOBUF_GEN=y
811CONFIG_VIDEOBUF_DMA_CONTIG=y 829CONFIG_VIDEOBUF_DMA_CONTIG=y
@@ -866,7 +884,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
866# CONFIG_USB_GADGET_MUSB_HDRC is not set 884# CONFIG_USB_GADGET_MUSB_HDRC is not set
867 885
868# 886#
869# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 887# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
870# 888#
871CONFIG_USB_GADGET=y 889CONFIG_USB_GADGET=y
872# CONFIG_USB_GADGET_DEBUG_FILES is not set 890# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -905,6 +923,7 @@ CONFIG_USB_G_SERIAL=y
905# OTG and related infrastructure 923# OTG and related infrastructure
906# 924#
907# CONFIG_USB_GPIO_VBUS is not set 925# CONFIG_USB_GPIO_VBUS is not set
926# CONFIG_NOP_USB_XCEIV is not set
908# CONFIG_MMC is not set 927# CONFIG_MMC is not set
909# CONFIG_MEMSTICK is not set 928# CONFIG_MEMSTICK is not set
910# CONFIG_NEW_LEDS is not set 929# CONFIG_NEW_LEDS is not set
@@ -964,6 +983,7 @@ CONFIG_RTC_DRV_RS5C372=y
964# 983#
965CONFIG_RTC_DRV_SH=y 984CONFIG_RTC_DRV_SH=y
966# CONFIG_DMADEVICES is not set 985# CONFIG_DMADEVICES is not set
986# CONFIG_AUXDISPLAY is not set
967CONFIG_UIO=y 987CONFIG_UIO=y
968# CONFIG_UIO_PDRV is not set 988# CONFIG_UIO_PDRV is not set
969CONFIG_UIO_PDRV_GENIRQ=y 989CONFIG_UIO_PDRV_GENIRQ=y
@@ -1045,7 +1065,6 @@ CONFIG_ROOT_NFS=y
1045CONFIG_LOCKD=y 1065CONFIG_LOCKD=y
1046CONFIG_NFS_COMMON=y 1066CONFIG_NFS_COMMON=y
1047CONFIG_SUNRPC=y 1067CONFIG_SUNRPC=y
1048# CONFIG_SUNRPC_REGISTER_V4 is not set
1049# CONFIG_RPCSEC_GSS_KRB5 is not set 1068# CONFIG_RPCSEC_GSS_KRB5 is not set
1050# CONFIG_RPCSEC_GSS_SPKM3 is not set 1069# CONFIG_RPCSEC_GSS_SPKM3 is not set
1051# CONFIG_SMB_FS is not set 1070# CONFIG_SMB_FS is not set
@@ -1090,7 +1109,7 @@ CONFIG_TRACING=y
1090# 1109#
1091# Tracers 1110# Tracers
1092# 1111#
1093# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1112# CONFIG_DYNAMIC_DEBUG is not set
1094# CONFIG_SAMPLES is not set 1113# CONFIG_SAMPLES is not set
1095CONFIG_HAVE_ARCH_KGDB=y 1114CONFIG_HAVE_ARCH_KGDB=y
1096# CONFIG_SH_STANDARD_BIOS is not set 1115# CONFIG_SH_STANDARD_BIOS is not set
@@ -1117,10 +1136,12 @@ CONFIG_CRYPTO_AEAD2=y
1117CONFIG_CRYPTO_BLKCIPHER2=y 1136CONFIG_CRYPTO_BLKCIPHER2=y
1118CONFIG_CRYPTO_HASH2=y 1137CONFIG_CRYPTO_HASH2=y
1119CONFIG_CRYPTO_RNG2=y 1138CONFIG_CRYPTO_RNG2=y
1139CONFIG_CRYPTO_PCOMP=y
1120CONFIG_CRYPTO_MANAGER=y 1140CONFIG_CRYPTO_MANAGER=y
1121CONFIG_CRYPTO_MANAGER2=y 1141CONFIG_CRYPTO_MANAGER2=y
1122# CONFIG_CRYPTO_GF128MUL is not set 1142# CONFIG_CRYPTO_GF128MUL is not set
1123# CONFIG_CRYPTO_NULL is not set 1143# CONFIG_CRYPTO_NULL is not set
1144CONFIG_CRYPTO_WORKQUEUE=y
1124# CONFIG_CRYPTO_CRYPTD is not set 1145# CONFIG_CRYPTO_CRYPTD is not set
1125# CONFIG_CRYPTO_AUTHENC is not set 1146# CONFIG_CRYPTO_AUTHENC is not set
1126# CONFIG_CRYPTO_TEST is not set 1147# CONFIG_CRYPTO_TEST is not set
@@ -1189,6 +1210,7 @@ CONFIG_CRYPTO_MANAGER2=y
1189# Compression 1210# Compression
1190# 1211#
1191# CONFIG_CRYPTO_DEFLATE is not set 1212# CONFIG_CRYPTO_DEFLATE is not set
1213# CONFIG_CRYPTO_ZLIB is not set
1192# CONFIG_CRYPTO_LZO is not set 1214# CONFIG_CRYPTO_LZO is not set
1193 1215
1194# 1216#
@@ -1209,7 +1231,9 @@ CONFIG_CRC_T10DIF=y
1209CONFIG_CRC32=y 1231CONFIG_CRC32=y
1210# CONFIG_CRC7 is not set 1232# CONFIG_CRC7 is not set
1211# CONFIG_LIBCRC32C is not set 1233# CONFIG_LIBCRC32C is not set
1212CONFIG_PLIST=y 1234CONFIG_ZLIB_INFLATE=y
1235CONFIG_DECOMPRESS_GZIP=y
1213CONFIG_HAS_IOMEM=y 1236CONFIG_HAS_IOMEM=y
1214CONFIG_HAS_IOPORT=y 1237CONFIG_HAS_IOPORT=y
1215CONFIG_HAS_DMA=y 1238CONFIG_HAS_DMA=y
1239CONFIG_NLATTR=y
diff --git a/arch/sh/configs/polaris_defconfig b/arch/sh/configs/polaris_defconfig
index 320def233b2f..df2d177d5346 100644
--- a/arch/sh/configs/polaris_defconfig
+++ b/arch/sh/configs/polaris_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc4 3# Linux kernel version: 2.6.29
4# Wed Feb 11 18:41:59 2009 4# Thu Apr 2 18:16:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -68,6 +69,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
68# CONFIG_BLK_DEV_INITRD is not set 69# CONFIG_BLK_DEV_INITRD is not set
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 70# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
72CONFIG_ANON_INODES=y
71CONFIG_EMBEDDED=y 73CONFIG_EMBEDDED=y
72CONFIG_UID16=y 74CONFIG_UID16=y
73CONFIG_SYSCTL_SYSCALL=y 75CONFIG_SYSCTL_SYSCALL=y
@@ -78,10 +80,8 @@ CONFIG_HOTPLUG=y
78CONFIG_PRINTK=y 80CONFIG_PRINTK=y
79CONFIG_BUG=y 81CONFIG_BUG=y
80CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
81CONFIG_COMPAT_BRK=y
82CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
83CONFIG_FUTEX=y 84CONFIG_FUTEX=y
84CONFIG_ANON_INODES=y
85CONFIG_EPOLL=y 85CONFIG_EPOLL=y
86CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
87CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -89,6 +89,7 @@ CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 89CONFIG_SHMEM=y
90CONFIG_AIO=y 90CONFIG_AIO=y
91CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 93CONFIG_SLAB=y
93# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
@@ -162,6 +163,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
162# CONFIG_CPU_SUBTYPE_SH7770 is not set 163# CONFIG_CPU_SUBTYPE_SH7770 is not set
163# CONFIG_CPU_SUBTYPE_SH7780 is not set 164# CONFIG_CPU_SUBTYPE_SH7780 is not set
164# CONFIG_CPU_SUBTYPE_SH7785 is not set 165# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# CONFIG_CPU_SUBTYPE_SH7786 is not set
165# CONFIG_CPU_SUBTYPE_SHX3 is not set 167# CONFIG_CPU_SUBTYPE_SHX3 is not set
166# CONFIG_CPU_SUBTYPE_SH7343 is not set 168# CONFIG_CPU_SUBTYPE_SH7343 is not set
167# CONFIG_CPU_SUBTYPE_SH7722 is not set 169# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -203,11 +205,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
203CONFIG_ZONE_DMA_FLAG=0 205CONFIG_ZONE_DMA_FLAG=0
204CONFIG_NR_QUICK=2 206CONFIG_NR_QUICK=2
205CONFIG_UNEVICTABLE_LRU=y 207CONFIG_UNEVICTABLE_LRU=y
208CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
206 210
207# 211#
208# Cache configuration 212# Cache configuration
209# 213#
210# CONFIG_SH_DIRECT_MAPPED is not set
211CONFIG_CACHE_WRITEBACK=y 214CONFIG_CACHE_WRITEBACK=y
212# CONFIG_CACHE_WRITETHROUGH is not set 215# CONFIG_CACHE_WRITETHROUGH is not set
213# CONFIG_CACHE_OFF is not set 216# CONFIG_CACHE_OFF is not set
@@ -251,7 +254,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
251# 254#
252CONFIG_SH_DMA_API=y 255CONFIG_SH_DMA_API=y
253CONFIG_SH_DMA=y 256CONFIG_SH_DMA=y
254CONFIG_NR_ONCHIP_DMA_CHANNELS=4 257CONFIG_NR_ONCHIP_DMA_CHANNELS=6
255# CONFIG_NR_DMA_CHANNELS_BOOL is not set 258# CONFIG_NR_DMA_CHANNELS_BOOL is not set
256 259
257# 260#
@@ -314,7 +317,6 @@ CONFIG_NET=y
314# 317#
315# Networking options 318# Networking options
316# 319#
317CONFIG_COMPAT_NET_DEV_OPS=y
318CONFIG_PACKET=y 320CONFIG_PACKET=y
319CONFIG_PACKET_MMAP=y 321CONFIG_PACKET_MMAP=y
320CONFIG_UNIX=y 322CONFIG_UNIX=y
@@ -362,6 +364,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
362# CONFIG_LAPB is not set 364# CONFIG_LAPB is not set
363# CONFIG_ECONET is not set 365# CONFIG_ECONET is not set
364# CONFIG_WAN_ROUTER is not set 366# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set
365# CONFIG_NET_SCHED is not set 368# CONFIG_NET_SCHED is not set
366# CONFIG_DCB is not set 369# CONFIG_DCB is not set
367 370
@@ -374,7 +377,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
374# CONFIG_IRDA is not set 377# CONFIG_IRDA is not set
375# CONFIG_BT is not set 378# CONFIG_BT is not set
376# CONFIG_AF_RXRPC is not set 379# CONFIG_AF_RXRPC is not set
377# CONFIG_PHONET is not set
378# CONFIG_WIRELESS is not set 380# CONFIG_WIRELESS is not set
379# CONFIG_WIMAX is not set 381# CONFIG_WIMAX is not set
380# CONFIG_RFKILL is not set 382# CONFIG_RFKILL is not set
@@ -481,7 +483,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
481# LPDDR flash memory drivers 483# LPDDR flash memory drivers
482# 484#
483# CONFIG_MTD_LPDDR is not set 485# CONFIG_MTD_LPDDR is not set
484# CONFIG_MTD_QINFO_PROBE is not set
485 486
486# 487#
487# UBI - Unsorted block images 488# UBI - Unsorted block images
@@ -517,6 +518,7 @@ CONFIG_HAVE_IDE=y
517# CONFIG_ATA is not set 518# CONFIG_ATA is not set
518# CONFIG_MD is not set 519# CONFIG_MD is not set
519CONFIG_NETDEVICES=y 520CONFIG_NETDEVICES=y
521CONFIG_COMPAT_NET_DEV_OPS=y
520# CONFIG_DUMMY is not set 522# CONFIG_DUMMY is not set
521# CONFIG_BONDING is not set 523# CONFIG_BONDING is not set
522# CONFIG_MACVLAN is not set 524# CONFIG_MACVLAN is not set
@@ -548,8 +550,10 @@ CONFIG_MII=y
548# CONFIG_AX88796 is not set 550# CONFIG_AX88796 is not set
549# CONFIG_STNIC is not set 551# CONFIG_STNIC is not set
550# CONFIG_SMC91X is not set 552# CONFIG_SMC91X is not set
553# CONFIG_ETHOC is not set
551# CONFIG_SMC911X is not set 554# CONFIG_SMC911X is not set
552CONFIG_SMSC911X=y 555CONFIG_SMSC911X=y
556# CONFIG_DNET is not set
553# CONFIG_IBM_NEW_EMAC_ZMII is not set 557# CONFIG_IBM_NEW_EMAC_ZMII is not set
554# CONFIG_IBM_NEW_EMAC_RGMII is not set 558# CONFIG_IBM_NEW_EMAC_RGMII is not set
555# CONFIG_IBM_NEW_EMAC_TAH is not set 559# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -566,7 +570,6 @@ CONFIG_SMSC911X=y
566# 570#
567# CONFIG_WLAN_PRE80211 is not set 571# CONFIG_WLAN_PRE80211 is not set
568# CONFIG_WLAN_80211 is not set 572# CONFIG_WLAN_80211 is not set
569# CONFIG_IWLWIFI_LEDS is not set
570 573
571# 574#
572# Enable WiMAX (Networking options) to see the WiMAX drivers 575# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -750,6 +753,7 @@ CONFIG_RTC_INTF_DEV=y
750# 753#
751CONFIG_RTC_DRV_SH=y 754CONFIG_RTC_DRV_SH=y
752# CONFIG_DMADEVICES is not set 755# CONFIG_DMADEVICES is not set
756# CONFIG_AUXDISPLAY is not set
753# CONFIG_UIO is not set 757# CONFIG_UIO is not set
754# CONFIG_STAGING is not set 758# CONFIG_STAGING is not set
755 759
@@ -837,7 +841,6 @@ CONFIG_LOCKD=y
837CONFIG_LOCKD_V4=y 841CONFIG_LOCKD_V4=y
838CONFIG_NFS_COMMON=y 842CONFIG_NFS_COMMON=y
839CONFIG_SUNRPC=y 843CONFIG_SUNRPC=y
840# CONFIG_SUNRPC_REGISTER_V4 is not set
841# CONFIG_RPCSEC_GSS_KRB5 is not set 844# CONFIG_RPCSEC_GSS_KRB5 is not set
842# CONFIG_RPCSEC_GSS_SPKM3 is not set 845# CONFIG_RPCSEC_GSS_SPKM3 is not set
843# CONFIG_SMB_FS is not set 846# CONFIG_SMB_FS is not set
@@ -907,6 +910,7 @@ CONFIG_FRAME_POINTER=y
907# CONFIG_FAULT_INJECTION is not set 910# CONFIG_FAULT_INJECTION is not set
908# CONFIG_LATENCYTOP is not set 911# CONFIG_LATENCYTOP is not set
909CONFIG_SYSCTL_SYSCALL_CHECK=y 912CONFIG_SYSCTL_SYSCALL_CHECK=y
913# CONFIG_PAGE_POISONING is not set
910CONFIG_HAVE_FUNCTION_TRACER=y 914CONFIG_HAVE_FUNCTION_TRACER=y
911CONFIG_HAVE_DYNAMIC_FTRACE=y 915CONFIG_HAVE_DYNAMIC_FTRACE=y
912CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 916CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -922,7 +926,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
922# CONFIG_BOOT_TRACER is not set 926# CONFIG_BOOT_TRACER is not set
923# CONFIG_TRACE_BRANCH_PROFILING is not set 927# CONFIG_TRACE_BRANCH_PROFILING is not set
924# CONFIG_STACK_TRACER is not set 928# CONFIG_STACK_TRACER is not set
925# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
926# CONFIG_SAMPLES is not set 929# CONFIG_SAMPLES is not set
927CONFIG_HAVE_ARCH_KGDB=y 930CONFIG_HAVE_ARCH_KGDB=y
928# CONFIG_KGDB is not set 931# CONFIG_KGDB is not set
@@ -963,7 +966,7 @@ CONFIG_CRC32=y
963CONFIG_AUDIT_GENERIC=y 966CONFIG_AUDIT_GENERIC=y
964CONFIG_ZLIB_INFLATE=y 967CONFIG_ZLIB_INFLATE=y
965CONFIG_ZLIB_DEFLATE=y 968CONFIG_ZLIB_DEFLATE=y
966CONFIG_PLIST=y
967CONFIG_HAS_IOMEM=y 969CONFIG_HAS_IOMEM=y
968CONFIG_HAS_IOPORT=y 970CONFIG_HAS_IOPORT=y
969CONFIG_HAS_DMA=y 971CONFIG_HAS_DMA=y
972CONFIG_NLATTR=y
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig
index 65b01a9e5934..7def4df46ddb 100644
--- a/arch/sh/configs/r7780mp_defconfig
+++ b/arch/sh/configs/r7780mp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:10:19 2009 4# Thu Apr 2 18:20:17 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_IO_TRAPPED=y 29CONFIG_IO_TRAPPED=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
30 31
@@ -45,15 +46,24 @@ CONFIG_BSD_PROCESS_ACCT=y
45# CONFIG_BSD_PROCESS_ACCT_V3 is not set 46# CONFIG_BSD_PROCESS_ACCT_V3 is not set
46# CONFIG_TASKSTATS is not set 47# CONFIG_TASKSTATS is not set
47# CONFIG_AUDIT is not set 48# CONFIG_AUDIT is not set
49
50#
51# RCU Subsystem
52#
53CONFIG_CLASSIC_RCU=y
54# CONFIG_TREE_RCU is not set
55# CONFIG_PREEMPT_RCU is not set
56# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
48CONFIG_IKCONFIG=y 58CONFIG_IKCONFIG=y
49CONFIG_IKCONFIG_PROC=y 59CONFIG_IKCONFIG_PROC=y
50CONFIG_LOG_BUF_SHIFT=14 60CONFIG_LOG_BUF_SHIFT=14
51# CONFIG_CGROUPS is not set
52CONFIG_GROUP_SCHED=y 61CONFIG_GROUP_SCHED=y
53CONFIG_FAIR_GROUP_SCHED=y 62CONFIG_FAIR_GROUP_SCHED=y
54# CONFIG_RT_GROUP_SCHED is not set 63# CONFIG_RT_GROUP_SCHED is not set
55CONFIG_USER_SCHED=y 64CONFIG_USER_SCHED=y
56# CONFIG_CGROUP_SCHED is not set 65# CONFIG_CGROUP_SCHED is not set
66# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y 67CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y 68CONFIG_SYSFS_DEPRECATED_V2=y
59# CONFIG_RELAY is not set 69# CONFIG_RELAY is not set
@@ -61,6 +71,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
61# CONFIG_BLK_DEV_INITRD is not set 71# CONFIG_BLK_DEV_INITRD is not set
62CONFIG_CC_OPTIMIZE_FOR_SIZE=y 72CONFIG_CC_OPTIMIZE_FOR_SIZE=y
63CONFIG_SYSCTL=y 73CONFIG_SYSCTL=y
74CONFIG_ANON_INODES=y
64CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
65CONFIG_UID16=y 76CONFIG_UID16=y
66# CONFIG_SYSCTL_SYSCALL is not set 77# CONFIG_SYSCTL_SYSCALL is not set
@@ -71,10 +82,8 @@ CONFIG_HOTPLUG=y
71CONFIG_PRINTK=y 82CONFIG_PRINTK=y
72CONFIG_BUG=y 83CONFIG_BUG=y
73CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
74CONFIG_COMPAT_BRK=y
75CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
76# CONFIG_FUTEX is not set 86# CONFIG_FUTEX is not set
77CONFIG_ANON_INODES=y
78# CONFIG_EPOLL is not set 87# CONFIG_EPOLL is not set
79CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
80CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -83,6 +92,7 @@ CONFIG_SHMEM=y
83CONFIG_AIO=y 92CONFIG_AIO=y
84CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_PCI_QUIRKS=y 94CONFIG_PCI_QUIRKS=y
95CONFIG_COMPAT_BRK=y
86CONFIG_SLAB=y 96CONFIG_SLAB=y
87# CONFIG_SLUB is not set 97# CONFIG_SLUB is not set
88# CONFIG_SLOB is not set 98# CONFIG_SLOB is not set
@@ -124,11 +134,6 @@ CONFIG_IOSCHED_NOOP=y
124# CONFIG_DEFAULT_CFQ is not set 134# CONFIG_DEFAULT_CFQ is not set
125CONFIG_DEFAULT_NOOP=y 135CONFIG_DEFAULT_NOOP=y
126CONFIG_DEFAULT_IOSCHED="noop" 136CONFIG_DEFAULT_IOSCHED="noop"
127CONFIG_CLASSIC_RCU=y
128# CONFIG_TREE_RCU is not set
129# CONFIG_PREEMPT_RCU is not set
130# CONFIG_TREE_RCU_TRACE is not set
131# CONFIG_PREEMPT_RCU_TRACE is not set
132# CONFIG_FREEZER is not set 137# CONFIG_FREEZER is not set
133 138
134# 139#
@@ -164,6 +169,7 @@ CONFIG_CPU_SH4A=y
164# CONFIG_CPU_SUBTYPE_SH7770 is not set 169# CONFIG_CPU_SUBTYPE_SH7770 is not set
165CONFIG_CPU_SUBTYPE_SH7780=y 170CONFIG_CPU_SUBTYPE_SH7780=y
166# CONFIG_CPU_SUBTYPE_SH7785 is not set 171# CONFIG_CPU_SUBTYPE_SH7785 is not set
172# CONFIG_CPU_SUBTYPE_SH7786 is not set
167# CONFIG_CPU_SUBTYPE_SHX3 is not set 173# CONFIG_CPU_SUBTYPE_SHX3 is not set
168# CONFIG_CPU_SUBTYPE_SH7343 is not set 174# CONFIG_CPU_SUBTYPE_SH7343 is not set
169# CONFIG_CPU_SUBTYPE_SH7722 is not set 175# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -179,8 +185,11 @@ CONFIG_MMU=y
179CONFIG_PAGE_OFFSET=0x80000000 185CONFIG_PAGE_OFFSET=0x80000000
180CONFIG_MEMORY_START=0x08000000 186CONFIG_MEMORY_START=0x08000000
181CONFIG_MEMORY_SIZE=0x08000000 187CONFIG_MEMORY_SIZE=0x08000000
182CONFIG_29BIT=y 188# CONFIG_29BIT is not set
189CONFIG_32BIT=y
190CONFIG_PMB_ENABLE=y
183# CONFIG_PMB is not set 191# CONFIG_PMB is not set
192CONFIG_PMB_FIXED=y
184CONFIG_VSYSCALL=y 193CONFIG_VSYSCALL=y
185CONFIG_ARCH_FLATMEM_ENABLE=y 194CONFIG_ARCH_FLATMEM_ENABLE=y
186CONFIG_ARCH_SPARSEMEM_ENABLE=y 195CONFIG_ARCH_SPARSEMEM_ENABLE=y
@@ -212,11 +221,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
212CONFIG_ZONE_DMA_FLAG=0 221CONFIG_ZONE_DMA_FLAG=0
213CONFIG_NR_QUICK=2 222CONFIG_NR_QUICK=2
214CONFIG_UNEVICTABLE_LRU=y 223CONFIG_UNEVICTABLE_LRU=y
224CONFIG_HAVE_MLOCK=y
225CONFIG_HAVE_MLOCKED_PAGE_BIT=y
215 226
216# 227#
217# Cache configuration 228# Cache configuration
218# 229#
219# CONFIG_SH_DIRECT_MAPPED is not set
220CONFIG_CACHE_WRITEBACK=y 230CONFIG_CACHE_WRITEBACK=y
221# CONFIG_CACHE_WRITETHROUGH is not set 231# CONFIG_CACHE_WRITETHROUGH is not set
222# CONFIG_CACHE_OFF is not set 232# CONFIG_CACHE_OFF is not set
@@ -309,6 +319,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
309# CONFIG_ARCH_SUPPORTS_MSI is not set 319# CONFIG_ARCH_SUPPORTS_MSI is not set
310CONFIG_PCI_LEGACY=y 320CONFIG_PCI_LEGACY=y
311# CONFIG_PCI_DEBUG is not set 321# CONFIG_PCI_DEBUG is not set
322# CONFIG_PCI_STUB is not set
323# CONFIG_PCI_IOV is not set
312# CONFIG_PCCARD is not set 324# CONFIG_PCCARD is not set
313# CONFIG_HOTPLUG_PCI is not set 325# CONFIG_HOTPLUG_PCI is not set
314 326
@@ -330,7 +342,6 @@ CONFIG_NET=y
330# 342#
331# Networking options 343# Networking options
332# 344#
333CONFIG_COMPAT_NET_DEV_OPS=y
334CONFIG_PACKET=y 345CONFIG_PACKET=y
335# CONFIG_PACKET_MMAP is not set 346# CONFIG_PACKET_MMAP is not set
336CONFIG_UNIX=y 347CONFIG_UNIX=y
@@ -392,6 +403,7 @@ CONFIG_LLC=m
392# CONFIG_LAPB is not set 403# CONFIG_LAPB is not set
393# CONFIG_ECONET is not set 404# CONFIG_ECONET is not set
394# CONFIG_WAN_ROUTER is not set 405# CONFIG_WAN_ROUTER is not set
406# CONFIG_PHONET is not set
395# CONFIG_NET_SCHED is not set 407# CONFIG_NET_SCHED is not set
396# CONFIG_DCB is not set 408# CONFIG_DCB is not set
397 409
@@ -399,12 +411,12 @@ CONFIG_LLC=m
399# Network testing 411# Network testing
400# 412#
401# CONFIG_NET_PKTGEN is not set 413# CONFIG_NET_PKTGEN is not set
414# CONFIG_NET_DROP_MONITOR is not set
402# CONFIG_HAMRADIO is not set 415# CONFIG_HAMRADIO is not set
403# CONFIG_CAN is not set 416# CONFIG_CAN is not set
404# CONFIG_IRDA is not set 417# CONFIG_IRDA is not set
405# CONFIG_BT is not set 418# CONFIG_BT is not set
406# CONFIG_AF_RXRPC is not set 419# CONFIG_AF_RXRPC is not set
407# CONFIG_PHONET is not set
408CONFIG_WIRELESS=y 420CONFIG_WIRELESS=y
409# CONFIG_CFG80211 is not set 421# CONFIG_CFG80211 is not set
410# CONFIG_WIRELESS_OLD_REGULATORY is not set 422# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -412,6 +424,7 @@ CONFIG_WIRELESS_EXT=y
412CONFIG_WIRELESS_EXT_SYSFS=y 424CONFIG_WIRELESS_EXT_SYSFS=y
413# CONFIG_LIB80211 is not set 425# CONFIG_LIB80211 is not set
414# CONFIG_MAC80211 is not set 426# CONFIG_MAC80211 is not set
427# CONFIG_WIMAX is not set
415# CONFIG_RFKILL is not set 428# CONFIG_RFKILL is not set
416# CONFIG_NET_9P is not set 429# CONFIG_NET_9P is not set
417 430
@@ -451,13 +464,20 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
451# CONFIG_BLK_DEV_HD is not set 464# CONFIG_BLK_DEV_HD is not set
452CONFIG_MISC_DEVICES=y 465CONFIG_MISC_DEVICES=y
453# CONFIG_PHANTOM is not set 466# CONFIG_PHANTOM is not set
454CONFIG_EEPROM_93CX6=y
455# CONFIG_SGI_IOC4 is not set 467# CONFIG_SGI_IOC4 is not set
456# CONFIG_TIFM_CORE is not set 468# CONFIG_TIFM_CORE is not set
457# CONFIG_ICS932S401 is not set 469# CONFIG_ICS932S401 is not set
458# CONFIG_ENCLOSURE_SERVICES is not set 470# CONFIG_ENCLOSURE_SERVICES is not set
459# CONFIG_HP_ILO is not set 471# CONFIG_HP_ILO is not set
472# CONFIG_ISL29003 is not set
460# CONFIG_C2PORT is not set 473# CONFIG_C2PORT is not set
474
475#
476# EEPROM support
477#
478# CONFIG_EEPROM_AT24 is not set
479# CONFIG_EEPROM_LEGACY is not set
480CONFIG_EEPROM_93CX6=y
461CONFIG_HAVE_IDE=y 481CONFIG_HAVE_IDE=y
462# CONFIG_IDE is not set 482# CONFIG_IDE is not set
463 483
@@ -513,6 +533,7 @@ CONFIG_SCSI_LOWLEVEL=y
513# CONFIG_MEGARAID_NEWGEN is not set 533# CONFIG_MEGARAID_NEWGEN is not set
514# CONFIG_MEGARAID_LEGACY is not set 534# CONFIG_MEGARAID_LEGACY is not set
515# CONFIG_MEGARAID_SAS is not set 535# CONFIG_MEGARAID_SAS is not set
536# CONFIG_SCSI_MPT2SAS is not set
516# CONFIG_SCSI_HPTIOP is not set 537# CONFIG_SCSI_HPTIOP is not set
517# CONFIG_LIBFC is not set 538# CONFIG_LIBFC is not set
518# CONFIG_FCOE is not set 539# CONFIG_FCOE is not set
@@ -535,6 +556,7 @@ CONFIG_SCSI_LOWLEVEL=y
535# CONFIG_SCSI_DEBUG is not set 556# CONFIG_SCSI_DEBUG is not set
536# CONFIG_SCSI_SRP is not set 557# CONFIG_SCSI_SRP is not set
537# CONFIG_SCSI_DH is not set 558# CONFIG_SCSI_DH is not set
559# CONFIG_SCSI_OSD_INITIATOR is not set
538CONFIG_ATA=y 560CONFIG_ATA=y
539# CONFIG_ATA_NONSTANDARD is not set 561# CONFIG_ATA_NONSTANDARD is not set
540CONFIG_SATA_PMP=y 562CONFIG_SATA_PMP=y
@@ -609,6 +631,7 @@ CONFIG_PATA_PLATFORM=y
609# CONFIG_IEEE1394 is not set 631# CONFIG_IEEE1394 is not set
610# CONFIG_I2O is not set 632# CONFIG_I2O is not set
611CONFIG_NETDEVICES=y 633CONFIG_NETDEVICES=y
634CONFIG_COMPAT_NET_DEV_OPS=y
612# CONFIG_DUMMY is not set 635# CONFIG_DUMMY is not set
613# CONFIG_BONDING is not set 636# CONFIG_BONDING is not set
614# CONFIG_MACVLAN is not set 637# CONFIG_MACVLAN is not set
@@ -627,8 +650,10 @@ CONFIG_AX88796_93CX6=y
627# CONFIG_CASSINI is not set 650# CONFIG_CASSINI is not set
628# CONFIG_NET_VENDOR_3COM is not set 651# CONFIG_NET_VENDOR_3COM is not set
629# CONFIG_SMC91X is not set 652# CONFIG_SMC91X is not set
653# CONFIG_ETHOC is not set
630# CONFIG_SMC911X is not set 654# CONFIG_SMC911X is not set
631# CONFIG_SMSC911X is not set 655# CONFIG_SMSC911X is not set
656# CONFIG_DNET is not set
632# CONFIG_NET_TULIP is not set 657# CONFIG_NET_TULIP is not set
633# CONFIG_HP100 is not set 658# CONFIG_HP100 is not set
634# CONFIG_IBM_NEW_EMAC_ZMII is not set 659# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -684,6 +709,7 @@ CONFIG_R8169=y
684# CONFIG_QLA3XXX is not set 709# CONFIG_QLA3XXX is not set
685# CONFIG_ATL1 is not set 710# CONFIG_ATL1 is not set
686# CONFIG_ATL1E is not set 711# CONFIG_ATL1E is not set
712# CONFIG_ATL1C is not set
687# CONFIG_JME is not set 713# CONFIG_JME is not set
688CONFIG_NETDEV_10000=y 714CONFIG_NETDEV_10000=y
689# CONFIG_CHELSIO_T1 is not set 715# CONFIG_CHELSIO_T1 is not set
@@ -702,6 +728,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
702# CONFIG_BNX2X is not set 728# CONFIG_BNX2X is not set
703# CONFIG_QLGE is not set 729# CONFIG_QLGE is not set
704# CONFIG_SFC is not set 730# CONFIG_SFC is not set
731# CONFIG_BE2NET is not set
705# CONFIG_TR is not set 732# CONFIG_TR is not set
706 733
707# 734#
@@ -709,7 +736,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
709# 736#
710# CONFIG_WLAN_PRE80211 is not set 737# CONFIG_WLAN_PRE80211 is not set
711# CONFIG_WLAN_80211 is not set 738# CONFIG_WLAN_80211 is not set
712# CONFIG_IWLWIFI_LEDS is not set 739
740#
741# Enable WiMAX (Networking options) to see the WiMAX drivers
742#
713# CONFIG_WAN is not set 743# CONFIG_WAN is not set
714# CONFIG_FDDI is not set 744# CONFIG_FDDI is not set
715# CONFIG_HIPPI is not set 745# CONFIG_HIPPI is not set
@@ -796,6 +826,7 @@ CONFIG_LEGACY_PTYS=y
796CONFIG_LEGACY_PTY_COUNT=256 826CONFIG_LEGACY_PTY_COUNT=256
797# CONFIG_IPMI_HANDLER is not set 827# CONFIG_IPMI_HANDLER is not set
798CONFIG_HW_RANDOM=y 828CONFIG_HW_RANDOM=y
829# CONFIG_HW_RANDOM_TIMERIOMEM is not set
799# CONFIG_R3964 is not set 830# CONFIG_R3964 is not set
800# CONFIG_APPLICOM is not set 831# CONFIG_APPLICOM is not set
801# CONFIG_RAW_DRIVER is not set 832# CONFIG_RAW_DRIVER is not set
@@ -857,12 +888,9 @@ CONFIG_I2C_HIGHLANDER=y
857# Miscellaneous I2C Chip support 888# Miscellaneous I2C Chip support
858# 889#
859# CONFIG_DS1682 is not set 890# CONFIG_DS1682 is not set
860# CONFIG_EEPROM_AT24 is not set
861# CONFIG_EEPROM_LEGACY is not set
862# CONFIG_SENSORS_PCF8574 is not set 891# CONFIG_SENSORS_PCF8574 is not set
863# CONFIG_PCF8575 is not set 892# CONFIG_PCF8575 is not set
864# CONFIG_SENSORS_PCA9539 is not set 893# CONFIG_SENSORS_PCA9539 is not set
865# CONFIG_SENSORS_PCF8591 is not set
866# CONFIG_SENSORS_MAX6875 is not set 894# CONFIG_SENSORS_MAX6875 is not set
867# CONFIG_SENSORS_TSL2550 is not set 895# CONFIG_SENSORS_TSL2550 is not set
868# CONFIG_I2C_DEBUG_CORE is not set 896# CONFIG_I2C_DEBUG_CORE is not set
@@ -885,6 +913,7 @@ CONFIG_HWMON=y
885# CONFIG_SENSORS_ADT7462 is not set 913# CONFIG_SENSORS_ADT7462 is not set
886# CONFIG_SENSORS_ADT7470 is not set 914# CONFIG_SENSORS_ADT7470 is not set
887# CONFIG_SENSORS_ADT7473 is not set 915# CONFIG_SENSORS_ADT7473 is not set
916# CONFIG_SENSORS_ADT7475 is not set
888# CONFIG_SENSORS_ATXP1 is not set 917# CONFIG_SENSORS_ATXP1 is not set
889# CONFIG_SENSORS_DS1621 is not set 918# CONFIG_SENSORS_DS1621 is not set
890# CONFIG_SENSORS_I5K_AMB is not set 919# CONFIG_SENSORS_I5K_AMB is not set
@@ -905,10 +934,14 @@ CONFIG_HWMON=y
905# CONFIG_SENSORS_LM90 is not set 934# CONFIG_SENSORS_LM90 is not set
906# CONFIG_SENSORS_LM92 is not set 935# CONFIG_SENSORS_LM92 is not set
907# CONFIG_SENSORS_LM93 is not set 936# CONFIG_SENSORS_LM93 is not set
937# CONFIG_SENSORS_LTC4215 is not set
938# CONFIG_SENSORS_LTC4245 is not set
939# CONFIG_SENSORS_LM95241 is not set
908# CONFIG_SENSORS_MAX1619 is not set 940# CONFIG_SENSORS_MAX1619 is not set
909# CONFIG_SENSORS_MAX6650 is not set 941# CONFIG_SENSORS_MAX6650 is not set
910# CONFIG_SENSORS_PC87360 is not set 942# CONFIG_SENSORS_PC87360 is not set
911# CONFIG_SENSORS_PC87427 is not set 943# CONFIG_SENSORS_PC87427 is not set
944# CONFIG_SENSORS_PCF8591 is not set
912# CONFIG_SENSORS_SIS5595 is not set 945# CONFIG_SENSORS_SIS5595 is not set
913# CONFIG_SENSORS_DME1737 is not set 946# CONFIG_SENSORS_DME1737 is not set
914# CONFIG_SENSORS_SMSC47M1 is not set 947# CONFIG_SENSORS_SMSC47M1 is not set
@@ -949,6 +982,7 @@ CONFIG_SSB_POSSIBLE=y
949# CONFIG_PMIC_DA903X is not set 982# CONFIG_PMIC_DA903X is not set
950# CONFIG_MFD_WM8400 is not set 983# CONFIG_MFD_WM8400 is not set
951# CONFIG_MFD_WM8350_I2C is not set 984# CONFIG_MFD_WM8350_I2C is not set
985# CONFIG_MFD_PCF50633 is not set
952# CONFIG_REGULATOR is not set 986# CONFIG_REGULATOR is not set
953 987
954# 988#
@@ -1007,9 +1041,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1007# 1041#
1008 1042
1009# 1043#
1010# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1044# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1011# 1045#
1012# CONFIG_USB_GADGET is not set 1046# CONFIG_USB_GADGET is not set
1047
1048#
1049# OTG and related infrastructure
1050#
1013# CONFIG_UWB is not set 1051# CONFIG_UWB is not set
1014# CONFIG_MMC is not set 1052# CONFIG_MMC is not set
1015# CONFIG_MEMSTICK is not set 1053# CONFIG_MEMSTICK is not set
@@ -1071,6 +1109,7 @@ CONFIG_RTC_DRV_RS5C372=y
1071# 1109#
1072CONFIG_RTC_DRV_SH=y 1110CONFIG_RTC_DRV_SH=y
1073# CONFIG_DMADEVICES is not set 1111# CONFIG_DMADEVICES is not set
1112# CONFIG_AUXDISPLAY is not set
1074# CONFIG_UIO is not set 1113# CONFIG_UIO is not set
1075# CONFIG_STAGING is not set 1114# CONFIG_STAGING is not set
1076 1115
@@ -1094,6 +1133,7 @@ CONFIG_FS_POSIX_ACL=y
1094CONFIG_FILE_LOCKING=y 1133CONFIG_FILE_LOCKING=y
1095# CONFIG_XFS_FS is not set 1134# CONFIG_XFS_FS is not set
1096# CONFIG_OCFS2_FS is not set 1135# CONFIG_OCFS2_FS is not set
1136# CONFIG_BTRFS_FS is not set
1097CONFIG_DNOTIFY=y 1137CONFIG_DNOTIFY=y
1098CONFIG_INOTIFY=y 1138CONFIG_INOTIFY=y
1099CONFIG_INOTIFY_USER=y 1139CONFIG_INOTIFY_USER=y
@@ -1142,6 +1182,7 @@ CONFIG_MISC_FILESYSTEMS=y
1142# CONFIG_BFS_FS is not set 1182# CONFIG_BFS_FS is not set
1143# CONFIG_EFS_FS is not set 1183# CONFIG_EFS_FS is not set
1144# CONFIG_CRAMFS is not set 1184# CONFIG_CRAMFS is not set
1185# CONFIG_SQUASHFS is not set
1145# CONFIG_VXFS_FS is not set 1186# CONFIG_VXFS_FS is not set
1146CONFIG_MINIX_FS=y 1187CONFIG_MINIX_FS=y
1147# CONFIG_OMFS_FS is not set 1188# CONFIG_OMFS_FS is not set
@@ -1166,7 +1207,6 @@ CONFIG_EXPORTFS=y
1166CONFIG_NFS_COMMON=y 1207CONFIG_NFS_COMMON=y
1167CONFIG_SUNRPC=y 1208CONFIG_SUNRPC=y
1168CONFIG_SUNRPC_GSS=y 1209CONFIG_SUNRPC_GSS=y
1169# CONFIG_SUNRPC_REGISTER_V4 is not set
1170CONFIG_RPCSEC_GSS_KRB5=y 1210CONFIG_RPCSEC_GSS_KRB5=y
1171# CONFIG_RPCSEC_GSS_SPKM3 is not set 1211# CONFIG_RPCSEC_GSS_SPKM3 is not set
1172# CONFIG_SMB_FS is not set 1212# CONFIG_SMB_FS is not set
@@ -1269,6 +1309,7 @@ CONFIG_DEBUG_INFO=y
1269# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1309# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1270# CONFIG_FAULT_INJECTION is not set 1310# CONFIG_FAULT_INJECTION is not set
1271# CONFIG_LATENCYTOP is not set 1311# CONFIG_LATENCYTOP is not set
1312# CONFIG_PAGE_POISONING is not set
1272CONFIG_NOP_TRACER=y 1313CONFIG_NOP_TRACER=y
1273CONFIG_HAVE_FUNCTION_TRACER=y 1314CONFIG_HAVE_FUNCTION_TRACER=y
1274CONFIG_HAVE_DYNAMIC_FTRACE=y 1315CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -1288,7 +1329,7 @@ CONFIG_TRACING=y
1288# CONFIG_TRACE_BRANCH_PROFILING is not set 1329# CONFIG_TRACE_BRANCH_PROFILING is not set
1289# CONFIG_STACK_TRACER is not set 1330# CONFIG_STACK_TRACER is not set
1290# CONFIG_FTRACE_STARTUP_TEST is not set 1331# CONFIG_FTRACE_STARTUP_TEST is not set
1291# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1332# CONFIG_DYNAMIC_DEBUG is not set
1292# CONFIG_SAMPLES is not set 1333# CONFIG_SAMPLES is not set
1293CONFIG_HAVE_ARCH_KGDB=y 1334CONFIG_HAVE_ARCH_KGDB=y
1294# CONFIG_KGDB is not set 1335# CONFIG_KGDB is not set
@@ -1325,10 +1366,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1325CONFIG_CRYPTO_HASH=y 1366CONFIG_CRYPTO_HASH=y
1326CONFIG_CRYPTO_HASH2=y 1367CONFIG_CRYPTO_HASH2=y
1327CONFIG_CRYPTO_RNG2=y 1368CONFIG_CRYPTO_RNG2=y
1369CONFIG_CRYPTO_PCOMP=y
1328CONFIG_CRYPTO_MANAGER=y 1370CONFIG_CRYPTO_MANAGER=y
1329CONFIG_CRYPTO_MANAGER2=y 1371CONFIG_CRYPTO_MANAGER2=y
1330# CONFIG_CRYPTO_GF128MUL is not set 1372# CONFIG_CRYPTO_GF128MUL is not set
1331# CONFIG_CRYPTO_NULL is not set 1373# CONFIG_CRYPTO_NULL is not set
1374CONFIG_CRYPTO_WORKQUEUE=y
1332# CONFIG_CRYPTO_CRYPTD is not set 1375# CONFIG_CRYPTO_CRYPTD is not set
1333# CONFIG_CRYPTO_AUTHENC is not set 1376# CONFIG_CRYPTO_AUTHENC is not set
1334# CONFIG_CRYPTO_TEST is not set 1377# CONFIG_CRYPTO_TEST is not set
@@ -1397,6 +1440,7 @@ CONFIG_CRYPTO_DES=y
1397# Compression 1440# Compression
1398# 1441#
1399# CONFIG_CRYPTO_DEFLATE is not set 1442# CONFIG_CRYPTO_DEFLATE is not set
1443# CONFIG_CRYPTO_ZLIB is not set
1400# CONFIG_CRYPTO_LZO is not set 1444# CONFIG_CRYPTO_LZO is not set
1401 1445
1402# 1446#
@@ -1421,3 +1465,4 @@ CONFIG_CRC32=y
1421CONFIG_HAS_IOMEM=y 1465CONFIG_HAS_IOMEM=y
1422CONFIG_HAS_IOPORT=y 1466CONFIG_HAS_IOPORT=y
1423CONFIG_HAS_DMA=y 1467CONFIG_HAS_DMA=y
1468CONFIG_NLATTR=y
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 8defaa5f13b9..cb134ffc2118 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:14:41 2009 4# Thu Apr 2 18:24:35 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_GPIO=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
@@ -26,6 +26,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
29CONFIG_IO_TRAPPED=y 30CONFIG_IO_TRAPPED=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
31 32
@@ -48,11 +49,21 @@ CONFIG_BSD_PROCESS_ACCT=y
48CONFIG_AUDIT=y 49CONFIG_AUDIT=y
49CONFIG_AUDITSYSCALL=y 50CONFIG_AUDITSYSCALL=y
50CONFIG_AUDIT_TREE=y 51CONFIG_AUDIT_TREE=y
52
53#
54# RCU Subsystem
55#
56# CONFIG_CLASSIC_RCU is not set
57# CONFIG_TREE_RCU is not set
58CONFIG_PREEMPT_RCU=y
59CONFIG_RCU_TRACE=y
60# CONFIG_TREE_RCU_TRACE is not set
61CONFIG_PREEMPT_RCU_TRACE=y
51CONFIG_IKCONFIG=y 62CONFIG_IKCONFIG=y
52CONFIG_IKCONFIG_PROC=y 63CONFIG_IKCONFIG_PROC=y
53CONFIG_LOG_BUF_SHIFT=14 64CONFIG_LOG_BUF_SHIFT=14
54# CONFIG_CGROUPS is not set
55# CONFIG_GROUP_SCHED is not set 65# CONFIG_GROUP_SCHED is not set
66# CONFIG_CGROUPS is not set
56CONFIG_SYSFS_DEPRECATED=y 67CONFIG_SYSFS_DEPRECATED=y
57CONFIG_SYSFS_DEPRECATED_V2=y 68CONFIG_SYSFS_DEPRECATED_V2=y
58# CONFIG_RELAY is not set 69# CONFIG_RELAY is not set
@@ -60,21 +71,19 @@ CONFIG_SYSFS_DEPRECATED_V2=y
60# CONFIG_BLK_DEV_INITRD is not set 71# CONFIG_BLK_DEV_INITRD is not set
61CONFIG_CC_OPTIMIZE_FOR_SIZE=y 72CONFIG_CC_OPTIMIZE_FOR_SIZE=y
62CONFIG_SYSCTL=y 73CONFIG_SYSCTL=y
74CONFIG_ANON_INODES=y
63CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
64CONFIG_UID16=y 76CONFIG_UID16=y
65# CONFIG_SYSCTL_SYSCALL is not set 77# CONFIG_SYSCTL_SYSCALL is not set
66CONFIG_KALLSYMS=y 78CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y 79CONFIG_KALLSYMS_ALL=y
68CONFIG_KALLSYMS_STRIP_GENERATED=y
69# CONFIG_KALLSYMS_EXTRA_PASS is not set 80# CONFIG_KALLSYMS_EXTRA_PASS is not set
70CONFIG_HOTPLUG=y 81CONFIG_HOTPLUG=y
71CONFIG_PRINTK=y 82CONFIG_PRINTK=y
72CONFIG_BUG=y 83CONFIG_BUG=y
73CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
74CONFIG_COMPAT_BRK=y
75CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
76CONFIG_FUTEX=y 86CONFIG_FUTEX=y
77CONFIG_ANON_INODES=y
78CONFIG_EPOLL=y 87CONFIG_EPOLL=y
79CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
80CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -83,6 +92,7 @@ CONFIG_SHMEM=y
83CONFIG_AIO=y 92CONFIG_AIO=y
84CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_PCI_QUIRKS=y 94CONFIG_PCI_QUIRKS=y
95CONFIG_COMPAT_BRK=y
86CONFIG_SLAB=y 96CONFIG_SLAB=y
87# CONFIG_SLUB is not set 97# CONFIG_SLUB is not set
88# CONFIG_SLOB is not set 98# CONFIG_SLOB is not set
@@ -126,12 +136,6 @@ CONFIG_IOSCHED_NOOP=y
126# CONFIG_DEFAULT_CFQ is not set 136# CONFIG_DEFAULT_CFQ is not set
127CONFIG_DEFAULT_NOOP=y 137CONFIG_DEFAULT_NOOP=y
128CONFIG_DEFAULT_IOSCHED="noop" 138CONFIG_DEFAULT_IOSCHED="noop"
129# CONFIG_CLASSIC_RCU is not set
130# CONFIG_TREE_RCU is not set
131CONFIG_PREEMPT_RCU=y
132CONFIG_RCU_TRACE=y
133# CONFIG_TREE_RCU_TRACE is not set
134CONFIG_PREEMPT_RCU_TRACE=y
135# CONFIG_FREEZER is not set 139# CONFIG_FREEZER is not set
136 140
137# 141#
@@ -168,6 +172,7 @@ CONFIG_CPU_SHX2=y
168# CONFIG_CPU_SUBTYPE_SH7770 is not set 172# CONFIG_CPU_SUBTYPE_SH7770 is not set
169# CONFIG_CPU_SUBTYPE_SH7780 is not set 173# CONFIG_CPU_SUBTYPE_SH7780 is not set
170CONFIG_CPU_SUBTYPE_SH7785=y 174CONFIG_CPU_SUBTYPE_SH7785=y
175# CONFIG_CPU_SUBTYPE_SH7786 is not set
171# CONFIG_CPU_SUBTYPE_SHX3 is not set 176# CONFIG_CPU_SUBTYPE_SHX3 is not set
172# CONFIG_CPU_SUBTYPE_SH7343 is not set 177# CONFIG_CPU_SUBTYPE_SH7343 is not set
173# CONFIG_CPU_SUBTYPE_SH7722 is not set 178# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -183,8 +188,11 @@ CONFIG_MMU=y
183CONFIG_PAGE_OFFSET=0x80000000 188CONFIG_PAGE_OFFSET=0x80000000
184CONFIG_MEMORY_START=0x08000000 189CONFIG_MEMORY_START=0x08000000
185CONFIG_MEMORY_SIZE=0x08000000 190CONFIG_MEMORY_SIZE=0x08000000
186CONFIG_29BIT=y 191# CONFIG_29BIT is not set
192CONFIG_32BIT=y
193CONFIG_PMB_ENABLE=y
187# CONFIG_PMB is not set 194# CONFIG_PMB is not set
195CONFIG_PMB_FIXED=y
188# CONFIG_X2TLB is not set 196# CONFIG_X2TLB is not set
189CONFIG_VSYSCALL=y 197CONFIG_VSYSCALL=y
190# CONFIG_NUMA is not set 198# CONFIG_NUMA is not set
@@ -222,11 +230,12 @@ CONFIG_MIGRATION=y
222CONFIG_ZONE_DMA_FLAG=0 230CONFIG_ZONE_DMA_FLAG=0
223CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
224CONFIG_UNEVICTABLE_LRU=y 232CONFIG_UNEVICTABLE_LRU=y
233CONFIG_HAVE_MLOCK=y
234CONFIG_HAVE_MLOCKED_PAGE_BIT=y
225 235
226# 236#
227# Cache configuration 237# Cache configuration
228# 238#
229# CONFIG_SH_DIRECT_MAPPED is not set
230CONFIG_CACHE_WRITEBACK=y 239CONFIG_CACHE_WRITEBACK=y
231# CONFIG_CACHE_WRITETHROUGH is not set 240# CONFIG_CACHE_WRITETHROUGH is not set
232# CONFIG_CACHE_OFF is not set 241# CONFIG_CACHE_OFF is not set
@@ -334,6 +343,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
334# CONFIG_ARCH_SUPPORTS_MSI is not set 343# CONFIG_ARCH_SUPPORTS_MSI is not set
335# CONFIG_PCI_LEGACY is not set 344# CONFIG_PCI_LEGACY is not set
336# CONFIG_PCI_DEBUG is not set 345# CONFIG_PCI_DEBUG is not set
346# CONFIG_PCI_STUB is not set
347# CONFIG_PCI_IOV is not set
337# CONFIG_PCCARD is not set 348# CONFIG_PCCARD is not set
338# CONFIG_HOTPLUG_PCI is not set 349# CONFIG_HOTPLUG_PCI is not set
339 350
@@ -355,7 +366,6 @@ CONFIG_NET=y
355# 366#
356# Networking options 367# Networking options
357# 368#
358CONFIG_COMPAT_NET_DEV_OPS=y
359CONFIG_PACKET=y 369CONFIG_PACKET=y
360# CONFIG_PACKET_MMAP is not set 370# CONFIG_PACKET_MMAP is not set
361CONFIG_UNIX=y 371CONFIG_UNIX=y
@@ -417,6 +427,7 @@ CONFIG_LLC=m
417# CONFIG_LAPB is not set 427# CONFIG_LAPB is not set
418# CONFIG_ECONET is not set 428# CONFIG_ECONET is not set
419# CONFIG_WAN_ROUTER is not set 429# CONFIG_WAN_ROUTER is not set
430# CONFIG_PHONET is not set
420# CONFIG_NET_SCHED is not set 431# CONFIG_NET_SCHED is not set
421# CONFIG_DCB is not set 432# CONFIG_DCB is not set
422 433
@@ -425,12 +436,12 @@ CONFIG_LLC=m
425# 436#
426# CONFIG_NET_PKTGEN is not set 437# CONFIG_NET_PKTGEN is not set
427# CONFIG_NET_TCPPROBE is not set 438# CONFIG_NET_TCPPROBE is not set
439# CONFIG_NET_DROP_MONITOR is not set
428# CONFIG_HAMRADIO is not set 440# CONFIG_HAMRADIO is not set
429# CONFIG_CAN is not set 441# CONFIG_CAN is not set
430# CONFIG_IRDA is not set 442# CONFIG_IRDA is not set
431# CONFIG_BT is not set 443# CONFIG_BT is not set
432# CONFIG_AF_RXRPC is not set 444# CONFIG_AF_RXRPC is not set
433# CONFIG_PHONET is not set
434CONFIG_WIRELESS=y 445CONFIG_WIRELESS=y
435# CONFIG_CFG80211 is not set 446# CONFIG_CFG80211 is not set
436# CONFIG_WIRELESS_OLD_REGULATORY is not set 447# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -438,6 +449,7 @@ CONFIG_WIRELESS_EXT=y
438CONFIG_WIRELESS_EXT_SYSFS=y 449CONFIG_WIRELESS_EXT_SYSFS=y
439# CONFIG_LIB80211 is not set 450# CONFIG_LIB80211 is not set
440# CONFIG_MAC80211 is not set 451# CONFIG_MAC80211 is not set
452# CONFIG_WIMAX is not set
441# CONFIG_RFKILL is not set 453# CONFIG_RFKILL is not set
442# CONFIG_NET_9P is not set 454# CONFIG_NET_9P is not set
443 455
@@ -477,13 +489,20 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
477# CONFIG_BLK_DEV_HD is not set 489# CONFIG_BLK_DEV_HD is not set
478CONFIG_MISC_DEVICES=y 490CONFIG_MISC_DEVICES=y
479# CONFIG_PHANTOM is not set 491# CONFIG_PHANTOM is not set
480CONFIG_EEPROM_93CX6=y
481# CONFIG_SGI_IOC4 is not set 492# CONFIG_SGI_IOC4 is not set
482# CONFIG_TIFM_CORE is not set 493# CONFIG_TIFM_CORE is not set
483# CONFIG_ICS932S401 is not set 494# CONFIG_ICS932S401 is not set
484# CONFIG_ENCLOSURE_SERVICES is not set 495# CONFIG_ENCLOSURE_SERVICES is not set
485# CONFIG_HP_ILO is not set 496# CONFIG_HP_ILO is not set
497# CONFIG_ISL29003 is not set
486# CONFIG_C2PORT is not set 498# CONFIG_C2PORT is not set
499
500#
501# EEPROM support
502#
503# CONFIG_EEPROM_AT24 is not set
504# CONFIG_EEPROM_LEGACY is not set
505CONFIG_EEPROM_93CX6=y
487CONFIG_HAVE_IDE=y 506CONFIG_HAVE_IDE=y
488# CONFIG_IDE is not set 507# CONFIG_IDE is not set
489 508
@@ -539,6 +558,7 @@ CONFIG_SCSI_LOWLEVEL=y
539# CONFIG_MEGARAID_NEWGEN is not set 558# CONFIG_MEGARAID_NEWGEN is not set
540# CONFIG_MEGARAID_LEGACY is not set 559# CONFIG_MEGARAID_LEGACY is not set
541# CONFIG_MEGARAID_SAS is not set 560# CONFIG_MEGARAID_SAS is not set
561# CONFIG_SCSI_MPT2SAS is not set
542# CONFIG_SCSI_HPTIOP is not set 562# CONFIG_SCSI_HPTIOP is not set
543# CONFIG_LIBFC is not set 563# CONFIG_LIBFC is not set
544# CONFIG_FCOE is not set 564# CONFIG_FCOE is not set
@@ -561,6 +581,7 @@ CONFIG_SCSI_LOWLEVEL=y
561# CONFIG_SCSI_DEBUG is not set 581# CONFIG_SCSI_DEBUG is not set
562# CONFIG_SCSI_SRP is not set 582# CONFIG_SCSI_SRP is not set
563# CONFIG_SCSI_DH is not set 583# CONFIG_SCSI_DH is not set
584# CONFIG_SCSI_OSD_INITIATOR is not set
564CONFIG_ATA=y 585CONFIG_ATA=y
565# CONFIG_ATA_NONSTANDARD is not set 586# CONFIG_ATA_NONSTANDARD is not set
566CONFIG_SATA_PMP=y 587CONFIG_SATA_PMP=y
@@ -635,6 +656,7 @@ CONFIG_PATA_PLATFORM=y
635# CONFIG_IEEE1394 is not set 656# CONFIG_IEEE1394 is not set
636# CONFIG_I2O is not set 657# CONFIG_I2O is not set
637CONFIG_NETDEVICES=y 658CONFIG_NETDEVICES=y
659CONFIG_COMPAT_NET_DEV_OPS=y
638# CONFIG_DUMMY is not set 660# CONFIG_DUMMY is not set
639# CONFIG_BONDING is not set 661# CONFIG_BONDING is not set
640# CONFIG_MACVLAN is not set 662# CONFIG_MACVLAN is not set
@@ -653,8 +675,10 @@ CONFIG_AX88796_93CX6=y
653# CONFIG_CASSINI is not set 675# CONFIG_CASSINI is not set
654# CONFIG_NET_VENDOR_3COM is not set 676# CONFIG_NET_VENDOR_3COM is not set
655# CONFIG_SMC91X is not set 677# CONFIG_SMC91X is not set
678# CONFIG_ETHOC is not set
656# CONFIG_SMC911X is not set 679# CONFIG_SMC911X is not set
657# CONFIG_SMSC911X is not set 680# CONFIG_SMSC911X is not set
681# CONFIG_DNET is not set
658# CONFIG_NET_TULIP is not set 682# CONFIG_NET_TULIP is not set
659# CONFIG_HP100 is not set 683# CONFIG_HP100 is not set
660# CONFIG_IBM_NEW_EMAC_ZMII is not set 684# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -687,6 +711,7 @@ CONFIG_R8169=y
687# CONFIG_QLA3XXX is not set 711# CONFIG_QLA3XXX is not set
688# CONFIG_ATL1 is not set 712# CONFIG_ATL1 is not set
689# CONFIG_ATL1E is not set 713# CONFIG_ATL1E is not set
714# CONFIG_ATL1C is not set
690# CONFIG_JME is not set 715# CONFIG_JME is not set
691CONFIG_NETDEV_10000=y 716CONFIG_NETDEV_10000=y
692# CONFIG_CHELSIO_T1 is not set 717# CONFIG_CHELSIO_T1 is not set
@@ -705,6 +730,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
705# CONFIG_BNX2X is not set 730# CONFIG_BNX2X is not set
706# CONFIG_QLGE is not set 731# CONFIG_QLGE is not set
707# CONFIG_SFC is not set 732# CONFIG_SFC is not set
733# CONFIG_BE2NET is not set
708# CONFIG_TR is not set 734# CONFIG_TR is not set
709 735
710# 736#
@@ -712,7 +738,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
712# 738#
713# CONFIG_WLAN_PRE80211 is not set 739# CONFIG_WLAN_PRE80211 is not set
714# CONFIG_WLAN_80211 is not set 740# CONFIG_WLAN_80211 is not set
715# CONFIG_IWLWIFI_LEDS is not set 741
742#
743# Enable WiMAX (Networking options) to see the WiMAX drivers
744#
716# CONFIG_WAN is not set 745# CONFIG_WAN is not set
717# CONFIG_FDDI is not set 746# CONFIG_FDDI is not set
718# CONFIG_HIPPI is not set 747# CONFIG_HIPPI is not set
@@ -800,6 +829,7 @@ CONFIG_LEGACY_PTYS=y
800CONFIG_LEGACY_PTY_COUNT=256 829CONFIG_LEGACY_PTY_COUNT=256
801# CONFIG_IPMI_HANDLER is not set 830# CONFIG_IPMI_HANDLER is not set
802CONFIG_HW_RANDOM=y 831CONFIG_HW_RANDOM=y
832# CONFIG_HW_RANDOM_TIMERIOMEM is not set
803# CONFIG_R3964 is not set 833# CONFIG_R3964 is not set
804# CONFIG_APPLICOM is not set 834# CONFIG_APPLICOM is not set
805# CONFIG_RAW_DRIVER is not set 835# CONFIG_RAW_DRIVER is not set
@@ -862,12 +892,9 @@ CONFIG_I2C_HIGHLANDER=y
862# Miscellaneous I2C Chip support 892# Miscellaneous I2C Chip support
863# 893#
864# CONFIG_DS1682 is not set 894# CONFIG_DS1682 is not set
865# CONFIG_EEPROM_AT24 is not set
866# CONFIG_EEPROM_LEGACY is not set
867# CONFIG_SENSORS_PCF8574 is not set 895# CONFIG_SENSORS_PCF8574 is not set
868# CONFIG_PCF8575 is not set 896# CONFIG_PCF8575 is not set
869# CONFIG_SENSORS_PCA9539 is not set 897# CONFIG_SENSORS_PCA9539 is not set
870# CONFIG_SENSORS_PCF8591 is not set
871# CONFIG_SENSORS_MAX6875 is not set 898# CONFIG_SENSORS_MAX6875 is not set
872# CONFIG_SENSORS_TSL2550 is not set 899# CONFIG_SENSORS_TSL2550 is not set
873# CONFIG_I2C_DEBUG_CORE is not set 900# CONFIG_I2C_DEBUG_CORE is not set
@@ -914,6 +941,7 @@ CONFIG_HWMON=y
914# CONFIG_SENSORS_ADT7462 is not set 941# CONFIG_SENSORS_ADT7462 is not set
915# CONFIG_SENSORS_ADT7470 is not set 942# CONFIG_SENSORS_ADT7470 is not set
916# CONFIG_SENSORS_ADT7473 is not set 943# CONFIG_SENSORS_ADT7473 is not set
944# CONFIG_SENSORS_ADT7475 is not set
917# CONFIG_SENSORS_ATXP1 is not set 945# CONFIG_SENSORS_ATXP1 is not set
918# CONFIG_SENSORS_DS1621 is not set 946# CONFIG_SENSORS_DS1621 is not set
919# CONFIG_SENSORS_I5K_AMB is not set 947# CONFIG_SENSORS_I5K_AMB is not set
@@ -934,10 +962,14 @@ CONFIG_HWMON=y
934# CONFIG_SENSORS_LM90 is not set 962# CONFIG_SENSORS_LM90 is not set
935# CONFIG_SENSORS_LM92 is not set 963# CONFIG_SENSORS_LM92 is not set
936# CONFIG_SENSORS_LM93 is not set 964# CONFIG_SENSORS_LM93 is not set
965# CONFIG_SENSORS_LTC4215 is not set
966# CONFIG_SENSORS_LTC4245 is not set
967# CONFIG_SENSORS_LM95241 is not set
937# CONFIG_SENSORS_MAX1619 is not set 968# CONFIG_SENSORS_MAX1619 is not set
938# CONFIG_SENSORS_MAX6650 is not set 969# CONFIG_SENSORS_MAX6650 is not set
939# CONFIG_SENSORS_PC87360 is not set 970# CONFIG_SENSORS_PC87360 is not set
940# CONFIG_SENSORS_PC87427 is not set 971# CONFIG_SENSORS_PC87427 is not set
972# CONFIG_SENSORS_PCF8591 is not set
941# CONFIG_SENSORS_SIS5595 is not set 973# CONFIG_SENSORS_SIS5595 is not set
942# CONFIG_SENSORS_DME1737 is not set 974# CONFIG_SENSORS_DME1737 is not set
943# CONFIG_SENSORS_SMSC47M1 is not set 975# CONFIG_SENSORS_SMSC47M1 is not set
@@ -979,6 +1011,7 @@ CONFIG_SSB_POSSIBLE=y
979# CONFIG_PMIC_DA903X is not set 1011# CONFIG_PMIC_DA903X is not set
980# CONFIG_MFD_WM8400 is not set 1012# CONFIG_MFD_WM8400 is not set
981# CONFIG_MFD_WM8350_I2C is not set 1013# CONFIG_MFD_WM8350_I2C is not set
1014# CONFIG_MFD_PCF50633 is not set
982# CONFIG_REGULATOR is not set 1015# CONFIG_REGULATOR is not set
983 1016
984# 1017#
@@ -1055,6 +1088,7 @@ CONFIG_FB_SH_MOBILE_LCDC=m
1055# CONFIG_FB_VIRTUAL is not set 1088# CONFIG_FB_VIRTUAL is not set
1056# CONFIG_FB_METRONOME is not set 1089# CONFIG_FB_METRONOME is not set
1057# CONFIG_FB_MB862XX is not set 1090# CONFIG_FB_MB862XX is not set
1091# CONFIG_FB_BROADSHEET is not set
1058# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1092# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1059 1093
1060# 1094#
@@ -1089,9 +1123,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1089# 1123#
1090 1124
1091# 1125#
1092# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1126# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1093# 1127#
1094# CONFIG_USB_GADGET is not set 1128# CONFIG_USB_GADGET is not set
1129
1130#
1131# OTG and related infrastructure
1132#
1095# CONFIG_UWB is not set 1133# CONFIG_UWB is not set
1096# CONFIG_MMC is not set 1134# CONFIG_MMC is not set
1097# CONFIG_MEMSTICK is not set 1135# CONFIG_MEMSTICK is not set
@@ -1153,6 +1191,7 @@ CONFIG_RTC_DRV_RS5C372=y
1153# 1191#
1154CONFIG_RTC_DRV_SH=y 1192CONFIG_RTC_DRV_SH=y
1155# CONFIG_DMADEVICES is not set 1193# CONFIG_DMADEVICES is not set
1194# CONFIG_AUXDISPLAY is not set
1156# CONFIG_UIO is not set 1195# CONFIG_UIO is not set
1157# CONFIG_STAGING is not set 1196# CONFIG_STAGING is not set
1158 1197
@@ -1176,6 +1215,7 @@ CONFIG_FS_POSIX_ACL=y
1176CONFIG_FILE_LOCKING=y 1215CONFIG_FILE_LOCKING=y
1177# CONFIG_XFS_FS is not set 1216# CONFIG_XFS_FS is not set
1178# CONFIG_OCFS2_FS is not set 1217# CONFIG_OCFS2_FS is not set
1218# CONFIG_BTRFS_FS is not set
1179CONFIG_DNOTIFY=y 1219CONFIG_DNOTIFY=y
1180CONFIG_INOTIFY=y 1220CONFIG_INOTIFY=y
1181CONFIG_INOTIFY_USER=y 1221CONFIG_INOTIFY_USER=y
@@ -1224,6 +1264,7 @@ CONFIG_MISC_FILESYSTEMS=y
1224# CONFIG_BFS_FS is not set 1264# CONFIG_BFS_FS is not set
1225# CONFIG_EFS_FS is not set 1265# CONFIG_EFS_FS is not set
1226# CONFIG_CRAMFS is not set 1266# CONFIG_CRAMFS is not set
1267# CONFIG_SQUASHFS is not set
1227# CONFIG_VXFS_FS is not set 1268# CONFIG_VXFS_FS is not set
1228CONFIG_MINIX_FS=y 1269CONFIG_MINIX_FS=y
1229# CONFIG_OMFS_FS is not set 1270# CONFIG_OMFS_FS is not set
@@ -1248,7 +1289,6 @@ CONFIG_EXPORTFS=y
1248CONFIG_NFS_COMMON=y 1289CONFIG_NFS_COMMON=y
1249CONFIG_SUNRPC=y 1290CONFIG_SUNRPC=y
1250CONFIG_SUNRPC_GSS=y 1291CONFIG_SUNRPC_GSS=y
1251# CONFIG_SUNRPC_REGISTER_V4 is not set
1252CONFIG_RPCSEC_GSS_KRB5=y 1292CONFIG_RPCSEC_GSS_KRB5=y
1253# CONFIG_RPCSEC_GSS_SPKM3 is not set 1293# CONFIG_RPCSEC_GSS_SPKM3 is not set
1254# CONFIG_SMB_FS is not set 1294# CONFIG_SMB_FS is not set
@@ -1354,6 +1394,7 @@ CONFIG_FRAME_POINTER=y
1354# CONFIG_LKDTM is not set 1394# CONFIG_LKDTM is not set
1355# CONFIG_FAULT_INJECTION is not set 1395# CONFIG_FAULT_INJECTION is not set
1356# CONFIG_LATENCYTOP is not set 1396# CONFIG_LATENCYTOP is not set
1397# CONFIG_PAGE_POISONING is not set
1357CONFIG_NOP_TRACER=y 1398CONFIG_NOP_TRACER=y
1358CONFIG_HAVE_FUNCTION_TRACER=y 1399CONFIG_HAVE_FUNCTION_TRACER=y
1359CONFIG_HAVE_DYNAMIC_FTRACE=y 1400CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -1373,7 +1414,7 @@ CONFIG_TRACING=y
1373# CONFIG_TRACE_BRANCH_PROFILING is not set 1414# CONFIG_TRACE_BRANCH_PROFILING is not set
1374# CONFIG_STACK_TRACER is not set 1415# CONFIG_STACK_TRACER is not set
1375# CONFIG_FTRACE_STARTUP_TEST is not set 1416# CONFIG_FTRACE_STARTUP_TEST is not set
1376# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1417# CONFIG_DYNAMIC_DEBUG is not set
1377# CONFIG_SAMPLES is not set 1418# CONFIG_SAMPLES is not set
1378CONFIG_HAVE_ARCH_KGDB=y 1419CONFIG_HAVE_ARCH_KGDB=y
1379# CONFIG_KGDB is not set 1420# CONFIG_KGDB is not set
@@ -1410,10 +1451,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1410CONFIG_CRYPTO_HASH=y 1451CONFIG_CRYPTO_HASH=y
1411CONFIG_CRYPTO_HASH2=y 1452CONFIG_CRYPTO_HASH2=y
1412CONFIG_CRYPTO_RNG2=y 1453CONFIG_CRYPTO_RNG2=y
1454CONFIG_CRYPTO_PCOMP=y
1413CONFIG_CRYPTO_MANAGER=y 1455CONFIG_CRYPTO_MANAGER=y
1414CONFIG_CRYPTO_MANAGER2=y 1456CONFIG_CRYPTO_MANAGER2=y
1415# CONFIG_CRYPTO_GF128MUL is not set 1457# CONFIG_CRYPTO_GF128MUL is not set
1416# CONFIG_CRYPTO_NULL is not set 1458# CONFIG_CRYPTO_NULL is not set
1459CONFIG_CRYPTO_WORKQUEUE=y
1417# CONFIG_CRYPTO_CRYPTD is not set 1460# CONFIG_CRYPTO_CRYPTD is not set
1418# CONFIG_CRYPTO_AUTHENC is not set 1461# CONFIG_CRYPTO_AUTHENC is not set
1419# CONFIG_CRYPTO_TEST is not set 1462# CONFIG_CRYPTO_TEST is not set
@@ -1482,6 +1525,7 @@ CONFIG_CRYPTO_DES=y
1482# Compression 1525# Compression
1483# 1526#
1484# CONFIG_CRYPTO_DEFLATE is not set 1527# CONFIG_CRYPTO_DEFLATE is not set
1528# CONFIG_CRYPTO_ZLIB is not set
1485# CONFIG_CRYPTO_LZO is not set 1529# CONFIG_CRYPTO_LZO is not set
1486 1530
1487# 1531#
@@ -1504,7 +1548,7 @@ CONFIG_CRC32=y
1504# CONFIG_CRC7 is not set 1548# CONFIG_CRC7 is not set
1505# CONFIG_LIBCRC32C is not set 1549# CONFIG_LIBCRC32C is not set
1506CONFIG_AUDIT_GENERIC=y 1550CONFIG_AUDIT_GENERIC=y
1507CONFIG_PLIST=y
1508CONFIG_HAS_IOMEM=y 1551CONFIG_HAS_IOMEM=y
1509CONFIG_HAS_IOPORT=y 1552CONFIG_HAS_IOPORT=y
1510CONFIG_HAS_DMA=y 1553CONFIG_HAS_DMA=y
1554CONFIG_NLATTR=y
diff --git a/arch/sh/configs/rsk7201_defconfig b/arch/sh/configs/rsk7201_defconfig
index 64ee69eef47c..a037c744b798 100644
--- a/arch/sh/configs/rsk7201_defconfig
+++ b/arch/sh/configs/rsk7201_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:19:04 2009 4# Thu Apr 2 18:29:08 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -24,6 +24,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -38,11 +39,20 @@ CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
39CONFIG_BSD_PROCESS_ACCT=y 40CONFIG_BSD_PROCESS_ACCT=y
40# CONFIG_BSD_PROCESS_ACCT_V3 is not set 41# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42
43#
44# RCU Subsystem
45#
46CONFIG_CLASSIC_RCU=y
47# CONFIG_TREE_RCU is not set
48# CONFIG_PREEMPT_RCU is not set
49# CONFIG_TREE_RCU_TRACE is not set
50# CONFIG_PREEMPT_RCU_TRACE is not set
41CONFIG_IKCONFIG=y 51CONFIG_IKCONFIG=y
42# CONFIG_IKCONFIG_PROC is not set 52# CONFIG_IKCONFIG_PROC is not set
43CONFIG_LOG_BUF_SHIFT=14 53CONFIG_LOG_BUF_SHIFT=14
44# CONFIG_CGROUPS is not set
45# CONFIG_GROUP_SCHED is not set 54# CONFIG_GROUP_SCHED is not set
55# CONFIG_CGROUPS is not set
46# CONFIG_SYSFS_DEPRECATED_V2 is not set 56# CONFIG_SYSFS_DEPRECATED_V2 is not set
47# CONFIG_RELAY is not set 57# CONFIG_RELAY is not set
48CONFIG_NAMESPACES=y 58CONFIG_NAMESPACES=y
@@ -52,8 +62,13 @@ CONFIG_USER_NS=y
52CONFIG_PID_NS=y 62CONFIG_PID_NS=y
53CONFIG_BLK_DEV_INITRD=y 63CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE="" 64CONFIG_INITRAMFS_SOURCE=""
65CONFIG_RD_GZIP=y
66# CONFIG_RD_BZIP2 is not set
67# CONFIG_RD_LZMA is not set
68CONFIG_INITRAMFS_COMPRESSION_NONE=y
55CONFIG_CC_OPTIMIZE_FOR_SIZE=y 69CONFIG_CC_OPTIMIZE_FOR_SIZE=y
56CONFIG_SYSCTL=y 70CONFIG_SYSCTL=y
71CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 72CONFIG_EMBEDDED=y
58CONFIG_UID16=y 73CONFIG_UID16=y
59CONFIG_SYSCTL_SYSCALL=y 74CONFIG_SYSCTL_SYSCALL=y
@@ -63,16 +78,15 @@ CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 78CONFIG_PRINTK=y
64CONFIG_BUG=y 79CONFIG_BUG=y
65CONFIG_ELF_CORE=y 80CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 82CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 83CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 84CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 85CONFIG_TIMERFD=y
73CONFIG_EVENTFD=y 86CONFIG_EVENTFD=y
74# CONFIG_AIO is not set 87# CONFIG_AIO is not set
75CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_COMPAT_BRK=y
76# CONFIG_SLAB is not set 90# CONFIG_SLAB is not set
77# CONFIG_SLUB is not set 91# CONFIG_SLUB is not set
78CONFIG_SLOB=y 92CONFIG_SLOB=y
@@ -112,11 +126,6 @@ CONFIG_IOSCHED_NOOP=y
112# CONFIG_DEFAULT_CFQ is not set 126# CONFIG_DEFAULT_CFQ is not set
113CONFIG_DEFAULT_NOOP=y 127CONFIG_DEFAULT_NOOP=y
114CONFIG_DEFAULT_IOSCHED="noop" 128CONFIG_DEFAULT_IOSCHED="noop"
115CONFIG_CLASSIC_RCU=y
116# CONFIG_TREE_RCU is not set
117# CONFIG_PREEMPT_RCU is not set
118# CONFIG_TREE_RCU_TRACE is not set
119# CONFIG_PREEMPT_RCU_TRACE is not set
120# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
121 130
122# 131#
@@ -152,6 +161,7 @@ CONFIG_CPU_SUBTYPE_SH7201=y
152# CONFIG_CPU_SUBTYPE_SH7770 is not set 161# CONFIG_CPU_SUBTYPE_SH7770 is not set
153# CONFIG_CPU_SUBTYPE_SH7780 is not set 162# CONFIG_CPU_SUBTYPE_SH7780 is not set
154# CONFIG_CPU_SUBTYPE_SH7785 is not set 163# CONFIG_CPU_SUBTYPE_SH7785 is not set
164# CONFIG_CPU_SUBTYPE_SH7786 is not set
155# CONFIG_CPU_SUBTYPE_SHX3 is not set 165# CONFIG_CPU_SUBTYPE_SHX3 is not set
156# CONFIG_CPU_SUBTYPE_SH7343 is not set 166# CONFIG_CPU_SUBTYPE_SH7343 is not set
157# CONFIG_CPU_SUBTYPE_SH7722 is not set 167# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -190,11 +200,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
190# CONFIG_PHYS_ADDR_T_64BIT is not set 200# CONFIG_PHYS_ADDR_T_64BIT is not set
191CONFIG_ZONE_DMA_FLAG=0 201CONFIG_ZONE_DMA_FLAG=0
192CONFIG_NR_QUICK=2 202CONFIG_NR_QUICK=2
203CONFIG_UNEVICTABLE_LRU=y
193 204
194# 205#
195# Cache configuration 206# Cache configuration
196# 207#
197# CONFIG_SH_DIRECT_MAPPED is not set
198CONFIG_CACHE_WRITEBACK=y 208CONFIG_CACHE_WRITEBACK=y
199# CONFIG_CACHE_WRITETHROUGH is not set 209# CONFIG_CACHE_WRITETHROUGH is not set
200# CONFIG_CACHE_OFF is not set 210# CONFIG_CACHE_OFF is not set
@@ -217,7 +227,6 @@ CONFIG_SH_RSK7201=y
217# 227#
218# Timer and clock configuration 228# Timer and clock configuration
219# 229#
220# CONFIG_SH_CMT is not set
221CONFIG_SH_MTU2=y 230CONFIG_SH_MTU2=y
222CONFIG_SH_TIMER_IRQ=16 231CONFIG_SH_TIMER_IRQ=16
223CONFIG_SH_PCLK_FREQ=40000000 232CONFIG_SH_PCLK_FREQ=40000000
@@ -251,7 +260,6 @@ CONFIG_SH_CLK_MD=0
251CONFIG_HZ_1000=y 260CONFIG_HZ_1000=y
252CONFIG_HZ=1000 261CONFIG_HZ=1000
253# CONFIG_SCHED_HRTICK is not set 262# CONFIG_SCHED_HRTICK is not set
254# CONFIG_KEXEC is not set
255# CONFIG_CRASH_DUMP is not set 263# CONFIG_CRASH_DUMP is not set
256# CONFIG_SECCOMP is not set 264# CONFIG_SECCOMP is not set
257CONFIG_PREEMPT_NONE=y 265CONFIG_PREEMPT_NONE=y
@@ -308,6 +316,7 @@ CONFIG_MTD=y
308# CONFIG_MTD_DEBUG is not set 316# CONFIG_MTD_DEBUG is not set
309CONFIG_MTD_CONCAT=y 317CONFIG_MTD_CONCAT=y
310CONFIG_MTD_PARTITIONS=y 318CONFIG_MTD_PARTITIONS=y
319# CONFIG_MTD_TESTS is not set
311CONFIG_MTD_REDBOOT_PARTS=y 320CONFIG_MTD_REDBOOT_PARTS=y
312CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 321CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
313# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 322# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -358,9 +367,7 @@ CONFIG_MTD_CFI_UTIL=y
358# 367#
359# CONFIG_MTD_COMPLEX_MAPPINGS is not set 368# CONFIG_MTD_COMPLEX_MAPPINGS is not set
360CONFIG_MTD_PHYSMAP=y 369CONFIG_MTD_PHYSMAP=y
361CONFIG_MTD_PHYSMAP_START=0x0 370# CONFIG_MTD_PHYSMAP_COMPAT is not set
362CONFIG_MTD_PHYSMAP_LEN=0x0
363CONFIG_MTD_PHYSMAP_BANKWIDTH=4
364# CONFIG_MTD_PLATRAM is not set 371# CONFIG_MTD_PLATRAM is not set
365 372
366# 373#
@@ -381,6 +388,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
381# CONFIG_MTD_ONENAND is not set 388# CONFIG_MTD_ONENAND is not set
382 389
383# 390#
391# LPDDR flash memory drivers
392#
393# CONFIG_MTD_LPDDR is not set
394
395#
384# UBI - Unsorted block images 396# UBI - Unsorted block images
385# 397#
386# CONFIG_MTD_UBI is not set 398# CONFIG_MTD_UBI is not set
@@ -392,9 +404,13 @@ CONFIG_BLK_DEV=y
392# CONFIG_CDROM_PKTCDVD is not set 404# CONFIG_CDROM_PKTCDVD is not set
393# CONFIG_BLK_DEV_HD is not set 405# CONFIG_BLK_DEV_HD is not set
394CONFIG_MISC_DEVICES=y 406CONFIG_MISC_DEVICES=y
395# CONFIG_EEPROM_93CX6 is not set
396# CONFIG_ENCLOSURE_SERVICES is not set 407# CONFIG_ENCLOSURE_SERVICES is not set
397# CONFIG_C2PORT is not set 408# CONFIG_C2PORT is not set
409
410#
411# EEPROM support
412#
413# CONFIG_EEPROM_93CX6 is not set
398CONFIG_HAVE_IDE=y 414CONFIG_HAVE_IDE=y
399# CONFIG_IDE is not set 415# CONFIG_IDE is not set
400 416
@@ -562,6 +578,7 @@ CONFIG_RTC_INTF_DEV=y
562# 578#
563CONFIG_RTC_DRV_SH=y 579CONFIG_RTC_DRV_SH=y
564# CONFIG_DMADEVICES is not set 580# CONFIG_DMADEVICES is not set
581# CONFIG_AUXDISPLAY is not set
565# CONFIG_UIO is not set 582# CONFIG_UIO is not set
566# CONFIG_STAGING is not set 583# CONFIG_STAGING is not set
567 584
@@ -577,6 +594,7 @@ CONFIG_EXT2_FS=y
577# CONFIG_FS_POSIX_ACL is not set 594# CONFIG_FS_POSIX_ACL is not set
578# CONFIG_FILE_LOCKING is not set 595# CONFIG_FILE_LOCKING is not set
579# CONFIG_XFS_FS is not set 596# CONFIG_XFS_FS is not set
597# CONFIG_BTRFS_FS is not set
580# CONFIG_DNOTIFY is not set 598# CONFIG_DNOTIFY is not set
581# CONFIG_INOTIFY is not set 599# CONFIG_INOTIFY is not set
582# CONFIG_QUOTA is not set 600# CONFIG_QUOTA is not set
@@ -626,6 +644,7 @@ CONFIG_JFFS2_ZLIB=y
626CONFIG_JFFS2_RTIME=y 644CONFIG_JFFS2_RTIME=y
627# CONFIG_JFFS2_RUBIN is not set 645# CONFIG_JFFS2_RUBIN is not set
628# CONFIG_CRAMFS is not set 646# CONFIG_CRAMFS is not set
647# CONFIG_SQUASHFS is not set
629# CONFIG_VXFS_FS is not set 648# CONFIG_VXFS_FS is not set
630# CONFIG_MINIX_FS is not set 649# CONFIG_MINIX_FS is not set
631# CONFIG_OMFS_FS is not set 650# CONFIG_OMFS_FS is not set
@@ -671,7 +690,7 @@ CONFIG_TRACING=y
671# 690#
672# Tracers 691# Tracers
673# 692#
674# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 693# CONFIG_DYNAMIC_DEBUG is not set
675# CONFIG_SAMPLES is not set 694# CONFIG_SAMPLES is not set
676CONFIG_HAVE_ARCH_KGDB=y 695CONFIG_HAVE_ARCH_KGDB=y
677# CONFIG_SH_STANDARD_BIOS is not set 696# CONFIG_SH_STANDARD_BIOS is not set
@@ -701,7 +720,7 @@ CONFIG_CRC32=y
701# CONFIG_LIBCRC32C is not set 720# CONFIG_LIBCRC32C is not set
702CONFIG_ZLIB_INFLATE=y 721CONFIG_ZLIB_INFLATE=y
703CONFIG_ZLIB_DEFLATE=y 722CONFIG_ZLIB_DEFLATE=y
704CONFIG_PLIST=y 723CONFIG_DECOMPRESS_GZIP=y
705CONFIG_HAS_IOMEM=y 724CONFIG_HAS_IOMEM=y
706CONFIG_HAS_IOPORT=y 725CONFIG_HAS_IOPORT=y
707CONFIG_HAS_DMA=y 726CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
index 8d7a5972a86a..9ae28e88426c 100644
--- a/arch/sh/configs/rsk7203_defconfig
+++ b/arch/sh/configs/rsk7203_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:20:31 2009 4# Thu Apr 2 18:30:34 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,12 +18,14 @@ CONFIG_GENERIC_GPIO=y
18# CONFIG_GENERIC_CLOCKEVENTS is not set 18# CONFIG_GENERIC_CLOCKEVENTS is not set
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
21CONFIG_SYS_SUPPORTS_CMT=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 30
29# 31#
@@ -41,11 +43,20 @@ CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set 43# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
44CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
45# CONFIG_IKCONFIG_PROC is not set 56# CONFIG_IKCONFIG_PROC is not set
46CONFIG_LOG_BUF_SHIFT=14 57CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
49# CONFIG_SYSFS_DEPRECATED_V2 is not set 60# CONFIG_SYSFS_DEPRECATED_V2 is not set
50# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
51CONFIG_NAMESPACES=y 62CONFIG_NAMESPACES=y
@@ -53,31 +64,35 @@ CONFIG_UTS_NS=y
53CONFIG_IPC_NS=y 64CONFIG_IPC_NS=y
54CONFIG_USER_NS=y 65CONFIG_USER_NS=y
55CONFIG_PID_NS=y 66CONFIG_PID_NS=y
67# CONFIG_NET_NS is not set
56CONFIG_BLK_DEV_INITRD=y 68CONFIG_BLK_DEV_INITRD=y
57CONFIG_INITRAMFS_SOURCE="" 69CONFIG_INITRAMFS_SOURCE=""
70CONFIG_RD_GZIP=y
71# CONFIG_RD_BZIP2 is not set
72# CONFIG_RD_LZMA is not set
73CONFIG_INITRAMFS_COMPRESSION_NONE=y
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y 74CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y 75CONFIG_SYSCTL=y
76CONFIG_ANON_INODES=y
60CONFIG_EMBEDDED=y 77CONFIG_EMBEDDED=y
61CONFIG_UID16=y 78CONFIG_UID16=y
62CONFIG_SYSCTL_SYSCALL=y 79CONFIG_SYSCTL_SYSCALL=y
63CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
64CONFIG_KALLSYMS_ALL=y 81CONFIG_KALLSYMS_ALL=y
65CONFIG_KALLSYMS_STRIP_GENERATED=y
66# CONFIG_KALLSYMS_EXTRA_PASS is not set 82# CONFIG_KALLSYMS_EXTRA_PASS is not set
67CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
68CONFIG_PRINTK=y 84CONFIG_PRINTK=y
69CONFIG_BUG=y 85CONFIG_BUG=y
70CONFIG_ELF_CORE=y 86CONFIG_ELF_CORE=y
71CONFIG_COMPAT_BRK=y
72CONFIG_BASE_FULL=y 87CONFIG_BASE_FULL=y
73CONFIG_FUTEX=y 88CONFIG_FUTEX=y
74CONFIG_ANON_INODES=y
75CONFIG_EPOLL=y 89CONFIG_EPOLL=y
76CONFIG_SIGNALFD=y 90CONFIG_SIGNALFD=y
77CONFIG_TIMERFD=y 91CONFIG_TIMERFD=y
78CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
79CONFIG_AIO=y 93CONFIG_AIO=y
80CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95CONFIG_COMPAT_BRK=y
81# CONFIG_SLAB is not set 96# CONFIG_SLAB is not set
82# CONFIG_SLUB is not set 97# CONFIG_SLUB is not set
83CONFIG_SLOB=y 98CONFIG_SLOB=y
@@ -117,11 +132,6 @@ CONFIG_IOSCHED_NOOP=y
117# CONFIG_DEFAULT_CFQ is not set 132# CONFIG_DEFAULT_CFQ is not set
118CONFIG_DEFAULT_NOOP=y 133CONFIG_DEFAULT_NOOP=y
119CONFIG_DEFAULT_IOSCHED="noop" 134CONFIG_DEFAULT_IOSCHED="noop"
120CONFIG_CLASSIC_RCU=y
121# CONFIG_TREE_RCU is not set
122# CONFIG_PREEMPT_RCU is not set
123# CONFIG_TREE_RCU_TRACE is not set
124# CONFIG_PREEMPT_RCU_TRACE is not set
125# CONFIG_FREEZER is not set 135# CONFIG_FREEZER is not set
126 136
127# 137#
@@ -157,6 +167,7 @@ CONFIG_CPU_SUBTYPE_SH7203=y
157# CONFIG_CPU_SUBTYPE_SH7770 is not set 167# CONFIG_CPU_SUBTYPE_SH7770 is not set
158# CONFIG_CPU_SUBTYPE_SH7780 is not set 168# CONFIG_CPU_SUBTYPE_SH7780 is not set
159# CONFIG_CPU_SUBTYPE_SH7785 is not set 169# CONFIG_CPU_SUBTYPE_SH7785 is not set
170# CONFIG_CPU_SUBTYPE_SH7786 is not set
160# CONFIG_CPU_SUBTYPE_SHX3 is not set 171# CONFIG_CPU_SUBTYPE_SHX3 is not set
161# CONFIG_CPU_SUBTYPE_SH7343 is not set 172# CONFIG_CPU_SUBTYPE_SH7343 is not set
162# CONFIG_CPU_SUBTYPE_SH7722 is not set 173# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -195,11 +206,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_PHYS_ADDR_T_64BIT is not set 206# CONFIG_PHYS_ADDR_T_64BIT is not set
196CONFIG_ZONE_DMA_FLAG=0 207CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 208CONFIG_NR_QUICK=2
209CONFIG_UNEVICTABLE_LRU=y
198 210
199# 211#
200# Cache configuration 212# Cache configuration
201# 213#
202# CONFIG_SH_DIRECT_MAPPED is not set
203CONFIG_CACHE_WRITEBACK=y 214CONFIG_CACHE_WRITEBACK=y
204# CONFIG_CACHE_WRITETHROUGH is not set 215# CONFIG_CACHE_WRITETHROUGH is not set
205# CONFIG_CACHE_OFF is not set 216# CONFIG_CACHE_OFF is not set
@@ -271,7 +282,6 @@ CONFIG_HEARTBEAT=y
271CONFIG_HZ_1000=y 282CONFIG_HZ_1000=y
272CONFIG_HZ=1000 283CONFIG_HZ=1000
273# CONFIG_SCHED_HRTICK is not set 284# CONFIG_SCHED_HRTICK is not set
274# CONFIG_KEXEC is not set
275# CONFIG_CRASH_DUMP is not set 285# CONFIG_CRASH_DUMP is not set
276# CONFIG_SECCOMP is not set 286# CONFIG_SECCOMP is not set
277CONFIG_PREEMPT_NONE=y 287CONFIG_PREEMPT_NONE=y
@@ -315,8 +325,6 @@ CONFIG_NET=y
315# 325#
316# Networking options 326# Networking options
317# 327#
318# CONFIG_NET_NS is not set
319CONFIG_COMPAT_NET_DEV_OPS=y
320# CONFIG_PACKET is not set 328# CONFIG_PACKET is not set
321# CONFIG_UNIX is not set 329# CONFIG_UNIX is not set
322# CONFIG_NET_KEY is not set 330# CONFIG_NET_KEY is not set
@@ -364,6 +372,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_LAPB is not set 372# CONFIG_LAPB is not set
365# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set
367# CONFIG_NET_SCHED is not set 376# CONFIG_NET_SCHED is not set
368# CONFIG_DCB is not set 377# CONFIG_DCB is not set
369 378
@@ -371,18 +380,19 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# Network testing 380# Network testing
372# 381#
373# CONFIG_NET_PKTGEN is not set 382# CONFIG_NET_PKTGEN is not set
383# CONFIG_NET_DROP_MONITOR is not set
374# CONFIG_HAMRADIO is not set 384# CONFIG_HAMRADIO is not set
375# CONFIG_CAN is not set 385# CONFIG_CAN is not set
376# CONFIG_IRDA is not set 386# CONFIG_IRDA is not set
377# CONFIG_BT is not set 387# CONFIG_BT is not set
378# CONFIG_AF_RXRPC is not set 388# CONFIG_AF_RXRPC is not set
379# CONFIG_PHONET is not set
380CONFIG_WIRELESS=y 389CONFIG_WIRELESS=y
381# CONFIG_CFG80211 is not set 390# CONFIG_CFG80211 is not set
382# CONFIG_WIRELESS_OLD_REGULATORY is not set 391# CONFIG_WIRELESS_OLD_REGULATORY is not set
383# CONFIG_WIRELESS_EXT is not set 392# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 393# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 394# CONFIG_MAC80211 is not set
395# CONFIG_WIMAX is not set
386# CONFIG_RFKILL is not set 396# CONFIG_RFKILL is not set
387# CONFIG_NET_9P is not set 397# CONFIG_NET_9P is not set
388 398
@@ -405,6 +415,7 @@ CONFIG_MTD=y
405# CONFIG_MTD_DEBUG is not set 415# CONFIG_MTD_DEBUG is not set
406CONFIG_MTD_CONCAT=y 416CONFIG_MTD_CONCAT=y
407CONFIG_MTD_PARTITIONS=y 417CONFIG_MTD_PARTITIONS=y
418# CONFIG_MTD_TESTS is not set
408CONFIG_MTD_REDBOOT_PARTS=y 419CONFIG_MTD_REDBOOT_PARTS=y
409CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 420CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
410# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 421# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -455,9 +466,7 @@ CONFIG_MTD_CFI_UTIL=y
455# 466#
456# CONFIG_MTD_COMPLEX_MAPPINGS is not set 467# CONFIG_MTD_COMPLEX_MAPPINGS is not set
457CONFIG_MTD_PHYSMAP=y 468CONFIG_MTD_PHYSMAP=y
458CONFIG_MTD_PHYSMAP_START=0x0 469# CONFIG_MTD_PHYSMAP_COMPAT is not set
459CONFIG_MTD_PHYSMAP_LEN=0x0
460CONFIG_MTD_PHYSMAP_BANKWIDTH=4
461# CONFIG_MTD_PLATRAM is not set 470# CONFIG_MTD_PLATRAM is not set
462 471
463# 472#
@@ -478,6 +487,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
478# CONFIG_MTD_ONENAND is not set 487# CONFIG_MTD_ONENAND is not set
479 488
480# 489#
490# LPDDR flash memory drivers
491#
492# CONFIG_MTD_LPDDR is not set
493
494#
481# UBI - Unsorted block images 495# UBI - Unsorted block images
482# 496#
483# CONFIG_MTD_UBI is not set 497# CONFIG_MTD_UBI is not set
@@ -492,9 +506,13 @@ CONFIG_BLK_DEV=y
492# CONFIG_ATA_OVER_ETH is not set 506# CONFIG_ATA_OVER_ETH is not set
493# CONFIG_BLK_DEV_HD is not set 507# CONFIG_BLK_DEV_HD is not set
494CONFIG_MISC_DEVICES=y 508CONFIG_MISC_DEVICES=y
495# CONFIG_EEPROM_93CX6 is not set
496# CONFIG_ENCLOSURE_SERVICES is not set 509# CONFIG_ENCLOSURE_SERVICES is not set
497# CONFIG_C2PORT is not set 510# CONFIG_C2PORT is not set
511
512#
513# EEPROM support
514#
515# CONFIG_EEPROM_93CX6 is not set
498CONFIG_HAVE_IDE=y 516CONFIG_HAVE_IDE=y
499# CONFIG_IDE is not set 517# CONFIG_IDE is not set
500 518
@@ -508,6 +526,7 @@ CONFIG_HAVE_IDE=y
508# CONFIG_ATA is not set 526# CONFIG_ATA is not set
509# CONFIG_MD is not set 527# CONFIG_MD is not set
510CONFIG_NETDEVICES=y 528CONFIG_NETDEVICES=y
529CONFIG_COMPAT_NET_DEV_OPS=y
511# CONFIG_DUMMY is not set 530# CONFIG_DUMMY is not set
512# CONFIG_BONDING is not set 531# CONFIG_BONDING is not set
513# CONFIG_MACVLAN is not set 532# CONFIG_MACVLAN is not set
@@ -539,8 +558,10 @@ CONFIG_MII=y
539# CONFIG_AX88796 is not set 558# CONFIG_AX88796 is not set
540# CONFIG_STNIC is not set 559# CONFIG_STNIC is not set
541# CONFIG_SMC91X is not set 560# CONFIG_SMC91X is not set
561# CONFIG_ETHOC is not set
542# CONFIG_SMC911X is not set 562# CONFIG_SMC911X is not set
543CONFIG_SMSC911X=y 563CONFIG_SMSC911X=y
564# CONFIG_DNET is not set
544# CONFIG_IBM_NEW_EMAC_ZMII is not set 565# CONFIG_IBM_NEW_EMAC_ZMII is not set
545# CONFIG_IBM_NEW_EMAC_RGMII is not set 566# CONFIG_IBM_NEW_EMAC_RGMII is not set
546# CONFIG_IBM_NEW_EMAC_TAH is not set 567# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -557,7 +578,10 @@ CONFIG_SMSC911X=y
557# 578#
558# CONFIG_WLAN_PRE80211 is not set 579# CONFIG_WLAN_PRE80211 is not set
559# CONFIG_WLAN_80211 is not set 580# CONFIG_WLAN_80211 is not set
560# CONFIG_IWLWIFI_LEDS is not set 581
582#
583# Enable WiMAX (Networking options) to see the WiMAX drivers
584#
561 585
562# 586#
563# USB Network Adapters 587# USB Network Adapters
@@ -777,7 +801,9 @@ CONFIG_USB_MON=y
777# USB Host Controller Drivers 801# USB Host Controller Drivers
778# 802#
779# CONFIG_USB_C67X00_HCD is not set 803# CONFIG_USB_C67X00_HCD is not set
804# CONFIG_USB_OXU210HP_HCD is not set
780# CONFIG_USB_ISP116X_HCD is not set 805# CONFIG_USB_ISP116X_HCD is not set
806# CONFIG_USB_ISP1760_HCD is not set
781# CONFIG_USB_SL811_HCD is not set 807# CONFIG_USB_SL811_HCD is not set
782CONFIG_USB_R8A66597_HCD=y 808CONFIG_USB_R8A66597_HCD=y
783# CONFIG_USB_HWA_HCD is not set 809# CONFIG_USB_HWA_HCD is not set
@@ -791,11 +817,11 @@ CONFIG_USB_R8A66597_HCD=y
791# CONFIG_USB_TMC is not set 817# CONFIG_USB_TMC is not set
792 818
793# 819#
794# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 820# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
795# 821#
796 822
797# 823#
798# see USB_STORAGE Help for more information 824# also be needed; see USB_STORAGE Help for more info
799# 825#
800# CONFIG_USB_LIBUSUAL is not set 826# CONFIG_USB_LIBUSUAL is not set
801 827
@@ -823,7 +849,6 @@ CONFIG_USB_R8A66597_HCD=y
823# CONFIG_USB_LED is not set 849# CONFIG_USB_LED is not set
824# CONFIG_USB_CYPRESS_CY7C63 is not set 850# CONFIG_USB_CYPRESS_CY7C63 is not set
825# CONFIG_USB_CYTHERM is not set 851# CONFIG_USB_CYTHERM is not set
826# CONFIG_USB_PHIDGET is not set
827# CONFIG_USB_IDMOUSE is not set 852# CONFIG_USB_IDMOUSE is not set
828# CONFIG_USB_FTDI_ELAN is not set 853# CONFIG_USB_FTDI_ELAN is not set
829# CONFIG_USB_APPLEDISPLAY is not set 854# CONFIG_USB_APPLEDISPLAY is not set
@@ -834,6 +859,12 @@ CONFIG_USB_R8A66597_HCD=y
834# CONFIG_USB_ISIGHTFW is not set 859# CONFIG_USB_ISIGHTFW is not set
835# CONFIG_USB_VST is not set 860# CONFIG_USB_VST is not set
836# CONFIG_USB_GADGET is not set 861# CONFIG_USB_GADGET is not set
862
863#
864# OTG and related infrastructure
865#
866# CONFIG_USB_GPIO_VBUS is not set
867# CONFIG_NOP_USB_XCEIV is not set
837# CONFIG_MMC is not set 868# CONFIG_MMC is not set
838# CONFIG_MEMSTICK is not set 869# CONFIG_MEMSTICK is not set
839CONFIG_NEW_LEDS=y 870CONFIG_NEW_LEDS=y
@@ -852,6 +883,10 @@ CONFIG_LEDS_TRIGGER_TIMER=y
852CONFIG_LEDS_TRIGGER_HEARTBEAT=y 883CONFIG_LEDS_TRIGGER_HEARTBEAT=y
853CONFIG_LEDS_TRIGGER_BACKLIGHT=y 884CONFIG_LEDS_TRIGGER_BACKLIGHT=y
854CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 885CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
886
887#
888# iptables trigger is under Netfilter config (LED target)
889#
855# CONFIG_ACCESSIBILITY is not set 890# CONFIG_ACCESSIBILITY is not set
856CONFIG_RTC_LIB=y 891CONFIG_RTC_LIB=y
857CONFIG_RTC_CLASS=y 892CONFIG_RTC_CLASS=y
@@ -891,6 +926,7 @@ CONFIG_RTC_INTF_DEV=y
891# 926#
892CONFIG_RTC_DRV_SH=y 927CONFIG_RTC_DRV_SH=y
893# CONFIG_DMADEVICES is not set 928# CONFIG_DMADEVICES is not set
929# CONFIG_AUXDISPLAY is not set
894# CONFIG_UIO is not set 930# CONFIG_UIO is not set
895# CONFIG_STAGING is not set 931# CONFIG_STAGING is not set
896 932
@@ -906,6 +942,7 @@ CONFIG_RTC_DRV_SH=y
906CONFIG_FILE_LOCKING=y 942CONFIG_FILE_LOCKING=y
907# CONFIG_XFS_FS is not set 943# CONFIG_XFS_FS is not set
908# CONFIG_OCFS2_FS is not set 944# CONFIG_OCFS2_FS is not set
945# CONFIG_BTRFS_FS is not set
909# CONFIG_DNOTIFY is not set 946# CONFIG_DNOTIFY is not set
910# CONFIG_INOTIFY is not set 947# CONFIG_INOTIFY is not set
911# CONFIG_QUOTA is not set 948# CONFIG_QUOTA is not set
@@ -945,6 +982,7 @@ CONFIG_MISC_FILESYSTEMS=y
945# CONFIG_EFS_FS is not set 982# CONFIG_EFS_FS is not set
946# CONFIG_JFFS2_FS is not set 983# CONFIG_JFFS2_FS is not set
947# CONFIG_CRAMFS is not set 984# CONFIG_CRAMFS is not set
985# CONFIG_SQUASHFS is not set
948# CONFIG_VXFS_FS is not set 986# CONFIG_VXFS_FS is not set
949# CONFIG_MINIX_FS is not set 987# CONFIG_MINIX_FS is not set
950# CONFIG_OMFS_FS is not set 988# CONFIG_OMFS_FS is not set
@@ -962,7 +1000,6 @@ CONFIG_ROOT_NFS=y
962CONFIG_LOCKD=y 1000CONFIG_LOCKD=y
963CONFIG_NFS_COMMON=y 1001CONFIG_NFS_COMMON=y
964CONFIG_SUNRPC=y 1002CONFIG_SUNRPC=y
965# CONFIG_SUNRPC_REGISTER_V4 is not set
966# CONFIG_RPCSEC_GSS_KRB5 is not set 1003# CONFIG_RPCSEC_GSS_KRB5 is not set
967# CONFIG_RPCSEC_GSS_SPKM3 is not set 1004# CONFIG_RPCSEC_GSS_SPKM3 is not set
968# CONFIG_SMB_FS is not set 1005# CONFIG_SMB_FS is not set
@@ -1018,6 +1055,7 @@ CONFIG_STACKTRACE=y
1018CONFIG_DEBUG_BUGVERBOSE=y 1055CONFIG_DEBUG_BUGVERBOSE=y
1019CONFIG_DEBUG_INFO=y 1056CONFIG_DEBUG_INFO=y
1020CONFIG_DEBUG_VM=y 1057CONFIG_DEBUG_VM=y
1058# CONFIG_DEBUG_NOMMU_REGIONS is not set
1021CONFIG_DEBUG_WRITECOUNT=y 1059CONFIG_DEBUG_WRITECOUNT=y
1022# CONFIG_DEBUG_MEMORY_INIT is not set 1060# CONFIG_DEBUG_MEMORY_INIT is not set
1023CONFIG_DEBUG_LIST=y 1061CONFIG_DEBUG_LIST=y
@@ -1031,6 +1069,7 @@ CONFIG_FRAME_POINTER=y
1031# CONFIG_FAULT_INJECTION is not set 1069# CONFIG_FAULT_INJECTION is not set
1032# CONFIG_LATENCYTOP is not set 1070# CONFIG_LATENCYTOP is not set
1033CONFIG_SYSCTL_SYSCALL_CHECK=y 1071CONFIG_SYSCTL_SYSCALL_CHECK=y
1072# CONFIG_PAGE_POISONING is not set
1034CONFIG_NOP_TRACER=y 1073CONFIG_NOP_TRACER=y
1035CONFIG_HAVE_FUNCTION_TRACER=y 1074CONFIG_HAVE_FUNCTION_TRACER=y
1036CONFIG_HAVE_DYNAMIC_FTRACE=y 1075CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -1048,7 +1087,7 @@ CONFIG_TRACING=y
1048# CONFIG_TRACE_BRANCH_PROFILING is not set 1087# CONFIG_TRACE_BRANCH_PROFILING is not set
1049# CONFIG_STACK_TRACER is not set 1088# CONFIG_STACK_TRACER is not set
1050# CONFIG_FTRACE_STARTUP_TEST is not set 1089# CONFIG_FTRACE_STARTUP_TEST is not set
1051# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1090# CONFIG_DYNAMIC_DEBUG is not set
1052# CONFIG_SAMPLES is not set 1091# CONFIG_SAMPLES is not set
1053CONFIG_HAVE_ARCH_KGDB=y 1092CONFIG_HAVE_ARCH_KGDB=y
1054# CONFIG_KGDB is not set 1093# CONFIG_KGDB is not set
@@ -1086,7 +1125,8 @@ CONFIG_CRC32=y
1086# CONFIG_CRC7 is not set 1125# CONFIG_CRC7 is not set
1087# CONFIG_LIBCRC32C is not set 1126# CONFIG_LIBCRC32C is not set
1088CONFIG_ZLIB_INFLATE=y 1127CONFIG_ZLIB_INFLATE=y
1089CONFIG_PLIST=y 1128CONFIG_DECOMPRESS_GZIP=y
1090CONFIG_HAS_IOMEM=y 1129CONFIG_HAS_IOMEM=y
1091CONFIG_HAS_IOPORT=y 1130CONFIG_HAS_IOPORT=y
1092CONFIG_HAS_DMA=y 1131CONFIG_HAS_DMA=y
1132CONFIG_NLATTR=y
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig
index d6680f4382c2..c0f741af6da8 100644
--- a/arch/sh/configs/rts7751r2d1_defconfig
+++ b/arch/sh/configs/rts7751r2d1_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:23:15 2009 4# Thu Apr 2 18:33:25 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_IO_TRAPPED=y 29CONFIG_IO_TRAPPED=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
30 31
@@ -43,10 +44,19 @@ CONFIG_SYSVIPC_SYSCTL=y
43# CONFIG_BSD_PROCESS_ACCT is not set 44# CONFIG_BSD_PROCESS_ACCT is not set
44# CONFIG_TASKSTATS is not set 45# CONFIG_TASKSTATS is not set
45# CONFIG_AUDIT is not set 46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
46# CONFIG_IKCONFIG is not set 56# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14 57CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_CGROUPS is not set
49# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
50CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
51CONFIG_SYSFS_DEPRECATED_V2=y 61CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_RELAY is not set 62# CONFIG_RELAY is not set
@@ -54,6 +64,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_BLK_DEV_INITRD is not set 64# CONFIG_BLK_DEV_INITRD is not set
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 65# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
58CONFIG_UID16=y 69CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
@@ -63,10 +74,8 @@ CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 74CONFIG_PRINTK=y
64CONFIG_BUG=y 75CONFIG_BUG=y
65CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 78CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 79CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -75,6 +84,7 @@ CONFIG_SHMEM=y
75CONFIG_AIO=y 84CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_PCI_QUIRKS=y 86CONFIG_PCI_QUIRKS=y
87CONFIG_COMPAT_BRK=y
78CONFIG_SLAB=y 88CONFIG_SLAB=y
79# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
80# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
@@ -116,11 +126,6 @@ CONFIG_DEFAULT_AS=y
116# CONFIG_DEFAULT_CFQ is not set 126# CONFIG_DEFAULT_CFQ is not set
117# CONFIG_DEFAULT_NOOP is not set 127# CONFIG_DEFAULT_NOOP is not set
118CONFIG_DEFAULT_IOSCHED="anticipatory" 128CONFIG_DEFAULT_IOSCHED="anticipatory"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
125 130
126# 131#
@@ -155,6 +160,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 160# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 161# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 162# CONFIG_CPU_SUBTYPE_SH7785 is not set
163# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 164# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 165# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 166# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +202,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 202CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 203CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 207
200# 208#
201# Cache configuration 209# Cache configuration
202# 210#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 211CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 212# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 213# CONFIG_CACHE_OFF is not set
@@ -300,6 +307,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
300# CONFIG_PCIEPORTBUS is not set 307# CONFIG_PCIEPORTBUS is not set
301# CONFIG_ARCH_SUPPORTS_MSI is not set 308# CONFIG_ARCH_SUPPORTS_MSI is not set
302CONFIG_PCI_LEGACY=y 309CONFIG_PCI_LEGACY=y
310# CONFIG_PCI_STUB is not set
311# CONFIG_PCI_IOV is not set
303# CONFIG_PCCARD is not set 312# CONFIG_PCCARD is not set
304CONFIG_HOTPLUG_PCI=y 313CONFIG_HOTPLUG_PCI=y
305# CONFIG_HOTPLUG_PCI_FAKE is not set 314# CONFIG_HOTPLUG_PCI_FAKE is not set
@@ -324,7 +333,6 @@ CONFIG_NET=y
324# 333#
325# Networking options 334# Networking options
326# 335#
327CONFIG_COMPAT_NET_DEV_OPS=y
328CONFIG_PACKET=y 336CONFIG_PACKET=y
329# CONFIG_PACKET_MMAP is not set 337# CONFIG_PACKET_MMAP is not set
330CONFIG_UNIX=y 338CONFIG_UNIX=y
@@ -376,6 +384,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
376# CONFIG_LAPB is not set 384# CONFIG_LAPB is not set
377# CONFIG_ECONET is not set 385# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 386# CONFIG_WAN_ROUTER is not set
387# CONFIG_PHONET is not set
379# CONFIG_NET_SCHED is not set 388# CONFIG_NET_SCHED is not set
380# CONFIG_DCB is not set 389# CONFIG_DCB is not set
381 390
@@ -383,12 +392,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
383# Network testing 392# Network testing
384# 393#
385# CONFIG_NET_PKTGEN is not set 394# CONFIG_NET_PKTGEN is not set
395# CONFIG_NET_DROP_MONITOR is not set
386# CONFIG_HAMRADIO is not set 396# CONFIG_HAMRADIO is not set
387# CONFIG_CAN is not set 397# CONFIG_CAN is not set
388# CONFIG_IRDA is not set 398# CONFIG_IRDA is not set
389# CONFIG_BT is not set 399# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set 400# CONFIG_AF_RXRPC is not set
391# CONFIG_PHONET is not set
392CONFIG_WIRELESS=y 401CONFIG_WIRELESS=y
393# CONFIG_CFG80211 is not set 402# CONFIG_CFG80211 is not set
394# CONFIG_WIRELESS_OLD_REGULATORY is not set 403# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -396,6 +405,7 @@ CONFIG_WIRELESS_EXT=y
396CONFIG_WIRELESS_EXT_SYSFS=y 405CONFIG_WIRELESS_EXT_SYSFS=y
397# CONFIG_LIB80211 is not set 406# CONFIG_LIB80211 is not set
398# CONFIG_MAC80211 is not set 407# CONFIG_MAC80211 is not set
408# CONFIG_WIMAX is not set
399# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
400# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
401 411
@@ -434,12 +444,17 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
434# CONFIG_BLK_DEV_HD is not set 444# CONFIG_BLK_DEV_HD is not set
435CONFIG_MISC_DEVICES=y 445CONFIG_MISC_DEVICES=y
436# CONFIG_PHANTOM is not set 446# CONFIG_PHANTOM is not set
437# CONFIG_EEPROM_93CX6 is not set
438# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
439# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
440# CONFIG_ENCLOSURE_SERVICES is not set 449# CONFIG_ENCLOSURE_SERVICES is not set
441# CONFIG_HP_ILO is not set 450# CONFIG_HP_ILO is not set
442# CONFIG_C2PORT is not set 451# CONFIG_C2PORT is not set
452
453#
454# EEPROM support
455#
456# CONFIG_EEPROM_AT25 is not set
457# CONFIG_EEPROM_93CX6 is not set
443CONFIG_HAVE_IDE=y 458CONFIG_HAVE_IDE=y
444# CONFIG_IDE is not set 459# CONFIG_IDE is not set
445 460
@@ -495,6 +510,7 @@ CONFIG_SCSI_LOWLEVEL=y
495# CONFIG_MEGARAID_NEWGEN is not set 510# CONFIG_MEGARAID_NEWGEN is not set
496# CONFIG_MEGARAID_LEGACY is not set 511# CONFIG_MEGARAID_LEGACY is not set
497# CONFIG_MEGARAID_SAS is not set 512# CONFIG_MEGARAID_SAS is not set
513# CONFIG_SCSI_MPT2SAS is not set
498# CONFIG_SCSI_HPTIOP is not set 514# CONFIG_SCSI_HPTIOP is not set
499# CONFIG_LIBFC is not set 515# CONFIG_LIBFC is not set
500# CONFIG_FCOE is not set 516# CONFIG_FCOE is not set
@@ -517,6 +533,7 @@ CONFIG_SCSI_LOWLEVEL=y
517# CONFIG_SCSI_DEBUG is not set 533# CONFIG_SCSI_DEBUG is not set
518# CONFIG_SCSI_SRP is not set 534# CONFIG_SCSI_SRP is not set
519# CONFIG_SCSI_DH is not set 535# CONFIG_SCSI_DH is not set
536# CONFIG_SCSI_OSD_INITIATOR is not set
520CONFIG_ATA=y 537CONFIG_ATA=y
521# CONFIG_ATA_NONSTANDARD is not set 538# CONFIG_ATA_NONSTANDARD is not set
522CONFIG_SATA_PMP=y 539CONFIG_SATA_PMP=y
@@ -591,6 +608,7 @@ CONFIG_PATA_PLATFORM=y
591# CONFIG_IEEE1394 is not set 608# CONFIG_IEEE1394 is not set
592# CONFIG_I2O is not set 609# CONFIG_I2O is not set
593CONFIG_NETDEVICES=y 610CONFIG_NETDEVICES=y
611CONFIG_COMPAT_NET_DEV_OPS=y
594# CONFIG_DUMMY is not set 612# CONFIG_DUMMY is not set
595# CONFIG_BONDING is not set 613# CONFIG_BONDING is not set
596# CONFIG_MACVLAN is not set 614# CONFIG_MACVLAN is not set
@@ -609,8 +627,10 @@ CONFIG_MII=y
609# CONFIG_NET_VENDOR_3COM is not set 627# CONFIG_NET_VENDOR_3COM is not set
610# CONFIG_SMC91X is not set 628# CONFIG_SMC91X is not set
611# CONFIG_ENC28J60 is not set 629# CONFIG_ENC28J60 is not set
630# CONFIG_ETHOC is not set
612# CONFIG_SMC911X is not set 631# CONFIG_SMC911X is not set
613# CONFIG_SMSC911X is not set 632# CONFIG_SMSC911X is not set
633# CONFIG_DNET is not set
614# CONFIG_NET_TULIP is not set 634# CONFIG_NET_TULIP is not set
615# CONFIG_HP100 is not set 635# CONFIG_HP100 is not set
616# CONFIG_IBM_NEW_EMAC_ZMII is not set 636# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -665,6 +685,7 @@ CONFIG_NETDEV_1000=y
665# CONFIG_QLA3XXX is not set 685# CONFIG_QLA3XXX is not set
666# CONFIG_ATL1 is not set 686# CONFIG_ATL1 is not set
667# CONFIG_ATL1E is not set 687# CONFIG_ATL1E is not set
688# CONFIG_ATL1C is not set
668# CONFIG_JME is not set 689# CONFIG_JME is not set
669CONFIG_NETDEV_10000=y 690CONFIG_NETDEV_10000=y
670# CONFIG_CHELSIO_T1 is not set 691# CONFIG_CHELSIO_T1 is not set
@@ -683,6 +704,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
683# CONFIG_BNX2X is not set 704# CONFIG_BNX2X is not set
684# CONFIG_QLGE is not set 705# CONFIG_QLGE is not set
685# CONFIG_SFC is not set 706# CONFIG_SFC is not set
707# CONFIG_BE2NET is not set
686# CONFIG_TR is not set 708# CONFIG_TR is not set
687 709
688# 710#
@@ -690,7 +712,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
690# 712#
691# CONFIG_WLAN_PRE80211 is not set 713# CONFIG_WLAN_PRE80211 is not set
692# CONFIG_WLAN_80211 is not set 714# CONFIG_WLAN_80211 is not set
693# CONFIG_IWLWIFI_LEDS is not set 715
716#
717# Enable WiMAX (Networking options) to see the WiMAX drivers
718#
694 719
695# 720#
696# USB Network Adapters 721# USB Network Adapters
@@ -780,6 +805,7 @@ CONFIG_LEGACY_PTYS=y
780CONFIG_LEGACY_PTY_COUNT=256 805CONFIG_LEGACY_PTY_COUNT=256
781# CONFIG_IPMI_HANDLER is not set 806# CONFIG_IPMI_HANDLER is not set
782CONFIG_HW_RANDOM=y 807CONFIG_HW_RANDOM=y
808# CONFIG_HW_RANDOM_TIMERIOMEM is not set
783# CONFIG_R3964 is not set 809# CONFIG_R3964 is not set
784# CONFIG_APPLICOM is not set 810# CONFIG_APPLICOM is not set
785# CONFIG_RAW_DRIVER is not set 811# CONFIG_RAW_DRIVER is not set
@@ -798,7 +824,6 @@ CONFIG_SPI_SH_SCI=y
798# 824#
799# SPI Protocol Masters 825# SPI Protocol Masters
800# 826#
801# CONFIG_EEPROM_AT25 is not set
802# CONFIG_SPI_SPIDEV is not set 827# CONFIG_SPI_SPIDEV is not set
803# CONFIG_SPI_TLE62X0 is not set 828# CONFIG_SPI_TLE62X0 is not set
804# CONFIG_W1 is not set 829# CONFIG_W1 is not set
@@ -822,6 +847,7 @@ CONFIG_HWMON=y
822# CONFIG_SENSORS_VT8231 is not set 847# CONFIG_SENSORS_VT8231 is not set
823# CONFIG_SENSORS_W83627HF is not set 848# CONFIG_SENSORS_W83627HF is not set
824# CONFIG_SENSORS_W83627EHF is not set 849# CONFIG_SENSORS_W83627EHF is not set
850# CONFIG_SENSORS_LIS3_SPI is not set
825# CONFIG_HWMON_DEBUG_CHIP is not set 851# CONFIG_HWMON_DEBUG_CHIP is not set
826# CONFIG_THERMAL is not set 852# CONFIG_THERMAL is not set
827# CONFIG_THERMAL_HWMON is not set 853# CONFIG_THERMAL_HWMON is not set
@@ -918,6 +944,7 @@ CONFIG_FB_SM501=y
918# CONFIG_FB_VIRTUAL is not set 944# CONFIG_FB_VIRTUAL is not set
919# CONFIG_FB_METRONOME is not set 945# CONFIG_FB_METRONOME is not set
920# CONFIG_FB_MB862XX is not set 946# CONFIG_FB_MB862XX is not set
947# CONFIG_FB_BROADSHEET is not set
921# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 948# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
922 949
923# 950#
@@ -996,6 +1023,8 @@ CONFIG_SND_PCI=y
996# CONFIG_SND_INDIGO is not set 1023# CONFIG_SND_INDIGO is not set
997# CONFIG_SND_INDIGOIO is not set 1024# CONFIG_SND_INDIGOIO is not set
998# CONFIG_SND_INDIGODJ is not set 1025# CONFIG_SND_INDIGODJ is not set
1026# CONFIG_SND_INDIGOIOX is not set
1027# CONFIG_SND_INDIGODJX is not set
999# CONFIG_SND_EMU10K1 is not set 1028# CONFIG_SND_EMU10K1 is not set
1000# CONFIG_SND_EMU10K1X is not set 1029# CONFIG_SND_EMU10K1X is not set
1001# CONFIG_SND_ENS1370 is not set 1030# CONFIG_SND_ENS1370 is not set
@@ -1101,6 +1130,7 @@ CONFIG_USB_DEVICE_CLASS=y
1101# 1130#
1102# CONFIG_USB_C67X00_HCD is not set 1131# CONFIG_USB_C67X00_HCD is not set
1103# CONFIG_USB_EHCI_HCD is not set 1132# CONFIG_USB_EHCI_HCD is not set
1133# CONFIG_USB_OXU210HP_HCD is not set
1104# CONFIG_USB_ISP116X_HCD is not set 1134# CONFIG_USB_ISP116X_HCD is not set
1105# CONFIG_USB_ISP1760_HCD is not set 1135# CONFIG_USB_ISP1760_HCD is not set
1106CONFIG_USB_OHCI_HCD=y 1136CONFIG_USB_OHCI_HCD=y
@@ -1122,18 +1152,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1122# CONFIG_USB_TMC is not set 1152# CONFIG_USB_TMC is not set
1123 1153
1124# 1154#
1125# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1155# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1126# 1156#
1127 1157
1128# 1158#
1129# see USB_STORAGE Help for more information 1159# also be needed; see USB_STORAGE Help for more info
1130# 1160#
1131CONFIG_USB_STORAGE=y 1161CONFIG_USB_STORAGE=y
1132# CONFIG_USB_STORAGE_DEBUG is not set 1162# CONFIG_USB_STORAGE_DEBUG is not set
1133# CONFIG_USB_STORAGE_DATAFAB is not set 1163# CONFIG_USB_STORAGE_DATAFAB is not set
1134# CONFIG_USB_STORAGE_FREECOM is not set 1164# CONFIG_USB_STORAGE_FREECOM is not set
1135# CONFIG_USB_STORAGE_ISD200 is not set 1165# CONFIG_USB_STORAGE_ISD200 is not set
1136# CONFIG_USB_STORAGE_DPCM is not set
1137# CONFIG_USB_STORAGE_USBAT is not set 1166# CONFIG_USB_STORAGE_USBAT is not set
1138# CONFIG_USB_STORAGE_SDDR09 is not set 1167# CONFIG_USB_STORAGE_SDDR09 is not set
1139# CONFIG_USB_STORAGE_SDDR55 is not set 1168# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1169,7 +1198,6 @@ CONFIG_USB_LIBUSUAL=y
1169# CONFIG_USB_LED is not set 1198# CONFIG_USB_LED is not set
1170# CONFIG_USB_CYPRESS_CY7C63 is not set 1199# CONFIG_USB_CYPRESS_CY7C63 is not set
1171# CONFIG_USB_CYTHERM is not set 1200# CONFIG_USB_CYTHERM is not set
1172# CONFIG_USB_PHIDGET is not set
1173# CONFIG_USB_IDMOUSE is not set 1201# CONFIG_USB_IDMOUSE is not set
1174# CONFIG_USB_FTDI_ELAN is not set 1202# CONFIG_USB_FTDI_ELAN is not set
1175# CONFIG_USB_APPLEDISPLAY is not set 1203# CONFIG_USB_APPLEDISPLAY is not set
@@ -1179,6 +1207,11 @@ CONFIG_USB_LIBUSUAL=y
1179# CONFIG_USB_ISIGHTFW is not set 1207# CONFIG_USB_ISIGHTFW is not set
1180# CONFIG_USB_VST is not set 1208# CONFIG_USB_VST is not set
1181# CONFIG_USB_GADGET is not set 1209# CONFIG_USB_GADGET is not set
1210
1211#
1212# OTG and related infrastructure
1213#
1214# CONFIG_NOP_USB_XCEIV is not set
1182# CONFIG_UWB is not set 1215# CONFIG_UWB is not set
1183# CONFIG_MMC is not set 1216# CONFIG_MMC is not set
1184# CONFIG_MEMSTICK is not set 1217# CONFIG_MEMSTICK is not set
@@ -1230,6 +1263,7 @@ CONFIG_RTC_DRV_R9701=y
1230# 1263#
1231# CONFIG_RTC_DRV_SH is not set 1264# CONFIG_RTC_DRV_SH is not set
1232# CONFIG_DMADEVICES is not set 1265# CONFIG_DMADEVICES is not set
1266# CONFIG_AUXDISPLAY is not set
1233# CONFIG_UIO is not set 1267# CONFIG_UIO is not set
1234# CONFIG_STAGING is not set 1268# CONFIG_STAGING is not set
1235 1269
@@ -1247,6 +1281,7 @@ CONFIG_EXT2_FS=y
1247CONFIG_FILE_LOCKING=y 1281CONFIG_FILE_LOCKING=y
1248# CONFIG_XFS_FS is not set 1282# CONFIG_XFS_FS is not set
1249# CONFIG_OCFS2_FS is not set 1283# CONFIG_OCFS2_FS is not set
1284# CONFIG_BTRFS_FS is not set
1250CONFIG_DNOTIFY=y 1285CONFIG_DNOTIFY=y
1251CONFIG_INOTIFY=y 1286CONFIG_INOTIFY=y
1252CONFIG_INOTIFY_USER=y 1287CONFIG_INOTIFY_USER=y
@@ -1293,6 +1328,7 @@ CONFIG_MISC_FILESYSTEMS=y
1293# CONFIG_BFS_FS is not set 1328# CONFIG_BFS_FS is not set
1294# CONFIG_EFS_FS is not set 1329# CONFIG_EFS_FS is not set
1295# CONFIG_CRAMFS is not set 1330# CONFIG_CRAMFS is not set
1331# CONFIG_SQUASHFS is not set
1296# CONFIG_VXFS_FS is not set 1332# CONFIG_VXFS_FS is not set
1297CONFIG_MINIX_FS=y 1333CONFIG_MINIX_FS=y
1298# CONFIG_OMFS_FS is not set 1334# CONFIG_OMFS_FS is not set
@@ -1385,7 +1421,7 @@ CONFIG_TRACING=y
1385# 1421#
1386# Tracers 1422# Tracers
1387# 1423#
1388# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1424# CONFIG_DYNAMIC_DEBUG is not set
1389# CONFIG_SAMPLES is not set 1425# CONFIG_SAMPLES is not set
1390CONFIG_HAVE_ARCH_KGDB=y 1426CONFIG_HAVE_ARCH_KGDB=y
1391# CONFIG_SH_STANDARD_BIOS is not set 1427# CONFIG_SH_STANDARD_BIOS is not set
@@ -1479,6 +1515,7 @@ CONFIG_CRYPTO=y
1479# Compression 1515# Compression
1480# 1516#
1481# CONFIG_CRYPTO_DEFLATE is not set 1517# CONFIG_CRYPTO_DEFLATE is not set
1518# CONFIG_CRYPTO_ZLIB is not set
1482# CONFIG_CRYPTO_LZO is not set 1519# CONFIG_CRYPTO_LZO is not set
1483 1520
1484# 1521#
@@ -1500,7 +1537,7 @@ CONFIG_CRC_T10DIF=y
1500CONFIG_CRC32=y 1537CONFIG_CRC32=y
1501# CONFIG_CRC7 is not set 1538# CONFIG_CRC7 is not set
1502# CONFIG_LIBCRC32C is not set 1539# CONFIG_LIBCRC32C is not set
1503CONFIG_PLIST=y
1504CONFIG_HAS_IOMEM=y 1540CONFIG_HAS_IOMEM=y
1505CONFIG_HAS_IOPORT=y 1541CONFIG_HAS_IOPORT=y
1506CONFIG_HAS_DMA=y 1542CONFIG_HAS_DMA=y
1543CONFIG_NLATTR=y
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig
index 3fca10e24833..8feef629e49c 100644
--- a/arch/sh/configs/rts7751r2dplus_defconfig
+++ b/arch/sh/configs/rts7751r2dplus_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:26:10 2009 4# Thu Apr 2 18:34:12 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_IO_TRAPPED=y 29CONFIG_IO_TRAPPED=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
30 31
@@ -43,10 +44,19 @@ CONFIG_SYSVIPC_SYSCTL=y
43# CONFIG_BSD_PROCESS_ACCT is not set 44# CONFIG_BSD_PROCESS_ACCT is not set
44# CONFIG_TASKSTATS is not set 45# CONFIG_TASKSTATS is not set
45# CONFIG_AUDIT is not set 46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
46# CONFIG_IKCONFIG is not set 56# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14 57CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_CGROUPS is not set
49# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
50CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
51CONFIG_SYSFS_DEPRECATED_V2=y 61CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_RELAY is not set 62# CONFIG_RELAY is not set
@@ -54,6 +64,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_BLK_DEV_INITRD is not set 64# CONFIG_BLK_DEV_INITRD is not set
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 65# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
58CONFIG_UID16=y 69CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
@@ -63,10 +74,8 @@ CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 74CONFIG_PRINTK=y
64CONFIG_BUG=y 75CONFIG_BUG=y
65CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 78CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 79CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -75,6 +84,7 @@ CONFIG_SHMEM=y
75CONFIG_AIO=y 84CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_PCI_QUIRKS=y 86CONFIG_PCI_QUIRKS=y
87CONFIG_COMPAT_BRK=y
78CONFIG_SLAB=y 88CONFIG_SLAB=y
79# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
80# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
@@ -116,11 +126,6 @@ CONFIG_DEFAULT_AS=y
116# CONFIG_DEFAULT_CFQ is not set 126# CONFIG_DEFAULT_CFQ is not set
117# CONFIG_DEFAULT_NOOP is not set 127# CONFIG_DEFAULT_NOOP is not set
118CONFIG_DEFAULT_IOSCHED="anticipatory" 128CONFIG_DEFAULT_IOSCHED="anticipatory"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
125 130
126# 131#
@@ -155,6 +160,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 160# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 161# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 162# CONFIG_CPU_SUBTYPE_SH7785 is not set
163# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 164# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 165# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 166# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +202,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 202CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 203CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 207
200# 208#
201# Cache configuration 209# Cache configuration
202# 210#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 211CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 212# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 213# CONFIG_CACHE_OFF is not set
@@ -300,6 +307,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
300# CONFIG_PCIEPORTBUS is not set 307# CONFIG_PCIEPORTBUS is not set
301# CONFIG_ARCH_SUPPORTS_MSI is not set 308# CONFIG_ARCH_SUPPORTS_MSI is not set
302CONFIG_PCI_LEGACY=y 309CONFIG_PCI_LEGACY=y
310# CONFIG_PCI_STUB is not set
311# CONFIG_PCI_IOV is not set
303# CONFIG_PCCARD is not set 312# CONFIG_PCCARD is not set
304CONFIG_HOTPLUG_PCI=y 313CONFIG_HOTPLUG_PCI=y
305# CONFIG_HOTPLUG_PCI_FAKE is not set 314# CONFIG_HOTPLUG_PCI_FAKE is not set
@@ -324,7 +333,6 @@ CONFIG_NET=y
324# 333#
325# Networking options 334# Networking options
326# 335#
327CONFIG_COMPAT_NET_DEV_OPS=y
328CONFIG_PACKET=y 336CONFIG_PACKET=y
329# CONFIG_PACKET_MMAP is not set 337# CONFIG_PACKET_MMAP is not set
330CONFIG_UNIX=y 338CONFIG_UNIX=y
@@ -376,6 +384,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
376# CONFIG_LAPB is not set 384# CONFIG_LAPB is not set
377# CONFIG_ECONET is not set 385# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 386# CONFIG_WAN_ROUTER is not set
387# CONFIG_PHONET is not set
379# CONFIG_NET_SCHED is not set 388# CONFIG_NET_SCHED is not set
380# CONFIG_DCB is not set 389# CONFIG_DCB is not set
381 390
@@ -383,12 +392,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
383# Network testing 392# Network testing
384# 393#
385# CONFIG_NET_PKTGEN is not set 394# CONFIG_NET_PKTGEN is not set
395# CONFIG_NET_DROP_MONITOR is not set
386# CONFIG_HAMRADIO is not set 396# CONFIG_HAMRADIO is not set
387# CONFIG_CAN is not set 397# CONFIG_CAN is not set
388# CONFIG_IRDA is not set 398# CONFIG_IRDA is not set
389# CONFIG_BT is not set 399# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set 400# CONFIG_AF_RXRPC is not set
391# CONFIG_PHONET is not set
392CONFIG_WIRELESS=y 401CONFIG_WIRELESS=y
393# CONFIG_CFG80211 is not set 402# CONFIG_CFG80211 is not set
394# CONFIG_WIRELESS_OLD_REGULATORY is not set 403# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -396,6 +405,7 @@ CONFIG_WIRELESS_EXT=y
396CONFIG_WIRELESS_EXT_SYSFS=y 405CONFIG_WIRELESS_EXT_SYSFS=y
397# CONFIG_LIB80211 is not set 406# CONFIG_LIB80211 is not set
398# CONFIG_MAC80211 is not set 407# CONFIG_MAC80211 is not set
408# CONFIG_WIMAX is not set
399# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
400# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
401 411
@@ -434,12 +444,17 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
434# CONFIG_BLK_DEV_HD is not set 444# CONFIG_BLK_DEV_HD is not set
435CONFIG_MISC_DEVICES=y 445CONFIG_MISC_DEVICES=y
436# CONFIG_PHANTOM is not set 446# CONFIG_PHANTOM is not set
437# CONFIG_EEPROM_93CX6 is not set
438# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
439# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
440# CONFIG_ENCLOSURE_SERVICES is not set 449# CONFIG_ENCLOSURE_SERVICES is not set
441# CONFIG_HP_ILO is not set 450# CONFIG_HP_ILO is not set
442# CONFIG_C2PORT is not set 451# CONFIG_C2PORT is not set
452
453#
454# EEPROM support
455#
456# CONFIG_EEPROM_AT25 is not set
457# CONFIG_EEPROM_93CX6 is not set
443CONFIG_HAVE_IDE=y 458CONFIG_HAVE_IDE=y
444# CONFIG_IDE is not set 459# CONFIG_IDE is not set
445 460
@@ -495,6 +510,7 @@ CONFIG_SCSI_LOWLEVEL=y
495# CONFIG_MEGARAID_NEWGEN is not set 510# CONFIG_MEGARAID_NEWGEN is not set
496# CONFIG_MEGARAID_LEGACY is not set 511# CONFIG_MEGARAID_LEGACY is not set
497# CONFIG_MEGARAID_SAS is not set 512# CONFIG_MEGARAID_SAS is not set
513# CONFIG_SCSI_MPT2SAS is not set
498# CONFIG_SCSI_HPTIOP is not set 514# CONFIG_SCSI_HPTIOP is not set
499# CONFIG_LIBFC is not set 515# CONFIG_LIBFC is not set
500# CONFIG_FCOE is not set 516# CONFIG_FCOE is not set
@@ -517,6 +533,7 @@ CONFIG_SCSI_LOWLEVEL=y
517# CONFIG_SCSI_DEBUG is not set 533# CONFIG_SCSI_DEBUG is not set
518# CONFIG_SCSI_SRP is not set 534# CONFIG_SCSI_SRP is not set
519# CONFIG_SCSI_DH is not set 535# CONFIG_SCSI_DH is not set
536# CONFIG_SCSI_OSD_INITIATOR is not set
520CONFIG_ATA=y 537CONFIG_ATA=y
521# CONFIG_ATA_NONSTANDARD is not set 538# CONFIG_ATA_NONSTANDARD is not set
522CONFIG_SATA_PMP=y 539CONFIG_SATA_PMP=y
@@ -591,6 +608,7 @@ CONFIG_PATA_PLATFORM=y
591# CONFIG_IEEE1394 is not set 608# CONFIG_IEEE1394 is not set
592# CONFIG_I2O is not set 609# CONFIG_I2O is not set
593CONFIG_NETDEVICES=y 610CONFIG_NETDEVICES=y
611CONFIG_COMPAT_NET_DEV_OPS=y
594# CONFIG_DUMMY is not set 612# CONFIG_DUMMY is not set
595# CONFIG_BONDING is not set 613# CONFIG_BONDING is not set
596# CONFIG_MACVLAN is not set 614# CONFIG_MACVLAN is not set
@@ -609,8 +627,10 @@ CONFIG_MII=y
609# CONFIG_NET_VENDOR_3COM is not set 627# CONFIG_NET_VENDOR_3COM is not set
610# CONFIG_SMC91X is not set 628# CONFIG_SMC91X is not set
611# CONFIG_ENC28J60 is not set 629# CONFIG_ENC28J60 is not set
630# CONFIG_ETHOC is not set
612# CONFIG_SMC911X is not set 631# CONFIG_SMC911X is not set
613# CONFIG_SMSC911X is not set 632# CONFIG_SMSC911X is not set
633# CONFIG_DNET is not set
614# CONFIG_NET_TULIP is not set 634# CONFIG_NET_TULIP is not set
615# CONFIG_HP100 is not set 635# CONFIG_HP100 is not set
616# CONFIG_IBM_NEW_EMAC_ZMII is not set 636# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -665,6 +685,7 @@ CONFIG_NETDEV_1000=y
665# CONFIG_QLA3XXX is not set 685# CONFIG_QLA3XXX is not set
666# CONFIG_ATL1 is not set 686# CONFIG_ATL1 is not set
667# CONFIG_ATL1E is not set 687# CONFIG_ATL1E is not set
688# CONFIG_ATL1C is not set
668# CONFIG_JME is not set 689# CONFIG_JME is not set
669CONFIG_NETDEV_10000=y 690CONFIG_NETDEV_10000=y
670# CONFIG_CHELSIO_T1 is not set 691# CONFIG_CHELSIO_T1 is not set
@@ -683,6 +704,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
683# CONFIG_BNX2X is not set 704# CONFIG_BNX2X is not set
684# CONFIG_QLGE is not set 705# CONFIG_QLGE is not set
685# CONFIG_SFC is not set 706# CONFIG_SFC is not set
707# CONFIG_BE2NET is not set
686# CONFIG_TR is not set 708# CONFIG_TR is not set
687 709
688# 710#
@@ -690,7 +712,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
690# 712#
691# CONFIG_WLAN_PRE80211 is not set 713# CONFIG_WLAN_PRE80211 is not set
692# CONFIG_WLAN_80211 is not set 714# CONFIG_WLAN_80211 is not set
693# CONFIG_IWLWIFI_LEDS is not set 715
716#
717# Enable WiMAX (Networking options) to see the WiMAX drivers
718#
694 719
695# 720#
696# USB Network Adapters 721# USB Network Adapters
@@ -780,6 +805,7 @@ CONFIG_LEGACY_PTYS=y
780CONFIG_LEGACY_PTY_COUNT=256 805CONFIG_LEGACY_PTY_COUNT=256
781# CONFIG_IPMI_HANDLER is not set 806# CONFIG_IPMI_HANDLER is not set
782CONFIG_HW_RANDOM=y 807CONFIG_HW_RANDOM=y
808# CONFIG_HW_RANDOM_TIMERIOMEM is not set
783# CONFIG_R3964 is not set 809# CONFIG_R3964 is not set
784# CONFIG_APPLICOM is not set 810# CONFIG_APPLICOM is not set
785# CONFIG_RAW_DRIVER is not set 811# CONFIG_RAW_DRIVER is not set
@@ -798,7 +824,6 @@ CONFIG_SPI_SH_SCI=y
798# 824#
799# SPI Protocol Masters 825# SPI Protocol Masters
800# 826#
801# CONFIG_EEPROM_AT25 is not set
802# CONFIG_SPI_SPIDEV is not set 827# CONFIG_SPI_SPIDEV is not set
803# CONFIG_SPI_TLE62X0 is not set 828# CONFIG_SPI_TLE62X0 is not set
804# CONFIG_W1 is not set 829# CONFIG_W1 is not set
@@ -822,6 +847,7 @@ CONFIG_HWMON=y
822# CONFIG_SENSORS_VT8231 is not set 847# CONFIG_SENSORS_VT8231 is not set
823# CONFIG_SENSORS_W83627HF is not set 848# CONFIG_SENSORS_W83627HF is not set
824# CONFIG_SENSORS_W83627EHF is not set 849# CONFIG_SENSORS_W83627EHF is not set
850# CONFIG_SENSORS_LIS3_SPI is not set
825# CONFIG_HWMON_DEBUG_CHIP is not set 851# CONFIG_HWMON_DEBUG_CHIP is not set
826# CONFIG_THERMAL is not set 852# CONFIG_THERMAL is not set
827# CONFIG_THERMAL_HWMON is not set 853# CONFIG_THERMAL_HWMON is not set
@@ -918,6 +944,7 @@ CONFIG_FB_SM501=y
918# CONFIG_FB_VIRTUAL is not set 944# CONFIG_FB_VIRTUAL is not set
919# CONFIG_FB_METRONOME is not set 945# CONFIG_FB_METRONOME is not set
920# CONFIG_FB_MB862XX is not set 946# CONFIG_FB_MB862XX is not set
947# CONFIG_FB_BROADSHEET is not set
921# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 948# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
922 949
923# 950#
@@ -996,6 +1023,8 @@ CONFIG_SND_PCI=y
996# CONFIG_SND_INDIGO is not set 1023# CONFIG_SND_INDIGO is not set
997# CONFIG_SND_INDIGOIO is not set 1024# CONFIG_SND_INDIGOIO is not set
998# CONFIG_SND_INDIGODJ is not set 1025# CONFIG_SND_INDIGODJ is not set
1026# CONFIG_SND_INDIGOIOX is not set
1027# CONFIG_SND_INDIGODJX is not set
999# CONFIG_SND_EMU10K1 is not set 1028# CONFIG_SND_EMU10K1 is not set
1000# CONFIG_SND_EMU10K1X is not set 1029# CONFIG_SND_EMU10K1X is not set
1001# CONFIG_SND_ENS1370 is not set 1030# CONFIG_SND_ENS1370 is not set
@@ -1101,6 +1130,7 @@ CONFIG_USB_DEVICE_CLASS=y
1101# 1130#
1102# CONFIG_USB_C67X00_HCD is not set 1131# CONFIG_USB_C67X00_HCD is not set
1103# CONFIG_USB_EHCI_HCD is not set 1132# CONFIG_USB_EHCI_HCD is not set
1133# CONFIG_USB_OXU210HP_HCD is not set
1104# CONFIG_USB_ISP116X_HCD is not set 1134# CONFIG_USB_ISP116X_HCD is not set
1105# CONFIG_USB_ISP1760_HCD is not set 1135# CONFIG_USB_ISP1760_HCD is not set
1106CONFIG_USB_OHCI_HCD=y 1136CONFIG_USB_OHCI_HCD=y
@@ -1122,18 +1152,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1122# CONFIG_USB_TMC is not set 1152# CONFIG_USB_TMC is not set
1123 1153
1124# 1154#
1125# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1155# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1126# 1156#
1127 1157
1128# 1158#
1129# see USB_STORAGE Help for more information 1159# also be needed; see USB_STORAGE Help for more info
1130# 1160#
1131CONFIG_USB_STORAGE=y 1161CONFIG_USB_STORAGE=y
1132# CONFIG_USB_STORAGE_DEBUG is not set 1162# CONFIG_USB_STORAGE_DEBUG is not set
1133# CONFIG_USB_STORAGE_DATAFAB is not set 1163# CONFIG_USB_STORAGE_DATAFAB is not set
1134# CONFIG_USB_STORAGE_FREECOM is not set 1164# CONFIG_USB_STORAGE_FREECOM is not set
1135# CONFIG_USB_STORAGE_ISD200 is not set 1165# CONFIG_USB_STORAGE_ISD200 is not set
1136# CONFIG_USB_STORAGE_DPCM is not set
1137# CONFIG_USB_STORAGE_USBAT is not set 1166# CONFIG_USB_STORAGE_USBAT is not set
1138# CONFIG_USB_STORAGE_SDDR09 is not set 1167# CONFIG_USB_STORAGE_SDDR09 is not set
1139# CONFIG_USB_STORAGE_SDDR55 is not set 1168# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1169,7 +1198,6 @@ CONFIG_USB_LIBUSUAL=y
1169# CONFIG_USB_LED is not set 1198# CONFIG_USB_LED is not set
1170# CONFIG_USB_CYPRESS_CY7C63 is not set 1199# CONFIG_USB_CYPRESS_CY7C63 is not set
1171# CONFIG_USB_CYTHERM is not set 1200# CONFIG_USB_CYTHERM is not set
1172# CONFIG_USB_PHIDGET is not set
1173# CONFIG_USB_IDMOUSE is not set 1201# CONFIG_USB_IDMOUSE is not set
1174# CONFIG_USB_FTDI_ELAN is not set 1202# CONFIG_USB_FTDI_ELAN is not set
1175# CONFIG_USB_APPLEDISPLAY is not set 1203# CONFIG_USB_APPLEDISPLAY is not set
@@ -1179,6 +1207,11 @@ CONFIG_USB_LIBUSUAL=y
1179# CONFIG_USB_ISIGHTFW is not set 1207# CONFIG_USB_ISIGHTFW is not set
1180# CONFIG_USB_VST is not set 1208# CONFIG_USB_VST is not set
1181# CONFIG_USB_GADGET is not set 1209# CONFIG_USB_GADGET is not set
1210
1211#
1212# OTG and related infrastructure
1213#
1214# CONFIG_NOP_USB_XCEIV is not set
1182# CONFIG_UWB is not set 1215# CONFIG_UWB is not set
1183# CONFIG_MMC is not set 1216# CONFIG_MMC is not set
1184# CONFIG_MEMSTICK is not set 1217# CONFIG_MEMSTICK is not set
@@ -1230,6 +1263,7 @@ CONFIG_RTC_DRV_R9701=y
1230# 1263#
1231# CONFIG_RTC_DRV_SH is not set 1264# CONFIG_RTC_DRV_SH is not set
1232# CONFIG_DMADEVICES is not set 1265# CONFIG_DMADEVICES is not set
1266# CONFIG_AUXDISPLAY is not set
1233# CONFIG_UIO is not set 1267# CONFIG_UIO is not set
1234# CONFIG_STAGING is not set 1268# CONFIG_STAGING is not set
1235 1269
@@ -1247,6 +1281,7 @@ CONFIG_EXT2_FS=y
1247CONFIG_FILE_LOCKING=y 1281CONFIG_FILE_LOCKING=y
1248# CONFIG_XFS_FS is not set 1282# CONFIG_XFS_FS is not set
1249# CONFIG_OCFS2_FS is not set 1283# CONFIG_OCFS2_FS is not set
1284# CONFIG_BTRFS_FS is not set
1250CONFIG_DNOTIFY=y 1285CONFIG_DNOTIFY=y
1251CONFIG_INOTIFY=y 1286CONFIG_INOTIFY=y
1252CONFIG_INOTIFY_USER=y 1287CONFIG_INOTIFY_USER=y
@@ -1293,6 +1328,7 @@ CONFIG_MISC_FILESYSTEMS=y
1293# CONFIG_BFS_FS is not set 1328# CONFIG_BFS_FS is not set
1294# CONFIG_EFS_FS is not set 1329# CONFIG_EFS_FS is not set
1295# CONFIG_CRAMFS is not set 1330# CONFIG_CRAMFS is not set
1331# CONFIG_SQUASHFS is not set
1296# CONFIG_VXFS_FS is not set 1332# CONFIG_VXFS_FS is not set
1297CONFIG_MINIX_FS=y 1333CONFIG_MINIX_FS=y
1298# CONFIG_OMFS_FS is not set 1334# CONFIG_OMFS_FS is not set
@@ -1385,7 +1421,7 @@ CONFIG_TRACING=y
1385# 1421#
1386# Tracers 1422# Tracers
1387# 1423#
1388# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1424# CONFIG_DYNAMIC_DEBUG is not set
1389# CONFIG_SAMPLES is not set 1425# CONFIG_SAMPLES is not set
1390CONFIG_HAVE_ARCH_KGDB=y 1426CONFIG_HAVE_ARCH_KGDB=y
1391# CONFIG_SH_STANDARD_BIOS is not set 1427# CONFIG_SH_STANDARD_BIOS is not set
@@ -1479,6 +1515,7 @@ CONFIG_CRYPTO=y
1479# Compression 1515# Compression
1480# 1516#
1481# CONFIG_CRYPTO_DEFLATE is not set 1517# CONFIG_CRYPTO_DEFLATE is not set
1518# CONFIG_CRYPTO_ZLIB is not set
1482# CONFIG_CRYPTO_LZO is not set 1519# CONFIG_CRYPTO_LZO is not set
1483 1520
1484# 1521#
@@ -1500,7 +1537,7 @@ CONFIG_CRC_T10DIF=y
1500CONFIG_CRC32=y 1537CONFIG_CRC32=y
1501# CONFIG_CRC7 is not set 1538# CONFIG_CRC7 is not set
1502# CONFIG_LIBCRC32C is not set 1539# CONFIG_LIBCRC32C is not set
1503CONFIG_PLIST=y
1504CONFIG_HAS_IOMEM=y 1540CONFIG_HAS_IOMEM=y
1505CONFIG_HAS_IOPORT=y 1541CONFIG_HAS_IOPORT=y
1506CONFIG_HAS_DMA=y 1542CONFIG_HAS_DMA=y
1543CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig
index 5d6b06755ae7..739e2299ae80 100644
--- a/arch/sh/configs/sdk7780_defconfig
+++ b/arch/sh/configs/sdk7780_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:26:40 2009 4# Thu Apr 2 18:34:43 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -44,11 +45,20 @@ CONFIG_BSD_PROCESS_ACCT=y
44# CONFIG_BSD_PROCESS_ACCT_V3 is not set 45# CONFIG_BSD_PROCESS_ACCT_V3 is not set
45# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
47CONFIG_IKCONFIG=y 57CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y 58CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=18 59CONFIG_LOG_BUF_SHIFT=18
50# CONFIG_CGROUPS is not set
51# CONFIG_GROUP_SCHED is not set 60# CONFIG_GROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 62CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 63CONFIG_SYSFS_DEPRECATED_V2=y
54CONFIG_RELAY=y 64CONFIG_RELAY=y
@@ -56,21 +66,19 @@ CONFIG_RELAY=y
56# CONFIG_BLK_DEV_INITRD is not set 66# CONFIG_BLK_DEV_INITRD is not set
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 67CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 68CONFIG_SYSCTL=y
69CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 70CONFIG_EMBEDDED=y
60CONFIG_UID16=y 71CONFIG_UID16=y
61CONFIG_SYSCTL_SYSCALL=y 72CONFIG_SYSCTL_SYSCALL=y
62CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
63CONFIG_KALLSYMS_ALL=y 74CONFIG_KALLSYMS_ALL=y
64CONFIG_KALLSYMS_STRIP_GENERATED=y
65# CONFIG_KALLSYMS_EXTRA_PASS is not set 75# CONFIG_KALLSYMS_EXTRA_PASS is not set
66CONFIG_HOTPLUG=y 76CONFIG_HOTPLUG=y
67CONFIG_PRINTK=y 77CONFIG_PRINTK=y
68CONFIG_BUG=y 78CONFIG_BUG=y
69CONFIG_ELF_CORE=y 79CONFIG_ELF_CORE=y
70CONFIG_COMPAT_BRK=y
71CONFIG_BASE_FULL=y 80CONFIG_BASE_FULL=y
72CONFIG_FUTEX=y 81CONFIG_FUTEX=y
73CONFIG_ANON_INODES=y
74CONFIG_EPOLL=y 82CONFIG_EPOLL=y
75CONFIG_SIGNALFD=y 83CONFIG_SIGNALFD=y
76CONFIG_TIMERFD=y 84CONFIG_TIMERFD=y
@@ -80,6 +88,7 @@ CONFIG_AIO=y
80CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
81CONFIG_PCI_QUIRKS=y 89CONFIG_PCI_QUIRKS=y
82CONFIG_SLUB_DEBUG=y 90CONFIG_SLUB_DEBUG=y
91CONFIG_COMPAT_BRK=y
83# CONFIG_SLAB is not set 92# CONFIG_SLAB is not set
84CONFIG_SLUB=y 93CONFIG_SLUB=y
85# CONFIG_SLOB is not set 94# CONFIG_SLOB is not set
@@ -119,11 +128,6 @@ CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_CFQ is not set 128# CONFIG_DEFAULT_CFQ is not set
120# CONFIG_DEFAULT_NOOP is not set 129# CONFIG_DEFAULT_NOOP is not set
121CONFIG_DEFAULT_IOSCHED="anticipatory" 130CONFIG_DEFAULT_IOSCHED="anticipatory"
122CONFIG_CLASSIC_RCU=y
123# CONFIG_TREE_RCU is not set
124# CONFIG_PREEMPT_RCU is not set
125# CONFIG_TREE_RCU_TRACE is not set
126# CONFIG_PREEMPT_RCU_TRACE is not set
127# CONFIG_FREEZER is not set 131# CONFIG_FREEZER is not set
128 132
129# 133#
@@ -159,6 +163,7 @@ CONFIG_CPU_SH4A=y
159# CONFIG_CPU_SUBTYPE_SH7770 is not set 163# CONFIG_CPU_SUBTYPE_SH7770 is not set
160CONFIG_CPU_SUBTYPE_SH7780=y 164CONFIG_CPU_SUBTYPE_SH7780=y
161# CONFIG_CPU_SUBTYPE_SH7785 is not set 165# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# CONFIG_CPU_SUBTYPE_SH7786 is not set
162# CONFIG_CPU_SUBTYPE_SHX3 is not set 167# CONFIG_CPU_SUBTYPE_SHX3 is not set
163# CONFIG_CPU_SUBTYPE_SH7343 is not set 168# CONFIG_CPU_SUBTYPE_SH7343 is not set
164# CONFIG_CPU_SUBTYPE_SH7722 is not set 169# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -174,8 +179,11 @@ CONFIG_MMU=y
174CONFIG_PAGE_OFFSET=0x80000000 179CONFIG_PAGE_OFFSET=0x80000000
175CONFIG_MEMORY_START=0x08000000 180CONFIG_MEMORY_START=0x08000000
176CONFIG_MEMORY_SIZE=0x08000000 181CONFIG_MEMORY_SIZE=0x08000000
177CONFIG_29BIT=y 182# CONFIG_29BIT is not set
183CONFIG_32BIT=y
184CONFIG_PMB_ENABLE=y
178# CONFIG_PMB is not set 185# CONFIG_PMB is not set
186CONFIG_PMB_FIXED=y
179CONFIG_VSYSCALL=y 187CONFIG_VSYSCALL=y
180CONFIG_ARCH_FLATMEM_ENABLE=y 188CONFIG_ARCH_FLATMEM_ENABLE=y
181CONFIG_ARCH_SPARSEMEM_ENABLE=y 189CONFIG_ARCH_SPARSEMEM_ENABLE=y
@@ -207,11 +215,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
207CONFIG_ZONE_DMA_FLAG=0 215CONFIG_ZONE_DMA_FLAG=0
208CONFIG_NR_QUICK=2 216CONFIG_NR_QUICK=2
209CONFIG_UNEVICTABLE_LRU=y 217CONFIG_UNEVICTABLE_LRU=y
218CONFIG_HAVE_MLOCK=y
219CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210 220
211# 221#
212# Cache configuration 222# Cache configuration
213# 223#
214# CONFIG_SH_DIRECT_MAPPED is not set
215CONFIG_CACHE_WRITEBACK=y 224CONFIG_CACHE_WRITEBACK=y
216# CONFIG_CACHE_WRITETHROUGH is not set 225# CONFIG_CACHE_WRITETHROUGH is not set
217# CONFIG_CACHE_OFF is not set 226# CONFIG_CACHE_OFF is not set
@@ -257,6 +266,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
257# 266#
258CONFIG_SH_DMA_API=y 267CONFIG_SH_DMA_API=y
259CONFIG_SH_DMA=y 268CONFIG_SH_DMA=y
269CONFIG_SH_DMA_IRQ_MULTI=y
260CONFIG_NR_ONCHIP_DMA_CHANNELS=12 270CONFIG_NR_ONCHIP_DMA_CHANNELS=12
261# CONFIG_NR_DMA_CHANNELS_BOOL is not set 271# CONFIG_NR_DMA_CHANNELS_BOOL is not set
262 272
@@ -306,6 +316,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
306# CONFIG_ARCH_SUPPORTS_MSI is not set 316# CONFIG_ARCH_SUPPORTS_MSI is not set
307# CONFIG_PCI_LEGACY is not set 317# CONFIG_PCI_LEGACY is not set
308CONFIG_PCI_DEBUG=y 318CONFIG_PCI_DEBUG=y
319# CONFIG_PCI_STUB is not set
320# CONFIG_PCI_IOV is not set
309CONFIG_PCCARD=y 321CONFIG_PCCARD=y
310# CONFIG_PCMCIA_DEBUG is not set 322# CONFIG_PCMCIA_DEBUG is not set
311CONFIG_PCMCIA=y 323CONFIG_PCMCIA=y
@@ -348,7 +360,6 @@ CONFIG_NET=y
348# 360#
349# Networking options 361# Networking options
350# 362#
351CONFIG_COMPAT_NET_DEV_OPS=y
352CONFIG_PACKET=y 363CONFIG_PACKET=y
353# CONFIG_PACKET_MMAP is not set 364# CONFIG_PACKET_MMAP is not set
354CONFIG_UNIX=y 365CONFIG_UNIX=y
@@ -427,6 +438,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
427# CONFIG_LAPB is not set 438# CONFIG_LAPB is not set
428# CONFIG_ECONET is not set 439# CONFIG_ECONET is not set
429# CONFIG_WAN_ROUTER is not set 440# CONFIG_WAN_ROUTER is not set
441# CONFIG_PHONET is not set
430CONFIG_NET_SCHED=y 442CONFIG_NET_SCHED=y
431 443
432# 444#
@@ -471,13 +483,13 @@ CONFIG_NET_SCH_FIFO=y
471# CONFIG_IRDA is not set 483# CONFIG_IRDA is not set
472# CONFIG_BT is not set 484# CONFIG_BT is not set
473# CONFIG_AF_RXRPC is not set 485# CONFIG_AF_RXRPC is not set
474# CONFIG_PHONET is not set
475CONFIG_WIRELESS=y 486CONFIG_WIRELESS=y
476# CONFIG_CFG80211 is not set 487# CONFIG_CFG80211 is not set
477# CONFIG_WIRELESS_OLD_REGULATORY is not set 488# CONFIG_WIRELESS_OLD_REGULATORY is not set
478# CONFIG_WIRELESS_EXT is not set 489# CONFIG_WIRELESS_EXT is not set
479# CONFIG_LIB80211 is not set 490# CONFIG_LIB80211 is not set
480# CONFIG_MAC80211 is not set 491# CONFIG_MAC80211 is not set
492# CONFIG_WIMAX is not set
481# CONFIG_RFKILL is not set 493# CONFIG_RFKILL is not set
482# CONFIG_NET_9P is not set 494# CONFIG_NET_9P is not set
483 495
@@ -631,6 +643,7 @@ CONFIG_SCSI_LOWLEVEL=y
631# CONFIG_MEGARAID_NEWGEN is not set 643# CONFIG_MEGARAID_NEWGEN is not set
632# CONFIG_MEGARAID_LEGACY is not set 644# CONFIG_MEGARAID_LEGACY is not set
633# CONFIG_MEGARAID_SAS is not set 645# CONFIG_MEGARAID_SAS is not set
646# CONFIG_SCSI_MPT2SAS is not set
634# CONFIG_SCSI_HPTIOP is not set 647# CONFIG_SCSI_HPTIOP is not set
635# CONFIG_LIBFC is not set 648# CONFIG_LIBFC is not set
636# CONFIG_FCOE is not set 649# CONFIG_FCOE is not set
@@ -654,6 +667,7 @@ CONFIG_SCSI_LOWLEVEL=y
654# CONFIG_SCSI_SRP is not set 667# CONFIG_SCSI_SRP is not set
655# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 668# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
656# CONFIG_SCSI_DH is not set 669# CONFIG_SCSI_DH is not set
670# CONFIG_SCSI_OSD_INITIATOR is not set
657CONFIG_ATA=y 671CONFIG_ATA=y
658# CONFIG_ATA_NONSTANDARD is not set 672# CONFIG_ATA_NONSTANDARD is not set
659CONFIG_SATA_PMP=y 673CONFIG_SATA_PMP=y
@@ -739,6 +753,7 @@ CONFIG_BLK_DEV_DM=y
739# CONFIG_IEEE1394 is not set 753# CONFIG_IEEE1394 is not set
740# CONFIG_I2O is not set 754# CONFIG_I2O is not set
741CONFIG_NETDEVICES=y 755CONFIG_NETDEVICES=y
756CONFIG_COMPAT_NET_DEV_OPS=y
742# CONFIG_DUMMY is not set 757# CONFIG_DUMMY is not set
743# CONFIG_BONDING is not set 758# CONFIG_BONDING is not set
744# CONFIG_MACVLAN is not set 759# CONFIG_MACVLAN is not set
@@ -756,8 +771,10 @@ CONFIG_MII=y
756# CONFIG_CASSINI is not set 771# CONFIG_CASSINI is not set
757# CONFIG_NET_VENDOR_3COM is not set 772# CONFIG_NET_VENDOR_3COM is not set
758CONFIG_SMC91X=y 773CONFIG_SMC91X=y
774# CONFIG_ETHOC is not set
759# CONFIG_SMC911X is not set 775# CONFIG_SMC911X is not set
760# CONFIG_SMSC911X is not set 776# CONFIG_SMSC911X is not set
777# CONFIG_DNET is not set
761# CONFIG_NET_TULIP is not set 778# CONFIG_NET_TULIP is not set
762# CONFIG_HP100 is not set 779# CONFIG_HP100 is not set
763# CONFIG_IBM_NEW_EMAC_ZMII is not set 780# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -780,7 +797,10 @@ CONFIG_SMC91X=y
780# 797#
781# CONFIG_WLAN_PRE80211 is not set 798# CONFIG_WLAN_PRE80211 is not set
782# CONFIG_WLAN_80211 is not set 799# CONFIG_WLAN_80211 is not set
783# CONFIG_IWLWIFI_LEDS is not set 800
801#
802# Enable WiMAX (Networking options) to see the WiMAX drivers
803#
784 804
785# 805#
786# USB Network Adapters 806# USB Network Adapters
@@ -840,7 +860,6 @@ CONFIG_MOUSE_PS2=y
840CONFIG_MOUSE_PS2_ALPS=y 860CONFIG_MOUSE_PS2_ALPS=y
841CONFIG_MOUSE_PS2_LOGIPS2PP=y 861CONFIG_MOUSE_PS2_LOGIPS2PP=y
842CONFIG_MOUSE_PS2_SYNAPTICS=y 862CONFIG_MOUSE_PS2_SYNAPTICS=y
843CONFIG_MOUSE_PS2_LIFEBOOK=y
844CONFIG_MOUSE_PS2_TRACKPOINT=y 863CONFIG_MOUSE_PS2_TRACKPOINT=y
845# CONFIG_MOUSE_PS2_ELANTECH is not set 864# CONFIG_MOUSE_PS2_ELANTECH is not set
846# CONFIG_MOUSE_PS2_TOUCHKIT is not set 865# CONFIG_MOUSE_PS2_TOUCHKIT is not set
@@ -899,6 +918,7 @@ CONFIG_LEGACY_PTY_COUNT=256
899# CONFIG_PPDEV is not set 918# CONFIG_PPDEV is not set
900# CONFIG_IPMI_HANDLER is not set 919# CONFIG_IPMI_HANDLER is not set
901CONFIG_HW_RANDOM=y 920CONFIG_HW_RANDOM=y
921# CONFIG_HW_RANDOM_TIMERIOMEM is not set
902# CONFIG_R3964 is not set 922# CONFIG_R3964 is not set
903# CONFIG_APPLICOM is not set 923# CONFIG_APPLICOM is not set
904 924
@@ -1023,6 +1043,7 @@ CONFIG_FB_SH_MOBILE_LCDC=m
1023# CONFIG_FB_VIRTUAL is not set 1043# CONFIG_FB_VIRTUAL is not set
1024# CONFIG_FB_METRONOME is not set 1044# CONFIG_FB_METRONOME is not set
1025# CONFIG_FB_MB862XX is not set 1045# CONFIG_FB_MB862XX is not set
1046# CONFIG_FB_BROADSHEET is not set
1026# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1047# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1027 1048
1028# 1049#
@@ -1123,6 +1144,7 @@ CONFIG_USB_MON=y
1123CONFIG_USB_EHCI_HCD=y 1144CONFIG_USB_EHCI_HCD=y
1124# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1145# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1125# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1146# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1147# CONFIG_USB_OXU210HP_HCD is not set
1126# CONFIG_USB_ISP116X_HCD is not set 1148# CONFIG_USB_ISP116X_HCD is not set
1127# CONFIG_USB_ISP1760_HCD is not set 1149# CONFIG_USB_ISP1760_HCD is not set
1128# CONFIG_USB_OHCI_HCD is not set 1150# CONFIG_USB_OHCI_HCD is not set
@@ -1141,18 +1163,17 @@ CONFIG_USB_PRINTER=y
1141# CONFIG_USB_TMC is not set 1163# CONFIG_USB_TMC is not set
1142 1164
1143# 1165#
1144# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1166# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1145# 1167#
1146 1168
1147# 1169#
1148# see USB_STORAGE Help for more information 1170# also be needed; see USB_STORAGE Help for more info
1149# 1171#
1150CONFIG_USB_STORAGE=y 1172CONFIG_USB_STORAGE=y
1151# CONFIG_USB_STORAGE_DEBUG is not set 1173# CONFIG_USB_STORAGE_DEBUG is not set
1152# CONFIG_USB_STORAGE_DATAFAB is not set 1174# CONFIG_USB_STORAGE_DATAFAB is not set
1153# CONFIG_USB_STORAGE_FREECOM is not set 1175# CONFIG_USB_STORAGE_FREECOM is not set
1154# CONFIG_USB_STORAGE_ISD200 is not set 1176# CONFIG_USB_STORAGE_ISD200 is not set
1155# CONFIG_USB_STORAGE_DPCM is not set
1156# CONFIG_USB_STORAGE_USBAT is not set 1177# CONFIG_USB_STORAGE_USBAT is not set
1157# CONFIG_USB_STORAGE_SDDR09 is not set 1178# CONFIG_USB_STORAGE_SDDR09 is not set
1158# CONFIG_USB_STORAGE_SDDR55 is not set 1179# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1189,7 +1210,6 @@ CONFIG_USB_STORAGE=y
1189# CONFIG_USB_LED is not set 1210# CONFIG_USB_LED is not set
1190# CONFIG_USB_CYPRESS_CY7C63 is not set 1211# CONFIG_USB_CYPRESS_CY7C63 is not set
1191# CONFIG_USB_CYTHERM is not set 1212# CONFIG_USB_CYTHERM is not set
1192# CONFIG_USB_PHIDGET is not set
1193# CONFIG_USB_IDMOUSE is not set 1213# CONFIG_USB_IDMOUSE is not set
1194# CONFIG_USB_FTDI_ELAN is not set 1214# CONFIG_USB_FTDI_ELAN is not set
1195# CONFIG_USB_APPLEDISPLAY is not set 1215# CONFIG_USB_APPLEDISPLAY is not set
@@ -1201,6 +1221,11 @@ CONFIG_USB_STORAGE=y
1201# CONFIG_USB_ISIGHTFW is not set 1221# CONFIG_USB_ISIGHTFW is not set
1202# CONFIG_USB_VST is not set 1222# CONFIG_USB_VST is not set
1203# CONFIG_USB_GADGET is not set 1223# CONFIG_USB_GADGET is not set
1224
1225#
1226# OTG and related infrastructure
1227#
1228# CONFIG_NOP_USB_XCEIV is not set
1204# CONFIG_UWB is not set 1229# CONFIG_UWB is not set
1205# CONFIG_MMC is not set 1230# CONFIG_MMC is not set
1206# CONFIG_MEMSTICK is not set 1231# CONFIG_MEMSTICK is not set
@@ -1243,7 +1268,9 @@ CONFIG_FS_MBCACHE=y
1243CONFIG_FS_POSIX_ACL=y 1268CONFIG_FS_POSIX_ACL=y
1244CONFIG_FILE_LOCKING=y 1269CONFIG_FILE_LOCKING=y
1245# CONFIG_XFS_FS is not set 1270# CONFIG_XFS_FS is not set
1271# CONFIG_GFS2_FS is not set
1246# CONFIG_OCFS2_FS is not set 1272# CONFIG_OCFS2_FS is not set
1273# CONFIG_BTRFS_FS is not set
1247CONFIG_DNOTIFY=y 1274CONFIG_DNOTIFY=y
1248CONFIG_INOTIFY=y 1275CONFIG_INOTIFY=y
1249CONFIG_INOTIFY_USER=y 1276CONFIG_INOTIFY_USER=y
@@ -1295,6 +1322,7 @@ CONFIG_MISC_FILESYSTEMS=y
1295# CONFIG_BFS_FS is not set 1322# CONFIG_BFS_FS is not set
1296# CONFIG_EFS_FS is not set 1323# CONFIG_EFS_FS is not set
1297# CONFIG_CRAMFS is not set 1324# CONFIG_CRAMFS is not set
1325# CONFIG_SQUASHFS is not set
1298# CONFIG_VXFS_FS is not set 1326# CONFIG_VXFS_FS is not set
1299CONFIG_MINIX_FS=y 1327CONFIG_MINIX_FS=y
1300# CONFIG_OMFS_FS is not set 1328# CONFIG_OMFS_FS is not set
@@ -1318,7 +1346,6 @@ CONFIG_LOCKD_V4=y
1318CONFIG_EXPORTFS=y 1346CONFIG_EXPORTFS=y
1319CONFIG_NFS_COMMON=y 1347CONFIG_NFS_COMMON=y
1320CONFIG_SUNRPC=y 1348CONFIG_SUNRPC=y
1321# CONFIG_SUNRPC_REGISTER_V4 is not set
1322# CONFIG_RPCSEC_GSS_KRB5 is not set 1349# CONFIG_RPCSEC_GSS_KRB5 is not set
1323# CONFIG_RPCSEC_GSS_SPKM3 is not set 1350# CONFIG_RPCSEC_GSS_SPKM3 is not set
1324# CONFIG_SMB_FS is not set 1351# CONFIG_SMB_FS is not set
@@ -1424,6 +1451,7 @@ CONFIG_DEBUG_INFO=y
1424# CONFIG_FAULT_INJECTION is not set 1451# CONFIG_FAULT_INJECTION is not set
1425# CONFIG_LATENCYTOP is not set 1452# CONFIG_LATENCYTOP is not set
1426CONFIG_SYSCTL_SYSCALL_CHECK=y 1453CONFIG_SYSCTL_SYSCALL_CHECK=y
1454# CONFIG_PAGE_POISONING is not set
1427CONFIG_HAVE_FUNCTION_TRACER=y 1455CONFIG_HAVE_FUNCTION_TRACER=y
1428CONFIG_HAVE_DYNAMIC_FTRACE=y 1456CONFIG_HAVE_DYNAMIC_FTRACE=y
1429CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1457CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -1439,7 +1467,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1439# CONFIG_BOOT_TRACER is not set 1467# CONFIG_BOOT_TRACER is not set
1440# CONFIG_TRACE_BRANCH_PROFILING is not set 1468# CONFIG_TRACE_BRANCH_PROFILING is not set
1441# CONFIG_STACK_TRACER is not set 1469# CONFIG_STACK_TRACER is not set
1442# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1443# CONFIG_SAMPLES is not set 1470# CONFIG_SAMPLES is not set
1444CONFIG_HAVE_ARCH_KGDB=y 1471CONFIG_HAVE_ARCH_KGDB=y
1445# CONFIG_KGDB is not set 1472# CONFIG_KGDB is not set
@@ -1544,6 +1571,7 @@ CONFIG_CRYPTO_DES=y
1544# Compression 1571# Compression
1545# 1572#
1546# CONFIG_CRYPTO_DEFLATE is not set 1573# CONFIG_CRYPTO_DEFLATE is not set
1574# CONFIG_CRYPTO_ZLIB is not set
1547# CONFIG_CRYPTO_LZO is not set 1575# CONFIG_CRYPTO_LZO is not set
1548 1576
1549# 1577#
@@ -1565,7 +1593,7 @@ CONFIG_CRC_T10DIF=y
1565CONFIG_CRC32=y 1593CONFIG_CRC32=y
1566# CONFIG_CRC7 is not set 1594# CONFIG_CRC7 is not set
1567# CONFIG_LIBCRC32C is not set 1595# CONFIG_LIBCRC32C is not set
1568CONFIG_PLIST=y
1569CONFIG_HAS_IOMEM=y 1596CONFIG_HAS_IOMEM=y
1570CONFIG_HAS_IOPORT=y 1597CONFIG_HAS_IOPORT=y
1571CONFIG_HAS_DMA=y 1598CONFIG_HAS_DMA=y
1599CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index e5b55b6f002d..d30e0a7ad9f1 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:31:27 2009 4# Thu Apr 2 18:39:37 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,12 +18,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
18# CONFIG_GENERIC_CLOCKEVENTS is not set 18# CONFIG_GENERIC_CLOCKEVENTS is not set
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
21CONFIG_SYS_SUPPORTS_CMT=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 30
29# 31#
@@ -43,18 +45,28 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_TASKSTATS is not set 45# CONFIG_TASKSTATS is not set
44CONFIG_AUDIT=y 46CONFIG_AUDIT=y
45CONFIG_AUDITSYSCALL=y 47CONFIG_AUDITSYSCALL=y
48
49#
50# RCU Subsystem
51#
52# CONFIG_CLASSIC_RCU is not set
53# CONFIG_TREE_RCU is not set
54CONFIG_PREEMPT_RCU=y
55CONFIG_RCU_TRACE=y
56# CONFIG_TREE_RCU_TRACE is not set
57CONFIG_PREEMPT_RCU_TRACE=y
46# CONFIG_IKCONFIG is not set 58# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14 59CONFIG_LOG_BUF_SHIFT=14
60# CONFIG_GROUP_SCHED is not set
48CONFIG_CGROUPS=y 61CONFIG_CGROUPS=y
49CONFIG_CGROUP_DEBUG=y 62CONFIG_CGROUP_DEBUG=y
50CONFIG_CGROUP_NS=y 63CONFIG_CGROUP_NS=y
51# CONFIG_CGROUP_FREEZER is not set 64# CONFIG_CGROUP_FREEZER is not set
52CONFIG_CGROUP_DEVICE=y 65CONFIG_CGROUP_DEVICE=y
53# CONFIG_GROUP_SCHED is not set
54CONFIG_CGROUP_CPUACCT=y 66CONFIG_CGROUP_CPUACCT=y
55CONFIG_RESOURCE_COUNTERS=y 67CONFIG_RESOURCE_COUNTERS=y
56CONFIG_MM_OWNER=y
57CONFIG_CGROUP_MEM_RES_CTLR=y 68CONFIG_CGROUP_MEM_RES_CTLR=y
69CONFIG_MM_OWNER=y
58# CONFIG_SYSFS_DEPRECATED_V2 is not set 70# CONFIG_SYSFS_DEPRECATED_V2 is not set
59CONFIG_RELAY=y 71CONFIG_RELAY=y
60CONFIG_NAMESPACES=y 72CONFIG_NAMESPACES=y
@@ -62,31 +74,35 @@ CONFIG_UTS_NS=y
62CONFIG_IPC_NS=y 74CONFIG_IPC_NS=y
63CONFIG_USER_NS=y 75CONFIG_USER_NS=y
64CONFIG_PID_NS=y 76CONFIG_PID_NS=y
77# CONFIG_NET_NS is not set
65CONFIG_BLK_DEV_INITRD=y 78CONFIG_BLK_DEV_INITRD=y
66CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
80CONFIG_RD_GZIP=y
81# CONFIG_RD_BZIP2 is not set
82# CONFIG_RD_LZMA is not set
83CONFIG_INITRAMFS_COMPRESSION_NONE=y
67CONFIG_CC_OPTIMIZE_FOR_SIZE=y 84CONFIG_CC_OPTIMIZE_FOR_SIZE=y
68CONFIG_SYSCTL=y 85CONFIG_SYSCTL=y
86CONFIG_ANON_INODES=y
69CONFIG_EMBEDDED=y 87CONFIG_EMBEDDED=y
70# CONFIG_UID16 is not set 88# CONFIG_UID16 is not set
71# CONFIG_SYSCTL_SYSCALL is not set 89# CONFIG_SYSCTL_SYSCALL is not set
72CONFIG_KALLSYMS=y 90CONFIG_KALLSYMS=y
73CONFIG_KALLSYMS_ALL=y 91CONFIG_KALLSYMS_ALL=y
74CONFIG_KALLSYMS_STRIP_GENERATED=y
75# CONFIG_KALLSYMS_EXTRA_PASS is not set 92# CONFIG_KALLSYMS_EXTRA_PASS is not set
76CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
77CONFIG_PRINTK=y 94CONFIG_PRINTK=y
78CONFIG_BUG=y 95CONFIG_BUG=y
79# CONFIG_ELF_CORE is not set 96# CONFIG_ELF_CORE is not set
80# CONFIG_COMPAT_BRK is not set
81CONFIG_BASE_FULL=y 97CONFIG_BASE_FULL=y
82CONFIG_FUTEX=y 98CONFIG_FUTEX=y
83CONFIG_ANON_INODES=y
84CONFIG_EPOLL=y 99CONFIG_EPOLL=y
85CONFIG_SIGNALFD=y 100CONFIG_SIGNALFD=y
86CONFIG_TIMERFD=y 101CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
88CONFIG_AIO=y 103CONFIG_AIO=y
89CONFIG_VM_EVENT_COUNTERS=y 104CONFIG_VM_EVENT_COUNTERS=y
105# CONFIG_COMPAT_BRK is not set
90# CONFIG_SLAB is not set 106# CONFIG_SLAB is not set
91# CONFIG_SLUB is not set 107# CONFIG_SLUB is not set
92CONFIG_SLOB=y 108CONFIG_SLOB=y
@@ -127,12 +143,6 @@ CONFIG_IOSCHED_NOOP=y
127# CONFIG_DEFAULT_CFQ is not set 143# CONFIG_DEFAULT_CFQ is not set
128CONFIG_DEFAULT_NOOP=y 144CONFIG_DEFAULT_NOOP=y
129CONFIG_DEFAULT_IOSCHED="noop" 145CONFIG_DEFAULT_IOSCHED="noop"
130# CONFIG_CLASSIC_RCU is not set
131# CONFIG_TREE_RCU is not set
132CONFIG_PREEMPT_RCU=y
133CONFIG_RCU_TRACE=y
134# CONFIG_TREE_RCU_TRACE is not set
135CONFIG_PREEMPT_RCU_TRACE=y
136# CONFIG_FREEZER is not set 146# CONFIG_FREEZER is not set
137 147
138# 148#
@@ -168,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
168# CONFIG_CPU_SUBTYPE_SH7770 is not set 178# CONFIG_CPU_SUBTYPE_SH7770 is not set
169# CONFIG_CPU_SUBTYPE_SH7780 is not set 179# CONFIG_CPU_SUBTYPE_SH7780 is not set
170# CONFIG_CPU_SUBTYPE_SH7785 is not set 180# CONFIG_CPU_SUBTYPE_SH7785 is not set
181# CONFIG_CPU_SUBTYPE_SH7786 is not set
171# CONFIG_CPU_SUBTYPE_SHX3 is not set 182# CONFIG_CPU_SUBTYPE_SHX3 is not set
172# CONFIG_CPU_SUBTYPE_SH7343 is not set 183# CONFIG_CPU_SUBTYPE_SH7343 is not set
173# CONFIG_CPU_SUBTYPE_SH7722 is not set 184# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -206,11 +217,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
206# CONFIG_PHYS_ADDR_T_64BIT is not set 217# CONFIG_PHYS_ADDR_T_64BIT is not set
207CONFIG_ZONE_DMA_FLAG=0 218CONFIG_ZONE_DMA_FLAG=0
208CONFIG_NR_QUICK=2 219CONFIG_NR_QUICK=2
220CONFIG_UNEVICTABLE_LRU=y
209 221
210# 222#
211# Cache configuration 223# Cache configuration
212# 224#
213# CONFIG_SH_DIRECT_MAPPED is not set
214CONFIG_CACHE_WRITEBACK=y 225CONFIG_CACHE_WRITEBACK=y
215# CONFIG_CACHE_WRITETHROUGH is not set 226# CONFIG_CACHE_WRITETHROUGH is not set
216# CONFIG_CACHE_OFF is not set 227# CONFIG_CACHE_OFF is not set
@@ -280,7 +291,6 @@ CONFIG_HEARTBEAT=y
280CONFIG_HZ_1000=y 291CONFIG_HZ_1000=y
281CONFIG_HZ=1000 292CONFIG_HZ=1000
282# CONFIG_SCHED_HRTICK is not set 293# CONFIG_SCHED_HRTICK is not set
283CONFIG_KEXEC=y
284# CONFIG_CRASH_DUMP is not set 294# CONFIG_CRASH_DUMP is not set
285# CONFIG_SECCOMP is not set 295# CONFIG_SECCOMP is not set
286# CONFIG_PREEMPT_NONE is not set 296# CONFIG_PREEMPT_NONE is not set
@@ -322,8 +332,6 @@ CONFIG_NET=y
322# 332#
323# Networking options 333# Networking options
324# 334#
325# CONFIG_NET_NS is not set
326CONFIG_COMPAT_NET_DEV_OPS=y
327CONFIG_PACKET=y 335CONFIG_PACKET=y
328# CONFIG_PACKET_MMAP is not set 336# CONFIG_PACKET_MMAP is not set
329CONFIG_UNIX=y 337CONFIG_UNIX=y
@@ -378,6 +386,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
378# CONFIG_LAPB is not set 386# CONFIG_LAPB is not set
379# CONFIG_ECONET is not set 387# CONFIG_ECONET is not set
380# CONFIG_WAN_ROUTER is not set 388# CONFIG_WAN_ROUTER is not set
389# CONFIG_PHONET is not set
381# CONFIG_NET_SCHED is not set 390# CONFIG_NET_SCHED is not set
382# CONFIG_DCB is not set 391# CONFIG_DCB is not set
383 392
@@ -385,18 +394,19 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
385# Network testing 394# Network testing
386# 395#
387# CONFIG_NET_PKTGEN is not set 396# CONFIG_NET_PKTGEN is not set
397# CONFIG_NET_DROP_MONITOR is not set
388# CONFIG_HAMRADIO is not set 398# CONFIG_HAMRADIO is not set
389# CONFIG_CAN is not set 399# CONFIG_CAN is not set
390# CONFIG_IRDA is not set 400# CONFIG_IRDA is not set
391# CONFIG_BT is not set 401# CONFIG_BT is not set
392# CONFIG_AF_RXRPC is not set 402# CONFIG_AF_RXRPC is not set
393# CONFIG_PHONET is not set
394CONFIG_WIRELESS=y 403CONFIG_WIRELESS=y
395# CONFIG_CFG80211 is not set 404# CONFIG_CFG80211 is not set
396# CONFIG_WIRELESS_OLD_REGULATORY is not set 405# CONFIG_WIRELESS_OLD_REGULATORY is not set
397# CONFIG_WIRELESS_EXT is not set 406# CONFIG_WIRELESS_EXT is not set
398# CONFIG_LIB80211 is not set 407# CONFIG_LIB80211 is not set
399# CONFIG_MAC80211 is not set 408# CONFIG_MAC80211 is not set
409# CONFIG_WIMAX is not set
400# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
401# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
402 412
@@ -419,6 +429,7 @@ CONFIG_MTD=y
419# CONFIG_MTD_DEBUG is not set 429# CONFIG_MTD_DEBUG is not set
420CONFIG_MTD_CONCAT=y 430CONFIG_MTD_CONCAT=y
421CONFIG_MTD_PARTITIONS=y 431CONFIG_MTD_PARTITIONS=y
432# CONFIG_MTD_TESTS is not set
422# CONFIG_MTD_REDBOOT_PARTS is not set 433# CONFIG_MTD_REDBOOT_PARTS is not set
423# CONFIG_MTD_CMDLINE_PARTS is not set 434# CONFIG_MTD_CMDLINE_PARTS is not set
424# CONFIG_MTD_AR7_PARTS is not set 435# CONFIG_MTD_AR7_PARTS is not set
@@ -466,9 +477,7 @@ CONFIG_MTD_CFI_UTIL=y
466# 477#
467# CONFIG_MTD_COMPLEX_MAPPINGS is not set 478# CONFIG_MTD_COMPLEX_MAPPINGS is not set
468CONFIG_MTD_PHYSMAP=y 479CONFIG_MTD_PHYSMAP=y
469CONFIG_MTD_PHYSMAP_START=0x20000000 480# CONFIG_MTD_PHYSMAP_COMPAT is not set
470CONFIG_MTD_PHYSMAP_LEN=0x01000000
471CONFIG_MTD_PHYSMAP_BANKWIDTH=4
472# CONFIG_MTD_PLATRAM is not set 481# CONFIG_MTD_PLATRAM is not set
473 482
474# 483#
@@ -489,6 +498,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
489# CONFIG_MTD_ONENAND is not set 498# CONFIG_MTD_ONENAND is not set
490 499
491# 500#
501# LPDDR flash memory drivers
502#
503# CONFIG_MTD_LPDDR is not set
504
505#
492# UBI - Unsorted block images 506# UBI - Unsorted block images
493# 507#
494# CONFIG_MTD_UBI is not set 508# CONFIG_MTD_UBI is not set
@@ -506,9 +520,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
506# CONFIG_ATA_OVER_ETH is not set 520# CONFIG_ATA_OVER_ETH is not set
507# CONFIG_BLK_DEV_HD is not set 521# CONFIG_BLK_DEV_HD is not set
508CONFIG_MISC_DEVICES=y 522CONFIG_MISC_DEVICES=y
509CONFIG_EEPROM_93CX6=y
510# CONFIG_ENCLOSURE_SERVICES is not set 523# CONFIG_ENCLOSURE_SERVICES is not set
511# CONFIG_C2PORT is not set 524# CONFIG_C2PORT is not set
525
526#
527# EEPROM support
528#
529CONFIG_EEPROM_93CX6=y
512CONFIG_HAVE_IDE=y 530CONFIG_HAVE_IDE=y
513# CONFIG_IDE is not set 531# CONFIG_IDE is not set
514 532
@@ -522,6 +540,7 @@ CONFIG_HAVE_IDE=y
522# CONFIG_ATA is not set 540# CONFIG_ATA is not set
523# CONFIG_MD is not set 541# CONFIG_MD is not set
524CONFIG_NETDEVICES=y 542CONFIG_NETDEVICES=y
543CONFIG_COMPAT_NET_DEV_OPS=y
525# CONFIG_DUMMY is not set 544# CONFIG_DUMMY is not set
526# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
527# CONFIG_MACVLAN is not set 546# CONFIG_MACVLAN is not set
@@ -534,8 +553,10 @@ CONFIG_MII=y
534# CONFIG_AX88796 is not set 553# CONFIG_AX88796 is not set
535# CONFIG_STNIC is not set 554# CONFIG_STNIC is not set
536CONFIG_SMC91X=y 555CONFIG_SMC91X=y
556# CONFIG_ETHOC is not set
537# CONFIG_SMC911X is not set 557# CONFIG_SMC911X is not set
538# CONFIG_SMSC911X is not set 558# CONFIG_SMSC911X is not set
559# CONFIG_DNET is not set
539# CONFIG_IBM_NEW_EMAC_ZMII is not set 560# CONFIG_IBM_NEW_EMAC_ZMII is not set
540# CONFIG_IBM_NEW_EMAC_RGMII is not set 561# CONFIG_IBM_NEW_EMAC_RGMII is not set
541# CONFIG_IBM_NEW_EMAC_TAH is not set 562# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -552,7 +573,10 @@ CONFIG_SMC91X=y
552# 573#
553# CONFIG_WLAN_PRE80211 is not set 574# CONFIG_WLAN_PRE80211 is not set
554# CONFIG_WLAN_80211 is not set 575# CONFIG_WLAN_80211 is not set
555# CONFIG_IWLWIFI_LEDS is not set 576
577#
578# Enable WiMAX (Networking options) to see the WiMAX drivers
579#
556# CONFIG_WAN is not set 580# CONFIG_WAN is not set
557# CONFIG_PPP is not set 581# CONFIG_PPP is not set
558# CONFIG_SLIP is not set 582# CONFIG_SLIP is not set
@@ -696,6 +720,7 @@ CONFIG_RTC_INTF_DEV=y
696# 720#
697CONFIG_RTC_DRV_SH=y 721CONFIG_RTC_DRV_SH=y
698# CONFIG_DMADEVICES is not set 722# CONFIG_DMADEVICES is not set
723# CONFIG_AUXDISPLAY is not set
699# CONFIG_UIO is not set 724# CONFIG_UIO is not set
700# CONFIG_STAGING is not set 725# CONFIG_STAGING is not set
701 726
@@ -712,6 +737,7 @@ CONFIG_EXT2_FS=y
712CONFIG_FILE_LOCKING=y 737CONFIG_FILE_LOCKING=y
713# CONFIG_XFS_FS is not set 738# CONFIG_XFS_FS is not set
714# CONFIG_OCFS2_FS is not set 739# CONFIG_OCFS2_FS is not set
740# CONFIG_BTRFS_FS is not set
715# CONFIG_DNOTIFY is not set 741# CONFIG_DNOTIFY is not set
716# CONFIG_INOTIFY is not set 742# CONFIG_INOTIFY is not set
717# CONFIG_QUOTA is not set 743# CONFIG_QUOTA is not set
@@ -752,6 +778,7 @@ CONFIG_MISC_FILESYSTEMS=y
752# CONFIG_EFS_FS is not set 778# CONFIG_EFS_FS is not set
753# CONFIG_JFFS2_FS is not set 779# CONFIG_JFFS2_FS is not set
754CONFIG_CRAMFS=y 780CONFIG_CRAMFS=y
781# CONFIG_SQUASHFS is not set
755# CONFIG_VXFS_FS is not set 782# CONFIG_VXFS_FS is not set
756# CONFIG_MINIX_FS is not set 783# CONFIG_MINIX_FS is not set
757# CONFIG_OMFS_FS is not set 784# CONFIG_OMFS_FS is not set
@@ -771,7 +798,6 @@ CONFIG_LOCKD=y
771CONFIG_LOCKD_V4=y 798CONFIG_LOCKD_V4=y
772CONFIG_NFS_COMMON=y 799CONFIG_NFS_COMMON=y
773CONFIG_SUNRPC=y 800CONFIG_SUNRPC=y
774# CONFIG_SUNRPC_REGISTER_V4 is not set
775# CONFIG_RPCSEC_GSS_KRB5 is not set 801# CONFIG_RPCSEC_GSS_KRB5 is not set
776# CONFIG_RPCSEC_GSS_SPKM3 is not set 802# CONFIG_RPCSEC_GSS_SPKM3 is not set
777# CONFIG_SMB_FS is not set 803# CONFIG_SMB_FS is not set
@@ -824,6 +850,7 @@ CONFIG_STACKTRACE=y
824CONFIG_DEBUG_BUGVERBOSE=y 850CONFIG_DEBUG_BUGVERBOSE=y
825# CONFIG_DEBUG_INFO is not set 851# CONFIG_DEBUG_INFO is not set
826CONFIG_DEBUG_VM=y 852CONFIG_DEBUG_VM=y
853# CONFIG_DEBUG_NOMMU_REGIONS is not set
827# CONFIG_DEBUG_WRITECOUNT is not set 854# CONFIG_DEBUG_WRITECOUNT is not set
828# CONFIG_DEBUG_MEMORY_INIT is not set 855# CONFIG_DEBUG_MEMORY_INIT is not set
829CONFIG_DEBUG_LIST=y 856CONFIG_DEBUG_LIST=y
@@ -835,6 +862,7 @@ CONFIG_FRAME_POINTER=y
835# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 862# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
836# CONFIG_FAULT_INJECTION is not set 863# CONFIG_FAULT_INJECTION is not set
837# CONFIG_LATENCYTOP is not set 864# CONFIG_LATENCYTOP is not set
865# CONFIG_PAGE_POISONING is not set
838CONFIG_NOP_TRACER=y 866CONFIG_NOP_TRACER=y
839CONFIG_HAVE_FUNCTION_TRACER=y 867CONFIG_HAVE_FUNCTION_TRACER=y
840CONFIG_HAVE_DYNAMIC_FTRACE=y 868CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -852,7 +880,7 @@ CONFIG_TRACING=y
852# CONFIG_TRACE_BRANCH_PROFILING is not set 880# CONFIG_TRACE_BRANCH_PROFILING is not set
853# CONFIG_STACK_TRACER is not set 881# CONFIG_STACK_TRACER is not set
854# CONFIG_FTRACE_STARTUP_TEST is not set 882# CONFIG_FTRACE_STARTUP_TEST is not set
855# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 883# CONFIG_DYNAMIC_DEBUG is not set
856# CONFIG_SAMPLES is not set 884# CONFIG_SAMPLES is not set
857CONFIG_HAVE_ARCH_KGDB=y 885CONFIG_HAVE_ARCH_KGDB=y
858# CONFIG_KGDB is not set 886# CONFIG_KGDB is not set
@@ -955,6 +983,7 @@ CONFIG_CRYPTO_CRC32C=y
955# Compression 983# Compression
956# 984#
957CONFIG_CRYPTO_DEFLATE=y 985CONFIG_CRYPTO_DEFLATE=y
986# CONFIG_CRYPTO_ZLIB is not set
958CONFIG_CRYPTO_LZO=y 987CONFIG_CRYPTO_LZO=y
959 988
960# 989#
@@ -980,7 +1009,8 @@ CONFIG_ZLIB_INFLATE=y
980CONFIG_ZLIB_DEFLATE=y 1009CONFIG_ZLIB_DEFLATE=y
981CONFIG_LZO_COMPRESS=y 1010CONFIG_LZO_COMPRESS=y
982CONFIG_LZO_DECOMPRESS=y 1011CONFIG_LZO_DECOMPRESS=y
983CONFIG_PLIST=y 1012CONFIG_DECOMPRESS_GZIP=y
984CONFIG_HAS_IOMEM=y 1013CONFIG_HAS_IOMEM=y
985CONFIG_HAS_IOPORT=y 1014CONFIG_HAS_IOPORT=y
986CONFIG_HAS_DMA=y 1015CONFIG_HAS_DMA=y
1016CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7343_defconfig b/arch/sh/configs/se7343_defconfig
index 390052577031..fbb72d029e68 100644
--- a/arch/sh/configs/se7343_defconfig
+++ b/arch/sh/configs/se7343_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:33:53 2009 4# Thu Apr 2 18:42:00 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,14 +16,16 @@ CONFIG_GENERIC_IRQ_PROBE=y
16# CONFIG_GENERIC_GPIO is not set 16# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_CMT=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 30
29# 31#
@@ -41,14 +43,23 @@ CONFIG_POSIX_MQUEUE=y
41# CONFIG_BSD_PROCESS_ACCT is not set 43# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y 57CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y 58CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set 59# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y 60CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set 61# CONFIG_CGROUP_SCHED is not set
62# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 63CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 64CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 65# CONFIG_RELAY is not set
@@ -56,6 +67,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
56# CONFIG_BLK_DEV_INITRD is not set 67# CONFIG_BLK_DEV_INITRD is not set
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 68CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 69CONFIG_SYSCTL=y
70CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 71CONFIG_EMBEDDED=y
60CONFIG_UID16=y 72CONFIG_UID16=y
61# CONFIG_SYSCTL_SYSCALL is not set 73# CONFIG_SYSCTL_SYSCALL is not set
@@ -65,10 +77,8 @@ CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y 77CONFIG_PRINTK=y
66CONFIG_BUG=y 78CONFIG_BUG=y
67CONFIG_ELF_CORE=y 79CONFIG_ELF_CORE=y
68CONFIG_COMPAT_BRK=y
69CONFIG_BASE_FULL=y 80CONFIG_BASE_FULL=y
70# CONFIG_FUTEX is not set 81# CONFIG_FUTEX is not set
71CONFIG_ANON_INODES=y
72# CONFIG_EPOLL is not set 82# CONFIG_EPOLL is not set
73CONFIG_SIGNALFD=y 83CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y 84CONFIG_TIMERFD=y
@@ -76,6 +86,7 @@ CONFIG_EVENTFD=y
76# CONFIG_SHMEM is not set 86# CONFIG_SHMEM is not set
77CONFIG_AIO=y 87CONFIG_AIO=y
78CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_COMPAT_BRK=y
79CONFIG_SLAB=y 90CONFIG_SLAB=y
80# CONFIG_SLUB is not set 91# CONFIG_SLUB is not set
81# CONFIG_SLOB is not set 92# CONFIG_SLOB is not set
@@ -114,11 +125,6 @@ CONFIG_DEFAULT_DEADLINE=y
114# CONFIG_DEFAULT_CFQ is not set 125# CONFIG_DEFAULT_CFQ is not set
115# CONFIG_DEFAULT_NOOP is not set 126# CONFIG_DEFAULT_NOOP is not set
116CONFIG_DEFAULT_IOSCHED="deadline" 127CONFIG_DEFAULT_IOSCHED="deadline"
117CONFIG_CLASSIC_RCU=y
118# CONFIG_TREE_RCU is not set
119# CONFIG_PREEMPT_RCU is not set
120# CONFIG_TREE_RCU_TRACE is not set
121# CONFIG_PREEMPT_RCU_TRACE is not set
122# CONFIG_FREEZER is not set 128# CONFIG_FREEZER is not set
123 129
124# 130#
@@ -127,6 +133,7 @@ CONFIG_CLASSIC_RCU=y
127CONFIG_CPU_SH4=y 133CONFIG_CPU_SH4=y
128CONFIG_CPU_SH4A=y 134CONFIG_CPU_SH4A=y
129CONFIG_CPU_SH4AL_DSP=y 135CONFIG_CPU_SH4AL_DSP=y
136CONFIG_ARCH_SHMOBILE=y
130# CONFIG_CPU_SUBTYPE_SH7619 is not set 137# CONFIG_CPU_SUBTYPE_SH7619 is not set
131# CONFIG_CPU_SUBTYPE_SH7201 is not set 138# CONFIG_CPU_SUBTYPE_SH7201 is not set
132# CONFIG_CPU_SUBTYPE_SH7203 is not set 139# CONFIG_CPU_SUBTYPE_SH7203 is not set
@@ -155,6 +162,7 @@ CONFIG_CPU_SH4AL_DSP=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 162# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 163# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 164# CONFIG_CPU_SUBTYPE_SH7785 is not set
165# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 166# CONFIG_CPU_SUBTYPE_SHX3 is not set
159CONFIG_CPU_SUBTYPE_SH7343=y 167CONFIG_CPU_SUBTYPE_SH7343=y
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 168# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +204,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 204CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 205CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 206CONFIG_UNEVICTABLE_LRU=y
207CONFIG_HAVE_MLOCK=y
208CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 209
200# 210#
201# Cache configuration 211# Cache configuration
202# 212#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 213CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 214# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 215# CONFIG_CACHE_OFF is not set
@@ -227,6 +236,7 @@ CONFIG_SH_7343_SOLUTION_ENGINE=y
227# Timer and clock configuration 236# Timer and clock configuration
228# 237#
229CONFIG_SH_TMU=y 238CONFIG_SH_TMU=y
239# CONFIG_SH_TIMER_CMT is not set
230CONFIG_SH_TIMER_IRQ=16 240CONFIG_SH_TIMER_IRQ=16
231CONFIG_SH_PCLK_FREQ=33333333 241CONFIG_SH_PCLK_FREQ=33333333
232# CONFIG_NO_HZ is not set 242# CONFIG_NO_HZ is not set
@@ -302,7 +312,6 @@ CONFIG_NET=y
302# 312#
303# Networking options 313# Networking options
304# 314#
305CONFIG_COMPAT_NET_DEV_OPS=y
306CONFIG_PACKET=y 315CONFIG_PACKET=y
307CONFIG_PACKET_MMAP=y 316CONFIG_PACKET_MMAP=y
308CONFIG_UNIX=y 317CONFIG_UNIX=y
@@ -353,6 +362,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
353# CONFIG_LAPB is not set 362# CONFIG_LAPB is not set
354# CONFIG_ECONET is not set 363# CONFIG_ECONET is not set
355# CONFIG_WAN_ROUTER is not set 364# CONFIG_WAN_ROUTER is not set
365# CONFIG_PHONET is not set
356# CONFIG_NET_SCHED is not set 366# CONFIG_NET_SCHED is not set
357# CONFIG_DCB is not set 367# CONFIG_DCB is not set
358 368
@@ -365,13 +375,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_IRDA is not set 375# CONFIG_IRDA is not set
366# CONFIG_BT is not set 376# CONFIG_BT is not set
367# CONFIG_AF_RXRPC is not set 377# CONFIG_AF_RXRPC is not set
368# CONFIG_PHONET is not set
369CONFIG_WIRELESS=y 378CONFIG_WIRELESS=y
370# CONFIG_CFG80211 is not set 379# CONFIG_CFG80211 is not set
371# CONFIG_WIRELESS_OLD_REGULATORY is not set 380# CONFIG_WIRELESS_OLD_REGULATORY is not set
372# CONFIG_WIRELESS_EXT is not set 381# CONFIG_WIRELESS_EXT is not set
373# CONFIG_LIB80211 is not set 382# CONFIG_LIB80211 is not set
374# CONFIG_MAC80211 is not set 383# CONFIG_MAC80211 is not set
384# CONFIG_WIMAX is not set
375# CONFIG_RFKILL is not set 385# CONFIG_RFKILL is not set
376# CONFIG_NET_9P is not set 386# CONFIG_NET_9P is not set
377 387
@@ -394,6 +404,7 @@ CONFIG_MTD=y
394# CONFIG_MTD_DEBUG is not set 404# CONFIG_MTD_DEBUG is not set
395CONFIG_MTD_CONCAT=y 405CONFIG_MTD_CONCAT=y
396CONFIG_MTD_PARTITIONS=y 406CONFIG_MTD_PARTITIONS=y
407# CONFIG_MTD_TESTS is not set
397# CONFIG_MTD_REDBOOT_PARTS is not set 408# CONFIG_MTD_REDBOOT_PARTS is not set
398# CONFIG_MTD_CMDLINE_PARTS is not set 409# CONFIG_MTD_CMDLINE_PARTS is not set
399# CONFIG_MTD_AR7_PARTS is not set 410# CONFIG_MTD_AR7_PARTS is not set
@@ -441,9 +452,7 @@ CONFIG_MTD_RAM=y
441# 452#
442# CONFIG_MTD_COMPLEX_MAPPINGS is not set 453# CONFIG_MTD_COMPLEX_MAPPINGS is not set
443CONFIG_MTD_PHYSMAP=y 454CONFIG_MTD_PHYSMAP=y
444CONFIG_MTD_PHYSMAP_START=0x0 455# CONFIG_MTD_PHYSMAP_COMPAT is not set
445CONFIG_MTD_PHYSMAP_LEN=0
446CONFIG_MTD_PHYSMAP_BANKWIDTH=0
447# CONFIG_MTD_PLATRAM is not set 456# CONFIG_MTD_PLATRAM is not set
448 457
449# 458#
@@ -464,6 +473,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
464# CONFIG_MTD_ONENAND is not set 473# CONFIG_MTD_ONENAND is not set
465 474
466# 475#
476# LPDDR flash memory drivers
477#
478# CONFIG_MTD_LPDDR is not set
479
480#
467# UBI - Unsorted block images 481# UBI - Unsorted block images
468# 482#
469# CONFIG_MTD_UBI is not set 483# CONFIG_MTD_UBI is not set
@@ -520,9 +534,11 @@ CONFIG_SCSI_WAIT_SCAN=m
520# CONFIG_SCSI_SRP_ATTRS is not set 534# CONFIG_SCSI_SRP_ATTRS is not set
521# CONFIG_SCSI_LOWLEVEL is not set 535# CONFIG_SCSI_LOWLEVEL is not set
522# CONFIG_SCSI_DH is not set 536# CONFIG_SCSI_DH is not set
537# CONFIG_SCSI_OSD_INITIATOR is not set
523# CONFIG_ATA is not set 538# CONFIG_ATA is not set
524# CONFIG_MD is not set 539# CONFIG_MD is not set
525CONFIG_NETDEVICES=y 540CONFIG_NETDEVICES=y
541CONFIG_COMPAT_NET_DEV_OPS=y
526# CONFIG_DUMMY is not set 542# CONFIG_DUMMY is not set
527# CONFIG_BONDING is not set 543# CONFIG_BONDING is not set
528# CONFIG_MACVLAN is not set 544# CONFIG_MACVLAN is not set
@@ -539,7 +555,10 @@ CONFIG_MII=y
539# 555#
540# CONFIG_WLAN_PRE80211 is not set 556# CONFIG_WLAN_PRE80211 is not set
541# CONFIG_WLAN_80211 is not set 557# CONFIG_WLAN_80211 is not set
542# CONFIG_IWLWIFI_LEDS is not set 558
559#
560# Enable WiMAX (Networking options) to see the WiMAX drivers
561#
543 562
544# 563#
545# USB Network Adapters 564# USB Network Adapters
@@ -633,6 +652,7 @@ CONFIG_LEGACY_PTYS=y
633CONFIG_LEGACY_PTY_COUNT=256 652CONFIG_LEGACY_PTY_COUNT=256
634# CONFIG_IPMI_HANDLER is not set 653# CONFIG_IPMI_HANDLER is not set
635CONFIG_HW_RANDOM=y 654CONFIG_HW_RANDOM=y
655# CONFIG_HW_RANDOM_TIMERIOMEM is not set
636# CONFIG_R3964 is not set 656# CONFIG_R3964 is not set
637# CONFIG_RAW_DRIVER is not set 657# CONFIG_RAW_DRIVER is not set
638# CONFIG_TCG_TPM is not set 658# CONFIG_TCG_TPM is not set
@@ -669,12 +689,9 @@ CONFIG_I2C_SH_MOBILE=y
669# Miscellaneous I2C Chip support 689# Miscellaneous I2C Chip support
670# 690#
671# CONFIG_DS1682 is not set 691# CONFIG_DS1682 is not set
672# CONFIG_EEPROM_AT24 is not set
673# CONFIG_EEPROM_LEGACY is not set
674# CONFIG_SENSORS_PCF8574 is not set 692# CONFIG_SENSORS_PCF8574 is not set
675# CONFIG_PCF8575 is not set 693# CONFIG_PCF8575 is not set
676# CONFIG_SENSORS_PCA9539 is not set 694# CONFIG_SENSORS_PCA9539 is not set
677# CONFIG_SENSORS_PCF8591 is not set
678# CONFIG_SENSORS_MAX6875 is not set 695# CONFIG_SENSORS_MAX6875 is not set
679# CONFIG_SENSORS_TSL2550 is not set 696# CONFIG_SENSORS_TSL2550 is not set
680# CONFIG_I2C_DEBUG_CORE is not set 697# CONFIG_I2C_DEBUG_CORE is not set
@@ -706,6 +723,7 @@ CONFIG_SSB_POSSIBLE=y
706# CONFIG_PMIC_DA903X is not set 723# CONFIG_PMIC_DA903X is not set
707# CONFIG_MFD_WM8400 is not set 724# CONFIG_MFD_WM8400 is not set
708# CONFIG_MFD_WM8350_I2C is not set 725# CONFIG_MFD_WM8350_I2C is not set
726# CONFIG_MFD_PCF50633 is not set
709# CONFIG_REGULATOR is not set 727# CONFIG_REGULATOR is not set
710 728
711# 729#
@@ -727,7 +745,7 @@ CONFIG_VIDEO_MEDIA=y
727# 745#
728# CONFIG_MEDIA_ATTACH is not set 746# CONFIG_MEDIA_ATTACH is not set
729CONFIG_MEDIA_TUNER=y 747CONFIG_MEDIA_TUNER=y
730# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set 748# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
731CONFIG_MEDIA_TUNER_SIMPLE=y 749CONFIG_MEDIA_TUNER_SIMPLE=y
732CONFIG_MEDIA_TUNER_TDA8290=y 750CONFIG_MEDIA_TUNER_TDA8290=y
733CONFIG_MEDIA_TUNER_TDA9887=y 751CONFIG_MEDIA_TUNER_TDA9887=y
@@ -736,6 +754,7 @@ CONFIG_MEDIA_TUNER_TEA5767=y
736CONFIG_MEDIA_TUNER_MT20XX=y 754CONFIG_MEDIA_TUNER_MT20XX=y
737CONFIG_MEDIA_TUNER_XC2028=y 755CONFIG_MEDIA_TUNER_XC2028=y
738CONFIG_MEDIA_TUNER_XC5000=y 756CONFIG_MEDIA_TUNER_XC5000=y
757CONFIG_MEDIA_TUNER_MC44S803=y
739CONFIG_VIDEO_V4L2=y 758CONFIG_VIDEO_V4L2=y
740CONFIG_VIDEO_V4L1=y 759CONFIG_VIDEO_V4L1=y
741CONFIG_VIDEO_CAPTURE_DRIVERS=y 760CONFIG_VIDEO_CAPTURE_DRIVERS=y
@@ -757,6 +776,7 @@ CONFIG_USB_GSPCA=m
757# CONFIG_USB_GSPCA_ETOMS is not set 776# CONFIG_USB_GSPCA_ETOMS is not set
758# CONFIG_USB_GSPCA_FINEPIX is not set 777# CONFIG_USB_GSPCA_FINEPIX is not set
759# CONFIG_USB_GSPCA_MARS is not set 778# CONFIG_USB_GSPCA_MARS is not set
779# CONFIG_USB_GSPCA_MR97310A is not set
760# CONFIG_USB_GSPCA_OV519 is not set 780# CONFIG_USB_GSPCA_OV519 is not set
761# CONFIG_USB_GSPCA_OV534 is not set 781# CONFIG_USB_GSPCA_OV534 is not set
762# CONFIG_USB_GSPCA_PAC207 is not set 782# CONFIG_USB_GSPCA_PAC207 is not set
@@ -769,6 +789,8 @@ CONFIG_USB_GSPCA=m
769# CONFIG_USB_GSPCA_SPCA506 is not set 789# CONFIG_USB_GSPCA_SPCA506 is not set
770# CONFIG_USB_GSPCA_SPCA508 is not set 790# CONFIG_USB_GSPCA_SPCA508 is not set
771# CONFIG_USB_GSPCA_SPCA561 is not set 791# CONFIG_USB_GSPCA_SPCA561 is not set
792# CONFIG_USB_GSPCA_SQ905 is not set
793# CONFIG_USB_GSPCA_SQ905C is not set
772# CONFIG_USB_GSPCA_STK014 is not set 794# CONFIG_USB_GSPCA_STK014 is not set
773# CONFIG_USB_GSPCA_SUNPLUS is not set 795# CONFIG_USB_GSPCA_SUNPLUS is not set
774# CONFIG_USB_GSPCA_T613 is not set 796# CONFIG_USB_GSPCA_T613 is not set
@@ -776,6 +798,7 @@ CONFIG_USB_GSPCA=m
776# CONFIG_USB_GSPCA_VC032X is not set 798# CONFIG_USB_GSPCA_VC032X is not set
777# CONFIG_USB_GSPCA_ZC3XX is not set 799# CONFIG_USB_GSPCA_ZC3XX is not set
778# CONFIG_VIDEO_PVRUSB2 is not set 800# CONFIG_VIDEO_PVRUSB2 is not set
801# CONFIG_VIDEO_HDPVR is not set
779# CONFIG_VIDEO_EM28XX is not set 802# CONFIG_VIDEO_EM28XX is not set
780# CONFIG_VIDEO_USBVISION is not set 803# CONFIG_VIDEO_USBVISION is not set
781# CONFIG_USB_VICAM is not set 804# CONFIG_USB_VICAM is not set
@@ -833,6 +856,7 @@ CONFIG_FB_SH_MOBILE_LCDC=m
833# CONFIG_FB_VIRTUAL is not set 856# CONFIG_FB_VIRTUAL is not set
834# CONFIG_FB_METRONOME is not set 857# CONFIG_FB_METRONOME is not set
835# CONFIG_FB_MB862XX is not set 858# CONFIG_FB_MB862XX is not set
859# CONFIG_FB_BROADSHEET is not set
836# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 860# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
837 861
838# 862#
@@ -940,7 +964,9 @@ CONFIG_USB_DEVICE_CLASS=y
940# USB Host Controller Drivers 964# USB Host Controller Drivers
941# 965#
942# CONFIG_USB_C67X00_HCD is not set 966# CONFIG_USB_C67X00_HCD is not set
967# CONFIG_USB_OXU210HP_HCD is not set
943CONFIG_USB_ISP116X_HCD=y 968CONFIG_USB_ISP116X_HCD=y
969# CONFIG_USB_ISP1760_HCD is not set
944# CONFIG_USB_SL811_HCD is not set 970# CONFIG_USB_SL811_HCD is not set
945# CONFIG_USB_R8A66597_HCD is not set 971# CONFIG_USB_R8A66597_HCD is not set
946# CONFIG_USB_HWA_HCD is not set 972# CONFIG_USB_HWA_HCD is not set
@@ -954,11 +980,11 @@ CONFIG_USB_ISP116X_HCD=y
954# CONFIG_USB_TMC is not set 980# CONFIG_USB_TMC is not set
955 981
956# 982#
957# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 983# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
958# 984#
959 985
960# 986#
961# see USB_STORAGE Help for more information 987# also be needed; see USB_STORAGE Help for more info
962# 988#
963# CONFIG_USB_STORAGE is not set 989# CONFIG_USB_STORAGE is not set
964# CONFIG_USB_LIBUSUAL is not set 990# CONFIG_USB_LIBUSUAL is not set
@@ -988,7 +1014,6 @@ CONFIG_USB_ISP116X_HCD=y
988# CONFIG_USB_LED is not set 1014# CONFIG_USB_LED is not set
989# CONFIG_USB_CYPRESS_CY7C63 is not set 1015# CONFIG_USB_CYPRESS_CY7C63 is not set
990# CONFIG_USB_CYTHERM is not set 1016# CONFIG_USB_CYTHERM is not set
991# CONFIG_USB_PHIDGET is not set
992# CONFIG_USB_IDMOUSE is not set 1017# CONFIG_USB_IDMOUSE is not set
993# CONFIG_USB_FTDI_ELAN is not set 1018# CONFIG_USB_FTDI_ELAN is not set
994# CONFIG_USB_APPLEDISPLAY is not set 1019# CONFIG_USB_APPLEDISPLAY is not set
@@ -999,12 +1024,18 @@ CONFIG_USB_ISP116X_HCD=y
999# CONFIG_USB_ISIGHTFW is not set 1024# CONFIG_USB_ISIGHTFW is not set
1000# CONFIG_USB_VST is not set 1025# CONFIG_USB_VST is not set
1001# CONFIG_USB_GADGET is not set 1026# CONFIG_USB_GADGET is not set
1027
1028#
1029# OTG and related infrastructure
1030#
1031# CONFIG_NOP_USB_XCEIV is not set
1002# CONFIG_MMC is not set 1032# CONFIG_MMC is not set
1003# CONFIG_MEMSTICK is not set 1033# CONFIG_MEMSTICK is not set
1004# CONFIG_NEW_LEDS is not set 1034# CONFIG_NEW_LEDS is not set
1005# CONFIG_ACCESSIBILITY is not set 1035# CONFIG_ACCESSIBILITY is not set
1006# CONFIG_RTC_CLASS is not set 1036# CONFIG_RTC_CLASS is not set
1007# CONFIG_DMADEVICES is not set 1037# CONFIG_DMADEVICES is not set
1038# CONFIG_AUXDISPLAY is not set
1008CONFIG_UIO=y 1039CONFIG_UIO=y
1009# CONFIG_UIO_PDRV is not set 1040# CONFIG_UIO_PDRV is not set
1010# CONFIG_UIO_PDRV_GENIRQ is not set 1041# CONFIG_UIO_PDRV_GENIRQ is not set
@@ -1031,6 +1062,7 @@ CONFIG_FS_MBCACHE=y
1031CONFIG_FILE_LOCKING=y 1062CONFIG_FILE_LOCKING=y
1032# CONFIG_XFS_FS is not set 1063# CONFIG_XFS_FS is not set
1033# CONFIG_OCFS2_FS is not set 1064# CONFIG_OCFS2_FS is not set
1065# CONFIG_BTRFS_FS is not set
1034# CONFIG_DNOTIFY is not set 1066# CONFIG_DNOTIFY is not set
1035# CONFIG_INOTIFY is not set 1067# CONFIG_INOTIFY is not set
1036# CONFIG_QUOTA is not set 1068# CONFIG_QUOTA is not set
@@ -1084,6 +1116,7 @@ CONFIG_JFFS2_ZLIB=y
1084CONFIG_JFFS2_RTIME=y 1116CONFIG_JFFS2_RTIME=y
1085# CONFIG_JFFS2_RUBIN is not set 1117# CONFIG_JFFS2_RUBIN is not set
1086CONFIG_CRAMFS=y 1118CONFIG_CRAMFS=y
1119# CONFIG_SQUASHFS is not set
1087# CONFIG_VXFS_FS is not set 1120# CONFIG_VXFS_FS is not set
1088# CONFIG_MINIX_FS is not set 1121# CONFIG_MINIX_FS is not set
1089# CONFIG_OMFS_FS is not set 1122# CONFIG_OMFS_FS is not set
@@ -1105,7 +1138,6 @@ CONFIG_LOCKD_V4=y
1105CONFIG_EXPORTFS=y 1138CONFIG_EXPORTFS=y
1106CONFIG_NFS_COMMON=y 1139CONFIG_NFS_COMMON=y
1107CONFIG_SUNRPC=y 1140CONFIG_SUNRPC=y
1108# CONFIG_SUNRPC_REGISTER_V4 is not set
1109# CONFIG_RPCSEC_GSS_KRB5 is not set 1141# CONFIG_RPCSEC_GSS_KRB5 is not set
1110# CONFIG_RPCSEC_GSS_SPKM3 is not set 1142# CONFIG_RPCSEC_GSS_SPKM3 is not set
1111# CONFIG_SMB_FS is not set 1143# CONFIG_SMB_FS is not set
@@ -1146,7 +1178,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1146# 1178#
1147# Tracers 1179# Tracers
1148# 1180#
1149# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1150# CONFIG_SAMPLES is not set 1181# CONFIG_SAMPLES is not set
1151CONFIG_HAVE_ARCH_KGDB=y 1182CONFIG_HAVE_ARCH_KGDB=y
1152# CONFIG_SH_STANDARD_BIOS is not set 1183# CONFIG_SH_STANDARD_BIOS is not set
@@ -1240,6 +1271,7 @@ CONFIG_CRYPTO=y
1240# Compression 1271# Compression
1241# 1272#
1242# CONFIG_CRYPTO_DEFLATE is not set 1273# CONFIG_CRYPTO_DEFLATE is not set
1274# CONFIG_CRYPTO_ZLIB is not set
1243# CONFIG_CRYPTO_LZO is not set 1275# CONFIG_CRYPTO_LZO is not set
1244 1276
1245# 1277#
@@ -1265,3 +1297,4 @@ CONFIG_ZLIB_DEFLATE=y
1265CONFIG_HAS_IOMEM=y 1297CONFIG_HAS_IOMEM=y
1266CONFIG_HAS_IOPORT=y 1298CONFIG_HAS_IOPORT=y
1267CONFIG_HAS_DMA=y 1299CONFIG_HAS_DMA=y
1300CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig
index 932b0235b1de..125304e80f57 100644
--- a/arch/sh/configs/se7619_defconfig
+++ b/arch/sh/configs/se7619_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:36:46 2009 4# Thu Apr 2 18:44:53 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,12 +18,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
18# CONFIG_GENERIC_CLOCKEVENTS is not set 18# CONFIG_GENERIC_CLOCKEVENTS is not set
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
21CONFIG_SYS_SUPPORTS_CMT=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 30
29# 31#
@@ -36,15 +38,25 @@ CONFIG_LOCALVERSION=""
36# CONFIG_LOCALVERSION_AUTO is not set 38# CONFIG_LOCALVERSION_AUTO is not set
37# CONFIG_SYSVIPC is not set 39# CONFIG_SYSVIPC is not set
38# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
41
42#
43# RCU Subsystem
44#
45CONFIG_CLASSIC_RCU=y
46# CONFIG_TREE_RCU is not set
47# CONFIG_PREEMPT_RCU is not set
48# CONFIG_TREE_RCU_TRACE is not set
49# CONFIG_PREEMPT_RCU_TRACE is not set
39# CONFIG_IKCONFIG is not set 50# CONFIG_IKCONFIG is not set
40CONFIG_LOG_BUF_SHIFT=14 51CONFIG_LOG_BUF_SHIFT=14
41# CONFIG_CGROUPS is not set
42# CONFIG_GROUP_SCHED is not set 52# CONFIG_GROUP_SCHED is not set
53# CONFIG_CGROUPS is not set
43# CONFIG_RELAY is not set 54# CONFIG_RELAY is not set
44# CONFIG_NAMESPACES is not set 55# CONFIG_NAMESPACES is not set
45# CONFIG_BLK_DEV_INITRD is not set 56# CONFIG_BLK_DEV_INITRD is not set
46CONFIG_CC_OPTIMIZE_FOR_SIZE=y 57CONFIG_CC_OPTIMIZE_FOR_SIZE=y
47CONFIG_SYSCTL=y 58CONFIG_SYSCTL=y
59CONFIG_ANON_INODES=y
48CONFIG_EMBEDDED=y 60CONFIG_EMBEDDED=y
49# CONFIG_UID16 is not set 61# CONFIG_UID16 is not set
50# CONFIG_SYSCTL_SYSCALL is not set 62# CONFIG_SYSCTL_SYSCALL is not set
@@ -53,16 +65,15 @@ CONFIG_EMBEDDED=y
53CONFIG_PRINTK=y 65CONFIG_PRINTK=y
54CONFIG_BUG=y 66CONFIG_BUG=y
55# CONFIG_ELF_CORE is not set 67# CONFIG_ELF_CORE is not set
56CONFIG_COMPAT_BRK=y
57# CONFIG_BASE_FULL is not set 68# CONFIG_BASE_FULL is not set
58# CONFIG_FUTEX is not set 69# CONFIG_FUTEX is not set
59CONFIG_ANON_INODES=y
60# CONFIG_EPOLL is not set 70# CONFIG_EPOLL is not set
61CONFIG_SIGNALFD=y 71CONFIG_SIGNALFD=y
62CONFIG_TIMERFD=y 72CONFIG_TIMERFD=y
63CONFIG_EVENTFD=y 73CONFIG_EVENTFD=y
64CONFIG_AIO=y 74CONFIG_AIO=y
65# CONFIG_VM_EVENT_COUNTERS is not set 75# CONFIG_VM_EVENT_COUNTERS is not set
76CONFIG_COMPAT_BRK=y
66CONFIG_SLAB=y 77CONFIG_SLAB=y
67# CONFIG_SLUB is not set 78# CONFIG_SLUB is not set
68# CONFIG_SLOB is not set 79# CONFIG_SLOB is not set
@@ -93,11 +104,6 @@ CONFIG_IOSCHED_NOOP=y
93# CONFIG_DEFAULT_CFQ is not set 104# CONFIG_DEFAULT_CFQ is not set
94CONFIG_DEFAULT_NOOP=y 105CONFIG_DEFAULT_NOOP=y
95CONFIG_DEFAULT_IOSCHED="noop" 106CONFIG_DEFAULT_IOSCHED="noop"
96CONFIG_CLASSIC_RCU=y
97# CONFIG_TREE_RCU is not set
98# CONFIG_PREEMPT_RCU is not set
99# CONFIG_TREE_RCU_TRACE is not set
100# CONFIG_PREEMPT_RCU_TRACE is not set
101# CONFIG_FREEZER is not set 107# CONFIG_FREEZER is not set
102 108
103# 109#
@@ -132,6 +138,7 @@ CONFIG_CPU_SUBTYPE_SH7619=y
132# CONFIG_CPU_SUBTYPE_SH7770 is not set 138# CONFIG_CPU_SUBTYPE_SH7770 is not set
133# CONFIG_CPU_SUBTYPE_SH7780 is not set 139# CONFIG_CPU_SUBTYPE_SH7780 is not set
134# CONFIG_CPU_SUBTYPE_SH7785 is not set 140# CONFIG_CPU_SUBTYPE_SH7785 is not set
141# CONFIG_CPU_SUBTYPE_SH7786 is not set
135# CONFIG_CPU_SUBTYPE_SHX3 is not set 142# CONFIG_CPU_SUBTYPE_SHX3 is not set
136# CONFIG_CPU_SUBTYPE_SH7343 is not set 143# CONFIG_CPU_SUBTYPE_SH7343 is not set
137# CONFIG_CPU_SUBTYPE_SH7722 is not set 144# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -170,11 +177,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
170# CONFIG_PHYS_ADDR_T_64BIT is not set 177# CONFIG_PHYS_ADDR_T_64BIT is not set
171CONFIG_ZONE_DMA_FLAG=0 178CONFIG_ZONE_DMA_FLAG=0
172CONFIG_NR_QUICK=2 179CONFIG_NR_QUICK=2
180CONFIG_UNEVICTABLE_LRU=y
173 181
174# 182#
175# Cache configuration 183# Cache configuration
176# 184#
177# CONFIG_SH_DIRECT_MAPPED is not set
178# CONFIG_CACHE_WRITEBACK is not set 185# CONFIG_CACHE_WRITEBACK is not set
179CONFIG_CACHE_WRITETHROUGH=y 186CONFIG_CACHE_WRITETHROUGH=y
180# CONFIG_CACHE_OFF is not set 187# CONFIG_CACHE_OFF is not set
@@ -228,7 +235,6 @@ CONFIG_HZ_100=y
228# CONFIG_HZ_1000 is not set 235# CONFIG_HZ_1000 is not set
229CONFIG_HZ=100 236CONFIG_HZ=100
230# CONFIG_SCHED_HRTICK is not set 237# CONFIG_SCHED_HRTICK is not set
231# CONFIG_KEXEC is not set
232# CONFIG_CRASH_DUMP is not set 238# CONFIG_CRASH_DUMP is not set
233# CONFIG_SECCOMP is not set 239# CONFIG_SECCOMP is not set
234CONFIG_PREEMPT_NONE=y 240CONFIG_PREEMPT_NONE=y
@@ -329,9 +335,7 @@ CONFIG_MTD_CFI_UTIL=y
329# 335#
330# CONFIG_MTD_COMPLEX_MAPPINGS is not set 336# CONFIG_MTD_COMPLEX_MAPPINGS is not set
331CONFIG_MTD_PHYSMAP=y 337CONFIG_MTD_PHYSMAP=y
332CONFIG_MTD_PHYSMAP_START=0xa0000000 338# CONFIG_MTD_PHYSMAP_COMPAT is not set
333CONFIG_MTD_PHYSMAP_LEN=0x01000000
334CONFIG_MTD_PHYSMAP_BANKWIDTH=2
335# CONFIG_MTD_SOLUTIONENGINE is not set 339# CONFIG_MTD_SOLUTIONENGINE is not set
336# CONFIG_MTD_PLATRAM is not set 340# CONFIG_MTD_PLATRAM is not set
337 341
@@ -353,6 +357,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
353# CONFIG_MTD_ONENAND is not set 357# CONFIG_MTD_ONENAND is not set
354 358
355# 359#
360# LPDDR flash memory drivers
361#
362# CONFIG_MTD_LPDDR is not set
363
364#
356# UBI - Unsorted block images 365# UBI - Unsorted block images
357# 366#
358# CONFIG_MTD_UBI is not set 367# CONFIG_MTD_UBI is not set
@@ -364,9 +373,13 @@ CONFIG_BLK_DEV=y
364# CONFIG_CDROM_PKTCDVD is not set 373# CONFIG_CDROM_PKTCDVD is not set
365# CONFIG_BLK_DEV_HD is not set 374# CONFIG_BLK_DEV_HD is not set
366CONFIG_MISC_DEVICES=y 375CONFIG_MISC_DEVICES=y
367# CONFIG_EEPROM_93CX6 is not set
368# CONFIG_ENCLOSURE_SERVICES is not set 376# CONFIG_ENCLOSURE_SERVICES is not set
369# CONFIG_C2PORT is not set 377# CONFIG_C2PORT is not set
378
379#
380# EEPROM support
381#
382# CONFIG_EEPROM_93CX6 is not set
370CONFIG_HAVE_IDE=y 383CONFIG_HAVE_IDE=y
371# CONFIG_IDE is not set 384# CONFIG_IDE is not set
372 385
@@ -514,15 +527,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
514# 527#
515 528
516# 529#
517# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 530# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
518# 531#
519# CONFIG_USB_GADGET is not set 532# CONFIG_USB_GADGET is not set
533
534#
535# OTG and related infrastructure
536#
520# CONFIG_MMC is not set 537# CONFIG_MMC is not set
521# CONFIG_MEMSTICK is not set 538# CONFIG_MEMSTICK is not set
522# CONFIG_NEW_LEDS is not set 539# CONFIG_NEW_LEDS is not set
523# CONFIG_ACCESSIBILITY is not set 540# CONFIG_ACCESSIBILITY is not set
524# CONFIG_RTC_CLASS is not set 541# CONFIG_RTC_CLASS is not set
525# CONFIG_DMADEVICES is not set 542# CONFIG_DMADEVICES is not set
543# CONFIG_AUXDISPLAY is not set
526# CONFIG_UIO is not set 544# CONFIG_UIO is not set
527# CONFIG_STAGING is not set 545# CONFIG_STAGING is not set
528 546
@@ -537,6 +555,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
537# CONFIG_FS_POSIX_ACL is not set 555# CONFIG_FS_POSIX_ACL is not set
538CONFIG_FILE_LOCKING=y 556CONFIG_FILE_LOCKING=y
539# CONFIG_XFS_FS is not set 557# CONFIG_XFS_FS is not set
558# CONFIG_BTRFS_FS is not set
540# CONFIG_DNOTIFY is not set 559# CONFIG_DNOTIFY is not set
541# CONFIG_INOTIFY is not set 560# CONFIG_INOTIFY is not set
542# CONFIG_QUOTA is not set 561# CONFIG_QUOTA is not set
@@ -575,6 +594,7 @@ CONFIG_MISC_FILESYSTEMS=y
575# CONFIG_EFS_FS is not set 594# CONFIG_EFS_FS is not set
576# CONFIG_JFFS2_FS is not set 595# CONFIG_JFFS2_FS is not set
577# CONFIG_CRAMFS is not set 596# CONFIG_CRAMFS is not set
597# CONFIG_SQUASHFS is not set
578# CONFIG_VXFS_FS is not set 598# CONFIG_VXFS_FS is not set
579# CONFIG_MINIX_FS is not set 599# CONFIG_MINIX_FS is not set
580# CONFIG_OMFS_FS is not set 600# CONFIG_OMFS_FS is not set
@@ -614,7 +634,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
614# 634#
615# Tracers 635# Tracers
616# 636#
617# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
618# CONFIG_SAMPLES is not set 637# CONFIG_SAMPLES is not set
619CONFIG_HAVE_ARCH_KGDB=y 638CONFIG_HAVE_ARCH_KGDB=y
620# CONFIG_SH_STANDARD_BIOS is not set 639# CONFIG_SH_STANDARD_BIOS is not set
diff --git a/arch/sh/configs/se7705_defconfig b/arch/sh/configs/se7705_defconfig
index 8574d6eb00a3..0308abf52384 100644
--- a/arch/sh/configs/se7705_defconfig
+++ b/arch/sh/configs/se7705_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:37:50 2009 4# Thu Apr 2 18:45:56 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -41,16 +42,30 @@ CONFIG_LOCALVERSION_AUTO=y
41# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
48# CONFIG_RELAY is not set 58# CONFIG_RELAY is not set
49# CONFIG_NAMESPACES is not set 59# CONFIG_NAMESPACES is not set
50CONFIG_BLK_DEV_INITRD=y 60CONFIG_BLK_DEV_INITRD=y
51CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
62CONFIG_RD_GZIP=y
63# CONFIG_RD_BZIP2 is not set
64# CONFIG_RD_LZMA is not set
65CONFIG_INITRAMFS_COMPRESSION_NONE=y
52# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
53CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
54CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
55CONFIG_UID16=y 70CONFIG_UID16=y
56# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
@@ -59,10 +74,8 @@ CONFIG_UID16=y
59CONFIG_PRINTK=y 74CONFIG_PRINTK=y
60CONFIG_BUG=y 75CONFIG_BUG=y
61CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 78CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y
66CONFIG_EPOLL=y 79CONFIG_EPOLL=y
67CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -70,6 +83,7 @@ CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 83CONFIG_SHMEM=y
71CONFIG_AIO=y 84CONFIG_AIO=y
72CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
86CONFIG_COMPAT_BRK=y
73CONFIG_SLAB=y 87CONFIG_SLAB=y
74# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
75# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
@@ -106,11 +120,6 @@ CONFIG_DEFAULT_AS=y
106# CONFIG_DEFAULT_CFQ is not set 120# CONFIG_DEFAULT_CFQ is not set
107# CONFIG_DEFAULT_NOOP is not set 121# CONFIG_DEFAULT_NOOP is not set
108CONFIG_DEFAULT_IOSCHED="anticipatory" 122CONFIG_DEFAULT_IOSCHED="anticipatory"
109CONFIG_CLASSIC_RCU=y
110# CONFIG_TREE_RCU is not set
111# CONFIG_PREEMPT_RCU is not set
112# CONFIG_TREE_RCU_TRACE is not set
113# CONFIG_PREEMPT_RCU_TRACE is not set
114# CONFIG_FREEZER is not set 123# CONFIG_FREEZER is not set
115 124
116# 125#
@@ -145,6 +154,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
145# CONFIG_CPU_SUBTYPE_SH7770 is not set 154# CONFIG_CPU_SUBTYPE_SH7770 is not set
146# CONFIG_CPU_SUBTYPE_SH7780 is not set 155# CONFIG_CPU_SUBTYPE_SH7780 is not set
147# CONFIG_CPU_SUBTYPE_SH7785 is not set 156# CONFIG_CPU_SUBTYPE_SH7785 is not set
157# CONFIG_CPU_SUBTYPE_SH7786 is not set
148# CONFIG_CPU_SUBTYPE_SHX3 is not set 158# CONFIG_CPU_SUBTYPE_SHX3 is not set
149# CONFIG_CPU_SUBTYPE_SH7343 is not set 159# CONFIG_CPU_SUBTYPE_SH7343 is not set
150# CONFIG_CPU_SUBTYPE_SH7722 is not set 160# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -186,12 +196,13 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
186CONFIG_ZONE_DMA_FLAG=0 196CONFIG_ZONE_DMA_FLAG=0
187CONFIG_NR_QUICK=2 197CONFIG_NR_QUICK=2
188CONFIG_UNEVICTABLE_LRU=y 198CONFIG_UNEVICTABLE_LRU=y
199CONFIG_HAVE_MLOCK=y
200CONFIG_HAVE_MLOCKED_PAGE_BIT=y
189 201
190# 202#
191# Cache configuration 203# Cache configuration
192# 204#
193CONFIG_SH7705_CACHE_32KB=y 205CONFIG_SH7705_CACHE_32KB=y
194# CONFIG_SH_DIRECT_MAPPED is not set
195CONFIG_CACHE_WRITEBACK=y 206CONFIG_CACHE_WRITEBACK=y
196# CONFIG_CACHE_WRITETHROUGH is not set 207# CONFIG_CACHE_WRITETHROUGH is not set
197# CONFIG_CACHE_OFF is not set 208# CONFIG_CACHE_OFF is not set
@@ -292,7 +303,6 @@ CONFIG_NET=y
292# 303#
293# Networking options 304# Networking options
294# 305#
295CONFIG_COMPAT_NET_DEV_OPS=y
296CONFIG_PACKET=y 306CONFIG_PACKET=y
297# CONFIG_PACKET_MMAP is not set 307# CONFIG_PACKET_MMAP is not set
298CONFIG_UNIX=y 308CONFIG_UNIX=y
@@ -347,6 +357,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
347# CONFIG_LAPB is not set 357# CONFIG_LAPB is not set
348# CONFIG_ECONET is not set 358# CONFIG_ECONET is not set
349# CONFIG_WAN_ROUTER is not set 359# CONFIG_WAN_ROUTER is not set
360# CONFIG_PHONET is not set
350# CONFIG_NET_SCHED is not set 361# CONFIG_NET_SCHED is not set
351# CONFIG_DCB is not set 362# CONFIG_DCB is not set
352 363
@@ -359,13 +370,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
359# CONFIG_IRDA is not set 370# CONFIG_IRDA is not set
360# CONFIG_BT is not set 371# CONFIG_BT is not set
361# CONFIG_AF_RXRPC is not set 372# CONFIG_AF_RXRPC is not set
362# CONFIG_PHONET is not set
363CONFIG_WIRELESS=y 373CONFIG_WIRELESS=y
364# CONFIG_CFG80211 is not set 374# CONFIG_CFG80211 is not set
365# CONFIG_WIRELESS_OLD_REGULATORY is not set 375# CONFIG_WIRELESS_OLD_REGULATORY is not set
366# CONFIG_WIRELESS_EXT is not set 376# CONFIG_WIRELESS_EXT is not set
367# CONFIG_LIB80211 is not set 377# CONFIG_LIB80211 is not set
368# CONFIG_MAC80211 is not set 378# CONFIG_MAC80211 is not set
379# CONFIG_WIMAX is not set
369# CONFIG_RFKILL is not set 380# CONFIG_RFKILL is not set
370# CONFIG_NET_9P is not set 381# CONFIG_NET_9P is not set
371 382
@@ -384,6 +395,7 @@ CONFIG_MTD=y
384# CONFIG_MTD_DEBUG is not set 395# CONFIG_MTD_DEBUG is not set
385# CONFIG_MTD_CONCAT is not set 396# CONFIG_MTD_CONCAT is not set
386CONFIG_MTD_PARTITIONS=y 397CONFIG_MTD_PARTITIONS=y
398# CONFIG_MTD_TESTS is not set
387# CONFIG_MTD_REDBOOT_PARTS is not set 399# CONFIG_MTD_REDBOOT_PARTS is not set
388# CONFIG_MTD_CMDLINE_PARTS is not set 400# CONFIG_MTD_CMDLINE_PARTS is not set
389# CONFIG_MTD_AR7_PARTS is not set 401# CONFIG_MTD_AR7_PARTS is not set
@@ -451,6 +463,11 @@ CONFIG_MTD_CFI_UTIL=y
451# CONFIG_MTD_ONENAND is not set 463# CONFIG_MTD_ONENAND is not set
452 464
453# 465#
466# LPDDR flash memory drivers
467#
468# CONFIG_MTD_LPDDR is not set
469
470#
454# UBI - Unsorted block images 471# UBI - Unsorted block images
455# 472#
456# CONFIG_MTD_UBI is not set 473# CONFIG_MTD_UBI is not set
@@ -467,9 +484,13 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
467# CONFIG_ATA_OVER_ETH is not set 484# CONFIG_ATA_OVER_ETH is not set
468# CONFIG_BLK_DEV_HD is not set 485# CONFIG_BLK_DEV_HD is not set
469CONFIG_MISC_DEVICES=y 486CONFIG_MISC_DEVICES=y
470# CONFIG_EEPROM_93CX6 is not set
471# CONFIG_ENCLOSURE_SERVICES is not set 487# CONFIG_ENCLOSURE_SERVICES is not set
472# CONFIG_C2PORT is not set 488# CONFIG_C2PORT is not set
489
490#
491# EEPROM support
492#
493# CONFIG_EEPROM_93CX6 is not set
473CONFIG_HAVE_IDE=y 494CONFIG_HAVE_IDE=y
474# CONFIG_IDE is not set 495# CONFIG_IDE is not set
475 496
@@ -483,6 +504,7 @@ CONFIG_HAVE_IDE=y
483# CONFIG_ATA is not set 504# CONFIG_ATA is not set
484# CONFIG_MD is not set 505# CONFIG_MD is not set
485CONFIG_NETDEVICES=y 506CONFIG_NETDEVICES=y
507CONFIG_COMPAT_NET_DEV_OPS=y
486# CONFIG_DUMMY is not set 508# CONFIG_DUMMY is not set
487# CONFIG_BONDING is not set 509# CONFIG_BONDING is not set
488# CONFIG_MACVLAN is not set 510# CONFIG_MACVLAN is not set
@@ -495,8 +517,10 @@ CONFIG_NET_ETHERNET=y
495# CONFIG_AX88796 is not set 517# CONFIG_AX88796 is not set
496CONFIG_STNIC=y 518CONFIG_STNIC=y
497# CONFIG_SMC91X is not set 519# CONFIG_SMC91X is not set
520# CONFIG_ETHOC is not set
498# CONFIG_SMC911X is not set 521# CONFIG_SMC911X is not set
499# CONFIG_SMSC911X is not set 522# CONFIG_SMSC911X is not set
523# CONFIG_DNET is not set
500# CONFIG_IBM_NEW_EMAC_ZMII is not set 524# CONFIG_IBM_NEW_EMAC_ZMII is not set
501# CONFIG_IBM_NEW_EMAC_RGMII is not set 525# CONFIG_IBM_NEW_EMAC_RGMII is not set
502# CONFIG_IBM_NEW_EMAC_TAH is not set 526# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -513,7 +537,10 @@ CONFIG_NETDEV_10000=y
513# 537#
514# CONFIG_WLAN_PRE80211 is not set 538# CONFIG_WLAN_PRE80211 is not set
515# CONFIG_WLAN_80211 is not set 539# CONFIG_WLAN_80211 is not set
516# CONFIG_IWLWIFI_LEDS is not set 540
541#
542# Enable WiMAX (Networking options) to see the WiMAX drivers
543#
517# CONFIG_WAN is not set 544# CONFIG_WAN is not set
518CONFIG_PPP=y 545CONFIG_PPP=y
519# CONFIG_PPP_MULTILINK is not set 546# CONFIG_PPP_MULTILINK is not set
@@ -593,6 +620,7 @@ CONFIG_UNIX98_PTYS=y
593# CONFIG_LEGACY_PTYS is not set 620# CONFIG_LEGACY_PTYS is not set
594# CONFIG_IPMI_HANDLER is not set 621# CONFIG_IPMI_HANDLER is not set
595CONFIG_HW_RANDOM=y 622CONFIG_HW_RANDOM=y
623# CONFIG_HW_RANDOM_TIMERIOMEM is not set
596# CONFIG_R3964 is not set 624# CONFIG_R3964 is not set
597# CONFIG_RAW_DRIVER is not set 625# CONFIG_RAW_DRIVER is not set
598# CONFIG_TCG_TPM is not set 626# CONFIG_TCG_TPM is not set
@@ -684,15 +712,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
684# 712#
685 713
686# 714#
687# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 715# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
688# 716#
689# CONFIG_USB_GADGET is not set 717# CONFIG_USB_GADGET is not set
718
719#
720# OTG and related infrastructure
721#
690# CONFIG_MMC is not set 722# CONFIG_MMC is not set
691# CONFIG_MEMSTICK is not set 723# CONFIG_MEMSTICK is not set
692# CONFIG_NEW_LEDS is not set 724# CONFIG_NEW_LEDS is not set
693# CONFIG_ACCESSIBILITY is not set 725# CONFIG_ACCESSIBILITY is not set
694# CONFIG_RTC_CLASS is not set 726# CONFIG_RTC_CLASS is not set
695# CONFIG_DMADEVICES is not set 727# CONFIG_DMADEVICES is not set
728# CONFIG_AUXDISPLAY is not set
696# CONFIG_UIO is not set 729# CONFIG_UIO is not set
697# CONFIG_STAGING is not set 730# CONFIG_STAGING is not set
698 731
@@ -709,6 +742,7 @@ CONFIG_EXT2_FS=y
709# CONFIG_FS_POSIX_ACL is not set 742# CONFIG_FS_POSIX_ACL is not set
710CONFIG_FILE_LOCKING=y 743CONFIG_FILE_LOCKING=y
711# CONFIG_XFS_FS is not set 744# CONFIG_XFS_FS is not set
745# CONFIG_BTRFS_FS is not set
712CONFIG_DNOTIFY=y 746CONFIG_DNOTIFY=y
713CONFIG_INOTIFY=y 747CONFIG_INOTIFY=y
714CONFIG_INOTIFY_USER=y 748CONFIG_INOTIFY_USER=y
@@ -761,6 +795,7 @@ CONFIG_JFFS2_ZLIB=y
761CONFIG_JFFS2_RTIME=y 795CONFIG_JFFS2_RTIME=y
762# CONFIG_JFFS2_RUBIN is not set 796# CONFIG_JFFS2_RUBIN is not set
763# CONFIG_CRAMFS is not set 797# CONFIG_CRAMFS is not set
798# CONFIG_SQUASHFS is not set
764# CONFIG_VXFS_FS is not set 799# CONFIG_VXFS_FS is not set
765# CONFIG_MINIX_FS is not set 800# CONFIG_MINIX_FS is not set
766# CONFIG_OMFS_FS is not set 801# CONFIG_OMFS_FS is not set
@@ -778,7 +813,6 @@ CONFIG_ROOT_NFS=y
778CONFIG_LOCKD=y 813CONFIG_LOCKD=y
779CONFIG_NFS_COMMON=y 814CONFIG_NFS_COMMON=y
780CONFIG_SUNRPC=y 815CONFIG_SUNRPC=y
781# CONFIG_SUNRPC_REGISTER_V4 is not set
782# CONFIG_RPCSEC_GSS_KRB5 is not set 816# CONFIG_RPCSEC_GSS_KRB5 is not set
783# CONFIG_RPCSEC_GSS_SPKM3 is not set 817# CONFIG_RPCSEC_GSS_SPKM3 is not set
784# CONFIG_SMB_FS is not set 818# CONFIG_SMB_FS is not set
@@ -817,7 +851,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
817# 851#
818# Tracers 852# Tracers
819# 853#
820# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
821# CONFIG_SAMPLES is not set 854# CONFIG_SAMPLES is not set
822CONFIG_HAVE_ARCH_KGDB=y 855CONFIG_HAVE_ARCH_KGDB=y
823# CONFIG_SH_STANDARD_BIOS is not set 856# CONFIG_SH_STANDARD_BIOS is not set
@@ -908,6 +941,7 @@ CONFIG_CRYPTO=y
908# Compression 941# Compression
909# 942#
910# CONFIG_CRYPTO_DEFLATE is not set 943# CONFIG_CRYPTO_DEFLATE is not set
944# CONFIG_CRYPTO_ZLIB is not set
911# CONFIG_CRYPTO_LZO is not set 945# CONFIG_CRYPTO_LZO is not set
912 946
913# 947#
@@ -930,7 +964,8 @@ CONFIG_CRC32=y
930# CONFIG_LIBCRC32C is not set 964# CONFIG_LIBCRC32C is not set
931CONFIG_ZLIB_INFLATE=y 965CONFIG_ZLIB_INFLATE=y
932CONFIG_ZLIB_DEFLATE=y 966CONFIG_ZLIB_DEFLATE=y
933CONFIG_PLIST=y 967CONFIG_DECOMPRESS_GZIP=y
934CONFIG_HAS_IOMEM=y 968CONFIG_HAS_IOMEM=y
935CONFIG_HAS_IOPORT=y 969CONFIG_HAS_IOPORT=y
936CONFIG_HAS_DMA=y 970CONFIG_HAS_DMA=y
971CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7712_defconfig b/arch/sh/configs/se7712_defconfig
index e31ea84f116d..a8c24b703489 100644
--- a/arch/sh/configs/se7712_defconfig
+++ b/arch/sh/configs/se7712_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:40:12 2009 4# Thu Apr 2 18:48:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,13 +16,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y 16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_CLOCKEVENTS=y 17CONFIG_GENERIC_CLOCKEVENTS=y
18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
19# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 19CONFIG_ARCH_HIBERNATION_POSSIBLE=y
20CONFIG_STACKTRACE_SUPPORT=y 20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y 21CONFIG_LOCKDEP_SUPPORT=y
22CONFIG_HAVE_LATENCYTOP_SUPPORT=y 22CONFIG_HAVE_LATENCYTOP_SUPPORT=y
23# CONFIG_ARCH_HAS_ILOG2_U32 is not set 23# CONFIG_ARCH_HAS_ILOG2_U32 is not set
24# CONFIG_ARCH_HAS_ILOG2_U64 is not set 24# CONFIG_ARCH_HAS_ILOG2_U64 is not set
25CONFIG_ARCH_NO_VIRT_TO_BUS=y 25CONFIG_ARCH_NO_VIRT_TO_BUS=y
26CONFIG_ARCH_HAS_DEFAULT_IDLE=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27 28
28# 29#
@@ -41,10 +42,19 @@ CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
48CONFIG_SYSFS_DEPRECATED=y 58CONFIG_SYSFS_DEPRECATED=y
49CONFIG_SYSFS_DEPRECATED_V2=y 59CONFIG_SYSFS_DEPRECATED_V2=y
50# CONFIG_RELAY is not set 60# CONFIG_RELAY is not set
@@ -52,21 +62,19 @@ CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_BLK_DEV_INITRD is not set 62# CONFIG_BLK_DEV_INITRD is not set
53# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 63# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
54CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
65CONFIG_ANON_INODES=y
55CONFIG_EMBEDDED=y 66CONFIG_EMBEDDED=y
56CONFIG_UID16=y 67CONFIG_UID16=y
57CONFIG_SYSCTL_SYSCALL=y 68CONFIG_SYSCTL_SYSCALL=y
58CONFIG_KALLSYMS=y 69CONFIG_KALLSYMS=y
59CONFIG_KALLSYMS_ALL=y 70CONFIG_KALLSYMS_ALL=y
60CONFIG_KALLSYMS_STRIP_GENERATED=y
61# CONFIG_KALLSYMS_EXTRA_PASS is not set 71# CONFIG_KALLSYMS_EXTRA_PASS is not set
62CONFIG_HOTPLUG=y 72CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 73CONFIG_PRINTK=y
64# CONFIG_BUG is not set 74# CONFIG_BUG is not set
65CONFIG_ELF_CORE=y 75CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67# CONFIG_BASE_FULL is not set 76# CONFIG_BASE_FULL is not set
68CONFIG_FUTEX=y 77CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 78CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 79CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 80CONFIG_TIMERFD=y
@@ -74,6 +82,7 @@ CONFIG_EVENTFD=y
74# CONFIG_SHMEM is not set 82# CONFIG_SHMEM is not set
75CONFIG_AIO=y 83CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 84CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 86CONFIG_SLAB=y
78# CONFIG_SLUB is not set 87# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 88# CONFIG_SLOB is not set
@@ -112,11 +121,6 @@ CONFIG_IOSCHED_NOOP=y
112# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
113CONFIG_DEFAULT_NOOP=y 122CONFIG_DEFAULT_NOOP=y
114CONFIG_DEFAULT_IOSCHED="noop" 123CONFIG_DEFAULT_IOSCHED="noop"
115CONFIG_CLASSIC_RCU=y
116# CONFIG_TREE_RCU is not set
117# CONFIG_PREEMPT_RCU is not set
118# CONFIG_TREE_RCU_TRACE is not set
119# CONFIG_PREEMPT_RCU_TRACE is not set
120# CONFIG_FREEZER is not set 124# CONFIG_FREEZER is not set
121 125
122# 126#
@@ -151,6 +155,7 @@ CONFIG_CPU_SUBTYPE_SH7712=y
151# CONFIG_CPU_SUBTYPE_SH7770 is not set 155# CONFIG_CPU_SUBTYPE_SH7770 is not set
152# CONFIG_CPU_SUBTYPE_SH7780 is not set 156# CONFIG_CPU_SUBTYPE_SH7780 is not set
153# CONFIG_CPU_SUBTYPE_SH7785 is not set 157# CONFIG_CPU_SUBTYPE_SH7785 is not set
158# CONFIG_CPU_SUBTYPE_SH7786 is not set
154# CONFIG_CPU_SUBTYPE_SHX3 is not set 159# CONFIG_CPU_SUBTYPE_SHX3 is not set
155# CONFIG_CPU_SUBTYPE_SH7343 is not set 160# CONFIG_CPU_SUBTYPE_SH7343 is not set
156# CONFIG_CPU_SUBTYPE_SH7722 is not set 161# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -192,11 +197,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
192CONFIG_ZONE_DMA_FLAG=0 197CONFIG_ZONE_DMA_FLAG=0
193CONFIG_NR_QUICK=2 198CONFIG_NR_QUICK=2
194CONFIG_UNEVICTABLE_LRU=y 199CONFIG_UNEVICTABLE_LRU=y
200CONFIG_HAVE_MLOCK=y
201CONFIG_HAVE_MLOCKED_PAGE_BIT=y
195 202
196# 203#
197# Cache configuration 204# Cache configuration
198# 205#
199# CONFIG_SH_DIRECT_MAPPED is not set
200CONFIG_CACHE_WRITEBACK=y 206CONFIG_CACHE_WRITEBACK=y
201# CONFIG_CACHE_WRITETHROUGH is not set 207# CONFIG_CACHE_WRITETHROUGH is not set
202# CONFIG_CACHE_OFF is not set 208# CONFIG_CACHE_OFF is not set
@@ -300,7 +306,6 @@ CONFIG_NET=y
300# 306#
301# Networking options 307# Networking options
302# 308#
303CONFIG_COMPAT_NET_DEV_OPS=y
304CONFIG_PACKET=y 309CONFIG_PACKET=y
305CONFIG_PACKET_MMAP=y 310CONFIG_PACKET_MMAP=y
306CONFIG_UNIX=y 311CONFIG_UNIX=y
@@ -364,6 +369,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_LAPB is not set 369# CONFIG_LAPB is not set
365# CONFIG_ECONET is not set 370# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 371# CONFIG_WAN_ROUTER is not set
372# CONFIG_PHONET is not set
367CONFIG_NET_SCHED=y 373CONFIG_NET_SCHED=y
368 374
369# 375#
@@ -411,7 +417,6 @@ CONFIG_NET_SCH_FIFO=y
411# CONFIG_IRDA is not set 417# CONFIG_IRDA is not set
412# CONFIG_BT is not set 418# CONFIG_BT is not set
413# CONFIG_AF_RXRPC is not set 419# CONFIG_AF_RXRPC is not set
414# CONFIG_PHONET is not set
415CONFIG_FIB_RULES=y 420CONFIG_FIB_RULES=y
416CONFIG_WIRELESS=y 421CONFIG_WIRELESS=y
417# CONFIG_CFG80211 is not set 422# CONFIG_CFG80211 is not set
@@ -419,6 +424,7 @@ CONFIG_WIRELESS=y
419# CONFIG_WIRELESS_EXT is not set 424# CONFIG_WIRELESS_EXT is not set
420# CONFIG_LIB80211 is not set 425# CONFIG_LIB80211 is not set
421# CONFIG_MAC80211 is not set 426# CONFIG_MAC80211 is not set
427# CONFIG_WIMAX is not set
422# CONFIG_RFKILL is not set 428# CONFIG_RFKILL is not set
423# CONFIG_NET_9P is not set 429# CONFIG_NET_9P is not set
424 430
@@ -443,6 +449,7 @@ CONFIG_MTD=y
443# CONFIG_MTD_DEBUG is not set 449# CONFIG_MTD_DEBUG is not set
444CONFIG_MTD_CONCAT=y 450CONFIG_MTD_CONCAT=y
445CONFIG_MTD_PARTITIONS=y 451CONFIG_MTD_PARTITIONS=y
452# CONFIG_MTD_TESTS is not set
446# CONFIG_MTD_REDBOOT_PARTS is not set 453# CONFIG_MTD_REDBOOT_PARTS is not set
447# CONFIG_MTD_CMDLINE_PARTS is not set 454# CONFIG_MTD_CMDLINE_PARTS is not set
448# CONFIG_MTD_AR7_PARTS is not set 455# CONFIG_MTD_AR7_PARTS is not set
@@ -510,6 +517,11 @@ CONFIG_MTD_CFI_UTIL=y
510# CONFIG_MTD_ONENAND is not set 517# CONFIG_MTD_ONENAND is not set
511 518
512# 519#
520# LPDDR flash memory drivers
521#
522# CONFIG_MTD_LPDDR is not set
523
524#
513# UBI - Unsorted block images 525# UBI - Unsorted block images
514# 526#
515# CONFIG_MTD_UBI is not set 527# CONFIG_MTD_UBI is not set
@@ -523,9 +535,13 @@ CONFIG_BLK_DEV=y
523# CONFIG_ATA_OVER_ETH is not set 535# CONFIG_ATA_OVER_ETH is not set
524# CONFIG_BLK_DEV_HD is not set 536# CONFIG_BLK_DEV_HD is not set
525CONFIG_MISC_DEVICES=y 537CONFIG_MISC_DEVICES=y
526# CONFIG_EEPROM_93CX6 is not set
527# CONFIG_ENCLOSURE_SERVICES is not set 538# CONFIG_ENCLOSURE_SERVICES is not set
528# CONFIG_C2PORT is not set 539# CONFIG_C2PORT is not set
540
541#
542# EEPROM support
543#
544# CONFIG_EEPROM_93CX6 is not set
529CONFIG_HAVE_IDE=y 545CONFIG_HAVE_IDE=y
530# CONFIG_IDE is not set 546# CONFIG_IDE is not set
531 547
@@ -571,6 +587,7 @@ CONFIG_SCSI_LOWLEVEL=y
571# CONFIG_LIBFC is not set 587# CONFIG_LIBFC is not set
572# CONFIG_SCSI_DEBUG is not set 588# CONFIG_SCSI_DEBUG is not set
573# CONFIG_SCSI_DH is not set 589# CONFIG_SCSI_DH is not set
590# CONFIG_SCSI_OSD_INITIATOR is not set
574CONFIG_ATA=y 591CONFIG_ATA=y
575# CONFIG_ATA_NONSTANDARD is not set 592# CONFIG_ATA_NONSTANDARD is not set
576CONFIG_SATA_PMP=y 593CONFIG_SATA_PMP=y
@@ -579,6 +596,7 @@ CONFIG_ATA_SFF=y
579CONFIG_PATA_PLATFORM=y 596CONFIG_PATA_PLATFORM=y
580# CONFIG_MD is not set 597# CONFIG_MD is not set
581CONFIG_NETDEVICES=y 598CONFIG_NETDEVICES=y
599CONFIG_COMPAT_NET_DEV_OPS=y
582# CONFIG_DUMMY is not set 600# CONFIG_DUMMY is not set
583# CONFIG_BONDING is not set 601# CONFIG_BONDING is not set
584# CONFIG_MACVLAN is not set 602# CONFIG_MACVLAN is not set
@@ -611,8 +629,10 @@ CONFIG_MII=y
611# CONFIG_STNIC is not set 629# CONFIG_STNIC is not set
612CONFIG_SH_ETH=y 630CONFIG_SH_ETH=y
613# CONFIG_SMC91X is not set 631# CONFIG_SMC91X is not set
632# CONFIG_ETHOC is not set
614# CONFIG_SMC911X is not set 633# CONFIG_SMC911X is not set
615# CONFIG_SMSC911X is not set 634# CONFIG_SMSC911X is not set
635# CONFIG_DNET is not set
616# CONFIG_IBM_NEW_EMAC_ZMII is not set 636# CONFIG_IBM_NEW_EMAC_ZMII is not set
617# CONFIG_IBM_NEW_EMAC_RGMII is not set 637# CONFIG_IBM_NEW_EMAC_RGMII is not set
618# CONFIG_IBM_NEW_EMAC_TAH is not set 638# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -629,7 +649,10 @@ CONFIG_NETDEV_10000=y
629# 649#
630# CONFIG_WLAN_PRE80211 is not set 650# CONFIG_WLAN_PRE80211 is not set
631# CONFIG_WLAN_80211 is not set 651# CONFIG_WLAN_80211 is not set
632# CONFIG_IWLWIFI_LEDS is not set 652
653#
654# Enable WiMAX (Networking options) to see the WiMAX drivers
655#
633# CONFIG_WAN is not set 656# CONFIG_WAN is not set
634# CONFIG_PPP is not set 657# CONFIG_PPP is not set
635# CONFIG_SLIP is not set 658# CONFIG_SLIP is not set
@@ -675,6 +698,7 @@ CONFIG_UNIX98_PTYS=y
675# CONFIG_LEGACY_PTYS is not set 698# CONFIG_LEGACY_PTYS is not set
676# CONFIG_IPMI_HANDLER is not set 699# CONFIG_IPMI_HANDLER is not set
677CONFIG_HW_RANDOM=m 700CONFIG_HW_RANDOM=m
701# CONFIG_HW_RANDOM_TIMERIOMEM is not set
678# CONFIG_R3964 is not set 702# CONFIG_R3964 is not set
679# CONFIG_RAW_DRIVER is not set 703# CONFIG_RAW_DRIVER is not set
680# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
@@ -744,9 +768,13 @@ CONFIG_USB_ARCH_HAS_HCD=y
744# 768#
745 769
746# 770#
747# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 771# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
748# 772#
749# CONFIG_USB_GADGET is not set 773# CONFIG_USB_GADGET is not set
774
775#
776# OTG and related infrastructure
777#
750# CONFIG_MMC is not set 778# CONFIG_MMC is not set
751# CONFIG_MEMSTICK is not set 779# CONFIG_MEMSTICK is not set
752CONFIG_NEW_LEDS=y 780CONFIG_NEW_LEDS=y
@@ -764,9 +792,14 @@ CONFIG_LEDS_TRIGGERS=y
764# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 792# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
765# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set 793# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
766# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set 794# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
795
796#
797# iptables trigger is under Netfilter config (LED target)
798#
767# CONFIG_ACCESSIBILITY is not set 799# CONFIG_ACCESSIBILITY is not set
768# CONFIG_RTC_CLASS is not set 800# CONFIG_RTC_CLASS is not set
769# CONFIG_DMADEVICES is not set 801# CONFIG_DMADEVICES is not set
802# CONFIG_AUXDISPLAY is not set
770# CONFIG_UIO is not set 803# CONFIG_UIO is not set
771# CONFIG_STAGING is not set 804# CONFIG_STAGING is not set
772 805
@@ -791,6 +824,7 @@ CONFIG_FS_POSIX_ACL=y
791CONFIG_FILE_LOCKING=y 824CONFIG_FILE_LOCKING=y
792# CONFIG_XFS_FS is not set 825# CONFIG_XFS_FS is not set
793# CONFIG_OCFS2_FS is not set 826# CONFIG_OCFS2_FS is not set
827# CONFIG_BTRFS_FS is not set
794# CONFIG_DNOTIFY is not set 828# CONFIG_DNOTIFY is not set
795# CONFIG_INOTIFY is not set 829# CONFIG_INOTIFY is not set
796# CONFIG_QUOTA is not set 830# CONFIG_QUOTA is not set
@@ -844,6 +878,7 @@ CONFIG_JFFS2_ZLIB=y
844CONFIG_JFFS2_RTIME=y 878CONFIG_JFFS2_RTIME=y
845# CONFIG_JFFS2_RUBIN is not set 879# CONFIG_JFFS2_RUBIN is not set
846CONFIG_CRAMFS=y 880CONFIG_CRAMFS=y
881# CONFIG_SQUASHFS is not set
847# CONFIG_VXFS_FS is not set 882# CONFIG_VXFS_FS is not set
848# CONFIG_MINIX_FS is not set 883# CONFIG_MINIX_FS is not set
849# CONFIG_OMFS_FS is not set 884# CONFIG_OMFS_FS is not set
@@ -861,7 +896,6 @@ CONFIG_ROOT_NFS=y
861CONFIG_LOCKD=y 896CONFIG_LOCKD=y
862CONFIG_NFS_COMMON=y 897CONFIG_NFS_COMMON=y
863CONFIG_SUNRPC=y 898CONFIG_SUNRPC=y
864# CONFIG_SUNRPC_REGISTER_V4 is not set
865# CONFIG_RPCSEC_GSS_KRB5 is not set 899# CONFIG_RPCSEC_GSS_KRB5 is not set
866# CONFIG_RPCSEC_GSS_SPKM3 is not set 900# CONFIG_RPCSEC_GSS_SPKM3 is not set
867# CONFIG_SMB_FS is not set 901# CONFIG_SMB_FS is not set
@@ -923,6 +957,7 @@ CONFIG_FRAME_POINTER=y
923# CONFIG_FAULT_INJECTION is not set 957# CONFIG_FAULT_INJECTION is not set
924# CONFIG_LATENCYTOP is not set 958# CONFIG_LATENCYTOP is not set
925CONFIG_SYSCTL_SYSCALL_CHECK=y 959CONFIG_SYSCTL_SYSCALL_CHECK=y
960# CONFIG_PAGE_POISONING is not set
926CONFIG_HAVE_FUNCTION_TRACER=y 961CONFIG_HAVE_FUNCTION_TRACER=y
927CONFIG_HAVE_DYNAMIC_FTRACE=y 962CONFIG_HAVE_DYNAMIC_FTRACE=y
928CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 963CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -937,7 +972,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
937# CONFIG_BOOT_TRACER is not set 972# CONFIG_BOOT_TRACER is not set
938# CONFIG_TRACE_BRANCH_PROFILING is not set 973# CONFIG_TRACE_BRANCH_PROFILING is not set
939# CONFIG_STACK_TRACER is not set 974# CONFIG_STACK_TRACER is not set
940# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
941# CONFIG_SAMPLES is not set 975# CONFIG_SAMPLES is not set
942CONFIG_HAVE_ARCH_KGDB=y 976CONFIG_HAVE_ARCH_KGDB=y
943# CONFIG_KGDB is not set 977# CONFIG_KGDB is not set
@@ -974,10 +1008,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
974CONFIG_CRYPTO_HASH=y 1008CONFIG_CRYPTO_HASH=y
975CONFIG_CRYPTO_HASH2=y 1009CONFIG_CRYPTO_HASH2=y
976CONFIG_CRYPTO_RNG2=y 1010CONFIG_CRYPTO_RNG2=y
1011CONFIG_CRYPTO_PCOMP=y
977CONFIG_CRYPTO_MANAGER=y 1012CONFIG_CRYPTO_MANAGER=y
978CONFIG_CRYPTO_MANAGER2=y 1013CONFIG_CRYPTO_MANAGER2=y
979# CONFIG_CRYPTO_GF128MUL is not set 1014# CONFIG_CRYPTO_GF128MUL is not set
980# CONFIG_CRYPTO_NULL is not set 1015# CONFIG_CRYPTO_NULL is not set
1016CONFIG_CRYPTO_WORKQUEUE=y
981# CONFIG_CRYPTO_CRYPTD is not set 1017# CONFIG_CRYPTO_CRYPTD is not set
982CONFIG_CRYPTO_AUTHENC=y 1018CONFIG_CRYPTO_AUTHENC=y
983# CONFIG_CRYPTO_TEST is not set 1019# CONFIG_CRYPTO_TEST is not set
@@ -1046,6 +1082,7 @@ CONFIG_CRYPTO_DES=y
1046# Compression 1082# Compression
1047# 1083#
1048CONFIG_CRYPTO_DEFLATE=y 1084CONFIG_CRYPTO_DEFLATE=y
1085# CONFIG_CRYPTO_ZLIB is not set
1049# CONFIG_CRYPTO_LZO is not set 1086# CONFIG_CRYPTO_LZO is not set
1050 1087
1051# 1088#
@@ -1068,7 +1105,7 @@ CONFIG_CRC32=y
1068# CONFIG_LIBCRC32C is not set 1105# CONFIG_LIBCRC32C is not set
1069CONFIG_ZLIB_INFLATE=y 1106CONFIG_ZLIB_INFLATE=y
1070CONFIG_ZLIB_DEFLATE=y 1107CONFIG_ZLIB_DEFLATE=y
1071CONFIG_PLIST=y
1072CONFIG_HAS_IOMEM=y 1108CONFIG_HAS_IOMEM=y
1073CONFIG_HAS_IOPORT=y 1109CONFIG_HAS_IOPORT=y
1074CONFIG_HAS_DMA=y 1110CONFIG_HAS_DMA=y
1111CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7721_defconfig b/arch/sh/configs/se7721_defconfig
index ad1bace3ad46..4b79c2567dc8 100644
--- a/arch/sh/configs/se7721_defconfig
+++ b/arch/sh/configs/se7721_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:43:33 2009 4# Thu Apr 2 18:51:44 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,13 +16,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y 16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_CLOCKEVENTS=y 17CONFIG_GENERIC_CLOCKEVENTS=y
18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
19# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 19CONFIG_ARCH_HIBERNATION_POSSIBLE=y
20CONFIG_STACKTRACE_SUPPORT=y 20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y 21CONFIG_LOCKDEP_SUPPORT=y
22CONFIG_HAVE_LATENCYTOP_SUPPORT=y 22CONFIG_HAVE_LATENCYTOP_SUPPORT=y
23# CONFIG_ARCH_HAS_ILOG2_U32 is not set 23# CONFIG_ARCH_HAS_ILOG2_U32 is not set
24# CONFIG_ARCH_HAS_ILOG2_U64 is not set 24# CONFIG_ARCH_HAS_ILOG2_U64 is not set
25CONFIG_ARCH_NO_VIRT_TO_BUS=y 25CONFIG_ARCH_NO_VIRT_TO_BUS=y
26CONFIG_ARCH_HAS_DEFAULT_IDLE=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27 28
28# 29#
@@ -41,14 +42,23 @@ CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y 56CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y 57CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set 58# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y 59CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set 60# CONFIG_CGROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 62CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 63CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 64# CONFIG_RELAY is not set
@@ -56,21 +66,19 @@ CONFIG_SYSFS_DEPRECATED_V2=y
56# CONFIG_BLK_DEV_INITRD is not set 66# CONFIG_BLK_DEV_INITRD is not set
57# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
58CONFIG_SYSCTL=y 68CONFIG_SYSCTL=y
69CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 70CONFIG_EMBEDDED=y
60CONFIG_UID16=y 71CONFIG_UID16=y
61CONFIG_SYSCTL_SYSCALL=y 72CONFIG_SYSCTL_SYSCALL=y
62CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
63CONFIG_KALLSYMS_ALL=y 74CONFIG_KALLSYMS_ALL=y
64CONFIG_KALLSYMS_STRIP_GENERATED=y
65# CONFIG_KALLSYMS_EXTRA_PASS is not set 75# CONFIG_KALLSYMS_EXTRA_PASS is not set
66CONFIG_HOTPLUG=y 76CONFIG_HOTPLUG=y
67CONFIG_PRINTK=y 77CONFIG_PRINTK=y
68# CONFIG_BUG is not set 78# CONFIG_BUG is not set
69CONFIG_ELF_CORE=y 79CONFIG_ELF_CORE=y
70CONFIG_COMPAT_BRK=y
71# CONFIG_BASE_FULL is not set 80# CONFIG_BASE_FULL is not set
72CONFIG_FUTEX=y 81CONFIG_FUTEX=y
73CONFIG_ANON_INODES=y
74CONFIG_EPOLL=y 82CONFIG_EPOLL=y
75CONFIG_SIGNALFD=y 83CONFIG_SIGNALFD=y
76CONFIG_TIMERFD=y 84CONFIG_TIMERFD=y
@@ -78,6 +86,7 @@ CONFIG_EVENTFD=y
78# CONFIG_SHMEM is not set 86# CONFIG_SHMEM is not set
79CONFIG_AIO=y 87CONFIG_AIO=y
80CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_COMPAT_BRK=y
81CONFIG_SLAB=y 90CONFIG_SLAB=y
82# CONFIG_SLUB is not set 91# CONFIG_SLUB is not set
83# CONFIG_SLOB is not set 92# CONFIG_SLOB is not set
@@ -116,11 +125,6 @@ CONFIG_IOSCHED_NOOP=y
116# CONFIG_DEFAULT_CFQ is not set 125# CONFIG_DEFAULT_CFQ is not set
117CONFIG_DEFAULT_NOOP=y 126CONFIG_DEFAULT_NOOP=y
118CONFIG_DEFAULT_IOSCHED="noop" 127CONFIG_DEFAULT_IOSCHED="noop"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 128# CONFIG_FREEZER is not set
125 129
126# 130#
@@ -155,6 +159,7 @@ CONFIG_CPU_SUBTYPE_SH7721=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 159# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 160# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 161# CONFIG_CPU_SUBTYPE_SH7785 is not set
162# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 163# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 164# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 165# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +201,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 201CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 202CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 203CONFIG_UNEVICTABLE_LRU=y
204CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 206
200# 207#
201# Cache configuration 208# Cache configuration
202# 209#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 210CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 211# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 212# CONFIG_CACHE_OFF is not set
@@ -303,7 +309,6 @@ CONFIG_NET=y
303# 309#
304# Networking options 310# Networking options
305# 311#
306CONFIG_COMPAT_NET_DEV_OPS=y
307CONFIG_PACKET=y 312CONFIG_PACKET=y
308CONFIG_PACKET_MMAP=y 313CONFIG_PACKET_MMAP=y
309CONFIG_UNIX=y 314CONFIG_UNIX=y
@@ -367,6 +372,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
367# CONFIG_LAPB is not set 372# CONFIG_LAPB is not set
368# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
369# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set
370CONFIG_NET_SCHED=y 376CONFIG_NET_SCHED=y
371 377
372# 378#
@@ -414,7 +420,6 @@ CONFIG_NET_SCH_FIFO=y
414# CONFIG_IRDA is not set 420# CONFIG_IRDA is not set
415# CONFIG_BT is not set 421# CONFIG_BT is not set
416# CONFIG_AF_RXRPC is not set 422# CONFIG_AF_RXRPC is not set
417# CONFIG_PHONET is not set
418CONFIG_FIB_RULES=y 423CONFIG_FIB_RULES=y
419CONFIG_WIRELESS=y 424CONFIG_WIRELESS=y
420# CONFIG_CFG80211 is not set 425# CONFIG_CFG80211 is not set
@@ -422,6 +427,7 @@ CONFIG_WIRELESS=y
422# CONFIG_WIRELESS_EXT is not set 427# CONFIG_WIRELESS_EXT is not set
423# CONFIG_LIB80211 is not set 428# CONFIG_LIB80211 is not set
424# CONFIG_MAC80211 is not set 429# CONFIG_MAC80211 is not set
430# CONFIG_WIMAX is not set
425# CONFIG_RFKILL is not set 431# CONFIG_RFKILL is not set
426# CONFIG_NET_9P is not set 432# CONFIG_NET_9P is not set
427 433
@@ -446,6 +452,7 @@ CONFIG_MTD=y
446# CONFIG_MTD_DEBUG is not set 452# CONFIG_MTD_DEBUG is not set
447CONFIG_MTD_CONCAT=y 453CONFIG_MTD_CONCAT=y
448CONFIG_MTD_PARTITIONS=y 454CONFIG_MTD_PARTITIONS=y
455# CONFIG_MTD_TESTS is not set
449# CONFIG_MTD_REDBOOT_PARTS is not set 456# CONFIG_MTD_REDBOOT_PARTS is not set
450# CONFIG_MTD_CMDLINE_PARTS is not set 457# CONFIG_MTD_CMDLINE_PARTS is not set
451# CONFIG_MTD_AR7_PARTS is not set 458# CONFIG_MTD_AR7_PARTS is not set
@@ -513,6 +520,11 @@ CONFIG_MTD_CFI_UTIL=y
513# CONFIG_MTD_ONENAND is not set 520# CONFIG_MTD_ONENAND is not set
514 521
515# 522#
523# LPDDR flash memory drivers
524#
525# CONFIG_MTD_LPDDR is not set
526
527#
516# UBI - Unsorted block images 528# UBI - Unsorted block images
517# 529#
518# CONFIG_MTD_UBI is not set 530# CONFIG_MTD_UBI is not set
@@ -527,9 +539,13 @@ CONFIG_BLK_DEV=y
527# CONFIG_ATA_OVER_ETH is not set 539# CONFIG_ATA_OVER_ETH is not set
528# CONFIG_BLK_DEV_HD is not set 540# CONFIG_BLK_DEV_HD is not set
529CONFIG_MISC_DEVICES=y 541CONFIG_MISC_DEVICES=y
530# CONFIG_EEPROM_93CX6 is not set
531# CONFIG_ENCLOSURE_SERVICES is not set 542# CONFIG_ENCLOSURE_SERVICES is not set
532# CONFIG_C2PORT is not set 543# CONFIG_C2PORT is not set
544
545#
546# EEPROM support
547#
548# CONFIG_EEPROM_93CX6 is not set
533CONFIG_HAVE_IDE=y 549CONFIG_HAVE_IDE=y
534# CONFIG_IDE is not set 550# CONFIG_IDE is not set
535 551
@@ -572,6 +588,7 @@ CONFIG_SCSI_WAIT_SCAN=m
572# CONFIG_SCSI_SRP_ATTRS is not set 588# CONFIG_SCSI_SRP_ATTRS is not set
573# CONFIG_SCSI_LOWLEVEL is not set 589# CONFIG_SCSI_LOWLEVEL is not set
574# CONFIG_SCSI_DH is not set 590# CONFIG_SCSI_DH is not set
591# CONFIG_SCSI_OSD_INITIATOR is not set
575CONFIG_ATA=y 592CONFIG_ATA=y
576# CONFIG_ATA_NONSTANDARD is not set 593# CONFIG_ATA_NONSTANDARD is not set
577CONFIG_SATA_PMP=y 594CONFIG_SATA_PMP=y
@@ -580,6 +597,7 @@ CONFIG_ATA_SFF=y
580CONFIG_PATA_PLATFORM=y 597CONFIG_PATA_PLATFORM=y
581# CONFIG_MD is not set 598# CONFIG_MD is not set
582CONFIG_NETDEVICES=y 599CONFIG_NETDEVICES=y
600CONFIG_COMPAT_NET_DEV_OPS=y
583# CONFIG_DUMMY is not set 601# CONFIG_DUMMY is not set
584# CONFIG_BONDING is not set 602# CONFIG_BONDING is not set
585# CONFIG_MACVLAN is not set 603# CONFIG_MACVLAN is not set
@@ -595,7 +613,10 @@ CONFIG_NETDEV_10000=y
595# 613#
596# CONFIG_WLAN_PRE80211 is not set 614# CONFIG_WLAN_PRE80211 is not set
597# CONFIG_WLAN_80211 is not set 615# CONFIG_WLAN_80211 is not set
598# CONFIG_IWLWIFI_LEDS is not set 616
617#
618# Enable WiMAX (Networking options) to see the WiMAX drivers
619#
599 620
600# 621#
601# USB Network Adapters 622# USB Network Adapters
@@ -805,7 +826,9 @@ CONFIG_USB_MON=y
805# USB Host Controller Drivers 826# USB Host Controller Drivers
806# 827#
807# CONFIG_USB_C67X00_HCD is not set 828# CONFIG_USB_C67X00_HCD is not set
829# CONFIG_USB_OXU210HP_HCD is not set
808# CONFIG_USB_ISP116X_HCD is not set 830# CONFIG_USB_ISP116X_HCD is not set
831# CONFIG_USB_ISP1760_HCD is not set
809CONFIG_USB_OHCI_HCD=y 832CONFIG_USB_OHCI_HCD=y
810# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 833# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
811# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 834# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -823,18 +846,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
823# CONFIG_USB_TMC is not set 846# CONFIG_USB_TMC is not set
824 847
825# 848#
826# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 849# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
827# 850#
828 851
829# 852#
830# see USB_STORAGE Help for more information 853# also be needed; see USB_STORAGE Help for more info
831# 854#
832CONFIG_USB_STORAGE=y 855CONFIG_USB_STORAGE=y
833# CONFIG_USB_STORAGE_DEBUG is not set 856# CONFIG_USB_STORAGE_DEBUG is not set
834# CONFIG_USB_STORAGE_DATAFAB is not set 857# CONFIG_USB_STORAGE_DATAFAB is not set
835# CONFIG_USB_STORAGE_FREECOM is not set 858# CONFIG_USB_STORAGE_FREECOM is not set
836# CONFIG_USB_STORAGE_ISD200 is not set 859# CONFIG_USB_STORAGE_ISD200 is not set
837# CONFIG_USB_STORAGE_DPCM is not set
838# CONFIG_USB_STORAGE_USBAT is not set 860# CONFIG_USB_STORAGE_USBAT is not set
839# CONFIG_USB_STORAGE_SDDR09 is not set 861# CONFIG_USB_STORAGE_SDDR09 is not set
840# CONFIG_USB_STORAGE_SDDR55 is not set 862# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -870,7 +892,6 @@ CONFIG_USB_STORAGE=y
870# CONFIG_USB_LED is not set 892# CONFIG_USB_LED is not set
871# CONFIG_USB_CYPRESS_CY7C63 is not set 893# CONFIG_USB_CYPRESS_CY7C63 is not set
872# CONFIG_USB_CYTHERM is not set 894# CONFIG_USB_CYTHERM is not set
873# CONFIG_USB_PHIDGET is not set
874# CONFIG_USB_IDMOUSE is not set 895# CONFIG_USB_IDMOUSE is not set
875# CONFIG_USB_FTDI_ELAN is not set 896# CONFIG_USB_FTDI_ELAN is not set
876# CONFIG_USB_APPLEDISPLAY is not set 897# CONFIG_USB_APPLEDISPLAY is not set
@@ -880,6 +901,11 @@ CONFIG_USB_STORAGE=y
880# CONFIG_USB_ISIGHTFW is not set 901# CONFIG_USB_ISIGHTFW is not set
881# CONFIG_USB_VST is not set 902# CONFIG_USB_VST is not set
882# CONFIG_USB_GADGET is not set 903# CONFIG_USB_GADGET is not set
904
905#
906# OTG and related infrastructure
907#
908# CONFIG_NOP_USB_XCEIV is not set
883# CONFIG_MMC is not set 909# CONFIG_MMC is not set
884# CONFIG_MEMSTICK is not set 910# CONFIG_MEMSTICK is not set
885CONFIG_NEW_LEDS=y 911CONFIG_NEW_LEDS=y
@@ -897,9 +923,14 @@ CONFIG_LEDS_TRIGGERS=y
897# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 923# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
898# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set 924# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
899# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set 925# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
926
927#
928# iptables trigger is under Netfilter config (LED target)
929#
900# CONFIG_ACCESSIBILITY is not set 930# CONFIG_ACCESSIBILITY is not set
901# CONFIG_RTC_CLASS is not set 931# CONFIG_RTC_CLASS is not set
902# CONFIG_DMADEVICES is not set 932# CONFIG_DMADEVICES is not set
933# CONFIG_AUXDISPLAY is not set
903# CONFIG_UIO is not set 934# CONFIG_UIO is not set
904# CONFIG_STAGING is not set 935# CONFIG_STAGING is not set
905 936
@@ -924,6 +955,7 @@ CONFIG_FS_POSIX_ACL=y
924CONFIG_FILE_LOCKING=y 955CONFIG_FILE_LOCKING=y
925# CONFIG_XFS_FS is not set 956# CONFIG_XFS_FS is not set
926# CONFIG_OCFS2_FS is not set 957# CONFIG_OCFS2_FS is not set
958# CONFIG_BTRFS_FS is not set
927# CONFIG_DNOTIFY is not set 959# CONFIG_DNOTIFY is not set
928# CONFIG_INOTIFY is not set 960# CONFIG_INOTIFY is not set
929# CONFIG_QUOTA is not set 961# CONFIG_QUOTA is not set
@@ -980,6 +1012,7 @@ CONFIG_JFFS2_ZLIB=y
980CONFIG_JFFS2_RTIME=y 1012CONFIG_JFFS2_RTIME=y
981# CONFIG_JFFS2_RUBIN is not set 1013# CONFIG_JFFS2_RUBIN is not set
982CONFIG_CRAMFS=y 1014CONFIG_CRAMFS=y
1015# CONFIG_SQUASHFS is not set
983# CONFIG_VXFS_FS is not set 1016# CONFIG_VXFS_FS is not set
984# CONFIG_MINIX_FS is not set 1017# CONFIG_MINIX_FS is not set
985# CONFIG_OMFS_FS is not set 1018# CONFIG_OMFS_FS is not set
@@ -1082,6 +1115,7 @@ CONFIG_FRAME_POINTER=y
1082# CONFIG_FAULT_INJECTION is not set 1115# CONFIG_FAULT_INJECTION is not set
1083# CONFIG_LATENCYTOP is not set 1116# CONFIG_LATENCYTOP is not set
1084# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1117# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1118# CONFIG_PAGE_POISONING is not set
1085CONFIG_HAVE_FUNCTION_TRACER=y 1119CONFIG_HAVE_FUNCTION_TRACER=y
1086CONFIG_HAVE_DYNAMIC_FTRACE=y 1120CONFIG_HAVE_DYNAMIC_FTRACE=y
1087CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1121CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -1096,7 +1130,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1096# CONFIG_BOOT_TRACER is not set 1130# CONFIG_BOOT_TRACER is not set
1097# CONFIG_TRACE_BRANCH_PROFILING is not set 1131# CONFIG_TRACE_BRANCH_PROFILING is not set
1098# CONFIG_STACK_TRACER is not set 1132# CONFIG_STACK_TRACER is not set
1099# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1100# CONFIG_SAMPLES is not set 1133# CONFIG_SAMPLES is not set
1101CONFIG_HAVE_ARCH_KGDB=y 1134CONFIG_HAVE_ARCH_KGDB=y
1102# CONFIG_KGDB is not set 1135# CONFIG_KGDB is not set
@@ -1133,10 +1166,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1133CONFIG_CRYPTO_HASH=y 1166CONFIG_CRYPTO_HASH=y
1134CONFIG_CRYPTO_HASH2=y 1167CONFIG_CRYPTO_HASH2=y
1135CONFIG_CRYPTO_RNG2=y 1168CONFIG_CRYPTO_RNG2=y
1169CONFIG_CRYPTO_PCOMP=y
1136CONFIG_CRYPTO_MANAGER=y 1170CONFIG_CRYPTO_MANAGER=y
1137CONFIG_CRYPTO_MANAGER2=y 1171CONFIG_CRYPTO_MANAGER2=y
1138# CONFIG_CRYPTO_GF128MUL is not set 1172# CONFIG_CRYPTO_GF128MUL is not set
1139# CONFIG_CRYPTO_NULL is not set 1173# CONFIG_CRYPTO_NULL is not set
1174CONFIG_CRYPTO_WORKQUEUE=y
1140# CONFIG_CRYPTO_CRYPTD is not set 1175# CONFIG_CRYPTO_CRYPTD is not set
1141CONFIG_CRYPTO_AUTHENC=y 1176CONFIG_CRYPTO_AUTHENC=y
1142# CONFIG_CRYPTO_TEST is not set 1177# CONFIG_CRYPTO_TEST is not set
@@ -1205,6 +1240,7 @@ CONFIG_CRYPTO_DES=y
1205# Compression 1240# Compression
1206# 1241#
1207CONFIG_CRYPTO_DEFLATE=y 1242CONFIG_CRYPTO_DEFLATE=y
1243# CONFIG_CRYPTO_ZLIB is not set
1208# CONFIG_CRYPTO_LZO is not set 1244# CONFIG_CRYPTO_LZO is not set
1209 1245
1210# 1246#
@@ -1227,7 +1263,7 @@ CONFIG_CRC32=y
1227# CONFIG_LIBCRC32C is not set 1263# CONFIG_LIBCRC32C is not set
1228CONFIG_ZLIB_INFLATE=y 1264CONFIG_ZLIB_INFLATE=y
1229CONFIG_ZLIB_DEFLATE=y 1265CONFIG_ZLIB_DEFLATE=y
1230CONFIG_PLIST=y
1231CONFIG_HAS_IOMEM=y 1266CONFIG_HAS_IOMEM=y
1232CONFIG_HAS_IOPORT=y 1267CONFIG_HAS_IOPORT=y
1233CONFIG_HAS_DMA=y 1268CONFIG_HAS_DMA=y
1269CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index abb189a1d314..82bdaac45fb5 100644
--- a/arch/sh/configs/se7722_defconfig
+++ b/arch/sh/configs/se7722_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:46:59 2009 4# Thu Apr 2 18:55:10 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,15 +16,17 @@ CONFIG_GENERIC_IRQ_PROBE=y
16# CONFIG_GENERIC_GPIO is not set 16# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_CMT=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 31
30# 32#
@@ -44,19 +46,33 @@ CONFIG_BSD_PROCESS_ACCT=y
44# CONFIG_BSD_PROCESS_ACCT_V3 is not set 46# CONFIG_BSD_PROCESS_ACCT_V3 is not set
45# CONFIG_TASKSTATS is not set 47# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 48# CONFIG_AUDIT is not set
49
50#
51# RCU Subsystem
52#
53CONFIG_CLASSIC_RCU=y
54# CONFIG_TREE_RCU is not set
55# CONFIG_PREEMPT_RCU is not set
56# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
47CONFIG_IKCONFIG=y 58CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y 59CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=14 60CONFIG_LOG_BUF_SHIFT=14
50# CONFIG_CGROUPS is not set
51# CONFIG_GROUP_SCHED is not set 61# CONFIG_GROUP_SCHED is not set
62# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 63CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 64CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 65# CONFIG_RELAY is not set
55# CONFIG_NAMESPACES is not set 66# CONFIG_NAMESPACES is not set
56CONFIG_BLK_DEV_INITRD=y 67CONFIG_BLK_DEV_INITRD=y
57CONFIG_INITRAMFS_SOURCE="" 68CONFIG_INITRAMFS_SOURCE=""
69CONFIG_RD_GZIP=y
70# CONFIG_RD_BZIP2 is not set
71# CONFIG_RD_LZMA is not set
72CONFIG_INITRAMFS_COMPRESSION_NONE=y
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
60CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
61CONFIG_UID16=y 77CONFIG_UID16=y
62CONFIG_SYSCTL_SYSCALL=y 78CONFIG_SYSCTL_SYSCALL=y
@@ -66,10 +82,8 @@ CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y 82CONFIG_PRINTK=y
67CONFIG_BUG=y 83CONFIG_BUG=y
68CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
69CONFIG_COMPAT_BRK=y
70CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
71CONFIG_FUTEX=y 86CONFIG_FUTEX=y
72CONFIG_ANON_INODES=y
73CONFIG_EPOLL=y 87CONFIG_EPOLL=y
74CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
75CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -78,6 +92,7 @@ CONFIG_SHMEM=y
78CONFIG_AIO=y 92CONFIG_AIO=y
79CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
80CONFIG_SLUB_DEBUG=y 94CONFIG_SLUB_DEBUG=y
95CONFIG_COMPAT_BRK=y
81# CONFIG_SLAB is not set 96# CONFIG_SLAB is not set
82CONFIG_SLUB=y 97CONFIG_SLUB=y
83# CONFIG_SLOB is not set 98# CONFIG_SLOB is not set
@@ -118,11 +133,6 @@ CONFIG_IOSCHED_NOOP=y
118# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
119CONFIG_DEFAULT_NOOP=y 134CONFIG_DEFAULT_NOOP=y
120CONFIG_DEFAULT_IOSCHED="noop" 135CONFIG_DEFAULT_IOSCHED="noop"
121CONFIG_CLASSIC_RCU=y
122# CONFIG_TREE_RCU is not set
123# CONFIG_PREEMPT_RCU is not set
124# CONFIG_TREE_RCU_TRACE is not set
125# CONFIG_PREEMPT_RCU_TRACE is not set
126# CONFIG_FREEZER is not set 136# CONFIG_FREEZER is not set
127 137
128# 138#
@@ -132,6 +142,7 @@ CONFIG_CPU_SH4=y
132CONFIG_CPU_SH4A=y 142CONFIG_CPU_SH4A=y
133CONFIG_CPU_SH4AL_DSP=y 143CONFIG_CPU_SH4AL_DSP=y
134CONFIG_CPU_SHX2=y 144CONFIG_CPU_SHX2=y
145CONFIG_ARCH_SHMOBILE=y
135# CONFIG_CPU_SUBTYPE_SH7619 is not set 146# CONFIG_CPU_SUBTYPE_SH7619 is not set
136# CONFIG_CPU_SUBTYPE_SH7201 is not set 147# CONFIG_CPU_SUBTYPE_SH7201 is not set
137# CONFIG_CPU_SUBTYPE_SH7203 is not set 148# CONFIG_CPU_SUBTYPE_SH7203 is not set
@@ -160,6 +171,7 @@ CONFIG_CPU_SHX2=y
160# CONFIG_CPU_SUBTYPE_SH7770 is not set 171# CONFIG_CPU_SUBTYPE_SH7770 is not set
161# CONFIG_CPU_SUBTYPE_SH7780 is not set 172# CONFIG_CPU_SUBTYPE_SH7780 is not set
162# CONFIG_CPU_SUBTYPE_SH7785 is not set 173# CONFIG_CPU_SUBTYPE_SH7785 is not set
174# CONFIG_CPU_SUBTYPE_SH7786 is not set
163# CONFIG_CPU_SUBTYPE_SHX3 is not set 175# CONFIG_CPU_SUBTYPE_SHX3 is not set
164# CONFIG_CPU_SUBTYPE_SH7343 is not set 176# CONFIG_CPU_SUBTYPE_SH7343 is not set
165CONFIG_CPU_SUBTYPE_SH7722=y 177CONFIG_CPU_SUBTYPE_SH7722=y
@@ -213,11 +225,12 @@ CONFIG_MIGRATION=y
213CONFIG_ZONE_DMA_FLAG=0 225CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 226CONFIG_NR_QUICK=2
215CONFIG_UNEVICTABLE_LRU=y 227CONFIG_UNEVICTABLE_LRU=y
228CONFIG_HAVE_MLOCK=y
229CONFIG_HAVE_MLOCKED_PAGE_BIT=y
216 230
217# 231#
218# Cache configuration 232# Cache configuration
219# 233#
220# CONFIG_SH_DIRECT_MAPPED is not set
221CONFIG_CACHE_WRITEBACK=y 234CONFIG_CACHE_WRITEBACK=y
222# CONFIG_CACHE_WRITETHROUGH is not set 235# CONFIG_CACHE_WRITETHROUGH is not set
223# CONFIG_CACHE_OFF is not set 236# CONFIG_CACHE_OFF is not set
@@ -246,6 +259,7 @@ CONFIG_SH_7722_SOLUTION_ENGINE=y
246# Timer and clock configuration 259# Timer and clock configuration
247# 260#
248CONFIG_SH_TMU=y 261CONFIG_SH_TMU=y
262# CONFIG_SH_TIMER_CMT is not set
249CONFIG_SH_TIMER_IRQ=16 263CONFIG_SH_TIMER_IRQ=16
250CONFIG_SH_PCLK_FREQ=33333333 264CONFIG_SH_PCLK_FREQ=33333333
251CONFIG_TICK_ONESHOT=y 265CONFIG_TICK_ONESHOT=y
@@ -321,7 +335,6 @@ CONFIG_NET=y
321# 335#
322# Networking options 336# Networking options
323# 337#
324CONFIG_COMPAT_NET_DEV_OPS=y
325CONFIG_PACKET=y 338CONFIG_PACKET=y
326CONFIG_PACKET_MMAP=y 339CONFIG_PACKET_MMAP=y
327CONFIG_UNIX=y 340CONFIG_UNIX=y
@@ -373,6 +386,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_LAPB is not set 386# CONFIG_LAPB is not set
374# CONFIG_ECONET is not set 387# CONFIG_ECONET is not set
375# CONFIG_WAN_ROUTER is not set 388# CONFIG_WAN_ROUTER is not set
389# CONFIG_PHONET is not set
376# CONFIG_NET_SCHED is not set 390# CONFIG_NET_SCHED is not set
377# CONFIG_DCB is not set 391# CONFIG_DCB is not set
378 392
@@ -385,13 +399,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
385# CONFIG_IRDA is not set 399# CONFIG_IRDA is not set
386# CONFIG_BT is not set 400# CONFIG_BT is not set
387# CONFIG_AF_RXRPC is not set 401# CONFIG_AF_RXRPC is not set
388# CONFIG_PHONET is not set
389CONFIG_WIRELESS=y 402CONFIG_WIRELESS=y
390# CONFIG_CFG80211 is not set 403# CONFIG_CFG80211 is not set
391# CONFIG_WIRELESS_OLD_REGULATORY is not set 404# CONFIG_WIRELESS_OLD_REGULATORY is not set
392# CONFIG_WIRELESS_EXT is not set 405# CONFIG_WIRELESS_EXT is not set
393# CONFIG_LIB80211 is not set 406# CONFIG_LIB80211 is not set
394# CONFIG_MAC80211 is not set 407# CONFIG_MAC80211 is not set
408# CONFIG_WIMAX is not set
395# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
396# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
397 411
@@ -422,9 +436,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
422# CONFIG_ATA_OVER_ETH is not set 436# CONFIG_ATA_OVER_ETH is not set
423# CONFIG_BLK_DEV_HD is not set 437# CONFIG_BLK_DEV_HD is not set
424CONFIG_MISC_DEVICES=y 438CONFIG_MISC_DEVICES=y
425# CONFIG_EEPROM_93CX6 is not set
426# CONFIG_ENCLOSURE_SERVICES is not set 439# CONFIG_ENCLOSURE_SERVICES is not set
427# CONFIG_C2PORT is not set 440# CONFIG_C2PORT is not set
441
442#
443# EEPROM support
444#
445# CONFIG_EEPROM_93CX6 is not set
428CONFIG_HAVE_IDE=y 446CONFIG_HAVE_IDE=y
429# CONFIG_IDE is not set 447# CONFIG_IDE is not set
430 448
@@ -470,6 +488,7 @@ CONFIG_SCSI_LOWLEVEL=y
470# CONFIG_LIBFC is not set 488# CONFIG_LIBFC is not set
471# CONFIG_SCSI_DEBUG is not set 489# CONFIG_SCSI_DEBUG is not set
472# CONFIG_SCSI_DH is not set 490# CONFIG_SCSI_DH is not set
491# CONFIG_SCSI_OSD_INITIATOR is not set
473CONFIG_ATA=y 492CONFIG_ATA=y
474# CONFIG_ATA_NONSTANDARD is not set 493# CONFIG_ATA_NONSTANDARD is not set
475CONFIG_SATA_PMP=y 494CONFIG_SATA_PMP=y
@@ -478,6 +497,7 @@ CONFIG_ATA_SFF=y
478CONFIG_PATA_PLATFORM=y 497CONFIG_PATA_PLATFORM=y
479# CONFIG_MD is not set 498# CONFIG_MD is not set
480CONFIG_NETDEVICES=y 499CONFIG_NETDEVICES=y
500CONFIG_COMPAT_NET_DEV_OPS=y
481# CONFIG_DUMMY is not set 501# CONFIG_DUMMY is not set
482# CONFIG_BONDING is not set 502# CONFIG_BONDING is not set
483# CONFIG_MACVLAN is not set 503# CONFIG_MACVLAN is not set
@@ -490,8 +510,10 @@ CONFIG_MII=y
490# CONFIG_AX88796 is not set 510# CONFIG_AX88796 is not set
491# CONFIG_STNIC is not set 511# CONFIG_STNIC is not set
492CONFIG_SMC91X=y 512CONFIG_SMC91X=y
513# CONFIG_ETHOC is not set
493# CONFIG_SMC911X is not set 514# CONFIG_SMC911X is not set
494# CONFIG_SMSC911X is not set 515# CONFIG_SMSC911X is not set
516# CONFIG_DNET is not set
495# CONFIG_IBM_NEW_EMAC_ZMII is not set 517# CONFIG_IBM_NEW_EMAC_ZMII is not set
496# CONFIG_IBM_NEW_EMAC_RGMII is not set 518# CONFIG_IBM_NEW_EMAC_RGMII is not set
497# CONFIG_IBM_NEW_EMAC_TAH is not set 519# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -508,7 +530,10 @@ CONFIG_NETDEV_10000=y
508# 530#
509# CONFIG_WLAN_PRE80211 is not set 531# CONFIG_WLAN_PRE80211 is not set
510# CONFIG_WLAN_80211 is not set 532# CONFIG_WLAN_80211 is not set
511# CONFIG_IWLWIFI_LEDS is not set 533
534#
535# Enable WiMAX (Networking options) to see the WiMAX drivers
536#
512# CONFIG_WAN is not set 537# CONFIG_WAN is not set
513# CONFIG_PPP is not set 538# CONFIG_PPP is not set
514# CONFIG_SLIP is not set 539# CONFIG_SLIP is not set
@@ -589,6 +614,7 @@ CONFIG_LEGACY_PTYS=y
589CONFIG_LEGACY_PTY_COUNT=256 614CONFIG_LEGACY_PTY_COUNT=256
590# CONFIG_IPMI_HANDLER is not set 615# CONFIG_IPMI_HANDLER is not set
591CONFIG_HW_RANDOM=y 616CONFIG_HW_RANDOM=y
617# CONFIG_HW_RANDOM_TIMERIOMEM is not set
592# CONFIG_R3964 is not set 618# CONFIG_R3964 is not set
593# CONFIG_RAW_DRIVER is not set 619# CONFIG_RAW_DRIVER is not set
594# CONFIG_TCG_TPM is not set 620# CONFIG_TCG_TPM is not set
@@ -680,9 +706,13 @@ CONFIG_USB_ARCH_HAS_HCD=y
680# 706#
681 707
682# 708#
683# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 709# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
684# 710#
685# CONFIG_USB_GADGET is not set 711# CONFIG_USB_GADGET is not set
712
713#
714# OTG and related infrastructure
715#
686# CONFIG_MMC is not set 716# CONFIG_MMC is not set
687# CONFIG_MEMSTICK is not set 717# CONFIG_MEMSTICK is not set
688# CONFIG_NEW_LEDS is not set 718# CONFIG_NEW_LEDS is not set
@@ -725,6 +755,7 @@ CONFIG_RTC_INTF_DEV=y
725# 755#
726CONFIG_RTC_DRV_SH=y 756CONFIG_RTC_DRV_SH=y
727# CONFIG_DMADEVICES is not set 757# CONFIG_DMADEVICES is not set
758# CONFIG_AUXDISPLAY is not set
728# CONFIG_UIO is not set 759# CONFIG_UIO is not set
729# CONFIG_STAGING is not set 760# CONFIG_STAGING is not set
730 761
@@ -748,6 +779,7 @@ CONFIG_FS_MBCACHE=y
748CONFIG_FILE_LOCKING=y 779CONFIG_FILE_LOCKING=y
749# CONFIG_XFS_FS is not set 780# CONFIG_XFS_FS is not set
750# CONFIG_OCFS2_FS is not set 781# CONFIG_OCFS2_FS is not set
782# CONFIG_BTRFS_FS is not set
751CONFIG_DNOTIFY=y 783CONFIG_DNOTIFY=y
752CONFIG_INOTIFY=y 784CONFIG_INOTIFY=y
753CONFIG_INOTIFY_USER=y 785CONFIG_INOTIFY_USER=y
@@ -791,6 +823,7 @@ CONFIG_MISC_FILESYSTEMS=y
791# CONFIG_BFS_FS is not set 823# CONFIG_BFS_FS is not set
792# CONFIG_EFS_FS is not set 824# CONFIG_EFS_FS is not set
793# CONFIG_CRAMFS is not set 825# CONFIG_CRAMFS is not set
826# CONFIG_SQUASHFS is not set
794# CONFIG_VXFS_FS is not set 827# CONFIG_VXFS_FS is not set
795# CONFIG_MINIX_FS is not set 828# CONFIG_MINIX_FS is not set
796# CONFIG_OMFS_FS is not set 829# CONFIG_OMFS_FS is not set
@@ -843,7 +876,7 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
843# 876#
844# Tracers 877# Tracers
845# 878#
846# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 879# CONFIG_DYNAMIC_DEBUG is not set
847# CONFIG_SAMPLES is not set 880# CONFIG_SAMPLES is not set
848CONFIG_HAVE_ARCH_KGDB=y 881CONFIG_HAVE_ARCH_KGDB=y
849CONFIG_SH_STANDARD_BIOS=y 882CONFIG_SH_STANDARD_BIOS=y
@@ -936,6 +969,7 @@ CONFIG_CRYPTO=y
936# Compression 969# Compression
937# 970#
938# CONFIG_CRYPTO_DEFLATE is not set 971# CONFIG_CRYPTO_DEFLATE is not set
972# CONFIG_CRYPTO_ZLIB is not set
939# CONFIG_CRYPTO_LZO is not set 973# CONFIG_CRYPTO_LZO is not set
940 974
941# 975#
@@ -956,7 +990,9 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
956CONFIG_CRC32=y 990CONFIG_CRC32=y
957# CONFIG_CRC7 is not set 991# CONFIG_CRC7 is not set
958# CONFIG_LIBCRC32C is not set 992# CONFIG_LIBCRC32C is not set
959CONFIG_PLIST=y 993CONFIG_ZLIB_INFLATE=y
994CONFIG_DECOMPRESS_GZIP=y
960CONFIG_HAS_IOMEM=y 995CONFIG_HAS_IOMEM=y
961CONFIG_HAS_IOPORT=y 996CONFIG_HAS_IOPORT=y
962CONFIG_HAS_DMA=y 997CONFIG_HAS_DMA=y
998CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defconfig
index ac874f63a625..ceef6d9138ee 100644
--- a/arch/sh/configs/se7750_defconfig
+++ b/arch/sh/configs/se7750_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:49:22 2009 4# Thu Apr 2 18:57:31 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -42,11 +43,20 @@ CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set 43# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
46CONFIG_IKCONFIG_PROC=y 56CONFIG_IKCONFIG_PROC=y
47CONFIG_LOG_BUF_SHIFT=14 57CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_CGROUPS is not set
49# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
50CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
51CONFIG_SYSFS_DEPRECATED_V2=y 61CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_RELAY is not set 62# CONFIG_RELAY is not set
@@ -54,6 +64,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_BLK_DEV_INITRD is not set 64# CONFIG_BLK_DEV_INITRD is not set
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 65# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
58CONFIG_UID16=y 69CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
@@ -63,10 +74,8 @@ CONFIG_KALLSYMS=y
63CONFIG_PRINTK=y 74CONFIG_PRINTK=y
64CONFIG_BUG=y 75CONFIG_BUG=y
65CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 78CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 79CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -74,6 +83,7 @@ CONFIG_EVENTFD=y
74CONFIG_SHMEM=y 83CONFIG_SHMEM=y
75CONFIG_AIO=y 84CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
86CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 87CONFIG_SLAB=y
78# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
@@ -112,11 +122,6 @@ CONFIG_DEFAULT_AS=y
112# CONFIG_DEFAULT_CFQ is not set 122# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set 123# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory" 124CONFIG_DEFAULT_IOSCHED="anticipatory"
115CONFIG_CLASSIC_RCU=y
116# CONFIG_TREE_RCU is not set
117# CONFIG_PREEMPT_RCU is not set
118# CONFIG_TREE_RCU_TRACE is not set
119# CONFIG_PREEMPT_RCU_TRACE is not set
120# CONFIG_FREEZER is not set 125# CONFIG_FREEZER is not set
121 126
122# 127#
@@ -151,6 +156,7 @@ CONFIG_CPU_SUBTYPE_SH7750=y
151# CONFIG_CPU_SUBTYPE_SH7770 is not set 156# CONFIG_CPU_SUBTYPE_SH7770 is not set
152# CONFIG_CPU_SUBTYPE_SH7780 is not set 157# CONFIG_CPU_SUBTYPE_SH7780 is not set
153# CONFIG_CPU_SUBTYPE_SH7785 is not set 158# CONFIG_CPU_SUBTYPE_SH7785 is not set
159# CONFIG_CPU_SUBTYPE_SH7786 is not set
154# CONFIG_CPU_SUBTYPE_SHX3 is not set 160# CONFIG_CPU_SUBTYPE_SHX3 is not set
155# CONFIG_CPU_SUBTYPE_SH7343 is not set 161# CONFIG_CPU_SUBTYPE_SH7343 is not set
156# CONFIG_CPU_SUBTYPE_SH7722 is not set 162# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -192,11 +198,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
192CONFIG_ZONE_DMA_FLAG=0 198CONFIG_ZONE_DMA_FLAG=0
193CONFIG_NR_QUICK=2 199CONFIG_NR_QUICK=2
194CONFIG_UNEVICTABLE_LRU=y 200CONFIG_UNEVICTABLE_LRU=y
201CONFIG_HAVE_MLOCK=y
202CONFIG_HAVE_MLOCKED_PAGE_BIT=y
195 203
196# 204#
197# Cache configuration 205# Cache configuration
198# 206#
199# CONFIG_SH_DIRECT_MAPPED is not set
200CONFIG_CACHE_WRITEBACK=y 207CONFIG_CACHE_WRITEBACK=y
201# CONFIG_CACHE_WRITETHROUGH is not set 208# CONFIG_CACHE_WRITETHROUGH is not set
202# CONFIG_CACHE_OFF is not set 209# CONFIG_CACHE_OFF is not set
@@ -299,7 +306,6 @@ CONFIG_NET=y
299# 306#
300# Networking options 307# Networking options
301# 308#
302CONFIG_COMPAT_NET_DEV_OPS=y
303CONFIG_PACKET=y 309CONFIG_PACKET=y
304# CONFIG_PACKET_MMAP is not set 310# CONFIG_PACKET_MMAP is not set
305CONFIG_UNIX=y 311CONFIG_UNIX=y
@@ -355,6 +361,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_LAPB is not set 361# CONFIG_LAPB is not set
356# CONFIG_ECONET is not set 362# CONFIG_ECONET is not set
357# CONFIG_WAN_ROUTER is not set 363# CONFIG_WAN_ROUTER is not set
364# CONFIG_PHONET is not set
358# CONFIG_NET_SCHED is not set 365# CONFIG_NET_SCHED is not set
359# CONFIG_DCB is not set 366# CONFIG_DCB is not set
360 367
@@ -367,13 +374,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
367# CONFIG_IRDA is not set 374# CONFIG_IRDA is not set
368# CONFIG_BT is not set 375# CONFIG_BT is not set
369# CONFIG_AF_RXRPC is not set 376# CONFIG_AF_RXRPC is not set
370# CONFIG_PHONET is not set
371CONFIG_WIRELESS=y 377CONFIG_WIRELESS=y
372# CONFIG_CFG80211 is not set 378# CONFIG_CFG80211 is not set
373# CONFIG_WIRELESS_OLD_REGULATORY is not set 379# CONFIG_WIRELESS_OLD_REGULATORY is not set
374# CONFIG_WIRELESS_EXT is not set 380# CONFIG_WIRELESS_EXT is not set
375# CONFIG_LIB80211 is not set 381# CONFIG_LIB80211 is not set
376# CONFIG_MAC80211 is not set 382# CONFIG_MAC80211 is not set
383# CONFIG_WIMAX is not set
377# CONFIG_RFKILL is not set 384# CONFIG_RFKILL is not set
378# CONFIG_NET_9P is not set 385# CONFIG_NET_9P is not set
379 386
@@ -392,6 +399,7 @@ CONFIG_MTD=y
392# CONFIG_MTD_DEBUG is not set 399# CONFIG_MTD_DEBUG is not set
393# CONFIG_MTD_CONCAT is not set 400# CONFIG_MTD_CONCAT is not set
394CONFIG_MTD_PARTITIONS=y 401CONFIG_MTD_PARTITIONS=y
402# CONFIG_MTD_TESTS is not set
395# CONFIG_MTD_REDBOOT_PARTS is not set 403# CONFIG_MTD_REDBOOT_PARTS is not set
396# CONFIG_MTD_CMDLINE_PARTS is not set 404# CONFIG_MTD_CMDLINE_PARTS is not set
397# CONFIG_MTD_AR7_PARTS is not set 405# CONFIG_MTD_AR7_PARTS is not set
@@ -459,6 +467,11 @@ CONFIG_MTD_ROM=y
459# CONFIG_MTD_ONENAND is not set 467# CONFIG_MTD_ONENAND is not set
460 468
461# 469#
470# LPDDR flash memory drivers
471#
472# CONFIG_MTD_LPDDR is not set
473
474#
462# UBI - Unsorted block images 475# UBI - Unsorted block images
463# 476#
464# CONFIG_MTD_UBI is not set 477# CONFIG_MTD_UBI is not set
@@ -472,9 +485,13 @@ CONFIG_BLK_DEV=y
472# CONFIG_ATA_OVER_ETH is not set 485# CONFIG_ATA_OVER_ETH is not set
473# CONFIG_BLK_DEV_HD is not set 486# CONFIG_BLK_DEV_HD is not set
474CONFIG_MISC_DEVICES=y 487CONFIG_MISC_DEVICES=y
475# CONFIG_EEPROM_93CX6 is not set
476# CONFIG_ENCLOSURE_SERVICES is not set 488# CONFIG_ENCLOSURE_SERVICES is not set
477# CONFIG_C2PORT is not set 489# CONFIG_C2PORT is not set
490
491#
492# EEPROM support
493#
494# CONFIG_EEPROM_93CX6 is not set
478CONFIG_HAVE_IDE=y 495CONFIG_HAVE_IDE=y
479CONFIG_IDE=y 496CONFIG_IDE=y
480 497
@@ -538,9 +555,11 @@ CONFIG_SCSI_LOWLEVEL=y
538# CONFIG_LIBFC is not set 555# CONFIG_LIBFC is not set
539# CONFIG_SCSI_DEBUG is not set 556# CONFIG_SCSI_DEBUG is not set
540# CONFIG_SCSI_DH is not set 557# CONFIG_SCSI_DH is not set
558# CONFIG_SCSI_OSD_INITIATOR is not set
541# CONFIG_ATA is not set 559# CONFIG_ATA is not set
542# CONFIG_MD is not set 560# CONFIG_MD is not set
543CONFIG_NETDEVICES=y 561CONFIG_NETDEVICES=y
562CONFIG_COMPAT_NET_DEV_OPS=y
544# CONFIG_DUMMY is not set 563# CONFIG_DUMMY is not set
545# CONFIG_BONDING is not set 564# CONFIG_BONDING is not set
546# CONFIG_MACVLAN is not set 565# CONFIG_MACVLAN is not set
@@ -553,8 +572,10 @@ CONFIG_NET_ETHERNET=y
553# CONFIG_AX88796 is not set 572# CONFIG_AX88796 is not set
554CONFIG_STNIC=y 573CONFIG_STNIC=y
555# CONFIG_SMC91X is not set 574# CONFIG_SMC91X is not set
575# CONFIG_ETHOC is not set
556# CONFIG_SMC911X is not set 576# CONFIG_SMC911X is not set
557# CONFIG_SMSC911X is not set 577# CONFIG_SMSC911X is not set
578# CONFIG_DNET is not set
558# CONFIG_IBM_NEW_EMAC_ZMII is not set 579# CONFIG_IBM_NEW_EMAC_ZMII is not set
559# CONFIG_IBM_NEW_EMAC_RGMII is not set 580# CONFIG_IBM_NEW_EMAC_RGMII is not set
560# CONFIG_IBM_NEW_EMAC_TAH is not set 581# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -571,7 +592,10 @@ CONFIG_NETDEV_10000=y
571# 592#
572# CONFIG_WLAN_PRE80211 is not set 593# CONFIG_WLAN_PRE80211 is not set
573# CONFIG_WLAN_80211 is not set 594# CONFIG_WLAN_80211 is not set
574# CONFIG_IWLWIFI_LEDS is not set 595
596#
597# Enable WiMAX (Networking options) to see the WiMAX drivers
598#
575# CONFIG_WAN is not set 599# CONFIG_WAN is not set
576# CONFIG_PPP is not set 600# CONFIG_PPP is not set
577# CONFIG_SLIP is not set 601# CONFIG_SLIP is not set
@@ -622,6 +646,7 @@ CONFIG_LEGACY_PTYS=y
622CONFIG_LEGACY_PTY_COUNT=256 646CONFIG_LEGACY_PTY_COUNT=256
623# CONFIG_IPMI_HANDLER is not set 647# CONFIG_IPMI_HANDLER is not set
624CONFIG_HW_RANDOM=y 648CONFIG_HW_RANDOM=y
649# CONFIG_HW_RANDOM_TIMERIOMEM is not set
625# CONFIG_R3964 is not set 650# CONFIG_R3964 is not set
626# CONFIG_RAW_DRIVER is not set 651# CONFIG_RAW_DRIVER is not set
627# CONFIG_TCG_TPM is not set 652# CONFIG_TCG_TPM is not set
@@ -711,15 +736,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
711# 736#
712 737
713# 738#
714# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 739# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
715# 740#
716# CONFIG_USB_GADGET is not set 741# CONFIG_USB_GADGET is not set
742
743#
744# OTG and related infrastructure
745#
717# CONFIG_MMC is not set 746# CONFIG_MMC is not set
718# CONFIG_MEMSTICK is not set 747# CONFIG_MEMSTICK is not set
719# CONFIG_NEW_LEDS is not set 748# CONFIG_NEW_LEDS is not set
720# CONFIG_ACCESSIBILITY is not set 749# CONFIG_ACCESSIBILITY is not set
721# CONFIG_RTC_CLASS is not set 750# CONFIG_RTC_CLASS is not set
722# CONFIG_DMADEVICES is not set 751# CONFIG_DMADEVICES is not set
752# CONFIG_AUXDISPLAY is not set
723# CONFIG_UIO is not set 753# CONFIG_UIO is not set
724# CONFIG_STAGING is not set 754# CONFIG_STAGING is not set
725 755
@@ -735,6 +765,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
735CONFIG_FILE_LOCKING=y 765CONFIG_FILE_LOCKING=y
736# CONFIG_XFS_FS is not set 766# CONFIG_XFS_FS is not set
737# CONFIG_OCFS2_FS is not set 767# CONFIG_OCFS2_FS is not set
768# CONFIG_BTRFS_FS is not set
738CONFIG_DNOTIFY=y 769CONFIG_DNOTIFY=y
739CONFIG_INOTIFY=y 770CONFIG_INOTIFY=y
740CONFIG_INOTIFY_USER=y 771CONFIG_INOTIFY_USER=y
@@ -789,6 +820,7 @@ CONFIG_JFFS2_ZLIB=y
789CONFIG_JFFS2_RTIME=y 820CONFIG_JFFS2_RTIME=y
790# CONFIG_JFFS2_RUBIN is not set 821# CONFIG_JFFS2_RUBIN is not set
791# CONFIG_CRAMFS is not set 822# CONFIG_CRAMFS is not set
823# CONFIG_SQUASHFS is not set
792# CONFIG_VXFS_FS is not set 824# CONFIG_VXFS_FS is not set
793# CONFIG_MINIX_FS is not set 825# CONFIG_MINIX_FS is not set
794# CONFIG_OMFS_FS is not set 826# CONFIG_OMFS_FS is not set
@@ -806,7 +838,6 @@ CONFIG_ROOT_NFS=y
806CONFIG_LOCKD=y 838CONFIG_LOCKD=y
807CONFIG_NFS_COMMON=y 839CONFIG_NFS_COMMON=y
808CONFIG_SUNRPC=y 840CONFIG_SUNRPC=y
809# CONFIG_SUNRPC_REGISTER_V4 is not set
810# CONFIG_RPCSEC_GSS_KRB5 is not set 841# CONFIG_RPCSEC_GSS_KRB5 is not set
811# CONFIG_RPCSEC_GSS_SPKM3 is not set 842# CONFIG_RPCSEC_GSS_SPKM3 is not set
812# CONFIG_SMB_FS is not set 843# CONFIG_SMB_FS is not set
@@ -859,7 +890,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
859# 890#
860# Tracers 891# Tracers
861# 892#
862# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
863# CONFIG_SAMPLES is not set 893# CONFIG_SAMPLES is not set
864CONFIG_HAVE_ARCH_KGDB=y 894CONFIG_HAVE_ARCH_KGDB=y
865# CONFIG_SH_STANDARD_BIOS is not set 895# CONFIG_SH_STANDARD_BIOS is not set
@@ -951,6 +981,7 @@ CONFIG_CRYPTO=y
951# Compression 981# Compression
952# 982#
953# CONFIG_CRYPTO_DEFLATE is not set 983# CONFIG_CRYPTO_DEFLATE is not set
984# CONFIG_CRYPTO_ZLIB is not set
954# CONFIG_CRYPTO_LZO is not set 985# CONFIG_CRYPTO_LZO is not set
955 986
956# 987#
@@ -973,7 +1004,7 @@ CONFIG_CRC32=y
973# CONFIG_LIBCRC32C is not set 1004# CONFIG_LIBCRC32C is not set
974CONFIG_ZLIB_INFLATE=y 1005CONFIG_ZLIB_INFLATE=y
975CONFIG_ZLIB_DEFLATE=y 1006CONFIG_ZLIB_DEFLATE=y
976CONFIG_PLIST=y
977CONFIG_HAS_IOMEM=y 1007CONFIG_HAS_IOMEM=y
978CONFIG_HAS_IOPORT=y 1008CONFIG_HAS_IOPORT=y
979CONFIG_HAS_DMA=y 1009CONFIG_HAS_DMA=y
1010CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig
index f54ae056f177..67fc26b3a7d0 100644
--- a/arch/sh/configs/se7751_defconfig
+++ b/arch/sh/configs/se7751_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:51:47 2009 4# Thu Apr 2 18:59:59 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -42,18 +43,32 @@ CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set 43# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45# CONFIG_IKCONFIG is not set 55# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48# CONFIG_GROUP_SCHED is not set 57# CONFIG_GROUP_SCHED is not set
58# CONFIG_CGROUPS is not set
49CONFIG_SYSFS_DEPRECATED=y 59CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y 60CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set 61# CONFIG_RELAY is not set
52# CONFIG_NAMESPACES is not set 62# CONFIG_NAMESPACES is not set
53CONFIG_BLK_DEV_INITRD=y 63CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE="" 64CONFIG_INITRAMFS_SOURCE=""
65CONFIG_RD_GZIP=y
66# CONFIG_RD_BZIP2 is not set
67# CONFIG_RD_LZMA is not set
68CONFIG_INITRAMFS_COMPRESSION_NONE=y
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y 70CONFIG_SYSCTL=y
71CONFIG_ANON_INODES=y
57CONFIG_EMBEDDED=y 72CONFIG_EMBEDDED=y
58CONFIG_UID16=y 73CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set 74# CONFIG_SYSCTL_SYSCALL is not set
@@ -63,10 +78,8 @@ CONFIG_KALLSYMS=y
63CONFIG_PRINTK=y 78CONFIG_PRINTK=y
64CONFIG_BUG=y 79CONFIG_BUG=y
65CONFIG_ELF_CORE=y 80CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y 82CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y 83CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y 84CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y 85CONFIG_TIMERFD=y
@@ -74,6 +87,7 @@ CONFIG_EVENTFD=y
74CONFIG_SHMEM=y 87CONFIG_SHMEM=y
75CONFIG_AIO=y 88CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y 89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 91CONFIG_SLAB=y
78# CONFIG_SLUB is not set 92# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 93# CONFIG_SLOB is not set
@@ -112,11 +126,6 @@ CONFIG_DEFAULT_AS=y
112# CONFIG_DEFAULT_CFQ is not set 126# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set 127# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory" 128CONFIG_DEFAULT_IOSCHED="anticipatory"
115CONFIG_CLASSIC_RCU=y
116# CONFIG_TREE_RCU is not set
117# CONFIG_PREEMPT_RCU is not set
118# CONFIG_TREE_RCU_TRACE is not set
119# CONFIG_PREEMPT_RCU_TRACE is not set
120# CONFIG_FREEZER is not set 129# CONFIG_FREEZER is not set
121 130
122# 131#
@@ -151,6 +160,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
151# CONFIG_CPU_SUBTYPE_SH7770 is not set 160# CONFIG_CPU_SUBTYPE_SH7770 is not set
152# CONFIG_CPU_SUBTYPE_SH7780 is not set 161# CONFIG_CPU_SUBTYPE_SH7780 is not set
153# CONFIG_CPU_SUBTYPE_SH7785 is not set 162# CONFIG_CPU_SUBTYPE_SH7785 is not set
163# CONFIG_CPU_SUBTYPE_SH7786 is not set
154# CONFIG_CPU_SUBTYPE_SHX3 is not set 164# CONFIG_CPU_SUBTYPE_SHX3 is not set
155# CONFIG_CPU_SUBTYPE_SH7343 is not set 165# CONFIG_CPU_SUBTYPE_SH7343 is not set
156# CONFIG_CPU_SUBTYPE_SH7722 is not set 166# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -192,11 +202,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
192CONFIG_ZONE_DMA_FLAG=0 202CONFIG_ZONE_DMA_FLAG=0
193CONFIG_NR_QUICK=2 203CONFIG_NR_QUICK=2
194CONFIG_UNEVICTABLE_LRU=y 204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y
195 207
196# 208#
197# Cache configuration 209# Cache configuration
198# 210#
199# CONFIG_SH_DIRECT_MAPPED is not set
200CONFIG_CACHE_WRITEBACK=y 211CONFIG_CACHE_WRITEBACK=y
201# CONFIG_CACHE_WRITETHROUGH is not set 212# CONFIG_CACHE_WRITETHROUGH is not set
202# CONFIG_CACHE_OFF is not set 213# CONFIG_CACHE_OFF is not set
@@ -301,7 +312,6 @@ CONFIG_NET=y
301# 312#
302# Networking options 313# Networking options
303# 314#
304CONFIG_COMPAT_NET_DEV_OPS=y
305CONFIG_PACKET=y 315CONFIG_PACKET=y
306# CONFIG_PACKET_MMAP is not set 316# CONFIG_PACKET_MMAP is not set
307CONFIG_UNIX=y 317CONFIG_UNIX=y
@@ -376,6 +386,7 @@ CONFIG_IP_NF_QUEUE=y
376# CONFIG_LAPB is not set 386# CONFIG_LAPB is not set
377# CONFIG_ECONET is not set 387# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 388# CONFIG_WAN_ROUTER is not set
389# CONFIG_PHONET is not set
379# CONFIG_NET_SCHED is not set 390# CONFIG_NET_SCHED is not set
380# CONFIG_DCB is not set 391# CONFIG_DCB is not set
381 392
@@ -388,13 +399,13 @@ CONFIG_IP_NF_QUEUE=y
388# CONFIG_IRDA is not set 399# CONFIG_IRDA is not set
389# CONFIG_BT is not set 400# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set 401# CONFIG_AF_RXRPC is not set
391# CONFIG_PHONET is not set
392CONFIG_WIRELESS=y 402CONFIG_WIRELESS=y
393# CONFIG_CFG80211 is not set 403# CONFIG_CFG80211 is not set
394# CONFIG_WIRELESS_OLD_REGULATORY is not set 404# CONFIG_WIRELESS_OLD_REGULATORY is not set
395# CONFIG_WIRELESS_EXT is not set 405# CONFIG_WIRELESS_EXT is not set
396# CONFIG_LIB80211 is not set 406# CONFIG_LIB80211 is not set
397# CONFIG_MAC80211 is not set 407# CONFIG_MAC80211 is not set
408# CONFIG_WIMAX is not set
398# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
399# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
400 411
@@ -413,6 +424,7 @@ CONFIG_MTD=y
413# CONFIG_MTD_DEBUG is not set 424# CONFIG_MTD_DEBUG is not set
414# CONFIG_MTD_CONCAT is not set 425# CONFIG_MTD_CONCAT is not set
415CONFIG_MTD_PARTITIONS=y 426CONFIG_MTD_PARTITIONS=y
427# CONFIG_MTD_TESTS is not set
416# CONFIG_MTD_REDBOOT_PARTS is not set 428# CONFIG_MTD_REDBOOT_PARTS is not set
417# CONFIG_MTD_CMDLINE_PARTS is not set 429# CONFIG_MTD_CMDLINE_PARTS is not set
418# CONFIG_MTD_AR7_PARTS is not set 430# CONFIG_MTD_AR7_PARTS is not set
@@ -480,6 +492,11 @@ CONFIG_MTD_RAM=y
480# CONFIG_MTD_ONENAND is not set 492# CONFIG_MTD_ONENAND is not set
481 493
482# 494#
495# LPDDR flash memory drivers
496#
497# CONFIG_MTD_LPDDR is not set
498
499#
483# UBI - Unsorted block images 500# UBI - Unsorted block images
484# 501#
485# CONFIG_MTD_UBI is not set 502# CONFIG_MTD_UBI is not set
@@ -496,9 +513,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
496# CONFIG_ATA_OVER_ETH is not set 513# CONFIG_ATA_OVER_ETH is not set
497# CONFIG_BLK_DEV_HD is not set 514# CONFIG_BLK_DEV_HD is not set
498CONFIG_MISC_DEVICES=y 515CONFIG_MISC_DEVICES=y
499# CONFIG_EEPROM_93CX6 is not set
500# CONFIG_ENCLOSURE_SERVICES is not set 516# CONFIG_ENCLOSURE_SERVICES is not set
501# CONFIG_C2PORT is not set 517# CONFIG_C2PORT is not set
518
519#
520# EEPROM support
521#
522# CONFIG_EEPROM_93CX6 is not set
502CONFIG_HAVE_IDE=y 523CONFIG_HAVE_IDE=y
503# CONFIG_IDE is not set 524# CONFIG_IDE is not set
504 525
@@ -512,6 +533,7 @@ CONFIG_HAVE_IDE=y
512# CONFIG_ATA is not set 533# CONFIG_ATA is not set
513# CONFIG_MD is not set 534# CONFIG_MD is not set
514CONFIG_NETDEVICES=y 535CONFIG_NETDEVICES=y
536CONFIG_COMPAT_NET_DEV_OPS=y
515# CONFIG_DUMMY is not set 537# CONFIG_DUMMY is not set
516# CONFIG_BONDING is not set 538# CONFIG_BONDING is not set
517# CONFIG_MACVLAN is not set 539# CONFIG_MACVLAN is not set
@@ -524,8 +546,10 @@ CONFIG_MII=y
524# CONFIG_AX88796 is not set 546# CONFIG_AX88796 is not set
525# CONFIG_STNIC is not set 547# CONFIG_STNIC is not set
526# CONFIG_SMC91X is not set 548# CONFIG_SMC91X is not set
549# CONFIG_ETHOC is not set
527# CONFIG_SMC911X is not set 550# CONFIG_SMC911X is not set
528# CONFIG_SMSC911X is not set 551# CONFIG_SMSC911X is not set
552# CONFIG_DNET is not set
529# CONFIG_IBM_NEW_EMAC_ZMII is not set 553# CONFIG_IBM_NEW_EMAC_ZMII is not set
530# CONFIG_IBM_NEW_EMAC_RGMII is not set 554# CONFIG_IBM_NEW_EMAC_RGMII is not set
531# CONFIG_IBM_NEW_EMAC_TAH is not set 555# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -542,7 +566,10 @@ CONFIG_NETDEV_10000=y
542# 566#
543# CONFIG_WLAN_PRE80211 is not set 567# CONFIG_WLAN_PRE80211 is not set
544# CONFIG_WLAN_80211 is not set 568# CONFIG_WLAN_80211 is not set
545# CONFIG_IWLWIFI_LEDS is not set 569
570#
571# Enable WiMAX (Networking options) to see the WiMAX drivers
572#
546# CONFIG_WAN is not set 573# CONFIG_WAN is not set
547# CONFIG_PPP is not set 574# CONFIG_PPP is not set
548# CONFIG_SLIP is not set 575# CONFIG_SLIP is not set
@@ -585,6 +612,7 @@ CONFIG_LEGACY_PTYS=y
585CONFIG_LEGACY_PTY_COUNT=256 612CONFIG_LEGACY_PTY_COUNT=256
586# CONFIG_IPMI_HANDLER is not set 613# CONFIG_IPMI_HANDLER is not set
587CONFIG_HW_RANDOM=y 614CONFIG_HW_RANDOM=y
615# CONFIG_HW_RANDOM_TIMERIOMEM is not set
588# CONFIG_R3964 is not set 616# CONFIG_R3964 is not set
589# CONFIG_RAW_DRIVER is not set 617# CONFIG_RAW_DRIVER is not set
590# CONFIG_TCG_TPM is not set 618# CONFIG_TCG_TPM is not set
@@ -673,15 +701,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
673# 701#
674 702
675# 703#
676# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 704# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
677# 705#
678# CONFIG_USB_GADGET is not set 706# CONFIG_USB_GADGET is not set
707
708#
709# OTG and related infrastructure
710#
679# CONFIG_MMC is not set 711# CONFIG_MMC is not set
680# CONFIG_MEMSTICK is not set 712# CONFIG_MEMSTICK is not set
681# CONFIG_NEW_LEDS is not set 713# CONFIG_NEW_LEDS is not set
682# CONFIG_ACCESSIBILITY is not set 714# CONFIG_ACCESSIBILITY is not set
683# CONFIG_RTC_CLASS is not set 715# CONFIG_RTC_CLASS is not set
684# CONFIG_DMADEVICES is not set 716# CONFIG_DMADEVICES is not set
717# CONFIG_AUXDISPLAY is not set
685# CONFIG_UIO is not set 718# CONFIG_UIO is not set
686# CONFIG_STAGING is not set 719# CONFIG_STAGING is not set
687 720
@@ -699,6 +732,7 @@ CONFIG_EXT2_FS=y
699CONFIG_FILE_LOCKING=y 732CONFIG_FILE_LOCKING=y
700# CONFIG_XFS_FS is not set 733# CONFIG_XFS_FS is not set
701# CONFIG_OCFS2_FS is not set 734# CONFIG_OCFS2_FS is not set
735# CONFIG_BTRFS_FS is not set
702CONFIG_DNOTIFY=y 736CONFIG_DNOTIFY=y
703CONFIG_INOTIFY=y 737CONFIG_INOTIFY=y
704CONFIG_INOTIFY_USER=y 738CONFIG_INOTIFY_USER=y
@@ -753,6 +787,7 @@ CONFIG_JFFS2_ZLIB=y
753CONFIG_JFFS2_RTIME=y 787CONFIG_JFFS2_RTIME=y
754# CONFIG_JFFS2_RUBIN is not set 788# CONFIG_JFFS2_RUBIN is not set
755# CONFIG_CRAMFS is not set 789# CONFIG_CRAMFS is not set
790# CONFIG_SQUASHFS is not set
756# CONFIG_VXFS_FS is not set 791# CONFIG_VXFS_FS is not set
757# CONFIG_MINIX_FS is not set 792# CONFIG_MINIX_FS is not set
758# CONFIG_OMFS_FS is not set 793# CONFIG_OMFS_FS is not set
@@ -802,7 +837,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
802# 837#
803# Tracers 838# Tracers
804# 839#
805# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
806# CONFIG_SAMPLES is not set 840# CONFIG_SAMPLES is not set
807CONFIG_HAVE_ARCH_KGDB=y 841CONFIG_HAVE_ARCH_KGDB=y
808# CONFIG_SH_STANDARD_BIOS is not set 842# CONFIG_SH_STANDARD_BIOS is not set
@@ -894,6 +928,7 @@ CONFIG_CRYPTO=y
894# Compression 928# Compression
895# 929#
896# CONFIG_CRYPTO_DEFLATE is not set 930# CONFIG_CRYPTO_DEFLATE is not set
931# CONFIG_CRYPTO_ZLIB is not set
897# CONFIG_CRYPTO_LZO is not set 932# CONFIG_CRYPTO_LZO is not set
898 933
899# 934#
@@ -916,7 +951,8 @@ CONFIG_CRC32=y
916# CONFIG_LIBCRC32C is not set 951# CONFIG_LIBCRC32C is not set
917CONFIG_ZLIB_INFLATE=y 952CONFIG_ZLIB_INFLATE=y
918CONFIG_ZLIB_DEFLATE=y 953CONFIG_ZLIB_DEFLATE=y
919CONFIG_PLIST=y 954CONFIG_DECOMPRESS_GZIP=y
920CONFIG_HAS_IOMEM=y 955CONFIG_HAS_IOMEM=y
921CONFIG_HAS_IOPORT=y 956CONFIG_HAS_IOPORT=y
922CONFIG_HAS_DMA=y 957CONFIG_HAS_DMA=y
958CONFIG_NLATTR=y
diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
index 7504978e8747..ebce23cc2ad8 100644
--- a/arch/sh/configs/se7780_defconfig
+++ b/arch/sh/configs/se7780_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:53:50 2009 4# Thu Apr 2 19:02:05 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -41,6 +42,15 @@ CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44CONFIG_IKCONFIG=y 54CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 55CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
@@ -52,6 +62,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_BLK_DEV_INITRD is not set 62# CONFIG_BLK_DEV_INITRD is not set
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y 63CONFIG_CC_OPTIMIZE_FOR_SIZE=y
54CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
65CONFIG_ANON_INODES=y
55CONFIG_EMBEDDED=y 66CONFIG_EMBEDDED=y
56CONFIG_UID16=y 67CONFIG_UID16=y
57CONFIG_SYSCTL_SYSCALL=y 68CONFIG_SYSCTL_SYSCALL=y
@@ -60,10 +71,8 @@ CONFIG_SYSCTL_SYSCALL=y
60CONFIG_PRINTK=y 71CONFIG_PRINTK=y
61CONFIG_BUG=y 72CONFIG_BUG=y
62CONFIG_ELF_CORE=y 73CONFIG_ELF_CORE=y
63CONFIG_COMPAT_BRK=y
64CONFIG_BASE_FULL=y 74CONFIG_BASE_FULL=y
65CONFIG_FUTEX=y 75CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
67# CONFIG_EPOLL is not set 76# CONFIG_EPOLL is not set
68CONFIG_SIGNALFD=y 77CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y 78CONFIG_TIMERFD=y
@@ -72,6 +81,7 @@ CONFIG_SHMEM=y
72CONFIG_AIO=y 81CONFIG_AIO=y
73CONFIG_VM_EVENT_COUNTERS=y 82CONFIG_VM_EVENT_COUNTERS=y
74CONFIG_PCI_QUIRKS=y 83CONFIG_PCI_QUIRKS=y
84CONFIG_COMPAT_BRK=y
75CONFIG_SLAB=y 85CONFIG_SLAB=y
76# CONFIG_SLUB is not set 86# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set 87# CONFIG_SLOB is not set
@@ -108,11 +118,6 @@ CONFIG_DEFAULT_DEADLINE=y
108# CONFIG_DEFAULT_CFQ is not set 118# CONFIG_DEFAULT_CFQ is not set
109# CONFIG_DEFAULT_NOOP is not set 119# CONFIG_DEFAULT_NOOP is not set
110CONFIG_DEFAULT_IOSCHED="deadline" 120CONFIG_DEFAULT_IOSCHED="deadline"
111CONFIG_CLASSIC_RCU=y
112# CONFIG_TREE_RCU is not set
113# CONFIG_PREEMPT_RCU is not set
114# CONFIG_TREE_RCU_TRACE is not set
115# CONFIG_PREEMPT_RCU_TRACE is not set
116# CONFIG_FREEZER is not set 121# CONFIG_FREEZER is not set
117 122
118# 123#
@@ -148,6 +153,7 @@ CONFIG_CPU_SH4A=y
148# CONFIG_CPU_SUBTYPE_SH7770 is not set 153# CONFIG_CPU_SUBTYPE_SH7770 is not set
149CONFIG_CPU_SUBTYPE_SH7780=y 154CONFIG_CPU_SUBTYPE_SH7780=y
150# CONFIG_CPU_SUBTYPE_SH7785 is not set 155# CONFIG_CPU_SUBTYPE_SH7785 is not set
156# CONFIG_CPU_SUBTYPE_SH7786 is not set
151# CONFIG_CPU_SUBTYPE_SHX3 is not set 157# CONFIG_CPU_SUBTYPE_SHX3 is not set
152# CONFIG_CPU_SUBTYPE_SH7343 is not set 158# CONFIG_CPU_SUBTYPE_SH7343 is not set
153# CONFIG_CPU_SUBTYPE_SH7722 is not set 159# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -192,11 +198,12 @@ CONFIG_MIGRATION=y
192CONFIG_ZONE_DMA_FLAG=0 198CONFIG_ZONE_DMA_FLAG=0
193CONFIG_NR_QUICK=2 199CONFIG_NR_QUICK=2
194CONFIG_UNEVICTABLE_LRU=y 200CONFIG_UNEVICTABLE_LRU=y
201CONFIG_HAVE_MLOCK=y
202CONFIG_HAVE_MLOCKED_PAGE_BIT=y
195 203
196# 204#
197# Cache configuration 205# Cache configuration
198# 206#
199# CONFIG_SH_DIRECT_MAPPED is not set
200CONFIG_CACHE_WRITEBACK=y 207CONFIG_CACHE_WRITEBACK=y
201# CONFIG_CACHE_WRITETHROUGH is not set 208# CONFIG_CACHE_WRITETHROUGH is not set
202# CONFIG_CACHE_OFF is not set 209# CONFIG_CACHE_OFF is not set
@@ -283,6 +290,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
283# CONFIG_PCIEPORTBUS is not set 290# CONFIG_PCIEPORTBUS is not set
284# CONFIG_ARCH_SUPPORTS_MSI is not set 291# CONFIG_ARCH_SUPPORTS_MSI is not set
285CONFIG_PCI_LEGACY=y 292CONFIG_PCI_LEGACY=y
293# CONFIG_PCI_STUB is not set
294# CONFIG_PCI_IOV is not set
286 295
287# 296#
288# Executable file formats 297# Executable file formats
@@ -296,7 +305,6 @@ CONFIG_NET=y
296# 305#
297# Networking options 306# Networking options
298# 307#
299CONFIG_COMPAT_NET_DEV_OPS=y
300CONFIG_PACKET=y 308CONFIG_PACKET=y
301# CONFIG_PACKET_MMAP is not set 309# CONFIG_PACKET_MMAP is not set
302CONFIG_UNIX=y 310CONFIG_UNIX=y
@@ -351,6 +359,7 @@ CONFIG_IPV6=y
351# CONFIG_LLC2 is not set 359# CONFIG_LLC2 is not set
352# CONFIG_IPX is not set 360# CONFIG_IPX is not set
353# CONFIG_ATALK is not set 361# CONFIG_ATALK is not set
362# CONFIG_PHONET is not set
354# CONFIG_NET_SCHED is not set 363# CONFIG_NET_SCHED is not set
355# CONFIG_DCB is not set 364# CONFIG_DCB is not set
356 365
@@ -362,13 +371,13 @@ CONFIG_IPV6=y
362# CONFIG_CAN is not set 371# CONFIG_CAN is not set
363# CONFIG_IRDA is not set 372# CONFIG_IRDA is not set
364# CONFIG_BT is not set 373# CONFIG_BT is not set
365# CONFIG_PHONET is not set
366CONFIG_WIRELESS=y 374CONFIG_WIRELESS=y
367# CONFIG_CFG80211 is not set 375# CONFIG_CFG80211 is not set
368# CONFIG_WIRELESS_OLD_REGULATORY is not set 376# CONFIG_WIRELESS_OLD_REGULATORY is not set
369# CONFIG_WIRELESS_EXT is not set 377# CONFIG_WIRELESS_EXT is not set
370# CONFIG_LIB80211 is not set 378# CONFIG_LIB80211 is not set
371# CONFIG_MAC80211 is not set 379# CONFIG_MAC80211 is not set
380# CONFIG_WIMAX is not set
372# CONFIG_RFKILL is not set 381# CONFIG_RFKILL is not set
373 382
374# 383#
@@ -386,6 +395,7 @@ CONFIG_MTD=y
386# CONFIG_MTD_DEBUG is not set 395# CONFIG_MTD_DEBUG is not set
387# CONFIG_MTD_CONCAT is not set 396# CONFIG_MTD_CONCAT is not set
388CONFIG_MTD_PARTITIONS=y 397CONFIG_MTD_PARTITIONS=y
398# CONFIG_MTD_TESTS is not set
389# CONFIG_MTD_REDBOOT_PARTS is not set 399# CONFIG_MTD_REDBOOT_PARTS is not set
390# CONFIG_MTD_CMDLINE_PARTS is not set 400# CONFIG_MTD_CMDLINE_PARTS is not set
391# CONFIG_MTD_AR7_PARTS is not set 401# CONFIG_MTD_AR7_PARTS is not set
@@ -460,6 +470,11 @@ CONFIG_MTD_ROM=y
460# CONFIG_MTD_ONENAND is not set 470# CONFIG_MTD_ONENAND is not set
461 471
462# 472#
473# LPDDR flash memory drivers
474#
475# CONFIG_MTD_LPDDR is not set
476
477#
463# UBI - Unsorted block images 478# UBI - Unsorted block images
464# 479#
465# CONFIG_MTD_UBI is not set 480# CONFIG_MTD_UBI is not set
@@ -479,10 +494,14 @@ CONFIG_BLK_DEV_LOOP=y
479# CONFIG_BLK_DEV_HD is not set 494# CONFIG_BLK_DEV_HD is not set
480CONFIG_MISC_DEVICES=y 495CONFIG_MISC_DEVICES=y
481# CONFIG_PHANTOM is not set 496# CONFIG_PHANTOM is not set
482# CONFIG_EEPROM_93CX6 is not set
483# CONFIG_SGI_IOC4 is not set 497# CONFIG_SGI_IOC4 is not set
484# CONFIG_ENCLOSURE_SERVICES is not set 498# CONFIG_ENCLOSURE_SERVICES is not set
485# CONFIG_HP_ILO is not set 499# CONFIG_HP_ILO is not set
500
501#
502# EEPROM support
503#
504# CONFIG_EEPROM_93CX6 is not set
486CONFIG_HAVE_IDE=y 505CONFIG_HAVE_IDE=y
487# CONFIG_IDE is not set 506# CONFIG_IDE is not set
488 507
@@ -536,6 +555,7 @@ CONFIG_SCSI_LOWLEVEL=y
536# CONFIG_MEGARAID_NEWGEN is not set 555# CONFIG_MEGARAID_NEWGEN is not set
537# CONFIG_MEGARAID_LEGACY is not set 556# CONFIG_MEGARAID_LEGACY is not set
538# CONFIG_MEGARAID_SAS is not set 557# CONFIG_MEGARAID_SAS is not set
558# CONFIG_SCSI_MPT2SAS is not set
539# CONFIG_SCSI_HPTIOP is not set 559# CONFIG_SCSI_HPTIOP is not set
540# CONFIG_LIBFC is not set 560# CONFIG_LIBFC is not set
541# CONFIG_FCOE is not set 561# CONFIG_FCOE is not set
@@ -557,6 +577,7 @@ CONFIG_SCSI_LOWLEVEL=y
557# CONFIG_SCSI_DEBUG is not set 577# CONFIG_SCSI_DEBUG is not set
558# CONFIG_SCSI_SRP is not set 578# CONFIG_SCSI_SRP is not set
559# CONFIG_SCSI_DH is not set 579# CONFIG_SCSI_DH is not set
580# CONFIG_SCSI_OSD_INITIATOR is not set
560CONFIG_ATA=y 581CONFIG_ATA=y
561# CONFIG_ATA_NONSTANDARD is not set 582# CONFIG_ATA_NONSTANDARD is not set
562CONFIG_SATA_PMP=y 583CONFIG_SATA_PMP=y
@@ -565,6 +586,7 @@ CONFIG_SATA_PMP=y
565CONFIG_ATA_SFF=y 586CONFIG_ATA_SFF=y
566# CONFIG_SATA_SVW is not set 587# CONFIG_SATA_SVW is not set
567# CONFIG_ATA_PIIX is not set 588# CONFIG_ATA_PIIX is not set
589# CONFIG_SATA_MV is not set
568# CONFIG_SATA_NV is not set 590# CONFIG_SATA_NV is not set
569# CONFIG_PDC_ADMA is not set 591# CONFIG_PDC_ADMA is not set
570# CONFIG_SATA_QSTOR is not set 592# CONFIG_SATA_QSTOR is not set
@@ -619,6 +641,7 @@ CONFIG_SATA_SIL=y
619# CONFIG_IEEE1394 is not set 641# CONFIG_IEEE1394 is not set
620# CONFIG_I2O is not set 642# CONFIG_I2O is not set
621CONFIG_NETDEVICES=y 643CONFIG_NETDEVICES=y
644CONFIG_COMPAT_NET_DEV_OPS=y
622# CONFIG_DUMMY is not set 645# CONFIG_DUMMY is not set
623# CONFIG_BONDING is not set 646# CONFIG_BONDING is not set
624# CONFIG_EQUALIZER is not set 647# CONFIG_EQUALIZER is not set
@@ -654,8 +677,10 @@ CONFIG_MII=y
654# CONFIG_CASSINI is not set 677# CONFIG_CASSINI is not set
655# CONFIG_NET_VENDOR_3COM is not set 678# CONFIG_NET_VENDOR_3COM is not set
656CONFIG_SMC91X=y 679CONFIG_SMC91X=y
680# CONFIG_ETHOC is not set
657# CONFIG_SMC911X is not set 681# CONFIG_SMC911X is not set
658# CONFIG_SMSC911X is not set 682# CONFIG_SMSC911X is not set
683# CONFIG_DNET is not set
659# CONFIG_NET_TULIP is not set 684# CONFIG_NET_TULIP is not set
660# CONFIG_HP100 is not set 685# CONFIG_HP100 is not set
661# CONFIG_IBM_NEW_EMAC_ZMII is not set 686# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -693,7 +718,10 @@ CONFIG_NET_PCI=y
693# 718#
694# CONFIG_WLAN_PRE80211 is not set 719# CONFIG_WLAN_PRE80211 is not set
695# CONFIG_WLAN_80211 is not set 720# CONFIG_WLAN_80211 is not set
696# CONFIG_IWLWIFI_LEDS is not set 721
722#
723# Enable WiMAX (Networking options) to see the WiMAX drivers
724#
697 725
698# 726#
699# USB Network Adapters 727# USB Network Adapters
@@ -885,6 +913,7 @@ CONFIG_FB_SH_MOBILE_LCDC=m
885# CONFIG_FB_VIRTUAL is not set 913# CONFIG_FB_VIRTUAL is not set
886# CONFIG_FB_METRONOME is not set 914# CONFIG_FB_METRONOME is not set
887# CONFIG_FB_MB862XX is not set 915# CONFIG_FB_MB862XX is not set
916# CONFIG_FB_BROADSHEET is not set
888# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 917# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
889 918
890# 919#
@@ -978,6 +1007,7 @@ CONFIG_USB_MON=y
978# CONFIG_USB_C67X00_HCD is not set 1007# CONFIG_USB_C67X00_HCD is not set
979CONFIG_USB_EHCI_HCD=y 1008CONFIG_USB_EHCI_HCD=y
980# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1009# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1010# CONFIG_USB_OXU210HP_HCD is not set
981# CONFIG_USB_ISP116X_HCD is not set 1011# CONFIG_USB_ISP116X_HCD is not set
982CONFIG_USB_OHCI_HCD=y 1012CONFIG_USB_OHCI_HCD=y
983# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1013# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -996,18 +1026,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
996# CONFIG_USB_TMC is not set 1026# CONFIG_USB_TMC is not set
997 1027
998# 1028#
999# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1029# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1000# 1030#
1001 1031
1002# 1032#
1003# see USB_STORAGE Help for more information 1033# also be needed; see USB_STORAGE Help for more info
1004# 1034#
1005CONFIG_USB_STORAGE=y 1035CONFIG_USB_STORAGE=y
1006# CONFIG_USB_STORAGE_DEBUG is not set 1036# CONFIG_USB_STORAGE_DEBUG is not set
1007# CONFIG_USB_STORAGE_DATAFAB is not set 1037# CONFIG_USB_STORAGE_DATAFAB is not set
1008# CONFIG_USB_STORAGE_FREECOM is not set 1038# CONFIG_USB_STORAGE_FREECOM is not set
1009# CONFIG_USB_STORAGE_ISD200 is not set 1039# CONFIG_USB_STORAGE_ISD200 is not set
1010# CONFIG_USB_STORAGE_DPCM is not set
1011# CONFIG_USB_STORAGE_USBAT is not set 1040# CONFIG_USB_STORAGE_USBAT is not set
1012# CONFIG_USB_STORAGE_SDDR09 is not set 1041# CONFIG_USB_STORAGE_SDDR09 is not set
1013# CONFIG_USB_STORAGE_SDDR55 is not set 1042# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1043,7 +1072,6 @@ CONFIG_USB_STORAGE=y
1043# CONFIG_USB_LED is not set 1072# CONFIG_USB_LED is not set
1044# CONFIG_USB_CYPRESS_CY7C63 is not set 1073# CONFIG_USB_CYPRESS_CY7C63 is not set
1045# CONFIG_USB_CYTHERM is not set 1074# CONFIG_USB_CYTHERM is not set
1046# CONFIG_USB_PHIDGET is not set
1047# CONFIG_USB_IDMOUSE is not set 1075# CONFIG_USB_IDMOUSE is not set
1048# CONFIG_USB_FTDI_ELAN is not set 1076# CONFIG_USB_FTDI_ELAN is not set
1049# CONFIG_USB_APPLEDISPLAY is not set 1077# CONFIG_USB_APPLEDISPLAY is not set
@@ -1055,6 +1083,11 @@ CONFIG_USB_STORAGE=y
1055# CONFIG_USB_ISIGHTFW is not set 1083# CONFIG_USB_ISIGHTFW is not set
1056# CONFIG_USB_VST is not set 1084# CONFIG_USB_VST is not set
1057# CONFIG_USB_GADGET is not set 1085# CONFIG_USB_GADGET is not set
1086
1087#
1088# OTG and related infrastructure
1089#
1090# CONFIG_NOP_USB_XCEIV is not set
1058# CONFIG_MMC is not set 1091# CONFIG_MMC is not set
1059# CONFIG_MEMSTICK is not set 1092# CONFIG_MEMSTICK is not set
1060# CONFIG_NEW_LEDS is not set 1093# CONFIG_NEW_LEDS is not set
@@ -1062,6 +1095,7 @@ CONFIG_USB_STORAGE=y
1062# CONFIG_INFINIBAND is not set 1095# CONFIG_INFINIBAND is not set
1063# CONFIG_RTC_CLASS is not set 1096# CONFIG_RTC_CLASS is not set
1064# CONFIG_DMADEVICES is not set 1097# CONFIG_DMADEVICES is not set
1098# CONFIG_AUXDISPLAY is not set
1065# CONFIG_UIO is not set 1099# CONFIG_UIO is not set
1066# CONFIG_STAGING is not set 1100# CONFIG_STAGING is not set
1067 1101
@@ -1120,6 +1154,7 @@ CONFIG_MISC_FILESYSTEMS=y
1120# CONFIG_HFSPLUS_FS is not set 1154# CONFIG_HFSPLUS_FS is not set
1121# CONFIG_JFFS2_FS is not set 1155# CONFIG_JFFS2_FS is not set
1122CONFIG_CRAMFS=y 1156CONFIG_CRAMFS=y
1157# CONFIG_SQUASHFS is not set
1123# CONFIG_VXFS_FS is not set 1158# CONFIG_VXFS_FS is not set
1124# CONFIG_MINIX_FS is not set 1159# CONFIG_MINIX_FS is not set
1125# CONFIG_OMFS_FS is not set 1160# CONFIG_OMFS_FS is not set
@@ -1214,7 +1249,7 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1214# 1249#
1215# Tracers 1250# Tracers
1216# 1251#
1217# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1252# CONFIG_DYNAMIC_DEBUG is not set
1218# CONFIG_SAMPLES is not set 1253# CONFIG_SAMPLES is not set
1219CONFIG_HAVE_ARCH_KGDB=y 1254CONFIG_HAVE_ARCH_KGDB=y
1220# CONFIG_SH_STANDARD_BIOS is not set 1255# CONFIG_SH_STANDARD_BIOS is not set
@@ -1301,6 +1336,7 @@ CONFIG_CRYPTO=y
1301# Compression 1336# Compression
1302# 1337#
1303# CONFIG_CRYPTO_DEFLATE is not set 1338# CONFIG_CRYPTO_DEFLATE is not set
1339# CONFIG_CRYPTO_ZLIB is not set
1304# CONFIG_CRYPTO_LZO is not set 1340# CONFIG_CRYPTO_LZO is not set
1305 1341
1306# 1342#
@@ -1323,7 +1359,7 @@ CONFIG_CRC32=y
1323# CONFIG_CRC7 is not set 1359# CONFIG_CRC7 is not set
1324# CONFIG_LIBCRC32C is not set 1360# CONFIG_LIBCRC32C is not set
1325CONFIG_ZLIB_INFLATE=y 1361CONFIG_ZLIB_INFLATE=y
1326CONFIG_PLIST=y
1327CONFIG_HAS_IOMEM=y 1362CONFIG_HAS_IOMEM=y
1328CONFIG_HAS_IOPORT=y 1363CONFIG_HAS_IOPORT=y
1329CONFIG_HAS_DMA=y 1364CONFIG_HAS_DMA=y
1365CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig
index 04bde1e96965..6fcdb090cf32 100644
--- a/arch/sh/configs/sh03_defconfig
+++ b/arch/sh/configs/sh03_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 17:56:46 2009 4# Thu Apr 2 19:04:59 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -44,18 +45,32 @@ CONFIG_BSD_PROCESS_ACCT=y
44# CONFIG_BSD_PROCESS_ACCT_V3 is not set 45# CONFIG_BSD_PROCESS_ACCT_V3 is not set
45# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
47# CONFIG_IKCONFIG is not set 57# CONFIG_IKCONFIG is not set
48CONFIG_LOG_BUF_SHIFT=14 58CONFIG_LOG_BUF_SHIFT=14
49# CONFIG_CGROUPS is not set
50# CONFIG_GROUP_SCHED is not set 59# CONFIG_GROUP_SCHED is not set
60# CONFIG_CGROUPS is not set
51CONFIG_SYSFS_DEPRECATED=y 61CONFIG_SYSFS_DEPRECATED=y
52CONFIG_SYSFS_DEPRECATED_V2=y 62CONFIG_SYSFS_DEPRECATED_V2=y
53# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
54# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
55CONFIG_BLK_DEV_INITRD=y 65CONFIG_BLK_DEV_INITRD=y
56CONFIG_INITRAMFS_SOURCE="" 66CONFIG_INITRAMFS_SOURCE=""
67CONFIG_RD_GZIP=y
68# CONFIG_RD_BZIP2 is not set
69# CONFIG_RD_LZMA is not set
70CONFIG_INITRAMFS_COMPRESSION_NONE=y
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 71CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 74CONFIG_EMBEDDED=y
60CONFIG_UID16=y 75CONFIG_UID16=y
61# CONFIG_SYSCTL_SYSCALL is not set 76# CONFIG_SYSCTL_SYSCALL is not set
@@ -65,10 +80,8 @@ CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y 80CONFIG_PRINTK=y
66CONFIG_BUG=y 81CONFIG_BUG=y
67CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
68CONFIG_COMPAT_BRK=y
69CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
70CONFIG_FUTEX=y 84CONFIG_FUTEX=y
71CONFIG_ANON_INODES=y
72CONFIG_EPOLL=y 85CONFIG_EPOLL=y
73CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -77,6 +90,7 @@ CONFIG_SHMEM=y
77CONFIG_AIO=y 90CONFIG_AIO=y
78CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
79CONFIG_PCI_QUIRKS=y 92CONFIG_PCI_QUIRKS=y
93CONFIG_COMPAT_BRK=y
80CONFIG_SLAB=y 94CONFIG_SLAB=y
81# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set 96# CONFIG_SLOB is not set
@@ -119,11 +133,6 @@ CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
120# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
121CONFIG_DEFAULT_IOSCHED="anticipatory" 135CONFIG_DEFAULT_IOSCHED="anticipatory"
122CONFIG_CLASSIC_RCU=y
123# CONFIG_TREE_RCU is not set
124# CONFIG_PREEMPT_RCU is not set
125# CONFIG_TREE_RCU_TRACE is not set
126# CONFIG_PREEMPT_RCU_TRACE is not set
127# CONFIG_FREEZER is not set 136# CONFIG_FREEZER is not set
128 137
129# 138#
@@ -158,6 +167,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
158# CONFIG_CPU_SUBTYPE_SH7770 is not set 167# CONFIG_CPU_SUBTYPE_SH7770 is not set
159# CONFIG_CPU_SUBTYPE_SH7780 is not set 168# CONFIG_CPU_SUBTYPE_SH7780 is not set
160# CONFIG_CPU_SUBTYPE_SH7785 is not set 169# CONFIG_CPU_SUBTYPE_SH7785 is not set
170# CONFIG_CPU_SUBTYPE_SH7786 is not set
161# CONFIG_CPU_SUBTYPE_SHX3 is not set 171# CONFIG_CPU_SUBTYPE_SHX3 is not set
162# CONFIG_CPU_SUBTYPE_SH7343 is not set 172# CONFIG_CPU_SUBTYPE_SH7343 is not set
163# CONFIG_CPU_SUBTYPE_SH7722 is not set 173# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -199,11 +209,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
199CONFIG_ZONE_DMA_FLAG=0 209CONFIG_ZONE_DMA_FLAG=0
200CONFIG_NR_QUICK=2 210CONFIG_NR_QUICK=2
201CONFIG_UNEVICTABLE_LRU=y 211CONFIG_UNEVICTABLE_LRU=y
212CONFIG_HAVE_MLOCK=y
213CONFIG_HAVE_MLOCKED_PAGE_BIT=y
202 214
203# 215#
204# Cache configuration 216# Cache configuration
205# 217#
206# CONFIG_SH_DIRECT_MAPPED is not set
207CONFIG_CACHE_WRITEBACK=y 218CONFIG_CACHE_WRITEBACK=y
208# CONFIG_CACHE_WRITETHROUGH is not set 219# CONFIG_CACHE_WRITETHROUGH is not set
209# CONFIG_CACHE_OFF is not set 220# CONFIG_CACHE_OFF is not set
@@ -294,6 +305,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
294# CONFIG_PCIEPORTBUS is not set 305# CONFIG_PCIEPORTBUS is not set
295# CONFIG_ARCH_SUPPORTS_MSI is not set 306# CONFIG_ARCH_SUPPORTS_MSI is not set
296CONFIG_PCI_LEGACY=y 307CONFIG_PCI_LEGACY=y
308# CONFIG_PCI_STUB is not set
309# CONFIG_PCI_IOV is not set
297# CONFIG_PCCARD is not set 310# CONFIG_PCCARD is not set
298CONFIG_HOTPLUG_PCI=m 311CONFIG_HOTPLUG_PCI=m
299# CONFIG_HOTPLUG_PCI_FAKE is not set 312# CONFIG_HOTPLUG_PCI_FAKE is not set
@@ -318,7 +331,6 @@ CONFIG_NET=y
318# 331#
319# Networking options 332# Networking options
320# 333#
321CONFIG_COMPAT_NET_DEV_OPS=y
322CONFIG_PACKET=y 334CONFIG_PACKET=y
323# CONFIG_PACKET_MMAP is not set 335# CONFIG_PACKET_MMAP is not set
324CONFIG_UNIX=y 336CONFIG_UNIX=y
@@ -375,6 +387,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_LAPB is not set 387# CONFIG_LAPB is not set
376# CONFIG_ECONET is not set 388# CONFIG_ECONET is not set
377# CONFIG_WAN_ROUTER is not set 389# CONFIG_WAN_ROUTER is not set
390# CONFIG_PHONET is not set
378# CONFIG_NET_SCHED is not set 391# CONFIG_NET_SCHED is not set
379# CONFIG_DCB is not set 392# CONFIG_DCB is not set
380 393
@@ -382,18 +395,19 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
382# Network testing 395# Network testing
383# 396#
384# CONFIG_NET_PKTGEN is not set 397# CONFIG_NET_PKTGEN is not set
398# CONFIG_NET_DROP_MONITOR is not set
385# CONFIG_HAMRADIO is not set 399# CONFIG_HAMRADIO is not set
386# CONFIG_CAN is not set 400# CONFIG_CAN is not set
387# CONFIG_IRDA is not set 401# CONFIG_IRDA is not set
388# CONFIG_BT is not set 402# CONFIG_BT is not set
389# CONFIG_AF_RXRPC is not set 403# CONFIG_AF_RXRPC is not set
390# CONFIG_PHONET is not set
391CONFIG_WIRELESS=y 404CONFIG_WIRELESS=y
392# CONFIG_CFG80211 is not set 405# CONFIG_CFG80211 is not set
393# CONFIG_WIRELESS_OLD_REGULATORY is not set 406# CONFIG_WIRELESS_OLD_REGULATORY is not set
394# CONFIG_WIRELESS_EXT is not set 407# CONFIG_WIRELESS_EXT is not set
395# CONFIG_LIB80211 is not set 408# CONFIG_LIB80211 is not set
396# CONFIG_MAC80211 is not set 409# CONFIG_MAC80211 is not set
410# CONFIG_WIMAX is not set
397# CONFIG_RFKILL is not set 411# CONFIG_RFKILL is not set
398# CONFIG_NET_9P is not set 412# CONFIG_NET_9P is not set
399 413
@@ -430,12 +444,16 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
430# CONFIG_BLK_DEV_HD is not set 444# CONFIG_BLK_DEV_HD is not set
431CONFIG_MISC_DEVICES=y 445CONFIG_MISC_DEVICES=y
432# CONFIG_PHANTOM is not set 446# CONFIG_PHANTOM is not set
433# CONFIG_EEPROM_93CX6 is not set
434# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
435# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
436# CONFIG_ENCLOSURE_SERVICES is not set 449# CONFIG_ENCLOSURE_SERVICES is not set
437# CONFIG_HP_ILO is not set 450# CONFIG_HP_ILO is not set
438# CONFIG_C2PORT is not set 451# CONFIG_C2PORT is not set
452
453#
454# EEPROM support
455#
456# CONFIG_EEPROM_93CX6 is not set
439CONFIG_HAVE_IDE=y 457CONFIG_HAVE_IDE=y
440CONFIG_IDE=y 458CONFIG_IDE=y
441 459
@@ -541,6 +559,7 @@ CONFIG_SCSI_LOWLEVEL=y
541# CONFIG_MEGARAID_NEWGEN is not set 559# CONFIG_MEGARAID_NEWGEN is not set
542# CONFIG_MEGARAID_LEGACY is not set 560# CONFIG_MEGARAID_LEGACY is not set
543# CONFIG_MEGARAID_SAS is not set 561# CONFIG_MEGARAID_SAS is not set
562# CONFIG_SCSI_MPT2SAS is not set
544# CONFIG_SCSI_HPTIOP is not set 563# CONFIG_SCSI_HPTIOP is not set
545# CONFIG_LIBFC is not set 564# CONFIG_LIBFC is not set
546# CONFIG_FCOE is not set 565# CONFIG_FCOE is not set
@@ -562,6 +581,7 @@ CONFIG_SCSI_LOWLEVEL=y
562# CONFIG_SCSI_DEBUG is not set 581# CONFIG_SCSI_DEBUG is not set
563# CONFIG_SCSI_SRP is not set 582# CONFIG_SCSI_SRP is not set
564# CONFIG_SCSI_DH is not set 583# CONFIG_SCSI_DH is not set
584# CONFIG_SCSI_OSD_INITIATOR is not set
565# CONFIG_ATA is not set 585# CONFIG_ATA is not set
566# CONFIG_MD is not set 586# CONFIG_MD is not set
567# CONFIG_FUSION is not set 587# CONFIG_FUSION is not set
@@ -577,6 +597,7 @@ CONFIG_SCSI_LOWLEVEL=y
577# CONFIG_IEEE1394 is not set 597# CONFIG_IEEE1394 is not set
578# CONFIG_I2O is not set 598# CONFIG_I2O is not set
579CONFIG_NETDEVICES=y 599CONFIG_NETDEVICES=y
600CONFIG_COMPAT_NET_DEV_OPS=y
580# CONFIG_DUMMY is not set 601# CONFIG_DUMMY is not set
581# CONFIG_BONDING is not set 602# CONFIG_BONDING is not set
582# CONFIG_MACVLAN is not set 603# CONFIG_MACVLAN is not set
@@ -594,8 +615,10 @@ CONFIG_MII=y
594# CONFIG_CASSINI is not set 615# CONFIG_CASSINI is not set
595# CONFIG_NET_VENDOR_3COM is not set 616# CONFIG_NET_VENDOR_3COM is not set
596# CONFIG_SMC91X is not set 617# CONFIG_SMC91X is not set
618# CONFIG_ETHOC is not set
597# CONFIG_SMC911X is not set 619# CONFIG_SMC911X is not set
598# CONFIG_SMSC911X is not set 620# CONFIG_SMSC911X is not set
621# CONFIG_DNET is not set
599# CONFIG_NET_TULIP is not set 622# CONFIG_NET_TULIP is not set
600# CONFIG_HP100 is not set 623# CONFIG_HP100 is not set
601# CONFIG_IBM_NEW_EMAC_ZMII is not set 624# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -646,6 +669,7 @@ CONFIG_NETDEV_1000=y
646# CONFIG_QLA3XXX is not set 669# CONFIG_QLA3XXX is not set
647# CONFIG_ATL1 is not set 670# CONFIG_ATL1 is not set
648# CONFIG_ATL1E is not set 671# CONFIG_ATL1E is not set
672# CONFIG_ATL1C is not set
649# CONFIG_JME is not set 673# CONFIG_JME is not set
650CONFIG_NETDEV_10000=y 674CONFIG_NETDEV_10000=y
651# CONFIG_CHELSIO_T1 is not set 675# CONFIG_CHELSIO_T1 is not set
@@ -664,6 +688,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
664# CONFIG_BNX2X is not set 688# CONFIG_BNX2X is not set
665# CONFIG_QLGE is not set 689# CONFIG_QLGE is not set
666# CONFIG_SFC is not set 690# CONFIG_SFC is not set
691# CONFIG_BE2NET is not set
667# CONFIG_TR is not set 692# CONFIG_TR is not set
668 693
669# 694#
@@ -671,7 +696,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
671# 696#
672# CONFIG_WLAN_PRE80211 is not set 697# CONFIG_WLAN_PRE80211 is not set
673# CONFIG_WLAN_80211 is not set 698# CONFIG_WLAN_80211 is not set
674# CONFIG_IWLWIFI_LEDS is not set 699
700#
701# Enable WiMAX (Networking options) to see the WiMAX drivers
702#
675# CONFIG_WAN is not set 703# CONFIG_WAN is not set
676# CONFIG_FDDI is not set 704# CONFIG_FDDI is not set
677# CONFIG_HIPPI is not set 705# CONFIG_HIPPI is not set
@@ -754,6 +782,7 @@ CONFIG_LEGACY_PTYS=y
754CONFIG_LEGACY_PTY_COUNT=256 782CONFIG_LEGACY_PTY_COUNT=256
755# CONFIG_IPMI_HANDLER is not set 783# CONFIG_IPMI_HANDLER is not set
756CONFIG_HW_RANDOM=y 784CONFIG_HW_RANDOM=y
785# CONFIG_HW_RANDOM_TIMERIOMEM is not set
757# CONFIG_R3964 is not set 786# CONFIG_R3964 is not set
758# CONFIG_APPLICOM is not set 787# CONFIG_APPLICOM is not set
759# CONFIG_RAW_DRIVER is not set 788# CONFIG_RAW_DRIVER is not set
@@ -872,9 +901,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
872# 901#
873 902
874# 903#
875# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 904# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
876# 905#
877# CONFIG_USB_GADGET is not set 906# CONFIG_USB_GADGET is not set
907
908#
909# OTG and related infrastructure
910#
878# CONFIG_UWB is not set 911# CONFIG_UWB is not set
879# CONFIG_MMC is not set 912# CONFIG_MMC is not set
880# CONFIG_MEMSTICK is not set 913# CONFIG_MEMSTICK is not set
@@ -883,6 +916,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
883# CONFIG_INFINIBAND is not set 916# CONFIG_INFINIBAND is not set
884# CONFIG_RTC_CLASS is not set 917# CONFIG_RTC_CLASS is not set
885# CONFIG_DMADEVICES is not set 918# CONFIG_DMADEVICES is not set
919# CONFIG_AUXDISPLAY is not set
886# CONFIG_UIO is not set 920# CONFIG_UIO is not set
887# CONFIG_STAGING is not set 921# CONFIG_STAGING is not set
888 922
@@ -908,6 +942,7 @@ CONFIG_FS_POSIX_ACL=y
908CONFIG_FILE_LOCKING=y 942CONFIG_FILE_LOCKING=y
909# CONFIG_XFS_FS is not set 943# CONFIG_XFS_FS is not set
910# CONFIG_OCFS2_FS is not set 944# CONFIG_OCFS2_FS is not set
945# CONFIG_BTRFS_FS is not set
911CONFIG_DNOTIFY=y 946CONFIG_DNOTIFY=y
912CONFIG_INOTIFY=y 947CONFIG_INOTIFY=y
913CONFIG_INOTIFY_USER=y 948CONFIG_INOTIFY_USER=y
@@ -957,6 +992,7 @@ CONFIG_MISC_FILESYSTEMS=y
957# CONFIG_BFS_FS is not set 992# CONFIG_BFS_FS is not set
958# CONFIG_EFS_FS is not set 993# CONFIG_EFS_FS is not set
959# CONFIG_CRAMFS is not set 994# CONFIG_CRAMFS is not set
995# CONFIG_SQUASHFS is not set
960# CONFIG_VXFS_FS is not set 996# CONFIG_VXFS_FS is not set
961# CONFIG_MINIX_FS is not set 997# CONFIG_MINIX_FS is not set
962# CONFIG_OMFS_FS is not set 998# CONFIG_OMFS_FS is not set
@@ -981,7 +1017,6 @@ CONFIG_EXPORTFS=y
981CONFIG_NFS_COMMON=y 1017CONFIG_NFS_COMMON=y
982CONFIG_SUNRPC=y 1018CONFIG_SUNRPC=y
983CONFIG_SUNRPC_GSS=y 1019CONFIG_SUNRPC_GSS=y
984# CONFIG_SUNRPC_REGISTER_V4 is not set
985CONFIG_RPCSEC_GSS_KRB5=y 1020CONFIG_RPCSEC_GSS_KRB5=y
986# CONFIG_RPCSEC_GSS_SPKM3 is not set 1021# CONFIG_RPCSEC_GSS_SPKM3 is not set
987# CONFIG_SMB_FS is not set 1022# CONFIG_SMB_FS is not set
@@ -1081,7 +1116,7 @@ CONFIG_TRACING=y
1081# 1116#
1082# Tracers 1117# Tracers
1083# 1118#
1084# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1119# CONFIG_DYNAMIC_DEBUG is not set
1085# CONFIG_SAMPLES is not set 1120# CONFIG_SAMPLES is not set
1086CONFIG_HAVE_ARCH_KGDB=y 1121CONFIG_HAVE_ARCH_KGDB=y
1087CONFIG_SH_STANDARD_BIOS=y 1122CONFIG_SH_STANDARD_BIOS=y
@@ -1110,10 +1145,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1110CONFIG_CRYPTO_HASH=y 1145CONFIG_CRYPTO_HASH=y
1111CONFIG_CRYPTO_HASH2=y 1146CONFIG_CRYPTO_HASH2=y
1112CONFIG_CRYPTO_RNG2=y 1147CONFIG_CRYPTO_RNG2=y
1148CONFIG_CRYPTO_PCOMP=y
1113CONFIG_CRYPTO_MANAGER=y 1149CONFIG_CRYPTO_MANAGER=y
1114CONFIG_CRYPTO_MANAGER2=y 1150CONFIG_CRYPTO_MANAGER2=y
1115# CONFIG_CRYPTO_GF128MUL is not set 1151# CONFIG_CRYPTO_GF128MUL is not set
1116# CONFIG_CRYPTO_NULL is not set 1152# CONFIG_CRYPTO_NULL is not set
1153CONFIG_CRYPTO_WORKQUEUE=y
1117# CONFIG_CRYPTO_CRYPTD is not set 1154# CONFIG_CRYPTO_CRYPTD is not set
1118# CONFIG_CRYPTO_AUTHENC is not set 1155# CONFIG_CRYPTO_AUTHENC is not set
1119# CONFIG_CRYPTO_TEST is not set 1156# CONFIG_CRYPTO_TEST is not set
@@ -1182,6 +1219,7 @@ CONFIG_CRYPTO_DES=y
1182# Compression 1219# Compression
1183# 1220#
1184CONFIG_CRYPTO_DEFLATE=y 1221CONFIG_CRYPTO_DEFLATE=y
1222# CONFIG_CRYPTO_ZLIB is not set
1185# CONFIG_CRYPTO_LZO is not set 1223# CONFIG_CRYPTO_LZO is not set
1186 1224
1187# 1225#
@@ -1205,7 +1243,8 @@ CONFIG_CRC32=y
1205# CONFIG_LIBCRC32C is not set 1243# CONFIG_LIBCRC32C is not set
1206CONFIG_ZLIB_INFLATE=y 1244CONFIG_ZLIB_INFLATE=y
1207CONFIG_ZLIB_DEFLATE=y 1245CONFIG_ZLIB_DEFLATE=y
1208CONFIG_PLIST=y 1246CONFIG_DECOMPRESS_GZIP=y
1209CONFIG_HAS_IOMEM=y 1247CONFIG_HAS_IOMEM=y
1210CONFIG_HAS_IOPORT=y 1248CONFIG_HAS_IOPORT=y
1211CONFIG_HAS_DMA=y 1249CONFIG_HAS_DMA=y
1250CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sh7710voipgw_defconfig b/arch/sh/configs/sh7710voipgw_defconfig
index 1b869f452ad1..1ab37c01da6e 100644
--- a/arch/sh/configs/sh7710voipgw_defconfig
+++ b/arch/sh/configs/sh7710voipgw_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:00:31 2009 4# Thu Apr 2 19:09:01 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -41,14 +42,23 @@ CONFIG_POSIX_MQUEUE=y
41# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y 56CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y 57CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set 58# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y 59CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set 60# CONFIG_CGROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 62CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 63CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 64# CONFIG_RELAY is not set
@@ -56,6 +66,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
56# CONFIG_BLK_DEV_INITRD is not set 66# CONFIG_BLK_DEV_INITRD is not set
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 67CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 68CONFIG_SYSCTL=y
69CONFIG_ANON_INODES=y
59CONFIG_EMBEDDED=y 70CONFIG_EMBEDDED=y
60CONFIG_UID16=y 71CONFIG_UID16=y
61# CONFIG_SYSCTL_SYSCALL is not set 72# CONFIG_SYSCTL_SYSCALL is not set
@@ -65,10 +76,8 @@ CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y 76CONFIG_PRINTK=y
66CONFIG_BUG=y 77CONFIG_BUG=y
67CONFIG_ELF_CORE=y 78CONFIG_ELF_CORE=y
68CONFIG_COMPAT_BRK=y
69CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
70# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
71CONFIG_ANON_INODES=y
72# CONFIG_EPOLL is not set 81# CONFIG_EPOLL is not set
73CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y 83CONFIG_TIMERFD=y
@@ -76,6 +85,7 @@ CONFIG_EVENTFD=y
76# CONFIG_SHMEM is not set 85# CONFIG_SHMEM is not set
77CONFIG_AIO=y 86CONFIG_AIO=y
78CONFIG_VM_EVENT_COUNTERS=y 87CONFIG_VM_EVENT_COUNTERS=y
88CONFIG_COMPAT_BRK=y
79CONFIG_SLAB=y 89CONFIG_SLAB=y
80# CONFIG_SLUB is not set 90# CONFIG_SLUB is not set
81# CONFIG_SLOB is not set 91# CONFIG_SLOB is not set
@@ -114,11 +124,6 @@ CONFIG_DEFAULT_DEADLINE=y
114# CONFIG_DEFAULT_CFQ is not set 124# CONFIG_DEFAULT_CFQ is not set
115# CONFIG_DEFAULT_NOOP is not set 125# CONFIG_DEFAULT_NOOP is not set
116CONFIG_DEFAULT_IOSCHED="deadline" 126CONFIG_DEFAULT_IOSCHED="deadline"
117CONFIG_CLASSIC_RCU=y
118# CONFIG_TREE_RCU is not set
119# CONFIG_PREEMPT_RCU is not set
120# CONFIG_TREE_RCU_TRACE is not set
121# CONFIG_PREEMPT_RCU_TRACE is not set
122# CONFIG_FREEZER is not set 127# CONFIG_FREEZER is not set
123 128
124# 129#
@@ -153,6 +158,7 @@ CONFIG_CPU_SUBTYPE_SH7710=y
153# CONFIG_CPU_SUBTYPE_SH7770 is not set 158# CONFIG_CPU_SUBTYPE_SH7770 is not set
154# CONFIG_CPU_SUBTYPE_SH7780 is not set 159# CONFIG_CPU_SUBTYPE_SH7780 is not set
155# CONFIG_CPU_SUBTYPE_SH7785 is not set 160# CONFIG_CPU_SUBTYPE_SH7785 is not set
161# CONFIG_CPU_SUBTYPE_SH7786 is not set
156# CONFIG_CPU_SUBTYPE_SHX3 is not set 162# CONFIG_CPU_SUBTYPE_SHX3 is not set
157# CONFIG_CPU_SUBTYPE_SH7343 is not set 163# CONFIG_CPU_SUBTYPE_SH7343 is not set
158# CONFIG_CPU_SUBTYPE_SH7722 is not set 164# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -194,11 +200,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
194CONFIG_ZONE_DMA_FLAG=0 200CONFIG_ZONE_DMA_FLAG=0
195CONFIG_NR_QUICK=2 201CONFIG_NR_QUICK=2
196CONFIG_UNEVICTABLE_LRU=y 202CONFIG_UNEVICTABLE_LRU=y
203CONFIG_HAVE_MLOCK=y
204CONFIG_HAVE_MLOCKED_PAGE_BIT=y
197 205
198# 206#
199# Cache configuration 207# Cache configuration
200# 208#
201# CONFIG_SH_DIRECT_MAPPED is not set
202CONFIG_CACHE_WRITEBACK=y 209CONFIG_CACHE_WRITEBACK=y
203# CONFIG_CACHE_WRITETHROUGH is not set 210# CONFIG_CACHE_WRITETHROUGH is not set
204# CONFIG_CACHE_OFF is not set 211# CONFIG_CACHE_OFF is not set
@@ -299,7 +306,6 @@ CONFIG_NET=y
299# 306#
300# Networking options 307# Networking options
301# 308#
302CONFIG_COMPAT_NET_DEV_OPS=y
303CONFIG_PACKET=y 309CONFIG_PACKET=y
304# CONFIG_PACKET_MMAP is not set 310# CONFIG_PACKET_MMAP is not set
305CONFIG_UNIX=y 311CONFIG_UNIX=y
@@ -369,6 +375,7 @@ CONFIG_NETFILTER_ADVANCED=y
369# CONFIG_LAPB is not set 375# CONFIG_LAPB is not set
370# CONFIG_ECONET is not set 376# CONFIG_ECONET is not set
371# CONFIG_WAN_ROUTER is not set 377# CONFIG_WAN_ROUTER is not set
378# CONFIG_PHONET is not set
372CONFIG_NET_SCHED=y 379CONFIG_NET_SCHED=y
373 380
374# 381#
@@ -418,13 +425,13 @@ CONFIG_NET_SCH_FIFO=y
418# CONFIG_IRDA is not set 425# CONFIG_IRDA is not set
419# CONFIG_BT is not set 426# CONFIG_BT is not set
420# CONFIG_AF_RXRPC is not set 427# CONFIG_AF_RXRPC is not set
421# CONFIG_PHONET is not set
422CONFIG_WIRELESS=y 428CONFIG_WIRELESS=y
423# CONFIG_CFG80211 is not set 429# CONFIG_CFG80211 is not set
424# CONFIG_WIRELESS_OLD_REGULATORY is not set 430# CONFIG_WIRELESS_OLD_REGULATORY is not set
425# CONFIG_WIRELESS_EXT is not set 431# CONFIG_WIRELESS_EXT is not set
426# CONFIG_LIB80211 is not set 432# CONFIG_LIB80211 is not set
427# CONFIG_MAC80211 is not set 433# CONFIG_MAC80211 is not set
434# CONFIG_WIMAX is not set
428# CONFIG_RFKILL is not set 435# CONFIG_RFKILL is not set
429# CONFIG_NET_9P is not set 436# CONFIG_NET_9P is not set
430 437
@@ -447,6 +454,7 @@ CONFIG_MTD=y
447# CONFIG_MTD_DEBUG is not set 454# CONFIG_MTD_DEBUG is not set
448# CONFIG_MTD_CONCAT is not set 455# CONFIG_MTD_CONCAT is not set
449CONFIG_MTD_PARTITIONS=y 456CONFIG_MTD_PARTITIONS=y
457# CONFIG_MTD_TESTS is not set
450# CONFIG_MTD_REDBOOT_PARTS is not set 458# CONFIG_MTD_REDBOOT_PARTS is not set
451# CONFIG_MTD_CMDLINE_PARTS is not set 459# CONFIG_MTD_CMDLINE_PARTS is not set
452# CONFIG_MTD_AR7_PARTS is not set 460# CONFIG_MTD_AR7_PARTS is not set
@@ -514,6 +522,11 @@ CONFIG_MTD_RAM=y
514# CONFIG_MTD_ONENAND is not set 522# CONFIG_MTD_ONENAND is not set
515 523
516# 524#
525# LPDDR flash memory drivers
526#
527# CONFIG_MTD_LPDDR is not set
528
529#
517# UBI - Unsorted block images 530# UBI - Unsorted block images
518# 531#
519# CONFIG_MTD_UBI is not set 532# CONFIG_MTD_UBI is not set
@@ -527,9 +540,13 @@ CONFIG_BLK_DEV=y
527# CONFIG_ATA_OVER_ETH is not set 540# CONFIG_ATA_OVER_ETH is not set
528# CONFIG_BLK_DEV_HD is not set 541# CONFIG_BLK_DEV_HD is not set
529CONFIG_MISC_DEVICES=y 542CONFIG_MISC_DEVICES=y
530# CONFIG_EEPROM_93CX6 is not set
531# CONFIG_ENCLOSURE_SERVICES is not set 543# CONFIG_ENCLOSURE_SERVICES is not set
532# CONFIG_C2PORT is not set 544# CONFIG_C2PORT is not set
545
546#
547# EEPROM support
548#
549# CONFIG_EEPROM_93CX6 is not set
533CONFIG_HAVE_IDE=y 550CONFIG_HAVE_IDE=y
534# CONFIG_IDE is not set 551# CONFIG_IDE is not set
535 552
@@ -543,6 +560,7 @@ CONFIG_HAVE_IDE=y
543# CONFIG_ATA is not set 560# CONFIG_ATA is not set
544# CONFIG_MD is not set 561# CONFIG_MD is not set
545CONFIG_NETDEVICES=y 562CONFIG_NETDEVICES=y
563CONFIG_COMPAT_NET_DEV_OPS=y
546# CONFIG_DUMMY is not set 564# CONFIG_DUMMY is not set
547# CONFIG_BONDING is not set 565# CONFIG_BONDING is not set
548# CONFIG_MACVLAN is not set 566# CONFIG_MACVLAN is not set
@@ -556,8 +574,10 @@ CONFIG_NET_ETHERNET=y
556# CONFIG_STNIC is not set 574# CONFIG_STNIC is not set
557# CONFIG_SH_ETH is not set 575# CONFIG_SH_ETH is not set
558# CONFIG_SMC91X is not set 576# CONFIG_SMC91X is not set
577# CONFIG_ETHOC is not set
559# CONFIG_SMC911X is not set 578# CONFIG_SMC911X is not set
560# CONFIG_SMSC911X is not set 579# CONFIG_SMSC911X is not set
580# CONFIG_DNET is not set
561# CONFIG_IBM_NEW_EMAC_ZMII is not set 581# CONFIG_IBM_NEW_EMAC_ZMII is not set
562# CONFIG_IBM_NEW_EMAC_RGMII is not set 582# CONFIG_IBM_NEW_EMAC_RGMII is not set
563# CONFIG_IBM_NEW_EMAC_TAH is not set 583# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -574,7 +594,10 @@ CONFIG_NETDEV_10000=y
574# 594#
575# CONFIG_WLAN_PRE80211 is not set 595# CONFIG_WLAN_PRE80211 is not set
576# CONFIG_WLAN_80211 is not set 596# CONFIG_WLAN_80211 is not set
577# CONFIG_IWLWIFI_LEDS is not set 597
598#
599# Enable WiMAX (Networking options) to see the WiMAX drivers
600#
578# CONFIG_WAN is not set 601# CONFIG_WAN is not set
579# CONFIG_PPP is not set 602# CONFIG_PPP is not set
580# CONFIG_SLIP is not set 603# CONFIG_SLIP is not set
@@ -640,6 +663,7 @@ CONFIG_LEGACY_PTYS=y
640CONFIG_LEGACY_PTY_COUNT=256 663CONFIG_LEGACY_PTY_COUNT=256
641# CONFIG_IPMI_HANDLER is not set 664# CONFIG_IPMI_HANDLER is not set
642CONFIG_HW_RANDOM=y 665CONFIG_HW_RANDOM=y
666# CONFIG_HW_RANDOM_TIMERIOMEM is not set
643# CONFIG_R3964 is not set 667# CONFIG_R3964 is not set
644# CONFIG_RAW_DRIVER is not set 668# CONFIG_RAW_DRIVER is not set
645# CONFIG_TCG_TPM is not set 669# CONFIG_TCG_TPM is not set
@@ -718,15 +742,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
718# 742#
719 743
720# 744#
721# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 745# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
722# 746#
723# CONFIG_USB_GADGET is not set 747# CONFIG_USB_GADGET is not set
748
749#
750# OTG and related infrastructure
751#
724# CONFIG_MMC is not set 752# CONFIG_MMC is not set
725# CONFIG_MEMSTICK is not set 753# CONFIG_MEMSTICK is not set
726# CONFIG_NEW_LEDS is not set 754# CONFIG_NEW_LEDS is not set
727# CONFIG_ACCESSIBILITY is not set 755# CONFIG_ACCESSIBILITY is not set
728# CONFIG_RTC_CLASS is not set 756# CONFIG_RTC_CLASS is not set
729# CONFIG_DMADEVICES is not set 757# CONFIG_DMADEVICES is not set
758# CONFIG_AUXDISPLAY is not set
730# CONFIG_UIO is not set 759# CONFIG_UIO is not set
731# CONFIG_STAGING is not set 760# CONFIG_STAGING is not set
732 761
@@ -742,6 +771,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
742CONFIG_FILE_LOCKING=y 771CONFIG_FILE_LOCKING=y
743# CONFIG_XFS_FS is not set 772# CONFIG_XFS_FS is not set
744# CONFIG_OCFS2_FS is not set 773# CONFIG_OCFS2_FS is not set
774# CONFIG_BTRFS_FS is not set
745# CONFIG_DNOTIFY is not set 775# CONFIG_DNOTIFY is not set
746# CONFIG_INOTIFY is not set 776# CONFIG_INOTIFY is not set
747# CONFIG_QUOTA is not set 777# CONFIG_QUOTA is not set
@@ -795,6 +825,7 @@ CONFIG_JFFS2_ZLIB=y
795CONFIG_JFFS2_RTIME=y 825CONFIG_JFFS2_RTIME=y
796# CONFIG_JFFS2_RUBIN is not set 826# CONFIG_JFFS2_RUBIN is not set
797# CONFIG_CRAMFS is not set 827# CONFIG_CRAMFS is not set
828# CONFIG_SQUASHFS is not set
798# CONFIG_VXFS_FS is not set 829# CONFIG_VXFS_FS is not set
799# CONFIG_MINIX_FS is not set 830# CONFIG_MINIX_FS is not set
800# CONFIG_OMFS_FS is not set 831# CONFIG_OMFS_FS is not set
@@ -844,7 +875,7 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
844# 875#
845# Tracers 876# Tracers
846# 877#
847# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 878# CONFIG_DYNAMIC_DEBUG is not set
848# CONFIG_SAMPLES is not set 879# CONFIG_SAMPLES is not set
849CONFIG_HAVE_ARCH_KGDB=y 880CONFIG_HAVE_ARCH_KGDB=y
850# CONFIG_SH_STANDARD_BIOS is not set 881# CONFIG_SH_STANDARD_BIOS is not set
@@ -936,6 +967,7 @@ CONFIG_CRYPTO=y
936# Compression 967# Compression
937# 968#
938# CONFIG_CRYPTO_DEFLATE is not set 969# CONFIG_CRYPTO_DEFLATE is not set
970# CONFIG_CRYPTO_ZLIB is not set
939# CONFIG_CRYPTO_LZO is not set 971# CONFIG_CRYPTO_LZO is not set
940 972
941# 973#
@@ -961,3 +993,4 @@ CONFIG_ZLIB_DEFLATE=y
961CONFIG_HAS_IOMEM=y 993CONFIG_HAS_IOMEM=y
962CONFIG_HAS_IOPORT=y 994CONFIG_HAS_IOPORT=y
963CONFIG_HAS_DMA=y 995CONFIG_HAS_DMA=y
996CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sh7763rdp_defconfig b/arch/sh/configs/sh7763rdp_defconfig
index ba33aca75af6..c79bb84ec305 100644
--- a/arch/sh/configs/sh7763rdp_defconfig
+++ b/arch/sh/configs/sh7763rdp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:02:28 2009 4# Thu Apr 2 19:10:57 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -41,15 +42,24 @@ CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44CONFIG_IKCONFIG=y 54CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 55CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_GROUP_SCHED=y 57CONFIG_GROUP_SCHED=y
49CONFIG_FAIR_GROUP_SCHED=y 58CONFIG_FAIR_GROUP_SCHED=y
50# CONFIG_RT_GROUP_SCHED is not set 59# CONFIG_RT_GROUP_SCHED is not set
51CONFIG_USER_SCHED=y 60CONFIG_USER_SCHED=y
52# CONFIG_CGROUP_SCHED is not set 61# CONFIG_CGROUP_SCHED is not set
62# CONFIG_CGROUPS is not set
53CONFIG_SYSFS_DEPRECATED=y 63CONFIG_SYSFS_DEPRECATED=y
54CONFIG_SYSFS_DEPRECATED_V2=y 64CONFIG_SYSFS_DEPRECATED_V2=y
55# CONFIG_RELAY is not set 65# CONFIG_RELAY is not set
@@ -58,9 +68,11 @@ CONFIG_UTS_NS=y
58CONFIG_IPC_NS=y 68CONFIG_IPC_NS=y
59# CONFIG_USER_NS is not set 69# CONFIG_USER_NS is not set
60# CONFIG_PID_NS is not set 70# CONFIG_PID_NS is not set
71# CONFIG_NET_NS is not set
61# CONFIG_BLK_DEV_INITRD is not set 72# CONFIG_BLK_DEV_INITRD is not set
62CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
63CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
64CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
65CONFIG_UID16=y 77CONFIG_UID16=y
66# CONFIG_SYSCTL_SYSCALL is not set 78# CONFIG_SYSCTL_SYSCALL is not set
@@ -70,10 +82,8 @@ CONFIG_HOTPLUG=y
70CONFIG_PRINTK=y 82CONFIG_PRINTK=y
71CONFIG_BUG=y 83CONFIG_BUG=y
72CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
73CONFIG_COMPAT_BRK=y
74CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
75CONFIG_FUTEX=y 86CONFIG_FUTEX=y
76CONFIG_ANON_INODES=y
77CONFIG_EPOLL=y 87CONFIG_EPOLL=y
78CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
79CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -81,6 +91,7 @@ CONFIG_EVENTFD=y
81CONFIG_SHMEM=y 91CONFIG_SHMEM=y
82CONFIG_AIO=y 92CONFIG_AIO=y
83CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_COMPAT_BRK=y
84CONFIG_SLAB=y 95CONFIG_SLAB=y
85# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
86# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
@@ -122,11 +133,6 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 135CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_CLASSIC_RCU=y
126# CONFIG_TREE_RCU is not set
127# CONFIG_PREEMPT_RCU is not set
128# CONFIG_TREE_RCU_TRACE is not set
129# CONFIG_PREEMPT_RCU_TRACE is not set
130# CONFIG_FREEZER is not set 136# CONFIG_FREEZER is not set
131 137
132# 138#
@@ -162,6 +168,7 @@ CONFIG_CPU_SUBTYPE_SH7763=y
162# CONFIG_CPU_SUBTYPE_SH7770 is not set 168# CONFIG_CPU_SUBTYPE_SH7770 is not set
163# CONFIG_CPU_SUBTYPE_SH7780 is not set 169# CONFIG_CPU_SUBTYPE_SH7780 is not set
164# CONFIG_CPU_SUBTYPE_SH7785 is not set 170# CONFIG_CPU_SUBTYPE_SH7785 is not set
171# CONFIG_CPU_SUBTYPE_SH7786 is not set
165# CONFIG_CPU_SUBTYPE_SHX3 is not set 172# CONFIG_CPU_SUBTYPE_SHX3 is not set
166# CONFIG_CPU_SUBTYPE_SH7343 is not set 173# CONFIG_CPU_SUBTYPE_SH7343 is not set
167# CONFIG_CPU_SUBTYPE_SH7722 is not set 174# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -207,11 +214,12 @@ CONFIG_MIGRATION=y
207CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
208CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
209CONFIG_UNEVICTABLE_LRU=y 216CONFIG_UNEVICTABLE_LRU=y
217CONFIG_HAVE_MLOCK=y
218CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210 219
211# 220#
212# Cache configuration 221# Cache configuration
213# 222#
214# CONFIG_SH_DIRECT_MAPPED is not set
215CONFIG_CACHE_WRITEBACK=y 223CONFIG_CACHE_WRITEBACK=y
216# CONFIG_CACHE_WRITETHROUGH is not set 224# CONFIG_CACHE_WRITETHROUGH is not set
217# CONFIG_CACHE_OFF is not set 225# CONFIG_CACHE_OFF is not set
@@ -231,6 +239,7 @@ CONFIG_CPU_HAS_FPU=y
231# Board support 239# Board support
232# 240#
233CONFIG_SH_SH7763RDP=y 241CONFIG_SH_SH7763RDP=y
242# CONFIG_SH_ESPT is not set
234 243
235# 244#
236# Timer and clock configuration 245# Timer and clock configuration
@@ -311,8 +320,6 @@ CONFIG_NET=y
311# 320#
312# Networking options 321# Networking options
313# 322#
314# CONFIG_NET_NS is not set
315CONFIG_COMPAT_NET_DEV_OPS=y
316CONFIG_PACKET=y 323CONFIG_PACKET=y
317# CONFIG_PACKET_MMAP is not set 324# CONFIG_PACKET_MMAP is not set
318CONFIG_UNIX=y 325CONFIG_UNIX=y
@@ -367,6 +374,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
367# CONFIG_LAPB is not set 374# CONFIG_LAPB is not set
368# CONFIG_ECONET is not set 375# CONFIG_ECONET is not set
369# CONFIG_WAN_ROUTER is not set 376# CONFIG_WAN_ROUTER is not set
377# CONFIG_PHONET is not set
370# CONFIG_NET_SCHED is not set 378# CONFIG_NET_SCHED is not set
371# CONFIG_DCB is not set 379# CONFIG_DCB is not set
372 380
@@ -374,12 +382,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
374# Network testing 382# Network testing
375# 383#
376# CONFIG_NET_PKTGEN is not set 384# CONFIG_NET_PKTGEN is not set
385# CONFIG_NET_DROP_MONITOR is not set
377# CONFIG_HAMRADIO is not set 386# CONFIG_HAMRADIO is not set
378# CONFIG_CAN is not set 387# CONFIG_CAN is not set
379# CONFIG_IRDA is not set 388# CONFIG_IRDA is not set
380# CONFIG_BT is not set 389# CONFIG_BT is not set
381# CONFIG_AF_RXRPC is not set 390# CONFIG_AF_RXRPC is not set
382# CONFIG_PHONET is not set
383CONFIG_WIRELESS=y 391CONFIG_WIRELESS=y
384# CONFIG_CFG80211 is not set 392# CONFIG_CFG80211 is not set
385# CONFIG_WIRELESS_OLD_REGULATORY is not set 393# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -387,6 +395,7 @@ CONFIG_WIRELESS_EXT=y
387CONFIG_WIRELESS_EXT_SYSFS=y 395CONFIG_WIRELESS_EXT_SYSFS=y
388# CONFIG_LIB80211 is not set 396# CONFIG_LIB80211 is not set
389# CONFIG_MAC80211 is not set 397# CONFIG_MAC80211 is not set
398# CONFIG_WIMAX is not set
390# CONFIG_RFKILL is not set 399# CONFIG_RFKILL is not set
391# CONFIG_NET_9P is not set 400# CONFIG_NET_9P is not set
392 401
@@ -409,6 +418,7 @@ CONFIG_MTD=y
409# CONFIG_MTD_DEBUG is not set 418# CONFIG_MTD_DEBUG is not set
410# CONFIG_MTD_CONCAT is not set 419# CONFIG_MTD_CONCAT is not set
411CONFIG_MTD_PARTITIONS=y 420CONFIG_MTD_PARTITIONS=y
421# CONFIG_MTD_TESTS is not set
412# CONFIG_MTD_REDBOOT_PARTS is not set 422# CONFIG_MTD_REDBOOT_PARTS is not set
413CONFIG_MTD_CMDLINE_PARTS=y 423CONFIG_MTD_CMDLINE_PARTS=y
414# CONFIG_MTD_AR7_PARTS is not set 424# CONFIG_MTD_AR7_PARTS is not set
@@ -462,9 +472,7 @@ CONFIG_MTD_CFI_UTIL=y
462# 472#
463CONFIG_MTD_COMPLEX_MAPPINGS=y 473CONFIG_MTD_COMPLEX_MAPPINGS=y
464CONFIG_MTD_PHYSMAP=y 474CONFIG_MTD_PHYSMAP=y
465CONFIG_MTD_PHYSMAP_START=0x8000000 475# CONFIG_MTD_PHYSMAP_COMPAT is not set
466CONFIG_MTD_PHYSMAP_LEN=0
467CONFIG_MTD_PHYSMAP_BANKWIDTH=2
468# CONFIG_MTD_PLATRAM is not set 476# CONFIG_MTD_PLATRAM is not set
469 477
470# 478#
@@ -485,6 +493,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
485# CONFIG_MTD_ONENAND is not set 493# CONFIG_MTD_ONENAND is not set
486 494
487# 495#
496# LPDDR flash memory drivers
497#
498# CONFIG_MTD_LPDDR is not set
499
500#
488# UBI - Unsorted block images 501# UBI - Unsorted block images
489# 502#
490# CONFIG_MTD_UBI is not set 503# CONFIG_MTD_UBI is not set
@@ -544,9 +557,11 @@ CONFIG_SCSI_LOWLEVEL=y
544# CONFIG_LIBFC is not set 557# CONFIG_LIBFC is not set
545# CONFIG_SCSI_DEBUG is not set 558# CONFIG_SCSI_DEBUG is not set
546# CONFIG_SCSI_DH is not set 559# CONFIG_SCSI_DH is not set
560# CONFIG_SCSI_OSD_INITIATOR is not set
547# CONFIG_ATA is not set 561# CONFIG_ATA is not set
548# CONFIG_MD is not set 562# CONFIG_MD is not set
549CONFIG_NETDEVICES=y 563CONFIG_NETDEVICES=y
564CONFIG_COMPAT_NET_DEV_OPS=y
550# CONFIG_DUMMY is not set 565# CONFIG_DUMMY is not set
551# CONFIG_BONDING is not set 566# CONFIG_BONDING is not set
552# CONFIG_MACVLAN is not set 567# CONFIG_MACVLAN is not set
@@ -579,8 +594,10 @@ CONFIG_MII=y
579# CONFIG_STNIC is not set 594# CONFIG_STNIC is not set
580CONFIG_SH_ETH=y 595CONFIG_SH_ETH=y
581# CONFIG_SMC91X is not set 596# CONFIG_SMC91X is not set
597# CONFIG_ETHOC is not set
582# CONFIG_SMC911X is not set 598# CONFIG_SMC911X is not set
583# CONFIG_SMSC911X is not set 599# CONFIG_SMSC911X is not set
600# CONFIG_DNET is not set
584# CONFIG_IBM_NEW_EMAC_ZMII is not set 601# CONFIG_IBM_NEW_EMAC_ZMII is not set
585# CONFIG_IBM_NEW_EMAC_RGMII is not set 602# CONFIG_IBM_NEW_EMAC_RGMII is not set
586# CONFIG_IBM_NEW_EMAC_TAH is not set 603# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -597,7 +614,10 @@ CONFIG_SH_ETH=y
597# 614#
598# CONFIG_WLAN_PRE80211 is not set 615# CONFIG_WLAN_PRE80211 is not set
599# CONFIG_WLAN_80211 is not set 616# CONFIG_WLAN_80211 is not set
600# CONFIG_IWLWIFI_LEDS is not set 617
618#
619# Enable WiMAX (Networking options) to see the WiMAX drivers
620#
601 621
602# 622#
603# USB Network Adapters 623# USB Network Adapters
@@ -677,6 +697,7 @@ CONFIG_LEGACY_PTYS=y
677CONFIG_LEGACY_PTY_COUNT=256 697CONFIG_LEGACY_PTY_COUNT=256
678# CONFIG_IPMI_HANDLER is not set 698# CONFIG_IPMI_HANDLER is not set
679CONFIG_HW_RANDOM=y 699CONFIG_HW_RANDOM=y
700# CONFIG_HW_RANDOM_TIMERIOMEM is not set
680# CONFIG_R3964 is not set 701# CONFIG_R3964 is not set
681# CONFIG_RAW_DRIVER is not set 702# CONFIG_RAW_DRIVER is not set
682# CONFIG_TCG_TPM is not set 703# CONFIG_TCG_TPM is not set
@@ -756,6 +777,7 @@ CONFIG_FB_SH7760=y
756# CONFIG_FB_VIRTUAL is not set 777# CONFIG_FB_VIRTUAL is not set
757# CONFIG_FB_METRONOME is not set 778# CONFIG_FB_METRONOME is not set
758# CONFIG_FB_MB862XX is not set 779# CONFIG_FB_MB862XX is not set
780# CONFIG_FB_BROADSHEET is not set
759# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 781# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
760 782
761# 783#
@@ -807,7 +829,9 @@ CONFIG_USB_MON=y
807# USB Host Controller Drivers 829# USB Host Controller Drivers
808# 830#
809# CONFIG_USB_C67X00_HCD is not set 831# CONFIG_USB_C67X00_HCD is not set
832# CONFIG_USB_OXU210HP_HCD is not set
810# CONFIG_USB_ISP116X_HCD is not set 833# CONFIG_USB_ISP116X_HCD is not set
834# CONFIG_USB_ISP1760_HCD is not set
811CONFIG_USB_OHCI_HCD=y 835CONFIG_USB_OHCI_HCD=y
812# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 836# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
813# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 837# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -825,18 +849,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
825# CONFIG_USB_TMC is not set 849# CONFIG_USB_TMC is not set
826 850
827# 851#
828# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 852# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
829# 853#
830 854
831# 855#
832# see USB_STORAGE Help for more information 856# also be needed; see USB_STORAGE Help for more info
833# 857#
834CONFIG_USB_STORAGE=y 858CONFIG_USB_STORAGE=y
835# CONFIG_USB_STORAGE_DEBUG is not set 859# CONFIG_USB_STORAGE_DEBUG is not set
836# CONFIG_USB_STORAGE_DATAFAB is not set 860# CONFIG_USB_STORAGE_DATAFAB is not set
837# CONFIG_USB_STORAGE_FREECOM is not set 861# CONFIG_USB_STORAGE_FREECOM is not set
838# CONFIG_USB_STORAGE_ISD200 is not set 862# CONFIG_USB_STORAGE_ISD200 is not set
839# CONFIG_USB_STORAGE_DPCM is not set
840# CONFIG_USB_STORAGE_USBAT is not set 863# CONFIG_USB_STORAGE_USBAT is not set
841# CONFIG_USB_STORAGE_SDDR09 is not set 864# CONFIG_USB_STORAGE_SDDR09 is not set
842# CONFIG_USB_STORAGE_SDDR55 is not set 865# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -872,7 +895,6 @@ CONFIG_USB_STORAGE=y
872# CONFIG_USB_LED is not set 895# CONFIG_USB_LED is not set
873# CONFIG_USB_CYPRESS_CY7C63 is not set 896# CONFIG_USB_CYPRESS_CY7C63 is not set
874# CONFIG_USB_CYTHERM is not set 897# CONFIG_USB_CYTHERM is not set
875# CONFIG_USB_PHIDGET is not set
876# CONFIG_USB_IDMOUSE is not set 898# CONFIG_USB_IDMOUSE is not set
877# CONFIG_USB_FTDI_ELAN is not set 899# CONFIG_USB_FTDI_ELAN is not set
878# CONFIG_USB_APPLEDISPLAY is not set 900# CONFIG_USB_APPLEDISPLAY is not set
@@ -882,6 +904,11 @@ CONFIG_USB_STORAGE=y
882# CONFIG_USB_ISIGHTFW is not set 904# CONFIG_USB_ISIGHTFW is not set
883# CONFIG_USB_VST is not set 905# CONFIG_USB_VST is not set
884# CONFIG_USB_GADGET is not set 906# CONFIG_USB_GADGET is not set
907
908#
909# OTG and related infrastructure
910#
911# CONFIG_NOP_USB_XCEIV is not set
885CONFIG_MMC=y 912CONFIG_MMC=y
886# CONFIG_MMC_DEBUG is not set 913# CONFIG_MMC_DEBUG is not set
887# CONFIG_MMC_UNSAFE_RESUME is not set 914# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -903,6 +930,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
903# CONFIG_ACCESSIBILITY is not set 930# CONFIG_ACCESSIBILITY is not set
904# CONFIG_RTC_CLASS is not set 931# CONFIG_RTC_CLASS is not set
905# CONFIG_DMADEVICES is not set 932# CONFIG_DMADEVICES is not set
933# CONFIG_AUXDISPLAY is not set
906# CONFIG_UIO is not set 934# CONFIG_UIO is not set
907# CONFIG_STAGING is not set 935# CONFIG_STAGING is not set
908 936
@@ -926,6 +954,7 @@ CONFIG_FS_POSIX_ACL=y
926CONFIG_FILE_LOCKING=y 954CONFIG_FILE_LOCKING=y
927# CONFIG_XFS_FS is not set 955# CONFIG_XFS_FS is not set
928# CONFIG_OCFS2_FS is not set 956# CONFIG_OCFS2_FS is not set
957# CONFIG_BTRFS_FS is not set
929CONFIG_DNOTIFY=y 958CONFIG_DNOTIFY=y
930CONFIG_INOTIFY=y 959CONFIG_INOTIFY=y
931CONFIG_INOTIFY_USER=y 960CONFIG_INOTIFY_USER=y
@@ -974,6 +1003,7 @@ CONFIG_MISC_FILESYSTEMS=y
974# CONFIG_EFS_FS is not set 1003# CONFIG_EFS_FS is not set
975# CONFIG_JFFS2_FS is not set 1004# CONFIG_JFFS2_FS is not set
976# CONFIG_CRAMFS is not set 1005# CONFIG_CRAMFS is not set
1006# CONFIG_SQUASHFS is not set
977# CONFIG_VXFS_FS is not set 1007# CONFIG_VXFS_FS is not set
978# CONFIG_MINIX_FS is not set 1008# CONFIG_MINIX_FS is not set
979# CONFIG_OMFS_FS is not set 1009# CONFIG_OMFS_FS is not set
@@ -991,7 +1021,6 @@ CONFIG_ROOT_NFS=y
991CONFIG_LOCKD=y 1021CONFIG_LOCKD=y
992CONFIG_NFS_COMMON=y 1022CONFIG_NFS_COMMON=y
993CONFIG_SUNRPC=y 1023CONFIG_SUNRPC=y
994# CONFIG_SUNRPC_REGISTER_V4 is not set
995# CONFIG_RPCSEC_GSS_KRB5 is not set 1024# CONFIG_RPCSEC_GSS_KRB5 is not set
996# CONFIG_RPCSEC_GSS_SPKM3 is not set 1025# CONFIG_RPCSEC_GSS_SPKM3 is not set
997# CONFIG_SMB_FS is not set 1026# CONFIG_SMB_FS is not set
@@ -1075,7 +1104,7 @@ CONFIG_TRACING=y
1075# 1104#
1076# Tracers 1105# Tracers
1077# 1106#
1078# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1107# CONFIG_DYNAMIC_DEBUG is not set
1079# CONFIG_SAMPLES is not set 1108# CONFIG_SAMPLES is not set
1080CONFIG_HAVE_ARCH_KGDB=y 1109CONFIG_HAVE_ARCH_KGDB=y
1081# CONFIG_SH_STANDARD_BIOS is not set 1110# CONFIG_SH_STANDARD_BIOS is not set
@@ -1167,6 +1196,7 @@ CONFIG_CRYPTO=y
1167# Compression 1196# Compression
1168# 1197#
1169# CONFIG_CRYPTO_DEFLATE is not set 1198# CONFIG_CRYPTO_DEFLATE is not set
1199# CONFIG_CRYPTO_ZLIB is not set
1170# CONFIG_CRYPTO_LZO is not set 1200# CONFIG_CRYPTO_LZO is not set
1171 1201
1172# 1202#
@@ -1187,7 +1217,7 @@ CONFIG_CRC_T10DIF=y
1187CONFIG_CRC32=y 1217CONFIG_CRC32=y
1188# CONFIG_CRC7 is not set 1218# CONFIG_CRC7 is not set
1189# CONFIG_LIBCRC32C is not set 1219# CONFIG_LIBCRC32C is not set
1190CONFIG_PLIST=y
1191CONFIG_HAS_IOMEM=y 1220CONFIG_HAS_IOMEM=y
1192CONFIG_HAS_IOPORT=y 1221CONFIG_HAS_IOPORT=y
1193CONFIG_HAS_DMA=y 1222CONFIG_HAS_DMA=y
1223CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 54e1dee8e24a..a6cf4505741c 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc4 3# Linux kernel version: 2.6.29
4# Fri Feb 20 18:25:29 2009 4# Thu Apr 2 19:12:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
@@ -26,6 +26,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
29CONFIG_IO_TRAPPED=y 30CONFIG_IO_TRAPPED=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
31 32
@@ -71,6 +72,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
71# CONFIG_BLK_DEV_INITRD is not set 72# CONFIG_BLK_DEV_INITRD is not set
72CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
73CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
74CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
75CONFIG_UID16=y 77CONFIG_UID16=y
76CONFIG_SYSCTL_SYSCALL=y 78CONFIG_SYSCTL_SYSCALL=y
@@ -81,10 +83,8 @@ CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y 83CONFIG_PRINTK=y
82CONFIG_BUG=y 84CONFIG_BUG=y
83CONFIG_ELF_CORE=y 85CONFIG_ELF_CORE=y
84CONFIG_COMPAT_BRK=y
85CONFIG_BASE_FULL=y 86CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 87CONFIG_FUTEX=y
87CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 88CONFIG_EPOLL=y
89CONFIG_SIGNALFD=y 89CONFIG_SIGNALFD=y
90CONFIG_TIMERFD=y 90CONFIG_TIMERFD=y
@@ -93,6 +93,7 @@ CONFIG_SHMEM=y
93CONFIG_AIO=y 93CONFIG_AIO=y
94CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95CONFIG_PCI_QUIRKS=y 95CONFIG_PCI_QUIRKS=y
96CONFIG_COMPAT_BRK=y
96CONFIG_SLAB=y 97CONFIG_SLAB=y
97# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
@@ -169,6 +170,7 @@ CONFIG_CPU_SHX2=y
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 170# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 171# CONFIG_CPU_SUBTYPE_SH7780 is not set
171CONFIG_CPU_SUBTYPE_SH7785=y 172CONFIG_CPU_SUBTYPE_SH7785=y
173# CONFIG_CPU_SUBTYPE_SH7786 is not set
172# CONFIG_CPU_SUBTYPE_SHX3 is not set 174# CONFIG_CPU_SUBTYPE_SHX3 is not set
173# CONFIG_CPU_SUBTYPE_SH7343 is not set 175# CONFIG_CPU_SUBTYPE_SH7343 is not set
174# CONFIG_CPU_SUBTYPE_SH7722 is not set 176# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -220,11 +222,12 @@ CONFIG_MIGRATION=y
220CONFIG_ZONE_DMA_FLAG=0 222CONFIG_ZONE_DMA_FLAG=0
221CONFIG_NR_QUICK=2 223CONFIG_NR_QUICK=2
222CONFIG_UNEVICTABLE_LRU=y 224CONFIG_UNEVICTABLE_LRU=y
225CONFIG_HAVE_MLOCK=y
226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
223 227
224# 228#
225# Cache configuration 229# Cache configuration
226# 230#
227# CONFIG_SH_DIRECT_MAPPED is not set
228CONFIG_CACHE_WRITEBACK=y 231CONFIG_CACHE_WRITEBACK=y
229# CONFIG_CACHE_WRITETHROUGH is not set 232# CONFIG_CACHE_WRITETHROUGH is not set
230# CONFIG_CACHE_OFF is not set 233# CONFIG_CACHE_OFF is not set
@@ -314,6 +317,7 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
314CONFIG_PCI_LEGACY=y 317CONFIG_PCI_LEGACY=y
315# CONFIG_PCI_DEBUG is not set 318# CONFIG_PCI_DEBUG is not set
316# CONFIG_PCI_STUB is not set 319# CONFIG_PCI_STUB is not set
320# CONFIG_PCI_IOV is not set
317# CONFIG_PCCARD is not set 321# CONFIG_PCCARD is not set
318# CONFIG_HOTPLUG_PCI is not set 322# CONFIG_HOTPLUG_PCI is not set
319 323
@@ -335,7 +339,6 @@ CONFIG_NET=y
335# 339#
336# Networking options 340# Networking options
337# 341#
338CONFIG_COMPAT_NET_DEV_OPS=y
339CONFIG_PACKET=y 342CONFIG_PACKET=y
340# CONFIG_PACKET_MMAP is not set 343# CONFIG_PACKET_MMAP is not set
341CONFIG_UNIX=y 344CONFIG_UNIX=y
@@ -395,6 +398,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
395# CONFIG_LAPB is not set 398# CONFIG_LAPB is not set
396# CONFIG_ECONET is not set 399# CONFIG_ECONET is not set
397# CONFIG_WAN_ROUTER is not set 400# CONFIG_WAN_ROUTER is not set
401# CONFIG_PHONET is not set
398# CONFIG_NET_SCHED is not set 402# CONFIG_NET_SCHED is not set
399# CONFIG_DCB is not set 403# CONFIG_DCB is not set
400 404
@@ -407,7 +411,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
407# CONFIG_IRDA is not set 411# CONFIG_IRDA is not set
408# CONFIG_BT is not set 412# CONFIG_BT is not set
409# CONFIG_AF_RXRPC is not set 413# CONFIG_AF_RXRPC is not set
410# CONFIG_PHONET is not set
411CONFIG_WIRELESS=y 414CONFIG_WIRELESS=y
412# CONFIG_CFG80211 is not set 415# CONFIG_CFG80211 is not set
413# CONFIG_WIRELESS_OLD_REGULATORY is not set 416# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -512,7 +515,6 @@ CONFIG_MTD_PHYSMAP=y
512# LPDDR flash memory drivers 515# LPDDR flash memory drivers
513# 516#
514# CONFIG_MTD_LPDDR is not set 517# CONFIG_MTD_LPDDR is not set
515# CONFIG_MTD_QINFO_PROBE is not set
516 518
517# 519#
518# UBI - Unsorted block images 520# UBI - Unsorted block images
@@ -578,6 +580,7 @@ CONFIG_SCSI_WAIT_SCAN=m
578# CONFIG_SCSI_SRP_ATTRS is not set 580# CONFIG_SCSI_SRP_ATTRS is not set
579# CONFIG_SCSI_LOWLEVEL is not set 581# CONFIG_SCSI_LOWLEVEL is not set
580# CONFIG_SCSI_DH is not set 582# CONFIG_SCSI_DH is not set
583# CONFIG_SCSI_OSD_INITIATOR is not set
581CONFIG_ATA=y 584CONFIG_ATA=y
582# CONFIG_ATA_NONSTANDARD is not set 585# CONFIG_ATA_NONSTANDARD is not set
583CONFIG_SATA_PMP=y 586CONFIG_SATA_PMP=y
@@ -652,6 +655,7 @@ CONFIG_SATA_SIL=y
652# CONFIG_IEEE1394 is not set 655# CONFIG_IEEE1394 is not set
653# CONFIG_I2O is not set 656# CONFIG_I2O is not set
654CONFIG_NETDEVICES=y 657CONFIG_NETDEVICES=y
658CONFIG_COMPAT_NET_DEV_OPS=y
655# CONFIG_DUMMY is not set 659# CONFIG_DUMMY is not set
656# CONFIG_BONDING is not set 660# CONFIG_BONDING is not set
657# CONFIG_MACVLAN is not set 661# CONFIG_MACVLAN is not set
@@ -681,6 +685,7 @@ CONFIG_R8169=y
681# CONFIG_QLA3XXX is not set 685# CONFIG_QLA3XXX is not set
682# CONFIG_ATL1 is not set 686# CONFIG_ATL1 is not set
683# CONFIG_ATL1E is not set 687# CONFIG_ATL1E is not set
688# CONFIG_ATL1C is not set
684# CONFIG_JME is not set 689# CONFIG_JME is not set
685# CONFIG_NETDEV_10000 is not set 690# CONFIG_NETDEV_10000 is not set
686# CONFIG_TR is not set 691# CONFIG_TR is not set
@@ -690,7 +695,6 @@ CONFIG_R8169=y
690# 695#
691# CONFIG_WLAN_PRE80211 is not set 696# CONFIG_WLAN_PRE80211 is not set
692# CONFIG_WLAN_80211 is not set 697# CONFIG_WLAN_80211 is not set
693# CONFIG_IWLWIFI_LEDS is not set
694 698
695# 699#
696# Enable WiMAX (Networking options) to see the WiMAX drivers 700# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -789,6 +793,7 @@ CONFIG_LEGACY_PTYS=y
789CONFIG_LEGACY_PTY_COUNT=256 793CONFIG_LEGACY_PTY_COUNT=256
790# CONFIG_IPMI_HANDLER is not set 794# CONFIG_IPMI_HANDLER is not set
791CONFIG_HW_RANDOM=y 795CONFIG_HW_RANDOM=y
796# CONFIG_HW_RANDOM_TIMERIOMEM is not set
792# CONFIG_R3964 is not set 797# CONFIG_R3964 is not set
793# CONFIG_APPLICOM is not set 798# CONFIG_APPLICOM is not set
794# CONFIG_RAW_DRIVER is not set 799# CONFIG_RAW_DRIVER is not set
@@ -854,7 +859,6 @@ CONFIG_I2C_PCA_PLATFORM=y
854# CONFIG_SENSORS_PCF8574 is not set 859# CONFIG_SENSORS_PCF8574 is not set
855# CONFIG_PCF8575 is not set 860# CONFIG_PCF8575 is not set
856# CONFIG_SENSORS_PCA9539 is not set 861# CONFIG_SENSORS_PCA9539 is not set
857# CONFIG_SENSORS_PCF8591 is not set
858# CONFIG_SENSORS_MAX6875 is not set 862# CONFIG_SENSORS_MAX6875 is not set
859# CONFIG_SENSORS_TSL2550 is not set 863# CONFIG_SENSORS_TSL2550 is not set
860# CONFIG_I2C_DEBUG_CORE is not set 864# CONFIG_I2C_DEBUG_CORE is not set
@@ -964,6 +968,7 @@ CONFIG_FB_SM501=y
964# CONFIG_FB_VIRTUAL is not set 968# CONFIG_FB_VIRTUAL is not set
965# CONFIG_FB_METRONOME is not set 969# CONFIG_FB_METRONOME is not set
966# CONFIG_FB_MB862XX is not set 970# CONFIG_FB_MB862XX is not set
971# CONFIG_FB_BROADSHEET is not set
967# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 972# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
968 973
969# 974#
@@ -1079,11 +1084,11 @@ CONFIG_USB_R8A66597_HCD=y
1079# CONFIG_USB_TMC is not set 1084# CONFIG_USB_TMC is not set
1080 1085
1081# 1086#
1082# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1087# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1083# 1088#
1084 1089
1085# 1090#
1086# see USB_STORAGE Help for more information 1091# also be needed; see USB_STORAGE Help for more info
1087# 1092#
1088CONFIG_USB_STORAGE=y 1093CONFIG_USB_STORAGE=y
1089# CONFIG_USB_STORAGE_DEBUG is not set 1094# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1125,7 +1130,6 @@ CONFIG_USB_STORAGE=y
1125# CONFIG_USB_LED is not set 1130# CONFIG_USB_LED is not set
1126# CONFIG_USB_CYPRESS_CY7C63 is not set 1131# CONFIG_USB_CYPRESS_CY7C63 is not set
1127# CONFIG_USB_CYTHERM is not set 1132# CONFIG_USB_CYTHERM is not set
1128# CONFIG_USB_PHIDGET is not set
1129# CONFIG_USB_IDMOUSE is not set 1133# CONFIG_USB_IDMOUSE is not set
1130# CONFIG_USB_FTDI_ELAN is not set 1134# CONFIG_USB_FTDI_ELAN is not set
1131# CONFIG_USB_APPLEDISPLAY is not set 1135# CONFIG_USB_APPLEDISPLAY is not set
@@ -1141,6 +1145,7 @@ CONFIG_USB_TEST=m
1141# 1145#
1142# OTG and related infrastructure 1146# OTG and related infrastructure
1143# 1147#
1148# CONFIG_NOP_USB_XCEIV is not set
1144# CONFIG_UWB is not set 1149# CONFIG_UWB is not set
1145# CONFIG_MMC is not set 1150# CONFIG_MMC is not set
1146# CONFIG_MEMSTICK is not set 1151# CONFIG_MEMSTICK is not set
@@ -1202,6 +1207,7 @@ CONFIG_RTC_DRV_RS5C372=y
1202# 1207#
1203# CONFIG_RTC_DRV_SH is not set 1208# CONFIG_RTC_DRV_SH is not set
1204# CONFIG_DMADEVICES is not set 1209# CONFIG_DMADEVICES is not set
1210# CONFIG_AUXDISPLAY is not set
1205# CONFIG_UIO is not set 1211# CONFIG_UIO is not set
1206# CONFIG_STAGING is not set 1212# CONFIG_STAGING is not set
1207 1213
@@ -1299,7 +1305,6 @@ CONFIG_EXPORTFS=y
1299CONFIG_NFS_COMMON=y 1305CONFIG_NFS_COMMON=y
1300CONFIG_SUNRPC=y 1306CONFIG_SUNRPC=y
1301CONFIG_SUNRPC_GSS=y 1307CONFIG_SUNRPC_GSS=y
1302# CONFIG_SUNRPC_REGISTER_V4 is not set
1303CONFIG_RPCSEC_GSS_KRB5=y 1308CONFIG_RPCSEC_GSS_KRB5=y
1304# CONFIG_RPCSEC_GSS_SPKM3 is not set 1309# CONFIG_RPCSEC_GSS_SPKM3 is not set
1305# CONFIG_SMB_FS is not set 1310# CONFIG_SMB_FS is not set
@@ -1404,6 +1409,7 @@ CONFIG_DEBUG_PREEMPT=y
1404# CONFIG_FAULT_INJECTION is not set 1409# CONFIG_FAULT_INJECTION is not set
1405# CONFIG_LATENCYTOP is not set 1410# CONFIG_LATENCYTOP is not set
1406CONFIG_SYSCTL_SYSCALL_CHECK=y 1411CONFIG_SYSCTL_SYSCALL_CHECK=y
1412# CONFIG_PAGE_POISONING is not set
1407CONFIG_HAVE_FUNCTION_TRACER=y 1413CONFIG_HAVE_FUNCTION_TRACER=y
1408CONFIG_HAVE_DYNAMIC_FTRACE=y 1414CONFIG_HAVE_DYNAMIC_FTRACE=y
1409CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1415CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -1419,7 +1425,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1419# CONFIG_BOOT_TRACER is not set 1425# CONFIG_BOOT_TRACER is not set
1420# CONFIG_TRACE_BRANCH_PROFILING is not set 1426# CONFIG_TRACE_BRANCH_PROFILING is not set
1421# CONFIG_STACK_TRACER is not set 1427# CONFIG_STACK_TRACER is not set
1422# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1423# CONFIG_SAMPLES is not set 1428# CONFIG_SAMPLES is not set
1424CONFIG_HAVE_ARCH_KGDB=y 1429CONFIG_HAVE_ARCH_KGDB=y
1425# CONFIG_KGDB is not set 1430# CONFIG_KGDB is not set
@@ -1455,10 +1460,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1455CONFIG_CRYPTO_HASH=y 1460CONFIG_CRYPTO_HASH=y
1456CONFIG_CRYPTO_HASH2=y 1461CONFIG_CRYPTO_HASH2=y
1457CONFIG_CRYPTO_RNG2=y 1462CONFIG_CRYPTO_RNG2=y
1463CONFIG_CRYPTO_PCOMP=y
1458CONFIG_CRYPTO_MANAGER=y 1464CONFIG_CRYPTO_MANAGER=y
1459CONFIG_CRYPTO_MANAGER2=y 1465CONFIG_CRYPTO_MANAGER2=y
1460# CONFIG_CRYPTO_GF128MUL is not set 1466# CONFIG_CRYPTO_GF128MUL is not set
1461# CONFIG_CRYPTO_NULL is not set 1467# CONFIG_CRYPTO_NULL is not set
1468CONFIG_CRYPTO_WORKQUEUE=y
1462# CONFIG_CRYPTO_CRYPTD is not set 1469# CONFIG_CRYPTO_CRYPTD is not set
1463# CONFIG_CRYPTO_AUTHENC is not set 1470# CONFIG_CRYPTO_AUTHENC is not set
1464# CONFIG_CRYPTO_TEST is not set 1471# CONFIG_CRYPTO_TEST is not set
@@ -1527,6 +1534,7 @@ CONFIG_CRYPTO_DES=y
1527# Compression 1534# Compression
1528# 1535#
1529# CONFIG_CRYPTO_DEFLATE is not set 1536# CONFIG_CRYPTO_DEFLATE is not set
1537# CONFIG_CRYPTO_ZLIB is not set
1530# CONFIG_CRYPTO_LZO is not set 1538# CONFIG_CRYPTO_LZO is not set
1531 1539
1532# 1540#
@@ -1547,7 +1555,7 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1547CONFIG_CRC32=y 1555CONFIG_CRC32=y
1548# CONFIG_CRC7 is not set 1556# CONFIG_CRC7 is not set
1549# CONFIG_LIBCRC32C is not set 1557# CONFIG_LIBCRC32C is not set
1550CONFIG_PLIST=y
1551CONFIG_HAS_IOMEM=y 1558CONFIG_HAS_IOMEM=y
1552CONFIG_HAS_IOPORT=y 1559CONFIG_HAS_IOPORT=y
1553CONFIG_HAS_DMA=y 1560CONFIG_HAS_DMA=y
1561CONFIG_NLATTR=y
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
index 1d63628df6f6..8a42bbef1f50 100644
--- a/arch/sh/configs/sh7785lcr_defconfig
+++ b/arch/sh/configs/sh7785lcr_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:05:18 2009 4# Thu Apr 2 19:15:58 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
@@ -26,6 +26,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
29CONFIG_IO_TRAPPED=y 30CONFIG_IO_TRAPPED=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
31 32
@@ -46,15 +47,24 @@ CONFIG_BSD_PROCESS_ACCT=y
46# CONFIG_BSD_PROCESS_ACCT_V3 is not set 47# CONFIG_BSD_PROCESS_ACCT_V3 is not set
47# CONFIG_TASKSTATS is not set 48# CONFIG_TASKSTATS is not set
48# CONFIG_AUDIT is not set 49# CONFIG_AUDIT is not set
50
51#
52# RCU Subsystem
53#
54CONFIG_CLASSIC_RCU=y
55# CONFIG_TREE_RCU is not set
56# CONFIG_PREEMPT_RCU is not set
57# CONFIG_TREE_RCU_TRACE is not set
58# CONFIG_PREEMPT_RCU_TRACE is not set
49CONFIG_IKCONFIG=y 59CONFIG_IKCONFIG=y
50CONFIG_IKCONFIG_PROC=y 60CONFIG_IKCONFIG_PROC=y
51CONFIG_LOG_BUF_SHIFT=14 61CONFIG_LOG_BUF_SHIFT=14
52# CONFIG_CGROUPS is not set
53CONFIG_GROUP_SCHED=y 62CONFIG_GROUP_SCHED=y
54CONFIG_FAIR_GROUP_SCHED=y 63CONFIG_FAIR_GROUP_SCHED=y
55# CONFIG_RT_GROUP_SCHED is not set 64# CONFIG_RT_GROUP_SCHED is not set
56CONFIG_USER_SCHED=y 65CONFIG_USER_SCHED=y
57# CONFIG_CGROUP_SCHED is not set 66# CONFIG_CGROUP_SCHED is not set
67# CONFIG_CGROUPS is not set
58CONFIG_SYSFS_DEPRECATED=y 68CONFIG_SYSFS_DEPRECATED=y
59CONFIG_SYSFS_DEPRECATED_V2=y 69CONFIG_SYSFS_DEPRECATED_V2=y
60# CONFIG_RELAY is not set 70# CONFIG_RELAY is not set
@@ -62,6 +72,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
62# CONFIG_BLK_DEV_INITRD is not set 72# CONFIG_BLK_DEV_INITRD is not set
63CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
64CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
65CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
66CONFIG_UID16=y 77CONFIG_UID16=y
67CONFIG_SYSCTL_SYSCALL=y 78CONFIG_SYSCTL_SYSCALL=y
@@ -72,10 +83,8 @@ CONFIG_HOTPLUG=y
72CONFIG_PRINTK=y 83CONFIG_PRINTK=y
73CONFIG_BUG=y 84CONFIG_BUG=y
74CONFIG_ELF_CORE=y 85CONFIG_ELF_CORE=y
75CONFIG_COMPAT_BRK=y
76CONFIG_BASE_FULL=y 86CONFIG_BASE_FULL=y
77CONFIG_FUTEX=y 87CONFIG_FUTEX=y
78CONFIG_ANON_INODES=y
79CONFIG_EPOLL=y 88CONFIG_EPOLL=y
80CONFIG_SIGNALFD=y 89CONFIG_SIGNALFD=y
81CONFIG_TIMERFD=y 90CONFIG_TIMERFD=y
@@ -84,6 +93,7 @@ CONFIG_SHMEM=y
84CONFIG_AIO=y 93CONFIG_AIO=y
85CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
86CONFIG_PCI_QUIRKS=y 95CONFIG_PCI_QUIRKS=y
96CONFIG_COMPAT_BRK=y
87CONFIG_SLAB=y 97CONFIG_SLAB=y
88# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
89# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
@@ -124,11 +134,6 @@ CONFIG_IOSCHED_CFQ=y
124CONFIG_DEFAULT_CFQ=y 134CONFIG_DEFAULT_CFQ=y
125# CONFIG_DEFAULT_NOOP is not set 135# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="cfq" 136CONFIG_DEFAULT_IOSCHED="cfq"
127CONFIG_CLASSIC_RCU=y
128# CONFIG_TREE_RCU is not set
129# CONFIG_PREEMPT_RCU is not set
130# CONFIG_TREE_RCU_TRACE is not set
131# CONFIG_PREEMPT_RCU_TRACE is not set
132# CONFIG_FREEZER is not set 137# CONFIG_FREEZER is not set
133 138
134# 139#
@@ -165,6 +170,7 @@ CONFIG_CPU_SHX2=y
165# CONFIG_CPU_SUBTYPE_SH7770 is not set 170# CONFIG_CPU_SUBTYPE_SH7770 is not set
166# CONFIG_CPU_SUBTYPE_SH7780 is not set 171# CONFIG_CPU_SUBTYPE_SH7780 is not set
167CONFIG_CPU_SUBTYPE_SH7785=y 172CONFIG_CPU_SUBTYPE_SH7785=y
173# CONFIG_CPU_SUBTYPE_SH7786 is not set
168# CONFIG_CPU_SUBTYPE_SHX3 is not set 174# CONFIG_CPU_SUBTYPE_SHX3 is not set
169# CONFIG_CPU_SUBTYPE_SH7343 is not set 175# CONFIG_CPU_SUBTYPE_SH7343 is not set
170# CONFIG_CPU_SUBTYPE_SH7722 is not set 176# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -180,8 +186,11 @@ CONFIG_MMU=y
180CONFIG_PAGE_OFFSET=0x80000000 186CONFIG_PAGE_OFFSET=0x80000000
181CONFIG_MEMORY_START=0x08000000 187CONFIG_MEMORY_START=0x08000000
182CONFIG_MEMORY_SIZE=0x08000000 188CONFIG_MEMORY_SIZE=0x08000000
183CONFIG_29BIT=y 189# CONFIG_29BIT is not set
190CONFIG_32BIT=y
191CONFIG_PMB_ENABLE=y
184# CONFIG_PMB is not set 192# CONFIG_PMB is not set
193CONFIG_PMB_FIXED=y
185# CONFIG_X2TLB is not set 194# CONFIG_X2TLB is not set
186CONFIG_VSYSCALL=y 195CONFIG_VSYSCALL=y
187# CONFIG_NUMA is not set 196# CONFIG_NUMA is not set
@@ -213,11 +222,12 @@ CONFIG_MIGRATION=y
213CONFIG_ZONE_DMA_FLAG=0 222CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 223CONFIG_NR_QUICK=2
215CONFIG_UNEVICTABLE_LRU=y 224CONFIG_UNEVICTABLE_LRU=y
225CONFIG_HAVE_MLOCK=y
226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
216 227
217# 228#
218# Cache configuration 229# Cache configuration
219# 230#
220# CONFIG_SH_DIRECT_MAPPED is not set
221CONFIG_CACHE_WRITEBACK=y 231CONFIG_CACHE_WRITEBACK=y
222# CONFIG_CACHE_WRITETHROUGH is not set 232# CONFIG_CACHE_WRITETHROUGH is not set
223# CONFIG_CACHE_OFF is not set 233# CONFIG_CACHE_OFF is not set
@@ -239,7 +249,6 @@ CONFIG_CPU_HAS_FPU=y
239# 249#
240# CONFIG_SH_HIGHLANDER is not set 250# CONFIG_SH_HIGHLANDER is not set
241CONFIG_SH_SH7785LCR=y 251CONFIG_SH_SH7785LCR=y
242CONFIG_SH_SH7785LCR_29BIT_PHYSMAPS=y
243 252
244# 253#
245# Timer and clock configuration 254# Timer and clock configuration
@@ -307,6 +316,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
307# CONFIG_ARCH_SUPPORTS_MSI is not set 316# CONFIG_ARCH_SUPPORTS_MSI is not set
308CONFIG_PCI_LEGACY=y 317CONFIG_PCI_LEGACY=y
309# CONFIG_PCI_DEBUG is not set 318# CONFIG_PCI_DEBUG is not set
319# CONFIG_PCI_STUB is not set
320# CONFIG_PCI_IOV is not set
310# CONFIG_PCCARD is not set 321# CONFIG_PCCARD is not set
311# CONFIG_HOTPLUG_PCI is not set 322# CONFIG_HOTPLUG_PCI is not set
312 323
@@ -328,7 +339,6 @@ CONFIG_NET=y
328# 339#
329# Networking options 340# Networking options
330# 341#
331CONFIG_COMPAT_NET_DEV_OPS=y
332CONFIG_PACKET=y 342CONFIG_PACKET=y
333# CONFIG_PACKET_MMAP is not set 343# CONFIG_PACKET_MMAP is not set
334CONFIG_UNIX=y 344CONFIG_UNIX=y
@@ -388,6 +398,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
388# CONFIG_LAPB is not set 398# CONFIG_LAPB is not set
389# CONFIG_ECONET is not set 399# CONFIG_ECONET is not set
390# CONFIG_WAN_ROUTER is not set 400# CONFIG_WAN_ROUTER is not set
401# CONFIG_PHONET is not set
391# CONFIG_NET_SCHED is not set 402# CONFIG_NET_SCHED is not set
392# CONFIG_DCB is not set 403# CONFIG_DCB is not set
393 404
@@ -400,7 +411,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
400# CONFIG_IRDA is not set 411# CONFIG_IRDA is not set
401# CONFIG_BT is not set 412# CONFIG_BT is not set
402# CONFIG_AF_RXRPC is not set 413# CONFIG_AF_RXRPC is not set
403# CONFIG_PHONET is not set
404CONFIG_WIRELESS=y 414CONFIG_WIRELESS=y
405# CONFIG_CFG80211 is not set 415# CONFIG_CFG80211 is not set
406# CONFIG_WIRELESS_OLD_REGULATORY is not set 416# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -408,6 +418,7 @@ CONFIG_WIRELESS_EXT=y
408CONFIG_WIRELESS_EXT_SYSFS=y 418CONFIG_WIRELESS_EXT_SYSFS=y
409# CONFIG_LIB80211 is not set 419# CONFIG_LIB80211 is not set
410# CONFIG_MAC80211 is not set 420# CONFIG_MAC80211 is not set
421# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set 422# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set 423# CONFIG_NET_9P is not set
413 424
@@ -430,6 +441,7 @@ CONFIG_MTD=y
430# CONFIG_MTD_DEBUG is not set 441# CONFIG_MTD_DEBUG is not set
431CONFIG_MTD_CONCAT=y 442CONFIG_MTD_CONCAT=y
432CONFIG_MTD_PARTITIONS=y 443CONFIG_MTD_PARTITIONS=y
444# CONFIG_MTD_TESTS is not set
433# CONFIG_MTD_REDBOOT_PARTS is not set 445# CONFIG_MTD_REDBOOT_PARTS is not set
434# CONFIG_MTD_CMDLINE_PARTS is not set 446# CONFIG_MTD_CMDLINE_PARTS is not set
435# CONFIG_MTD_AR7_PARTS is not set 447# CONFIG_MTD_AR7_PARTS is not set
@@ -477,9 +489,7 @@ CONFIG_MTD_CFI_UTIL=y
477# 489#
478# CONFIG_MTD_COMPLEX_MAPPINGS is not set 490# CONFIG_MTD_COMPLEX_MAPPINGS is not set
479CONFIG_MTD_PHYSMAP=y 491CONFIG_MTD_PHYSMAP=y
480CONFIG_MTD_PHYSMAP_START=0x00000000 492# CONFIG_MTD_PHYSMAP_COMPAT is not set
481CONFIG_MTD_PHYSMAP_LEN=0x0
482CONFIG_MTD_PHYSMAP_BANKWIDTH=0
483# CONFIG_MTD_INTEL_VR_NOR is not set 493# CONFIG_MTD_INTEL_VR_NOR is not set
484# CONFIG_MTD_PLATRAM is not set 494# CONFIG_MTD_PLATRAM is not set
485 495
@@ -502,6 +512,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
502# CONFIG_MTD_ONENAND is not set 512# CONFIG_MTD_ONENAND is not set
503 513
504# 514#
515# LPDDR flash memory drivers
516#
517# CONFIG_MTD_LPDDR is not set
518
519#
505# UBI - Unsorted block images 520# UBI - Unsorted block images
506# 521#
507# CONFIG_MTD_UBI is not set 522# CONFIG_MTD_UBI is not set
@@ -565,6 +580,7 @@ CONFIG_SCSI_WAIT_SCAN=m
565# CONFIG_SCSI_SRP_ATTRS is not set 580# CONFIG_SCSI_SRP_ATTRS is not set
566# CONFIG_SCSI_LOWLEVEL is not set 581# CONFIG_SCSI_LOWLEVEL is not set
567# CONFIG_SCSI_DH is not set 582# CONFIG_SCSI_DH is not set
583# CONFIG_SCSI_OSD_INITIATOR is not set
568CONFIG_ATA=y 584CONFIG_ATA=y
569# CONFIG_ATA_NONSTANDARD is not set 585# CONFIG_ATA_NONSTANDARD is not set
570CONFIG_SATA_PMP=y 586CONFIG_SATA_PMP=y
@@ -639,6 +655,7 @@ CONFIG_SATA_SIL=y
639# CONFIG_IEEE1394 is not set 655# CONFIG_IEEE1394 is not set
640# CONFIG_I2O is not set 656# CONFIG_I2O is not set
641CONFIG_NETDEVICES=y 657CONFIG_NETDEVICES=y
658CONFIG_COMPAT_NET_DEV_OPS=y
642# CONFIG_DUMMY is not set 659# CONFIG_DUMMY is not set
643# CONFIG_BONDING is not set 660# CONFIG_BONDING is not set
644# CONFIG_MACVLAN is not set 661# CONFIG_MACVLAN is not set
@@ -668,6 +685,7 @@ CONFIG_R8169=y
668# CONFIG_QLA3XXX is not set 685# CONFIG_QLA3XXX is not set
669# CONFIG_ATL1 is not set 686# CONFIG_ATL1 is not set
670# CONFIG_ATL1E is not set 687# CONFIG_ATL1E is not set
688# CONFIG_ATL1C is not set
671# CONFIG_JME is not set 689# CONFIG_JME is not set
672# CONFIG_NETDEV_10000 is not set 690# CONFIG_NETDEV_10000 is not set
673# CONFIG_TR is not set 691# CONFIG_TR is not set
@@ -677,7 +695,10 @@ CONFIG_R8169=y
677# 695#
678# CONFIG_WLAN_PRE80211 is not set 696# CONFIG_WLAN_PRE80211 is not set
679# CONFIG_WLAN_80211 is not set 697# CONFIG_WLAN_80211 is not set
680# CONFIG_IWLWIFI_LEDS is not set 698
699#
700# Enable WiMAX (Networking options) to see the WiMAX drivers
701#
681 702
682# 703#
683# USB Network Adapters 704# USB Network Adapters
@@ -772,6 +793,7 @@ CONFIG_LEGACY_PTYS=y
772CONFIG_LEGACY_PTY_COUNT=256 793CONFIG_LEGACY_PTY_COUNT=256
773# CONFIG_IPMI_HANDLER is not set 794# CONFIG_IPMI_HANDLER is not set
774CONFIG_HW_RANDOM=y 795CONFIG_HW_RANDOM=y
796# CONFIG_HW_RANDOM_TIMERIOMEM is not set
775# CONFIG_R3964 is not set 797# CONFIG_R3964 is not set
776# CONFIG_APPLICOM is not set 798# CONFIG_APPLICOM is not set
777# CONFIG_RAW_DRIVER is not set 799# CONFIG_RAW_DRIVER is not set
@@ -834,12 +856,9 @@ CONFIG_I2C_PCA_PLATFORM=y
834# Miscellaneous I2C Chip support 856# Miscellaneous I2C Chip support
835# 857#
836# CONFIG_DS1682 is not set 858# CONFIG_DS1682 is not set
837# CONFIG_EEPROM_AT24 is not set
838# CONFIG_EEPROM_LEGACY is not set
839# CONFIG_SENSORS_PCF8574 is not set 859# CONFIG_SENSORS_PCF8574 is not set
840# CONFIG_PCF8575 is not set 860# CONFIG_PCF8575 is not set
841# CONFIG_SENSORS_PCA9539 is not set 861# CONFIG_SENSORS_PCA9539 is not set
842# CONFIG_SENSORS_PCF8591 is not set
843# CONFIG_SENSORS_MAX6875 is not set 862# CONFIG_SENSORS_MAX6875 is not set
844# CONFIG_SENSORS_TSL2550 is not set 863# CONFIG_SENSORS_TSL2550 is not set
845# CONFIG_I2C_DEBUG_CORE is not set 864# CONFIG_I2C_DEBUG_CORE is not set
@@ -871,6 +890,7 @@ CONFIG_MFD_SM501=y
871# CONFIG_PMIC_DA903X is not set 890# CONFIG_PMIC_DA903X is not set
872# CONFIG_MFD_WM8400 is not set 891# CONFIG_MFD_WM8400 is not set
873# CONFIG_MFD_WM8350_I2C is not set 892# CONFIG_MFD_WM8350_I2C is not set
893# CONFIG_MFD_PCF50633 is not set
874# CONFIG_REGULATOR is not set 894# CONFIG_REGULATOR is not set
875 895
876# 896#
@@ -948,6 +968,7 @@ CONFIG_FB_SM501=y
948# CONFIG_FB_VIRTUAL is not set 968# CONFIG_FB_VIRTUAL is not set
949# CONFIG_FB_METRONOME is not set 969# CONFIG_FB_METRONOME is not set
950# CONFIG_FB_MB862XX is not set 970# CONFIG_FB_MB862XX is not set
971# CONFIG_FB_BROADSHEET is not set
951# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 972# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
952 973
953# 974#
@@ -1041,6 +1062,7 @@ CONFIG_USB_MON=y
1041CONFIG_USB_EHCI_HCD=m 1062CONFIG_USB_EHCI_HCD=m
1042# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1063# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1043# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1064# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1065# CONFIG_USB_OXU210HP_HCD is not set
1044# CONFIG_USB_ISP116X_HCD is not set 1066# CONFIG_USB_ISP116X_HCD is not set
1045# CONFIG_USB_ISP1760_HCD is not set 1067# CONFIG_USB_ISP1760_HCD is not set
1046CONFIG_USB_OHCI_HCD=m 1068CONFIG_USB_OHCI_HCD=m
@@ -1062,18 +1084,17 @@ CONFIG_USB_R8A66597_HCD=y
1062# CONFIG_USB_TMC is not set 1084# CONFIG_USB_TMC is not set
1063 1085
1064# 1086#
1065# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1087# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1066# 1088#
1067 1089
1068# 1090#
1069# see USB_STORAGE Help for more information 1091# also be needed; see USB_STORAGE Help for more info
1070# 1092#
1071CONFIG_USB_STORAGE=y 1093CONFIG_USB_STORAGE=y
1072# CONFIG_USB_STORAGE_DEBUG is not set 1094# CONFIG_USB_STORAGE_DEBUG is not set
1073# CONFIG_USB_STORAGE_DATAFAB is not set 1095# CONFIG_USB_STORAGE_DATAFAB is not set
1074# CONFIG_USB_STORAGE_FREECOM is not set 1096# CONFIG_USB_STORAGE_FREECOM is not set
1075# CONFIG_USB_STORAGE_ISD200 is not set 1097# CONFIG_USB_STORAGE_ISD200 is not set
1076# CONFIG_USB_STORAGE_DPCM is not set
1077# CONFIG_USB_STORAGE_USBAT is not set 1098# CONFIG_USB_STORAGE_USBAT is not set
1078# CONFIG_USB_STORAGE_SDDR09 is not set 1099# CONFIG_USB_STORAGE_SDDR09 is not set
1079# CONFIG_USB_STORAGE_SDDR55 is not set 1100# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1109,7 +1130,6 @@ CONFIG_USB_STORAGE=y
1109# CONFIG_USB_LED is not set 1130# CONFIG_USB_LED is not set
1110# CONFIG_USB_CYPRESS_CY7C63 is not set 1131# CONFIG_USB_CYPRESS_CY7C63 is not set
1111# CONFIG_USB_CYTHERM is not set 1132# CONFIG_USB_CYTHERM is not set
1112# CONFIG_USB_PHIDGET is not set
1113# CONFIG_USB_IDMOUSE is not set 1133# CONFIG_USB_IDMOUSE is not set
1114# CONFIG_USB_FTDI_ELAN is not set 1134# CONFIG_USB_FTDI_ELAN is not set
1115# CONFIG_USB_APPLEDISPLAY is not set 1135# CONFIG_USB_APPLEDISPLAY is not set
@@ -1121,6 +1141,11 @@ CONFIG_USB_TEST=m
1121# CONFIG_USB_ISIGHTFW is not set 1141# CONFIG_USB_ISIGHTFW is not set
1122# CONFIG_USB_VST is not set 1142# CONFIG_USB_VST is not set
1123# CONFIG_USB_GADGET is not set 1143# CONFIG_USB_GADGET is not set
1144
1145#
1146# OTG and related infrastructure
1147#
1148# CONFIG_NOP_USB_XCEIV is not set
1124# CONFIG_UWB is not set 1149# CONFIG_UWB is not set
1125# CONFIG_MMC is not set 1150# CONFIG_MMC is not set
1126# CONFIG_MEMSTICK is not set 1151# CONFIG_MEMSTICK is not set
@@ -1182,6 +1207,7 @@ CONFIG_RTC_DRV_RS5C372=y
1182# 1207#
1183# CONFIG_RTC_DRV_SH is not set 1208# CONFIG_RTC_DRV_SH is not set
1184# CONFIG_DMADEVICES is not set 1209# CONFIG_DMADEVICES is not set
1210# CONFIG_AUXDISPLAY is not set
1185# CONFIG_UIO is not set 1211# CONFIG_UIO is not set
1186# CONFIG_STAGING is not set 1212# CONFIG_STAGING is not set
1187 1213
@@ -1204,6 +1230,7 @@ CONFIG_FS_POSIX_ACL=y
1204CONFIG_FILE_LOCKING=y 1230CONFIG_FILE_LOCKING=y
1205# CONFIG_XFS_FS is not set 1231# CONFIG_XFS_FS is not set
1206# CONFIG_OCFS2_FS is not set 1232# CONFIG_OCFS2_FS is not set
1233# CONFIG_BTRFS_FS is not set
1207CONFIG_DNOTIFY=y 1234CONFIG_DNOTIFY=y
1208CONFIG_INOTIFY=y 1235CONFIG_INOTIFY=y
1209CONFIG_INOTIFY_USER=y 1236CONFIG_INOTIFY_USER=y
@@ -1253,6 +1280,7 @@ CONFIG_MISC_FILESYSTEMS=y
1253# CONFIG_EFS_FS is not set 1280# CONFIG_EFS_FS is not set
1254# CONFIG_JFFS2_FS is not set 1281# CONFIG_JFFS2_FS is not set
1255# CONFIG_CRAMFS is not set 1282# CONFIG_CRAMFS is not set
1283# CONFIG_SQUASHFS is not set
1256# CONFIG_VXFS_FS is not set 1284# CONFIG_VXFS_FS is not set
1257CONFIG_MINIX_FS=y 1285CONFIG_MINIX_FS=y
1258# CONFIG_OMFS_FS is not set 1286# CONFIG_OMFS_FS is not set
@@ -1277,7 +1305,6 @@ CONFIG_EXPORTFS=y
1277CONFIG_NFS_COMMON=y 1305CONFIG_NFS_COMMON=y
1278CONFIG_SUNRPC=y 1306CONFIG_SUNRPC=y
1279CONFIG_SUNRPC_GSS=y 1307CONFIG_SUNRPC_GSS=y
1280# CONFIG_SUNRPC_REGISTER_V4 is not set
1281CONFIG_RPCSEC_GSS_KRB5=y 1308CONFIG_RPCSEC_GSS_KRB5=y
1282# CONFIG_RPCSEC_GSS_SPKM3 is not set 1309# CONFIG_RPCSEC_GSS_SPKM3 is not set
1283# CONFIG_SMB_FS is not set 1310# CONFIG_SMB_FS is not set
@@ -1382,6 +1409,7 @@ CONFIG_DEBUG_PREEMPT=y
1382# CONFIG_FAULT_INJECTION is not set 1409# CONFIG_FAULT_INJECTION is not set
1383# CONFIG_LATENCYTOP is not set 1410# CONFIG_LATENCYTOP is not set
1384CONFIG_SYSCTL_SYSCALL_CHECK=y 1411CONFIG_SYSCTL_SYSCALL_CHECK=y
1412# CONFIG_PAGE_POISONING is not set
1385CONFIG_HAVE_FUNCTION_TRACER=y 1413CONFIG_HAVE_FUNCTION_TRACER=y
1386CONFIG_HAVE_DYNAMIC_FTRACE=y 1414CONFIG_HAVE_DYNAMIC_FTRACE=y
1387CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1415CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -1397,7 +1425,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1397# CONFIG_BOOT_TRACER is not set 1425# CONFIG_BOOT_TRACER is not set
1398# CONFIG_TRACE_BRANCH_PROFILING is not set 1426# CONFIG_TRACE_BRANCH_PROFILING is not set
1399# CONFIG_STACK_TRACER is not set 1427# CONFIG_STACK_TRACER is not set
1400# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1401# CONFIG_SAMPLES is not set 1428# CONFIG_SAMPLES is not set
1402CONFIG_HAVE_ARCH_KGDB=y 1429CONFIG_HAVE_ARCH_KGDB=y
1403# CONFIG_KGDB is not set 1430# CONFIG_KGDB is not set
@@ -1433,10 +1460,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1433CONFIG_CRYPTO_HASH=y 1460CONFIG_CRYPTO_HASH=y
1434CONFIG_CRYPTO_HASH2=y 1461CONFIG_CRYPTO_HASH2=y
1435CONFIG_CRYPTO_RNG2=y 1462CONFIG_CRYPTO_RNG2=y
1463CONFIG_CRYPTO_PCOMP=y
1436CONFIG_CRYPTO_MANAGER=y 1464CONFIG_CRYPTO_MANAGER=y
1437CONFIG_CRYPTO_MANAGER2=y 1465CONFIG_CRYPTO_MANAGER2=y
1438# CONFIG_CRYPTO_GF128MUL is not set 1466# CONFIG_CRYPTO_GF128MUL is not set
1439# CONFIG_CRYPTO_NULL is not set 1467# CONFIG_CRYPTO_NULL is not set
1468CONFIG_CRYPTO_WORKQUEUE=y
1440# CONFIG_CRYPTO_CRYPTD is not set 1469# CONFIG_CRYPTO_CRYPTD is not set
1441# CONFIG_CRYPTO_AUTHENC is not set 1470# CONFIG_CRYPTO_AUTHENC is not set
1442# CONFIG_CRYPTO_TEST is not set 1471# CONFIG_CRYPTO_TEST is not set
@@ -1505,6 +1534,7 @@ CONFIG_CRYPTO_DES=y
1505# Compression 1534# Compression
1506# 1535#
1507# CONFIG_CRYPTO_DEFLATE is not set 1536# CONFIG_CRYPTO_DEFLATE is not set
1537# CONFIG_CRYPTO_ZLIB is not set
1508# CONFIG_CRYPTO_LZO is not set 1538# CONFIG_CRYPTO_LZO is not set
1509 1539
1510# 1540#
@@ -1525,7 +1555,7 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1525CONFIG_CRC32=y 1555CONFIG_CRC32=y
1526# CONFIG_CRC7 is not set 1556# CONFIG_CRC7 is not set
1527# CONFIG_LIBCRC32C is not set 1557# CONFIG_LIBCRC32C is not set
1528CONFIG_PLIST=y
1529CONFIG_HAS_IOMEM=y 1558CONFIG_HAS_IOMEM=y
1530CONFIG_HAS_IOPORT=y 1559CONFIG_HAS_IOPORT=y
1531CONFIG_HAS_DMA=y 1560CONFIG_HAS_DMA=y
1561CONFIG_NLATTR=y
diff --git a/arch/sh/configs/shmin_defconfig b/arch/sh/configs/shmin_defconfig
index 8ba10e1e08cd..d695e9061874 100644
--- a/arch/sh/configs/shmin_defconfig
+++ b/arch/sh/configs/shmin_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:09:00 2009 4# Thu Apr 2 19:19:03 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,13 +16,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y 16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_CLOCKEVENTS=y 17CONFIG_GENERIC_CLOCKEVENTS=y
18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 18# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
19# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 19CONFIG_ARCH_HIBERNATION_POSSIBLE=y
20CONFIG_STACKTRACE_SUPPORT=y 20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y 21CONFIG_LOCKDEP_SUPPORT=y
22CONFIG_HAVE_LATENCYTOP_SUPPORT=y 22CONFIG_HAVE_LATENCYTOP_SUPPORT=y
23# CONFIG_ARCH_HAS_ILOG2_U32 is not set 23# CONFIG_ARCH_HAS_ILOG2_U32 is not set
24# CONFIG_ARCH_HAS_ILOG2_U64 is not set 24# CONFIG_ARCH_HAS_ILOG2_U64 is not set
25CONFIG_ARCH_NO_VIRT_TO_BUS=y 25CONFIG_ARCH_NO_VIRT_TO_BUS=y
26CONFIG_ARCH_HAS_DEFAULT_IDLE=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27 28
28# 29#
@@ -39,15 +40,25 @@ CONFIG_LOCALVERSION_AUTO=y
39# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_CLASSIC_RCU=y
48# CONFIG_TREE_RCU is not set
49# CONFIG_PREEMPT_RCU is not set
50# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_PREEMPT_RCU_TRACE is not set
42# CONFIG_IKCONFIG is not set 52# CONFIG_IKCONFIG is not set
43CONFIG_LOG_BUF_SHIFT=14 53CONFIG_LOG_BUF_SHIFT=14
44# CONFIG_CGROUPS is not set
45# CONFIG_GROUP_SCHED is not set 54# CONFIG_GROUP_SCHED is not set
55# CONFIG_CGROUPS is not set
46# CONFIG_RELAY is not set 56# CONFIG_RELAY is not set
47# CONFIG_NAMESPACES is not set 57# CONFIG_NAMESPACES is not set
48# CONFIG_BLK_DEV_INITRD is not set 58# CONFIG_BLK_DEV_INITRD is not set
49CONFIG_CC_OPTIMIZE_FOR_SIZE=y 59CONFIG_CC_OPTIMIZE_FOR_SIZE=y
50CONFIG_SYSCTL=y 60CONFIG_SYSCTL=y
61CONFIG_ANON_INODES=y
51CONFIG_EMBEDDED=y 62CONFIG_EMBEDDED=y
52# CONFIG_UID16 is not set 63# CONFIG_UID16 is not set
53# CONFIG_SYSCTL_SYSCALL is not set 64# CONFIG_SYSCTL_SYSCALL is not set
@@ -56,10 +67,8 @@ CONFIG_EMBEDDED=y
56CONFIG_PRINTK=y 67CONFIG_PRINTK=y
57# CONFIG_BUG is not set 68# CONFIG_BUG is not set
58# CONFIG_ELF_CORE is not set 69# CONFIG_ELF_CORE is not set
59CONFIG_COMPAT_BRK=y
60# CONFIG_BASE_FULL is not set 70# CONFIG_BASE_FULL is not set
61# CONFIG_FUTEX is not set 71# CONFIG_FUTEX is not set
62CONFIG_ANON_INODES=y
63# CONFIG_EPOLL is not set 72# CONFIG_EPOLL is not set
64CONFIG_SIGNALFD=y 73CONFIG_SIGNALFD=y
65CONFIG_TIMERFD=y 74CONFIG_TIMERFD=y
@@ -67,6 +76,7 @@ CONFIG_EVENTFD=y
67# CONFIG_SHMEM is not set 76# CONFIG_SHMEM is not set
68CONFIG_AIO=y 77CONFIG_AIO=y
69CONFIG_VM_EVENT_COUNTERS=y 78CONFIG_VM_EVENT_COUNTERS=y
79CONFIG_COMPAT_BRK=y
70# CONFIG_SLAB is not set 80# CONFIG_SLAB is not set
71# CONFIG_SLUB is not set 81# CONFIG_SLUB is not set
72CONFIG_SLOB=y 82CONFIG_SLOB=y
@@ -97,11 +107,6 @@ CONFIG_IOSCHED_NOOP=y
97# CONFIG_DEFAULT_CFQ is not set 107# CONFIG_DEFAULT_CFQ is not set
98CONFIG_DEFAULT_NOOP=y 108CONFIG_DEFAULT_NOOP=y
99CONFIG_DEFAULT_IOSCHED="noop" 109CONFIG_DEFAULT_IOSCHED="noop"
100CONFIG_CLASSIC_RCU=y
101# CONFIG_TREE_RCU is not set
102# CONFIG_PREEMPT_RCU is not set
103# CONFIG_TREE_RCU_TRACE is not set
104# CONFIG_PREEMPT_RCU_TRACE is not set
105# CONFIG_FREEZER is not set 110# CONFIG_FREEZER is not set
106 111
107# 112#
@@ -136,6 +141,7 @@ CONFIG_CPU_SUBTYPE_SH7706=y
136# CONFIG_CPU_SUBTYPE_SH7770 is not set 141# CONFIG_CPU_SUBTYPE_SH7770 is not set
137# CONFIG_CPU_SUBTYPE_SH7780 is not set 142# CONFIG_CPU_SUBTYPE_SH7780 is not set
138# CONFIG_CPU_SUBTYPE_SH7785 is not set 143# CONFIG_CPU_SUBTYPE_SH7785 is not set
144# CONFIG_CPU_SUBTYPE_SH7786 is not set
139# CONFIG_CPU_SUBTYPE_SHX3 is not set 145# CONFIG_CPU_SUBTYPE_SHX3 is not set
140# CONFIG_CPU_SUBTYPE_SH7343 is not set 146# CONFIG_CPU_SUBTYPE_SH7343 is not set
141# CONFIG_CPU_SUBTYPE_SH7722 is not set 147# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -177,11 +183,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
177CONFIG_ZONE_DMA_FLAG=0 183CONFIG_ZONE_DMA_FLAG=0
178CONFIG_NR_QUICK=2 184CONFIG_NR_QUICK=2
179CONFIG_UNEVICTABLE_LRU=y 185CONFIG_UNEVICTABLE_LRU=y
186CONFIG_HAVE_MLOCK=y
187CONFIG_HAVE_MLOCKED_PAGE_BIT=y
180 188
181# 189#
182# Cache configuration 190# Cache configuration
183# 191#
184# CONFIG_SH_DIRECT_MAPPED is not set
185CONFIG_CACHE_WRITEBACK=y 192CONFIG_CACHE_WRITEBACK=y
186# CONFIG_CACHE_WRITETHROUGH is not set 193# CONFIG_CACHE_WRITETHROUGH is not set
187# CONFIG_CACHE_OFF is not set 194# CONFIG_CACHE_OFF is not set
@@ -267,7 +274,6 @@ CONFIG_CMDLINE="console=ttySC1,115200 root=1f01 mtdparts=phys_mapped_flash:64k(f
267# Executable file formats 274# Executable file formats
268# 275#
269CONFIG_BINFMT_ELF=y 276CONFIG_BINFMT_ELF=y
270# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
271# CONFIG_HAVE_AOUT is not set 277# CONFIG_HAVE_AOUT is not set
272# CONFIG_BINFMT_MISC is not set 278# CONFIG_BINFMT_MISC is not set
273 279
@@ -281,7 +287,6 @@ CONFIG_NET=y
281# 287#
282# Networking options 288# Networking options
283# 289#
284CONFIG_COMPAT_NET_DEV_OPS=y
285# CONFIG_PACKET is not set 290# CONFIG_PACKET is not set
286CONFIG_UNIX=y 291CONFIG_UNIX=y
287CONFIG_XFRM=y 292CONFIG_XFRM=y
@@ -335,6 +340,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
335# CONFIG_LAPB is not set 340# CONFIG_LAPB is not set
336# CONFIG_ECONET is not set 341# CONFIG_ECONET is not set
337# CONFIG_WAN_ROUTER is not set 342# CONFIG_WAN_ROUTER is not set
343# CONFIG_PHONET is not set
338# CONFIG_NET_SCHED is not set 344# CONFIG_NET_SCHED is not set
339# CONFIG_DCB is not set 345# CONFIG_DCB is not set
340 346
@@ -347,13 +353,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
347# CONFIG_IRDA is not set 353# CONFIG_IRDA is not set
348# CONFIG_BT is not set 354# CONFIG_BT is not set
349# CONFIG_AF_RXRPC is not set 355# CONFIG_AF_RXRPC is not set
350# CONFIG_PHONET is not set
351CONFIG_WIRELESS=y 356CONFIG_WIRELESS=y
352# CONFIG_CFG80211 is not set 357# CONFIG_CFG80211 is not set
353# CONFIG_WIRELESS_OLD_REGULATORY is not set 358# CONFIG_WIRELESS_OLD_REGULATORY is not set
354# CONFIG_WIRELESS_EXT is not set 359# CONFIG_WIRELESS_EXT is not set
355# CONFIG_LIB80211 is not set 360# CONFIG_LIB80211 is not set
356# CONFIG_MAC80211 is not set 361# CONFIG_MAC80211 is not set
362# CONFIG_WIMAX is not set
357# CONFIG_RFKILL is not set 363# CONFIG_RFKILL is not set
358# CONFIG_NET_9P is not set 364# CONFIG_NET_9P is not set
359 365
@@ -419,9 +425,7 @@ CONFIG_MTD_CFI_UTIL=y
419# 425#
420# CONFIG_MTD_COMPLEX_MAPPINGS is not set 426# CONFIG_MTD_COMPLEX_MAPPINGS is not set
421CONFIG_MTD_PHYSMAP=y 427CONFIG_MTD_PHYSMAP=y
422CONFIG_MTD_PHYSMAP_START=0xa0000000 428# CONFIG_MTD_PHYSMAP_COMPAT is not set
423CONFIG_MTD_PHYSMAP_LEN=0x80000
424CONFIG_MTD_PHYSMAP_BANKWIDTH=1
425# CONFIG_MTD_PLATRAM is not set 429# CONFIG_MTD_PLATRAM is not set
426 430
427# 431#
@@ -442,6 +446,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
442# CONFIG_MTD_ONENAND is not set 446# CONFIG_MTD_ONENAND is not set
443 447
444# 448#
449# LPDDR flash memory drivers
450#
451# CONFIG_MTD_LPDDR is not set
452
453#
445# UBI - Unsorted block images 454# UBI - Unsorted block images
446# 455#
447# CONFIG_MTD_UBI is not set 456# CONFIG_MTD_UBI is not set
@@ -456,9 +465,13 @@ CONFIG_BLK_DEV_LOOP=y
456# CONFIG_ATA_OVER_ETH is not set 465# CONFIG_ATA_OVER_ETH is not set
457# CONFIG_BLK_DEV_HD is not set 466# CONFIG_BLK_DEV_HD is not set
458CONFIG_MISC_DEVICES=y 467CONFIG_MISC_DEVICES=y
459# CONFIG_EEPROM_93CX6 is not set
460# CONFIG_ENCLOSURE_SERVICES is not set 468# CONFIG_ENCLOSURE_SERVICES is not set
461# CONFIG_C2PORT is not set 469# CONFIG_C2PORT is not set
470
471#
472# EEPROM support
473#
474# CONFIG_EEPROM_93CX6 is not set
462CONFIG_HAVE_IDE=y 475CONFIG_HAVE_IDE=y
463# CONFIG_IDE is not set 476# CONFIG_IDE is not set
464 477
@@ -472,6 +485,7 @@ CONFIG_HAVE_IDE=y
472# CONFIG_ATA is not set 485# CONFIG_ATA is not set
473# CONFIG_MD is not set 486# CONFIG_MD is not set
474CONFIG_NETDEVICES=y 487CONFIG_NETDEVICES=y
488CONFIG_COMPAT_NET_DEV_OPS=y
475# CONFIG_DUMMY is not set 489# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set 490# CONFIG_BONDING is not set
477# CONFIG_MACVLAN is not set 491# CONFIG_MACVLAN is not set
@@ -484,8 +498,10 @@ CONFIG_NET_ETHERNET=y
484# CONFIG_AX88796 is not set 498# CONFIG_AX88796 is not set
485# CONFIG_STNIC is not set 499# CONFIG_STNIC is not set
486# CONFIG_SMC91X is not set 500# CONFIG_SMC91X is not set
501# CONFIG_ETHOC is not set
487# CONFIG_SMC911X is not set 502# CONFIG_SMC911X is not set
488# CONFIG_SMSC911X is not set 503# CONFIG_SMSC911X is not set
504# CONFIG_DNET is not set
489# CONFIG_IBM_NEW_EMAC_ZMII is not set 505# CONFIG_IBM_NEW_EMAC_ZMII is not set
490# CONFIG_IBM_NEW_EMAC_RGMII is not set 506# CONFIG_IBM_NEW_EMAC_RGMII is not set
491# CONFIG_IBM_NEW_EMAC_TAH is not set 507# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -502,7 +518,10 @@ CONFIG_NETDEV_10000=y
502# 518#
503# CONFIG_WLAN_PRE80211 is not set 519# CONFIG_WLAN_PRE80211 is not set
504# CONFIG_WLAN_80211 is not set 520# CONFIG_WLAN_80211 is not set
505# CONFIG_IWLWIFI_LEDS is not set 521
522#
523# Enable WiMAX (Networking options) to see the WiMAX drivers
524#
506# CONFIG_WAN is not set 525# CONFIG_WAN is not set
507# CONFIG_PPP is not set 526# CONFIG_PPP is not set
508# CONFIG_SLIP is not set 527# CONFIG_SLIP is not set
@@ -549,6 +568,7 @@ CONFIG_LEGACY_PTYS=y
549CONFIG_LEGACY_PTY_COUNT=256 568CONFIG_LEGACY_PTY_COUNT=256
550# CONFIG_IPMI_HANDLER is not set 569# CONFIG_IPMI_HANDLER is not set
551CONFIG_HW_RANDOM=y 570CONFIG_HW_RANDOM=y
571# CONFIG_HW_RANDOM_TIMERIOMEM is not set
552# CONFIG_R3964 is not set 572# CONFIG_R3964 is not set
553# CONFIG_RAW_DRIVER is not set 573# CONFIG_RAW_DRIVER is not set
554# CONFIG_TCG_TPM is not set 574# CONFIG_TCG_TPM is not set
@@ -618,15 +638,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
618# 638#
619 639
620# 640#
621# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 641# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
622# 642#
623# CONFIG_USB_GADGET is not set 643# CONFIG_USB_GADGET is not set
644
645#
646# OTG and related infrastructure
647#
624# CONFIG_MMC is not set 648# CONFIG_MMC is not set
625# CONFIG_MEMSTICK is not set 649# CONFIG_MEMSTICK is not set
626# CONFIG_NEW_LEDS is not set 650# CONFIG_NEW_LEDS is not set
627# CONFIG_ACCESSIBILITY is not set 651# CONFIG_ACCESSIBILITY is not set
628# CONFIG_RTC_CLASS is not set 652# CONFIG_RTC_CLASS is not set
629# CONFIG_DMADEVICES is not set 653# CONFIG_DMADEVICES is not set
654# CONFIG_AUXDISPLAY is not set
630# CONFIG_UIO is not set 655# CONFIG_UIO is not set
631# CONFIG_STAGING is not set 656# CONFIG_STAGING is not set
632 657
@@ -641,6 +666,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
641# CONFIG_FS_POSIX_ACL is not set 666# CONFIG_FS_POSIX_ACL is not set
642CONFIG_FILE_LOCKING=y 667CONFIG_FILE_LOCKING=y
643# CONFIG_XFS_FS is not set 668# CONFIG_XFS_FS is not set
669# CONFIG_BTRFS_FS is not set
644# CONFIG_DNOTIFY is not set 670# CONFIG_DNOTIFY is not set
645# CONFIG_INOTIFY is not set 671# CONFIG_INOTIFY is not set
646# CONFIG_QUOTA is not set 672# CONFIG_QUOTA is not set
@@ -683,6 +709,7 @@ CONFIG_MISC_FILESYSTEMS=y
683# CONFIG_EFS_FS is not set 709# CONFIG_EFS_FS is not set
684# CONFIG_JFFS2_FS is not set 710# CONFIG_JFFS2_FS is not set
685CONFIG_CRAMFS=y 711CONFIG_CRAMFS=y
712# CONFIG_SQUASHFS is not set
686# CONFIG_VXFS_FS is not set 713# CONFIG_VXFS_FS is not set
687# CONFIG_MINIX_FS is not set 714# CONFIG_MINIX_FS is not set
688# CONFIG_OMFS_FS is not set 715# CONFIG_OMFS_FS is not set
@@ -702,7 +729,6 @@ CONFIG_LOCKD=y
702CONFIG_LOCKD_V4=y 729CONFIG_LOCKD_V4=y
703CONFIG_NFS_COMMON=y 730CONFIG_NFS_COMMON=y
704CONFIG_SUNRPC=y 731CONFIG_SUNRPC=y
705# CONFIG_SUNRPC_REGISTER_V4 is not set
706# CONFIG_RPCSEC_GSS_KRB5 is not set 732# CONFIG_RPCSEC_GSS_KRB5 is not set
707# CONFIG_RPCSEC_GSS_SPKM3 is not set 733# CONFIG_RPCSEC_GSS_SPKM3 is not set
708# CONFIG_SMB_FS is not set 734# CONFIG_SMB_FS is not set
@@ -740,7 +766,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
740# 766#
741# Tracers 767# Tracers
742# 768#
743# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
744# CONFIG_SAMPLES is not set 769# CONFIG_SAMPLES is not set
745CONFIG_HAVE_ARCH_KGDB=y 770CONFIG_HAVE_ARCH_KGDB=y
746CONFIG_SH_STANDARD_BIOS=y 771CONFIG_SH_STANDARD_BIOS=y
@@ -831,6 +856,7 @@ CONFIG_CRYPTO=y
831# Compression 856# Compression
832# 857#
833# CONFIG_CRYPTO_DEFLATE is not set 858# CONFIG_CRYPTO_DEFLATE is not set
859# CONFIG_CRYPTO_ZLIB is not set
834# CONFIG_CRYPTO_LZO is not set 860# CONFIG_CRYPTO_LZO is not set
835 861
836# 862#
@@ -855,3 +881,4 @@ CONFIG_ZLIB_INFLATE=y
855CONFIG_HAS_IOMEM=y 881CONFIG_HAS_IOMEM=y
856CONFIG_HAS_IOPORT=y 882CONFIG_HAS_IOPORT=y
857CONFIG_HAS_DMA=y 883CONFIG_HAS_DMA=y
884CONFIG_NLATTR=y
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
index ed90a7e81099..e3651f574399 100644
--- a/arch/sh/configs/shx3_defconfig
+++ b/arch/sh/configs/shx3_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:10:57 2009 4# Thu Apr 2 19:20:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,7 +19,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
19CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y 19CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
20CONFIG_GENERIC_LOCKBREAK=y 20CONFIG_GENERIC_LOCKBREAK=y
21# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 21# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
22# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_SMP=y 23CONFIG_SYS_SUPPORTS_SMP=y
24CONFIG_SYS_SUPPORTS_NUMA=y 24CONFIG_SYS_SUPPORTS_NUMA=y
25CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
@@ -27,6 +27,7 @@ CONFIG_LOCKDEP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U32 is not set 27# CONFIG_ARCH_HAS_ILOG2_U32 is not set
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
31 32
32# 33#
@@ -47,24 +48,35 @@ CONFIG_BSD_PROCESS_ACCT=y
47CONFIG_AUDIT=y 48CONFIG_AUDIT=y
48CONFIG_AUDITSYSCALL=y 49CONFIG_AUDITSYSCALL=y
49CONFIG_AUDIT_TREE=y 50CONFIG_AUDIT_TREE=y
51
52#
53# RCU Subsystem
54#
55# CONFIG_CLASSIC_RCU is not set
56# CONFIG_TREE_RCU is not set
57CONFIG_PREEMPT_RCU=y
58CONFIG_RCU_TRACE=y
59# CONFIG_TREE_RCU_TRACE is not set
60CONFIG_PREEMPT_RCU_TRACE=y
50CONFIG_IKCONFIG=y 61CONFIG_IKCONFIG=y
51CONFIG_IKCONFIG_PROC=y 62CONFIG_IKCONFIG_PROC=y
52CONFIG_LOG_BUF_SHIFT=14 63CONFIG_LOG_BUF_SHIFT=14
64CONFIG_GROUP_SCHED=y
65CONFIG_FAIR_GROUP_SCHED=y
66CONFIG_RT_GROUP_SCHED=y
67CONFIG_USER_SCHED=y
68# CONFIG_CGROUP_SCHED is not set
53CONFIG_CGROUPS=y 69CONFIG_CGROUPS=y
54# CONFIG_CGROUP_DEBUG is not set 70# CONFIG_CGROUP_DEBUG is not set
55CONFIG_CGROUP_NS=y 71CONFIG_CGROUP_NS=y
56CONFIG_CGROUP_FREEZER=y 72CONFIG_CGROUP_FREEZER=y
57CONFIG_CGROUP_DEVICE=y 73CONFIG_CGROUP_DEVICE=y
58# CONFIG_CPUSETS is not set 74# CONFIG_CPUSETS is not set
59CONFIG_GROUP_SCHED=y
60CONFIG_FAIR_GROUP_SCHED=y
61CONFIG_RT_GROUP_SCHED=y
62CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set
64CONFIG_CGROUP_CPUACCT=y 75CONFIG_CGROUP_CPUACCT=y
65CONFIG_RESOURCE_COUNTERS=y 76CONFIG_RESOURCE_COUNTERS=y
66CONFIG_MM_OWNER=y
67CONFIG_CGROUP_MEM_RES_CTLR=y 77CONFIG_CGROUP_MEM_RES_CTLR=y
78# CONFIG_CGROUP_MEM_RES_CTLR_SWAP is not set
79CONFIG_MM_OWNER=y
68CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
69CONFIG_SYSFS_DEPRECATED_V2=y 81CONFIG_SYSFS_DEPRECATED_V2=y
70CONFIG_RELAY=y 82CONFIG_RELAY=y
@@ -73,24 +85,23 @@ CONFIG_UTS_NS=y
73CONFIG_IPC_NS=y 85CONFIG_IPC_NS=y
74CONFIG_USER_NS=y 86CONFIG_USER_NS=y
75CONFIG_PID_NS=y 87CONFIG_PID_NS=y
88# CONFIG_NET_NS is not set
76# CONFIG_BLK_DEV_INITRD is not set 89# CONFIG_BLK_DEV_INITRD is not set
77# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 90# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
78CONFIG_SYSCTL=y 91CONFIG_SYSCTL=y
92CONFIG_ANON_INODES=y
79CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
80CONFIG_UID16=y 94CONFIG_UID16=y
81CONFIG_SYSCTL_SYSCALL=y 95CONFIG_SYSCTL_SYSCALL=y
82CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
83CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
84CONFIG_KALLSYMS_STRIP_GENERATED=y
85# CONFIG_KALLSYMS_EXTRA_PASS is not set 98# CONFIG_KALLSYMS_EXTRA_PASS is not set
86CONFIG_HOTPLUG=y 99CONFIG_HOTPLUG=y
87CONFIG_PRINTK=y 100CONFIG_PRINTK=y
88CONFIG_BUG=y 101CONFIG_BUG=y
89CONFIG_ELF_CORE=y 102CONFIG_ELF_CORE=y
90CONFIG_COMPAT_BRK=y
91CONFIG_BASE_FULL=y 103CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 104CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
94CONFIG_EPOLL=y 105CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y 106CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y 107CONFIG_TIMERFD=y
@@ -98,6 +109,7 @@ CONFIG_EVENTFD=y
98CONFIG_SHMEM=y 109CONFIG_SHMEM=y
99CONFIG_AIO=y 110CONFIG_AIO=y
100CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
112CONFIG_COMPAT_BRK=y
101# CONFIG_SLAB is not set 113# CONFIG_SLAB is not set
102# CONFIG_SLUB is not set 114# CONFIG_SLUB is not set
103CONFIG_SLOB=y 115CONFIG_SLOB=y
@@ -142,12 +154,6 @@ CONFIG_DEFAULT_AS=y
142# CONFIG_DEFAULT_CFQ is not set 154# CONFIG_DEFAULT_CFQ is not set
143# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
144CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
145# CONFIG_CLASSIC_RCU is not set
146# CONFIG_TREE_RCU is not set
147CONFIG_PREEMPT_RCU=y
148CONFIG_RCU_TRACE=y
149# CONFIG_TREE_RCU_TRACE is not set
150CONFIG_PREEMPT_RCU_TRACE=y
151CONFIG_FREEZER=y 157CONFIG_FREEZER=y
152 158
153# 159#
@@ -184,6 +190,7 @@ CONFIG_CPU_SHX3=y
184# CONFIG_CPU_SUBTYPE_SH7770 is not set 190# CONFIG_CPU_SUBTYPE_SH7770 is not set
185# CONFIG_CPU_SUBTYPE_SH7780 is not set 191# CONFIG_CPU_SUBTYPE_SH7780 is not set
186# CONFIG_CPU_SUBTYPE_SH7785 is not set 192# CONFIG_CPU_SUBTYPE_SH7785 is not set
193# CONFIG_CPU_SUBTYPE_SH7786 is not set
187CONFIG_CPU_SUBTYPE_SHX3=y 194CONFIG_CPU_SUBTYPE_SHX3=y
188# CONFIG_CPU_SUBTYPE_SH7343 is not set 195# CONFIG_CPU_SUBTYPE_SH7343 is not set
189# CONFIG_CPU_SUBTYPE_SH7722 is not set 196# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -240,11 +247,12 @@ CONFIG_MIGRATION=y
240CONFIG_ZONE_DMA_FLAG=0 247CONFIG_ZONE_DMA_FLAG=0
241CONFIG_NR_QUICK=2 248CONFIG_NR_QUICK=2
242CONFIG_UNEVICTABLE_LRU=y 249CONFIG_UNEVICTABLE_LRU=y
250CONFIG_HAVE_MLOCK=y
251CONFIG_HAVE_MLOCKED_PAGE_BIT=y
243 252
244# 253#
245# Cache configuration 254# Cache configuration
246# 255#
247# CONFIG_SH_DIRECT_MAPPED is not set
248CONFIG_CACHE_WRITEBACK=y 256CONFIG_CACHE_WRITEBACK=y
249# CONFIG_CACHE_WRITETHROUGH is not set 257# CONFIG_CACHE_WRITETHROUGH is not set
250# CONFIG_CACHE_OFF is not set 258# CONFIG_CACHE_OFF is not set
@@ -361,8 +369,6 @@ CONFIG_NET=y
361# 369#
362# Networking options 370# Networking options
363# 371#
364# CONFIG_NET_NS is not set
365CONFIG_COMPAT_NET_DEV_OPS=y
366# CONFIG_PACKET is not set 372# CONFIG_PACKET is not set
367# CONFIG_UNIX is not set 373# CONFIG_UNIX is not set
368CONFIG_XFRM=y 374CONFIG_XFRM=y
@@ -434,6 +440,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
434# CONFIG_LAPB is not set 440# CONFIG_LAPB is not set
435# CONFIG_ECONET is not set 441# CONFIG_ECONET is not set
436# CONFIG_WAN_ROUTER is not set 442# CONFIG_WAN_ROUTER is not set
443# CONFIG_PHONET is not set
437# CONFIG_NET_SCHED is not set 444# CONFIG_NET_SCHED is not set
438# CONFIG_DCB is not set 445# CONFIG_DCB is not set
439 446
@@ -442,6 +449,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
442# 449#
443# CONFIG_NET_PKTGEN is not set 450# CONFIG_NET_PKTGEN is not set
444# CONFIG_NET_TCPPROBE is not set 451# CONFIG_NET_TCPPROBE is not set
452# CONFIG_NET_DROP_MONITOR is not set
445# CONFIG_HAMRADIO is not set 453# CONFIG_HAMRADIO is not set
446CONFIG_CAN=m 454CONFIG_CAN=m
447CONFIG_CAN_RAW=m 455CONFIG_CAN_RAW=m
@@ -455,8 +463,8 @@ CONFIG_CAN_VCAN=m
455# CONFIG_IRDA is not set 463# CONFIG_IRDA is not set
456# CONFIG_BT is not set 464# CONFIG_BT is not set
457# CONFIG_AF_RXRPC is not set 465# CONFIG_AF_RXRPC is not set
458# CONFIG_PHONET is not set
459# CONFIG_WIRELESS is not set 466# CONFIG_WIRELESS is not set
467# CONFIG_WIMAX is not set
460# CONFIG_RFKILL is not set 468# CONFIG_RFKILL is not set
461# CONFIG_NET_9P is not set 469# CONFIG_NET_9P is not set
462 470
@@ -490,10 +498,18 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
490# CONFIG_ATA_OVER_ETH is not set 498# CONFIG_ATA_OVER_ETH is not set
491# CONFIG_BLK_DEV_HD is not set 499# CONFIG_BLK_DEV_HD is not set
492CONFIG_MISC_DEVICES=y 500CONFIG_MISC_DEVICES=y
493# CONFIG_EEPROM_93CX6 is not set
494# CONFIG_ICS932S401 is not set 501# CONFIG_ICS932S401 is not set
495# CONFIG_ENCLOSURE_SERVICES is not set 502# CONFIG_ENCLOSURE_SERVICES is not set
503# CONFIG_ISL29003 is not set
496# CONFIG_C2PORT is not set 504# CONFIG_C2PORT is not set
505
506#
507# EEPROM support
508#
509# CONFIG_EEPROM_AT24 is not set
510# CONFIG_EEPROM_AT25 is not set
511# CONFIG_EEPROM_LEGACY is not set
512# CONFIG_EEPROM_93CX6 is not set
497CONFIG_HAVE_IDE=y 513CONFIG_HAVE_IDE=y
498# CONFIG_IDE is not set 514# CONFIG_IDE is not set
499 515
@@ -539,6 +555,7 @@ CONFIG_SCSI_LOWLEVEL=y
539# CONFIG_LIBFC is not set 555# CONFIG_LIBFC is not set
540# CONFIG_SCSI_DEBUG is not set 556# CONFIG_SCSI_DEBUG is not set
541# CONFIG_SCSI_DH is not set 557# CONFIG_SCSI_DH is not set
558# CONFIG_SCSI_OSD_INITIATOR is not set
542CONFIG_ATA=y 559CONFIG_ATA=y
543# CONFIG_ATA_NONSTANDARD is not set 560# CONFIG_ATA_NONSTANDARD is not set
544CONFIG_SATA_PMP=y 561CONFIG_SATA_PMP=y
@@ -547,6 +564,7 @@ CONFIG_ATA_SFF=y
547CONFIG_PATA_PLATFORM=y 564CONFIG_PATA_PLATFORM=y
548# CONFIG_MD is not set 565# CONFIG_MD is not set
549CONFIG_NETDEVICES=y 566CONFIG_NETDEVICES=y
567CONFIG_COMPAT_NET_DEV_OPS=y
550# CONFIG_DUMMY is not set 568# CONFIG_DUMMY is not set
551# CONFIG_BONDING is not set 569# CONFIG_BONDING is not set
552# CONFIG_MACVLAN is not set 570# CONFIG_MACVLAN is not set
@@ -560,8 +578,10 @@ CONFIG_MII=y
560# CONFIG_STNIC is not set 578# CONFIG_STNIC is not set
561CONFIG_SMC91X=y 579CONFIG_SMC91X=y
562# CONFIG_ENC28J60 is not set 580# CONFIG_ENC28J60 is not set
581# CONFIG_ETHOC is not set
563# CONFIG_SMC911X is not set 582# CONFIG_SMC911X is not set
564# CONFIG_SMSC911X is not set 583# CONFIG_SMSC911X is not set
584# CONFIG_DNET is not set
565# CONFIG_IBM_NEW_EMAC_ZMII is not set 585# CONFIG_IBM_NEW_EMAC_ZMII is not set
566# CONFIG_IBM_NEW_EMAC_RGMII is not set 586# CONFIG_IBM_NEW_EMAC_RGMII is not set
567# CONFIG_IBM_NEW_EMAC_TAH is not set 587# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -578,7 +598,10 @@ CONFIG_SMC91X=y
578# 598#
579# CONFIG_WLAN_PRE80211 is not set 599# CONFIG_WLAN_PRE80211 is not set
580# CONFIG_WLAN_80211 is not set 600# CONFIG_WLAN_80211 is not set
581# CONFIG_IWLWIFI_LEDS is not set 601
602#
603# Enable WiMAX (Networking options) to see the WiMAX drivers
604#
582 605
583# 606#
584# USB Network Adapters 607# USB Network Adapters
@@ -670,12 +693,9 @@ CONFIG_I2C_HELPER_AUTO=y
670# Miscellaneous I2C Chip support 693# Miscellaneous I2C Chip support
671# 694#
672# CONFIG_DS1682 is not set 695# CONFIG_DS1682 is not set
673# CONFIG_EEPROM_AT24 is not set
674# CONFIG_EEPROM_LEGACY is not set
675# CONFIG_SENSORS_PCF8574 is not set 696# CONFIG_SENSORS_PCF8574 is not set
676# CONFIG_PCF8575 is not set 697# CONFIG_PCF8575 is not set
677# CONFIG_SENSORS_PCA9539 is not set 698# CONFIG_SENSORS_PCA9539 is not set
678# CONFIG_SENSORS_PCF8591 is not set
679# CONFIG_SENSORS_MAX6875 is not set 699# CONFIG_SENSORS_MAX6875 is not set
680# CONFIG_SENSORS_TSL2550 is not set 700# CONFIG_SENSORS_TSL2550 is not set
681# CONFIG_I2C_DEBUG_CORE is not set 701# CONFIG_I2C_DEBUG_CORE is not set
@@ -695,7 +715,6 @@ CONFIG_SPI_MASTER=y
695# 715#
696# SPI Protocol Masters 716# SPI Protocol Masters
697# 717#
698# CONFIG_EEPROM_AT25 is not set
699# CONFIG_SPI_SPIDEV is not set 718# CONFIG_SPI_SPIDEV is not set
700# CONFIG_SPI_TLE62X0 is not set 719# CONFIG_SPI_TLE62X0 is not set
701# CONFIG_W1 is not set 720# CONFIG_W1 is not set
@@ -732,6 +751,7 @@ CONFIG_SSB_POSSIBLE=y
732# CONFIG_MFD_TMIO is not set 751# CONFIG_MFD_TMIO is not set
733# CONFIG_MFD_WM8400 is not set 752# CONFIG_MFD_WM8400 is not set
734# CONFIG_MFD_WM8350_I2C is not set 753# CONFIG_MFD_WM8350_I2C is not set
754# CONFIG_MFD_PCF50633 is not set
735# CONFIG_REGULATOR is not set 755# CONFIG_REGULATOR is not set
736 756
737# 757#
@@ -788,7 +808,9 @@ CONFIG_USB_MON=y
788# USB Host Controller Drivers 808# USB Host Controller Drivers
789# 809#
790# CONFIG_USB_C67X00_HCD is not set 810# CONFIG_USB_C67X00_HCD is not set
811# CONFIG_USB_OXU210HP_HCD is not set
791# CONFIG_USB_ISP116X_HCD is not set 812# CONFIG_USB_ISP116X_HCD is not set
813# CONFIG_USB_ISP1760_HCD is not set
792# CONFIG_USB_SL811_HCD is not set 814# CONFIG_USB_SL811_HCD is not set
793CONFIG_USB_R8A66597_HCD=m 815CONFIG_USB_R8A66597_HCD=m
794# CONFIG_USB_HWA_HCD is not set 816# CONFIG_USB_HWA_HCD is not set
@@ -803,11 +825,11 @@ CONFIG_USB_R8A66597_HCD=m
803# CONFIG_USB_TMC is not set 825# CONFIG_USB_TMC is not set
804 826
805# 827#
806# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 828# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
807# 829#
808 830
809# 831#
810# see USB_STORAGE Help for more information 832# also be needed; see USB_STORAGE Help for more info
811# 833#
812# CONFIG_USB_STORAGE is not set 834# CONFIG_USB_STORAGE is not set
813# CONFIG_USB_LIBUSUAL is not set 835# CONFIG_USB_LIBUSUAL is not set
@@ -837,7 +859,6 @@ CONFIG_USB_R8A66597_HCD=m
837# CONFIG_USB_LED is not set 859# CONFIG_USB_LED is not set
838# CONFIG_USB_CYPRESS_CY7C63 is not set 860# CONFIG_USB_CYPRESS_CY7C63 is not set
839# CONFIG_USB_CYTHERM is not set 861# CONFIG_USB_CYTHERM is not set
840# CONFIG_USB_PHIDGET is not set
841# CONFIG_USB_IDMOUSE is not set 862# CONFIG_USB_IDMOUSE is not set
842# CONFIG_USB_FTDI_ELAN is not set 863# CONFIG_USB_FTDI_ELAN is not set
843# CONFIG_USB_APPLEDISPLAY is not set 864# CONFIG_USB_APPLEDISPLAY is not set
@@ -860,10 +881,12 @@ CONFIG_USB_GADGET_SELECTED=y
860# CONFIG_USB_GADGET_PXA25X is not set 881# CONFIG_USB_GADGET_PXA25X is not set
861# CONFIG_USB_GADGET_PXA27X is not set 882# CONFIG_USB_GADGET_PXA27X is not set
862# CONFIG_USB_GADGET_S3C2410 is not set 883# CONFIG_USB_GADGET_S3C2410 is not set
884# CONFIG_USB_GADGET_IMX is not set
863CONFIG_USB_GADGET_M66592=y 885CONFIG_USB_GADGET_M66592=y
864CONFIG_USB_M66592=y 886CONFIG_USB_M66592=y
865# CONFIG_USB_GADGET_AMD5536UDC is not set 887# CONFIG_USB_GADGET_AMD5536UDC is not set
866# CONFIG_USB_GADGET_FSL_QE is not set 888# CONFIG_USB_GADGET_FSL_QE is not set
889# CONFIG_USB_GADGET_CI13XXX is not set
867# CONFIG_USB_GADGET_NET2280 is not set 890# CONFIG_USB_GADGET_NET2280 is not set
868# CONFIG_USB_GADGET_GOKU is not set 891# CONFIG_USB_GADGET_GOKU is not set
869# CONFIG_USB_GADGET_DUMMY_HCD is not set 892# CONFIG_USB_GADGET_DUMMY_HCD is not set
@@ -876,6 +899,11 @@ CONFIG_USB_GADGET_DUALSPEED=y
876# CONFIG_USB_MIDI_GADGET is not set 899# CONFIG_USB_MIDI_GADGET is not set
877# CONFIG_USB_G_PRINTER is not set 900# CONFIG_USB_G_PRINTER is not set
878# CONFIG_USB_CDC_COMPOSITE is not set 901# CONFIG_USB_CDC_COMPOSITE is not set
902
903#
904# OTG and related infrastructure
905#
906# CONFIG_NOP_USB_XCEIV is not set
879# CONFIG_MMC is not set 907# CONFIG_MMC is not set
880# CONFIG_MEMSTICK is not set 908# CONFIG_MEMSTICK is not set
881# CONFIG_NEW_LEDS is not set 909# CONFIG_NEW_LEDS is not set
@@ -942,6 +970,7 @@ CONFIG_RTC_INTF_DEV=y
942# 970#
943CONFIG_RTC_DRV_SH=y 971CONFIG_RTC_DRV_SH=y
944# CONFIG_DMADEVICES is not set 972# CONFIG_DMADEVICES is not set
973# CONFIG_AUXDISPLAY is not set
945CONFIG_UIO=m 974CONFIG_UIO=m
946# CONFIG_UIO_PDRV is not set 975# CONFIG_UIO_PDRV is not set
947# CONFIG_UIO_PDRV_GENIRQ is not set 976# CONFIG_UIO_PDRV_GENIRQ is not set
@@ -969,6 +998,7 @@ CONFIG_FS_MBCACHE=y
969CONFIG_FILE_LOCKING=y 998CONFIG_FILE_LOCKING=y
970# CONFIG_XFS_FS is not set 999# CONFIG_XFS_FS is not set
971# CONFIG_OCFS2_FS is not set 1000# CONFIG_OCFS2_FS is not set
1001# CONFIG_BTRFS_FS is not set
972CONFIG_DNOTIFY=y 1002CONFIG_DNOTIFY=y
973CONFIG_INOTIFY=y 1003CONFIG_INOTIFY=y
974CONFIG_INOTIFY_USER=y 1004CONFIG_INOTIFY_USER=y
@@ -1012,6 +1042,7 @@ CONFIG_MISC_FILESYSTEMS=y
1012# CONFIG_BFS_FS is not set 1042# CONFIG_BFS_FS is not set
1013# CONFIG_EFS_FS is not set 1043# CONFIG_EFS_FS is not set
1014# CONFIG_CRAMFS is not set 1044# CONFIG_CRAMFS is not set
1045# CONFIG_SQUASHFS is not set
1015# CONFIG_VXFS_FS is not set 1046# CONFIG_VXFS_FS is not set
1016# CONFIG_MINIX_FS is not set 1047# CONFIG_MINIX_FS is not set
1017# CONFIG_OMFS_FS is not set 1048# CONFIG_OMFS_FS is not set
@@ -1086,6 +1117,7 @@ CONFIG_FRAME_POINTER=y
1086# CONFIG_LKDTM is not set 1117# CONFIG_LKDTM is not set
1087# CONFIG_FAULT_INJECTION is not set 1118# CONFIG_FAULT_INJECTION is not set
1088# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1119# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1120# CONFIG_PAGE_POISONING is not set
1089CONFIG_NOP_TRACER=y 1121CONFIG_NOP_TRACER=y
1090CONFIG_HAVE_FUNCTION_TRACER=y 1122CONFIG_HAVE_FUNCTION_TRACER=y
1091CONFIG_HAVE_DYNAMIC_FTRACE=y 1123CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -1105,7 +1137,7 @@ CONFIG_TRACING=y
1105# CONFIG_TRACE_BRANCH_PROFILING is not set 1137# CONFIG_TRACE_BRANCH_PROFILING is not set
1106# CONFIG_STACK_TRACER is not set 1138# CONFIG_STACK_TRACER is not set
1107# CONFIG_FTRACE_STARTUP_TEST is not set 1139# CONFIG_FTRACE_STARTUP_TEST is not set
1108# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1140# CONFIG_DYNAMIC_DEBUG is not set
1109# CONFIG_SAMPLES is not set 1141# CONFIG_SAMPLES is not set
1110CONFIG_HAVE_ARCH_KGDB=y 1142CONFIG_HAVE_ARCH_KGDB=y
1111# CONFIG_KGDB is not set 1143# CONFIG_KGDB is not set
@@ -1205,6 +1237,7 @@ CONFIG_CRYPTO=y
1205# Compression 1237# Compression
1206# 1238#
1207# CONFIG_CRYPTO_DEFLATE is not set 1239# CONFIG_CRYPTO_DEFLATE is not set
1240# CONFIG_CRYPTO_ZLIB is not set
1208# CONFIG_CRYPTO_LZO is not set 1241# CONFIG_CRYPTO_LZO is not set
1209 1242
1210# 1243#
@@ -1226,7 +1259,7 @@ CONFIG_CRC32=y
1226# CONFIG_CRC7 is not set 1259# CONFIG_CRC7 is not set
1227# CONFIG_LIBCRC32C is not set 1260# CONFIG_LIBCRC32C is not set
1228CONFIG_AUDIT_GENERIC=y 1261CONFIG_AUDIT_GENERIC=y
1229CONFIG_PLIST=y
1230CONFIG_HAS_IOMEM=y 1262CONFIG_HAS_IOMEM=y
1231CONFIG_HAS_IOPORT=y 1263CONFIG_HAS_IOPORT=y
1232CONFIG_HAS_DMA=y 1264CONFIG_HAS_DMA=y
1265CONFIG_NLATTR=y
diff --git a/arch/sh/configs/snapgear_defconfig b/arch/sh/configs/snapgear_defconfig
index 98377e502650..6960f60bf52e 100644
--- a/arch/sh/configs/snapgear_defconfig
+++ b/arch/sh/configs/snapgear_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:14:08 2009 4# Thu Apr 2 19:21:39 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -41,18 +42,32 @@ CONFIG_LOCALVERSION_AUTO=y
41# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
48CONFIG_SYSFS_DEPRECATED=y 58CONFIG_SYSFS_DEPRECATED=y
49CONFIG_SYSFS_DEPRECATED_V2=y 59CONFIG_SYSFS_DEPRECATED_V2=y
50# CONFIG_RELAY is not set 60# CONFIG_RELAY is not set
51# CONFIG_NAMESPACES is not set 61# CONFIG_NAMESPACES is not set
52CONFIG_BLK_DEV_INITRD=y 62CONFIG_BLK_DEV_INITRD=y
53CONFIG_INITRAMFS_SOURCE="" 63CONFIG_INITRAMFS_SOURCE=""
64CONFIG_RD_GZIP=y
65# CONFIG_RD_BZIP2 is not set
66# CONFIG_RD_LZMA is not set
67CONFIG_INITRAMFS_COMPRESSION_NONE=y
54CONFIG_CC_OPTIMIZE_FOR_SIZE=y 68CONFIG_CC_OPTIMIZE_FOR_SIZE=y
55CONFIG_SYSCTL=y 69CONFIG_SYSCTL=y
70CONFIG_ANON_INODES=y
56CONFIG_EMBEDDED=y 71CONFIG_EMBEDDED=y
57CONFIG_UID16=y 72CONFIG_UID16=y
58# CONFIG_SYSCTL_SYSCALL is not set 73# CONFIG_SYSCTL_SYSCALL is not set
@@ -62,10 +77,8 @@ CONFIG_KALLSYMS=y
62CONFIG_PRINTK=y 77CONFIG_PRINTK=y
63CONFIG_BUG=y 78CONFIG_BUG=y
64CONFIG_ELF_CORE=y 79CONFIG_ELF_CORE=y
65CONFIG_COMPAT_BRK=y
66CONFIG_BASE_FULL=y 80CONFIG_BASE_FULL=y
67CONFIG_FUTEX=y 81CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y 82CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y 83CONFIG_SIGNALFD=y
71CONFIG_TIMERFD=y 84CONFIG_TIMERFD=y
@@ -74,6 +87,7 @@ CONFIG_SHMEM=y
74CONFIG_AIO=y 87CONFIG_AIO=y
75CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_PCI_QUIRKS=y 89CONFIG_PCI_QUIRKS=y
90CONFIG_COMPAT_BRK=y
77CONFIG_SLAB=y 91CONFIG_SLAB=y
78# CONFIG_SLUB is not set 92# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set 93# CONFIG_SLOB is not set
@@ -107,11 +121,6 @@ CONFIG_DEFAULT_AS=y
107# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
108# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
109CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
110CONFIG_CLASSIC_RCU=y
111# CONFIG_TREE_RCU is not set
112# CONFIG_PREEMPT_RCU is not set
113# CONFIG_TREE_RCU_TRACE is not set
114# CONFIG_PREEMPT_RCU_TRACE is not set
115# CONFIG_FREEZER is not set 124# CONFIG_FREEZER is not set
116 125
117# 126#
@@ -146,6 +155,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
146# CONFIG_CPU_SUBTYPE_SH7770 is not set 155# CONFIG_CPU_SUBTYPE_SH7770 is not set
147# CONFIG_CPU_SUBTYPE_SH7780 is not set 156# CONFIG_CPU_SUBTYPE_SH7780 is not set
148# CONFIG_CPU_SUBTYPE_SH7785 is not set 157# CONFIG_CPU_SUBTYPE_SH7785 is not set
158# CONFIG_CPU_SUBTYPE_SH7786 is not set
149# CONFIG_CPU_SUBTYPE_SHX3 is not set 159# CONFIG_CPU_SUBTYPE_SHX3 is not set
150# CONFIG_CPU_SUBTYPE_SH7343 is not set 160# CONFIG_CPU_SUBTYPE_SH7343 is not set
151# CONFIG_CPU_SUBTYPE_SH7722 is not set 161# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -187,11 +197,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
187CONFIG_ZONE_DMA_FLAG=0 197CONFIG_ZONE_DMA_FLAG=0
188CONFIG_NR_QUICK=2 198CONFIG_NR_QUICK=2
189CONFIG_UNEVICTABLE_LRU=y 199CONFIG_UNEVICTABLE_LRU=y
200CONFIG_HAVE_MLOCK=y
201CONFIG_HAVE_MLOCKED_PAGE_BIT=y
190 202
191# 203#
192# Cache configuration 204# Cache configuration
193# 205#
194# CONFIG_SH_DIRECT_MAPPED is not set
195CONFIG_CACHE_WRITEBACK=y 206CONFIG_CACHE_WRITEBACK=y
196# CONFIG_CACHE_WRITETHROUGH is not set 207# CONFIG_CACHE_WRITETHROUGH is not set
197# CONFIG_CACHE_OFF is not set 208# CONFIG_CACHE_OFF is not set
@@ -239,6 +250,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
239# 250#
240CONFIG_SH_DMA_API=y 251CONFIG_SH_DMA_API=y
241CONFIG_SH_DMA=y 252CONFIG_SH_DMA=y
253CONFIG_SH_DMA_IRQ_MULTI=y
242CONFIG_NR_ONCHIP_DMA_CHANNELS=8 254CONFIG_NR_ONCHIP_DMA_CHANNELS=8
243# CONFIG_NR_DMA_CHANNELS_BOOL is not set 255# CONFIG_NR_DMA_CHANNELS_BOOL is not set
244 256
@@ -288,6 +300,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
288# CONFIG_PCIEPORTBUS is not set 300# CONFIG_PCIEPORTBUS is not set
289# CONFIG_ARCH_SUPPORTS_MSI is not set 301# CONFIG_ARCH_SUPPORTS_MSI is not set
290CONFIG_PCI_LEGACY=y 302CONFIG_PCI_LEGACY=y
303# CONFIG_PCI_STUB is not set
304# CONFIG_PCI_IOV is not set
291 305
292# 306#
293# Executable file formats 307# Executable file formats
@@ -307,7 +321,6 @@ CONFIG_NET=y
307# 321#
308# Networking options 322# Networking options
309# 323#
310CONFIG_COMPAT_NET_DEV_OPS=y
311# CONFIG_PACKET is not set 324# CONFIG_PACKET is not set
312# CONFIG_UNIX is not set 325# CONFIG_UNIX is not set
313# CONFIG_NET_KEY is not set 326# CONFIG_NET_KEY is not set
@@ -352,6 +365,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
352# CONFIG_LAPB is not set 365# CONFIG_LAPB is not set
353# CONFIG_ECONET is not set 366# CONFIG_ECONET is not set
354# CONFIG_WAN_ROUTER is not set 367# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set
355# CONFIG_NET_SCHED is not set 369# CONFIG_NET_SCHED is not set
356# CONFIG_DCB is not set 370# CONFIG_DCB is not set
357 371
@@ -364,13 +378,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_IRDA is not set 378# CONFIG_IRDA is not set
365# CONFIG_BT is not set 379# CONFIG_BT is not set
366# CONFIG_AF_RXRPC is not set 380# CONFIG_AF_RXRPC is not set
367# CONFIG_PHONET is not set
368CONFIG_WIRELESS=y 381CONFIG_WIRELESS=y
369# CONFIG_CFG80211 is not set 382# CONFIG_CFG80211 is not set
370# CONFIG_WIRELESS_OLD_REGULATORY is not set 383# CONFIG_WIRELESS_OLD_REGULATORY is not set
371# CONFIG_WIRELESS_EXT is not set 384# CONFIG_WIRELESS_EXT is not set
372# CONFIG_LIB80211 is not set 385# CONFIG_LIB80211 is not set
373# CONFIG_MAC80211 is not set 386# CONFIG_MAC80211 is not set
387# CONFIG_WIMAX is not set
374# CONFIG_RFKILL is not set 388# CONFIG_RFKILL is not set
375# CONFIG_NET_9P is not set 389# CONFIG_NET_9P is not set
376 390
@@ -464,6 +478,11 @@ CONFIG_MTD_PLATRAM=y
464# CONFIG_MTD_ONENAND is not set 478# CONFIG_MTD_ONENAND is not set
465 479
466# 480#
481# LPDDR flash memory drivers
482#
483# CONFIG_MTD_LPDDR is not set
484
485#
467# UBI - Unsorted block images 486# UBI - Unsorted block images
468# 487#
469# CONFIG_MTD_UBI is not set 488# CONFIG_MTD_UBI is not set
@@ -509,6 +528,7 @@ CONFIG_HAVE_IDE=y
509# CONFIG_IEEE1394 is not set 528# CONFIG_IEEE1394 is not set
510# CONFIG_I2O is not set 529# CONFIG_I2O is not set
511CONFIG_NETDEVICES=y 530CONFIG_NETDEVICES=y
531CONFIG_COMPAT_NET_DEV_OPS=y
512# CONFIG_DUMMY is not set 532# CONFIG_DUMMY is not set
513# CONFIG_BONDING is not set 533# CONFIG_BONDING is not set
514# CONFIG_MACVLAN is not set 534# CONFIG_MACVLAN is not set
@@ -526,8 +546,10 @@ CONFIG_MII=y
526# CONFIG_CASSINI is not set 546# CONFIG_CASSINI is not set
527# CONFIG_NET_VENDOR_3COM is not set 547# CONFIG_NET_VENDOR_3COM is not set
528# CONFIG_SMC91X is not set 548# CONFIG_SMC91X is not set
549# CONFIG_ETHOC is not set
529# CONFIG_SMC911X is not set 550# CONFIG_SMC911X is not set
530# CONFIG_SMSC911X is not set 551# CONFIG_SMSC911X is not set
552# CONFIG_DNET is not set
531# CONFIG_NET_TULIP is not set 553# CONFIG_NET_TULIP is not set
532# CONFIG_HP100 is not set 554# CONFIG_HP100 is not set
533# CONFIG_IBM_NEW_EMAC_ZMII is not set 555# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -571,7 +593,10 @@ CONFIG_8139TOO_PIO=y
571# 593#
572# CONFIG_WLAN_PRE80211 is not set 594# CONFIG_WLAN_PRE80211 is not set
573# CONFIG_WLAN_80211 is not set 595# CONFIG_WLAN_80211 is not set
574# CONFIG_IWLWIFI_LEDS is not set 596
597#
598# Enable WiMAX (Networking options) to see the WiMAX drivers
599#
575# CONFIG_WAN is not set 600# CONFIG_WAN is not set
576# CONFIG_FDDI is not set 601# CONFIG_FDDI is not set
577# CONFIG_HIPPI is not set 602# CONFIG_HIPPI is not set
@@ -711,6 +736,7 @@ CONFIG_SSB_POSSIBLE=y
711# CONFIG_INFINIBAND is not set 736# CONFIG_INFINIBAND is not set
712# CONFIG_RTC_CLASS is not set 737# CONFIG_RTC_CLASS is not set
713# CONFIG_DMADEVICES is not set 738# CONFIG_DMADEVICES is not set
739# CONFIG_AUXDISPLAY is not set
714# CONFIG_UIO is not set 740# CONFIG_UIO is not set
715# CONFIG_STAGING is not set 741# CONFIG_STAGING is not set
716 742
@@ -728,6 +754,7 @@ CONFIG_EXT2_FS=y
728CONFIG_FILE_LOCKING=y 754CONFIG_FILE_LOCKING=y
729# CONFIG_XFS_FS is not set 755# CONFIG_XFS_FS is not set
730# CONFIG_OCFS2_FS is not set 756# CONFIG_OCFS2_FS is not set
757# CONFIG_BTRFS_FS is not set
731# CONFIG_DNOTIFY is not set 758# CONFIG_DNOTIFY is not set
732# CONFIG_INOTIFY is not set 759# CONFIG_INOTIFY is not set
733# CONFIG_QUOTA is not set 760# CONFIG_QUOTA is not set
@@ -771,6 +798,7 @@ CONFIG_MISC_FILESYSTEMS=y
771# CONFIG_EFS_FS is not set 798# CONFIG_EFS_FS is not set
772# CONFIG_JFFS2_FS is not set 799# CONFIG_JFFS2_FS is not set
773CONFIG_CRAMFS=y 800CONFIG_CRAMFS=y
801# CONFIG_SQUASHFS is not set
774# CONFIG_VXFS_FS is not set 802# CONFIG_VXFS_FS is not set
775# CONFIG_MINIX_FS is not set 803# CONFIG_MINIX_FS is not set
776# CONFIG_OMFS_FS is not set 804# CONFIG_OMFS_FS is not set
@@ -820,7 +848,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
820# 848#
821# Tracers 849# Tracers
822# 850#
823# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
824# CONFIG_SAMPLES is not set 851# CONFIG_SAMPLES is not set
825CONFIG_HAVE_ARCH_KGDB=y 852CONFIG_HAVE_ARCH_KGDB=y
826# CONFIG_SH_STANDARD_BIOS is not set 853# CONFIG_SH_STANDARD_BIOS is not set
@@ -849,7 +876,8 @@ CONFIG_CRC32=y
849# CONFIG_CRC7 is not set 876# CONFIG_CRC7 is not set
850# CONFIG_LIBCRC32C is not set 877# CONFIG_LIBCRC32C is not set
851CONFIG_ZLIB_INFLATE=y 878CONFIG_ZLIB_INFLATE=y
852CONFIG_PLIST=y 879CONFIG_DECOMPRESS_GZIP=y
853CONFIG_HAS_IOMEM=y 880CONFIG_HAS_IOMEM=y
854CONFIG_HAS_IOPORT=y 881CONFIG_HAS_IOPORT=y
855CONFIG_HAS_DMA=y 882CONFIG_HAS_DMA=y
883CONFIG_NLATTR=y
diff --git a/arch/sh/configs/systemh_defconfig b/arch/sh/configs/systemh_defconfig
index 72703bf57afa..7ea639bc5936 100644
--- a/arch/sh/configs/systemh_defconfig
+++ b/arch/sh/configs/systemh_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:15:56 2009 4# Thu Apr 2 19:23:31 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,13 +17,14 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_STACKTRACE_SUPPORT=y 21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 23CONFIG_HAVE_LATENCYTOP_SUPPORT=y
24# CONFIG_ARCH_HAS_ILOG2_U32 is not set 24# CONFIG_ARCH_HAS_ILOG2_U32 is not set
25# CONFIG_ARCH_HAS_ILOG2_U64 is not set 25# CONFIG_ARCH_HAS_ILOG2_U64 is not set
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 26CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_ARCH_HAS_DEFAULT_IDLE=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 29
29# 30#
@@ -38,18 +39,32 @@ CONFIG_LOCALVERSION_AUTO=y
38CONFIG_SWAP=y 39CONFIG_SWAP=y
39# CONFIG_SYSVIPC is not set 40# CONFIG_SYSVIPC is not set
40# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
42
43#
44# RCU Subsystem
45#
46CONFIG_CLASSIC_RCU=y
47# CONFIG_TREE_RCU is not set
48# CONFIG_PREEMPT_RCU is not set
49# CONFIG_TREE_RCU_TRACE is not set
50# CONFIG_PREEMPT_RCU_TRACE is not set
41# CONFIG_IKCONFIG is not set 51# CONFIG_IKCONFIG is not set
42CONFIG_LOG_BUF_SHIFT=14 52CONFIG_LOG_BUF_SHIFT=14
43# CONFIG_CGROUPS is not set
44# CONFIG_GROUP_SCHED is not set 53# CONFIG_GROUP_SCHED is not set
54# CONFIG_CGROUPS is not set
45CONFIG_SYSFS_DEPRECATED=y 55CONFIG_SYSFS_DEPRECATED=y
46CONFIG_SYSFS_DEPRECATED_V2=y 56CONFIG_SYSFS_DEPRECATED_V2=y
47# CONFIG_RELAY is not set 57# CONFIG_RELAY is not set
48# CONFIG_NAMESPACES is not set 58# CONFIG_NAMESPACES is not set
49CONFIG_BLK_DEV_INITRD=y 59CONFIG_BLK_DEV_INITRD=y
50CONFIG_INITRAMFS_SOURCE="" 60CONFIG_INITRAMFS_SOURCE=""
61CONFIG_RD_GZIP=y
62# CONFIG_RD_BZIP2 is not set
63# CONFIG_RD_LZMA is not set
64CONFIG_INITRAMFS_COMPRESSION_NONE=y
51# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 65# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
52CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
53CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
54CONFIG_UID16=y 69CONFIG_UID16=y
55# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
@@ -59,10 +74,8 @@ CONFIG_KALLSYMS=y
59CONFIG_PRINTK=y 74CONFIG_PRINTK=y
60CONFIG_BUG=y 75CONFIG_BUG=y
61CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 78CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y
66CONFIG_EPOLL=y 79CONFIG_EPOLL=y
67CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
@@ -70,6 +83,7 @@ CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 83CONFIG_SHMEM=y
71CONFIG_AIO=y 84CONFIG_AIO=y
72CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
86CONFIG_COMPAT_BRK=y
73CONFIG_SLAB=y 87CONFIG_SLAB=y
74# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
75# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
@@ -109,11 +123,6 @@ CONFIG_DEFAULT_AS=y
109# CONFIG_DEFAULT_CFQ is not set 123# CONFIG_DEFAULT_CFQ is not set
110# CONFIG_DEFAULT_NOOP is not set 124# CONFIG_DEFAULT_NOOP is not set
111CONFIG_DEFAULT_IOSCHED="anticipatory" 125CONFIG_DEFAULT_IOSCHED="anticipatory"
112CONFIG_CLASSIC_RCU=y
113# CONFIG_TREE_RCU is not set
114# CONFIG_PREEMPT_RCU is not set
115# CONFIG_TREE_RCU_TRACE is not set
116# CONFIG_PREEMPT_RCU_TRACE is not set
117# CONFIG_FREEZER is not set 126# CONFIG_FREEZER is not set
118 127
119# 128#
@@ -148,6 +157,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
148# CONFIG_CPU_SUBTYPE_SH7770 is not set 157# CONFIG_CPU_SUBTYPE_SH7770 is not set
149# CONFIG_CPU_SUBTYPE_SH7780 is not set 158# CONFIG_CPU_SUBTYPE_SH7780 is not set
150# CONFIG_CPU_SUBTYPE_SH7785 is not set 159# CONFIG_CPU_SUBTYPE_SH7785 is not set
160# CONFIG_CPU_SUBTYPE_SH7786 is not set
151# CONFIG_CPU_SUBTYPE_SHX3 is not set 161# CONFIG_CPU_SUBTYPE_SHX3 is not set
152# CONFIG_CPU_SUBTYPE_SH7343 is not set 162# CONFIG_CPU_SUBTYPE_SH7343 is not set
153# CONFIG_CPU_SUBTYPE_SH7722 is not set 163# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -189,11 +199,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
189CONFIG_ZONE_DMA_FLAG=0 199CONFIG_ZONE_DMA_FLAG=0
190CONFIG_NR_QUICK=2 200CONFIG_NR_QUICK=2
191CONFIG_UNEVICTABLE_LRU=y 201CONFIG_UNEVICTABLE_LRU=y
202CONFIG_HAVE_MLOCK=y
203CONFIG_HAVE_MLOCKED_PAGE_BIT=y
192 204
193# 205#
194# Cache configuration 206# Cache configuration
195# 207#
196# CONFIG_SH_DIRECT_MAPPED is not set
197CONFIG_CACHE_WRITEBACK=y 208CONFIG_CACHE_WRITEBACK=y
198# CONFIG_CACHE_WRITETHROUGH is not set 209# CONFIG_CACHE_WRITETHROUGH is not set
199# CONFIG_CACHE_OFF is not set 210# CONFIG_CACHE_OFF is not set
@@ -318,9 +329,13 @@ CONFIG_BLK_DEV_RAM_SIZE=1024
318# CONFIG_CDROM_PKTCDVD is not set 329# CONFIG_CDROM_PKTCDVD is not set
319# CONFIG_BLK_DEV_HD is not set 330# CONFIG_BLK_DEV_HD is not set
320CONFIG_MISC_DEVICES=y 331CONFIG_MISC_DEVICES=y
321# CONFIG_EEPROM_93CX6 is not set
322# CONFIG_ENCLOSURE_SERVICES is not set 332# CONFIG_ENCLOSURE_SERVICES is not set
323# CONFIG_C2PORT is not set 333# CONFIG_C2PORT is not set
334
335#
336# EEPROM support
337#
338# CONFIG_EEPROM_93CX6 is not set
324CONFIG_HAVE_IDE=y 339CONFIG_HAVE_IDE=y
325# CONFIG_IDE is not set 340# CONFIG_IDE is not set
326 341
@@ -372,6 +387,7 @@ CONFIG_LEGACY_PTYS=y
372CONFIG_LEGACY_PTY_COUNT=256 387CONFIG_LEGACY_PTY_COUNT=256
373# CONFIG_IPMI_HANDLER is not set 388# CONFIG_IPMI_HANDLER is not set
374CONFIG_HW_RANDOM=y 389CONFIG_HW_RANDOM=y
390# CONFIG_HW_RANDOM_TIMERIOMEM is not set
375# CONFIG_R3964 is not set 391# CONFIG_R3964 is not set
376# CONFIG_RAW_DRIVER is not set 392# CONFIG_RAW_DRIVER is not set
377# CONFIG_TCG_TPM is not set 393# CONFIG_TCG_TPM is not set
@@ -452,15 +468,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
452# 468#
453 469
454# 470#
455# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 471# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
456# 472#
457# CONFIG_USB_GADGET is not set 473# CONFIG_USB_GADGET is not set
474
475#
476# OTG and related infrastructure
477#
458# CONFIG_MMC is not set 478# CONFIG_MMC is not set
459# CONFIG_MEMSTICK is not set 479# CONFIG_MEMSTICK is not set
460# CONFIG_NEW_LEDS is not set 480# CONFIG_NEW_LEDS is not set
461# CONFIG_ACCESSIBILITY is not set 481# CONFIG_ACCESSIBILITY is not set
462# CONFIG_RTC_CLASS is not set 482# CONFIG_RTC_CLASS is not set
463# CONFIG_DMADEVICES is not set 483# CONFIG_DMADEVICES is not set
484# CONFIG_AUXDISPLAY is not set
464# CONFIG_UIO is not set 485# CONFIG_UIO is not set
465# CONFIG_STAGING is not set 486# CONFIG_STAGING is not set
466 487
@@ -475,6 +496,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
475# CONFIG_FS_POSIX_ACL is not set 496# CONFIG_FS_POSIX_ACL is not set
476CONFIG_FILE_LOCKING=y 497CONFIG_FILE_LOCKING=y
477# CONFIG_XFS_FS is not set 498# CONFIG_XFS_FS is not set
499# CONFIG_BTRFS_FS is not set
478CONFIG_DNOTIFY=y 500CONFIG_DNOTIFY=y
479CONFIG_INOTIFY=y 501CONFIG_INOTIFY=y
480CONFIG_INOTIFY_USER=y 502CONFIG_INOTIFY_USER=y
@@ -518,6 +540,7 @@ CONFIG_MISC_FILESYSTEMS=y
518# CONFIG_BFS_FS is not set 540# CONFIG_BFS_FS is not set
519# CONFIG_EFS_FS is not set 541# CONFIG_EFS_FS is not set
520CONFIG_CRAMFS=y 542CONFIG_CRAMFS=y
543# CONFIG_SQUASHFS is not set
521# CONFIG_VXFS_FS is not set 544# CONFIG_VXFS_FS is not set
522# CONFIG_MINIX_FS is not set 545# CONFIG_MINIX_FS is not set
523# CONFIG_OMFS_FS is not set 546# CONFIG_OMFS_FS is not set
@@ -558,7 +581,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
558# 581#
559# Tracers 582# Tracers
560# 583#
561# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
562# CONFIG_SAMPLES is not set 584# CONFIG_SAMPLES is not set
563CONFIG_HAVE_ARCH_KGDB=y 585CONFIG_HAVE_ARCH_KGDB=y
564# CONFIG_SH_STANDARD_BIOS is not set 586# CONFIG_SH_STANDARD_BIOS is not set
@@ -587,7 +609,7 @@ CONFIG_CRC32=y
587# CONFIG_CRC7 is not set 609# CONFIG_CRC7 is not set
588# CONFIG_LIBCRC32C is not set 610# CONFIG_LIBCRC32C is not set
589CONFIG_ZLIB_INFLATE=y 611CONFIG_ZLIB_INFLATE=y
590CONFIG_PLIST=y 612CONFIG_DECOMPRESS_GZIP=y
591CONFIG_HAS_IOMEM=y 613CONFIG_HAS_IOMEM=y
592CONFIG_HAS_IOPORT=y 614CONFIG_HAS_IOPORT=y
593CONFIG_HAS_DMA=y 615CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
index 01fc1defb33b..bbeb4c6ebb95 100644
--- a/arch/sh/configs/titan_defconfig
+++ b/arch/sh/configs/titan_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:17:19 2009 4# Thu Apr 2 19:24:55 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_PCI=y 21CONFIG_SYS_SUPPORTS_PCI=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -42,19 +43,33 @@ CONFIG_POSIX_MQUEUE=y
42# CONFIG_BSD_PROCESS_ACCT is not set 43# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set 44# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
46
47#
48# RCU Subsystem
49#
50CONFIG_CLASSIC_RCU=y
51# CONFIG_TREE_RCU is not set
52# CONFIG_PREEMPT_RCU is not set
53# CONFIG_TREE_RCU_TRACE is not set
54# CONFIG_PREEMPT_RCU_TRACE is not set
45CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
46CONFIG_IKCONFIG_PROC=y 56CONFIG_IKCONFIG_PROC=y
47CONFIG_LOG_BUF_SHIFT=16 57CONFIG_LOG_BUF_SHIFT=16
48# CONFIG_CGROUPS is not set
49# CONFIG_GROUP_SCHED is not set 58# CONFIG_GROUP_SCHED is not set
59# CONFIG_CGROUPS is not set
50CONFIG_SYSFS_DEPRECATED=y 60CONFIG_SYSFS_DEPRECATED=y
51CONFIG_SYSFS_DEPRECATED_V2=y 61CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_RELAY is not set 62# CONFIG_RELAY is not set
53# CONFIG_NAMESPACES is not set 63# CONFIG_NAMESPACES is not set
54CONFIG_BLK_DEV_INITRD=y 64CONFIG_BLK_DEV_INITRD=y
55CONFIG_INITRAMFS_SOURCE="" 65CONFIG_INITRAMFS_SOURCE=""
66CONFIG_RD_GZIP=y
67# CONFIG_RD_BZIP2 is not set
68# CONFIG_RD_LZMA is not set
69CONFIG_INITRAMFS_COMPRESSION_NONE=y
56# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 70# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
57CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
72CONFIG_ANON_INODES=y
58CONFIG_EMBEDDED=y 73CONFIG_EMBEDDED=y
59CONFIG_UID16=y 74CONFIG_UID16=y
60# CONFIG_SYSCTL_SYSCALL is not set 75# CONFIG_SYSCTL_SYSCALL is not set
@@ -65,10 +80,8 @@ CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y 80CONFIG_PRINTK=y
66CONFIG_BUG=y 81CONFIG_BUG=y
67CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
68CONFIG_COMPAT_BRK=y
69CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
70CONFIG_FUTEX=y 84CONFIG_FUTEX=y
71CONFIG_ANON_INODES=y
72CONFIG_EPOLL=y 85CONFIG_EPOLL=y
73CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -77,6 +90,7 @@ CONFIG_SHMEM=y
77CONFIG_AIO=y 90CONFIG_AIO=y
78CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
79CONFIG_PCI_QUIRKS=y 92CONFIG_PCI_QUIRKS=y
93CONFIG_COMPAT_BRK=y
80CONFIG_SLAB=y 94CONFIG_SLAB=y
81# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set 96# CONFIG_SLOB is not set
@@ -116,11 +130,6 @@ CONFIG_DEFAULT_AS=y
116# CONFIG_DEFAULT_CFQ is not set 130# CONFIG_DEFAULT_CFQ is not set
117# CONFIG_DEFAULT_NOOP is not set 131# CONFIG_DEFAULT_NOOP is not set
118CONFIG_DEFAULT_IOSCHED="anticipatory" 132CONFIG_DEFAULT_IOSCHED="anticipatory"
119CONFIG_CLASSIC_RCU=y
120# CONFIG_TREE_RCU is not set
121# CONFIG_PREEMPT_RCU is not set
122# CONFIG_TREE_RCU_TRACE is not set
123# CONFIG_PREEMPT_RCU_TRACE is not set
124# CONFIG_FREEZER is not set 133# CONFIG_FREEZER is not set
125 134
126# 135#
@@ -155,6 +164,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
155# CONFIG_CPU_SUBTYPE_SH7770 is not set 164# CONFIG_CPU_SUBTYPE_SH7770 is not set
156# CONFIG_CPU_SUBTYPE_SH7780 is not set 165# CONFIG_CPU_SUBTYPE_SH7780 is not set
157# CONFIG_CPU_SUBTYPE_SH7785 is not set 166# CONFIG_CPU_SUBTYPE_SH7785 is not set
167# CONFIG_CPU_SUBTYPE_SH7786 is not set
158# CONFIG_CPU_SUBTYPE_SHX3 is not set 168# CONFIG_CPU_SUBTYPE_SHX3 is not set
159# CONFIG_CPU_SUBTYPE_SH7343 is not set 169# CONFIG_CPU_SUBTYPE_SH7343 is not set
160# CONFIG_CPU_SUBTYPE_SH7722 is not set 170# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -196,11 +206,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
196CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
198CONFIG_UNEVICTABLE_LRU=y 208CONFIG_UNEVICTABLE_LRU=y
209CONFIG_HAVE_MLOCK=y
210CONFIG_HAVE_MLOCKED_PAGE_BIT=y
199 211
200# 212#
201# Cache configuration 213# Cache configuration
202# 214#
203# CONFIG_SH_DIRECT_MAPPED is not set
204CONFIG_CACHE_WRITEBACK=y 215CONFIG_CACHE_WRITEBACK=y
205# CONFIG_CACHE_WRITETHROUGH is not set 216# CONFIG_CACHE_WRITETHROUGH is not set
206# CONFIG_CACHE_OFF is not set 217# CONFIG_CACHE_OFF is not set
@@ -248,6 +259,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
248# 259#
249CONFIG_SH_DMA_API=y 260CONFIG_SH_DMA_API=y
250CONFIG_SH_DMA=y 261CONFIG_SH_DMA=y
262CONFIG_SH_DMA_IRQ_MULTI=y
251CONFIG_NR_ONCHIP_DMA_CHANNELS=8 263CONFIG_NR_ONCHIP_DMA_CHANNELS=8
252# CONFIG_NR_DMA_CHANNELS_BOOL is not set 264# CONFIG_NR_DMA_CHANNELS_BOOL is not set
253 265
@@ -299,6 +311,8 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
299# CONFIG_ARCH_SUPPORTS_MSI is not set 311# CONFIG_ARCH_SUPPORTS_MSI is not set
300CONFIG_PCI_LEGACY=y 312CONFIG_PCI_LEGACY=y
301# CONFIG_PCI_DEBUG is not set 313# CONFIG_PCI_DEBUG is not set
314# CONFIG_PCI_STUB is not set
315# CONFIG_PCI_IOV is not set
302# CONFIG_PCCARD is not set 316# CONFIG_PCCARD is not set
303CONFIG_HOTPLUG_PCI=y 317CONFIG_HOTPLUG_PCI=y
304# CONFIG_HOTPLUG_PCI_FAKE is not set 318# CONFIG_HOTPLUG_PCI_FAKE is not set
@@ -323,7 +337,6 @@ CONFIG_NET=y
323# 337#
324# Networking options 338# Networking options
325# 339#
326CONFIG_COMPAT_NET_DEV_OPS=y
327CONFIG_PACKET=y 340CONFIG_PACKET=y
328CONFIG_PACKET_MMAP=y 341CONFIG_PACKET_MMAP=y
329CONFIG_UNIX=y 342CONFIG_UNIX=y
@@ -406,6 +419,7 @@ CONFIG_NETFILTER_NETLINK_LOG=m
406CONFIG_NETFILTER_XTABLES=m 419CONFIG_NETFILTER_XTABLES=m
407CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 420CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
408# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 421# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
422CONFIG_NETFILTER_XT_TARGET_HL=m
409CONFIG_NETFILTER_XT_TARGET_MARK=m 423CONFIG_NETFILTER_XT_TARGET_MARK=m
410# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 424# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
411CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 425CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
@@ -418,6 +432,7 @@ CONFIG_NETFILTER_XT_MATCH_DCCP=m
418# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 432# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
419CONFIG_NETFILTER_XT_MATCH_ESP=m 433CONFIG_NETFILTER_XT_MATCH_ESP=m
420# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 434# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
435CONFIG_NETFILTER_XT_MATCH_HL=m
421# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set 436# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
422CONFIG_NETFILTER_XT_MATCH_LENGTH=m 437CONFIG_NETFILTER_XT_MATCH_LENGTH=m
423CONFIG_NETFILTER_XT_MATCH_LIMIT=m 438CONFIG_NETFILTER_XT_MATCH_LIMIT=m
@@ -475,11 +490,11 @@ CONFIG_IP6_NF_MATCH_HL=m
475CONFIG_IP6_NF_MATCH_IPV6HEADER=m 490CONFIG_IP6_NF_MATCH_IPV6HEADER=m
476# CONFIG_IP6_NF_MATCH_MH is not set 491# CONFIG_IP6_NF_MATCH_MH is not set
477CONFIG_IP6_NF_MATCH_RT=m 492CONFIG_IP6_NF_MATCH_RT=m
493CONFIG_IP6_NF_TARGET_HL=m
478CONFIG_IP6_NF_TARGET_LOG=m 494CONFIG_IP6_NF_TARGET_LOG=m
479CONFIG_IP6_NF_FILTER=m 495CONFIG_IP6_NF_FILTER=m
480CONFIG_IP6_NF_TARGET_REJECT=m 496CONFIG_IP6_NF_TARGET_REJECT=m
481CONFIG_IP6_NF_MANGLE=m 497CONFIG_IP6_NF_MANGLE=m
482CONFIG_IP6_NF_TARGET_HL=m
483CONFIG_IP6_NF_RAW=m 498CONFIG_IP6_NF_RAW=m
484# CONFIG_BRIDGE_NF_EBTABLES is not set 499# CONFIG_BRIDGE_NF_EBTABLES is not set
485# CONFIG_IP_DCCP is not set 500# CONFIG_IP_DCCP is not set
@@ -500,6 +515,7 @@ CONFIG_LLC=y
500# CONFIG_LAPB is not set 515# CONFIG_LAPB is not set
501# CONFIG_ECONET is not set 516# CONFIG_ECONET is not set
502# CONFIG_WAN_ROUTER is not set 517# CONFIG_WAN_ROUTER is not set
518# CONFIG_PHONET is not set
503CONFIG_NET_SCHED=y 519CONFIG_NET_SCHED=y
504 520
505# 521#
@@ -565,7 +581,6 @@ CONFIG_NET_SCH_FIFO=y
565# CONFIG_IRDA is not set 581# CONFIG_IRDA is not set
566# CONFIG_BT is not set 582# CONFIG_BT is not set
567# CONFIG_AF_RXRPC is not set 583# CONFIG_AF_RXRPC is not set
568# CONFIG_PHONET is not set
569CONFIG_FIB_RULES=y 584CONFIG_FIB_RULES=y
570CONFIG_WIRELESS=y 585CONFIG_WIRELESS=y
571# CONFIG_CFG80211 is not set 586# CONFIG_CFG80211 is not set
@@ -574,6 +589,7 @@ CONFIG_WIRELESS_EXT=y
574CONFIG_WIRELESS_EXT_SYSFS=y 589CONFIG_WIRELESS_EXT_SYSFS=y
575# CONFIG_LIB80211 is not set 590# CONFIG_LIB80211 is not set
576# CONFIG_MAC80211 is not set 591# CONFIG_MAC80211 is not set
592# CONFIG_WIMAX is not set
577# CONFIG_RFKILL is not set 593# CONFIG_RFKILL is not set
578# CONFIG_NET_9P is not set 594# CONFIG_NET_9P is not set
579 595
@@ -599,6 +615,7 @@ CONFIG_MTD_DEBUG=y
599CONFIG_MTD_DEBUG_VERBOSE=0 615CONFIG_MTD_DEBUG_VERBOSE=0
600# CONFIG_MTD_CONCAT is not set 616# CONFIG_MTD_CONCAT is not set
601# CONFIG_MTD_PARTITIONS is not set 617# CONFIG_MTD_PARTITIONS is not set
618# CONFIG_MTD_TESTS is not set
602 619
603# 620#
604# User Modules And Translation Layers 621# User Modules And Translation Layers
@@ -675,6 +692,11 @@ CONFIG_MTD_NAND_IDS=m
675# CONFIG_MTD_ONENAND is not set 692# CONFIG_MTD_ONENAND is not set
676 693
677# 694#
695# LPDDR flash memory drivers
696#
697# CONFIG_MTD_LPDDR is not set
698
699#
678# UBI - Unsorted block images 700# UBI - Unsorted block images
679# 701#
680# CONFIG_MTD_UBI is not set 702# CONFIG_MTD_UBI is not set
@@ -698,12 +720,16 @@ CONFIG_ATA_OVER_ETH=m
698# CONFIG_BLK_DEV_HD is not set 720# CONFIG_BLK_DEV_HD is not set
699CONFIG_MISC_DEVICES=y 721CONFIG_MISC_DEVICES=y
700# CONFIG_PHANTOM is not set 722# CONFIG_PHANTOM is not set
701# CONFIG_EEPROM_93CX6 is not set
702# CONFIG_SGI_IOC4 is not set 723# CONFIG_SGI_IOC4 is not set
703# CONFIG_TIFM_CORE is not set 724# CONFIG_TIFM_CORE is not set
704# CONFIG_ENCLOSURE_SERVICES is not set 725# CONFIG_ENCLOSURE_SERVICES is not set
705# CONFIG_HP_ILO is not set 726# CONFIG_HP_ILO is not set
706# CONFIG_C2PORT is not set 727# CONFIG_C2PORT is not set
728
729#
730# EEPROM support
731#
732# CONFIG_EEPROM_93CX6 is not set
707CONFIG_HAVE_IDE=y 733CONFIG_HAVE_IDE=y
708# CONFIG_IDE is not set 734# CONFIG_IDE is not set
709 735
@@ -760,6 +786,7 @@ CONFIG_SCSI_LOWLEVEL=y
760# CONFIG_MEGARAID_NEWGEN is not set 786# CONFIG_MEGARAID_NEWGEN is not set
761# CONFIG_MEGARAID_LEGACY is not set 787# CONFIG_MEGARAID_LEGACY is not set
762# CONFIG_MEGARAID_SAS is not set 788# CONFIG_MEGARAID_SAS is not set
789# CONFIG_SCSI_MPT2SAS is not set
763# CONFIG_SCSI_HPTIOP is not set 790# CONFIG_SCSI_HPTIOP is not set
764# CONFIG_LIBFC is not set 791# CONFIG_LIBFC is not set
765# CONFIG_FCOE is not set 792# CONFIG_FCOE is not set
@@ -781,6 +808,7 @@ CONFIG_SCSI_LOWLEVEL=y
781# CONFIG_SCSI_DEBUG is not set 808# CONFIG_SCSI_DEBUG is not set
782# CONFIG_SCSI_SRP is not set 809# CONFIG_SCSI_SRP is not set
783# CONFIG_SCSI_DH is not set 810# CONFIG_SCSI_DH is not set
811# CONFIG_SCSI_OSD_INITIATOR is not set
784# CONFIG_ATA is not set 812# CONFIG_ATA is not set
785# CONFIG_MD is not set 813# CONFIG_MD is not set
786# CONFIG_FUSION is not set 814# CONFIG_FUSION is not set
@@ -796,6 +824,7 @@ CONFIG_SCSI_LOWLEVEL=y
796# CONFIG_IEEE1394 is not set 824# CONFIG_IEEE1394 is not set
797# CONFIG_I2O is not set 825# CONFIG_I2O is not set
798CONFIG_NETDEVICES=y 826CONFIG_NETDEVICES=y
827CONFIG_COMPAT_NET_DEV_OPS=y
799# CONFIG_IFB is not set 828# CONFIG_IFB is not set
800# CONFIG_DUMMY is not set 829# CONFIG_DUMMY is not set
801# CONFIG_BONDING is not set 830# CONFIG_BONDING is not set
@@ -832,8 +861,10 @@ CONFIG_MII=y
832# CONFIG_CASSINI is not set 861# CONFIG_CASSINI is not set
833# CONFIG_NET_VENDOR_3COM is not set 862# CONFIG_NET_VENDOR_3COM is not set
834# CONFIG_SMC91X is not set 863# CONFIG_SMC91X is not set
864# CONFIG_ETHOC is not set
835# CONFIG_SMC911X is not set 865# CONFIG_SMC911X is not set
836# CONFIG_SMSC911X is not set 866# CONFIG_SMSC911X is not set
867# CONFIG_DNET is not set
837# CONFIG_NET_TULIP is not set 868# CONFIG_NET_TULIP is not set
838# CONFIG_HP100 is not set 869# CONFIG_HP100 is not set
839# CONFIG_IBM_NEW_EMAC_ZMII is not set 870# CONFIG_IBM_NEW_EMAC_ZMII is not set
@@ -888,6 +919,7 @@ CONFIG_NETDEV_1000=y
888# CONFIG_QLA3XXX is not set 919# CONFIG_QLA3XXX is not set
889# CONFIG_ATL1 is not set 920# CONFIG_ATL1 is not set
890# CONFIG_ATL1E is not set 921# CONFIG_ATL1E is not set
922# CONFIG_ATL1C is not set
891# CONFIG_JME is not set 923# CONFIG_JME is not set
892CONFIG_NETDEV_10000=y 924CONFIG_NETDEV_10000=y
893# CONFIG_CHELSIO_T1 is not set 925# CONFIG_CHELSIO_T1 is not set
@@ -906,6 +938,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
906# CONFIG_BNX2X is not set 938# CONFIG_BNX2X is not set
907# CONFIG_QLGE is not set 939# CONFIG_QLGE is not set
908# CONFIG_SFC is not set 940# CONFIG_SFC is not set
941# CONFIG_BE2NET is not set
909# CONFIG_TR is not set 942# CONFIG_TR is not set
910 943
911# 944#
@@ -913,7 +946,10 @@ CONFIG_CHELSIO_T3_DEPENDS=y
913# 946#
914# CONFIG_WLAN_PRE80211 is not set 947# CONFIG_WLAN_PRE80211 is not set
915# CONFIG_WLAN_80211 is not set 948# CONFIG_WLAN_80211 is not set
916# CONFIG_IWLWIFI_LEDS is not set 949
950#
951# Enable WiMAX (Networking options) to see the WiMAX drivers
952#
917 953
918# 954#
919# USB Network Adapters 955# USB Network Adapters
@@ -1025,6 +1061,7 @@ CONFIG_LEGACY_PTYS=y
1025CONFIG_LEGACY_PTY_COUNT=256 1061CONFIG_LEGACY_PTY_COUNT=256
1026# CONFIG_IPMI_HANDLER is not set 1062# CONFIG_IPMI_HANDLER is not set
1027CONFIG_HW_RANDOM=y 1063CONFIG_HW_RANDOM=y
1064# CONFIG_HW_RANDOM_TIMERIOMEM is not set
1028# CONFIG_R3964 is not set 1065# CONFIG_R3964 is not set
1029# CONFIG_APPLICOM is not set 1066# CONFIG_APPLICOM is not set
1030# CONFIG_RAW_DRIVER is not set 1067# CONFIG_RAW_DRIVER is not set
@@ -1174,6 +1211,7 @@ CONFIG_USB_MON=y
1174CONFIG_USB_EHCI_HCD=y 1211CONFIG_USB_EHCI_HCD=y
1175CONFIG_USB_EHCI_ROOT_HUB_TT=y 1212CONFIG_USB_EHCI_ROOT_HUB_TT=y
1176CONFIG_USB_EHCI_TT_NEWSCHED=y 1213CONFIG_USB_EHCI_TT_NEWSCHED=y
1214# CONFIG_USB_OXU210HP_HCD is not set
1177# CONFIG_USB_ISP116X_HCD is not set 1215# CONFIG_USB_ISP116X_HCD is not set
1178# CONFIG_USB_ISP1760_HCD is not set 1216# CONFIG_USB_ISP1760_HCD is not set
1179CONFIG_USB_OHCI_HCD=y 1217CONFIG_USB_OHCI_HCD=y
@@ -1195,18 +1233,17 @@ CONFIG_USB_PRINTER=m
1195# CONFIG_USB_TMC is not set 1233# CONFIG_USB_TMC is not set
1196 1234
1197# 1235#
1198# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1236# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1199# 1237#
1200 1238
1201# 1239#
1202# see USB_STORAGE Help for more information 1240# also be needed; see USB_STORAGE Help for more info
1203# 1241#
1204CONFIG_USB_STORAGE=y 1242CONFIG_USB_STORAGE=y
1205# CONFIG_USB_STORAGE_DEBUG is not set 1243# CONFIG_USB_STORAGE_DEBUG is not set
1206# CONFIG_USB_STORAGE_DATAFAB is not set 1244# CONFIG_USB_STORAGE_DATAFAB is not set
1207# CONFIG_USB_STORAGE_FREECOM is not set 1245# CONFIG_USB_STORAGE_FREECOM is not set
1208# CONFIG_USB_STORAGE_ISD200 is not set 1246# CONFIG_USB_STORAGE_ISD200 is not set
1209# CONFIG_USB_STORAGE_DPCM is not set
1210# CONFIG_USB_STORAGE_USBAT is not set 1247# CONFIG_USB_STORAGE_USBAT is not set
1211# CONFIG_USB_STORAGE_SDDR09 is not set 1248# CONFIG_USB_STORAGE_SDDR09 is not set
1212# CONFIG_USB_STORAGE_SDDR55 is not set 1249# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1235,7 +1272,7 @@ CONFIG_USB_SERIAL_ARK3116=m
1235# CONFIG_USB_SERIAL_CH341 is not set 1272# CONFIG_USB_SERIAL_CH341 is not set
1236# CONFIG_USB_SERIAL_WHITEHEAT is not set 1273# CONFIG_USB_SERIAL_WHITEHEAT is not set
1237# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 1274# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1238# CONFIG_USB_SERIAL_CP2101 is not set 1275# CONFIG_USB_SERIAL_CP210X is not set
1239# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 1276# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1240# CONFIG_USB_SERIAL_EMPEG is not set 1277# CONFIG_USB_SERIAL_EMPEG is not set
1241# CONFIG_USB_SERIAL_FTDI_SIO is not set 1278# CONFIG_USB_SERIAL_FTDI_SIO is not set
@@ -1259,15 +1296,19 @@ CONFIG_USB_SERIAL_ARK3116=m
1259# CONFIG_USB_SERIAL_NAVMAN is not set 1296# CONFIG_USB_SERIAL_NAVMAN is not set
1260CONFIG_USB_SERIAL_PL2303=m 1297CONFIG_USB_SERIAL_PL2303=m
1261# CONFIG_USB_SERIAL_OTI6858 is not set 1298# CONFIG_USB_SERIAL_OTI6858 is not set
1299# CONFIG_USB_SERIAL_QUALCOMM is not set
1262# CONFIG_USB_SERIAL_SPCP8X5 is not set 1300# CONFIG_USB_SERIAL_SPCP8X5 is not set
1263# CONFIG_USB_SERIAL_HP4X is not set 1301# CONFIG_USB_SERIAL_HP4X is not set
1264# CONFIG_USB_SERIAL_SAFE is not set 1302# CONFIG_USB_SERIAL_SAFE is not set
1303# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1265# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1304# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1305# CONFIG_USB_SERIAL_SYMBOL is not set
1266# CONFIG_USB_SERIAL_TI is not set 1306# CONFIG_USB_SERIAL_TI is not set
1267# CONFIG_USB_SERIAL_CYBERJACK is not set 1307# CONFIG_USB_SERIAL_CYBERJACK is not set
1268# CONFIG_USB_SERIAL_XIRCOM is not set 1308# CONFIG_USB_SERIAL_XIRCOM is not set
1269# CONFIG_USB_SERIAL_OPTION is not set 1309# CONFIG_USB_SERIAL_OPTION is not set
1270# CONFIG_USB_SERIAL_OMNINET is not set 1310# CONFIG_USB_SERIAL_OMNINET is not set
1311# CONFIG_USB_SERIAL_OPTICON is not set
1271# CONFIG_USB_SERIAL_DEBUG is not set 1312# CONFIG_USB_SERIAL_DEBUG is not set
1272 1313
1273# 1314#
@@ -1284,7 +1325,6 @@ CONFIG_USB_SERIAL_PL2303=m
1284# CONFIG_USB_LED is not set 1325# CONFIG_USB_LED is not set
1285# CONFIG_USB_CYPRESS_CY7C63 is not set 1326# CONFIG_USB_CYPRESS_CY7C63 is not set
1286# CONFIG_USB_CYTHERM is not set 1327# CONFIG_USB_CYTHERM is not set
1287# CONFIG_USB_PHIDGET is not set
1288# CONFIG_USB_IDMOUSE is not set 1328# CONFIG_USB_IDMOUSE is not set
1289# CONFIG_USB_FTDI_ELAN is not set 1329# CONFIG_USB_FTDI_ELAN is not set
1290# CONFIG_USB_APPLEDISPLAY is not set 1330# CONFIG_USB_APPLEDISPLAY is not set
@@ -1296,6 +1336,11 @@ CONFIG_USB_SERIAL_PL2303=m
1296# CONFIG_USB_ISIGHTFW is not set 1336# CONFIG_USB_ISIGHTFW is not set
1297# CONFIG_USB_VST is not set 1337# CONFIG_USB_VST is not set
1298# CONFIG_USB_GADGET is not set 1338# CONFIG_USB_GADGET is not set
1339
1340#
1341# OTG and related infrastructure
1342#
1343# CONFIG_NOP_USB_XCEIV is not set
1299# CONFIG_UWB is not set 1344# CONFIG_UWB is not set
1300# CONFIG_MMC is not set 1345# CONFIG_MMC is not set
1301# CONFIG_MEMSTICK is not set 1346# CONFIG_MEMSTICK is not set
@@ -1337,6 +1382,7 @@ CONFIG_RTC_INTF_DEV=y
1337# 1382#
1338CONFIG_RTC_DRV_SH=m 1383CONFIG_RTC_DRV_SH=m
1339# CONFIG_DMADEVICES is not set 1384# CONFIG_DMADEVICES is not set
1385# CONFIG_AUXDISPLAY is not set
1340# CONFIG_UIO is not set 1386# CONFIG_UIO is not set
1341# CONFIG_STAGING is not set 1387# CONFIG_STAGING is not set
1342 1388
@@ -1363,6 +1409,7 @@ CONFIG_XFS_FS=m
1363# CONFIG_XFS_RT is not set 1409# CONFIG_XFS_RT is not set
1364# CONFIG_XFS_DEBUG is not set 1410# CONFIG_XFS_DEBUG is not set
1365# CONFIG_OCFS2_FS is not set 1411# CONFIG_OCFS2_FS is not set
1412# CONFIG_BTRFS_FS is not set
1366CONFIG_DNOTIFY=y 1413CONFIG_DNOTIFY=y
1367CONFIG_INOTIFY=y 1414CONFIG_INOTIFY=y
1368CONFIG_INOTIFY_USER=y 1415CONFIG_INOTIFY_USER=y
@@ -1413,6 +1460,7 @@ CONFIG_MISC_FILESYSTEMS=y
1413# CONFIG_EFS_FS is not set 1460# CONFIG_EFS_FS is not set
1414# CONFIG_JFFS2_FS is not set 1461# CONFIG_JFFS2_FS is not set
1415# CONFIG_CRAMFS is not set 1462# CONFIG_CRAMFS is not set
1463# CONFIG_SQUASHFS is not set
1416# CONFIG_VXFS_FS is not set 1464# CONFIG_VXFS_FS is not set
1417# CONFIG_MINIX_FS is not set 1465# CONFIG_MINIX_FS is not set
1418# CONFIG_OMFS_FS is not set 1466# CONFIG_OMFS_FS is not set
@@ -1436,7 +1484,6 @@ CONFIG_LOCKD_V4=y
1436CONFIG_EXPORTFS=y 1484CONFIG_EXPORTFS=y
1437CONFIG_NFS_COMMON=y 1485CONFIG_NFS_COMMON=y
1438CONFIG_SUNRPC=y 1486CONFIG_SUNRPC=y
1439# CONFIG_SUNRPC_REGISTER_V4 is not set
1440# CONFIG_RPCSEC_GSS_KRB5 is not set 1487# CONFIG_RPCSEC_GSS_KRB5 is not set
1441# CONFIG_RPCSEC_GSS_SPKM3 is not set 1488# CONFIG_RPCSEC_GSS_SPKM3 is not set
1442CONFIG_SMB_FS=m 1489CONFIG_SMB_FS=m
@@ -1559,6 +1606,7 @@ CONFIG_SCHED_DEBUG=y
1559# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1606# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1560# CONFIG_FAULT_INJECTION is not set 1607# CONFIG_FAULT_INJECTION is not set
1561# CONFIG_LATENCYTOP is not set 1608# CONFIG_LATENCYTOP is not set
1609# CONFIG_PAGE_POISONING is not set
1562CONFIG_HAVE_FUNCTION_TRACER=y 1610CONFIG_HAVE_FUNCTION_TRACER=y
1563CONFIG_HAVE_DYNAMIC_FTRACE=y 1611CONFIG_HAVE_DYNAMIC_FTRACE=y
1564CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1612CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -1573,7 +1621,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1573# CONFIG_BOOT_TRACER is not set 1621# CONFIG_BOOT_TRACER is not set
1574# CONFIG_TRACE_BRANCH_PROFILING is not set 1622# CONFIG_TRACE_BRANCH_PROFILING is not set
1575# CONFIG_STACK_TRACER is not set 1623# CONFIG_STACK_TRACER is not set
1576# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1577# CONFIG_SAMPLES is not set 1624# CONFIG_SAMPLES is not set
1578CONFIG_HAVE_ARCH_KGDB=y 1625CONFIG_HAVE_ARCH_KGDB=y
1579# CONFIG_KGDB is not set 1626# CONFIG_KGDB is not set
@@ -1610,10 +1657,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1610CONFIG_CRYPTO_HASH=y 1657CONFIG_CRYPTO_HASH=y
1611CONFIG_CRYPTO_HASH2=y 1658CONFIG_CRYPTO_HASH2=y
1612CONFIG_CRYPTO_RNG2=y 1659CONFIG_CRYPTO_RNG2=y
1660CONFIG_CRYPTO_PCOMP=y
1613CONFIG_CRYPTO_MANAGER=y 1661CONFIG_CRYPTO_MANAGER=y
1614CONFIG_CRYPTO_MANAGER2=y 1662CONFIG_CRYPTO_MANAGER2=y
1615# CONFIG_CRYPTO_GF128MUL is not set 1663# CONFIG_CRYPTO_GF128MUL is not set
1616CONFIG_CRYPTO_NULL=m 1664CONFIG_CRYPTO_NULL=m
1665CONFIG_CRYPTO_WORKQUEUE=y
1617# CONFIG_CRYPTO_CRYPTD is not set 1666# CONFIG_CRYPTO_CRYPTD is not set
1618CONFIG_CRYPTO_AUTHENC=y 1667CONFIG_CRYPTO_AUTHENC=y
1619# CONFIG_CRYPTO_TEST is not set 1668# CONFIG_CRYPTO_TEST is not set
@@ -1683,6 +1732,7 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
1683# Compression 1732# Compression
1684# 1733#
1685CONFIG_CRYPTO_DEFLATE=y 1734CONFIG_CRYPTO_DEFLATE=y
1735# CONFIG_CRYPTO_ZLIB is not set
1686# CONFIG_CRYPTO_LZO is not set 1736# CONFIG_CRYPTO_LZO is not set
1687 1737
1688# 1738#
@@ -1706,11 +1756,12 @@ CONFIG_CRC32=y
1706CONFIG_LIBCRC32C=m 1756CONFIG_LIBCRC32C=m
1707CONFIG_ZLIB_INFLATE=y 1757CONFIG_ZLIB_INFLATE=y
1708CONFIG_ZLIB_DEFLATE=y 1758CONFIG_ZLIB_DEFLATE=y
1759CONFIG_DECOMPRESS_GZIP=y
1709CONFIG_TEXTSEARCH=y 1760CONFIG_TEXTSEARCH=y
1710CONFIG_TEXTSEARCH_KMP=m 1761CONFIG_TEXTSEARCH_KMP=m
1711CONFIG_TEXTSEARCH_BM=m 1762CONFIG_TEXTSEARCH_BM=m
1712CONFIG_TEXTSEARCH_FSM=m 1763CONFIG_TEXTSEARCH_FSM=m
1713CONFIG_PLIST=y
1714CONFIG_HAS_IOMEM=y 1764CONFIG_HAS_IOMEM=y
1715CONFIG_HAS_IOPORT=y 1765CONFIG_HAS_IOPORT=y
1716CONFIG_HAS_DMA=y 1766CONFIG_HAS_DMA=y
1767CONFIG_NLATTR=y
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig
index 27f968a959f8..34f5192a3241 100644
--- a/arch/sh/configs/ul2_defconfig
+++ b/arch/sh/configs/ul2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.29
4# Fri Jan 9 18:22:53 2009 4# Thu Apr 2 19:30:27 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -16,15 +16,17 @@ CONFIG_GENERIC_IRQ_PROBE=y
16# CONFIG_GENERIC_GPIO is not set 16# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19CONFIG_ARCH_SUSPEND_POSSIBLE=y
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_SYS_SUPPORTS_CMT=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 26# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 31
30# 32#
@@ -44,19 +46,33 @@ CONFIG_BSD_PROCESS_ACCT=y
44# CONFIG_BSD_PROCESS_ACCT_V3 is not set 46# CONFIG_BSD_PROCESS_ACCT_V3 is not set
45# CONFIG_TASKSTATS is not set 47# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 48# CONFIG_AUDIT is not set
49
50#
51# RCU Subsystem
52#
53CONFIG_CLASSIC_RCU=y
54# CONFIG_TREE_RCU is not set
55# CONFIG_PREEMPT_RCU is not set
56# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
47CONFIG_IKCONFIG=y 58CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y 59CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=14 60CONFIG_LOG_BUF_SHIFT=14
50# CONFIG_CGROUPS is not set
51# CONFIG_GROUP_SCHED is not set 61# CONFIG_GROUP_SCHED is not set
62# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 63CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 64CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 65# CONFIG_RELAY is not set
55# CONFIG_NAMESPACES is not set 66# CONFIG_NAMESPACES is not set
56CONFIG_BLK_DEV_INITRD=y 67CONFIG_BLK_DEV_INITRD=y
57CONFIG_INITRAMFS_SOURCE="" 68CONFIG_INITRAMFS_SOURCE=""
69CONFIG_RD_GZIP=y
70# CONFIG_RD_BZIP2 is not set
71# CONFIG_RD_LZMA is not set
72CONFIG_INITRAMFS_COMPRESSION_NONE=y
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_ANON_INODES=y
60CONFIG_EMBEDDED=y 76CONFIG_EMBEDDED=y
61CONFIG_UID16=y 77CONFIG_UID16=y
62CONFIG_SYSCTL_SYSCALL=y 78CONFIG_SYSCTL_SYSCALL=y
@@ -66,10 +82,8 @@ CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y 82CONFIG_PRINTK=y
67CONFIG_BUG=y 83CONFIG_BUG=y
68CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
69CONFIG_COMPAT_BRK=y
70CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
71CONFIG_FUTEX=y 86CONFIG_FUTEX=y
72CONFIG_ANON_INODES=y
73CONFIG_EPOLL=y 87CONFIG_EPOLL=y
74CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
75CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
@@ -78,6 +92,7 @@ CONFIG_SHMEM=y
78CONFIG_AIO=y 92CONFIG_AIO=y
79CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
80CONFIG_SLUB_DEBUG=y 94CONFIG_SLUB_DEBUG=y
95CONFIG_COMPAT_BRK=y
81# CONFIG_SLAB is not set 96# CONFIG_SLAB is not set
82CONFIG_SLUB=y 97CONFIG_SLUB=y
83# CONFIG_SLOB is not set 98# CONFIG_SLOB is not set
@@ -118,11 +133,6 @@ CONFIG_IOSCHED_NOOP=y
118# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
119CONFIG_DEFAULT_NOOP=y 134CONFIG_DEFAULT_NOOP=y
120CONFIG_DEFAULT_IOSCHED="noop" 135CONFIG_DEFAULT_IOSCHED="noop"
121CONFIG_CLASSIC_RCU=y
122# CONFIG_TREE_RCU is not set
123# CONFIG_PREEMPT_RCU is not set
124# CONFIG_TREE_RCU_TRACE is not set
125# CONFIG_PREEMPT_RCU_TRACE is not set
126# CONFIG_FREEZER is not set 136# CONFIG_FREEZER is not set
127 137
128# 138#
@@ -132,6 +142,7 @@ CONFIG_CPU_SH4=y
132CONFIG_CPU_SH4A=y 142CONFIG_CPU_SH4A=y
133CONFIG_CPU_SH4AL_DSP=y 143CONFIG_CPU_SH4AL_DSP=y
134CONFIG_CPU_SHX2=y 144CONFIG_CPU_SHX2=y
145CONFIG_ARCH_SHMOBILE=y
135# CONFIG_CPU_SUBTYPE_SH7619 is not set 146# CONFIG_CPU_SUBTYPE_SH7619 is not set
136# CONFIG_CPU_SUBTYPE_SH7201 is not set 147# CONFIG_CPU_SUBTYPE_SH7201 is not set
137# CONFIG_CPU_SUBTYPE_SH7203 is not set 148# CONFIG_CPU_SUBTYPE_SH7203 is not set
@@ -160,6 +171,7 @@ CONFIG_CPU_SHX2=y
160# CONFIG_CPU_SUBTYPE_SH7770 is not set 171# CONFIG_CPU_SUBTYPE_SH7770 is not set
161# CONFIG_CPU_SUBTYPE_SH7780 is not set 172# CONFIG_CPU_SUBTYPE_SH7780 is not set
162# CONFIG_CPU_SUBTYPE_SH7785 is not set 173# CONFIG_CPU_SUBTYPE_SH7785 is not set
174# CONFIG_CPU_SUBTYPE_SH7786 is not set
163# CONFIG_CPU_SUBTYPE_SHX3 is not set 175# CONFIG_CPU_SUBTYPE_SHX3 is not set
164# CONFIG_CPU_SUBTYPE_SH7343 is not set 176# CONFIG_CPU_SUBTYPE_SH7343 is not set
165# CONFIG_CPU_SUBTYPE_SH7722 is not set 177# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -213,11 +225,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
213CONFIG_ZONE_DMA_FLAG=0 225CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 226CONFIG_NR_QUICK=2
215CONFIG_UNEVICTABLE_LRU=y 227CONFIG_UNEVICTABLE_LRU=y
228CONFIG_HAVE_MLOCK=y
229CONFIG_HAVE_MLOCKED_PAGE_BIT=y
216 230
217# 231#
218# Cache configuration 232# Cache configuration
219# 233#
220# CONFIG_SH_DIRECT_MAPPED is not set
221CONFIG_CACHE_WRITEBACK=y 234CONFIG_CACHE_WRITEBACK=y
222# CONFIG_CACHE_WRITETHROUGH is not set 235# CONFIG_CACHE_WRITETHROUGH is not set
223# CONFIG_CACHE_OFF is not set 236# CONFIG_CACHE_OFF is not set
@@ -243,6 +256,7 @@ CONFIG_CPU_HAS_DSP=y
243# Timer and clock configuration 256# Timer and clock configuration
244# 257#
245CONFIG_SH_TMU=y 258CONFIG_SH_TMU=y
259# CONFIG_SH_TIMER_CMT is not set
246CONFIG_SH_TIMER_IRQ=16 260CONFIG_SH_TIMER_IRQ=16
247CONFIG_SH_PCLK_FREQ=33333333 261CONFIG_SH_PCLK_FREQ=33333333
248CONFIG_TICK_ONESHOT=y 262CONFIG_TICK_ONESHOT=y
@@ -319,7 +333,6 @@ CONFIG_NET=y
319# 333#
320# Networking options 334# Networking options
321# 335#
322CONFIG_COMPAT_NET_DEV_OPS=y
323CONFIG_PACKET=y 336CONFIG_PACKET=y
324CONFIG_PACKET_MMAP=y 337CONFIG_PACKET_MMAP=y
325CONFIG_UNIX=y 338CONFIG_UNIX=y
@@ -374,6 +387,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
374# CONFIG_LAPB is not set 387# CONFIG_LAPB is not set
375# CONFIG_ECONET is not set 388# CONFIG_ECONET is not set
376# CONFIG_WAN_ROUTER is not set 389# CONFIG_WAN_ROUTER is not set
390# CONFIG_PHONET is not set
377# CONFIG_NET_SCHED is not set 391# CONFIG_NET_SCHED is not set
378# CONFIG_DCB is not set 392# CONFIG_DCB is not set
379 393
@@ -386,15 +400,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
386# CONFIG_IRDA is not set 400# CONFIG_IRDA is not set
387# CONFIG_BT is not set 401# CONFIG_BT is not set
388# CONFIG_AF_RXRPC is not set 402# CONFIG_AF_RXRPC is not set
389# CONFIG_PHONET is not set
390CONFIG_WIRELESS=y 403CONFIG_WIRELESS=y
391CONFIG_CFG80211=y 404CONFIG_CFG80211=y
392# CONFIG_CFG80211_REG_DEBUG is not set 405# CONFIG_CFG80211_REG_DEBUG is not set
393CONFIG_NL80211=y
394# CONFIG_WIRELESS_OLD_REGULATORY is not set 406# CONFIG_WIRELESS_OLD_REGULATORY is not set
395CONFIG_WIRELESS_EXT=y 407CONFIG_WIRELESS_EXT=y
396CONFIG_WIRELESS_EXT_SYSFS=y 408CONFIG_WIRELESS_EXT_SYSFS=y
397CONFIG_LIB80211=m 409CONFIG_LIB80211=m
410# CONFIG_LIB80211_DEBUG is not set
398CONFIG_MAC80211=y 411CONFIG_MAC80211=y
399 412
400# 413#
@@ -408,6 +421,7 @@ CONFIG_MAC80211_RC_DEFAULT="pid"
408# CONFIG_MAC80211_MESH is not set 421# CONFIG_MAC80211_MESH is not set
409# CONFIG_MAC80211_LEDS is not set 422# CONFIG_MAC80211_LEDS is not set
410# CONFIG_MAC80211_DEBUG_MENU is not set 423# CONFIG_MAC80211_DEBUG_MENU is not set
424# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set 425# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set 426# CONFIG_NET_9P is not set
413 427
@@ -430,6 +444,7 @@ CONFIG_MTD=y
430# CONFIG_MTD_DEBUG is not set 444# CONFIG_MTD_DEBUG is not set
431CONFIG_MTD_CONCAT=y 445CONFIG_MTD_CONCAT=y
432CONFIG_MTD_PARTITIONS=y 446CONFIG_MTD_PARTITIONS=y
447# CONFIG_MTD_TESTS is not set
433# CONFIG_MTD_REDBOOT_PARTS is not set 448# CONFIG_MTD_REDBOOT_PARTS is not set
434# CONFIG_MTD_CMDLINE_PARTS is not set 449# CONFIG_MTD_CMDLINE_PARTS is not set
435# CONFIG_MTD_AR7_PARTS is not set 450# CONFIG_MTD_AR7_PARTS is not set
@@ -497,6 +512,11 @@ CONFIG_MTD_RAM=y
497# CONFIG_MTD_ONENAND is not set 512# CONFIG_MTD_ONENAND is not set
498 513
499# 514#
515# LPDDR flash memory drivers
516#
517# CONFIG_MTD_LPDDR is not set
518
519#
500# UBI - Unsorted block images 520# UBI - Unsorted block images
501# 521#
502# CONFIG_MTD_UBI is not set 522# CONFIG_MTD_UBI is not set
@@ -514,9 +534,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
514# CONFIG_ATA_OVER_ETH is not set 534# CONFIG_ATA_OVER_ETH is not set
515# CONFIG_BLK_DEV_HD is not set 535# CONFIG_BLK_DEV_HD is not set
516CONFIG_MISC_DEVICES=y 536CONFIG_MISC_DEVICES=y
517# CONFIG_EEPROM_93CX6 is not set
518# CONFIG_ENCLOSURE_SERVICES is not set 537# CONFIG_ENCLOSURE_SERVICES is not set
519# CONFIG_C2PORT is not set 538# CONFIG_C2PORT is not set
539
540#
541# EEPROM support
542#
543# CONFIG_EEPROM_93CX6 is not set
520CONFIG_HAVE_IDE=y 544CONFIG_HAVE_IDE=y
521# CONFIG_IDE is not set 545# CONFIG_IDE is not set
522 546
@@ -562,6 +586,7 @@ CONFIG_SCSI_LOWLEVEL=y
562# CONFIG_LIBFC is not set 586# CONFIG_LIBFC is not set
563# CONFIG_SCSI_DEBUG is not set 587# CONFIG_SCSI_DEBUG is not set
564# CONFIG_SCSI_DH is not set 588# CONFIG_SCSI_DH is not set
589# CONFIG_SCSI_OSD_INITIATOR is not set
565CONFIG_ATA=y 590CONFIG_ATA=y
566# CONFIG_ATA_NONSTANDARD is not set 591# CONFIG_ATA_NONSTANDARD is not set
567CONFIG_SATA_PMP=y 592CONFIG_SATA_PMP=y
@@ -570,6 +595,7 @@ CONFIG_ATA_SFF=y
570CONFIG_PATA_PLATFORM=y 595CONFIG_PATA_PLATFORM=y
571# CONFIG_MD is not set 596# CONFIG_MD is not set
572CONFIG_NETDEVICES=y 597CONFIG_NETDEVICES=y
598CONFIG_COMPAT_NET_DEV_OPS=y
573# CONFIG_DUMMY is not set 599# CONFIG_DUMMY is not set
574# CONFIG_BONDING is not set 600# CONFIG_BONDING is not set
575# CONFIG_MACVLAN is not set 601# CONFIG_MACVLAN is not set
@@ -582,8 +608,10 @@ CONFIG_MII=y
582# CONFIG_AX88796 is not set 608# CONFIG_AX88796 is not set
583# CONFIG_STNIC is not set 609# CONFIG_STNIC is not set
584# CONFIG_SMC91X is not set 610# CONFIG_SMC91X is not set
611# CONFIG_ETHOC is not set
585# CONFIG_SMC911X is not set 612# CONFIG_SMC911X is not set
586# CONFIG_SMSC911X is not set 613# CONFIG_SMSC911X is not set
614# CONFIG_DNET is not set
587# CONFIG_IBM_NEW_EMAC_ZMII is not set 615# CONFIG_IBM_NEW_EMAC_ZMII is not set
588# CONFIG_IBM_NEW_EMAC_RGMII is not set 616# CONFIG_IBM_NEW_EMAC_RGMII is not set
589# CONFIG_IBM_NEW_EMAC_TAH is not set 617# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -605,12 +633,13 @@ CONFIG_LIBERTAS=m
605CONFIG_LIBERTAS_SDIO=m 633CONFIG_LIBERTAS_SDIO=m
606CONFIG_LIBERTAS_DEBUG=y 634CONFIG_LIBERTAS_DEBUG=y
607# CONFIG_LIBERTAS_THINFIRM is not set 635# CONFIG_LIBERTAS_THINFIRM is not set
636# CONFIG_AT76C50X_USB is not set
608# CONFIG_USB_ZD1201 is not set 637# CONFIG_USB_ZD1201 is not set
609# CONFIG_USB_NET_RNDIS_WLAN is not set 638# CONFIG_USB_NET_RNDIS_WLAN is not set
610# CONFIG_RTL8187 is not set 639# CONFIG_RTL8187 is not set
611# CONFIG_MAC80211_HWSIM is not set 640# CONFIG_MAC80211_HWSIM is not set
612# CONFIG_P54_COMMON is not set 641# CONFIG_P54_COMMON is not set
613# CONFIG_IWLWIFI_LEDS is not set 642# CONFIG_AR9170_USB is not set
614# CONFIG_HOSTAP is not set 643# CONFIG_HOSTAP is not set
615# CONFIG_B43 is not set 644# CONFIG_B43 is not set
616# CONFIG_B43LEGACY is not set 645# CONFIG_B43LEGACY is not set
@@ -618,6 +647,10 @@ CONFIG_LIBERTAS_DEBUG=y
618# CONFIG_RT2X00 is not set 647# CONFIG_RT2X00 is not set
619 648
620# 649#
650# Enable WiMAX (Networking options) to see the WiMAX drivers
651#
652
653#
621# USB Network Adapters 654# USB Network Adapters
622# 655#
623# CONFIG_USB_CATC is not set 656# CONFIG_USB_CATC is not set
@@ -794,7 +827,9 @@ CONFIG_USB_MON=y
794# USB Host Controller Drivers 827# USB Host Controller Drivers
795# 828#
796# CONFIG_USB_C67X00_HCD is not set 829# CONFIG_USB_C67X00_HCD is not set
830# CONFIG_USB_OXU210HP_HCD is not set
797# CONFIG_USB_ISP116X_HCD is not set 831# CONFIG_USB_ISP116X_HCD is not set
832# CONFIG_USB_ISP1760_HCD is not set
798# CONFIG_USB_SL811_HCD is not set 833# CONFIG_USB_SL811_HCD is not set
799CONFIG_USB_R8A66597_HCD=y 834CONFIG_USB_R8A66597_HCD=y
800# CONFIG_SUPERH_ON_CHIP_R8A66597 is not set 835# CONFIG_SUPERH_ON_CHIP_R8A66597 is not set
@@ -809,18 +844,17 @@ CONFIG_USB_R8A66597_HCD=y
809# CONFIG_USB_TMC is not set 844# CONFIG_USB_TMC is not set
810 845
811# 846#
812# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 847# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
813# 848#
814 849
815# 850#
816# see USB_STORAGE Help for more information 851# also be needed; see USB_STORAGE Help for more info
817# 852#
818CONFIG_USB_STORAGE=y 853CONFIG_USB_STORAGE=y
819# CONFIG_USB_STORAGE_DEBUG is not set 854# CONFIG_USB_STORAGE_DEBUG is not set
820# CONFIG_USB_STORAGE_DATAFAB is not set 855# CONFIG_USB_STORAGE_DATAFAB is not set
821# CONFIG_USB_STORAGE_FREECOM is not set 856# CONFIG_USB_STORAGE_FREECOM is not set
822# CONFIG_USB_STORAGE_ISD200 is not set 857# CONFIG_USB_STORAGE_ISD200 is not set
823# CONFIG_USB_STORAGE_DPCM is not set
824# CONFIG_USB_STORAGE_USBAT is not set 858# CONFIG_USB_STORAGE_USBAT is not set
825# CONFIG_USB_STORAGE_SDDR09 is not set 859# CONFIG_USB_STORAGE_SDDR09 is not set
826# CONFIG_USB_STORAGE_SDDR55 is not set 860# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -856,7 +890,6 @@ CONFIG_USB_STORAGE=y
856# CONFIG_USB_LED is not set 890# CONFIG_USB_LED is not set
857# CONFIG_USB_CYPRESS_CY7C63 is not set 891# CONFIG_USB_CYPRESS_CY7C63 is not set
858# CONFIG_USB_CYTHERM is not set 892# CONFIG_USB_CYTHERM is not set
859# CONFIG_USB_PHIDGET is not set
860# CONFIG_USB_IDMOUSE is not set 893# CONFIG_USB_IDMOUSE is not set
861# CONFIG_USB_FTDI_ELAN is not set 894# CONFIG_USB_FTDI_ELAN is not set
862# CONFIG_USB_APPLEDISPLAY is not set 895# CONFIG_USB_APPLEDISPLAY is not set
@@ -866,6 +899,11 @@ CONFIG_USB_STORAGE=y
866# CONFIG_USB_ISIGHTFW is not set 899# CONFIG_USB_ISIGHTFW is not set
867# CONFIG_USB_VST is not set 900# CONFIG_USB_VST is not set
868# CONFIG_USB_GADGET is not set 901# CONFIG_USB_GADGET is not set
902
903#
904# OTG and related infrastructure
905#
906# CONFIG_NOP_USB_XCEIV is not set
869CONFIG_MMC=y 907CONFIG_MMC=y
870# CONFIG_MMC_DEBUG is not set 908# CONFIG_MMC_DEBUG is not set
871# CONFIG_MMC_UNSAFE_RESUME is not set 909# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -887,6 +925,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
887# CONFIG_ACCESSIBILITY is not set 925# CONFIG_ACCESSIBILITY is not set
888# CONFIG_RTC_CLASS is not set 926# CONFIG_RTC_CLASS is not set
889# CONFIG_DMADEVICES is not set 927# CONFIG_DMADEVICES is not set
928# CONFIG_AUXDISPLAY is not set
890# CONFIG_UIO is not set 929# CONFIG_UIO is not set
891# CONFIG_STAGING is not set 930# CONFIG_STAGING is not set
892 931
@@ -909,6 +948,7 @@ CONFIG_FS_MBCACHE=y
909CONFIG_FILE_LOCKING=y 948CONFIG_FILE_LOCKING=y
910# CONFIG_XFS_FS is not set 949# CONFIG_XFS_FS is not set
911# CONFIG_OCFS2_FS is not set 950# CONFIG_OCFS2_FS is not set
951# CONFIG_BTRFS_FS is not set
912CONFIG_DNOTIFY=y 952CONFIG_DNOTIFY=y
913CONFIG_INOTIFY=y 953CONFIG_INOTIFY=y
914CONFIG_INOTIFY_USER=y 954CONFIG_INOTIFY_USER=y
@@ -956,6 +996,7 @@ CONFIG_MISC_FILESYSTEMS=y
956# CONFIG_EFS_FS is not set 996# CONFIG_EFS_FS is not set
957# CONFIG_JFFS2_FS is not set 997# CONFIG_JFFS2_FS is not set
958CONFIG_CRAMFS=y 998CONFIG_CRAMFS=y
999# CONFIG_SQUASHFS is not set
959# CONFIG_VXFS_FS is not set 1000# CONFIG_VXFS_FS is not set
960# CONFIG_MINIX_FS is not set 1001# CONFIG_MINIX_FS is not set
961# CONFIG_OMFS_FS is not set 1002# CONFIG_OMFS_FS is not set
@@ -976,7 +1017,6 @@ CONFIG_LOCKD=y
976CONFIG_EXPORTFS=y 1017CONFIG_EXPORTFS=y
977CONFIG_NFS_COMMON=y 1018CONFIG_NFS_COMMON=y
978CONFIG_SUNRPC=y 1019CONFIG_SUNRPC=y
979# CONFIG_SUNRPC_REGISTER_V4 is not set
980# CONFIG_RPCSEC_GSS_KRB5 is not set 1020# CONFIG_RPCSEC_GSS_KRB5 is not set
981# CONFIG_RPCSEC_GSS_SPKM3 is not set 1021# CONFIG_RPCSEC_GSS_SPKM3 is not set
982# CONFIG_SMB_FS is not set 1022# CONFIG_SMB_FS is not set
@@ -1059,7 +1099,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1059# 1099#
1060# Tracers 1100# Tracers
1061# 1101#
1062# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1063# CONFIG_SAMPLES is not set 1102# CONFIG_SAMPLES is not set
1064CONFIG_HAVE_ARCH_KGDB=y 1103CONFIG_HAVE_ARCH_KGDB=y
1065# CONFIG_SH_STANDARD_BIOS is not set 1104# CONFIG_SH_STANDARD_BIOS is not set
@@ -1087,10 +1126,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1087CONFIG_CRYPTO_HASH=y 1126CONFIG_CRYPTO_HASH=y
1088CONFIG_CRYPTO_HASH2=y 1127CONFIG_CRYPTO_HASH2=y
1089CONFIG_CRYPTO_RNG2=y 1128CONFIG_CRYPTO_RNG2=y
1129CONFIG_CRYPTO_PCOMP=y
1090CONFIG_CRYPTO_MANAGER=y 1130CONFIG_CRYPTO_MANAGER=y
1091CONFIG_CRYPTO_MANAGER2=y 1131CONFIG_CRYPTO_MANAGER2=y
1092# CONFIG_CRYPTO_GF128MUL is not set 1132# CONFIG_CRYPTO_GF128MUL is not set
1093# CONFIG_CRYPTO_NULL is not set 1133# CONFIG_CRYPTO_NULL is not set
1134CONFIG_CRYPTO_WORKQUEUE=y
1094# CONFIG_CRYPTO_CRYPTD is not set 1135# CONFIG_CRYPTO_CRYPTD is not set
1095# CONFIG_CRYPTO_AUTHENC is not set 1136# CONFIG_CRYPTO_AUTHENC is not set
1096# CONFIG_CRYPTO_TEST is not set 1137# CONFIG_CRYPTO_TEST is not set
@@ -1159,6 +1200,7 @@ CONFIG_CRYPTO_ARC4=y
1159# Compression 1200# Compression
1160# 1201#
1161# CONFIG_CRYPTO_DEFLATE is not set 1202# CONFIG_CRYPTO_DEFLATE is not set
1203# CONFIG_CRYPTO_ZLIB is not set
1162# CONFIG_CRYPTO_LZO is not set 1204# CONFIG_CRYPTO_LZO is not set
1163 1205
1164# 1206#
@@ -1180,7 +1222,8 @@ CONFIG_CRC32=y
1180# CONFIG_CRC7 is not set 1222# CONFIG_CRC7 is not set
1181# CONFIG_LIBCRC32C is not set 1223# CONFIG_LIBCRC32C is not set
1182CONFIG_ZLIB_INFLATE=y 1224CONFIG_ZLIB_INFLATE=y
1183CONFIG_PLIST=y 1225CONFIG_DECOMPRESS_GZIP=y
1184CONFIG_HAS_IOMEM=y 1226CONFIG_HAS_IOMEM=y
1185CONFIG_HAS_IOPORT=y 1227CONFIG_HAS_IOPORT=y
1186CONFIG_HAS_DMA=y 1228CONFIG_HAS_DMA=y
1229CONFIG_NLATTR=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index be726c7cdf91..d174b1a4d802 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc4 3# Linux kernel version: 2.6.29
4# Thu Mar 5 17:28:13 2009 4# Thu Apr 2 19:33:39 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,7 +17,7 @@ CONFIG_GENERIC_GPIO=y
17CONFIG_GENERIC_TIME=y 17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_NUMA=y 21CONFIG_SYS_SUPPORTS_NUMA=y
22CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
@@ -25,6 +25,7 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
25# CONFIG_ARCH_HAS_ILOG2_U32 is not set 25# CONFIG_ARCH_HAS_ILOG2_U32 is not set
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 26# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29 30
30# 31#
@@ -69,6 +70,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
69# CONFIG_BLK_DEV_INITRD is not set 70# CONFIG_BLK_DEV_INITRD is not set
70CONFIG_CC_OPTIMIZE_FOR_SIZE=y 71CONFIG_CC_OPTIMIZE_FOR_SIZE=y
71CONFIG_SYSCTL=y 72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
72CONFIG_EMBEDDED=y 74CONFIG_EMBEDDED=y
73CONFIG_UID16=y 75CONFIG_UID16=y
74CONFIG_SYSCTL_SYSCALL=y 76CONFIG_SYSCTL_SYSCALL=y
@@ -78,10 +80,8 @@ CONFIG_HOTPLUG=y
78CONFIG_PRINTK=y 80CONFIG_PRINTK=y
79CONFIG_BUG=y 81CONFIG_BUG=y
80CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
81CONFIG_COMPAT_BRK=y
82CONFIG_BASE_FULL=y 83CONFIG_BASE_FULL=y
83CONFIG_FUTEX=y 84CONFIG_FUTEX=y
84CONFIG_ANON_INODES=y
85CONFIG_EPOLL=y 85CONFIG_EPOLL=y
86CONFIG_SIGNALFD=y 86CONFIG_SIGNALFD=y
87CONFIG_TIMERFD=y 87CONFIG_TIMERFD=y
@@ -89,6 +89,7 @@ CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 89CONFIG_SHMEM=y
90CONFIG_AIO=y 90CONFIG_AIO=y
91CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 93CONFIG_SLAB=y
93# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
@@ -213,11 +214,12 @@ CONFIG_MIGRATION=y
213CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
215CONFIG_UNEVICTABLE_LRU=y 216CONFIG_UNEVICTABLE_LRU=y
217CONFIG_HAVE_MLOCK=y
218CONFIG_HAVE_MLOCKED_PAGE_BIT=y
216 219
217# 220#
218# Cache configuration 221# Cache configuration
219# 222#
220# CONFIG_SH_DIRECT_MAPPED is not set
221CONFIG_CACHE_WRITEBACK=y 223CONFIG_CACHE_WRITEBACK=y
222# CONFIG_CACHE_WRITETHROUGH is not set 224# CONFIG_CACHE_WRITETHROUGH is not set
223# CONFIG_CACHE_OFF is not set 225# CONFIG_CACHE_OFF is not set
@@ -231,6 +233,7 @@ CONFIG_SH_FPU=y
231CONFIG_SH_STORE_QUEUES=y 233CONFIG_SH_STORE_QUEUES=y
232CONFIG_CPU_HAS_INTEVT=y 234CONFIG_CPU_HAS_INTEVT=y
233CONFIG_CPU_HAS_SR_RB=y 235CONFIG_CPU_HAS_SR_RB=y
236CONFIG_CPU_HAS_PTEAEX=y
234CONFIG_CPU_HAS_FPU=y 237CONFIG_CPU_HAS_FPU=y
235 238
236# 239#
@@ -318,7 +321,6 @@ CONFIG_NET=y
318# 321#
319# Networking options 322# Networking options
320# 323#
321CONFIG_COMPAT_NET_DEV_OPS=y
322CONFIG_PACKET=y 324CONFIG_PACKET=y
323# CONFIG_PACKET_MMAP is not set 325# CONFIG_PACKET_MMAP is not set
324CONFIG_UNIX=y 326CONFIG_UNIX=y
@@ -378,6 +380,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
378# CONFIG_LAPB is not set 380# CONFIG_LAPB is not set
379# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
380# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
383# CONFIG_PHONET is not set
381# CONFIG_NET_SCHED is not set 384# CONFIG_NET_SCHED is not set
382# CONFIG_DCB is not set 385# CONFIG_DCB is not set
383 386
@@ -390,7 +393,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
390# CONFIG_IRDA is not set 393# CONFIG_IRDA is not set
391# CONFIG_BT is not set 394# CONFIG_BT is not set
392# CONFIG_AF_RXRPC is not set 395# CONFIG_AF_RXRPC is not set
393# CONFIG_PHONET is not set
394CONFIG_WIRELESS=y 396CONFIG_WIRELESS=y
395# CONFIG_CFG80211 is not set 397# CONFIG_CFG80211 is not set
396# CONFIG_WIRELESS_OLD_REGULATORY is not set 398# CONFIG_WIRELESS_OLD_REGULATORY is not set
@@ -491,7 +493,6 @@ CONFIG_MTD_PHYSMAP=y
491# LPDDR flash memory drivers 493# LPDDR flash memory drivers
492# 494#
493# CONFIG_MTD_LPDDR is not set 495# CONFIG_MTD_LPDDR is not set
494# CONFIG_MTD_QINFO_PROBE is not set
495 496
496# 497#
497# UBI - Unsorted block images 498# UBI - Unsorted block images
@@ -553,6 +554,7 @@ CONFIG_SCSI_WAIT_SCAN=m
553# CONFIG_SCSI_SRP_ATTRS is not set 554# CONFIG_SCSI_SRP_ATTRS is not set
554# CONFIG_SCSI_LOWLEVEL is not set 555# CONFIG_SCSI_LOWLEVEL is not set
555# CONFIG_SCSI_DH is not set 556# CONFIG_SCSI_DH is not set
557# CONFIG_SCSI_OSD_INITIATOR is not set
556CONFIG_ATA=y 558CONFIG_ATA=y
557# CONFIG_ATA_NONSTANDARD is not set 559# CONFIG_ATA_NONSTANDARD is not set
558CONFIG_SATA_PMP=y 560CONFIG_SATA_PMP=y
@@ -561,6 +563,7 @@ CONFIG_ATA_SFF=y
561# CONFIG_PATA_PLATFORM is not set 563# CONFIG_PATA_PLATFORM is not set
562# CONFIG_MD is not set 564# CONFIG_MD is not set
563CONFIG_NETDEVICES=y 565CONFIG_NETDEVICES=y
566CONFIG_COMPAT_NET_DEV_OPS=y
564# CONFIG_DUMMY is not set 567# CONFIG_DUMMY is not set
565# CONFIG_BONDING is not set 568# CONFIG_BONDING is not set
566# CONFIG_MACVLAN is not set 569# CONFIG_MACVLAN is not set
@@ -592,8 +595,10 @@ CONFIG_MII=y
592# CONFIG_AX88796 is not set 595# CONFIG_AX88796 is not set
593# CONFIG_STNIC is not set 596# CONFIG_STNIC is not set
594CONFIG_SMC91X=y 597CONFIG_SMC91X=y
598# CONFIG_ETHOC is not set
595# CONFIG_SMC911X is not set 599# CONFIG_SMC911X is not set
596# CONFIG_SMSC911X is not set 600# CONFIG_SMSC911X is not set
601# CONFIG_DNET is not set
597# CONFIG_IBM_NEW_EMAC_ZMII is not set 602# CONFIG_IBM_NEW_EMAC_ZMII is not set
598# CONFIG_IBM_NEW_EMAC_RGMII is not set 603# CONFIG_IBM_NEW_EMAC_RGMII is not set
599# CONFIG_IBM_NEW_EMAC_TAH is not set 604# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -610,7 +615,6 @@ CONFIG_SMC91X=y
610# 615#
611# CONFIG_WLAN_PRE80211 is not set 616# CONFIG_WLAN_PRE80211 is not set
612# CONFIG_WLAN_80211 is not set 617# CONFIG_WLAN_80211 is not set
613# CONFIG_IWLWIFI_LEDS is not set
614 618
615# 619#
616# Enable WiMAX (Networking options) to see the WiMAX drivers 620# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -705,6 +709,7 @@ CONFIG_LEGACY_PTYS=y
705CONFIG_LEGACY_PTY_COUNT=256 709CONFIG_LEGACY_PTY_COUNT=256
706# CONFIG_IPMI_HANDLER is not set 710# CONFIG_IPMI_HANDLER is not set
707CONFIG_HW_RANDOM=y 711CONFIG_HW_RANDOM=y
712# CONFIG_HW_RANDOM_TIMERIOMEM is not set
708# CONFIG_R3964 is not set 713# CONFIG_R3964 is not set
709# CONFIG_RAW_DRIVER is not set 714# CONFIG_RAW_DRIVER is not set
710# CONFIG_TCG_TPM is not set 715# CONFIG_TCG_TPM is not set
@@ -746,7 +751,6 @@ CONFIG_I2C_PCA_PLATFORM=y
746# CONFIG_SENSORS_PCF8574 is not set 751# CONFIG_SENSORS_PCF8574 is not set
747# CONFIG_PCF8575 is not set 752# CONFIG_PCF8575 is not set
748# CONFIG_SENSORS_PCA9539 is not set 753# CONFIG_SENSORS_PCA9539 is not set
749# CONFIG_SENSORS_PCF8591 is not set
750# CONFIG_SENSORS_MAX6875 is not set 754# CONFIG_SENSORS_MAX6875 is not set
751# CONFIG_SENSORS_TSL2550 is not set 755# CONFIG_SENSORS_TSL2550 is not set
752# CONFIG_I2C_DEBUG_CORE is not set 756# CONFIG_I2C_DEBUG_CORE is not set
@@ -855,6 +859,7 @@ CONFIG_FB_SM501=y
855# CONFIG_FB_VIRTUAL is not set 859# CONFIG_FB_VIRTUAL is not set
856# CONFIG_FB_METRONOME is not set 860# CONFIG_FB_METRONOME is not set
857# CONFIG_FB_MB862XX is not set 861# CONFIG_FB_MB862XX is not set
862# CONFIG_FB_BROADSHEET is not set
858# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 863# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
859 864
860# 865#
@@ -922,7 +927,7 @@ CONFIG_THRUSTMASTER_FF=m
922CONFIG_ZEROPLUS_FF=m 927CONFIG_ZEROPLUS_FF=m
923CONFIG_USB_SUPPORT=y 928CONFIG_USB_SUPPORT=y
924CONFIG_USB_ARCH_HAS_HCD=y 929CONFIG_USB_ARCH_HAS_HCD=y
925# CONFIG_USB_ARCH_HAS_OHCI is not set 930CONFIG_USB_ARCH_HAS_OHCI=y
926# CONFIG_USB_ARCH_HAS_EHCI is not set 931# CONFIG_USB_ARCH_HAS_EHCI is not set
927CONFIG_USB=y 932CONFIG_USB=y
928# CONFIG_USB_DEBUG is not set 933# CONFIG_USB_DEBUG is not set
@@ -947,6 +952,8 @@ CONFIG_USB_MON=y
947# CONFIG_USB_C67X00_HCD is not set 952# CONFIG_USB_C67X00_HCD is not set
948# CONFIG_USB_OXU210HP_HCD is not set 953# CONFIG_USB_OXU210HP_HCD is not set
949# CONFIG_USB_ISP116X_HCD is not set 954# CONFIG_USB_ISP116X_HCD is not set
955# CONFIG_USB_ISP1760_HCD is not set
956# CONFIG_USB_OHCI_HCD is not set
950# CONFIG_USB_SL811_HCD is not set 957# CONFIG_USB_SL811_HCD is not set
951# CONFIG_USB_R8A66597_HCD is not set 958# CONFIG_USB_R8A66597_HCD is not set
952# CONFIG_USB_HWA_HCD is not set 959# CONFIG_USB_HWA_HCD is not set
@@ -960,11 +967,11 @@ CONFIG_USB_MON=y
960# CONFIG_USB_TMC is not set 967# CONFIG_USB_TMC is not set
961 968
962# 969#
963# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 970# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
964# 971#
965 972
966# 973#
967# see USB_STORAGE Help for more information 974# also be needed; see USB_STORAGE Help for more info
968# 975#
969CONFIG_USB_STORAGE=y 976CONFIG_USB_STORAGE=y
970# CONFIG_USB_STORAGE_DEBUG is not set 977# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1006,7 +1013,6 @@ CONFIG_USB_STORAGE=y
1006# CONFIG_USB_LED is not set 1013# CONFIG_USB_LED is not set
1007# CONFIG_USB_CYPRESS_CY7C63 is not set 1014# CONFIG_USB_CYPRESS_CY7C63 is not set
1008# CONFIG_USB_CYTHERM is not set 1015# CONFIG_USB_CYTHERM is not set
1009# CONFIG_USB_PHIDGET is not set
1010# CONFIG_USB_IDMOUSE is not set 1016# CONFIG_USB_IDMOUSE is not set
1011# CONFIG_USB_FTDI_ELAN is not set 1017# CONFIG_USB_FTDI_ELAN is not set
1012# CONFIG_USB_APPLEDISPLAY is not set 1018# CONFIG_USB_APPLEDISPLAY is not set
@@ -1022,12 +1028,14 @@ CONFIG_USB_STORAGE=y
1022# OTG and related infrastructure 1028# OTG and related infrastructure
1023# 1029#
1024# CONFIG_USB_GPIO_VBUS is not set 1030# CONFIG_USB_GPIO_VBUS is not set
1031# CONFIG_NOP_USB_XCEIV is not set
1025# CONFIG_MMC is not set 1032# CONFIG_MMC is not set
1026# CONFIG_MEMSTICK is not set 1033# CONFIG_MEMSTICK is not set
1027# CONFIG_NEW_LEDS is not set 1034# CONFIG_NEW_LEDS is not set
1028# CONFIG_ACCESSIBILITY is not set 1035# CONFIG_ACCESSIBILITY is not set
1029# CONFIG_RTC_CLASS is not set 1036# CONFIG_RTC_CLASS is not set
1030# CONFIG_DMADEVICES is not set 1037# CONFIG_DMADEVICES is not set
1038# CONFIG_AUXDISPLAY is not set
1031# CONFIG_UIO is not set 1039# CONFIG_UIO is not set
1032# CONFIG_STAGING is not set 1040# CONFIG_STAGING is not set
1033 1041
@@ -1125,7 +1133,6 @@ CONFIG_EXPORTFS=y
1125CONFIG_NFS_COMMON=y 1133CONFIG_NFS_COMMON=y
1126CONFIG_SUNRPC=y 1134CONFIG_SUNRPC=y
1127CONFIG_SUNRPC_GSS=y 1135CONFIG_SUNRPC_GSS=y
1128# CONFIG_SUNRPC_REGISTER_V4 is not set
1129CONFIG_RPCSEC_GSS_KRB5=y 1136CONFIG_RPCSEC_GSS_KRB5=y
1130# CONFIG_RPCSEC_GSS_SPKM3 is not set 1137# CONFIG_RPCSEC_GSS_SPKM3 is not set
1131# CONFIG_SMB_FS is not set 1138# CONFIG_SMB_FS is not set
@@ -1206,7 +1213,6 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1206# 1213#
1207# Tracers 1214# Tracers
1208# 1215#
1209# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1210# CONFIG_SAMPLES is not set 1216# CONFIG_SAMPLES is not set
1211CONFIG_HAVE_ARCH_KGDB=y 1217CONFIG_HAVE_ARCH_KGDB=y
1212# CONFIG_SH_STANDARD_BIOS is not set 1218# CONFIG_SH_STANDARD_BIOS is not set
@@ -1234,10 +1240,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
1234CONFIG_CRYPTO_HASH=y 1240CONFIG_CRYPTO_HASH=y
1235CONFIG_CRYPTO_HASH2=y 1241CONFIG_CRYPTO_HASH2=y
1236CONFIG_CRYPTO_RNG2=y 1242CONFIG_CRYPTO_RNG2=y
1243CONFIG_CRYPTO_PCOMP=y
1237CONFIG_CRYPTO_MANAGER=y 1244CONFIG_CRYPTO_MANAGER=y
1238CONFIG_CRYPTO_MANAGER2=y 1245CONFIG_CRYPTO_MANAGER2=y
1239# CONFIG_CRYPTO_GF128MUL is not set 1246# CONFIG_CRYPTO_GF128MUL is not set
1240# CONFIG_CRYPTO_NULL is not set 1247# CONFIG_CRYPTO_NULL is not set
1248CONFIG_CRYPTO_WORKQUEUE=y
1241# CONFIG_CRYPTO_CRYPTD is not set 1249# CONFIG_CRYPTO_CRYPTD is not set
1242# CONFIG_CRYPTO_AUTHENC is not set 1250# CONFIG_CRYPTO_AUTHENC is not set
1243# CONFIG_CRYPTO_TEST is not set 1251# CONFIG_CRYPTO_TEST is not set
@@ -1306,6 +1314,7 @@ CONFIG_CRYPTO_DES=y
1306# Compression 1314# Compression
1307# 1315#
1308# CONFIG_CRYPTO_DEFLATE is not set 1316# CONFIG_CRYPTO_DEFLATE is not set
1317# CONFIG_CRYPTO_ZLIB is not set
1309# CONFIG_CRYPTO_LZO is not set 1318# CONFIG_CRYPTO_LZO is not set
1310 1319
1311# 1320#
@@ -1326,7 +1335,7 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1326CONFIG_CRC32=y 1335CONFIG_CRC32=y
1327# CONFIG_CRC7 is not set 1336# CONFIG_CRC7 is not set
1328# CONFIG_LIBCRC32C is not set 1337# CONFIG_LIBCRC32C is not set
1329CONFIG_PLIST=y
1330CONFIG_HAS_IOMEM=y 1338CONFIG_HAS_IOMEM=y
1331CONFIG_HAS_IOPORT=y 1339CONFIG_HAS_IOPORT=y
1332CONFIG_HAS_DMA=y 1340CONFIG_HAS_DMA=y
1341CONFIG_NLATTR=y
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
index f13a05285a9d..666713ac5fcf 100644
--- a/arch/sh/drivers/dma/Kconfig
+++ b/arch/sh/drivers/dma/Kconfig
@@ -12,21 +12,25 @@ config SH_DMA
12config SH_DMA_IRQ_MULTI 12config SH_DMA_IRQ_MULTI
13 bool 13 bool
14 depends on SH_DMA 14 depends on SH_DMA
15 default y if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7751 || \ 15 default y if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7751 || \
16 CPU_SUBTYPE_SH7750S || CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \ 16 CPU_SUBTYPE_SH7750S || CPU_SUBTYPE_SH7750R || \
17 CPU_SUBTYPE_SH7091 || CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7764 || \ 17 CPU_SUBTYPE_SH7751R || CPU_SUBTYPE_SH7091 || \
18 CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785 18 CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7764 || \
19 CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785
19 20
20config NR_ONCHIP_DMA_CHANNELS 21config NR_ONCHIP_DMA_CHANNELS
21 int 22 int
22 depends on SH_DMA 23 depends on SH_DMA
23 default "4" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7750S 24 default "4" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7751 || \
24 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || CPU_SUBTYPE_SH7760 25 CPU_SUBTYPE_SH7750S || CPU_SUBTYPE_SH7091
25 default "12" if CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785 26 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \
27 CPU_SUBTYPE_SH7760
28 default "12" if CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7780 || \
29 CPU_SUBTYPE_SH7785
26 default "6" 30 default "6"
27 help 31 help
28 This allows you to specify the number of channels that the on-chip 32 This allows you to specify the number of channels that the on-chip
29 DMAC supports. This will be 4 for SH7750/SH7751 and 8 for the 33 DMAC supports. This will be 4 for SH7091/SH7750/SH7751 and 8 for the
30 SH7750R/SH7751R. 34 SH7750R/SH7751R.
31 35
32config NR_DMA_CHANNELS_BOOL 36config NR_DMA_CHANNELS_BOOL
diff --git a/arch/sh/drivers/pci/ops-sh7785lcr.c b/arch/sh/drivers/pci/ops-sh7785lcr.c
index b3bd68702059..e8b7446a7c2b 100644
--- a/arch/sh/drivers/pci/ops-sh7785lcr.c
+++ b/arch/sh/drivers/pci/ops-sh7785lcr.c
@@ -48,13 +48,8 @@ EXPORT_SYMBOL(board_pci_channels);
48 48
49static struct sh4_pci_address_map sh7785_pci_map = { 49static struct sh4_pci_address_map sh7785_pci_map = {
50 .window0 = { 50 .window0 = {
51 .base = SH7780_CS2_BASE_ADDR, 51 .base = SH7780_CS0_BASE_ADDR,
52 .size = 0x04000000, 52 .size = 0x20000000,
53 },
54
55 .window1 = {
56 .base = SH7780_CS3_BASE_ADDR,
57 .size = 0x04000000,
58 }, 53 },
59 54
60 .flags = SH4_PCIC_NO_RESET, 55 .flags = SH4_PCIC_NO_RESET,
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index 773d575a04b9..bae6a2cf047d 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -120,19 +120,15 @@ int __init sh7780_pcic_init(struct sh4_pci_address_map *map)
120 120
121 /* Set IO and Mem windows to local address 121 /* Set IO and Mem windows to local address
122 * Make PCI and local address the same for easy 1 to 1 mapping 122 * Make PCI and local address the same for easy 1 to 1 mapping
123 * Window0 = map->window0.size @ non-cached area base = SDRAM
124 * Window1 = map->window1.size @ cached area base = SDRAM
125 */ 123 */
126 word = (CONFIG_MEMORY_SIZE - 0x00100000) | 0x00000001; 124 pci_write_reg(map->window0.size - 0xfffff, SH4_PCILSR0);
127 pci_write_reg(word, SH4_PCILSR0); 125 pci_write_reg(map->window1.size - 0xfffff, SH4_PCILSR1);
128 pci_write_reg(0x00000001, SH4_PCILSR1);
129 /* Set the values on window 0 PCI config registers */ 126 /* Set the values on window 0 PCI config registers */
130 word = CONFIG_MEMORY_START | (CONFIG_MEMORY_SIZE - 0x01000000); 127 pci_write_reg(map->window0.base, SH4_PCILAR0);
131 pci_write_reg(word, SH4_PCILAR0); 128 pci_write_reg(map->window0.base, SH7780_PCIMBAR0);
132 pci_write_reg(word, SH7780_PCIMBAR0);
133 /* Set the values on window 1 PCI config registers */ 129 /* Set the values on window 1 PCI config registers */
134 pci_write_reg(0x00000000, SH4_PCILAR1); 130 pci_write_reg(map->window1.base, SH4_PCILAR1);
135 pci_write_reg(0x00000000, SH7780_PCIMBAR1); 131 pci_write_reg(map->window1.base, SH7780_PCIMBAR1);
136 132
137 /* Map IO space into PCI IO window 133 /* Map IO space into PCI IO window
138 * The IO window is 64K-PCIBIOS_MIN_IO in size 134 * The IO window is 64K-PCIBIOS_MIN_IO in size
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h
index 6c43625bb1a5..f5963037c9d6 100644
--- a/arch/sh/include/asm/mmu.h
+++ b/arch/sh/include/asm/mmu.h
@@ -1,22 +1,6 @@
1#ifndef __MMU_H 1#ifndef __MMU_H
2#define __MMU_H 2#define __MMU_H
3 3
4/* Default "unsigned long" context */
5typedef unsigned long mm_context_id_t[NR_CPUS];
6
7typedef struct {
8#ifdef CONFIG_MMU
9 mm_context_id_t id;
10 void *vdso;
11#else
12 unsigned long end_brk;
13#endif
14#ifdef CONFIG_BINFMT_ELF_FDPIC
15 unsigned long exec_fdpic_loadmap;
16 unsigned long interp_fdpic_loadmap;
17#endif
18} mm_context_t;
19
20/* 4/*
21 * Privileged Space Mapping Buffer (PMB) definitions 5 * Privileged Space Mapping Buffer (PMB) definitions
22 */ 6 */
@@ -41,6 +25,24 @@ typedef struct {
41 25
42#define PMB_NO_ENTRY (-1) 26#define PMB_NO_ENTRY (-1)
43 27
28#ifndef __ASSEMBLY__
29
30/* Default "unsigned long" context */
31typedef unsigned long mm_context_id_t[NR_CPUS];
32
33typedef struct {
34#ifdef CONFIG_MMU
35 mm_context_id_t id;
36 void *vdso;
37#else
38 unsigned long end_brk;
39#endif
40#ifdef CONFIG_BINFMT_ELF_FDPIC
41 unsigned long exec_fdpic_loadmap;
42 unsigned long interp_fdpic_loadmap;
43#endif
44} mm_context_t;
45
44struct pmb_entry; 46struct pmb_entry;
45 47
46struct pmb_entry { 48struct pmb_entry {
@@ -70,6 +72,7 @@ void pmb_free(struct pmb_entry *pmbe);
70long pmb_remap(unsigned long virt, unsigned long phys, 72long pmb_remap(unsigned long virt, unsigned long phys,
71 unsigned long size, unsigned long flags); 73 unsigned long size, unsigned long flags);
72void pmb_unmap(unsigned long addr); 74void pmb_unmap(unsigned long addr);
75#endif /* __ASSEMBLY__ */
73 76
74#endif /* __MMU_H */ 77#endif /* __MMU_H */
75 78
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index efdd78a53b11..9a8714945dc9 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -58,6 +58,14 @@ asmlinkage void __init sh_cpu_init(void);
58#define SR_FD 0x00008000 58#define SR_FD 0x00008000
59 59
60/* 60/*
61 * DSP structure and data
62 */
63struct sh_dsp_struct {
64 unsigned long dsp_regs[14];
65 long status;
66};
67
68/*
61 * FPU structure and data 69 * FPU structure and data
62 */ 70 */
63 71
@@ -96,6 +104,11 @@ struct thread_struct {
96 104
97 /* floating point info */ 105 /* floating point info */
98 union sh_fpu_union fpu; 106 union sh_fpu_union fpu;
107
108#ifdef CONFIG_SH_DSP
109 /* Dsp status information */
110 struct sh_dsp_struct dsp_status;
111#endif
99}; 112};
100 113
101/* Count of active tasks with UBC settings */ 114/* Count of active tasks with UBC settings */
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index 81c6568fdb3e..d3f6caa936b0 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -119,16 +119,8 @@ struct task_struct;
119extern void user_enable_single_step(struct task_struct *); 119extern void user_enable_single_step(struct task_struct *);
120extern void user_disable_single_step(struct task_struct *); 120extern void user_disable_single_step(struct task_struct *);
121 121
122#ifdef CONFIG_SH_DSP
123#define task_pt_regs(task) \
124 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
125 - sizeof(struct pt_dspregs)) - 1)
126#define task_pt_dspregs(task) \
127 ((struct pt_dspregs *) (task_stack_page(task) + THREAD_SIZE) - 1)
128#else
129#define task_pt_regs(task) \ 122#define task_pt_regs(task) \
130 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1) 123 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
131#endif
132 124
133static inline unsigned long profile_pc(struct pt_regs *regs) 125static inline unsigned long profile_pc(struct pt_regs *regs)
134{ 126{
diff --git a/arch/sh/include/asm/spinlock.h b/arch/sh/include/asm/spinlock.h
index e793181d64da..60283565f89b 100644
--- a/arch/sh/include/asm/spinlock.h
+++ b/arch/sh/include/asm/spinlock.h
@@ -216,6 +216,9 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
216 return (oldval > (RW_LOCK_BIAS - 1)); 216 return (oldval > (RW_LOCK_BIAS - 1));
217} 217}
218 218
219#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
220#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
221
219#define _raw_spin_relax(lock) cpu_relax() 222#define _raw_spin_relax(lock) cpu_relax()
220#define _raw_read_relax(lock) cpu_relax() 223#define _raw_read_relax(lock) cpu_relax()
221#define _raw_write_relax(lock) cpu_relax() 224#define _raw_write_relax(lock) cpu_relax()
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h
index c9ec6af8e745..a88895e6dcb0 100644
--- a/arch/sh/include/asm/system.h
+++ b/arch/sh/include/asm/system.h
@@ -153,6 +153,7 @@ extern unsigned long cached_to_uncached;
153extern struct dentry *sh_debugfs_root; 153extern struct dentry *sh_debugfs_root;
154 154
155void per_cpu_trap_init(void); 155void per_cpu_trap_init(void);
156void default_idle(void);
156 157
157asmlinkage void break_point_trap(void); 158asmlinkage void break_point_trap(void);
158 159
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index a726d5d07277..240b31e1142c 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -3,59 +3,135 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6#ifdef CONFIG_SH_DSP
7
8#define is_dsp_enabled(tsk) \
9 (!!(tsk->thread.dsp_status.status & SR_DSP))
10
11#define __restore_dsp(tsk) \
12do { \
13 register u32 *__ts2 __asm__ ("r2") = \
14 (u32 *)&tsk->thread.dsp_status; \
15 __asm__ __volatile__ ( \
16 ".balign 4\n\t" \
17 "movs.l @r2+, a1\n\t" \
18 "movs.l @r2+, a0g\n\t" \
19 "movs.l @r2+, a1g\n\t" \
20 "movs.l @r2+, m0\n\t" \
21 "movs.l @r2+, m1\n\t" \
22 "movs.l @r2+, a0\n\t" \
23 "movs.l @r2+, x0\n\t" \
24 "movs.l @r2+, x1\n\t" \
25 "movs.l @r2+, y0\n\t" \
26 "movs.l @r2+, y1\n\t" \
27 "lds.l @r2+, dsr\n\t" \
28 "ldc.l @r2+, rs\n\t" \
29 "ldc.l @r2+, re\n\t" \
30 "ldc.l @r2+, mod\n\t" \
31 : : "r" (__ts2)); \
32} while (0)
33
34
35#define __save_dsp(tsk) \
36do { \
37 register u32 *__ts2 __asm__ ("r2") = \
38 (u32 *)&tsk->thread.dsp_status + 14; \
39 \
40 __asm__ __volatile__ ( \
41 ".balign 4\n\t" \
42 "stc.l mod, @-r2\n\t" \
43 "stc.l re, @-r2\n\t" \
44 "stc.l rs, @-r2\n\t" \
45 "sts.l dsr, @-r2\n\t" \
46 "sts.l y1, @-r2\n\t" \
47 "sts.l y0, @-r2\n\t" \
48 "sts.l x1, @-r2\n\t" \
49 "sts.l x0, @-r2\n\t" \
50 "sts.l a0, @-r2\n\t" \
51 ".word 0xf653 ! movs.l a1, @-r2\n\t" \
52 ".word 0xf6f3 ! movs.l a0g, @-r2\n\t" \
53 ".word 0xf6d3 ! movs.l a1g, @-r2\n\t" \
54 ".word 0xf6c3 ! movs.l m0, @-r2\n\t" \
55 ".word 0xf6e3 ! movs.l m1, @-r2\n\t" \
56 : : "r" (__ts2)); \
57} while (0)
58
59#else
60
61#define is_dsp_enabled(tsk) (0)
62#define __save_dsp(tsk) do { } while (0)
63#define __restore_dsp(tsk) do { } while (0)
64#endif
65
6struct task_struct *__switch_to(struct task_struct *prev, 66struct task_struct *__switch_to(struct task_struct *prev,
7 struct task_struct *next); 67 struct task_struct *next);
8 68
9/* 69/*
10 * switch_to() should switch tasks to task nr n, first 70 * switch_to() should switch tasks to task nr n, first
11 */ 71 */
12#define switch_to(prev, next, last) \ 72#define switch_to(prev, next, last) \
13do { \ 73do { \
14 register u32 *__ts1 __asm__ ("r1") = (u32 *)&prev->thread.sp; \ 74 register u32 *__ts1 __asm__ ("r1"); \
15 register u32 *__ts2 __asm__ ("r2") = (u32 *)&prev->thread.pc; \ 75 register u32 *__ts2 __asm__ ("r2"); \
16 register u32 *__ts4 __asm__ ("r4") = (u32 *)prev; \ 76 register u32 *__ts4 __asm__ ("r4"); \
17 register u32 *__ts5 __asm__ ("r5") = (u32 *)next; \ 77 register u32 *__ts5 __asm__ ("r5"); \
18 register u32 *__ts6 __asm__ ("r6") = (u32 *)&next->thread.sp; \ 78 register u32 *__ts6 __asm__ ("r6"); \
19 register u32 __ts7 __asm__ ("r7") = next->thread.pc; \ 79 register u32 __ts7 __asm__ ("r7"); \
20 struct task_struct *__last; \ 80 struct task_struct *__last; \
21 \ 81 \
22 __asm__ __volatile__ ( \ 82 if (is_dsp_enabled(prev)) \
23 ".balign 4\n\t" \ 83 __save_dsp(prev); \
24 "stc.l gbr, @-r15\n\t" \ 84 \
25 "sts.l pr, @-r15\n\t" \ 85 __ts1 = (u32 *)&prev->thread.sp; \
26 "mov.l r8, @-r15\n\t" \ 86 __ts2 = (u32 *)&prev->thread.pc; \
27 "mov.l r9, @-r15\n\t" \ 87 __ts4 = (u32 *)prev; \
28 "mov.l r10, @-r15\n\t" \ 88 __ts5 = (u32 *)next; \
29 "mov.l r11, @-r15\n\t" \ 89 __ts6 = (u32 *)&next->thread.sp; \
30 "mov.l r12, @-r15\n\t" \ 90 __ts7 = next->thread.pc; \
31 "mov.l r13, @-r15\n\t" \ 91 \
32 "mov.l r14, @-r15\n\t" \ 92 __asm__ __volatile__ ( \
33 "mov.l r15, @r1\t! save SP\n\t" \ 93 ".balign 4\n\t" \
34 "mov.l @r6, r15\t! change to new stack\n\t" \ 94 "stc.l gbr, @-r15\n\t" \
35 "mova 1f, %0\n\t" \ 95 "sts.l pr, @-r15\n\t" \
36 "mov.l %0, @r2\t! save PC\n\t" \ 96 "mov.l r8, @-r15\n\t" \
37 "mov.l 2f, %0\n\t" \ 97 "mov.l r9, @-r15\n\t" \
38 "jmp @%0\t! call __switch_to\n\t" \ 98 "mov.l r10, @-r15\n\t" \
39 " lds r7, pr\t! with return to new PC\n\t" \ 99 "mov.l r11, @-r15\n\t" \
40 ".balign 4\n" \ 100 "mov.l r12, @-r15\n\t" \
41 "2:\n\t" \ 101 "mov.l r13, @-r15\n\t" \
42 ".long __switch_to\n" \ 102 "mov.l r14, @-r15\n\t" \
43 "1:\n\t" \ 103 "mov.l r15, @r1\t! save SP\n\t" \
44 "mov.l @r15+, r14\n\t" \ 104 "mov.l @r6, r15\t! change to new stack\n\t" \
45 "mov.l @r15+, r13\n\t" \ 105 "mova 1f, %0\n\t" \
46 "mov.l @r15+, r12\n\t" \ 106 "mov.l %0, @r2\t! save PC\n\t" \
47 "mov.l @r15+, r11\n\t" \ 107 "mov.l 2f, %0\n\t" \
48 "mov.l @r15+, r10\n\t" \ 108 "jmp @%0\t! call __switch_to\n\t" \
49 "mov.l @r15+, r9\n\t" \ 109 " lds r7, pr\t! with return to new PC\n\t" \
50 "mov.l @r15+, r8\n\t" \ 110 ".balign 4\n" \
51 "lds.l @r15+, pr\n\t" \ 111 "2:\n\t" \
52 "ldc.l @r15+, gbr\n\t" \ 112 ".long __switch_to\n" \
53 : "=z" (__last) \ 113 "1:\n\t" \
54 : "r" (__ts1), "r" (__ts2), "r" (__ts4), \ 114 "mov.l @r15+, r14\n\t" \
55 "r" (__ts5), "r" (__ts6), "r" (__ts7) \ 115 "mov.l @r15+, r13\n\t" \
56 : "r3", "t"); \ 116 "mov.l @r15+, r12\n\t" \
57 \ 117 "mov.l @r15+, r11\n\t" \
58 last = __last; \ 118 "mov.l @r15+, r10\n\t" \
119 "mov.l @r15+, r9\n\t" \
120 "mov.l @r15+, r8\n\t" \
121 "lds.l @r15+, pr\n\t" \
122 "ldc.l @r15+, gbr\n\t" \
123 : "=z" (__last) \
124 : "r" (__ts1), "r" (__ts2), "r" (__ts4), \
125 "r" (__ts5), "r" (__ts6), "r" (__ts7) \
126 : "r3", "t"); \
127 \
128 last = __last; \
129} while (0)
130
131#define finish_arch_switch(prev) \
132do { \
133 if (is_dsp_enabled(prev)) \
134 __restore_dsp(prev); \
59} while (0) 135} while (0)
60 136
61#define __uses_jump_to_uncached \ 137#define __uses_jump_to_uncached \
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 066f0fba590e..a3f239545897 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -33,7 +33,6 @@
33 33
34#define node_to_cpumask(node) ((void)node, cpu_online_map) 34#define node_to_cpumask(node) ((void)node, cpu_online_map)
35#define cpumask_of_node(node) ((void)node, cpu_online_mask) 35#define cpumask_of_node(node) ((void)node, cpu_online_mask)
36#define node_to_first_cpu(node) ((void)(node),0)
37 36
38#define pcibus_to_node(bus) ((void)(bus), -1) 37#define pcibus_to_node(bus) ((void)(bus), -1)
39#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ 38#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7786.h b/arch/sh/include/cpu-sh4/cpu/sh7786.h
index 48688adc0c84..977862f9072a 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7786.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7786.h
@@ -51,142 +51,86 @@ enum {
51 GPIO_PJ7, GPIO_PJ6, GPIO_PJ5, GPIO_PJ4, 51 GPIO_PJ7, GPIO_PJ6, GPIO_PJ5, GPIO_PJ4,
52 GPIO_PJ3, GPIO_PJ2, GPIO_PJ1, GPIO_PJ0, 52 GPIO_PJ3, GPIO_PJ2, GPIO_PJ1, GPIO_PJ0,
53 53
54 GPIO_FN_CDE, 54 /* DU */
55 GPIO_FN_ETH_MAGIC, 55 GPIO_FN_DCLKIN, GPIO_FN_DCLKOUT, GPIO_FN_ODDF,
56 GPIO_FN_DISP, 56 GPIO_FN_VSYNC, GPIO_FN_HSYNC, GPIO_FN_CDE, GPIO_FN_DISP,
57 GPIO_FN_ETH_LINK, 57 GPIO_FN_DR0, GPIO_FN_DG0, GPIO_FN_DB0,
58 GPIO_FN_DR5, 58 GPIO_FN_DR1, GPIO_FN_DG1, GPIO_FN_DB1,
59 GPIO_FN_ETH_TX_ER, 59 GPIO_FN_DR2, GPIO_FN_DG2, GPIO_FN_DB2,
60 GPIO_FN_DR4, 60 GPIO_FN_DR3, GPIO_FN_DG3, GPIO_FN_DB3,
61 GPIO_FN_ETH_TX_EN, 61 GPIO_FN_DR4, GPIO_FN_DG4, GPIO_FN_DB4,
62 GPIO_FN_DR3, 62 GPIO_FN_DR5, GPIO_FN_DG5, GPIO_FN_DB5,
63 GPIO_FN_ETH_TXD3, 63
64 GPIO_FN_DR2, 64 /* Eth */
65 GPIO_FN_ETH_TXD2, 65 GPIO_FN_ETH_MAGIC, GPIO_FN_ETH_LINK, GPIO_FN_ETH_TX_ER,
66 GPIO_FN_DR1, 66 GPIO_FN_ETH_TX_EN, GPIO_FN_ETH_MDIO, GPIO_FN_ETH_RX_CLK,
67 GPIO_FN_ETH_TXD1, 67 GPIO_FN_ETH_MDC, GPIO_FN_ETH_COL, GPIO_FN_ETH_TX_CLK,
68 GPIO_FN_DR0, 68 GPIO_FN_ETH_CRS, GPIO_FN_ETH_RX_DV, GPIO_FN_ETH_RX_ER,
69 GPIO_FN_ETH_TXD0, 69 GPIO_FN_ETH_TXD3, GPIO_FN_ETH_TXD2, GPIO_FN_ETH_TXD1, GPIO_FN_ETH_TXD0,
70 GPIO_FN_VSYNC, 70 GPIO_FN_ETH_RXD3, GPIO_FN_ETH_RXD2, GPIO_FN_ETH_RXD1, GPIO_FN_ETH_RXD0,
71 GPIO_FN_HSPI_CLK, 71
72 GPIO_FN_ODDF, 72 /* HSPI */
73 GPIO_FN_HSPI_CS, 73 GPIO_FN_HSPI_CLK, GPIO_FN_HSPI_CS, GPIO_FN_HSPI_RX, GPIO_FN_HSPI_TX,
74 GPIO_FN_DG5, 74
75 GPIO_FN_ETH_MDIO, 75 /* SCIF0 */
76 GPIO_FN_DG4, 76 GPIO_FN_SCIF0_CTS, GPIO_FN_SCIF0_RTS, GPIO_FN_SCIF0_SCK,
77 GPIO_FN_ETH_RX_CLK, 77 GPIO_FN_SCIF0_RXD, GPIO_FN_SCIF0_TXD,
78 GPIO_FN_DG3, 78
79 GPIO_FN_ETH_MDC, 79 /* SCIF1 */
80 GPIO_FN_DG2, 80 GPIO_FN_SCIF1_SCK, GPIO_FN_SCIF1_RXD, GPIO_FN_SCIF1_TXD,
81 GPIO_FN_ETH_COL, 81
82 GPIO_FN_DG1, 82 /* SCIF3 */
83 GPIO_FN_ETH_TX_CLK, 83 GPIO_FN_SCIF3_SCK, GPIO_FN_SCIF3_RXD, GPIO_FN_SCIF3_TXD,
84 GPIO_FN_DG0, 84
85 GPIO_FN_ETH_CRS, 85 /* SCIF4 */
86 GPIO_FN_DCLKIN, 86 GPIO_FN_SCIF4_SCK, GPIO_FN_SCIF4_RXD, GPIO_FN_SCIF4_TXD,
87 GPIO_FN_HSPI_RX, 87
88 GPIO_FN_HSYNC, 88 /* SCIF5 */
89 GPIO_FN_HSPI_TX, 89 GPIO_FN_SCIF5_SCK, GPIO_FN_SCIF5_RXD, GPIO_FN_SCIF5_TXD,
90 GPIO_FN_DB5, 90
91 GPIO_FN_ETH_RXD3, 91 /* LBSC */
92 GPIO_FN_DB4, 92 GPIO_FN_BREQ, GPIO_FN_IOIS16, GPIO_FN_CE2B, GPIO_FN_CE2A, GPIO_FN_BACK,
93 GPIO_FN_ETH_RXD2, 93
94 GPIO_FN_DB3, 94 /* FLCTL */
95 GPIO_FN_ETH_RXD1, 95 GPIO_FN_FALE, GPIO_FN_FRB, GPIO_FN_FSTATUS,
96 GPIO_FN_DB2, 96 GPIO_FN_FSE, GPIO_FN_FCLE,
97 GPIO_FN_ETH_RXD0, 97
98 GPIO_FN_DB1, 98 /* DMAC */
99 GPIO_FN_ETH_RX_DV, 99 GPIO_FN_DACK0, GPIO_FN_DREQ0, GPIO_FN_DRAK0,
100 GPIO_FN_DB0, 100 GPIO_FN_DACK1, GPIO_FN_DREQ1, GPIO_FN_DRAK1,
101 GPIO_FN_ETH_RX_ER, 101 GPIO_FN_DACK2, GPIO_FN_DREQ2, GPIO_FN_DRAK2,
102 GPIO_FN_DCLKOUT, 102 GPIO_FN_DACK3, GPIO_FN_DREQ3, GPIO_FN_DRAK3,
103 GPIO_FN_SCIF1_SLK, 103
104 GPIO_FN_SCIF1_RXD, 104 /* USB */
105 GPIO_FN_SCIF1_TXD, 105 GPIO_FN_USB_OVC0, GPIO_FN_USB_PENC0,
106 GPIO_FN_DACK1, 106 GPIO_FN_USB_OVC1, GPIO_FN_USB_PENC1,
107 GPIO_FN_BACK, 107
108 GPIO_FN_FALE, 108 /* HAC */
109 GPIO_FN_DACK0,
110 GPIO_FN_FCLE,
111 GPIO_FN_DREQ1,
112 GPIO_FN_BREQ,
113 GPIO_FN_USB_OVC1,
114 GPIO_FN_DREQ0,
115 GPIO_FN_USB_OVC0,
116 GPIO_FN_USB_PENC1,
117 GPIO_FN_USB_PENC0,
118 GPIO_FN_HAC1_SDOUT,
119 GPIO_FN_SSI1_SDATA,
120 GPIO_FN_SDIF1CMD,
121 GPIO_FN_HAC1_SDIN,
122 GPIO_FN_SSI1_SCK,
123 GPIO_FN_SDIF1CD,
124 GPIO_FN_HAC1_SYNC,
125 GPIO_FN_SSI1_WS,
126 GPIO_FN_SDIF1WP,
127 GPIO_FN_HAC1_BITCLK,
128 GPIO_FN_SSI1_CLK,
129 GPIO_FN_SDIF1CLK,
130 GPIO_FN_HAC0_SDOUT,
131 GPIO_FN_SSI0_SDATA,
132 GPIO_FN_SDIF1D3,
133 GPIO_FN_HAC0_SDIN,
134 GPIO_FN_SSI0_SCK,
135 GPIO_FN_SDIF1D2,
136 GPIO_FN_HAC0_SYNC,
137 GPIO_FN_SSI0_WS,
138 GPIO_FN_SDIF1D1,
139 GPIO_FN_HAC0_BITCLK,
140 GPIO_FN_SSI0_CLK,
141 GPIO_FN_SDIF1D0,
142 GPIO_FN_SCIF3_SCK,
143 GPIO_FN_SSI2_SDATA,
144 GPIO_FN_SCIF3_RXD,
145 GPIO_FN_TCLK,
146 GPIO_FN_SSI2_SCK,
147 GPIO_FN_SCIF3_TXD,
148 GPIO_FN_HAC_RES, 109 GPIO_FN_HAC_RES,
149 GPIO_FN_SSI2_WS, 110 GPIO_FN_HAC0_SDOUT, GPIO_FN_HAC0_SDIN,
150 GPIO_FN_DACK3, 111 GPIO_FN_HAC0_SYNC, GPIO_FN_HAC0_BITCLK,
151 GPIO_FN_SDIF0CMD, 112 GPIO_FN_HAC1_SDOUT, GPIO_FN_HAC1_SDIN,
152 GPIO_FN_DACK2, 113 GPIO_FN_HAC1_SYNC, GPIO_FN_HAC1_BITCLK,
153 GPIO_FN_SDIF0CD, 114
154 GPIO_FN_DREQ3, 115 /* SSI */
155 GPIO_FN_SDIF0WP, 116 GPIO_FN_SSI0_SDATA, GPIO_FN_SSI0_SCK, GPIO_FN_SSI0_WS, GPIO_FN_SSI0_CLK,
156 GPIO_FN_SCIF0_CTS, 117 GPIO_FN_SSI1_SDATA, GPIO_FN_SSI1_SCK, GPIO_FN_SSI1_WS, GPIO_FN_SSI1_CLK,
157 GPIO_FN_DREQ2, 118 GPIO_FN_SSI2_SDATA, GPIO_FN_SSI2_SCK, GPIO_FN_SSI2_WS,
158 GPIO_FN_SDIF0CLK, 119 GPIO_FN_SSI3_SDATA, GPIO_FN_SSI3_SCK, GPIO_FN_SSI3_WS,
159 GPIO_FN_SCIF0_RTS, 120
160 GPIO_FN_IRL7, 121 /* SDIF1 */
161 GPIO_FN_SDIF0D3, 122 GPIO_FN_SDIF1CMD, GPIO_FN_SDIF1CD, GPIO_FN_SDIF1WP, GPIO_FN_SDIF1CLK,
162 GPIO_FN_SCIF0_SCK, 123 GPIO_FN_SDIF1D3, GPIO_FN_SDIF1D2, GPIO_FN_SDIF1D1, GPIO_FN_SDIF1D0,
163 GPIO_FN_IRL6, 124
164 GPIO_FN_SDIF0D2, 125 /* SDIF0 */
165 GPIO_FN_SCIF0_RXD, 126 GPIO_FN_SDIF0CMD, GPIO_FN_SDIF0CD, GPIO_FN_SDIF0WP, GPIO_FN_SDIF0CLK,
166 GPIO_FN_IRL5, 127 GPIO_FN_SDIF0D3, GPIO_FN_SDIF0D2, GPIO_FN_SDIF0D1, GPIO_FN_SDIF0D0,
167 GPIO_FN_SDIF0D1, 128
168 GPIO_FN_SCIF0_TXD, 129 /* TMU */
169 GPIO_FN_IRL4, 130 GPIO_FN_TCLK,
170 GPIO_FN_SDIF0D0, 131
171 GPIO_FN_SCIF5_SCK, 132 /* INTC */
172 GPIO_FN_FRB, 133 GPIO_FN_IRL7, GPIO_FN_IRL6, GPIO_FN_IRL5, GPIO_FN_IRL4,
173 GPIO_FN_SCIF5_RXD,
174 GPIO_FN_IOIS16,
175 GPIO_FN_SCIF5_TXD,
176 GPIO_FN_CE2B,
177 GPIO_FN_DRAK3,
178 GPIO_FN_CE2A,
179 GPIO_FN_SCIF4_SCK,
180 GPIO_FN_DRAK2,
181 GPIO_FN_SSI3_WS,
182 GPIO_FN_SCIF4_RXD,
183 GPIO_FN_DRAK1,
184 GPIO_FN_SSI3_SDATA,
185 GPIO_FN_FSTATUS,
186 GPIO_FN_SCIF4_TXD,
187 GPIO_FN_DRAK0,
188 GPIO_FN_SSI3_SCK,
189 GPIO_FN_FSE,
190}; 134};
191 135
192#endif /* __CPU_SH7786_H__ */ 136#endif /* __CPU_SH7786_H__ */
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index 55da0ff9848d..3cb531f233f2 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -254,40 +254,6 @@ restore_all:
254 254
255 lds k2, pr ! restore pr 255 lds k2, pr ! restore pr
256 ! 256 !
257#ifdef CONFIG_SH_DSP
258 mov.l @r15+, k0 ! DSP mode marker
259 mov.l 5f, k1
260 cmp/eq k0, k1 ! Do we have a DSP stack frame?
261 bf skip_restore
262
263 stc sr, k0 ! Enable CPU DSP mode
264 or k1, k0 ! (within kernel it may be disabled)
265 ldc k0, sr
266 mov r2, k0 ! Backup r2
267
268 ! Restore DSP registers from stack
269 mov r15, r2
270 movs.l @r2+, a1
271 movs.l @r2+, a0g
272 movs.l @r2+, a1g
273 movs.l @r2+, m0
274 movs.l @r2+, m1
275 mov r2, r15
276
277 lds.l @r15+, a0
278 lds.l @r15+, x0
279 lds.l @r15+, x1
280 lds.l @r15+, y0
281 lds.l @r15+, y1
282 lds.l @r15+, dsr
283 ldc.l @r15+, rs
284 ldc.l @r15+, re
285 ldc.l @r15+, mod
286
287 mov k0, r2 ! Restore r2
288skip_restore:
289#endif
290 !
291 ! Calculate new SR value 257 ! Calculate new SR value
292 mov k3, k2 ! original SR value 258 mov k3, k2 ! original SR value
293 mov #0xf0, k1 259 mov #0xf0, k1
@@ -358,7 +324,7 @@ general_exception:
358 add k0, k4 324 add k0, k4
3590: 3250:
360 ! Setup stack and save DSP context (k0 contains original r15 on return) 326 ! Setup stack and save DSP context (k0 contains original r15 on return)
361 bsr prepare_stack_save_dsp 327 bsr prepare_stack
362 nop 328 nop
363 329
364 ! Save registers / Switch to bank 0 330 ! Save registers / Switch to bank 0
@@ -374,15 +340,14 @@ general_exception:
3741: .long EXPEVT 3401: .long EXPEVT
375#endif 341#endif
376 342
377! prepare_stack_save_dsp() 343! prepare_stack()
378! - roll back gRB 344! - roll back gRB
379! - switch to kernel stack 345! - switch to kernel stack
380! - save DSP
381! k0 returns original sp (after roll back) 346! k0 returns original sp (after roll back)
382! k1 trashed 347! k1 trashed
383! k2 trashed 348! k2 trashed
384 349
385prepare_stack_save_dsp: 350prepare_stack:
386#ifdef CONFIG_GUSA 351#ifdef CONFIG_GUSA
387 ! Check for roll back gRB (User and Kernel) 352 ! Check for roll back gRB (User and Kernel)
388 mov r15, k0 353 mov r15, k0
@@ -416,47 +381,9 @@ prepare_stack_save_dsp:
416 mov k1, r15 ! change to kernel stack 381 mov k1, r15 ! change to kernel stack
417 ! 382 !
4181: 3831:
419#ifdef CONFIG_SH_DSP
420 ! Save DSP context if needed
421 stc sr, k1
422 mov #0x10, k2
423 shll8 k2 ! DSP=1 (0x00001000)
424 tst k2, k1 ! Check if in DSP mode (passed in k2)
425 bt/s skip_save
426 mov #0, k1 ! Set marker for no stack frame
427
428 mov k2, k1 ! Save has-frame marker
429
430 ! Save DSP registers on stack
431 stc.l mod, @-r15
432 stc.l re, @-r15
433 stc.l rs, @-r15
434 sts.l dsr, @-r15
435 sts.l y1, @-r15
436 sts.l y0, @-r15
437 sts.l x1, @-r15
438 sts.l x0, @-r15
439 sts.l a0, @-r15
440
441 ! GAS is broken, does not generate correct "movs.l Ds,@-As" instr.
442
443 ! FIXME: Make sure that this is still the case with newer toolchains,
444 ! as we're not at all interested in supporting ancient toolchains at
445 ! this point. -- PFM.
446
447 mov r15, k2
448 .word 0xf653 ! movs.l a1, @-r2
449 .word 0xf6f3 ! movs.l a0g, @-r2
450 .word 0xf6d3 ! movs.l a1g, @-r2
451 .word 0xf6c3 ! movs.l m0, @-r2
452 .word 0xf6e3 ! movs.l m1, @-r2
453 mov k2, r15
454
455skip_save:
456 mov.l k1, @-r15 ! Push DSP mode marker onto stack
457#endif
458 rts 384 rts
459 nop 385 nop
386
460! 387!
461! 0x400: Instruction and Data TLB miss exception vector 388! 0x400: Instruction and Data TLB miss exception vector
462! 389!
@@ -468,7 +395,7 @@ handle_exception:
468 mova exception_data, k0 395 mova exception_data, k0
469 396
470 ! Setup stack and save DSP context (k0 contains original r15 on return) 397 ! Setup stack and save DSP context (k0 contains original r15 on return)
471 bsr prepare_stack_save_dsp 398 bsr prepare_stack
472 PREF(k0) 399 PREF(k0)
473 400
474 ! Save registers / Switch to bank 0 401 ! Save registers / Switch to bank 0
@@ -572,7 +499,7 @@ ENTRY(handle_interrupt)
572 mova exception_data, k0 499 mova exception_data, k0
573 500
574 ! Setup stack and save DSP context (k0 contains original r15 on return) 501 ! Setup stack and save DSP context (k0 contains original r15 on return)
575 bsr prepare_stack_save_dsp 502 bsr prepare_stack
576 PREF(k0) 503 PREF(k0)
577 504
578 ! Save registers / Switch to bank 0 505 ! Save registers / Switch to bank 0
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 3d3a3c4425a9..91e3677ae09d 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -199,11 +199,6 @@ int __init detect_cpu_and_cache_system(void)
199 break; 199 break;
200 } 200 }
201 201
202#ifdef CONFIG_SH_DIRECT_MAPPED
203 boot_cpu_data.icache.ways = 1;
204 boot_cpu_data.dcache.ways = 1;
205#endif
206
207#ifdef CONFIG_CPU_HAS_PTEA 202#ifdef CONFIG_CPU_HAS_PTEA
208 boot_cpu_data.flags |= CPU_HAS_PTEA; 203 boot_cpu_data.flags |= CPU_HAS_PTEA;
209#endif 204#endif
diff --git a/arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c b/arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c
index 373b3447bfdf..4229e0724c89 100644
--- a/arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/pinmux-sh7786.c
@@ -149,150 +149,44 @@ enum {
149 PINMUX_FUNCTION_END, 149 PINMUX_FUNCTION_END,
150 150
151 PINMUX_MARK_BEGIN, 151 PINMUX_MARK_BEGIN,
152 CDE_MARK, 152 DCLKIN_MARK, DCLKOUT_MARK, ODDF_MARK,
153 ETH_MAGIC_MARK, 153 VSYNC_MARK, HSYNC_MARK, CDE_MARK, DISP_MARK,
154 DISP_MARK, 154 DR0_MARK, DR1_MARK, DR2_MARK, DR3_MARK, DR4_MARK, DR5_MARK,
155 ETH_LINK_MARK, 155 DG0_MARK, DG1_MARK, DG2_MARK, DG3_MARK, DG4_MARK, DG5_MARK,
156 DR5_MARK, 156 DB0_MARK, DB1_MARK, DB2_MARK, DB3_MARK, DB4_MARK, DB5_MARK,
157 ETH_TX_ER_MARK, 157 ETH_MAGIC_MARK, ETH_LINK_MARK, ETH_TX_ER_MARK, ETH_TX_EN_MARK,
158 DR4_MARK, 158 ETH_MDIO_MARK, ETH_RX_CLK_MARK, ETH_MDC_MARK, ETH_COL_MARK,
159 ETH_TX_EN_MARK, 159 ETH_TX_CLK_MARK, ETH_CRS_MARK, ETH_RX_DV_MARK, ETH_RX_ER_MARK,
160 DR3_MARK, 160 ETH_TXD3_MARK, ETH_TXD2_MARK, ETH_TXD1_MARK, ETH_TXD0_MARK,
161 ETH_TXD3_MARK, 161 ETH_RXD3_MARK, ETH_RXD2_MARK, ETH_RXD1_MARK, ETH_RXD0_MARK,
162 DR2_MARK, 162 HSPI_CLK_MARK, HSPI_CS_MARK, HSPI_RX_MARK, HSPI_TX_MARK,
163 ETH_TXD2_MARK, 163 SCIF0_CTS_MARK, SCIF0_RTS_MARK,
164 DR1_MARK, 164 SCIF0_SCK_MARK, SCIF0_RXD_MARK, SCIF0_TXD_MARK,
165 ETH_TXD1_MARK, 165 SCIF1_SCK_MARK, SCIF1_RXD_MARK, SCIF1_TXD_MARK,
166 DR0_MARK, 166 SCIF3_SCK_MARK, SCIF3_RXD_MARK, SCIF3_TXD_MARK,
167 ETH_TXD0_MARK, 167 SCIF4_SCK_MARK, SCIF4_RXD_MARK, SCIF4_TXD_MARK,
168 168 SCIF5_SCK_MARK, SCIF5_RXD_MARK, SCIF5_TXD_MARK,
169 VSYNC_MARK, 169 BREQ_MARK, IOIS16_MARK, CE2B_MARK, CE2A_MARK, BACK_MARK,
170 HSPI_CLK_MARK, 170 FALE_MARK, FRB_MARK, FSTATUS_MARK,
171 ODDF_MARK, 171 FSE_MARK, FCLE_MARK,
172 HSPI_CS_MARK, 172 DACK0_MARK, DACK1_MARK, DACK2_MARK, DACK3_MARK,
173 DG5_MARK, 173 DREQ0_MARK, DREQ1_MARK, DREQ2_MARK, DREQ3_MARK,
174 ETH_MDIO_MARK, 174 DRAK0_MARK, DRAK1_MARK, DRAK2_MARK, DRAK3_MARK,
175 DG4_MARK, 175 USB_OVC1_MARK, USB_OVC0_MARK,
176 ETH_RX_CLK_MARK, 176 USB_PENC1_MARK, USB_PENC0_MARK,
177 DG3_MARK,
178 ETH_MDC_MARK,
179 DG2_MARK,
180 ETH_COL_MARK,
181 DG1_MARK,
182 ETH_TX_CLK_MARK,
183 DG0_MARK,
184 ETH_CRS_MARK,
185
186 DCLKIN_MARK,
187 HSPI_RX_MARK,
188 HSYNC_MARK,
189 HSPI_TX_MARK,
190 DB5_MARK,
191 ETH_RXD3_MARK,
192 DB4_MARK,
193 ETH_RXD2_MARK,
194 DB3_MARK,
195 ETH_RXD1_MARK,
196 DB2_MARK,
197 ETH_RXD0_MARK,
198 DB1_MARK,
199 ETH_RX_DV_MARK,
200 DB0_MARK,
201 ETH_RX_ER_MARK,
202
203 DCLKOUT_MARK,
204 SCIF1_SLK_MARK,
205 SCIF1_RXD_MARK,
206 SCIF1_TXD_MARK,
207 DACK1_MARK,
208 BACK_MARK,
209 FALE_MARK,
210 DACK0_MARK,
211 FCLE_MARK,
212 DREQ1_MARK,
213 BREQ_MARK,
214 USB_OVC1_MARK,
215 DREQ0_MARK,
216 USB_OVC0_MARK,
217
218 USB_PENC1_MARK,
219 USB_PENC0_MARK,
220
221 HAC1_SDOUT_MARK,
222 SSI1_SDATA_MARK,
223 SDIF1CMD_MARK,
224 HAC1_SDIN_MARK,
225 SSI1_SCK_MARK,
226 SDIF1CD_MARK,
227 HAC1_SYNC_MARK,
228 SSI1_WS_MARK,
229 SDIF1WP_MARK,
230 HAC1_BITCLK_MARK,
231 SSI1_CLK_MARK,
232 SDIF1CLK_MARK,
233 HAC0_SDOUT_MARK,
234 SSI0_SDATA_MARK,
235 SDIF1D3_MARK,
236 HAC0_SDIN_MARK,
237 SSI0_SCK_MARK,
238 SDIF1D2_MARK,
239 HAC0_SYNC_MARK,
240 SSI0_WS_MARK,
241 SDIF1D1_MARK,
242 HAC0_BITCLK_MARK,
243 SSI0_CLK_MARK,
244 SDIF1D0_MARK,
245
246 SCIF3_SCK_MARK,
247 SSI2_SDATA_MARK,
248 SCIF3_RXD_MARK,
249 TCLK_MARK,
250 SSI2_SCK_MARK,
251 SCIF3_TXD_MARK,
252 HAC_RES_MARK, 177 HAC_RES_MARK,
253 SSI2_WS_MARK, 178 HAC1_SDOUT_MARK, HAC1_SDIN_MARK, HAC1_SYNC_MARK, HAC1_BITCLK_MARK,
254 179 HAC0_SDOUT_MARK, HAC0_SDIN_MARK, HAC0_SYNC_MARK, HAC0_BITCLK_MARK,
255 DACK3_MARK, 180 SSI0_SDATA_MARK, SSI0_SCK_MARK, SSI0_WS_MARK, SSI0_CLK_MARK,
256 SDIF0CMD_MARK, 181 SSI1_SDATA_MARK, SSI1_SCK_MARK, SSI1_WS_MARK, SSI1_CLK_MARK,
257 DACK2_MARK, 182 SSI2_SDATA_MARK, SSI2_SCK_MARK, SSI2_WS_MARK,
258 SDIF0CD_MARK, 183 SSI3_SDATA_MARK, SSI3_SCK_MARK, SSI3_WS_MARK,
259 DREQ3_MARK, 184 SDIF1CMD_MARK, SDIF1CD_MARK, SDIF1WP_MARK, SDIF1CLK_MARK,
260 SDIF0WP_MARK, 185 SDIF1D3_MARK, SDIF1D2_MARK, SDIF1D1_MARK, SDIF1D0_MARK,
261 SCIF0_CTS_MARK, 186 SDIF0CMD_MARK, SDIF0CD_MARK, SDIF0WP_MARK, SDIF0CLK_MARK,
262 DREQ2_MARK, 187 SDIF0D3_MARK, SDIF0D2_MARK, SDIF0D1_MARK, SDIF0D0_MARK,
263 SDIF0CLK_MARK, 188 TCLK_MARK,
264 SCIF0_RTS_MARK, 189 IRL7_MARK, IRL6_MARK, IRL5_MARK, IRL4_MARK,
265 IRL7_MARK,
266 SDIF0D3_MARK,
267 SCIF0_SCK_MARK,
268 IRL6_MARK,
269 SDIF0D2_MARK,
270 SCIF0_RXD_MARK,
271 IRL5_MARK,
272 SDIF0D1_MARK,
273 SCIF0_TXD_MARK,
274 IRL4_MARK,
275 SDIF0D0_MARK,
276
277 SCIF5_SCK_MARK,
278 FRB_MARK,
279 SCIF5_RXD_MARK,
280 IOIS16_MARK,
281 SCIF5_TXD_MARK,
282 CE2B_MARK,
283 DRAK3_MARK,
284 CE2A_MARK,
285 SCIF4_SCK_MARK,
286 DRAK2_MARK,
287 SSI3_WS_MARK,
288 SCIF4_RXD_MARK,
289 DRAK1_MARK,
290 SSI3_SDATA_MARK,
291 FSTATUS_MARK,
292 SCIF4_TXD_MARK,
293 DRAK0_MARK,
294 SSI3_SCK_MARK,
295 FSE_MARK,
296 PINMUX_MARK_END, 190 PINMUX_MARK_END,
297}; 191};
298 192
@@ -377,7 +271,6 @@ static pinmux_enum_t pinmux_data[] = {
377 PINMUX_DATA(PJ1_DATA, PJ1_IN, PJ1_OUT, PJ1_IN_PU), 271 PINMUX_DATA(PJ1_DATA, PJ1_IN, PJ1_OUT, PJ1_IN_PU),
378 272
379 /* PA FN */ 273 /* PA FN */
380 PINMUX_MARK_BEGIN,
381 PINMUX_DATA(CDE_MARK, P1MSEL2_0, PA7_FN), 274 PINMUX_DATA(CDE_MARK, P1MSEL2_0, PA7_FN),
382 PINMUX_DATA(DISP_MARK, P1MSEL2_0, PA6_FN), 275 PINMUX_DATA(DISP_MARK, P1MSEL2_0, PA6_FN),
383 PINMUX_DATA(DR5_MARK, P1MSEL2_0, PA5_FN), 276 PINMUX_DATA(DR5_MARK, P1MSEL2_0, PA5_FN),
@@ -434,7 +327,7 @@ static pinmux_enum_t pinmux_data[] = {
434 327
435 /* PD FN */ 328 /* PD FN */
436 PINMUX_DATA(DCLKOUT_MARK, PD7_FN), 329 PINMUX_DATA(DCLKOUT_MARK, PD7_FN),
437 PINMUX_DATA(SCIF1_SLK_MARK, PD6_FN), 330 PINMUX_DATA(SCIF1_SCK_MARK, PD6_FN),
438 PINMUX_DATA(SCIF1_RXD_MARK, PD5_FN), 331 PINMUX_DATA(SCIF1_RXD_MARK, PD5_FN),
439 PINMUX_DATA(SCIF1_TXD_MARK, PD4_FN), 332 PINMUX_DATA(SCIF1_TXD_MARK, PD4_FN),
440 PINMUX_DATA(DACK1_MARK, P1MSEL13_1, P1MSEL12_0, PD3_FN), 333 PINMUX_DATA(DACK1_MARK, P1MSEL13_1, P1MSEL12_0, PD3_FN),
@@ -662,7 +555,7 @@ static struct pinmux_gpio pinmux_gpios[] = {
662 PINMUX_GPIO(GPIO_FN_DB0, DB0_MARK), 555 PINMUX_GPIO(GPIO_FN_DB0, DB0_MARK),
663 PINMUX_GPIO(GPIO_FN_ETH_RX_ER, ETH_RX_ER_MARK), 556 PINMUX_GPIO(GPIO_FN_ETH_RX_ER, ETH_RX_ER_MARK),
664 PINMUX_GPIO(GPIO_FN_DCLKOUT, DCLKOUT_MARK), 557 PINMUX_GPIO(GPIO_FN_DCLKOUT, DCLKOUT_MARK),
665 PINMUX_GPIO(GPIO_FN_SCIF1_SLK, SCIF1_SLK_MARK), 558 PINMUX_GPIO(GPIO_FN_SCIF1_SCK, SCIF1_SCK_MARK),
666 PINMUX_GPIO(GPIO_FN_SCIF1_RXD, SCIF1_RXD_MARK), 559 PINMUX_GPIO(GPIO_FN_SCIF1_RXD, SCIF1_RXD_MARK),
667 PINMUX_GPIO(GPIO_FN_SCIF1_TXD, SCIF1_TXD_MARK), 560 PINMUX_GPIO(GPIO_FN_SCIF1_TXD, SCIF1_TXD_MARK),
668 PINMUX_GPIO(GPIO_FN_DACK1, DACK1_MARK), 561 PINMUX_GPIO(GPIO_FN_DACK1, DACK1_MARK),
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index fe59ccfc1152..f35ed0348850 100644
--- a/arch/sh/kernel/idle.c
+++ b/arch/sh/kernel/idle.c
@@ -38,7 +38,7 @@ static int __init hlt_setup(char *__unused)
38} 38}
39__setup("hlt", hlt_setup); 39__setup("hlt", hlt_setup);
40 40
41static void default_idle(void) 41void default_idle(void)
42{ 42{
43 if (!hlt_counter) { 43 if (!hlt_counter) {
44 clear_thread_flag(TIF_POLLING_NRFLAG); 44 clear_thread_flag(TIF_POLLING_NRFLAG);
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
index 39cd7f3aec7b..c22853b059ef 100644
--- a/arch/sh/kernel/io_trapped.c
+++ b/arch/sh/kernel/io_trapped.c
@@ -14,6 +14,7 @@
14#include <linux/bitops.h> 14#include <linux/bitops.h>
15#include <linux/vmalloc.h> 15#include <linux/vmalloc.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/init.h>
17#include <asm/system.h> 18#include <asm/system.h>
18#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
19#include <asm/uaccess.h> 20#include <asm/uaccess.h>
@@ -32,6 +33,15 @@ EXPORT_SYMBOL_GPL(trapped_mem);
32#endif 33#endif
33static DEFINE_SPINLOCK(trapped_lock); 34static DEFINE_SPINLOCK(trapped_lock);
34 35
36static int trapped_io_disable __read_mostly;
37
38static int __init trapped_io_setup(char *__unused)
39{
40 trapped_io_disable = 1;
41 return 1;
42}
43__setup("noiotrap", trapped_io_setup);
44
35int register_trapped_io(struct trapped_io *tiop) 45int register_trapped_io(struct trapped_io *tiop)
36{ 46{
37 struct resource *res; 47 struct resource *res;
@@ -39,6 +49,9 @@ int register_trapped_io(struct trapped_io *tiop)
39 struct page *pages[TRAPPED_PAGES_MAX]; 49 struct page *pages[TRAPPED_PAGES_MAX];
40 int k, n; 50 int k, n;
41 51
52 if (unlikely(trapped_io_disable))
53 return 0;
54
42 /* structure must be page aligned */ 55 /* structure must be page aligned */
43 if ((unsigned long)tiop & (PAGE_SIZE - 1)) 56 if ((unsigned long)tiop & (PAGE_SIZE - 1))
44 goto bad; 57 goto bad;
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index ddafbbbab2ab..6d94725d22f2 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -170,20 +170,32 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
170 170
171asmlinkage void ret_from_fork(void); 171asmlinkage void ret_from_fork(void);
172 172
173int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 173int copy_thread(unsigned long clone_flags, unsigned long usp,
174 unsigned long unused, 174 unsigned long unused,
175 struct task_struct *p, struct pt_regs *regs) 175 struct task_struct *p, struct pt_regs *regs)
176{ 176{
177 struct thread_info *ti = task_thread_info(p); 177 struct thread_info *ti = task_thread_info(p);
178 struct pt_regs *childregs; 178 struct pt_regs *childregs;
179#if defined(CONFIG_SH_FPU) 179#if defined(CONFIG_SH_FPU) || defined(CONFIG_SH_DSP)
180 struct task_struct *tsk = current; 180 struct task_struct *tsk = current;
181#endif
181 182
183#if defined(CONFIG_SH_FPU)
182 unlazy_fpu(tsk, regs); 184 unlazy_fpu(tsk, regs);
183 p->thread.fpu = tsk->thread.fpu; 185 p->thread.fpu = tsk->thread.fpu;
184 copy_to_stopped_child_used_math(p); 186 copy_to_stopped_child_used_math(p);
185#endif 187#endif
186 188
189#if defined(CONFIG_SH_DSP)
190 if (is_dsp_enabled(tsk)) {
191 /* We can use the __save_dsp or just copy the struct:
192 * __save_dsp(p);
193 * p->thread.dsp_status.status |= SR_DSP
194 */
195 p->thread.dsp_status = tsk->thread.dsp_status;
196 }
197#endif
198
187 childregs = task_pt_regs(p); 199 childregs = task_pt_regs(p);
188 *childregs = *regs; 200 *childregs = *regs;
189 201
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index c90c7e5e5fee..96be839040f8 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -425,7 +425,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
425 425
426asmlinkage void ret_from_fork(void); 426asmlinkage void ret_from_fork(void);
427 427
428int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 428int copy_thread(unsigned long clone_flags, unsigned long usp,
429 unsigned long unused, 429 unsigned long unused,
430 struct task_struct *p, struct pt_regs *regs) 430 struct task_struct *p, struct pt_regs *regs)
431{ 431{
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 29ca09d24ef8..f7b22dd83b0c 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -200,7 +200,8 @@ static int dspregs_get(struct task_struct *target,
200 unsigned int pos, unsigned int count, 200 unsigned int pos, unsigned int count,
201 void *kbuf, void __user *ubuf) 201 void *kbuf, void __user *ubuf)
202{ 202{
203 const struct pt_dspregs *regs = task_pt_dspregs(target); 203 const struct pt_dspregs *regs =
204 (struct pt_dspregs *)&target->thread.dsp_status.dsp_regs;
204 int ret; 205 int ret;
205 206
206 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 207 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs,
@@ -217,7 +218,8 @@ static int dspregs_set(struct task_struct *target,
217 unsigned int pos, unsigned int count, 218 unsigned int pos, unsigned int count,
218 const void *kbuf, const void __user *ubuf) 219 const void *kbuf, const void __user *ubuf)
219{ 220{
220 struct pt_dspregs *regs = task_pt_dspregs(target); 221 struct pt_dspregs *regs =
222 (struct pt_dspregs *)&target->thread.dsp_status.dsp_regs;
221 int ret; 223 int ret;
222 224
223 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 225 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs,
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 24c60251f680..04a6004fccc4 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -103,12 +103,11 @@ static int __init early_parse_mem(char *p)
103 size = memparse(p, &p); 103 size = memparse(p, &p);
104 104
105 if (size > __MEMORY_SIZE) { 105 if (size > __MEMORY_SIZE) {
106 static char msg[] __initdata = KERN_ERR 106 printk(KERN_ERR
107 "Using mem= to increase the size of kernel memory " 107 "Using mem= to increase the size of kernel memory "
108 "is not allowed.\n" 108 "is not allowed.\n"
109 " Recompile the kernel with the correct value for " 109 " Recompile the kernel with the correct value for "
110 "CONFIG_MEMORY_SIZE.\n"; 110 "CONFIG_MEMORY_SIZE.\n");
111 printk(msg);
112 return 0; 111 return 0;
113 } 112 }
114 113
diff --git a/arch/sh/kernel/time_64.c b/arch/sh/kernel/time_64.c
index 59d2a03e8b3c..988c77c37231 100644
--- a/arch/sh/kernel/time_64.c
+++ b/arch/sh/kernel/time_64.c
@@ -284,7 +284,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
284static struct irqaction irq0 = { 284static struct irqaction irq0 = {
285 .handler = timer_interrupt, 285 .handler = timer_interrupt,
286 .flags = IRQF_DISABLED, 286 .flags = IRQF_DISABLED,
287 .mask = CPU_MASK_NONE,
288 .name = "timer", 287 .name = "timer",
289}; 288};
290 289
diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c
index c127293271e1..9aa348658ae3 100644
--- a/arch/sh/kernel/timers/timer-cmt.c
+++ b/arch/sh/kernel/timers/timer-cmt.c
@@ -109,7 +109,6 @@ static struct irqaction cmt_irq = {
109 .name = "timer", 109 .name = "timer",
110 .handler = cmt_timer_interrupt, 110 .handler = cmt_timer_interrupt,
111 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 111 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
112 .mask = CPU_MASK_NONE,
113}; 112};
114 113
115static void cmt_clk_init(struct clk *clk) 114static void cmt_clk_init(struct clk *clk)
diff --git a/arch/sh/kernel/timers/timer-mtu2.c b/arch/sh/kernel/timers/timer-mtu2.c
index 9a77ae86b403..9b0ef0126479 100644
--- a/arch/sh/kernel/timers/timer-mtu2.c
+++ b/arch/sh/kernel/timers/timer-mtu2.c
@@ -115,7 +115,6 @@ static struct irqaction mtu2_irq = {
115 .name = "timer", 115 .name = "timer",
116 .handler = mtu2_timer_interrupt, 116 .handler = mtu2_timer_interrupt,
117 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 117 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
118 .mask = CPU_MASK_NONE,
119}; 118};
120 119
121static unsigned int divisors[] = { 1, 4, 16, 64, 1, 1, 256 }; 120static unsigned int divisors[] = { 1, 4, 16, 64, 1, 1, 256 };
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 10b5a6f17cc0..c5d3396f5960 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -162,7 +162,6 @@ static struct irqaction tmu0_irq = {
162 .name = "periodic/oneshot timer", 162 .name = "periodic/oneshot timer",
163 .handler = tmu_timer_interrupt, 163 .handler = tmu_timer_interrupt,
164 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 164 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
165 .mask = CPU_MASK_NONE,
166}; 165};
167 166
168static void __init tmu_clk_init(struct clk *clk) 167static void __init tmu_clk_init(struct clk *clk)
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 60dcf87ed019..30ca9c51e52d 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -664,6 +664,8 @@ asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,
664 if (is_dsp_inst(regs)) { 664 if (is_dsp_inst(regs)) {
665 /* Enable DSP mode, and restart instruction. */ 665 /* Enable DSP mode, and restart instruction. */
666 regs->sr |= SR_DSP; 666 regs->sr |= SR_DSP;
667 /* Save DSP mode */
668 tsk->thread.dsp_status.status |= SR_DSP;
667 return; 669 return;
668 } 670 }
669#endif 671#endif
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 10c24356d2d5..d4079cab2d58 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -251,18 +251,6 @@ config SH7705_CACHE_32KB
251 depends on CPU_SUBTYPE_SH7705 251 depends on CPU_SUBTYPE_SH7705
252 default y 252 default y
253 253
254config SH_DIRECT_MAPPED
255 bool "Use direct-mapped caching"
256 default n
257 help
258 Selecting this option will configure the caches to be direct-mapped,
259 even if the cache supports a 2 or 4-way mode. This is useful primarily
260 for debugging on platforms with 2 and 4-way caches (SH7750R/SH7751R,
261 SH4-202, SH4-501, etc.)
262
263 Turn this option off for platforms that do not have a direct-mapped
264 cache, and you have no need to run the caches in such a configuration.
265
266choice 254choice
267 prompt "Cache mode" 255 prompt "Cache mode"
268 default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 || CPU_SH5 256 default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 || CPU_SH5
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c3ea215334f6..cc12cd48bbc5 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -124,6 +124,9 @@ config ARCH_NO_VIRT_TO_BUS
124config OF 124config OF
125 def_bool y 125 def_bool y
126 126
127config ARCH_SUPPORTS_DEBUG_PAGEALLOC
128 def_bool y if SPARC64
129
127source "init/Kconfig" 130source "init/Kconfig"
128 131
129source "kernel/Kconfig.freezer" 132source "kernel/Kconfig.freezer"
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug
index b8a15e271bfa..90d5fe223a74 100644
--- a/arch/sparc/Kconfig.debug
+++ b/arch/sparc/Kconfig.debug
@@ -22,14 +22,6 @@ config DEBUG_DCFLUSH
22config STACK_DEBUG 22config STACK_DEBUG
23 bool "Stack Overflow Detection Support" 23 bool "Stack Overflow Detection Support"
24 24
25config DEBUG_PAGEALLOC
26 bool "Debug page memory allocations"
27 depends on SPARC64 && DEBUG_KERNEL && !HIBERNATION
28 help
29 Unmap pages from the kernel linear mapping after free_pages().
30 This results in a large slowdown, but helps to find certain types
31 of memory corruptions.
32
33config MCOUNT 25config MCOUNT
34 bool 26 bool
35 depends on SPARC64 27 depends on SPARC64
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
index 5693ab482606..666a73fef28d 100644
--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -121,8 +121,8 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
121 * local TLB. 121 * local TLB.
122 */ 122 */
123 cpu = smp_processor_id(); 123 cpu = smp_processor_id();
124 if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { 124 if (!ctx_valid || !cpumask_test_cpu(cpu, mm_cpumask(mm))) {
125 cpu_set(cpu, mm->cpu_vm_mask); 125 cpumask_set_cpu(cpu, mm_cpumask(mm));
126 __flush_tlb_mm(CTX_HWBITS(mm->context), 126 __flush_tlb_mm(CTX_HWBITS(mm->context),
127 SECONDARY_CONTEXT); 127 SECONDARY_CONTEXT);
128 } 128 }
@@ -141,8 +141,8 @@ static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm
141 if (!CTX_VALID(mm->context)) 141 if (!CTX_VALID(mm->context))
142 get_new_mmu_context(mm); 142 get_new_mmu_context(mm);
143 cpu = smp_processor_id(); 143 cpu = smp_processor_id();
144 if (!cpu_isset(cpu, mm->cpu_vm_mask)) 144 if (!cpumask_test_cpu(cpu, mm_cpumask(mm)))
145 cpu_set(cpu, mm->cpu_vm_mask); 145 cpumask_set_cpu(cpu, mm_cpumask(mm));
146 146
147 load_secondary_context(mm); 147 load_secondary_context(mm);
148 __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); 148 __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT);
diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h
index ebf5986c12ed..e8c648741ed4 100644
--- a/arch/sparc/include/asm/mmzone.h
+++ b/arch/sparc/include/asm/mmzone.h
@@ -3,6 +3,8 @@
3 3
4#ifdef CONFIG_NEED_MULTIPLE_NODES 4#ifdef CONFIG_NEED_MULTIPLE_NODES
5 5
6#include <linux/cpumask.h>
7
6extern struct pglist_data *node_data[]; 8extern struct pglist_data *node_data[];
7 9
8#define NODE_DATA(nid) (node_data[nid]) 10#define NODE_DATA(nid) (node_data[nid])
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h
index 57224dd37b3a..becb6bf353a9 100644
--- a/arch/sparc/include/asm/smp_64.h
+++ b/arch/sparc/include/asm/smp_64.h
@@ -35,7 +35,8 @@ extern cpumask_t cpu_core_map[NR_CPUS];
35extern int sparc64_multi_core; 35extern int sparc64_multi_core;
36 36
37extern void arch_send_call_function_single_ipi(int cpu); 37extern void arch_send_call_function_single_ipi(int cpu);
38extern void arch_send_call_function_ipi(cpumask_t mask); 38extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
39#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
39 40
40/* 41/*
41 * General functions that each host system must provide. 42 * General functions that each host system must provide.
diff --git a/arch/sparc/include/asm/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h
index bf2d532593e3..46f91ab66a50 100644
--- a/arch/sparc/include/asm/spinlock_32.h
+++ b/arch/sparc/include/asm/spinlock_32.h
@@ -177,6 +177,8 @@ static inline int __read_trylock(raw_rwlock_t *rw)
177#define __raw_write_unlock(rw) do { (rw)->lock = 0; } while(0) 177#define __raw_write_unlock(rw) do { (rw)->lock = 0; } while(0)
178 178
179#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 179#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
180#define __raw_read_lock_flags(rw, flags) __raw_read_lock(rw)
181#define __raw_write_lock_flags(rw, flags) __raw_write_lock(rw)
180 182
181#define _raw_spin_relax(lock) cpu_relax() 183#define _raw_spin_relax(lock) cpu_relax()
182#define _raw_read_relax(lock) cpu_relax() 184#define _raw_read_relax(lock) cpu_relax()
diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
index c4d274d330e9..f6b2b92ad8d2 100644
--- a/arch/sparc/include/asm/spinlock_64.h
+++ b/arch/sparc/include/asm/spinlock_64.h
@@ -211,9 +211,11 @@ static int inline __write_trylock(raw_rwlock_t *lock)
211} 211}
212 212
213#define __raw_read_lock(p) __read_lock(p) 213#define __raw_read_lock(p) __read_lock(p)
214#define __raw_read_lock_flags(p, f) __read_lock(p)
214#define __raw_read_trylock(p) __read_trylock(p) 215#define __raw_read_trylock(p) __read_trylock(p)
215#define __raw_read_unlock(p) __read_unlock(p) 216#define __raw_read_unlock(p) __read_unlock(p)
216#define __raw_write_lock(p) __write_lock(p) 217#define __raw_write_lock(p) __write_lock(p)
218#define __raw_write_lock_flags(p, f) __write_lock(p)
217#define __raw_write_unlock(p) __write_unlock(p) 219#define __raw_write_unlock(p) __write_unlock(p)
218#define __raw_write_trylock(p) __write_trylock(p) 220#define __raw_write_trylock(p) __write_trylock(p)
219 221
diff --git a/arch/sparc/include/asm/system_32.h b/arch/sparc/include/asm/system_32.h
index 79c1ae2b42a3..751c8c17f5a0 100644
--- a/arch/sparc/include/asm/system_32.h
+++ b/arch/sparc/include/asm/system_32.h
@@ -126,7 +126,7 @@ extern void flushw_all(void);
126#define switch_to(prev, next, last) do { \ 126#define switch_to(prev, next, last) do { \
127 SWITCH_ENTER(prev); \ 127 SWITCH_ENTER(prev); \
128 SWITCH_DO_LAZY_FPU(next); \ 128 SWITCH_DO_LAZY_FPU(next); \
129 cpu_set(smp_processor_id(), next->active_mm->cpu_vm_mask); \ 129 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next->active_mm)); \
130 __asm__ __volatile__( \ 130 __asm__ __volatile__( \
131 "sethi %%hi(here - 0x8), %%o7\n\t" \ 131 "sethi %%hi(here - 0x8), %%o7\n\t" \
132 "mov %%g6, %%g3\n\t" \ 132 "mov %%g6, %%g3\n\t" \
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index 5bc0b8fd6374..e5ea8d332421 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -28,11 +28,6 @@ static inline cpumask_t node_to_cpumask(int node)
28#define node_to_cpumask_ptr_next(v, node) \ 28#define node_to_cpumask_ptr_next(v, node) \
29 v = &(numa_cpumask_lookup_table[node]) 29 v = &(numa_cpumask_lookup_table[node])
30 30
31static inline int node_to_first_cpu(int node)
32{
33 return cpumask_first(cpumask_of_node(node));
34}
35
36struct pci_bus; 31struct pci_bus;
37#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
38extern int pcibus_to_node(struct pci_bus *pbus); 33extern int pcibus_to_node(struct pci_bus *pbus);
@@ -43,13 +38,9 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
43} 38}
44#endif 39#endif
45 40
46#define pcibus_to_cpumask(bus) \
47 (pcibus_to_node(bus) == -1 ? \
48 CPU_MASK_ALL : \
49 node_to_cpumask(pcibus_to_node(bus)))
50#define cpumask_of_pcibus(bus) \ 41#define cpumask_of_pcibus(bus) \
51 (pcibus_to_node(bus) == -1 ? \ 42 (pcibus_to_node(bus) == -1 ? \
52 CPU_MASK_ALL_PTR : \ 43 cpu_all_mask : \
53 cpumask_of_node(pcibus_to_node(bus))) 44 cpumask_of_node(pcibus_to_node(bus)))
54 45
55#define SD_NODE_INIT (struct sched_domain) { \ 46#define SD_NODE_INIT (struct sched_domain) { \
@@ -89,7 +80,6 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
89#define smt_capable() (sparc64_multi_core) 80#define smt_capable() (sparc64_multi_core)
90#endif /* CONFIG_SMP */ 81#endif /* CONFIG_SMP */
91 82
92#define cpu_coregroup_map(cpu) (cpu_core_map[cpu])
93#define cpu_coregroup_mask(cpu) (&cpu_core_map[cpu]) 83#define cpu_coregroup_mask(cpu) (&cpu_core_map[cpu])
94 84
95#endif /* _ASM_SPARC64_TOPOLOGY_H */ 85#endif /* _ASM_SPARC64_TOPOLOGY_H */
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index 57c39843fb2a..90350f838f05 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -653,7 +653,7 @@ static void __cpuinit dr_cpu_data(struct ds_info *dp,
653 if (cpu_list[i] == CPU_SENTINEL) 653 if (cpu_list[i] == CPU_SENTINEL)
654 continue; 654 continue;
655 655
656 if (cpu_list[i] < NR_CPUS) 656 if (cpu_list[i] < nr_cpu_ids)
657 cpu_set(cpu_list[i], mask); 657 cpu_set(cpu_list[i], mask);
658 } 658 }
659 659
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index a46c3a21e26d..3a1b7bf03cff 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -686,7 +686,7 @@ tlb_fixup_done:
686 * point. 686 * point.
687 * 687 *
688 * There used to be enormous complexity wrt. transferring 688 * There used to be enormous complexity wrt. transferring
689 * over from the firwmare's trap table to the Linux kernel's. 689 * over from the firmware's trap table to the Linux kernel's.
690 * For example, there was a chicken & egg problem wrt. building 690 * For example, there was a chicken & egg problem wrt. building
691 * the OBP page tables, yet needing to be on the Linux kernel 691 * the OBP page tables, yet needing to be on the Linux kernel
692 * trap table (to translate PAGE_OFFSET addresses) in order to 692 * trap table (to translate PAGE_OFFSET addresses) in order to
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
index 44dd5ee64339..ad800b80c718 100644
--- a/arch/sparc/kernel/irq_32.c
+++ b/arch/sparc/kernel/irq_32.c
@@ -439,7 +439,6 @@ static int request_fast_irq(unsigned int irq,
439 flush_cache_all(); 439 flush_cache_all();
440 440
441 action->flags = irqflags; 441 action->flags = irqflags;
442 cpus_clear(action->mask);
443 action->name = devname; 442 action->name = devname;
444 action->dev_id = NULL; 443 action->dev_id = NULL;
445 action->next = NULL; 444 action->next = NULL;
@@ -574,7 +573,6 @@ int request_irq(unsigned int irq,
574 573
575 action->handler = handler; 574 action->handler = handler;
576 action->flags = irqflags; 575 action->flags = irqflags;
577 cpus_clear(action->mask);
578 action->name = devname; 576 action->name = devname;
579 action->next = NULL; 577 action->next = NULL;
580 action->dev_id = dev_id; 578 action->dev_id = dev_id;
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index d0d6a515499a..5deabe921a47 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -266,12 +266,12 @@ static int irq_choose_cpu(unsigned int virt_irq)
266 spin_lock_irqsave(&irq_rover_lock, flags); 266 spin_lock_irqsave(&irq_rover_lock, flags);
267 267
268 while (!cpu_online(irq_rover)) { 268 while (!cpu_online(irq_rover)) {
269 if (++irq_rover >= NR_CPUS) 269 if (++irq_rover >= nr_cpu_ids)
270 irq_rover = 0; 270 irq_rover = 0;
271 } 271 }
272 cpuid = irq_rover; 272 cpuid = irq_rover;
273 do { 273 do {
274 if (++irq_rover >= NR_CPUS) 274 if (++irq_rover >= nr_cpu_ids)
275 irq_rover = 0; 275 irq_rover = 0;
276 } while (!cpu_online(irq_rover)); 276 } while (!cpu_online(irq_rover));
277 277
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
index adaaed4ea2fb..00d034ea2164 100644
--- a/arch/sparc/kernel/led.c
+++ b/arch/sparc/kernel/led.c
@@ -126,7 +126,6 @@ static int __init led_init(void)
126 led = proc_create("led", 0, NULL, &led_proc_fops); 126 led = proc_create("led", 0, NULL, &led_proc_fops);
127 if (!led) 127 if (!led)
128 return -ENOMEM; 128 return -ENOMEM;
129 led->owner = THIS_MODULE;
130 129
131 printk(KERN_INFO 130 printk(KERN_INFO
132 "led: version %s, Lars Kotthoff <metalhead@metalhead.ws>\n", 131 "led: version %s, Lars Kotthoff <metalhead@metalhead.ws>\n",
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index 3f79f0c23a08..f0e6ed23a468 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -567,7 +567,7 @@ static void __init report_platform_properties(void)
567 max_cpu = NR_CPUS; 567 max_cpu = NR_CPUS;
568 } 568 }
569 for (i = 0; i < max_cpu; i++) 569 for (i = 0; i < max_cpu; i++)
570 cpu_set(i, cpu_possible_map); 570 set_cpu_possible(i, true);
571 } 571 }
572#endif 572#endif
573 573
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index f3577223c863..2c0cc72d295b 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -13,6 +13,7 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/kprobes.h> 14#include <linux/kprobes.h>
15#include <linux/kernel_stat.h> 15#include <linux/kernel_stat.h>
16#include <linux/reboot.h>
16#include <linux/slab.h> 17#include <linux/slab.h>
17#include <linux/kdebug.h> 18#include <linux/kdebug.h>
18#include <linux/delay.h> 19#include <linux/delay.h>
@@ -206,13 +207,33 @@ void nmi_adjust_hz(unsigned int new_hz)
206} 207}
207EXPORT_SYMBOL_GPL(nmi_adjust_hz); 208EXPORT_SYMBOL_GPL(nmi_adjust_hz);
208 209
210static int nmi_shutdown(struct notifier_block *nb, unsigned long cmd, void *p)
211{
212 on_each_cpu(stop_watchdog, NULL, 1);
213 return 0;
214}
215
216static struct notifier_block nmi_reboot_notifier = {
217 .notifier_call = nmi_shutdown,
218};
219
209int __init nmi_init(void) 220int __init nmi_init(void)
210{ 221{
222 int err;
223
211 nmi_usable = 1; 224 nmi_usable = 1;
212 225
213 on_each_cpu(start_watchdog, NULL, 1); 226 on_each_cpu(start_watchdog, NULL, 1);
214 227
215 return check_nmi_watchdog(); 228 err = check_nmi_watchdog();
229 if (!err) {
230 err = register_reboot_notifier(&nmi_reboot_notifier);
231 if (err) {
232 nmi_usable = 0;
233 on_each_cpu(stop_watchdog, NULL, 1);
234 }
235 }
236 return err;
216} 237}
217 238
218static int __init setup_nmi_watchdog(char *str) 239static int __init setup_nmi_watchdog(char *str)
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index f4bee35a1b46..2830b415e214 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -455,7 +455,7 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags,
455 */ 455 */
456extern void ret_from_fork(void); 456extern void ret_from_fork(void);
457 457
458int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, 458int copy_thread(unsigned long clone_flags, unsigned long sp,
459 unsigned long unused, 459 unsigned long unused,
460 struct task_struct *p, struct pt_regs *regs) 460 struct task_struct *p, struct pt_regs *regs)
461{ 461{
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index a73954b87f0a..4041f94e7724 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -561,7 +561,7 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags,
561 * Parent --> %o0 == childs pid, %o1 == 0 561 * Parent --> %o0 == childs pid, %o1 == 0
562 * Child --> %o0 == parents pid, %o1 == 1 562 * Child --> %o0 == parents pid, %o1 == 1
563 */ 563 */
564int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, 564int copy_thread(unsigned long clone_flags, unsigned long sp,
565 unsigned long unused, 565 unsigned long unused,
566 struct task_struct *p, struct pt_regs *regs) 566 struct task_struct *p, struct pt_regs *regs)
567{ 567{
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index edecca7b8116..ca55c7012f77 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -518,8 +518,8 @@ void __init of_fill_in_cpu_data(void)
518 } 518 }
519 519
520#ifdef CONFIG_SMP 520#ifdef CONFIG_SMP
521 cpu_set(cpuid, cpu_present_map); 521 set_cpu_present(cpuid, true);
522 cpu_set(cpuid, cpu_possible_map); 522 set_cpu_possible(cpuid, true);
523#endif 523#endif
524 } 524 }
525 525
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c
index 1e5ac4e282e1..132d81fb2616 100644
--- a/arch/sparc/kernel/smp_32.c
+++ b/arch/sparc/kernel/smp_32.c
@@ -70,13 +70,12 @@ void __init smp_cpus_done(unsigned int max_cpus)
70 extern void smp4m_smp_done(void); 70 extern void smp4m_smp_done(void);
71 extern void smp4d_smp_done(void); 71 extern void smp4d_smp_done(void);
72 unsigned long bogosum = 0; 72 unsigned long bogosum = 0;
73 int cpu, num; 73 int cpu, num = 0;
74 74
75 for (cpu = 0, num = 0; cpu < NR_CPUS; cpu++) 75 for_each_online_cpu(cpu) {
76 if (cpu_online(cpu)) { 76 num++;
77 num++; 77 bogosum += cpu_data(cpu).udelay_val;
78 bogosum += cpu_data(cpu).udelay_val; 78 }
79 }
80 79
81 printk("Total of %d processors activated (%lu.%02lu BogoMIPS).\n", 80 printk("Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
82 num, bogosum/(500000/HZ), 81 num, bogosum/(500000/HZ),
@@ -144,7 +143,7 @@ void smp_flush_tlb_all(void)
144void smp_flush_cache_mm(struct mm_struct *mm) 143void smp_flush_cache_mm(struct mm_struct *mm)
145{ 144{
146 if(mm->context != NO_CONTEXT) { 145 if(mm->context != NO_CONTEXT) {
147 cpumask_t cpu_mask = mm->cpu_vm_mask; 146 cpumask_t cpu_mask = *mm_cpumask(mm);
148 cpu_clear(smp_processor_id(), cpu_mask); 147 cpu_clear(smp_processor_id(), cpu_mask);
149 if (!cpus_empty(cpu_mask)) 148 if (!cpus_empty(cpu_mask))
150 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_cache_mm), (unsigned long) mm); 149 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_cache_mm), (unsigned long) mm);
@@ -155,12 +154,13 @@ void smp_flush_cache_mm(struct mm_struct *mm)
155void smp_flush_tlb_mm(struct mm_struct *mm) 154void smp_flush_tlb_mm(struct mm_struct *mm)
156{ 155{
157 if(mm->context != NO_CONTEXT) { 156 if(mm->context != NO_CONTEXT) {
158 cpumask_t cpu_mask = mm->cpu_vm_mask; 157 cpumask_t cpu_mask = *mm_cpumask(mm);
159 cpu_clear(smp_processor_id(), cpu_mask); 158 cpu_clear(smp_processor_id(), cpu_mask);
160 if (!cpus_empty(cpu_mask)) { 159 if (!cpus_empty(cpu_mask)) {
161 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_mm), (unsigned long) mm); 160 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_mm), (unsigned long) mm);
162 if(atomic_read(&mm->mm_users) == 1 && current->active_mm == mm) 161 if(atomic_read(&mm->mm_users) == 1 && current->active_mm == mm)
163 mm->cpu_vm_mask = cpumask_of_cpu(smp_processor_id()); 162 cpumask_copy(mm_cpumask(mm),
163 cpumask_of(smp_processor_id()));
164 } 164 }
165 local_flush_tlb_mm(mm); 165 local_flush_tlb_mm(mm);
166 } 166 }
@@ -172,7 +172,7 @@ void smp_flush_cache_range(struct vm_area_struct *vma, unsigned long start,
172 struct mm_struct *mm = vma->vm_mm; 172 struct mm_struct *mm = vma->vm_mm;
173 173
174 if (mm->context != NO_CONTEXT) { 174 if (mm->context != NO_CONTEXT) {
175 cpumask_t cpu_mask = mm->cpu_vm_mask; 175 cpumask_t cpu_mask = *mm_cpumask(mm);
176 cpu_clear(smp_processor_id(), cpu_mask); 176 cpu_clear(smp_processor_id(), cpu_mask);
177 if (!cpus_empty(cpu_mask)) 177 if (!cpus_empty(cpu_mask))
178 xc3((smpfunc_t) BTFIXUP_CALL(local_flush_cache_range), (unsigned long) vma, start, end); 178 xc3((smpfunc_t) BTFIXUP_CALL(local_flush_cache_range), (unsigned long) vma, start, end);
@@ -186,7 +186,7 @@ void smp_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
186 struct mm_struct *mm = vma->vm_mm; 186 struct mm_struct *mm = vma->vm_mm;
187 187
188 if (mm->context != NO_CONTEXT) { 188 if (mm->context != NO_CONTEXT) {
189 cpumask_t cpu_mask = mm->cpu_vm_mask; 189 cpumask_t cpu_mask = *mm_cpumask(mm);
190 cpu_clear(smp_processor_id(), cpu_mask); 190 cpu_clear(smp_processor_id(), cpu_mask);
191 if (!cpus_empty(cpu_mask)) 191 if (!cpus_empty(cpu_mask))
192 xc3((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_range), (unsigned long) vma, start, end); 192 xc3((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_range), (unsigned long) vma, start, end);
@@ -199,7 +199,7 @@ void smp_flush_cache_page(struct vm_area_struct *vma, unsigned long page)
199 struct mm_struct *mm = vma->vm_mm; 199 struct mm_struct *mm = vma->vm_mm;
200 200
201 if(mm->context != NO_CONTEXT) { 201 if(mm->context != NO_CONTEXT) {
202 cpumask_t cpu_mask = mm->cpu_vm_mask; 202 cpumask_t cpu_mask = *mm_cpumask(mm);
203 cpu_clear(smp_processor_id(), cpu_mask); 203 cpu_clear(smp_processor_id(), cpu_mask);
204 if (!cpus_empty(cpu_mask)) 204 if (!cpus_empty(cpu_mask))
205 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_cache_page), (unsigned long) vma, page); 205 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_cache_page), (unsigned long) vma, page);
@@ -212,7 +212,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
212 struct mm_struct *mm = vma->vm_mm; 212 struct mm_struct *mm = vma->vm_mm;
213 213
214 if(mm->context != NO_CONTEXT) { 214 if(mm->context != NO_CONTEXT) {
215 cpumask_t cpu_mask = mm->cpu_vm_mask; 215 cpumask_t cpu_mask = *mm_cpumask(mm);
216 cpu_clear(smp_processor_id(), cpu_mask); 216 cpu_clear(smp_processor_id(), cpu_mask);
217 if (!cpus_empty(cpu_mask)) 217 if (!cpus_empty(cpu_mask))
218 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_page), (unsigned long) vma, page); 218 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_page), (unsigned long) vma, page);
@@ -241,7 +241,7 @@ void smp_flush_page_to_ram(unsigned long page)
241 241
242void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr) 242void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr)
243{ 243{
244 cpumask_t cpu_mask = mm->cpu_vm_mask; 244 cpumask_t cpu_mask = *mm_cpumask(mm);
245 cpu_clear(smp_processor_id(), cpu_mask); 245 cpu_clear(smp_processor_id(), cpu_mask);
246 if (!cpus_empty(cpu_mask)) 246 if (!cpus_empty(cpu_mask))
247 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_sig_insns), (unsigned long) mm, insn_addr); 247 xc2((smpfunc_t) BTFIXUP_CALL(local_flush_sig_insns), (unsigned long) mm, insn_addr);
@@ -332,8 +332,8 @@ void __init smp_setup_cpu_possible_map(void)
332 instance = 0; 332 instance = 0;
333 while (!cpu_find_by_instance(instance, NULL, &mid)) { 333 while (!cpu_find_by_instance(instance, NULL, &mid)) {
334 if (mid < NR_CPUS) { 334 if (mid < NR_CPUS) {
335 cpu_set(mid, cpu_possible_map); 335 set_cpu_possible(mid, true);
336 cpu_set(mid, cpu_present_map); 336 set_cpu_present(mid, true);
337 } 337 }
338 instance++; 338 instance++;
339 } 339 }
@@ -351,8 +351,8 @@ void __init smp_prepare_boot_cpu(void)
351 printk("boot cpu id != 0, this could work but is untested\n"); 351 printk("boot cpu id != 0, this could work but is untested\n");
352 352
353 current_thread_info()->cpu = cpuid; 353 current_thread_info()->cpu = cpuid;
354 cpu_set(cpuid, cpu_online_map); 354 set_cpu_online(cpuid, true);
355 cpu_set(cpuid, cpu_possible_map); 355 set_cpu_possible(cpuid, true);
356} 356}
357 357
358int __cpuinit __cpu_up(unsigned int cpu) 358int __cpuinit __cpu_up(unsigned int cpu)
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 79457f682b5a..708e12a26b05 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -808,9 +808,9 @@ static void smp_start_sync_tick_client(int cpu)
808 808
809extern unsigned long xcall_call_function; 809extern unsigned long xcall_call_function;
810 810
811void arch_send_call_function_ipi(cpumask_t mask) 811void arch_send_call_function_ipi_mask(const struct cpumask *mask)
812{ 812{
813 xcall_deliver((u64) &xcall_call_function, 0, 0, &mask); 813 xcall_deliver((u64) &xcall_call_function, 0, 0, mask);
814} 814}
815 815
816extern unsigned long xcall_call_function_single; 816extern unsigned long xcall_call_function_single;
@@ -850,7 +850,7 @@ static void tsb_sync(void *info)
850 850
851void smp_tsb_sync(struct mm_struct *mm) 851void smp_tsb_sync(struct mm_struct *mm)
852{ 852{
853 smp_call_function_mask(mm->cpu_vm_mask, tsb_sync, mm, 1); 853 smp_call_function_many(mm_cpumask(mm), tsb_sync, mm, 1);
854} 854}
855 855
856extern unsigned long xcall_flush_tlb_mm; 856extern unsigned long xcall_flush_tlb_mm;
@@ -1055,13 +1055,13 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
1055 int cpu = get_cpu(); 1055 int cpu = get_cpu();
1056 1056
1057 if (atomic_read(&mm->mm_users) == 1) { 1057 if (atomic_read(&mm->mm_users) == 1) {
1058 mm->cpu_vm_mask = cpumask_of_cpu(cpu); 1058 cpumask_copy(mm_cpumask(mm), cpumask_of(cpu));
1059 goto local_flush_and_out; 1059 goto local_flush_and_out;
1060 } 1060 }
1061 1061
1062 smp_cross_call_masked(&xcall_flush_tlb_mm, 1062 smp_cross_call_masked(&xcall_flush_tlb_mm,
1063 ctx, 0, 0, 1063 ctx, 0, 0,
1064 &mm->cpu_vm_mask); 1064 mm_cpumask(mm));
1065 1065
1066local_flush_and_out: 1066local_flush_and_out:
1067 __flush_tlb_mm(ctx, SECONDARY_CONTEXT); 1067 __flush_tlb_mm(ctx, SECONDARY_CONTEXT);
@@ -1075,11 +1075,11 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long
1075 int cpu = get_cpu(); 1075 int cpu = get_cpu();
1076 1076
1077 if (mm == current->mm && atomic_read(&mm->mm_users) == 1) 1077 if (mm == current->mm && atomic_read(&mm->mm_users) == 1)
1078 mm->cpu_vm_mask = cpumask_of_cpu(cpu); 1078 cpumask_copy(mm_cpumask(mm), cpumask_of(cpu));
1079 else 1079 else
1080 smp_cross_call_masked(&xcall_flush_tlb_pending, 1080 smp_cross_call_masked(&xcall_flush_tlb_pending,
1081 ctx, nr, (unsigned long) vaddrs, 1081 ctx, nr, (unsigned long) vaddrs,
1082 &mm->cpu_vm_mask); 1082 mm_cpumask(mm));
1083 1083
1084 __flush_tlb_pending(ctx, nr, vaddrs); 1084 __flush_tlb_pending(ctx, nr, vaddrs);
1085 1085
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 3369fef5b4b3..ab036a72de5a 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -326,7 +326,6 @@ int sun4d_request_irq(unsigned int irq,
326 326
327 action->handler = handler; 327 action->handler = handler;
328 action->flags = irqflags; 328 action->flags = irqflags;
329 cpus_clear(action->mask);
330 action->name = devname; 329 action->name = devname;
331 action->next = NULL; 330 action->next = NULL;
332 action->dev_id = dev_id; 331 action->dev_id = dev_id;
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index 50afaed99c8a..54fb02468f0d 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -150,7 +150,7 @@ void __cpuinit smp4d_callin(void)
150 spin_lock_irqsave(&sun4d_imsk_lock, flags); 150 spin_lock_irqsave(&sun4d_imsk_lock, flags);
151 cc_set_imsk(cc_get_imsk() & ~0x4000); /* Allow PIL 14 as well */ 151 cc_set_imsk(cc_get_imsk() & ~0x4000); /* Allow PIL 14 as well */
152 spin_unlock_irqrestore(&sun4d_imsk_lock, flags); 152 spin_unlock_irqrestore(&sun4d_imsk_lock, flags);
153 cpu_set(cpuid, cpu_online_map); 153 set_cpu_online(cpuid, true);
154 154
155} 155}
156 156
@@ -228,11 +228,10 @@ void __init smp4d_smp_done(void)
228 /* setup cpu list for irq rotation */ 228 /* setup cpu list for irq rotation */
229 first = 0; 229 first = 0;
230 prev = &first; 230 prev = &first;
231 for (i = 0; i < NR_CPUS; i++) 231 for_each_online_cpu(i) {
232 if (cpu_online(i)) { 232 *prev = i;
233 *prev = i; 233 prev = &cpu_data(i).next;
234 prev = &cpu_data(i).next; 234 }
235 }
236 *prev = first; 235 *prev = first;
237 local_flush_cache_all(); 236 local_flush_cache_all();
238 237
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 8040376c4890..960b113d0006 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -113,7 +113,7 @@ void __cpuinit smp4m_callin(void)
113 113
114 local_irq_enable(); 114 local_irq_enable();
115 115
116 cpu_set(cpuid, cpu_online_map); 116 set_cpu_online(cpuid, true);
117} 117}
118 118
119/* 119/*
@@ -186,11 +186,9 @@ void __init smp4m_smp_done(void)
186 /* setup cpu list for irq rotation */ 186 /* setup cpu list for irq rotation */
187 first = 0; 187 first = 0;
188 prev = &first; 188 prev = &first;
189 for (i = 0; i < NR_CPUS; i++) { 189 for_each_online_cpu(i) {
190 if (cpu_online(i)) { 190 *prev = i;
191 *prev = i; 191 prev = &cpu_data(i).next;
192 prev = &cpu_data(i).next;
193 }
194 } 192 }
195 *prev = first; 193 *prev = first;
196 local_flush_cache_all(); 194 local_flush_cache_all();
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c
index 752d0c9fb544..7916feba6e4a 100644
--- a/arch/sparc/mm/highmem.c
+++ b/arch/sparc/mm/highmem.c
@@ -39,6 +39,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
39 if (!PageHighMem(page)) 39 if (!PageHighMem(page))
40 return page_address(page); 40 return page_address(page);
41 41
42 debug_kmap_atomic(type);
42 idx = type + KM_TYPE_NR*smp_processor_id(); 43 idx = type + KM_TYPE_NR*smp_processor_id();
43 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 44 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
44 45
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 00373ce2d8fb..2c8dfeb7ab04 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1092,7 +1092,7 @@ static void __init numa_parse_mdesc_group_cpus(struct mdesc_handle *md,
1092 if (strcmp(name, "cpu")) 1092 if (strcmp(name, "cpu"))
1093 continue; 1093 continue;
1094 id = mdesc_get_property(md, target, "id", NULL); 1094 id = mdesc_get_property(md, target, "id", NULL);
1095 if (*id < NR_CPUS) 1095 if (*id < nr_cpu_ids)
1096 cpu_set(*id, *mask); 1096 cpu_set(*id, *mask);
1097 } 1097 }
1098} 1098}
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index fe7ed08390bb..06c9a7d98206 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -1425,7 +1425,7 @@ static void __init init_vac_layout(void)
1425 min_line_size = vac_line_size; 1425 min_line_size = vac_line_size;
1426 //FIXME: cpus not contiguous!! 1426 //FIXME: cpus not contiguous!!
1427 cpu++; 1427 cpu++;
1428 if (cpu >= NR_CPUS || !cpu_online(cpu)) 1428 if (cpu >= nr_cpu_ids || !cpu_online(cpu))
1429 break; 1429 break;
1430#else 1430#else
1431 break; 1431 break;
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 434224e2229f..434ba121e3c5 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -757,7 +757,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
757 void (*proc)(unsigned char *, unsigned char *, void *); 757 void (*proc)(unsigned char *, unsigned char *, void *);
758 unsigned char addr_buf[4], netmask_buf[4]; 758 unsigned char addr_buf[4], netmask_buf[4];
759 759
760 if (dev->open != uml_net_open) 760 if (dev->netdev_ops->ndo_open != uml_net_open)
761 return NOTIFY_DONE; 761 return NOTIFY_DONE;
762 762
763 lp = netdev_priv(dev); 763 lp = netdev_priv(dev);
diff --git a/arch/um/drivers/pcap_user.h b/arch/um/drivers/pcap_user.h
index 96b80b565eeb..d8ba6153f912 100644
--- a/arch/um/drivers/pcap_user.h
+++ b/arch/um/drivers/pcap_user.h
@@ -19,13 +19,3 @@ extern const struct net_user_info pcap_user_info;
19 19
20extern int pcap_user_read(int fd, void *buf, int len, struct pcap_data *pri); 20extern int pcap_user_read(int fd, void *buf, int len, struct pcap_data *pri);
21 21
22/*
23 * Overrides for Emacs so that we follow Linus's tabbing style.
24 * Emacs will notice this stuff at the end of the file and automatically
25 * adjust the settings for this buffer only. This must remain at the end
26 * of the file.
27 * ---------------------------------------------------------------------------
28 * Local variables:
29 * c-file-style: "linux"
30 * End:
31 */
diff --git a/arch/um/drivers/port.h b/arch/um/drivers/port.h
index 9117609a575d..372a80c0556a 100644
--- a/arch/um/drivers/port.h
+++ b/arch/um/drivers/port.h
@@ -18,13 +18,3 @@ extern void port_remove_dev(void *d);
18 18
19#endif 19#endif
20 20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/arch/um/drivers/ssl.h b/arch/um/drivers/ssl.h
index 98412aa66607..314d17725ce6 100644
--- a/arch/um/drivers/ssl.h
+++ b/arch/um/drivers/ssl.h
@@ -11,13 +11,3 @@ extern void ssl_receive_char(int line, char ch);
11 11
12#endif 12#endif
13 13
14/*
15 * Overrides for Emacs so that we follow Linus's tabbing style.
16 * Emacs will notice this stuff at the end of the file and automatically
17 * adjust the settings for this buffer only. This must remain at the end
18 * of the file.
19 * ---------------------------------------------------------------------------
20 * Local variables:
21 * c-file-style: "linux"
22 * End:
23 */
diff --git a/arch/um/drivers/stdio_console.h b/arch/um/drivers/stdio_console.h
index 505a3d5bea5e..6d8275f71fd4 100644
--- a/arch/um/drivers/stdio_console.h
+++ b/arch/um/drivers/stdio_console.h
@@ -9,13 +9,3 @@
9extern void save_console_flags(void); 9extern void save_console_flags(void);
10#endif 10#endif
11 11
12/*
13 * Overrides for Emacs so that we follow Linus's tabbing style.
14 * Emacs will notice this stuff at the end of the file and automatically
15 * adjust the settings for this buffer only. This must remain at the end
16 * of the file.
17 * ---------------------------------------------------------------------------
18 * Local variables:
19 * c-file-style: "linux"
20 * End:
21 */
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 0a868118cf06..f934225fd8ef 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -17,12 +17,12 @@
17 * James McMechan 17 * James McMechan
18 */ 18 */
19 19
20#define MAJOR_NR UBD_MAJOR
21#define UBD_SHIFT 4 20#define UBD_SHIFT 4
22 21
23#include "linux/kernel.h" 22#include "linux/kernel.h"
24#include "linux/module.h" 23#include "linux/module.h"
25#include "linux/blkdev.h" 24#include "linux/blkdev.h"
25#include "linux/ata.h"
26#include "linux/hdreg.h" 26#include "linux/hdreg.h"
27#include "linux/init.h" 27#include "linux/init.h"
28#include "linux/cdrom.h" 28#include "linux/cdrom.h"
@@ -115,7 +115,7 @@ static struct block_device_operations ubd_blops = {
115}; 115};
116 116
117/* Protected by ubd_lock */ 117/* Protected by ubd_lock */
118static int fake_major = MAJOR_NR; 118static int fake_major = UBD_MAJOR;
119static struct gendisk *ubd_gendisk[MAX_DEV]; 119static struct gendisk *ubd_gendisk[MAX_DEV];
120static struct gendisk *fake_gendisk[MAX_DEV]; 120static struct gendisk *fake_gendisk[MAX_DEV];
121 121
@@ -299,7 +299,7 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
299 } 299 }
300 300
301 mutex_lock(&ubd_lock); 301 mutex_lock(&ubd_lock);
302 if(fake_major != MAJOR_NR){ 302 if (fake_major != UBD_MAJOR) {
303 *error_out = "Can't assign a fake major twice"; 303 *error_out = "Can't assign a fake major twice";
304 goto out1; 304 goto out1;
305 } 305 }
@@ -818,13 +818,13 @@ static int ubd_disk_register(int major, u64 size, int unit,
818 disk->first_minor = unit << UBD_SHIFT; 818 disk->first_minor = unit << UBD_SHIFT;
819 disk->fops = &ubd_blops; 819 disk->fops = &ubd_blops;
820 set_capacity(disk, size / 512); 820 set_capacity(disk, size / 512);
821 if(major == MAJOR_NR) 821 if (major == UBD_MAJOR)
822 sprintf(disk->disk_name, "ubd%c", 'a' + unit); 822 sprintf(disk->disk_name, "ubd%c", 'a' + unit);
823 else 823 else
824 sprintf(disk->disk_name, "ubd_fake%d", unit); 824 sprintf(disk->disk_name, "ubd_fake%d", unit);
825 825
826 /* sysfs register (not for ide fake devices) */ 826 /* sysfs register (not for ide fake devices) */
827 if (major == MAJOR_NR) { 827 if (major == UBD_MAJOR) {
828 ubd_devs[unit].pdev.id = unit; 828 ubd_devs[unit].pdev.id = unit;
829 ubd_devs[unit].pdev.name = DRIVER_NAME; 829 ubd_devs[unit].pdev.name = DRIVER_NAME;
830 ubd_devs[unit].pdev.dev.release = ubd_device_release; 830 ubd_devs[unit].pdev.dev.release = ubd_device_release;
@@ -871,13 +871,13 @@ static int ubd_add(int n, char **error_out)
871 ubd_dev->queue->queuedata = ubd_dev; 871 ubd_dev->queue->queuedata = ubd_dev;
872 872
873 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); 873 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG);
874 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); 874 err = ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, &ubd_gendisk[n]);
875 if(err){ 875 if(err){
876 *error_out = "Failed to register device"; 876 *error_out = "Failed to register device";
877 goto out_cleanup; 877 goto out_cleanup;
878 } 878 }
879 879
880 if(fake_major != MAJOR_NR) 880 if (fake_major != UBD_MAJOR)
881 ubd_disk_register(fake_major, ubd_dev->size, n, 881 ubd_disk_register(fake_major, ubd_dev->size, n,
882 &fake_gendisk[n]); 882 &fake_gendisk[n]);
883 883
@@ -1059,10 +1059,10 @@ static int __init ubd_init(void)
1059 char *error; 1059 char *error;
1060 int i, err; 1060 int i, err;
1061 1061
1062 if (register_blkdev(MAJOR_NR, "ubd")) 1062 if (register_blkdev(UBD_MAJOR, "ubd"))
1063 return -1; 1063 return -1;
1064 1064
1065 if (fake_major != MAJOR_NR) { 1065 if (fake_major != UBD_MAJOR) {
1066 char name[sizeof("ubd_nnn\0")]; 1066 char name[sizeof("ubd_nnn\0")];
1067 1067
1068 snprintf(name, sizeof(name), "ubd_%d", fake_major); 1068 snprintf(name, sizeof(name), "ubd_%d", fake_major);
@@ -1309,16 +1309,15 @@ static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
1309 unsigned int cmd, unsigned long arg) 1309 unsigned int cmd, unsigned long arg)
1310{ 1310{
1311 struct ubd *ubd_dev = bdev->bd_disk->private_data; 1311 struct ubd *ubd_dev = bdev->bd_disk->private_data;
1312 struct hd_driveid ubd_id = { 1312 u16 ubd_id[ATA_ID_WORDS];
1313 .cyls = 0,
1314 .heads = 128,
1315 .sectors = 32,
1316 };
1317 1313
1318 switch (cmd) { 1314 switch (cmd) {
1319 struct cdrom_volctrl volume; 1315 struct cdrom_volctrl volume;
1320 case HDIO_GET_IDENTITY: 1316 case HDIO_GET_IDENTITY:
1321 ubd_id.cyls = ubd_dev->size / (128 * 32 * 512); 1317 memset(&ubd_id, 0, ATA_ID_WORDS * 2);
1318 ubd_id[ATA_ID_CYLS] = ubd_dev->size / (128 * 32 * 512);
1319 ubd_id[ATA_ID_HEADS] = 128;
1320 ubd_id[ATA_ID_SECTORS] = 32;
1322 if(copy_to_user((char __user *) arg, (char *) &ubd_id, 1321 if(copy_to_user((char __user *) arg, (char *) &ubd_id,
1323 sizeof(ubd_id))) 1322 sizeof(ubd_id)))
1324 return -EFAULT; 1323 return -EFAULT;
diff --git a/arch/um/drivers/xterm.h b/arch/um/drivers/xterm.h
index f33a6e77b186..56b9c4aba423 100644
--- a/arch/um/drivers/xterm.h
+++ b/arch/um/drivers/xterm.h
@@ -10,13 +10,3 @@ extern int xterm_fd(int socket, int *pid_out);
10 10
11#endif 11#endif
12 12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/arch/um/include/asm/ftrace.h b/arch/um/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/um/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/um/include/asm/irq_vectors.h b/arch/um/include/asm/irq_vectors.h
index 62ddba6fc733..272a81e0ce14 100644
--- a/arch/um/include/asm/irq_vectors.h
+++ b/arch/um/include/asm/irq_vectors.h
@@ -8,13 +8,3 @@
8 8
9#endif 9#endif
10 10
11/*
12 * Overrides for Emacs so that we follow Linus's tabbing style.
13 * Emacs will notice this stuff at the end of the file and automatically
14 * adjust the settings for this buffer only. This must remain at the end
15 * of the file.
16 * ---------------------------------------------------------------------------
17 * Local variables:
18 * c-file-style: "linux"
19 * End:
20 */
diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h
index 2cf35c21d694..cf259de51531 100644
--- a/arch/um/include/asm/mmu.h
+++ b/arch/um/include/asm/mmu.h
@@ -10,13 +10,3 @@
10 10
11#endif 11#endif
12 12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/arch/um/include/asm/pda.h b/arch/um/include/asm/pda.h
index 0d8bf33ffd42..ddcd774fc2a0 100644
--- a/arch/um/include/asm/pda.h
+++ b/arch/um/include/asm/pda.h
@@ -19,13 +19,3 @@ extern struct foo me;
19 19
20#endif 20#endif
21 21
22/*
23 * Overrides for Emacs so that we follow Linus's tabbing style.
24 * Emacs will notice this stuff at the end of the file and automatically
25 * adjust the settings for this buffer only. This must remain at the end
26 * of the file.
27 * ---------------------------------------------------------------------------
28 * Local variables:
29 * c-file-style: "linux"
30 * End:
31 */
diff --git a/arch/um/include/asm/pgalloc.h b/arch/um/include/asm/pgalloc.h
index 9062a6e72241..718984359f8c 100644
--- a/arch/um/include/asm/pgalloc.h
+++ b/arch/um/include/asm/pgalloc.h
@@ -60,13 +60,3 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
60 60
61#endif 61#endif
62 62
63/*
64 * Overrides for Emacs so that we follow Linus's tabbing style.
65 * Emacs will notice this stuff at the end of the file and automatically
66 * adjust the settings for this buffer only. This must remain at the end
67 * of the file.
68 * ---------------------------------------------------------------------------
69 * Local variables:
70 * c-file-style: "linux"
71 * End:
72 */
diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h
index 0446f456b428..084de4a9fc70 100644
--- a/arch/um/include/asm/pgtable-3level.h
+++ b/arch/um/include/asm/pgtable-3level.h
@@ -134,13 +134,3 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
134 134
135#endif 135#endif
136 136
137/*
138 * Overrides for Emacs so that we follow Linus's tabbing style.
139 * Emacs will notice this stuff at the end of the file and automatically
140 * adjust the settings for this buffer only. This must remain at the end
141 * of the file.
142 * ---------------------------------------------------------------------------
143 * Local variables:
144 * c-file-style: "linux"
145 * End:
146 */
diff --git a/arch/um/include/shared/frame_kern.h b/arch/um/include/shared/frame_kern.h
index ce9514f57211..76078490c258 100644
--- a/arch/um/include/shared/frame_kern.h
+++ b/arch/um/include/shared/frame_kern.h
@@ -20,13 +20,3 @@ extern int setup_signal_stack_si(unsigned long stack_top, int sig,
20 20
21#endif 21#endif
22 22
23/*
24 * Overrides for Emacs so that we follow Linus's tabbing style.
25 * Emacs will notice this stuff at the end of the file and automatically
26 * adjust the settings for this buffer only. This must remain at the end
27 * of the file.
28 * ---------------------------------------------------------------------------
29 * Local variables:
30 * c-file-style: "linux"
31 * End:
32 */
diff --git a/arch/um/include/shared/initrd.h b/arch/um/include/shared/initrd.h
index 439b9a814985..22673bcc273d 100644
--- a/arch/um/include/shared/initrd.h
+++ b/arch/um/include/shared/initrd.h
@@ -10,13 +10,3 @@ extern int load_initrd(char *filename, void *buf, int size);
10 10
11#endif 11#endif
12 12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/arch/um/include/shared/irq_kern.h b/arch/um/include/shared/irq_kern.h
index fba3895274f9..b05d22f3d84e 100644
--- a/arch/um/include/shared/irq_kern.h
+++ b/arch/um/include/shared/irq_kern.h
@@ -16,13 +16,3 @@ extern int um_request_irq(unsigned int irq, int fd, int type,
16 16
17#endif 17#endif
18 18
19/*
20 * Overrides for Emacs so that we follow Linus's tabbing style.
21 * Emacs will notice this stuff at the end of the file and automatically
22 * adjust the settings for this buffer only. This must remain at the end
23 * of the file.
24 * ---------------------------------------------------------------------------
25 * Local variables:
26 * c-file-style: "linux"
27 * End:
28 */
diff --git a/arch/um/include/shared/mem_kern.h b/arch/um/include/shared/mem_kern.h
index cb7e196d366b..69be0fd0ce4b 100644
--- a/arch/um/include/shared/mem_kern.h
+++ b/arch/um/include/shared/mem_kern.h
@@ -18,13 +18,3 @@ extern void register_remapper(struct remapper *info);
18 18
19#endif 19#endif
20 20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/arch/um/include/shared/ubd_user.h b/arch/um/include/shared/ubd_user.h
index bb66517f0739..3845051f1b10 100644
--- a/arch/um/include/shared/ubd_user.h
+++ b/arch/um/include/shared/ubd_user.h
@@ -14,13 +14,3 @@ extern int kernel_fd;
14 14
15#endif 15#endif
16 16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 499e5e95e609..388ec0a3ea9b 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -28,7 +28,7 @@ $(obj)/config.tmp: $(objtree)/.config FORCE
28 $(call if_changed,quote1) 28 $(call if_changed,quote1)
29 29
30quiet_cmd_quote1 = QUOTE $@ 30quiet_cmd_quote1 = QUOTE $@
31 cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' \ 31 cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
32 $< > $@ 32 $< > $@
33 33
34$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE 34$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
@@ -36,9 +36,9 @@ $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
36 36
37quiet_cmd_quote2 = QUOTE $@ 37quiet_cmd_quote2 = QUOTE $@
38 cmd_quote2 = sed -e '/CONFIG/{' \ 38 cmd_quote2 = sed -e '/CONFIG/{' \
39 -e 's/"CONFIG"\;/""/' \ 39 -e 's/"CONFIG"//' \
40 -e 'r $(obj)/config.tmp' \ 40 -e 'r $(obj)/config.tmp' \
41 -e 'a \' \ 41 -e 'a \' \
42 -e '""\;' \ 42 -e '""' \
43 -e '}' \ 43 -e '}' \
44 $< > $@ 44 $< > $@
diff --git a/arch/um/kernel/config.c.in b/arch/um/kernel/config.c.in
index c062cbfe386e..b7a43feafde7 100644
--- a/arch/um/kernel/config.c.in
+++ b/arch/um/kernel/config.c.in
@@ -7,11 +7,15 @@
7#include <stdlib.h> 7#include <stdlib.h>
8#include "init.h" 8#include "init.h"
9 9
10static __initdata char *config = "CONFIG"; 10static __initdata const char *config[] = {
11"CONFIG"
12};
11 13
12static int __init print_config(char *line, int *add) 14static int __init print_config(char *line, int *add)
13{ 15{
14 printf("%s", config); 16 int i;
17 for (i = 0; i < sizeof(config)/sizeof(config[0]); i++)
18 printf("%s", config[i]);
15 exit(0); 19 exit(0);
16} 20}
17 21
@@ -20,13 +24,3 @@ __uml_setup("--showconfig", print_config,
20" Prints the config file that this UML binary was generated from.\n\n" 24" Prints the config file that this UML binary was generated from.\n\n"
21); 25);
22 26
23/*
24 * Overrides for Emacs so that we follow Linus's tabbing style.
25 * Emacs will notice this stuff at the end of the file and automatically
26 * adjust the settings for this buffer only. This must remain at the end
27 * of the file.
28 * ---------------------------------------------------------------------------
29 * Local variables:
30 * c-file-style: "linux"
31 * End:
32 */
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index a1c6d07cac3e..4a28a1568d85 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -179,7 +179,7 @@ void fork_handler(void)
179 userspace(&current->thread.regs.regs); 179 userspace(&current->thread.regs.regs);
180} 180}
181 181
182int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, 182int copy_thread(unsigned long clone_flags, unsigned long sp,
183 unsigned long stack_top, struct task_struct * p, 183 unsigned long stack_top, struct task_struct * p,
184 struct pt_regs *regs) 184 struct pt_regs *regs)
185{ 185{
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index c4df705b8359..a4625c7b2bf9 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -127,7 +127,8 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[])
127 127
128 fs = get_fs(); 128 fs = get_fs();
129 set_fs(KERNEL_DS); 129 set_fs(KERNEL_DS);
130 ret = um_execve(filename, argv, envp); 130 ret = um_execve((char *)filename, (char __user *__user *)argv,
131 (char __user *__user *) envp);
131 set_fs(fs); 132 set_fs(fs);
132 133
133 return ret; 134 return ret;
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 183db26d01bf..02ee9adff54a 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -244,7 +244,7 @@ static void __init check_sysemu(void)
244 244
245 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, 245 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
246 (void *) PTRACE_O_TRACESYSGOOD) < 0)) 246 (void *) PTRACE_O_TRACESYSGOOD) < 0))
247 fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed"); 247 fatal_perror("check_sysemu: PTRACE_OLDSETOPTIONS failed");
248 248
249 while (1) { 249 while (1) {
250 count++; 250 count++;
@@ -252,12 +252,12 @@ static void __init check_sysemu(void)
252 goto fail; 252 goto fail;
253 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 253 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
254 if (n < 0) 254 if (n < 0)
255 fatal_perror("check_ptrace : wait failed"); 255 fatal_perror("check_sysemu: wait failed");
256 256
257 if (WIFSTOPPED(status) && 257 if (WIFSTOPPED(status) &&
258 (WSTOPSIG(status) == (SIGTRAP|0x80))) { 258 (WSTOPSIG(status) == (SIGTRAP|0x80))) {
259 if (!count) { 259 if (!count) {
260 non_fatal("check_ptrace : SYSEMU_SINGLESTEP " 260 non_fatal("check_sysemu: SYSEMU_SINGLESTEP "
261 "doesn't singlestep"); 261 "doesn't singlestep");
262 goto fail; 262 goto fail;
263 } 263 }
@@ -271,7 +271,7 @@ static void __init check_sysemu(void)
271 else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) 271 else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP))
272 count++; 272 count++;
273 else { 273 else {
274 non_fatal("check_ptrace : expected SIGTRAP or " 274 non_fatal("check_sysemu: expected SIGTRAP or "
275 "(SIGTRAP | 0x80), got status = %d\n", 275 "(SIGTRAP | 0x80), got status = %d\n",
276 status); 276 status);
277 goto fail; 277 goto fail;
diff --git a/arch/um/sys-i386/asm/archparam.h b/arch/um/sys-i386/asm/archparam.h
index 93fd723344e5..2a18a884ca1b 100644
--- a/arch/um/sys-i386/asm/archparam.h
+++ b/arch/um/sys-i386/asm/archparam.h
@@ -14,13 +14,3 @@
14 14
15#endif 15#endif
16 16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/sys-i386/shared/sysdep/checksum.h b/arch/um/sys-i386/shared/sysdep/checksum.h
index 0cb4645cbeb8..ed47445f3905 100644
--- a/arch/um/sys-i386/shared/sysdep/checksum.h
+++ b/arch/um/sys-i386/shared/sysdep/checksum.h
@@ -199,13 +199,3 @@ static __inline__ __wsum csum_and_copy_to_user(const void *src,
199 199
200#endif 200#endif
201 201
202/*
203 * Overrides for Emacs so that we follow Linus's tabbing style.
204 * Emacs will notice this stuff at the end of the file and automatically
205 * adjust the settings for this buffer only. This must remain at the end
206 * of the file.
207 * ---------------------------------------------------------------------------
208 * Local variables:
209 * c-file-style: "linux"
210 * End:
211 */
diff --git a/arch/um/sys-i386/sys_call_table.S b/arch/um/sys-i386/sys_call_table.S
index 00e5f5203eea..c6260dd6ebb9 100644
--- a/arch/um/sys-i386/sys_call_table.S
+++ b/arch/um/sys-i386/sys_call_table.S
@@ -9,6 +9,17 @@
9 9
10#define old_mmap old_mmap_i386 10#define old_mmap old_mmap_i386
11 11
12#define ptregs_fork sys_fork
13#define ptregs_execve sys_execve
14#define ptregs_iopl sys_iopl
15#define ptregs_vm86old sys_vm86old
16#define ptregs_sigreturn sys_sigreturn
17#define ptregs_clone sys_clone
18#define ptregs_vm86 sys_vm86
19#define ptregs_rt_sigreturn sys_rt_sigreturn
20#define ptregs_sigaltstack sys_sigaltstack
21#define ptregs_vfork sys_vfork
22
12.section .rodata,"a" 23.section .rodata,"a"
13 24
14#include "../../x86/kernel/syscall_table_32.S" 25#include "../../x86/kernel/syscall_table_32.S"
diff --git a/arch/um/sys-ia64/sysdep/ptrace.h b/arch/um/sys-ia64/sysdep/ptrace.h
index 42dd8fb6f2f9..0f0f4e6fd334 100644
--- a/arch/um/sys-ia64/sysdep/ptrace.h
+++ b/arch/um/sys-ia64/sysdep/ptrace.h
@@ -14,13 +14,3 @@ struct sys_pt_regs {
14 14
15#endif 15#endif
16 16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/sys-ia64/sysdep/sigcontext.h b/arch/um/sys-ia64/sysdep/sigcontext.h
index f15fb25260ba..76b43161e779 100644
--- a/arch/um/sys-ia64/sysdep/sigcontext.h
+++ b/arch/um/sys-ia64/sysdep/sigcontext.h
@@ -8,13 +8,3 @@
8 8
9#endif 9#endif
10 10
11/*
12 * Overrides for Emacs so that we follow Linus's tabbing style.
13 * Emacs will notice this stuff at the end of the file and automatically
14 * adjust the settings for this buffer only. This must remain at the end
15 * of the file.
16 * ---------------------------------------------------------------------------
17 * Local variables:
18 * c-file-style: "linux"
19 * End:
20 */
diff --git a/arch/um/sys-ia64/sysdep/syscalls.h b/arch/um/sys-ia64/sysdep/syscalls.h
index 4a1f46ef1ebc..5f6700c41558 100644
--- a/arch/um/sys-ia64/sysdep/syscalls.h
+++ b/arch/um/sys-ia64/sysdep/syscalls.h
@@ -8,13 +8,3 @@
8 8
9#endif 9#endif
10 10
11/*
12 * Overrides for Emacs so that we follow Linus's tabbing style.
13 * Emacs will notice this stuff at the end of the file and automatically
14 * adjust the settings for this buffer only. This must remain at the end
15 * of the file.
16 * ---------------------------------------------------------------------------
17 * Local variables:
18 * c-file-style: "linux"
19 * End:
20 */
diff --git a/arch/um/sys-ppc/miscthings.c b/arch/um/sys-ppc/miscthings.c
index 373061c50129..1c11aed9c719 100644
--- a/arch/um/sys-ppc/miscthings.c
+++ b/arch/um/sys-ppc/miscthings.c
@@ -40,14 +40,3 @@ void shove_aux_table(unsigned long sp)
40} 40}
41/* END stuff taken from arch/ppc/kernel/process.c */ 41/* END stuff taken from arch/ppc/kernel/process.c */
42 42
43
44/*
45 * Overrides for Emacs so that we follow Linus's tabbing style.
46 * Emacs will notice this stuff at the end of the file and automatically
47 * adjust the settings for this buffer only. This must remain at the end
48 * of the file.
49 * ---------------------------------------------------------------------------
50 * Local variables:
51 * c-file-style: "linux"
52 * End:
53 */
diff --git a/arch/um/sys-ppc/ptrace.c b/arch/um/sys-ppc/ptrace.c
index 8e71b47f2b8e..66ef155248f1 100644
--- a/arch/um/sys-ppc/ptrace.c
+++ b/arch/um/sys-ppc/ptrace.c
@@ -56,13 +56,3 @@ int peek_user(struct task_struct *child, long addr, long data)
56 return put_user(tmp, (unsigned long *) data); 56 return put_user(tmp, (unsigned long *) data);
57} 57}
58 58
59/*
60 * Overrides for Emacs so that we follow Linus's tabbing style.
61 * Emacs will notice this stuff at the end of the file and automatically
62 * adjust the settings for this buffer only. This must remain at the end
63 * of the file.
64 * ---------------------------------------------------------------------------
65 * Local variables:
66 * c-file-style: "linux"
67 * End:
68 */
diff --git a/arch/um/sys-ppc/ptrace_user.c b/arch/um/sys-ppc/ptrace_user.c
index ff0b9c077a13..224d2403c37b 100644
--- a/arch/um/sys-ppc/ptrace_user.c
+++ b/arch/um/sys-ppc/ptrace_user.c
@@ -27,13 +27,3 @@ int ptrace_setregs(long pid, unsigned long *regs_in)
27 } 27 }
28 return 0; 28 return 0;
29} 29}
30/*
31 * Overrides for Emacs so that we follow Linus's tabbing style.
32 * Emacs will notice this stuff at the end of the file and automatically
33 * adjust the settings for this buffer only. This must remain at the end
34 * of the file.
35 * ---------------------------------------------------------------------------
36 * Local variables:
37 * c-file-style: "linux"
38 * End:
39 */
diff --git a/arch/um/sys-ppc/shared/sysdep/ptrace.h b/arch/um/sys-ppc/shared/sysdep/ptrace.h
index df2397dba3e5..0e3230e937e1 100644
--- a/arch/um/sys-ppc/shared/sysdep/ptrace.h
+++ b/arch/um/sys-ppc/shared/sysdep/ptrace.h
@@ -91,13 +91,3 @@ extern void shove_aux_table(unsigned long sp);
91 91
92#endif 92#endif
93 93
94/*
95 * Overrides for Emacs so that we follow Linus's tabbing style.
96 * Emacs will notice this stuff at the end of the file and automatically
97 * adjust the settings for this buffer only. This must remain at the end
98 * of the file.
99 * ---------------------------------------------------------------------------
100 * Local variables:
101 * c-file-style: "linux"
102 * End:
103 */
diff --git a/arch/um/sys-ppc/shared/sysdep/sigcontext.h b/arch/um/sys-ppc/shared/sysdep/sigcontext.h
index f20d965de9c7..b7286f0a1e00 100644
--- a/arch/um/sys-ppc/shared/sysdep/sigcontext.h
+++ b/arch/um/sys-ppc/shared/sysdep/sigcontext.h
@@ -50,13 +50,3 @@
50 50
51#endif 51#endif
52 52
53/*
54 * Overrides for Emacs so that we follow Linus's tabbing style.
55 * Emacs will notice this stuff at the end of the file and automatically
56 * adjust the settings for this buffer only. This must remain at the end
57 * of the file.
58 * ---------------------------------------------------------------------------
59 * Local variables:
60 * c-file-style: "linux"
61 * End:
62 */
diff --git a/arch/um/sys-ppc/shared/sysdep/syscalls.h b/arch/um/sys-ppc/shared/sysdep/syscalls.h
index 679df351e19b..1ff81552251c 100644
--- a/arch/um/sys-ppc/shared/sysdep/syscalls.h
+++ b/arch/um/sys-ppc/shared/sysdep/syscalls.h
@@ -41,13 +41,3 @@ int old_mmap(unsigned long addr, unsigned long len,
41 41
42#define LAST_ARCH_SYSCALL __NR_fadvise64 42#define LAST_ARCH_SYSCALL __NR_fadvise64
43 43
44/*
45 * Overrides for Emacs so that we follow Linus's tabbing style.
46 * Emacs will notice this stuff at the end of the file and automatically
47 * adjust the settings for this buffer only. This must remain at the end
48 * of the file.
49 * ---------------------------------------------------------------------------
50 * Local variables:
51 * c-file-style: "linux"
52 * End:
53 */
diff --git a/arch/um/sys-ppc/sigcontext.c b/arch/um/sys-ppc/sigcontext.c
index 4bdc15c89edd..40694d0f3d15 100644
--- a/arch/um/sys-ppc/sigcontext.c
+++ b/arch/um/sys-ppc/sigcontext.c
@@ -2,13 +2,3 @@
2#include "asm/sigcontext.h" 2#include "asm/sigcontext.h"
3#include "sysdep/ptrace.h" 3#include "sysdep/ptrace.h"
4 4
5/*
6 * Overrides for Emacs so that we follow Linus's tabbing style.
7 * Emacs will notice this stuff at the end of the file and automatically
8 * adjust the settings for this buffer only. This must remain at the end
9 * of the file.
10 * ---------------------------------------------------------------------------
11 * Local variables:
12 * c-file-style: "linux"
13 * End:
14 */
diff --git a/arch/um/sys-x86_64/asm/archparam.h b/arch/um/sys-x86_64/asm/archparam.h
index 270ed9586b68..6c083663b8d9 100644
--- a/arch/um/sys-x86_64/asm/archparam.h
+++ b/arch/um/sys-x86_64/asm/archparam.h
@@ -14,13 +14,3 @@
14 14
15#endif 15#endif
16 16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/sys-x86_64/asm/module.h b/arch/um/sys-x86_64/asm/module.h
index 35b5491d3e96..8eb79c2d07d5 100644
--- a/arch/um/sys-x86_64/asm/module.h
+++ b/arch/um/sys-x86_64/asm/module.h
@@ -18,13 +18,3 @@ struct mod_arch_specific
18 18
19#endif 19#endif
20 20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/arch/um/sys-x86_64/mem.c b/arch/um/sys-x86_64/mem.c
index 3f59a0a4f156..3f8df8abf347 100644
--- a/arch/um/sys-x86_64/mem.c
+++ b/arch/um/sys-x86_64/mem.c
@@ -14,12 +14,3 @@ unsigned long vm_data_default_flags = __VM_DATA_DEFAULT_FLAGS;
14unsigned long vm_data_default_flags32 = __VM_DATA_DEFAULT_FLAGS; 14unsigned long vm_data_default_flags32 = __VM_DATA_DEFAULT_FLAGS;
15unsigned long vm_force_exec32 = PROT_EXEC; 15unsigned long vm_force_exec32 = PROT_EXEC;
16 16
17/* Overrides for Emacs so that we follow Linus's tabbing style.
18 * Emacs will notice this stuff at the end of the file and automatically
19 * adjust the settings for this buffer only. This must remain at the end
20 * of the file.
21 * ---------------------------------------------------------------------------
22 * Local variables:
23 * c-file-style: "linux"
24 * End:
25 */
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 06c02c00d7d9..4b3408206091 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -34,12 +34,15 @@ config X86
34 select HAVE_FUNCTION_TRACER 34 select HAVE_FUNCTION_TRACER
35 select HAVE_FUNCTION_GRAPH_TRACER 35 select HAVE_FUNCTION_GRAPH_TRACER
36 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 36 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
37 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
38 select HAVE_FTRACE_SYSCALLS
37 select HAVE_KVM 39 select HAVE_KVM
38 select HAVE_ARCH_KGDB 40 select HAVE_ARCH_KGDB
39 select HAVE_ARCH_TRACEHOOK 41 select HAVE_ARCH_TRACEHOOK
40 select HAVE_GENERIC_DMA_COHERENT if X86_32 42 select HAVE_GENERIC_DMA_COHERENT if X86_32
41 select HAVE_EFFICIENT_UNALIGNED_ACCESS 43 select HAVE_EFFICIENT_UNALIGNED_ACCESS
42 select USER_STACKTRACE_SUPPORT 44 select USER_STACKTRACE_SUPPORT
45 select HAVE_DMA_API_DEBUG
43 select HAVE_KERNEL_GZIP 46 select HAVE_KERNEL_GZIP
44 select HAVE_KERNEL_BZIP2 47 select HAVE_KERNEL_BZIP2
45 select HAVE_KERNEL_LZMA 48 select HAVE_KERNEL_LZMA
@@ -164,6 +167,9 @@ config AUDIT_ARCH
164config ARCH_SUPPORTS_OPTIMIZED_INLINING 167config ARCH_SUPPORTS_OPTIMIZED_INLINING
165 def_bool y 168 def_bool y
166 169
170config ARCH_SUPPORTS_DEBUG_PAGEALLOC
171 def_bool y
172
167# Use the generic interrupt handling code in kernel/irq/: 173# Use the generic interrupt handling code in kernel/irq/:
168config GENERIC_HARDIRQS 174config GENERIC_HARDIRQS
169 bool 175 bool
@@ -247,6 +253,7 @@ config SMP
247config X86_X2APIC 253config X86_X2APIC
248 bool "Support x2apic" 254 bool "Support x2apic"
249 depends on X86_LOCAL_APIC && X86_64 255 depends on X86_LOCAL_APIC && X86_64
256 select INTR_REMAP
250 ---help--- 257 ---help---
251 This enables x2apic support on CPUs that have this feature. 258 This enables x2apic support on CPUs that have this feature.
252 259
@@ -786,6 +793,11 @@ config X86_MCE_AMD
786 Additional support for AMD specific MCE features such as 793 Additional support for AMD specific MCE features such as
787 the DRAM Error Threshold. 794 the DRAM Error Threshold.
788 795
796config X86_MCE_THRESHOLD
797 depends on X86_MCE_AMD || X86_MCE_INTEL
798 bool
799 default y
800
789config X86_MCE_NONFATAL 801config X86_MCE_NONFATAL
790 tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4" 802 tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
791 depends on X86_32 && X86_MCE 803 depends on X86_32 && X86_MCE
@@ -929,6 +941,12 @@ config X86_CPUID
929 with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to 941 with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
930 /dev/cpu/31/cpuid. 942 /dev/cpu/31/cpuid.
931 943
944config X86_CPU_DEBUG
945 tristate "/sys/kernel/debug/x86/cpu/* - CPU Debug support"
946 ---help---
947 If you select this option, this will provide various x86 CPUs
948 information through debugfs.
949
932choice 950choice
933 prompt "High Memory Support" 951 prompt "High Memory Support"
934 default HIGHMEM4G if !X86_NUMAQ 952 default HIGHMEM4G if !X86_NUMAQ
@@ -1121,7 +1139,7 @@ config NUMA_EMU
1121 1139
1122config NODES_SHIFT 1140config NODES_SHIFT
1123 int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP 1141 int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
1124 range 1 9 if X86_64 1142 range 1 9
1125 default "9" if MAXSMP 1143 default "9" if MAXSMP
1126 default "6" if X86_64 1144 default "6" if X86_64
1127 default "4" if X86_NUMAQ 1145 default "4" if X86_NUMAQ
@@ -1129,7 +1147,7 @@ config NODES_SHIFT
1129 depends on NEED_MULTIPLE_NODES 1147 depends on NEED_MULTIPLE_NODES
1130 ---help--- 1148 ---help---
1131 Specify the maximum number of NUMA Nodes available on the target 1149 Specify the maximum number of NUMA Nodes available on the target
1132 system. Increases memory reserved to accomodate various tables. 1150 system. Increases memory reserved to accommodate various tables.
1133 1151
1134config HAVE_ARCH_BOOTMEM 1152config HAVE_ARCH_BOOTMEM
1135 def_bool y 1153 def_bool y
@@ -1307,7 +1325,7 @@ config MTRR_SANITIZER
1307 add writeback entries. 1325 add writeback entries.
1308 1326
1309 Can be disabled with disable_mtrr_cleanup on the kernel command line. 1327 Can be disabled with disable_mtrr_cleanup on the kernel command line.
1310 The largest mtrr entry size for a continous block can be set with 1328 The largest mtrr entry size for a continuous block can be set with
1311 mtrr_chunk_size. 1329 mtrr_chunk_size.
1312 1330
1313 If unsure, say Y. 1331 If unsure, say Y.
@@ -1429,7 +1447,7 @@ config CRASH_DUMP
1429config KEXEC_JUMP 1447config KEXEC_JUMP
1430 bool "kexec jump (EXPERIMENTAL)" 1448 bool "kexec jump (EXPERIMENTAL)"
1431 depends on EXPERIMENTAL 1449 depends on EXPERIMENTAL
1432 depends on KEXEC && HIBERNATION && X86_32 1450 depends on KEXEC && HIBERNATION
1433 ---help--- 1451 ---help---
1434 Jump between original kernel and kexeced kernel and invoke 1452 Jump between original kernel and kexeced kernel and invoke
1435 code in physical address mode via KEXEC 1453 code in physical address mode via KEXEC
@@ -1822,8 +1840,8 @@ config PCI_MMCONFIG
1822 1840
1823config DMAR 1841config DMAR
1824 bool "Support for DMA Remapping Devices (EXPERIMENTAL)" 1842 bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
1825 depends on X86_64 && PCI_MSI && ACPI && EXPERIMENTAL 1843 depends on PCI_MSI && ACPI && EXPERIMENTAL
1826 ---help--- 1844 help
1827 DMA remapping (DMAR) devices support enables independent address 1845 DMA remapping (DMAR) devices support enables independent address
1828 translations for Direct Memory Access (DMA) from devices. 1846 translations for Direct Memory Access (DMA) from devices.
1829 These DMA remapping devices are reported via ACPI tables 1847 These DMA remapping devices are reported via ACPI tables
@@ -1864,7 +1882,6 @@ config DMAR_FLOPPY_WA
1864config INTR_REMAP 1882config INTR_REMAP
1865 bool "Support for Interrupt Remapping (EXPERIMENTAL)" 1883 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
1866 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL 1884 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
1867 select X86_X2APIC
1868 ---help--- 1885 ---help---
1869 Supports Interrupt remapping for IO-APIC and MSI devices. 1886 Supports Interrupt remapping for IO-APIC and MSI devices.
1870 To use x2apic mode in the CPU's which support x2APIC enhancements or 1887 To use x2apic mode in the CPU's which support x2APIC enhancements or
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index a95eaf0e582a..924e156a85ab 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -456,24 +456,9 @@ config CPU_SUP_AMD
456 456
457 If unsure, say N. 457 If unsure, say N.
458 458
459config CPU_SUP_CENTAUR_32 459config CPU_SUP_CENTAUR
460 default y 460 default y
461 bool "Support Centaur processors" if PROCESSOR_SELECT 461 bool "Support Centaur processors" if PROCESSOR_SELECT
462 depends on !64BIT
463 ---help---
464 This enables detection, tunings and quirks for Centaur processors
465
466 You need this enabled if you want your kernel to run on a
467 Centaur CPU. Disabling this option on other types of CPUs
468 makes the kernel a tiny bit smaller. Disabling it on a Centaur
469 CPU might render the kernel unbootable.
470
471 If unsure, say N.
472
473config CPU_SUP_CENTAUR_64
474 default y
475 bool "Support Centaur processors" if PROCESSOR_SELECT
476 depends on 64BIT
477 ---help--- 462 ---help---
478 This enables detection, tunings and quirks for Centaur processors 463 This enables detection, tunings and quirks for Centaur processors
479 464
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index fdb45df608b6..d8359e73317f 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -72,14 +72,6 @@ config DEBUG_STACK_USAGE
72 72
73 This option will slow down process creation somewhat. 73 This option will slow down process creation somewhat.
74 74
75config DEBUG_PAGEALLOC
76 bool "Debug page memory allocations"
77 depends on DEBUG_KERNEL
78 ---help---
79 Unmap pages from the kernel linear mapping after free_pages().
80 This results in a large slowdown, but helps to find certain types
81 of memory corruptions.
82
83config DEBUG_PER_CPU_MAPS 75config DEBUG_PER_CPU_MAPS
84 bool "Debug access to per_cpu maps" 76 bool "Debug access to per_cpu maps"
85 depends on DEBUG_KERNEL 77 depends on DEBUG_KERNEL
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 1836191839ee..f05d8c91d9e5 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -153,34 +153,23 @@ endif
153 153
154boot := arch/x86/boot 154boot := arch/x86/boot
155 155
156PHONY += zImage bzImage compressed zlilo bzlilo \ 156BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage install
157 zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install 157
158PHONY += bzImage $(BOOT_TARGETS)
158 159
159# Default kernel to build 160# Default kernel to build
160all: bzImage 161all: bzImage
161 162
162# KBUILD_IMAGE specify target image being built 163# KBUILD_IMAGE specify target image being built
163 KBUILD_IMAGE := $(boot)/bzImage 164KBUILD_IMAGE := $(boot)/bzImage
164zImage zlilo zdisk: KBUILD_IMAGE := $(boot)/zImage
165 165
166zImage bzImage: vmlinux 166bzImage: vmlinux
167 $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) 167 $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
168 $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot 168 $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
169 $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ 169 $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
170 170
171compressed: zImage 171$(BOOT_TARGETS): vmlinux
172 172 $(Q)$(MAKE) $(build)=$(boot) $@
173zlilo bzlilo: vmlinux
174 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zlilo
175
176zdisk bzdisk: vmlinux
177 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk
178
179fdimage fdimage144 fdimage288 isoimage: vmlinux
180 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
181
182install:
183 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
184 173
185PHONY += vdso_install 174PHONY += vdso_install
186vdso_install: 175vdso_install:
@@ -205,7 +194,3 @@ define archhelp
205 echo ' FDARGS="..." arguments for the booted kernel' 194 echo ' FDARGS="..." arguments for the booted kernel'
206 echo ' FDINITRD=file initrd for the booted kernel' 195 echo ' FDINITRD=file initrd for the booted kernel'
207endef 196endef
208
209CLEAN_FILES += arch/x86/boot/fdimage \
210 arch/x86/boot/image.iso \
211 arch/x86/boot/mtools.conf
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index c70eff69a1fb..6633b6e7505a 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -6,26 +6,24 @@
6# for more details. 6# for more details.
7# 7#
8# Copyright (C) 1994 by Linus Torvalds 8# Copyright (C) 1994 by Linus Torvalds
9# Changed by many, many contributors over the years.
9# 10#
10 11
11# ROOT_DEV specifies the default root-device when making the image. 12# ROOT_DEV specifies the default root-device when making the image.
12# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case 13# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
13# the default of FLOPPY is used by 'build'. 14# the default of FLOPPY is used by 'build'.
14 15
15ROOT_DEV := CURRENT 16ROOT_DEV := CURRENT
16 17
17# If you want to preset the SVGA mode, uncomment the next line and 18# If you want to preset the SVGA mode, uncomment the next line and
18# set SVGA_MODE to whatever number you want. 19# set SVGA_MODE to whatever number you want.
19# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. 20# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
20# The number is the same as you would ordinarily press at bootup. 21# The number is the same as you would ordinarily press at bootup.
21 22
22SVGA_MODE := -DSVGA_MODE=NORMAL_VGA 23SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
23 24
24# If you want the RAM disk device, define this to be the size in blocks. 25targets := vmlinux.bin setup.bin setup.elf bzImage
25 26targets += fdimage fdimage144 fdimage288 image.iso mtools.conf
26#RAMDISK := -DRAMDISK=512
27
28targets := vmlinux.bin setup.bin setup.elf zImage bzImage
29subdir- := compressed 27subdir- := compressed
30 28
31setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o 29setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
@@ -59,6 +57,7 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE
59# How to compile the 16-bit code. Note we always compile for -march=i386, 57# How to compile the 16-bit code. Note we always compile for -march=i386,
60# that way we can complain to the user if the CPU is insufficient. 58# that way we can complain to the user if the CPU is insufficient.
61KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ 59KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
60 -DDISABLE_BRANCH_PROFILING \
62 -Wall -Wstrict-prototypes \ 61 -Wall -Wstrict-prototypes \
63 -march=i386 -mregparm=3 \ 62 -march=i386 -mregparm=3 \
64 -include $(srctree)/$(src)/code16gcc.h \ 63 -include $(srctree)/$(src)/code16gcc.h \
@@ -68,20 +67,16 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
68 $(call cc-option, -fno-unit-at-a-time)) \ 67 $(call cc-option, -fno-unit-at-a-time)) \
69 $(call cc-option, -fno-stack-protector) \ 68 $(call cc-option, -fno-stack-protector) \
70 $(call cc-option, -mpreferred-stack-boundary=2) 69 $(call cc-option, -mpreferred-stack-boundary=2)
71KBUILD_CFLAGS += $(call cc-option,-m32) 70KBUILD_CFLAGS += $(call cc-option, -m32)
72KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 71KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
73 72
74$(obj)/zImage: asflags-y := $(SVGA_MODE) $(RAMDISK) 73$(obj)/bzImage: asflags-y := $(SVGA_MODE)
75$(obj)/bzImage: ccflags-y := -D__BIG_KERNEL__
76$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
77$(obj)/bzImage: BUILDFLAGS := -b
78 74
79quiet_cmd_image = BUILD $@ 75quiet_cmd_image = BUILD $@
80cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \ 76cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
81 $(obj)/vmlinux.bin $(ROOT_DEV) > $@ 77 $(ROOT_DEV) > $@
82 78
83$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \ 79$(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
84 $(obj)/vmlinux.bin $(obj)/tools/build FORCE
85 $(call if_changed,image) 80 $(call if_changed,image)
86 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 81 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
87 82
@@ -116,9 +111,11 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
116$(obj)/compressed/vmlinux: FORCE 111$(obj)/compressed/vmlinux: FORCE
117 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 112 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
118 113
119# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel 114# Set this if you want to pass append arguments to the
115# bzdisk/fdimage/isoimage kernel
120FDARGS = 116FDARGS =
121# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel 117# Set this if you want an initrd included with the
118# bzdisk/fdimage/isoimage kernel
122FDINITRD = 119FDINITRD =
123 120
124image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,) 121image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,)
@@ -127,7 +124,7 @@ $(obj)/mtools.conf: $(src)/mtools.conf.in
127 sed -e 's|@OBJ@|$(obj)|g' < $< > $@ 124 sed -e 's|@OBJ@|$(obj)|g' < $< > $@
128 125
129# This requires write access to /dev/fd0 126# This requires write access to /dev/fd0
130zdisk: $(BOOTIMAGE) $(obj)/mtools.conf 127bzdisk: $(obj)/bzImage $(obj)/mtools.conf
131 MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync 128 MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync
132 syslinux /dev/fd0 ; sync 129 syslinux /dev/fd0 ; sync
133 echo '$(image_cmdline)' | \ 130 echo '$(image_cmdline)' | \
@@ -135,10 +132,10 @@ zdisk: $(BOOTIMAGE) $(obj)/mtools.conf
135 if [ -f '$(FDINITRD)' ] ; then \ 132 if [ -f '$(FDINITRD)' ] ; then \
136 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \ 133 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \
137 fi 134 fi
138 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync 135 MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage a:linux ; sync
139 136
140# These require being root or having syslinux 2.02 or higher installed 137# These require being root or having syslinux 2.02 or higher installed
141fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf 138fdimage fdimage144: $(obj)/bzImage $(obj)/mtools.conf
142 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440 139 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440
143 MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync 140 MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync
144 syslinux $(obj)/fdimage ; sync 141 syslinux $(obj)/fdimage ; sync
@@ -147,9 +144,9 @@ fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
147 if [ -f '$(FDINITRD)' ] ; then \ 144 if [ -f '$(FDINITRD)' ] ; then \
148 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \ 145 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \
149 fi 146 fi
150 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync 147 MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage v:linux ; sync
151 148
152fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf 149fdimage288: $(obj)/bzImage $(obj)/mtools.conf
153 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880 150 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880
154 MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync 151 MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync
155 syslinux $(obj)/fdimage ; sync 152 syslinux $(obj)/fdimage ; sync
@@ -158,9 +155,9 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
158 if [ -f '$(FDINITRD)' ] ; then \ 155 if [ -f '$(FDINITRD)' ] ; then \
159 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \ 156 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \
160 fi 157 fi
161 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync 158 MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage w:linux ; sync
162 159
163isoimage: $(BOOTIMAGE) 160isoimage: $(obj)/bzImage
164 -rm -rf $(obj)/isoimage 161 -rm -rf $(obj)/isoimage
165 mkdir $(obj)/isoimage 162 mkdir $(obj)/isoimage
166 for i in lib lib64 share end ; do \ 163 for i in lib lib64 share end ; do \
@@ -170,7 +167,7 @@ isoimage: $(BOOTIMAGE)
170 fi ; \ 167 fi ; \
171 if [ $$i = end ] ; then exit 1 ; fi ; \ 168 if [ $$i = end ] ; then exit 1 ; fi ; \
172 done 169 done
173 cp $(BOOTIMAGE) $(obj)/isoimage/linux 170 cp $(obj)/bzImage $(obj)/isoimage/linux
174 echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg 171 echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg
175 if [ -f '$(FDINITRD)' ] ; then \ 172 if [ -f '$(FDINITRD)' ] ; then \
176 cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \ 173 cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \
@@ -181,12 +178,13 @@ isoimage: $(BOOTIMAGE)
181 isohybrid $(obj)/image.iso 2>/dev/null || true 178 isohybrid $(obj)/image.iso 2>/dev/null || true
182 rm -rf $(obj)/isoimage 179 rm -rf $(obj)/isoimage
183 180
184zlilo: $(BOOTIMAGE) 181bzlilo: $(obj)/bzImage
185 if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi 182 if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
186 if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi 183 if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
187 cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz 184 cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz
188 cp System.map $(INSTALL_PATH)/ 185 cp System.map $(INSTALL_PATH)/
189 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 186 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
190 187
191install: 188install:
192 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" 189 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
190 System.map "$(INSTALL_PATH)"
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 3ca4c194b8e5..65551c9f8571 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -8,6 +8,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma h
8 8
9KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 9KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
10KBUILD_CFLAGS += -fno-strict-aliasing -fPIC 10KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
11KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
11cflags-$(CONFIG_X86_64) := -mcmodel=small 12cflags-$(CONFIG_X86_64) := -mcmodel=small
12KBUILD_CFLAGS += $(cflags-y) 13KBUILD_CFLAGS += $(cflags-y)
13KBUILD_CFLAGS += $(call cc-option,-ffreestanding) 14KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 7ccff4884a23..5d84d1c74e4c 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -24,12 +24,8 @@
24#include "boot.h" 24#include "boot.h"
25#include "offsets.h" 25#include "offsets.h"
26 26
27SETUPSECTS = 4 /* default nr of setup-sectors */
28BOOTSEG = 0x07C0 /* original address of boot-sector */ 27BOOTSEG = 0x07C0 /* original address of boot-sector */
29SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */ 28SYSSEG = 0x1000 /* historical load address >> 4 */
30SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
31 /* to be loaded */
32ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
33 29
34#ifndef SVGA_MODE 30#ifndef SVGA_MODE
35#define SVGA_MODE ASK_VGA 31#define SVGA_MODE ASK_VGA
@@ -97,12 +93,12 @@ bugger_off_msg:
97 .section ".header", "a" 93 .section ".header", "a"
98 .globl hdr 94 .globl hdr
99hdr: 95hdr:
100setup_sects: .byte SETUPSECTS 96setup_sects: .byte 0 /* Filled in by build.c */
101root_flags: .word ROOT_RDONLY 97root_flags: .word ROOT_RDONLY
102syssize: .long SYSSIZE 98syssize: .long 0 /* Filled in by build.c */
103ram_size: .word RAMDISK 99ram_size: .word 0 /* Obsolete */
104vid_mode: .word SVGA_MODE 100vid_mode: .word SVGA_MODE
105root_dev: .word ROOT_DEV 101root_dev: .word 0 /* Filled in by build.c */
106boot_flag: .word 0xAA55 102boot_flag: .word 0xAA55
107 103
108 # offset 512, entry point 104 # offset 512, entry point
@@ -123,14 +119,15 @@ _start:
123 # or else old loadlin-1.5 will fail) 119 # or else old loadlin-1.5 will fail)
124 .globl realmode_swtch 120 .globl realmode_swtch
125realmode_swtch: .word 0, 0 # default_switch, SETUPSEG 121realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
126start_sys_seg: .word SYSSEG 122start_sys_seg: .word SYSSEG # obsolete and meaningless, but just
123 # in case something decided to "use" it
127 .word kernel_version-512 # pointing to kernel version string 124 .word kernel_version-512 # pointing to kernel version string
128 # above section of header is compatible 125 # above section of header is compatible
129 # with loadlin-1.5 (header v1.5). Don't 126 # with loadlin-1.5 (header v1.5). Don't
130 # change it. 127 # change it.
131 128
132type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin, 129type_of_loader: .byte 0 # 0 means ancient bootloader, newer
133 # Bootlin, SYSLX, bootsect...) 130 # bootloaders know to change this.
134 # See Documentation/i386/boot.txt for 131 # See Documentation/i386/boot.txt for
135 # assigned ids 132 # assigned ids
136 133
@@ -142,11 +139,7 @@ CAN_USE_HEAP = 0x80 # If set, the loader also has set
142 # space behind setup.S can be used for 139 # space behind setup.S can be used for
143 # heap purposes. 140 # heap purposes.
144 # Only the loader knows what is free 141 # Only the loader knows what is free
145#ifndef __BIG_KERNEL__
146 .byte 0
147#else
148 .byte LOADED_HIGH 142 .byte LOADED_HIGH
149#endif
150 143
151setup_move_size: .word 0x8000 # size to move, when setup is not 144setup_move_size: .word 0x8000 # size to move, when setup is not
152 # loaded at 0x90000. We will move setup 145 # loaded at 0x90000. We will move setup
@@ -157,11 +150,7 @@ setup_move_size: .word 0x8000 # size to move, when setup is not
157 150
158code32_start: # here loaders can put a different 151code32_start: # here loaders can put a different
159 # start address for 32-bit code. 152 # start address for 32-bit code.
160#ifndef __BIG_KERNEL__
161 .long 0x1000 # 0x1000 = default for zImage
162#else
163 .long 0x100000 # 0x100000 = default for big kernel 153 .long 0x100000 # 0x100000 = default for big kernel
164#endif
165 154
166ramdisk_image: .long 0 # address of loaded ramdisk image 155ramdisk_image: .long 0 # address of loaded ramdisk image
167 # Here the loader puts the 32-bit 156 # Here the loader puts the 32-bit
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index 8c3c25f35578..5054c2ddd1a0 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -2,6 +2,7 @@
2 * 2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved 4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 * Copyright 2009 Intel Corporation; author H. Peter Anvin
5 * 6 *
6 * This file is part of the Linux kernel, and is made available under 7 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2. 8 * the terms of the GNU General Public License version 2.
@@ -16,24 +17,38 @@
16 17
17#define SMAP 0x534d4150 /* ASCII "SMAP" */ 18#define SMAP 0x534d4150 /* ASCII "SMAP" */
18 19
20struct e820_ext_entry {
21 struct e820entry std;
22 u32 ext_flags;
23} __attribute__((packed));
24
19static int detect_memory_e820(void) 25static int detect_memory_e820(void)
20{ 26{
21 int count = 0; 27 int count = 0;
22 u32 next = 0; 28 u32 next = 0;
23 u32 size, id; 29 u32 size, id, edi;
24 u8 err; 30 u8 err;
25 struct e820entry *desc = boot_params.e820_map; 31 struct e820entry *desc = boot_params.e820_map;
32 static struct e820_ext_entry buf; /* static so it is zeroed */
33
34 /*
35 * Set this here so that if the BIOS doesn't change this field
36 * but still doesn't change %ecx, we're still okay...
37 */
38 buf.ext_flags = 1;
26 39
27 do { 40 do {
28 size = sizeof(struct e820entry); 41 size = sizeof buf;
29 42
30 /* Important: %edx is clobbered by some BIOSes, 43 /* Important: %edx and %esi are clobbered by some BIOSes,
31 so it must be either used for the error output 44 so they must be either used for the error output
32 or explicitly marked clobbered. */ 45 or explicitly marked clobbered. Given that, assume there
33 asm("int $0x15; setc %0" 46 is something out there clobbering %ebp and %edi, too. */
47 asm("pushl %%ebp; int $0x15; popl %%ebp; setc %0"
34 : "=d" (err), "+b" (next), "=a" (id), "+c" (size), 48 : "=d" (err), "+b" (next), "=a" (id), "+c" (size),
35 "=m" (*desc) 49 "=D" (edi), "+m" (buf)
36 : "D" (desc), "d" (SMAP), "a" (0xe820)); 50 : "D" (&buf), "d" (SMAP), "a" (0xe820)
51 : "esi");
37 52
38 /* BIOSes which terminate the chain with CF = 1 as opposed 53 /* BIOSes which terminate the chain with CF = 1 as opposed
39 to %ebx = 0 don't always report the SMAP signature on 54 to %ebx = 0 don't always report the SMAP signature on
@@ -51,8 +66,14 @@ static int detect_memory_e820(void)
51 break; 66 break;
52 } 67 }
53 68
69 /* ACPI 3.0 added the extended flags support. If bit 0
70 in the extended flags is zero, we're supposed to simply
71 ignore the entry -- a backwards incompatible change! */
72 if (size > 20 && !(buf.ext_flags & 1))
73 continue;
74
75 *desc++ = buf.std;
54 count++; 76 count++;
55 desc++;
56 } while (next && count < ARRAY_SIZE(boot_params.e820_map)); 77 } while (next && count < ARRAY_SIZE(boot_params.e820_map));
57 78
58 return boot_params.e820_entries = count; 79 return boot_params.e820_entries = count;
diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index 85a1cd8a8ff8..8062f8915250 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -33,47 +33,6 @@ static void realmode_switch_hook(void)
33} 33}
34 34
35/* 35/*
36 * A zImage kernel is loaded at 0x10000 but wants to run at 0x1000.
37 * A bzImage kernel is loaded and runs at 0x100000.
38 */
39static void move_kernel_around(void)
40{
41 /* Note: rely on the compile-time option here rather than
42 the LOADED_HIGH flag. The Qemu kernel loader unconditionally
43 sets the loadflags to zero. */
44#ifndef __BIG_KERNEL__
45 u16 dst_seg, src_seg;
46 u32 syssize;
47
48 dst_seg = 0x1000 >> 4;
49 src_seg = 0x10000 >> 4;
50 syssize = boot_params.hdr.syssize; /* Size in 16-byte paragraphs */
51
52 while (syssize) {
53 int paras = (syssize >= 0x1000) ? 0x1000 : syssize;
54 int dwords = paras << 2;
55
56 asm volatile("pushw %%es ; "
57 "pushw %%ds ; "
58 "movw %1,%%es ; "
59 "movw %2,%%ds ; "
60 "xorw %%di,%%di ; "
61 "xorw %%si,%%si ; "
62 "rep;movsl ; "
63 "popw %%ds ; "
64 "popw %%es"
65 : "+c" (dwords)
66 : "r" (dst_seg), "r" (src_seg)
67 : "esi", "edi");
68
69 syssize -= paras;
70 dst_seg += paras;
71 src_seg += paras;
72 }
73#endif
74}
75
76/*
77 * Disable all interrupts at the legacy PIC. 36 * Disable all interrupts at the legacy PIC.
78 */ 37 */
79static void mask_all_interrupts(void) 38static void mask_all_interrupts(void)
@@ -147,9 +106,6 @@ void go_to_protected_mode(void)
147 /* Hook before leaving real mode, also disables interrupts */ 106 /* Hook before leaving real mode, also disables interrupts */
148 realmode_switch_hook(); 107 realmode_switch_hook();
149 108
150 /* Move the kernel/setup to their final resting places */
151 move_kernel_around();
152
153 /* Enable the A20 gate */ 109 /* Enable the A20 gate */
154 if (enable_a20()) { 110 if (enable_a20()) {
155 puts("A20 gate not responding, unable to boot...\n"); 111 puts("A20 gate not responding, unable to boot...\n");
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index 019c17a75851..3e0edc6d2a20 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -47,6 +47,7 @@ GLOBAL(protected_mode_jump)
47ENDPROC(protected_mode_jump) 47ENDPROC(protected_mode_jump)
48 48
49 .code32 49 .code32
50 .section ".text32","ax"
50GLOBAL(in_pm32) 51GLOBAL(in_pm32)
51 # Set up data segments for flat 32-bit mode 52 # Set up data segments for flat 32-bit mode
52 movl %ecx, %ds 53 movl %ecx, %ds
diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld
index df9234b3a5e0..bb8dc2de7969 100644
--- a/arch/x86/boot/setup.ld
+++ b/arch/x86/boot/setup.ld
@@ -17,7 +17,8 @@ SECTIONS
17 .header : { *(.header) } 17 .header : { *(.header) }
18 .inittext : { *(.inittext) } 18 .inittext : { *(.inittext) }
19 .initdata : { *(.initdata) } 19 .initdata : { *(.initdata) }
20 .text : { *(.text*) } 20 .text : { *(.text) }
21 .text32 : { *(.text32) }
21 22
22 . = ALIGN(16); 23 . = ALIGN(16);
23 .rodata : { *(.rodata*) } 24 .rodata : { *(.rodata*) }
diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c
index 44dc1923c0e3..ee3a4ea923ac 100644
--- a/arch/x86/boot/tools/build.c
+++ b/arch/x86/boot/tools/build.c
@@ -130,7 +130,7 @@ static void die(const char * str, ...)
130 130
131static void usage(void) 131static void usage(void)
132{ 132{
133 die("Usage: build [-b] setup system [rootdev] [> image]"); 133 die("Usage: build setup system [rootdev] [> image]");
134} 134}
135 135
136int main(int argc, char ** argv) 136int main(int argc, char ** argv)
@@ -145,11 +145,6 @@ int main(int argc, char ** argv)
145 void *kernel; 145 void *kernel;
146 u32 crc = 0xffffffffUL; 146 u32 crc = 0xffffffffUL;
147 147
148 if (argc > 2 && !strcmp(argv[1], "-b"))
149 {
150 is_big_kernel = 1;
151 argc--, argv++;
152 }
153 if ((argc < 3) || (argc > 4)) 148 if ((argc < 3) || (argc > 4))
154 usage(); 149 usage();
155 if (argc > 3) { 150 if (argc > 3) {
@@ -216,8 +211,6 @@ int main(int argc, char ** argv)
216 die("Unable to mmap '%s': %m", argv[2]); 211 die("Unable to mmap '%s': %m", argv[2]);
217 /* Number of 16-byte paragraphs, including space for a 4-byte CRC */ 212 /* Number of 16-byte paragraphs, including space for a 4-byte CRC */
218 sys_size = (sz + 15 + 4) / 16; 213 sys_size = (sz + 15 + 4) / 16;
219 if (!is_big_kernel && sys_size > DEF_SYSSIZE)
220 die("System is too big. Try using bzImage or modules.");
221 214
222 /* Patch the setup code with the appropriate size parameters */ 215 /* Patch the setup code with the appropriate size parameters */
223 buf[0x1f1] = setup_sectors-1; 216 buf[0x1f1] = setup_sectors-1;
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index 5d4742ed4aa2..95d86ce0421c 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -129,41 +129,45 @@ u16 vga_crtc(void)
129 return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4; 129 return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4;
130} 130}
131 131
132static void vga_set_480_scanlines(int end) 132static void vga_set_480_scanlines(int lines)
133{ 133{
134 u16 crtc; 134 u16 crtc; /* CRTC base address */
135 u8 csel; 135 u8 csel; /* CRTC miscellaneous output register */
136 u8 ovfw; /* CRTC overflow register */
137 int end = lines-1;
136 138
137 crtc = vga_crtc(); 139 crtc = vga_crtc();
138 140
141 ovfw = 0x3c | ((end >> (8-1)) & 0x02) | ((end >> (9-6)) & 0x40);
142
139 out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */ 143 out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */
140 out_idx(0x0b, crtc, 0x06); /* Vertical total */ 144 out_idx(0x0b, crtc, 0x06); /* Vertical total */
141 out_idx(0x3e, crtc, 0x07); /* Vertical overflow */ 145 out_idx(ovfw, crtc, 0x07); /* Vertical overflow */
142 out_idx(0xea, crtc, 0x10); /* Vertical sync start */ 146 out_idx(0xea, crtc, 0x10); /* Vertical sync start */
143 out_idx(end, crtc, 0x12); /* Vertical display end */ 147 out_idx(end, crtc, 0x12); /* Vertical display end */
144 out_idx(0xe7, crtc, 0x15); /* Vertical blank start */ 148 out_idx(0xe7, crtc, 0x15); /* Vertical blank start */
145 out_idx(0x04, crtc, 0x16); /* Vertical blank end */ 149 out_idx(0x04, crtc, 0x16); /* Vertical blank end */
146 csel = inb(0x3cc); 150 csel = inb(0x3cc);
147 csel &= 0x0d; 151 csel &= 0x0d;
148 csel |= 0xe2; 152 csel |= 0xe2;
149 outb(csel, 0x3cc); 153 outb(csel, 0x3c2);
150} 154}
151 155
152static void vga_set_80x30(void) 156static void vga_set_80x30(void)
153{ 157{
154 vga_set_480_scanlines(0xdf); 158 vga_set_480_scanlines(30*16);
155} 159}
156 160
157static void vga_set_80x34(void) 161static void vga_set_80x34(void)
158{ 162{
159 vga_set_14font(); 163 vga_set_14font();
160 vga_set_480_scanlines(0xdb); 164 vga_set_480_scanlines(34*14);
161} 165}
162 166
163static void vga_set_80x60(void) 167static void vga_set_80x60(void)
164{ 168{
165 vga_set_8font(); 169 vga_set_8font();
166 vga_set_480_scanlines(0xdf); 170 vga_set_480_scanlines(60*8);
167} 171}
168 172
169static int vga_set_mode(struct mode_info *mode) 173static int vga_set_mode(struct mode_info *mode)
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index db0c803170ab..a505202086e8 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -828,4 +828,6 @@ ia32_sys_call_table:
828 .quad sys_dup3 /* 330 */ 828 .quad sys_dup3 /* 330 */
829 .quad sys_pipe2 829 .quad sys_pipe2
830 .quad sys_inotify_init1 830 .quad sys_inotify_init1
831 .quad compat_sys_preadv
832 .quad compat_sys_pwritev
831ia32_syscall_end: 833ia32_syscall_end:
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 4ef949c1972e..42f2f8377422 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -75,7 +75,7 @@ static inline void default_inquire_remote_apic(int apicid)
75#define setup_secondary_clock setup_secondary_APIC_clock 75#define setup_secondary_clock setup_secondary_APIC_clock
76#endif 76#endif
77 77
78#ifdef CONFIG_X86_VSMP 78#ifdef CONFIG_X86_64
79extern int is_vsmp_box(void); 79extern int is_vsmp_box(void);
80#else 80#else
81static inline int is_vsmp_box(void) 81static inline int is_vsmp_box(void)
@@ -107,7 +107,20 @@ extern u32 native_safe_apic_wait_icr_idle(void);
107extern void native_apic_icr_write(u32 low, u32 id); 107extern void native_apic_icr_write(u32 low, u32 id);
108extern u64 native_apic_icr_read(void); 108extern u64 native_apic_icr_read(void);
109 109
110#define EIM_8BIT_APIC_ID 0
111#define EIM_32BIT_APIC_ID 1
112
110#ifdef CONFIG_X86_X2APIC 113#ifdef CONFIG_X86_X2APIC
114/*
115 * Make previous memory operations globally visible before
116 * sending the IPI through x2apic wrmsr. We need a serializing instruction or
117 * mfence for this.
118 */
119static inline void x2apic_wrmsr_fence(void)
120{
121 asm volatile("mfence" : : : "memory");
122}
123
111static inline void native_apic_msr_write(u32 reg, u32 v) 124static inline void native_apic_msr_write(u32 reg, u32 v)
112{ 125{
113 if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || 126 if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
@@ -184,6 +197,9 @@ static inline int x2apic_enabled(void)
184{ 197{
185 return 0; 198 return 0;
186} 199}
200
201#define x2apic 0
202
187#endif 203#endif
188 204
189extern int get_physical_broadcast(void); 205extern int get_physical_broadcast(void);
@@ -379,6 +395,7 @@ static inline u32 safe_apic_wait_icr_idle(void)
379 395
380static inline void ack_APIC_irq(void) 396static inline void ack_APIC_irq(void)
381{ 397{
398#ifdef CONFIG_X86_LOCAL_APIC
382 /* 399 /*
383 * ack_APIC_irq() actually gets compiled as a single instruction 400 * ack_APIC_irq() actually gets compiled as a single instruction
384 * ... yummie. 401 * ... yummie.
@@ -386,6 +403,7 @@ static inline void ack_APIC_irq(void)
386 403
387 /* Docs say use 0 for future compatibility */ 404 /* Docs say use 0 for future compatibility */
388 apic_write(APIC_EOI, 0); 405 apic_write(APIC_EOI, 0);
406#endif
389} 407}
390 408
391static inline unsigned default_get_apic_id(unsigned long x) 409static inline unsigned default_get_apic_id(unsigned long x)
@@ -474,10 +492,19 @@ static inline int default_apic_id_registered(void)
474 return physid_isset(read_apic_id(), phys_cpu_present_map); 492 return physid_isset(read_apic_id(), phys_cpu_present_map);
475} 493}
476 494
495static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
496{
497 return cpuid_apic >> index_msb;
498}
499
500extern int default_apicid_to_node(int logical_apicid);
501
502#endif
503
477static inline unsigned int 504static inline unsigned int
478default_cpu_mask_to_apicid(const struct cpumask *cpumask) 505default_cpu_mask_to_apicid(const struct cpumask *cpumask)
479{ 506{
480 return cpumask_bits(cpumask)[0]; 507 return cpumask_bits(cpumask)[0] & APIC_ALL_CPUS;
481} 508}
482 509
483static inline unsigned int 510static inline unsigned int
@@ -491,15 +518,6 @@ default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
491 return (unsigned int)(mask1 & mask2 & mask3); 518 return (unsigned int)(mask1 & mask2 & mask3);
492} 519}
493 520
494static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
495{
496 return cpuid_apic >> index_msb;
497}
498
499extern int default_apicid_to_node(int logical_apicid);
500
501#endif
502
503static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid) 521static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
504{ 522{
505 return physid_isset(apicid, bitmap); 523 return physid_isset(apicid, bitmap);
diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 63134e31e8b9..bc9514fb3b13 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -53,6 +53,7 @@
53#define APIC_ESR_SENDILL 0x00020 53#define APIC_ESR_SENDILL 0x00020
54#define APIC_ESR_RECVILL 0x00040 54#define APIC_ESR_RECVILL 0x00040
55#define APIC_ESR_ILLREGA 0x00080 55#define APIC_ESR_ILLREGA 0x00080
56#define APIC_LVTCMCI 0x2f0
56#define APIC_ICR 0x300 57#define APIC_ICR 0x300
57#define APIC_DEST_SELF 0x40000 58#define APIC_DEST_SELF 0x40000
58#define APIC_DEST_ALLINC 0x80000 59#define APIC_DEST_ALLINC 0x80000
diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
index 6526cf08b0e4..6ba23dd9fc92 100644
--- a/arch/x86/include/asm/boot.h
+++ b/arch/x86/include/asm/boot.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_X86_BOOT_H 1#ifndef _ASM_X86_BOOT_H
2#define _ASM_X86_BOOT_H 2#define _ASM_X86_BOOT_H
3 3
4/* Don't touch these, unless you really know what you're doing. */
5#define DEF_SYSSEG 0x1000
6#define DEF_SYSSIZE 0x7F00
7
8/* Internal svga startup constants */ 4/* Internal svga startup constants */
9#define NORMAL_VGA 0xffff /* 80x25 mode */ 5#define NORMAL_VGA 0xffff /* 80x25 mode */
10#define EXTENDED_VGA 0xfffe /* 80x50 mode */ 6#define EXTENDED_VGA 0xfffe /* 80x50 mode */
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
index 5b301b7ff5f4..e55dfc1ad453 100644
--- a/arch/x86/include/asm/cacheflush.h
+++ b/arch/x86/include/asm/cacheflush.h
@@ -90,6 +90,9 @@ int set_memory_4k(unsigned long addr, int numpages);
90int set_memory_array_uc(unsigned long *addr, int addrinarray); 90int set_memory_array_uc(unsigned long *addr, int addrinarray);
91int set_memory_array_wb(unsigned long *addr, int addrinarray); 91int set_memory_array_wb(unsigned long *addr, int addrinarray);
92 92
93int set_pages_array_uc(struct page **pages, int addrinarray);
94int set_pages_array_wb(struct page **pages, int addrinarray);
95
93/* 96/*
94 * For legacy compatibility with the old APIs, a few functions 97 * For legacy compatibility with the old APIs, a few functions
95 * are provided that work on a "struct page". 98 * are provided that work on a "struct page".
@@ -123,6 +126,11 @@ void clflush_cache_range(void *addr, unsigned int size);
123#ifdef CONFIG_DEBUG_RODATA 126#ifdef CONFIG_DEBUG_RODATA
124void mark_rodata_ro(void); 127void mark_rodata_ro(void);
125extern const int rodata_test_data; 128extern const int rodata_test_data;
129void set_kernel_text_rw(void);
130void set_kernel_text_ro(void);
131#else
132static inline void set_kernel_text_rw(void) { }
133static inline void set_kernel_text_ro(void) { }
126#endif 134#endif
127 135
128#ifdef CONFIG_DEBUG_RODATA_TEST 136#ifdef CONFIG_DEBUG_RODATA_TEST
diff --git a/arch/x86/include/asm/cpu_debug.h b/arch/x86/include/asm/cpu_debug.h
new file mode 100755
index 000000000000..222802029fa6
--- /dev/null
+++ b/arch/x86/include/asm/cpu_debug.h
@@ -0,0 +1,226 @@
1#ifndef _ASM_X86_CPU_DEBUG_H
2#define _ASM_X86_CPU_DEBUG_H
3
4/*
5 * CPU x86 architecture debug
6 *
7 * Copyright(C) 2009 Jaswinder Singh Rajput
8 */
9
10/* Register flags */
11enum cpu_debug_bit {
12/* Model Specific Registers (MSRs) */
13 CPU_MC_BIT, /* Machine Check */
14 CPU_MONITOR_BIT, /* Monitor */
15 CPU_TIME_BIT, /* Time */
16 CPU_PMC_BIT, /* Performance Monitor */
17 CPU_PLATFORM_BIT, /* Platform */
18 CPU_APIC_BIT, /* APIC */
19 CPU_POWERON_BIT, /* Power-on */
20 CPU_CONTROL_BIT, /* Control */
21 CPU_FEATURES_BIT, /* Features control */
22 CPU_LBRANCH_BIT, /* Last Branch */
23 CPU_BIOS_BIT, /* BIOS */
24 CPU_FREQ_BIT, /* Frequency */
25 CPU_MTTR_BIT, /* MTRR */
26 CPU_PERF_BIT, /* Performance */
27 CPU_CACHE_BIT, /* Cache */
28 CPU_SYSENTER_BIT, /* Sysenter */
29 CPU_THERM_BIT, /* Thermal */
30 CPU_MISC_BIT, /* Miscellaneous */
31 CPU_DEBUG_BIT, /* Debug */
32 CPU_PAT_BIT, /* PAT */
33 CPU_VMX_BIT, /* VMX */
34 CPU_CALL_BIT, /* System Call */
35 CPU_BASE_BIT, /* BASE Address */
36 CPU_VER_BIT, /* Version ID */
37 CPU_CONF_BIT, /* Configuration */
38 CPU_SMM_BIT, /* System mgmt mode */
39 CPU_SVM_BIT, /*Secure Virtual Machine*/
40 CPU_OSVM_BIT, /* OS-Visible Workaround*/
41/* Standard Registers */
42 CPU_TSS_BIT, /* Task Stack Segment */
43 CPU_CR_BIT, /* Control Registers */
44 CPU_DT_BIT, /* Descriptor Table */
45/* End of Registers flags */
46 CPU_REG_ALL_BIT, /* Select all Registers */
47};
48
49#define CPU_REG_ALL (~0) /* Select all Registers */
50
51#define CPU_MC (1 << CPU_MC_BIT)
52#define CPU_MONITOR (1 << CPU_MONITOR_BIT)
53#define CPU_TIME (1 << CPU_TIME_BIT)
54#define CPU_PMC (1 << CPU_PMC_BIT)
55#define CPU_PLATFORM (1 << CPU_PLATFORM_BIT)
56#define CPU_APIC (1 << CPU_APIC_BIT)
57#define CPU_POWERON (1 << CPU_POWERON_BIT)
58#define CPU_CONTROL (1 << CPU_CONTROL_BIT)
59#define CPU_FEATURES (1 << CPU_FEATURES_BIT)
60#define CPU_LBRANCH (1 << CPU_LBRANCH_BIT)
61#define CPU_BIOS (1 << CPU_BIOS_BIT)
62#define CPU_FREQ (1 << CPU_FREQ_BIT)
63#define CPU_MTRR (1 << CPU_MTTR_BIT)
64#define CPU_PERF (1 << CPU_PERF_BIT)
65#define CPU_CACHE (1 << CPU_CACHE_BIT)
66#define CPU_SYSENTER (1 << CPU_SYSENTER_BIT)
67#define CPU_THERM (1 << CPU_THERM_BIT)
68#define CPU_MISC (1 << CPU_MISC_BIT)
69#define CPU_DEBUG (1 << CPU_DEBUG_BIT)
70#define CPU_PAT (1 << CPU_PAT_BIT)
71#define CPU_VMX (1 << CPU_VMX_BIT)
72#define CPU_CALL (1 << CPU_CALL_BIT)
73#define CPU_BASE (1 << CPU_BASE_BIT)
74#define CPU_VER (1 << CPU_VER_BIT)
75#define CPU_CONF (1 << CPU_CONF_BIT)
76#define CPU_SMM (1 << CPU_SMM_BIT)
77#define CPU_SVM (1 << CPU_SVM_BIT)
78#define CPU_OSVM (1 << CPU_OSVM_BIT)
79#define CPU_TSS (1 << CPU_TSS_BIT)
80#define CPU_CR (1 << CPU_CR_BIT)
81#define CPU_DT (1 << CPU_DT_BIT)
82
83/* Register file flags */
84enum cpu_file_bit {
85 CPU_INDEX_BIT, /* index */
86 CPU_VALUE_BIT, /* value */
87};
88
89#define CPU_FILE_VALUE (1 << CPU_VALUE_BIT)
90
91/*
92 * DisplayFamily_DisplayModel Processor Families/Processor Number Series
93 * -------------------------- ------------------------------------------
94 * 05_01, 05_02, 05_04 Pentium, Pentium with MMX
95 *
96 * 06_01 Pentium Pro
97 * 06_03, 06_05 Pentium II Xeon, Pentium II
98 * 06_07, 06_08, 06_0A, 06_0B Pentium III Xeon, Pentum III
99 *
100 * 06_09, 060D Pentium M
101 *
102 * 06_0E Core Duo, Core Solo
103 *
104 * 06_0F Xeon 3000, 3200, 5100, 5300, 7300 series,
105 * Core 2 Quad, Core 2 Extreme, Core 2 Duo,
106 * Pentium dual-core
107 * 06_17 Xeon 5200, 5400 series, Core 2 Quad Q9650
108 *
109 * 06_1C Atom
110 *
111 * 0F_00, 0F_01, 0F_02 Xeon, Xeon MP, Pentium 4
112 * 0F_03, 0F_04 Xeon, Xeon MP, Pentium 4, Pentium D
113 *
114 * 0F_06 Xeon 7100, 5000 Series, Xeon MP,
115 * Pentium 4, Pentium D
116 */
117
118/* Register processors bits */
119enum cpu_processor_bit {
120 CPU_NONE,
121/* Intel */
122 CPU_INTEL_PENTIUM_BIT,
123 CPU_INTEL_P6_BIT,
124 CPU_INTEL_PENTIUM_M_BIT,
125 CPU_INTEL_CORE_BIT,
126 CPU_INTEL_CORE2_BIT,
127 CPU_INTEL_ATOM_BIT,
128 CPU_INTEL_XEON_P4_BIT,
129 CPU_INTEL_XEON_MP_BIT,
130/* AMD */
131 CPU_AMD_K6_BIT,
132 CPU_AMD_K7_BIT,
133 CPU_AMD_K8_BIT,
134 CPU_AMD_0F_BIT,
135 CPU_AMD_10_BIT,
136 CPU_AMD_11_BIT,
137};
138
139#define CPU_INTEL_PENTIUM (1 << CPU_INTEL_PENTIUM_BIT)
140#define CPU_INTEL_P6 (1 << CPU_INTEL_P6_BIT)
141#define CPU_INTEL_PENTIUM_M (1 << CPU_INTEL_PENTIUM_M_BIT)
142#define CPU_INTEL_CORE (1 << CPU_INTEL_CORE_BIT)
143#define CPU_INTEL_CORE2 (1 << CPU_INTEL_CORE2_BIT)
144#define CPU_INTEL_ATOM (1 << CPU_INTEL_ATOM_BIT)
145#define CPU_INTEL_XEON_P4 (1 << CPU_INTEL_XEON_P4_BIT)
146#define CPU_INTEL_XEON_MP (1 << CPU_INTEL_XEON_MP_BIT)
147
148#define CPU_INTEL_PX (CPU_INTEL_P6 | CPU_INTEL_PENTIUM_M)
149#define CPU_INTEL_COREX (CPU_INTEL_CORE | CPU_INTEL_CORE2)
150#define CPU_INTEL_XEON (CPU_INTEL_XEON_P4 | CPU_INTEL_XEON_MP)
151#define CPU_CO_AT (CPU_INTEL_CORE | CPU_INTEL_ATOM)
152#define CPU_C2_AT (CPU_INTEL_CORE2 | CPU_INTEL_ATOM)
153#define CPU_CX_AT (CPU_INTEL_COREX | CPU_INTEL_ATOM)
154#define CPU_CX_XE (CPU_INTEL_COREX | CPU_INTEL_XEON)
155#define CPU_P6_XE (CPU_INTEL_P6 | CPU_INTEL_XEON)
156#define CPU_PM_CO_AT (CPU_INTEL_PENTIUM_M | CPU_CO_AT)
157#define CPU_C2_AT_XE (CPU_C2_AT | CPU_INTEL_XEON)
158#define CPU_CX_AT_XE (CPU_CX_AT | CPU_INTEL_XEON)
159#define CPU_P6_CX_AT (CPU_INTEL_P6 | CPU_CX_AT)
160#define CPU_P6_CX_XE (CPU_P6_XE | CPU_INTEL_COREX)
161#define CPU_P6_CX_AT_XE (CPU_INTEL_P6 | CPU_CX_AT_XE)
162#define CPU_PM_CX_AT_XE (CPU_INTEL_PENTIUM_M | CPU_CX_AT_XE)
163#define CPU_PM_CX_AT (CPU_INTEL_PENTIUM_M | CPU_CX_AT)
164#define CPU_PM_CX_XE (CPU_INTEL_PENTIUM_M | CPU_CX_XE)
165#define CPU_PX_CX_AT (CPU_INTEL_PX | CPU_CX_AT)
166#define CPU_PX_CX_AT_XE (CPU_INTEL_PX | CPU_CX_AT_XE)
167
168/* Select all supported Intel CPUs */
169#define CPU_INTEL_ALL (CPU_INTEL_PENTIUM | CPU_PX_CX_AT_XE)
170
171#define CPU_AMD_K6 (1 << CPU_AMD_K6_BIT)
172#define CPU_AMD_K7 (1 << CPU_AMD_K7_BIT)
173#define CPU_AMD_K8 (1 << CPU_AMD_K8_BIT)
174#define CPU_AMD_0F (1 << CPU_AMD_0F_BIT)
175#define CPU_AMD_10 (1 << CPU_AMD_10_BIT)
176#define CPU_AMD_11 (1 << CPU_AMD_11_BIT)
177
178#define CPU_K10_PLUS (CPU_AMD_10 | CPU_AMD_11)
179#define CPU_K0F_PLUS (CPU_AMD_0F | CPU_K10_PLUS)
180#define CPU_K8_PLUS (CPU_AMD_K8 | CPU_K0F_PLUS)
181#define CPU_K7_PLUS (CPU_AMD_K7 | CPU_K8_PLUS)
182
183/* Select all supported AMD CPUs */
184#define CPU_AMD_ALL (CPU_AMD_K6 | CPU_K7_PLUS)
185
186/* Select all supported CPUs */
187#define CPU_ALL (CPU_INTEL_ALL | CPU_AMD_ALL)
188
189#define MAX_CPU_FILES 512
190
191struct cpu_private {
192 unsigned cpu;
193 unsigned type;
194 unsigned reg;
195 unsigned file;
196};
197
198struct cpu_debug_base {
199 char *name; /* Register name */
200 unsigned flag; /* Register flag */
201 unsigned write; /* Register write flag */
202};
203
204/*
205 * Currently it looks similar to cpu_debug_base but once we add more files
206 * cpu_file_base will go in different direction
207 */
208struct cpu_file_base {
209 char *name; /* Register file name */
210 unsigned flag; /* Register file flag */
211 unsigned write; /* Register write flag */
212};
213
214struct cpu_cpuX_base {
215 struct dentry *dentry; /* Register dentry */
216 int init; /* Register index file */
217};
218
219struct cpu_debug_range {
220 unsigned min; /* Register range min */
221 unsigned max; /* Register range max */
222 unsigned flag; /* Supported flags */
223 unsigned model; /* Supported models */
224};
225
226#endif /* _ASM_X86_CPU_DEBUG_H */
diff --git a/arch/x86/include/asm/cpumask.h b/arch/x86/include/asm/cpumask.h
index a7f3c75f8ad7..61c852fa346b 100644
--- a/arch/x86/include/asm/cpumask.h
+++ b/arch/x86/include/asm/cpumask.h
@@ -3,8 +3,6 @@
3#ifndef __ASSEMBLY__ 3#ifndef __ASSEMBLY__
4#include <linux/cpumask.h> 4#include <linux/cpumask.h>
5 5
6#ifdef CONFIG_X86_64
7
8extern cpumask_var_t cpu_callin_mask; 6extern cpumask_var_t cpu_callin_mask;
9extern cpumask_var_t cpu_callout_mask; 7extern cpumask_var_t cpu_callout_mask;
10extern cpumask_var_t cpu_initialized_mask; 8extern cpumask_var_t cpu_initialized_mask;
@@ -12,21 +10,5 @@ extern cpumask_var_t cpu_sibling_setup_mask;
12 10
13extern void setup_cpu_local_masks(void); 11extern void setup_cpu_local_masks(void);
14 12
15#else /* CONFIG_X86_32 */
16
17extern cpumask_t cpu_callin_map;
18extern cpumask_t cpu_callout_map;
19extern cpumask_t cpu_initialized;
20extern cpumask_t cpu_sibling_setup_map;
21
22#define cpu_callin_mask ((struct cpumask *)&cpu_callin_map)
23#define cpu_callout_mask ((struct cpumask *)&cpu_callout_map)
24#define cpu_initialized_mask ((struct cpumask *)&cpu_initialized)
25#define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map)
26
27static inline void setup_cpu_local_masks(void) { }
28
29#endif /* CONFIG_X86_32 */
30
31#endif /* __ASSEMBLY__ */ 13#endif /* __ASSEMBLY__ */
32#endif /* _ASM_X86_CPUMASK_H */ 14#endif /* _ASM_X86_CPUMASK_H */
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index dc27705f5443..5623c50d67b2 100644
--- a/arch/x86/include/asm/desc.h
+++ b/arch/x86/include/asm/desc.h
@@ -91,7 +91,6 @@ static inline int desc_empty(const void *ptr)
91#define store_gdt(dtr) native_store_gdt(dtr) 91#define store_gdt(dtr) native_store_gdt(dtr)
92#define store_idt(dtr) native_store_idt(dtr) 92#define store_idt(dtr) native_store_idt(dtr)
93#define store_tr(tr) (tr = native_store_tr()) 93#define store_tr(tr) (tr = native_store_tr())
94#define store_ldt(ldt) asm("sldt %0":"=m" (ldt))
95 94
96#define load_TLS(t, cpu) native_load_tls(t, cpu) 95#define load_TLS(t, cpu) native_load_tls(t, cpu)
97#define set_ldt native_set_ldt 96#define set_ldt native_set_ldt
@@ -112,6 +111,8 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
112} 111}
113#endif /* CONFIG_PARAVIRT */ 112#endif /* CONFIG_PARAVIRT */
114 113
114#define store_ldt(ldt) asm("sldt %0" : "=m"(ldt))
115
115static inline void native_write_idt_entry(gate_desc *idt, int entry, 116static inline void native_write_idt_entry(gate_desc *idt, int entry,
116 const gate_desc *gate) 117 const gate_desc *gate)
117{ 118{
diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h
index 3c034f48fdb0..4994a20acbcb 100644
--- a/arch/x86/include/asm/device.h
+++ b/arch/x86/include/asm/device.h
@@ -6,7 +6,7 @@ struct dev_archdata {
6 void *acpi_handle; 6 void *acpi_handle;
7#endif 7#endif
8#ifdef CONFIG_X86_64 8#ifdef CONFIG_X86_64
9struct dma_mapping_ops *dma_ops; 9struct dma_map_ops *dma_ops;
10#endif 10#endif
11#ifdef CONFIG_DMAR 11#ifdef CONFIG_DMAR
12 void *iommu; /* hook for IOMMU specific extension */ 12 void *iommu; /* hook for IOMMU specific extension */
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 132a134d12f2..f82fdc412c64 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -7,6 +7,8 @@
7 */ 7 */
8 8
9#include <linux/scatterlist.h> 9#include <linux/scatterlist.h>
10#include <linux/dma-debug.h>
11#include <linux/dma-attrs.h>
10#include <asm/io.h> 12#include <asm/io.h>
11#include <asm/swiotlb.h> 13#include <asm/swiotlb.h>
12#include <asm-generic/dma-coherent.h> 14#include <asm-generic/dma-coherent.h>
@@ -16,47 +18,9 @@ extern int iommu_merge;
16extern struct device x86_dma_fallback_dev; 18extern struct device x86_dma_fallback_dev;
17extern int panic_on_overflow; 19extern int panic_on_overflow;
18 20
19struct dma_mapping_ops { 21extern struct dma_map_ops *dma_ops;
20 int (*mapping_error)(struct device *dev, 22
21 dma_addr_t dma_addr); 23static inline struct dma_map_ops *get_dma_ops(struct device *dev)
22 void* (*alloc_coherent)(struct device *dev, size_t size,
23 dma_addr_t *dma_handle, gfp_t gfp);
24 void (*free_coherent)(struct device *dev, size_t size,
25 void *vaddr, dma_addr_t dma_handle);
26 dma_addr_t (*map_single)(struct device *hwdev, phys_addr_t ptr,
27 size_t size, int direction);
28 void (*unmap_single)(struct device *dev, dma_addr_t addr,
29 size_t size, int direction);
30 void (*sync_single_for_cpu)(struct device *hwdev,
31 dma_addr_t dma_handle, size_t size,
32 int direction);
33 void (*sync_single_for_device)(struct device *hwdev,
34 dma_addr_t dma_handle, size_t size,
35 int direction);
36 void (*sync_single_range_for_cpu)(struct device *hwdev,
37 dma_addr_t dma_handle, unsigned long offset,
38 size_t size, int direction);
39 void (*sync_single_range_for_device)(struct device *hwdev,
40 dma_addr_t dma_handle, unsigned long offset,
41 size_t size, int direction);
42 void (*sync_sg_for_cpu)(struct device *hwdev,
43 struct scatterlist *sg, int nelems,
44 int direction);
45 void (*sync_sg_for_device)(struct device *hwdev,
46 struct scatterlist *sg, int nelems,
47 int direction);
48 int (*map_sg)(struct device *hwdev, struct scatterlist *sg,
49 int nents, int direction);
50 void (*unmap_sg)(struct device *hwdev,
51 struct scatterlist *sg, int nents,
52 int direction);
53 int (*dma_supported)(struct device *hwdev, u64 mask);
54 int is_phys;
55};
56
57extern struct dma_mapping_ops *dma_ops;
58
59static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
60{ 24{
61#ifdef CONFIG_X86_32 25#ifdef CONFIG_X86_32
62 return dma_ops; 26 return dma_ops;
@@ -71,7 +35,7 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
71/* Make sure we keep the same behaviour */ 35/* Make sure we keep the same behaviour */
72static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 36static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
73{ 37{
74 struct dma_mapping_ops *ops = get_dma_ops(dev); 38 struct dma_map_ops *ops = get_dma_ops(dev);
75 if (ops->mapping_error) 39 if (ops->mapping_error)
76 return ops->mapping_error(dev, dma_addr); 40 return ops->mapping_error(dev, dma_addr);
77 41
@@ -90,137 +54,167 @@ extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
90 54
91static inline dma_addr_t 55static inline dma_addr_t
92dma_map_single(struct device *hwdev, void *ptr, size_t size, 56dma_map_single(struct device *hwdev, void *ptr, size_t size,
93 int direction) 57 enum dma_data_direction dir)
94{ 58{
95 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 59 struct dma_map_ops *ops = get_dma_ops(hwdev);
96 60 dma_addr_t addr;
97 BUG_ON(!valid_dma_direction(direction)); 61
98 return ops->map_single(hwdev, virt_to_phys(ptr), size, direction); 62 BUG_ON(!valid_dma_direction(dir));
63 addr = ops->map_page(hwdev, virt_to_page(ptr),
64 (unsigned long)ptr & ~PAGE_MASK, size,
65 dir, NULL);
66 debug_dma_map_page(hwdev, virt_to_page(ptr),
67 (unsigned long)ptr & ~PAGE_MASK, size,
68 dir, addr, true);
69 return addr;
99} 70}
100 71
101static inline void 72static inline void
102dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size, 73dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size,
103 int direction) 74 enum dma_data_direction dir)
104{ 75{
105 struct dma_mapping_ops *ops = get_dma_ops(dev); 76 struct dma_map_ops *ops = get_dma_ops(dev);
106 77
107 BUG_ON(!valid_dma_direction(direction)); 78 BUG_ON(!valid_dma_direction(dir));
108 if (ops->unmap_single) 79 if (ops->unmap_page)
109 ops->unmap_single(dev, addr, size, direction); 80 ops->unmap_page(dev, addr, size, dir, NULL);
81 debug_dma_unmap_page(dev, addr, size, dir, true);
110} 82}
111 83
112static inline int 84static inline int
113dma_map_sg(struct device *hwdev, struct scatterlist *sg, 85dma_map_sg(struct device *hwdev, struct scatterlist *sg,
114 int nents, int direction) 86 int nents, enum dma_data_direction dir)
115{ 87{
116 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 88 struct dma_map_ops *ops = get_dma_ops(hwdev);
89 int ents;
90
91 BUG_ON(!valid_dma_direction(dir));
92 ents = ops->map_sg(hwdev, sg, nents, dir, NULL);
93 debug_dma_map_sg(hwdev, sg, nents, ents, dir);
117 94
118 BUG_ON(!valid_dma_direction(direction)); 95 return ents;
119 return ops->map_sg(hwdev, sg, nents, direction);
120} 96}
121 97
122static inline void 98static inline void
123dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, 99dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
124 int direction) 100 enum dma_data_direction dir)
125{ 101{
126 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 102 struct dma_map_ops *ops = get_dma_ops(hwdev);
127 103
128 BUG_ON(!valid_dma_direction(direction)); 104 BUG_ON(!valid_dma_direction(dir));
105 debug_dma_unmap_sg(hwdev, sg, nents, dir);
129 if (ops->unmap_sg) 106 if (ops->unmap_sg)
130 ops->unmap_sg(hwdev, sg, nents, direction); 107 ops->unmap_sg(hwdev, sg, nents, dir, NULL);
131} 108}
132 109
133static inline void 110static inline void
134dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle, 111dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
135 size_t size, int direction) 112 size_t size, enum dma_data_direction dir)
136{ 113{
137 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 114 struct dma_map_ops *ops = get_dma_ops(hwdev);
138 115
139 BUG_ON(!valid_dma_direction(direction)); 116 BUG_ON(!valid_dma_direction(dir));
140 if (ops->sync_single_for_cpu) 117 if (ops->sync_single_for_cpu)
141 ops->sync_single_for_cpu(hwdev, dma_handle, size, direction); 118 ops->sync_single_for_cpu(hwdev, dma_handle, size, dir);
119 debug_dma_sync_single_for_cpu(hwdev, dma_handle, size, dir);
142 flush_write_buffers(); 120 flush_write_buffers();
143} 121}
144 122
145static inline void 123static inline void
146dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle, 124dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle,
147 size_t size, int direction) 125 size_t size, enum dma_data_direction dir)
148{ 126{
149 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 127 struct dma_map_ops *ops = get_dma_ops(hwdev);
150 128
151 BUG_ON(!valid_dma_direction(direction)); 129 BUG_ON(!valid_dma_direction(dir));
152 if (ops->sync_single_for_device) 130 if (ops->sync_single_for_device)
153 ops->sync_single_for_device(hwdev, dma_handle, size, direction); 131 ops->sync_single_for_device(hwdev, dma_handle, size, dir);
132 debug_dma_sync_single_for_device(hwdev, dma_handle, size, dir);
154 flush_write_buffers(); 133 flush_write_buffers();
155} 134}
156 135
157static inline void 136static inline void
158dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle, 137dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
159 unsigned long offset, size_t size, int direction) 138 unsigned long offset, size_t size,
139 enum dma_data_direction dir)
160{ 140{
161 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 141 struct dma_map_ops *ops = get_dma_ops(hwdev);
162 142
163 BUG_ON(!valid_dma_direction(direction)); 143 BUG_ON(!valid_dma_direction(dir));
164 if (ops->sync_single_range_for_cpu) 144 if (ops->sync_single_range_for_cpu)
165 ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, 145 ops->sync_single_range_for_cpu(hwdev, dma_handle, offset,
166 size, direction); 146 size, dir);
147 debug_dma_sync_single_range_for_cpu(hwdev, dma_handle,
148 offset, size, dir);
167 flush_write_buffers(); 149 flush_write_buffers();
168} 150}
169 151
170static inline void 152static inline void
171dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle, 153dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
172 unsigned long offset, size_t size, 154 unsigned long offset, size_t size,
173 int direction) 155 enum dma_data_direction dir)
174{ 156{
175 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 157 struct dma_map_ops *ops = get_dma_ops(hwdev);
176 158
177 BUG_ON(!valid_dma_direction(direction)); 159 BUG_ON(!valid_dma_direction(dir));
178 if (ops->sync_single_range_for_device) 160 if (ops->sync_single_range_for_device)
179 ops->sync_single_range_for_device(hwdev, dma_handle, 161 ops->sync_single_range_for_device(hwdev, dma_handle,
180 offset, size, direction); 162 offset, size, dir);
163 debug_dma_sync_single_range_for_device(hwdev, dma_handle,
164 offset, size, dir);
181 flush_write_buffers(); 165 flush_write_buffers();
182} 166}
183 167
184static inline void 168static inline void
185dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, 169dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
186 int nelems, int direction) 170 int nelems, enum dma_data_direction dir)
187{ 171{
188 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 172 struct dma_map_ops *ops = get_dma_ops(hwdev);
189 173
190 BUG_ON(!valid_dma_direction(direction)); 174 BUG_ON(!valid_dma_direction(dir));
191 if (ops->sync_sg_for_cpu) 175 if (ops->sync_sg_for_cpu)
192 ops->sync_sg_for_cpu(hwdev, sg, nelems, direction); 176 ops->sync_sg_for_cpu(hwdev, sg, nelems, dir);
177 debug_dma_sync_sg_for_cpu(hwdev, sg, nelems, dir);
193 flush_write_buffers(); 178 flush_write_buffers();
194} 179}
195 180
196static inline void 181static inline void
197dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, 182dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
198 int nelems, int direction) 183 int nelems, enum dma_data_direction dir)
199{ 184{
200 struct dma_mapping_ops *ops = get_dma_ops(hwdev); 185 struct dma_map_ops *ops = get_dma_ops(hwdev);
201 186
202 BUG_ON(!valid_dma_direction(direction)); 187 BUG_ON(!valid_dma_direction(dir));
203 if (ops->sync_sg_for_device) 188 if (ops->sync_sg_for_device)
204 ops->sync_sg_for_device(hwdev, sg, nelems, direction); 189 ops->sync_sg_for_device(hwdev, sg, nelems, dir);
190 debug_dma_sync_sg_for_device(hwdev, sg, nelems, dir);
205 191
206 flush_write_buffers(); 192 flush_write_buffers();
207} 193}
208 194
209static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, 195static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
210 size_t offset, size_t size, 196 size_t offset, size_t size,
211 int direction) 197 enum dma_data_direction dir)
212{ 198{
213 struct dma_mapping_ops *ops = get_dma_ops(dev); 199 struct dma_map_ops *ops = get_dma_ops(dev);
200 dma_addr_t addr;
214 201
215 BUG_ON(!valid_dma_direction(direction)); 202 BUG_ON(!valid_dma_direction(dir));
216 return ops->map_single(dev, page_to_phys(page) + offset, 203 addr = ops->map_page(dev, page, offset, size, dir, NULL);
217 size, direction); 204 debug_dma_map_page(dev, page, offset, size, dir, addr, false);
205
206 return addr;
218} 207}
219 208
220static inline void dma_unmap_page(struct device *dev, dma_addr_t addr, 209static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
221 size_t size, int direction) 210 size_t size, enum dma_data_direction dir)
222{ 211{
223 dma_unmap_single(dev, addr, size, direction); 212 struct dma_map_ops *ops = get_dma_ops(dev);
213
214 BUG_ON(!valid_dma_direction(dir));
215 if (ops->unmap_page)
216 ops->unmap_page(dev, addr, size, dir, NULL);
217 debug_dma_unmap_page(dev, addr, size, dir, false);
224} 218}
225 219
226static inline void 220static inline void
@@ -244,7 +238,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
244 238
245 dma_mask = dev->coherent_dma_mask; 239 dma_mask = dev->coherent_dma_mask;
246 if (!dma_mask) 240 if (!dma_mask)
247 dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK; 241 dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
248 242
249 return dma_mask; 243 return dma_mask;
250} 244}
@@ -253,10 +247,10 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
253{ 247{
254 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp); 248 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
255 249
256 if (dma_mask <= DMA_24BIT_MASK) 250 if (dma_mask <= DMA_BIT_MASK(24))
257 gfp |= GFP_DMA; 251 gfp |= GFP_DMA;
258#ifdef CONFIG_X86_64 252#ifdef CONFIG_X86_64
259 if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) 253 if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
260 gfp |= GFP_DMA32; 254 gfp |= GFP_DMA32;
261#endif 255#endif
262 return gfp; 256 return gfp;
@@ -266,7 +260,7 @@ static inline void *
266dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 260dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
267 gfp_t gfp) 261 gfp_t gfp)
268{ 262{
269 struct dma_mapping_ops *ops = get_dma_ops(dev); 263 struct dma_map_ops *ops = get_dma_ops(dev);
270 void *memory; 264 void *memory;
271 265
272 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); 266 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
@@ -285,20 +279,24 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
285 if (!ops->alloc_coherent) 279 if (!ops->alloc_coherent)
286 return NULL; 280 return NULL;
287 281
288 return ops->alloc_coherent(dev, size, dma_handle, 282 memory = ops->alloc_coherent(dev, size, dma_handle,
289 dma_alloc_coherent_gfp_flags(dev, gfp)); 283 dma_alloc_coherent_gfp_flags(dev, gfp));
284 debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
285
286 return memory;
290} 287}
291 288
292static inline void dma_free_coherent(struct device *dev, size_t size, 289static inline void dma_free_coherent(struct device *dev, size_t size,
293 void *vaddr, dma_addr_t bus) 290 void *vaddr, dma_addr_t bus)
294{ 291{
295 struct dma_mapping_ops *ops = get_dma_ops(dev); 292 struct dma_map_ops *ops = get_dma_ops(dev);
296 293
297 WARN_ON(irqs_disabled()); /* for portability */ 294 WARN_ON(irqs_disabled()); /* for portability */
298 295
299 if (dma_release_from_coherent(dev, get_order(size), vaddr)) 296 if (dma_release_from_coherent(dev, get_order(size), vaddr))
300 return; 297 return;
301 298
299 debug_dma_free_coherent(dev, size, vaddr, bus);
302 if (ops->free_coherent) 300 if (ops->free_coherent)
303 ops->free_coherent(dev, size, vaddr, bus); 301 ops->free_coherent(dev, size, vaddr, bus);
304} 302}
diff --git a/arch/x86/include/asm/dmi.h b/arch/x86/include/asm/dmi.h
index bc68212c6bc0..fd8f9e2ca35f 100644
--- a/arch/x86/include/asm/dmi.h
+++ b/arch/x86/include/asm/dmi.h
@@ -1,22 +1,15 @@
1#ifndef _ASM_X86_DMI_H 1#ifndef _ASM_X86_DMI_H
2#define _ASM_X86_DMI_H 2#define _ASM_X86_DMI_H
3 3
4#include <asm/io.h> 4#include <linux/compiler.h>
5 5#include <linux/init.h>
6#define DMI_MAX_DATA 2048
7 6
8extern int dmi_alloc_index; 7#include <asm/io.h>
9extern char dmi_alloc_data[DMI_MAX_DATA]; 8#include <asm/setup.h>
10 9
11/* This is so early that there is no good way to allocate dynamic memory. 10static __always_inline __init void *dmi_alloc(unsigned len)
12 Allocate data in an BSS array. */
13static inline void *dmi_alloc(unsigned len)
14{ 11{
15 int idx = dmi_alloc_index; 12 return extend_brk(len, sizeof(int));
16 if ((dmi_alloc_index + len) > DMI_MAX_DATA)
17 return NULL;
18 dmi_alloc_index += len;
19 return dmi_alloc_data + idx;
20} 13}
21 14
22/* Use early IO mappings for DMI because it's initialized early */ 15/* Use early IO mappings for DMI because it's initialized early */
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
index 00d41ce4c844..7ecba4d85089 100644
--- a/arch/x86/include/asm/e820.h
+++ b/arch/x86/include/asm/e820.h
@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type);
72extern void e820_add_region(u64 start, u64 size, int type); 72extern void e820_add_region(u64 start, u64 size, int type);
73extern void e820_print_map(char *who); 73extern void e820_print_map(char *who);
74extern int 74extern int
75sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); 75sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
76extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, 76extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
77 unsigned new_type); 77 unsigned new_type);
78extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, 78extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
diff --git a/arch/x86/include/asm/entry_arch.h b/arch/x86/include/asm/entry_arch.h
index 854d538ae857..c2e6bedaf258 100644
--- a/arch/x86/include/asm/entry_arch.h
+++ b/arch/x86/include/asm/entry_arch.h
@@ -33,6 +33,8 @@ BUILD_INTERRUPT3(invalidate_interrupt7,INVALIDATE_TLB_VECTOR_START+7,
33 smp_invalidate_interrupt) 33 smp_invalidate_interrupt)
34#endif 34#endif
35 35
36BUILD_INTERRUPT(generic_interrupt, GENERIC_INTERRUPT_VECTOR)
37
36/* 38/*
37 * every pentium local APIC has two 'local interrupts', with a 39 * every pentium local APIC has two 'local interrupts', with a
38 * soft-definable vector attached to both interrupts, one of 40 * soft-definable vector attached to both interrupts, one of
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index 63a79c77d220..81937a5dc77c 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -111,6 +111,8 @@ enum fixed_addresses {
111#ifdef CONFIG_PARAVIRT 111#ifdef CONFIG_PARAVIRT
112 FIX_PARAVIRT_BOOTMAP, 112 FIX_PARAVIRT_BOOTMAP,
113#endif 113#endif
114 FIX_TEXT_POKE0, /* reserve 2 pages for text_poke() */
115 FIX_TEXT_POKE1,
114 __end_of_permanent_fixed_addresses, 116 __end_of_permanent_fixed_addresses,
115#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 117#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
116 FIX_OHCI1394_BASE, 118 FIX_OHCI1394_BASE,
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
index b55b4a7fbefd..bd2c6511c887 100644
--- a/arch/x86/include/asm/ftrace.h
+++ b/arch/x86/include/asm/ftrace.h
@@ -28,6 +28,13 @@
28 28
29#endif 29#endif
30 30
31/* FIXME: I don't want to stay hardcoded */
32#ifdef CONFIG_X86_64
33# define FTRACE_SYSCALL_MAX 296
34#else
35# define FTRACE_SYSCALL_MAX 333
36#endif
37
31#ifdef CONFIG_FUNCTION_TRACER 38#ifdef CONFIG_FUNCTION_TRACER
32#define MCOUNT_ADDR ((long)(mcount)) 39#define MCOUNT_ADDR ((long)(mcount))
33#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ 40#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
@@ -55,29 +62,4 @@ struct dyn_arch_ftrace {
55#endif /* __ASSEMBLY__ */ 62#endif /* __ASSEMBLY__ */
56#endif /* CONFIG_FUNCTION_TRACER */ 63#endif /* CONFIG_FUNCTION_TRACER */
57 64
58#ifdef CONFIG_FUNCTION_GRAPH_TRACER
59
60#ifndef __ASSEMBLY__
61
62/*
63 * Stack of return addresses for functions
64 * of a thread.
65 * Used in struct thread_info
66 */
67struct ftrace_ret_stack {
68 unsigned long ret;
69 unsigned long func;
70 unsigned long long calltime;
71};
72
73/*
74 * Primary handler of a function return.
75 * It relays on ftrace_return_to_handler.
76 * Defined in entry_32/64.S
77 */
78extern void return_to_handler(void);
79
80#endif /* __ASSEMBLY__ */
81#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
82
83#endif /* _ASM_X86_FTRACE_H */ 65#endif /* _ASM_X86_FTRACE_H */
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h
index 176f058e7159..039db6aa8e02 100644
--- a/arch/x86/include/asm/hardirq.h
+++ b/arch/x86/include/asm/hardirq.h
@@ -12,6 +12,7 @@ typedef struct {
12 unsigned int apic_timer_irqs; /* arch dependent */ 12 unsigned int apic_timer_irqs; /* arch dependent */
13 unsigned int irq_spurious_count; 13 unsigned int irq_spurious_count;
14#endif 14#endif
15 unsigned int generic_irqs; /* arch dependent */
15#ifdef CONFIG_SMP 16#ifdef CONFIG_SMP
16 unsigned int irq_resched_count; 17 unsigned int irq_resched_count;
17 unsigned int irq_call_count; 18 unsigned int irq_call_count;
diff --git a/arch/x86/include/asm/highmem.h b/arch/x86/include/asm/highmem.h
index bf9276bea660..014c2b85ae45 100644
--- a/arch/x86/include/asm/highmem.h
+++ b/arch/x86/include/asm/highmem.h
@@ -63,6 +63,7 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot);
63void *kmap_atomic(struct page *page, enum km_type type); 63void *kmap_atomic(struct page *page, enum km_type type);
64void kunmap_atomic(void *kvaddr, enum km_type type); 64void kunmap_atomic(void *kvaddr, enum km_type type);
65void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); 65void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
66void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot);
66struct page *kmap_atomic_to_page(void *ptr); 67struct page *kmap_atomic_to_page(void *ptr);
67 68
68#ifndef CONFIG_PARAVIRT 69#ifndef CONFIG_PARAVIRT
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 370e1c83bb49..b762ea49bd70 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -27,6 +27,7 @@
27 27
28/* Interrupt handlers registered during init_IRQ */ 28/* Interrupt handlers registered during init_IRQ */
29extern void apic_timer_interrupt(void); 29extern void apic_timer_interrupt(void);
30extern void generic_interrupt(void);
30extern void error_interrupt(void); 31extern void error_interrupt(void);
31extern void spurious_interrupt(void); 32extern void spurious_interrupt(void);
32extern void thermal_interrupt(void); 33extern void thermal_interrupt(void);
diff --git a/arch/x86/include/asm/init.h b/arch/x86/include/asm/init.h
new file mode 100644
index 000000000000..36fb1a6a5109
--- /dev/null
+++ b/arch/x86/include/asm/init.h
@@ -0,0 +1,18 @@
1#ifndef _ASM_X86_INIT_32_H
2#define _ASM_X86_INIT_32_H
3
4#ifdef CONFIG_X86_32
5extern void __init early_ioremap_page_table_range_init(void);
6#endif
7
8extern unsigned long __init
9kernel_physical_mapping_init(unsigned long start,
10 unsigned long end,
11 unsigned long page_size_mask);
12
13
14extern unsigned long __initdata e820_table_start;
15extern unsigned long __meminitdata e820_table_end;
16extern unsigned long __meminitdata e820_table_top;
17
18#endif /* _ASM_X86_INIT_32_H */
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 59cb4a1317b7..9d826e436010 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -162,9 +162,13 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq);
162extern void ioapic_init_mappings(void); 162extern void ioapic_init_mappings(void);
163 163
164#ifdef CONFIG_X86_64 164#ifdef CONFIG_X86_64
165extern int save_mask_IO_APIC_setup(void); 165extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
166extern void restore_IO_APIC_setup(void); 166extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
167extern void reinit_intr_remapped_IO_APIC(int); 167extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
168extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
169extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
170extern void reinit_intr_remapped_IO_APIC(int intr_remapping,
171 struct IO_APIC_route_entry **ioapic_entries);
168#endif 172#endif
169 173
170extern void probe_nr_irqs_gsi(void); 174extern void probe_nr_irqs_gsi(void);
@@ -172,7 +176,7 @@ extern void probe_nr_irqs_gsi(void);
172extern int setup_ioapic_entry(int apic, int irq, 176extern int setup_ioapic_entry(int apic, int irq,
173 struct IO_APIC_route_entry *entry, 177 struct IO_APIC_route_entry *entry,
174 unsigned int destination, int trigger, 178 unsigned int destination, int trigger,
175 int polarity, int vector); 179 int polarity, int vector, int pin);
176extern void ioapic_write_entry(int apic, int pin, 180extern void ioapic_write_entry(int apic, int pin,
177 struct IO_APIC_route_entry e); 181 struct IO_APIC_route_entry e);
178#else /* !CONFIG_X86_IO_APIC */ 182#else /* !CONFIG_X86_IO_APIC */
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h
index a6ee9e6f530f..af326a2975b5 100644
--- a/arch/x86/include/asm/iommu.h
+++ b/arch/x86/include/asm/iommu.h
@@ -3,7 +3,7 @@
3 3
4extern void pci_iommu_shutdown(void); 4extern void pci_iommu_shutdown(void);
5extern void no_iommu_init(void); 5extern void no_iommu_init(void);
6extern struct dma_mapping_ops nommu_dma_ops; 6extern struct dma_map_ops nommu_dma_ops;
7extern int force_iommu, no_iommu; 7extern int force_iommu, no_iommu;
8extern int iommu_detected; 8extern int iommu_detected;
9 9
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 107eb2196691..f38481bcd455 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -36,6 +36,7 @@ static inline int irq_canonicalize(int irq)
36extern void fixup_irqs(void); 36extern void fixup_irqs(void);
37#endif 37#endif
38 38
39extern void (*generic_interrupt_extension)(void);
39extern void init_IRQ(void); 40extern void init_IRQ(void);
40extern void native_init_IRQ(void); 41extern void native_init_IRQ(void);
41extern bool handle_irq(unsigned irq, struct pt_regs *regs); 42extern bool handle_irq(unsigned irq, struct pt_regs *regs);
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 20e1fd588dbf..0396760fccb8 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_X86_IRQ_REMAPPING_H 1#ifndef _ASM_X86_IRQ_REMAPPING_H
2#define _ASM_X86_IRQ_REMAPPING_H 2#define _ASM_X86_IRQ_REMAPPING_H
3 3
4extern int x2apic;
5
6#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8) 4#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
7 5
8#endif /* _ASM_X86_IRQ_REMAPPING_H */ 6#endif /* _ASM_X86_IRQ_REMAPPING_H */
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 8a285f356f8a..3cbd79bbb47c 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -112,6 +112,11 @@
112#define LOCAL_PERF_VECTOR 0xee 112#define LOCAL_PERF_VECTOR 0xee
113 113
114/* 114/*
115 * Generic system vector for platform specific use
116 */
117#define GENERIC_INTERRUPT_VECTOR 0xed
118
119/*
115 * First APIC vector available to drivers: (vectors 0x30-0xee) we 120 * First APIC vector available to drivers: (vectors 0x30-0xee) we
116 * start at 0x31(0x41) to spread out vectors evenly between priority 121 * start at 0x31(0x41) to spread out vectors evenly between priority
117 * levels. (0x80 is the syscall vector) 122 * levels. (0x80 is the syscall vector)
diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index 0ceb6d19ed30..317ff1703d0b 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -9,13 +9,13 @@
9# define PAGES_NR 4 9# define PAGES_NR 4
10#else 10#else
11# define PA_CONTROL_PAGE 0 11# define PA_CONTROL_PAGE 0
12# define PA_TABLE_PAGE 1 12# define VA_CONTROL_PAGE 1
13# define PAGES_NR 2 13# define PA_TABLE_PAGE 2
14# define PA_SWAP_PAGE 3
15# define PAGES_NR 4
14#endif 16#endif
15 17
16#ifdef CONFIG_X86_32
17# define KEXEC_CONTROL_CODE_MAX_SIZE 2048 18# define KEXEC_CONTROL_CODE_MAX_SIZE 2048
18#endif
19 19
20#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
21 21
@@ -136,10 +136,11 @@ relocate_kernel(unsigned long indirection_page,
136 unsigned int has_pae, 136 unsigned int has_pae,
137 unsigned int preserve_context); 137 unsigned int preserve_context);
138#else 138#else
139NORET_TYPE void 139unsigned long
140relocate_kernel(unsigned long indirection_page, 140relocate_kernel(unsigned long indirection_page,
141 unsigned long page_list, 141 unsigned long page_list,
142 unsigned long start_address) ATTRIB_NORET; 142 unsigned long start_address,
143 unsigned int preserve_context);
143#endif 144#endif
144 145
145#define ARCH_HAS_KIMAGE_ARCH 146#define ARCH_HAS_KIMAGE_ARCH
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h
index 43894428c3c2..0f4ee7148afe 100644
--- a/arch/x86/include/asm/lguest_hcall.h
+++ b/arch/x86/include/asm/lguest_hcall.h
@@ -26,36 +26,20 @@
26 26
27#ifndef __ASSEMBLY__ 27#ifndef __ASSEMBLY__
28#include <asm/hw_irq.h> 28#include <asm/hw_irq.h>
29#include <asm/kvm_para.h>
29 30
30/*G:031 But first, how does our Guest contact the Host to ask for privileged 31/*G:031 But first, how does our Guest contact the Host to ask for privileged
31 * operations? There are two ways: the direct way is to make a "hypercall", 32 * operations? There are two ways: the direct way is to make a "hypercall",
32 * to make requests of the Host Itself. 33 * to make requests of the Host Itself.
33 * 34 *
34 * Our hypercall mechanism uses the highest unused trap code (traps 32 and 35 * We use the KVM hypercall mechanism. Eighteen hypercalls are
35 * above are used by real hardware interrupts). Fifteen hypercalls are
36 * available: the hypercall number is put in the %eax register, and the 36 * available: the hypercall number is put in the %eax register, and the
37 * arguments (when required) are placed in %edx, %ebx and %ecx. If a return 37 * arguments (when required) are placed in %ebx, %ecx and %edx. If a return
38 * value makes sense, it's returned in %eax. 38 * value makes sense, it's returned in %eax.
39 * 39 *
40 * Grossly invalid calls result in Sudden Death at the hands of the vengeful 40 * Grossly invalid calls result in Sudden Death at the hands of the vengeful
41 * Host, rather than returning failure. This reflects Winston Churchill's 41 * Host, rather than returning failure. This reflects Winston Churchill's
42 * definition of a gentleman: "someone who is only rude intentionally". */ 42 * definition of a gentleman: "someone who is only rude intentionally". */
43static inline unsigned long
44hcall(unsigned long call,
45 unsigned long arg1, unsigned long arg2, unsigned long arg3)
46{
47 /* "int" is the Intel instruction to trigger a trap. */
48 asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY)
49 /* The call in %eax (aka "a") might be overwritten */
50 : "=a"(call)
51 /* The arguments are in %eax, %edx, %ebx & %ecx */
52 : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3)
53 /* "memory" means this might write somewhere in memory.
54 * This isn't true for all calls, but it's safe to tell
55 * gcc that it might happen so it doesn't get clever. */
56 : "memory");
57 return call;
58}
59/*:*/ 43/*:*/
60 44
61/* Can't use our min() macro here: needs to be a constant */ 45/* Can't use our min() macro here: needs to be a constant */
@@ -64,7 +48,7 @@ hcall(unsigned long call,
64#define LHCALL_RING_SIZE 64 48#define LHCALL_RING_SIZE 64
65struct hcall_args { 49struct hcall_args {
66 /* These map directly onto eax, ebx, ecx, edx in struct lguest_regs */ 50 /* These map directly onto eax, ebx, ecx, edx in struct lguest_regs */
67 unsigned long arg0, arg2, arg3, arg1; 51 unsigned long arg0, arg1, arg2, arg3;
68}; 52};
69 53
70#endif /* !__ASSEMBLY__ */ 54#endif /* !__ASSEMBLY__ */
diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h
index 9320e2a8a26a..12d55e773eb6 100644
--- a/arch/x86/include/asm/linkage.h
+++ b/arch/x86/include/asm/linkage.h
@@ -1,14 +1,11 @@
1#ifndef _ASM_X86_LINKAGE_H 1#ifndef _ASM_X86_LINKAGE_H
2#define _ASM_X86_LINKAGE_H 2#define _ASM_X86_LINKAGE_H
3 3
4#include <linux/stringify.h>
5
4#undef notrace 6#undef notrace
5#define notrace __attribute__((no_instrument_function)) 7#define notrace __attribute__((no_instrument_function))
6 8
7#ifdef CONFIG_X86_64
8#define __ALIGN .p2align 4,,15
9#define __ALIGN_STR ".p2align 4,,15"
10#endif
11
12#ifdef CONFIG_X86_32 9#ifdef CONFIG_X86_32
13#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) 10#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
14/* 11/*
@@ -50,16 +47,20 @@
50 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \ 47 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \
51 "g" (arg4), "g" (arg5), "g" (arg6)) 48 "g" (arg4), "g" (arg5), "g" (arg6))
52 49
53#endif 50#endif /* CONFIG_X86_32 */
51
52#ifdef __ASSEMBLY__
54 53
55#define GLOBAL(name) \ 54#define GLOBAL(name) \
56 .globl name; \ 55 .globl name; \
57 name: 56 name:
58 57
59#ifdef CONFIG_X86_ALIGNMENT_16 58#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
60#define __ALIGN .align 16,0x90 59#define __ALIGN .p2align 4, 0x90
61#define __ALIGN_STR ".align 16,0x90" 60#define __ALIGN_STR __stringify(__ALIGN)
62#endif 61#endif
63 62
63#endif /* __ASSEMBLY__ */
64
64#endif /* _ASM_X86_LINKAGE_H */ 65#endif /* _ASM_X86_LINKAGE_H */
65 66
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 32c6e17b960b..563933e06a35 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -11,6 +11,8 @@
11 */ 11 */
12 12
13#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */ 13#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */
14#define MCG_EXT_P (1ULL<<9) /* Extended registers available */
15#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */
14 16
15#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */ 17#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */
16#define MCG_STATUS_EIPV (1UL<<1) /* ip points to correct instruction */ 18#define MCG_STATUS_EIPV (1UL<<1) /* ip points to correct instruction */
@@ -90,14 +92,29 @@ extern int mce_disabled;
90 92
91#include <asm/atomic.h> 93#include <asm/atomic.h>
92 94
95void mce_setup(struct mce *m);
93void mce_log(struct mce *m); 96void mce_log(struct mce *m);
94DECLARE_PER_CPU(struct sys_device, device_mce); 97DECLARE_PER_CPU(struct sys_device, device_mce);
95extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); 98extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
96 99
100/*
101 * To support more than 128 would need to escape the predefined
102 * Linux defined extended banks first.
103 */
104#define MAX_NR_BANKS (MCE_EXTENDED_BANK - 1)
105
97#ifdef CONFIG_X86_MCE_INTEL 106#ifdef CONFIG_X86_MCE_INTEL
98void mce_intel_feature_init(struct cpuinfo_x86 *c); 107void mce_intel_feature_init(struct cpuinfo_x86 *c);
108void cmci_clear(void);
109void cmci_reenable(void);
110void cmci_rediscover(int dying);
111void cmci_recheck(void);
99#else 112#else
100static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { } 113static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { }
114static inline void cmci_clear(void) {}
115static inline void cmci_reenable(void) {}
116static inline void cmci_rediscover(int dying) {}
117static inline void cmci_recheck(void) {}
101#endif 118#endif
102 119
103#ifdef CONFIG_X86_MCE_AMD 120#ifdef CONFIG_X86_MCE_AMD
@@ -106,11 +123,23 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c);
106static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { } 123static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
107#endif 124#endif
108 125
109void mce_log_therm_throt_event(unsigned int cpu, __u64 status); 126extern int mce_available(struct cpuinfo_x86 *c);
127
128void mce_log_therm_throt_event(__u64 status);
110 129
111extern atomic_t mce_entry; 130extern atomic_t mce_entry;
112 131
113extern void do_machine_check(struct pt_regs *, long); 132extern void do_machine_check(struct pt_regs *, long);
133
134typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS);
135DECLARE_PER_CPU(mce_banks_t, mce_poll_banks);
136
137enum mcp_flags {
138 MCP_TIMESTAMP = (1 << 0), /* log time stamp */
139 MCP_UC = (1 << 1), /* log uncorrected errors */
140};
141extern void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
142
114extern int mce_notify_user(void); 143extern int mce_notify_user(void);
115 144
116#endif /* !CONFIG_X86_32 */ 145#endif /* !CONFIG_X86_32 */
@@ -120,8 +149,8 @@ extern void mcheck_init(struct cpuinfo_x86 *c);
120#else 149#else
121#define mcheck_init(c) do { } while (0) 150#define mcheck_init(c) do { } while (0)
122#endif 151#endif
123extern void stop_mce(void); 152
124extern void restart_mce(void); 153extern void (*mce_threshold_vector)(void);
125 154
126#endif /* __KERNEL__ */ 155#endif /* __KERNEL__ */
127#endif /* _ASM_X86_MCE_H */ 156#endif /* _ASM_X86_MCE_H */
diff --git a/arch/x86/include/asm/msidef.h b/arch/x86/include/asm/msidef.h
index 6706b3006f13..4cc48af23fef 100644
--- a/arch/x86/include/asm/msidef.h
+++ b/arch/x86/include/asm/msidef.h
@@ -47,6 +47,7 @@
47#define MSI_ADDR_DEST_ID_MASK 0x00ffff0 47#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
48#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ 48#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
49 MSI_ADDR_DEST_ID_MASK) 49 MSI_ADDR_DEST_ID_MASK)
50#define MSI_ADDR_EXT_DEST_ID(dest) ((dest) & 0xffffff00)
50 51
51#define MSI_ADDR_IR_EXT_INT (1 << 4) 52#define MSI_ADDR_IR_EXT_INT (1 << 4)
52#define MSI_ADDR_IR_SHV (1 << 3) 53#define MSI_ADDR_IR_SHV (1 << 3)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index f4e505f286bc..ec41fc16c167 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -81,6 +81,11 @@
81#define MSR_IA32_MC0_ADDR 0x00000402 81#define MSR_IA32_MC0_ADDR 0x00000402
82#define MSR_IA32_MC0_MISC 0x00000403 82#define MSR_IA32_MC0_MISC 0x00000403
83 83
84/* These are consecutive and not in the normal 4er MCE bank block */
85#define MSR_IA32_MC0_CTL2 0x00000280
86#define CMCI_EN (1ULL << 30)
87#define CMCI_THRESHOLD_MASK 0xffffULL
88
84#define MSR_P6_PERFCTR0 0x000000c1 89#define MSR_P6_PERFCTR0 0x000000c1
85#define MSR_P6_PERFCTR1 0x000000c2 90#define MSR_P6_PERFCTR1 0x000000c2
86#define MSR_P6_EVNTSEL0 0x00000186 91#define MSR_P6_EVNTSEL0 0x00000186
diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h
index f1e4a79a6e41..0f915ae649a7 100644
--- a/arch/x86/include/asm/page_32_types.h
+++ b/arch/x86/include/asm/page_32_types.h
@@ -39,6 +39,11 @@
39#define __VIRTUAL_MASK_SHIFT 32 39#define __VIRTUAL_MASK_SHIFT 32
40#endif /* CONFIG_X86_PAE */ 40#endif /* CONFIG_X86_PAE */
41 41
42/*
43 * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
44 */
45#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
46
42#ifndef __ASSEMBLY__ 47#ifndef __ASSEMBLY__
43 48
44/* 49/*
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h
index 2d625da6603c..826ad37006ab 100644
--- a/arch/x86/include/asm/page_types.h
+++ b/arch/x86/include/asm/page_types.h
@@ -40,14 +40,8 @@
40 40
41#ifndef __ASSEMBLY__ 41#ifndef __ASSEMBLY__
42 42
43struct pgprot;
44
45extern int page_is_ram(unsigned long pagenr); 43extern int page_is_ram(unsigned long pagenr);
46extern int devmem_is_allowed(unsigned long pagenr); 44extern int devmem_is_allowed(unsigned long pagenr);
47extern void map_devmem(unsigned long pfn, unsigned long size,
48 struct pgprot vma_prot);
49extern void unmap_devmem(unsigned long pfn, unsigned long size,
50 struct pgprot vma_prot);
51 45
52extern unsigned long max_low_pfn_mapped; 46extern unsigned long max_low_pfn_mapped;
53extern unsigned long max_pfn_mapped; 47extern unsigned long max_pfn_mapped;
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index dfdee0ca57d3..bc384be6aa44 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -319,8 +319,6 @@ struct pv_mmu_ops {
319#if PAGETABLE_LEVELS >= 3 319#if PAGETABLE_LEVELS >= 3
320#ifdef CONFIG_X86_PAE 320#ifdef CONFIG_X86_PAE
321 void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); 321 void (*set_pte_atomic)(pte_t *ptep, pte_t pteval);
322 void (*set_pte_present)(struct mm_struct *mm, unsigned long addr,
323 pte_t *ptep, pte_t pte);
324 void (*pte_clear)(struct mm_struct *mm, unsigned long addr, 322 void (*pte_clear)(struct mm_struct *mm, unsigned long addr,
325 pte_t *ptep); 323 pte_t *ptep);
326 void (*pmd_clear)(pmd_t *pmdp); 324 void (*pmd_clear)(pmd_t *pmdp);
@@ -391,7 +389,7 @@ extern struct pv_lock_ops pv_lock_ops;
391 389
392#define paravirt_type(op) \ 390#define paravirt_type(op) \
393 [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ 391 [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \
394 [paravirt_opptr] "m" (op) 392 [paravirt_opptr] "i" (&(op))
395#define paravirt_clobber(clobber) \ 393#define paravirt_clobber(clobber) \
396 [paravirt_clobber] "i" (clobber) 394 [paravirt_clobber] "i" (clobber)
397 395
@@ -445,7 +443,7 @@ int paravirt_disable_iospace(void);
445 * offset into the paravirt_patch_template structure, and can therefore be 443 * offset into the paravirt_patch_template structure, and can therefore be
446 * freely converted back into a structure offset. 444 * freely converted back into a structure offset.
447 */ 445 */
448#define PARAVIRT_CALL "call *%[paravirt_opptr];" 446#define PARAVIRT_CALL "call *%c[paravirt_opptr];"
449 447
450/* 448/*
451 * These macros are intended to wrap calls through one of the paravirt 449 * These macros are intended to wrap calls through one of the paravirt
@@ -1367,13 +1365,6 @@ static inline void set_pte_atomic(pte_t *ptep, pte_t pte)
1367 pte.pte, pte.pte >> 32); 1365 pte.pte, pte.pte >> 32);
1368} 1366}
1369 1367
1370static inline void set_pte_present(struct mm_struct *mm, unsigned long addr,
1371 pte_t *ptep, pte_t pte)
1372{
1373 /* 5 arg words */
1374 pv_mmu_ops.set_pte_present(mm, addr, ptep, pte);
1375}
1376
1377static inline void pte_clear(struct mm_struct *mm, unsigned long addr, 1368static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
1378 pte_t *ptep) 1369 pte_t *ptep)
1379{ 1370{
@@ -1390,12 +1381,6 @@ static inline void set_pte_atomic(pte_t *ptep, pte_t pte)
1390 set_pte(ptep, pte); 1381 set_pte(ptep, pte);
1391} 1382}
1392 1383
1393static inline void set_pte_present(struct mm_struct *mm, unsigned long addr,
1394 pte_t *ptep, pte_t pte)
1395{
1396 set_pte(ptep, pte);
1397}
1398
1399static inline void pte_clear(struct mm_struct *mm, unsigned long addr, 1384static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
1400 pte_t *ptep) 1385 pte_t *ptep)
1401{ 1386{
diff --git a/arch/x86/include/asm/pat.h b/arch/x86/include/asm/pat.h
index b0e70056838e..2cd07b9422f4 100644
--- a/arch/x86/include/asm/pat.h
+++ b/arch/x86/include/asm/pat.h
@@ -2,6 +2,7 @@
2#define _ASM_X86_PAT_H 2#define _ASM_X86_PAT_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <asm/pgtable_types.h>
5 6
6#ifdef CONFIG_X86_PAT 7#ifdef CONFIG_X86_PAT
7extern int pat_enabled; 8extern int pat_enabled;
@@ -17,5 +18,9 @@ extern int free_memtype(u64 start, u64 end);
17 18
18extern int kernel_map_sync_memtype(u64 base, unsigned long size, 19extern int kernel_map_sync_memtype(u64 base, unsigned long size,
19 unsigned long flag); 20 unsigned long flag);
21extern void map_devmem(unsigned long pfn, unsigned long size,
22 struct pgprot vma_prot);
23extern void unmap_devmem(unsigned long pfn, unsigned long size,
24 struct pgprot vma_prot);
20 25
21#endif /* _ASM_X86_PAT_H */ 26#endif /* _ASM_X86_PAT_H */
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index a977de23cb4d..b51a1e8b0baf 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -86,12 +86,43 @@ static inline void early_quirks(void) { }
86 86
87extern void pci_iommu_alloc(void); 87extern void pci_iommu_alloc(void);
88 88
89#endif /* __KERNEL__ */ 89/* MSI arch hook */
90#define arch_setup_msi_irqs arch_setup_msi_irqs
91
92#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
93
94#if defined(CONFIG_X86_64) || defined(CONFIG_DMA_API_DEBUG)
95
96#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
97 dma_addr_t ADDR_NAME;
98#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
99 __u32 LEN_NAME;
100#define pci_unmap_addr(PTR, ADDR_NAME) \
101 ((PTR)->ADDR_NAME)
102#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
103 (((PTR)->ADDR_NAME) = (VAL))
104#define pci_unmap_len(PTR, LEN_NAME) \
105 ((PTR)->LEN_NAME)
106#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
107 (((PTR)->LEN_NAME) = (VAL))
90 108
91#ifdef CONFIG_X86_32
92# include "pci_32.h"
93#else 109#else
94# include "pci_64.h" 110
111#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
112#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
113#define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
114#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
115 do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))
116#define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME)
117#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
118 do { break; } while (pci_unmap_len(PTR, LEN_NAME))
119
120#endif
121
122#endif /* __KERNEL__ */
123
124#ifdef CONFIG_X86_64
125#include "pci_64.h"
95#endif 126#endif
96 127
97/* implement the pci_ DMA API in terms of the generic device dma_ one */ 128/* implement the pci_ DMA API in terms of the generic device dma_ one */
@@ -109,11 +140,6 @@ static inline int __pcibus_to_node(const struct pci_bus *bus)
109 return sd->node; 140 return sd->node;
110} 141}
111 142
112static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus)
113{
114 return node_to_cpumask(__pcibus_to_node(bus));
115}
116
117static inline const struct cpumask * 143static inline const struct cpumask *
118cpumask_of_pcibus(const struct pci_bus *bus) 144cpumask_of_pcibus(const struct pci_bus *bus)
119{ 145{
diff --git a/arch/x86/include/asm/pci_32.h b/arch/x86/include/asm/pci_32.h
deleted file mode 100644
index 6f1213a6ef4f..000000000000
--- a/arch/x86/include/asm/pci_32.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef _ASM_X86_PCI_32_H
2#define _ASM_X86_PCI_32_H
3
4
5#ifdef __KERNEL__
6
7
8/* Dynamic DMA mapping stuff.
9 * i386 has everything mapped statically.
10 */
11
12struct pci_dev;
13
14/* The PCI address space does equal the physical memory
15 * address space. The networking and block device layers use
16 * this boolean for bounce buffer decisions.
17 */
18#define PCI_DMA_BUS_IS_PHYS (1)
19
20/* pci_unmap_{page,single} is a nop so... */
21#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
22#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
23#define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
24#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
25 do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))
26#define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME)
27#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
28 do { break; } while (pci_unmap_len(PTR, LEN_NAME))
29
30
31#endif /* __KERNEL__ */
32
33
34#endif /* _ASM_X86_PCI_32_H */
diff --git a/arch/x86/include/asm/pci_64.h b/arch/x86/include/asm/pci_64.h
index 4da207982777..ae5e40f67daf 100644
--- a/arch/x86/include/asm/pci_64.h
+++ b/arch/x86/include/asm/pci_64.h
@@ -24,28 +24,6 @@ extern int (*pci_config_write)(int seg, int bus, int dev, int fn,
24 24
25extern void dma32_reserve_bootmem(void); 25extern void dma32_reserve_bootmem(void);
26 26
27/* The PCI address space does equal the physical memory
28 * address space. The networking and block device layers use
29 * this boolean for bounce buffer decisions
30 *
31 * On AMD64 it mostly equals, but we set it to zero if a hardware
32 * IOMMU (gart) of sotware IOMMU (swiotlb) is available.
33 */
34#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
35
36#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
37 dma_addr_t ADDR_NAME;
38#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
39 __u32 LEN_NAME;
40#define pci_unmap_addr(PTR, ADDR_NAME) \
41 ((PTR)->ADDR_NAME)
42#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
43 (((PTR)->ADDR_NAME) = (VAL))
44#define pci_unmap_len(PTR, LEN_NAME) \
45 ((PTR)->LEN_NAME)
46#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
47 (((PTR)->LEN_NAME) = (VAL))
48
49#endif /* __KERNEL__ */ 27#endif /* __KERNEL__ */
50 28
51#endif /* _ASM_X86_PCI_64_H */ 29#endif /* _ASM_X86_PCI_64_H */
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
index c1774ac9da7a..2334982b339e 100644
--- a/arch/x86/include/asm/pgtable-2level.h
+++ b/arch/x86/include/asm/pgtable-2level.h
@@ -26,13 +26,6 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
26 native_set_pte(ptep, pte); 26 native_set_pte(ptep, pte);
27} 27}
28 28
29static inline void native_set_pte_present(struct mm_struct *mm,
30 unsigned long addr,
31 pte_t *ptep, pte_t pte)
32{
33 native_set_pte(ptep, pte);
34}
35
36static inline void native_pmd_clear(pmd_t *pmdp) 29static inline void native_pmd_clear(pmd_t *pmdp)
37{ 30{
38 native_set_pmd(pmdp, __pmd(0)); 31 native_set_pmd(pmdp, __pmd(0));
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 3f13cdf61156..177b0165ea01 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -31,23 +31,6 @@ static inline void native_set_pte(pte_t *ptep, pte_t pte)
31 ptep->pte_low = pte.pte_low; 31 ptep->pte_low = pte.pte_low;
32} 32}
33 33
34/*
35 * Since this is only called on user PTEs, and the page fault handler
36 * must handle the already racy situation of simultaneous page faults,
37 * we are justified in merely clearing the PTE present bit, followed
38 * by a set. The ordering here is important.
39 */
40static inline void native_set_pte_present(struct mm_struct *mm,
41 unsigned long addr,
42 pte_t *ptep, pte_t pte)
43{
44 ptep->pte_low = 0;
45 smp_wmb();
46 ptep->pte_high = pte.pte_high;
47 smp_wmb();
48 ptep->pte_low = pte.pte_low;
49}
50
51static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) 34static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
52{ 35{
53 set_64bit((unsigned long long *)(ptep), native_pte_val(pte)); 36 set_64bit((unsigned long long *)(ptep), native_pte_val(pte));
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 24e42836e921..b27c4f29b5e0 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -31,8 +31,6 @@ extern struct list_head pgd_list;
31#define set_pte(ptep, pte) native_set_pte(ptep, pte) 31#define set_pte(ptep, pte) native_set_pte(ptep, pte)
32#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) 32#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte)
33 33
34#define set_pte_present(mm, addr, ptep, pte) \
35 native_set_pte_present(mm, addr, ptep, pte)
36#define set_pte_atomic(ptep, pte) \ 34#define set_pte_atomic(ptep, pte) \
37 native_set_pte_atomic(ptep, pte) 35 native_set_pte_atomic(ptep, pte)
38 36
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 97612fc7632f..31bd120cf2a2 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -42,9 +42,6 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
42 */ 42 */
43#undef TEST_ACCESS_OK 43#undef TEST_ACCESS_OK
44 44
45/* The boot page tables (all created as a single array) */
46extern unsigned long pg0[];
47
48#ifdef CONFIG_X86_PAE 45#ifdef CONFIG_X86_PAE
49# include <asm/pgtable-3level.h> 46# include <asm/pgtable-3level.h>
50#else 47#else
diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
index bd8df3b2fe04..2733fad45f98 100644
--- a/arch/x86/include/asm/pgtable_32_types.h
+++ b/arch/x86/include/asm/pgtable_32_types.h
@@ -25,6 +25,11 @@
25 * area for the same reason. ;) 25 * area for the same reason. ;)
26 */ 26 */
27#define VMALLOC_OFFSET (8 * 1024 * 1024) 27#define VMALLOC_OFFSET (8 * 1024 * 1024)
28
29#ifndef __ASSEMBLER__
30extern bool __vmalloc_start_set; /* set once high_memory is set */
31#endif
32
28#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) 33#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
29#ifdef CONFIG_X86_PAE 34#ifdef CONFIG_X86_PAE
30#define LAST_PKMAP 512 35#define LAST_PKMAP 512
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 4d258ad76a0f..b8238dc8786d 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -273,6 +273,7 @@ typedef struct page *pgtable_t;
273 273
274extern pteval_t __supported_pte_mask; 274extern pteval_t __supported_pte_mask;
275extern int nx_enabled; 275extern int nx_enabled;
276extern void set_nx(void);
276 277
277#define pgprot_writecombine pgprot_writecombine 278#define pgprot_writecombine pgprot_writecombine
278extern pgprot_t pgprot_writecombine(pgprot_t prot); 279extern pgprot_t pgprot_writecombine(pgprot_t prot);
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 76139506c3e4..34c52370f2fe 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -75,9 +75,9 @@ struct cpuinfo_x86 {
75#else 75#else
76 /* Number of 4K pages in DTLB/ITLB combined(in pages): */ 76 /* Number of 4K pages in DTLB/ITLB combined(in pages): */
77 int x86_tlbsize; 77 int x86_tlbsize;
78#endif
78 __u8 x86_virt_bits; 79 __u8 x86_virt_bits;
79 __u8 x86_phys_bits; 80 __u8 x86_phys_bits;
80#endif
81 /* CPUID returned core id bits: */ 81 /* CPUID returned core id bits: */
82 __u8 x86_coreid_bits; 82 __u8 x86_coreid_bits;
83 /* Max extended CPUID function supported: */ 83 /* Max extended CPUID function supported: */
@@ -94,7 +94,7 @@ struct cpuinfo_x86 {
94 unsigned long loops_per_jiffy; 94 unsigned long loops_per_jiffy;
95#ifdef CONFIG_SMP 95#ifdef CONFIG_SMP
96 /* cpus sharing the last level cache: */ 96 /* cpus sharing the last level cache: */
97 cpumask_t llc_shared_map; 97 cpumask_var_t llc_shared_map;
98#endif 98#endif
99 /* cpuid returned max cores value: */ 99 /* cpuid returned max cores value: */
100 u16 x86_max_cores; 100 u16 x86_max_cores;
@@ -391,6 +391,9 @@ DECLARE_PER_CPU(union irq_stack_union, irq_stack_union);
391DECLARE_INIT_PER_CPU(irq_stack_union); 391DECLARE_INIT_PER_CPU(irq_stack_union);
392 392
393DECLARE_PER_CPU(char *, irq_stack_ptr); 393DECLARE_PER_CPU(char *, irq_stack_ptr);
394DECLARE_PER_CPU(unsigned int, irq_count);
395extern unsigned long kernel_eflags;
396extern asmlinkage void ignore_sysret(void);
394#else /* X86_64 */ 397#else /* X86_64 */
395#ifdef CONFIG_CC_STACKPROTECTOR 398#ifdef CONFIG_CC_STACKPROTECTOR
396DECLARE_PER_CPU(unsigned long, stack_canary); 399DECLARE_PER_CPU(unsigned long, stack_canary);
@@ -733,6 +736,7 @@ static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
733extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); 736extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx);
734 737
735extern void select_idle_routine(const struct cpuinfo_x86 *c); 738extern void select_idle_routine(const struct cpuinfo_x86 *c);
739extern void init_c1e_mask(void);
736 740
737extern unsigned long boot_option_idle_override; 741extern unsigned long boot_option_idle_override;
738extern unsigned long idle_halt; 742extern unsigned long idle_halt;
diff --git a/arch/x86/include/asm/ptrace-abi.h b/arch/x86/include/asm/ptrace-abi.h
index 8e0f8d199e05..86723035a515 100644
--- a/arch/x86/include/asm/ptrace-abi.h
+++ b/arch/x86/include/asm/ptrace-abi.h
@@ -80,8 +80,6 @@
80 80
81#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ 81#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
82 82
83#ifdef CONFIG_X86_PTRACE_BTS
84
85#ifndef __ASSEMBLY__ 83#ifndef __ASSEMBLY__
86#include <linux/types.h> 84#include <linux/types.h>
87 85
@@ -140,6 +138,5 @@ struct ptrace_bts_config {
140 BTS records are read from oldest to newest. 138 BTS records are read from oldest to newest.
141 Returns number of BTS records drained. 139 Returns number of BTS records drained.
142*/ 140*/
143#endif /* CONFIG_X86_PTRACE_BTS */
144 141
145#endif /* _ASM_X86_PTRACE_ABI_H */ 142#endif /* _ASM_X86_PTRACE_ABI_H */
diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h
index 2b8c5160388f..1b7ee5d673c2 100644
--- a/arch/x86/include/asm/sections.h
+++ b/arch/x86/include/asm/sections.h
@@ -1 +1,8 @@
1#ifndef _ASM_X86_SECTIONS_H
2#define _ASM_X86_SECTIONS_H
3
1#include <asm-generic/sections.h> 4#include <asm-generic/sections.h>
5
6extern char __brk_base[], __brk_limit[];
7
8#endif /* _ASM_X86_SECTIONS_H */
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 05c6f6b11fd5..bdc2ada05ae0 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -64,7 +64,7 @@ extern void x86_quirk_time_init(void);
64#include <asm/bootparam.h> 64#include <asm/bootparam.h>
65 65
66/* Interrupt control for vSMPowered x86_64 systems */ 66/* Interrupt control for vSMPowered x86_64 systems */
67#ifdef CONFIG_X86_VSMP 67#ifdef CONFIG_X86_64
68void vsmp_init(void); 68void vsmp_init(void);
69#else 69#else
70static inline void vsmp_init(void) { } 70static inline void vsmp_init(void) { }
@@ -100,20 +100,51 @@ extern struct boot_params boot_params;
100 */ 100 */
101#define LOWMEMSIZE() (0x9f000) 101#define LOWMEMSIZE() (0x9f000)
102 102
103/* exceedingly early brk-like allocator */
104extern unsigned long _brk_end;
105void *extend_brk(size_t size, size_t align);
106
107/*
108 * Reserve space in the brk section. The name must be unique within
109 * the file, and somewhat descriptive. The size is in bytes. Must be
110 * used at file scope.
111 *
112 * (This uses a temp function to wrap the asm so we can pass it the
113 * size parameter; otherwise we wouldn't be able to. We can't use a
114 * "section" attribute on a normal variable because it always ends up
115 * being @progbits, which ends up allocating space in the vmlinux
116 * executable.)
117 */
118#define RESERVE_BRK(name,sz) \
119 static void __section(.discard) __used \
120 __brk_reservation_fn_##name##__(void) { \
121 asm volatile ( \
122 ".pushsection .brk_reservation,\"aw\",@nobits;" \
123 ".brk." #name ":" \
124 " 1:.skip %c0;" \
125 " .size .brk." #name ", . - 1b;" \
126 " .popsection" \
127 : : "i" (sz)); \
128 }
129
103#ifdef __i386__ 130#ifdef __i386__
104 131
105void __init i386_start_kernel(void); 132void __init i386_start_kernel(void);
106extern void probe_roms(void); 133extern void probe_roms(void);
107 134
108extern unsigned long init_pg_tables_start;
109extern unsigned long init_pg_tables_end;
110
111#else 135#else
112void __init x86_64_start_kernel(char *real_mode); 136void __init x86_64_start_kernel(char *real_mode);
113void __init x86_64_start_reservations(char *real_mode_data); 137void __init x86_64_start_reservations(char *real_mode_data);
114 138
115#endif /* __i386__ */ 139#endif /* __i386__ */
116#endif /* _SETUP */ 140#endif /* _SETUP */
141#else
142#define RESERVE_BRK(name,sz) \
143 .pushsection .brk_reservation,"aw",@nobits; \
144.brk.name: \
1451: .skip sz; \
146 .size .brk.name,.-1b; \
147 .popsection
117#endif /* __ASSEMBLY__ */ 148#endif /* __ASSEMBLY__ */
118#endif /* __KERNEL__ */ 149#endif /* __KERNEL__ */
119 150
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 47d0e21f2b9e..19e0d88b966d 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -21,19 +21,19 @@
21extern int smp_num_siblings; 21extern int smp_num_siblings;
22extern unsigned int num_processors; 22extern unsigned int num_processors;
23 23
24DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 24DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map);
25DECLARE_PER_CPU(cpumask_t, cpu_core_map); 25DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
26DECLARE_PER_CPU(u16, cpu_llc_id); 26DECLARE_PER_CPU(u16, cpu_llc_id);
27DECLARE_PER_CPU(int, cpu_number); 27DECLARE_PER_CPU(int, cpu_number);
28 28
29static inline struct cpumask *cpu_sibling_mask(int cpu) 29static inline struct cpumask *cpu_sibling_mask(int cpu)
30{ 30{
31 return &per_cpu(cpu_sibling_map, cpu); 31 return per_cpu(cpu_sibling_map, cpu);
32} 32}
33 33
34static inline struct cpumask *cpu_core_mask(int cpu) 34static inline struct cpumask *cpu_core_mask(int cpu)
35{ 35{
36 return &per_cpu(cpu_core_map, cpu); 36 return per_cpu(cpu_core_map, cpu);
37} 37}
38 38
39DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); 39DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
@@ -121,9 +121,10 @@ static inline void arch_send_call_function_single_ipi(int cpu)
121 smp_ops.send_call_func_single_ipi(cpu); 121 smp_ops.send_call_func_single_ipi(cpu);
122} 122}
123 123
124static inline void arch_send_call_function_ipi(cpumask_t mask) 124#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
125static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
125{ 126{
126 smp_ops.send_call_func_ipi(&mask); 127 smp_ops.send_call_func_ipi(mask);
127} 128}
128 129
129void cpu_disable_common(void); 130void cpu_disable_common(void);
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 3a5696656680..e5e6caffec87 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
@@ -295,6 +295,9 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
295 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); 295 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
296} 296}
297 297
298#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock)
299#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock)
300
298#define _raw_spin_relax(lock) cpu_relax() 301#define _raw_spin_relax(lock) cpu_relax()
299#define _raw_read_relax(lock) cpu_relax() 302#define _raw_read_relax(lock) cpu_relax()
300#define _raw_write_relax(lock) cpu_relax() 303#define _raw_write_relax(lock) cpu_relax()
diff --git a/arch/x86/include/asm/suspend_32.h b/arch/x86/include/asm/suspend_32.h
index a5074bd0f8be..48dcfa62ea07 100644
--- a/arch/x86/include/asm/suspend_32.h
+++ b/arch/x86/include/asm/suspend_32.h
@@ -24,28 +24,4 @@ struct saved_context {
24 unsigned long return_address; 24 unsigned long return_address;
25} __attribute__((packed)); 25} __attribute__((packed));
26 26
27#ifdef CONFIG_ACPI
28extern unsigned long saved_eip;
29extern unsigned long saved_esp;
30extern unsigned long saved_ebp;
31extern unsigned long saved_ebx;
32extern unsigned long saved_esi;
33extern unsigned long saved_edi;
34
35static inline void acpi_save_register_state(unsigned long return_point)
36{
37 saved_eip = return_point;
38 asm volatile("movl %%esp,%0" : "=m" (saved_esp));
39 asm volatile("movl %%ebp,%0" : "=m" (saved_ebp));
40 asm volatile("movl %%ebx,%0" : "=m" (saved_ebx));
41 asm volatile("movl %%edi,%0" : "=m" (saved_edi));
42 asm volatile("movl %%esi,%0" : "=m" (saved_esi));
43}
44
45#define acpi_restore_register_state() do {} while (0)
46
47/* routines for saving/restoring kernel state */
48extern int acpi_save_state_mem(void);
49#endif
50
51#endif /* _ASM_X86_SUSPEND_32_H */ 27#endif /* _ASM_X86_SUSPEND_32_H */
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index 2f34d643b567..602c769fc98c 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -95,6 +95,7 @@ struct thread_info {
95#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */ 95#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */
96#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */ 96#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
97#define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ 97#define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */
98#define TIF_SYSCALL_FTRACE 28 /* for ftrace syscall instrumentation */
98 99
99#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 100#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
100#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 101#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
@@ -117,15 +118,17 @@ struct thread_info {
117#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR) 118#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
118#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR) 119#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
119#define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) 120#define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES)
121#define _TIF_SYSCALL_FTRACE (1 << TIF_SYSCALL_FTRACE)
120 122
121/* work to do in syscall_trace_enter() */ 123/* work to do in syscall_trace_enter() */
122#define _TIF_WORK_SYSCALL_ENTRY \ 124#define _TIF_WORK_SYSCALL_ENTRY \
123 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | \ 125 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | _TIF_SYSCALL_FTRACE | \
124 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | _TIF_SINGLESTEP) 126 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | _TIF_SINGLESTEP)
125 127
126/* work to do in syscall_trace_leave() */ 128/* work to do in syscall_trace_leave() */
127#define _TIF_WORK_SYSCALL_EXIT \ 129#define _TIF_WORK_SYSCALL_EXIT \
128 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP) 130 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP | \
131 _TIF_SYSCALL_FTRACE)
129 132
130/* work to do on interrupt/exception return */ 133/* work to do on interrupt/exception return */
131#define _TIF_WORK_MASK \ 134#define _TIF_WORK_MASK \
@@ -134,7 +137,7 @@ struct thread_info {
134 _TIF_SINGLESTEP|_TIF_SECCOMP|_TIF_SYSCALL_EMU)) 137 _TIF_SINGLESTEP|_TIF_SECCOMP|_TIF_SYSCALL_EMU))
135 138
136/* work to do on any return to user space */ 139/* work to do on any return to user space */
137#define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) 140#define _TIF_ALLWORK_MASK ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_FTRACE)
138 141
139/* Only used for 64 bit */ 142/* Only used for 64 bit */
140#define _TIF_DO_NOTIFY_MASK \ 143#define _TIF_DO_NOTIFY_MASK \
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h
index a81195eaa2b3..bd37ed444a21 100644
--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -12,9 +12,9 @@ unsigned long native_calibrate_tsc(void);
12 12
13#ifdef CONFIG_X86_32 13#ifdef CONFIG_X86_32
14extern int timer_ack; 14extern int timer_ack;
15extern int recalibrate_cpu_khz(void);
16extern irqreturn_t timer_interrupt(int irq, void *dev_id); 15extern irqreturn_t timer_interrupt(int irq, void *dev_id);
17#endif /* CONFIG_X86_32 */ 16#endif /* CONFIG_X86_32 */
17extern int recalibrate_cpu_khz(void);
18 18
19extern int no_timer_check; 19extern int no_timer_check;
20 20
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 77cfb2cfb386..892b119dba6f 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -44,9 +44,6 @@
44 44
45#ifdef CONFIG_X86_32 45#ifdef CONFIG_X86_32
46 46
47/* Mappings between node number and cpus on that node. */
48extern cpumask_t node_to_cpumask_map[];
49
50/* Mappings between logical cpu number and node number */ 47/* Mappings between logical cpu number and node number */
51extern int cpu_to_node_map[]; 48extern int cpu_to_node_map[];
52 49
@@ -57,30 +54,8 @@ static inline int cpu_to_node(int cpu)
57} 54}
58#define early_cpu_to_node(cpu) cpu_to_node(cpu) 55#define early_cpu_to_node(cpu) cpu_to_node(cpu)
59 56
60/* Returns a bitmask of CPUs on Node 'node'.
61 *
62 * Side note: this function creates the returned cpumask on the stack
63 * so with a high NR_CPUS count, excessive stack space is used. The
64 * cpumask_of_node function should be used whenever possible.
65 */
66static inline cpumask_t node_to_cpumask(int node)
67{
68 return node_to_cpumask_map[node];
69}
70
71/* Returns a bitmask of CPUs on Node 'node'. */
72static inline const struct cpumask *cpumask_of_node(int node)
73{
74 return &node_to_cpumask_map[node];
75}
76
77static inline void setup_node_to_cpumask_map(void) { }
78
79#else /* CONFIG_X86_64 */ 57#else /* CONFIG_X86_64 */
80 58
81/* Mappings between node number and cpus on that node. */
82extern cpumask_t *node_to_cpumask_map;
83
84/* Mappings between logical cpu number and node number */ 59/* Mappings between logical cpu number and node number */
85DECLARE_EARLY_PER_CPU(int, x86_cpu_to_node_map); 60DECLARE_EARLY_PER_CPU(int, x86_cpu_to_node_map);
86 61
@@ -91,8 +66,6 @@ DECLARE_PER_CPU(int, node_number);
91#ifdef CONFIG_DEBUG_PER_CPU_MAPS 66#ifdef CONFIG_DEBUG_PER_CPU_MAPS
92extern int cpu_to_node(int cpu); 67extern int cpu_to_node(int cpu);
93extern int early_cpu_to_node(int cpu); 68extern int early_cpu_to_node(int cpu);
94extern const cpumask_t *cpumask_of_node(int node);
95extern cpumask_t node_to_cpumask(int node);
96 69
97#else /* !CONFIG_DEBUG_PER_CPU_MAPS */ 70#else /* !CONFIG_DEBUG_PER_CPU_MAPS */
98 71
@@ -108,42 +81,32 @@ static inline int early_cpu_to_node(int cpu)
108 return early_per_cpu(x86_cpu_to_node_map, cpu); 81 return early_per_cpu(x86_cpu_to_node_map, cpu);
109} 82}
110 83
111/* Returns a pointer to the cpumask of CPUs on Node 'node'. */ 84#endif /* !CONFIG_DEBUG_PER_CPU_MAPS */
112static inline const cpumask_t *cpumask_of_node(int node) 85
113{ 86#endif /* CONFIG_X86_64 */
114 return &node_to_cpumask_map[node];
115}
116 87
117/* Returns a bitmask of CPUs on Node 'node'. */ 88/* Mappings between node number and cpus on that node. */
118static inline cpumask_t node_to_cpumask(int node) 89extern cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
90
91#ifdef CONFIG_DEBUG_PER_CPU_MAPS
92extern const struct cpumask *cpumask_of_node(int node);
93#else
94/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
95static inline const struct cpumask *cpumask_of_node(int node)
119{ 96{
120 return node_to_cpumask_map[node]; 97 return node_to_cpumask_map[node];
121} 98}
122 99#endif
123#endif /* !CONFIG_DEBUG_PER_CPU_MAPS */
124 100
125extern void setup_node_to_cpumask_map(void); 101extern void setup_node_to_cpumask_map(void);
126 102
127/* 103/*
128 * Replace default node_to_cpumask_ptr with optimized version
129 * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
130 */
131#define node_to_cpumask_ptr(v, node) \
132 const cpumask_t *v = cpumask_of_node(node)
133
134#define node_to_cpumask_ptr_next(v, node) \
135 v = cpumask_of_node(node)
136
137#endif /* CONFIG_X86_64 */
138
139/*
140 * Returns the number of the node containing Node 'node'. This 104 * Returns the number of the node containing Node 'node'. This
141 * architecture is flat, so it is a pretty simple function! 105 * architecture is flat, so it is a pretty simple function!
142 */ 106 */
143#define parent_node(node) (node) 107#define parent_node(node) (node)
144 108
145#define pcibus_to_node(bus) __pcibus_to_node(bus) 109#define pcibus_to_node(bus) __pcibus_to_node(bus)
146#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus)
147 110
148#ifdef CONFIG_X86_32 111#ifdef CONFIG_X86_32
149extern unsigned long node_start_pfn[]; 112extern unsigned long node_start_pfn[];
@@ -209,52 +172,24 @@ static inline int early_cpu_to_node(int cpu)
209 return 0; 172 return 0;
210} 173}
211 174
212static inline const cpumask_t *cpumask_of_node(int node) 175static inline const struct cpumask *cpumask_of_node(int node)
213{
214 return &cpu_online_map;
215}
216static inline cpumask_t node_to_cpumask(int node)
217{
218 return cpu_online_map;
219}
220static inline int node_to_first_cpu(int node)
221{ 176{
222 return first_cpu(cpu_online_map); 177 return cpu_online_mask;
223} 178}
224 179
225static inline void setup_node_to_cpumask_map(void) { } 180static inline void setup_node_to_cpumask_map(void) { }
226 181
227/*
228 * Replace default node_to_cpumask_ptr with optimized version
229 * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
230 */
231#define node_to_cpumask_ptr(v, node) \
232 const cpumask_t *v = cpumask_of_node(node)
233
234#define node_to_cpumask_ptr_next(v, node) \
235 v = cpumask_of_node(node)
236#endif 182#endif
237 183
238#include <asm-generic/topology.h> 184#include <asm-generic/topology.h>
239 185
240#ifdef CONFIG_NUMA
241/* Returns the number of the first CPU on Node 'node'. */
242static inline int node_to_first_cpu(int node)
243{
244 return cpumask_first(cpumask_of_node(node));
245}
246#endif
247
248extern cpumask_t cpu_coregroup_map(int cpu);
249extern const struct cpumask *cpu_coregroup_mask(int cpu); 186extern const struct cpumask *cpu_coregroup_mask(int cpu);
250 187
251#ifdef ENABLE_TOPO_DEFINES 188#ifdef ENABLE_TOPO_DEFINES
252#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) 189#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
253#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) 190#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
254#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) 191#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
255#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) 192#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
256#define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu))
257#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
258 193
259/* indicates that pointers to the topology cpumask_t maps are valid */ 194/* indicates that pointers to the topology cpumask_t maps are valid */
260#define arch_provides_topology_pointers yes 195#define arch_provides_topology_pointers yes
@@ -268,7 +203,7 @@ struct pci_bus;
268void set_pci_bus_resources_arch_default(struct pci_bus *b); 203void set_pci_bus_resources_arch_default(struct pci_bus *b);
269 204
270#ifdef CONFIG_SMP 205#ifdef CONFIG_SMP
271#define mc_capable() (cpus_weight(per_cpu(cpu_core_map, 0)) != nr_cpu_ids) 206#define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
272#define smt_capable() (smp_num_siblings > 1) 207#define smt_capable() (smp_num_siblings > 1)
273#endif 208#endif
274 209
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h
index f2bba78430a4..6e72d74cf8dc 100644
--- a/arch/x86/include/asm/unistd_32.h
+++ b/arch/x86/include/asm/unistd_32.h
@@ -338,6 +338,8 @@
338#define __NR_dup3 330 338#define __NR_dup3 330
339#define __NR_pipe2 331 339#define __NR_pipe2 331
340#define __NR_inotify_init1 332 340#define __NR_inotify_init1 332
341#define __NR_preadv 333
342#define __NR_pwritev 334
341 343
342#ifdef __KERNEL__ 344#ifdef __KERNEL__
343 345
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
index d2e415e6666f..f81829462325 100644
--- a/arch/x86/include/asm/unistd_64.h
+++ b/arch/x86/include/asm/unistd_64.h
@@ -653,6 +653,10 @@ __SYSCALL(__NR_dup3, sys_dup3)
653__SYSCALL(__NR_pipe2, sys_pipe2) 653__SYSCALL(__NR_pipe2, sys_pipe2)
654#define __NR_inotify_init1 294 654#define __NR_inotify_init1 294
655__SYSCALL(__NR_inotify_init1, sys_inotify_init1) 655__SYSCALL(__NR_inotify_init1, sys_inotify_init1)
656#define __NR_preadv 295
657__SYSCALL(__NR_preadv, sys_preadv)
658#define __NR_pwritev 296
659__SYSCALL(__NR_pwritev, sys_pwritev)
656 660
657 661
658#ifndef __NO_STUBS 662#ifndef __NO_STUBS
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 777327ef05c1..d3a98ea1062e 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -11,11 +11,13 @@
11#ifndef _ASM_X86_UV_UV_HUB_H 11#ifndef _ASM_X86_UV_UV_HUB_H
12#define _ASM_X86_UV_UV_HUB_H 12#define _ASM_X86_UV_UV_HUB_H
13 13
14#ifdef CONFIG_X86_64
14#include <linux/numa.h> 15#include <linux/numa.h>
15#include <linux/percpu.h> 16#include <linux/percpu.h>
16#include <linux/timer.h> 17#include <linux/timer.h>
17#include <asm/types.h> 18#include <asm/types.h>
18#include <asm/percpu.h> 19#include <asm/percpu.h>
20#include <asm/uv/uv_mmrs.h>
19 21
20 22
21/* 23/*
@@ -199,6 +201,10 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
199#define SCIR_CPU_ACTIVITY 0x02 /* not idle */ 201#define SCIR_CPU_ACTIVITY 0x02 /* not idle */
200#define SCIR_CPU_HB_INTERVAL (HZ) /* once per second */ 202#define SCIR_CPU_HB_INTERVAL (HZ) /* once per second */
201 203
204/* Loop through all installed blades */
205#define for_each_possible_blade(bid) \
206 for ((bid) = 0; (bid) < uv_num_possible_blades(); (bid)++)
207
202/* 208/*
203 * Macros for converting between kernel virtual addresses, socket local physical 209 * Macros for converting between kernel virtual addresses, socket local physical
204 * addresses, and UV global physical addresses. 210 * addresses, and UV global physical addresses.
@@ -393,6 +399,7 @@ static inline void uv_set_scir_bits(unsigned char value)
393 uv_write_local_mmr8(uv_hub_info->scir.offset, value); 399 uv_write_local_mmr8(uv_hub_info->scir.offset, value);
394 } 400 }
395} 401}
402
396static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) 403static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
397{ 404{
398 if (uv_cpu_hub_info(cpu)->scir.state != value) { 405 if (uv_cpu_hub_info(cpu)->scir.state != value) {
@@ -401,4 +408,15 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
401 } 408 }
402} 409}
403 410
411static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
412{
413 unsigned long val;
414
415 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
416 ((apicid & 0x3f) << UVH_IPI_INT_APIC_ID_SHFT) |
417 (vector << UVH_IPI_INT_VECTOR_SHFT);
418 uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
419}
420
421#endif /* CONFIG_X86_64 */
404#endif /* _ASM_X86_UV_UV_HUB_H */ 422#endif /* _ASM_X86_UV_UV_HUB_H */
diff --git a/arch/x86/include/asm/uv/uv_mmrs.h b/arch/x86/include/asm/uv/uv_mmrs.h
index dd627793a234..db68ac8a5ac2 100644
--- a/arch/x86/include/asm/uv/uv_mmrs.h
+++ b/arch/x86/include/asm/uv/uv_mmrs.h
@@ -1,3 +1,4 @@
1
1/* 2/*
2 * This file is subject to the terms and conditions of the GNU General Public 3 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive 4 * License. See the file "COPYING" in the main directory of this archive
@@ -243,6 +244,158 @@ union uvh_event_occurred0_u {
243#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0 244#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0
244 245
245/* ========================================================================= */ 246/* ========================================================================= */
247/* UVH_GR0_TLB_INT0_CONFIG */
248/* ========================================================================= */
249#define UVH_GR0_TLB_INT0_CONFIG 0x61b00UL
250
251#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_SHFT 0
252#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
253#define UVH_GR0_TLB_INT0_CONFIG_DM_SHFT 8
254#define UVH_GR0_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
255#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_SHFT 11
256#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
257#define UVH_GR0_TLB_INT0_CONFIG_STATUS_SHFT 12
258#define UVH_GR0_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
259#define UVH_GR0_TLB_INT0_CONFIG_P_SHFT 13
260#define UVH_GR0_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
261#define UVH_GR0_TLB_INT0_CONFIG_T_SHFT 15
262#define UVH_GR0_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
263#define UVH_GR0_TLB_INT0_CONFIG_M_SHFT 16
264#define UVH_GR0_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
265#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_SHFT 32
266#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
267
268union uvh_gr0_tlb_int0_config_u {
269 unsigned long v;
270 struct uvh_gr0_tlb_int0_config_s {
271 unsigned long vector_ : 8; /* RW */
272 unsigned long dm : 3; /* RW */
273 unsigned long destmode : 1; /* RW */
274 unsigned long status : 1; /* RO */
275 unsigned long p : 1; /* RO */
276 unsigned long rsvd_14 : 1; /* */
277 unsigned long t : 1; /* RO */
278 unsigned long m : 1; /* RW */
279 unsigned long rsvd_17_31: 15; /* */
280 unsigned long apic_id : 32; /* RW */
281 } s;
282};
283
284/* ========================================================================= */
285/* UVH_GR0_TLB_INT1_CONFIG */
286/* ========================================================================= */
287#define UVH_GR0_TLB_INT1_CONFIG 0x61b40UL
288
289#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_SHFT 0
290#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
291#define UVH_GR0_TLB_INT1_CONFIG_DM_SHFT 8
292#define UVH_GR0_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
293#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_SHFT 11
294#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
295#define UVH_GR0_TLB_INT1_CONFIG_STATUS_SHFT 12
296#define UVH_GR0_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
297#define UVH_GR0_TLB_INT1_CONFIG_P_SHFT 13
298#define UVH_GR0_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
299#define UVH_GR0_TLB_INT1_CONFIG_T_SHFT 15
300#define UVH_GR0_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
301#define UVH_GR0_TLB_INT1_CONFIG_M_SHFT 16
302#define UVH_GR0_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
303#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_SHFT 32
304#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
305
306union uvh_gr0_tlb_int1_config_u {
307 unsigned long v;
308 struct uvh_gr0_tlb_int1_config_s {
309 unsigned long vector_ : 8; /* RW */
310 unsigned long dm : 3; /* RW */
311 unsigned long destmode : 1; /* RW */
312 unsigned long status : 1; /* RO */
313 unsigned long p : 1; /* RO */
314 unsigned long rsvd_14 : 1; /* */
315 unsigned long t : 1; /* RO */
316 unsigned long m : 1; /* RW */
317 unsigned long rsvd_17_31: 15; /* */
318 unsigned long apic_id : 32; /* RW */
319 } s;
320};
321
322/* ========================================================================= */
323/* UVH_GR1_TLB_INT0_CONFIG */
324/* ========================================================================= */
325#define UVH_GR1_TLB_INT0_CONFIG 0x61f00UL
326
327#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_SHFT 0
328#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
329#define UVH_GR1_TLB_INT0_CONFIG_DM_SHFT 8
330#define UVH_GR1_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
331#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_SHFT 11
332#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
333#define UVH_GR1_TLB_INT0_CONFIG_STATUS_SHFT 12
334#define UVH_GR1_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
335#define UVH_GR1_TLB_INT0_CONFIG_P_SHFT 13
336#define UVH_GR1_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
337#define UVH_GR1_TLB_INT0_CONFIG_T_SHFT 15
338#define UVH_GR1_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
339#define UVH_GR1_TLB_INT0_CONFIG_M_SHFT 16
340#define UVH_GR1_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
341#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_SHFT 32
342#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
343
344union uvh_gr1_tlb_int0_config_u {
345 unsigned long v;
346 struct uvh_gr1_tlb_int0_config_s {
347 unsigned long vector_ : 8; /* RW */
348 unsigned long dm : 3; /* RW */
349 unsigned long destmode : 1; /* RW */
350 unsigned long status : 1; /* RO */
351 unsigned long p : 1; /* RO */
352 unsigned long rsvd_14 : 1; /* */
353 unsigned long t : 1; /* RO */
354 unsigned long m : 1; /* RW */
355 unsigned long rsvd_17_31: 15; /* */
356 unsigned long apic_id : 32; /* RW */
357 } s;
358};
359
360/* ========================================================================= */
361/* UVH_GR1_TLB_INT1_CONFIG */
362/* ========================================================================= */
363#define UVH_GR1_TLB_INT1_CONFIG 0x61f40UL
364
365#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_SHFT 0
366#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
367#define UVH_GR1_TLB_INT1_CONFIG_DM_SHFT 8
368#define UVH_GR1_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
369#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_SHFT 11
370#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
371#define UVH_GR1_TLB_INT1_CONFIG_STATUS_SHFT 12
372#define UVH_GR1_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
373#define UVH_GR1_TLB_INT1_CONFIG_P_SHFT 13
374#define UVH_GR1_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
375#define UVH_GR1_TLB_INT1_CONFIG_T_SHFT 15
376#define UVH_GR1_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
377#define UVH_GR1_TLB_INT1_CONFIG_M_SHFT 16
378#define UVH_GR1_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
379#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_SHFT 32
380#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
381
382union uvh_gr1_tlb_int1_config_u {
383 unsigned long v;
384 struct uvh_gr1_tlb_int1_config_s {
385 unsigned long vector_ : 8; /* RW */
386 unsigned long dm : 3; /* RW */
387 unsigned long destmode : 1; /* RW */
388 unsigned long status : 1; /* RO */
389 unsigned long p : 1; /* RO */
390 unsigned long rsvd_14 : 1; /* */
391 unsigned long t : 1; /* RO */
392 unsigned long m : 1; /* RW */
393 unsigned long rsvd_17_31: 15; /* */
394 unsigned long apic_id : 32; /* RW */
395 } s;
396};
397
398/* ========================================================================= */
246/* UVH_INT_CMPB */ 399/* UVH_INT_CMPB */
247/* ========================================================================= */ 400/* ========================================================================= */
248#define UVH_INT_CMPB 0x22080UL 401#define UVH_INT_CMPB 0x22080UL
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index 5e79ca694326..9c371e4a9fa6 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -296,6 +296,8 @@ HYPERVISOR_get_debugreg(int reg)
296static inline int 296static inline int
297HYPERVISOR_update_descriptor(u64 ma, u64 desc) 297HYPERVISOR_update_descriptor(u64 ma, u64 desc)
298{ 298{
299 if (sizeof(u64) == sizeof(long))
300 return _hypercall2(int, update_descriptor, ma, desc);
299 return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32); 301 return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
300} 302}
301 303
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 95f216bbfaf1..145cce75cda7 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -66,11 +66,11 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse.o
66obj-y += apic/ 66obj-y += apic/
67obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o 67obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o
68obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 68obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
69obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 69obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
70obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
70obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o 71obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
71obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o 72obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
72obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o 73obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
73obj-$(CONFIG_X86_VSMP) += vsmp_64.o
74obj-$(CONFIG_KPROBES) += kprobes.o 74obj-$(CONFIG_KPROBES) += kprobes.o
75obj-$(CONFIG_MODULES) += module_$(BITS).o 75obj-$(CONFIG_MODULES) += module_$(BITS).o
76obj-$(CONFIG_EFI) += efi.o efi_$(BITS).o efi_stub_$(BITS).o 76obj-$(CONFIG_EFI) += efi.o efi_$(BITS).o efi_stub_$(BITS).o
@@ -106,12 +106,12 @@ obj-$(CONFIG_MICROCODE) += microcode.o
106 106
107obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o 107obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
108 108
109obj-$(CONFIG_SWIOTLB) += pci-swiotlb_64.o # NB rename without _64 109obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o
110 110
111### 111###
112# 64 bit specific files 112# 64 bit specific files
113ifeq ($(CONFIG_X86_64),y) 113ifeq ($(CONFIG_X86_64),y)
114 obj-$(CONFIG_X86_UV) += tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o 114 obj-$(CONFIG_X86_UV) += tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o uv_time.o
115 obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o 115 obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o
116 obj-$(CONFIG_AUDIT) += audit_64.o 116 obj-$(CONFIG_AUDIT) += audit_64.o
117 117
@@ -120,4 +120,5 @@ ifeq ($(CONFIG_X86_64),y)
120 obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o 120 obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o
121 121
122 obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o 122 obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o
123 obj-y += vsmp_64.o
123endif 124endif
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index a18eb7ce2236..723989d7f802 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -230,6 +230,35 @@ static void __cpuinit acpi_register_lapic(int id, u8 enabled)
230} 230}
231 231
232static int __init 232static int __init
233acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
234{
235 struct acpi_madt_local_x2apic *processor = NULL;
236
237 processor = (struct acpi_madt_local_x2apic *)header;
238
239 if (BAD_MADT_ENTRY(processor, end))
240 return -EINVAL;
241
242 acpi_table_print_madt_entry(header);
243
244#ifdef CONFIG_X86_X2APIC
245 /*
246 * We need to register disabled CPU as well to permit
247 * counting disabled CPUs. This allows us to size
248 * cpus_possible_map more accurately, to permit
249 * to not preallocating memory for all NR_CPUS
250 * when we use CPU hotplug.
251 */
252 acpi_register_lapic(processor->local_apic_id, /* APIC ID */
253 processor->lapic_flags & ACPI_MADT_ENABLED);
254#else
255 printk(KERN_WARNING PREFIX "x2apic entry ignored\n");
256#endif
257
258 return 0;
259}
260
261static int __init
233acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) 262acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
234{ 263{
235 struct acpi_madt_local_apic *processor = NULL; 264 struct acpi_madt_local_apic *processor = NULL;
@@ -289,6 +318,25 @@ acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
289} 318}
290 319
291static int __init 320static int __init
321acpi_parse_x2apic_nmi(struct acpi_subtable_header *header,
322 const unsigned long end)
323{
324 struct acpi_madt_local_x2apic_nmi *x2apic_nmi = NULL;
325
326 x2apic_nmi = (struct acpi_madt_local_x2apic_nmi *)header;
327
328 if (BAD_MADT_ENTRY(x2apic_nmi, end))
329 return -EINVAL;
330
331 acpi_table_print_madt_entry(header);
332
333 if (x2apic_nmi->lint != 1)
334 printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n");
335
336 return 0;
337}
338
339static int __init
292acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end) 340acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end)
293{ 341{
294 struct acpi_madt_local_apic_nmi *lapic_nmi = NULL; 342 struct acpi_madt_local_apic_nmi *lapic_nmi = NULL;
@@ -793,6 +841,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
793static int __init acpi_parse_madt_lapic_entries(void) 841static int __init acpi_parse_madt_lapic_entries(void)
794{ 842{
795 int count; 843 int count;
844 int x2count = 0;
796 845
797 if (!cpu_has_apic) 846 if (!cpu_has_apic)
798 return -ENODEV; 847 return -ENODEV;
@@ -816,22 +865,28 @@ static int __init acpi_parse_madt_lapic_entries(void)
816 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, 865 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
817 acpi_parse_sapic, MAX_APICS); 866 acpi_parse_sapic, MAX_APICS);
818 867
819 if (!count) 868 if (!count) {
869 x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC,
870 acpi_parse_x2apic, MAX_APICS);
820 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, 871 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC,
821 acpi_parse_lapic, MAX_APICS); 872 acpi_parse_lapic, MAX_APICS);
822 if (!count) { 873 }
874 if (!count && !x2count) {
823 printk(KERN_ERR PREFIX "No LAPIC entries present\n"); 875 printk(KERN_ERR PREFIX "No LAPIC entries present\n");
824 /* TBD: Cleanup to allow fallback to MPS */ 876 /* TBD: Cleanup to allow fallback to MPS */
825 return -ENODEV; 877 return -ENODEV;
826 } else if (count < 0) { 878 } else if (count < 0 || x2count < 0) {
827 printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); 879 printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
828 /* TBD: Cleanup to allow fallback to MPS */ 880 /* TBD: Cleanup to allow fallback to MPS */
829 return count; 881 return count;
830 } 882 }
831 883
884 x2count =
885 acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI,
886 acpi_parse_x2apic_nmi, 0);
832 count = 887 count =
833 acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); 888 acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0);
834 if (count < 0) { 889 if (count < 0 || x2count < 0) {
835 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); 890 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
836 /* TBD: Cleanup to allow fallback to MPS */ 891 /* TBD: Cleanup to allow fallback to MPS */
837 return count; 892 return count;
@@ -1470,7 +1525,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
1470 1525
1471/* 1526/*
1472 * If your system is blacklisted here, but you find that acpi=force 1527 * If your system is blacklisted here, but you find that acpi=force
1473 * works for you, please contact acpi-devel@sourceforge.net 1528 * works for you, please contact linux-acpi@vger.kernel.org
1474 */ 1529 */
1475static struct dmi_system_id __initdata acpi_dmi_table[] = { 1530static struct dmi_system_id __initdata acpi_dmi_table[] = {
1476 /* 1531 /*
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 6907b8e85d52..f57658702571 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -5,6 +5,7 @@
5#include <linux/kprobes.h> 5#include <linux/kprobes.h>
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/vmalloc.h> 7#include <linux/vmalloc.h>
8#include <linux/memory.h>
8#include <asm/alternative.h> 9#include <asm/alternative.h>
9#include <asm/sections.h> 10#include <asm/sections.h>
10#include <asm/pgtable.h> 11#include <asm/pgtable.h>
@@ -12,7 +13,9 @@
12#include <asm/nmi.h> 13#include <asm/nmi.h>
13#include <asm/vsyscall.h> 14#include <asm/vsyscall.h>
14#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
16#include <asm/tlbflush.h>
15#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/fixmap.h>
16 19
17#define MAX_PATCH_LEN (255-1) 20#define MAX_PATCH_LEN (255-1)
18 21
@@ -226,6 +229,7 @@ static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end)
226{ 229{
227 u8 **ptr; 230 u8 **ptr;
228 231
232 mutex_lock(&text_mutex);
229 for (ptr = start; ptr < end; ptr++) { 233 for (ptr = start; ptr < end; ptr++) {
230 if (*ptr < text) 234 if (*ptr < text)
231 continue; 235 continue;
@@ -234,6 +238,7 @@ static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end)
234 /* turn DS segment override prefix into lock prefix */ 238 /* turn DS segment override prefix into lock prefix */
235 text_poke(*ptr, ((unsigned char []){0xf0}), 1); 239 text_poke(*ptr, ((unsigned char []){0xf0}), 1);
236 }; 240 };
241 mutex_unlock(&text_mutex);
237} 242}
238 243
239static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end) 244static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end)
@@ -243,6 +248,7 @@ static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end
243 if (noreplace_smp) 248 if (noreplace_smp)
244 return; 249 return;
245 250
251 mutex_lock(&text_mutex);
246 for (ptr = start; ptr < end; ptr++) { 252 for (ptr = start; ptr < end; ptr++) {
247 if (*ptr < text) 253 if (*ptr < text)
248 continue; 254 continue;
@@ -251,6 +257,7 @@ static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end
251 /* turn lock prefix into DS segment override prefix */ 257 /* turn lock prefix into DS segment override prefix */
252 text_poke(*ptr, ((unsigned char []){0x3E}), 1); 258 text_poke(*ptr, ((unsigned char []){0x3E}), 1);
253 }; 259 };
260 mutex_unlock(&text_mutex);
254} 261}
255 262
256struct smp_alt_module { 263struct smp_alt_module {
@@ -414,9 +421,17 @@ void __init alternative_instructions(void)
414 that might execute the to be patched code. 421 that might execute the to be patched code.
415 Other CPUs are not running. */ 422 Other CPUs are not running. */
416 stop_nmi(); 423 stop_nmi();
417#ifdef CONFIG_X86_MCE 424
418 stop_mce(); 425 /*
419#endif 426 * Don't stop machine check exceptions while patching.
427 * MCEs only happen when something got corrupted and in this
428 * case we must do something about the corruption.
429 * Ignoring it is worse than a unlikely patching race.
430 * Also machine checks tend to be broadcast and if one CPU
431 * goes into machine check the others follow quickly, so we don't
432 * expect a machine check to cause undue problems during to code
433 * patching.
434 */
420 435
421 apply_alternatives(__alt_instructions, __alt_instructions_end); 436 apply_alternatives(__alt_instructions, __alt_instructions_end);
422 437
@@ -456,9 +471,6 @@ void __init alternative_instructions(void)
456 (unsigned long)__smp_locks_end); 471 (unsigned long)__smp_locks_end);
457 472
458 restart_nmi(); 473 restart_nmi();
459#ifdef CONFIG_X86_MCE
460 restart_mce();
461#endif
462} 474}
463 475
464/** 476/**
@@ -495,15 +507,16 @@ void *text_poke_early(void *addr, const void *opcode, size_t len)
495 * It means the size must be writable atomically and the address must be aligned 507 * It means the size must be writable atomically and the address must be aligned
496 * in a way that permits an atomic write. It also makes sure we fit on a single 508 * in a way that permits an atomic write. It also makes sure we fit on a single
497 * page. 509 * page.
510 *
511 * Note: Must be called under text_mutex.
498 */ 512 */
499void *__kprobes text_poke(void *addr, const void *opcode, size_t len) 513void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
500{ 514{
515 unsigned long flags;
501 char *vaddr; 516 char *vaddr;
502 int nr_pages = 2;
503 struct page *pages[2]; 517 struct page *pages[2];
504 int i; 518 int i;
505 519
506 might_sleep();
507 if (!core_kernel_text((unsigned long)addr)) { 520 if (!core_kernel_text((unsigned long)addr)) {
508 pages[0] = vmalloc_to_page(addr); 521 pages[0] = vmalloc_to_page(addr);
509 pages[1] = vmalloc_to_page(addr + PAGE_SIZE); 522 pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
@@ -513,18 +526,21 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
513 pages[1] = virt_to_page(addr + PAGE_SIZE); 526 pages[1] = virt_to_page(addr + PAGE_SIZE);
514 } 527 }
515 BUG_ON(!pages[0]); 528 BUG_ON(!pages[0]);
516 if (!pages[1]) 529 local_irq_save(flags);
517 nr_pages = 1; 530 set_fixmap(FIX_TEXT_POKE0, page_to_phys(pages[0]));
518 vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL); 531 if (pages[1])
519 BUG_ON(!vaddr); 532 set_fixmap(FIX_TEXT_POKE1, page_to_phys(pages[1]));
520 local_irq_disable(); 533 vaddr = (char *)fix_to_virt(FIX_TEXT_POKE0);
521 memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len); 534 memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len);
522 local_irq_enable(); 535 clear_fixmap(FIX_TEXT_POKE0);
523 vunmap(vaddr); 536 if (pages[1])
537 clear_fixmap(FIX_TEXT_POKE1);
538 local_flush_tlb();
524 sync_core(); 539 sync_core();
525 /* Could also do a CLFLUSH here to speed up CPU recovery; but 540 /* Could also do a CLFLUSH here to speed up CPU recovery; but
526 that causes hangs on some VIA CPUs. */ 541 that causes hangs on some VIA CPUs. */
527 for (i = 0; i < len; i++) 542 for (i = 0; i < len; i++)
528 BUG_ON(((char *)addr)[i] != ((char *)opcode)[i]); 543 BUG_ON(((char *)addr)[i] != ((char *)opcode)[i]);
544 local_irq_restore(flags);
529 return addr; 545 return addr;
530} 546}
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 5113c080f0c4..a97db99dad52 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -22,10 +22,9 @@
22#include <linux/bitops.h> 22#include <linux/bitops.h>
23#include <linux/debugfs.h> 23#include <linux/debugfs.h>
24#include <linux/scatterlist.h> 24#include <linux/scatterlist.h>
25#include <linux/dma-mapping.h>
25#include <linux/iommu-helper.h> 26#include <linux/iommu-helper.h>
26#ifdef CONFIG_IOMMU_API
27#include <linux/iommu.h> 27#include <linux/iommu.h>
28#endif
29#include <asm/proto.h> 28#include <asm/proto.h>
30#include <asm/iommu.h> 29#include <asm/iommu.h>
31#include <asm/gart.h> 30#include <asm/gart.h>
@@ -1297,8 +1296,10 @@ static void __unmap_single(struct amd_iommu *iommu,
1297/* 1296/*
1298 * The exported map_single function for dma_ops. 1297 * The exported map_single function for dma_ops.
1299 */ 1298 */
1300static dma_addr_t map_single(struct device *dev, phys_addr_t paddr, 1299static dma_addr_t map_page(struct device *dev, struct page *page,
1301 size_t size, int dir) 1300 unsigned long offset, size_t size,
1301 enum dma_data_direction dir,
1302 struct dma_attrs *attrs)
1302{ 1303{
1303 unsigned long flags; 1304 unsigned long flags;
1304 struct amd_iommu *iommu; 1305 struct amd_iommu *iommu;
@@ -1306,6 +1307,7 @@ static dma_addr_t map_single(struct device *dev, phys_addr_t paddr,
1306 u16 devid; 1307 u16 devid;
1307 dma_addr_t addr; 1308 dma_addr_t addr;
1308 u64 dma_mask; 1309 u64 dma_mask;
1310 phys_addr_t paddr = page_to_phys(page) + offset;
1309 1311
1310 INC_STATS_COUNTER(cnt_map_single); 1312 INC_STATS_COUNTER(cnt_map_single);
1311 1313
@@ -1340,8 +1342,8 @@ out:
1340/* 1342/*
1341 * The exported unmap_single function for dma_ops. 1343 * The exported unmap_single function for dma_ops.
1342 */ 1344 */
1343static void unmap_single(struct device *dev, dma_addr_t dma_addr, 1345static void unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size,
1344 size_t size, int dir) 1346 enum dma_data_direction dir, struct dma_attrs *attrs)
1345{ 1347{
1346 unsigned long flags; 1348 unsigned long flags;
1347 struct amd_iommu *iommu; 1349 struct amd_iommu *iommu;
@@ -1390,7 +1392,8 @@ static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist,
1390 * lists). 1392 * lists).
1391 */ 1393 */
1392static int map_sg(struct device *dev, struct scatterlist *sglist, 1394static int map_sg(struct device *dev, struct scatterlist *sglist,
1393 int nelems, int dir) 1395 int nelems, enum dma_data_direction dir,
1396 struct dma_attrs *attrs)
1394{ 1397{
1395 unsigned long flags; 1398 unsigned long flags;
1396 struct amd_iommu *iommu; 1399 struct amd_iommu *iommu;
@@ -1457,7 +1460,8 @@ unmap:
1457 * lists). 1460 * lists).
1458 */ 1461 */
1459static void unmap_sg(struct device *dev, struct scatterlist *sglist, 1462static void unmap_sg(struct device *dev, struct scatterlist *sglist,
1460 int nelems, int dir) 1463 int nelems, enum dma_data_direction dir,
1464 struct dma_attrs *attrs)
1461{ 1465{
1462 unsigned long flags; 1466 unsigned long flags;
1463 struct amd_iommu *iommu; 1467 struct amd_iommu *iommu;
@@ -1644,11 +1648,11 @@ static void prealloc_protection_domains(void)
1644 } 1648 }
1645} 1649}
1646 1650
1647static struct dma_mapping_ops amd_iommu_dma_ops = { 1651static struct dma_map_ops amd_iommu_dma_ops = {
1648 .alloc_coherent = alloc_coherent, 1652 .alloc_coherent = alloc_coherent,
1649 .free_coherent = free_coherent, 1653 .free_coherent = free_coherent,
1650 .map_single = map_single, 1654 .map_page = map_page,
1651 .unmap_single = unmap_single, 1655 .unmap_page = unmap_page,
1652 .map_sg = map_sg, 1656 .map_sg = map_sg,
1653 .unmap_sg = unmap_sg, 1657 .unmap_sg = unmap_sg,
1654 .dma_supported = amd_iommu_dma_supported, 1658 .dma_supported = amd_iommu_dma_supported,
@@ -1924,6 +1928,12 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
1924 return paddr; 1928 return paddr;
1925} 1929}
1926 1930
1931static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
1932 unsigned long cap)
1933{
1934 return 0;
1935}
1936
1927static struct iommu_ops amd_iommu_ops = { 1937static struct iommu_ops amd_iommu_ops = {
1928 .domain_init = amd_iommu_domain_init, 1938 .domain_init = amd_iommu_domain_init,
1929 .domain_destroy = amd_iommu_domain_destroy, 1939 .domain_destroy = amd_iommu_domain_destroy,
@@ -1932,5 +1942,6 @@ static struct iommu_ops amd_iommu_ops = {
1932 .map = amd_iommu_map_range, 1942 .map = amd_iommu_map_range,
1933 .unmap = amd_iommu_unmap_range, 1943 .unmap = amd_iommu_unmap_range,
1934 .iova_to_phys = amd_iommu_iova_to_phys, 1944 .iova_to_phys = amd_iommu_iova_to_phys,
1945 .domain_has_cap = amd_iommu_domain_has_cap,
1935}; 1946};
1936 1947
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index f9cecdfd05c5..098ec84b8c00 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -46,6 +46,7 @@
46#include <asm/idle.h> 46#include <asm/idle.h>
47#include <asm/mtrr.h> 47#include <asm/mtrr.h>
48#include <asm/smp.h> 48#include <asm/smp.h>
49#include <asm/mce.h>
49 50
50unsigned int num_processors; 51unsigned int num_processors;
51 52
@@ -808,7 +809,7 @@ void clear_local_APIC(void)
808 u32 v; 809 u32 v;
809 810
810 /* APIC hasn't been mapped yet */ 811 /* APIC hasn't been mapped yet */
811 if (!apic_phys) 812 if (!x2apic && !apic_phys)
812 return; 813 return;
813 814
814 maxlvt = lapic_get_maxlvt(); 815 maxlvt = lapic_get_maxlvt();
@@ -842,6 +843,14 @@ void clear_local_APIC(void)
842 apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED); 843 apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED);
843 } 844 }
844#endif 845#endif
846#ifdef CONFIG_X86_MCE_INTEL
847 if (maxlvt >= 6) {
848 v = apic_read(APIC_LVTCMCI);
849 if (!(v & APIC_LVT_MASKED))
850 apic_write(APIC_LVTCMCI, v | APIC_LVT_MASKED);
851 }
852#endif
853
845 /* 854 /*
846 * Clean APIC state for other OSs: 855 * Clean APIC state for other OSs:
847 */ 856 */
@@ -1241,6 +1250,12 @@ void __cpuinit setup_local_APIC(void)
1241 apic_write(APIC_LVT1, value); 1250 apic_write(APIC_LVT1, value);
1242 1251
1243 preempt_enable(); 1252 preempt_enable();
1253
1254#ifdef CONFIG_X86_MCE_INTEL
1255 /* Recheck CMCI information after local APIC is up on CPU #0 */
1256 if (smp_processor_id() == 0)
1257 cmci_recheck();
1258#endif
1244} 1259}
1245 1260
1246void __cpuinit end_local_APIC_setup(void) 1261void __cpuinit end_local_APIC_setup(void)
@@ -1289,6 +1304,7 @@ void __init enable_IR_x2apic(void)
1289#ifdef CONFIG_INTR_REMAP 1304#ifdef CONFIG_INTR_REMAP
1290 int ret; 1305 int ret;
1291 unsigned long flags; 1306 unsigned long flags;
1307 struct IO_APIC_route_entry **ioapic_entries = NULL;
1292 1308
1293 if (!cpu_has_x2apic) 1309 if (!cpu_has_x2apic)
1294 return; 1310 return;
@@ -1319,16 +1335,23 @@ void __init enable_IR_x2apic(void)
1319 return; 1335 return;
1320 } 1336 }
1321 1337
1322 local_irq_save(flags); 1338 ioapic_entries = alloc_ioapic_entries();
1323 mask_8259A(); 1339 if (!ioapic_entries) {
1340 pr_info("Allocate ioapic_entries failed: %d\n", ret);
1341 goto end;
1342 }
1324 1343
1325 ret = save_mask_IO_APIC_setup(); 1344 ret = save_IO_APIC_setup(ioapic_entries);
1326 if (ret) { 1345 if (ret) {
1327 pr_info("Saving IO-APIC state failed: %d\n", ret); 1346 pr_info("Saving IO-APIC state failed: %d\n", ret);
1328 goto end; 1347 goto end;
1329 } 1348 }
1330 1349
1331 ret = enable_intr_remapping(1); 1350 local_irq_save(flags);
1351 mask_IO_APIC_setup(ioapic_entries);
1352 mask_8259A();
1353
1354 ret = enable_intr_remapping(EIM_32BIT_APIC_ID);
1332 1355
1333 if (ret && x2apic_preenabled) { 1356 if (ret && x2apic_preenabled) {
1334 local_irq_restore(flags); 1357 local_irq_restore(flags);
@@ -1348,14 +1371,14 @@ end_restore:
1348 /* 1371 /*
1349 * IR enabling failed 1372 * IR enabling failed
1350 */ 1373 */
1351 restore_IO_APIC_setup(); 1374 restore_IO_APIC_setup(ioapic_entries);
1352 else 1375 else
1353 reinit_intr_remapped_IO_APIC(x2apic_preenabled); 1376 reinit_intr_remapped_IO_APIC(x2apic_preenabled, ioapic_entries);
1354 1377
1355end:
1356 unmask_8259A(); 1378 unmask_8259A();
1357 local_irq_restore(flags); 1379 local_irq_restore(flags);
1358 1380
1381end:
1359 if (!ret) { 1382 if (!ret) {
1360 if (!x2apic_preenabled) 1383 if (!x2apic_preenabled)
1361 pr_info("Enabled x2apic and interrupt-remapping\n"); 1384 pr_info("Enabled x2apic and interrupt-remapping\n");
@@ -1363,6 +1386,8 @@ end:
1363 pr_info("Enabled Interrupt-remapping\n"); 1386 pr_info("Enabled Interrupt-remapping\n");
1364 } else 1387 } else
1365 pr_err("Failed to enable Interrupt-remapping and x2apic\n"); 1388 pr_err("Failed to enable Interrupt-remapping and x2apic\n");
1389 if (ioapic_entries)
1390 free_ioapic_entries(ioapic_entries);
1366#else 1391#else
1367 if (!cpu_has_x2apic) 1392 if (!cpu_has_x2apic)
1368 return; 1393 return;
@@ -1508,12 +1533,10 @@ void __init early_init_lapic_mapping(void)
1508 */ 1533 */
1509void __init init_apic_mappings(void) 1534void __init init_apic_mappings(void)
1510{ 1535{
1511#ifdef CONFIG_X86_X2APIC
1512 if (x2apic) { 1536 if (x2apic) {
1513 boot_cpu_physical_apicid = read_apic_id(); 1537 boot_cpu_physical_apicid = read_apic_id();
1514 return; 1538 return;
1515 } 1539 }
1516#endif
1517 1540
1518 /* 1541 /*
1519 * If no local APIC can be found then set up a fake all 1542 * If no local APIC can be found then set up a fake all
@@ -1940,6 +1963,10 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state)
1940 1963
1941 local_irq_save(flags); 1964 local_irq_save(flags);
1942 disable_local_APIC(); 1965 disable_local_APIC();
1966#ifdef CONFIG_INTR_REMAP
1967 if (intr_remapping_enabled)
1968 disable_intr_remapping();
1969#endif
1943 local_irq_restore(flags); 1970 local_irq_restore(flags);
1944 return 0; 1971 return 0;
1945} 1972}
@@ -1950,19 +1977,42 @@ static int lapic_resume(struct sys_device *dev)
1950 unsigned long flags; 1977 unsigned long flags;
1951 int maxlvt; 1978 int maxlvt;
1952 1979
1980#ifdef CONFIG_INTR_REMAP
1981 int ret;
1982 struct IO_APIC_route_entry **ioapic_entries = NULL;
1983
1953 if (!apic_pm_state.active) 1984 if (!apic_pm_state.active)
1954 return 0; 1985 return 0;
1955 1986
1956 maxlvt = lapic_get_maxlvt();
1957
1958 local_irq_save(flags); 1987 local_irq_save(flags);
1988 if (x2apic) {
1989 ioapic_entries = alloc_ioapic_entries();
1990 if (!ioapic_entries) {
1991 WARN(1, "Alloc ioapic_entries in lapic resume failed.");
1992 return -ENOMEM;
1993 }
1959 1994
1960#ifdef CONFIG_X86_X2APIC 1995 ret = save_IO_APIC_setup(ioapic_entries);
1996 if (ret) {
1997 WARN(1, "Saving IO-APIC state failed: %d\n", ret);
1998 free_ioapic_entries(ioapic_entries);
1999 return ret;
2000 }
2001
2002 mask_IO_APIC_setup(ioapic_entries);
2003 mask_8259A();
2004 enable_x2apic();
2005 }
2006#else
2007 if (!apic_pm_state.active)
2008 return 0;
2009
2010 local_irq_save(flags);
1961 if (x2apic) 2011 if (x2apic)
1962 enable_x2apic(); 2012 enable_x2apic();
1963 else
1964#endif 2013#endif
1965 { 2014
2015 else {
1966 /* 2016 /*
1967 * Make sure the APICBASE points to the right address 2017 * Make sure the APICBASE points to the right address
1968 * 2018 *
@@ -1975,6 +2025,7 @@ static int lapic_resume(struct sys_device *dev)
1975 wrmsr(MSR_IA32_APICBASE, l, h); 2025 wrmsr(MSR_IA32_APICBASE, l, h);
1976 } 2026 }
1977 2027
2028 maxlvt = lapic_get_maxlvt();
1978 apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED); 2029 apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
1979 apic_write(APIC_ID, apic_pm_state.apic_id); 2030 apic_write(APIC_ID, apic_pm_state.apic_id);
1980 apic_write(APIC_DFR, apic_pm_state.apic_dfr); 2031 apic_write(APIC_DFR, apic_pm_state.apic_dfr);
@@ -1998,8 +2049,20 @@ static int lapic_resume(struct sys_device *dev)
1998 apic_write(APIC_ESR, 0); 2049 apic_write(APIC_ESR, 0);
1999 apic_read(APIC_ESR); 2050 apic_read(APIC_ESR);
2000 2051
2052#ifdef CONFIG_INTR_REMAP
2053 if (intr_remapping_enabled)
2054 reenable_intr_remapping(EIM_32BIT_APIC_ID);
2055
2056 if (x2apic) {
2057 unmask_8259A();
2058 restore_IO_APIC_setup(ioapic_entries);
2059 free_ioapic_entries(ioapic_entries);
2060 }
2061#endif
2062
2001 local_irq_restore(flags); 2063 local_irq_restore(flags);
2002 2064
2065
2003 return 0; 2066 return 0;
2004} 2067}
2005 2068
@@ -2037,7 +2100,9 @@ static int __init init_lapic_sysfs(void)
2037 error = sysdev_register(&device_lapic); 2100 error = sysdev_register(&device_lapic);
2038 return error; 2101 return error;
2039} 2102}
2040device_initcall(init_lapic_sysfs); 2103
2104/* local apic needs to resume before other devices access its registers. */
2105core_initcall(init_lapic_sysfs);
2041 2106
2042#else /* CONFIG_PM */ 2107#else /* CONFIG_PM */
2043 2108
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
index f933822dba18..0014714ea97b 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -159,20 +159,6 @@ static int flat_apic_id_registered(void)
159 return physid_isset(read_xapic_id(), phys_cpu_present_map); 159 return physid_isset(read_xapic_id(), phys_cpu_present_map);
160} 160}
161 161
162static unsigned int flat_cpu_mask_to_apicid(const struct cpumask *cpumask)
163{
164 return cpumask_bits(cpumask)[0] & APIC_ALL_CPUS;
165}
166
167static unsigned int flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
168 const struct cpumask *andmask)
169{
170 unsigned long mask1 = cpumask_bits(cpumask)[0] & APIC_ALL_CPUS;
171 unsigned long mask2 = cpumask_bits(andmask)[0] & APIC_ALL_CPUS;
172
173 return mask1 & mask2;
174}
175
176static int flat_phys_pkg_id(int initial_apic_id, int index_msb) 162static int flat_phys_pkg_id(int initial_apic_id, int index_msb)
177{ 163{
178 return hard_smp_processor_id() >> index_msb; 164 return hard_smp_processor_id() >> index_msb;
@@ -213,8 +199,8 @@ struct apic apic_flat = {
213 .set_apic_id = set_apic_id, 199 .set_apic_id = set_apic_id,
214 .apic_id_mask = 0xFFu << 24, 200 .apic_id_mask = 0xFFu << 24,
215 201
216 .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, 202 .cpu_mask_to_apicid = default_cpu_mask_to_apicid,
217 .cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and, 203 .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
218 204
219 .send_IPI_mask = flat_send_IPI_mask, 205 .send_IPI_mask = flat_send_IPI_mask,
220 .send_IPI_mask_allbutself = flat_send_IPI_mask_allbutself, 206 .send_IPI_mask_allbutself = flat_send_IPI_mask_allbutself,
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
index d806ecaa948f..676cdac385c0 100644
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -26,12 +26,12 @@ static int bigsmp_apic_id_registered(void)
26 return 1; 26 return 1;
27} 27}
28 28
29static const cpumask_t *bigsmp_target_cpus(void) 29static const struct cpumask *bigsmp_target_cpus(void)
30{ 30{
31#ifdef CONFIG_SMP 31#ifdef CONFIG_SMP
32 return &cpu_online_map; 32 return cpu_online_mask;
33#else 33#else
34 return &cpumask_of_cpu(0); 34 return cpumask_of(0);
35#endif 35#endif
36} 36}
37 37
@@ -118,9 +118,9 @@ static int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
118} 118}
119 119
120/* As we are using single CPU as destination, pick only one CPU here */ 120/* As we are using single CPU as destination, pick only one CPU here */
121static unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask) 121static unsigned int bigsmp_cpu_mask_to_apicid(const struct cpumask *cpumask)
122{ 122{
123 return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask)); 123 return bigsmp_cpu_to_logical_apicid(cpumask_first(cpumask));
124} 124}
125 125
126static unsigned int bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask, 126static unsigned int bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
@@ -188,10 +188,10 @@ static const struct dmi_system_id bigsmp_dmi_table[] = {
188 { } /* NULL entry stops DMI scanning */ 188 { } /* NULL entry stops DMI scanning */
189}; 189};
190 190
191static void bigsmp_vector_allocation_domain(int cpu, cpumask_t *retmask) 191static void bigsmp_vector_allocation_domain(int cpu, struct cpumask *retmask)
192{ 192{
193 cpus_clear(*retmask); 193 cpumask_clear(retmask);
194 cpu_set(cpu, *retmask); 194 cpumask_set_cpu(cpu, retmask);
195} 195}
196 196
197static int probe_bigsmp(void) 197static int probe_bigsmp(void)
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c
index 19588f2770ee..1c11b819f245 100644
--- a/arch/x86/kernel/apic/es7000_32.c
+++ b/arch/x86/kernel/apic/es7000_32.c
@@ -410,7 +410,7 @@ static void es7000_enable_apic_mode(void)
410 WARN(1, "Command failed, status = %x\n", mip_status); 410 WARN(1, "Command failed, status = %x\n", mip_status);
411} 411}
412 412
413static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask) 413static void es7000_vector_allocation_domain(int cpu, struct cpumask *retmask)
414{ 414{
415 /* Careful. Some cpus do not strictly honor the set of cpus 415 /* Careful. Some cpus do not strictly honor the set of cpus
416 * specified in the interrupt destination when using lowest 416 * specified in the interrupt destination when using lowest
@@ -420,7 +420,8 @@ static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
420 * deliver interrupts to the wrong hyperthread when only one 420 * deliver interrupts to the wrong hyperthread when only one
421 * hyperthread was specified in the interrupt desitination. 421 * hyperthread was specified in the interrupt desitination.
422 */ 422 */
423 *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; 423 cpumask_clear(retmask);
424 cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
424} 425}
425 426
426 427
@@ -455,14 +456,14 @@ static int es7000_apic_id_registered(void)
455 return 1; 456 return 1;
456} 457}
457 458
458static const cpumask_t *target_cpus_cluster(void) 459static const struct cpumask *target_cpus_cluster(void)
459{ 460{
460 return &CPU_MASK_ALL; 461 return cpu_all_mask;
461} 462}
462 463
463static const cpumask_t *es7000_target_cpus(void) 464static const struct cpumask *es7000_target_cpus(void)
464{ 465{
465 return &cpumask_of_cpu(smp_processor_id()); 466 return cpumask_of(smp_processor_id());
466} 467}
467 468
468static unsigned long 469static unsigned long
@@ -517,7 +518,7 @@ static void es7000_setup_apic_routing(void)
517 "Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n", 518 "Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
518 (apic_version[apic] == 0x14) ? 519 (apic_version[apic] == 0x14) ?
519 "Physical Cluster" : "Logical Cluster", 520 "Physical Cluster" : "Logical Cluster",
520 nr_ioapics, cpus_addr(*es7000_target_cpus())[0]); 521 nr_ioapics, cpumask_bits(es7000_target_cpus())[0]);
521} 522}
522 523
523static int es7000_apicid_to_node(int logical_apicid) 524static int es7000_apicid_to_node(int logical_apicid)
@@ -572,7 +573,7 @@ static int es7000_check_phys_apicid_present(int cpu_physical_apicid)
572 return 1; 573 return 1;
573} 574}
574 575
575static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask) 576static unsigned int es7000_cpu_mask_to_apicid(const struct cpumask *cpumask)
576{ 577{
577 unsigned int round = 0; 578 unsigned int round = 0;
578 int cpu, uninitialized_var(apicid); 579 int cpu, uninitialized_var(apicid);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 00e6071cefc4..767fe7e46d68 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -389,6 +389,8 @@ struct io_apic {
389 unsigned int index; 389 unsigned int index;
390 unsigned int unused[3]; 390 unsigned int unused[3];
391 unsigned int data; 391 unsigned int data;
392 unsigned int unused2[11];
393 unsigned int eoi;
392}; 394};
393 395
394static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx) 396static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
@@ -397,6 +399,12 @@ static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
397 + (mp_ioapics[idx].apicaddr & ~PAGE_MASK); 399 + (mp_ioapics[idx].apicaddr & ~PAGE_MASK);
398} 400}
399 401
402static inline void io_apic_eoi(unsigned int apic, unsigned int vector)
403{
404 struct io_apic __iomem *io_apic = io_apic_base(apic);
405 writel(vector, &io_apic->eoi);
406}
407
400static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) 408static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
401{ 409{
402 struct io_apic __iomem *io_apic = io_apic_base(apic); 410 struct io_apic __iomem *io_apic = io_apic_base(apic);
@@ -546,16 +554,12 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq
546 554
547 apic = entry->apic; 555 apic = entry->apic;
548 pin = entry->pin; 556 pin = entry->pin;
549#ifdef CONFIG_INTR_REMAP
550 /* 557 /*
551 * With interrupt-remapping, destination information comes 558 * With interrupt-remapping, destination information comes
552 * from interrupt-remapping table entry. 559 * from interrupt-remapping table entry.
553 */ 560 */
554 if (!irq_remapped(irq)) 561 if (!irq_remapped(irq))
555 io_apic_write(apic, 0x11 + pin*2, dest); 562 io_apic_write(apic, 0x11 + pin*2, dest);
556#else
557 io_apic_write(apic, 0x11 + pin*2, dest);
558#endif
559 reg = io_apic_read(apic, 0x10 + pin*2); 563 reg = io_apic_read(apic, 0x10 + pin*2);
560 reg &= ~IO_APIC_REDIR_VECTOR_MASK; 564 reg &= ~IO_APIC_REDIR_VECTOR_MASK;
561 reg |= vector; 565 reg |= vector;
@@ -588,10 +592,12 @@ set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask)
588 if (assign_irq_vector(irq, cfg, mask)) 592 if (assign_irq_vector(irq, cfg, mask))
589 return BAD_APICID; 593 return BAD_APICID;
590 594
591 cpumask_and(desc->affinity, cfg->domain, mask); 595 /* check that before desc->addinity get updated */
592 set_extra_move_desc(desc, mask); 596 set_extra_move_desc(desc, mask);
593 597
594 return apic->cpu_mask_to_apicid_and(desc->affinity, cpu_online_mask); 598 cpumask_copy(desc->affinity, mask);
599
600 return apic->cpu_mask_to_apicid_and(desc->affinity, cfg->domain);
595} 601}
596 602
597static void 603static void
@@ -845,75 +851,106 @@ __setup("pirq=", ioapic_pirq_setup);
845#endif /* CONFIG_X86_32 */ 851#endif /* CONFIG_X86_32 */
846 852
847#ifdef CONFIG_INTR_REMAP 853#ifdef CONFIG_INTR_REMAP
848/* I/O APIC RTE contents at the OS boot up */ 854struct IO_APIC_route_entry **alloc_ioapic_entries(void)
849static struct IO_APIC_route_entry *early_ioapic_entries[MAX_IO_APICS]; 855{
856 int apic;
857 struct IO_APIC_route_entry **ioapic_entries;
858
859 ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics,
860 GFP_ATOMIC);
861 if (!ioapic_entries)
862 return 0;
863
864 for (apic = 0; apic < nr_ioapics; apic++) {
865 ioapic_entries[apic] =
866 kzalloc(sizeof(struct IO_APIC_route_entry) *
867 nr_ioapic_registers[apic], GFP_ATOMIC);
868 if (!ioapic_entries[apic])
869 goto nomem;
870 }
871
872 return ioapic_entries;
873
874nomem:
875 while (--apic >= 0)
876 kfree(ioapic_entries[apic]);
877 kfree(ioapic_entries);
878
879 return 0;
880}
850 881
851/* 882/*
852 * Saves and masks all the unmasked IO-APIC RTE's 883 * Saves all the IO-APIC RTE's
853 */ 884 */
854int save_mask_IO_APIC_setup(void) 885int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
855{ 886{
856 union IO_APIC_reg_01 reg_01;
857 unsigned long flags;
858 int apic, pin; 887 int apic, pin;
859 888
860 /* 889 if (!ioapic_entries)
861 * The number of IO-APIC IRQ registers (== #pins): 890 return -ENOMEM;
862 */ 891
863 for (apic = 0; apic < nr_ioapics; apic++) { 892 for (apic = 0; apic < nr_ioapics; apic++) {
864 spin_lock_irqsave(&ioapic_lock, flags); 893 if (!ioapic_entries[apic])
865 reg_01.raw = io_apic_read(apic, 1); 894 return -ENOMEM;
866 spin_unlock_irqrestore(&ioapic_lock, flags); 895
867 nr_ioapic_registers[apic] = reg_01.bits.entries+1; 896 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
897 ioapic_entries[apic][pin] =
898 ioapic_read_entry(apic, pin);
868 } 899 }
869 900
901 return 0;
902}
903
904/*
905 * Mask all IO APIC entries.
906 */
907void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
908{
909 int apic, pin;
910
911 if (!ioapic_entries)
912 return;
913
870 for (apic = 0; apic < nr_ioapics; apic++) { 914 for (apic = 0; apic < nr_ioapics; apic++) {
871 early_ioapic_entries[apic] = 915 if (!ioapic_entries[apic])
872 kzalloc(sizeof(struct IO_APIC_route_entry) * 916 break;
873 nr_ioapic_registers[apic], GFP_KERNEL);
874 if (!early_ioapic_entries[apic])
875 goto nomem;
876 }
877 917
878 for (apic = 0; apic < nr_ioapics; apic++)
879 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { 918 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
880 struct IO_APIC_route_entry entry; 919 struct IO_APIC_route_entry entry;
881 920
882 entry = early_ioapic_entries[apic][pin] = 921 entry = ioapic_entries[apic][pin];
883 ioapic_read_entry(apic, pin);
884 if (!entry.mask) { 922 if (!entry.mask) {
885 entry.mask = 1; 923 entry.mask = 1;
886 ioapic_write_entry(apic, pin, entry); 924 ioapic_write_entry(apic, pin, entry);
887 } 925 }
888 } 926 }
889 927 }
890 return 0;
891
892nomem:
893 while (apic >= 0)
894 kfree(early_ioapic_entries[apic--]);
895 memset(early_ioapic_entries, 0,
896 ARRAY_SIZE(early_ioapic_entries));
897
898 return -ENOMEM;
899} 928}
900 929
901void restore_IO_APIC_setup(void) 930/*
931 * Restore IO APIC entries which was saved in ioapic_entries.
932 */
933int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
902{ 934{
903 int apic, pin; 935 int apic, pin;
904 936
937 if (!ioapic_entries)
938 return -ENOMEM;
939
905 for (apic = 0; apic < nr_ioapics; apic++) { 940 for (apic = 0; apic < nr_ioapics; apic++) {
906 if (!early_ioapic_entries[apic]) 941 if (!ioapic_entries[apic])
907 break; 942 return -ENOMEM;
943
908 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) 944 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
909 ioapic_write_entry(apic, pin, 945 ioapic_write_entry(apic, pin,
910 early_ioapic_entries[apic][pin]); 946 ioapic_entries[apic][pin]);
911 kfree(early_ioapic_entries[apic]);
912 early_ioapic_entries[apic] = NULL;
913 } 947 }
948 return 0;
914} 949}
915 950
916void reinit_intr_remapped_IO_APIC(int intr_remapping) 951void reinit_intr_remapped_IO_APIC(int intr_remapping,
952 struct IO_APIC_route_entry **ioapic_entries)
953
917{ 954{
918 /* 955 /*
919 * for now plain restore of previous settings. 956 * for now plain restore of previous settings.
@@ -922,7 +959,17 @@ void reinit_intr_remapped_IO_APIC(int intr_remapping)
922 * table entries. for now, do a plain restore, and wait for 959 * table entries. for now, do a plain restore, and wait for
923 * the setup_IO_APIC_irqs() to do proper initialization. 960 * the setup_IO_APIC_irqs() to do proper initialization.
924 */ 961 */
925 restore_IO_APIC_setup(); 962 restore_IO_APIC_setup(ioapic_entries);
963}
964
965void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries)
966{
967 int apic;
968
969 for (apic = 0; apic < nr_ioapics; apic++)
970 kfree(ioapic_entries[apic]);
971
972 kfree(ioapic_entries);
926} 973}
927#endif 974#endif
928 975
@@ -1411,9 +1458,7 @@ void __setup_vector_irq(int cpu)
1411} 1458}
1412 1459
1413static struct irq_chip ioapic_chip; 1460static struct irq_chip ioapic_chip;
1414#ifdef CONFIG_INTR_REMAP
1415static struct irq_chip ir_ioapic_chip; 1461static struct irq_chip ir_ioapic_chip;
1416#endif
1417 1462
1418#define IOAPIC_AUTO -1 1463#define IOAPIC_AUTO -1
1419#define IOAPIC_EDGE 0 1464#define IOAPIC_EDGE 0
@@ -1452,7 +1497,6 @@ static void ioapic_register_intr(int irq, struct irq_desc *desc, unsigned long t
1452 else 1497 else
1453 desc->status &= ~IRQ_LEVEL; 1498 desc->status &= ~IRQ_LEVEL;
1454 1499
1455#ifdef CONFIG_INTR_REMAP
1456 if (irq_remapped(irq)) { 1500 if (irq_remapped(irq)) {
1457 desc->status |= IRQ_MOVE_PCNTXT; 1501 desc->status |= IRQ_MOVE_PCNTXT;
1458 if (trigger) 1502 if (trigger)
@@ -1464,7 +1508,7 @@ static void ioapic_register_intr(int irq, struct irq_desc *desc, unsigned long t
1464 handle_edge_irq, "edge"); 1508 handle_edge_irq, "edge");
1465 return; 1509 return;
1466 } 1510 }
1467#endif 1511
1468 if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || 1512 if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
1469 trigger == IOAPIC_LEVEL) 1513 trigger == IOAPIC_LEVEL)
1470 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1514 set_irq_chip_and_handler_name(irq, &ioapic_chip,
@@ -1478,14 +1522,13 @@ static void ioapic_register_intr(int irq, struct irq_desc *desc, unsigned long t
1478int setup_ioapic_entry(int apic_id, int irq, 1522int setup_ioapic_entry(int apic_id, int irq,
1479 struct IO_APIC_route_entry *entry, 1523 struct IO_APIC_route_entry *entry,
1480 unsigned int destination, int trigger, 1524 unsigned int destination, int trigger,
1481 int polarity, int vector) 1525 int polarity, int vector, int pin)
1482{ 1526{
1483 /* 1527 /*
1484 * add it to the IO-APIC irq-routing table: 1528 * add it to the IO-APIC irq-routing table:
1485 */ 1529 */
1486 memset(entry,0,sizeof(*entry)); 1530 memset(entry,0,sizeof(*entry));
1487 1531
1488#ifdef CONFIG_INTR_REMAP
1489 if (intr_remapping_enabled) { 1532 if (intr_remapping_enabled) {
1490 struct intel_iommu *iommu = map_ioapic_to_ir(apic_id); 1533 struct intel_iommu *iommu = map_ioapic_to_ir(apic_id);
1491 struct irte irte; 1534 struct irte irte;
@@ -1504,7 +1547,14 @@ int setup_ioapic_entry(int apic_id, int irq,
1504 1547
1505 irte.present = 1; 1548 irte.present = 1;
1506 irte.dst_mode = apic->irq_dest_mode; 1549 irte.dst_mode = apic->irq_dest_mode;
1507 irte.trigger_mode = trigger; 1550 /*
1551 * Trigger mode in the IRTE will always be edge, and the
1552 * actual level or edge trigger will be setup in the IO-APIC
1553 * RTE. This will help simplify level triggered irq migration.
1554 * For more details, see the comments above explainig IO-APIC
1555 * irq migration in the presence of interrupt-remapping.
1556 */
1557 irte.trigger_mode = 0;
1508 irte.dlvry_mode = apic->irq_delivery_mode; 1558 irte.dlvry_mode = apic->irq_delivery_mode;
1509 irte.vector = vector; 1559 irte.vector = vector;
1510 irte.dest_id = IRTE_DEST(destination); 1560 irte.dest_id = IRTE_DEST(destination);
@@ -1515,18 +1565,21 @@ int setup_ioapic_entry(int apic_id, int irq,
1515 ir_entry->zero = 0; 1565 ir_entry->zero = 0;
1516 ir_entry->format = 1; 1566 ir_entry->format = 1;
1517 ir_entry->index = (index & 0x7fff); 1567 ir_entry->index = (index & 0x7fff);
1518 } else 1568 /*
1519#endif 1569 * IO-APIC RTE will be configured with virtual vector.
1520 { 1570 * irq handler will do the explicit EOI to the io-apic.
1571 */
1572 ir_entry->vector = pin;
1573 } else {
1521 entry->delivery_mode = apic->irq_delivery_mode; 1574 entry->delivery_mode = apic->irq_delivery_mode;
1522 entry->dest_mode = apic->irq_dest_mode; 1575 entry->dest_mode = apic->irq_dest_mode;
1523 entry->dest = destination; 1576 entry->dest = destination;
1577 entry->vector = vector;
1524 } 1578 }
1525 1579
1526 entry->mask = 0; /* enable IRQ */ 1580 entry->mask = 0; /* enable IRQ */
1527 entry->trigger = trigger; 1581 entry->trigger = trigger;
1528 entry->polarity = polarity; 1582 entry->polarity = polarity;
1529 entry->vector = vector;
1530 1583
1531 /* Mask level triggered irqs. 1584 /* Mask level triggered irqs.
1532 * Use IRQ_DELAYED_DISABLE for edge triggered irqs. 1585 * Use IRQ_DELAYED_DISABLE for edge triggered irqs.
@@ -1561,7 +1614,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
1561 1614
1562 1615
1563 if (setup_ioapic_entry(mp_ioapics[apic_id].apicid, irq, &entry, 1616 if (setup_ioapic_entry(mp_ioapics[apic_id].apicid, irq, &entry,
1564 dest, trigger, polarity, cfg->vector)) { 1617 dest, trigger, polarity, cfg->vector, pin)) {
1565 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n", 1618 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n",
1566 mp_ioapics[apic_id].apicid, pin); 1619 mp_ioapics[apic_id].apicid, pin);
1567 __clear_irq_vector(irq, cfg); 1620 __clear_irq_vector(irq, cfg);
@@ -1642,10 +1695,8 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin,
1642{ 1695{
1643 struct IO_APIC_route_entry entry; 1696 struct IO_APIC_route_entry entry;
1644 1697
1645#ifdef CONFIG_INTR_REMAP
1646 if (intr_remapping_enabled) 1698 if (intr_remapping_enabled)
1647 return; 1699 return;
1648#endif
1649 1700
1650 memset(&entry, 0, sizeof(entry)); 1701 memset(&entry, 0, sizeof(entry));
1651 1702
@@ -2040,8 +2091,13 @@ void disable_IO_APIC(void)
2040 * If the i8259 is routed through an IOAPIC 2091 * If the i8259 is routed through an IOAPIC
2041 * Put that IOAPIC in virtual wire mode 2092 * Put that IOAPIC in virtual wire mode
2042 * so legacy interrupts can be delivered. 2093 * so legacy interrupts can be delivered.
2094 *
2095 * With interrupt-remapping, for now we will use virtual wire A mode,
2096 * as virtual wire B is little complex (need to configure both
2097 * IOAPIC RTE aswell as interrupt-remapping table entry).
2098 * As this gets called during crash dump, keep this simple for now.
2043 */ 2099 */
2044 if (ioapic_i8259.pin != -1) { 2100 if (ioapic_i8259.pin != -1 && !intr_remapping_enabled) {
2045 struct IO_APIC_route_entry entry; 2101 struct IO_APIC_route_entry entry;
2046 2102
2047 memset(&entry, 0, sizeof(entry)); 2103 memset(&entry, 0, sizeof(entry));
@@ -2061,7 +2117,10 @@ void disable_IO_APIC(void)
2061 ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); 2117 ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry);
2062 } 2118 }
2063 2119
2064 disconnect_bsp_APIC(ioapic_i8259.pin != -1); 2120 /*
2121 * Use virtual wire A mode when interrupt remapping is enabled.
2122 */
2123 disconnect_bsp_APIC(!intr_remapping_enabled && ioapic_i8259.pin != -1);
2065} 2124}
2066 2125
2067#ifdef CONFIG_X86_32 2126#ifdef CONFIG_X86_32
@@ -2303,37 +2362,24 @@ static int ioapic_retrigger_irq(unsigned int irq)
2303#ifdef CONFIG_SMP 2362#ifdef CONFIG_SMP
2304 2363
2305#ifdef CONFIG_INTR_REMAP 2364#ifdef CONFIG_INTR_REMAP
2306static void ir_irq_migration(struct work_struct *work);
2307
2308static DECLARE_DELAYED_WORK(ir_migration_work, ir_irq_migration);
2309 2365
2310/* 2366/*
2311 * Migrate the IO-APIC irq in the presence of intr-remapping. 2367 * Migrate the IO-APIC irq in the presence of intr-remapping.
2312 * 2368 *
2313 * For edge triggered, irq migration is a simple atomic update(of vector 2369 * For both level and edge triggered, irq migration is a simple atomic
2314 * and cpu destination) of IRTE and flush the hardware cache. 2370 * update(of vector and cpu destination) of IRTE and flush the hardware cache.
2315 *
2316 * For level triggered, we need to modify the io-apic RTE aswell with the update
2317 * vector information, along with modifying IRTE with vector and destination.
2318 * So irq migration for level triggered is little bit more complex compared to
2319 * edge triggered migration. But the good news is, we use the same algorithm
2320 * for level triggered migration as we have today, only difference being,
2321 * we now initiate the irq migration from process context instead of the
2322 * interrupt context.
2323 * 2371 *
2324 * In future, when we do a directed EOI (combined with cpu EOI broadcast 2372 * For level triggered, we eliminate the io-apic RTE modification (with the
2325 * suppression) to the IO-APIC, level triggered irq migration will also be 2373 * updated vector information), by using a virtual vector (io-apic pin number).
2326 * as simple as edge triggered migration and we can do the irq migration 2374 * Real vector that is used for interrupting cpu will be coming from
2327 * with a simple atomic update to IO-APIC RTE. 2375 * the interrupt-remapping table entry.
2328 */ 2376 */
2329static void 2377static void
2330migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask) 2378migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask)
2331{ 2379{
2332 struct irq_cfg *cfg; 2380 struct irq_cfg *cfg;
2333 struct irte irte; 2381 struct irte irte;
2334 int modify_ioapic_rte;
2335 unsigned int dest; 2382 unsigned int dest;
2336 unsigned long flags;
2337 unsigned int irq; 2383 unsigned int irq;
2338 2384
2339 if (!cpumask_intersects(mask, cpu_online_mask)) 2385 if (!cpumask_intersects(mask, cpu_online_mask))
@@ -2351,13 +2397,6 @@ migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask)
2351 2397
2352 dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask); 2398 dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask);
2353 2399
2354 modify_ioapic_rte = desc->status & IRQ_LEVEL;
2355 if (modify_ioapic_rte) {
2356 spin_lock_irqsave(&ioapic_lock, flags);
2357 __target_IO_APIC_irq(irq, dest, cfg);
2358 spin_unlock_irqrestore(&ioapic_lock, flags);
2359 }
2360
2361 irte.vector = cfg->vector; 2400 irte.vector = cfg->vector;
2362 irte.dest_id = IRTE_DEST(dest); 2401 irte.dest_id = IRTE_DEST(dest);
2363 2402
@@ -2372,73 +2411,12 @@ migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask)
2372 cpumask_copy(desc->affinity, mask); 2411 cpumask_copy(desc->affinity, mask);
2373} 2412}
2374 2413
2375static int migrate_irq_remapped_level_desc(struct irq_desc *desc)
2376{
2377 int ret = -1;
2378 struct irq_cfg *cfg = desc->chip_data;
2379
2380 mask_IO_APIC_irq_desc(desc);
2381
2382 if (io_apic_level_ack_pending(cfg)) {
2383 /*
2384 * Interrupt in progress. Migrating irq now will change the
2385 * vector information in the IO-APIC RTE and that will confuse
2386 * the EOI broadcast performed by cpu.
2387 * So, delay the irq migration to the next instance.
2388 */
2389 schedule_delayed_work(&ir_migration_work, 1);
2390 goto unmask;
2391 }
2392
2393 /* everthing is clear. we have right of way */
2394 migrate_ioapic_irq_desc(desc, desc->pending_mask);
2395
2396 ret = 0;
2397 desc->status &= ~IRQ_MOVE_PENDING;
2398 cpumask_clear(desc->pending_mask);
2399
2400unmask:
2401 unmask_IO_APIC_irq_desc(desc);
2402
2403 return ret;
2404}
2405
2406static void ir_irq_migration(struct work_struct *work)
2407{
2408 unsigned int irq;
2409 struct irq_desc *desc;
2410
2411 for_each_irq_desc(irq, desc) {
2412 if (desc->status & IRQ_MOVE_PENDING) {
2413 unsigned long flags;
2414
2415 spin_lock_irqsave(&desc->lock, flags);
2416 if (!desc->chip->set_affinity ||
2417 !(desc->status & IRQ_MOVE_PENDING)) {
2418 desc->status &= ~IRQ_MOVE_PENDING;
2419 spin_unlock_irqrestore(&desc->lock, flags);
2420 continue;
2421 }
2422
2423 desc->chip->set_affinity(irq, desc->pending_mask);
2424 spin_unlock_irqrestore(&desc->lock, flags);
2425 }
2426 }
2427}
2428
2429/* 2414/*
2430 * Migrates the IRQ destination in the process context. 2415 * Migrates the IRQ destination in the process context.
2431 */ 2416 */
2432static void set_ir_ioapic_affinity_irq_desc(struct irq_desc *desc, 2417static void set_ir_ioapic_affinity_irq_desc(struct irq_desc *desc,
2433 const struct cpumask *mask) 2418 const struct cpumask *mask)
2434{ 2419{
2435 if (desc->status & IRQ_LEVEL) {
2436 desc->status |= IRQ_MOVE_PENDING;
2437 cpumask_copy(desc->pending_mask, mask);
2438 migrate_irq_remapped_level_desc(desc);
2439 return;
2440 }
2441
2442 migrate_ioapic_irq_desc(desc, mask); 2420 migrate_ioapic_irq_desc(desc, mask);
2443} 2421}
2444static void set_ir_ioapic_affinity_irq(unsigned int irq, 2422static void set_ir_ioapic_affinity_irq(unsigned int irq,
@@ -2448,6 +2426,11 @@ static void set_ir_ioapic_affinity_irq(unsigned int irq,
2448 2426
2449 set_ir_ioapic_affinity_irq_desc(desc, mask); 2427 set_ir_ioapic_affinity_irq_desc(desc, mask);
2450} 2428}
2429#else
2430static inline void set_ir_ioapic_affinity_irq_desc(struct irq_desc *desc,
2431 const struct cpumask *mask)
2432{
2433}
2451#endif 2434#endif
2452 2435
2453asmlinkage void smp_irq_move_cleanup_interrupt(void) 2436asmlinkage void smp_irq_move_cleanup_interrupt(void)
@@ -2461,6 +2444,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
2461 me = smp_processor_id(); 2444 me = smp_processor_id();
2462 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { 2445 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
2463 unsigned int irq; 2446 unsigned int irq;
2447 unsigned int irr;
2464 struct irq_desc *desc; 2448 struct irq_desc *desc;
2465 struct irq_cfg *cfg; 2449 struct irq_cfg *cfg;
2466 irq = __get_cpu_var(vector_irq)[vector]; 2450 irq = __get_cpu_var(vector_irq)[vector];
@@ -2480,6 +2464,18 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
2480 if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) 2464 if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain))
2481 goto unlock; 2465 goto unlock;
2482 2466
2467 irr = apic_read(APIC_IRR + (vector / 32 * 0x10));
2468 /*
2469 * Check if the vector that needs to be cleanedup is
2470 * registered at the cpu's IRR. If so, then this is not
2471 * the best time to clean it up. Lets clean it up in the
2472 * next attempt by sending another IRQ_MOVE_CLEANUP_VECTOR
2473 * to myself.
2474 */
2475 if (irr & (1 << (vector % 32))) {
2476 apic->send_IPI_self(IRQ_MOVE_CLEANUP_VECTOR);
2477 goto unlock;
2478 }
2483 __get_cpu_var(vector_irq)[vector] = -1; 2479 __get_cpu_var(vector_irq)[vector] = -1;
2484 cfg->move_cleanup_count--; 2480 cfg->move_cleanup_count--;
2485unlock: 2481unlock:
@@ -2528,17 +2524,51 @@ static void irq_complete_move(struct irq_desc **descp)
2528static inline void irq_complete_move(struct irq_desc **descp) {} 2524static inline void irq_complete_move(struct irq_desc **descp) {}
2529#endif 2525#endif
2530 2526
2531#ifdef CONFIG_INTR_REMAP 2527#ifdef CONFIG_X86_X2APIC
2528static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
2529{
2530 int apic, pin;
2531 struct irq_pin_list *entry;
2532
2533 entry = cfg->irq_2_pin;
2534 for (;;) {
2535
2536 if (!entry)
2537 break;
2538
2539 apic = entry->apic;
2540 pin = entry->pin;
2541 io_apic_eoi(apic, pin);
2542 entry = entry->next;
2543 }
2544}
2545
2546static void
2547eoi_ioapic_irq(struct irq_desc *desc)
2548{
2549 struct irq_cfg *cfg;
2550 unsigned long flags;
2551 unsigned int irq;
2552
2553 irq = desc->irq;
2554 cfg = desc->chip_data;
2555
2556 spin_lock_irqsave(&ioapic_lock, flags);
2557 __eoi_ioapic_irq(irq, cfg);
2558 spin_unlock_irqrestore(&ioapic_lock, flags);
2559}
2560
2532static void ack_x2apic_level(unsigned int irq) 2561static void ack_x2apic_level(unsigned int irq)
2533{ 2562{
2563 struct irq_desc *desc = irq_to_desc(irq);
2534 ack_x2APIC_irq(); 2564 ack_x2APIC_irq();
2565 eoi_ioapic_irq(desc);
2535} 2566}
2536 2567
2537static void ack_x2apic_edge(unsigned int irq) 2568static void ack_x2apic_edge(unsigned int irq)
2538{ 2569{
2539 ack_x2APIC_irq(); 2570 ack_x2APIC_irq();
2540} 2571}
2541
2542#endif 2572#endif
2543 2573
2544static void ack_apic_edge(unsigned int irq) 2574static void ack_apic_edge(unsigned int irq)
@@ -2649,6 +2679,26 @@ static void ack_apic_level(unsigned int irq)
2649#endif 2679#endif
2650} 2680}
2651 2681
2682#ifdef CONFIG_INTR_REMAP
2683static void ir_ack_apic_edge(unsigned int irq)
2684{
2685#ifdef CONFIG_X86_X2APIC
2686 if (x2apic_enabled())
2687 return ack_x2apic_edge(irq);
2688#endif
2689 return ack_apic_edge(irq);
2690}
2691
2692static void ir_ack_apic_level(unsigned int irq)
2693{
2694#ifdef CONFIG_X86_X2APIC
2695 if (x2apic_enabled())
2696 return ack_x2apic_level(irq);
2697#endif
2698 return ack_apic_level(irq);
2699}
2700#endif /* CONFIG_INTR_REMAP */
2701
2652static struct irq_chip ioapic_chip __read_mostly = { 2702static struct irq_chip ioapic_chip __read_mostly = {
2653 .name = "IO-APIC", 2703 .name = "IO-APIC",
2654 .startup = startup_ioapic_irq, 2704 .startup = startup_ioapic_irq,
@@ -2662,20 +2712,20 @@ static struct irq_chip ioapic_chip __read_mostly = {
2662 .retrigger = ioapic_retrigger_irq, 2712 .retrigger = ioapic_retrigger_irq,
2663}; 2713};
2664 2714
2665#ifdef CONFIG_INTR_REMAP
2666static struct irq_chip ir_ioapic_chip __read_mostly = { 2715static struct irq_chip ir_ioapic_chip __read_mostly = {
2667 .name = "IR-IO-APIC", 2716 .name = "IR-IO-APIC",
2668 .startup = startup_ioapic_irq, 2717 .startup = startup_ioapic_irq,
2669 .mask = mask_IO_APIC_irq, 2718 .mask = mask_IO_APIC_irq,
2670 .unmask = unmask_IO_APIC_irq, 2719 .unmask = unmask_IO_APIC_irq,
2671 .ack = ack_x2apic_edge, 2720#ifdef CONFIG_INTR_REMAP
2672 .eoi = ack_x2apic_level, 2721 .ack = ir_ack_apic_edge,
2722 .eoi = ir_ack_apic_level,
2673#ifdef CONFIG_SMP 2723#ifdef CONFIG_SMP
2674 .set_affinity = set_ir_ioapic_affinity_irq, 2724 .set_affinity = set_ir_ioapic_affinity_irq,
2675#endif 2725#endif
2726#endif
2676 .retrigger = ioapic_retrigger_irq, 2727 .retrigger = ioapic_retrigger_irq,
2677}; 2728};
2678#endif
2679 2729
2680static inline void init_IO_APIC_traps(void) 2730static inline void init_IO_APIC_traps(void)
2681{ 2731{
@@ -2901,10 +2951,8 @@ static inline void __init check_timer(void)
2901 * 8259A. 2951 * 8259A.
2902 */ 2952 */
2903 if (pin1 == -1) { 2953 if (pin1 == -1) {
2904#ifdef CONFIG_INTR_REMAP
2905 if (intr_remapping_enabled) 2954 if (intr_remapping_enabled)
2906 panic("BIOS bug: timer not connected to IO-APIC"); 2955 panic("BIOS bug: timer not connected to IO-APIC");
2907#endif
2908 pin1 = pin2; 2956 pin1 = pin2;
2909 apic1 = apic2; 2957 apic1 = apic2;
2910 no_pin1 = 1; 2958 no_pin1 = 1;
@@ -2940,10 +2988,8 @@ static inline void __init check_timer(void)
2940 clear_IO_APIC_pin(0, pin1); 2988 clear_IO_APIC_pin(0, pin1);
2941 goto out; 2989 goto out;
2942 } 2990 }
2943#ifdef CONFIG_INTR_REMAP
2944 if (intr_remapping_enabled) 2991 if (intr_remapping_enabled)
2945 panic("timer doesn't work through Interrupt-remapped IO-APIC"); 2992 panic("timer doesn't work through Interrupt-remapped IO-APIC");
2946#endif
2947 local_irq_disable(); 2993 local_irq_disable();
2948 clear_IO_APIC_pin(apic1, pin1); 2994 clear_IO_APIC_pin(apic1, pin1);
2949 if (!no_pin1) 2995 if (!no_pin1)
@@ -3237,9 +3283,7 @@ void destroy_irq(unsigned int irq)
3237 if (desc) 3283 if (desc)
3238 desc->chip_data = cfg; 3284 desc->chip_data = cfg;
3239 3285
3240#ifdef CONFIG_INTR_REMAP
3241 free_irte(irq); 3286 free_irte(irq);
3242#endif
3243 spin_lock_irqsave(&vector_lock, flags); 3287 spin_lock_irqsave(&vector_lock, flags);
3244 __clear_irq_vector(irq, cfg); 3288 __clear_irq_vector(irq, cfg);
3245 spin_unlock_irqrestore(&vector_lock, flags); 3289 spin_unlock_irqrestore(&vector_lock, flags);
@@ -3265,7 +3309,6 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
3265 3309
3266 dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus()); 3310 dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
3267 3311
3268#ifdef CONFIG_INTR_REMAP
3269 if (irq_remapped(irq)) { 3312 if (irq_remapped(irq)) {
3270 struct irte irte; 3313 struct irte irte;
3271 int ir_index; 3314 int ir_index;
@@ -3291,10 +3334,13 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
3291 MSI_ADDR_IR_SHV | 3334 MSI_ADDR_IR_SHV |
3292 MSI_ADDR_IR_INDEX1(ir_index) | 3335 MSI_ADDR_IR_INDEX1(ir_index) |
3293 MSI_ADDR_IR_INDEX2(ir_index); 3336 MSI_ADDR_IR_INDEX2(ir_index);
3294 } else 3337 } else {
3295#endif 3338 if (x2apic_enabled())
3296 { 3339 msg->address_hi = MSI_ADDR_BASE_HI |
3297 msg->address_hi = MSI_ADDR_BASE_HI; 3340 MSI_ADDR_EXT_DEST_ID(dest);
3341 else
3342 msg->address_hi = MSI_ADDR_BASE_HI;
3343
3298 msg->address_lo = 3344 msg->address_lo =
3299 MSI_ADDR_BASE_LO | 3345 MSI_ADDR_BASE_LO |
3300 ((apic->irq_dest_mode == 0) ? 3346 ((apic->irq_dest_mode == 0) ?
@@ -3394,15 +3440,16 @@ static struct irq_chip msi_chip = {
3394 .retrigger = ioapic_retrigger_irq, 3440 .retrigger = ioapic_retrigger_irq,
3395}; 3441};
3396 3442
3397#ifdef CONFIG_INTR_REMAP
3398static struct irq_chip msi_ir_chip = { 3443static struct irq_chip msi_ir_chip = {
3399 .name = "IR-PCI-MSI", 3444 .name = "IR-PCI-MSI",
3400 .unmask = unmask_msi_irq, 3445 .unmask = unmask_msi_irq,
3401 .mask = mask_msi_irq, 3446 .mask = mask_msi_irq,
3402 .ack = ack_x2apic_edge, 3447#ifdef CONFIG_INTR_REMAP
3448 .ack = ir_ack_apic_edge,
3403#ifdef CONFIG_SMP 3449#ifdef CONFIG_SMP
3404 .set_affinity = ir_set_msi_irq_affinity, 3450 .set_affinity = ir_set_msi_irq_affinity,
3405#endif 3451#endif
3452#endif
3406 .retrigger = ioapic_retrigger_irq, 3453 .retrigger = ioapic_retrigger_irq,
3407}; 3454};
3408 3455
@@ -3432,7 +3479,6 @@ static int msi_alloc_irte(struct pci_dev *dev, int irq, int nvec)
3432 } 3479 }
3433 return index; 3480 return index;
3434} 3481}
3435#endif
3436 3482
3437static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq) 3483static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
3438{ 3484{
@@ -3446,7 +3492,6 @@ static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
3446 set_irq_msi(irq, msidesc); 3492 set_irq_msi(irq, msidesc);
3447 write_msi_msg(irq, &msg); 3493 write_msi_msg(irq, &msg);
3448 3494
3449#ifdef CONFIG_INTR_REMAP
3450 if (irq_remapped(irq)) { 3495 if (irq_remapped(irq)) {
3451 struct irq_desc *desc = irq_to_desc(irq); 3496 struct irq_desc *desc = irq_to_desc(irq);
3452 /* 3497 /*
@@ -3455,7 +3500,6 @@ static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
3455 desc->status |= IRQ_MOVE_PCNTXT; 3500 desc->status |= IRQ_MOVE_PCNTXT;
3456 set_irq_chip_and_handler_name(irq, &msi_ir_chip, handle_edge_irq, "edge"); 3501 set_irq_chip_and_handler_name(irq, &msi_ir_chip, handle_edge_irq, "edge");
3457 } else 3502 } else
3458#endif
3459 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); 3503 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge");
3460 3504
3461 dev_printk(KERN_DEBUG, &dev->dev, "irq %d for MSI/MSI-X\n", irq); 3505 dev_printk(KERN_DEBUG, &dev->dev, "irq %d for MSI/MSI-X\n", irq);
@@ -3469,11 +3513,12 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3469 int ret, sub_handle; 3513 int ret, sub_handle;
3470 struct msi_desc *msidesc; 3514 struct msi_desc *msidesc;
3471 unsigned int irq_want; 3515 unsigned int irq_want;
3472 3516 struct intel_iommu *iommu = NULL;
3473#ifdef CONFIG_INTR_REMAP
3474 struct intel_iommu *iommu = 0;
3475 int index = 0; 3517 int index = 0;
3476#endif 3518
3519 /* x86 doesn't support multiple MSI yet */
3520 if (type == PCI_CAP_ID_MSI && nvec > 1)
3521 return 1;
3477 3522
3478 irq_want = nr_irqs_gsi; 3523 irq_want = nr_irqs_gsi;
3479 sub_handle = 0; 3524 sub_handle = 0;
@@ -3482,7 +3527,6 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3482 if (irq == 0) 3527 if (irq == 0)
3483 return -1; 3528 return -1;
3484 irq_want = irq + 1; 3529 irq_want = irq + 1;
3485#ifdef CONFIG_INTR_REMAP
3486 if (!intr_remapping_enabled) 3530 if (!intr_remapping_enabled)
3487 goto no_ir; 3531 goto no_ir;
3488 3532
@@ -3510,7 +3554,6 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3510 set_irte_irq(irq, iommu, index, sub_handle); 3554 set_irte_irq(irq, iommu, index, sub_handle);
3511 } 3555 }
3512no_ir: 3556no_ir:
3513#endif
3514 ret = setup_msi_irq(dev, msidesc, irq); 3557 ret = setup_msi_irq(dev, msidesc, irq);
3515 if (ret < 0) 3558 if (ret < 0)
3516 goto error; 3559 goto error;
@@ -3528,7 +3571,7 @@ void arch_teardown_msi_irq(unsigned int irq)
3528 destroy_irq(irq); 3571 destroy_irq(irq);
3529} 3572}
3530 3573
3531#ifdef CONFIG_DMAR 3574#if defined (CONFIG_DMAR) || defined (CONFIG_INTR_REMAP)
3532#ifdef CONFIG_SMP 3575#ifdef CONFIG_SMP
3533static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) 3576static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
3534{ 3577{
@@ -3609,7 +3652,7 @@ static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
3609 3652
3610#endif /* CONFIG_SMP */ 3653#endif /* CONFIG_SMP */
3611 3654
3612struct irq_chip hpet_msi_type = { 3655static struct irq_chip hpet_msi_type = {
3613 .name = "HPET_MSI", 3656 .name = "HPET_MSI",
3614 .unmask = hpet_msi_unmask, 3657 .unmask = hpet_msi_unmask,
3615 .mask = hpet_msi_mask, 3658 .mask = hpet_msi_mask,
@@ -4045,11 +4088,9 @@ void __init setup_ioapic_dest(void)
4045 else 4088 else
4046 mask = apic->target_cpus(); 4089 mask = apic->target_cpus();
4047 4090
4048#ifdef CONFIG_INTR_REMAP
4049 if (intr_remapping_enabled) 4091 if (intr_remapping_enabled)
4050 set_ir_ioapic_affinity_irq_desc(desc, mask); 4092 set_ir_ioapic_affinity_irq_desc(desc, mask);
4051 else 4093 else
4052#endif
4053 set_ioapic_affinity_irq_desc(desc, mask); 4094 set_ioapic_affinity_irq_desc(desc, mask);
4054 } 4095 }
4055 4096
@@ -4142,9 +4183,12 @@ static int __init ioapic_insert_resources(void)
4142 struct resource *r = ioapic_resources; 4183 struct resource *r = ioapic_resources;
4143 4184
4144 if (!r) { 4185 if (!r) {
4145 printk(KERN_ERR 4186 if (nr_ioapics > 0) {
4146 "IO APIC resources could be not be allocated.\n"); 4187 printk(KERN_ERR
4147 return -1; 4188 "IO APIC resources couldn't be allocated.\n");
4189 return -1;
4190 }
4191 return 0;
4148 } 4192 }
4149 4193
4150 for (i = 0; i < nr_ioapics; i++) { 4194 for (i = 0; i < nr_ioapics; i++) {
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index bdfad80c3cf1..d6bd62407152 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -39,7 +39,7 @@
39int unknown_nmi_panic; 39int unknown_nmi_panic;
40int nmi_watchdog_enabled; 40int nmi_watchdog_enabled;
41 41
42static cpumask_t backtrace_mask = CPU_MASK_NONE; 42static cpumask_var_t backtrace_mask;
43 43
44/* nmi_active: 44/* nmi_active:
45 * >0: the lapic NMI watchdog is active, but can be disabled 45 * >0: the lapic NMI watchdog is active, but can be disabled
@@ -138,6 +138,7 @@ int __init check_nmi_watchdog(void)
138 if (!prev_nmi_count) 138 if (!prev_nmi_count)
139 goto error; 139 goto error;
140 140
141 alloc_cpumask_var(&backtrace_mask, GFP_KERNEL);
141 printk(KERN_INFO "Testing NMI watchdog ... "); 142 printk(KERN_INFO "Testing NMI watchdog ... ");
142 143
143#ifdef CONFIG_SMP 144#ifdef CONFIG_SMP
@@ -413,14 +414,14 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
413 touched = 1; 414 touched = 1;
414 } 415 }
415 416
416 if (cpu_isset(cpu, backtrace_mask)) { 417 if (cpumask_test_cpu(cpu, backtrace_mask)) {
417 static DEFINE_SPINLOCK(lock); /* Serialise the printks */ 418 static DEFINE_SPINLOCK(lock); /* Serialise the printks */
418 419
419 spin_lock(&lock); 420 spin_lock(&lock);
420 printk(KERN_WARNING "NMI backtrace for cpu %d\n", cpu); 421 printk(KERN_WARNING "NMI backtrace for cpu %d\n", cpu);
421 dump_stack(); 422 dump_stack();
422 spin_unlock(&lock); 423 spin_unlock(&lock);
423 cpu_clear(cpu, backtrace_mask); 424 cpumask_clear_cpu(cpu, backtrace_mask);
424 } 425 }
425 426
426 /* Could check oops_in_progress here too, but it's safer not to */ 427 /* Could check oops_in_progress here too, but it's safer not to */
@@ -554,10 +555,10 @@ void __trigger_all_cpu_backtrace(void)
554{ 555{
555 int i; 556 int i;
556 557
557 backtrace_mask = cpu_online_map; 558 cpumask_copy(backtrace_mask, cpu_online_mask);
558 /* Wait for up to 10 seconds for all CPUs to do the backtrace */ 559 /* Wait for up to 10 seconds for all CPUs to do the backtrace */
559 for (i = 0; i < 10 * 1000; i++) { 560 for (i = 0; i < 10 * 1000; i++) {
560 if (cpus_empty(backtrace_mask)) 561 if (cpumask_empty(backtrace_mask))
561 break; 562 break;
562 mdelay(1); 563 mdelay(1);
563 } 564 }
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c
index ba2fc6465534..533e59c6fc82 100644
--- a/arch/x86/kernel/apic/numaq_32.c
+++ b/arch/x86/kernel/apic/numaq_32.c
@@ -334,9 +334,9 @@ static inline void numaq_smp_callin_clear_local_apic(void)
334 clear_local_APIC(); 334 clear_local_APIC();
335} 335}
336 336
337static inline const cpumask_t *numaq_target_cpus(void) 337static inline const struct cpumask *numaq_target_cpus(void)
338{ 338{
339 return &CPU_MASK_ALL; 339 return cpu_all_mask;
340} 340}
341 341
342static inline unsigned long 342static inline unsigned long
@@ -427,7 +427,7 @@ static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid)
427 * We use physical apicids here, not logical, so just return the default 427 * We use physical apicids here, not logical, so just return the default
428 * physical broadcast to stop people from breaking us 428 * physical broadcast to stop people from breaking us
429 */ 429 */
430static inline unsigned int numaq_cpu_mask_to_apicid(const cpumask_t *cpumask) 430static unsigned int numaq_cpu_mask_to_apicid(const struct cpumask *cpumask)
431{ 431{
432 return 0x0F; 432 return 0x0F;
433} 433}
@@ -462,7 +462,7 @@ static int probe_numaq(void)
462 return found_numaq; 462 return found_numaq;
463} 463}
464 464
465static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask) 465static void numaq_vector_allocation_domain(int cpu, struct cpumask *retmask)
466{ 466{
467 /* Careful. Some cpus do not strictly honor the set of cpus 467 /* Careful. Some cpus do not strictly honor the set of cpus
468 * specified in the interrupt destination when using lowest 468 * specified in the interrupt destination when using lowest
@@ -472,7 +472,8 @@ static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask)
472 * deliver interrupts to the wrong hyperthread when only one 472 * deliver interrupts to the wrong hyperthread when only one
473 * hyperthread was specified in the interrupt desitination. 473 * hyperthread was specified in the interrupt desitination.
474 */ 474 */
475 *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; 475 cpumask_clear(retmask);
476 cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
476} 477}
477 478
478static void numaq_setup_portio_remap(void) 479static void numaq_setup_portio_remap(void)
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c
index 141c99a1c264..01eda2ac65e4 100644
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -83,7 +83,8 @@ static void default_vector_allocation_domain(int cpu, struct cpumask *retmask)
83 * deliver interrupts to the wrong hyperthread when only one 83 * deliver interrupts to the wrong hyperthread when only one
84 * hyperthread was specified in the interrupt desitination. 84 * hyperthread was specified in the interrupt desitination.
85 */ 85 */
86 *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } }; 86 cpumask_clear(retmask);
87 cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
87} 88}
88 89
89/* should be called last. */ 90/* should be called last. */
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c
index 8d7748efe6a8..1783652bb0e5 100644
--- a/arch/x86/kernel/apic/probe_64.c
+++ b/arch/x86/kernel/apic/probe_64.c
@@ -68,6 +68,13 @@ void __init default_setup_apic_routing(void)
68 apic = &apic_physflat; 68 apic = &apic_physflat;
69 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); 69 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
70 } 70 }
71
72 /*
73 * Now that apic routing model is selected, configure the
74 * fault handling for intr remapping.
75 */
76 if (intr_remapping_enabled)
77 enable_drhd_fault_handling();
71} 78}
72 79
73/* Same for both flat and physical. */ 80/* Same for both flat and physical. */
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c
index aac52fa873ff..9cfe1f415d81 100644
--- a/arch/x86/kernel/apic/summit_32.c
+++ b/arch/x86/kernel/apic/summit_32.c
@@ -53,23 +53,19 @@ static unsigned summit_get_apic_id(unsigned long x)
53 return (x >> 24) & 0xFF; 53 return (x >> 24) & 0xFF;
54} 54}
55 55
56static inline void summit_send_IPI_mask(const cpumask_t *mask, int vector) 56static inline void summit_send_IPI_mask(const struct cpumask *mask, int vector)
57{ 57{
58 default_send_IPI_mask_sequence_logical(mask, vector); 58 default_send_IPI_mask_sequence_logical(mask, vector);
59} 59}
60 60
61static void summit_send_IPI_allbutself(int vector) 61static void summit_send_IPI_allbutself(int vector)
62{ 62{
63 cpumask_t mask = cpu_online_map; 63 default_send_IPI_mask_allbutself_logical(cpu_online_mask, vector);
64 cpu_clear(smp_processor_id(), mask);
65
66 if (!cpus_empty(mask))
67 summit_send_IPI_mask(&mask, vector);
68} 64}
69 65
70static void summit_send_IPI_all(int vector) 66static void summit_send_IPI_all(int vector)
71{ 67{
72 summit_send_IPI_mask(&cpu_online_map, vector); 68 summit_send_IPI_mask(cpu_online_mask, vector);
73} 69}
74 70
75#include <asm/tsc.h> 71#include <asm/tsc.h>
@@ -186,13 +182,13 @@ static inline int is_WPEG(struct rio_detail *rio){
186 182
187#define SUMMIT_APIC_DFR_VALUE (APIC_DFR_CLUSTER) 183#define SUMMIT_APIC_DFR_VALUE (APIC_DFR_CLUSTER)
188 184
189static const cpumask_t *summit_target_cpus(void) 185static const struct cpumask *summit_target_cpus(void)
190{ 186{
191 /* CPU_MASK_ALL (0xff) has undefined behaviour with 187 /* CPU_MASK_ALL (0xff) has undefined behaviour with
192 * dest_LowestPrio mode logical clustered apic interrupt routing 188 * dest_LowestPrio mode logical clustered apic interrupt routing
193 * Just start on cpu 0. IRQ balancing will spread load 189 * Just start on cpu 0. IRQ balancing will spread load
194 */ 190 */
195 return &cpumask_of_cpu(0); 191 return cpumask_of(0);
196} 192}
197 193
198static unsigned long summit_check_apicid_used(physid_mask_t bitmap, int apicid) 194static unsigned long summit_check_apicid_used(physid_mask_t bitmap, int apicid)
@@ -289,7 +285,7 @@ static int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
289 return 1; 285 return 1;
290} 286}
291 287
292static unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask) 288static unsigned int summit_cpu_mask_to_apicid(const struct cpumask *cpumask)
293{ 289{
294 unsigned int round = 0; 290 unsigned int round = 0;
295 int cpu, apicid = 0; 291 int cpu, apicid = 0;
@@ -346,7 +342,7 @@ static int probe_summit(void)
346 return 0; 342 return 0;
347} 343}
348 344
349static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask) 345static void summit_vector_allocation_domain(int cpu, struct cpumask *retmask)
350{ 346{
351 /* Careful. Some cpus do not strictly honor the set of cpus 347 /* Careful. Some cpus do not strictly honor the set of cpus
352 * specified in the interrupt destination when using lowest 348 * specified in the interrupt destination when using lowest
@@ -356,7 +352,8 @@ static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask)
356 * deliver interrupts to the wrong hyperthread when only one 352 * deliver interrupts to the wrong hyperthread when only one
357 * hyperthread was specified in the interrupt desitination. 353 * hyperthread was specified in the interrupt desitination.
358 */ 354 */
359 *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; 355 cpumask_clear(retmask);
356 cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
360} 357}
361 358
362#ifdef CONFIG_X86_SUMMIT_NUMA 359#ifdef CONFIG_X86_SUMMIT_NUMA
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 8fb87b6dd633..4a903e2f0d17 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -57,6 +57,8 @@ static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
57 unsigned long query_cpu; 57 unsigned long query_cpu;
58 unsigned long flags; 58 unsigned long flags;
59 59
60 x2apic_wrmsr_fence();
61
60 local_irq_save(flags); 62 local_irq_save(flags);
61 for_each_cpu(query_cpu, mask) { 63 for_each_cpu(query_cpu, mask) {
62 __x2apic_send_IPI_dest( 64 __x2apic_send_IPI_dest(
@@ -73,6 +75,8 @@ static void
73 unsigned long query_cpu; 75 unsigned long query_cpu;
74 unsigned long flags; 76 unsigned long flags;
75 77
78 x2apic_wrmsr_fence();
79
76 local_irq_save(flags); 80 local_irq_save(flags);
77 for_each_cpu(query_cpu, mask) { 81 for_each_cpu(query_cpu, mask) {
78 if (query_cpu == this_cpu) 82 if (query_cpu == this_cpu)
@@ -90,6 +94,8 @@ static void x2apic_send_IPI_allbutself(int vector)
90 unsigned long query_cpu; 94 unsigned long query_cpu;
91 unsigned long flags; 95 unsigned long flags;
92 96
97 x2apic_wrmsr_fence();
98
93 local_irq_save(flags); 99 local_irq_save(flags);
94 for_each_online_cpu(query_cpu) { 100 for_each_online_cpu(query_cpu) {
95 if (query_cpu == this_cpu) 101 if (query_cpu == this_cpu)
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index 23625b9f98b2..a284359627e7 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -58,6 +58,8 @@ static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
58 unsigned long query_cpu; 58 unsigned long query_cpu;
59 unsigned long flags; 59 unsigned long flags;
60 60
61 x2apic_wrmsr_fence();
62
61 local_irq_save(flags); 63 local_irq_save(flags);
62 for_each_cpu(query_cpu, mask) { 64 for_each_cpu(query_cpu, mask) {
63 __x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu), 65 __x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu),
@@ -73,6 +75,8 @@ static void
73 unsigned long query_cpu; 75 unsigned long query_cpu;
74 unsigned long flags; 76 unsigned long flags;
75 77
78 x2apic_wrmsr_fence();
79
76 local_irq_save(flags); 80 local_irq_save(flags);
77 for_each_cpu(query_cpu, mask) { 81 for_each_cpu(query_cpu, mask) {
78 if (query_cpu != this_cpu) 82 if (query_cpu != this_cpu)
@@ -89,6 +93,8 @@ static void x2apic_send_IPI_allbutself(int vector)
89 unsigned long query_cpu; 93 unsigned long query_cpu;
90 unsigned long flags; 94 unsigned long flags;
91 95
96 x2apic_wrmsr_fence();
97
92 local_irq_save(flags); 98 local_irq_save(flags);
93 for_each_online_cpu(query_cpu) { 99 for_each_online_cpu(query_cpu) {
94 if (query_cpu == this_cpu) 100 if (query_cpu == this_cpu)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 1bd6da1f8fad..1248318436e8 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -118,17 +118,12 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
118 118
119static void uv_send_IPI_one(int cpu, int vector) 119static void uv_send_IPI_one(int cpu, int vector)
120{ 120{
121 unsigned long val, apicid; 121 unsigned long apicid;
122 int pnode; 122 int pnode;
123 123
124 apicid = per_cpu(x86_cpu_to_apicid, cpu); 124 apicid = per_cpu(x86_cpu_to_apicid, cpu);
125 pnode = uv_apicid_to_pnode(apicid); 125 pnode = uv_apicid_to_pnode(apicid);
126 126 uv_hub_send_ipi(pnode, apicid, vector);
127 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
128 (apicid << UVH_IPI_INT_APIC_ID_SHFT) |
129 (vector << UVH_IPI_INT_VECTOR_SHFT);
130
131 uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
132} 127}
133 128
134static void uv_send_IPI_mask(const struct cpumask *mask, int vector) 129static void uv_send_IPI_mask(const struct cpumask *mask, int vector)
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 10033fe718e0..49e0939bac42 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -466,7 +466,7 @@ static const lookup_t error_table[] = {
466 * @err: APM BIOS return code 466 * @err: APM BIOS return code
467 * 467 *
468 * Write a meaningful log entry to the kernel log in the event of 468 * Write a meaningful log entry to the kernel log in the event of
469 * an APM error. 469 * an APM error. Note that this also handles (negative) kernel errors.
470 */ 470 */
471 471
472static void apm_error(char *str, int err) 472static void apm_error(char *str, int err)
@@ -478,43 +478,14 @@ static void apm_error(char *str, int err)
478 break; 478 break;
479 if (i < ERROR_COUNT) 479 if (i < ERROR_COUNT)
480 printk(KERN_NOTICE "apm: %s: %s\n", str, error_table[i].msg); 480 printk(KERN_NOTICE "apm: %s: %s\n", str, error_table[i].msg);
481 else if (err < 0)
482 printk(KERN_NOTICE "apm: %s: linux error code %i\n", str, err);
481 else 483 else
482 printk(KERN_NOTICE "apm: %s: unknown error code %#2.2x\n", 484 printk(KERN_NOTICE "apm: %s: unknown error code %#2.2x\n",
483 str, err); 485 str, err);
484} 486}
485 487
486/* 488/*
487 * Lock APM functionality to physical CPU 0
488 */
489
490#ifdef CONFIG_SMP
491
492static cpumask_t apm_save_cpus(void)
493{
494 cpumask_t x = current->cpus_allowed;
495 /* Some bioses don't like being called from CPU != 0 */
496 set_cpus_allowed(current, cpumask_of_cpu(0));
497 BUG_ON(smp_processor_id() != 0);
498 return x;
499}
500
501static inline void apm_restore_cpus(cpumask_t mask)
502{
503 set_cpus_allowed(current, mask);
504}
505
506#else
507
508/*
509 * No CPU lockdown needed on a uniprocessor
510 */
511
512#define apm_save_cpus() (current->cpus_allowed)
513#define apm_restore_cpus(x) (void)(x)
514
515#endif
516
517/*
518 * These are the actual BIOS calls. Depending on APM_ZERO_SEGS and 489 * These are the actual BIOS calls. Depending on APM_ZERO_SEGS and
519 * apm_info.allow_ints, we are being really paranoid here! Not only 490 * apm_info.allow_ints, we are being really paranoid here! Not only
520 * are interrupts disabled, but all the segment registers (except SS) 491 * are interrupts disabled, but all the segment registers (except SS)
@@ -568,16 +539,23 @@ static inline void apm_irq_restore(unsigned long flags)
568# define APM_DO_RESTORE_SEGS 539# define APM_DO_RESTORE_SEGS
569#endif 540#endif
570 541
542struct apm_bios_call {
543 u32 func;
544 /* In and out */
545 u32 ebx;
546 u32 ecx;
547 /* Out only */
548 u32 eax;
549 u32 edx;
550 u32 esi;
551
552 /* Error: -ENOMEM, or bits 8-15 of eax */
553 int err;
554};
555
571/** 556/**
572 * apm_bios_call - Make an APM BIOS 32bit call 557 * __apm_bios_call - Make an APM BIOS 32bit call
573 * @func: APM function to execute 558 * @_call: pointer to struct apm_bios_call.
574 * @ebx_in: EBX register for call entry
575 * @ecx_in: ECX register for call entry
576 * @eax: EAX register return
577 * @ebx: EBX register return
578 * @ecx: ECX register return
579 * @edx: EDX register return
580 * @esi: ESI register return
581 * 559 *
582 * Make an APM call using the 32bit protected mode interface. The 560 * Make an APM call using the 32bit protected mode interface. The
583 * caller is responsible for knowing if APM BIOS is configured and 561 * caller is responsible for knowing if APM BIOS is configured and
@@ -586,80 +564,142 @@ static inline void apm_irq_restore(unsigned long flags)
586 * flag is loaded into AL. If there is an error, then the error 564 * flag is loaded into AL. If there is an error, then the error
587 * code is returned in AH (bits 8-15 of eax) and this function 565 * code is returned in AH (bits 8-15 of eax) and this function
588 * returns non-zero. 566 * returns non-zero.
567 *
568 * Note: this makes the call on the current CPU.
589 */ 569 */
590 570static long __apm_bios_call(void *_call)
591static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
592 u32 *eax, u32 *ebx, u32 *ecx, u32 *edx, u32 *esi)
593{ 571{
594 APM_DECL_SEGS 572 APM_DECL_SEGS
595 unsigned long flags; 573 unsigned long flags;
596 cpumask_t cpus;
597 int cpu; 574 int cpu;
598 struct desc_struct save_desc_40; 575 struct desc_struct save_desc_40;
599 struct desc_struct *gdt; 576 struct desc_struct *gdt;
600 577 struct apm_bios_call *call = _call;
601 cpus = apm_save_cpus();
602 578
603 cpu = get_cpu(); 579 cpu = get_cpu();
580 BUG_ON(cpu != 0);
604 gdt = get_cpu_gdt_table(cpu); 581 gdt = get_cpu_gdt_table(cpu);
605 save_desc_40 = gdt[0x40 / 8]; 582 save_desc_40 = gdt[0x40 / 8];
606 gdt[0x40 / 8] = bad_bios_desc; 583 gdt[0x40 / 8] = bad_bios_desc;
607 584
608 apm_irq_save(flags); 585 apm_irq_save(flags);
609 APM_DO_SAVE_SEGS; 586 APM_DO_SAVE_SEGS;
610 apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); 587 apm_bios_call_asm(call->func, call->ebx, call->ecx,
588 &call->eax, &call->ebx, &call->ecx, &call->edx,
589 &call->esi);
611 APM_DO_RESTORE_SEGS; 590 APM_DO_RESTORE_SEGS;
612 apm_irq_restore(flags); 591 apm_irq_restore(flags);
613 gdt[0x40 / 8] = save_desc_40; 592 gdt[0x40 / 8] = save_desc_40;
614 put_cpu(); 593 put_cpu();
615 apm_restore_cpus(cpus);
616 594
617 return *eax & 0xff; 595 return call->eax & 0xff;
596}
597
598/* Run __apm_bios_call or __apm_bios_call_simple on CPU 0 */
599static int on_cpu0(long (*fn)(void *), struct apm_bios_call *call)
600{
601 int ret;
602
603 /* Don't bother with work_on_cpu in the common case, so we don't
604 * have to worry about OOM or overhead. */
605 if (get_cpu() == 0) {
606 ret = fn(call);
607 put_cpu();
608 } else {
609 put_cpu();
610 ret = work_on_cpu(0, fn, call);
611 }
612
613 /* work_on_cpu can fail with -ENOMEM */
614 if (ret < 0)
615 call->err = ret;
616 else
617 call->err = (call->eax >> 8) & 0xff;
618
619 return ret;
618} 620}
619 621
620/** 622/**
621 * apm_bios_call_simple - make a simple APM BIOS 32bit call 623 * apm_bios_call - Make an APM BIOS 32bit call (on CPU 0)
622 * @func: APM function to invoke 624 * @call: the apm_bios_call registers.
623 * @ebx_in: EBX register value for BIOS call 625 *
624 * @ecx_in: ECX register value for BIOS call 626 * If there is an error, it is returned in @call.err.
625 * @eax: EAX register on return from the BIOS call 627 */
628static int apm_bios_call(struct apm_bios_call *call)
629{
630 return on_cpu0(__apm_bios_call, call);
631}
632
633/**
634 * __apm_bios_call_simple - Make an APM BIOS 32bit call (on CPU 0)
635 * @_call: pointer to struct apm_bios_call.
626 * 636 *
627 * Make a BIOS call that returns one value only, or just status. 637 * Make a BIOS call that returns one value only, or just status.
628 * If there is an error, then the error code is returned in AH 638 * If there is an error, then the error code is returned in AH
629 * (bits 8-15 of eax) and this function returns non-zero. This is 639 * (bits 8-15 of eax) and this function returns non-zero (it can
630 * used for simpler BIOS operations. This call may hold interrupts 640 * also return -ENOMEM). This is used for simpler BIOS operations.
631 * off for a long time on some laptops. 641 * This call may hold interrupts off for a long time on some laptops.
642 *
643 * Note: this makes the call on the current CPU.
632 */ 644 */
633 645static long __apm_bios_call_simple(void *_call)
634static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
635{ 646{
636 u8 error; 647 u8 error;
637 APM_DECL_SEGS 648 APM_DECL_SEGS
638 unsigned long flags; 649 unsigned long flags;
639 cpumask_t cpus;
640 int cpu; 650 int cpu;
641 struct desc_struct save_desc_40; 651 struct desc_struct save_desc_40;
642 struct desc_struct *gdt; 652 struct desc_struct *gdt;
643 653 struct apm_bios_call *call = _call;
644 cpus = apm_save_cpus();
645 654
646 cpu = get_cpu(); 655 cpu = get_cpu();
656 BUG_ON(cpu != 0);
647 gdt = get_cpu_gdt_table(cpu); 657 gdt = get_cpu_gdt_table(cpu);
648 save_desc_40 = gdt[0x40 / 8]; 658 save_desc_40 = gdt[0x40 / 8];
649 gdt[0x40 / 8] = bad_bios_desc; 659 gdt[0x40 / 8] = bad_bios_desc;
650 660
651 apm_irq_save(flags); 661 apm_irq_save(flags);
652 APM_DO_SAVE_SEGS; 662 APM_DO_SAVE_SEGS;
653 error = apm_bios_call_simple_asm(func, ebx_in, ecx_in, eax); 663 error = apm_bios_call_simple_asm(call->func, call->ebx, call->ecx,
664 &call->eax);
654 APM_DO_RESTORE_SEGS; 665 APM_DO_RESTORE_SEGS;
655 apm_irq_restore(flags); 666 apm_irq_restore(flags);
656 gdt[0x40 / 8] = save_desc_40; 667 gdt[0x40 / 8] = save_desc_40;
657 put_cpu(); 668 put_cpu();
658 apm_restore_cpus(cpus);
659 return error; 669 return error;
660} 670}
661 671
662/** 672/**
673 * apm_bios_call_simple - make a simple APM BIOS 32bit call
674 * @func: APM function to invoke
675 * @ebx_in: EBX register value for BIOS call
676 * @ecx_in: ECX register value for BIOS call
677 * @eax: EAX register on return from the BIOS call
678 * @err: bits
679 *
680 * Make a BIOS call that returns one value only, or just status.
681 * If there is an error, then the error code is returned in @err
682 * and this function returns non-zero. This is used for simpler
683 * BIOS operations. This call may hold interrupts off for a long
684 * time on some laptops.
685 */
686static int apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax,
687 int *err)
688{
689 struct apm_bios_call call;
690 int ret;
691
692 call.func = func;
693 call.ebx = ebx_in;
694 call.ecx = ecx_in;
695
696 ret = on_cpu0(__apm_bios_call_simple, &call);
697 *eax = call.eax;
698 *err = call.err;
699 return ret;
700}
701
702/**
663 * apm_driver_version - APM driver version 703 * apm_driver_version - APM driver version
664 * @val: loaded with the APM version on return 704 * @val: loaded with the APM version on return
665 * 705 *
@@ -678,9 +718,10 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
678static int apm_driver_version(u_short *val) 718static int apm_driver_version(u_short *val)
679{ 719{
680 u32 eax; 720 u32 eax;
721 int err;
681 722
682 if (apm_bios_call_simple(APM_FUNC_VERSION, 0, *val, &eax)) 723 if (apm_bios_call_simple(APM_FUNC_VERSION, 0, *val, &eax, &err))
683 return (eax >> 8) & 0xff; 724 return err;
684 *val = eax; 725 *val = eax;
685 return APM_SUCCESS; 726 return APM_SUCCESS;
686} 727}
@@ -701,22 +742,21 @@ static int apm_driver_version(u_short *val)
701 * that APM 1.2 is in use. If no messges are pending the value 0x80 742 * that APM 1.2 is in use. If no messges are pending the value 0x80
702 * is returned (No power management events pending). 743 * is returned (No power management events pending).
703 */ 744 */
704
705static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info) 745static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info)
706{ 746{
707 u32 eax; 747 struct apm_bios_call call;
708 u32 ebx;
709 u32 ecx;
710 u32 dummy;
711 748
712 if (apm_bios_call(APM_FUNC_GET_EVENT, 0, 0, &eax, &ebx, &ecx, 749 call.func = APM_FUNC_GET_EVENT;
713 &dummy, &dummy)) 750 call.ebx = call.ecx = 0;
714 return (eax >> 8) & 0xff; 751
715 *event = ebx; 752 if (apm_bios_call(&call))
753 return call.err;
754
755 *event = call.ebx;
716 if (apm_info.connection_version < 0x0102) 756 if (apm_info.connection_version < 0x0102)
717 *info = ~0; /* indicate info not valid */ 757 *info = ~0; /* indicate info not valid */
718 else 758 else
719 *info = ecx; 759 *info = call.ecx;
720 return APM_SUCCESS; 760 return APM_SUCCESS;
721} 761}
722 762
@@ -737,9 +777,10 @@ static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info)
737static int set_power_state(u_short what, u_short state) 777static int set_power_state(u_short what, u_short state)
738{ 778{
739 u32 eax; 779 u32 eax;
780 int err;
740 781
741 if (apm_bios_call_simple(APM_FUNC_SET_STATE, what, state, &eax)) 782 if (apm_bios_call_simple(APM_FUNC_SET_STATE, what, state, &eax, &err))
742 return (eax >> 8) & 0xff; 783 return err;
743 return APM_SUCCESS; 784 return APM_SUCCESS;
744} 785}
745 786
@@ -770,6 +811,7 @@ static int apm_do_idle(void)
770 u8 ret = 0; 811 u8 ret = 0;
771 int idled = 0; 812 int idled = 0;
772 int polling; 813 int polling;
814 int err;
773 815
774 polling = !!(current_thread_info()->status & TS_POLLING); 816 polling = !!(current_thread_info()->status & TS_POLLING);
775 if (polling) { 817 if (polling) {
@@ -782,7 +824,7 @@ static int apm_do_idle(void)
782 } 824 }
783 if (!need_resched()) { 825 if (!need_resched()) {
784 idled = 1; 826 idled = 1;
785 ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax); 827 ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax, &err);
786 } 828 }
787 if (polling) 829 if (polling)
788 current_thread_info()->status |= TS_POLLING; 830 current_thread_info()->status |= TS_POLLING;
@@ -797,8 +839,7 @@ static int apm_do_idle(void)
797 * Only report the failure the first 5 times. 839 * Only report the failure the first 5 times.
798 */ 840 */
799 if (++t < 5) { 841 if (++t < 5) {
800 printk(KERN_DEBUG "apm_do_idle failed (%d)\n", 842 printk(KERN_DEBUG "apm_do_idle failed (%d)\n", err);
801 (eax >> 8) & 0xff);
802 t = jiffies; 843 t = jiffies;
803 } 844 }
804 return -1; 845 return -1;
@@ -816,9 +857,10 @@ static int apm_do_idle(void)
816static void apm_do_busy(void) 857static void apm_do_busy(void)
817{ 858{
818 u32 dummy; 859 u32 dummy;
860 int err;
819 861
820 if (clock_slowed || ALWAYS_CALL_BUSY) { 862 if (clock_slowed || ALWAYS_CALL_BUSY) {
821 (void)apm_bios_call_simple(APM_FUNC_BUSY, 0, 0, &dummy); 863 (void)apm_bios_call_simple(APM_FUNC_BUSY, 0, 0, &dummy, &err);
822 clock_slowed = 0; 864 clock_slowed = 0;
823 } 865 }
824} 866}
@@ -937,7 +979,7 @@ static void apm_power_off(void)
937 979
938 /* Some bioses don't like being called from CPU != 0 */ 980 /* Some bioses don't like being called from CPU != 0 */
939 if (apm_info.realmode_power_off) { 981 if (apm_info.realmode_power_off) {
940 (void)apm_save_cpus(); 982 set_cpus_allowed_ptr(current, cpumask_of(0));
941 machine_real_restart(po_bios_call, sizeof(po_bios_call)); 983 machine_real_restart(po_bios_call, sizeof(po_bios_call));
942 } else { 984 } else {
943 (void)set_system_power_state(APM_STATE_OFF); 985 (void)set_system_power_state(APM_STATE_OFF);
@@ -956,12 +998,13 @@ static void apm_power_off(void)
956static int apm_enable_power_management(int enable) 998static int apm_enable_power_management(int enable)
957{ 999{
958 u32 eax; 1000 u32 eax;
1001 int err;
959 1002
960 if ((enable == 0) && (apm_info.bios.flags & APM_BIOS_DISENGAGED)) 1003 if ((enable == 0) && (apm_info.bios.flags & APM_BIOS_DISENGAGED))
961 return APM_NOT_ENGAGED; 1004 return APM_NOT_ENGAGED;
962 if (apm_bios_call_simple(APM_FUNC_ENABLE_PM, APM_DEVICE_BALL, 1005 if (apm_bios_call_simple(APM_FUNC_ENABLE_PM, APM_DEVICE_BALL,
963 enable, &eax)) 1006 enable, &eax, &err))
964 return (eax >> 8) & 0xff; 1007 return err;
965 if (enable) 1008 if (enable)
966 apm_info.bios.flags &= ~APM_BIOS_DISABLED; 1009 apm_info.bios.flags &= ~APM_BIOS_DISABLED;
967 else 1010 else
@@ -986,24 +1029,23 @@ static int apm_enable_power_management(int enable)
986 1029
987static int apm_get_power_status(u_short *status, u_short *bat, u_short *life) 1030static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)
988{ 1031{
989 u32 eax; 1032 struct apm_bios_call call;
990 u32 ebx; 1033
991 u32 ecx; 1034 call.func = APM_FUNC_GET_STATUS;
992 u32 edx; 1035 call.ebx = APM_DEVICE_ALL;
993 u32 dummy; 1036 call.ecx = 0;
994 1037
995 if (apm_info.get_power_status_broken) 1038 if (apm_info.get_power_status_broken)
996 return APM_32_UNSUPPORTED; 1039 return APM_32_UNSUPPORTED;
997 if (apm_bios_call(APM_FUNC_GET_STATUS, APM_DEVICE_ALL, 0, 1040 if (apm_bios_call(&call))
998 &eax, &ebx, &ecx, &edx, &dummy)) 1041 return call.err;
999 return (eax >> 8) & 0xff; 1042 *status = call.ebx;
1000 *status = ebx; 1043 *bat = call.ecx;
1001 *bat = ecx;
1002 if (apm_info.get_power_status_swabinminutes) { 1044 if (apm_info.get_power_status_swabinminutes) {
1003 *life = swab16((u16)edx); 1045 *life = swab16((u16)call.edx);
1004 *life |= 0x8000; 1046 *life |= 0x8000;
1005 } else 1047 } else
1006 *life = edx; 1048 *life = call.edx;
1007 return APM_SUCCESS; 1049 return APM_SUCCESS;
1008} 1050}
1009 1051
@@ -1048,12 +1090,14 @@ static int apm_get_battery_status(u_short which, u_short *status,
1048static int apm_engage_power_management(u_short device, int enable) 1090static int apm_engage_power_management(u_short device, int enable)
1049{ 1091{
1050 u32 eax; 1092 u32 eax;
1093 int err;
1051 1094
1052 if ((enable == 0) && (device == APM_DEVICE_ALL) 1095 if ((enable == 0) && (device == APM_DEVICE_ALL)
1053 && (apm_info.bios.flags & APM_BIOS_DISABLED)) 1096 && (apm_info.bios.flags & APM_BIOS_DISABLED))
1054 return APM_DISABLED; 1097 return APM_DISABLED;
1055 if (apm_bios_call_simple(APM_FUNC_ENGAGE_PM, device, enable, &eax)) 1098 if (apm_bios_call_simple(APM_FUNC_ENGAGE_PM, device, enable,
1056 return (eax >> 8) & 0xff; 1099 &eax, &err))
1100 return err;
1057 if (device == APM_DEVICE_ALL) { 1101 if (device == APM_DEVICE_ALL) {
1058 if (enable) 1102 if (enable)
1059 apm_info.bios.flags &= ~APM_BIOS_DISENGAGED; 1103 apm_info.bios.flags &= ~APM_BIOS_DISENGAGED;
@@ -1190,8 +1234,10 @@ static int suspend(int vetoable)
1190 struct apm_user *as; 1234 struct apm_user *as;
1191 1235
1192 device_suspend(PMSG_SUSPEND); 1236 device_suspend(PMSG_SUSPEND);
1193 local_irq_disable(); 1237
1194 device_power_down(PMSG_SUSPEND); 1238 device_power_down(PMSG_SUSPEND);
1239
1240 local_irq_disable();
1195 sysdev_suspend(PMSG_SUSPEND); 1241 sysdev_suspend(PMSG_SUSPEND);
1196 1242
1197 local_irq_enable(); 1243 local_irq_enable();
@@ -1209,9 +1255,12 @@ static int suspend(int vetoable)
1209 if (err != APM_SUCCESS) 1255 if (err != APM_SUCCESS)
1210 apm_error("suspend", err); 1256 apm_error("suspend", err);
1211 err = (err == APM_SUCCESS) ? 0 : -EIO; 1257 err = (err == APM_SUCCESS) ? 0 : -EIO;
1258
1212 sysdev_resume(); 1259 sysdev_resume();
1213 device_power_up(PMSG_RESUME);
1214 local_irq_enable(); 1260 local_irq_enable();
1261
1262 device_power_up(PMSG_RESUME);
1263
1215 device_resume(PMSG_RESUME); 1264 device_resume(PMSG_RESUME);
1216 queue_event(APM_NORMAL_RESUME, NULL); 1265 queue_event(APM_NORMAL_RESUME, NULL);
1217 spin_lock(&user_list_lock); 1266 spin_lock(&user_list_lock);
@@ -1228,8 +1277,9 @@ static void standby(void)
1228{ 1277{
1229 int err; 1278 int err;
1230 1279
1231 local_irq_disable();
1232 device_power_down(PMSG_SUSPEND); 1280 device_power_down(PMSG_SUSPEND);
1281
1282 local_irq_disable();
1233 sysdev_suspend(PMSG_SUSPEND); 1283 sysdev_suspend(PMSG_SUSPEND);
1234 local_irq_enable(); 1284 local_irq_enable();
1235 1285
@@ -1239,8 +1289,9 @@ static void standby(void)
1239 1289
1240 local_irq_disable(); 1290 local_irq_disable();
1241 sysdev_resume(); 1291 sysdev_resume();
1242 device_power_up(PMSG_RESUME);
1243 local_irq_enable(); 1292 local_irq_enable();
1293
1294 device_power_up(PMSG_RESUME);
1244} 1295}
1245 1296
1246static apm_event_t get_event(void) 1297static apm_event_t get_event(void)
@@ -1682,16 +1733,14 @@ static int apm(void *unused)
1682 char *power_stat; 1733 char *power_stat;
1683 char *bat_stat; 1734 char *bat_stat;
1684 1735
1685#ifdef CONFIG_SMP
1686 /* 2002/08/01 - WT 1736 /* 2002/08/01 - WT
1687 * This is to avoid random crashes at boot time during initialization 1737 * This is to avoid random crashes at boot time during initialization
1688 * on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D. 1738 * on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D.
1689 * Some bioses don't like being called from CPU != 0. 1739 * Some bioses don't like being called from CPU != 0.
1690 * Method suggested by Ingo Molnar. 1740 * Method suggested by Ingo Molnar.
1691 */ 1741 */
1692 set_cpus_allowed(current, cpumask_of_cpu(0)); 1742 set_cpus_allowed_ptr(current, cpumask_of(0));
1693 BUG_ON(smp_processor_id() != 0); 1743 BUG_ON(smp_processor_id() != 0);
1694#endif
1695 1744
1696 if (apm_info.connection_version == 0) { 1745 if (apm_info.connection_version == 0) {
1697 apm_info.connection_version = apm_info.bios.version; 1746 apm_info.connection_version = apm_info.bios.version;
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index fbf2f33e3080..5a6aa1c1162f 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -18,6 +18,7 @@
18#include <asm/thread_info.h> 18#include <asm/thread_info.h>
19#include <asm/bootparam.h> 19#include <asm/bootparam.h>
20#include <asm/elf.h> 20#include <asm/elf.h>
21#include <asm/suspend.h>
21 22
22#include <xen/interface/xen.h> 23#include <xen/interface/xen.h>
23 24
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index 8793ab33e2c1..e72f062fb4b5 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -16,6 +16,7 @@
16#include <asm/thread_info.h> 16#include <asm/thread_info.h>
17#include <asm/ia32.h> 17#include <asm/ia32.h>
18#include <asm/bootparam.h> 18#include <asm/bootparam.h>
19#include <asm/suspend.h>
19 20
20#include <xen/interface/xen.h> 21#include <xen/interface/xen.h>
21 22
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index 2ac0ab71412a..fc999e6fc46a 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -83,15 +83,15 @@ void __init setup_bios_corruption_check(void)
83 u64 size; 83 u64 size;
84 addr = find_e820_area_size(addr, &size, PAGE_SIZE); 84 addr = find_e820_area_size(addr, &size, PAGE_SIZE);
85 85
86 if (addr == 0) 86 if (!(addr + 1))
87 break;
88
89 if (addr >= corruption_check_size)
87 break; 90 break;
88 91
89 if ((addr + size) > corruption_check_size) 92 if ((addr + size) > corruption_check_size)
90 size = corruption_check_size - addr; 93 size = corruption_check_size - addr;
91 94
92 if (size == 0)
93 break;
94
95 e820_update_range(addr, size, E820_RAM, E820_RESERVED); 95 e820_update_range(addr, size, E820_RAM, E820_RESERVED);
96 scan_areas[num_scan_areas].addr = addr; 96 scan_areas[num_scan_areas].addr = addr;
97 scan_areas[num_scan_areas].size = size; 97 scan_areas[num_scan_areas].size = size;
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 82db7f45e2de..4e242f9a06e4 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -14,11 +14,12 @@ obj-y += vmware.o hypervisor.o
14obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o 14obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o
15obj-$(CONFIG_X86_64) += bugs_64.o 15obj-$(CONFIG_X86_64) += bugs_64.o
16 16
17obj-$(CONFIG_X86_CPU_DEBUG) += cpu_debug.o
18
17obj-$(CONFIG_CPU_SUP_INTEL) += intel.o 19obj-$(CONFIG_CPU_SUP_INTEL) += intel.o
18obj-$(CONFIG_CPU_SUP_AMD) += amd.o 20obj-$(CONFIG_CPU_SUP_AMD) += amd.o
19obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o 21obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
20obj-$(CONFIG_CPU_SUP_CENTAUR_32) += centaur.o 22obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
21obj-$(CONFIG_CPU_SUP_CENTAUR_64) += centaur_64.o
22obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o 23obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
23obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o 24obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
24 25
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index 6882a735d9c0..8220ae69849d 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -29,7 +29,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
29 u32 regs[4]; 29 u32 regs[4];
30 const struct cpuid_bit *cb; 30 const struct cpuid_bit *cb;
31 31
32 static const struct cpuid_bit cpuid_bits[] = { 32 static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
33 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 }, 33 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
34 { 0, 0, 0, 0 } 34 { 0, 0, 0, 0 }
35 }; 35 };
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 25423a5b80ed..7e4a459daa64 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -5,6 +5,7 @@
5#include <asm/io.h> 5#include <asm/io.h>
6#include <asm/processor.h> 6#include <asm/processor.h>
7#include <asm/apic.h> 7#include <asm/apic.h>
8#include <asm/cpu.h>
8 9
9#ifdef CONFIG_X86_64 10#ifdef CONFIG_X86_64
10# include <asm/numa_64.h> 11# include <asm/numa_64.h>
@@ -141,6 +142,55 @@ static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c)
141 } 142 }
142} 143}
143 144
145static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c)
146{
147#ifdef CONFIG_SMP
148 /* calling is from identify_secondary_cpu() ? */
149 if (c->cpu_index == boot_cpu_id)
150 return;
151
152 /*
153 * Certain Athlons might work (for various values of 'work') in SMP
154 * but they are not certified as MP capable.
155 */
156 /* Athlon 660/661 is valid. */
157 if ((c->x86_model == 6) && ((c->x86_mask == 0) ||
158 (c->x86_mask == 1)))
159 goto valid_k7;
160
161 /* Duron 670 is valid */
162 if ((c->x86_model == 7) && (c->x86_mask == 0))
163 goto valid_k7;
164
165 /*
166 * Athlon 662, Duron 671, and Athlon >model 7 have capability
167 * bit. It's worth noting that the A5 stepping (662) of some
168 * Athlon XP's have the MP bit set.
169 * See http://www.heise.de/newsticker/data/jow-18.10.01-000 for
170 * more.
171 */
172 if (((c->x86_model == 6) && (c->x86_mask >= 2)) ||
173 ((c->x86_model == 7) && (c->x86_mask >= 1)) ||
174 (c->x86_model > 7))
175 if (cpu_has_mp)
176 goto valid_k7;
177
178 /* If we get here, not a certified SMP capable AMD system. */
179
180 /*
181 * Don't taint if we are running SMP kernel on a single non-MP
182 * approved Athlon
183 */
184 WARN_ONCE(1, "WARNING: This combination of AMD"
185 "processors is not suitable for SMP.\n");
186 if (!test_taint(TAINT_UNSAFE_SMP))
187 add_taint(TAINT_UNSAFE_SMP);
188
189valid_k7:
190 ;
191#endif
192}
193
144static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c) 194static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c)
145{ 195{
146 u32 l, h; 196 u32 l, h;
@@ -175,6 +225,8 @@ static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c)
175 } 225 }
176 226
177 set_cpu_cap(c, X86_FEATURE_K7); 227 set_cpu_cap(c, X86_FEATURE_K7);
228
229 amd_k7_smp_check(c);
178} 230}
179#endif 231#endif
180 232
@@ -450,7 +502,7 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int
450} 502}
451#endif 503#endif
452 504
453static struct cpu_dev amd_cpu_dev __cpuinitdata = { 505static const struct cpu_dev __cpuinitconst amd_cpu_dev = {
454 .c_vendor = "AMD", 506 .c_vendor = "AMD",
455 .c_ident = { "AuthenticAMD" }, 507 .c_ident = { "AuthenticAMD" },
456#ifdef CONFIG_X86_32 508#ifdef CONFIG_X86_32
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c
index 89bfdd9cacc6..c95e831bb095 100644
--- a/arch/x86/kernel/cpu/centaur.c
+++ b/arch/x86/kernel/cpu/centaur.c
@@ -1,11 +1,11 @@
1#include <linux/bitops.h>
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/init.h> 3#include <linux/init.h>
3#include <linux/bitops.h>
4 4
5#include <asm/processor.h> 5#include <asm/processor.h>
6#include <asm/msr.h>
7#include <asm/e820.h> 6#include <asm/e820.h>
8#include <asm/mtrr.h> 7#include <asm/mtrr.h>
8#include <asm/msr.h>
9 9
10#include "cpu.h" 10#include "cpu.h"
11 11
@@ -276,7 +276,7 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c)
276 */ 276 */
277 c->x86_capability[5] = cpuid_edx(0xC0000001); 277 c->x86_capability[5] = cpuid_edx(0xC0000001);
278 } 278 }
279 279#ifdef CONFIG_X86_32
280 /* Cyrix III family needs CX8 & PGE explicitly enabled. */ 280 /* Cyrix III family needs CX8 & PGE explicitly enabled. */
281 if (c->x86_model >= 6 && c->x86_model <= 9) { 281 if (c->x86_model >= 6 && c->x86_model <= 9) {
282 rdmsr(MSR_VIA_FCR, lo, hi); 282 rdmsr(MSR_VIA_FCR, lo, hi);
@@ -288,6 +288,11 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c)
288 /* Before Nehemiah, the C3's had 3dNOW! */ 288 /* Before Nehemiah, the C3's had 3dNOW! */
289 if (c->x86_model >= 6 && c->x86_model < 9) 289 if (c->x86_model >= 6 && c->x86_model < 9)
290 set_cpu_cap(c, X86_FEATURE_3DNOW); 290 set_cpu_cap(c, X86_FEATURE_3DNOW);
291#endif
292 if (c->x86 == 0x6 && c->x86_model >= 0xf) {
293 c->x86_cache_alignment = c->x86_clflush_size * 2;
294 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
295 }
291 296
292 display_cacheinfo(c); 297 display_cacheinfo(c);
293} 298}
@@ -316,16 +321,25 @@ enum {
316static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) 321static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
317{ 322{
318 switch (c->x86) { 323 switch (c->x86) {
324#ifdef CONFIG_X86_32
319 case 5: 325 case 5:
320 /* Emulate MTRRs using Centaur's MCR. */ 326 /* Emulate MTRRs using Centaur's MCR. */
321 set_cpu_cap(c, X86_FEATURE_CENTAUR_MCR); 327 set_cpu_cap(c, X86_FEATURE_CENTAUR_MCR);
322 break; 328 break;
329#endif
330 case 6:
331 if (c->x86_model >= 0xf)
332 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
333 break;
323 } 334 }
335#ifdef CONFIG_X86_64
336 set_cpu_cap(c, X86_FEATURE_SYSENTER32);
337#endif
324} 338}
325 339
326static void __cpuinit init_centaur(struct cpuinfo_x86 *c) 340static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
327{ 341{
328 342#ifdef CONFIG_X86_32
329 char *name; 343 char *name;
330 u32 fcr_set = 0; 344 u32 fcr_set = 0;
331 u32 fcr_clr = 0; 345 u32 fcr_clr = 0;
@@ -337,8 +351,10 @@ static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
337 * 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway 351 * 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
338 */ 352 */
339 clear_cpu_cap(c, 0*32+31); 353 clear_cpu_cap(c, 0*32+31);
340 354#endif
355 early_init_centaur(c);
341 switch (c->x86) { 356 switch (c->x86) {
357#ifdef CONFIG_X86_32
342 case 5: 358 case 5:
343 switch (c->x86_model) { 359 switch (c->x86_model) {
344 case 4: 360 case 4:
@@ -442,16 +458,20 @@ static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
442 } 458 }
443 sprintf(c->x86_model_id, "WinChip %s", name); 459 sprintf(c->x86_model_id, "WinChip %s", name);
444 break; 460 break;
445 461#endif
446 case 6: 462 case 6:
447 init_c3(c); 463 init_c3(c);
448 break; 464 break;
449 } 465 }
466#ifdef CONFIG_X86_64
467 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
468#endif
450} 469}
451 470
452static unsigned int __cpuinit 471static unsigned int __cpuinit
453centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size) 472centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size)
454{ 473{
474#ifdef CONFIG_X86_32
455 /* VIA C3 CPUs (670-68F) need further shifting. */ 475 /* VIA C3 CPUs (670-68F) need further shifting. */
456 if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8))) 476 if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8)))
457 size >>= 8; 477 size >>= 8;
@@ -464,11 +484,11 @@ centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size)
464 if ((c->x86 == 6) && (c->x86_model == 9) && 484 if ((c->x86 == 6) && (c->x86_model == 9) &&
465 (c->x86_mask == 1) && (size == 65)) 485 (c->x86_mask == 1) && (size == 65))
466 size -= 1; 486 size -= 1;
467 487#endif
468 return size; 488 return size;
469} 489}
470 490
471static struct cpu_dev centaur_cpu_dev __cpuinitdata = { 491static const struct cpu_dev __cpuinitconst centaur_cpu_dev = {
472 .c_vendor = "Centaur", 492 .c_vendor = "Centaur",
473 .c_ident = { "CentaurHauls" }, 493 .c_ident = { "CentaurHauls" },
474 .c_early_init = early_init_centaur, 494 .c_early_init = early_init_centaur,
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c
deleted file mode 100644
index a1625f5a1e78..000000000000
--- a/arch/x86/kernel/cpu/centaur_64.c
+++ /dev/null
@@ -1,37 +0,0 @@
1#include <linux/init.h>
2#include <linux/smp.h>
3
4#include <asm/cpufeature.h>
5#include <asm/processor.h>
6
7#include "cpu.h"
8
9static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
10{
11 if (c->x86 == 0x6 && c->x86_model >= 0xf)
12 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
13
14 set_cpu_cap(c, X86_FEATURE_SYSENTER32);
15}
16
17static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
18{
19 early_init_centaur(c);
20
21 if (c->x86 == 0x6 && c->x86_model >= 0xf) {
22 c->x86_cache_alignment = c->x86_clflush_size * 2;
23 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
24 }
25 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
26}
27
28static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
29 .c_vendor = "Centaur",
30 .c_ident = { "CentaurHauls" },
31 .c_early_init = early_init_centaur,
32 .c_init = init_centaur,
33 .c_x86_vendor = X86_VENDOR_CENTAUR,
34};
35
36cpu_dev_register(centaur_cpu_dev);
37
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 826d5c876278..c4f667896c28 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1,52 +1,50 @@
1#include <linux/init.h>
2#include <linux/kernel.h>
3#include <linux/sched.h>
4#include <linux/string.h>
5#include <linux/bootmem.h> 1#include <linux/bootmem.h>
2#include <linux/linkage.h>
6#include <linux/bitops.h> 3#include <linux/bitops.h>
4#include <linux/kernel.h>
7#include <linux/module.h> 5#include <linux/module.h>
8#include <linux/kgdb.h> 6#include <linux/percpu.h>
9#include <linux/topology.h> 7#include <linux/string.h>
10#include <linux/delay.h> 8#include <linux/delay.h>
9#include <linux/sched.h>
10#include <linux/init.h>
11#include <linux/kgdb.h>
11#include <linux/smp.h> 12#include <linux/smp.h>
12#include <linux/percpu.h> 13#include <linux/io.h>
13#include <asm/i387.h> 14
14#include <asm/msr.h> 15#include <asm/stackprotector.h>
15#include <asm/io.h>
16#include <asm/linkage.h>
17#include <asm/mmu_context.h> 16#include <asm/mmu_context.h>
17#include <asm/hypervisor.h>
18#include <asm/processor.h>
19#include <asm/sections.h>
20#include <asm/topology.h>
21#include <asm/cpumask.h>
22#include <asm/pgtable.h>
23#include <asm/atomic.h>
24#include <asm/proto.h>
25#include <asm/setup.h>
26#include <asm/apic.h>
27#include <asm/desc.h>
28#include <asm/i387.h>
18#include <asm/mtrr.h> 29#include <asm/mtrr.h>
30#include <asm/numa.h>
31#include <asm/asm.h>
32#include <asm/cpu.h>
19#include <asm/mce.h> 33#include <asm/mce.h>
34#include <asm/msr.h>
20#include <asm/pat.h> 35#include <asm/pat.h>
21#include <asm/asm.h>
22#include <asm/numa.h>
23#include <asm/smp.h> 36#include <asm/smp.h>
24#include <asm/cpu.h>
25#include <asm/cpumask.h>
26#include <asm/apic.h>
27 37
28#ifdef CONFIG_X86_LOCAL_APIC 38#ifdef CONFIG_X86_LOCAL_APIC
29#include <asm/uv/uv.h> 39#include <asm/uv/uv.h>
30#endif 40#endif
31 41
32#include <asm/pgtable.h>
33#include <asm/processor.h>
34#include <asm/desc.h>
35#include <asm/atomic.h>
36#include <asm/proto.h>
37#include <asm/sections.h>
38#include <asm/setup.h>
39#include <asm/hypervisor.h>
40#include <asm/stackprotector.h>
41
42#include "cpu.h" 42#include "cpu.h"
43 43
44#ifdef CONFIG_X86_64
45
46/* all of these masks are initialized in setup_cpu_local_masks() */ 44/* all of these masks are initialized in setup_cpu_local_masks() */
47cpumask_var_t cpu_callin_mask;
48cpumask_var_t cpu_callout_mask;
49cpumask_var_t cpu_initialized_mask; 45cpumask_var_t cpu_initialized_mask;
46cpumask_var_t cpu_callout_mask;
47cpumask_var_t cpu_callin_mask;
50 48
51/* representing cpus for which sibling maps can be computed */ 49/* representing cpus for which sibling maps can be computed */
52cpumask_var_t cpu_sibling_setup_mask; 50cpumask_var_t cpu_sibling_setup_mask;
@@ -60,17 +58,7 @@ void __init setup_cpu_local_masks(void)
60 alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask); 58 alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
61} 59}
62 60
63#else /* CONFIG_X86_32 */ 61static const struct cpu_dev *this_cpu __cpuinitdata;
64
65cpumask_t cpu_callin_map;
66cpumask_t cpu_callout_map;
67cpumask_t cpu_initialized;
68cpumask_t cpu_sibling_setup_map;
69
70#endif /* CONFIG_X86_32 */
71
72
73static struct cpu_dev *this_cpu __cpuinitdata;
74 62
75DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = { 63DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
76#ifdef CONFIG_X86_64 64#ifdef CONFIG_X86_64
@@ -79,48 +67,48 @@ DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
79 * IRET will check the segment types kkeil 2000/10/28 67 * IRET will check the segment types kkeil 2000/10/28
80 * Also sysret mandates a special GDT layout 68 * Also sysret mandates a special GDT layout
81 * 69 *
82 * The TLS descriptors are currently at a different place compared to i386. 70 * TLS descriptors are currently at a different place compared to i386.
83 * Hopefully nobody expects them at a fixed place (Wine?) 71 * Hopefully nobody expects them at a fixed place (Wine?)
84 */ 72 */
85 [GDT_ENTRY_KERNEL32_CS] = { { { 0x0000ffff, 0x00cf9b00 } } }, 73 [GDT_ENTRY_KERNEL32_CS] = { { { 0x0000ffff, 0x00cf9b00 } } },
86 [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00af9b00 } } }, 74 [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00af9b00 } } },
87 [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9300 } } }, 75 [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9300 } } },
88 [GDT_ENTRY_DEFAULT_USER32_CS] = { { { 0x0000ffff, 0x00cffb00 } } }, 76 [GDT_ENTRY_DEFAULT_USER32_CS] = { { { 0x0000ffff, 0x00cffb00 } } },
89 [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff300 } } }, 77 [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff300 } } },
90 [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00affb00 } } }, 78 [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00affb00 } } },
91#else 79#else
92 [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00cf9a00 } } }, 80 [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00cf9a00 } } },
93 [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9200 } } }, 81 [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9200 } } },
94 [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00cffa00 } } }, 82 [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00cffa00 } } },
95 [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff200 } } }, 83 [GDT_ENTRY_DEFAULT_USER_DS] = { { { 0x0000ffff, 0x00cff200 } } },
96 /* 84 /*
97 * Segments used for calling PnP BIOS have byte granularity. 85 * Segments used for calling PnP BIOS have byte granularity.
98 * They code segments and data segments have fixed 64k limits, 86 * They code segments and data segments have fixed 64k limits,
99 * the transfer segment sizes are set at run time. 87 * the transfer segment sizes are set at run time.
100 */ 88 */
101 /* 32-bit code */ 89 /* 32-bit code */
102 [GDT_ENTRY_PNPBIOS_CS32] = { { { 0x0000ffff, 0x00409a00 } } }, 90 [GDT_ENTRY_PNPBIOS_CS32] = { { { 0x0000ffff, 0x00409a00 } } },
103 /* 16-bit code */ 91 /* 16-bit code */
104 [GDT_ENTRY_PNPBIOS_CS16] = { { { 0x0000ffff, 0x00009a00 } } }, 92 [GDT_ENTRY_PNPBIOS_CS16] = { { { 0x0000ffff, 0x00009a00 } } },
105 /* 16-bit data */ 93 /* 16-bit data */
106 [GDT_ENTRY_PNPBIOS_DS] = { { { 0x0000ffff, 0x00009200 } } }, 94 [GDT_ENTRY_PNPBIOS_DS] = { { { 0x0000ffff, 0x00009200 } } },
107 /* 16-bit data */ 95 /* 16-bit data */
108 [GDT_ENTRY_PNPBIOS_TS1] = { { { 0x00000000, 0x00009200 } } }, 96 [GDT_ENTRY_PNPBIOS_TS1] = { { { 0x00000000, 0x00009200 } } },
109 /* 16-bit data */ 97 /* 16-bit data */
110 [GDT_ENTRY_PNPBIOS_TS2] = { { { 0x00000000, 0x00009200 } } }, 98 [GDT_ENTRY_PNPBIOS_TS2] = { { { 0x00000000, 0x00009200 } } },
111 /* 99 /*
112 * The APM segments have byte granularity and their bases 100 * The APM segments have byte granularity and their bases
113 * are set at run time. All have 64k limits. 101 * are set at run time. All have 64k limits.
114 */ 102 */
115 /* 32-bit code */ 103 /* 32-bit code */
116 [GDT_ENTRY_APMBIOS_BASE] = { { { 0x0000ffff, 0x00409a00 } } }, 104 [GDT_ENTRY_APMBIOS_BASE] = { { { 0x0000ffff, 0x00409a00 } } },
117 /* 16-bit code */ 105 /* 16-bit code */
118 [GDT_ENTRY_APMBIOS_BASE+1] = { { { 0x0000ffff, 0x00009a00 } } }, 106 [GDT_ENTRY_APMBIOS_BASE+1] = { { { 0x0000ffff, 0x00009a00 } } },
119 /* data */ 107 /* data */
120 [GDT_ENTRY_APMBIOS_BASE+2] = { { { 0x0000ffff, 0x00409200 } } }, 108 [GDT_ENTRY_APMBIOS_BASE+2] = { { { 0x0000ffff, 0x00409200 } } },
121 109
122 [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } }, 110 [GDT_ENTRY_ESPFIX_SS] = { { { 0x00000000, 0x00c09200 } } },
123 [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } }, 111 [GDT_ENTRY_PERCPU] = { { { 0x0000ffff, 0x00cf9200 } } },
124 GDT_STACK_CANARY_INIT 112 GDT_STACK_CANARY_INIT
125#endif 113#endif
126} }; 114} };
@@ -164,16 +152,17 @@ static inline int flag_is_changeable_p(u32 flag)
164 * the CPUID. Add "volatile" to not allow gcc to 152 * the CPUID. Add "volatile" to not allow gcc to
165 * optimize the subsequent calls to this function. 153 * optimize the subsequent calls to this function.
166 */ 154 */
167 asm volatile ("pushfl\n\t" 155 asm volatile ("pushfl \n\t"
168 "pushfl\n\t" 156 "pushfl \n\t"
169 "popl %0\n\t" 157 "popl %0 \n\t"
170 "movl %0,%1\n\t" 158 "movl %0, %1 \n\t"
171 "xorl %2,%0\n\t" 159 "xorl %2, %0 \n\t"
172 "pushl %0\n\t" 160 "pushl %0 \n\t"
173 "popfl\n\t" 161 "popfl \n\t"
174 "pushfl\n\t" 162 "pushfl \n\t"
175 "popl %0\n\t" 163 "popl %0 \n\t"
176 "popfl\n\t" 164 "popfl \n\t"
165
177 : "=&r" (f1), "=&r" (f2) 166 : "=&r" (f1), "=&r" (f2)
178 : "ir" (flag)); 167 : "ir" (flag));
179 168
@@ -188,18 +177,22 @@ static int __cpuinit have_cpuid_p(void)
188 177
189static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) 178static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
190{ 179{
191 if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr) { 180 unsigned long lo, hi;
192 /* Disable processor serial number */ 181
193 unsigned long lo, hi; 182 if (!cpu_has(c, X86_FEATURE_PN) || !disable_x86_serial_nr)
194 rdmsr(MSR_IA32_BBL_CR_CTL, lo, hi); 183 return;
195 lo |= 0x200000; 184
196 wrmsr(MSR_IA32_BBL_CR_CTL, lo, hi); 185 /* Disable processor serial number: */
197 printk(KERN_NOTICE "CPU serial number disabled.\n"); 186
198 clear_cpu_cap(c, X86_FEATURE_PN); 187 rdmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
199 188 lo |= 0x200000;
200 /* Disabling the serial number may affect the cpuid level */ 189 wrmsr(MSR_IA32_BBL_CR_CTL, lo, hi);
201 c->cpuid_level = cpuid_eax(0); 190
202 } 191 printk(KERN_NOTICE "CPU serial number disabled.\n");
192 clear_cpu_cap(c, X86_FEATURE_PN);
193
194 /* Disabling the serial number may affect the cpuid level */
195 c->cpuid_level = cpuid_eax(0);
203} 196}
204 197
205static int __init x86_serial_nr_setup(char *s) 198static int __init x86_serial_nr_setup(char *s)
@@ -232,6 +225,7 @@ struct cpuid_dependent_feature {
232 u32 feature; 225 u32 feature;
233 u32 level; 226 u32 level;
234}; 227};
228
235static const struct cpuid_dependent_feature __cpuinitconst 229static const struct cpuid_dependent_feature __cpuinitconst
236cpuid_dependent_features[] = { 230cpuid_dependent_features[] = {
237 { X86_FEATURE_MWAIT, 0x00000005 }, 231 { X86_FEATURE_MWAIT, 0x00000005 },
@@ -243,7 +237,11 @@ cpuid_dependent_features[] = {
243static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn) 237static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
244{ 238{
245 const struct cpuid_dependent_feature *df; 239 const struct cpuid_dependent_feature *df;
240
246 for (df = cpuid_dependent_features; df->feature; df++) { 241 for (df = cpuid_dependent_features; df->feature; df++) {
242
243 if (!cpu_has(c, df->feature))
244 continue;
247 /* 245 /*
248 * Note: cpuid_level is set to -1 if unavailable, but 246 * Note: cpuid_level is set to -1 if unavailable, but
249 * extended_extended_level is set to 0 if unavailable 247 * extended_extended_level is set to 0 if unavailable
@@ -251,32 +249,32 @@ static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn)
251 * when signed; hence the weird messing around with 249 * when signed; hence the weird messing around with
252 * signs here... 250 * signs here...
253 */ 251 */
254 if (cpu_has(c, df->feature) && 252 if (!((s32)df->level < 0 ?
255 ((s32)df->level < 0 ?
256 (u32)df->level > (u32)c->extended_cpuid_level : 253 (u32)df->level > (u32)c->extended_cpuid_level :
257 (s32)df->level > (s32)c->cpuid_level)) { 254 (s32)df->level > (s32)c->cpuid_level))
258 clear_cpu_cap(c, df->feature); 255 continue;
259 if (warn) 256
260 printk(KERN_WARNING 257 clear_cpu_cap(c, df->feature);
261 "CPU: CPU feature %s disabled " 258 if (!warn)
262 "due to lack of CPUID level 0x%x\n", 259 continue;
263 x86_cap_flags[df->feature], 260
264 df->level); 261 printk(KERN_WARNING
265 } 262 "CPU: CPU feature %s disabled, no CPUID level 0x%x\n",
263 x86_cap_flags[df->feature], df->level);
266 } 264 }
267} 265}
268 266
269/* 267/*
270 * Naming convention should be: <Name> [(<Codename>)] 268 * Naming convention should be: <Name> [(<Codename>)]
271 * This table only is used unless init_<vendor>() below doesn't set it; 269 * This table only is used unless init_<vendor>() below doesn't set it;
272 * in particular, if CPUID levels 0x80000002..4 are supported, this isn't used 270 * in particular, if CPUID levels 0x80000002..4 are supported, this
273 * 271 * isn't used
274 */ 272 */
275 273
276/* Look up CPU names by table lookup. */ 274/* Look up CPU names by table lookup. */
277static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c) 275static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c)
278{ 276{
279 struct cpu_model_info *info; 277 const struct cpu_model_info *info;
280 278
281 if (c->x86_model >= 16) 279 if (c->x86_model >= 16)
282 return NULL; /* Range check */ 280 return NULL; /* Range check */
@@ -307,8 +305,10 @@ void load_percpu_segment(int cpu)
307 load_stack_canary_segment(); 305 load_stack_canary_segment();
308} 306}
309 307
310/* Current gdt points %fs at the "master" per-cpu area: after this, 308/*
311 * it's on the real one. */ 309 * Current gdt points %fs at the "master" per-cpu area: after this,
310 * it's on the real one.
311 */
312void switch_to_new_gdt(int cpu) 312void switch_to_new_gdt(int cpu)
313{ 313{
314 struct desc_ptr gdt_descr; 314 struct desc_ptr gdt_descr;
@@ -321,7 +321,7 @@ void switch_to_new_gdt(int cpu)
321 load_percpu_segment(cpu); 321 load_percpu_segment(cpu);
322} 322}
323 323
324static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; 324static const struct cpu_dev *__cpuinitdata cpu_devs[X86_VENDOR_NUM] = {};
325 325
326static void __cpuinit default_init(struct cpuinfo_x86 *c) 326static void __cpuinit default_init(struct cpuinfo_x86 *c)
327{ 327{
@@ -340,7 +340,7 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
340#endif 340#endif
341} 341}
342 342
343static struct cpu_dev __cpuinitdata default_cpu = { 343static const struct cpu_dev __cpuinitconst default_cpu = {
344 .c_init = default_init, 344 .c_init = default_init,
345 .c_vendor = "Unknown", 345 .c_vendor = "Unknown",
346 .c_x86_vendor = X86_VENDOR_UNKNOWN, 346 .c_x86_vendor = X86_VENDOR_UNKNOWN,
@@ -354,22 +354,24 @@ static void __cpuinit get_model_name(struct cpuinfo_x86 *c)
354 if (c->extended_cpuid_level < 0x80000004) 354 if (c->extended_cpuid_level < 0x80000004)
355 return; 355 return;
356 356
357 v = (unsigned int *) c->x86_model_id; 357 v = (unsigned int *)c->x86_model_id;
358 cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]); 358 cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
359 cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]); 359 cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
360 cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]); 360 cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
361 c->x86_model_id[48] = 0; 361 c->x86_model_id[48] = 0;
362 362
363 /* Intel chips right-justify this string for some dumb reason; 363 /*
364 undo that brain damage */ 364 * Intel chips right-justify this string for some dumb reason;
365 * undo that brain damage:
366 */
365 p = q = &c->x86_model_id[0]; 367 p = q = &c->x86_model_id[0];
366 while (*p == ' ') 368 while (*p == ' ')
367 p++; 369 p++;
368 if (p != q) { 370 if (p != q) {
369 while (*p) 371 while (*p)
370 *q++ = *p++; 372 *q++ = *p++;
371 while (q <= &c->x86_model_id[48]) 373 while (q <= &c->x86_model_id[48])
372 *q++ = '\0'; /* Zero-pad the rest */ 374 *q++ = '\0'; /* Zero-pad the rest */
373 } 375 }
374} 376}
375 377
@@ -438,27 +440,30 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
438 440
439 if (smp_num_siblings == 1) { 441 if (smp_num_siblings == 1) {
440 printk(KERN_INFO "CPU: Hyper-Threading is disabled\n"); 442 printk(KERN_INFO "CPU: Hyper-Threading is disabled\n");
441 } else if (smp_num_siblings > 1) { 443 goto out;
444 }
442 445
443 if (smp_num_siblings > nr_cpu_ids) { 446 if (smp_num_siblings <= 1)
444 printk(KERN_WARNING "CPU: Unsupported number of siblings %d", 447 goto out;
445 smp_num_siblings);
446 smp_num_siblings = 1;
447 return;
448 }
449 448
450 index_msb = get_count_order(smp_num_siblings); 449 if (smp_num_siblings > nr_cpu_ids) {
451 c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb); 450 pr_warning("CPU: Unsupported number of siblings %d",
451 smp_num_siblings);
452 smp_num_siblings = 1;
453 return;
454 }
452 455
453 smp_num_siblings = smp_num_siblings / c->x86_max_cores; 456 index_msb = get_count_order(smp_num_siblings);
457 c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb);
454 458
455 index_msb = get_count_order(smp_num_siblings); 459 smp_num_siblings = smp_num_siblings / c->x86_max_cores;
456 460
457 core_bits = get_count_order(c->x86_max_cores); 461 index_msb = get_count_order(smp_num_siblings);
458 462
459 c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) & 463 core_bits = get_count_order(c->x86_max_cores);
460 ((1 << core_bits) - 1); 464
461 } 465 c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) &
466 ((1 << core_bits) - 1);
462 467
463out: 468out:
464 if ((c->x86_max_cores * smp_num_siblings) > 1) { 469 if ((c->x86_max_cores * smp_num_siblings) > 1) {
@@ -473,8 +478,8 @@ out:
473static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) 478static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
474{ 479{
475 char *v = c->x86_vendor_id; 480 char *v = c->x86_vendor_id;
476 int i;
477 static int printed; 481 static int printed;
482 int i;
478 483
479 for (i = 0; i < X86_VENDOR_NUM; i++) { 484 for (i = 0; i < X86_VENDOR_NUM; i++) {
480 if (!cpu_devs[i]) 485 if (!cpu_devs[i])
@@ -483,6 +488,7 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
483 if (!strcmp(v, cpu_devs[i]->c_ident[0]) || 488 if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
484 (cpu_devs[i]->c_ident[1] && 489 (cpu_devs[i]->c_ident[1] &&
485 !strcmp(v, cpu_devs[i]->c_ident[1]))) { 490 !strcmp(v, cpu_devs[i]->c_ident[1]))) {
491
486 this_cpu = cpu_devs[i]; 492 this_cpu = cpu_devs[i];
487 c->x86_vendor = this_cpu->c_x86_vendor; 493 c->x86_vendor = this_cpu->c_x86_vendor;
488 return; 494 return;
@@ -491,7 +497,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
491 497
492 if (!printed) { 498 if (!printed) {
493 printed++; 499 printed++;
494 printk(KERN_ERR "CPU: vendor_id '%s' unknown, using generic init.\n", v); 500 printk(KERN_ERR
501 "CPU: vendor_id '%s' unknown, using generic init.\n", v);
502
495 printk(KERN_ERR "CPU: Your system may be unstable.\n"); 503 printk(KERN_ERR "CPU: Your system may be unstable.\n");
496 } 504 }
497 505
@@ -511,14 +519,17 @@ void __cpuinit cpu_detect(struct cpuinfo_x86 *c)
511 /* Intel-defined flags: level 0x00000001 */ 519 /* Intel-defined flags: level 0x00000001 */
512 if (c->cpuid_level >= 0x00000001) { 520 if (c->cpuid_level >= 0x00000001) {
513 u32 junk, tfms, cap0, misc; 521 u32 junk, tfms, cap0, misc;
522
514 cpuid(0x00000001, &tfms, &misc, &junk, &cap0); 523 cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
515 c->x86 = (tfms >> 8) & 0xf; 524 c->x86 = (tfms >> 8) & 0xf;
516 c->x86_model = (tfms >> 4) & 0xf; 525 c->x86_model = (tfms >> 4) & 0xf;
517 c->x86_mask = tfms & 0xf; 526 c->x86_mask = tfms & 0xf;
527
518 if (c->x86 == 0xf) 528 if (c->x86 == 0xf)
519 c->x86 += (tfms >> 20) & 0xff; 529 c->x86 += (tfms >> 20) & 0xff;
520 if (c->x86 >= 0x6) 530 if (c->x86 >= 0x6)
521 c->x86_model += ((tfms >> 16) & 0xf) << 4; 531 c->x86_model += ((tfms >> 16) & 0xf) << 4;
532
522 if (cap0 & (1<<19)) { 533 if (cap0 & (1<<19)) {
523 c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; 534 c->x86_clflush_size = ((misc >> 8) & 0xff) * 8;
524 c->x86_cache_alignment = c->x86_clflush_size; 535 c->x86_cache_alignment = c->x86_clflush_size;
@@ -534,6 +545,7 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
534 /* Intel-defined flags: level 0x00000001 */ 545 /* Intel-defined flags: level 0x00000001 */
535 if (c->cpuid_level >= 0x00000001) { 546 if (c->cpuid_level >= 0x00000001) {
536 u32 capability, excap; 547 u32 capability, excap;
548
537 cpuid(0x00000001, &tfms, &ebx, &excap, &capability); 549 cpuid(0x00000001, &tfms, &ebx, &excap, &capability);
538 c->x86_capability[0] = capability; 550 c->x86_capability[0] = capability;
539 c->x86_capability[4] = excap; 551 c->x86_capability[4] = excap;
@@ -542,6 +554,7 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
542 /* AMD-defined flags: level 0x80000001 */ 554 /* AMD-defined flags: level 0x80000001 */
543 xlvl = cpuid_eax(0x80000000); 555 xlvl = cpuid_eax(0x80000000);
544 c->extended_cpuid_level = xlvl; 556 c->extended_cpuid_level = xlvl;
557
545 if ((xlvl & 0xffff0000) == 0x80000000) { 558 if ((xlvl & 0xffff0000) == 0x80000000) {
546 if (xlvl >= 0x80000001) { 559 if (xlvl >= 0x80000001) {
547 c->x86_capability[1] = cpuid_edx(0x80000001); 560 c->x86_capability[1] = cpuid_edx(0x80000001);
@@ -549,13 +562,15 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
549 } 562 }
550 } 563 }
551 564
552#ifdef CONFIG_X86_64
553 if (c->extended_cpuid_level >= 0x80000008) { 565 if (c->extended_cpuid_level >= 0x80000008) {
554 u32 eax = cpuid_eax(0x80000008); 566 u32 eax = cpuid_eax(0x80000008);
555 567
556 c->x86_virt_bits = (eax >> 8) & 0xff; 568 c->x86_virt_bits = (eax >> 8) & 0xff;
557 c->x86_phys_bits = eax & 0xff; 569 c->x86_phys_bits = eax & 0xff;
558 } 570 }
571#ifdef CONFIG_X86_32
572 else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
573 c->x86_phys_bits = 36;
559#endif 574#endif
560 575
561 if (c->extended_cpuid_level >= 0x80000007) 576 if (c->extended_cpuid_level >= 0x80000007)
@@ -602,8 +617,12 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
602{ 617{
603#ifdef CONFIG_X86_64 618#ifdef CONFIG_X86_64
604 c->x86_clflush_size = 64; 619 c->x86_clflush_size = 64;
620 c->x86_phys_bits = 36;
621 c->x86_virt_bits = 48;
605#else 622#else
606 c->x86_clflush_size = 32; 623 c->x86_clflush_size = 32;
624 c->x86_phys_bits = 32;
625 c->x86_virt_bits = 32;
607#endif 626#endif
608 c->x86_cache_alignment = c->x86_clflush_size; 627 c->x86_cache_alignment = c->x86_clflush_size;
609 628
@@ -634,12 +653,12 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
634 653
635void __init early_cpu_init(void) 654void __init early_cpu_init(void)
636{ 655{
637 struct cpu_dev **cdev; 656 const struct cpu_dev *const *cdev;
638 int count = 0; 657 int count = 0;
639 658
640 printk("KERNEL supported cpus:\n"); 659 printk(KERN_INFO "KERNEL supported cpus:\n");
641 for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) { 660 for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
642 struct cpu_dev *cpudev = *cdev; 661 const struct cpu_dev *cpudev = *cdev;
643 unsigned int j; 662 unsigned int j;
644 663
645 if (count >= X86_VENDOR_NUM) 664 if (count >= X86_VENDOR_NUM)
@@ -650,7 +669,7 @@ void __init early_cpu_init(void)
650 for (j = 0; j < 2; j++) { 669 for (j = 0; j < 2; j++) {
651 if (!cpudev->c_ident[j]) 670 if (!cpudev->c_ident[j])
652 continue; 671 continue;
653 printk(" %s %s\n", cpudev->c_vendor, 672 printk(KERN_INFO " %s %s\n", cpudev->c_vendor,
654 cpudev->c_ident[j]); 673 cpudev->c_ident[j]);
655 } 674 }
656 } 675 }
@@ -726,9 +745,13 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
726 c->x86_coreid_bits = 0; 745 c->x86_coreid_bits = 0;
727#ifdef CONFIG_X86_64 746#ifdef CONFIG_X86_64
728 c->x86_clflush_size = 64; 747 c->x86_clflush_size = 64;
748 c->x86_phys_bits = 36;
749 c->x86_virt_bits = 48;
729#else 750#else
730 c->cpuid_level = -1; /* CPUID not detected */ 751 c->cpuid_level = -1; /* CPUID not detected */
731 c->x86_clflush_size = 32; 752 c->x86_clflush_size = 32;
753 c->x86_phys_bits = 32;
754 c->x86_virt_bits = 32;
732#endif 755#endif
733 c->x86_cache_alignment = c->x86_clflush_size; 756 c->x86_cache_alignment = c->x86_clflush_size;
734 memset(&c->x86_capability, 0, sizeof c->x86_capability); 757 memset(&c->x86_capability, 0, sizeof c->x86_capability);
@@ -759,8 +782,8 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
759 squash_the_stupid_serial_number(c); 782 squash_the_stupid_serial_number(c);
760 783
761 /* 784 /*
762 * The vendor-specific functions might have changed features. Now 785 * The vendor-specific functions might have changed features.
763 * we do "generic changes." 786 * Now we do "generic changes."
764 */ 787 */
765 788
766 /* Filter out anything that depends on CPUID levels we don't have */ 789 /* Filter out anything that depends on CPUID levels we don't have */
@@ -768,7 +791,7 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
768 791
769 /* If the model name is still unset, do table lookup. */ 792 /* If the model name is still unset, do table lookup. */
770 if (!c->x86_model_id[0]) { 793 if (!c->x86_model_id[0]) {
771 char *p; 794 const char *p;
772 p = table_lookup_model(c); 795 p = table_lookup_model(c);
773 if (p) 796 if (p)
774 strcpy(c->x86_model_id, p); 797 strcpy(c->x86_model_id, p);
@@ -824,6 +847,7 @@ static void vgetcpu_set_mode(void)
824void __init identify_boot_cpu(void) 847void __init identify_boot_cpu(void)
825{ 848{
826 identify_cpu(&boot_cpu_data); 849 identify_cpu(&boot_cpu_data);
850 init_c1e_mask();
827#ifdef CONFIG_X86_32 851#ifdef CONFIG_X86_32
828 sysenter_setup(); 852 sysenter_setup();
829 enable_sep_cpu(); 853 enable_sep_cpu();
@@ -843,11 +867,11 @@ void __cpuinit identify_secondary_cpu(struct cpuinfo_x86 *c)
843} 867}
844 868
845struct msr_range { 869struct msr_range {
846 unsigned min; 870 unsigned min;
847 unsigned max; 871 unsigned max;
848}; 872};
849 873
850static struct msr_range msr_range_array[] __cpuinitdata = { 874static const struct msr_range msr_range_array[] __cpuinitconst = {
851 { 0x00000000, 0x00000418}, 875 { 0x00000000, 0x00000418},
852 { 0xc0000000, 0xc000040b}, 876 { 0xc0000000, 0xc000040b},
853 { 0xc0010000, 0xc0010142}, 877 { 0xc0010000, 0xc0010142},
@@ -856,14 +880,15 @@ static struct msr_range msr_range_array[] __cpuinitdata = {
856 880
857static void __cpuinit print_cpu_msr(void) 881static void __cpuinit print_cpu_msr(void)
858{ 882{
883 unsigned index_min, index_max;
859 unsigned index; 884 unsigned index;
860 u64 val; 885 u64 val;
861 int i; 886 int i;
862 unsigned index_min, index_max;
863 887
864 for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) { 888 for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) {
865 index_min = msr_range_array[i].min; 889 index_min = msr_range_array[i].min;
866 index_max = msr_range_array[i].max; 890 index_max = msr_range_array[i].max;
891
867 for (index = index_min; index < index_max; index++) { 892 for (index = index_min; index < index_max; index++) {
868 if (rdmsrl_amd_safe(index, &val)) 893 if (rdmsrl_amd_safe(index, &val))
869 continue; 894 continue;
@@ -873,6 +898,7 @@ static void __cpuinit print_cpu_msr(void)
873} 898}
874 899
875static int show_msr __cpuinitdata; 900static int show_msr __cpuinitdata;
901
876static __init int setup_show_msr(char *arg) 902static __init int setup_show_msr(char *arg)
877{ 903{
878 int num; 904 int num;
@@ -894,12 +920,14 @@ __setup("noclflush", setup_noclflush);
894 920
895void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) 921void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
896{ 922{
897 char *vendor = NULL; 923 const char *vendor = NULL;
898 924
899 if (c->x86_vendor < X86_VENDOR_NUM) 925 if (c->x86_vendor < X86_VENDOR_NUM) {
900 vendor = this_cpu->c_vendor; 926 vendor = this_cpu->c_vendor;
901 else if (c->cpuid_level >= 0) 927 } else {
902 vendor = c->x86_vendor_id; 928 if (c->cpuid_level >= 0)
929 vendor = c->x86_vendor_id;
930 }
903 931
904 if (vendor && !strstr(c->x86_model_id, vendor)) 932 if (vendor && !strstr(c->x86_model_id, vendor))
905 printk(KERN_CONT "%s ", vendor); 933 printk(KERN_CONT "%s ", vendor);
@@ -926,10 +954,12 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
926static __init int setup_disablecpuid(char *arg) 954static __init int setup_disablecpuid(char *arg)
927{ 955{
928 int bit; 956 int bit;
957
929 if (get_option(&arg, &bit) && bit < NCAPINTS*32) 958 if (get_option(&arg, &bit) && bit < NCAPINTS*32)
930 setup_clear_cpu_cap(bit); 959 setup_clear_cpu_cap(bit);
931 else 960 else
932 return 0; 961 return 0;
962
933 return 1; 963 return 1;
934} 964}
935__setup("clearcpuid=", setup_disablecpuid); 965__setup("clearcpuid=", setup_disablecpuid);
@@ -939,6 +969,7 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
939 969
940DEFINE_PER_CPU_FIRST(union irq_stack_union, 970DEFINE_PER_CPU_FIRST(union irq_stack_union,
941 irq_stack_union) __aligned(PAGE_SIZE); 971 irq_stack_union) __aligned(PAGE_SIZE);
972
942DEFINE_PER_CPU(char *, irq_stack_ptr) = 973DEFINE_PER_CPU(char *, irq_stack_ptr) =
943 init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; 974 init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64;
944 975
@@ -948,12 +979,21 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack);
948 979
949DEFINE_PER_CPU(unsigned int, irq_count) = -1; 980DEFINE_PER_CPU(unsigned int, irq_count) = -1;
950 981
982/*
983 * Special IST stacks which the CPU switches to when it calls
984 * an IST-marked descriptor entry. Up to 7 stacks (hardware
985 * limit), all of them are 4K, except the debug stack which
986 * is 8K.
987 */
988static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = {
989 [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ,
990 [DEBUG_STACK - 1] = DEBUG_STKSZ
991};
992
951static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks 993static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
952 [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]) 994 [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ])
953 __aligned(PAGE_SIZE); 995 __aligned(PAGE_SIZE);
954 996
955extern asmlinkage void ignore_sysret(void);
956
957/* May not be marked __init: used by software suspend */ 997/* May not be marked __init: used by software suspend */
958void syscall_init(void) 998void syscall_init(void)
959{ 999{
@@ -983,7 +1023,7 @@ unsigned long kernel_eflags;
983 */ 1023 */
984DEFINE_PER_CPU(struct orig_ist, orig_ist); 1024DEFINE_PER_CPU(struct orig_ist, orig_ist);
985 1025
986#else /* x86_64 */ 1026#else /* CONFIG_X86_64 */
987 1027
988#ifdef CONFIG_CC_STACKPROTECTOR 1028#ifdef CONFIG_CC_STACKPROTECTOR
989DEFINE_PER_CPU(unsigned long, stack_canary); 1029DEFINE_PER_CPU(unsigned long, stack_canary);
@@ -995,9 +1035,26 @@ struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
995 memset(regs, 0, sizeof(struct pt_regs)); 1035 memset(regs, 0, sizeof(struct pt_regs));
996 regs->fs = __KERNEL_PERCPU; 1036 regs->fs = __KERNEL_PERCPU;
997 regs->gs = __KERNEL_STACK_CANARY; 1037 regs->gs = __KERNEL_STACK_CANARY;
1038
998 return regs; 1039 return regs;
999} 1040}
1000#endif /* x86_64 */ 1041#endif /* CONFIG_X86_64 */
1042
1043/*
1044 * Clear all 6 debug registers:
1045 */
1046static void clear_all_debug_regs(void)
1047{
1048 int i;
1049
1050 for (i = 0; i < 8; i++) {
1051 /* Ignore db4, db5 */
1052 if ((i == 4) || (i == 5))
1053 continue;
1054
1055 set_debugreg(0, i);
1056 }
1057}
1001 1058
1002/* 1059/*
1003 * cpu_init() initializes state that is per-CPU. Some data is already 1060 * cpu_init() initializes state that is per-CPU. Some data is already
@@ -1007,15 +1064,20 @@ struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
1007 * A lot of state is already set up in PDA init for 64 bit 1064 * A lot of state is already set up in PDA init for 64 bit
1008 */ 1065 */
1009#ifdef CONFIG_X86_64 1066#ifdef CONFIG_X86_64
1067
1010void __cpuinit cpu_init(void) 1068void __cpuinit cpu_init(void)
1011{ 1069{
1012 int cpu = stack_smp_processor_id(); 1070 struct orig_ist *orig_ist;
1013 struct tss_struct *t = &per_cpu(init_tss, cpu);
1014 struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu);
1015 unsigned long v;
1016 struct task_struct *me; 1071 struct task_struct *me;
1072 struct tss_struct *t;
1073 unsigned long v;
1074 int cpu;
1017 int i; 1075 int i;
1018 1076
1077 cpu = stack_smp_processor_id();
1078 t = &per_cpu(init_tss, cpu);
1079 orig_ist = &per_cpu(orig_ist, cpu);
1080
1019#ifdef CONFIG_NUMA 1081#ifdef CONFIG_NUMA
1020 if (cpu != 0 && percpu_read(node_number) == 0 && 1082 if (cpu != 0 && percpu_read(node_number) == 0 &&
1021 cpu_to_node(cpu) != NUMA_NO_NODE) 1083 cpu_to_node(cpu) != NUMA_NO_NODE)
@@ -1056,19 +1118,17 @@ void __cpuinit cpu_init(void)
1056 * set up and load the per-CPU TSS 1118 * set up and load the per-CPU TSS
1057 */ 1119 */
1058 if (!orig_ist->ist[0]) { 1120 if (!orig_ist->ist[0]) {
1059 static const unsigned int sizes[N_EXCEPTION_STACKS] = {
1060 [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ,
1061 [DEBUG_STACK - 1] = DEBUG_STKSZ
1062 };
1063 char *estacks = per_cpu(exception_stacks, cpu); 1121 char *estacks = per_cpu(exception_stacks, cpu);
1122
1064 for (v = 0; v < N_EXCEPTION_STACKS; v++) { 1123 for (v = 0; v < N_EXCEPTION_STACKS; v++) {
1065 estacks += sizes[v]; 1124 estacks += exception_stack_sizes[v];
1066 orig_ist->ist[v] = t->x86_tss.ist[v] = 1125 orig_ist->ist[v] = t->x86_tss.ist[v] =
1067 (unsigned long)estacks; 1126 (unsigned long)estacks;
1068 } 1127 }
1069 } 1128 }
1070 1129
1071 t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap); 1130 t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
1131
1072 /* 1132 /*
1073 * <= is required because the CPU will access up to 1133 * <= is required because the CPU will access up to
1074 * 8 bits beyond the end of the IO permission bitmap. 1134 * 8 bits beyond the end of the IO permission bitmap.
@@ -1078,8 +1138,7 @@ void __cpuinit cpu_init(void)
1078 1138
1079 atomic_inc(&init_mm.mm_count); 1139 atomic_inc(&init_mm.mm_count);
1080 me->active_mm = &init_mm; 1140 me->active_mm = &init_mm;
1081 if (me->mm) 1141 BUG_ON(me->mm);
1082 BUG();
1083 enter_lazy_tlb(&init_mm, me); 1142 enter_lazy_tlb(&init_mm, me);
1084 1143
1085 load_sp0(t, &current->thread); 1144 load_sp0(t, &current->thread);
@@ -1098,17 +1157,7 @@ void __cpuinit cpu_init(void)
1098 arch_kgdb_ops.correct_hw_break(); 1157 arch_kgdb_ops.correct_hw_break();
1099 else 1158 else
1100#endif 1159#endif
1101 { 1160 clear_all_debug_regs();
1102 /*
1103 * Clear all 6 debug registers:
1104 */
1105 set_debugreg(0UL, 0);
1106 set_debugreg(0UL, 1);
1107 set_debugreg(0UL, 2);
1108 set_debugreg(0UL, 3);
1109 set_debugreg(0UL, 6);
1110 set_debugreg(0UL, 7);
1111 }
1112 1161
1113 fpu_init(); 1162 fpu_init();
1114 1163
@@ -1129,7 +1178,8 @@ void __cpuinit cpu_init(void)
1129 1178
1130 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) { 1179 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
1131 printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); 1180 printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
1132 for (;;) local_irq_enable(); 1181 for (;;)
1182 local_irq_enable();
1133 } 1183 }
1134 1184
1135 printk(KERN_INFO "Initializing CPU#%d\n", cpu); 1185 printk(KERN_INFO "Initializing CPU#%d\n", cpu);
@@ -1145,8 +1195,7 @@ void __cpuinit cpu_init(void)
1145 */ 1195 */
1146 atomic_inc(&init_mm.mm_count); 1196 atomic_inc(&init_mm.mm_count);
1147 curr->active_mm = &init_mm; 1197 curr->active_mm = &init_mm;
1148 if (curr->mm) 1198 BUG_ON(curr->mm);
1149 BUG();
1150 enter_lazy_tlb(&init_mm, curr); 1199 enter_lazy_tlb(&init_mm, curr);
1151 1200
1152 load_sp0(t, thread); 1201 load_sp0(t, thread);
@@ -1159,13 +1208,7 @@ void __cpuinit cpu_init(void)
1159 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); 1208 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
1160#endif 1209#endif
1161 1210
1162 /* Clear all 6 debug registers: */ 1211 clear_all_debug_regs();
1163 set_debugreg(0, 0);
1164 set_debugreg(0, 1);
1165 set_debugreg(0, 2);
1166 set_debugreg(0, 3);
1167 set_debugreg(0, 6);
1168 set_debugreg(0, 7);
1169 1212
1170 /* 1213 /*
1171 * Force FPU initialization: 1214 * Force FPU initialization:
@@ -1185,6 +1228,4 @@ void __cpuinit cpu_init(void)
1185 1228
1186 xsave_init(); 1229 xsave_init();
1187} 1230}
1188
1189
1190#endif 1231#endif
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index de4094a39210..6de9a908e400 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -3,33 +3,34 @@
3#define ARCH_X86_CPU_H 3#define ARCH_X86_CPU_H
4 4
5struct cpu_model_info { 5struct cpu_model_info {
6 int vendor; 6 int vendor;
7 int family; 7 int family;
8 char *model_names[16]; 8 const char *model_names[16];
9}; 9};
10 10
11/* attempt to consolidate cpu attributes */ 11/* attempt to consolidate cpu attributes */
12struct cpu_dev { 12struct cpu_dev {
13 char * c_vendor; 13 const char *c_vendor;
14 14
15 /* some have two possibilities for cpuid string */ 15 /* some have two possibilities for cpuid string */
16 char * c_ident[2]; 16 const char *c_ident[2];
17 17
18 struct cpu_model_info c_models[4]; 18 struct cpu_model_info c_models[4];
19 19
20 void (*c_early_init)(struct cpuinfo_x86 *c); 20 void (*c_early_init)(struct cpuinfo_x86 *);
21 void (*c_init)(struct cpuinfo_x86 * c); 21 void (*c_init)(struct cpuinfo_x86 *);
22 void (*c_identify)(struct cpuinfo_x86 * c); 22 void (*c_identify)(struct cpuinfo_x86 *);
23 unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size); 23 unsigned int (*c_size_cache)(struct cpuinfo_x86 *, unsigned int);
24 int c_x86_vendor; 24 int c_x86_vendor;
25}; 25};
26 26
27#define cpu_dev_register(cpu_devX) \ 27#define cpu_dev_register(cpu_devX) \
28 static struct cpu_dev *__cpu_dev_##cpu_devX __used \ 28 static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \
29 __attribute__((__section__(".x86_cpu_dev.init"))) = \ 29 __attribute__((__section__(".x86_cpu_dev.init"))) = \
30 &cpu_devX; 30 &cpu_devX;
31 31
32extern struct cpu_dev *__x86_cpu_dev_start[], *__x86_cpu_dev_end[]; 32extern const struct cpu_dev *const __x86_cpu_dev_start[],
33 *const __x86_cpu_dev_end[];
33 34
34extern void display_cacheinfo(struct cpuinfo_x86 *c); 35extern void display_cacheinfo(struct cpuinfo_x86 *c);
35 36
diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c
new file mode 100755
index 000000000000..46e29ab96c6a
--- /dev/null
+++ b/arch/x86/kernel/cpu/cpu_debug.c
@@ -0,0 +1,901 @@
1/*
2 * CPU x86 architecture debug code
3 *
4 * Copyright(C) 2009 Jaswinder Singh Rajput
5 *
6 * For licencing details see kernel-base/COPYING
7 */
8
9#include <linux/interrupt.h>
10#include <linux/compiler.h>
11#include <linux/seq_file.h>
12#include <linux/debugfs.h>
13#include <linux/kprobes.h>
14#include <linux/uaccess.h>
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/percpu.h>
18#include <linux/signal.h>
19#include <linux/errno.h>
20#include <linux/sched.h>
21#include <linux/types.h>
22#include <linux/init.h>
23#include <linux/slab.h>
24#include <linux/smp.h>
25
26#include <asm/cpu_debug.h>
27#include <asm/paravirt.h>
28#include <asm/system.h>
29#include <asm/traps.h>
30#include <asm/apic.h>
31#include <asm/desc.h>
32
33static DEFINE_PER_CPU(struct cpu_cpuX_base, cpu_arr[CPU_REG_ALL_BIT]);
34static DEFINE_PER_CPU(struct cpu_private *, priv_arr[MAX_CPU_FILES]);
35static DEFINE_PER_CPU(unsigned, cpu_modelflag);
36static DEFINE_PER_CPU(int, cpu_priv_count);
37static DEFINE_PER_CPU(unsigned, cpu_model);
38
39static DEFINE_MUTEX(cpu_debug_lock);
40
41static struct dentry *cpu_debugfs_dir;
42
43static struct cpu_debug_base cpu_base[] = {
44 { "mc", CPU_MC, 0 },
45 { "monitor", CPU_MONITOR, 0 },
46 { "time", CPU_TIME, 0 },
47 { "pmc", CPU_PMC, 1 },
48 { "platform", CPU_PLATFORM, 0 },
49 { "apic", CPU_APIC, 0 },
50 { "poweron", CPU_POWERON, 0 },
51 { "control", CPU_CONTROL, 0 },
52 { "features", CPU_FEATURES, 0 },
53 { "lastbranch", CPU_LBRANCH, 0 },
54 { "bios", CPU_BIOS, 0 },
55 { "freq", CPU_FREQ, 0 },
56 { "mtrr", CPU_MTRR, 0 },
57 { "perf", CPU_PERF, 0 },
58 { "cache", CPU_CACHE, 0 },
59 { "sysenter", CPU_SYSENTER, 0 },
60 { "therm", CPU_THERM, 0 },
61 { "misc", CPU_MISC, 0 },
62 { "debug", CPU_DEBUG, 0 },
63 { "pat", CPU_PAT, 0 },
64 { "vmx", CPU_VMX, 0 },
65 { "call", CPU_CALL, 0 },
66 { "base", CPU_BASE, 0 },
67 { "ver", CPU_VER, 0 },
68 { "conf", CPU_CONF, 0 },
69 { "smm", CPU_SMM, 0 },
70 { "svm", CPU_SVM, 0 },
71 { "osvm", CPU_OSVM, 0 },
72 { "tss", CPU_TSS, 0 },
73 { "cr", CPU_CR, 0 },
74 { "dt", CPU_DT, 0 },
75 { "registers", CPU_REG_ALL, 0 },
76};
77
78static struct cpu_file_base cpu_file[] = {
79 { "index", CPU_REG_ALL, 0 },
80 { "value", CPU_REG_ALL, 1 },
81};
82
83/* Intel Registers Range */
84static struct cpu_debug_range cpu_intel_range[] = {
85 { 0x00000000, 0x00000001, CPU_MC, CPU_INTEL_ALL },
86 { 0x00000006, 0x00000007, CPU_MONITOR, CPU_CX_AT_XE },
87 { 0x00000010, 0x00000010, CPU_TIME, CPU_INTEL_ALL },
88 { 0x00000011, 0x00000013, CPU_PMC, CPU_INTEL_PENTIUM },
89 { 0x00000017, 0x00000017, CPU_PLATFORM, CPU_PX_CX_AT_XE },
90 { 0x0000001B, 0x0000001B, CPU_APIC, CPU_P6_CX_AT_XE },
91
92 { 0x0000002A, 0x0000002A, CPU_POWERON, CPU_PX_CX_AT_XE },
93 { 0x0000002B, 0x0000002B, CPU_POWERON, CPU_INTEL_XEON },
94 { 0x0000002C, 0x0000002C, CPU_FREQ, CPU_INTEL_XEON },
95 { 0x0000003A, 0x0000003A, CPU_CONTROL, CPU_CX_AT_XE },
96
97 { 0x00000040, 0x00000043, CPU_LBRANCH, CPU_PM_CX_AT_XE },
98 { 0x00000044, 0x00000047, CPU_LBRANCH, CPU_PM_CO_AT },
99 { 0x00000060, 0x00000063, CPU_LBRANCH, CPU_C2_AT },
100 { 0x00000064, 0x00000067, CPU_LBRANCH, CPU_INTEL_ATOM },
101
102 { 0x00000079, 0x00000079, CPU_BIOS, CPU_P6_CX_AT_XE },
103 { 0x00000088, 0x0000008A, CPU_CACHE, CPU_INTEL_P6 },
104 { 0x0000008B, 0x0000008B, CPU_BIOS, CPU_P6_CX_AT_XE },
105 { 0x0000009B, 0x0000009B, CPU_MONITOR, CPU_INTEL_XEON },
106
107 { 0x000000C1, 0x000000C2, CPU_PMC, CPU_P6_CX_AT },
108 { 0x000000CD, 0x000000CD, CPU_FREQ, CPU_CX_AT },
109 { 0x000000E7, 0x000000E8, CPU_PERF, CPU_CX_AT },
110 { 0x000000FE, 0x000000FE, CPU_MTRR, CPU_P6_CX_XE },
111
112 { 0x00000116, 0x00000116, CPU_CACHE, CPU_INTEL_P6 },
113 { 0x00000118, 0x00000118, CPU_CACHE, CPU_INTEL_P6 },
114 { 0x00000119, 0x00000119, CPU_CACHE, CPU_INTEL_PX },
115 { 0x0000011A, 0x0000011B, CPU_CACHE, CPU_INTEL_P6 },
116 { 0x0000011E, 0x0000011E, CPU_CACHE, CPU_PX_CX_AT },
117
118 { 0x00000174, 0x00000176, CPU_SYSENTER, CPU_P6_CX_AT_XE },
119 { 0x00000179, 0x0000017A, CPU_MC, CPU_PX_CX_AT_XE },
120 { 0x0000017B, 0x0000017B, CPU_MC, CPU_P6_XE },
121 { 0x00000186, 0x00000187, CPU_PMC, CPU_P6_CX_AT },
122 { 0x00000198, 0x00000199, CPU_PERF, CPU_PM_CX_AT_XE },
123 { 0x0000019A, 0x0000019A, CPU_TIME, CPU_PM_CX_AT_XE },
124 { 0x0000019B, 0x0000019D, CPU_THERM, CPU_PM_CX_AT_XE },
125 { 0x000001A0, 0x000001A0, CPU_MISC, CPU_PM_CX_AT_XE },
126
127 { 0x000001C9, 0x000001C9, CPU_LBRANCH, CPU_PM_CX_AT },
128 { 0x000001D7, 0x000001D8, CPU_LBRANCH, CPU_INTEL_XEON },
129 { 0x000001D9, 0x000001D9, CPU_DEBUG, CPU_CX_AT_XE },
130 { 0x000001DA, 0x000001DA, CPU_LBRANCH, CPU_INTEL_XEON },
131 { 0x000001DB, 0x000001DB, CPU_LBRANCH, CPU_P6_XE },
132 { 0x000001DC, 0x000001DC, CPU_LBRANCH, CPU_INTEL_P6 },
133 { 0x000001DD, 0x000001DE, CPU_LBRANCH, CPU_PX_CX_AT_XE },
134 { 0x000001E0, 0x000001E0, CPU_LBRANCH, CPU_INTEL_P6 },
135
136 { 0x00000200, 0x0000020F, CPU_MTRR, CPU_P6_CX_XE },
137 { 0x00000250, 0x00000250, CPU_MTRR, CPU_P6_CX_XE },
138 { 0x00000258, 0x00000259, CPU_MTRR, CPU_P6_CX_XE },
139 { 0x00000268, 0x0000026F, CPU_MTRR, CPU_P6_CX_XE },
140 { 0x00000277, 0x00000277, CPU_PAT, CPU_C2_AT_XE },
141 { 0x000002FF, 0x000002FF, CPU_MTRR, CPU_P6_CX_XE },
142
143 { 0x00000300, 0x00000308, CPU_PMC, CPU_INTEL_XEON },
144 { 0x00000309, 0x0000030B, CPU_PMC, CPU_C2_AT_XE },
145 { 0x0000030C, 0x00000311, CPU_PMC, CPU_INTEL_XEON },
146 { 0x00000345, 0x00000345, CPU_PMC, CPU_C2_AT },
147 { 0x00000360, 0x00000371, CPU_PMC, CPU_INTEL_XEON },
148 { 0x0000038D, 0x00000390, CPU_PMC, CPU_C2_AT },
149 { 0x000003A0, 0x000003BE, CPU_PMC, CPU_INTEL_XEON },
150 { 0x000003C0, 0x000003CD, CPU_PMC, CPU_INTEL_XEON },
151 { 0x000003E0, 0x000003E1, CPU_PMC, CPU_INTEL_XEON },
152 { 0x000003F0, 0x000003F0, CPU_PMC, CPU_INTEL_XEON },
153 { 0x000003F1, 0x000003F1, CPU_PMC, CPU_C2_AT_XE },
154 { 0x000003F2, 0x000003F2, CPU_PMC, CPU_INTEL_XEON },
155
156 { 0x00000400, 0x00000402, CPU_MC, CPU_PM_CX_AT_XE },
157 { 0x00000403, 0x00000403, CPU_MC, CPU_INTEL_XEON },
158 { 0x00000404, 0x00000406, CPU_MC, CPU_PM_CX_AT_XE },
159 { 0x00000407, 0x00000407, CPU_MC, CPU_INTEL_XEON },
160 { 0x00000408, 0x0000040A, CPU_MC, CPU_PM_CX_AT_XE },
161 { 0x0000040B, 0x0000040B, CPU_MC, CPU_INTEL_XEON },
162 { 0x0000040C, 0x0000040E, CPU_MC, CPU_PM_CX_XE },
163 { 0x0000040F, 0x0000040F, CPU_MC, CPU_INTEL_XEON },
164 { 0x00000410, 0x00000412, CPU_MC, CPU_PM_CX_AT_XE },
165 { 0x00000413, 0x00000417, CPU_MC, CPU_CX_AT_XE },
166 { 0x00000480, 0x0000048B, CPU_VMX, CPU_CX_AT_XE },
167
168 { 0x00000600, 0x00000600, CPU_DEBUG, CPU_PM_CX_AT_XE },
169 { 0x00000680, 0x0000068F, CPU_LBRANCH, CPU_INTEL_XEON },
170 { 0x000006C0, 0x000006CF, CPU_LBRANCH, CPU_INTEL_XEON },
171
172 { 0x000107CC, 0x000107D3, CPU_PMC, CPU_INTEL_XEON_MP },
173
174 { 0xC0000080, 0xC0000080, CPU_FEATURES, CPU_INTEL_XEON },
175 { 0xC0000081, 0xC0000082, CPU_CALL, CPU_INTEL_XEON },
176 { 0xC0000084, 0xC0000084, CPU_CALL, CPU_INTEL_XEON },
177 { 0xC0000100, 0xC0000102, CPU_BASE, CPU_INTEL_XEON },
178};
179
180/* AMD Registers Range */
181static struct cpu_debug_range cpu_amd_range[] = {
182 { 0x00000000, 0x00000001, CPU_MC, CPU_K10_PLUS, },
183 { 0x00000010, 0x00000010, CPU_TIME, CPU_K8_PLUS, },
184 { 0x0000001B, 0x0000001B, CPU_APIC, CPU_K8_PLUS, },
185 { 0x0000002A, 0x0000002A, CPU_POWERON, CPU_K7_PLUS },
186 { 0x0000008B, 0x0000008B, CPU_VER, CPU_K8_PLUS },
187 { 0x000000FE, 0x000000FE, CPU_MTRR, CPU_K8_PLUS, },
188
189 { 0x00000174, 0x00000176, CPU_SYSENTER, CPU_K8_PLUS, },
190 { 0x00000179, 0x0000017B, CPU_MC, CPU_K8_PLUS, },
191 { 0x000001D9, 0x000001D9, CPU_DEBUG, CPU_K8_PLUS, },
192 { 0x000001DB, 0x000001DE, CPU_LBRANCH, CPU_K8_PLUS, },
193
194 { 0x00000200, 0x0000020F, CPU_MTRR, CPU_K8_PLUS, },
195 { 0x00000250, 0x00000250, CPU_MTRR, CPU_K8_PLUS, },
196 { 0x00000258, 0x00000259, CPU_MTRR, CPU_K8_PLUS, },
197 { 0x00000268, 0x0000026F, CPU_MTRR, CPU_K8_PLUS, },
198 { 0x00000277, 0x00000277, CPU_PAT, CPU_K8_PLUS, },
199 { 0x000002FF, 0x000002FF, CPU_MTRR, CPU_K8_PLUS, },
200
201 { 0x00000400, 0x00000413, CPU_MC, CPU_K8_PLUS, },
202
203 { 0xC0000080, 0xC0000080, CPU_FEATURES, CPU_AMD_ALL, },
204 { 0xC0000081, 0xC0000084, CPU_CALL, CPU_K8_PLUS, },
205 { 0xC0000100, 0xC0000102, CPU_BASE, CPU_K8_PLUS, },
206 { 0xC0000103, 0xC0000103, CPU_TIME, CPU_K10_PLUS, },
207
208 { 0xC0010000, 0xC0010007, CPU_PMC, CPU_K8_PLUS, },
209 { 0xC0010010, 0xC0010010, CPU_CONF, CPU_K7_PLUS, },
210 { 0xC0010015, 0xC0010015, CPU_CONF, CPU_K7_PLUS, },
211 { 0xC0010016, 0xC001001A, CPU_MTRR, CPU_K8_PLUS, },
212 { 0xC001001D, 0xC001001D, CPU_MTRR, CPU_K8_PLUS, },
213 { 0xC001001F, 0xC001001F, CPU_CONF, CPU_K8_PLUS, },
214 { 0xC0010030, 0xC0010035, CPU_BIOS, CPU_K8_PLUS, },
215 { 0xC0010044, 0xC0010048, CPU_MC, CPU_K8_PLUS, },
216 { 0xC0010050, 0xC0010056, CPU_SMM, CPU_K0F_PLUS, },
217 { 0xC0010058, 0xC0010058, CPU_CONF, CPU_K10_PLUS, },
218 { 0xC0010060, 0xC0010060, CPU_CACHE, CPU_AMD_11, },
219 { 0xC0010061, 0xC0010068, CPU_SMM, CPU_K10_PLUS, },
220 { 0xC0010069, 0xC001006B, CPU_SMM, CPU_AMD_11, },
221 { 0xC0010070, 0xC0010071, CPU_SMM, CPU_K10_PLUS, },
222 { 0xC0010111, 0xC0010113, CPU_SMM, CPU_K8_PLUS, },
223 { 0xC0010114, 0xC0010118, CPU_SVM, CPU_K10_PLUS, },
224 { 0xC0010140, 0xC0010141, CPU_OSVM, CPU_K10_PLUS, },
225 { 0xC0011022, 0xC0011023, CPU_CONF, CPU_K10_PLUS, },
226};
227
228
229/* Intel */
230static int get_intel_modelflag(unsigned model)
231{
232 int flag;
233
234 switch (model) {
235 case 0x0501:
236 case 0x0502:
237 case 0x0504:
238 flag = CPU_INTEL_PENTIUM;
239 break;
240 case 0x0601:
241 case 0x0603:
242 case 0x0605:
243 case 0x0607:
244 case 0x0608:
245 case 0x060A:
246 case 0x060B:
247 flag = CPU_INTEL_P6;
248 break;
249 case 0x0609:
250 case 0x060D:
251 flag = CPU_INTEL_PENTIUM_M;
252 break;
253 case 0x060E:
254 flag = CPU_INTEL_CORE;
255 break;
256 case 0x060F:
257 case 0x0617:
258 flag = CPU_INTEL_CORE2;
259 break;
260 case 0x061C:
261 flag = CPU_INTEL_ATOM;
262 break;
263 case 0x0F00:
264 case 0x0F01:
265 case 0x0F02:
266 case 0x0F03:
267 case 0x0F04:
268 flag = CPU_INTEL_XEON_P4;
269 break;
270 case 0x0F06:
271 flag = CPU_INTEL_XEON_MP;
272 break;
273 default:
274 flag = CPU_NONE;
275 break;
276 }
277
278 return flag;
279}
280
281/* AMD */
282static int get_amd_modelflag(unsigned model)
283{
284 int flag;
285
286 switch (model >> 8) {
287 case 0x6:
288 flag = CPU_AMD_K6;
289 break;
290 case 0x7:
291 flag = CPU_AMD_K7;
292 break;
293 case 0x8:
294 flag = CPU_AMD_K8;
295 break;
296 case 0xf:
297 flag = CPU_AMD_0F;
298 break;
299 case 0x10:
300 flag = CPU_AMD_10;
301 break;
302 case 0x11:
303 flag = CPU_AMD_11;
304 break;
305 default:
306 flag = CPU_NONE;
307 break;
308 }
309
310 return flag;
311}
312
313static int get_cpu_modelflag(unsigned cpu)
314{
315 int flag;
316
317 flag = per_cpu(cpu_model, cpu);
318
319 switch (flag >> 16) {
320 case X86_VENDOR_INTEL:
321 flag = get_intel_modelflag(flag);
322 break;
323 case X86_VENDOR_AMD:
324 flag = get_amd_modelflag(flag & 0xffff);
325 break;
326 default:
327 flag = CPU_NONE;
328 break;
329 }
330
331 return flag;
332}
333
334static int get_cpu_range_count(unsigned cpu)
335{
336 int index;
337
338 switch (per_cpu(cpu_model, cpu) >> 16) {
339 case X86_VENDOR_INTEL:
340 index = ARRAY_SIZE(cpu_intel_range);
341 break;
342 case X86_VENDOR_AMD:
343 index = ARRAY_SIZE(cpu_amd_range);
344 break;
345 default:
346 index = 0;
347 break;
348 }
349
350 return index;
351}
352
353static int is_typeflag_valid(unsigned cpu, unsigned flag)
354{
355 unsigned vendor, modelflag;
356 int i, index;
357
358 /* Standard Registers should be always valid */
359 if (flag >= CPU_TSS)
360 return 1;
361
362 modelflag = per_cpu(cpu_modelflag, cpu);
363 vendor = per_cpu(cpu_model, cpu) >> 16;
364 index = get_cpu_range_count(cpu);
365
366 for (i = 0; i < index; i++) {
367 switch (vendor) {
368 case X86_VENDOR_INTEL:
369 if ((cpu_intel_range[i].model & modelflag) &&
370 (cpu_intel_range[i].flag & flag))
371 return 1;
372 break;
373 case X86_VENDOR_AMD:
374 if ((cpu_amd_range[i].model & modelflag) &&
375 (cpu_amd_range[i].flag & flag))
376 return 1;
377 break;
378 }
379 }
380
381 /* Invalid */
382 return 0;
383}
384
385static unsigned get_cpu_range(unsigned cpu, unsigned *min, unsigned *max,
386 int index, unsigned flag)
387{
388 unsigned modelflag;
389
390 modelflag = per_cpu(cpu_modelflag, cpu);
391 *max = 0;
392 switch (per_cpu(cpu_model, cpu) >> 16) {
393 case X86_VENDOR_INTEL:
394 if ((cpu_intel_range[index].model & modelflag) &&
395 (cpu_intel_range[index].flag & flag)) {
396 *min = cpu_intel_range[index].min;
397 *max = cpu_intel_range[index].max;
398 }
399 break;
400 case X86_VENDOR_AMD:
401 if ((cpu_amd_range[index].model & modelflag) &&
402 (cpu_amd_range[index].flag & flag)) {
403 *min = cpu_amd_range[index].min;
404 *max = cpu_amd_range[index].max;
405 }
406 break;
407 }
408
409 return *max;
410}
411
412/* This function can also be called with seq = NULL for printk */
413static void print_cpu_data(struct seq_file *seq, unsigned type,
414 u32 low, u32 high)
415{
416 struct cpu_private *priv;
417 u64 val = high;
418
419 if (seq) {
420 priv = seq->private;
421 if (priv->file) {
422 val = (val << 32) | low;
423 seq_printf(seq, "0x%llx\n", val);
424 } else
425 seq_printf(seq, " %08x: %08x_%08x\n",
426 type, high, low);
427 } else
428 printk(KERN_INFO " %08x: %08x_%08x\n", type, high, low);
429}
430
431/* This function can also be called with seq = NULL for printk */
432static void print_msr(struct seq_file *seq, unsigned cpu, unsigned flag)
433{
434 unsigned msr, msr_min, msr_max;
435 struct cpu_private *priv;
436 u32 low, high;
437 int i, range;
438
439 if (seq) {
440 priv = seq->private;
441 if (priv->file) {
442 if (!rdmsr_safe_on_cpu(priv->cpu, priv->reg,
443 &low, &high))
444 print_cpu_data(seq, priv->reg, low, high);
445 return;
446 }
447 }
448
449 range = get_cpu_range_count(cpu);
450
451 for (i = 0; i < range; i++) {
452 if (!get_cpu_range(cpu, &msr_min, &msr_max, i, flag))
453 continue;
454
455 for (msr = msr_min; msr <= msr_max; msr++) {
456 if (rdmsr_safe_on_cpu(cpu, msr, &low, &high))
457 continue;
458 print_cpu_data(seq, msr, low, high);
459 }
460 }
461}
462
463static void print_tss(void *arg)
464{
465 struct pt_regs *regs = task_pt_regs(current);
466 struct seq_file *seq = arg;
467 unsigned int seg;
468
469 seq_printf(seq, " RAX\t: %016lx\n", regs->ax);
470 seq_printf(seq, " RBX\t: %016lx\n", regs->bx);
471 seq_printf(seq, " RCX\t: %016lx\n", regs->cx);
472 seq_printf(seq, " RDX\t: %016lx\n", regs->dx);
473
474 seq_printf(seq, " RSI\t: %016lx\n", regs->si);
475 seq_printf(seq, " RDI\t: %016lx\n", regs->di);
476 seq_printf(seq, " RBP\t: %016lx\n", regs->bp);
477 seq_printf(seq, " ESP\t: %016lx\n", regs->sp);
478
479#ifdef CONFIG_X86_64
480 seq_printf(seq, " R08\t: %016lx\n", regs->r8);
481 seq_printf(seq, " R09\t: %016lx\n", regs->r9);
482 seq_printf(seq, " R10\t: %016lx\n", regs->r10);
483 seq_printf(seq, " R11\t: %016lx\n", regs->r11);
484 seq_printf(seq, " R12\t: %016lx\n", regs->r12);
485 seq_printf(seq, " R13\t: %016lx\n", regs->r13);
486 seq_printf(seq, " R14\t: %016lx\n", regs->r14);
487 seq_printf(seq, " R15\t: %016lx\n", regs->r15);
488#endif
489
490 asm("movl %%cs,%0" : "=r" (seg));
491 seq_printf(seq, " CS\t: %04x\n", seg);
492 asm("movl %%ds,%0" : "=r" (seg));
493 seq_printf(seq, " DS\t: %04x\n", seg);
494 seq_printf(seq, " SS\t: %04lx\n", regs->ss & 0xffff);
495 asm("movl %%es,%0" : "=r" (seg));
496 seq_printf(seq, " ES\t: %04x\n", seg);
497 asm("movl %%fs,%0" : "=r" (seg));
498 seq_printf(seq, " FS\t: %04x\n", seg);
499 asm("movl %%gs,%0" : "=r" (seg));
500 seq_printf(seq, " GS\t: %04x\n", seg);
501
502 seq_printf(seq, " EFLAGS\t: %016lx\n", regs->flags);
503
504 seq_printf(seq, " EIP\t: %016lx\n", regs->ip);
505}
506
507static void print_cr(void *arg)
508{
509 struct seq_file *seq = arg;
510
511 seq_printf(seq, " cr0\t: %016lx\n", read_cr0());
512 seq_printf(seq, " cr2\t: %016lx\n", read_cr2());
513 seq_printf(seq, " cr3\t: %016lx\n", read_cr3());
514 seq_printf(seq, " cr4\t: %016lx\n", read_cr4_safe());
515#ifdef CONFIG_X86_64
516 seq_printf(seq, " cr8\t: %016lx\n", read_cr8());
517#endif
518}
519
520static void print_desc_ptr(char *str, struct seq_file *seq, struct desc_ptr dt)
521{
522 seq_printf(seq, " %s\t: %016llx\n", str, (u64)(dt.address | dt.size));
523}
524
525static void print_dt(void *seq)
526{
527 struct desc_ptr dt;
528 unsigned long ldt;
529
530 /* IDT */
531 store_idt((struct desc_ptr *)&dt);
532 print_desc_ptr("IDT", seq, dt);
533
534 /* GDT */
535 store_gdt((struct desc_ptr *)&dt);
536 print_desc_ptr("GDT", seq, dt);
537
538 /* LDT */
539 store_ldt(ldt);
540 seq_printf(seq, " LDT\t: %016lx\n", ldt);
541
542 /* TR */
543 store_tr(ldt);
544 seq_printf(seq, " TR\t: %016lx\n", ldt);
545}
546
547static void print_dr(void *arg)
548{
549 struct seq_file *seq = arg;
550 unsigned long dr;
551 int i;
552
553 for (i = 0; i < 8; i++) {
554 /* Ignore db4, db5 */
555 if ((i == 4) || (i == 5))
556 continue;
557 get_debugreg(dr, i);
558 seq_printf(seq, " dr%d\t: %016lx\n", i, dr);
559 }
560
561 seq_printf(seq, "\n MSR\t:\n");
562}
563
564static void print_apic(void *arg)
565{
566 struct seq_file *seq = arg;
567
568#ifdef CONFIG_X86_LOCAL_APIC
569 seq_printf(seq, " LAPIC\t:\n");
570 seq_printf(seq, " ID\t\t: %08x\n", apic_read(APIC_ID) >> 24);
571 seq_printf(seq, " LVR\t\t: %08x\n", apic_read(APIC_LVR));
572 seq_printf(seq, " TASKPRI\t: %08x\n", apic_read(APIC_TASKPRI));
573 seq_printf(seq, " ARBPRI\t\t: %08x\n", apic_read(APIC_ARBPRI));
574 seq_printf(seq, " PROCPRI\t: %08x\n", apic_read(APIC_PROCPRI));
575 seq_printf(seq, " LDR\t\t: %08x\n", apic_read(APIC_LDR));
576 seq_printf(seq, " DFR\t\t: %08x\n", apic_read(APIC_DFR));
577 seq_printf(seq, " SPIV\t\t: %08x\n", apic_read(APIC_SPIV));
578 seq_printf(seq, " ISR\t\t: %08x\n", apic_read(APIC_ISR));
579 seq_printf(seq, " ESR\t\t: %08x\n", apic_read(APIC_ESR));
580 seq_printf(seq, " ICR\t\t: %08x\n", apic_read(APIC_ICR));
581 seq_printf(seq, " ICR2\t\t: %08x\n", apic_read(APIC_ICR2));
582 seq_printf(seq, " LVTT\t\t: %08x\n", apic_read(APIC_LVTT));
583 seq_printf(seq, " LVTTHMR\t: %08x\n", apic_read(APIC_LVTTHMR));
584 seq_printf(seq, " LVTPC\t\t: %08x\n", apic_read(APIC_LVTPC));
585 seq_printf(seq, " LVT0\t\t: %08x\n", apic_read(APIC_LVT0));
586 seq_printf(seq, " LVT1\t\t: %08x\n", apic_read(APIC_LVT1));
587 seq_printf(seq, " LVTERR\t\t: %08x\n", apic_read(APIC_LVTERR));
588 seq_printf(seq, " TMICT\t\t: %08x\n", apic_read(APIC_TMICT));
589 seq_printf(seq, " TMCCT\t\t: %08x\n", apic_read(APIC_TMCCT));
590 seq_printf(seq, " TDCR\t\t: %08x\n", apic_read(APIC_TDCR));
591#endif /* CONFIG_X86_LOCAL_APIC */
592
593 seq_printf(seq, "\n MSR\t:\n");
594}
595
596static int cpu_seq_show(struct seq_file *seq, void *v)
597{
598 struct cpu_private *priv = seq->private;
599
600 if (priv == NULL)
601 return -EINVAL;
602
603 switch (cpu_base[priv->type].flag) {
604 case CPU_TSS:
605 smp_call_function_single(priv->cpu, print_tss, seq, 1);
606 break;
607 case CPU_CR:
608 smp_call_function_single(priv->cpu, print_cr, seq, 1);
609 break;
610 case CPU_DT:
611 smp_call_function_single(priv->cpu, print_dt, seq, 1);
612 break;
613 case CPU_DEBUG:
614 if (priv->file == CPU_INDEX_BIT)
615 smp_call_function_single(priv->cpu, print_dr, seq, 1);
616 print_msr(seq, priv->cpu, cpu_base[priv->type].flag);
617 break;
618 case CPU_APIC:
619 if (priv->file == CPU_INDEX_BIT)
620 smp_call_function_single(priv->cpu, print_apic, seq, 1);
621 print_msr(seq, priv->cpu, cpu_base[priv->type].flag);
622 break;
623
624 default:
625 print_msr(seq, priv->cpu, cpu_base[priv->type].flag);
626 break;
627 }
628 seq_printf(seq, "\n");
629
630 return 0;
631}
632
633static void *cpu_seq_start(struct seq_file *seq, loff_t *pos)
634{
635 if (*pos == 0) /* One time is enough ;-) */
636 return seq;
637
638 return NULL;
639}
640
641static void *cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos)
642{
643 (*pos)++;
644
645 return cpu_seq_start(seq, pos);
646}
647
648static void cpu_seq_stop(struct seq_file *seq, void *v)
649{
650}
651
652static const struct seq_operations cpu_seq_ops = {
653 .start = cpu_seq_start,
654 .next = cpu_seq_next,
655 .stop = cpu_seq_stop,
656 .show = cpu_seq_show,
657};
658
659static int cpu_seq_open(struct inode *inode, struct file *file)
660{
661 struct cpu_private *priv = inode->i_private;
662 struct seq_file *seq;
663 int err;
664
665 err = seq_open(file, &cpu_seq_ops);
666 if (!err) {
667 seq = file->private_data;
668 seq->private = priv;
669 }
670
671 return err;
672}
673
674static int write_msr(struct cpu_private *priv, u64 val)
675{
676 u32 low, high;
677
678 high = (val >> 32) & 0xffffffff;
679 low = val & 0xffffffff;
680
681 if (!wrmsr_safe_on_cpu(priv->cpu, priv->reg, low, high))
682 return 0;
683
684 return -EPERM;
685}
686
687static int write_cpu_register(struct cpu_private *priv, const char *buf)
688{
689 int ret = -EPERM;
690 u64 val;
691
692 ret = strict_strtoull(buf, 0, &val);
693 if (ret < 0)
694 return ret;
695
696 /* Supporting only MSRs */
697 if (priv->type < CPU_TSS_BIT)
698 return write_msr(priv, val);
699
700 return ret;
701}
702
703static ssize_t cpu_write(struct file *file, const char __user *ubuf,
704 size_t count, loff_t *off)
705{
706 struct seq_file *seq = file->private_data;
707 struct cpu_private *priv = seq->private;
708 char buf[19];
709
710 if ((priv == NULL) || (count >= sizeof(buf)))
711 return -EINVAL;
712
713 if (copy_from_user(&buf, ubuf, count))
714 return -EFAULT;
715
716 buf[count] = 0;
717
718 if ((cpu_base[priv->type].write) && (cpu_file[priv->file].write))
719 if (!write_cpu_register(priv, buf))
720 return count;
721
722 return -EACCES;
723}
724
725static const struct file_operations cpu_fops = {
726 .owner = THIS_MODULE,
727 .open = cpu_seq_open,
728 .read = seq_read,
729 .write = cpu_write,
730 .llseek = seq_lseek,
731 .release = seq_release,
732};
733
734static int cpu_create_file(unsigned cpu, unsigned type, unsigned reg,
735 unsigned file, struct dentry *dentry)
736{
737 struct cpu_private *priv = NULL;
738
739 /* Already intialized */
740 if (file == CPU_INDEX_BIT)
741 if (per_cpu(cpu_arr[type].init, cpu))
742 return 0;
743
744 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
745 if (priv == NULL)
746 return -ENOMEM;
747
748 priv->cpu = cpu;
749 priv->type = type;
750 priv->reg = reg;
751 priv->file = file;
752 mutex_lock(&cpu_debug_lock);
753 per_cpu(priv_arr[type], cpu) = priv;
754 per_cpu(cpu_priv_count, cpu)++;
755 mutex_unlock(&cpu_debug_lock);
756
757 if (file)
758 debugfs_create_file(cpu_file[file].name, S_IRUGO,
759 dentry, (void *)priv, &cpu_fops);
760 else {
761 debugfs_create_file(cpu_base[type].name, S_IRUGO,
762 per_cpu(cpu_arr[type].dentry, cpu),
763 (void *)priv, &cpu_fops);
764 mutex_lock(&cpu_debug_lock);
765 per_cpu(cpu_arr[type].init, cpu) = 1;
766 mutex_unlock(&cpu_debug_lock);
767 }
768
769 return 0;
770}
771
772static int cpu_init_regfiles(unsigned cpu, unsigned int type, unsigned reg,
773 struct dentry *dentry)
774{
775 unsigned file;
776 int err = 0;
777
778 for (file = 0; file < ARRAY_SIZE(cpu_file); file++) {
779 err = cpu_create_file(cpu, type, reg, file, dentry);
780 if (err)
781 return err;
782 }
783
784 return err;
785}
786
787static int cpu_init_msr(unsigned cpu, unsigned type, struct dentry *dentry)
788{
789 struct dentry *cpu_dentry = NULL;
790 unsigned reg, reg_min, reg_max;
791 int i, range, err = 0;
792 char reg_dir[12];
793 u32 low, high;
794
795 range = get_cpu_range_count(cpu);
796
797 for (i = 0; i < range; i++) {
798 if (!get_cpu_range(cpu, &reg_min, &reg_max, i,
799 cpu_base[type].flag))
800 continue;
801
802 for (reg = reg_min; reg <= reg_max; reg++) {
803 if (rdmsr_safe_on_cpu(cpu, reg, &low, &high))
804 continue;
805
806 sprintf(reg_dir, "0x%x", reg);
807 cpu_dentry = debugfs_create_dir(reg_dir, dentry);
808 err = cpu_init_regfiles(cpu, type, reg, cpu_dentry);
809 if (err)
810 return err;
811 }
812 }
813
814 return err;
815}
816
817static int cpu_init_allreg(unsigned cpu, struct dentry *dentry)
818{
819 struct dentry *cpu_dentry = NULL;
820 unsigned type;
821 int err = 0;
822
823 for (type = 0; type < ARRAY_SIZE(cpu_base) - 1; type++) {
824 if (!is_typeflag_valid(cpu, cpu_base[type].flag))
825 continue;
826 cpu_dentry = debugfs_create_dir(cpu_base[type].name, dentry);
827 per_cpu(cpu_arr[type].dentry, cpu) = cpu_dentry;
828
829 if (type < CPU_TSS_BIT)
830 err = cpu_init_msr(cpu, type, cpu_dentry);
831 else
832 err = cpu_create_file(cpu, type, 0, CPU_INDEX_BIT,
833 cpu_dentry);
834 if (err)
835 return err;
836 }
837
838 return err;
839}
840
841static int cpu_init_cpu(void)
842{
843 struct dentry *cpu_dentry = NULL;
844 struct cpuinfo_x86 *cpui;
845 char cpu_dir[12];
846 unsigned cpu;
847 int err = 0;
848
849 for (cpu = 0; cpu < nr_cpu_ids; cpu++) {
850 cpui = &cpu_data(cpu);
851 if (!cpu_has(cpui, X86_FEATURE_MSR))
852 continue;
853 per_cpu(cpu_model, cpu) = ((cpui->x86_vendor << 16) |
854 (cpui->x86 << 8) |
855 (cpui->x86_model));
856 per_cpu(cpu_modelflag, cpu) = get_cpu_modelflag(cpu);
857
858 sprintf(cpu_dir, "cpu%d", cpu);
859 cpu_dentry = debugfs_create_dir(cpu_dir, cpu_debugfs_dir);
860 err = cpu_init_allreg(cpu, cpu_dentry);
861
862 pr_info("cpu%d(%d) debug files %d\n",
863 cpu, nr_cpu_ids, per_cpu(cpu_priv_count, cpu));
864 if (per_cpu(cpu_priv_count, cpu) > MAX_CPU_FILES) {
865 pr_err("Register files count %d exceeds limit %d\n",
866 per_cpu(cpu_priv_count, cpu), MAX_CPU_FILES);
867 per_cpu(cpu_priv_count, cpu) = MAX_CPU_FILES;
868 err = -ENFILE;
869 }
870 if (err)
871 return err;
872 }
873
874 return err;
875}
876
877static int __init cpu_debug_init(void)
878{
879 cpu_debugfs_dir = debugfs_create_dir("cpu", arch_debugfs_dir);
880
881 return cpu_init_cpu();
882}
883
884static void __exit cpu_debug_exit(void)
885{
886 int i, cpu;
887
888 if (cpu_debugfs_dir)
889 debugfs_remove_recursive(cpu_debugfs_dir);
890
891 for (cpu = 0; cpu < nr_cpu_ids; cpu++)
892 for (i = 0; i < per_cpu(cpu_priv_count, cpu); i++)
893 kfree(per_cpu(priv_arr[i], cpu));
894}
895
896module_init(cpu_debug_init);
897module_exit(cpu_debug_exit);
898
899MODULE_AUTHOR("Jaswinder Singh Rajput");
900MODULE_DESCRIPTION("CPU Debug module");
901MODULE_LICENSE("GPL");
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index 23da96e57b17..19f6b9d27e83 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -33,7 +33,7 @@
33#include <linux/cpufreq.h> 33#include <linux/cpufreq.h>
34#include <linux/compiler.h> 34#include <linux/compiler.h>
35#include <linux/dmi.h> 35#include <linux/dmi.h>
36#include <linux/ftrace.h> 36#include <trace/power.h>
37 37
38#include <linux/acpi.h> 38#include <linux/acpi.h>
39#include <linux/io.h> 39#include <linux/io.h>
@@ -72,6 +72,8 @@ struct acpi_cpufreq_data {
72 72
73static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); 73static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data);
74 74
75DEFINE_TRACE(power_mark);
76
75/* acpi_perf_data is a pointer to percpu data. */ 77/* acpi_perf_data is a pointer to percpu data. */
76static struct acpi_processor_performance *acpi_perf_data; 78static struct acpi_processor_performance *acpi_perf_data;
77 79
@@ -680,6 +682,18 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
680 perf->states[i].transition_latency * 1000; 682 perf->states[i].transition_latency * 1000;
681 } 683 }
682 684
685 /* Check for high latency (>20uS) from buggy BIOSes, like on T42 */
686 if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE &&
687 policy->cpuinfo.transition_latency > 20 * 1000) {
688 static int print_once;
689 policy->cpuinfo.transition_latency = 20 * 1000;
690 if (!print_once) {
691 print_once = 1;
692 printk(KERN_INFO "Capping off P-state tranision latency"
693 " at 20 uS\n");
694 }
695 }
696
683 data->max_freq = perf->states[0].core_frequency * 1000; 697 data->max_freq = perf->states[0].core_frequency * 1000;
684 /* table init */ 698 /* table init */
685 for (i = 0; i < perf->state_count; i++) { 699 for (i = 0; i < perf->state_count; i++) {
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c
index f1c51aea064d..0bd48e65a0ca 100644
--- a/arch/x86/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c
@@ -305,7 +305,7 @@ retry_loop:
305 outb(3, 0x22); 305 outb(3, 0x22);
306 } else if ((pr != NULL) && pr->flags.bm_control) { 306 } else if ((pr != NULL) && pr->flags.bm_control) {
307 /* Disable bus master arbitration */ 307 /* Disable bus master arbitration */
308 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); 308 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1);
309 } 309 }
310 switch (longhaul_version) { 310 switch (longhaul_version) {
311 311
@@ -328,7 +328,7 @@ retry_loop:
328 case TYPE_POWERSAVER: 328 case TYPE_POWERSAVER:
329 if (longhaul_flags & USE_ACPI_C3) { 329 if (longhaul_flags & USE_ACPI_C3) {
330 /* Don't allow wakeup */ 330 /* Don't allow wakeup */
331 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0); 331 acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
332 do_powersaver(cx->address, mults_index, dir); 332 do_powersaver(cx->address, mults_index, dir);
333 } else { 333 } else {
334 do_powersaver(0, mults_index, dir); 334 do_powersaver(0, mults_index, dir);
@@ -341,7 +341,7 @@ retry_loop:
341 outb(0, 0x22); 341 outb(0, 0x22);
342 } else if ((pr != NULL) && pr->flags.bm_control) { 342 } else if ((pr != NULL) && pr->flags.bm_control) {
343 /* Enable bus master arbitration */ 343 /* Enable bus master arbitration */
344 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); 344 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0);
345 } 345 }
346 outb(pic2_mask, 0xA1); /* restore mask */ 346 outb(pic2_mask, 0xA1); /* restore mask */
347 outb(pic1_mask, 0x21); 347 outb(pic1_mask, 0x21);
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
index 41ed94915f97..6ac55bd341ae 100644
--- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
@@ -211,7 +211,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
211 unsigned int i; 211 unsigned int i;
212 212
213#ifdef CONFIG_SMP 213#ifdef CONFIG_SMP
214 cpumask_copy(policy->cpus, &per_cpu(cpu_sibling_map, policy->cpu)); 214 cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
215#endif 215#endif
216 216
217 /* Errata workaround */ 217 /* Errata workaround */
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index a15ac94e0b9b..4709ead2db52 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -54,7 +54,10 @@ static DEFINE_PER_CPU(struct powernow_k8_data *, powernow_data);
54static int cpu_family = CPU_OPTERON; 54static int cpu_family = CPU_OPTERON;
55 55
56#ifndef CONFIG_SMP 56#ifndef CONFIG_SMP
57DEFINE_PER_CPU(cpumask_t, cpu_core_map); 57static inline const struct cpumask *cpu_core_mask(int cpu)
58{
59 return cpumask_of(0);
60}
58#endif 61#endif
59 62
60/* Return a frequency in MHz, given an input fid */ 63/* Return a frequency in MHz, given an input fid */
@@ -699,7 +702,7 @@ static int fill_powernow_table(struct powernow_k8_data *data,
699 702
700 dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid); 703 dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid);
701 data->powernow_table = powernow_table; 704 data->powernow_table = powernow_table;
702 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu) 705 if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu)
703 print_basics(data); 706 print_basics(data);
704 707
705 for (j = 0; j < data->numps; j++) 708 for (j = 0; j < data->numps; j++)
@@ -862,7 +865,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
862 865
863 /* fill in data */ 866 /* fill in data */
864 data->numps = data->acpi_data.state_count; 867 data->numps = data->acpi_data.state_count;
865 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu) 868 if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu)
866 print_basics(data); 869 print_basics(data);
867 powernow_k8_acpi_pst_values(data, 0); 870 powernow_k8_acpi_pst_values(data, 0);
868 871
@@ -1300,7 +1303,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1300 if (cpu_family == CPU_HW_PSTATE) 1303 if (cpu_family == CPU_HW_PSTATE)
1301 cpumask_copy(pol->cpus, cpumask_of(pol->cpu)); 1304 cpumask_copy(pol->cpus, cpumask_of(pol->cpu));
1302 else 1305 else
1303 cpumask_copy(pol->cpus, &per_cpu(cpu_core_map, pol->cpu)); 1306 cpumask_copy(pol->cpus, cpu_core_mask(pol->cpu));
1304 data->available_cores = pol->cpus; 1307 data->available_cores = pol->cpus;
1305 1308
1306 if (cpu_family == CPU_HW_PSTATE) 1309 if (cpu_family == CPU_HW_PSTATE)
@@ -1365,7 +1368,7 @@ static unsigned int powernowk8_get(unsigned int cpu)
1365 unsigned int khz = 0; 1368 unsigned int khz = 0;
1366 unsigned int first; 1369 unsigned int first;
1367 1370
1368 first = first_cpu(per_cpu(cpu_core_map, cpu)); 1371 first = cpumask_first(cpu_core_mask(cpu));
1369 data = per_cpu(powernow_data, first); 1372 data = per_cpu(powernow_data, first);
1370 1373
1371 if (!data) 1374 if (!data)
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
index 8bbb11adb315..016c1a4fa3fc 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
@@ -321,7 +321,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
321 321
322 /* only run on CPU to be set, or on its sibling */ 322 /* only run on CPU to be set, or on its sibling */
323#ifdef CONFIG_SMP 323#ifdef CONFIG_SMP
324 cpumask_copy(policy->cpus, &per_cpu(cpu_sibling_map, policy->cpu)); 324 cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
325#endif 325#endif
326 326
327 cpus_allowed = current->cpus_allowed; 327 cpus_allowed = current->cpus_allowed;
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index ffd0f5ed071a..593171e967ef 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -61,23 +61,23 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
61 */ 61 */
62static unsigned char Cx86_dir0_msb __cpuinitdata = 0; 62static unsigned char Cx86_dir0_msb __cpuinitdata = 0;
63 63
64static char Cx86_model[][9] __cpuinitdata = { 64static const char __cpuinitconst Cx86_model[][9] = {
65 "Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ", 65 "Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ",
66 "M II ", "Unknown" 66 "M II ", "Unknown"
67}; 67};
68static char Cx486_name[][5] __cpuinitdata = { 68static const char __cpuinitconst Cx486_name[][5] = {
69 "SLC", "DLC", "SLC2", "DLC2", "SRx", "DRx", 69 "SLC", "DLC", "SLC2", "DLC2", "SRx", "DRx",
70 "SRx2", "DRx2" 70 "SRx2", "DRx2"
71}; 71};
72static char Cx486S_name[][4] __cpuinitdata = { 72static const char __cpuinitconst Cx486S_name[][4] = {
73 "S", "S2", "Se", "S2e" 73 "S", "S2", "Se", "S2e"
74}; 74};
75static char Cx486D_name[][4] __cpuinitdata = { 75static const char __cpuinitconst Cx486D_name[][4] = {
76 "DX", "DX2", "?", "?", "?", "DX4" 76 "DX", "DX2", "?", "?", "?", "DX4"
77}; 77};
78static char Cx86_cb[] __cpuinitdata = "?.5x Core/Bus Clock"; 78static char Cx86_cb[] __cpuinitdata = "?.5x Core/Bus Clock";
79static char cyrix_model_mult1[] __cpuinitdata = "12??43"; 79static const char __cpuinitconst cyrix_model_mult1[] = "12??43";
80static char cyrix_model_mult2[] __cpuinitdata = "12233445"; 80static const char __cpuinitconst cyrix_model_mult2[] = "12233445";
81 81
82/* 82/*
83 * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old 83 * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old
@@ -435,7 +435,7 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 *c)
435 } 435 }
436} 436}
437 437
438static struct cpu_dev cyrix_cpu_dev __cpuinitdata = { 438static const struct cpu_dev __cpuinitconst cyrix_cpu_dev = {
439 .c_vendor = "Cyrix", 439 .c_vendor = "Cyrix",
440 .c_ident = { "CyrixInstead" }, 440 .c_ident = { "CyrixInstead" },
441 .c_early_init = early_init_cyrix, 441 .c_early_init = early_init_cyrix,
@@ -446,7 +446,7 @@ static struct cpu_dev cyrix_cpu_dev __cpuinitdata = {
446 446
447cpu_dev_register(cyrix_cpu_dev); 447cpu_dev_register(cyrix_cpu_dev);
448 448
449static struct cpu_dev nsc_cpu_dev __cpuinitdata = { 449static const struct cpu_dev __cpuinitconst nsc_cpu_dev = {
450 .c_vendor = "NSC", 450 .c_vendor = "NSC",
451 .c_ident = { "Geode by NSC" }, 451 .c_ident = { "Geode by NSC" },
452 .c_init = init_nsc, 452 .c_init = init_nsc,
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 1a89a2b68d15..7437fa133c02 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -14,6 +14,7 @@
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include <asm/ds.h> 15#include <asm/ds.h>
16#include <asm/bugs.h> 16#include <asm/bugs.h>
17#include <asm/cpu.h>
17 18
18#ifdef CONFIG_X86_64 19#ifdef CONFIG_X86_64
19#include <asm/topology.h> 20#include <asm/topology.h>
@@ -54,6 +55,11 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
54 c->x86_cache_alignment = 128; 55 c->x86_cache_alignment = 128;
55#endif 56#endif
56 57
58 /* CPUID workaround for 0F33/0F34 CPU */
59 if (c->x86 == 0xF && c->x86_model == 0x3
60 && (c->x86_mask == 0x3 || c->x86_mask == 0x4))
61 c->x86_phys_bits = 36;
62
57 /* 63 /*
58 * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate 64 * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
59 * with P/T states and does not stop in deep C-states. 65 * with P/T states and does not stop in deep C-states.
@@ -116,6 +122,28 @@ static void __cpuinit trap_init_f00f_bug(void)
116} 122}
117#endif 123#endif
118 124
125static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c)
126{
127#ifdef CONFIG_SMP
128 /* calling is from identify_secondary_cpu() ? */
129 if (c->cpu_index == boot_cpu_id)
130 return;
131
132 /*
133 * Mask B, Pentium, but not Pentium MMX
134 */
135 if (c->x86 == 5 &&
136 c->x86_mask >= 1 && c->x86_mask <= 4 &&
137 c->x86_model <= 3) {
138 /*
139 * Remember we have B step Pentia with bugs
140 */
141 WARN_ONCE(1, "WARNING: SMP operation may be unreliable"
142 "with B stepping processors.\n");
143 }
144#endif
145}
146
119static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) 147static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
120{ 148{
121 unsigned long lo, hi; 149 unsigned long lo, hi;
@@ -192,6 +220,8 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
192#ifdef CONFIG_X86_NUMAQ 220#ifdef CONFIG_X86_NUMAQ
193 numaq_tsc_disable(); 221 numaq_tsc_disable();
194#endif 222#endif
223
224 intel_smp_check(c);
195} 225}
196#else 226#else
197static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) 227static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
@@ -391,7 +421,7 @@ static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned i
391} 421}
392#endif 422#endif
393 423
394static struct cpu_dev intel_cpu_dev __cpuinitdata = { 424static const struct cpu_dev __cpuinitconst intel_cpu_dev = {
395 .c_vendor = "Intel", 425 .c_vendor = "Intel",
396 .c_ident = { "GenuineIntel" }, 426 .c_ident = { "GenuineIntel" },
397#ifdef CONFIG_X86_32 427#ifdef CONFIG_X86_32
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 7293508d8f5c..483eda96e102 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -32,7 +32,7 @@ struct _cache_table
32}; 32};
33 33
34/* all the cache descriptor types we care about (no TLB or trace cache entries) */ 34/* all the cache descriptor types we care about (no TLB or trace cache entries) */
35static struct _cache_table cache_table[] __cpuinitdata = 35static const struct _cache_table __cpuinitconst cache_table[] =
36{ 36{
37 { 0x06, LVL_1_INST, 8 }, /* 4-way set assoc, 32 byte line size */ 37 { 0x06, LVL_1_INST, 8 }, /* 4-way set assoc, 32 byte line size */
38 { 0x08, LVL_1_INST, 16 }, /* 4-way set assoc, 32 byte line size */ 38 { 0x08, LVL_1_INST, 16 }, /* 4-way set assoc, 32 byte line size */
@@ -159,7 +159,7 @@ struct _cpuid4_info_regs {
159 unsigned long can_disable; 159 unsigned long can_disable;
160}; 160};
161 161
162#ifdef CONFIG_PCI 162#if defined(CONFIG_PCI) && defined(CONFIG_SYSFS)
163static struct pci_device_id k8_nb_id[] = { 163static struct pci_device_id k8_nb_id[] = {
164 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, 164 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) },
165 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1203) }, 165 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1203) },
@@ -206,15 +206,15 @@ union l3_cache {
206 unsigned val; 206 unsigned val;
207}; 207};
208 208
209static unsigned short assocs[] __cpuinitdata = { 209static const unsigned short __cpuinitconst assocs[] = {
210 [1] = 1, [2] = 2, [4] = 4, [6] = 8, 210 [1] = 1, [2] = 2, [4] = 4, [6] = 8,
211 [8] = 16, [0xa] = 32, [0xb] = 48, 211 [8] = 16, [0xa] = 32, [0xb] = 48,
212 [0xc] = 64, 212 [0xc] = 64,
213 [0xf] = 0xffff // ?? 213 [0xf] = 0xffff // ??
214}; 214};
215 215
216static unsigned char levels[] __cpuinitdata = { 1, 1, 2, 3 }; 216static const unsigned char __cpuinitconst levels[] = { 1, 1, 2, 3 };
217static unsigned char types[] __cpuinitdata = { 1, 2, 3, 3 }; 217static const unsigned char __cpuinitconst types[] = { 1, 2, 3, 3 };
218 218
219static void __cpuinit 219static void __cpuinit
220amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, 220amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax,
@@ -324,15 +324,6 @@ __cpuinit cpuid4_cache_lookup_regs(int index,
324 return 0; 324 return 0;
325} 325}
326 326
327static int
328__cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf)
329{
330 struct _cpuid4_info_regs *leaf_regs =
331 (struct _cpuid4_info_regs *)this_leaf;
332
333 return cpuid4_cache_lookup_regs(index, leaf_regs);
334}
335
336static int __cpuinit find_num_cache_leaves(void) 327static int __cpuinit find_num_cache_leaves(void)
337{ 328{
338 unsigned int eax, ebx, ecx, edx; 329 unsigned int eax, ebx, ecx, edx;
@@ -508,6 +499,8 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
508 return l2; 499 return l2;
509} 500}
510 501
502#ifdef CONFIG_SYSFS
503
511/* pointer to _cpuid4_info array (for each cache leaf) */ 504/* pointer to _cpuid4_info array (for each cache leaf) */
512static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info); 505static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info);
513#define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y])) 506#define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y]))
@@ -571,6 +564,15 @@ static void __cpuinit free_cache_attributes(unsigned int cpu)
571 per_cpu(cpuid4_info, cpu) = NULL; 564 per_cpu(cpuid4_info, cpu) = NULL;
572} 565}
573 566
567static int
568__cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf)
569{
570 struct _cpuid4_info_regs *leaf_regs =
571 (struct _cpuid4_info_regs *)this_leaf;
572
573 return cpuid4_cache_lookup_regs(index, leaf_regs);
574}
575
574static void __cpuinit get_cpu_leaves(void *_retval) 576static void __cpuinit get_cpu_leaves(void *_retval)
575{ 577{
576 int j, *retval = _retval, cpu = smp_processor_id(); 578 int j, *retval = _retval, cpu = smp_processor_id();
@@ -612,8 +614,6 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
612 return retval; 614 return retval;
613} 615}
614 616
615#ifdef CONFIG_SYSFS
616
617#include <linux/kobject.h> 617#include <linux/kobject.h>
618#include <linux/sysfs.h> 618#include <linux/sysfs.h>
619 619
diff --git a/arch/x86/kernel/cpu/mcheck/Makefile b/arch/x86/kernel/cpu/mcheck/Makefile
index d7d2323bbb69..b2f89829bbe8 100644
--- a/arch/x86/kernel/cpu/mcheck/Makefile
+++ b/arch/x86/kernel/cpu/mcheck/Makefile
@@ -4,3 +4,4 @@ obj-$(CONFIG_X86_32) += k7.o p4.o p5.o p6.o winchip.o
4obj-$(CONFIG_X86_MCE_INTEL) += mce_intel_64.o 4obj-$(CONFIG_X86_MCE_INTEL) += mce_intel_64.o
5obj-$(CONFIG_X86_MCE_AMD) += mce_amd_64.o 5obj-$(CONFIG_X86_MCE_AMD) += mce_amd_64.o
6obj-$(CONFIG_X86_MCE_NONFATAL) += non-fatal.o 6obj-$(CONFIG_X86_MCE_NONFATAL) += non-fatal.o
7obj-$(CONFIG_X86_MCE_THRESHOLD) += threshold.o
diff --git a/arch/x86/kernel/cpu/mcheck/mce_32.c b/arch/x86/kernel/cpu/mcheck/mce_32.c
index dfaebce3633e..3552119b091d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_32.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_32.c
@@ -60,20 +60,6 @@ void mcheck_init(struct cpuinfo_x86 *c)
60 } 60 }
61} 61}
62 62
63static unsigned long old_cr4 __initdata;
64
65void __init stop_mce(void)
66{
67 old_cr4 = read_cr4();
68 clear_in_cr4(X86_CR4_MCE);
69}
70
71void __init restart_mce(void)
72{
73 if (old_cr4 & X86_CR4_MCE)
74 set_in_cr4(X86_CR4_MCE);
75}
76
77static int __init mcheck_disable(char *str) 63static int __init mcheck_disable(char *str)
78{ 64{
79 mce_disabled = 1; 65 mce_disabled = 1;
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index fe79985ce0f2..863f89568b1a 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -3,6 +3,8 @@
3 * K8 parts Copyright 2002,2003 Andi Kleen, SuSE Labs. 3 * K8 parts Copyright 2002,2003 Andi Kleen, SuSE Labs.
4 * Rest from unknown author(s). 4 * Rest from unknown author(s).
5 * 2004 Andi Kleen. Rewrote most of it. 5 * 2004 Andi Kleen. Rewrote most of it.
6 * Copyright 2008 Intel Corporation
7 * Author: Andi Kleen
6 */ 8 */
7 9
8#include <linux/init.h> 10#include <linux/init.h>
@@ -24,6 +26,9 @@
24#include <linux/ctype.h> 26#include <linux/ctype.h>
25#include <linux/kmod.h> 27#include <linux/kmod.h>
26#include <linux/kdebug.h> 28#include <linux/kdebug.h>
29#include <linux/kobject.h>
30#include <linux/sysfs.h>
31#include <linux/ratelimit.h>
27#include <asm/processor.h> 32#include <asm/processor.h>
28#include <asm/msr.h> 33#include <asm/msr.h>
29#include <asm/mce.h> 34#include <asm/mce.h>
@@ -32,7 +37,6 @@
32#include <asm/idle.h> 37#include <asm/idle.h>
33 38
34#define MISC_MCELOG_MINOR 227 39#define MISC_MCELOG_MINOR 227
35#define NR_SYSFS_BANKS 6
36 40
37atomic_t mce_entry; 41atomic_t mce_entry;
38 42
@@ -47,7 +51,7 @@ static int mce_dont_init;
47 */ 51 */
48static int tolerant = 1; 52static int tolerant = 1;
49static int banks; 53static int banks;
50static unsigned long bank[NR_SYSFS_BANKS] = { [0 ... NR_SYSFS_BANKS-1] = ~0UL }; 54static u64 *bank;
51static unsigned long notify_user; 55static unsigned long notify_user;
52static int rip_msr; 56static int rip_msr;
53static int mce_bootlog = -1; 57static int mce_bootlog = -1;
@@ -58,6 +62,19 @@ static char *trigger_argv[2] = { trigger, NULL };
58 62
59static DECLARE_WAIT_QUEUE_HEAD(mce_wait); 63static DECLARE_WAIT_QUEUE_HEAD(mce_wait);
60 64
65/* MCA banks polled by the period polling timer for corrected events */
66DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = {
67 [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL
68};
69
70/* Do initial initialization of a struct mce */
71void mce_setup(struct mce *m)
72{
73 memset(m, 0, sizeof(struct mce));
74 m->cpu = smp_processor_id();
75 rdtscll(m->tsc);
76}
77
61/* 78/*
62 * Lockless MCE logging infrastructure. 79 * Lockless MCE logging infrastructure.
63 * This avoids deadlocks on printk locks without having to break locks. Also 80 * This avoids deadlocks on printk locks without having to break locks. Also
@@ -119,11 +136,11 @@ static void print_mce(struct mce *m)
119 print_symbol("{%s}", m->ip); 136 print_symbol("{%s}", m->ip);
120 printk("\n"); 137 printk("\n");
121 } 138 }
122 printk(KERN_EMERG "TSC %Lx ", m->tsc); 139 printk(KERN_EMERG "TSC %llx ", m->tsc);
123 if (m->addr) 140 if (m->addr)
124 printk("ADDR %Lx ", m->addr); 141 printk("ADDR %llx ", m->addr);
125 if (m->misc) 142 if (m->misc)
126 printk("MISC %Lx ", m->misc); 143 printk("MISC %llx ", m->misc);
127 printk("\n"); 144 printk("\n");
128 printk(KERN_EMERG "This is not a software problem!\n"); 145 printk(KERN_EMERG "This is not a software problem!\n");
129 printk(KERN_EMERG "Run through mcelog --ascii to decode " 146 printk(KERN_EMERG "Run through mcelog --ascii to decode "
@@ -149,8 +166,10 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
149 panic(msg); 166 panic(msg);
150} 167}
151 168
152static int mce_available(struct cpuinfo_x86 *c) 169int mce_available(struct cpuinfo_x86 *c)
153{ 170{
171 if (mce_dont_init)
172 return 0;
154 return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA); 173 return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
155} 174}
156 175
@@ -172,7 +191,77 @@ static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
172} 191}
173 192
174/* 193/*
175 * The actual machine check handler 194 * Poll for corrected events or events that happened before reset.
195 * Those are just logged through /dev/mcelog.
196 *
197 * This is executed in standard interrupt context.
198 */
199void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
200{
201 struct mce m;
202 int i;
203
204 mce_setup(&m);
205
206 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
207 for (i = 0; i < banks; i++) {
208 if (!bank[i] || !test_bit(i, *b))
209 continue;
210
211 m.misc = 0;
212 m.addr = 0;
213 m.bank = i;
214 m.tsc = 0;
215
216 barrier();
217 rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status);
218 if (!(m.status & MCI_STATUS_VAL))
219 continue;
220
221 /*
222 * Uncorrected events are handled by the exception handler
223 * when it is enabled. But when the exception is disabled log
224 * everything.
225 *
226 * TBD do the same check for MCI_STATUS_EN here?
227 */
228 if ((m.status & MCI_STATUS_UC) && !(flags & MCP_UC))
229 continue;
230
231 if (m.status & MCI_STATUS_MISCV)
232 rdmsrl(MSR_IA32_MC0_MISC + i*4, m.misc);
233 if (m.status & MCI_STATUS_ADDRV)
234 rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);
235
236 if (!(flags & MCP_TIMESTAMP))
237 m.tsc = 0;
238 /*
239 * Don't get the IP here because it's unlikely to
240 * have anything to do with the actual error location.
241 */
242
243 mce_log(&m);
244 add_taint(TAINT_MACHINE_CHECK);
245
246 /*
247 * Clear state for this bank.
248 */
249 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
250 }
251
252 /*
253 * Don't clear MCG_STATUS here because it's only defined for
254 * exceptions.
255 */
256}
257
258/*
259 * The actual machine check handler. This only handles real
260 * exceptions when something got corrupted coming in through int 18.
261 *
262 * This is executed in NMI context not subject to normal locking rules. This
263 * implies that most kernel services cannot be safely used. Don't even
264 * think about putting a printk in there!
176 */ 265 */
177void do_machine_check(struct pt_regs * regs, long error_code) 266void do_machine_check(struct pt_regs * regs, long error_code)
178{ 267{
@@ -190,17 +279,18 @@ void do_machine_check(struct pt_regs * regs, long error_code)
190 * error. 279 * error.
191 */ 280 */
192 int kill_it = 0; 281 int kill_it = 0;
282 DECLARE_BITMAP(toclear, MAX_NR_BANKS);
193 283
194 atomic_inc(&mce_entry); 284 atomic_inc(&mce_entry);
195 285
196 if ((regs 286 if (notify_die(DIE_NMI, "machine check", regs, error_code,
197 && notify_die(DIE_NMI, "machine check", regs, error_code,
198 18, SIGKILL) == NOTIFY_STOP) 287 18, SIGKILL) == NOTIFY_STOP)
199 || !banks) 288 goto out2;
289 if (!banks)
200 goto out2; 290 goto out2;
201 291
202 memset(&m, 0, sizeof(struct mce)); 292 mce_setup(&m);
203 m.cpu = smp_processor_id(); 293
204 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus); 294 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
205 /* if the restart IP is not valid, we're done for */ 295 /* if the restart IP is not valid, we're done for */
206 if (!(m.mcgstatus & MCG_STATUS_RIPV)) 296 if (!(m.mcgstatus & MCG_STATUS_RIPV))
@@ -210,18 +300,32 @@ void do_machine_check(struct pt_regs * regs, long error_code)
210 barrier(); 300 barrier();
211 301
212 for (i = 0; i < banks; i++) { 302 for (i = 0; i < banks; i++) {
213 if (i < NR_SYSFS_BANKS && !bank[i]) 303 __clear_bit(i, toclear);
304 if (!bank[i])
214 continue; 305 continue;
215 306
216 m.misc = 0; 307 m.misc = 0;
217 m.addr = 0; 308 m.addr = 0;
218 m.bank = i; 309 m.bank = i;
219 m.tsc = 0;
220 310
221 rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status); 311 rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status);
222 if ((m.status & MCI_STATUS_VAL) == 0) 312 if ((m.status & MCI_STATUS_VAL) == 0)
223 continue; 313 continue;
224 314
315 /*
316 * Non uncorrected errors are handled by machine_check_poll
317 * Leave them alone.
318 */
319 if ((m.status & MCI_STATUS_UC) == 0)
320 continue;
321
322 /*
323 * Set taint even when machine check was not enabled.
324 */
325 add_taint(TAINT_MACHINE_CHECK);
326
327 __set_bit(i, toclear);
328
225 if (m.status & MCI_STATUS_EN) { 329 if (m.status & MCI_STATUS_EN) {
226 /* if PCC was set, there's no way out */ 330 /* if PCC was set, there's no way out */
227 no_way_out |= !!(m.status & MCI_STATUS_PCC); 331 no_way_out |= !!(m.status & MCI_STATUS_PCC);
@@ -235,6 +339,12 @@ void do_machine_check(struct pt_regs * regs, long error_code)
235 no_way_out = 1; 339 no_way_out = 1;
236 kill_it = 1; 340 kill_it = 1;
237 } 341 }
342 } else {
343 /*
344 * Machine check event was not enabled. Clear, but
345 * ignore.
346 */
347 continue;
238 } 348 }
239 349
240 if (m.status & MCI_STATUS_MISCV) 350 if (m.status & MCI_STATUS_MISCV)
@@ -243,10 +353,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
243 rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr); 353 rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);
244 354
245 mce_get_rip(&m, regs); 355 mce_get_rip(&m, regs);
246 if (error_code >= 0) 356 mce_log(&m);
247 rdtscll(m.tsc);
248 if (error_code != -2)
249 mce_log(&m);
250 357
251 /* Did this bank cause the exception? */ 358 /* Did this bank cause the exception? */
252 /* Assume that the bank with uncorrectable errors did it, 359 /* Assume that the bank with uncorrectable errors did it,
@@ -255,14 +362,8 @@ void do_machine_check(struct pt_regs * regs, long error_code)
255 panicm = m; 362 panicm = m;
256 panicm_found = 1; 363 panicm_found = 1;
257 } 364 }
258
259 add_taint(TAINT_MACHINE_CHECK);
260 } 365 }
261 366
262 /* Never do anything final in the polling timer */
263 if (!regs)
264 goto out;
265
266 /* If we didn't find an uncorrectable error, pick 367 /* If we didn't find an uncorrectable error, pick
267 the last one (shouldn't happen, just being safe). */ 368 the last one (shouldn't happen, just being safe). */
268 if (!panicm_found) 369 if (!panicm_found)
@@ -309,10 +410,11 @@ void do_machine_check(struct pt_regs * regs, long error_code)
309 /* notify userspace ASAP */ 410 /* notify userspace ASAP */
310 set_thread_flag(TIF_MCE_NOTIFY); 411 set_thread_flag(TIF_MCE_NOTIFY);
311 412
312 out:
313 /* the last thing we do is clear state */ 413 /* the last thing we do is clear state */
314 for (i = 0; i < banks; i++) 414 for (i = 0; i < banks; i++) {
315 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 415 if (test_bit(i, toclear))
416 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
417 }
316 wrmsrl(MSR_IA32_MCG_STATUS, 0); 418 wrmsrl(MSR_IA32_MCG_STATUS, 0);
317 out2: 419 out2:
318 atomic_dec(&mce_entry); 420 atomic_dec(&mce_entry);
@@ -332,15 +434,13 @@ void do_machine_check(struct pt_regs * regs, long error_code)
332 * and historically has been the register value of the 434 * and historically has been the register value of the
333 * MSR_IA32_THERMAL_STATUS (Intel) msr. 435 * MSR_IA32_THERMAL_STATUS (Intel) msr.
334 */ 436 */
335void mce_log_therm_throt_event(unsigned int cpu, __u64 status) 437void mce_log_therm_throt_event(__u64 status)
336{ 438{
337 struct mce m; 439 struct mce m;
338 440
339 memset(&m, 0, sizeof(m)); 441 mce_setup(&m);
340 m.cpu = cpu;
341 m.bank = MCE_THERMAL_BANK; 442 m.bank = MCE_THERMAL_BANK;
342 m.status = status; 443 m.status = status;
343 rdtscll(m.tsc);
344 mce_log(&m); 444 mce_log(&m);
345} 445}
346#endif /* CONFIG_X86_MCE_INTEL */ 446#endif /* CONFIG_X86_MCE_INTEL */
@@ -353,18 +453,18 @@ void mce_log_therm_throt_event(unsigned int cpu, __u64 status)
353 453
354static int check_interval = 5 * 60; /* 5 minutes */ 454static int check_interval = 5 * 60; /* 5 minutes */
355static int next_interval; /* in jiffies */ 455static int next_interval; /* in jiffies */
356static void mcheck_timer(struct work_struct *work); 456static void mcheck_timer(unsigned long);
357static DECLARE_DELAYED_WORK(mcheck_work, mcheck_timer); 457static DEFINE_PER_CPU(struct timer_list, mce_timer);
358 458
359static void mcheck_check_cpu(void *info) 459static void mcheck_timer(unsigned long data)
360{ 460{
361 if (mce_available(&current_cpu_data)) 461 struct timer_list *t = &per_cpu(mce_timer, data);
362 do_machine_check(NULL, 0);
363}
364 462
365static void mcheck_timer(struct work_struct *work) 463 WARN_ON(smp_processor_id() != data);
366{ 464
367 on_each_cpu(mcheck_check_cpu, NULL, 1); 465 if (mce_available(&current_cpu_data))
466 machine_check_poll(MCP_TIMESTAMP,
467 &__get_cpu_var(mce_poll_banks));
368 468
369 /* 469 /*
370 * Alert userspace if needed. If we logged an MCE, reduce the 470 * Alert userspace if needed. If we logged an MCE, reduce the
@@ -377,31 +477,41 @@ static void mcheck_timer(struct work_struct *work)
377 (int)round_jiffies_relative(check_interval*HZ)); 477 (int)round_jiffies_relative(check_interval*HZ));
378 } 478 }
379 479
380 schedule_delayed_work(&mcheck_work, next_interval); 480 t->expires = jiffies + next_interval;
481 add_timer(t);
482}
483
484static void mce_do_trigger(struct work_struct *work)
485{
486 call_usermodehelper(trigger, trigger_argv, NULL, UMH_NO_WAIT);
381} 487}
382 488
489static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
490
383/* 491/*
384 * This is only called from process context. This is where we do 492 * Notify the user(s) about new machine check events.
385 * anything we need to alert userspace about new MCEs. This is called 493 * Can be called from interrupt context, but not from machine check/NMI
386 * directly from the poller and also from entry.S and idle, thanks to 494 * context.
387 * TIF_MCE_NOTIFY.
388 */ 495 */
389int mce_notify_user(void) 496int mce_notify_user(void)
390{ 497{
498 /* Not more than two messages every minute */
499 static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2);
500
391 clear_thread_flag(TIF_MCE_NOTIFY); 501 clear_thread_flag(TIF_MCE_NOTIFY);
392 if (test_and_clear_bit(0, &notify_user)) { 502 if (test_and_clear_bit(0, &notify_user)) {
393 static unsigned long last_print;
394 unsigned long now = jiffies;
395
396 wake_up_interruptible(&mce_wait); 503 wake_up_interruptible(&mce_wait);
397 if (trigger[0])
398 call_usermodehelper(trigger, trigger_argv, NULL,
399 UMH_NO_WAIT);
400 504
401 if (time_after_eq(now, last_print + (check_interval*HZ))) { 505 /*
402 last_print = now; 506 * There is no risk of missing notifications because
507 * work_pending is always cleared before the function is
508 * executed.
509 */
510 if (trigger[0] && !work_pending(&mce_trigger_work))
511 schedule_work(&mce_trigger_work);
512
513 if (__ratelimit(&ratelimit))
403 printk(KERN_INFO "Machine check events logged\n"); 514 printk(KERN_INFO "Machine check events logged\n");
404 }
405 515
406 return 1; 516 return 1;
407 } 517 }
@@ -425,63 +535,78 @@ static struct notifier_block mce_idle_notifier = {
425 535
426static __init int periodic_mcheck_init(void) 536static __init int periodic_mcheck_init(void)
427{ 537{
428 next_interval = check_interval * HZ; 538 idle_notifier_register(&mce_idle_notifier);
429 if (next_interval) 539 return 0;
430 schedule_delayed_work(&mcheck_work,
431 round_jiffies_relative(next_interval));
432 idle_notifier_register(&mce_idle_notifier);
433 return 0;
434} 540}
435__initcall(periodic_mcheck_init); 541__initcall(periodic_mcheck_init);
436 542
437
438/* 543/*
439 * Initialize Machine Checks for a CPU. 544 * Initialize Machine Checks for a CPU.
440 */ 545 */
441static void mce_init(void *dummy) 546static int mce_cap_init(void)
442{ 547{
443 u64 cap; 548 u64 cap;
444 int i; 549 unsigned b;
445 550
446 rdmsrl(MSR_IA32_MCG_CAP, cap); 551 rdmsrl(MSR_IA32_MCG_CAP, cap);
447 banks = cap & 0xff; 552 b = cap & 0xff;
448 if (banks > MCE_EXTENDED_BANK) { 553 if (b > MAX_NR_BANKS) {
449 banks = MCE_EXTENDED_BANK; 554 printk(KERN_WARNING
450 printk(KERN_INFO "MCE: warning: using only %d banks\n", 555 "MCE: Using only %u machine check banks out of %u\n",
451 MCE_EXTENDED_BANK); 556 MAX_NR_BANKS, b);
557 b = MAX_NR_BANKS;
452 } 558 }
559
560 /* Don't support asymmetric configurations today */
561 WARN_ON(banks != 0 && b != banks);
562 banks = b;
563 if (!bank) {
564 bank = kmalloc(banks * sizeof(u64), GFP_KERNEL);
565 if (!bank)
566 return -ENOMEM;
567 memset(bank, 0xff, banks * sizeof(u64));
568 }
569
453 /* Use accurate RIP reporting if available. */ 570 /* Use accurate RIP reporting if available. */
454 if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9) 571 if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9)
455 rip_msr = MSR_IA32_MCG_EIP; 572 rip_msr = MSR_IA32_MCG_EIP;
456 573
457 /* Log the machine checks left over from the previous reset. 574 return 0;
458 This also clears all registers */ 575}
459 do_machine_check(NULL, mce_bootlog ? -1 : -2); 576
577static void mce_init(void *dummy)
578{
579 u64 cap;
580 int i;
581 mce_banks_t all_banks;
582
583 /*
584 * Log the machine checks left over from the previous reset.
585 */
586 bitmap_fill(all_banks, MAX_NR_BANKS);
587 machine_check_poll(MCP_UC, &all_banks);
460 588
461 set_in_cr4(X86_CR4_MCE); 589 set_in_cr4(X86_CR4_MCE);
462 590
591 rdmsrl(MSR_IA32_MCG_CAP, cap);
463 if (cap & MCG_CTL_P) 592 if (cap & MCG_CTL_P)
464 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 593 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
465 594
466 for (i = 0; i < banks; i++) { 595 for (i = 0; i < banks; i++) {
467 if (i < NR_SYSFS_BANKS) 596 wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]);
468 wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]);
469 else
470 wrmsrl(MSR_IA32_MC0_CTL+4*i, ~0UL);
471
472 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 597 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
473 } 598 }
474} 599}
475 600
476/* Add per CPU specific workarounds here */ 601/* Add per CPU specific workarounds here */
477static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) 602static void mce_cpu_quirks(struct cpuinfo_x86 *c)
478{ 603{
479 /* This should be disabled by the BIOS, but isn't always */ 604 /* This should be disabled by the BIOS, but isn't always */
480 if (c->x86_vendor == X86_VENDOR_AMD) { 605 if (c->x86_vendor == X86_VENDOR_AMD) {
481 if(c->x86 == 15) 606 if (c->x86 == 15 && banks > 4)
482 /* disable GART TBL walk error reporting, which trips off 607 /* disable GART TBL walk error reporting, which trips off
483 incorrectly with the IOMMU & 3ware & Cerberus. */ 608 incorrectly with the IOMMU & 3ware & Cerberus. */
484 clear_bit(10, &bank[4]); 609 clear_bit(10, (unsigned long *)&bank[4]);
485 if(c->x86 <= 17 && mce_bootlog < 0) 610 if(c->x86 <= 17 && mce_bootlog < 0)
486 /* Lots of broken BIOS around that don't clear them 611 /* Lots of broken BIOS around that don't clear them
487 by default and leave crap in there. Don't log. */ 612 by default and leave crap in there. Don't log. */
@@ -504,20 +629,38 @@ static void mce_cpu_features(struct cpuinfo_x86 *c)
504 } 629 }
505} 630}
506 631
632static void mce_init_timer(void)
633{
634 struct timer_list *t = &__get_cpu_var(mce_timer);
635
636 /* data race harmless because everyone sets to the same value */
637 if (!next_interval)
638 next_interval = check_interval * HZ;
639 if (!next_interval)
640 return;
641 setup_timer(t, mcheck_timer, smp_processor_id());
642 t->expires = round_jiffies(jiffies + next_interval);
643 add_timer(t);
644}
645
507/* 646/*
508 * Called for each booted CPU to set up machine checks. 647 * Called for each booted CPU to set up machine checks.
509 * Must be called with preempt off. 648 * Must be called with preempt off.
510 */ 649 */
511void __cpuinit mcheck_init(struct cpuinfo_x86 *c) 650void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
512{ 651{
513 mce_cpu_quirks(c); 652 if (!mce_available(c))
653 return;
514 654
515 if (mce_dont_init || 655 if (mce_cap_init() < 0) {
516 !mce_available(c)) 656 mce_dont_init = 1;
517 return; 657 return;
658 }
659 mce_cpu_quirks(c);
518 660
519 mce_init(NULL); 661 mce_init(NULL);
520 mce_cpu_features(c); 662 mce_cpu_features(c);
663 mce_init_timer();
521} 664}
522 665
523/* 666/*
@@ -573,7 +716,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
573{ 716{
574 unsigned long *cpu_tsc; 717 unsigned long *cpu_tsc;
575 static DEFINE_MUTEX(mce_read_mutex); 718 static DEFINE_MUTEX(mce_read_mutex);
576 unsigned next; 719 unsigned prev, next;
577 char __user *buf = ubuf; 720 char __user *buf = ubuf;
578 int i, err; 721 int i, err;
579 722
@@ -592,25 +735,32 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
592 } 735 }
593 736
594 err = 0; 737 err = 0;
595 for (i = 0; i < next; i++) { 738 prev = 0;
596 unsigned long start = jiffies; 739 do {
597 740 for (i = prev; i < next; i++) {
598 while (!mcelog.entry[i].finished) { 741 unsigned long start = jiffies;
599 if (time_after_eq(jiffies, start + 2)) { 742
600 memset(mcelog.entry + i,0, sizeof(struct mce)); 743 while (!mcelog.entry[i].finished) {
601 goto timeout; 744 if (time_after_eq(jiffies, start + 2)) {
745 memset(mcelog.entry + i, 0,
746 sizeof(struct mce));
747 goto timeout;
748 }
749 cpu_relax();
602 } 750 }
603 cpu_relax(); 751 smp_rmb();
752 err |= copy_to_user(buf, mcelog.entry + i,
753 sizeof(struct mce));
754 buf += sizeof(struct mce);
755timeout:
756 ;
604 } 757 }
605 smp_rmb();
606 err |= copy_to_user(buf, mcelog.entry + i, sizeof(struct mce));
607 buf += sizeof(struct mce);
608 timeout:
609 ;
610 }
611 758
612 memset(mcelog.entry, 0, next * sizeof(struct mce)); 759 memset(mcelog.entry + prev, 0,
613 mcelog.next = 0; 760 (next - prev) * sizeof(struct mce));
761 prev = next;
762 next = cmpxchg(&mcelog.next, prev, 0);
763 } while (next != prev);
614 764
615 synchronize_sched(); 765 synchronize_sched();
616 766
@@ -680,20 +830,6 @@ static struct miscdevice mce_log_device = {
680 &mce_chrdev_ops, 830 &mce_chrdev_ops,
681}; 831};
682 832
683static unsigned long old_cr4 __initdata;
684
685void __init stop_mce(void)
686{
687 old_cr4 = read_cr4();
688 clear_in_cr4(X86_CR4_MCE);
689}
690
691void __init restart_mce(void)
692{
693 if (old_cr4 & X86_CR4_MCE)
694 set_in_cr4(X86_CR4_MCE);
695}
696
697/* 833/*
698 * Old style boot options parsing. Only for compatibility. 834 * Old style boot options parsing. Only for compatibility.
699 */ 835 */
@@ -703,8 +839,7 @@ static int __init mcheck_disable(char *str)
703 return 1; 839 return 1;
704} 840}
705 841
706/* mce=off disables machine check. Note you can re-enable it later 842/* mce=off disables machine check.
707 using sysfs.
708 mce=TOLERANCELEVEL (number, see above) 843 mce=TOLERANCELEVEL (number, see above)
709 mce=bootlog Log MCEs from before booting. Disabled by default on AMD. 844 mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
710 mce=nobootlog Don't log MCEs from before booting. */ 845 mce=nobootlog Don't log MCEs from before booting. */
@@ -728,6 +863,29 @@ __setup("mce=", mcheck_enable);
728 * Sysfs support 863 * Sysfs support
729 */ 864 */
730 865
866/*
867 * Disable machine checks on suspend and shutdown. We can't really handle
868 * them later.
869 */
870static int mce_disable(void)
871{
872 int i;
873
874 for (i = 0; i < banks; i++)
875 wrmsrl(MSR_IA32_MC0_CTL + i*4, 0);
876 return 0;
877}
878
879static int mce_suspend(struct sys_device *dev, pm_message_t state)
880{
881 return mce_disable();
882}
883
884static int mce_shutdown(struct sys_device *dev)
885{
886 return mce_disable();
887}
888
731/* On resume clear all MCE state. Don't want to see leftovers from the BIOS. 889/* On resume clear all MCE state. Don't want to see leftovers from the BIOS.
732 Only one CPU is active at this time, the others get readded later using 890 Only one CPU is active at this time, the others get readded later using
733 CPU hotplug. */ 891 CPU hotplug. */
@@ -738,20 +896,24 @@ static int mce_resume(struct sys_device *dev)
738 return 0; 896 return 0;
739} 897}
740 898
899static void mce_cpu_restart(void *data)
900{
901 del_timer_sync(&__get_cpu_var(mce_timer));
902 if (mce_available(&current_cpu_data))
903 mce_init(NULL);
904 mce_init_timer();
905}
906
741/* Reinit MCEs after user configuration changes */ 907/* Reinit MCEs after user configuration changes */
742static void mce_restart(void) 908static void mce_restart(void)
743{ 909{
744 if (next_interval)
745 cancel_delayed_work(&mcheck_work);
746 /* Timer race is harmless here */
747 on_each_cpu(mce_init, NULL, 1);
748 next_interval = check_interval * HZ; 910 next_interval = check_interval * HZ;
749 if (next_interval) 911 on_each_cpu(mce_cpu_restart, NULL, 1);
750 schedule_delayed_work(&mcheck_work,
751 round_jiffies_relative(next_interval));
752} 912}
753 913
754static struct sysdev_class mce_sysclass = { 914static struct sysdev_class mce_sysclass = {
915 .suspend = mce_suspend,
916 .shutdown = mce_shutdown,
755 .resume = mce_resume, 917 .resume = mce_resume,
756 .name = "machinecheck", 918 .name = "machinecheck",
757}; 919};
@@ -778,16 +940,26 @@ void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu) __cpuinit
778 } \ 940 } \
779 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name); 941 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name);
780 942
781/* 943static struct sysdev_attribute *bank_attrs;
782 * TBD should generate these dynamically based on number of available banks. 944
783 * Have only 6 contol banks in /sysfs until then. 945static ssize_t show_bank(struct sys_device *s, struct sysdev_attribute *attr,
784 */ 946 char *buf)
785ACCESSOR(bank0ctl,bank[0],mce_restart()) 947{
786ACCESSOR(bank1ctl,bank[1],mce_restart()) 948 u64 b = bank[attr - bank_attrs];
787ACCESSOR(bank2ctl,bank[2],mce_restart()) 949 return sprintf(buf, "%llx\n", b);
788ACCESSOR(bank3ctl,bank[3],mce_restart()) 950}
789ACCESSOR(bank4ctl,bank[4],mce_restart()) 951
790ACCESSOR(bank5ctl,bank[5],mce_restart()) 952static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr,
953 const char *buf, size_t siz)
954{
955 char *end;
956 u64 new = simple_strtoull(buf, &end, 0);
957 if (end == buf)
958 return -EINVAL;
959 bank[attr - bank_attrs] = new;
960 mce_restart();
961 return end-buf;
962}
791 963
792static ssize_t show_trigger(struct sys_device *s, struct sysdev_attribute *attr, 964static ssize_t show_trigger(struct sys_device *s, struct sysdev_attribute *attr,
793 char *buf) 965 char *buf)
@@ -814,13 +986,11 @@ static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger);
814static SYSDEV_INT_ATTR(tolerant, 0644, tolerant); 986static SYSDEV_INT_ATTR(tolerant, 0644, tolerant);
815ACCESSOR(check_interval,check_interval,mce_restart()) 987ACCESSOR(check_interval,check_interval,mce_restart())
816static struct sysdev_attribute *mce_attributes[] = { 988static struct sysdev_attribute *mce_attributes[] = {
817 &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl,
818 &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl,
819 &attr_tolerant.attr, &attr_check_interval, &attr_trigger, 989 &attr_tolerant.attr, &attr_check_interval, &attr_trigger,
820 NULL 990 NULL
821}; 991};
822 992
823static cpumask_t mce_device_initialized = CPU_MASK_NONE; 993static cpumask_var_t mce_device_initialized;
824 994
825/* Per cpu sysdev init. All of the cpus still share the same ctl bank */ 995/* Per cpu sysdev init. All of the cpus still share the same ctl bank */
826static __cpuinit int mce_create_device(unsigned int cpu) 996static __cpuinit int mce_create_device(unsigned int cpu)
@@ -845,11 +1015,22 @@ static __cpuinit int mce_create_device(unsigned int cpu)
845 if (err) 1015 if (err)
846 goto error; 1016 goto error;
847 } 1017 }
848 cpu_set(cpu, mce_device_initialized); 1018 for (i = 0; i < banks; i++) {
1019 err = sysdev_create_file(&per_cpu(device_mce, cpu),
1020 &bank_attrs[i]);
1021 if (err)
1022 goto error2;
1023 }
1024 cpumask_set_cpu(cpu, mce_device_initialized);
849 1025
850 return 0; 1026 return 0;
1027error2:
1028 while (--i >= 0) {
1029 sysdev_remove_file(&per_cpu(device_mce, cpu),
1030 &bank_attrs[i]);
1031 }
851error: 1032error:
852 while (i--) { 1033 while (--i >= 0) {
853 sysdev_remove_file(&per_cpu(device_mce,cpu), 1034 sysdev_remove_file(&per_cpu(device_mce,cpu),
854 mce_attributes[i]); 1035 mce_attributes[i]);
855 } 1036 }
@@ -862,14 +1043,44 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
862{ 1043{
863 int i; 1044 int i;
864 1045
865 if (!cpu_isset(cpu, mce_device_initialized)) 1046 if (!cpumask_test_cpu(cpu, mce_device_initialized))
866 return; 1047 return;
867 1048
868 for (i = 0; mce_attributes[i]; i++) 1049 for (i = 0; mce_attributes[i]; i++)
869 sysdev_remove_file(&per_cpu(device_mce,cpu), 1050 sysdev_remove_file(&per_cpu(device_mce,cpu),
870 mce_attributes[i]); 1051 mce_attributes[i]);
1052 for (i = 0; i < banks; i++)
1053 sysdev_remove_file(&per_cpu(device_mce, cpu),
1054 &bank_attrs[i]);
871 sysdev_unregister(&per_cpu(device_mce,cpu)); 1055 sysdev_unregister(&per_cpu(device_mce,cpu));
872 cpu_clear(cpu, mce_device_initialized); 1056 cpumask_clear_cpu(cpu, mce_device_initialized);
1057}
1058
1059/* Make sure there are no machine checks on offlined CPUs. */
1060static void mce_disable_cpu(void *h)
1061{
1062 int i;
1063 unsigned long action = *(unsigned long *)h;
1064
1065 if (!mce_available(&current_cpu_data))
1066 return;
1067 if (!(action & CPU_TASKS_FROZEN))
1068 cmci_clear();
1069 for (i = 0; i < banks; i++)
1070 wrmsrl(MSR_IA32_MC0_CTL + i*4, 0);
1071}
1072
1073static void mce_reenable_cpu(void *h)
1074{
1075 int i;
1076 unsigned long action = *(unsigned long *)h;
1077
1078 if (!mce_available(&current_cpu_data))
1079 return;
1080 if (!(action & CPU_TASKS_FROZEN))
1081 cmci_reenable();
1082 for (i = 0; i < banks; i++)
1083 wrmsrl(MSR_IA32_MC0_CTL + i*4, bank[i]);
873} 1084}
874 1085
875/* Get notified when a cpu comes on/off. Be hotplug friendly. */ 1086/* Get notified when a cpu comes on/off. Be hotplug friendly. */
@@ -877,6 +1088,7 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb,
877 unsigned long action, void *hcpu) 1088 unsigned long action, void *hcpu)
878{ 1089{
879 unsigned int cpu = (unsigned long)hcpu; 1090 unsigned int cpu = (unsigned long)hcpu;
1091 struct timer_list *t = &per_cpu(mce_timer, cpu);
880 1092
881 switch (action) { 1093 switch (action) {
882 case CPU_ONLINE: 1094 case CPU_ONLINE:
@@ -891,6 +1103,21 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb,
891 threshold_cpu_callback(action, cpu); 1103 threshold_cpu_callback(action, cpu);
892 mce_remove_device(cpu); 1104 mce_remove_device(cpu);
893 break; 1105 break;
1106 case CPU_DOWN_PREPARE:
1107 case CPU_DOWN_PREPARE_FROZEN:
1108 del_timer_sync(t);
1109 smp_call_function_single(cpu, mce_disable_cpu, &action, 1);
1110 break;
1111 case CPU_DOWN_FAILED:
1112 case CPU_DOWN_FAILED_FROZEN:
1113 t->expires = round_jiffies(jiffies + next_interval);
1114 add_timer_on(t, cpu);
1115 smp_call_function_single(cpu, mce_reenable_cpu, &action, 1);
1116 break;
1117 case CPU_POST_DEAD:
1118 /* intentionally ignoring frozen here */
1119 cmci_rediscover(cpu);
1120 break;
894 } 1121 }
895 return NOTIFY_OK; 1122 return NOTIFY_OK;
896} 1123}
@@ -899,6 +1126,34 @@ static struct notifier_block mce_cpu_notifier __cpuinitdata = {
899 .notifier_call = mce_cpu_callback, 1126 .notifier_call = mce_cpu_callback,
900}; 1127};
901 1128
1129static __init int mce_init_banks(void)
1130{
1131 int i;
1132
1133 bank_attrs = kzalloc(sizeof(struct sysdev_attribute) * banks,
1134 GFP_KERNEL);
1135 if (!bank_attrs)
1136 return -ENOMEM;
1137
1138 for (i = 0; i < banks; i++) {
1139 struct sysdev_attribute *a = &bank_attrs[i];
1140 a->attr.name = kasprintf(GFP_KERNEL, "bank%d", i);
1141 if (!a->attr.name)
1142 goto nomem;
1143 a->attr.mode = 0644;
1144 a->show = show_bank;
1145 a->store = set_bank;
1146 }
1147 return 0;
1148
1149nomem:
1150 while (--i >= 0)
1151 kfree(bank_attrs[i].attr.name);
1152 kfree(bank_attrs);
1153 bank_attrs = NULL;
1154 return -ENOMEM;
1155}
1156
902static __init int mce_init_device(void) 1157static __init int mce_init_device(void)
903{ 1158{
904 int err; 1159 int err;
@@ -906,6 +1161,13 @@ static __init int mce_init_device(void)
906 1161
907 if (!mce_available(&boot_cpu_data)) 1162 if (!mce_available(&boot_cpu_data))
908 return -EIO; 1163 return -EIO;
1164
1165 alloc_cpumask_var(&mce_device_initialized, GFP_KERNEL);
1166
1167 err = mce_init_banks();
1168 if (err)
1169 return err;
1170
909 err = sysdev_class_register(&mce_sysclass); 1171 err = sysdev_class_register(&mce_sysclass);
910 if (err) 1172 if (err)
911 return err; 1173 return err;
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index 9817506dd469..56dde9c4bc96 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -79,6 +79,8 @@ static unsigned char shared_bank[NR_BANKS] = {
79 79
80static DEFINE_PER_CPU(unsigned char, bank_map); /* see which banks are on */ 80static DEFINE_PER_CPU(unsigned char, bank_map); /* see which banks are on */
81 81
82static void amd_threshold_interrupt(void);
83
82/* 84/*
83 * CPU Initialization 85 * CPU Initialization
84 */ 86 */
@@ -90,7 +92,8 @@ struct thresh_restart {
90}; 92};
91 93
92/* must be called with correct cpu affinity */ 94/* must be called with correct cpu affinity */
93static long threshold_restart_bank(void *_tr) 95/* Called via smp_call_function_single() */
96static void threshold_restart_bank(void *_tr)
94{ 97{
95 struct thresh_restart *tr = _tr; 98 struct thresh_restart *tr = _tr;
96 u32 mci_misc_hi, mci_misc_lo; 99 u32 mci_misc_hi, mci_misc_lo;
@@ -117,7 +120,6 @@ static long threshold_restart_bank(void *_tr)
117 120
118 mci_misc_hi |= MASK_COUNT_EN_HI; 121 mci_misc_hi |= MASK_COUNT_EN_HI;
119 wrmsr(tr->b->address, mci_misc_lo, mci_misc_hi); 122 wrmsr(tr->b->address, mci_misc_lo, mci_misc_hi);
120 return 0;
121} 123}
122 124
123/* cpu init entry point, called from mce.c with preempt off */ 125/* cpu init entry point, called from mce.c with preempt off */
@@ -174,6 +176,8 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
174 tr.reset = 0; 176 tr.reset = 0;
175 tr.old_limit = 0; 177 tr.old_limit = 0;
176 threshold_restart_bank(&tr); 178 threshold_restart_bank(&tr);
179
180 mce_threshold_vector = amd_threshold_interrupt;
177 } 181 }
178 } 182 }
179} 183}
@@ -187,19 +191,13 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
187 * the interrupt goes off when error_count reaches threshold_limit. 191 * the interrupt goes off when error_count reaches threshold_limit.
188 * the handler will simply log mcelog w/ software defined bank number. 192 * the handler will simply log mcelog w/ software defined bank number.
189 */ 193 */
190asmlinkage void mce_threshold_interrupt(void) 194static void amd_threshold_interrupt(void)
191{ 195{
192 unsigned int bank, block; 196 unsigned int bank, block;
193 struct mce m; 197 struct mce m;
194 u32 low = 0, high = 0, address = 0; 198 u32 low = 0, high = 0, address = 0;
195 199
196 ack_APIC_irq(); 200 mce_setup(&m);
197 exit_idle();
198 irq_enter();
199
200 memset(&m, 0, sizeof(m));
201 rdtscll(m.tsc);
202 m.cpu = smp_processor_id();
203 201
204 /* assume first bank caused it */ 202 /* assume first bank caused it */
205 for (bank = 0; bank < NR_BANKS; ++bank) { 203 for (bank = 0; bank < NR_BANKS; ++bank) {
@@ -233,7 +231,8 @@ asmlinkage void mce_threshold_interrupt(void)
233 231
234 /* Log the machine check that caused the threshold 232 /* Log the machine check that caused the threshold
235 event. */ 233 event. */
236 do_machine_check(NULL, 0); 234 machine_check_poll(MCP_TIMESTAMP,
235 &__get_cpu_var(mce_poll_banks));
237 236
238 if (high & MASK_OVERFLOW_HI) { 237 if (high & MASK_OVERFLOW_HI) {
239 rdmsrl(address, m.misc); 238 rdmsrl(address, m.misc);
@@ -243,13 +242,10 @@ asmlinkage void mce_threshold_interrupt(void)
243 + bank * NR_BLOCKS 242 + bank * NR_BLOCKS
244 + block; 243 + block;
245 mce_log(&m); 244 mce_log(&m);
246 goto out; 245 return;
247 } 246 }
248 } 247 }
249 } 248 }
250out:
251 inc_irq_stat(irq_threshold_count);
252 irq_exit();
253} 249}
254 250
255/* 251/*
@@ -283,7 +279,7 @@ static ssize_t store_interrupt_enable(struct threshold_block *b,
283 tr.b = b; 279 tr.b = b;
284 tr.reset = 0; 280 tr.reset = 0;
285 tr.old_limit = 0; 281 tr.old_limit = 0;
286 work_on_cpu(b->cpu, threshold_restart_bank, &tr); 282 smp_call_function_single(b->cpu, threshold_restart_bank, &tr, 1);
287 283
288 return end - buf; 284 return end - buf;
289} 285}
@@ -305,23 +301,32 @@ static ssize_t store_threshold_limit(struct threshold_block *b,
305 tr.b = b; 301 tr.b = b;
306 tr.reset = 0; 302 tr.reset = 0;
307 303
308 work_on_cpu(b->cpu, threshold_restart_bank, &tr); 304 smp_call_function_single(b->cpu, threshold_restart_bank, &tr, 1);
309 305
310 return end - buf; 306 return end - buf;
311} 307}
312 308
313static long local_error_count(void *_b) 309struct threshold_block_cross_cpu {
310 struct threshold_block *tb;
311 long retval;
312};
313
314static void local_error_count_handler(void *_tbcc)
314{ 315{
315 struct threshold_block *b = _b; 316 struct threshold_block_cross_cpu *tbcc = _tbcc;
317 struct threshold_block *b = tbcc->tb;
316 u32 low, high; 318 u32 low, high;
317 319
318 rdmsr(b->address, low, high); 320 rdmsr(b->address, low, high);
319 return (high & 0xFFF) - (THRESHOLD_MAX - b->threshold_limit); 321 tbcc->retval = (high & 0xFFF) - (THRESHOLD_MAX - b->threshold_limit);
320} 322}
321 323
322static ssize_t show_error_count(struct threshold_block *b, char *buf) 324static ssize_t show_error_count(struct threshold_block *b, char *buf)
323{ 325{
324 return sprintf(buf, "%lx\n", work_on_cpu(b->cpu, local_error_count, b)); 326 struct threshold_block_cross_cpu tbcc = { .tb = b, };
327
328 smp_call_function_single(b->cpu, local_error_count_handler, &tbcc, 1);
329 return sprintf(buf, "%lx\n", tbcc.retval);
325} 330}
326 331
327static ssize_t store_error_count(struct threshold_block *b, 332static ssize_t store_error_count(struct threshold_block *b,
@@ -329,7 +334,7 @@ static ssize_t store_error_count(struct threshold_block *b,
329{ 334{
330 struct thresh_restart tr = { .b = b, .reset = 1, .old_limit = 0 }; 335 struct thresh_restart tr = { .b = b, .reset = 1, .old_limit = 0 };
331 336
332 work_on_cpu(b->cpu, threshold_restart_bank, &tr); 337 smp_call_function_single(b->cpu, threshold_restart_bank, &tr, 1);
333 return 1; 338 return 1;
334} 339}
335 340
@@ -398,7 +403,7 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
398 if ((bank >= NR_BANKS) || (block >= NR_BLOCKS)) 403 if ((bank >= NR_BANKS) || (block >= NR_BLOCKS))
399 return 0; 404 return 0;
400 405
401 if (rdmsr_safe(address, &low, &high)) 406 if (rdmsr_safe_on_cpu(cpu, address, &low, &high))
402 return 0; 407 return 0;
403 408
404 if (!(high & MASK_VALID_HI)) { 409 if (!(high & MASK_VALID_HI)) {
@@ -462,12 +467,11 @@ out_free:
462 return err; 467 return err;
463} 468}
464 469
465static __cpuinit long local_allocate_threshold_blocks(void *_bank) 470static __cpuinit long
471local_allocate_threshold_blocks(int cpu, unsigned int bank)
466{ 472{
467 unsigned int *bank = _bank; 473 return allocate_threshold_blocks(cpu, bank, 0,
468 474 MSR_IA32_MC0_MISC + bank * 4);
469 return allocate_threshold_blocks(smp_processor_id(), *bank, 0,
470 MSR_IA32_MC0_MISC + *bank * 4);
471} 475}
472 476
473/* symlinks sibling shared banks to first core. first core owns dir/files. */ 477/* symlinks sibling shared banks to first core. first core owns dir/files. */
@@ -481,7 +485,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
481 485
482#ifdef CONFIG_SMP 486#ifdef CONFIG_SMP
483 if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ 487 if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */
484 i = cpumask_first(&per_cpu(cpu_core_map, cpu)); 488 i = cpumask_first(cpu_core_mask(cpu));
485 489
486 /* first core not up yet */ 490 /* first core not up yet */
487 if (cpu_data(i).cpu_core_id) 491 if (cpu_data(i).cpu_core_id)
@@ -501,7 +505,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
501 if (err) 505 if (err)
502 goto out; 506 goto out;
503 507
504 cpumask_copy(b->cpus, &per_cpu(cpu_core_map, cpu)); 508 cpumask_copy(b->cpus, cpu_core_mask(cpu));
505 per_cpu(threshold_banks, cpu)[bank] = b; 509 per_cpu(threshold_banks, cpu)[bank] = b;
506 goto out; 510 goto out;
507 } 511 }
@@ -525,12 +529,12 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
525#ifndef CONFIG_SMP 529#ifndef CONFIG_SMP
526 cpumask_setall(b->cpus); 530 cpumask_setall(b->cpus);
527#else 531#else
528 cpumask_copy(b->cpus, &per_cpu(cpu_core_map, cpu)); 532 cpumask_copy(b->cpus, cpu_core_mask(cpu));
529#endif 533#endif
530 534
531 per_cpu(threshold_banks, cpu)[bank] = b; 535 per_cpu(threshold_banks, cpu)[bank] = b;
532 536
533 err = work_on_cpu(cpu, local_allocate_threshold_blocks, &bank); 537 err = local_allocate_threshold_blocks(cpu, bank);
534 if (err) 538 if (err)
535 goto out_free; 539 goto out_free;
536 540
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
index aa5e287c98e0..d6b72df89d69 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
@@ -1,6 +1,8 @@
1/* 1/*
2 * Intel specific MCE features. 2 * Intel specific MCE features.
3 * Copyright 2004 Zwane Mwaikambo <zwane@linuxpower.ca> 3 * Copyright 2004 Zwane Mwaikambo <zwane@linuxpower.ca>
4 * Copyright (C) 2008, 2009 Intel Corporation
5 * Author: Andi Kleen
4 */ 6 */
5 7
6#include <linux/init.h> 8#include <linux/init.h>
@@ -13,6 +15,7 @@
13#include <asm/hw_irq.h> 15#include <asm/hw_irq.h>
14#include <asm/idle.h> 16#include <asm/idle.h>
15#include <asm/therm_throt.h> 17#include <asm/therm_throt.h>
18#include <asm/apic.h>
16 19
17asmlinkage void smp_thermal_interrupt(void) 20asmlinkage void smp_thermal_interrupt(void)
18{ 21{
@@ -25,7 +28,7 @@ asmlinkage void smp_thermal_interrupt(void)
25 28
26 rdmsrl(MSR_IA32_THERM_STATUS, msr_val); 29 rdmsrl(MSR_IA32_THERM_STATUS, msr_val);
27 if (therm_throt_process(msr_val & 1)) 30 if (therm_throt_process(msr_val & 1))
28 mce_log_therm_throt_event(smp_processor_id(), msr_val); 31 mce_log_therm_throt_event(msr_val);
29 32
30 inc_irq_stat(irq_thermal_count); 33 inc_irq_stat(irq_thermal_count);
31 irq_exit(); 34 irq_exit();
@@ -85,7 +88,209 @@ static void intel_init_thermal(struct cpuinfo_x86 *c)
85 return; 88 return;
86} 89}
87 90
91/*
92 * Support for Intel Correct Machine Check Interrupts. This allows
93 * the CPU to raise an interrupt when a corrected machine check happened.
94 * Normally we pick those up using a regular polling timer.
95 * Also supports reliable discovery of shared banks.
96 */
97
98static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);
99
100/*
101 * cmci_discover_lock protects against parallel discovery attempts
102 * which could race against each other.
103 */
104static DEFINE_SPINLOCK(cmci_discover_lock);
105
106#define CMCI_THRESHOLD 1
107
108static int cmci_supported(int *banks)
109{
110 u64 cap;
111
112 /*
113 * Vendor check is not strictly needed, but the initial
114 * initialization is vendor keyed and this
115 * makes sure none of the backdoors are entered otherwise.
116 */
117 if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
118 return 0;
119 if (!cpu_has_apic || lapic_get_maxlvt() < 6)
120 return 0;
121 rdmsrl(MSR_IA32_MCG_CAP, cap);
122 *banks = min_t(unsigned, MAX_NR_BANKS, cap & 0xff);
123 return !!(cap & MCG_CMCI_P);
124}
125
126/*
127 * The interrupt handler. This is called on every event.
128 * Just call the poller directly to log any events.
129 * This could in theory increase the threshold under high load,
130 * but doesn't for now.
131 */
132static void intel_threshold_interrupt(void)
133{
134 machine_check_poll(MCP_TIMESTAMP, &__get_cpu_var(mce_banks_owned));
135 mce_notify_user();
136}
137
138static void print_update(char *type, int *hdr, int num)
139{
140 if (*hdr == 0)
141 printk(KERN_INFO "CPU %d MCA banks", smp_processor_id());
142 *hdr = 1;
143 printk(KERN_CONT " %s:%d", type, num);
144}
145
146/*
147 * Enable CMCI (Corrected Machine Check Interrupt) for available MCE banks
148 * on this CPU. Use the algorithm recommended in the SDM to discover shared
149 * banks.
150 */
151static void cmci_discover(int banks, int boot)
152{
153 unsigned long *owned = (void *)&__get_cpu_var(mce_banks_owned);
154 int hdr = 0;
155 int i;
156
157 spin_lock(&cmci_discover_lock);
158 for (i = 0; i < banks; i++) {
159 u64 val;
160
161 if (test_bit(i, owned))
162 continue;
163
164 rdmsrl(MSR_IA32_MC0_CTL2 + i, val);
165
166 /* Already owned by someone else? */
167 if (val & CMCI_EN) {
168 if (test_and_clear_bit(i, owned) || boot)
169 print_update("SHD", &hdr, i);
170 __clear_bit(i, __get_cpu_var(mce_poll_banks));
171 continue;
172 }
173
174 val |= CMCI_EN | CMCI_THRESHOLD;
175 wrmsrl(MSR_IA32_MC0_CTL2 + i, val);
176 rdmsrl(MSR_IA32_MC0_CTL2 + i, val);
177
178 /* Did the enable bit stick? -- the bank supports CMCI */
179 if (val & CMCI_EN) {
180 if (!test_and_set_bit(i, owned) || boot)
181 print_update("CMCI", &hdr, i);
182 __clear_bit(i, __get_cpu_var(mce_poll_banks));
183 } else {
184 WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks)));
185 }
186 }
187 spin_unlock(&cmci_discover_lock);
188 if (hdr)
189 printk(KERN_CONT "\n");
190}
191
192/*
193 * Just in case we missed an event during initialization check
194 * all the CMCI owned banks.
195 */
196void cmci_recheck(void)
197{
198 unsigned long flags;
199 int banks;
200
201 if (!mce_available(&current_cpu_data) || !cmci_supported(&banks))
202 return;
203 local_irq_save(flags);
204 machine_check_poll(MCP_TIMESTAMP, &__get_cpu_var(mce_banks_owned));
205 local_irq_restore(flags);
206}
207
208/*
209 * Disable CMCI on this CPU for all banks it owns when it goes down.
210 * This allows other CPUs to claim the banks on rediscovery.
211 */
212void cmci_clear(void)
213{
214 int i;
215 int banks;
216 u64 val;
217
218 if (!cmci_supported(&banks))
219 return;
220 spin_lock(&cmci_discover_lock);
221 for (i = 0; i < banks; i++) {
222 if (!test_bit(i, __get_cpu_var(mce_banks_owned)))
223 continue;
224 /* Disable CMCI */
225 rdmsrl(MSR_IA32_MC0_CTL2 + i, val);
226 val &= ~(CMCI_EN|CMCI_THRESHOLD_MASK);
227 wrmsrl(MSR_IA32_MC0_CTL2 + i, val);
228 __clear_bit(i, __get_cpu_var(mce_banks_owned));
229 }
230 spin_unlock(&cmci_discover_lock);
231}
232
233/*
234 * After a CPU went down cycle through all the others and rediscover
235 * Must run in process context.
236 */
237void cmci_rediscover(int dying)
238{
239 int banks;
240 int cpu;
241 cpumask_var_t old;
242
243 if (!cmci_supported(&banks))
244 return;
245 if (!alloc_cpumask_var(&old, GFP_KERNEL))
246 return;
247 cpumask_copy(old, &current->cpus_allowed);
248
249 for_each_online_cpu (cpu) {
250 if (cpu == dying)
251 continue;
252 if (set_cpus_allowed_ptr(current, cpumask_of(cpu)))
253 continue;
254 /* Recheck banks in case CPUs don't all have the same */
255 if (cmci_supported(&banks))
256 cmci_discover(banks, 0);
257 }
258
259 set_cpus_allowed_ptr(current, old);
260 free_cpumask_var(old);
261}
262
263/*
264 * Reenable CMCI on this CPU in case a CPU down failed.
265 */
266void cmci_reenable(void)
267{
268 int banks;
269 if (cmci_supported(&banks))
270 cmci_discover(banks, 0);
271}
272
273static void intel_init_cmci(void)
274{
275 int banks;
276
277 if (!cmci_supported(&banks))
278 return;
279
280 mce_threshold_vector = intel_threshold_interrupt;
281 cmci_discover(banks, 1);
282 /*
283 * For CPU #0 this runs with still disabled APIC, but that's
284 * ok because only the vector is set up. We still do another
285 * check for the banks later for CPU #0 just to make sure
286 * to not miss any events.
287 */
288 apic_write(APIC_LVTCMCI, THRESHOLD_APIC_VECTOR|APIC_DM_FIXED);
289 cmci_recheck();
290}
291
88void mce_intel_feature_init(struct cpuinfo_x86 *c) 292void mce_intel_feature_init(struct cpuinfo_x86 *c)
89{ 293{
90 intel_init_thermal(c); 294 intel_init_thermal(c);
295 intel_init_cmci();
91} 296}
diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c
new file mode 100644
index 000000000000..23ee9e730f78
--- /dev/null
+++ b/arch/x86/kernel/cpu/mcheck/threshold.c
@@ -0,0 +1,29 @@
1/*
2 * Common corrected MCE threshold handler code:
3 */
4#include <linux/interrupt.h>
5#include <linux/kernel.h>
6
7#include <asm/irq_vectors.h>
8#include <asm/apic.h>
9#include <asm/idle.h>
10#include <asm/mce.h>
11
12static void default_threshold_interrupt(void)
13{
14 printk(KERN_ERR "Unexpected threshold interrupt at vector %x\n",
15 THRESHOLD_APIC_VECTOR);
16}
17
18void (*mce_threshold_vector)(void) = default_threshold_interrupt;
19
20asmlinkage void mce_threshold_interrupt(void)
21{
22 exit_idle();
23 irq_enter();
24 inc_irq_stat(irq_threshold_count);
25 mce_threshold_vector();
26 irq_exit();
27 /* Ack only at the end to avoid potential reentry */
28 ack_APIC_irq();
29}
diff --git a/arch/x86/kernel/cpu/mtrr/Makefile b/arch/x86/kernel/cpu/mtrr/Makefile
index 191fc0533649..f4361b56f8e9 100644
--- a/arch/x86/kernel/cpu/mtrr/Makefile
+++ b/arch/x86/kernel/cpu/mtrr/Makefile
@@ -1,3 +1,3 @@
1obj-y := main.o if.o generic.o state.o 1obj-y := main.o if.o generic.o state.o cleanup.o
2obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o 2obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
3 3
diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c
new file mode 100644
index 000000000000..ce0fe4b5c04f
--- /dev/null
+++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
@@ -0,0 +1,1101 @@
1/* MTRR (Memory Type Range Register) cleanup
2
3 Copyright (C) 2009 Yinghai Lu
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*/
19
20#include <linux/module.h>
21#include <linux/init.h>
22#include <linux/pci.h>
23#include <linux/smp.h>
24#include <linux/cpu.h>
25#include <linux/mutex.h>
26#include <linux/sort.h>
27
28#include <asm/e820.h>
29#include <asm/mtrr.h>
30#include <asm/uaccess.h>
31#include <asm/processor.h>
32#include <asm/msr.h>
33#include <asm/kvm_para.h>
34#include "mtrr.h"
35
36/* should be related to MTRR_VAR_RANGES nums */
37#define RANGE_NUM 256
38
39struct res_range {
40 unsigned long start;
41 unsigned long end;
42};
43
44static int __init
45add_range(struct res_range *range, int nr_range, unsigned long start,
46 unsigned long end)
47{
48 /* out of slots */
49 if (nr_range >= RANGE_NUM)
50 return nr_range;
51
52 range[nr_range].start = start;
53 range[nr_range].end = end;
54
55 nr_range++;
56
57 return nr_range;
58}
59
60static int __init
61add_range_with_merge(struct res_range *range, int nr_range, unsigned long start,
62 unsigned long end)
63{
64 int i;
65
66 /* try to merge it with old one */
67 for (i = 0; i < nr_range; i++) {
68 unsigned long final_start, final_end;
69 unsigned long common_start, common_end;
70
71 if (!range[i].end)
72 continue;
73
74 common_start = max(range[i].start, start);
75 common_end = min(range[i].end, end);
76 if (common_start > common_end + 1)
77 continue;
78
79 final_start = min(range[i].start, start);
80 final_end = max(range[i].end, end);
81
82 range[i].start = final_start;
83 range[i].end = final_end;
84 return nr_range;
85 }
86
87 /* need to add that */
88 return add_range(range, nr_range, start, end);
89}
90
91static void __init
92subtract_range(struct res_range *range, unsigned long start, unsigned long end)
93{
94 int i, j;
95
96 for (j = 0; j < RANGE_NUM; j++) {
97 if (!range[j].end)
98 continue;
99
100 if (start <= range[j].start && end >= range[j].end) {
101 range[j].start = 0;
102 range[j].end = 0;
103 continue;
104 }
105
106 if (start <= range[j].start && end < range[j].end &&
107 range[j].start < end + 1) {
108 range[j].start = end + 1;
109 continue;
110 }
111
112
113 if (start > range[j].start && end >= range[j].end &&
114 range[j].end > start - 1) {
115 range[j].end = start - 1;
116 continue;
117 }
118
119 if (start > range[j].start && end < range[j].end) {
120 /* find the new spare */
121 for (i = 0; i < RANGE_NUM; i++) {
122 if (range[i].end == 0)
123 break;
124 }
125 if (i < RANGE_NUM) {
126 range[i].end = range[j].end;
127 range[i].start = end + 1;
128 } else {
129 printk(KERN_ERR "run of slot in ranges\n");
130 }
131 range[j].end = start - 1;
132 continue;
133 }
134 }
135}
136
137static int __init cmp_range(const void *x1, const void *x2)
138{
139 const struct res_range *r1 = x1;
140 const struct res_range *r2 = x2;
141 long start1, start2;
142
143 start1 = r1->start;
144 start2 = r2->start;
145
146 return start1 - start2;
147}
148
149struct var_mtrr_range_state {
150 unsigned long base_pfn;
151 unsigned long size_pfn;
152 mtrr_type type;
153};
154
155static struct var_mtrr_range_state __initdata range_state[RANGE_NUM];
156static int __initdata debug_print;
157
158static int __init
159x86_get_mtrr_mem_range(struct res_range *range, int nr_range,
160 unsigned long extra_remove_base,
161 unsigned long extra_remove_size)
162{
163 unsigned long base, size;
164 mtrr_type type;
165 int i;
166
167 for (i = 0; i < num_var_ranges; i++) {
168 type = range_state[i].type;
169 if (type != MTRR_TYPE_WRBACK)
170 continue;
171 base = range_state[i].base_pfn;
172 size = range_state[i].size_pfn;
173 nr_range = add_range_with_merge(range, nr_range, base,
174 base + size - 1);
175 }
176 if (debug_print) {
177 printk(KERN_DEBUG "After WB checking\n");
178 for (i = 0; i < nr_range; i++)
179 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
180 range[i].start, range[i].end + 1);
181 }
182
183 /* take out UC ranges */
184 for (i = 0; i < num_var_ranges; i++) {
185 type = range_state[i].type;
186 if (type != MTRR_TYPE_UNCACHABLE &&
187 type != MTRR_TYPE_WRPROT)
188 continue;
189 size = range_state[i].size_pfn;
190 if (!size)
191 continue;
192 base = range_state[i].base_pfn;
193 if (base < (1<<(20-PAGE_SHIFT)) && mtrr_state.have_fixed &&
194 (mtrr_state.enabled & 1)) {
195 /* Var MTRR contains UC entry below 1M? Skip it: */
196 printk(KERN_WARNING "WARNING: BIOS bug: VAR MTRR %d "
197 "contains strange UC entry under 1M, check "
198 "with your system vendor!\n", i);
199 if (base + size <= (1<<(20-PAGE_SHIFT)))
200 continue;
201 size -= (1<<(20-PAGE_SHIFT)) - base;
202 base = 1<<(20-PAGE_SHIFT);
203 }
204 subtract_range(range, base, base + size - 1);
205 }
206 if (extra_remove_size)
207 subtract_range(range, extra_remove_base,
208 extra_remove_base + extra_remove_size - 1);
209
210 /* get new range num */
211 nr_range = 0;
212 for (i = 0; i < RANGE_NUM; i++) {
213 if (!range[i].end)
214 continue;
215 nr_range++;
216 }
217 if (debug_print) {
218 printk(KERN_DEBUG "After UC checking\n");
219 for (i = 0; i < nr_range; i++)
220 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
221 range[i].start, range[i].end + 1);
222 }
223
224 /* sort the ranges */
225 sort(range, nr_range, sizeof(struct res_range), cmp_range, NULL);
226 if (debug_print) {
227 printk(KERN_DEBUG "After sorting\n");
228 for (i = 0; i < nr_range; i++)
229 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
230 range[i].start, range[i].end + 1);
231 }
232
233 /* clear those is not used */
234 for (i = nr_range; i < RANGE_NUM; i++)
235 memset(&range[i], 0, sizeof(range[i]));
236
237 return nr_range;
238}
239
240static struct res_range __initdata range[RANGE_NUM];
241static int __initdata nr_range;
242
243#ifdef CONFIG_MTRR_SANITIZER
244
245static unsigned long __init sum_ranges(struct res_range *range, int nr_range)
246{
247 unsigned long sum;
248 int i;
249
250 sum = 0;
251 for (i = 0; i < nr_range; i++)
252 sum += range[i].end + 1 - range[i].start;
253
254 return sum;
255}
256
257static int enable_mtrr_cleanup __initdata =
258 CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT;
259
260static int __init disable_mtrr_cleanup_setup(char *str)
261{
262 enable_mtrr_cleanup = 0;
263 return 0;
264}
265early_param("disable_mtrr_cleanup", disable_mtrr_cleanup_setup);
266
267static int __init enable_mtrr_cleanup_setup(char *str)
268{
269 enable_mtrr_cleanup = 1;
270 return 0;
271}
272early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup);
273
274static int __init mtrr_cleanup_debug_setup(char *str)
275{
276 debug_print = 1;
277 return 0;
278}
279early_param("mtrr_cleanup_debug", mtrr_cleanup_debug_setup);
280
281struct var_mtrr_state {
282 unsigned long range_startk;
283 unsigned long range_sizek;
284 unsigned long chunk_sizek;
285 unsigned long gran_sizek;
286 unsigned int reg;
287};
288
289static void __init
290set_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek,
291 unsigned char type, unsigned int address_bits)
292{
293 u32 base_lo, base_hi, mask_lo, mask_hi;
294 u64 base, mask;
295
296 if (!sizek) {
297 fill_mtrr_var_range(reg, 0, 0, 0, 0);
298 return;
299 }
300
301 mask = (1ULL << address_bits) - 1;
302 mask &= ~((((u64)sizek) << 10) - 1);
303
304 base = ((u64)basek) << 10;
305
306 base |= type;
307 mask |= 0x800;
308
309 base_lo = base & ((1ULL<<32) - 1);
310 base_hi = base >> 32;
311
312 mask_lo = mask & ((1ULL<<32) - 1);
313 mask_hi = mask >> 32;
314
315 fill_mtrr_var_range(reg, base_lo, base_hi, mask_lo, mask_hi);
316}
317
318static void __init
319save_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek,
320 unsigned char type)
321{
322 range_state[reg].base_pfn = basek >> (PAGE_SHIFT - 10);
323 range_state[reg].size_pfn = sizek >> (PAGE_SHIFT - 10);
324 range_state[reg].type = type;
325}
326
327static void __init
328set_var_mtrr_all(unsigned int address_bits)
329{
330 unsigned long basek, sizek;
331 unsigned char type;
332 unsigned int reg;
333
334 for (reg = 0; reg < num_var_ranges; reg++) {
335 basek = range_state[reg].base_pfn << (PAGE_SHIFT - 10);
336 sizek = range_state[reg].size_pfn << (PAGE_SHIFT - 10);
337 type = range_state[reg].type;
338
339 set_var_mtrr(reg, basek, sizek, type, address_bits);
340 }
341}
342
343static unsigned long to_size_factor(unsigned long sizek, char *factorp)
344{
345 char factor;
346 unsigned long base = sizek;
347
348 if (base & ((1<<10) - 1)) {
349 /* not MB alignment */
350 factor = 'K';
351 } else if (base & ((1<<20) - 1)) {
352 factor = 'M';
353 base >>= 10;
354 } else {
355 factor = 'G';
356 base >>= 20;
357 }
358
359 *factorp = factor;
360
361 return base;
362}
363
364static unsigned int __init
365range_to_mtrr(unsigned int reg, unsigned long range_startk,
366 unsigned long range_sizek, unsigned char type)
367{
368 if (!range_sizek || (reg >= num_var_ranges))
369 return reg;
370
371 while (range_sizek) {
372 unsigned long max_align, align;
373 unsigned long sizek;
374
375 /* Compute the maximum size I can make a range */
376 if (range_startk)
377 max_align = ffs(range_startk) - 1;
378 else
379 max_align = 32;
380 align = fls(range_sizek) - 1;
381 if (align > max_align)
382 align = max_align;
383
384 sizek = 1 << align;
385 if (debug_print) {
386 char start_factor = 'K', size_factor = 'K';
387 unsigned long start_base, size_base;
388
389 start_base = to_size_factor(range_startk,
390 &start_factor),
391 size_base = to_size_factor(sizek, &size_factor),
392
393 printk(KERN_DEBUG "Setting variable MTRR %d, "
394 "base: %ld%cB, range: %ld%cB, type %s\n",
395 reg, start_base, start_factor,
396 size_base, size_factor,
397 (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
398 ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other")
399 );
400 }
401 save_var_mtrr(reg++, range_startk, sizek, type);
402 range_startk += sizek;
403 range_sizek -= sizek;
404 if (reg >= num_var_ranges)
405 break;
406 }
407 return reg;
408}
409
410static unsigned __init
411range_to_mtrr_with_hole(struct var_mtrr_state *state, unsigned long basek,
412 unsigned long sizek)
413{
414 unsigned long hole_basek, hole_sizek;
415 unsigned long second_basek, second_sizek;
416 unsigned long range0_basek, range0_sizek;
417 unsigned long range_basek, range_sizek;
418 unsigned long chunk_sizek;
419 unsigned long gran_sizek;
420
421 hole_basek = 0;
422 hole_sizek = 0;
423 second_basek = 0;
424 second_sizek = 0;
425 chunk_sizek = state->chunk_sizek;
426 gran_sizek = state->gran_sizek;
427
428 /* align with gran size, prevent small block used up MTRRs */
429 range_basek = ALIGN(state->range_startk, gran_sizek);
430 if ((range_basek > basek) && basek)
431 return second_sizek;
432 state->range_sizek -= (range_basek - state->range_startk);
433 range_sizek = ALIGN(state->range_sizek, gran_sizek);
434
435 while (range_sizek > state->range_sizek) {
436 range_sizek -= gran_sizek;
437 if (!range_sizek)
438 return 0;
439 }
440 state->range_sizek = range_sizek;
441
442 /* try to append some small hole */
443 range0_basek = state->range_startk;
444 range0_sizek = ALIGN(state->range_sizek, chunk_sizek);
445
446 /* no increase */
447 if (range0_sizek == state->range_sizek) {
448 if (debug_print)
449 printk(KERN_DEBUG "rangeX: %016lx - %016lx\n",
450 range0_basek<<10,
451 (range0_basek + state->range_sizek)<<10);
452 state->reg = range_to_mtrr(state->reg, range0_basek,
453 state->range_sizek, MTRR_TYPE_WRBACK);
454 return 0;
455 }
456
457 /* only cut back, when it is not the last */
458 if (sizek) {
459 while (range0_basek + range0_sizek > (basek + sizek)) {
460 if (range0_sizek >= chunk_sizek)
461 range0_sizek -= chunk_sizek;
462 else
463 range0_sizek = 0;
464
465 if (!range0_sizek)
466 break;
467 }
468 }
469
470second_try:
471 range_basek = range0_basek + range0_sizek;
472
473 /* one hole in the middle */
474 if (range_basek > basek && range_basek <= (basek + sizek))
475 second_sizek = range_basek - basek;
476
477 if (range0_sizek > state->range_sizek) {
478
479 /* one hole in middle or at end */
480 hole_sizek = range0_sizek - state->range_sizek - second_sizek;
481
482 /* hole size should be less than half of range0 size */
483 if (hole_sizek >= (range0_sizek >> 1) &&
484 range0_sizek >= chunk_sizek) {
485 range0_sizek -= chunk_sizek;
486 second_sizek = 0;
487 hole_sizek = 0;
488
489 goto second_try;
490 }
491 }
492
493 if (range0_sizek) {
494 if (debug_print)
495 printk(KERN_DEBUG "range0: %016lx - %016lx\n",
496 range0_basek<<10,
497 (range0_basek + range0_sizek)<<10);
498 state->reg = range_to_mtrr(state->reg, range0_basek,
499 range0_sizek, MTRR_TYPE_WRBACK);
500 }
501
502 if (range0_sizek < state->range_sizek) {
503 /* need to handle left over */
504 range_sizek = state->range_sizek - range0_sizek;
505
506 if (debug_print)
507 printk(KERN_DEBUG "range: %016lx - %016lx\n",
508 range_basek<<10,
509 (range_basek + range_sizek)<<10);
510 state->reg = range_to_mtrr(state->reg, range_basek,
511 range_sizek, MTRR_TYPE_WRBACK);
512 }
513
514 if (hole_sizek) {
515 hole_basek = range_basek - hole_sizek - second_sizek;
516 if (debug_print)
517 printk(KERN_DEBUG "hole: %016lx - %016lx\n",
518 hole_basek<<10,
519 (hole_basek + hole_sizek)<<10);
520 state->reg = range_to_mtrr(state->reg, hole_basek,
521 hole_sizek, MTRR_TYPE_UNCACHABLE);
522 }
523
524 return second_sizek;
525}
526
527static void __init
528set_var_mtrr_range(struct var_mtrr_state *state, unsigned long base_pfn,
529 unsigned long size_pfn)
530{
531 unsigned long basek, sizek;
532 unsigned long second_sizek = 0;
533
534 if (state->reg >= num_var_ranges)
535 return;
536
537 basek = base_pfn << (PAGE_SHIFT - 10);
538 sizek = size_pfn << (PAGE_SHIFT - 10);
539
540 /* See if I can merge with the last range */
541 if ((basek <= 1024) ||
542 (state->range_startk + state->range_sizek == basek)) {
543 unsigned long endk = basek + sizek;
544 state->range_sizek = endk - state->range_startk;
545 return;
546 }
547 /* Write the range mtrrs */
548 if (state->range_sizek != 0)
549 second_sizek = range_to_mtrr_with_hole(state, basek, sizek);
550
551 /* Allocate an msr */
552 state->range_startk = basek + second_sizek;
553 state->range_sizek = sizek - second_sizek;
554}
555
556/* mininum size of mtrr block that can take hole */
557static u64 mtrr_chunk_size __initdata = (256ULL<<20);
558
559static int __init parse_mtrr_chunk_size_opt(char *p)
560{
561 if (!p)
562 return -EINVAL;
563 mtrr_chunk_size = memparse(p, &p);
564 return 0;
565}
566early_param("mtrr_chunk_size", parse_mtrr_chunk_size_opt);
567
568/* granity of mtrr of block */
569static u64 mtrr_gran_size __initdata;
570
571static int __init parse_mtrr_gran_size_opt(char *p)
572{
573 if (!p)
574 return -EINVAL;
575 mtrr_gran_size = memparse(p, &p);
576 return 0;
577}
578early_param("mtrr_gran_size", parse_mtrr_gran_size_opt);
579
580static int nr_mtrr_spare_reg __initdata =
581 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT;
582
583static int __init parse_mtrr_spare_reg(char *arg)
584{
585 if (arg)
586 nr_mtrr_spare_reg = simple_strtoul(arg, NULL, 0);
587 return 0;
588}
589
590early_param("mtrr_spare_reg_nr", parse_mtrr_spare_reg);
591
592static int __init
593x86_setup_var_mtrrs(struct res_range *range, int nr_range,
594 u64 chunk_size, u64 gran_size)
595{
596 struct var_mtrr_state var_state;
597 int i;
598 int num_reg;
599
600 var_state.range_startk = 0;
601 var_state.range_sizek = 0;
602 var_state.reg = 0;
603 var_state.chunk_sizek = chunk_size >> 10;
604 var_state.gran_sizek = gran_size >> 10;
605
606 memset(range_state, 0, sizeof(range_state));
607
608 /* Write the range etc */
609 for (i = 0; i < nr_range; i++)
610 set_var_mtrr_range(&var_state, range[i].start,
611 range[i].end - range[i].start + 1);
612
613 /* Write the last range */
614 if (var_state.range_sizek != 0)
615 range_to_mtrr_with_hole(&var_state, 0, 0);
616
617 num_reg = var_state.reg;
618 /* Clear out the extra MTRR's */
619 while (var_state.reg < num_var_ranges) {
620 save_var_mtrr(var_state.reg, 0, 0, 0);
621 var_state.reg++;
622 }
623
624 return num_reg;
625}
626
627struct mtrr_cleanup_result {
628 unsigned long gran_sizek;
629 unsigned long chunk_sizek;
630 unsigned long lose_cover_sizek;
631 unsigned int num_reg;
632 int bad;
633};
634
635/*
636 * gran_size: 64K, 128K, 256K, 512K, 1M, 2M, ..., 2G
637 * chunk size: gran_size, ..., 2G
638 * so we need (1+16)*8
639 */
640#define NUM_RESULT 136
641#define PSHIFT (PAGE_SHIFT - 10)
642
643static struct mtrr_cleanup_result __initdata result[NUM_RESULT];
644static unsigned long __initdata min_loss_pfn[RANGE_NUM];
645
646static void __init print_out_mtrr_range_state(void)
647{
648 int i;
649 char start_factor = 'K', size_factor = 'K';
650 unsigned long start_base, size_base;
651 mtrr_type type;
652
653 for (i = 0; i < num_var_ranges; i++) {
654
655 size_base = range_state[i].size_pfn << (PAGE_SHIFT - 10);
656 if (!size_base)
657 continue;
658
659 size_base = to_size_factor(size_base, &size_factor),
660 start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
661 start_base = to_size_factor(start_base, &start_factor),
662 type = range_state[i].type;
663
664 printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
665 i, start_base, start_factor,
666 size_base, size_factor,
667 (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
668 ((type == MTRR_TYPE_WRPROT) ? "WP" :
669 ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
670 );
671 }
672}
673
674static int __init mtrr_need_cleanup(void)
675{
676 int i;
677 mtrr_type type;
678 unsigned long size;
679 /* extra one for all 0 */
680 int num[MTRR_NUM_TYPES + 1];
681
682 /* check entries number */
683 memset(num, 0, sizeof(num));
684 for (i = 0; i < num_var_ranges; i++) {
685 type = range_state[i].type;
686 size = range_state[i].size_pfn;
687 if (type >= MTRR_NUM_TYPES)
688 continue;
689 if (!size)
690 type = MTRR_NUM_TYPES;
691 if (type == MTRR_TYPE_WRPROT)
692 type = MTRR_TYPE_UNCACHABLE;
693 num[type]++;
694 }
695
696 /* check if we got UC entries */
697 if (!num[MTRR_TYPE_UNCACHABLE])
698 return 0;
699
700 /* check if we only had WB and UC */
701 if (num[MTRR_TYPE_WRBACK] + num[MTRR_TYPE_UNCACHABLE] !=
702 num_var_ranges - num[MTRR_NUM_TYPES])
703 return 0;
704
705 return 1;
706}
707
708static unsigned long __initdata range_sums;
709static void __init mtrr_calc_range_state(u64 chunk_size, u64 gran_size,
710 unsigned long extra_remove_base,
711 unsigned long extra_remove_size,
712 int i)
713{
714 int num_reg;
715 static struct res_range range_new[RANGE_NUM];
716 static int nr_range_new;
717 unsigned long range_sums_new;
718
719 /* convert ranges to var ranges state */
720 num_reg = x86_setup_var_mtrrs(range, nr_range,
721 chunk_size, gran_size);
722
723 /* we got new setting in range_state, check it */
724 memset(range_new, 0, sizeof(range_new));
725 nr_range_new = x86_get_mtrr_mem_range(range_new, 0,
726 extra_remove_base, extra_remove_size);
727 range_sums_new = sum_ranges(range_new, nr_range_new);
728
729 result[i].chunk_sizek = chunk_size >> 10;
730 result[i].gran_sizek = gran_size >> 10;
731 result[i].num_reg = num_reg;
732 if (range_sums < range_sums_new) {
733 result[i].lose_cover_sizek =
734 (range_sums_new - range_sums) << PSHIFT;
735 result[i].bad = 1;
736 } else
737 result[i].lose_cover_sizek =
738 (range_sums - range_sums_new) << PSHIFT;
739
740 /* double check it */
741 if (!result[i].bad && !result[i].lose_cover_sizek) {
742 if (nr_range_new != nr_range ||
743 memcmp(range, range_new, sizeof(range)))
744 result[i].bad = 1;
745 }
746
747 if (!result[i].bad && (range_sums - range_sums_new <
748 min_loss_pfn[num_reg])) {
749 min_loss_pfn[num_reg] =
750 range_sums - range_sums_new;
751 }
752}
753
754static void __init mtrr_print_out_one_result(int i)
755{
756 char gran_factor, chunk_factor, lose_factor;
757 unsigned long gran_base, chunk_base, lose_base;
758
759 gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
760 chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
761 lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
762 printk(KERN_INFO "%sgran_size: %ld%c \tchunk_size: %ld%c \t",
763 result[i].bad ? "*BAD*" : " ",
764 gran_base, gran_factor, chunk_base, chunk_factor);
765 printk(KERN_CONT "num_reg: %d \tlose cover RAM: %s%ld%c\n",
766 result[i].num_reg, result[i].bad ? "-" : "",
767 lose_base, lose_factor);
768}
769
770static int __init mtrr_search_optimal_index(void)
771{
772 int i;
773 int num_reg_good;
774 int index_good;
775
776 if (nr_mtrr_spare_reg >= num_var_ranges)
777 nr_mtrr_spare_reg = num_var_ranges - 1;
778 num_reg_good = -1;
779 for (i = num_var_ranges - nr_mtrr_spare_reg; i > 0; i--) {
780 if (!min_loss_pfn[i])
781 num_reg_good = i;
782 }
783
784 index_good = -1;
785 if (num_reg_good != -1) {
786 for (i = 0; i < NUM_RESULT; i++) {
787 if (!result[i].bad &&
788 result[i].num_reg == num_reg_good &&
789 !result[i].lose_cover_sizek) {
790 index_good = i;
791 break;
792 }
793 }
794 }
795
796 return index_good;
797}
798
799
800int __init mtrr_cleanup(unsigned address_bits)
801{
802 unsigned long extra_remove_base, extra_remove_size;
803 unsigned long base, size, def, dummy;
804 mtrr_type type;
805 u64 chunk_size, gran_size;
806 int index_good;
807 int i;
808
809 if (!is_cpu(INTEL) || enable_mtrr_cleanup < 1)
810 return 0;
811 rdmsr(MTRRdefType_MSR, def, dummy);
812 def &= 0xff;
813 if (def != MTRR_TYPE_UNCACHABLE)
814 return 0;
815
816 /* get it and store it aside */
817 memset(range_state, 0, sizeof(range_state));
818 for (i = 0; i < num_var_ranges; i++) {
819 mtrr_if->get(i, &base, &size, &type);
820 range_state[i].base_pfn = base;
821 range_state[i].size_pfn = size;
822 range_state[i].type = type;
823 }
824
825 /* check if we need handle it and can handle it */
826 if (!mtrr_need_cleanup())
827 return 0;
828
829 /* print original var MTRRs at first, for debugging: */
830 printk(KERN_DEBUG "original variable MTRRs\n");
831 print_out_mtrr_range_state();
832
833 memset(range, 0, sizeof(range));
834 extra_remove_size = 0;
835 extra_remove_base = 1 << (32 - PAGE_SHIFT);
836 if (mtrr_tom2)
837 extra_remove_size =
838 (mtrr_tom2 >> PAGE_SHIFT) - extra_remove_base;
839 nr_range = x86_get_mtrr_mem_range(range, 0, extra_remove_base,
840 extra_remove_size);
841 /*
842 * [0, 1M) should always be coverred by var mtrr with WB
843 * and fixed mtrrs should take effective before var mtrr for it
844 */
845 nr_range = add_range_with_merge(range, nr_range, 0,
846 (1ULL<<(20 - PAGE_SHIFT)) - 1);
847 /* sort the ranges */
848 sort(range, nr_range, sizeof(struct res_range), cmp_range, NULL);
849
850 range_sums = sum_ranges(range, nr_range);
851 printk(KERN_INFO "total RAM coverred: %ldM\n",
852 range_sums >> (20 - PAGE_SHIFT));
853
854 if (mtrr_chunk_size && mtrr_gran_size) {
855 i = 0;
856 mtrr_calc_range_state(mtrr_chunk_size, mtrr_gran_size,
857 extra_remove_base, extra_remove_size, i);
858
859 mtrr_print_out_one_result(i);
860
861 if (!result[i].bad) {
862 set_var_mtrr_all(address_bits);
863 printk(KERN_DEBUG "New variable MTRRs\n");
864 print_out_mtrr_range_state();
865 return 1;
866 }
867 printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, "
868 "will find optimal one\n");
869 }
870
871 i = 0;
872 memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn));
873 memset(result, 0, sizeof(result));
874 for (gran_size = (1ULL<<16); gran_size < (1ULL<<32); gran_size <<= 1) {
875
876 for (chunk_size = gran_size; chunk_size < (1ULL<<32);
877 chunk_size <<= 1) {
878
879 if (i >= NUM_RESULT)
880 continue;
881
882 mtrr_calc_range_state(chunk_size, gran_size,
883 extra_remove_base, extra_remove_size, i);
884 if (debug_print) {
885 mtrr_print_out_one_result(i);
886 printk(KERN_INFO "\n");
887 }
888
889 i++;
890 }
891 }
892
893 /* try to find the optimal index */
894 index_good = mtrr_search_optimal_index();
895
896 if (index_good != -1) {
897 printk(KERN_INFO "Found optimal setting for mtrr clean up\n");
898 i = index_good;
899 mtrr_print_out_one_result(i);
900
901 /* convert ranges to var ranges state */
902 chunk_size = result[i].chunk_sizek;
903 chunk_size <<= 10;
904 gran_size = result[i].gran_sizek;
905 gran_size <<= 10;
906 x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size);
907 set_var_mtrr_all(address_bits);
908 printk(KERN_DEBUG "New variable MTRRs\n");
909 print_out_mtrr_range_state();
910 return 1;
911 } else {
912 /* print out all */
913 for (i = 0; i < NUM_RESULT; i++)
914 mtrr_print_out_one_result(i);
915 }
916
917 printk(KERN_INFO "mtrr_cleanup: can not find optimal value\n");
918 printk(KERN_INFO "please specify mtrr_gran_size/mtrr_chunk_size\n");
919
920 return 0;
921}
922#else
923int __init mtrr_cleanup(unsigned address_bits)
924{
925 return 0;
926}
927#endif
928
929static int disable_mtrr_trim;
930
931static int __init disable_mtrr_trim_setup(char *str)
932{
933 disable_mtrr_trim = 1;
934 return 0;
935}
936early_param("disable_mtrr_trim", disable_mtrr_trim_setup);
937
938/*
939 * Newer AMD K8s and later CPUs have a special magic MSR way to force WB
940 * for memory >4GB. Check for that here.
941 * Note this won't check if the MTRRs < 4GB where the magic bit doesn't
942 * apply to are wrong, but so far we don't know of any such case in the wild.
943 */
944#define Tom2Enabled (1U << 21)
945#define Tom2ForceMemTypeWB (1U << 22)
946
947int __init amd_special_default_mtrr(void)
948{
949 u32 l, h;
950
951 if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
952 return 0;
953 if (boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x11)
954 return 0;
955 /* In case some hypervisor doesn't pass SYSCFG through */
956 if (rdmsr_safe(MSR_K8_SYSCFG, &l, &h) < 0)
957 return 0;
958 /*
959 * Memory between 4GB and top of mem is forced WB by this magic bit.
960 * Reserved before K8RevF, but should be zero there.
961 */
962 if ((l & (Tom2Enabled | Tom2ForceMemTypeWB)) ==
963 (Tom2Enabled | Tom2ForceMemTypeWB))
964 return 1;
965 return 0;
966}
967
968static u64 __init real_trim_memory(unsigned long start_pfn,
969 unsigned long limit_pfn)
970{
971 u64 trim_start, trim_size;
972 trim_start = start_pfn;
973 trim_start <<= PAGE_SHIFT;
974 trim_size = limit_pfn;
975 trim_size <<= PAGE_SHIFT;
976 trim_size -= trim_start;
977
978 return e820_update_range(trim_start, trim_size, E820_RAM,
979 E820_RESERVED);
980}
981/**
982 * mtrr_trim_uncached_memory - trim RAM not covered by MTRRs
983 * @end_pfn: ending page frame number
984 *
985 * Some buggy BIOSes don't setup the MTRRs properly for systems with certain
986 * memory configurations. This routine checks that the highest MTRR matches
987 * the end of memory, to make sure the MTRRs having a write back type cover
988 * all of the memory the kernel is intending to use. If not, it'll trim any
989 * memory off the end by adjusting end_pfn, removing it from the kernel's
990 * allocation pools, warning the user with an obnoxious message.
991 */
992int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
993{
994 unsigned long i, base, size, highest_pfn = 0, def, dummy;
995 mtrr_type type;
996 u64 total_trim_size;
997
998 /* extra one for all 0 */
999 int num[MTRR_NUM_TYPES + 1];
1000 /*
1001 * Make sure we only trim uncachable memory on machines that
1002 * support the Intel MTRR architecture:
1003 */
1004 if (!is_cpu(INTEL) || disable_mtrr_trim)
1005 return 0;
1006 rdmsr(MTRRdefType_MSR, def, dummy);
1007 def &= 0xff;
1008 if (def != MTRR_TYPE_UNCACHABLE)
1009 return 0;
1010
1011 /* get it and store it aside */
1012 memset(range_state, 0, sizeof(range_state));
1013 for (i = 0; i < num_var_ranges; i++) {
1014 mtrr_if->get(i, &base, &size, &type);
1015 range_state[i].base_pfn = base;
1016 range_state[i].size_pfn = size;
1017 range_state[i].type = type;
1018 }
1019
1020 /* Find highest cached pfn */
1021 for (i = 0; i < num_var_ranges; i++) {
1022 type = range_state[i].type;
1023 if (type != MTRR_TYPE_WRBACK)
1024 continue;
1025 base = range_state[i].base_pfn;
1026 size = range_state[i].size_pfn;
1027 if (highest_pfn < base + size)
1028 highest_pfn = base + size;
1029 }
1030
1031 /* kvm/qemu doesn't have mtrr set right, don't trim them all */
1032 if (!highest_pfn) {
1033 printk(KERN_INFO "CPU MTRRs all blank - virtualized system.\n");
1034 return 0;
1035 }
1036
1037 /* check entries number */
1038 memset(num, 0, sizeof(num));
1039 for (i = 0; i < num_var_ranges; i++) {
1040 type = range_state[i].type;
1041 if (type >= MTRR_NUM_TYPES)
1042 continue;
1043 size = range_state[i].size_pfn;
1044 if (!size)
1045 type = MTRR_NUM_TYPES;
1046 num[type]++;
1047 }
1048
1049 /* no entry for WB? */
1050 if (!num[MTRR_TYPE_WRBACK])
1051 return 0;
1052
1053 /* check if we only had WB and UC */
1054 if (num[MTRR_TYPE_WRBACK] + num[MTRR_TYPE_UNCACHABLE] !=
1055 num_var_ranges - num[MTRR_NUM_TYPES])
1056 return 0;
1057
1058 memset(range, 0, sizeof(range));
1059 nr_range = 0;
1060 if (mtrr_tom2) {
1061 range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT));
1062 range[nr_range].end = (mtrr_tom2 >> PAGE_SHIFT) - 1;
1063 if (highest_pfn < range[nr_range].end + 1)
1064 highest_pfn = range[nr_range].end + 1;
1065 nr_range++;
1066 }
1067 nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0);
1068
1069 total_trim_size = 0;
1070 /* check the head */
1071 if (range[0].start)
1072 total_trim_size += real_trim_memory(0, range[0].start);
1073 /* check the holes */
1074 for (i = 0; i < nr_range - 1; i++) {
1075 if (range[i].end + 1 < range[i+1].start)
1076 total_trim_size += real_trim_memory(range[i].end + 1,
1077 range[i+1].start);
1078 }
1079 /* check the top */
1080 i = nr_range - 1;
1081 if (range[i].end + 1 < end_pfn)
1082 total_trim_size += real_trim_memory(range[i].end + 1,
1083 end_pfn);
1084
1085 if (total_trim_size) {
1086 printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
1087 " all of memory, losing %lluMB of RAM.\n",
1088 total_trim_size >> 20);
1089
1090 if (!changed_by_mtrr_cleanup)
1091 WARN_ON(1);
1092
1093 printk(KERN_INFO "update e820 for mtrr\n");
1094 update_e820();
1095
1096 return 1;
1097 }
1098
1099 return 0;
1100}
1101
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
index 0c0a455fe95c..0b776c09aff3 100644
--- a/arch/x86/kernel/cpu/mtrr/generic.c
+++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -33,13 +33,31 @@ u64 mtrr_tom2;
33struct mtrr_state_type mtrr_state = {}; 33struct mtrr_state_type mtrr_state = {};
34EXPORT_SYMBOL_GPL(mtrr_state); 34EXPORT_SYMBOL_GPL(mtrr_state);
35 35
36static int __initdata mtrr_show; 36/**
37static int __init mtrr_debug(char *opt) 37 * BIOS is expected to clear MtrrFixDramModEn bit, see for example
38 * "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD
39 * Opteron Processors" (26094 Rev. 3.30 February 2006), section
40 * "13.2.1.2 SYSCFG Register": "The MtrrFixDramModEn bit should be set
41 * to 1 during BIOS initalization of the fixed MTRRs, then cleared to
42 * 0 for operation."
43 */
44static inline void k8_check_syscfg_dram_mod_en(void)
38{ 45{
39 mtrr_show = 1; 46 u32 lo, hi;
40 return 0; 47
48 if (!((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
49 (boot_cpu_data.x86 >= 0x0f)))
50 return;
51
52 rdmsr(MSR_K8_SYSCFG, lo, hi);
53 if (lo & K8_MTRRFIXRANGE_DRAM_MODIFY) {
54 printk(KERN_ERR FW_WARN "MTRR: CPU %u: SYSCFG[MtrrFixDramModEn]"
55 " not cleared by BIOS, clearing this bit\n",
56 smp_processor_id());
57 lo &= ~K8_MTRRFIXRANGE_DRAM_MODIFY;
58 mtrr_wrmsr(MSR_K8_SYSCFG, lo, hi);
59 }
41} 60}
42early_param("mtrr.show", mtrr_debug);
43 61
44/* 62/*
45 * Returns the effective MTRR type for the region 63 * Returns the effective MTRR type for the region
@@ -174,6 +192,8 @@ get_fixed_ranges(mtrr_type * frs)
174 unsigned int *p = (unsigned int *) frs; 192 unsigned int *p = (unsigned int *) frs;
175 int i; 193 int i;
176 194
195 k8_check_syscfg_dram_mod_en();
196
177 rdmsr(MTRRfix64K_00000_MSR, p[0], p[1]); 197 rdmsr(MTRRfix64K_00000_MSR, p[0], p[1]);
178 198
179 for (i = 0; i < 2; i++) 199 for (i = 0; i < 2; i++)
@@ -188,18 +208,94 @@ void mtrr_save_fixed_ranges(void *info)
188 get_fixed_ranges(mtrr_state.fixed_ranges); 208 get_fixed_ranges(mtrr_state.fixed_ranges);
189} 209}
190 210
191static void print_fixed(unsigned base, unsigned step, const mtrr_type*types) 211static unsigned __initdata last_fixed_start;
212static unsigned __initdata last_fixed_end;
213static mtrr_type __initdata last_fixed_type;
214
215static void __init print_fixed_last(void)
216{
217 if (!last_fixed_end)
218 return;
219
220 printk(KERN_DEBUG " %05X-%05X %s\n", last_fixed_start,
221 last_fixed_end - 1, mtrr_attrib_to_str(last_fixed_type));
222
223 last_fixed_end = 0;
224}
225
226static void __init update_fixed_last(unsigned base, unsigned end,
227 mtrr_type type)
228{
229 last_fixed_start = base;
230 last_fixed_end = end;
231 last_fixed_type = type;
232}
233
234static void __init print_fixed(unsigned base, unsigned step,
235 const mtrr_type *types)
192{ 236{
193 unsigned i; 237 unsigned i;
194 238
195 for (i = 0; i < 8; ++i, ++types, base += step) 239 for (i = 0; i < 8; ++i, ++types, base += step) {
196 printk(KERN_INFO "MTRR %05X-%05X %s\n", 240 if (last_fixed_end == 0) {
197 base, base + step - 1, mtrr_attrib_to_str(*types)); 241 update_fixed_last(base, base + step, *types);
242 continue;
243 }
244 if (last_fixed_end == base && last_fixed_type == *types) {
245 last_fixed_end = base + step;
246 continue;
247 }
248 /* new segments: gap or different type */
249 print_fixed_last();
250 update_fixed_last(base, base + step, *types);
251 }
198} 252}
199 253
200static void prepare_set(void); 254static void prepare_set(void);
201static void post_set(void); 255static void post_set(void);
202 256
257static void __init print_mtrr_state(void)
258{
259 unsigned int i;
260 int high_width;
261
262 printk(KERN_DEBUG "MTRR default type: %s\n",
263 mtrr_attrib_to_str(mtrr_state.def_type));
264 if (mtrr_state.have_fixed) {
265 printk(KERN_DEBUG "MTRR fixed ranges %sabled:\n",
266 mtrr_state.enabled & 1 ? "en" : "dis");
267 print_fixed(0x00000, 0x10000, mtrr_state.fixed_ranges + 0);
268 for (i = 0; i < 2; ++i)
269 print_fixed(0x80000 + i * 0x20000, 0x04000, mtrr_state.fixed_ranges + (i + 1) * 8);
270 for (i = 0; i < 8; ++i)
271 print_fixed(0xC0000 + i * 0x08000, 0x01000, mtrr_state.fixed_ranges + (i + 3) * 8);
272
273 /* tail */
274 print_fixed_last();
275 }
276 printk(KERN_DEBUG "MTRR variable ranges %sabled:\n",
277 mtrr_state.enabled & 2 ? "en" : "dis");
278 high_width = ((size_or_mask ? ffs(size_or_mask) - 1 : 32) - (32 - PAGE_SHIFT) + 3) / 4;
279 for (i = 0; i < num_var_ranges; ++i) {
280 if (mtrr_state.var_ranges[i].mask_lo & (1 << 11))
281 printk(KERN_DEBUG " %u base %0*X%05X000 mask %0*X%05X000 %s\n",
282 i,
283 high_width,
284 mtrr_state.var_ranges[i].base_hi,
285 mtrr_state.var_ranges[i].base_lo >> 12,
286 high_width,
287 mtrr_state.var_ranges[i].mask_hi,
288 mtrr_state.var_ranges[i].mask_lo >> 12,
289 mtrr_attrib_to_str(mtrr_state.var_ranges[i].base_lo & 0xff));
290 else
291 printk(KERN_DEBUG " %u disabled\n", i);
292 }
293 if (mtrr_tom2) {
294 printk(KERN_DEBUG "TOM2: %016llx aka %lldM\n",
295 mtrr_tom2, mtrr_tom2>>20);
296 }
297}
298
203/* Grab all of the MTRR state for this CPU into *state */ 299/* Grab all of the MTRR state for this CPU into *state */
204void __init get_mtrr_state(void) 300void __init get_mtrr_state(void)
205{ 301{
@@ -231,41 +327,9 @@ void __init get_mtrr_state(void)
231 mtrr_tom2 |= low; 327 mtrr_tom2 |= low;
232 mtrr_tom2 &= 0xffffff800000ULL; 328 mtrr_tom2 &= 0xffffff800000ULL;
233 } 329 }
234 if (mtrr_show) { 330
235 int high_width; 331 print_mtrr_state();
236 332
237 printk(KERN_INFO "MTRR default type: %s\n", mtrr_attrib_to_str(mtrr_state.def_type));
238 if (mtrr_state.have_fixed) {
239 printk(KERN_INFO "MTRR fixed ranges %sabled:\n",
240 mtrr_state.enabled & 1 ? "en" : "dis");
241 print_fixed(0x00000, 0x10000, mtrr_state.fixed_ranges + 0);
242 for (i = 0; i < 2; ++i)
243 print_fixed(0x80000 + i * 0x20000, 0x04000, mtrr_state.fixed_ranges + (i + 1) * 8);
244 for (i = 0; i < 8; ++i)
245 print_fixed(0xC0000 + i * 0x08000, 0x01000, mtrr_state.fixed_ranges + (i + 3) * 8);
246 }
247 printk(KERN_INFO "MTRR variable ranges %sabled:\n",
248 mtrr_state.enabled & 2 ? "en" : "dis");
249 high_width = ((size_or_mask ? ffs(size_or_mask) - 1 : 32) - (32 - PAGE_SHIFT) + 3) / 4;
250 for (i = 0; i < num_var_ranges; ++i) {
251 if (mtrr_state.var_ranges[i].mask_lo & (1 << 11))
252 printk(KERN_INFO "MTRR %u base %0*X%05X000 mask %0*X%05X000 %s\n",
253 i,
254 high_width,
255 mtrr_state.var_ranges[i].base_hi,
256 mtrr_state.var_ranges[i].base_lo >> 12,
257 high_width,
258 mtrr_state.var_ranges[i].mask_hi,
259 mtrr_state.var_ranges[i].mask_lo >> 12,
260 mtrr_attrib_to_str(mtrr_state.var_ranges[i].base_lo & 0xff));
261 else
262 printk(KERN_INFO "MTRR %u disabled\n", i);
263 }
264 if (mtrr_tom2) {
265 printk(KERN_INFO "TOM2: %016llx aka %lldM\n",
266 mtrr_tom2, mtrr_tom2>>20);
267 }
268 }
269 mtrr_state_set = 1; 333 mtrr_state_set = 1;
270 334
271 /* PAT setup for BP. We need to go through sync steps here */ 335 /* PAT setup for BP. We need to go through sync steps here */
@@ -308,27 +372,10 @@ void mtrr_wrmsr(unsigned msr, unsigned a, unsigned b)
308} 372}
309 373
310/** 374/**
311 * Enable and allow read/write of extended fixed-range MTRR bits on K8 CPUs
312 * see AMD publication no. 24593, chapter 3.2.1 for more information
313 */
314static inline void k8_enable_fixed_iorrs(void)
315{
316 unsigned lo, hi;
317
318 rdmsr(MSR_K8_SYSCFG, lo, hi);
319 mtrr_wrmsr(MSR_K8_SYSCFG, lo
320 | K8_MTRRFIXRANGE_DRAM_ENABLE
321 | K8_MTRRFIXRANGE_DRAM_MODIFY, hi);
322}
323
324/**
325 * set_fixed_range - checks & updates a fixed-range MTRR if it differs from the value it should have 375 * set_fixed_range - checks & updates a fixed-range MTRR if it differs from the value it should have
326 * @msr: MSR address of the MTTR which should be checked and updated 376 * @msr: MSR address of the MTTR which should be checked and updated
327 * @changed: pointer which indicates whether the MTRR needed to be changed 377 * @changed: pointer which indicates whether the MTRR needed to be changed
328 * @msrwords: pointer to the MSR values which the MSR should have 378 * @msrwords: pointer to the MSR values which the MSR should have
329 *
330 * If K8 extentions are wanted, update the K8 SYSCFG MSR also.
331 * See AMD publication no. 24593, chapter 7.8.1, page 233 for more information.
332 */ 379 */
333static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords) 380static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
334{ 381{
@@ -337,10 +384,6 @@ static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
337 rdmsr(msr, lo, hi); 384 rdmsr(msr, lo, hi);
338 385
339 if (lo != msrwords[0] || hi != msrwords[1]) { 386 if (lo != msrwords[0] || hi != msrwords[1]) {
340 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
341 (boot_cpu_data.x86 >= 0x0f && boot_cpu_data.x86 <= 0x11) &&
342 ((msrwords[0] | msrwords[1]) & K8_MTRR_RDMEM_WRMEM_MASK))
343 k8_enable_fixed_iorrs();
344 mtrr_wrmsr(msr, msrwords[0], msrwords[1]); 387 mtrr_wrmsr(msr, msrwords[0], msrwords[1]);
345 *changed = true; 388 *changed = true;
346 } 389 }
@@ -376,22 +419,31 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
376{ 419{
377 unsigned int mask_lo, mask_hi, base_lo, base_hi; 420 unsigned int mask_lo, mask_hi, base_lo, base_hi;
378 unsigned int tmp, hi; 421 unsigned int tmp, hi;
422 int cpu;
423
424 /*
425 * get_mtrr doesn't need to update mtrr_state, also it could be called
426 * from any cpu, so try to print it out directly.
427 */
428 cpu = get_cpu();
379 429
380 rdmsr(MTRRphysMask_MSR(reg), mask_lo, mask_hi); 430 rdmsr(MTRRphysMask_MSR(reg), mask_lo, mask_hi);
431
381 if ((mask_lo & 0x800) == 0) { 432 if ((mask_lo & 0x800) == 0) {
382 /* Invalid (i.e. free) range */ 433 /* Invalid (i.e. free) range */
383 *base = 0; 434 *base = 0;
384 *size = 0; 435 *size = 0;
385 *type = 0; 436 *type = 0;
386 return; 437 goto out_put_cpu;
387 } 438 }
388 439
389 rdmsr(MTRRphysBase_MSR(reg), base_lo, base_hi); 440 rdmsr(MTRRphysBase_MSR(reg), base_lo, base_hi);
390 441
391 /* Work out the shifted address mask. */ 442 /* Work out the shifted address mask: */
392 tmp = mask_hi << (32 - PAGE_SHIFT) | mask_lo >> PAGE_SHIFT; 443 tmp = mask_hi << (32 - PAGE_SHIFT) | mask_lo >> PAGE_SHIFT;
393 mask_lo = size_or_mask | tmp; 444 mask_lo = size_or_mask | tmp;
394 /* Expand tmp with high bits to all 1s*/ 445
446 /* Expand tmp with high bits to all 1s: */
395 hi = fls(tmp); 447 hi = fls(tmp);
396 if (hi > 0) { 448 if (hi > 0) {
397 tmp |= ~((1<<(hi - 1)) - 1); 449 tmp |= ~((1<<(hi - 1)) - 1);
@@ -402,11 +454,16 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
402 } 454 }
403 } 455 }
404 456
405 /* This works correctly if size is a power of two, i.e. a 457 /*
406 contiguous range. */ 458 * This works correctly if size is a power of two, i.e. a
459 * contiguous range:
460 */
407 *size = -mask_lo; 461 *size = -mask_lo;
408 *base = base_hi << (32 - PAGE_SHIFT) | base_lo >> PAGE_SHIFT; 462 *base = base_hi << (32 - PAGE_SHIFT) | base_lo >> PAGE_SHIFT;
409 *type = base_lo & 0xff; 463 *type = base_lo & 0xff;
464
465out_put_cpu:
466 put_cpu();
410} 467}
411 468
412/** 469/**
@@ -419,6 +476,8 @@ static int set_fixed_ranges(mtrr_type * frs)
419 bool changed = false; 476 bool changed = false;
420 int block=-1, range; 477 int block=-1, range;
421 478
479 k8_check_syscfg_dram_mod_en();
480
422 while (fixed_range_blocks[++block].ranges) 481 while (fixed_range_blocks[++block].ranges)
423 for (range=0; range < fixed_range_blocks[block].ranges; range++) 482 for (range=0; range < fixed_range_blocks[block].ranges; range++)
424 set_fixed_range(fixed_range_blocks[block].base_msr + range, 483 set_fixed_range(fixed_range_blocks[block].base_msr + range,
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 4c4214690dd1..fb73a52913a4 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -377,10 +377,6 @@ static const struct file_operations mtrr_fops = {
377 .release = mtrr_close, 377 .release = mtrr_close,
378}; 378};
379 379
380
381static struct proc_dir_entry *proc_root_mtrr;
382
383
384static int mtrr_seq_show(struct seq_file *seq, void *offset) 380static int mtrr_seq_show(struct seq_file *seq, void *offset)
385{ 381{
386 char factor; 382 char factor;
@@ -423,11 +419,7 @@ static int __init mtrr_if_init(void)
423 (!cpu_has(c, X86_FEATURE_CENTAUR_MCR))) 419 (!cpu_has(c, X86_FEATURE_CENTAUR_MCR)))
424 return -ENODEV; 420 return -ENODEV;
425 421
426 proc_root_mtrr = 422 proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_fops);
427 proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_fops);
428
429 if (proc_root_mtrr)
430 proc_root_mtrr->owner = THIS_MODULE;
431 return 0; 423 return 0;
432} 424}
433 425
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 236a401b8259..03cda01f57c7 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -574,7 +574,7 @@ struct mtrr_value {
574 unsigned long lsize; 574 unsigned long lsize;
575}; 575};
576 576
577static struct mtrr_value mtrr_state[MTRR_MAX_VAR_RANGES]; 577static struct mtrr_value mtrr_value[MTRR_MAX_VAR_RANGES];
578 578
579static int mtrr_save(struct sys_device * sysdev, pm_message_t state) 579static int mtrr_save(struct sys_device * sysdev, pm_message_t state)
580{ 580{
@@ -582,9 +582,9 @@ static int mtrr_save(struct sys_device * sysdev, pm_message_t state)
582 582
583 for (i = 0; i < num_var_ranges; i++) { 583 for (i = 0; i < num_var_ranges; i++) {
584 mtrr_if->get(i, 584 mtrr_if->get(i,
585 &mtrr_state[i].lbase, 585 &mtrr_value[i].lbase,
586 &mtrr_state[i].lsize, 586 &mtrr_value[i].lsize,
587 &mtrr_state[i].ltype); 587 &mtrr_value[i].ltype);
588 } 588 }
589 return 0; 589 return 0;
590} 590}
@@ -594,11 +594,11 @@ static int mtrr_restore(struct sys_device * sysdev)
594 int i; 594 int i;
595 595
596 for (i = 0; i < num_var_ranges; i++) { 596 for (i = 0; i < num_var_ranges; i++) {
597 if (mtrr_state[i].lsize) 597 if (mtrr_value[i].lsize)
598 set_mtrr(i, 598 set_mtrr(i,
599 mtrr_state[i].lbase, 599 mtrr_value[i].lbase,
600 mtrr_state[i].lsize, 600 mtrr_value[i].lsize,
601 mtrr_state[i].ltype); 601 mtrr_value[i].ltype);
602 } 602 }
603 return 0; 603 return 0;
604} 604}
@@ -610,1058 +610,7 @@ static struct sysdev_driver mtrr_sysdev_driver = {
610 .resume = mtrr_restore, 610 .resume = mtrr_restore,
611}; 611};
612 612
613/* should be related to MTRR_VAR_RANGES nums */ 613int __initdata changed_by_mtrr_cleanup;
614#define RANGE_NUM 256
615
616struct res_range {
617 unsigned long start;
618 unsigned long end;
619};
620
621static int __init
622add_range(struct res_range *range, int nr_range, unsigned long start,
623 unsigned long end)
624{
625 /* out of slots */
626 if (nr_range >= RANGE_NUM)
627 return nr_range;
628
629 range[nr_range].start = start;
630 range[nr_range].end = end;
631
632 nr_range++;
633
634 return nr_range;
635}
636
637static int __init
638add_range_with_merge(struct res_range *range, int nr_range, unsigned long start,
639 unsigned long end)
640{
641 int i;
642
643 /* try to merge it with old one */
644 for (i = 0; i < nr_range; i++) {
645 unsigned long final_start, final_end;
646 unsigned long common_start, common_end;
647
648 if (!range[i].end)
649 continue;
650
651 common_start = max(range[i].start, start);
652 common_end = min(range[i].end, end);
653 if (common_start > common_end + 1)
654 continue;
655
656 final_start = min(range[i].start, start);
657 final_end = max(range[i].end, end);
658
659 range[i].start = final_start;
660 range[i].end = final_end;
661 return nr_range;
662 }
663
664 /* need to add that */
665 return add_range(range, nr_range, start, end);
666}
667
668static void __init
669subtract_range(struct res_range *range, unsigned long start, unsigned long end)
670{
671 int i, j;
672
673 for (j = 0; j < RANGE_NUM; j++) {
674 if (!range[j].end)
675 continue;
676
677 if (start <= range[j].start && end >= range[j].end) {
678 range[j].start = 0;
679 range[j].end = 0;
680 continue;
681 }
682
683 if (start <= range[j].start && end < range[j].end &&
684 range[j].start < end + 1) {
685 range[j].start = end + 1;
686 continue;
687 }
688
689
690 if (start > range[j].start && end >= range[j].end &&
691 range[j].end > start - 1) {
692 range[j].end = start - 1;
693 continue;
694 }
695
696 if (start > range[j].start && end < range[j].end) {
697 /* find the new spare */
698 for (i = 0; i < RANGE_NUM; i++) {
699 if (range[i].end == 0)
700 break;
701 }
702 if (i < RANGE_NUM) {
703 range[i].end = range[j].end;
704 range[i].start = end + 1;
705 } else {
706 printk(KERN_ERR "run of slot in ranges\n");
707 }
708 range[j].end = start - 1;
709 continue;
710 }
711 }
712}
713
714static int __init cmp_range(const void *x1, const void *x2)
715{
716 const struct res_range *r1 = x1;
717 const struct res_range *r2 = x2;
718 long start1, start2;
719
720 start1 = r1->start;
721 start2 = r2->start;
722
723 return start1 - start2;
724}
725
726struct var_mtrr_range_state {
727 unsigned long base_pfn;
728 unsigned long size_pfn;
729 mtrr_type type;
730};
731
732static struct var_mtrr_range_state __initdata range_state[RANGE_NUM];
733static int __initdata debug_print;
734
735static int __init
736x86_get_mtrr_mem_range(struct res_range *range, int nr_range,
737 unsigned long extra_remove_base,
738 unsigned long extra_remove_size)
739{
740 unsigned long i, base, size;
741 mtrr_type type;
742
743 for (i = 0; i < num_var_ranges; i++) {
744 type = range_state[i].type;
745 if (type != MTRR_TYPE_WRBACK)
746 continue;
747 base = range_state[i].base_pfn;
748 size = range_state[i].size_pfn;
749 nr_range = add_range_with_merge(range, nr_range, base,
750 base + size - 1);
751 }
752 if (debug_print) {
753 printk(KERN_DEBUG "After WB checking\n");
754 for (i = 0; i < nr_range; i++)
755 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
756 range[i].start, range[i].end + 1);
757 }
758
759 /* take out UC ranges */
760 for (i = 0; i < num_var_ranges; i++) {
761 type = range_state[i].type;
762 if (type != MTRR_TYPE_UNCACHABLE &&
763 type != MTRR_TYPE_WRPROT)
764 continue;
765 size = range_state[i].size_pfn;
766 if (!size)
767 continue;
768 base = range_state[i].base_pfn;
769 subtract_range(range, base, base + size - 1);
770 }
771 if (extra_remove_size)
772 subtract_range(range, extra_remove_base,
773 extra_remove_base + extra_remove_size - 1);
774
775 /* get new range num */
776 nr_range = 0;
777 for (i = 0; i < RANGE_NUM; i++) {
778 if (!range[i].end)
779 continue;
780 nr_range++;
781 }
782 if (debug_print) {
783 printk(KERN_DEBUG "After UC checking\n");
784 for (i = 0; i < nr_range; i++)
785 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
786 range[i].start, range[i].end + 1);
787 }
788
789 /* sort the ranges */
790 sort(range, nr_range, sizeof(struct res_range), cmp_range, NULL);
791 if (debug_print) {
792 printk(KERN_DEBUG "After sorting\n");
793 for (i = 0; i < nr_range; i++)
794 printk(KERN_DEBUG "MTRR MAP PFN: %016lx - %016lx\n",
795 range[i].start, range[i].end + 1);
796 }
797
798 /* clear those is not used */
799 for (i = nr_range; i < RANGE_NUM; i++)
800 memset(&range[i], 0, sizeof(range[i]));
801
802 return nr_range;
803}
804
805static struct res_range __initdata range[RANGE_NUM];
806static int __initdata nr_range;
807
808#ifdef CONFIG_MTRR_SANITIZER
809
810static unsigned long __init sum_ranges(struct res_range *range, int nr_range)
811{
812 unsigned long sum;
813 int i;
814
815 sum = 0;
816 for (i = 0; i < nr_range; i++)
817 sum += range[i].end + 1 - range[i].start;
818
819 return sum;
820}
821
822static int enable_mtrr_cleanup __initdata =
823 CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT;
824
825static int __init disable_mtrr_cleanup_setup(char *str)
826{
827 enable_mtrr_cleanup = 0;
828 return 0;
829}
830early_param("disable_mtrr_cleanup", disable_mtrr_cleanup_setup);
831
832static int __init enable_mtrr_cleanup_setup(char *str)
833{
834 enable_mtrr_cleanup = 1;
835 return 0;
836}
837early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup);
838
839static int __init mtrr_cleanup_debug_setup(char *str)
840{
841 debug_print = 1;
842 return 0;
843}
844early_param("mtrr_cleanup_debug", mtrr_cleanup_debug_setup);
845
846struct var_mtrr_state {
847 unsigned long range_startk;
848 unsigned long range_sizek;
849 unsigned long chunk_sizek;
850 unsigned long gran_sizek;
851 unsigned int reg;
852};
853
854static void __init
855set_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek,
856 unsigned char type, unsigned int address_bits)
857{
858 u32 base_lo, base_hi, mask_lo, mask_hi;
859 u64 base, mask;
860
861 if (!sizek) {
862 fill_mtrr_var_range(reg, 0, 0, 0, 0);
863 return;
864 }
865
866 mask = (1ULL << address_bits) - 1;
867 mask &= ~((((u64)sizek) << 10) - 1);
868
869 base = ((u64)basek) << 10;
870
871 base |= type;
872 mask |= 0x800;
873
874 base_lo = base & ((1ULL<<32) - 1);
875 base_hi = base >> 32;
876
877 mask_lo = mask & ((1ULL<<32) - 1);
878 mask_hi = mask >> 32;
879
880 fill_mtrr_var_range(reg, base_lo, base_hi, mask_lo, mask_hi);
881}
882
883static void __init
884save_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek,
885 unsigned char type)
886{
887 range_state[reg].base_pfn = basek >> (PAGE_SHIFT - 10);
888 range_state[reg].size_pfn = sizek >> (PAGE_SHIFT - 10);
889 range_state[reg].type = type;
890}
891
892static void __init
893set_var_mtrr_all(unsigned int address_bits)
894{
895 unsigned long basek, sizek;
896 unsigned char type;
897 unsigned int reg;
898
899 for (reg = 0; reg < num_var_ranges; reg++) {
900 basek = range_state[reg].base_pfn << (PAGE_SHIFT - 10);
901 sizek = range_state[reg].size_pfn << (PAGE_SHIFT - 10);
902 type = range_state[reg].type;
903
904 set_var_mtrr(reg, basek, sizek, type, address_bits);
905 }
906}
907
908static unsigned long to_size_factor(unsigned long sizek, char *factorp)
909{
910 char factor;
911 unsigned long base = sizek;
912
913 if (base & ((1<<10) - 1)) {
914 /* not MB alignment */
915 factor = 'K';
916 } else if (base & ((1<<20) - 1)){
917 factor = 'M';
918 base >>= 10;
919 } else {
920 factor = 'G';
921 base >>= 20;
922 }
923
924 *factorp = factor;
925
926 return base;
927}
928
929static unsigned int __init
930range_to_mtrr(unsigned int reg, unsigned long range_startk,
931 unsigned long range_sizek, unsigned char type)
932{
933 if (!range_sizek || (reg >= num_var_ranges))
934 return reg;
935
936 while (range_sizek) {
937 unsigned long max_align, align;
938 unsigned long sizek;
939
940 /* Compute the maximum size I can make a range */
941 if (range_startk)
942 max_align = ffs(range_startk) - 1;
943 else
944 max_align = 32;
945 align = fls(range_sizek) - 1;
946 if (align > max_align)
947 align = max_align;
948
949 sizek = 1 << align;
950 if (debug_print) {
951 char start_factor = 'K', size_factor = 'K';
952 unsigned long start_base, size_base;
953
954 start_base = to_size_factor(range_startk, &start_factor),
955 size_base = to_size_factor(sizek, &size_factor),
956
957 printk(KERN_DEBUG "Setting variable MTRR %d, "
958 "base: %ld%cB, range: %ld%cB, type %s\n",
959 reg, start_base, start_factor,
960 size_base, size_factor,
961 (type == MTRR_TYPE_UNCACHABLE)?"UC":
962 ((type == MTRR_TYPE_WRBACK)?"WB":"Other")
963 );
964 }
965 save_var_mtrr(reg++, range_startk, sizek, type);
966 range_startk += sizek;
967 range_sizek -= sizek;
968 if (reg >= num_var_ranges)
969 break;
970 }
971 return reg;
972}
973
974static unsigned __init
975range_to_mtrr_with_hole(struct var_mtrr_state *state, unsigned long basek,
976 unsigned long sizek)
977{
978 unsigned long hole_basek, hole_sizek;
979 unsigned long second_basek, second_sizek;
980 unsigned long range0_basek, range0_sizek;
981 unsigned long range_basek, range_sizek;
982 unsigned long chunk_sizek;
983 unsigned long gran_sizek;
984
985 hole_basek = 0;
986 hole_sizek = 0;
987 second_basek = 0;
988 second_sizek = 0;
989 chunk_sizek = state->chunk_sizek;
990 gran_sizek = state->gran_sizek;
991
992 /* align with gran size, prevent small block used up MTRRs */
993 range_basek = ALIGN(state->range_startk, gran_sizek);
994 if ((range_basek > basek) && basek)
995 return second_sizek;
996 state->range_sizek -= (range_basek - state->range_startk);
997 range_sizek = ALIGN(state->range_sizek, gran_sizek);
998
999 while (range_sizek > state->range_sizek) {
1000 range_sizek -= gran_sizek;
1001 if (!range_sizek)
1002 return 0;
1003 }
1004 state->range_sizek = range_sizek;
1005
1006 /* try to append some small hole */
1007 range0_basek = state->range_startk;
1008 range0_sizek = ALIGN(state->range_sizek, chunk_sizek);
1009
1010 /* no increase */
1011 if (range0_sizek == state->range_sizek) {
1012 if (debug_print)
1013 printk(KERN_DEBUG "rangeX: %016lx - %016lx\n",
1014 range0_basek<<10,
1015 (range0_basek + state->range_sizek)<<10);
1016 state->reg = range_to_mtrr(state->reg, range0_basek,
1017 state->range_sizek, MTRR_TYPE_WRBACK);
1018 return 0;
1019 }
1020
1021 /* only cut back, when it is not the last */
1022 if (sizek) {
1023 while (range0_basek + range0_sizek > (basek + sizek)) {
1024 if (range0_sizek >= chunk_sizek)
1025 range0_sizek -= chunk_sizek;
1026 else
1027 range0_sizek = 0;
1028
1029 if (!range0_sizek)
1030 break;
1031 }
1032 }
1033
1034second_try:
1035 range_basek = range0_basek + range0_sizek;
1036
1037 /* one hole in the middle */
1038 if (range_basek > basek && range_basek <= (basek + sizek))
1039 second_sizek = range_basek - basek;
1040
1041 if (range0_sizek > state->range_sizek) {
1042
1043 /* one hole in middle or at end */
1044 hole_sizek = range0_sizek - state->range_sizek - second_sizek;
1045
1046 /* hole size should be less than half of range0 size */
1047 if (hole_sizek >= (range0_sizek >> 1) &&
1048 range0_sizek >= chunk_sizek) {
1049 range0_sizek -= chunk_sizek;
1050 second_sizek = 0;
1051 hole_sizek = 0;
1052
1053 goto second_try;
1054 }
1055 }
1056
1057 if (range0_sizek) {
1058 if (debug_print)
1059 printk(KERN_DEBUG "range0: %016lx - %016lx\n",
1060 range0_basek<<10,
1061 (range0_basek + range0_sizek)<<10);
1062 state->reg = range_to_mtrr(state->reg, range0_basek,
1063 range0_sizek, MTRR_TYPE_WRBACK);
1064 }
1065
1066 if (range0_sizek < state->range_sizek) {
1067 /* need to handle left over */
1068 range_sizek = state->range_sizek - range0_sizek;
1069
1070 if (debug_print)
1071 printk(KERN_DEBUG "range: %016lx - %016lx\n",
1072 range_basek<<10,
1073 (range_basek + range_sizek)<<10);
1074 state->reg = range_to_mtrr(state->reg, range_basek,
1075 range_sizek, MTRR_TYPE_WRBACK);
1076 }
1077
1078 if (hole_sizek) {
1079 hole_basek = range_basek - hole_sizek - second_sizek;
1080 if (debug_print)
1081 printk(KERN_DEBUG "hole: %016lx - %016lx\n",
1082 hole_basek<<10,
1083 (hole_basek + hole_sizek)<<10);
1084 state->reg = range_to_mtrr(state->reg, hole_basek,
1085 hole_sizek, MTRR_TYPE_UNCACHABLE);
1086 }
1087
1088 return second_sizek;
1089}
1090
1091static void __init
1092set_var_mtrr_range(struct var_mtrr_state *state, unsigned long base_pfn,
1093 unsigned long size_pfn)
1094{
1095 unsigned long basek, sizek;
1096 unsigned long second_sizek = 0;
1097
1098 if (state->reg >= num_var_ranges)
1099 return;
1100
1101 basek = base_pfn << (PAGE_SHIFT - 10);
1102 sizek = size_pfn << (PAGE_SHIFT - 10);
1103
1104 /* See if I can merge with the last range */
1105 if ((basek <= 1024) ||
1106 (state->range_startk + state->range_sizek == basek)) {
1107 unsigned long endk = basek + sizek;
1108 state->range_sizek = endk - state->range_startk;
1109 return;
1110 }
1111 /* Write the range mtrrs */
1112 if (state->range_sizek != 0)
1113 second_sizek = range_to_mtrr_with_hole(state, basek, sizek);
1114
1115 /* Allocate an msr */
1116 state->range_startk = basek + second_sizek;
1117 state->range_sizek = sizek - second_sizek;
1118}
1119
1120/* mininum size of mtrr block that can take hole */
1121static u64 mtrr_chunk_size __initdata = (256ULL<<20);
1122
1123static int __init parse_mtrr_chunk_size_opt(char *p)
1124{
1125 if (!p)
1126 return -EINVAL;
1127 mtrr_chunk_size = memparse(p, &p);
1128 return 0;
1129}
1130early_param("mtrr_chunk_size", parse_mtrr_chunk_size_opt);
1131
1132/* granity of mtrr of block */
1133static u64 mtrr_gran_size __initdata;
1134
1135static int __init parse_mtrr_gran_size_opt(char *p)
1136{
1137 if (!p)
1138 return -EINVAL;
1139 mtrr_gran_size = memparse(p, &p);
1140 return 0;
1141}
1142early_param("mtrr_gran_size", parse_mtrr_gran_size_opt);
1143
1144static int nr_mtrr_spare_reg __initdata =
1145 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT;
1146
1147static int __init parse_mtrr_spare_reg(char *arg)
1148{
1149 if (arg)
1150 nr_mtrr_spare_reg = simple_strtoul(arg, NULL, 0);
1151 return 0;
1152}
1153
1154early_param("mtrr_spare_reg_nr", parse_mtrr_spare_reg);
1155
1156static int __init
1157x86_setup_var_mtrrs(struct res_range *range, int nr_range,
1158 u64 chunk_size, u64 gran_size)
1159{
1160 struct var_mtrr_state var_state;
1161 int i;
1162 int num_reg;
1163
1164 var_state.range_startk = 0;
1165 var_state.range_sizek = 0;
1166 var_state.reg = 0;
1167 var_state.chunk_sizek = chunk_size >> 10;
1168 var_state.gran_sizek = gran_size >> 10;
1169
1170 memset(range_state, 0, sizeof(range_state));
1171
1172 /* Write the range etc */
1173 for (i = 0; i < nr_range; i++)
1174 set_var_mtrr_range(&var_state, range[i].start,
1175 range[i].end - range[i].start + 1);
1176
1177 /* Write the last range */
1178 if (var_state.range_sizek != 0)
1179 range_to_mtrr_with_hole(&var_state, 0, 0);
1180
1181 num_reg = var_state.reg;
1182 /* Clear out the extra MTRR's */
1183 while (var_state.reg < num_var_ranges) {
1184 save_var_mtrr(var_state.reg, 0, 0, 0);
1185 var_state.reg++;
1186 }
1187
1188 return num_reg;
1189}
1190
1191struct mtrr_cleanup_result {
1192 unsigned long gran_sizek;
1193 unsigned long chunk_sizek;
1194 unsigned long lose_cover_sizek;
1195 unsigned int num_reg;
1196 int bad;
1197};
1198
1199/*
1200 * gran_size: 64K, 128K, 256K, 512K, 1M, 2M, ..., 2G
1201 * chunk size: gran_size, ..., 2G
1202 * so we need (1+16)*8
1203 */
1204#define NUM_RESULT 136
1205#define PSHIFT (PAGE_SHIFT - 10)
1206
1207static struct mtrr_cleanup_result __initdata result[NUM_RESULT];
1208static unsigned long __initdata min_loss_pfn[RANGE_NUM];
1209
1210static void __init print_out_mtrr_range_state(void)
1211{
1212 int i;
1213 char start_factor = 'K', size_factor = 'K';
1214 unsigned long start_base, size_base;
1215 mtrr_type type;
1216
1217 for (i = 0; i < num_var_ranges; i++) {
1218
1219 size_base = range_state[i].size_pfn << (PAGE_SHIFT - 10);
1220 if (!size_base)
1221 continue;
1222
1223 size_base = to_size_factor(size_base, &size_factor),
1224 start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
1225 start_base = to_size_factor(start_base, &start_factor),
1226 type = range_state[i].type;
1227
1228 printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
1229 i, start_base, start_factor,
1230 size_base, size_factor,
1231 (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
1232 ((type == MTRR_TYPE_WRPROT) ? "WP" :
1233 ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
1234 );
1235 }
1236}
1237
1238static int __init mtrr_need_cleanup(void)
1239{
1240 int i;
1241 mtrr_type type;
1242 unsigned long size;
1243 /* extra one for all 0 */
1244 int num[MTRR_NUM_TYPES + 1];
1245
1246 /* check entries number */
1247 memset(num, 0, sizeof(num));
1248 for (i = 0; i < num_var_ranges; i++) {
1249 type = range_state[i].type;
1250 size = range_state[i].size_pfn;
1251 if (type >= MTRR_NUM_TYPES)
1252 continue;
1253 if (!size)
1254 type = MTRR_NUM_TYPES;
1255 if (type == MTRR_TYPE_WRPROT)
1256 type = MTRR_TYPE_UNCACHABLE;
1257 num[type]++;
1258 }
1259
1260 /* check if we got UC entries */
1261 if (!num[MTRR_TYPE_UNCACHABLE])
1262 return 0;
1263
1264 /* check if we only had WB and UC */
1265 if (num[MTRR_TYPE_WRBACK] + num[MTRR_TYPE_UNCACHABLE] !=
1266 num_var_ranges - num[MTRR_NUM_TYPES])
1267 return 0;
1268
1269 return 1;
1270}
1271
1272static unsigned long __initdata range_sums;
1273static void __init mtrr_calc_range_state(u64 chunk_size, u64 gran_size,
1274 unsigned long extra_remove_base,
1275 unsigned long extra_remove_size,
1276 int i)
1277{
1278 int num_reg;
1279 static struct res_range range_new[RANGE_NUM];
1280 static int nr_range_new;
1281 unsigned long range_sums_new;
1282
1283 /* convert ranges to var ranges state */
1284 num_reg = x86_setup_var_mtrrs(range, nr_range,
1285 chunk_size, gran_size);
1286
1287 /* we got new setting in range_state, check it */
1288 memset(range_new, 0, sizeof(range_new));
1289 nr_range_new = x86_get_mtrr_mem_range(range_new, 0,
1290 extra_remove_base, extra_remove_size);
1291 range_sums_new = sum_ranges(range_new, nr_range_new);
1292
1293 result[i].chunk_sizek = chunk_size >> 10;
1294 result[i].gran_sizek = gran_size >> 10;
1295 result[i].num_reg = num_reg;
1296 if (range_sums < range_sums_new) {
1297 result[i].lose_cover_sizek =
1298 (range_sums_new - range_sums) << PSHIFT;
1299 result[i].bad = 1;
1300 } else
1301 result[i].lose_cover_sizek =
1302 (range_sums - range_sums_new) << PSHIFT;
1303
1304 /* double check it */
1305 if (!result[i].bad && !result[i].lose_cover_sizek) {
1306 if (nr_range_new != nr_range ||
1307 memcmp(range, range_new, sizeof(range)))
1308 result[i].bad = 1;
1309 }
1310
1311 if (!result[i].bad && (range_sums - range_sums_new <
1312 min_loss_pfn[num_reg])) {
1313 min_loss_pfn[num_reg] =
1314 range_sums - range_sums_new;
1315 }
1316}
1317
1318static void __init mtrr_print_out_one_result(int i)
1319{
1320 char gran_factor, chunk_factor, lose_factor;
1321 unsigned long gran_base, chunk_base, lose_base;
1322
1323 gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
1324 chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
1325 lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
1326 printk(KERN_INFO "%sgran_size: %ld%c \tchunk_size: %ld%c \t",
1327 result[i].bad ? "*BAD*" : " ",
1328 gran_base, gran_factor, chunk_base, chunk_factor);
1329 printk(KERN_CONT "num_reg: %d \tlose cover RAM: %s%ld%c\n",
1330 result[i].num_reg, result[i].bad ? "-" : "",
1331 lose_base, lose_factor);
1332}
1333
1334static int __init mtrr_search_optimal_index(void)
1335{
1336 int i;
1337 int num_reg_good;
1338 int index_good;
1339
1340 if (nr_mtrr_spare_reg >= num_var_ranges)
1341 nr_mtrr_spare_reg = num_var_ranges - 1;
1342 num_reg_good = -1;
1343 for (i = num_var_ranges - nr_mtrr_spare_reg; i > 0; i--) {
1344 if (!min_loss_pfn[i])
1345 num_reg_good = i;
1346 }
1347
1348 index_good = -1;
1349 if (num_reg_good != -1) {
1350 for (i = 0; i < NUM_RESULT; i++) {
1351 if (!result[i].bad &&
1352 result[i].num_reg == num_reg_good &&
1353 !result[i].lose_cover_sizek) {
1354 index_good = i;
1355 break;
1356 }
1357 }
1358 }
1359
1360 return index_good;
1361}
1362
1363
1364static int __init mtrr_cleanup(unsigned address_bits)
1365{
1366 unsigned long extra_remove_base, extra_remove_size;
1367 unsigned long base, size, def, dummy;
1368 mtrr_type type;
1369 u64 chunk_size, gran_size;
1370 int index_good;
1371 int i;
1372
1373 if (!is_cpu(INTEL) || enable_mtrr_cleanup < 1)
1374 return 0;
1375 rdmsr(MTRRdefType_MSR, def, dummy);
1376 def &= 0xff;
1377 if (def != MTRR_TYPE_UNCACHABLE)
1378 return 0;
1379
1380 /* get it and store it aside */
1381 memset(range_state, 0, sizeof(range_state));
1382 for (i = 0; i < num_var_ranges; i++) {
1383 mtrr_if->get(i, &base, &size, &type);
1384 range_state[i].base_pfn = base;
1385 range_state[i].size_pfn = size;
1386 range_state[i].type = type;
1387 }
1388
1389 /* check if we need handle it and can handle it */
1390 if (!mtrr_need_cleanup())
1391 return 0;
1392
1393 /* print original var MTRRs at first, for debugging: */
1394 printk(KERN_DEBUG "original variable MTRRs\n");
1395 print_out_mtrr_range_state();
1396
1397 memset(range, 0, sizeof(range));
1398 extra_remove_size = 0;
1399 extra_remove_base = 1 << (32 - PAGE_SHIFT);
1400 if (mtrr_tom2)
1401 extra_remove_size =
1402 (mtrr_tom2 >> PAGE_SHIFT) - extra_remove_base;
1403 nr_range = x86_get_mtrr_mem_range(range, 0, extra_remove_base,
1404 extra_remove_size);
1405 /*
1406 * [0, 1M) should always be coverred by var mtrr with WB
1407 * and fixed mtrrs should take effective before var mtrr for it
1408 */
1409 nr_range = add_range_with_merge(range, nr_range, 0,
1410 (1ULL<<(20 - PAGE_SHIFT)) - 1);
1411 /* sort the ranges */
1412 sort(range, nr_range, sizeof(struct res_range), cmp_range, NULL);
1413
1414 range_sums = sum_ranges(range, nr_range);
1415 printk(KERN_INFO "total RAM coverred: %ldM\n",
1416 range_sums >> (20 - PAGE_SHIFT));
1417
1418 if (mtrr_chunk_size && mtrr_gran_size) {
1419 i = 0;
1420 mtrr_calc_range_state(mtrr_chunk_size, mtrr_gran_size,
1421 extra_remove_base, extra_remove_size, i);
1422
1423 mtrr_print_out_one_result(i);
1424
1425 if (!result[i].bad) {
1426 set_var_mtrr_all(address_bits);
1427 return 1;
1428 }
1429 printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, "
1430 "will find optimal one\n");
1431 }
1432
1433 i = 0;
1434 memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn));
1435 memset(result, 0, sizeof(result));
1436 for (gran_size = (1ULL<<16); gran_size < (1ULL<<32); gran_size <<= 1) {
1437
1438 for (chunk_size = gran_size; chunk_size < (1ULL<<32);
1439 chunk_size <<= 1) {
1440
1441 if (i >= NUM_RESULT)
1442 continue;
1443
1444 mtrr_calc_range_state(chunk_size, gran_size,
1445 extra_remove_base, extra_remove_size, i);
1446 if (debug_print) {
1447 mtrr_print_out_one_result(i);
1448 printk(KERN_INFO "\n");
1449 }
1450
1451 i++;
1452 }
1453 }
1454
1455 /* try to find the optimal index */
1456 index_good = mtrr_search_optimal_index();
1457
1458 if (index_good != -1) {
1459 printk(KERN_INFO "Found optimal setting for mtrr clean up\n");
1460 i = index_good;
1461 mtrr_print_out_one_result(i);
1462
1463 /* convert ranges to var ranges state */
1464 chunk_size = result[i].chunk_sizek;
1465 chunk_size <<= 10;
1466 gran_size = result[i].gran_sizek;
1467 gran_size <<= 10;
1468 x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size);
1469 set_var_mtrr_all(address_bits);
1470 printk(KERN_DEBUG "New variable MTRRs\n");
1471 print_out_mtrr_range_state();
1472 return 1;
1473 } else {
1474 /* print out all */
1475 for (i = 0; i < NUM_RESULT; i++)
1476 mtrr_print_out_one_result(i);
1477 }
1478
1479 printk(KERN_INFO "mtrr_cleanup: can not find optimal value\n");
1480 printk(KERN_INFO "please specify mtrr_gran_size/mtrr_chunk_size\n");
1481
1482 return 0;
1483}
1484#else
1485static int __init mtrr_cleanup(unsigned address_bits)
1486{
1487 return 0;
1488}
1489#endif
1490
1491static int __initdata changed_by_mtrr_cleanup;
1492
1493static int disable_mtrr_trim;
1494
1495static int __init disable_mtrr_trim_setup(char *str)
1496{
1497 disable_mtrr_trim = 1;
1498 return 0;
1499}
1500early_param("disable_mtrr_trim", disable_mtrr_trim_setup);
1501
1502/*
1503 * Newer AMD K8s and later CPUs have a special magic MSR way to force WB
1504 * for memory >4GB. Check for that here.
1505 * Note this won't check if the MTRRs < 4GB where the magic bit doesn't
1506 * apply to are wrong, but so far we don't know of any such case in the wild.
1507 */
1508#define Tom2Enabled (1U << 21)
1509#define Tom2ForceMemTypeWB (1U << 22)
1510
1511int __init amd_special_default_mtrr(void)
1512{
1513 u32 l, h;
1514
1515 if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
1516 return 0;
1517 if (boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x11)
1518 return 0;
1519 /* In case some hypervisor doesn't pass SYSCFG through */
1520 if (rdmsr_safe(MSR_K8_SYSCFG, &l, &h) < 0)
1521 return 0;
1522 /*
1523 * Memory between 4GB and top of mem is forced WB by this magic bit.
1524 * Reserved before K8RevF, but should be zero there.
1525 */
1526 if ((l & (Tom2Enabled | Tom2ForceMemTypeWB)) ==
1527 (Tom2Enabled | Tom2ForceMemTypeWB))
1528 return 1;
1529 return 0;
1530}
1531
1532static u64 __init real_trim_memory(unsigned long start_pfn,
1533 unsigned long limit_pfn)
1534{
1535 u64 trim_start, trim_size;
1536 trim_start = start_pfn;
1537 trim_start <<= PAGE_SHIFT;
1538 trim_size = limit_pfn;
1539 trim_size <<= PAGE_SHIFT;
1540 trim_size -= trim_start;
1541
1542 return e820_update_range(trim_start, trim_size, E820_RAM,
1543 E820_RESERVED);
1544}
1545/**
1546 * mtrr_trim_uncached_memory - trim RAM not covered by MTRRs
1547 * @end_pfn: ending page frame number
1548 *
1549 * Some buggy BIOSes don't setup the MTRRs properly for systems with certain
1550 * memory configurations. This routine checks that the highest MTRR matches
1551 * the end of memory, to make sure the MTRRs having a write back type cover
1552 * all of the memory the kernel is intending to use. If not, it'll trim any
1553 * memory off the end by adjusting end_pfn, removing it from the kernel's
1554 * allocation pools, warning the user with an obnoxious message.
1555 */
1556int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
1557{
1558 unsigned long i, base, size, highest_pfn = 0, def, dummy;
1559 mtrr_type type;
1560 u64 total_trim_size;
1561
1562 /* extra one for all 0 */
1563 int num[MTRR_NUM_TYPES + 1];
1564 /*
1565 * Make sure we only trim uncachable memory on machines that
1566 * support the Intel MTRR architecture:
1567 */
1568 if (!is_cpu(INTEL) || disable_mtrr_trim)
1569 return 0;
1570 rdmsr(MTRRdefType_MSR, def, dummy);
1571 def &= 0xff;
1572 if (def != MTRR_TYPE_UNCACHABLE)
1573 return 0;
1574
1575 /* get it and store it aside */
1576 memset(range_state, 0, sizeof(range_state));
1577 for (i = 0; i < num_var_ranges; i++) {
1578 mtrr_if->get(i, &base, &size, &type);
1579 range_state[i].base_pfn = base;
1580 range_state[i].size_pfn = size;
1581 range_state[i].type = type;
1582 }
1583
1584 /* Find highest cached pfn */
1585 for (i = 0; i < num_var_ranges; i++) {
1586 type = range_state[i].type;
1587 if (type != MTRR_TYPE_WRBACK)
1588 continue;
1589 base = range_state[i].base_pfn;
1590 size = range_state[i].size_pfn;
1591 if (highest_pfn < base + size)
1592 highest_pfn = base + size;
1593 }
1594
1595 /* kvm/qemu doesn't have mtrr set right, don't trim them all */
1596 if (!highest_pfn) {
1597 printk(KERN_INFO "CPU MTRRs all blank - virtualized system.\n");
1598 return 0;
1599 }
1600
1601 /* check entries number */
1602 memset(num, 0, sizeof(num));
1603 for (i = 0; i < num_var_ranges; i++) {
1604 type = range_state[i].type;
1605 if (type >= MTRR_NUM_TYPES)
1606 continue;
1607 size = range_state[i].size_pfn;
1608 if (!size)
1609 type = MTRR_NUM_TYPES;
1610 num[type]++;
1611 }
1612
1613 /* no entry for WB? */
1614 if (!num[MTRR_TYPE_WRBACK])
1615 return 0;
1616
1617 /* check if we only had WB and UC */
1618 if (num[MTRR_TYPE_WRBACK] + num[MTRR_TYPE_UNCACHABLE] !=
1619 num_var_ranges - num[MTRR_NUM_TYPES])
1620 return 0;
1621
1622 memset(range, 0, sizeof(range));
1623 nr_range = 0;
1624 if (mtrr_tom2) {
1625 range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT));
1626 range[nr_range].end = (mtrr_tom2 >> PAGE_SHIFT) - 1;
1627 if (highest_pfn < range[nr_range].end + 1)
1628 highest_pfn = range[nr_range].end + 1;
1629 nr_range++;
1630 }
1631 nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0);
1632
1633 total_trim_size = 0;
1634 /* check the head */
1635 if (range[0].start)
1636 total_trim_size += real_trim_memory(0, range[0].start);
1637 /* check the holes */
1638 for (i = 0; i < nr_range - 1; i++) {
1639 if (range[i].end + 1 < range[i+1].start)
1640 total_trim_size += real_trim_memory(range[i].end + 1,
1641 range[i+1].start);
1642 }
1643 /* check the top */
1644 i = nr_range - 1;
1645 if (range[i].end + 1 < end_pfn)
1646 total_trim_size += real_trim_memory(range[i].end + 1,
1647 end_pfn);
1648
1649 if (total_trim_size) {
1650 printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
1651 " all of memory, losing %lluMB of RAM.\n",
1652 total_trim_size >> 20);
1653
1654 if (!changed_by_mtrr_cleanup)
1655 WARN_ON(1);
1656
1657 printk(KERN_INFO "update e820 for mtrr\n");
1658 update_e820();
1659
1660 return 1;
1661 }
1662
1663 return 0;
1664}
1665 614
1666/** 615/**
1667 * mtrr_bp_init - initialize mtrrs on the boot CPU 616 * mtrr_bp_init - initialize mtrrs on the boot CPU
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.h b/arch/x86/kernel/cpu/mtrr/mtrr.h
index ffd60409cc6d..77f67f7b347a 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.h
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.h
@@ -79,6 +79,7 @@ extern struct mtrr_ops * mtrr_if;
79 79
80extern unsigned int num_var_ranges; 80extern unsigned int num_var_ranges;
81extern u64 mtrr_tom2; 81extern u64 mtrr_tom2;
82extern struct mtrr_state_type mtrr_state;
82 83
83void mtrr_state_warn(void); 84void mtrr_state_warn(void);
84const char *mtrr_attrib_to_str(int x); 85const char *mtrr_attrib_to_str(int x);
@@ -88,3 +89,6 @@ void mtrr_wrmsr(unsigned, unsigned, unsigned);
88int amd_init_mtrr(void); 89int amd_init_mtrr(void);
89int cyrix_init_mtrr(void); 90int cyrix_init_mtrr(void);
90int centaur_init_mtrr(void); 91int centaur_init_mtrr(void);
92
93extern int changed_by_mtrr_cleanup;
94extern int mtrr_cleanup(unsigned address_bits);
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index d67e0e48bc2d..f93047fed791 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -14,7 +14,7 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
14 if (c->x86_max_cores * smp_num_siblings > 1) { 14 if (c->x86_max_cores * smp_num_siblings > 1) {
15 seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); 15 seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
16 seq_printf(m, "siblings\t: %d\n", 16 seq_printf(m, "siblings\t: %d\n",
17 cpus_weight(per_cpu(cpu_core_map, cpu))); 17 cpumask_weight(cpu_sibling_mask(cpu)));
18 seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id); 18 seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id);
19 seq_printf(m, "cpu cores\t: %d\n", c->booted_cores); 19 seq_printf(m, "cpu cores\t: %d\n", c->booted_cores);
20 seq_printf(m, "apicid\t\t: %d\n", c->apicid); 20 seq_printf(m, "apicid\t\t: %d\n", c->apicid);
@@ -143,9 +143,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
143static void *c_start(struct seq_file *m, loff_t *pos) 143static void *c_start(struct seq_file *m, loff_t *pos)
144{ 144{
145 if (*pos == 0) /* just in case, cpu 0 is not the first */ 145 if (*pos == 0) /* just in case, cpu 0 is not the first */
146 *pos = first_cpu(cpu_online_map); 146 *pos = cpumask_first(cpu_online_mask);
147 else 147 else
148 *pos = next_cpu_nr(*pos - 1, cpu_online_map); 148 *pos = cpumask_next(*pos - 1, cpu_online_mask);
149 if ((*pos) < nr_cpu_ids) 149 if ((*pos) < nr_cpu_ids)
150 return &cpu_data(*pos); 150 return &cpu_data(*pos);
151 return NULL; 151 return NULL;
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c
index 52b3fefbd5af..bb62b3e5caad 100644
--- a/arch/x86/kernel/cpu/transmeta.c
+++ b/arch/x86/kernel/cpu/transmeta.c
@@ -98,7 +98,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
98#endif 98#endif
99} 99}
100 100
101static struct cpu_dev transmeta_cpu_dev __cpuinitdata = { 101static const struct cpu_dev __cpuinitconst transmeta_cpu_dev = {
102 .c_vendor = "Transmeta", 102 .c_vendor = "Transmeta",
103 .c_ident = { "GenuineTMx86", "TransmetaCPU" }, 103 .c_ident = { "GenuineTMx86", "TransmetaCPU" },
104 .c_early_init = early_init_transmeta, 104 .c_early_init = early_init_transmeta,
diff --git a/arch/x86/kernel/cpu/umc.c b/arch/x86/kernel/cpu/umc.c
index e777f79e0960..fd2c37bf7acb 100644
--- a/arch/x86/kernel/cpu/umc.c
+++ b/arch/x86/kernel/cpu/umc.c
@@ -8,7 +8,7 @@
8 * so no special init takes place. 8 * so no special init takes place.
9 */ 9 */
10 10
11static struct cpu_dev umc_cpu_dev __cpuinitdata = { 11static const struct cpu_dev __cpuinitconst umc_cpu_dev = {
12 .c_vendor = "UMC", 12 .c_vendor = "UMC",
13 .c_ident = { "UMC UMC UMC" }, 13 .c_ident = { "UMC UMC UMC" },
14 .c_models = { 14 .c_models = {
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 87d103ded1c3..95ea5fa7d444 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -10,10 +10,12 @@
10#include <linux/kdebug.h> 10#include <linux/kdebug.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/ptrace.h> 12#include <linux/ptrace.h>
13#include <linux/ftrace.h>
13#include <linux/kexec.h> 14#include <linux/kexec.h>
14#include <linux/bug.h> 15#include <linux/bug.h>
15#include <linux/nmi.h> 16#include <linux/nmi.h>
16#include <linux/sysfs.h> 17#include <linux/sysfs.h>
18#include <linux/ftrace.h>
17 19
18#include <asm/stacktrace.h> 20#include <asm/stacktrace.h>
19 21
@@ -195,6 +197,11 @@ unsigned __kprobes long oops_begin(void)
195 int cpu; 197 int cpu;
196 unsigned long flags; 198 unsigned long flags;
197 199
200 /* notify the hw-branch tracer so it may disable tracing and
201 add the last trace to the trace buffer -
202 the earlier this happens, the more useful the trace. */
203 trace_hw_branch_oops();
204
198 oops_enter(); 205 oops_enter();
199 206
200 /* racy, but better than risking deadlock. */ 207 /* racy, but better than risking deadlock. */
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 508bec1cee27..ef2c3563357d 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -110,19 +110,50 @@ int __init e820_all_mapped(u64 start, u64 end, unsigned type)
110/* 110/*
111 * Add a memory region to the kernel e820 map. 111 * Add a memory region to the kernel e820 map.
112 */ 112 */
113void __init e820_add_region(u64 start, u64 size, int type) 113static void __init __e820_add_region(struct e820map *e820x, u64 start, u64 size,
114 int type)
114{ 115{
115 int x = e820.nr_map; 116 int x = e820x->nr_map;
116 117
117 if (x == ARRAY_SIZE(e820.map)) { 118 if (x == ARRAY_SIZE(e820x->map)) {
118 printk(KERN_ERR "Ooops! Too many entries in the memory map!\n"); 119 printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
119 return; 120 return;
120 } 121 }
121 122
122 e820.map[x].addr = start; 123 e820x->map[x].addr = start;
123 e820.map[x].size = size; 124 e820x->map[x].size = size;
124 e820.map[x].type = type; 125 e820x->map[x].type = type;
125 e820.nr_map++; 126 e820x->nr_map++;
127}
128
129void __init e820_add_region(u64 start, u64 size, int type)
130{
131 __e820_add_region(&e820, start, size, type);
132}
133
134static void __init e820_print_type(u32 type)
135{
136 switch (type) {
137 case E820_RAM:
138 case E820_RESERVED_KERN:
139 printk(KERN_CONT "(usable)");
140 break;
141 case E820_RESERVED:
142 printk(KERN_CONT "(reserved)");
143 break;
144 case E820_ACPI:
145 printk(KERN_CONT "(ACPI data)");
146 break;
147 case E820_NVS:
148 printk(KERN_CONT "(ACPI NVS)");
149 break;
150 case E820_UNUSABLE:
151 printk(KERN_CONT "(unusable)");
152 break;
153 default:
154 printk(KERN_CONT "type %u", type);
155 break;
156 }
126} 157}
127 158
128void __init e820_print_map(char *who) 159void __init e820_print_map(char *who)
@@ -134,27 +165,8 @@ void __init e820_print_map(char *who)
134 (unsigned long long) e820.map[i].addr, 165 (unsigned long long) e820.map[i].addr,
135 (unsigned long long) 166 (unsigned long long)
136 (e820.map[i].addr + e820.map[i].size)); 167 (e820.map[i].addr + e820.map[i].size));
137 switch (e820.map[i].type) { 168 e820_print_type(e820.map[i].type);
138 case E820_RAM: 169 printk(KERN_CONT "\n");
139 case E820_RESERVED_KERN:
140 printk(KERN_CONT "(usable)\n");
141 break;
142 case E820_RESERVED:
143 printk(KERN_CONT "(reserved)\n");
144 break;
145 case E820_ACPI:
146 printk(KERN_CONT "(ACPI data)\n");
147 break;
148 case E820_NVS:
149 printk(KERN_CONT "(ACPI NVS)\n");
150 break;
151 case E820_UNUSABLE:
152 printk("(unusable)\n");
153 break;
154 default:
155 printk(KERN_CONT "type %u\n", e820.map[i].type);
156 break;
157 }
158 } 170 }
159} 171}
160 172
@@ -221,7 +233,7 @@ void __init e820_print_map(char *who)
221 */ 233 */
222 234
223int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, 235int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
224 int *pnr_map) 236 u32 *pnr_map)
225{ 237{
226 struct change_member { 238 struct change_member {
227 struct e820entry *pbios; /* pointer to original bios entry */ 239 struct e820entry *pbios; /* pointer to original bios entry */
@@ -417,11 +429,12 @@ static int __init append_e820_map(struct e820entry *biosmap, int nr_map)
417 return __append_e820_map(biosmap, nr_map); 429 return __append_e820_map(biosmap, nr_map);
418} 430}
419 431
420static u64 __init e820_update_range_map(struct e820map *e820x, u64 start, 432static u64 __init __e820_update_range(struct e820map *e820x, u64 start,
421 u64 size, unsigned old_type, 433 u64 size, unsigned old_type,
422 unsigned new_type) 434 unsigned new_type)
423{ 435{
424 int i; 436 u64 end;
437 unsigned int i;
425 u64 real_updated_size = 0; 438 u64 real_updated_size = 0;
426 439
427 BUG_ON(old_type == new_type); 440 BUG_ON(old_type == new_type);
@@ -429,27 +442,55 @@ static u64 __init e820_update_range_map(struct e820map *e820x, u64 start,
429 if (size > (ULLONG_MAX - start)) 442 if (size > (ULLONG_MAX - start))
430 size = ULLONG_MAX - start; 443 size = ULLONG_MAX - start;
431 444
432 for (i = 0; i < e820.nr_map; i++) { 445 end = start + size;
446 printk(KERN_DEBUG "e820 update range: %016Lx - %016Lx ",
447 (unsigned long long) start,
448 (unsigned long long) end);
449 e820_print_type(old_type);
450 printk(KERN_CONT " ==> ");
451 e820_print_type(new_type);
452 printk(KERN_CONT "\n");
453
454 for (i = 0; i < e820x->nr_map; i++) {
433 struct e820entry *ei = &e820x->map[i]; 455 struct e820entry *ei = &e820x->map[i];
434 u64 final_start, final_end; 456 u64 final_start, final_end;
457 u64 ei_end;
458
435 if (ei->type != old_type) 459 if (ei->type != old_type)
436 continue; 460 continue;
437 /* totally covered? */ 461
438 if (ei->addr >= start && 462 ei_end = ei->addr + ei->size;
439 (ei->addr + ei->size) <= (start + size)) { 463 /* totally covered by new range? */
464 if (ei->addr >= start && ei_end <= end) {
440 ei->type = new_type; 465 ei->type = new_type;
441 real_updated_size += ei->size; 466 real_updated_size += ei->size;
442 continue; 467 continue;
443 } 468 }
469
470 /* new range is totally covered? */
471 if (ei->addr < start && ei_end > end) {
472 __e820_add_region(e820x, start, size, new_type);
473 __e820_add_region(e820x, end, ei_end - end, ei->type);
474 ei->size = start - ei->addr;
475 real_updated_size += size;
476 continue;
477 }
478
444 /* partially covered */ 479 /* partially covered */
445 final_start = max(start, ei->addr); 480 final_start = max(start, ei->addr);
446 final_end = min(start + size, ei->addr + ei->size); 481 final_end = min(end, ei_end);
447 if (final_start >= final_end) 482 if (final_start >= final_end)
448 continue; 483 continue;
449 e820_add_region(final_start, final_end - final_start, 484
450 new_type); 485 __e820_add_region(e820x, final_start, final_end - final_start,
486 new_type);
487
451 real_updated_size += final_end - final_start; 488 real_updated_size += final_end - final_start;
452 489
490 /*
491 * left range could be head or tail, so need to update
492 * size at first.
493 */
453 ei->size -= final_end - final_start; 494 ei->size -= final_end - final_start;
454 if (ei->addr < final_start) 495 if (ei->addr < final_start)
455 continue; 496 continue;
@@ -461,13 +502,13 @@ static u64 __init e820_update_range_map(struct e820map *e820x, u64 start,
461u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, 502u64 __init e820_update_range(u64 start, u64 size, unsigned old_type,
462 unsigned new_type) 503 unsigned new_type)
463{ 504{
464 return e820_update_range_map(&e820, start, size, old_type, new_type); 505 return __e820_update_range(&e820, start, size, old_type, new_type);
465} 506}
466 507
467static u64 __init e820_update_range_saved(u64 start, u64 size, 508static u64 __init e820_update_range_saved(u64 start, u64 size,
468 unsigned old_type, unsigned new_type) 509 unsigned old_type, unsigned new_type)
469{ 510{
470 return e820_update_range_map(&e820_saved, start, size, old_type, 511 return __e820_update_range(&e820_saved, start, size, old_type,
471 new_type); 512 new_type);
472} 513}
473 514
@@ -511,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type,
511 552
512void __init update_e820(void) 553void __init update_e820(void)
513{ 554{
514 int nr_map; 555 u32 nr_map;
515 556
516 nr_map = e820.nr_map; 557 nr_map = e820.nr_map;
517 if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map)) 558 if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map))
@@ -522,7 +563,7 @@ void __init update_e820(void)
522} 563}
523static void __init update_e820_saved(void) 564static void __init update_e820_saved(void)
524{ 565{
525 int nr_map; 566 u32 nr_map;
526 567
527 nr_map = e820_saved.nr_map; 568 nr_map = e820_saved.nr_map;
528 if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map)) 569 if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map))
@@ -1020,8 +1061,8 @@ u64 __init find_e820_area_size(u64 start, u64 *sizep, u64 align)
1020 continue; 1061 continue;
1021 return addr; 1062 return addr;
1022 } 1063 }
1023 return -1UL;
1024 1064
1065 return -1ULL;
1025} 1066}
1026 1067
1027/* 1068/*
@@ -1034,13 +1075,22 @@ u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
1034 u64 start; 1075 u64 start;
1035 1076
1036 start = startt; 1077 start = startt;
1037 while (size < sizet) 1078 while (size < sizet && (start + 1))
1038 start = find_e820_area_size(start, &size, align); 1079 start = find_e820_area_size(start, &size, align);
1039 1080
1040 if (size < sizet) 1081 if (size < sizet)
1041 return 0; 1082 return 0;
1042 1083
1084#ifdef CONFIG_X86_32
1085 if (start >= MAXMEM)
1086 return 0;
1087 if (start + size > MAXMEM)
1088 size = MAXMEM - start;
1089#endif
1090
1043 addr = round_down(start + size - sizet, align); 1091 addr = round_down(start + size - sizet, align);
1092 if (addr < start)
1093 return 0;
1044 e820_update_range(addr, sizet, E820_RAM, E820_RESERVED); 1094 e820_update_range(addr, sizet, E820_RAM, E820_RESERVED);
1045 e820_update_range_saved(addr, sizet, E820_RAM, E820_RESERVED); 1095 e820_update_range_saved(addr, sizet, E820_RAM, E820_RESERVED);
1046 printk(KERN_INFO "update e820 for early_reserve_e820\n"); 1096 printk(KERN_INFO "update e820 for early_reserve_e820\n");
@@ -1253,7 +1303,7 @@ early_param("memmap", parse_memmap_opt);
1253void __init finish_e820_parsing(void) 1303void __init finish_e820_parsing(void)
1254{ 1304{
1255 if (userdef) { 1305 if (userdef) {
1256 int nr = e820.nr_map; 1306 u32 nr = e820.nr_map;
1257 1307
1258 if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0) 1308 if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0)
1259 early_panic("Invalid user supplied memory map"); 1309 early_panic("Invalid user supplied memory map");
@@ -1336,7 +1386,7 @@ void __init e820_reserve_resources_late(void)
1336char *__init default_machine_specific_memory_setup(void) 1386char *__init default_machine_specific_memory_setup(void)
1337{ 1387{
1338 char *who = "BIOS-e820"; 1388 char *who = "BIOS-e820";
1339 int new_nr; 1389 u32 new_nr;
1340 /* 1390 /*
1341 * Try to copy the BIOS-supplied E820-map. 1391 * Try to copy the BIOS-supplied E820-map.
1342 * 1392 *
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 639ad98238a2..335f049d110f 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -250,7 +250,7 @@ static int dbgp_wait_until_complete(void)
250 return (ctrl & DBGP_ERROR) ? -DBGP_ERRCODE(ctrl) : DBGP_LEN(ctrl); 250 return (ctrl & DBGP_ERROR) ? -DBGP_ERRCODE(ctrl) : DBGP_LEN(ctrl);
251} 251}
252 252
253static void dbgp_mdelay(int ms) 253static void __init dbgp_mdelay(int ms)
254{ 254{
255 int i; 255 int i;
256 256
@@ -311,7 +311,7 @@ static void dbgp_set_data(const void *buf, int size)
311 writel(hi, &ehci_debug->data47); 311 writel(hi, &ehci_debug->data47);
312} 312}
313 313
314static void dbgp_get_data(void *buf, int size) 314static void __init dbgp_get_data(void *buf, int size)
315{ 315{
316 unsigned char *bytes = buf; 316 unsigned char *bytes = buf;
317 u32 lo, hi; 317 u32 lo, hi;
@@ -355,7 +355,7 @@ static int dbgp_bulk_write(unsigned devnum, unsigned endpoint,
355 return ret; 355 return ret;
356} 356}
357 357
358static int dbgp_bulk_read(unsigned devnum, unsigned endpoint, void *data, 358static int __init dbgp_bulk_read(unsigned devnum, unsigned endpoint, void *data,
359 int size) 359 int size)
360{ 360{
361 u32 pids, addr, ctrl; 361 u32 pids, addr, ctrl;
@@ -386,8 +386,8 @@ static int dbgp_bulk_read(unsigned devnum, unsigned endpoint, void *data,
386 return ret; 386 return ret;
387} 387}
388 388
389static int dbgp_control_msg(unsigned devnum, int requesttype, int request, 389static int __init dbgp_control_msg(unsigned devnum, int requesttype,
390 int value, int index, void *data, int size) 390 int request, int value, int index, void *data, int size)
391{ 391{
392 u32 pids, addr, ctrl; 392 u32 pids, addr, ctrl;
393 struct usb_ctrlrequest req; 393 struct usb_ctrlrequest req;
@@ -489,7 +489,7 @@ static u32 __init find_dbgp(int ehci_num, u32 *rbus, u32 *rslot, u32 *rfunc)
489 return 0; 489 return 0;
490} 490}
491 491
492static int ehci_reset_port(int port) 492static int __init ehci_reset_port(int port)
493{ 493{
494 u32 portsc; 494 u32 portsc;
495 u32 delay_time, delay; 495 u32 delay_time, delay;
@@ -532,7 +532,7 @@ static int ehci_reset_port(int port)
532 return -EBUSY; 532 return -EBUSY;
533} 533}
534 534
535static int ehci_wait_for_port(int port) 535static int __init ehci_wait_for_port(int port)
536{ 536{
537 u32 status; 537 u32 status;
538 int ret, reps; 538 int ret, reps;
@@ -557,13 +557,13 @@ static inline void dbgp_printk(const char *fmt, ...) { }
557 557
558typedef void (*set_debug_port_t)(int port); 558typedef void (*set_debug_port_t)(int port);
559 559
560static void default_set_debug_port(int port) 560static void __init default_set_debug_port(int port)
561{ 561{
562} 562}
563 563
564static set_debug_port_t set_debug_port = default_set_debug_port; 564static set_debug_port_t __initdata set_debug_port = default_set_debug_port;
565 565
566static void nvidia_set_debug_port(int port) 566static void __init nvidia_set_debug_port(int port)
567{ 567{
568 u32 dword; 568 u32 dword;
569 dword = read_pci_config(ehci_dev.bus, ehci_dev.slot, ehci_dev.func, 569 dword = read_pci_config(ehci_dev.bus, ehci_dev.slot, ehci_dev.func,
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 899e8938e79f..c929add475c9 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -442,8 +442,7 @@ sysenter_past_esp:
442 442
443 GET_THREAD_INFO(%ebp) 443 GET_THREAD_INFO(%ebp)
444 444
445 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 445 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
446 testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
447 jnz sysenter_audit 446 jnz sysenter_audit
448sysenter_do_call: 447sysenter_do_call:
449 cmpl $(nr_syscalls), %eax 448 cmpl $(nr_syscalls), %eax
@@ -454,7 +453,7 @@ sysenter_do_call:
454 DISABLE_INTERRUPTS(CLBR_ANY) 453 DISABLE_INTERRUPTS(CLBR_ANY)
455 TRACE_IRQS_OFF 454 TRACE_IRQS_OFF
456 movl TI_flags(%ebp), %ecx 455 movl TI_flags(%ebp), %ecx
457 testw $_TIF_ALLWORK_MASK, %cx 456 testl $_TIF_ALLWORK_MASK, %ecx
458 jne sysexit_audit 457 jne sysexit_audit
459sysenter_exit: 458sysenter_exit:
460/* if something modifies registers it must also disable sysexit */ 459/* if something modifies registers it must also disable sysexit */
@@ -468,7 +467,7 @@ sysenter_exit:
468 467
469#ifdef CONFIG_AUDITSYSCALL 468#ifdef CONFIG_AUDITSYSCALL
470sysenter_audit: 469sysenter_audit:
471 testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp) 470 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
472 jnz syscall_trace_entry 471 jnz syscall_trace_entry
473 addl $4,%esp 472 addl $4,%esp
474 CFI_ADJUST_CFA_OFFSET -4 473 CFI_ADJUST_CFA_OFFSET -4
@@ -485,7 +484,7 @@ sysenter_audit:
485 jmp sysenter_do_call 484 jmp sysenter_do_call
486 485
487sysexit_audit: 486sysexit_audit:
488 testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx 487 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
489 jne syscall_exit_work 488 jne syscall_exit_work
490 TRACE_IRQS_ON 489 TRACE_IRQS_ON
491 ENABLE_INTERRUPTS(CLBR_ANY) 490 ENABLE_INTERRUPTS(CLBR_ANY)
@@ -498,7 +497,7 @@ sysexit_audit:
498 DISABLE_INTERRUPTS(CLBR_ANY) 497 DISABLE_INTERRUPTS(CLBR_ANY)
499 TRACE_IRQS_OFF 498 TRACE_IRQS_OFF
500 movl TI_flags(%ebp), %ecx 499 movl TI_flags(%ebp), %ecx
501 testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx 500 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
502 jne syscall_exit_work 501 jne syscall_exit_work
503 movl PT_EAX(%esp),%eax /* reload syscall return value */ 502 movl PT_EAX(%esp),%eax /* reload syscall return value */
504 jmp sysenter_exit 503 jmp sysenter_exit
@@ -523,8 +522,7 @@ ENTRY(system_call)
523 SAVE_ALL 522 SAVE_ALL
524 GET_THREAD_INFO(%ebp) 523 GET_THREAD_INFO(%ebp)
525 # system call tracing in operation / emulation 524 # system call tracing in operation / emulation
526 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 525 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
527 testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
528 jnz syscall_trace_entry 526 jnz syscall_trace_entry
529 cmpl $(nr_syscalls), %eax 527 cmpl $(nr_syscalls), %eax
530 jae syscall_badsys 528 jae syscall_badsys
@@ -538,7 +536,7 @@ syscall_exit:
538 # between sampling and the iret 536 # between sampling and the iret
539 TRACE_IRQS_OFF 537 TRACE_IRQS_OFF
540 movl TI_flags(%ebp), %ecx 538 movl TI_flags(%ebp), %ecx
541 testw $_TIF_ALLWORK_MASK, %cx # current->work 539 testl $_TIF_ALLWORK_MASK, %ecx # current->work
542 jne syscall_exit_work 540 jne syscall_exit_work
543 541
544restore_all: 542restore_all:
@@ -673,7 +671,7 @@ END(syscall_trace_entry)
673 # perform syscall exit tracing 671 # perform syscall exit tracing
674 ALIGN 672 ALIGN
675syscall_exit_work: 673syscall_exit_work:
676 testb $_TIF_WORK_SYSCALL_EXIT, %cl 674 testl $_TIF_WORK_SYSCALL_EXIT, %ecx
677 jz work_pending 675 jz work_pending
678 TRACE_IRQS_ON 676 TRACE_IRQS_ON
679 ENABLE_INTERRUPTS(CLBR_ANY) # could let syscall_trace_leave() call 677 ENABLE_INTERRUPTS(CLBR_ANY) # could let syscall_trace_leave() call
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 83d1836b9467..a331ec38af9e 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -368,6 +368,7 @@ ENTRY(save_rest)
368END(save_rest) 368END(save_rest)
369 369
370/* save complete stack frame */ 370/* save complete stack frame */
371 .pushsection .kprobes.text, "ax"
371ENTRY(save_paranoid) 372ENTRY(save_paranoid)
372 XCPT_FRAME 1 RDI+8 373 XCPT_FRAME 1 RDI+8
373 cld 374 cld
@@ -396,6 +397,7 @@ ENTRY(save_paranoid)
3961: ret 3971: ret
397 CFI_ENDPROC 398 CFI_ENDPROC
398END(save_paranoid) 399END(save_paranoid)
400 .popsection
399 401
400/* 402/*
401 * A newly forked process directly context switches into this address. 403 * A newly forked process directly context switches into this address.
@@ -416,7 +418,6 @@ ENTRY(ret_from_fork)
416 418
417 GET_THREAD_INFO(%rcx) 419 GET_THREAD_INFO(%rcx)
418 420
419 CFI_REMEMBER_STATE
420 RESTORE_REST 421 RESTORE_REST
421 422
422 testl $3, CS-ARGOFFSET(%rsp) # from kernel_thread? 423 testl $3, CS-ARGOFFSET(%rsp) # from kernel_thread?
@@ -428,7 +429,6 @@ ENTRY(ret_from_fork)
428 RESTORE_TOP_OF_STACK %rdi, -ARGOFFSET 429 RESTORE_TOP_OF_STACK %rdi, -ARGOFFSET
429 jmp ret_from_sys_call # go to the SYSRET fastpath 430 jmp ret_from_sys_call # go to the SYSRET fastpath
430 431
431 CFI_RESTORE_STATE
432 CFI_ENDPROC 432 CFI_ENDPROC
433END(ret_from_fork) 433END(ret_from_fork)
434 434
@@ -984,6 +984,8 @@ apicinterrupt UV_BAU_MESSAGE \
984#endif 984#endif
985apicinterrupt LOCAL_TIMER_VECTOR \ 985apicinterrupt LOCAL_TIMER_VECTOR \
986 apic_timer_interrupt smp_apic_timer_interrupt 986 apic_timer_interrupt smp_apic_timer_interrupt
987apicinterrupt GENERIC_INTERRUPT_VECTOR \
988 generic_interrupt smp_generic_interrupt
987 989
988#ifdef CONFIG_SMP 990#ifdef CONFIG_SMP
989apicinterrupt INVALIDATE_TLB_VECTOR_START+0 \ 991apicinterrupt INVALIDATE_TLB_VECTOR_START+0 \
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 231bdd3c5b1c..61df77532120 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -18,6 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/list.h> 19#include <linux/list.h>
20 20
21#include <asm/cacheflush.h>
21#include <asm/ftrace.h> 22#include <asm/ftrace.h>
22#include <linux/ftrace.h> 23#include <linux/ftrace.h>
23#include <asm/nops.h> 24#include <asm/nops.h>
@@ -26,6 +27,18 @@
26 27
27#ifdef CONFIG_DYNAMIC_FTRACE 28#ifdef CONFIG_DYNAMIC_FTRACE
28 29
30int ftrace_arch_code_modify_prepare(void)
31{
32 set_kernel_text_rw();
33 return 0;
34}
35
36int ftrace_arch_code_modify_post_process(void)
37{
38 set_kernel_text_ro();
39 return 0;
40}
41
29union ftrace_code_union { 42union ftrace_code_union {
30 char code[MCOUNT_INSN_SIZE]; 43 char code[MCOUNT_INSN_SIZE];
31 struct { 44 struct {
@@ -66,11 +79,11 @@ static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
66 * 79 *
67 * 1) Put the instruction pointer into the IP buffer 80 * 1) Put the instruction pointer into the IP buffer
68 * and the new code into the "code" buffer. 81 * and the new code into the "code" buffer.
69 * 2) Set a flag that says we are modifying code 82 * 2) Wait for any running NMIs to finish and set a flag that says
70 * 3) Wait for any running NMIs to finish. 83 * we are modifying code, it is done in an atomic operation.
71 * 4) Write the code 84 * 3) Write the code
72 * 5) clear the flag. 85 * 4) clear the flag.
73 * 6) Wait for any running NMIs to finish. 86 * 5) Wait for any running NMIs to finish.
74 * 87 *
75 * If an NMI is executed, the first thing it does is to call 88 * If an NMI is executed, the first thing it does is to call
76 * "ftrace_nmi_enter". This will check if the flag is set to write 89 * "ftrace_nmi_enter". This will check if the flag is set to write
@@ -82,9 +95,9 @@ static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
82 * are the same as what exists. 95 * are the same as what exists.
83 */ 96 */
84 97
85static atomic_t in_nmi = ATOMIC_INIT(0); 98#define MOD_CODE_WRITE_FLAG (1 << 31) /* set when NMI should do the write */
99static atomic_t nmi_running = ATOMIC_INIT(0);
86static int mod_code_status; /* holds return value of text write */ 100static int mod_code_status; /* holds return value of text write */
87static int mod_code_write; /* set when NMI should do the write */
88static void *mod_code_ip; /* holds the IP to write to */ 101static void *mod_code_ip; /* holds the IP to write to */
89static void *mod_code_newcode; /* holds the text to write to the IP */ 102static void *mod_code_newcode; /* holds the text to write to the IP */
90 103
@@ -101,6 +114,20 @@ int ftrace_arch_read_dyn_info(char *buf, int size)
101 return r; 114 return r;
102} 115}
103 116
117static void clear_mod_flag(void)
118{
119 int old = atomic_read(&nmi_running);
120
121 for (;;) {
122 int new = old & ~MOD_CODE_WRITE_FLAG;
123
124 if (old == new)
125 break;
126
127 old = atomic_cmpxchg(&nmi_running, old, new);
128 }
129}
130
104static void ftrace_mod_code(void) 131static void ftrace_mod_code(void)
105{ 132{
106 /* 133 /*
@@ -111,37 +138,52 @@ static void ftrace_mod_code(void)
111 */ 138 */
112 mod_code_status = probe_kernel_write(mod_code_ip, mod_code_newcode, 139 mod_code_status = probe_kernel_write(mod_code_ip, mod_code_newcode,
113 MCOUNT_INSN_SIZE); 140 MCOUNT_INSN_SIZE);
141
142 /* if we fail, then kill any new writers */
143 if (mod_code_status)
144 clear_mod_flag();
114} 145}
115 146
116void ftrace_nmi_enter(void) 147void ftrace_nmi_enter(void)
117{ 148{
118 atomic_inc(&in_nmi); 149 if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
119 /* Must have in_nmi seen before reading write flag */ 150 smp_rmb();
120 smp_mb();
121 if (mod_code_write) {
122 ftrace_mod_code(); 151 ftrace_mod_code();
123 atomic_inc(&nmi_update_count); 152 atomic_inc(&nmi_update_count);
124 } 153 }
154 /* Must have previous changes seen before executions */
155 smp_mb();
125} 156}
126 157
127void ftrace_nmi_exit(void) 158void ftrace_nmi_exit(void)
128{ 159{
129 /* Finish all executions before clearing in_nmi */ 160 /* Finish all executions before clearing nmi_running */
130 smp_wmb(); 161 smp_mb();
131 atomic_dec(&in_nmi); 162 atomic_dec(&nmi_running);
163}
164
165static void wait_for_nmi_and_set_mod_flag(void)
166{
167 if (!atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG))
168 return;
169
170 do {
171 cpu_relax();
172 } while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG));
173
174 nmi_wait_count++;
132} 175}
133 176
134static void wait_for_nmi(void) 177static void wait_for_nmi(void)
135{ 178{
136 int waited = 0; 179 if (!atomic_read(&nmi_running))
180 return;
137 181
138 while (atomic_read(&in_nmi)) { 182 do {
139 waited = 1;
140 cpu_relax(); 183 cpu_relax();
141 } 184 } while (atomic_read(&nmi_running));
142 185
143 if (waited) 186 nmi_wait_count++;
144 nmi_wait_count++;
145} 187}
146 188
147static int 189static int
@@ -151,14 +193,9 @@ do_ftrace_mod_code(unsigned long ip, void *new_code)
151 mod_code_newcode = new_code; 193 mod_code_newcode = new_code;
152 194
153 /* The buffers need to be visible before we let NMIs write them */ 195 /* The buffers need to be visible before we let NMIs write them */
154 smp_wmb();
155
156 mod_code_write = 1;
157
158 /* Make sure write bit is visible before we wait on NMIs */
159 smp_mb(); 196 smp_mb();
160 197
161 wait_for_nmi(); 198 wait_for_nmi_and_set_mod_flag();
162 199
163 /* Make sure all running NMIs have finished before we write the code */ 200 /* Make sure all running NMIs have finished before we write the code */
164 smp_mb(); 201 smp_mb();
@@ -166,13 +203,9 @@ do_ftrace_mod_code(unsigned long ip, void *new_code)
166 ftrace_mod_code(); 203 ftrace_mod_code();
167 204
168 /* Make sure the write happens before clearing the bit */ 205 /* Make sure the write happens before clearing the bit */
169 smp_wmb();
170
171 mod_code_write = 0;
172
173 /* make sure NMIs see the cleared bit */
174 smp_mb(); 206 smp_mb();
175 207
208 clear_mod_flag();
176 wait_for_nmi(); 209 wait_for_nmi();
177 210
178 return mod_code_status; 211 return mod_code_status;
@@ -368,100 +401,8 @@ int ftrace_disable_ftrace_graph_caller(void)
368 return ftrace_mod_jmp(ip, old_offset, new_offset); 401 return ftrace_mod_jmp(ip, old_offset, new_offset);
369} 402}
370 403
371#else /* CONFIG_DYNAMIC_FTRACE */
372
373/*
374 * These functions are picked from those used on
375 * this page for dynamic ftrace. They have been
376 * simplified to ignore all traces in NMI context.
377 */
378static atomic_t in_nmi;
379
380void ftrace_nmi_enter(void)
381{
382 atomic_inc(&in_nmi);
383}
384
385void ftrace_nmi_exit(void)
386{
387 atomic_dec(&in_nmi);
388}
389
390#endif /* !CONFIG_DYNAMIC_FTRACE */ 404#endif /* !CONFIG_DYNAMIC_FTRACE */
391 405
392/* Add a function return address to the trace stack on thread info.*/
393static int push_return_trace(unsigned long ret, unsigned long long time,
394 unsigned long func, int *depth)
395{
396 int index;
397
398 if (!current->ret_stack)
399 return -EBUSY;
400
401 /* The return trace stack is full */
402 if (current->curr_ret_stack == FTRACE_RETFUNC_DEPTH - 1) {
403 atomic_inc(&current->trace_overrun);
404 return -EBUSY;
405 }
406
407 index = ++current->curr_ret_stack;
408 barrier();
409 current->ret_stack[index].ret = ret;
410 current->ret_stack[index].func = func;
411 current->ret_stack[index].calltime = time;
412 *depth = index;
413
414 return 0;
415}
416
417/* Retrieve a function return address to the trace stack on thread info.*/
418static void pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret)
419{
420 int index;
421
422 index = current->curr_ret_stack;
423
424 if (unlikely(index < 0)) {
425 ftrace_graph_stop();
426 WARN_ON(1);
427 /* Might as well panic, otherwise we have no where to go */
428 *ret = (unsigned long)panic;
429 return;
430 }
431
432 *ret = current->ret_stack[index].ret;
433 trace->func = current->ret_stack[index].func;
434 trace->calltime = current->ret_stack[index].calltime;
435 trace->overrun = atomic_read(&current->trace_overrun);
436 trace->depth = index;
437 barrier();
438 current->curr_ret_stack--;
439
440}
441
442/*
443 * Send the trace to the ring-buffer.
444 * @return the original return address.
445 */
446unsigned long ftrace_return_to_handler(void)
447{
448 struct ftrace_graph_ret trace;
449 unsigned long ret;
450
451 pop_return_trace(&trace, &ret);
452 trace.rettime = cpu_clock(raw_smp_processor_id());
453 ftrace_graph_return(&trace);
454
455 if (unlikely(!ret)) {
456 ftrace_graph_stop();
457 WARN_ON(1);
458 /* Might as well panic. What else to do? */
459 ret = (unsigned long)panic;
460 }
461
462 return ret;
463}
464
465/* 406/*
466 * Hook the return address and push it in the stack of return addrs 407 * Hook the return address and push it in the stack of return addrs
467 * in current thread info. 408 * in current thread info.
@@ -469,14 +410,13 @@ unsigned long ftrace_return_to_handler(void)
469void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) 410void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
470{ 411{
471 unsigned long old; 412 unsigned long old;
472 unsigned long long calltime;
473 int faulted; 413 int faulted;
474 struct ftrace_graph_ent trace; 414 struct ftrace_graph_ent trace;
475 unsigned long return_hooker = (unsigned long) 415 unsigned long return_hooker = (unsigned long)
476 &return_to_handler; 416 &return_to_handler;
477 417
478 /* Nmi's are currently unsupported */ 418 /* Nmi's are currently unsupported */
479 if (unlikely(atomic_read(&in_nmi))) 419 if (unlikely(in_nmi()))
480 return; 420 return;
481 421
482 if (unlikely(atomic_read(&current->tracing_graph_pause))) 422 if (unlikely(atomic_read(&current->tracing_graph_pause)))
@@ -512,17 +452,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
512 return; 452 return;
513 } 453 }
514 454
515 if (unlikely(!__kernel_text_address(old))) { 455 if (ftrace_push_return_trace(old, self_addr, &trace.depth) == -EBUSY) {
516 ftrace_graph_stop();
517 *parent = old;
518 WARN_ON(1);
519 return;
520 }
521
522 calltime = cpu_clock(raw_smp_processor_id());
523
524 if (push_return_trace(old, calltime,
525 self_addr, &trace.depth) == -EBUSY) {
526 *parent = old; 456 *parent = old;
527 return; 457 return;
528 } 458 }
@@ -536,3 +466,66 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
536 } 466 }
537} 467}
538#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 468#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
469
470#ifdef CONFIG_FTRACE_SYSCALLS
471
472extern unsigned long __start_syscalls_metadata[];
473extern unsigned long __stop_syscalls_metadata[];
474extern unsigned long *sys_call_table;
475
476static struct syscall_metadata **syscalls_metadata;
477
478static struct syscall_metadata *find_syscall_meta(unsigned long *syscall)
479{
480 struct syscall_metadata *start;
481 struct syscall_metadata *stop;
482 char str[KSYM_SYMBOL_LEN];
483
484
485 start = (struct syscall_metadata *)__start_syscalls_metadata;
486 stop = (struct syscall_metadata *)__stop_syscalls_metadata;
487 kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
488
489 for ( ; start < stop; start++) {
490 if (start->name && !strcmp(start->name, str))
491 return start;
492 }
493 return NULL;
494}
495
496struct syscall_metadata *syscall_nr_to_meta(int nr)
497{
498 if (!syscalls_metadata || nr >= FTRACE_SYSCALL_MAX || nr < 0)
499 return NULL;
500
501 return syscalls_metadata[nr];
502}
503
504void arch_init_ftrace_syscalls(void)
505{
506 int i;
507 struct syscall_metadata *meta;
508 unsigned long **psys_syscall_table = &sys_call_table;
509 static atomic_t refs;
510
511 if (atomic_inc_return(&refs) != 1)
512 goto end;
513
514 syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
515 FTRACE_SYSCALL_MAX, GFP_KERNEL);
516 if (!syscalls_metadata) {
517 WARN_ON(1);
518 return;
519 }
520
521 for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
522 meta = find_syscall_meta(psys_syscall_table[i]);
523 syscalls_metadata[i] = meta;
524 }
525 return;
526
527 /* Paranoid: avoid overflow */
528end:
529 atomic_dec(&refs);
530}
531#endif
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index ac108d1fe182..3f8579f8d42c 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -18,7 +18,7 @@ void __init i386_start_kernel(void)
18{ 18{
19 reserve_trampoline_memory(); 19 reserve_trampoline_memory();
20 20
21 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); 21 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
22 22
23#ifdef CONFIG_BLK_DEV_INITRD 23#ifdef CONFIG_BLK_DEV_INITRD
24 /* Reserve INITRD */ 24 /* Reserve INITRD */
@@ -29,9 +29,6 @@ void __init i386_start_kernel(void)
29 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 29 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
30 } 30 }
31#endif 31#endif
32 reserve_early(init_pg_tables_start, init_pg_tables_end,
33 "INIT_PG_TABLE");
34
35 reserve_ebda_region(); 32 reserve_ebda_region();
36 33
37 /* 34 /*
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index f5b272247690..70eaa852c732 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -100,7 +100,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
100 100
101 reserve_trampoline_memory(); 101 reserve_trampoline_memory();
102 102
103 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); 103 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
104 104
105#ifdef CONFIG_BLK_DEV_INITRD 105#ifdef CONFIG_BLK_DEV_INITRD
106 /* Reserve INITRD */ 106 /* Reserve INITRD */
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index c32ca19d591a..30683883e0cd 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -38,42 +38,40 @@
38#define X86_VENDOR_ID new_cpu_data+CPUINFO_x86_vendor_id 38#define X86_VENDOR_ID new_cpu_data+CPUINFO_x86_vendor_id
39 39
40/* 40/*
41 * This is how much memory *in addition to the memory covered up to 41 * This is how much memory in addition to the memory covered up to
42 * and including _end* we need mapped initially. 42 * and including _end we need mapped initially.
43 * We need: 43 * We need:
44 * - one bit for each possible page, but only in low memory, which means 44 * (KERNEL_IMAGE_SIZE/4096) / 1024 pages (worst case, non PAE)
45 * 2^32/4096/8 = 128K worst case (4G/4G split.) 45 * (KERNEL_IMAGE_SIZE/4096) / 512 + 4 pages (worst case for PAE)
46 * - enough space to map all low memory, which means
47 * (2^32/4096) / 1024 pages (worst case, non PAE)
48 * (2^32/4096) / 512 + 4 pages (worst case for PAE)
49 * - a few pages for allocator use before the kernel pagetable has
50 * been set up
51 * 46 *
52 * Modulo rounding, each megabyte assigned here requires a kilobyte of 47 * Modulo rounding, each megabyte assigned here requires a kilobyte of
53 * memory, which is currently unreclaimed. 48 * memory, which is currently unreclaimed.
54 * 49 *
55 * This should be a multiple of a page. 50 * This should be a multiple of a page.
51 *
52 * KERNEL_IMAGE_SIZE should be greater than pa(_end)
53 * and small than max_low_pfn, otherwise will waste some page table entries
56 */ 54 */
57LOW_PAGES = 1<<(32-PAGE_SHIFT_asm)
58
59/*
60 * To preserve the DMA pool in PAGEALLOC kernels, we'll allocate
61 * pagetables from above the 16MB DMA limit, so we'll have to set
62 * up pagetables 16MB more (worst-case):
63 */
64#ifdef CONFIG_DEBUG_PAGEALLOC
65LOW_PAGES = LOW_PAGES + 0x1000000
66#endif
67 55
68#if PTRS_PER_PMD > 1 56#if PTRS_PER_PMD > 1
69PAGE_TABLE_SIZE = (LOW_PAGES / PTRS_PER_PMD) + PTRS_PER_PGD 57#define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD)
70#else 58#else
71PAGE_TABLE_SIZE = (LOW_PAGES / PTRS_PER_PGD) 59#define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
72#endif 60#endif
73BOOTBITMAP_SIZE = LOW_PAGES / 8
74ALLOCATOR_SLOP = 4
75 61
76INIT_MAP_BEYOND_END = BOOTBITMAP_SIZE + (PAGE_TABLE_SIZE + ALLOCATOR_SLOP)*PAGE_SIZE_asm 62/* Enough space to fit pagetables for the low memory linear map */
63MAPPING_BEYOND_END = \
64 PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
65
66/*
67 * Worst-case size of the kernel mapping we need to make:
68 * the worst-case size of the kernel itself, plus the extra we need
69 * to map for the linear map.
70 */
71KERNEL_PAGES = (KERNEL_IMAGE_SIZE + MAPPING_BEYOND_END)>>PAGE_SHIFT
72
73INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_PAGES) * PAGE_SIZE_asm
74RESERVE_BRK(pagetables, INIT_MAP_SIZE)
77 75
78/* 76/*
79 * 32-bit kernel entrypoint; only used by the boot CPU. On entry, 77 * 32-bit kernel entrypoint; only used by the boot CPU. On entry,
@@ -166,10 +164,10 @@ num_subarch_entries = (. - subarch_entries) / 4
166 164
167/* 165/*
168 * Initialize page tables. This creates a PDE and a set of page 166 * Initialize page tables. This creates a PDE and a set of page
169 * tables, which are located immediately beyond _end. The variable 167 * tables, which are located immediately beyond __brk_base. The variable
170 * init_pg_tables_end is set up to point to the first "safe" location. 168 * _brk_end is set up to point to the first "safe" location.
171 * Mappings are created both at virtual address 0 (identity mapping) 169 * Mappings are created both at virtual address 0 (identity mapping)
172 * and PAGE_OFFSET for up to _end+sizeof(page tables)+INIT_MAP_BEYOND_END. 170 * and PAGE_OFFSET for up to _end.
173 * 171 *
174 * Note that the stack is not yet set up! 172 * Note that the stack is not yet set up!
175 */ 173 */
@@ -190,8 +188,7 @@ default_entry:
190 188
191 xorl %ebx,%ebx /* %ebx is kept at zero */ 189 xorl %ebx,%ebx /* %ebx is kept at zero */
192 190
193 movl $pa(pg0), %edi 191 movl $pa(__brk_base), %edi
194 movl %edi, pa(init_pg_tables_start)
195 movl $pa(swapper_pg_pmd), %edx 192 movl $pa(swapper_pg_pmd), %edx
196 movl $PTE_IDENT_ATTR, %eax 193 movl $PTE_IDENT_ATTR, %eax
19710: 19410:
@@ -209,14 +206,14 @@ default_entry:
209 loop 11b 206 loop 11b
210 207
211 /* 208 /*
212 * End condition: we must map up to and including INIT_MAP_BEYOND_END 209 * End condition: we must map up to the end + MAPPING_BEYOND_END.
213 * bytes beyond the end of our own page tables.
214 */ 210 */
215 leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp 211 movl $pa(_end) + MAPPING_BEYOND_END + PTE_IDENT_ATTR, %ebp
216 cmpl %ebp,%eax 212 cmpl %ebp,%eax
217 jb 10b 213 jb 10b
2181: 2141:
219 movl %edi,pa(init_pg_tables_end) 215 addl $__PAGE_OFFSET, %edi
216 movl %edi, pa(_brk_end)
220 shrl $12, %eax 217 shrl $12, %eax
221 movl %eax, pa(max_pfn_mapped) 218 movl %eax, pa(max_pfn_mapped)
222 219
@@ -227,8 +224,7 @@ default_entry:
227 224
228page_pde_offset = (__PAGE_OFFSET >> 20); 225page_pde_offset = (__PAGE_OFFSET >> 20);
229 226
230 movl $pa(pg0), %edi 227 movl $pa(__brk_base), %edi
231 movl %edi, pa(init_pg_tables_start)
232 movl $pa(swapper_pg_dir), %edx 228 movl $pa(swapper_pg_dir), %edx
233 movl $PTE_IDENT_ATTR, %eax 229 movl $PTE_IDENT_ATTR, %eax
23410: 23010:
@@ -242,14 +238,13 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
242 addl $0x1000,%eax 238 addl $0x1000,%eax
243 loop 11b 239 loop 11b
244 /* 240 /*
245 * End condition: we must map up to and including INIT_MAP_BEYOND_END 241 * End condition: we must map up to the end + MAPPING_BEYOND_END.
246 * bytes beyond the end of our own page tables; the +0x007 is
247 * the attribute bits
248 */ 242 */
249 leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp 243 movl $pa(_end) + MAPPING_BEYOND_END + PTE_IDENT_ATTR, %ebp
250 cmpl %ebp,%eax 244 cmpl %ebp,%eax
251 jb 10b 245 jb 10b
252 movl %edi,pa(init_pg_tables_end) 246 addl $__PAGE_OFFSET, %edi
247 movl %edi, pa(_brk_end)
253 shrl $12, %eax 248 shrl $12, %eax
254 movl %eax, pa(max_pfn_mapped) 249 movl %eax, pa(max_pfn_mapped)
255 250
@@ -636,6 +631,7 @@ swapper_pg_fixmap:
636 .fill 1024,4,0 631 .fill 1024,4,0
637ENTRY(empty_zero_page) 632ENTRY(empty_zero_page)
638 .fill 4096,1,0 633 .fill 4096,1,0
634
639/* 635/*
640 * This starts the data section. 636 * This starts the data section.
641 */ 637 */
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c
index 10f92fb532f3..3475440baa54 100644
--- a/arch/x86/kernel/i8253.c
+++ b/arch/x86/kernel/i8253.c
@@ -3,17 +3,17 @@
3 * 3 *
4 */ 4 */
5#include <linux/clockchips.h> 5#include <linux/clockchips.h>
6#include <linux/init.h>
7#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/spinlock.h>
8#include <linux/jiffies.h> 8#include <linux/jiffies.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/spinlock.h> 10#include <linux/delay.h>
11#include <linux/init.h>
12#include <linux/io.h>
11 13
12#include <asm/smp.h>
13#include <asm/delay.h>
14#include <asm/i8253.h> 14#include <asm/i8253.h>
15#include <asm/io.h>
16#include <asm/hpet.h> 15#include <asm/hpet.h>
16#include <asm/smp.h>
17 17
18DEFINE_SPINLOCK(i8253_lock); 18DEFINE_SPINLOCK(i8253_lock);
19EXPORT_SYMBOL(i8253_lock); 19EXPORT_SYMBOL(i8253_lock);
@@ -40,7 +40,7 @@ static void init_pit_timer(enum clock_event_mode mode,
40{ 40{
41 spin_lock(&i8253_lock); 41 spin_lock(&i8253_lock);
42 42
43 switch(mode) { 43 switch (mode) {
44 case CLOCK_EVT_MODE_PERIODIC: 44 case CLOCK_EVT_MODE_PERIODIC:
45 /* binary, mode 2, LSB/MSB, ch 0 */ 45 /* binary, mode 2, LSB/MSB, ch 0 */
46 outb_pit(0x34, PIT_MODE); 46 outb_pit(0x34, PIT_MODE);
@@ -95,7 +95,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
95 * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - 95 * registered. This mechanism replaces the previous #ifdef LOCAL_APIC -
96 * !using_apic_timer decisions in do_timer_interrupt_hook() 96 * !using_apic_timer decisions in do_timer_interrupt_hook()
97 */ 97 */
98static struct clock_event_device pit_clockevent = { 98static struct clock_event_device pit_ce = {
99 .name = "pit", 99 .name = "pit",
100 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 100 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
101 .set_mode = init_pit_timer, 101 .set_mode = init_pit_timer,
@@ -114,15 +114,13 @@ void __init setup_pit_timer(void)
114 * Start pit with the boot cpu mask and make it global after the 114 * Start pit with the boot cpu mask and make it global after the
115 * IO_APIC has been initialized. 115 * IO_APIC has been initialized.
116 */ 116 */
117 pit_clockevent.cpumask = cpumask_of(smp_processor_id()); 117 pit_ce.cpumask = cpumask_of(smp_processor_id());
118 pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 118 pit_ce.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, pit_ce.shift);
119 pit_clockevent.shift); 119 pit_ce.max_delta_ns = clockevent_delta2ns(0x7FFF, &pit_ce);
120 pit_clockevent.max_delta_ns = 120 pit_ce.min_delta_ns = clockevent_delta2ns(0xF, &pit_ce);
121 clockevent_delta2ns(0x7FFF, &pit_clockevent); 121
122 pit_clockevent.min_delta_ns = 122 clockevents_register_device(&pit_ce);
123 clockevent_delta2ns(0xF, &pit_clockevent); 123 global_clock_event = &pit_ce;
124 clockevents_register_device(&pit_clockevent);
125 global_clock_event = &pit_clockevent;
126} 124}
127 125
128#ifndef CONFIG_X86_64 126#ifndef CONFIG_X86_64
@@ -133,11 +131,11 @@ void __init setup_pit_timer(void)
133 */ 131 */
134static cycle_t pit_read(void) 132static cycle_t pit_read(void)
135{ 133{
134 static int old_count;
135 static u32 old_jifs;
136 unsigned long flags; 136 unsigned long flags;
137 int count; 137 int count;
138 u32 jifs; 138 u32 jifs;
139 static int old_count;
140 static u32 old_jifs;
141 139
142 spin_lock_irqsave(&i8253_lock, flags); 140 spin_lock_irqsave(&i8253_lock, flags);
143 /* 141 /*
@@ -179,9 +177,9 @@ static cycle_t pit_read(void)
179 * Previous attempts to handle these cases intelligently were 177 * Previous attempts to handle these cases intelligently were
180 * buggy, so we just do the simple thing now. 178 * buggy, so we just do the simple thing now.
181 */ 179 */
182 if (count > old_count && jifs == old_jifs) { 180 if (count > old_count && jifs == old_jifs)
183 count = old_count; 181 count = old_count;
184 } 182
185 old_count = count; 183 old_count = count;
186 old_jifs = jifs; 184 old_jifs = jifs;
187 185
@@ -192,13 +190,13 @@ static cycle_t pit_read(void)
192 return (cycle_t)(jifs * LATCH) + count; 190 return (cycle_t)(jifs * LATCH) + count;
193} 191}
194 192
195static struct clocksource clocksource_pit = { 193static struct clocksource pit_cs = {
196 .name = "pit", 194 .name = "pit",
197 .rating = 110, 195 .rating = 110,
198 .read = pit_read, 196 .read = pit_read,
199 .mask = CLOCKSOURCE_MASK(32), 197 .mask = CLOCKSOURCE_MASK(32),
200 .mult = 0, 198 .mult = 0,
201 .shift = 20, 199 .shift = 20,
202}; 200};
203 201
204static void pit_disable_clocksource(void) 202static void pit_disable_clocksource(void)
@@ -206,9 +204,9 @@ static void pit_disable_clocksource(void)
206 /* 204 /*
207 * Use mult to check whether it is registered or not 205 * Use mult to check whether it is registered or not
208 */ 206 */
209 if (clocksource_pit.mult) { 207 if (pit_cs.mult) {
210 clocksource_unregister(&clocksource_pit); 208 clocksource_unregister(&pit_cs);
211 clocksource_pit.mult = 0; 209 pit_cs.mult = 0;
212 } 210 }
213} 211}
214 212
@@ -222,13 +220,13 @@ static int __init init_pit_clocksource(void)
222 * - when local APIC timer is active (PIT is switched off) 220 * - when local APIC timer is active (PIT is switched off)
223 */ 221 */
224 if (num_possible_cpus() > 1 || is_hpet_enabled() || 222 if (num_possible_cpus() > 1 || is_hpet_enabled() ||
225 pit_clockevent.mode != CLOCK_EVT_MODE_PERIODIC) 223 pit_ce.mode != CLOCK_EVT_MODE_PERIODIC)
226 return 0; 224 return 0;
227 225
228 clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 226 pit_cs.mult = clocksource_hz2mult(CLOCK_TICK_RATE, pit_cs.shift);
229 clocksource_pit.shift); 227
230 return clocksource_register(&clocksource_pit); 228 return clocksource_register(&pit_cs);
231} 229}
232arch_initcall(init_pit_clocksource); 230arch_initcall(init_pit_clocksource);
233 231
234#endif 232#endif /* !CONFIG_X86_64 */
diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c
index 720d2607aacb..a979b5bd2fc0 100644
--- a/arch/x86/kernel/io_delay.c
+++ b/arch/x86/kernel/io_delay.c
@@ -7,10 +7,10 @@
7 */ 7 */
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/init.h>
11#include <linux/delay.h> 10#include <linux/delay.h>
11#include <linux/init.h>
12#include <linux/dmi.h> 12#include <linux/dmi.h>
13#include <asm/io.h> 13#include <linux/io.h>
14 14
15int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; 15int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE;
16 16
@@ -47,8 +47,7 @@ EXPORT_SYMBOL(native_io_delay);
47static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id) 47static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)
48{ 48{
49 if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) { 49 if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) {
50 printk(KERN_NOTICE "%s: using 0xed I/O delay port\n", 50 pr_notice("%s: using 0xed I/O delay port\n", id->ident);
51 id->ident);
52 io_delay_type = CONFIG_IO_DELAY_TYPE_0XED; 51 io_delay_type = CONFIG_IO_DELAY_TYPE_0XED;
53 } 52 }
54 53
@@ -64,40 +63,40 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {
64 .callback = dmi_io_delay_0xed_port, 63 .callback = dmi_io_delay_0xed_port,
65 .ident = "Compaq Presario V6000", 64 .ident = "Compaq Presario V6000",
66 .matches = { 65 .matches = {
67 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), 66 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
68 DMI_MATCH(DMI_BOARD_NAME, "30B7") 67 DMI_MATCH(DMI_BOARD_NAME, "30B7")
69 } 68 }
70 }, 69 },
71 { 70 {
72 .callback = dmi_io_delay_0xed_port, 71 .callback = dmi_io_delay_0xed_port,
73 .ident = "HP Pavilion dv9000z", 72 .ident = "HP Pavilion dv9000z",
74 .matches = { 73 .matches = {
75 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), 74 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
76 DMI_MATCH(DMI_BOARD_NAME, "30B9") 75 DMI_MATCH(DMI_BOARD_NAME, "30B9")
77 } 76 }
78 }, 77 },
79 { 78 {
80 .callback = dmi_io_delay_0xed_port, 79 .callback = dmi_io_delay_0xed_port,
81 .ident = "HP Pavilion dv6000", 80 .ident = "HP Pavilion dv6000",
82 .matches = { 81 .matches = {
83 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), 82 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
84 DMI_MATCH(DMI_BOARD_NAME, "30B8") 83 DMI_MATCH(DMI_BOARD_NAME, "30B8")
85 } 84 }
86 }, 85 },
87 { 86 {
88 .callback = dmi_io_delay_0xed_port, 87 .callback = dmi_io_delay_0xed_port,
89 .ident = "HP Pavilion tx1000", 88 .ident = "HP Pavilion tx1000",
90 .matches = { 89 .matches = {
91 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), 90 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
92 DMI_MATCH(DMI_BOARD_NAME, "30BF") 91 DMI_MATCH(DMI_BOARD_NAME, "30BF")
93 } 92 }
94 }, 93 },
95 { 94 {
96 .callback = dmi_io_delay_0xed_port, 95 .callback = dmi_io_delay_0xed_port,
97 .ident = "Presario F700", 96 .ident = "Presario F700",
98 .matches = { 97 .matches = {
99 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), 98 DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
100 DMI_MATCH(DMI_BOARD_NAME, "30D3") 99 DMI_MATCH(DMI_BOARD_NAME, "30D3")
101 } 100 }
102 }, 101 },
103 { } 102 { }
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index f13ca1650aaf..3aaf7b9e3a8b 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -15,6 +15,9 @@
15 15
16atomic_t irq_err_count; 16atomic_t irq_err_count;
17 17
18/* Function pointer for generic interrupt vector handling */
19void (*generic_interrupt_extension)(void) = NULL;
20
18/* 21/*
19 * 'what should we do if we get a hw irq event on an illegal vector'. 22 * 'what should we do if we get a hw irq event on an illegal vector'.
20 * each architecture has to answer this themselves. 23 * each architecture has to answer this themselves.
@@ -42,55 +45,60 @@ void ack_bad_irq(unsigned int irq)
42/* 45/*
43 * /proc/interrupts printing: 46 * /proc/interrupts printing:
44 */ 47 */
45static int show_other_interrupts(struct seq_file *p) 48static int show_other_interrupts(struct seq_file *p, int prec)
46{ 49{
47 int j; 50 int j;
48 51
49 seq_printf(p, "NMI: "); 52 seq_printf(p, "%*s: ", prec, "NMI");
50 for_each_online_cpu(j) 53 for_each_online_cpu(j)
51 seq_printf(p, "%10u ", irq_stats(j)->__nmi_count); 54 seq_printf(p, "%10u ", irq_stats(j)->__nmi_count);
52 seq_printf(p, " Non-maskable interrupts\n"); 55 seq_printf(p, " Non-maskable interrupts\n");
53#ifdef CONFIG_X86_LOCAL_APIC 56#ifdef CONFIG_X86_LOCAL_APIC
54 seq_printf(p, "LOC: "); 57 seq_printf(p, "%*s: ", prec, "LOC");
55 for_each_online_cpu(j) 58 for_each_online_cpu(j)
56 seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); 59 seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs);
57 seq_printf(p, " Local timer interrupts\n"); 60 seq_printf(p, " Local timer interrupts\n");
61
62 seq_printf(p, "%*s: ", prec, "SPU");
63 for_each_online_cpu(j)
64 seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
65 seq_printf(p, " Spurious interrupts\n");
58#endif 66#endif
67 if (generic_interrupt_extension) {
68 seq_printf(p, "PLT: ");
69 for_each_online_cpu(j)
70 seq_printf(p, "%10u ", irq_stats(j)->generic_irqs);
71 seq_printf(p, " Platform interrupts\n");
72 }
59#ifdef CONFIG_SMP 73#ifdef CONFIG_SMP
60 seq_printf(p, "RES: "); 74 seq_printf(p, "%*s: ", prec, "RES");
61 for_each_online_cpu(j) 75 for_each_online_cpu(j)
62 seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count); 76 seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count);
63 seq_printf(p, " Rescheduling interrupts\n"); 77 seq_printf(p, " Rescheduling interrupts\n");
64 seq_printf(p, "CAL: "); 78 seq_printf(p, "%*s: ", prec, "CAL");
65 for_each_online_cpu(j) 79 for_each_online_cpu(j)
66 seq_printf(p, "%10u ", irq_stats(j)->irq_call_count); 80 seq_printf(p, "%10u ", irq_stats(j)->irq_call_count);
67 seq_printf(p, " Function call interrupts\n"); 81 seq_printf(p, " Function call interrupts\n");
68 seq_printf(p, "TLB: "); 82 seq_printf(p, "%*s: ", prec, "TLB");
69 for_each_online_cpu(j) 83 for_each_online_cpu(j)
70 seq_printf(p, "%10u ", irq_stats(j)->irq_tlb_count); 84 seq_printf(p, "%10u ", irq_stats(j)->irq_tlb_count);
71 seq_printf(p, " TLB shootdowns\n"); 85 seq_printf(p, " TLB shootdowns\n");
72#endif 86#endif
73#ifdef CONFIG_X86_MCE 87#ifdef CONFIG_X86_MCE
74 seq_printf(p, "TRM: "); 88 seq_printf(p, "%*s: ", prec, "TRM");
75 for_each_online_cpu(j) 89 for_each_online_cpu(j)
76 seq_printf(p, "%10u ", irq_stats(j)->irq_thermal_count); 90 seq_printf(p, "%10u ", irq_stats(j)->irq_thermal_count);
77 seq_printf(p, " Thermal event interrupts\n"); 91 seq_printf(p, " Thermal event interrupts\n");
78# ifdef CONFIG_X86_64 92# ifdef CONFIG_X86_64
79 seq_printf(p, "THR: "); 93 seq_printf(p, "%*s: ", prec, "THR");
80 for_each_online_cpu(j) 94 for_each_online_cpu(j)
81 seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count); 95 seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count);
82 seq_printf(p, " Threshold APIC interrupts\n"); 96 seq_printf(p, " Threshold APIC interrupts\n");
83# endif 97# endif
84#endif 98#endif
85#ifdef CONFIG_X86_LOCAL_APIC 99 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
86 seq_printf(p, "SPU: ");
87 for_each_online_cpu(j)
88 seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
89 seq_printf(p, " Spurious interrupts\n");
90#endif
91 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
92#if defined(CONFIG_X86_IO_APIC) 100#if defined(CONFIG_X86_IO_APIC)
93 seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); 101 seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
94#endif 102#endif
95 return 0; 103 return 0;
96} 104}
@@ -98,19 +106,22 @@ static int show_other_interrupts(struct seq_file *p)
98int show_interrupts(struct seq_file *p, void *v) 106int show_interrupts(struct seq_file *p, void *v)
99{ 107{
100 unsigned long flags, any_count = 0; 108 unsigned long flags, any_count = 0;
101 int i = *(loff_t *) v, j; 109 int i = *(loff_t *) v, j, prec;
102 struct irqaction *action; 110 struct irqaction *action;
103 struct irq_desc *desc; 111 struct irq_desc *desc;
104 112
105 if (i > nr_irqs) 113 if (i > nr_irqs)
106 return 0; 114 return 0;
107 115
116 for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec)
117 j *= 10;
118
108 if (i == nr_irqs) 119 if (i == nr_irqs)
109 return show_other_interrupts(p); 120 return show_other_interrupts(p, prec);
110 121
111 /* print header */ 122 /* print header */
112 if (i == 0) { 123 if (i == 0) {
113 seq_printf(p, " "); 124 seq_printf(p, "%*s", prec + 8, "");
114 for_each_online_cpu(j) 125 for_each_online_cpu(j)
115 seq_printf(p, "CPU%-8d", j); 126 seq_printf(p, "CPU%-8d", j);
116 seq_putc(p, '\n'); 127 seq_putc(p, '\n');
@@ -121,23 +132,15 @@ int show_interrupts(struct seq_file *p, void *v)
121 return 0; 132 return 0;
122 133
123 spin_lock_irqsave(&desc->lock, flags); 134 spin_lock_irqsave(&desc->lock, flags);
124#ifndef CONFIG_SMP
125 any_count = kstat_irqs(i);
126#else
127 for_each_online_cpu(j) 135 for_each_online_cpu(j)
128 any_count |= kstat_irqs_cpu(i, j); 136 any_count |= kstat_irqs_cpu(i, j);
129#endif
130 action = desc->action; 137 action = desc->action;
131 if (!action && !any_count) 138 if (!action && !any_count)
132 goto out; 139 goto out;
133 140
134 seq_printf(p, "%3d: ", i); 141 seq_printf(p, "%*d: ", prec, i);
135#ifndef CONFIG_SMP
136 seq_printf(p, "%10u ", kstat_irqs(i));
137#else
138 for_each_online_cpu(j) 142 for_each_online_cpu(j)
139 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 143 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
140#endif
141 seq_printf(p, " %8s", desc->chip->name); 144 seq_printf(p, " %8s", desc->chip->name);
142 seq_printf(p, "-%-8s", desc->name); 145 seq_printf(p, "-%-8s", desc->name);
143 146
@@ -162,7 +165,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
162 165
163#ifdef CONFIG_X86_LOCAL_APIC 166#ifdef CONFIG_X86_LOCAL_APIC
164 sum += irq_stats(cpu)->apic_timer_irqs; 167 sum += irq_stats(cpu)->apic_timer_irqs;
168 sum += irq_stats(cpu)->irq_spurious_count;
165#endif 169#endif
170 if (generic_interrupt_extension)
171 sum += irq_stats(cpu)->generic_irqs;
166#ifdef CONFIG_SMP 172#ifdef CONFIG_SMP
167 sum += irq_stats(cpu)->irq_resched_count; 173 sum += irq_stats(cpu)->irq_resched_count;
168 sum += irq_stats(cpu)->irq_call_count; 174 sum += irq_stats(cpu)->irq_call_count;
@@ -174,9 +180,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
174 sum += irq_stats(cpu)->irq_threshold_count; 180 sum += irq_stats(cpu)->irq_threshold_count;
175#endif 181#endif
176#endif 182#endif
177#ifdef CONFIG_X86_LOCAL_APIC
178 sum += irq_stats(cpu)->irq_spurious_count;
179#endif
180 return sum; 183 return sum;
181} 184}
182 185
@@ -226,4 +229,27 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
226 return 1; 229 return 1;
227} 230}
228 231
232/*
233 * Handler for GENERIC_INTERRUPT_VECTOR.
234 */
235void smp_generic_interrupt(struct pt_regs *regs)
236{
237 struct pt_regs *old_regs = set_irq_regs(regs);
238
239 ack_APIC_irq();
240
241 exit_idle();
242
243 irq_enter();
244
245 inc_irq_stat(generic_irqs);
246
247 if (generic_interrupt_extension)
248 generic_interrupt_extension();
249
250 irq_exit();
251
252 set_irq_regs(old_regs);
253}
254
229EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); 255EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq);
diff --git a/arch/x86/kernel/irqinit_32.c b/arch/x86/kernel/irqinit_32.c
index 50b8c3a3006c..368b0a8836f9 100644
--- a/arch/x86/kernel/irqinit_32.c
+++ b/arch/x86/kernel/irqinit_32.c
@@ -50,7 +50,6 @@ static irqreturn_t math_error_irq(int cpl, void *dev_id)
50 */ 50 */
51static struct irqaction fpu_irq = { 51static struct irqaction fpu_irq = {
52 .handler = math_error_irq, 52 .handler = math_error_irq,
53 .mask = CPU_MASK_NONE,
54 .name = "fpu", 53 .name = "fpu",
55}; 54};
56 55
@@ -83,7 +82,6 @@ void __init init_ISA_irqs(void)
83 */ 82 */
84static struct irqaction irq2 = { 83static struct irqaction irq2 = {
85 .handler = no_action, 84 .handler = no_action,
86 .mask = CPU_MASK_NONE,
87 .name = "cascade", 85 .name = "cascade",
88}; 86};
89 87
@@ -175,6 +173,9 @@ void __init native_init_IRQ(void)
175 /* self generated IPI for local APIC timer */ 173 /* self generated IPI for local APIC timer */
176 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt); 174 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
177 175
176 /* generic IPI for platform specific use */
177 alloc_intr_gate(GENERIC_INTERRUPT_VECTOR, generic_interrupt);
178
178 /* IPI vectors for APIC spurious and error interrupts */ 179 /* IPI vectors for APIC spurious and error interrupts */
179 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt); 180 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
180 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 181 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
index da481a1e3f30..8cd10537fd46 100644
--- a/arch/x86/kernel/irqinit_64.c
+++ b/arch/x86/kernel/irqinit_64.c
@@ -45,7 +45,6 @@
45 45
46static struct irqaction irq2 = { 46static struct irqaction irq2 = {
47 .handler = no_action, 47 .handler = no_action,
48 .mask = CPU_MASK_NONE,
49 .name = "cascade", 48 .name = "cascade",
50}; 49};
51DEFINE_PER_CPU(vector_irq_t, vector_irq) = { 50DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
@@ -147,6 +146,9 @@ static void __init apic_intr_init(void)
147 /* self generated IPI for local APIC timer */ 146 /* self generated IPI for local APIC timer */
148 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt); 147 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
149 148
149 /* generic IPI for platform specific use */
150 alloc_intr_gate(GENERIC_INTERRUPT_VECTOR, generic_interrupt);
151
150 /* IPI vectors for APIC spurious and error interrupts */ 152 /* IPI vectors for APIC spurious and error interrupts */
151 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt); 153 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
152 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 154 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c
index ff7d3b0124f1..e444357375ce 100644
--- a/arch/x86/kernel/kdebugfs.c
+++ b/arch/x86/kernel/kdebugfs.c
@@ -8,11 +8,11 @@
8 */ 8 */
9#include <linux/debugfs.h> 9#include <linux/debugfs.h>
10#include <linux/uaccess.h> 10#include <linux/uaccess.h>
11#include <linux/stat.h> 11#include <linux/module.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/stat.h>
13#include <linux/io.h> 14#include <linux/io.h>
14#include <linux/mm.h> 15#include <linux/mm.h>
15#include <linux/module.h>
16 16
17#include <asm/setup.h> 17#include <asm/setup.h>
18 18
@@ -26,9 +26,8 @@ struct setup_data_node {
26 u32 len; 26 u32 len;
27}; 27};
28 28
29static ssize_t 29static ssize_t setup_data_read(struct file *file, char __user *user_buf,
30setup_data_read(struct file *file, char __user *user_buf, size_t count, 30 size_t count, loff_t *ppos)
31 loff_t *ppos)
32{ 31{
33 struct setup_data_node *node = file->private_data; 32 struct setup_data_node *node = file->private_data;
34 unsigned long remain; 33 unsigned long remain;
@@ -39,20 +38,21 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count,
39 38
40 if (pos < 0) 39 if (pos < 0)
41 return -EINVAL; 40 return -EINVAL;
41
42 if (pos >= node->len) 42 if (pos >= node->len)
43 return 0; 43 return 0;
44 44
45 if (count > node->len - pos) 45 if (count > node->len - pos)
46 count = node->len - pos; 46 count = node->len - pos;
47
47 pa = node->paddr + sizeof(struct setup_data) + pos; 48 pa = node->paddr + sizeof(struct setup_data) + pos;
48 pg = pfn_to_page((pa + count - 1) >> PAGE_SHIFT); 49 pg = pfn_to_page((pa + count - 1) >> PAGE_SHIFT);
49 if (PageHighMem(pg)) { 50 if (PageHighMem(pg)) {
50 p = ioremap_cache(pa, count); 51 p = ioremap_cache(pa, count);
51 if (!p) 52 if (!p)
52 return -ENXIO; 53 return -ENXIO;
53 } else { 54 } else
54 p = __va(pa); 55 p = __va(pa);
55 }
56 56
57 remain = copy_to_user(user_buf, p, count); 57 remain = copy_to_user(user_buf, p, count);
58 58
@@ -70,12 +70,13 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count,
70static int setup_data_open(struct inode *inode, struct file *file) 70static int setup_data_open(struct inode *inode, struct file *file)
71{ 71{
72 file->private_data = inode->i_private; 72 file->private_data = inode->i_private;
73
73 return 0; 74 return 0;
74} 75}
75 76
76static const struct file_operations fops_setup_data = { 77static const struct file_operations fops_setup_data = {
77 .read = setup_data_read, 78 .read = setup_data_read,
78 .open = setup_data_open, 79 .open = setup_data_open,
79}; 80};
80 81
81static int __init 82static int __init
@@ -84,57 +85,50 @@ create_setup_data_node(struct dentry *parent, int no,
84{ 85{
85 struct dentry *d, *type, *data; 86 struct dentry *d, *type, *data;
86 char buf[16]; 87 char buf[16];
87 int error;
88 88
89 sprintf(buf, "%d", no); 89 sprintf(buf, "%d", no);
90 d = debugfs_create_dir(buf, parent); 90 d = debugfs_create_dir(buf, parent);
91 if (!d) { 91 if (!d)
92 error = -ENOMEM; 92 return -ENOMEM;
93 goto err_return; 93
94 }
95 type = debugfs_create_x32("type", S_IRUGO, d, &node->type); 94 type = debugfs_create_x32("type", S_IRUGO, d, &node->type);
96 if (!type) { 95 if (!type)
97 error = -ENOMEM;
98 goto err_dir; 96 goto err_dir;
99 } 97
100 data = debugfs_create_file("data", S_IRUGO, d, node, &fops_setup_data); 98 data = debugfs_create_file("data", S_IRUGO, d, node, &fops_setup_data);
101 if (!data) { 99 if (!data)
102 error = -ENOMEM;
103 goto err_type; 100 goto err_type;
104 } 101
105 return 0; 102 return 0;
106 103
107err_type: 104err_type:
108 debugfs_remove(type); 105 debugfs_remove(type);
109err_dir: 106err_dir:
110 debugfs_remove(d); 107 debugfs_remove(d);
111err_return: 108 return -ENOMEM;
112 return error;
113} 109}
114 110
115static int __init create_setup_data_nodes(struct dentry *parent) 111static int __init create_setup_data_nodes(struct dentry *parent)
116{ 112{
117 struct setup_data_node *node; 113 struct setup_data_node *node;
118 struct setup_data *data; 114 struct setup_data *data;
119 int error, no = 0; 115 int error = -ENOMEM;
120 struct dentry *d; 116 struct dentry *d;
121 struct page *pg; 117 struct page *pg;
122 u64 pa_data; 118 u64 pa_data;
119 int no = 0;
123 120
124 d = debugfs_create_dir("setup_data", parent); 121 d = debugfs_create_dir("setup_data", parent);
125 if (!d) { 122 if (!d)
126 error = -ENOMEM; 123 return -ENOMEM;
127 goto err_return;
128 }
129 124
130 pa_data = boot_params.hdr.setup_data; 125 pa_data = boot_params.hdr.setup_data;
131 126
132 while (pa_data) { 127 while (pa_data) {
133 node = kmalloc(sizeof(*node), GFP_KERNEL); 128 node = kmalloc(sizeof(*node), GFP_KERNEL);
134 if (!node) { 129 if (!node)
135 error = -ENOMEM;
136 goto err_dir; 130 goto err_dir;
137 } 131
138 pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT); 132 pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT);
139 if (PageHighMem(pg)) { 133 if (PageHighMem(pg)) {
140 data = ioremap_cache(pa_data, sizeof(*data)); 134 data = ioremap_cache(pa_data, sizeof(*data));
@@ -143,9 +137,8 @@ static int __init create_setup_data_nodes(struct dentry *parent)
143 error = -ENXIO; 137 error = -ENXIO;
144 goto err_dir; 138 goto err_dir;
145 } 139 }
146 } else { 140 } else
147 data = __va(pa_data); 141 data = __va(pa_data);
148 }
149 142
150 node->paddr = pa_data; 143 node->paddr = pa_data;
151 node->type = data->type; 144 node->type = data->type;
@@ -159,11 +152,11 @@ static int __init create_setup_data_nodes(struct dentry *parent)
159 goto err_dir; 152 goto err_dir;
160 no++; 153 no++;
161 } 154 }
155
162 return 0; 156 return 0;
163 157
164err_dir: 158err_dir:
165 debugfs_remove(d); 159 debugfs_remove(d);
166err_return:
167 return error; 160 return error;
168} 161}
169 162
@@ -175,28 +168,26 @@ static struct debugfs_blob_wrapper boot_params_blob = {
175static int __init boot_params_kdebugfs_init(void) 168static int __init boot_params_kdebugfs_init(void)
176{ 169{
177 struct dentry *dbp, *version, *data; 170 struct dentry *dbp, *version, *data;
178 int error; 171 int error = -ENOMEM;
179 172
180 dbp = debugfs_create_dir("boot_params", NULL); 173 dbp = debugfs_create_dir("boot_params", NULL);
181 if (!dbp) { 174 if (!dbp)
182 error = -ENOMEM; 175 return -ENOMEM;
183 goto err_return; 176
184 }
185 version = debugfs_create_x16("version", S_IRUGO, dbp, 177 version = debugfs_create_x16("version", S_IRUGO, dbp,
186 &boot_params.hdr.version); 178 &boot_params.hdr.version);
187 if (!version) { 179 if (!version)
188 error = -ENOMEM;
189 goto err_dir; 180 goto err_dir;
190 } 181
191 data = debugfs_create_blob("data", S_IRUGO, dbp, 182 data = debugfs_create_blob("data", S_IRUGO, dbp,
192 &boot_params_blob); 183 &boot_params_blob);
193 if (!data) { 184 if (!data)
194 error = -ENOMEM;
195 goto err_version; 185 goto err_version;
196 } 186
197 error = create_setup_data_nodes(dbp); 187 error = create_setup_data_nodes(dbp);
198 if (error) 188 if (error)
199 goto err_data; 189 goto err_data;
190
200 return 0; 191 return 0;
201 192
202err_data: 193err_data:
@@ -205,10 +196,9 @@ err_version:
205 debugfs_remove(version); 196 debugfs_remove(version);
206err_dir: 197err_dir:
207 debugfs_remove(dbp); 198 debugfs_remove(dbp);
208err_return:
209 return error; 199 return error;
210} 200}
211#endif 201#endif /* CONFIG_DEBUG_BOOT_PARAMS */
212 202
213static int __init arch_kdebugfs_init(void) 203static int __init arch_kdebugfs_init(void)
214{ 204{
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
index 4558dd3918cf..7b5169d2b000 100644
--- a/arch/x86/kernel/kprobes.c
+++ b/arch/x86/kernel/kprobes.c
@@ -193,7 +193,7 @@ static int __kprobes can_boost(kprobe_opcode_t *opcodes)
193 kprobe_opcode_t opcode; 193 kprobe_opcode_t opcode;
194 kprobe_opcode_t *orig_opcodes = opcodes; 194 kprobe_opcode_t *orig_opcodes = opcodes;
195 195
196 if (search_exception_tables(opcodes)) 196 if (search_exception_tables((unsigned long)opcodes))
197 return 0; /* Page fault may occur on this address. */ 197 return 0; /* Page fault may occur on this address. */
198 198
199retry: 199retry:
@@ -638,13 +638,13 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
638#else 638#else
639 " pushf\n" 639 " pushf\n"
640 /* 640 /*
641 * Skip cs, ip, orig_ax. 641 * Skip cs, ip, orig_ax and gs.
642 * trampoline_handler() will plug in these values 642 * trampoline_handler() will plug in these values
643 */ 643 */
644 " subl $12, %esp\n" 644 " subl $16, %esp\n"
645 " pushl %fs\n" 645 " pushl %fs\n"
646 " pushl %ds\n"
647 " pushl %es\n" 646 " pushl %es\n"
647 " pushl %ds\n"
648 " pushl %eax\n" 648 " pushl %eax\n"
649 " pushl %ebp\n" 649 " pushl %ebp\n"
650 " pushl %edi\n" 650 " pushl %edi\n"
@@ -655,10 +655,10 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
655 " movl %esp, %eax\n" 655 " movl %esp, %eax\n"
656 " call trampoline_handler\n" 656 " call trampoline_handler\n"
657 /* Move flags to cs */ 657 /* Move flags to cs */
658 " movl 52(%esp), %edx\n" 658 " movl 56(%esp), %edx\n"
659 " movl %edx, 48(%esp)\n" 659 " movl %edx, 52(%esp)\n"
660 /* Replace saved flags with true return address. */ 660 /* Replace saved flags with true return address. */
661 " movl %eax, 52(%esp)\n" 661 " movl %eax, 56(%esp)\n"
662 " popl %ebx\n" 662 " popl %ebx\n"
663 " popl %ecx\n" 663 " popl %ecx\n"
664 " popl %edx\n" 664 " popl %edx\n"
@@ -666,8 +666,8 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
666 " popl %edi\n" 666 " popl %edi\n"
667 " popl %ebp\n" 667 " popl %ebp\n"
668 " popl %eax\n" 668 " popl %eax\n"
669 /* Skip ip, orig_ax, es, ds, fs */ 669 /* Skip ds, es, fs, gs, orig_ax and ip */
670 " addl $20, %esp\n" 670 " addl $24, %esp\n"
671 " popf\n" 671 " popf\n"
672#endif 672#endif
673 " ret\n"); 673 " ret\n");
@@ -691,6 +691,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
691 regs->cs = __KERNEL_CS; 691 regs->cs = __KERNEL_CS;
692#else 692#else
693 regs->cs = __KERNEL_CS | get_kernel_rpl(); 693 regs->cs = __KERNEL_CS | get_kernel_rpl();
694 regs->gs = 0;
694#endif 695#endif
695 regs->ip = trampoline_address; 696 regs->ip = trampoline_address;
696 regs->orig_ax = ~0UL; 697 regs->orig_ax = ~0UL;
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 5d7f6e76b5dc..6551dedee20c 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -138,12 +138,6 @@ static void kvm_set_pte_atomic(pte_t *ptep, pte_t pte)
138 kvm_mmu_write(ptep, pte_val(pte)); 138 kvm_mmu_write(ptep, pte_val(pte));
139} 139}
140 140
141static void kvm_set_pte_present(struct mm_struct *mm, unsigned long addr,
142 pte_t *ptep, pte_t pte)
143{
144 kvm_mmu_write(ptep, pte_val(pte));
145}
146
147static void kvm_pte_clear(struct mm_struct *mm, 141static void kvm_pte_clear(struct mm_struct *mm,
148 unsigned long addr, pte_t *ptep) 142 unsigned long addr, pte_t *ptep)
149{ 143{
@@ -220,7 +214,6 @@ static void paravirt_ops_setup(void)
220#if PAGETABLE_LEVELS >= 3 214#if PAGETABLE_LEVELS >= 3
221#ifdef CONFIG_X86_PAE 215#ifdef CONFIG_X86_PAE
222 pv_mmu_ops.set_pte_atomic = kvm_set_pte_atomic; 216 pv_mmu_ops.set_pte_atomic = kvm_set_pte_atomic;
223 pv_mmu_ops.set_pte_present = kvm_set_pte_present;
224 pv_mmu_ops.pte_clear = kvm_pte_clear; 217 pv_mmu_ops.pte_clear = kvm_pte_clear;
225 pv_mmu_ops.pmd_clear = kvm_pmd_clear; 218 pv_mmu_ops.pmd_clear = kvm_pmd_clear;
226#endif 219#endif
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
index f5fc8c781a62..e7368c1da01d 100644
--- a/arch/x86/kernel/machine_kexec_32.c
+++ b/arch/x86/kernel/machine_kexec_32.c
@@ -14,12 +14,12 @@
14#include <linux/ftrace.h> 14#include <linux/ftrace.h>
15#include <linux/suspend.h> 15#include <linux/suspend.h>
16#include <linux/gfp.h> 16#include <linux/gfp.h>
17#include <linux/io.h>
17 18
18#include <asm/pgtable.h> 19#include <asm/pgtable.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
20#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
21#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
22#include <asm/io.h>
23#include <asm/apic.h> 23#include <asm/apic.h>
24#include <asm/cpufeature.h> 24#include <asm/cpufeature.h>
25#include <asm/desc.h> 25#include <asm/desc.h>
@@ -63,7 +63,7 @@ static void load_segments(void)
63 "\tmovl %%eax,%%fs\n" 63 "\tmovl %%eax,%%fs\n"
64 "\tmovl %%eax,%%gs\n" 64 "\tmovl %%eax,%%gs\n"
65 "\tmovl %%eax,%%ss\n" 65 "\tmovl %%eax,%%ss\n"
66 ::: "eax", "memory"); 66 : : : "eax", "memory");
67#undef STR 67#undef STR
68#undef __STR 68#undef __STR
69} 69}
@@ -205,7 +205,8 @@ void machine_kexec(struct kimage *image)
205 205
206 if (image->preserve_context) { 206 if (image->preserve_context) {
207#ifdef CONFIG_X86_IO_APIC 207#ifdef CONFIG_X86_IO_APIC
208 /* We need to put APICs in legacy mode so that we can 208 /*
209 * We need to put APICs in legacy mode so that we can
209 * get timer interrupts in second kernel. kexec/kdump 210 * get timer interrupts in second kernel. kexec/kdump
210 * paths already have calls to disable_IO_APIC() in 211 * paths already have calls to disable_IO_APIC() in
211 * one form or other. kexec jump path also need 212 * one form or other. kexec jump path also need
@@ -227,7 +228,8 @@ void machine_kexec(struct kimage *image)
227 page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) 228 page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
228 << PAGE_SHIFT); 229 << PAGE_SHIFT);
229 230
230 /* The segment registers are funny things, they have both a 231 /*
232 * The segment registers are funny things, they have both a
231 * visible and an invisible part. Whenever the visible part is 233 * visible and an invisible part. Whenever the visible part is
232 * set to a specific selector, the invisible part is loaded 234 * set to a specific selector, the invisible part is loaded
233 * with from a table in memory. At no other time is the 235 * with from a table in memory. At no other time is the
@@ -237,11 +239,12 @@ void machine_kexec(struct kimage *image)
237 * segments, before I zap the gdt with an invalid value. 239 * segments, before I zap the gdt with an invalid value.
238 */ 240 */
239 load_segments(); 241 load_segments();
240 /* The gdt & idt are now invalid. 242 /*
243 * The gdt & idt are now invalid.
241 * If you want to load them you must set up your own idt & gdt. 244 * If you want to load them you must set up your own idt & gdt.
242 */ 245 */
243 set_gdt(phys_to_virt(0),0); 246 set_gdt(phys_to_virt(0), 0);
244 set_idt(phys_to_virt(0),0); 247 set_idt(phys_to_virt(0), 0);
245 248
246 /* now call it */ 249 /* now call it */
247 image->start = relocate_kernel_ptr((unsigned long)image->head, 250 image->start = relocate_kernel_ptr((unsigned long)image->head,
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 6993d51b7fd8..89cea4d44679 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -12,11 +12,47 @@
12#include <linux/reboot.h> 12#include <linux/reboot.h>
13#include <linux/numa.h> 13#include <linux/numa.h>
14#include <linux/ftrace.h> 14#include <linux/ftrace.h>
15#include <linux/io.h>
16#include <linux/suspend.h>
15 17
16#include <asm/pgtable.h> 18#include <asm/pgtable.h>
17#include <asm/tlbflush.h> 19#include <asm/tlbflush.h>
18#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
19#include <asm/io.h> 21
22static int init_one_level2_page(struct kimage *image, pgd_t *pgd,
23 unsigned long addr)
24{
25 pud_t *pud;
26 pmd_t *pmd;
27 struct page *page;
28 int result = -ENOMEM;
29
30 addr &= PMD_MASK;
31 pgd += pgd_index(addr);
32 if (!pgd_present(*pgd)) {
33 page = kimage_alloc_control_pages(image, 0);
34 if (!page)
35 goto out;
36 pud = (pud_t *)page_address(page);
37 memset(pud, 0, PAGE_SIZE);
38 set_pgd(pgd, __pgd(__pa(pud) | _KERNPG_TABLE));
39 }
40 pud = pud_offset(pgd, addr);
41 if (!pud_present(*pud)) {
42 page = kimage_alloc_control_pages(image, 0);
43 if (!page)
44 goto out;
45 pmd = (pmd_t *)page_address(page);
46 memset(pmd, 0, PAGE_SIZE);
47 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE));
48 }
49 pmd = pmd_offset(pud, addr);
50 if (!pmd_present(*pmd))
51 set_pmd(pmd, __pmd(addr | __PAGE_KERNEL_LARGE_EXEC));
52 result = 0;
53out:
54 return result;
55}
20 56
21static void init_level2_page(pmd_t *level2p, unsigned long addr) 57static void init_level2_page(pmd_t *level2p, unsigned long addr)
22{ 58{
@@ -83,9 +119,8 @@ static int init_level4_page(struct kimage *image, pgd_t *level4p,
83 } 119 }
84 level3p = (pud_t *)page_address(page); 120 level3p = (pud_t *)page_address(page);
85 result = init_level3_page(image, level3p, addr, last_addr); 121 result = init_level3_page(image, level3p, addr, last_addr);
86 if (result) { 122 if (result)
87 goto out; 123 goto out;
88 }
89 set_pgd(level4p++, __pgd(__pa(level3p) | _KERNPG_TABLE)); 124 set_pgd(level4p++, __pgd(__pa(level3p) | _KERNPG_TABLE));
90 addr += PGDIR_SIZE; 125 addr += PGDIR_SIZE;
91 } 126 }
@@ -156,6 +191,13 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
156 result = init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT); 191 result = init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT);
157 if (result) 192 if (result)
158 return result; 193 return result;
194 /*
195 * image->start may be outside 0 ~ max_pfn, for example when
196 * jump back to original kernel from kexeced kernel
197 */
198 result = init_one_level2_page(image, level4p, image->start);
199 if (result)
200 return result;
159 return init_transition_pgtable(image, level4p); 201 return init_transition_pgtable(image, level4p);
160} 202}
161 203
@@ -229,20 +271,45 @@ void machine_kexec(struct kimage *image)
229{ 271{
230 unsigned long page_list[PAGES_NR]; 272 unsigned long page_list[PAGES_NR];
231 void *control_page; 273 void *control_page;
274 int save_ftrace_enabled;
232 275
233 tracer_disable(); 276#ifdef CONFIG_KEXEC_JUMP
277 if (kexec_image->preserve_context)
278 save_processor_state();
279#endif
280
281 save_ftrace_enabled = __ftrace_enabled_save();
234 282
235 /* Interrupts aren't acceptable while we reboot */ 283 /* Interrupts aren't acceptable while we reboot */
236 local_irq_disable(); 284 local_irq_disable();
237 285
286 if (image->preserve_context) {
287#ifdef CONFIG_X86_IO_APIC
288 /*
289 * We need to put APICs in legacy mode so that we can
290 * get timer interrupts in second kernel. kexec/kdump
291 * paths already have calls to disable_IO_APIC() in
292 * one form or other. kexec jump path also need
293 * one.
294 */
295 disable_IO_APIC();
296#endif
297 }
298
238 control_page = page_address(image->control_code_page) + PAGE_SIZE; 299 control_page = page_address(image->control_code_page) + PAGE_SIZE;
239 memcpy(control_page, relocate_kernel, PAGE_SIZE); 300 memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE);
240 301
241 page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page); 302 page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page);
303 page_list[VA_CONTROL_PAGE] = (unsigned long)control_page;
242 page_list[PA_TABLE_PAGE] = 304 page_list[PA_TABLE_PAGE] =
243 (unsigned long)__pa(page_address(image->control_code_page)); 305 (unsigned long)__pa(page_address(image->control_code_page));
244 306
245 /* The segment registers are funny things, they have both a 307 if (image->type == KEXEC_TYPE_DEFAULT)
308 page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
309 << PAGE_SHIFT);
310
311 /*
312 * The segment registers are funny things, they have both a
246 * visible and an invisible part. Whenever the visible part is 313 * visible and an invisible part. Whenever the visible part is
247 * set to a specific selector, the invisible part is loaded 314 * set to a specific selector, the invisible part is loaded
248 * with from a table in memory. At no other time is the 315 * with from a table in memory. At no other time is the
@@ -252,15 +319,25 @@ void machine_kexec(struct kimage *image)
252 * segments, before I zap the gdt with an invalid value. 319 * segments, before I zap the gdt with an invalid value.
253 */ 320 */
254 load_segments(); 321 load_segments();
255 /* The gdt & idt are now invalid. 322 /*
323 * The gdt & idt are now invalid.
256 * If you want to load them you must set up your own idt & gdt. 324 * If you want to load them you must set up your own idt & gdt.
257 */ 325 */
258 set_gdt(phys_to_virt(0),0); 326 set_gdt(phys_to_virt(0), 0);
259 set_idt(phys_to_virt(0),0); 327 set_idt(phys_to_virt(0), 0);
260 328
261 /* now call it */ 329 /* now call it */
262 relocate_kernel((unsigned long)image->head, (unsigned long)page_list, 330 image->start = relocate_kernel((unsigned long)image->head,
263 image->start); 331 (unsigned long)page_list,
332 image->start,
333 image->preserve_context);
334
335#ifdef CONFIG_KEXEC_JUMP
336 if (kexec_image->preserve_context)
337 restore_processor_state();
338#endif
339
340 __ftrace_enabled_restore(save_ftrace_enabled);
264} 341}
265 342
266void arch_crash_save_vmcoreinfo(void) 343void arch_crash_save_vmcoreinfo(void)
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 8815f3c7fec7..846510b78a09 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -348,7 +348,6 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
348static struct irqaction mfgptirq = { 348static struct irqaction mfgptirq = {
349 .handler = mfgpt_tick, 349 .handler = mfgpt_tick,
350 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 350 .flags = IRQF_DISABLED | IRQF_NOBALANCING,
351 .mask = CPU_MASK_NONE,
352 .name = "mfgpt-timer" 351 .name = "mfgpt-timer"
353}; 352};
354 353
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index c25fdb382292..453b5795a5c6 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -12,31 +12,30 @@
12 * 12 *
13 * Licensed under the terms of the GNU General Public 13 * Licensed under the terms of the GNU General Public
14 * License version 2. See file COPYING for details. 14 * License version 2. See file COPYING for details.
15*/ 15 */
16 16#include <linux/platform_device.h>
17#include <linux/capability.h> 17#include <linux/capability.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/sched.h>
21#include <linux/cpumask.h>
22#include <linux/module.h>
23#include <linux/slab.h>
24#include <linux/vmalloc.h>
25#include <linux/miscdevice.h> 18#include <linux/miscdevice.h>
19#include <linux/firmware.h>
26#include <linux/spinlock.h> 20#include <linux/spinlock.h>
27#include <linux/mm.h> 21#include <linux/cpumask.h>
28#include <linux/fs.h> 22#include <linux/pci_ids.h>
23#include <linux/uaccess.h>
24#include <linux/vmalloc.h>
25#include <linux/kernel.h>
26#include <linux/module.h>
29#include <linux/mutex.h> 27#include <linux/mutex.h>
28#include <linux/sched.h>
29#include <linux/init.h>
30#include <linux/slab.h>
30#include <linux/cpu.h> 31#include <linux/cpu.h>
31#include <linux/firmware.h>
32#include <linux/platform_device.h>
33#include <linux/pci.h> 32#include <linux/pci.h>
34#include <linux/pci_ids.h> 33#include <linux/fs.h>
35#include <linux/uaccess.h> 34#include <linux/mm.h>
36 35
37#include <asm/msr.h>
38#include <asm/processor.h>
39#include <asm/microcode.h> 36#include <asm/microcode.h>
37#include <asm/processor.h>
38#include <asm/msr.h>
40 39
41MODULE_DESCRIPTION("AMD Microcode Update Driver"); 40MODULE_DESCRIPTION("AMD Microcode Update Driver");
42MODULE_AUTHOR("Peter Oruba"); 41MODULE_AUTHOR("Peter Oruba");
@@ -72,8 +71,8 @@ struct microcode_header_amd {
72} __attribute__((packed)); 71} __attribute__((packed));
73 72
74struct microcode_amd { 73struct microcode_amd {
75 struct microcode_header_amd hdr; 74 struct microcode_header_amd hdr;
76 unsigned int mpb[0]; 75 unsigned int mpb[0];
77}; 76};
78 77
79#define UCODE_MAX_SIZE 2048 78#define UCODE_MAX_SIZE 2048
@@ -184,8 +183,8 @@ static int get_ucode_data(void *to, const u8 *from, size_t n)
184 return 0; 183 return 0;
185} 184}
186 185
187static void *get_next_ucode(const u8 *buf, unsigned int size, 186static void *
188 unsigned int *mc_size) 187get_next_ucode(const u8 *buf, unsigned int size, unsigned int *mc_size)
189{ 188{
190 unsigned int total_size; 189 unsigned int total_size;
191 u8 section_hdr[UCODE_CONTAINER_SECTION_HDR]; 190 u8 section_hdr[UCODE_CONTAINER_SECTION_HDR];
@@ -223,7 +222,6 @@ static void *get_next_ucode(const u8 *buf, unsigned int size,
223 return mc; 222 return mc;
224} 223}
225 224
226
227static int install_equiv_cpu_table(const u8 *buf) 225static int install_equiv_cpu_table(const u8 *buf)
228{ 226{
229 u8 *container_hdr[UCODE_CONTAINER_HEADER_SIZE]; 227 u8 *container_hdr[UCODE_CONTAINER_HEADER_SIZE];
@@ -372,4 +370,3 @@ struct microcode_ops * __init init_amd_microcode(void)
372{ 370{
373 return &microcode_amd_ops; 371 return &microcode_amd_ops;
374} 372}
375
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index c9b721ba968c..a0f3851ef310 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -70,67 +70,78 @@
70 * Fix sigmatch() macro to handle old CPUs with pf == 0. 70 * Fix sigmatch() macro to handle old CPUs with pf == 0.
71 * Thanks to Stuart Swales for pointing out this bug. 71 * Thanks to Stuart Swales for pointing out this bug.
72 */ 72 */
73#include <linux/platform_device.h>
73#include <linux/capability.h> 74#include <linux/capability.h>
74#include <linux/kernel.h> 75#include <linux/miscdevice.h>
75#include <linux/init.h> 76#include <linux/firmware.h>
76#include <linux/sched.h>
77#include <linux/smp_lock.h> 77#include <linux/smp_lock.h>
78#include <linux/spinlock.h>
78#include <linux/cpumask.h> 79#include <linux/cpumask.h>
79#include <linux/module.h> 80#include <linux/uaccess.h>
80#include <linux/slab.h>
81#include <linux/vmalloc.h> 81#include <linux/vmalloc.h>
82#include <linux/miscdevice.h> 82#include <linux/kernel.h>
83#include <linux/spinlock.h> 83#include <linux/module.h>
84#include <linux/mm.h>
85#include <linux/fs.h>
86#include <linux/mutex.h> 84#include <linux/mutex.h>
85#include <linux/sched.h>
86#include <linux/init.h>
87#include <linux/slab.h>
87#include <linux/cpu.h> 88#include <linux/cpu.h>
88#include <linux/firmware.h> 89#include <linux/fs.h>
89#include <linux/platform_device.h> 90#include <linux/mm.h>
90 91
91#include <asm/msr.h>
92#include <asm/uaccess.h>
93#include <asm/processor.h>
94#include <asm/microcode.h> 92#include <asm/microcode.h>
93#include <asm/processor.h>
94#include <asm/msr.h>
95 95
96MODULE_DESCRIPTION("Microcode Update Driver"); 96MODULE_DESCRIPTION("Microcode Update Driver");
97MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>"); 97MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>");
98MODULE_LICENSE("GPL"); 98MODULE_LICENSE("GPL");
99 99
100#define MICROCODE_VERSION "2.00" 100#define MICROCODE_VERSION "2.00"
101 101
102static struct microcode_ops *microcode_ops; 102static struct microcode_ops *microcode_ops;
103 103
104/* no concurrent ->write()s are allowed on /dev/cpu/microcode */ 104/* no concurrent ->write()s are allowed on /dev/cpu/microcode */
105static DEFINE_MUTEX(microcode_mutex); 105static DEFINE_MUTEX(microcode_mutex);
106 106
107struct ucode_cpu_info ucode_cpu_info[NR_CPUS]; 107struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
108EXPORT_SYMBOL_GPL(ucode_cpu_info); 108EXPORT_SYMBOL_GPL(ucode_cpu_info);
109 109
110#ifdef CONFIG_MICROCODE_OLD_INTERFACE 110#ifdef CONFIG_MICROCODE_OLD_INTERFACE
111struct update_for_cpu {
112 const void __user *buf;
113 size_t size;
114};
115
116static long update_for_cpu(void *_ufc)
117{
118 struct update_for_cpu *ufc = _ufc;
119 int error;
120
121 error = microcode_ops->request_microcode_user(smp_processor_id(),
122 ufc->buf, ufc->size);
123 if (error < 0)
124 return error;
125 if (!error)
126 microcode_ops->apply_microcode(smp_processor_id());
127 return error;
128}
129
111static int do_microcode_update(const void __user *buf, size_t size) 130static int do_microcode_update(const void __user *buf, size_t size)
112{ 131{
113 cpumask_t old;
114 int error = 0; 132 int error = 0;
115 int cpu; 133 int cpu;
116 134 struct update_for_cpu ufc = { .buf = buf, .size = size };
117 old = current->cpus_allowed;
118 135
119 for_each_online_cpu(cpu) { 136 for_each_online_cpu(cpu) {
120 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 137 struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
121 138
122 if (!uci->valid) 139 if (!uci->valid)
123 continue; 140 continue;
124 141 error = work_on_cpu(cpu, update_for_cpu, &ufc);
125 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
126 error = microcode_ops->request_microcode_user(cpu, buf, size);
127 if (error < 0) 142 if (error < 0)
128 goto out; 143 break;
129 if (!error)
130 microcode_ops->apply_microcode(cpu);
131 } 144 }
132out:
133 set_cpus_allowed_ptr(current, &old);
134 return error; 145 return error;
135} 146}
136 147
@@ -198,18 +209,33 @@ static void microcode_dev_exit(void)
198 209
199MODULE_ALIAS_MISCDEV(MICROCODE_MINOR); 210MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
200#else 211#else
201#define microcode_dev_init() 0 212#define microcode_dev_init() 0
202#define microcode_dev_exit() do { } while (0) 213#define microcode_dev_exit() do { } while (0)
203#endif 214#endif
204 215
205/* fake device for request_firmware */ 216/* fake device for request_firmware */
206static struct platform_device *microcode_pdev; 217static struct platform_device *microcode_pdev;
218
219static long reload_for_cpu(void *unused)
220{
221 struct ucode_cpu_info *uci = ucode_cpu_info + smp_processor_id();
222 int err = 0;
223
224 mutex_lock(&microcode_mutex);
225 if (uci->valid) {
226 err = microcode_ops->request_microcode_fw(smp_processor_id(),
227 &microcode_pdev->dev);
228 if (!err)
229 microcode_ops->apply_microcode(smp_processor_id());
230 }
231 mutex_unlock(&microcode_mutex);
232 return err;
233}
207 234
208static ssize_t reload_store(struct sys_device *dev, 235static ssize_t reload_store(struct sys_device *dev,
209 struct sysdev_attribute *attr, 236 struct sysdev_attribute *attr,
210 const char *buf, size_t sz) 237 const char *buf, size_t sz)
211{ 238{
212 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id;
213 char *end; 239 char *end;
214 unsigned long val = simple_strtoul(buf, &end, 0); 240 unsigned long val = simple_strtoul(buf, &end, 0);
215 int err = 0; 241 int err = 0;
@@ -218,21 +244,9 @@ static ssize_t reload_store(struct sys_device *dev,
218 if (end == buf) 244 if (end == buf)
219 return -EINVAL; 245 return -EINVAL;
220 if (val == 1) { 246 if (val == 1) {
221 cpumask_t old = current->cpus_allowed;
222
223 get_online_cpus(); 247 get_online_cpus();
224 if (cpu_online(cpu)) { 248 if (cpu_online(cpu))
225 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 249 err = work_on_cpu(cpu, reload_for_cpu, NULL);
226 mutex_lock(&microcode_mutex);
227 if (uci->valid) {
228 err = microcode_ops->request_microcode_fw(cpu,
229 &microcode_pdev->dev);
230 if (!err)
231 microcode_ops->apply_microcode(cpu);
232 }
233 mutex_unlock(&microcode_mutex);
234 set_cpus_allowed_ptr(current, &old);
235 }
236 put_online_cpus(); 250 put_online_cpus();
237 } 251 }
238 if (err) 252 if (err)
@@ -268,8 +282,8 @@ static struct attribute *mc_default_attrs[] = {
268}; 282};
269 283
270static struct attribute_group mc_attr_group = { 284static struct attribute_group mc_attr_group = {
271 .attrs = mc_default_attrs, 285 .attrs = mc_default_attrs,
272 .name = "microcode", 286 .name = "microcode",
273}; 287};
274 288
275static void __microcode_fini_cpu(int cpu) 289static void __microcode_fini_cpu(int cpu)
@@ -328,9 +342,9 @@ static int microcode_resume_cpu(int cpu)
328 return 0; 342 return 0;
329} 343}
330 344
331static void microcode_update_cpu(int cpu) 345static long microcode_update_cpu(void *unused)
332{ 346{
333 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 347 struct ucode_cpu_info *uci = ucode_cpu_info + smp_processor_id();
334 int err = 0; 348 int err = 0;
335 349
336 /* 350 /*
@@ -338,30 +352,27 @@ static void microcode_update_cpu(int cpu)
338 * otherwise just request a firmware: 352 * otherwise just request a firmware:
339 */ 353 */
340 if (uci->valid) { 354 if (uci->valid) {
341 err = microcode_resume_cpu(cpu); 355 err = microcode_resume_cpu(smp_processor_id());
342 } else { 356 } else {
343 collect_cpu_info(cpu); 357 collect_cpu_info(smp_processor_id());
344 if (uci->valid && system_state == SYSTEM_RUNNING) 358 if (uci->valid && system_state == SYSTEM_RUNNING)
345 err = microcode_ops->request_microcode_fw(cpu, 359 err = microcode_ops->request_microcode_fw(
360 smp_processor_id(),
346 &microcode_pdev->dev); 361 &microcode_pdev->dev);
347 } 362 }
348 if (!err) 363 if (!err)
349 microcode_ops->apply_microcode(cpu); 364 microcode_ops->apply_microcode(smp_processor_id());
365 return err;
350} 366}
351 367
352static void microcode_init_cpu(int cpu) 368static int microcode_init_cpu(int cpu)
353{ 369{
354 cpumask_t old = current->cpus_allowed; 370 int err;
355
356 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
357 /* We should bind the task to the CPU */
358 BUG_ON(raw_smp_processor_id() != cpu);
359
360 mutex_lock(&microcode_mutex); 371 mutex_lock(&microcode_mutex);
361 microcode_update_cpu(cpu); 372 err = work_on_cpu(cpu, microcode_update_cpu, NULL);
362 mutex_unlock(&microcode_mutex); 373 mutex_unlock(&microcode_mutex);
363 374
364 set_cpus_allowed_ptr(current, &old); 375 return err;
365} 376}
366 377
367static int mc_sysdev_add(struct sys_device *sys_dev) 378static int mc_sysdev_add(struct sys_device *sys_dev)
@@ -379,8 +390,11 @@ static int mc_sysdev_add(struct sys_device *sys_dev)
379 if (err) 390 if (err)
380 return err; 391 return err;
381 392
382 microcode_init_cpu(cpu); 393 err = microcode_init_cpu(cpu);
383 return 0; 394 if (err)
395 sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
396
397 return err;
384} 398}
385 399
386static int mc_sysdev_remove(struct sys_device *sys_dev) 400static int mc_sysdev_remove(struct sys_device *sys_dev)
@@ -404,14 +418,14 @@ static int mc_sysdev_resume(struct sys_device *dev)
404 return 0; 418 return 0;
405 419
406 /* only CPU 0 will apply ucode here */ 420 /* only CPU 0 will apply ucode here */
407 microcode_update_cpu(0); 421 microcode_update_cpu(NULL);
408 return 0; 422 return 0;
409} 423}
410 424
411static struct sysdev_driver mc_sysdev_driver = { 425static struct sysdev_driver mc_sysdev_driver = {
412 .add = mc_sysdev_add, 426 .add = mc_sysdev_add,
413 .remove = mc_sysdev_remove, 427 .remove = mc_sysdev_remove,
414 .resume = mc_sysdev_resume, 428 .resume = mc_sysdev_resume,
415}; 429};
416 430
417static __cpuinit int 431static __cpuinit int
@@ -424,7 +438,9 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
424 switch (action) { 438 switch (action) {
425 case CPU_ONLINE: 439 case CPU_ONLINE:
426 case CPU_ONLINE_FROZEN: 440 case CPU_ONLINE_FROZEN:
427 microcode_init_cpu(cpu); 441 if (microcode_init_cpu(cpu))
442 printk(KERN_ERR "microcode: failed to init CPU%d\n",
443 cpu);
428 case CPU_DOWN_FAILED: 444 case CPU_DOWN_FAILED:
429 case CPU_DOWN_FAILED_FROZEN: 445 case CPU_DOWN_FAILED_FROZEN:
430 pr_debug("microcode: CPU%d added\n", cpu); 446 pr_debug("microcode: CPU%d added\n", cpu);
@@ -448,7 +464,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
448} 464}
449 465
450static struct notifier_block __refdata mc_cpu_notifier = { 466static struct notifier_block __refdata mc_cpu_notifier = {
451 .notifier_call = mc_cpu_callback, 467 .notifier_call = mc_cpu_callback,
452}; 468};
453 469
454static int __init microcode_init(void) 470static int __init microcode_init(void)
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index 5e9f4fc51385..149b9ec7c1ab 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -70,28 +70,28 @@
70 * Fix sigmatch() macro to handle old CPUs with pf == 0. 70 * Fix sigmatch() macro to handle old CPUs with pf == 0.
71 * Thanks to Stuart Swales for pointing out this bug. 71 * Thanks to Stuart Swales for pointing out this bug.
72 */ 72 */
73#include <linux/platform_device.h>
73#include <linux/capability.h> 74#include <linux/capability.h>
74#include <linux/kernel.h> 75#include <linux/miscdevice.h>
75#include <linux/init.h> 76#include <linux/firmware.h>
76#include <linux/sched.h>
77#include <linux/smp_lock.h> 77#include <linux/smp_lock.h>
78#include <linux/spinlock.h>
78#include <linux/cpumask.h> 79#include <linux/cpumask.h>
79#include <linux/module.h> 80#include <linux/uaccess.h>
80#include <linux/slab.h>
81#include <linux/vmalloc.h> 81#include <linux/vmalloc.h>
82#include <linux/miscdevice.h> 82#include <linux/kernel.h>
83#include <linux/spinlock.h> 83#include <linux/module.h>
84#include <linux/mm.h>
85#include <linux/fs.h>
86#include <linux/mutex.h> 84#include <linux/mutex.h>
85#include <linux/sched.h>
86#include <linux/init.h>
87#include <linux/slab.h>
87#include <linux/cpu.h> 88#include <linux/cpu.h>
88#include <linux/firmware.h> 89#include <linux/fs.h>
89#include <linux/platform_device.h> 90#include <linux/mm.h>
90#include <linux/uaccess.h>
91 91
92#include <asm/msr.h>
93#include <asm/processor.h>
94#include <asm/microcode.h> 92#include <asm/microcode.h>
93#include <asm/processor.h>
94#include <asm/msr.h>
95 95
96MODULE_DESCRIPTION("Microcode Update Driver"); 96MODULE_DESCRIPTION("Microcode Update Driver");
97MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>"); 97MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>");
@@ -129,12 +129,13 @@ struct extended_sigtable {
129 struct extended_signature sigs[0]; 129 struct extended_signature sigs[0];
130}; 130};
131 131
132#define DEFAULT_UCODE_DATASIZE (2000) 132#define DEFAULT_UCODE_DATASIZE (2000)
133#define MC_HEADER_SIZE (sizeof(struct microcode_header_intel)) 133#define MC_HEADER_SIZE (sizeof(struct microcode_header_intel))
134#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE) 134#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
135#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable)) 135#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable))
136#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature)) 136#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))
137#define DWSIZE (sizeof(u32)) 137#define DWSIZE (sizeof(u32))
138
138#define get_totalsize(mc) \ 139#define get_totalsize(mc) \
139 (((struct microcode_intel *)mc)->hdr.totalsize ? \ 140 (((struct microcode_intel *)mc)->hdr.totalsize ? \
140 ((struct microcode_intel *)mc)->hdr.totalsize : \ 141 ((struct microcode_intel *)mc)->hdr.totalsize : \
@@ -197,30 +198,31 @@ static inline int update_match_cpu(struct cpu_signature *csig, int sig, int pf)
197} 198}
198 199
199static inline int 200static inline int
200update_match_revision(struct microcode_header_intel *mc_header, int rev) 201update_match_revision(struct microcode_header_intel *mc_header, int rev)
201{ 202{
202 return (mc_header->rev <= rev) ? 0 : 1; 203 return (mc_header->rev <= rev) ? 0 : 1;
203} 204}
204 205
205static int microcode_sanity_check(void *mc) 206static int microcode_sanity_check(void *mc)
206{ 207{
208 unsigned long total_size, data_size, ext_table_size;
207 struct microcode_header_intel *mc_header = mc; 209 struct microcode_header_intel *mc_header = mc;
208 struct extended_sigtable *ext_header = NULL; 210 struct extended_sigtable *ext_header = NULL;
209 struct extended_signature *ext_sig;
210 unsigned long total_size, data_size, ext_table_size;
211 int sum, orig_sum, ext_sigcount = 0, i; 211 int sum, orig_sum, ext_sigcount = 0, i;
212 struct extended_signature *ext_sig;
212 213
213 total_size = get_totalsize(mc_header); 214 total_size = get_totalsize(mc_header);
214 data_size = get_datasize(mc_header); 215 data_size = get_datasize(mc_header);
216
215 if (data_size + MC_HEADER_SIZE > total_size) { 217 if (data_size + MC_HEADER_SIZE > total_size) {
216 printk(KERN_ERR "microcode: error! " 218 printk(KERN_ERR "microcode: error! "
217 "Bad data size in microcode data file\n"); 219 "Bad data size in microcode data file\n");
218 return -EINVAL; 220 return -EINVAL;
219 } 221 }
220 222
221 if (mc_header->ldrver != 1 || mc_header->hdrver != 1) { 223 if (mc_header->ldrver != 1 || mc_header->hdrver != 1) {
222 printk(KERN_ERR "microcode: error! " 224 printk(KERN_ERR "microcode: error! "
223 "Unknown microcode update format\n"); 225 "Unknown microcode update format\n");
224 return -EINVAL; 226 return -EINVAL;
225 } 227 }
226 ext_table_size = total_size - (MC_HEADER_SIZE + data_size); 228 ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
@@ -318,11 +320,15 @@ get_matching_microcode(struct cpu_signature *cpu_sig, void *mc, int rev)
318 320
319static void apply_microcode(int cpu) 321static void apply_microcode(int cpu)
320{ 322{
323 struct microcode_intel *mc_intel;
324 struct ucode_cpu_info *uci;
321 unsigned long flags; 325 unsigned long flags;
322 unsigned int val[2]; 326 unsigned int val[2];
323 int cpu_num = raw_smp_processor_id(); 327 int cpu_num;
324 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 328
325 struct microcode_intel *mc_intel = uci->mc; 329 cpu_num = raw_smp_processor_id();
330 uci = ucode_cpu_info + cpu;
331 mc_intel = uci->mc;
326 332
327 /* We should bind the task to the CPU */ 333 /* We should bind the task to the CPU */
328 BUG_ON(cpu_num != cpu); 334 BUG_ON(cpu_num != cpu);
@@ -348,15 +354,17 @@ static void apply_microcode(int cpu)
348 spin_unlock_irqrestore(&microcode_update_lock, flags); 354 spin_unlock_irqrestore(&microcode_update_lock, flags);
349 if (val[1] != mc_intel->hdr.rev) { 355 if (val[1] != mc_intel->hdr.rev) {
350 printk(KERN_ERR "microcode: CPU%d update from revision " 356 printk(KERN_ERR "microcode: CPU%d update from revision "
351 "0x%x to 0x%x failed\n", cpu_num, uci->cpu_sig.rev, val[1]); 357 "0x%x to 0x%x failed\n",
358 cpu_num, uci->cpu_sig.rev, val[1]);
352 return; 359 return;
353 } 360 }
354 printk(KERN_INFO "microcode: CPU%d updated from revision " 361 printk(KERN_INFO "microcode: CPU%d updated from revision "
355 "0x%x to 0x%x, date = %04x-%02x-%02x \n", 362 "0x%x to 0x%x, date = %04x-%02x-%02x \n",
356 cpu_num, uci->cpu_sig.rev, val[1], 363 cpu_num, uci->cpu_sig.rev, val[1],
357 mc_intel->hdr.date & 0xffff, 364 mc_intel->hdr.date & 0xffff,
358 mc_intel->hdr.date >> 24, 365 mc_intel->hdr.date >> 24,
359 (mc_intel->hdr.date >> 16) & 0xff); 366 (mc_intel->hdr.date >> 16) & 0xff);
367
360 uci->cpu_sig.rev = val[1]; 368 uci->cpu_sig.rev = val[1];
361} 369}
362 370
@@ -404,18 +412,23 @@ static int generic_load_microcode(int cpu, void *data, size_t size,
404 leftover -= mc_size; 412 leftover -= mc_size;
405 } 413 }
406 414
407 if (new_mc) { 415 if (!new_mc)
408 if (!leftover) { 416 goto out;
409 if (uci->mc) 417
410 vfree(uci->mc); 418 if (leftover) {
411 uci->mc = (struct microcode_intel *)new_mc; 419 vfree(new_mc);
412 pr_debug("microcode: CPU%d found a matching microcode update with" 420 goto out;
413 " version 0x%x (current=0x%x)\n",
414 cpu, new_rev, uci->cpu_sig.rev);
415 } else
416 vfree(new_mc);
417 } 421 }
418 422
423 if (uci->mc)
424 vfree(uci->mc);
425 uci->mc = (struct microcode_intel *)new_mc;
426
427 pr_debug("microcode: CPU%d found a matching microcode update with"
428 " version 0x%x (current=0x%x)\n",
429 cpu, new_rev, uci->cpu_sig.rev);
430
431 out:
419 return (int)leftover; 432 return (int)leftover;
420} 433}
421 434
diff --git a/arch/x86/kernel/mmconf-fam10h_64.c b/arch/x86/kernel/mmconf-fam10h_64.c
index 666e43df51f9..712d15fdc416 100644
--- a/arch/x86/kernel/mmconf-fam10h_64.c
+++ b/arch/x86/kernel/mmconf-fam10h_64.c
@@ -226,7 +226,7 @@ static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d)
226 return 0; 226 return 0;
227} 227}
228 228
229static struct dmi_system_id __devinitdata mmconf_dmi_table[] = { 229static const struct dmi_system_id __cpuinitconst mmconf_dmi_table[] = {
230 { 230 {
231 .callback = set_check_enable_amd_mmconf, 231 .callback = set_check_enable_amd_mmconf,
232 .ident = "Sun Microsystems Machine", 232 .ident = "Sun Microsystems Machine",
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 37cb1bda1baf..dce99dca6cf8 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -109,9 +109,6 @@ static void __init MP_bus_info(struct mpc_bus *m)
109 } else 109 } else
110 printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str); 110 printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
111} 111}
112#endif
113
114#ifdef CONFIG_X86_IO_APIC
115 112
116static int bad_ioapic(unsigned long address) 113static int bad_ioapic(unsigned long address)
117{ 114{
@@ -224,8 +221,12 @@ static void __init MP_intsrc_info(struct mpc_intsrc *m)
224 if (++mp_irq_entries == MAX_IRQ_SOURCES) 221 if (++mp_irq_entries == MAX_IRQ_SOURCES)
225 panic("Max # of irq sources exceeded!!\n"); 222 panic("Max # of irq sources exceeded!!\n");
226} 223}
224#else /* CONFIG_X86_IO_APIC */
225static inline void __init MP_bus_info(struct mpc_bus *m) {}
226static inline void __init MP_ioapic_info(struct mpc_ioapic *m) {}
227static inline void __init MP_intsrc_info(struct mpc_intsrc *m) {}
228#endif /* CONFIG_X86_IO_APIC */
227 229
228#endif
229 230
230static void __init MP_lintsrc_info(struct mpc_lintsrc *m) 231static void __init MP_lintsrc_info(struct mpc_lintsrc *m)
231{ 232{
@@ -275,6 +276,20 @@ static int __init smp_check_mpc(struct mpc_table *mpc, char *oem, char *str)
275 return 1; 276 return 1;
276} 277}
277 278
279static void skip_entry(unsigned char **ptr, int *count, int size)
280{
281 *ptr += size;
282 *count += size;
283}
284
285static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)
286{
287 printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"
288 "type %x\n", *mpt);
289 print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
290 1, mpc, mpc->length, 1);
291}
292
278static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) 293static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
279{ 294{
280 char str[16]; 295 char str[16];
@@ -310,61 +325,30 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
310 while (count < mpc->length) { 325 while (count < mpc->length) {
311 switch (*mpt) { 326 switch (*mpt) {
312 case MP_PROCESSOR: 327 case MP_PROCESSOR:
313 { 328 /* ACPI may have already provided this data */
314 struct mpc_cpu *m = (struct mpc_cpu *)mpt; 329 if (!acpi_lapic)
315 /* ACPI may have already provided this data */ 330 MP_processor_info((struct mpc_cpu *)mpt);
316 if (!acpi_lapic) 331 skip_entry(&mpt, &count, sizeof(struct mpc_cpu));
317 MP_processor_info(m); 332 break;
318 mpt += sizeof(*m);
319 count += sizeof(*m);
320 break;
321 }
322 case MP_BUS: 333 case MP_BUS:
323 { 334 MP_bus_info((struct mpc_bus *)mpt);
324 struct mpc_bus *m = (struct mpc_bus *)mpt; 335 skip_entry(&mpt, &count, sizeof(struct mpc_bus));
325#ifdef CONFIG_X86_IO_APIC 336 break;
326 MP_bus_info(m);
327#endif
328 mpt += sizeof(*m);
329 count += sizeof(*m);
330 break;
331 }
332 case MP_IOAPIC: 337 case MP_IOAPIC:
333 { 338 MP_ioapic_info((struct mpc_ioapic *)mpt);
334#ifdef CONFIG_X86_IO_APIC 339 skip_entry(&mpt, &count, sizeof(struct mpc_ioapic));
335 struct mpc_ioapic *m = (struct mpc_ioapic *)mpt; 340 break;
336 MP_ioapic_info(m);
337#endif
338 mpt += sizeof(struct mpc_ioapic);
339 count += sizeof(struct mpc_ioapic);
340 break;
341 }
342 case MP_INTSRC: 341 case MP_INTSRC:
343 { 342 MP_intsrc_info((struct mpc_intsrc *)mpt);
344#ifdef CONFIG_X86_IO_APIC 343 skip_entry(&mpt, &count, sizeof(struct mpc_intsrc));
345 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt; 344 break;
346
347 MP_intsrc_info(m);
348#endif
349 mpt += sizeof(struct mpc_intsrc);
350 count += sizeof(struct mpc_intsrc);
351 break;
352 }
353 case MP_LINTSRC: 345 case MP_LINTSRC:
354 { 346 MP_lintsrc_info((struct mpc_lintsrc *)mpt);
355 struct mpc_lintsrc *m = 347 skip_entry(&mpt, &count, sizeof(struct mpc_lintsrc));
356 (struct mpc_lintsrc *)mpt; 348 break;
357 MP_lintsrc_info(m);
358 mpt += sizeof(*m);
359 count += sizeof(*m);
360 break;
361 }
362 default: 349 default:
363 /* wrong mptable */ 350 /* wrong mptable */
364 printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); 351 smp_dump_mptable(mpc, mpt);
365 printk(KERN_ERR "type %x\n", *mpt);
366 print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
367 1, mpc, mpc->length, 1);
368 count = mpc->length; 352 count = mpc->length;
369 break; 353 break;
370 } 354 }
@@ -558,6 +542,68 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
558 542
559static struct mpf_intel *mpf_found; 543static struct mpf_intel *mpf_found;
560 544
545static unsigned long __init get_mpc_size(unsigned long physptr)
546{
547 struct mpc_table *mpc;
548 unsigned long size;
549
550 mpc = early_ioremap(physptr, PAGE_SIZE);
551 size = mpc->length;
552 early_iounmap(mpc, PAGE_SIZE);
553 apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size);
554
555 return size;
556}
557
558static int __init check_physptr(struct mpf_intel *mpf, unsigned int early)
559{
560 struct mpc_table *mpc;
561 unsigned long size;
562
563 size = get_mpc_size(mpf->physptr);
564 mpc = early_ioremap(mpf->physptr, size);
565 /*
566 * Read the physical hardware table. Anything here will
567 * override the defaults.
568 */
569 if (!smp_read_mpc(mpc, early)) {
570#ifdef CONFIG_X86_LOCAL_APIC
571 smp_found_config = 0;
572#endif
573 printk(KERN_ERR "BIOS bug, MP table errors detected!...\n"
574 "... disabling SMP support. (tell your hw vendor)\n");
575 early_iounmap(mpc, size);
576 return -1;
577 }
578 early_iounmap(mpc, size);
579
580 if (early)
581 return -1;
582
583#ifdef CONFIG_X86_IO_APIC
584 /*
585 * If there are no explicit MP IRQ entries, then we are
586 * broken. We set up most of the low 16 IO-APIC pins to
587 * ISA defaults and hope it will work.
588 */
589 if (!mp_irq_entries) {
590 struct mpc_bus bus;
591
592 printk(KERN_ERR "BIOS bug, no explicit IRQ entries, "
593 "using default mptable. (tell your hw vendor)\n");
594
595 bus.type = MP_BUS;
596 bus.busid = 0;
597 memcpy(bus.bustype, "ISA ", 6);
598 MP_bus_info(&bus);
599
600 construct_default_ioirq_mptable(0);
601 }
602#endif
603
604 return 0;
605}
606
561/* 607/*
562 * Scan the memory blocks for an SMP configuration block. 608 * Scan the memory blocks for an SMP configuration block.
563 */ 609 */
@@ -611,45 +657,8 @@ static void __init __get_smp_config(unsigned int early)
611 construct_default_ISA_mptable(mpf->feature1); 657 construct_default_ISA_mptable(mpf->feature1);
612 658
613 } else if (mpf->physptr) { 659 } else if (mpf->physptr) {
614 660 if (check_physptr(mpf, early))
615 /*
616 * Read the physical hardware table. Anything here will
617 * override the defaults.
618 */
619 if (!smp_read_mpc(phys_to_virt(mpf->physptr), early)) {
620#ifdef CONFIG_X86_LOCAL_APIC
621 smp_found_config = 0;
622#endif
623 printk(KERN_ERR
624 "BIOS bug, MP table errors detected!...\n");
625 printk(KERN_ERR "... disabling SMP support. "
626 "(tell your hw vendor)\n");
627 return;
628 }
629
630 if (early)
631 return; 661 return;
632#ifdef CONFIG_X86_IO_APIC
633 /*
634 * If there are no explicit MP IRQ entries, then we are
635 * broken. We set up most of the low 16 IO-APIC pins to
636 * ISA defaults and hope it will work.
637 */
638 if (!mp_irq_entries) {
639 struct mpc_bus bus;
640
641 printk(KERN_ERR "BIOS bug, no explicit IRQ entries, "
642 "using default mptable. "
643 "(tell your hw vendor)\n");
644
645 bus.type = MP_BUS;
646 bus.busid = 0;
647 memcpy(bus.bustype, "ISA ", 6);
648 MP_bus_info(&bus);
649
650 construct_default_ioirq_mptable(0);
651 }
652#endif
653 } else 662 } else
654 BUG(); 663 BUG();
655 664
@@ -670,6 +679,31 @@ void __init get_smp_config(void)
670 __get_smp_config(0); 679 __get_smp_config(0);
671} 680}
672 681
682static void smp_reserve_bootmem(struct mpf_intel *mpf)
683{
684 unsigned long size = get_mpc_size(mpf->physptr);
685#ifdef CONFIG_X86_32
686 /*
687 * We cannot access to MPC table to compute table size yet,
688 * as only few megabytes from the bottom is mapped now.
689 * PC-9800's MPC table places on the very last of physical
690 * memory; so that simply reserving PAGE_SIZE from mpf->physptr
691 * yields BUG() in reserve_bootmem.
692 * also need to make sure physptr is below than max_low_pfn
693 * we don't need reserve the area above max_low_pfn
694 */
695 unsigned long end = max_low_pfn * PAGE_SIZE;
696
697 if (mpf->physptr < end) {
698 if (mpf->physptr + size > end)
699 size = end - mpf->physptr;
700 reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT);
701 }
702#else
703 reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT);
704#endif
705}
706
673static int __init smp_scan_config(unsigned long base, unsigned long length, 707static int __init smp_scan_config(unsigned long base, unsigned long length,
674 unsigned reserve) 708 unsigned reserve)
675{ 709{
@@ -697,36 +731,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
697 731
698 if (!reserve) 732 if (!reserve)
699 return 1; 733 return 1;
700 reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE, 734 reserve_bootmem_generic(virt_to_phys(mpf), sizeof(*mpf),
701 BOOTMEM_DEFAULT);
702 if (mpf->physptr) {
703 unsigned long size = PAGE_SIZE;
704#ifdef CONFIG_X86_32
705 /*
706 * We cannot access to MPC table to compute
707 * table size yet, as only few megabytes from
708 * the bottom is mapped now.
709 * PC-9800's MPC table places on the very last
710 * of physical memory; so that simply reserving
711 * PAGE_SIZE from mpf->physptr yields BUG()
712 * in reserve_bootmem.
713 * also need to make sure physptr is below than
714 * max_low_pfn
715 * we don't need reserve the area above max_low_pfn
716 */
717 unsigned long end = max_low_pfn * PAGE_SIZE;
718
719 if (mpf->physptr < end) {
720 if (mpf->physptr + size > end)
721 size = end - mpf->physptr;
722 reserve_bootmem_generic(mpf->physptr, size,
723 BOOTMEM_DEFAULT);
724 }
725#else
726 reserve_bootmem_generic(mpf->physptr, size,
727 BOOTMEM_DEFAULT); 735 BOOTMEM_DEFAULT);
728#endif 736 if (mpf->physptr)
729 } 737 smp_reserve_bootmem(mpf);
730 738
731 return 1; 739 return 1;
732 } 740 }
@@ -829,7 +837,57 @@ static int __init get_MP_intsrc_index(struct mpc_intsrc *m)
829#define SPARE_SLOT_NUM 20 837#define SPARE_SLOT_NUM 20
830 838
831static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM]; 839static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM];
832#endif 840
841static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
842{
843 int i;
844
845 apic_printk(APIC_VERBOSE, "OLD ");
846 print_MP_intsrc_info(m);
847
848 i = get_MP_intsrc_index(m);
849 if (i > 0) {
850 assign_to_mpc_intsrc(&mp_irqs[i], m);
851 apic_printk(APIC_VERBOSE, "NEW ");
852 print_mp_irq_info(&mp_irqs[i]);
853 return;
854 }
855 if (!i) {
856 /* legacy, do nothing */
857 return;
858 }
859 if (*nr_m_spare < SPARE_SLOT_NUM) {
860 /*
861 * not found (-1), or duplicated (-2) are invalid entries,
862 * we need to use the slot later
863 */
864 m_spare[*nr_m_spare] = m;
865 *nr_m_spare += 1;
866 }
867}
868#else /* CONFIG_X86_IO_APIC */
869static inline void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
870#endif /* CONFIG_X86_IO_APIC */
871
872static int check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length,
873 int count)
874{
875 if (!mpc_new_phys) {
876 pr_info("No spare slots, try to append...take your risk, "
877 "new mpc_length %x\n", count);
878 } else {
879 if (count <= mpc_new_length)
880 pr_info("No spare slots, try to append..., "
881 "new mpc_length %x\n", count);
882 else {
883 pr_err("mpc_new_length %lx is too small\n",
884 mpc_new_length);
885 return -1;
886 }
887 }
888
889 return 0;
890}
833 891
834static int __init replace_intsrc_all(struct mpc_table *mpc, 892static int __init replace_intsrc_all(struct mpc_table *mpc,
835 unsigned long mpc_new_phys, 893 unsigned long mpc_new_phys,
@@ -837,77 +895,33 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
837{ 895{
838#ifdef CONFIG_X86_IO_APIC 896#ifdef CONFIG_X86_IO_APIC
839 int i; 897 int i;
840 int nr_m_spare = 0;
841#endif 898#endif
842
843 int count = sizeof(*mpc); 899 int count = sizeof(*mpc);
900 int nr_m_spare = 0;
844 unsigned char *mpt = ((unsigned char *)mpc) + count; 901 unsigned char *mpt = ((unsigned char *)mpc) + count;
845 902
846 printk(KERN_INFO "mpc_length %x\n", mpc->length); 903 printk(KERN_INFO "mpc_length %x\n", mpc->length);
847 while (count < mpc->length) { 904 while (count < mpc->length) {
848 switch (*mpt) { 905 switch (*mpt) {
849 case MP_PROCESSOR: 906 case MP_PROCESSOR:
850 { 907 skip_entry(&mpt, &count, sizeof(struct mpc_cpu));
851 struct mpc_cpu *m = (struct mpc_cpu *)mpt; 908 break;
852 mpt += sizeof(*m);
853 count += sizeof(*m);
854 break;
855 }
856 case MP_BUS: 909 case MP_BUS:
857 { 910 skip_entry(&mpt, &count, sizeof(struct mpc_bus));
858 struct mpc_bus *m = (struct mpc_bus *)mpt; 911 break;
859 mpt += sizeof(*m);
860 count += sizeof(*m);
861 break;
862 }
863 case MP_IOAPIC: 912 case MP_IOAPIC:
864 { 913 skip_entry(&mpt, &count, sizeof(struct mpc_ioapic));
865 mpt += sizeof(struct mpc_ioapic); 914 break;
866 count += sizeof(struct mpc_ioapic);
867 break;
868 }
869 case MP_INTSRC: 915 case MP_INTSRC:
870 { 916 check_irq_src((struct mpc_intsrc *)mpt, &nr_m_spare);
871#ifdef CONFIG_X86_IO_APIC 917 skip_entry(&mpt, &count, sizeof(struct mpc_intsrc));
872 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt; 918 break;
873
874 printk(KERN_INFO "OLD ");
875 print_MP_intsrc_info(m);
876 i = get_MP_intsrc_index(m);
877 if (i > 0) {
878 assign_to_mpc_intsrc(&mp_irqs[i], m);
879 printk(KERN_INFO "NEW ");
880 print_mp_irq_info(&mp_irqs[i]);
881 } else if (!i) {
882 /* legacy, do nothing */
883 } else if (nr_m_spare < SPARE_SLOT_NUM) {
884 /*
885 * not found (-1), or duplicated (-2)
886 * are invalid entries,
887 * we need to use the slot later
888 */
889 m_spare[nr_m_spare] = m;
890 nr_m_spare++;
891 }
892#endif
893 mpt += sizeof(struct mpc_intsrc);
894 count += sizeof(struct mpc_intsrc);
895 break;
896 }
897 case MP_LINTSRC: 919 case MP_LINTSRC:
898 { 920 skip_entry(&mpt, &count, sizeof(struct mpc_lintsrc));
899 struct mpc_lintsrc *m = 921 break;
900 (struct mpc_lintsrc *)mpt;
901 mpt += sizeof(*m);
902 count += sizeof(*m);
903 break;
904 }
905 default: 922 default:
906 /* wrong mptable */ 923 /* wrong mptable */
907 printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); 924 smp_dump_mptable(mpc, mpt);
908 printk(KERN_ERR "type %x\n", *mpt);
909 print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
910 1, mpc, mpc->length, 1);
911 goto out; 925 goto out;
912 } 926 }
913 } 927 }
@@ -924,23 +938,15 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
924 continue; 938 continue;
925 939
926 if (nr_m_spare > 0) { 940 if (nr_m_spare > 0) {
927 printk(KERN_INFO "*NEW* found "); 941 apic_printk(APIC_VERBOSE, "*NEW* found\n");
928 nr_m_spare--; 942 nr_m_spare--;
929 assign_to_mpc_intsrc(&mp_irqs[i], m_spare[nr_m_spare]); 943 assign_to_mpc_intsrc(&mp_irqs[i], m_spare[nr_m_spare]);
930 m_spare[nr_m_spare] = NULL; 944 m_spare[nr_m_spare] = NULL;
931 } else { 945 } else {
932 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt; 946 struct mpc_intsrc *m = (struct mpc_intsrc *)mpt;
933 count += sizeof(struct mpc_intsrc); 947 count += sizeof(struct mpc_intsrc);
934 if (!mpc_new_phys) { 948 if (!check_slot(mpc_new_phys, mpc_new_length, count))
935 printk(KERN_INFO "No spare slots, try to append...take your risk, new mpc_length %x\n", count); 949 goto out;
936 } else {
937 if (count <= mpc_new_length)
938 printk(KERN_INFO "No spare slots, try to append..., new mpc_length %x\n", count);
939 else {
940 printk(KERN_ERR "mpc_new_length %lx is too small\n", mpc_new_length);
941 goto out;
942 }
943 }
944 assign_to_mpc_intsrc(&mp_irqs[i], m); 950 assign_to_mpc_intsrc(&mp_irqs[i], m);
945 mpc->length = count; 951 mpc->length = count;
946 mpt += sizeof(struct mpc_intsrc); 952 mpt += sizeof(struct mpc_intsrc);
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 254e8aa8bfdb..aa3442340705 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -466,7 +466,6 @@ struct pv_mmu_ops pv_mmu_ops = {
466#if PAGETABLE_LEVELS >= 3 466#if PAGETABLE_LEVELS >= 3
467#ifdef CONFIG_X86_PAE 467#ifdef CONFIG_X86_PAE
468 .set_pte_atomic = native_set_pte_atomic, 468 .set_pte_atomic = native_set_pte_atomic,
469 .set_pte_present = native_set_pte_present,
470 .pte_clear = native_pte_clear, 469 .pte_clear = native_pte_clear,
471 .pmd_clear = native_pmd_clear, 470 .pmd_clear = native_pmd_clear,
472#endif 471#endif
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index d28bbdc35e4e..755c21e906f3 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -380,8 +380,9 @@ static inline struct iommu_table *find_iommu_table(struct device *dev)
380 return tbl; 380 return tbl;
381} 381}
382 382
383static void calgary_unmap_sg(struct device *dev, 383static void calgary_unmap_sg(struct device *dev, struct scatterlist *sglist,
384 struct scatterlist *sglist, int nelems, int direction) 384 int nelems,enum dma_data_direction dir,
385 struct dma_attrs *attrs)
385{ 386{
386 struct iommu_table *tbl = find_iommu_table(dev); 387 struct iommu_table *tbl = find_iommu_table(dev);
387 struct scatterlist *s; 388 struct scatterlist *s;
@@ -404,7 +405,8 @@ static void calgary_unmap_sg(struct device *dev,
404} 405}
405 406
406static int calgary_map_sg(struct device *dev, struct scatterlist *sg, 407static int calgary_map_sg(struct device *dev, struct scatterlist *sg,
407 int nelems, int direction) 408 int nelems, enum dma_data_direction dir,
409 struct dma_attrs *attrs)
408{ 410{
409 struct iommu_table *tbl = find_iommu_table(dev); 411 struct iommu_table *tbl = find_iommu_table(dev);
410 struct scatterlist *s; 412 struct scatterlist *s;
@@ -429,15 +431,14 @@ static int calgary_map_sg(struct device *dev, struct scatterlist *sg,
429 s->dma_address = (entry << PAGE_SHIFT) | s->offset; 431 s->dma_address = (entry << PAGE_SHIFT) | s->offset;
430 432
431 /* insert into HW table */ 433 /* insert into HW table */
432 tce_build(tbl, entry, npages, vaddr & PAGE_MASK, 434 tce_build(tbl, entry, npages, vaddr & PAGE_MASK, dir);
433 direction);
434 435
435 s->dma_length = s->length; 436 s->dma_length = s->length;
436 } 437 }
437 438
438 return nelems; 439 return nelems;
439error: 440error:
440 calgary_unmap_sg(dev, sg, nelems, direction); 441 calgary_unmap_sg(dev, sg, nelems, dir, NULL);
441 for_each_sg(sg, s, nelems, i) { 442 for_each_sg(sg, s, nelems, i) {
442 sg->dma_address = bad_dma_address; 443 sg->dma_address = bad_dma_address;
443 sg->dma_length = 0; 444 sg->dma_length = 0;
@@ -445,10 +446,12 @@ error:
445 return 0; 446 return 0;
446} 447}
447 448
448static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr, 449static dma_addr_t calgary_map_page(struct device *dev, struct page *page,
449 size_t size, int direction) 450 unsigned long offset, size_t size,
451 enum dma_data_direction dir,
452 struct dma_attrs *attrs)
450{ 453{
451 void *vaddr = phys_to_virt(paddr); 454 void *vaddr = page_address(page) + offset;
452 unsigned long uaddr; 455 unsigned long uaddr;
453 unsigned int npages; 456 unsigned int npages;
454 struct iommu_table *tbl = find_iommu_table(dev); 457 struct iommu_table *tbl = find_iommu_table(dev);
@@ -456,17 +459,18 @@ static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr,
456 uaddr = (unsigned long)vaddr; 459 uaddr = (unsigned long)vaddr;
457 npages = iommu_num_pages(uaddr, size, PAGE_SIZE); 460 npages = iommu_num_pages(uaddr, size, PAGE_SIZE);
458 461
459 return iommu_alloc(dev, tbl, vaddr, npages, direction); 462 return iommu_alloc(dev, tbl, vaddr, npages, dir);
460} 463}
461 464
462static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, 465static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr,
463 size_t size, int direction) 466 size_t size, enum dma_data_direction dir,
467 struct dma_attrs *attrs)
464{ 468{
465 struct iommu_table *tbl = find_iommu_table(dev); 469 struct iommu_table *tbl = find_iommu_table(dev);
466 unsigned int npages; 470 unsigned int npages;
467 471
468 npages = iommu_num_pages(dma_handle, size, PAGE_SIZE); 472 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
469 iommu_free(tbl, dma_handle, npages); 473 iommu_free(tbl, dma_addr, npages);
470} 474}
471 475
472static void* calgary_alloc_coherent(struct device *dev, size_t size, 476static void* calgary_alloc_coherent(struct device *dev, size_t size,
@@ -515,13 +519,13 @@ static void calgary_free_coherent(struct device *dev, size_t size,
515 free_pages((unsigned long)vaddr, get_order(size)); 519 free_pages((unsigned long)vaddr, get_order(size));
516} 520}
517 521
518static struct dma_mapping_ops calgary_dma_ops = { 522static struct dma_map_ops calgary_dma_ops = {
519 .alloc_coherent = calgary_alloc_coherent, 523 .alloc_coherent = calgary_alloc_coherent,
520 .free_coherent = calgary_free_coherent, 524 .free_coherent = calgary_free_coherent,
521 .map_single = calgary_map_single,
522 .unmap_single = calgary_unmap_single,
523 .map_sg = calgary_map_sg, 525 .map_sg = calgary_map_sg,
524 .unmap_sg = calgary_unmap_sg, 526 .unmap_sg = calgary_unmap_sg,
527 .map_page = calgary_map_page,
528 .unmap_page = calgary_unmap_page,
525}; 529};
526 530
527static inline void __iomem * busno_to_bbar(unsigned char num) 531static inline void __iomem * busno_to_bbar(unsigned char num)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index b25428533141..745579bc8256 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -1,4 +1,5 @@
1#include <linux/dma-mapping.h> 1#include <linux/dma-mapping.h>
2#include <linux/dma-debug.h>
2#include <linux/dmar.h> 3#include <linux/dmar.h>
3#include <linux/bootmem.h> 4#include <linux/bootmem.h>
4#include <linux/pci.h> 5#include <linux/pci.h>
@@ -12,7 +13,7 @@
12 13
13static int forbid_dac __read_mostly; 14static int forbid_dac __read_mostly;
14 15
15struct dma_mapping_ops *dma_ops; 16struct dma_map_ops *dma_ops;
16EXPORT_SYMBOL(dma_ops); 17EXPORT_SYMBOL(dma_ops);
17 18
18static int iommu_sac_force __read_mostly; 19static int iommu_sac_force __read_mostly;
@@ -39,11 +40,14 @@ EXPORT_SYMBOL(bad_dma_address);
39 to older i386. */ 40 to older i386. */
40struct device x86_dma_fallback_dev = { 41struct device x86_dma_fallback_dev = {
41 .init_name = "fallback device", 42 .init_name = "fallback device",
42 .coherent_dma_mask = DMA_32BIT_MASK, 43 .coherent_dma_mask = DMA_BIT_MASK(32),
43 .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask, 44 .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask,
44}; 45};
45EXPORT_SYMBOL(x86_dma_fallback_dev); 46EXPORT_SYMBOL(x86_dma_fallback_dev);
46 47
48/* Number of entries preallocated for DMA-API debugging */
49#define PREALLOC_DMA_DEBUG_ENTRIES 32768
50
47int dma_set_mask(struct device *dev, u64 mask) 51int dma_set_mask(struct device *dev, u64 mask)
48{ 52{
49 if (!dev->dma_mask || !dma_supported(dev, mask)) 53 if (!dev->dma_mask || !dma_supported(dev, mask))
@@ -144,7 +148,7 @@ again:
144 if (!is_buffer_dma_capable(dma_mask, addr, size)) { 148 if (!is_buffer_dma_capable(dma_mask, addr, size)) {
145 __free_pages(page, get_order(size)); 149 __free_pages(page, get_order(size));
146 150
147 if (dma_mask < DMA_32BIT_MASK && !(flag & GFP_DMA)) { 151 if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {
148 flag = (flag & ~GFP_DMA32) | GFP_DMA; 152 flag = (flag & ~GFP_DMA32) | GFP_DMA;
149 goto again; 153 goto again;
150 } 154 }
@@ -224,7 +228,7 @@ early_param("iommu", iommu_setup);
224 228
225int dma_supported(struct device *dev, u64 mask) 229int dma_supported(struct device *dev, u64 mask)
226{ 230{
227 struct dma_mapping_ops *ops = get_dma_ops(dev); 231 struct dma_map_ops *ops = get_dma_ops(dev);
228 232
229#ifdef CONFIG_PCI 233#ifdef CONFIG_PCI
230 if (mask > 0xffffffff && forbid_dac > 0) { 234 if (mask > 0xffffffff && forbid_dac > 0) {
@@ -239,7 +243,7 @@ int dma_supported(struct device *dev, u64 mask)
239 /* Copied from i386. Doesn't make much sense, because it will 243 /* Copied from i386. Doesn't make much sense, because it will
240 only work for pci_alloc_coherent. 244 only work for pci_alloc_coherent.
241 The caller just has to use GFP_DMA in this case. */ 245 The caller just has to use GFP_DMA in this case. */
242 if (mask < DMA_24BIT_MASK) 246 if (mask < DMA_BIT_MASK(24))
243 return 0; 247 return 0;
244 248
245 /* Tell the device to use SAC when IOMMU force is on. This 249 /* Tell the device to use SAC when IOMMU force is on. This
@@ -254,7 +258,7 @@ int dma_supported(struct device *dev, u64 mask)
254 SAC for these. Assume all masks <= 40 bits are of this 258 SAC for these. Assume all masks <= 40 bits are of this
255 type. Normally this doesn't make any difference, but gives 259 type. Normally this doesn't make any difference, but gives
256 more gentle handling of IOMMU overflow. */ 260 more gentle handling of IOMMU overflow. */
257 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { 261 if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
258 dev_info(dev, "Force SAC with mask %Lx\n", mask); 262 dev_info(dev, "Force SAC with mask %Lx\n", mask);
259 return 0; 263 return 0;
260 } 264 }
@@ -265,6 +269,12 @@ EXPORT_SYMBOL(dma_supported);
265 269
266static int __init pci_iommu_init(void) 270static int __init pci_iommu_init(void)
267{ 271{
272 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
273
274#ifdef CONFIG_PCI
275 dma_debug_add_bus(&pci_bus_type);
276#endif
277
268 calgary_iommu_init(); 278 calgary_iommu_init();
269 279
270 intel_iommu_init(); 280 intel_iommu_init();
@@ -290,8 +300,7 @@ fs_initcall(pci_iommu_init);
290static __devinit void via_no_dac(struct pci_dev *dev) 300static __devinit void via_no_dac(struct pci_dev *dev)
291{ 301{
292 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { 302 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
293 printk(KERN_INFO 303 dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n");
294 "PCI: VIA PCI bridge detected. Disabling DAC.\n");
295 forbid_dac = 1; 304 forbid_dac = 1;
296 } 305 }
297} 306}
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index d5768b1af080..b284b58c035c 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -255,10 +255,13 @@ static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem,
255} 255}
256 256
257/* Map a single area into the IOMMU */ 257/* Map a single area into the IOMMU */
258static dma_addr_t 258static dma_addr_t gart_map_page(struct device *dev, struct page *page,
259gart_map_single(struct device *dev, phys_addr_t paddr, size_t size, int dir) 259 unsigned long offset, size_t size,
260 enum dma_data_direction dir,
261 struct dma_attrs *attrs)
260{ 262{
261 unsigned long bus; 263 unsigned long bus;
264 phys_addr_t paddr = page_to_phys(page) + offset;
262 265
263 if (!dev) 266 if (!dev)
264 dev = &x86_dma_fallback_dev; 267 dev = &x86_dma_fallback_dev;
@@ -275,8 +278,9 @@ gart_map_single(struct device *dev, phys_addr_t paddr, size_t size, int dir)
275/* 278/*
276 * Free a DMA mapping. 279 * Free a DMA mapping.
277 */ 280 */
278static void gart_unmap_single(struct device *dev, dma_addr_t dma_addr, 281static void gart_unmap_page(struct device *dev, dma_addr_t dma_addr,
279 size_t size, int direction) 282 size_t size, enum dma_data_direction dir,
283 struct dma_attrs *attrs)
280{ 284{
281 unsigned long iommu_page; 285 unsigned long iommu_page;
282 int npages; 286 int npages;
@@ -298,8 +302,8 @@ static void gart_unmap_single(struct device *dev, dma_addr_t dma_addr,
298/* 302/*
299 * Wrapper for pci_unmap_single working with scatterlists. 303 * Wrapper for pci_unmap_single working with scatterlists.
300 */ 304 */
301static void 305static void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
302gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) 306 enum dma_data_direction dir, struct dma_attrs *attrs)
303{ 307{
304 struct scatterlist *s; 308 struct scatterlist *s;
305 int i; 309 int i;
@@ -307,7 +311,7 @@ gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
307 for_each_sg(sg, s, nents, i) { 311 for_each_sg(sg, s, nents, i) {
308 if (!s->dma_length || !s->length) 312 if (!s->dma_length || !s->length)
309 break; 313 break;
310 gart_unmap_single(dev, s->dma_address, s->dma_length, dir); 314 gart_unmap_page(dev, s->dma_address, s->dma_length, dir, NULL);
311 } 315 }
312} 316}
313 317
@@ -329,7 +333,7 @@ static int dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg,
329 addr = dma_map_area(dev, addr, s->length, dir, 0); 333 addr = dma_map_area(dev, addr, s->length, dir, 0);
330 if (addr == bad_dma_address) { 334 if (addr == bad_dma_address) {
331 if (i > 0) 335 if (i > 0)
332 gart_unmap_sg(dev, sg, i, dir); 336 gart_unmap_sg(dev, sg, i, dir, NULL);
333 nents = 0; 337 nents = 0;
334 sg[0].dma_length = 0; 338 sg[0].dma_length = 0;
335 break; 339 break;
@@ -400,8 +404,8 @@ dma_map_cont(struct device *dev, struct scatterlist *start, int nelems,
400 * DMA map all entries in a scatterlist. 404 * DMA map all entries in a scatterlist.
401 * Merge chunks that have page aligned sizes into a continuous mapping. 405 * Merge chunks that have page aligned sizes into a continuous mapping.
402 */ 406 */
403static int 407static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,
404gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) 408 enum dma_data_direction dir, struct dma_attrs *attrs)
405{ 409{
406 struct scatterlist *s, *ps, *start_sg, *sgmap; 410 struct scatterlist *s, *ps, *start_sg, *sgmap;
407 int need = 0, nextneed, i, out, start; 411 int need = 0, nextneed, i, out, start;
@@ -468,7 +472,7 @@ gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
468 472
469error: 473error:
470 flush_gart(); 474 flush_gart();
471 gart_unmap_sg(dev, sg, out, dir); 475 gart_unmap_sg(dev, sg, out, dir, NULL);
472 476
473 /* When it was forced or merged try again in a dumb way */ 477 /* When it was forced or merged try again in a dumb way */
474 if (force_iommu || iommu_merge) { 478 if (force_iommu || iommu_merge) {
@@ -521,7 +525,7 @@ static void
521gart_free_coherent(struct device *dev, size_t size, void *vaddr, 525gart_free_coherent(struct device *dev, size_t size, void *vaddr,
522 dma_addr_t dma_addr) 526 dma_addr_t dma_addr)
523{ 527{
524 gart_unmap_single(dev, dma_addr, size, DMA_BIDIRECTIONAL); 528 gart_unmap_page(dev, dma_addr, size, DMA_BIDIRECTIONAL, NULL);
525 free_pages((unsigned long)vaddr, get_order(size)); 529 free_pages((unsigned long)vaddr, get_order(size));
526} 530}
527 531
@@ -707,11 +711,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
707 return -1; 711 return -1;
708} 712}
709 713
710static struct dma_mapping_ops gart_dma_ops = { 714static struct dma_map_ops gart_dma_ops = {
711 .map_single = gart_map_single,
712 .unmap_single = gart_unmap_single,
713 .map_sg = gart_map_sg, 715 .map_sg = gart_map_sg,
714 .unmap_sg = gart_unmap_sg, 716 .unmap_sg = gart_unmap_sg,
717 .map_page = gart_map_page,
718 .unmap_page = gart_unmap_page,
715 .alloc_coherent = gart_alloc_coherent, 719 .alloc_coherent = gart_alloc_coherent,
716 .free_coherent = gart_free_coherent, 720 .free_coherent = gart_free_coherent,
717}; 721};
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index c70ab5a5d4c8..71d412a09f30 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -1,21 +1,21 @@
1/* Fallback functions when the main IOMMU code is not compiled in. This 1/* Fallback functions when the main IOMMU code is not compiled in. This
2 code is roughly equivalent to i386. */ 2 code is roughly equivalent to i386. */
3#include <linux/mm.h>
4#include <linux/init.h>
5#include <linux/pci.h>
6#include <linux/string.h>
7#include <linux/dma-mapping.h> 3#include <linux/dma-mapping.h>
8#include <linux/scatterlist.h> 4#include <linux/scatterlist.h>
5#include <linux/string.h>
6#include <linux/init.h>
7#include <linux/pci.h>
8#include <linux/mm.h>
9 9
10#include <asm/iommu.h>
11#include <asm/processor.h> 10#include <asm/processor.h>
11#include <asm/iommu.h>
12#include <asm/dma.h> 12#include <asm/dma.h>
13 13
14static int 14static int
15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) 15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
16{ 16{
17 if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) { 17 if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) {
18 if (*hwdev->dma_mask >= DMA_32BIT_MASK) 18 if (*hwdev->dma_mask >= DMA_BIT_MASK(32))
19 printk(KERN_ERR 19 printk(KERN_ERR
20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n", 20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
21 name, (long long)bus, size, 21 name, (long long)bus, size,
@@ -25,19 +25,19 @@ check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
25 return 1; 25 return 1;
26} 26}
27 27
28static dma_addr_t 28static dma_addr_t nommu_map_page(struct device *dev, struct page *page,
29nommu_map_single(struct device *hwdev, phys_addr_t paddr, size_t size, 29 unsigned long offset, size_t size,
30 int direction) 30 enum dma_data_direction dir,
31 struct dma_attrs *attrs)
31{ 32{
32 dma_addr_t bus = paddr; 33 dma_addr_t bus = page_to_phys(page) + offset;
33 WARN_ON(size == 0); 34 WARN_ON(size == 0);
34 if (!check_addr("map_single", hwdev, bus, size)) 35 if (!check_addr("map_single", dev, bus, size))
35 return bad_dma_address; 36 return bad_dma_address;
36 flush_write_buffers(); 37 flush_write_buffers();
37 return bus; 38 return bus;
38} 39}
39 40
40
41/* Map a set of buffers described by scatterlist in streaming 41/* Map a set of buffers described by scatterlist in streaming
42 * mode for DMA. This is the scatter-gather version of the 42 * mode for DMA. This is the scatter-gather version of the
43 * above pci_map_single interface. Here the scatter gather list 43 * above pci_map_single interface. Here the scatter gather list
@@ -54,7 +54,8 @@ nommu_map_single(struct device *hwdev, phys_addr_t paddr, size_t size,
54 * the same here. 54 * the same here.
55 */ 55 */
56static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, 56static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
57 int nents, int direction) 57 int nents, enum dma_data_direction dir,
58 struct dma_attrs *attrs)
58{ 59{
59 struct scatterlist *s; 60 struct scatterlist *s;
60 int i; 61 int i;
@@ -78,12 +79,12 @@ static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr,
78 free_pages((unsigned long)vaddr, get_order(size)); 79 free_pages((unsigned long)vaddr, get_order(size));
79} 80}
80 81
81struct dma_mapping_ops nommu_dma_ops = { 82struct dma_map_ops nommu_dma_ops = {
82 .alloc_coherent = dma_generic_alloc_coherent, 83 .alloc_coherent = dma_generic_alloc_coherent,
83 .free_coherent = nommu_free_coherent, 84 .free_coherent = nommu_free_coherent,
84 .map_single = nommu_map_single, 85 .map_sg = nommu_map_sg,
85 .map_sg = nommu_map_sg, 86 .map_page = nommu_map_page,
86 .is_phys = 1, 87 .is_phys = 1,
87}; 88};
88 89
89void __init no_iommu_init(void) 90void __init no_iommu_init(void)
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb.c
index d59c91747665..34f12e9996ed 100644
--- a/arch/x86/kernel/pci-swiotlb_64.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -33,18 +33,11 @@ phys_addr_t swiotlb_bus_to_phys(dma_addr_t baddr)
33 return baddr; 33 return baddr;
34} 34}
35 35
36int __weak swiotlb_arch_range_needs_mapping(void *ptr, size_t size) 36int __weak swiotlb_arch_range_needs_mapping(phys_addr_t paddr, size_t size)
37{ 37{
38 return 0; 38 return 0;
39} 39}
40 40
41static dma_addr_t
42swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size,
43 int direction)
44{
45 return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction);
46}
47
48static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, 41static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
49 dma_addr_t *dma_handle, gfp_t flags) 42 dma_addr_t *dma_handle, gfp_t flags)
50{ 43{
@@ -57,20 +50,20 @@ static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
57 return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags); 50 return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags);
58} 51}
59 52
60struct dma_mapping_ops swiotlb_dma_ops = { 53struct dma_map_ops swiotlb_dma_ops = {
61 .mapping_error = swiotlb_dma_mapping_error, 54 .mapping_error = swiotlb_dma_mapping_error,
62 .alloc_coherent = x86_swiotlb_alloc_coherent, 55 .alloc_coherent = x86_swiotlb_alloc_coherent,
63 .free_coherent = swiotlb_free_coherent, 56 .free_coherent = swiotlb_free_coherent,
64 .map_single = swiotlb_map_single_phys,
65 .unmap_single = swiotlb_unmap_single,
66 .sync_single_for_cpu = swiotlb_sync_single_for_cpu, 57 .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
67 .sync_single_for_device = swiotlb_sync_single_for_device, 58 .sync_single_for_device = swiotlb_sync_single_for_device,
68 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 59 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
69 .sync_single_range_for_device = swiotlb_sync_single_range_for_device, 60 .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
70 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, 61 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
71 .sync_sg_for_device = swiotlb_sync_sg_for_device, 62 .sync_sg_for_device = swiotlb_sync_sg_for_device,
72 .map_sg = swiotlb_map_sg, 63 .map_sg = swiotlb_map_sg_attrs,
73 .unmap_sg = swiotlb_unmap_sg, 64 .unmap_sg = swiotlb_unmap_sg_attrs,
65 .map_page = swiotlb_map_page,
66 .unmap_page = swiotlb_unmap_page,
74 .dma_supported = NULL, 67 .dma_supported = NULL,
75}; 68};
76 69
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 6afa5232dbb7..ca989158e847 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -8,7 +8,7 @@
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/pm.h> 9#include <linux/pm.h>
10#include <linux/clockchips.h> 10#include <linux/clockchips.h>
11#include <linux/ftrace.h> 11#include <trace/power.h>
12#include <asm/system.h> 12#include <asm/system.h>
13#include <asm/apic.h> 13#include <asm/apic.h>
14#include <asm/idle.h> 14#include <asm/idle.h>
@@ -22,6 +22,9 @@ EXPORT_SYMBOL(idle_nomwait);
22 22
23struct kmem_cache *task_xstate_cachep; 23struct kmem_cache *task_xstate_cachep;
24 24
25DEFINE_TRACE(power_start);
26DEFINE_TRACE(power_end);
27
25int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) 28int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
26{ 29{
27 *dst = *src; 30 *dst = *src;
@@ -65,11 +68,11 @@ void exit_thread(void)
65{ 68{
66 struct task_struct *me = current; 69 struct task_struct *me = current;
67 struct thread_struct *t = &me->thread; 70 struct thread_struct *t = &me->thread;
71 unsigned long *bp = t->io_bitmap_ptr;
68 72
69 if (me->thread.io_bitmap_ptr) { 73 if (bp) {
70 struct tss_struct *tss = &per_cpu(init_tss, get_cpu()); 74 struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
71 75
72 kfree(t->io_bitmap_ptr);
73 t->io_bitmap_ptr = NULL; 76 t->io_bitmap_ptr = NULL;
74 clear_thread_flag(TIF_IO_BITMAP); 77 clear_thread_flag(TIF_IO_BITMAP);
75 /* 78 /*
@@ -78,6 +81,7 @@ void exit_thread(void)
78 memset(tss->io_bitmap, 0xff, t->io_bitmap_max); 81 memset(tss->io_bitmap, 0xff, t->io_bitmap_max);
79 t->io_bitmap_max = 0; 82 t->io_bitmap_max = 0;
80 put_cpu(); 83 put_cpu();
84 kfree(bp);
81 } 85 }
82 86
83 ds_exit_thread(current); 87 ds_exit_thread(current);
@@ -324,7 +328,7 @@ void stop_this_cpu(void *dummy)
324 /* 328 /*
325 * Remove this CPU: 329 * Remove this CPU:
326 */ 330 */
327 cpu_clear(smp_processor_id(), cpu_online_map); 331 set_cpu_online(smp_processor_id(), false);
328 disable_local_APIC(); 332 disable_local_APIC();
329 333
330 for (;;) { 334 for (;;) {
@@ -474,12 +478,13 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
474 return 1; 478 return 1;
475} 479}
476 480
477static cpumask_t c1e_mask = CPU_MASK_NONE; 481static cpumask_var_t c1e_mask;
478static int c1e_detected; 482static int c1e_detected;
479 483
480void c1e_remove_cpu(int cpu) 484void c1e_remove_cpu(int cpu)
481{ 485{
482 cpu_clear(cpu, c1e_mask); 486 if (c1e_mask != NULL)
487 cpumask_clear_cpu(cpu, c1e_mask);
483} 488}
484 489
485/* 490/*
@@ -508,8 +513,8 @@ static void c1e_idle(void)
508 if (c1e_detected) { 513 if (c1e_detected) {
509 int cpu = smp_processor_id(); 514 int cpu = smp_processor_id();
510 515
511 if (!cpu_isset(cpu, c1e_mask)) { 516 if (!cpumask_test_cpu(cpu, c1e_mask)) {
512 cpu_set(cpu, c1e_mask); 517 cpumask_set_cpu(cpu, c1e_mask);
513 /* 518 /*
514 * Force broadcast so ACPI can not interfere. Needs 519 * Force broadcast so ACPI can not interfere. Needs
515 * to run with interrupts enabled as it uses 520 * to run with interrupts enabled as it uses
@@ -561,6 +566,15 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
561 pm_idle = default_idle; 566 pm_idle = default_idle;
562} 567}
563 568
569void __init init_c1e_mask(void)
570{
571 /* If we're using c1e_idle, we need to allocate c1e_mask. */
572 if (pm_idle == c1e_idle) {
573 alloc_cpumask_var(&c1e_mask, GFP_KERNEL);
574 cpumask_clear(c1e_mask);
575 }
576}
577
564static int __init idle_setup(char *str) 578static int __init idle_setup(char *str)
565{ 579{
566 if (!str) 580 if (!str)
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index d766c7616fd7..5de30f0960fb 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -245,7 +245,7 @@ void prepare_to_copy(struct task_struct *tsk)
245 unlazy_fpu(tsk); 245 unlazy_fpu(tsk);
246} 246}
247 247
248int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, 248int copy_thread(unsigned long clone_flags, unsigned long sp,
249 unsigned long unused, 249 unsigned long unused,
250 struct task_struct *p, struct pt_regs *regs) 250 struct task_struct *p, struct pt_regs *regs)
251{ 251{
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index e8a9aaf9df88..66ad06791d6f 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -278,7 +278,7 @@ void prepare_to_copy(struct task_struct *tsk)
278 unlazy_fpu(tsk); 278 unlazy_fpu(tsk);
279} 279}
280 280
281int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, 281int copy_thread(unsigned long clone_flags, unsigned long sp,
282 unsigned long unused, 282 unsigned long unused,
283 struct task_struct *p, struct pt_regs *regs) 283 struct task_struct *p, struct pt_regs *regs)
284{ 284{
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 3d9672e59c16..fe9345c967de 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -21,6 +21,7 @@
21#include <linux/audit.h> 21#include <linux/audit.h>
22#include <linux/seccomp.h> 22#include <linux/seccomp.h>
23#include <linux/signal.h> 23#include <linux/signal.h>
24#include <linux/ftrace.h>
24 25
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26#include <asm/pgtable.h> 27#include <asm/pgtable.h>
@@ -685,9 +686,8 @@ static int ptrace_bts_config(struct task_struct *child,
685 if (!cfg.signal) 686 if (!cfg.signal)
686 return -EINVAL; 687 return -EINVAL;
687 688
688 return -EOPNOTSUPP;
689
690 child->thread.bts_ovfl_signal = cfg.signal; 689 child->thread.bts_ovfl_signal = cfg.signal;
690 return -EOPNOTSUPP;
691 } 691 }
692 692
693 if ((cfg.flags & PTRACE_BTS_O_ALLOC) && 693 if ((cfg.flags & PTRACE_BTS_O_ALLOC) &&
@@ -1416,6 +1416,9 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)
1416 tracehook_report_syscall_entry(regs)) 1416 tracehook_report_syscall_entry(regs))
1417 ret = -1L; 1417 ret = -1L;
1418 1418
1419 if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
1420 ftrace_syscall_enter(regs);
1421
1419 if (unlikely(current->audit_context)) { 1422 if (unlikely(current->audit_context)) {
1420 if (IS_IA32) 1423 if (IS_IA32)
1421 audit_syscall_entry(AUDIT_ARCH_I386, 1424 audit_syscall_entry(AUDIT_ARCH_I386,
@@ -1439,6 +1442,9 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs)
1439 if (unlikely(current->audit_context)) 1442 if (unlikely(current->audit_context))
1440 audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); 1443 audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax);
1441 1444
1445 if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
1446 ftrace_syscall_exit(regs);
1447
1442 if (test_thread_flag(TIF_SYSCALL_TRACE)) 1448 if (test_thread_flag(TIF_SYSCALL_TRACE))
1443 tracehook_report_syscall_exit(regs, 0); 1449 tracehook_report_syscall_exit(regs, 0);
1444 1450
@@ -1456,6 +1462,6 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs)
1456 * system call instruction. 1462 * system call instruction.
1457 */ 1463 */
1458 if (test_thread_flag(TIF_SINGLESTEP) && 1464 if (test_thread_flag(TIF_SINGLESTEP) &&
1459 tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL)) 1465 tracehook_consider_fatal_signal(current, SIGTRAP))
1460 send_sigtrap(current, regs, 0, TRAP_BRKPT); 1466 send_sigtrap(current, regs, 0, TRAP_BRKPT);
1461} 1467}
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 697d1b78cfbf..e95022e4f5d5 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -74,8 +74,7 @@ static void ich_force_hpet_resume(void)
74 if (!force_hpet_address) 74 if (!force_hpet_address)
75 return; 75 return;
76 76
77 if (rcba_base == NULL) 77 BUG_ON(rcba_base == NULL);
78 BUG();
79 78
80 /* read the Function Disable register, dword mode only */ 79 /* read the Function Disable register, dword mode only */
81 val = readl(rcba_base + 0x3404); 80 val = readl(rcba_base + 0x3404);
diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S
index 2064d0aa8d28..41235531b11c 100644
--- a/arch/x86/kernel/relocate_kernel_32.S
+++ b/arch/x86/kernel/relocate_kernel_32.S
@@ -17,7 +17,8 @@
17 17
18#define PTR(x) (x << 2) 18#define PTR(x) (x << 2)
19 19
20/* control_page + KEXEC_CONTROL_CODE_MAX_SIZE 20/*
21 * control_page + KEXEC_CONTROL_CODE_MAX_SIZE
21 * ~ control_page + PAGE_SIZE are used as data storage and stack for 22 * ~ control_page + PAGE_SIZE are used as data storage and stack for
22 * jumping back 23 * jumping back
23 */ 24 */
@@ -76,8 +77,10 @@ relocate_kernel:
76 movl %eax, CP_PA_SWAP_PAGE(%edi) 77 movl %eax, CP_PA_SWAP_PAGE(%edi)
77 movl %ebx, CP_PA_BACKUP_PAGES_MAP(%edi) 78 movl %ebx, CP_PA_BACKUP_PAGES_MAP(%edi)
78 79
79 /* get physical address of control page now */ 80 /*
80 /* this is impossible after page table switch */ 81 * get physical address of control page now
82 * this is impossible after page table switch
83 */
81 movl PTR(PA_CONTROL_PAGE)(%ebp), %edi 84 movl PTR(PA_CONTROL_PAGE)(%ebp), %edi
82 85
83 /* switch to new set of page tables */ 86 /* switch to new set of page tables */
@@ -97,7 +100,8 @@ identity_mapped:
97 /* store the start address on the stack */ 100 /* store the start address on the stack */
98 pushl %edx 101 pushl %edx
99 102
100 /* Set cr0 to a known state: 103 /*
104 * Set cr0 to a known state:
101 * - Paging disabled 105 * - Paging disabled
102 * - Alignment check disabled 106 * - Alignment check disabled
103 * - Write protect disabled 107 * - Write protect disabled
@@ -113,7 +117,8 @@ identity_mapped:
113 /* clear cr4 if applicable */ 117 /* clear cr4 if applicable */
114 testl %ecx, %ecx 118 testl %ecx, %ecx
115 jz 1f 119 jz 1f
116 /* Set cr4 to a known state: 120 /*
121 * Set cr4 to a known state:
117 * Setting everything to zero seems safe. 122 * Setting everything to zero seems safe.
118 */ 123 */
119 xorl %eax, %eax 124 xorl %eax, %eax
@@ -132,15 +137,18 @@ identity_mapped:
132 call swap_pages 137 call swap_pages
133 addl $8, %esp 138 addl $8, %esp
134 139
135 /* To be certain of avoiding problems with self-modifying code 140 /*
141 * To be certain of avoiding problems with self-modifying code
136 * I need to execute a serializing instruction here. 142 * I need to execute a serializing instruction here.
137 * So I flush the TLB, it's handy, and not processor dependent. 143 * So I flush the TLB, it's handy, and not processor dependent.
138 */ 144 */
139 xorl %eax, %eax 145 xorl %eax, %eax
140 movl %eax, %cr3 146 movl %eax, %cr3
141 147
142 /* set all of the registers to known values */ 148 /*
143 /* leave %esp alone */ 149 * set all of the registers to known values
150 * leave %esp alone
151 */
144 152
145 testl %esi, %esi 153 testl %esi, %esi
146 jnz 1f 154 jnz 1f
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index d32cfb27a479..4de8f5b3d476 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -19,29 +19,77 @@
19#define PTR(x) (x << 3) 19#define PTR(x) (x << 3)
20#define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) 20#define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
21 21
22/*
23 * control_page + KEXEC_CONTROL_CODE_MAX_SIZE
24 * ~ control_page + PAGE_SIZE are used as data storage and stack for
25 * jumping back
26 */
27#define DATA(offset) (KEXEC_CONTROL_CODE_MAX_SIZE+(offset))
28
29/* Minimal CPU state */
30#define RSP DATA(0x0)
31#define CR0 DATA(0x8)
32#define CR3 DATA(0x10)
33#define CR4 DATA(0x18)
34
35/* other data */
36#define CP_PA_TABLE_PAGE DATA(0x20)
37#define CP_PA_SWAP_PAGE DATA(0x28)
38#define CP_PA_BACKUP_PAGES_MAP DATA(0x30)
39
22 .text 40 .text
23 .align PAGE_SIZE 41 .align PAGE_SIZE
24 .code64 42 .code64
25 .globl relocate_kernel 43 .globl relocate_kernel
26relocate_kernel: 44relocate_kernel:
27 /* %rdi indirection_page 45 /*
46 * %rdi indirection_page
28 * %rsi page_list 47 * %rsi page_list
29 * %rdx start address 48 * %rdx start address
49 * %rcx preserve_context
30 */ 50 */
31 51
52 /* Save the CPU context, used for jumping back */
53 pushq %rbx
54 pushq %rbp
55 pushq %r12
56 pushq %r13
57 pushq %r14
58 pushq %r15
59 pushf
60
61 movq PTR(VA_CONTROL_PAGE)(%rsi), %r11
62 movq %rsp, RSP(%r11)
63 movq %cr0, %rax
64 movq %rax, CR0(%r11)
65 movq %cr3, %rax
66 movq %rax, CR3(%r11)
67 movq %cr4, %rax
68 movq %rax, CR4(%r11)
69
32 /* zero out flags, and disable interrupts */ 70 /* zero out flags, and disable interrupts */
33 pushq $0 71 pushq $0
34 popfq 72 popfq
35 73
36 /* get physical address of control page now */ 74 /*
37 /* this is impossible after page table switch */ 75 * get physical address of control page now
76 * this is impossible after page table switch
77 */
38 movq PTR(PA_CONTROL_PAGE)(%rsi), %r8 78 movq PTR(PA_CONTROL_PAGE)(%rsi), %r8
39 79
40 /* get physical address of page table now too */ 80 /* get physical address of page table now too */
41 movq PTR(PA_TABLE_PAGE)(%rsi), %rcx 81 movq PTR(PA_TABLE_PAGE)(%rsi), %r9
82
83 /* get physical address of swap page now */
84 movq PTR(PA_SWAP_PAGE)(%rsi), %r10
85
86 /* save some information for jumping back */
87 movq %r9, CP_PA_TABLE_PAGE(%r11)
88 movq %r10, CP_PA_SWAP_PAGE(%r11)
89 movq %rdi, CP_PA_BACKUP_PAGES_MAP(%r11)
42 90
43 /* Switch to the identity mapped page tables */ 91 /* Switch to the identity mapped page tables */
44 movq %rcx, %cr3 92 movq %r9, %cr3
45 93
46 /* setup a new stack at the end of the physical control page */ 94 /* setup a new stack at the end of the physical control page */
47 lea PAGE_SIZE(%r8), %rsp 95 lea PAGE_SIZE(%r8), %rsp
@@ -55,7 +103,8 @@ identity_mapped:
55 /* store the start address on the stack */ 103 /* store the start address on the stack */
56 pushq %rdx 104 pushq %rdx
57 105
58 /* Set cr0 to a known state: 106 /*
107 * Set cr0 to a known state:
59 * - Paging enabled 108 * - Paging enabled
60 * - Alignment check disabled 109 * - Alignment check disabled
61 * - Write protect disabled 110 * - Write protect disabled
@@ -68,7 +117,8 @@ identity_mapped:
68 orl $(X86_CR0_PG | X86_CR0_PE), %eax 117 orl $(X86_CR0_PG | X86_CR0_PE), %eax
69 movq %rax, %cr0 118 movq %rax, %cr0
70 119
71 /* Set cr4 to a known state: 120 /*
121 * Set cr4 to a known state:
72 * - physical address extension enabled 122 * - physical address extension enabled
73 */ 123 */
74 movq $X86_CR4_PAE, %rax 124 movq $X86_CR4_PAE, %rax
@@ -78,9 +128,87 @@ identity_mapped:
781: 1281:
79 129
80 /* Flush the TLB (needed?) */ 130 /* Flush the TLB (needed?) */
81 movq %rcx, %cr3 131 movq %r9, %cr3
132
133 movq %rcx, %r11
134 call swap_pages
135
136 /*
137 * To be certain of avoiding problems with self-modifying code
138 * I need to execute a serializing instruction here.
139 * So I flush the TLB by reloading %cr3 here, it's handy,
140 * and not processor dependent.
141 */
142 movq %cr3, %rax
143 movq %rax, %cr3
144
145 /*
146 * set all of the registers to known values
147 * leave %rsp alone
148 */
149
150 testq %r11, %r11
151 jnz 1f
152 xorq %rax, %rax
153 xorq %rbx, %rbx
154 xorq %rcx, %rcx
155 xorq %rdx, %rdx
156 xorq %rsi, %rsi
157 xorq %rdi, %rdi
158 xorq %rbp, %rbp
159 xorq %r8, %r8
160 xorq %r9, %r9
161 xorq %r10, %r9
162 xorq %r11, %r11
163 xorq %r12, %r12
164 xorq %r13, %r13
165 xorq %r14, %r14
166 xorq %r15, %r15
167
168 ret
169
1701:
171 popq %rdx
172 leaq PAGE_SIZE(%r10), %rsp
173 call *%rdx
174
175 /* get the re-entry point of the peer system */
176 movq 0(%rsp), %rbp
177 call 1f
1781:
179 popq %r8
180 subq $(1b - relocate_kernel), %r8
181 movq CP_PA_SWAP_PAGE(%r8), %r10
182 movq CP_PA_BACKUP_PAGES_MAP(%r8), %rdi
183 movq CP_PA_TABLE_PAGE(%r8), %rax
184 movq %rax, %cr3
185 lea PAGE_SIZE(%r8), %rsp
186 call swap_pages
187 movq $virtual_mapped, %rax
188 pushq %rax
189 ret
190
191virtual_mapped:
192 movq RSP(%r8), %rsp
193 movq CR4(%r8), %rax
194 movq %rax, %cr4
195 movq CR3(%r8), %rax
196 movq CR0(%r8), %r8
197 movq %rax, %cr3
198 movq %r8, %cr0
199 movq %rbp, %rax
200
201 popf
202 popq %r15
203 popq %r14
204 popq %r13
205 popq %r12
206 popq %rbp
207 popq %rbx
208 ret
82 209
83 /* Do the copies */ 210 /* Do the copies */
211swap_pages:
84 movq %rdi, %rcx /* Put the page_list in %rcx */ 212 movq %rdi, %rcx /* Put the page_list in %rcx */
85 xorq %rdi, %rdi 213 xorq %rdi, %rdi
86 xorq %rsi, %rsi 214 xorq %rsi, %rsi
@@ -112,36 +240,27 @@ identity_mapped:
112 movq %rcx, %rsi /* For ever source page do a copy */ 240 movq %rcx, %rsi /* For ever source page do a copy */
113 andq $0xfffffffffffff000, %rsi 241 andq $0xfffffffffffff000, %rsi
114 242
243 movq %rdi, %rdx
244 movq %rsi, %rax
245
246 movq %r10, %rdi
115 movq $512, %rcx 247 movq $512, %rcx
116 rep ; movsq 248 rep ; movsq
117 jmp 0b
1183:
119
120 /* To be certain of avoiding problems with self-modifying code
121 * I need to execute a serializing instruction here.
122 * So I flush the TLB by reloading %cr3 here, it's handy,
123 * and not processor dependent.
124 */
125 movq %cr3, %rax
126 movq %rax, %cr3
127 249
128 /* set all of the registers to known values */ 250 movq %rax, %rdi
129 /* leave %rsp alone */ 251 movq %rdx, %rsi
252 movq $512, %rcx
253 rep ; movsq
130 254
131 xorq %rax, %rax 255 movq %rdx, %rdi
132 xorq %rbx, %rbx 256 movq %r10, %rsi
133 xorq %rcx, %rcx 257 movq $512, %rcx
134 xorq %rdx, %rdx 258 rep ; movsq
135 xorq %rsi, %rsi
136 xorq %rdi, %rdi
137 xorq %rbp, %rbp
138 xorq %r8, %r8
139 xorq %r9, %r9
140 xorq %r10, %r9
141 xorq %r11, %r11
142 xorq %r12, %r12
143 xorq %r13, %r13
144 xorq %r14, %r14
145 xorq %r15, %r15
146 259
260 lea PAGE_SIZE(%rax), %rsi
261 jmp 0b
2623:
147 ret 263 ret
264
265 .globl kexec_control_code_size
266.set kexec_control_code_size, . - relocate_kernel
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index dd6f2b71561b..5d465b207e72 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -1,14 +1,14 @@
1/* 1/*
2 * RTC related functions 2 * RTC related functions
3 */ 3 */
4#include <linux/platform_device.h>
5#include <linux/mc146818rtc.h>
4#include <linux/acpi.h> 6#include <linux/acpi.h>
5#include <linux/bcd.h> 7#include <linux/bcd.h>
6#include <linux/mc146818rtc.h>
7#include <linux/platform_device.h>
8#include <linux/pnp.h> 8#include <linux/pnp.h>
9 9
10#include <asm/time.h>
11#include <asm/vsyscall.h> 10#include <asm/vsyscall.h>
11#include <asm/time.h>
12 12
13#ifdef CONFIG_X86_32 13#ifdef CONFIG_X86_32
14/* 14/*
@@ -16,9 +16,9 @@
16 * register we are working with. It is required for NMI access to the 16 * register we are working with. It is required for NMI access to the
17 * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details. 17 * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details.
18 */ 18 */
19volatile unsigned long cmos_lock = 0; 19volatile unsigned long cmos_lock;
20EXPORT_SYMBOL(cmos_lock); 20EXPORT_SYMBOL(cmos_lock);
21#endif 21#endif /* CONFIG_X86_32 */
22 22
23/* For two digit years assume time is always after that */ 23/* For two digit years assume time is always after that */
24#define CMOS_YEARS_OFFS 2000 24#define CMOS_YEARS_OFFS 2000
@@ -38,9 +38,9 @@ EXPORT_SYMBOL(rtc_lock);
38 */ 38 */
39int mach_set_rtc_mmss(unsigned long nowtime) 39int mach_set_rtc_mmss(unsigned long nowtime)
40{ 40{
41 int retval = 0;
42 int real_seconds, real_minutes, cmos_minutes; 41 int real_seconds, real_minutes, cmos_minutes;
43 unsigned char save_control, save_freq_select; 42 unsigned char save_control, save_freq_select;
43 int retval = 0;
44 44
45 /* tell the clock it's being set */ 45 /* tell the clock it's being set */
46 save_control = CMOS_READ(RTC_CONTROL); 46 save_control = CMOS_READ(RTC_CONTROL);
@@ -72,8 +72,8 @@ int mach_set_rtc_mmss(unsigned long nowtime)
72 real_seconds = bin2bcd(real_seconds); 72 real_seconds = bin2bcd(real_seconds);
73 real_minutes = bin2bcd(real_minutes); 73 real_minutes = bin2bcd(real_minutes);
74 } 74 }
75 CMOS_WRITE(real_seconds,RTC_SECONDS); 75 CMOS_WRITE(real_seconds, RTC_SECONDS);
76 CMOS_WRITE(real_minutes,RTC_MINUTES); 76 CMOS_WRITE(real_minutes, RTC_MINUTES);
77 } else { 77 } else {
78 printk(KERN_WARNING 78 printk(KERN_WARNING
79 "set_rtc_mmss: can't update from %d to %d\n", 79 "set_rtc_mmss: can't update from %d to %d\n",
@@ -151,6 +151,7 @@ unsigned char rtc_cmos_read(unsigned char addr)
151 outb(addr, RTC_PORT(0)); 151 outb(addr, RTC_PORT(0));
152 val = inb(RTC_PORT(1)); 152 val = inb(RTC_PORT(1));
153 lock_cmos_suffix(addr); 153 lock_cmos_suffix(addr);
154
154 return val; 155 return val;
155} 156}
156EXPORT_SYMBOL(rtc_cmos_read); 157EXPORT_SYMBOL(rtc_cmos_read);
@@ -166,8 +167,8 @@ EXPORT_SYMBOL(rtc_cmos_write);
166 167
167static int set_rtc_mmss(unsigned long nowtime) 168static int set_rtc_mmss(unsigned long nowtime)
168{ 169{
169 int retval;
170 unsigned long flags; 170 unsigned long flags;
171 int retval;
171 172
172 spin_lock_irqsave(&rtc_lock, flags); 173 spin_lock_irqsave(&rtc_lock, flags);
173 retval = set_wallclock(nowtime); 174 retval = set_wallclock(nowtime);
@@ -242,6 +243,7 @@ static __init int add_rtc_cmos(void)
242 platform_device_register(&rtc_device); 243 platform_device_register(&rtc_device);
243 dev_info(&rtc_device.dev, 244 dev_info(&rtc_device.dev,
244 "registered platform RTC device (no PNP device found)\n"); 245 "registered platform RTC device (no PNP device found)\n");
246
245 return 0; 247 return 0;
246} 248}
247device_initcall(add_rtc_cmos); 249device_initcall(add_rtc_cmos);
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index b746deb9ebc6..b4158439bf63 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -112,8 +112,13 @@
112#define ARCH_SETUP 112#define ARCH_SETUP
113#endif 113#endif
114 114
115RESERVE_BRK(dmi_alloc, 65536);
116
115unsigned int boot_cpu_id __read_mostly; 117unsigned int boot_cpu_id __read_mostly;
116 118
119static __initdata unsigned long _brk_start = (unsigned long)__brk_base;
120unsigned long _brk_end = (unsigned long)__brk_base;
121
117#ifdef CONFIG_X86_64 122#ifdef CONFIG_X86_64
118int default_cpu_present_to_apicid(int mps_cpu) 123int default_cpu_present_to_apicid(int mps_cpu)
119{ 124{
@@ -158,12 +163,6 @@ static struct resource bss_resource = {
158 163
159 164
160#ifdef CONFIG_X86_32 165#ifdef CONFIG_X86_32
161/* This value is set up by the early boot code to point to the value
162 immediately after the boot time page tables. It contains a *physical*
163 address, and must not be in the .bss segment! */
164unsigned long init_pg_tables_start __initdata = ~0UL;
165unsigned long init_pg_tables_end __initdata = ~0UL;
166
167static struct resource video_ram_resource = { 166static struct resource video_ram_resource = {
168 .name = "Video RAM area", 167 .name = "Video RAM area",
169 .start = 0xa0000, 168 .start = 0xa0000,
@@ -202,7 +201,9 @@ struct ist_info ist_info;
202#endif 201#endif
203 202
204#else 203#else
205struct cpuinfo_x86 boot_cpu_data __read_mostly; 204struct cpuinfo_x86 boot_cpu_data __read_mostly = {
205 .x86_phys_bits = MAX_PHYSMEM_BITS,
206};
206EXPORT_SYMBOL(boot_cpu_data); 207EXPORT_SYMBOL(boot_cpu_data);
207#endif 208#endif
208 209
@@ -217,12 +218,6 @@ unsigned long mmu_cr4_features = X86_CR4_PAE;
217int bootloader_type; 218int bootloader_type;
218 219
219/* 220/*
220 * Early DMI memory
221 */
222int dmi_alloc_index;
223char dmi_alloc_data[DMI_MAX_DATA];
224
225/*
226 * Setup options 221 * Setup options
227 */ 222 */
228struct screen_info screen_info; 223struct screen_info screen_info;
@@ -267,6 +262,35 @@ static inline void copy_edd(void)
267} 262}
268#endif 263#endif
269 264
265void * __init extend_brk(size_t size, size_t align)
266{
267 size_t mask = align - 1;
268 void *ret;
269
270 BUG_ON(_brk_start == 0);
271 BUG_ON(align & mask);
272
273 _brk_end = (_brk_end + mask) & ~mask;
274 BUG_ON((char *)(_brk_end + size) > __brk_limit);
275
276 ret = (void *)_brk_end;
277 _brk_end += size;
278
279 memset(ret, 0, size);
280
281 return ret;
282}
283
284static void __init reserve_brk(void)
285{
286 if (_brk_end > _brk_start)
287 reserve_early(__pa(_brk_start), __pa(_brk_end), "BRK");
288
289 /* Mark brk area as locked down and no longer taking any
290 new allocations */
291 _brk_start = 0;
292}
293
270#ifdef CONFIG_BLK_DEV_INITRD 294#ifdef CONFIG_BLK_DEV_INITRD
271 295
272#ifdef CONFIG_X86_32 296#ifdef CONFIG_X86_32
@@ -715,11 +739,7 @@ void __init setup_arch(char **cmdline_p)
715 init_mm.start_code = (unsigned long) _text; 739 init_mm.start_code = (unsigned long) _text;
716 init_mm.end_code = (unsigned long) _etext; 740 init_mm.end_code = (unsigned long) _etext;
717 init_mm.end_data = (unsigned long) _edata; 741 init_mm.end_data = (unsigned long) _edata;
718#ifdef CONFIG_X86_32 742 init_mm.brk = _brk_end;
719 init_mm.brk = init_pg_tables_end + PAGE_OFFSET;
720#else
721 init_mm.brk = (unsigned long) &_end;
722#endif
723 743
724 code_resource.start = virt_to_phys(_text); 744 code_resource.start = virt_to_phys(_text);
725 code_resource.end = virt_to_phys(_etext)-1; 745 code_resource.end = virt_to_phys(_etext)-1;
@@ -840,6 +860,8 @@ void __init setup_arch(char **cmdline_p)
840 setup_bios_corruption_check(); 860 setup_bios_corruption_check();
841#endif 861#endif
842 862
863 reserve_brk();
864
843 /* max_pfn_mapped is updated here */ 865 /* max_pfn_mapped is updated here */
844 max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT); 866 max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
845 max_pfn_mapped = max_low_pfn_mapped; 867 max_pfn_mapped = max_low_pfn_mapped;
@@ -1027,7 +1049,6 @@ void __init x86_quirk_trap_init(void)
1027static struct irqaction irq0 = { 1049static struct irqaction irq0 = {
1028 .handler = timer_interrupt, 1050 .handler = timer_interrupt,
1029 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, 1051 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
1030 .mask = CPU_MASK_NONE,
1031 .name = "timer" 1052 .name = "timer"
1032}; 1053};
1033 1054
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 400331b50a53..3a97a4cf1872 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -153,7 +153,6 @@ static struct page * __init pcpur_get_page(unsigned int cpu, int pageno)
153static ssize_t __init setup_pcpu_remap(size_t static_size) 153static ssize_t __init setup_pcpu_remap(size_t static_size)
154{ 154{
155 static struct vm_struct vm; 155 static struct vm_struct vm;
156 pg_data_t *last;
157 size_t ptrs_size, dyn_size; 156 size_t ptrs_size, dyn_size;
158 unsigned int cpu; 157 unsigned int cpu;
159 ssize_t ret; 158 ssize_t ret;
@@ -162,22 +161,9 @@ static ssize_t __init setup_pcpu_remap(size_t static_size)
162 * If large page isn't supported, there's no benefit in doing 161 * If large page isn't supported, there's no benefit in doing
163 * this. Also, on non-NUMA, embedding is better. 162 * this. Also, on non-NUMA, embedding is better.
164 */ 163 */
165 if (!cpu_has_pse || pcpu_need_numa()) 164 if (!cpu_has_pse || !pcpu_need_numa())
166 return -EINVAL; 165 return -EINVAL;
167 166
168 last = NULL;
169 for_each_possible_cpu(cpu) {
170 int node = early_cpu_to_node(cpu);
171
172 if (node_online(node) && NODE_DATA(node) &&
173 last && last != NODE_DATA(node))
174 goto proceed;
175
176 last = NODE_DATA(node);
177 }
178 return -EINVAL;
179
180proceed:
181 /* 167 /*
182 * Currently supports only single page. Supporting multiple 168 * Currently supports only single page. Supporting multiple
183 * pages won't be too difficult if it ever becomes necessary. 169 * pages won't be too difficult if it ever becomes necessary.
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index d2cc6428c587..14425166b8e3 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -211,31 +211,27 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
211{ 211{
212 /* Default to using normal stack */ 212 /* Default to using normal stack */
213 unsigned long sp = regs->sp; 213 unsigned long sp = regs->sp;
214 int onsigstack = on_sig_stack(sp);
214 215
215#ifdef CONFIG_X86_64 216#ifdef CONFIG_X86_64
216 /* redzone */ 217 /* redzone */
217 sp -= 128; 218 sp -= 128;
218#endif /* CONFIG_X86_64 */ 219#endif /* CONFIG_X86_64 */
219 220
220 /* 221 if (!onsigstack) {
221 * If we are on the alternate signal stack and would overflow it, don't. 222 /* This is the X/Open sanctioned signal stack switching. */
222 * Return an always-bogus address instead so we will die with SIGSEGV. 223 if (ka->sa.sa_flags & SA_ONSTACK) {
223 */ 224 if (current->sas_ss_size)
224 if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size))) 225 sp = current->sas_ss_sp + current->sas_ss_size;
225 return (void __user *) -1L; 226 } else {
226
227 /* This is the X/Open sanctioned signal stack switching. */
228 if (ka->sa.sa_flags & SA_ONSTACK) {
229 if (sas_ss_flags(sp) == 0)
230 sp = current->sas_ss_sp + current->sas_ss_size;
231 } else {
232#ifdef CONFIG_X86_32 227#ifdef CONFIG_X86_32
233 /* This is the legacy signal stack switching. */ 228 /* This is the legacy signal stack switching. */
234 if ((regs->ss & 0xffff) != __USER_DS && 229 if ((regs->ss & 0xffff) != __USER_DS &&
235 !(ka->sa.sa_flags & SA_RESTORER) && 230 !(ka->sa.sa_flags & SA_RESTORER) &&
236 ka->sa.sa_restorer) 231 ka->sa.sa_restorer)
237 sp = (unsigned long) ka->sa.sa_restorer; 232 sp = (unsigned long) ka->sa.sa_restorer;
238#endif /* CONFIG_X86_32 */ 233#endif /* CONFIG_X86_32 */
234 }
239 } 235 }
240 236
241 if (used_math()) { 237 if (used_math()) {
@@ -244,12 +240,22 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
244 sp = round_down(sp, 64); 240 sp = round_down(sp, 64);
245#endif /* CONFIG_X86_64 */ 241#endif /* CONFIG_X86_64 */
246 *fpstate = (void __user *)sp; 242 *fpstate = (void __user *)sp;
247
248 if (save_i387_xstate(*fpstate) < 0)
249 return (void __user *)-1L;
250 } 243 }
251 244
252 return (void __user *)align_sigframe(sp - frame_size); 245 sp = align_sigframe(sp - frame_size);
246
247 /*
248 * If we are on the alternate signal stack and would overflow it, don't.
249 * Return an always-bogus address instead so we will die with SIGSEGV.
250 */
251 if (onsigstack && !likely(on_sig_stack(sp)))
252 return (void __user *)-1L;
253
254 /* save i387 state */
255 if (used_math() && save_i387_xstate(*fpstate) < 0)
256 return (void __user *)-1L;
257
258 return (void __user *)sp;
253} 259}
254 260
255#ifdef CONFIG_X86_32 261#ifdef CONFIG_X86_32
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 249334f5080a..58d24ef917d8 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -101,11 +101,11 @@ EXPORT_SYMBOL(smp_num_siblings);
101DEFINE_PER_CPU(u16, cpu_llc_id) = BAD_APICID; 101DEFINE_PER_CPU(u16, cpu_llc_id) = BAD_APICID;
102 102
103/* representing HT siblings of each logical CPU */ 103/* representing HT siblings of each logical CPU */
104DEFINE_PER_CPU(cpumask_t, cpu_sibling_map); 104DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map);
105EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); 105EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
106 106
107/* representing HT and core siblings of each logical CPU */ 107/* representing HT and core siblings of each logical CPU */
108DEFINE_PER_CPU(cpumask_t, cpu_core_map); 108DEFINE_PER_CPU(cpumask_var_t, cpu_core_map);
109EXPORT_PER_CPU_SYMBOL(cpu_core_map); 109EXPORT_PER_CPU_SYMBOL(cpu_core_map);
110 110
111/* Per CPU bogomips and other parameters */ 111/* Per CPU bogomips and other parameters */
@@ -114,16 +114,7 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
114 114
115atomic_t init_deasserted; 115atomic_t init_deasserted;
116 116
117
118/* Set if we find a B stepping CPU */
119static int __cpuinitdata smp_b_stepping;
120
121#if defined(CONFIG_NUMA) && defined(CONFIG_X86_32) 117#if defined(CONFIG_NUMA) && defined(CONFIG_X86_32)
122
123/* which logical CPUs are on which nodes */
124cpumask_t node_to_cpumask_map[MAX_NUMNODES] __read_mostly =
125 { [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE };
126EXPORT_SYMBOL(node_to_cpumask_map);
127/* which node each logical CPU is on */ 118/* which node each logical CPU is on */
128int cpu_to_node_map[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 }; 119int cpu_to_node_map[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 };
129EXPORT_SYMBOL(cpu_to_node_map); 120EXPORT_SYMBOL(cpu_to_node_map);
@@ -132,7 +123,7 @@ EXPORT_SYMBOL(cpu_to_node_map);
132static void map_cpu_to_node(int cpu, int node) 123static void map_cpu_to_node(int cpu, int node)
133{ 124{
134 printk(KERN_INFO "Mapping cpu %d to node %d\n", cpu, node); 125 printk(KERN_INFO "Mapping cpu %d to node %d\n", cpu, node);
135 cpumask_set_cpu(cpu, &node_to_cpumask_map[node]); 126 cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
136 cpu_to_node_map[cpu] = node; 127 cpu_to_node_map[cpu] = node;
137} 128}
138 129
@@ -143,7 +134,7 @@ static void unmap_cpu_to_node(int cpu)
143 134
144 printk(KERN_INFO "Unmapping cpu %d from all nodes\n", cpu); 135 printk(KERN_INFO "Unmapping cpu %d from all nodes\n", cpu);
145 for (node = 0; node < MAX_NUMNODES; node++) 136 for (node = 0; node < MAX_NUMNODES; node++)
146 cpumask_clear_cpu(cpu, &node_to_cpumask_map[node]); 137 cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
147 cpu_to_node_map[cpu] = 0; 138 cpu_to_node_map[cpu] = 0;
148} 139}
149#else /* !(CONFIG_NUMA && CONFIG_X86_32) */ 140#else /* !(CONFIG_NUMA && CONFIG_X86_32) */
@@ -271,8 +262,6 @@ static void __cpuinit smp_callin(void)
271 cpumask_set_cpu(cpuid, cpu_callin_mask); 262 cpumask_set_cpu(cpuid, cpu_callin_mask);
272} 263}
273 264
274static int __cpuinitdata unsafe_smp;
275
276/* 265/*
277 * Activate a secondary processor. 266 * Activate a secondary processor.
278 */ 267 */
@@ -307,7 +296,7 @@ notrace static void __cpuinit start_secondary(void *unused)
307 __flush_tlb_all(); 296 __flush_tlb_all();
308#endif 297#endif
309 298
310 /* This must be done before setting cpu_online_map */ 299 /* This must be done before setting cpu_online_mask */
311 set_cpu_sibling_map(raw_smp_processor_id()); 300 set_cpu_sibling_map(raw_smp_processor_id());
312 wmb(); 301 wmb();
313 302
@@ -340,75 +329,22 @@ notrace static void __cpuinit start_secondary(void *unused)
340 cpu_idle(); 329 cpu_idle();
341} 330}
342 331
343static void __cpuinit smp_apply_quirks(struct cpuinfo_x86 *c) 332#ifdef CONFIG_CPUMASK_OFFSTACK
333/* In this case, llc_shared_map is a pointer to a cpumask. */
334static inline void copy_cpuinfo_x86(struct cpuinfo_x86 *dst,
335 const struct cpuinfo_x86 *src)
344{ 336{
345 /* 337 struct cpumask *llc = dst->llc_shared_map;
346 * Mask B, Pentium, but not Pentium MMX 338 *dst = *src;
347 */ 339 dst->llc_shared_map = llc;
348 if (c->x86_vendor == X86_VENDOR_INTEL &&
349 c->x86 == 5 &&
350 c->x86_mask >= 1 && c->x86_mask <= 4 &&
351 c->x86_model <= 3)
352 /*
353 * Remember we have B step Pentia with bugs
354 */
355 smp_b_stepping = 1;
356
357 /*
358 * Certain Athlons might work (for various values of 'work') in SMP
359 * but they are not certified as MP capable.
360 */
361 if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
362
363 if (num_possible_cpus() == 1)
364 goto valid_k7;
365
366 /* Athlon 660/661 is valid. */
367 if ((c->x86_model == 6) && ((c->x86_mask == 0) ||
368 (c->x86_mask == 1)))
369 goto valid_k7;
370
371 /* Duron 670 is valid */
372 if ((c->x86_model == 7) && (c->x86_mask == 0))
373 goto valid_k7;
374
375 /*
376 * Athlon 662, Duron 671, and Athlon >model 7 have capability
377 * bit. It's worth noting that the A5 stepping (662) of some
378 * Athlon XP's have the MP bit set.
379 * See http://www.heise.de/newsticker/data/jow-18.10.01-000 for
380 * more.
381 */
382 if (((c->x86_model == 6) && (c->x86_mask >= 2)) ||
383 ((c->x86_model == 7) && (c->x86_mask >= 1)) ||
384 (c->x86_model > 7))
385 if (cpu_has_mp)
386 goto valid_k7;
387
388 /* If we get here, not a certified SMP capable AMD system. */
389 unsafe_smp = 1;
390 }
391
392valid_k7:
393 ;
394} 340}
395 341#else
396static void __cpuinit smp_checks(void) 342static inline void copy_cpuinfo_x86(struct cpuinfo_x86 *dst,
343 const struct cpuinfo_x86 *src)
397{ 344{
398 if (smp_b_stepping) 345 *dst = *src;
399 printk(KERN_WARNING "WARNING: SMP operation may be unreliable"
400 "with B stepping processors.\n");
401
402 /*
403 * Don't taint if we are running SMP kernel on a single non-MP
404 * approved Athlon
405 */
406 if (unsafe_smp && num_online_cpus() > 1) {
407 printk(KERN_INFO "WARNING: This combination of AMD"
408 "processors is not suitable for SMP.\n");
409 add_taint(TAINT_UNSAFE_SMP);
410 }
411} 346}
347#endif /* CONFIG_CPUMASK_OFFSTACK */
412 348
413/* 349/*
414 * The bootstrap kernel entry code has set these up. Save them for 350 * The bootstrap kernel entry code has set these up. Save them for
@@ -419,11 +355,10 @@ void __cpuinit smp_store_cpu_info(int id)
419{ 355{
420 struct cpuinfo_x86 *c = &cpu_data(id); 356 struct cpuinfo_x86 *c = &cpu_data(id);
421 357
422 *c = boot_cpu_data; 358 copy_cpuinfo_x86(c, &boot_cpu_data);
423 c->cpu_index = id; 359 c->cpu_index = id;
424 if (id != 0) 360 if (id != 0)
425 identify_secondary_cpu(c); 361 identify_secondary_cpu(c);
426 smp_apply_quirks(c);
427} 362}
428 363
429 364
@@ -444,15 +379,15 @@ void __cpuinit set_cpu_sibling_map(int cpu)
444 cpumask_set_cpu(cpu, cpu_sibling_mask(i)); 379 cpumask_set_cpu(cpu, cpu_sibling_mask(i));
445 cpumask_set_cpu(i, cpu_core_mask(cpu)); 380 cpumask_set_cpu(i, cpu_core_mask(cpu));
446 cpumask_set_cpu(cpu, cpu_core_mask(i)); 381 cpumask_set_cpu(cpu, cpu_core_mask(i));
447 cpumask_set_cpu(i, &c->llc_shared_map); 382 cpumask_set_cpu(i, c->llc_shared_map);
448 cpumask_set_cpu(cpu, &o->llc_shared_map); 383 cpumask_set_cpu(cpu, o->llc_shared_map);
449 } 384 }
450 } 385 }
451 } else { 386 } else {
452 cpumask_set_cpu(cpu, cpu_sibling_mask(cpu)); 387 cpumask_set_cpu(cpu, cpu_sibling_mask(cpu));
453 } 388 }
454 389
455 cpumask_set_cpu(cpu, &c->llc_shared_map); 390 cpumask_set_cpu(cpu, c->llc_shared_map);
456 391
457 if (current_cpu_data.x86_max_cores == 1) { 392 if (current_cpu_data.x86_max_cores == 1) {
458 cpumask_copy(cpu_core_mask(cpu), cpu_sibling_mask(cpu)); 393 cpumask_copy(cpu_core_mask(cpu), cpu_sibling_mask(cpu));
@@ -463,8 +398,8 @@ void __cpuinit set_cpu_sibling_map(int cpu)
463 for_each_cpu(i, cpu_sibling_setup_mask) { 398 for_each_cpu(i, cpu_sibling_setup_mask) {
464 if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && 399 if (per_cpu(cpu_llc_id, cpu) != BAD_APICID &&
465 per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { 400 per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) {
466 cpumask_set_cpu(i, &c->llc_shared_map); 401 cpumask_set_cpu(i, c->llc_shared_map);
467 cpumask_set_cpu(cpu, &cpu_data(i).llc_shared_map); 402 cpumask_set_cpu(cpu, cpu_data(i).llc_shared_map);
468 } 403 }
469 if (c->phys_proc_id == cpu_data(i).phys_proc_id) { 404 if (c->phys_proc_id == cpu_data(i).phys_proc_id) {
470 cpumask_set_cpu(i, cpu_core_mask(cpu)); 405 cpumask_set_cpu(i, cpu_core_mask(cpu));
@@ -502,12 +437,7 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
502 if (sched_mc_power_savings || sched_smt_power_savings) 437 if (sched_mc_power_savings || sched_smt_power_savings)
503 return cpu_core_mask(cpu); 438 return cpu_core_mask(cpu);
504 else 439 else
505 return &c->llc_shared_map; 440 return c->llc_shared_map;
506}
507
508cpumask_t cpu_coregroup_map(int cpu)
509{
510 return *cpu_coregroup_mask(cpu);
511} 441}
512 442
513static void impress_friends(void) 443static void impress_friends(void)
@@ -974,9 +904,8 @@ int __cpuinit native_cpu_up(unsigned int cpu)
974 */ 904 */
975static __init void disable_smp(void) 905static __init void disable_smp(void)
976{ 906{
977 /* use the read/write pointers to the present and possible maps */ 907 init_cpu_present(cpumask_of(0));
978 cpumask_copy(&cpu_present_map, cpumask_of(0)); 908 init_cpu_possible(cpumask_of(0));
979 cpumask_copy(&cpu_possible_map, cpumask_of(0));
980 smpboot_clear_io_apic_irqs(); 909 smpboot_clear_io_apic_irqs();
981 910
982 if (smp_found_config) 911 if (smp_found_config)
@@ -1108,6 +1037,8 @@ static void __init smp_cpu_index_default(void)
1108 */ 1037 */
1109void __init native_smp_prepare_cpus(unsigned int max_cpus) 1038void __init native_smp_prepare_cpus(unsigned int max_cpus)
1110{ 1039{
1040 unsigned int i;
1041
1111 preempt_disable(); 1042 preempt_disable();
1112 smp_cpu_index_default(); 1043 smp_cpu_index_default();
1113 current_cpu_data = boot_cpu_data; 1044 current_cpu_data = boot_cpu_data;
@@ -1121,6 +1052,14 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
1121 boot_cpu_logical_apicid = logical_smp_processor_id(); 1052 boot_cpu_logical_apicid = logical_smp_processor_id();
1122#endif 1053#endif
1123 current_thread_info()->cpu = 0; /* needed? */ 1054 current_thread_info()->cpu = 0; /* needed? */
1055 for_each_possible_cpu(i) {
1056 alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
1057 alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
1058 alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
1059 cpumask_clear(per_cpu(cpu_core_map, i));
1060 cpumask_clear(per_cpu(cpu_sibling_map, i));
1061 cpumask_clear(cpu_data(i).llc_shared_map);
1062 }
1124 set_cpu_sibling_map(0); 1063 set_cpu_sibling_map(0);
1125 1064
1126 enable_IR_x2apic(); 1065 enable_IR_x2apic();
@@ -1193,7 +1132,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
1193 pr_debug("Boot done.\n"); 1132 pr_debug("Boot done.\n");
1194 1133
1195 impress_friends(); 1134 impress_friends();
1196 smp_checks();
1197#ifdef CONFIG_X86_IO_APIC 1135#ifdef CONFIG_X86_IO_APIC
1198 setup_ioapic_dest(); 1136 setup_ioapic_dest();
1199#endif 1137#endif
@@ -1210,11 +1148,11 @@ early_param("possible_cpus", _setup_possible_cpus);
1210 1148
1211 1149
1212/* 1150/*
1213 * cpu_possible_map should be static, it cannot change as cpu's 1151 * cpu_possible_mask should be static, it cannot change as cpu's
1214 * are onlined, or offlined. The reason is per-cpu data-structures 1152 * are onlined, or offlined. The reason is per-cpu data-structures
1215 * are allocated by some modules at init time, and dont expect to 1153 * are allocated by some modules at init time, and dont expect to
1216 * do this dynamically on cpu arrival/departure. 1154 * do this dynamically on cpu arrival/departure.
1217 * cpu_present_map on the other hand can change dynamically. 1155 * cpu_present_mask on the other hand can change dynamically.
1218 * In case when cpu_hotplug is not compiled, then we resort to current 1156 * In case when cpu_hotplug is not compiled, then we resort to current
1219 * behaviour, which is cpu_possible == cpu_present. 1157 * behaviour, which is cpu_possible == cpu_present.
1220 * - Ashok Raj 1158 * - Ashok Raj
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index 3bdb64829b82..ff5c8736b491 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -332,3 +332,5 @@ ENTRY(sys_call_table)
332 .long sys_dup3 /* 330 */ 332 .long sys_dup3 /* 330 */
333 .long sys_pipe2 333 .long sys_pipe2
334 .long sys_inotify_init1 334 .long sys_inotify_init1
335 .long sys_preadv
336 .long sys_pwritev
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c
index 241ec3923f61..5ba343e61844 100644
--- a/arch/x86/kernel/time_64.c
+++ b/arch/x86/kernel/time_64.c
@@ -116,7 +116,6 @@ unsigned long __init calibrate_cpu(void)
116static struct irqaction irq0 = { 116static struct irqaction irq0 = {
117 .handler = timer_interrupt, 117 .handler = timer_interrupt,
118 .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER, 118 .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER,
119 .mask = CPU_MASK_NONE,
120 .name = "timer" 119 .name = "timer"
121}; 120};
122 121
@@ -125,7 +124,6 @@ void __init hpet_time_init(void)
125 if (!hpet_enable()) 124 if (!hpet_enable())
126 setup_pit_timer(); 125 setup_pit_timer();
127 126
128 irq0.mask = cpumask_of_cpu(0);
129 setup_irq(0, &irq0); 127 setup_irq(0, &irq0);
130} 128}
131 129
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index d038b9c45cf8..deb5ebb32c3b 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -275,6 +275,8 @@ const struct cpumask *uv_flush_send_and_wait(int cpu, int this_blade,
275 return NULL; 275 return NULL;
276} 276}
277 277
278static DEFINE_PER_CPU(cpumask_var_t, uv_flush_tlb_mask);
279
278/** 280/**
279 * uv_flush_tlb_others - globally purge translation cache of a virtual 281 * uv_flush_tlb_others - globally purge translation cache of a virtual
280 * address or all TLB's 282 * address or all TLB's
@@ -304,8 +306,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
304 struct mm_struct *mm, 306 struct mm_struct *mm,
305 unsigned long va, unsigned int cpu) 307 unsigned long va, unsigned int cpu)
306{ 308{
307 static DEFINE_PER_CPU(cpumask_t, flush_tlb_mask); 309 struct cpumask *flush_mask = __get_cpu_var(uv_flush_tlb_mask);
308 struct cpumask *flush_mask = &__get_cpu_var(flush_tlb_mask);
309 int i; 310 int i;
310 int bit; 311 int bit;
311 int blade; 312 int blade;
@@ -750,16 +751,21 @@ static int __init uv_bau_init(void)
750 int node; 751 int node;
751 int nblades; 752 int nblades;
752 int last_blade; 753 int last_blade;
753 int cur_cpu = 0; 754 int cur_cpu;
754 755
755 if (!is_uv_system()) 756 if (!is_uv_system())
756 return 0; 757 return 0;
757 758
759 for_each_possible_cpu(cur_cpu)
760 alloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu),
761 GFP_KERNEL, cpu_to_node(cur_cpu));
762
758 uv_bau_retry_limit = 1; 763 uv_bau_retry_limit = 1;
759 uv_nshift = uv_hub_info->n_val; 764 uv_nshift = uv_hub_info->n_val;
760 uv_mmask = (1UL << uv_hub_info->n_val) - 1; 765 uv_mmask = (1UL << uv_hub_info->n_val) - 1;
761 nblades = 0; 766 nblades = 0;
762 last_blade = -1; 767 last_blade = -1;
768 cur_cpu = 0;
763 for_each_online_node(node) { 769 for_each_online_node(node) {
764 blade = uv_node_to_blade_id(node); 770 blade = uv_node_to_blade_id(node);
765 if (blade == last_blade) 771 if (blade == last_blade)
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 0fcc95a354f7..7e4515957a1c 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -25,10 +25,10 @@
25 * 25 *
26 * Send feedback to <colpatch@us.ibm.com> 26 * Send feedback to <colpatch@us.ibm.com>
27 */ 27 */
28#include <linux/init.h>
29#include <linux/smp.h>
30#include <linux/nodemask.h> 28#include <linux/nodemask.h>
31#include <linux/mmzone.h> 29#include <linux/mmzone.h>
30#include <linux/init.h>
31#include <linux/smp.h>
32#include <asm/cpu.h> 32#include <asm/cpu.h>
33 33
34static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); 34static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
@@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num)
47 */ 47 */
48 if (num) 48 if (num)
49 per_cpu(cpu_devices, num).cpu.hotpluggable = 1; 49 per_cpu(cpu_devices, num).cpu.hotpluggable = 1;
50
50 return register_cpu(&per_cpu(cpu_devices, num).cpu, num); 51 return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
51} 52}
52EXPORT_SYMBOL(arch_register_cpu); 53EXPORT_SYMBOL(arch_register_cpu);
@@ -56,12 +57,13 @@ void arch_unregister_cpu(int num)
56 unregister_cpu(&per_cpu(cpu_devices, num).cpu); 57 unregister_cpu(&per_cpu(cpu_devices, num).cpu);
57} 58}
58EXPORT_SYMBOL(arch_unregister_cpu); 59EXPORT_SYMBOL(arch_unregister_cpu);
59#else 60#else /* CONFIG_HOTPLUG_CPU */
61
60static int __init arch_register_cpu(int num) 62static int __init arch_register_cpu(int num)
61{ 63{
62 return register_cpu(&per_cpu(cpu_devices, num).cpu, num); 64 return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
63} 65}
64#endif /*CONFIG_HOTPLUG_CPU*/ 66#endif /* CONFIG_HOTPLUG_CPU */
65 67
66static int __init topology_init(void) 68static int __init topology_init(void)
67{ 69{
@@ -70,11 +72,11 @@ static int __init topology_init(void)
70#ifdef CONFIG_NUMA 72#ifdef CONFIG_NUMA
71 for_each_online_node(i) 73 for_each_online_node(i)
72 register_one_node(i); 74 register_one_node(i);
73#endif /* CONFIG_NUMA */ 75#endif
74 76
75 for_each_present_cpu(i) 77 for_each_present_cpu(i)
76 arch_register_cpu(i); 78 arch_register_cpu(i);
79
77 return 0; 80 return 0;
78} 81}
79
80subsys_initcall(topology_init); 82subsys_initcall(topology_init);
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c
new file mode 100644
index 000000000000..2ffb6c53326e
--- /dev/null
+++ b/arch/x86/kernel/uv_time.c
@@ -0,0 +1,393 @@
1/*
2 * SGI RTC clock/timer routines.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Copyright (c) 2009 Silicon Graphics, Inc. All Rights Reserved.
19 * Copyright (c) Dimitri Sivanich
20 */
21#include <linux/clockchips.h>
22
23#include <asm/uv/uv_mmrs.h>
24#include <asm/uv/uv_hub.h>
25#include <asm/uv/bios.h>
26#include <asm/uv/uv.h>
27#include <asm/apic.h>
28#include <asm/cpu.h>
29
30#define RTC_NAME "sgi_rtc"
31
32static cycle_t uv_read_rtc(void);
33static int uv_rtc_next_event(unsigned long, struct clock_event_device *);
34static void uv_rtc_timer_setup(enum clock_event_mode,
35 struct clock_event_device *);
36
37static struct clocksource clocksource_uv = {
38 .name = RTC_NAME,
39 .rating = 400,
40 .read = uv_read_rtc,
41 .mask = (cycle_t)UVH_RTC_REAL_TIME_CLOCK_MASK,
42 .shift = 10,
43 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
44};
45
46static struct clock_event_device clock_event_device_uv = {
47 .name = RTC_NAME,
48 .features = CLOCK_EVT_FEAT_ONESHOT,
49 .shift = 20,
50 .rating = 400,
51 .irq = -1,
52 .set_next_event = uv_rtc_next_event,
53 .set_mode = uv_rtc_timer_setup,
54 .event_handler = NULL,
55};
56
57static DEFINE_PER_CPU(struct clock_event_device, cpu_ced);
58
59/* There is one of these allocated per node */
60struct uv_rtc_timer_head {
61 spinlock_t lock;
62 /* next cpu waiting for timer, local node relative: */
63 int next_cpu;
64 /* number of cpus on this node: */
65 int ncpus;
66 struct {
67 int lcpu; /* systemwide logical cpu number */
68 u64 expires; /* next timer expiration for this cpu */
69 } cpu[1];
70};
71
72/*
73 * Access to uv_rtc_timer_head via blade id.
74 */
75static struct uv_rtc_timer_head **blade_info __read_mostly;
76
77static int uv_rtc_enable;
78
79/*
80 * Hardware interface routines
81 */
82
83/* Send IPIs to another node */
84static void uv_rtc_send_IPI(int cpu)
85{
86 unsigned long apicid, val;
87 int pnode;
88
89 apicid = cpu_physical_id(cpu);
90 pnode = uv_apicid_to_pnode(apicid);
91 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
92 (apicid << UVH_IPI_INT_APIC_ID_SHFT) |
93 (GENERIC_INTERRUPT_VECTOR << UVH_IPI_INT_VECTOR_SHFT);
94
95 uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
96}
97
98/* Check for an RTC interrupt pending */
99static int uv_intr_pending(int pnode)
100{
101 return uv_read_global_mmr64(pnode, UVH_EVENT_OCCURRED0) &
102 UVH_EVENT_OCCURRED0_RTC1_MASK;
103}
104
105/* Setup interrupt and return non-zero if early expiration occurred. */
106static int uv_setup_intr(int cpu, u64 expires)
107{
108 u64 val;
109 int pnode = uv_cpu_to_pnode(cpu);
110
111 uv_write_global_mmr64(pnode, UVH_RTC1_INT_CONFIG,
112 UVH_RTC1_INT_CONFIG_M_MASK);
113 uv_write_global_mmr64(pnode, UVH_INT_CMPB, -1L);
114
115 uv_write_global_mmr64(pnode, UVH_EVENT_OCCURRED0_ALIAS,
116 UVH_EVENT_OCCURRED0_RTC1_MASK);
117
118 val = (GENERIC_INTERRUPT_VECTOR << UVH_RTC1_INT_CONFIG_VECTOR_SHFT) |
119 ((u64)cpu_physical_id(cpu) << UVH_RTC1_INT_CONFIG_APIC_ID_SHFT);
120
121 /* Set configuration */
122 uv_write_global_mmr64(pnode, UVH_RTC1_INT_CONFIG, val);
123 /* Initialize comparator value */
124 uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires);
125
126 return (expires < uv_read_rtc() && !uv_intr_pending(pnode));
127}
128
129/*
130 * Per-cpu timer tracking routines
131 */
132
133static __init void uv_rtc_deallocate_timers(void)
134{
135 int bid;
136
137 for_each_possible_blade(bid) {
138 kfree(blade_info[bid]);
139 }
140 kfree(blade_info);
141}
142
143/* Allocate per-node list of cpu timer expiration times. */
144static __init int uv_rtc_allocate_timers(void)
145{
146 int cpu;
147
148 blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
149 if (!blade_info)
150 return -ENOMEM;
151 memset(blade_info, 0, uv_possible_blades * sizeof(void *));
152
153 for_each_present_cpu(cpu) {
154 int nid = cpu_to_node(cpu);
155 int bid = uv_cpu_to_blade_id(cpu);
156 int bcpu = uv_cpu_hub_info(cpu)->blade_processor_id;
157 struct uv_rtc_timer_head *head = blade_info[bid];
158
159 if (!head) {
160 head = kmalloc_node(sizeof(struct uv_rtc_timer_head) +
161 (uv_blade_nr_possible_cpus(bid) *
162 2 * sizeof(u64)),
163 GFP_KERNEL, nid);
164 if (!head) {
165 uv_rtc_deallocate_timers();
166 return -ENOMEM;
167 }
168 spin_lock_init(&head->lock);
169 head->ncpus = uv_blade_nr_possible_cpus(bid);
170 head->next_cpu = -1;
171 blade_info[bid] = head;
172 }
173
174 head->cpu[bcpu].lcpu = cpu;
175 head->cpu[bcpu].expires = ULLONG_MAX;
176 }
177
178 return 0;
179}
180
181/* Find and set the next expiring timer. */
182static void uv_rtc_find_next_timer(struct uv_rtc_timer_head *head, int pnode)
183{
184 u64 lowest = ULLONG_MAX;
185 int c, bcpu = -1;
186
187 head->next_cpu = -1;
188 for (c = 0; c < head->ncpus; c++) {
189 u64 exp = head->cpu[c].expires;
190 if (exp < lowest) {
191 bcpu = c;
192 lowest = exp;
193 }
194 }
195 if (bcpu >= 0) {
196 head->next_cpu = bcpu;
197 c = head->cpu[bcpu].lcpu;
198 if (uv_setup_intr(c, lowest))
199 /* If we didn't set it up in time, trigger */
200 uv_rtc_send_IPI(c);
201 } else {
202 uv_write_global_mmr64(pnode, UVH_RTC1_INT_CONFIG,
203 UVH_RTC1_INT_CONFIG_M_MASK);
204 }
205}
206
207/*
208 * Set expiration time for current cpu.
209 *
210 * Returns 1 if we missed the expiration time.
211 */
212static int uv_rtc_set_timer(int cpu, u64 expires)
213{
214 int pnode = uv_cpu_to_pnode(cpu);
215 int bid = uv_cpu_to_blade_id(cpu);
216 struct uv_rtc_timer_head *head = blade_info[bid];
217 int bcpu = uv_cpu_hub_info(cpu)->blade_processor_id;
218 u64 *t = &head->cpu[bcpu].expires;
219 unsigned long flags;
220 int next_cpu;
221
222 spin_lock_irqsave(&head->lock, flags);
223
224 next_cpu = head->next_cpu;
225 *t = expires;
226 /* Will this one be next to go off? */
227 if (next_cpu < 0 || bcpu == next_cpu ||
228 expires < head->cpu[next_cpu].expires) {
229 head->next_cpu = bcpu;
230 if (uv_setup_intr(cpu, expires)) {
231 *t = ULLONG_MAX;
232 uv_rtc_find_next_timer(head, pnode);
233 spin_unlock_irqrestore(&head->lock, flags);
234 return 1;
235 }
236 }
237
238 spin_unlock_irqrestore(&head->lock, flags);
239 return 0;
240}
241
242/*
243 * Unset expiration time for current cpu.
244 *
245 * Returns 1 if this timer was pending.
246 */
247static int uv_rtc_unset_timer(int cpu)
248{
249 int pnode = uv_cpu_to_pnode(cpu);
250 int bid = uv_cpu_to_blade_id(cpu);
251 struct uv_rtc_timer_head *head = blade_info[bid];
252 int bcpu = uv_cpu_hub_info(cpu)->blade_processor_id;
253 u64 *t = &head->cpu[bcpu].expires;
254 unsigned long flags;
255 int rc = 0;
256
257 spin_lock_irqsave(&head->lock, flags);
258
259 if (head->next_cpu == bcpu && uv_read_rtc() >= *t)
260 rc = 1;
261
262 *t = ULLONG_MAX;
263
264 /* Was the hardware setup for this timer? */
265 if (head->next_cpu == bcpu)
266 uv_rtc_find_next_timer(head, pnode);
267
268 spin_unlock_irqrestore(&head->lock, flags);
269
270 return rc;
271}
272
273
274/*
275 * Kernel interface routines.
276 */
277
278/*
279 * Read the RTC.
280 */
281static cycle_t uv_read_rtc(void)
282{
283 return (cycle_t)uv_read_local_mmr(UVH_RTC);
284}
285
286/*
287 * Program the next event, relative to now
288 */
289static int uv_rtc_next_event(unsigned long delta,
290 struct clock_event_device *ced)
291{
292 int ced_cpu = cpumask_first(ced->cpumask);
293
294 return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc());
295}
296
297/*
298 * Setup the RTC timer in oneshot mode
299 */
300static void uv_rtc_timer_setup(enum clock_event_mode mode,
301 struct clock_event_device *evt)
302{
303 int ced_cpu = cpumask_first(evt->cpumask);
304
305 switch (mode) {
306 case CLOCK_EVT_MODE_PERIODIC:
307 case CLOCK_EVT_MODE_ONESHOT:
308 case CLOCK_EVT_MODE_RESUME:
309 /* Nothing to do here yet */
310 break;
311 case CLOCK_EVT_MODE_UNUSED:
312 case CLOCK_EVT_MODE_SHUTDOWN:
313 uv_rtc_unset_timer(ced_cpu);
314 break;
315 }
316}
317
318static void uv_rtc_interrupt(void)
319{
320 struct clock_event_device *ced = &__get_cpu_var(cpu_ced);
321 int cpu = smp_processor_id();
322
323 if (!ced || !ced->event_handler)
324 return;
325
326 if (uv_rtc_unset_timer(cpu) != 1)
327 return;
328
329 ced->event_handler(ced);
330}
331
332static int __init uv_enable_rtc(char *str)
333{
334 uv_rtc_enable = 1;
335
336 return 1;
337}
338__setup("uvrtc", uv_enable_rtc);
339
340static __init void uv_rtc_register_clockevents(struct work_struct *dummy)
341{
342 struct clock_event_device *ced = &__get_cpu_var(cpu_ced);
343
344 *ced = clock_event_device_uv;
345 ced->cpumask = cpumask_of(smp_processor_id());
346 clockevents_register_device(ced);
347}
348
349static __init int uv_rtc_setup_clock(void)
350{
351 int rc;
352
353 if (!uv_rtc_enable || !is_uv_system() || generic_interrupt_extension)
354 return -ENODEV;
355
356 generic_interrupt_extension = uv_rtc_interrupt;
357
358 clocksource_uv.mult = clocksource_hz2mult(sn_rtc_cycles_per_second,
359 clocksource_uv.shift);
360
361 rc = clocksource_register(&clocksource_uv);
362 if (rc) {
363 generic_interrupt_extension = NULL;
364 return rc;
365 }
366
367 /* Setup and register clockevents */
368 rc = uv_rtc_allocate_timers();
369 if (rc) {
370 clocksource_unregister(&clocksource_uv);
371 generic_interrupt_extension = NULL;
372 return rc;
373 }
374
375 clock_event_device_uv.mult = div_sc(sn_rtc_cycles_per_second,
376 NSEC_PER_SEC, clock_event_device_uv.shift);
377
378 clock_event_device_uv.min_delta_ns = NSEC_PER_SEC /
379 sn_rtc_cycles_per_second;
380
381 clock_event_device_uv.max_delta_ns = clocksource_uv.mask *
382 (NSEC_PER_SEC / sn_rtc_cycles_per_second);
383
384 rc = schedule_on_each_cpu(uv_rtc_register_clockevents);
385 if (rc) {
386 clocksource_unregister(&clocksource_uv);
387 generic_interrupt_extension = NULL;
388 uv_rtc_deallocate_timers();
389 }
390
391 return rc;
392}
393arch_initcall(uv_rtc_setup_clock);
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index 191a876e9e87..31ffc24eec4d 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -578,7 +578,7 @@ static struct irq_chip piix4_virtual_irq_type = {
578static irqreturn_t piix4_master_intr(int irq, void *dev_id) 578static irqreturn_t piix4_master_intr(int irq, void *dev_id)
579{ 579{
580 int realirq; 580 int realirq;
581 irq_desc_t *desc; 581 struct irq_desc *desc;
582 unsigned long flags; 582 unsigned long flags;
583 583
584 spin_lock_irqsave(&i8259A_lock, flags); 584 spin_lock_irqsave(&i8259A_lock, flags);
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 55a5d6938e5e..b263423fbe2a 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -395,11 +395,6 @@ static void vmi_set_pte_atomic(pte_t *ptep, pte_t pteval)
395 vmi_ops.update_pte(ptep, VMI_PAGE_PT); 395 vmi_ops.update_pte(ptep, VMI_PAGE_PT);
396} 396}
397 397
398static void vmi_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
399{
400 vmi_ops.set_pte(pte, ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 1));
401}
402
403static void vmi_set_pud(pud_t *pudp, pud_t pudval) 398static void vmi_set_pud(pud_t *pudp, pud_t pudval)
404{ 399{
405 /* Um, eww */ 400 /* Um, eww */
@@ -756,7 +751,6 @@ static inline int __init activate_vmi(void)
756 pv_mmu_ops.set_pmd = vmi_set_pmd; 751 pv_mmu_ops.set_pmd = vmi_set_pmd;
757#ifdef CONFIG_X86_PAE 752#ifdef CONFIG_X86_PAE
758 pv_mmu_ops.set_pte_atomic = vmi_set_pte_atomic; 753 pv_mmu_ops.set_pte_atomic = vmi_set_pte_atomic;
759 pv_mmu_ops.set_pte_present = vmi_set_pte_present;
760 pv_mmu_ops.set_pud = vmi_set_pud; 754 pv_mmu_ops.set_pud = vmi_set_pud;
761 pv_mmu_ops.pte_clear = vmi_pte_clear; 755 pv_mmu_ops.pte_clear = vmi_pte_clear;
762 pv_mmu_ops.pmd_clear = vmi_pmd_clear; 756 pv_mmu_ops.pmd_clear = vmi_pmd_clear;
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c
index 33a788d5879c..d303369a7bad 100644
--- a/arch/x86/kernel/vmiclock_32.c
+++ b/arch/x86/kernel/vmiclock_32.c
@@ -202,7 +202,6 @@ static struct irqaction vmi_clock_action = {
202 .name = "vmi-timer", 202 .name = "vmi-timer",
203 .handler = vmi_timer_interrupt, 203 .handler = vmi_timer_interrupt,
204 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, 204 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
205 .mask = CPU_MASK_ALL,
206}; 205};
207 206
208static void __devinit vmi_time_init_clockevent(void) 207static void __devinit vmi_time_init_clockevent(void)
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 0d860963f268..62ad500d55f3 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -189,15 +189,24 @@ SECTIONS
189 *(.bss) 189 *(.bss)
190 . = ALIGN(4); 190 . = ALIGN(4);
191 __bss_stop = .; 191 __bss_stop = .;
192 _end = . ; 192 }
193 /* This is where the kernel creates the early boot page tables */ 193
194 .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
194 . = ALIGN(PAGE_SIZE); 195 . = ALIGN(PAGE_SIZE);
195 pg0 = . ; 196 __brk_base = . ;
197 . += 64 * 1024 ; /* 64k alignment slop space */
198 *(.brk_reservation) /* areas brk users have reserved */
199 __brk_limit = . ;
200 }
201
202 .end : AT(ADDR(.end) - LOAD_OFFSET) {
203 _end = . ;
196 } 204 }
197 205
198 /* Sections to be discarded */ 206 /* Sections to be discarded */
199 /DISCARD/ : { 207 /DISCARD/ : {
200 *(.exitcall.exit) 208 *(.exitcall.exit)
209 *(.discard)
201 } 210 }
202 211
203 STABS_DEBUG 212 STABS_DEBUG
@@ -205,6 +214,12 @@ SECTIONS
205 DWARF_DEBUG 214 DWARF_DEBUG
206} 215}
207 216
217/*
218 * Build-time check on the image size:
219 */
220ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
221 "kernel image bigger than KERNEL_IMAGE_SIZE")
222
208#ifdef CONFIG_KEXEC 223#ifdef CONFIG_KEXEC
209/* Link time checks */ 224/* Link time checks */
210#include <asm/kexec.h> 225#include <asm/kexec.h>
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index fbfced6f6800..c8742507b030 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -29,8 +29,8 @@ SECTIONS
29{ 29{
30 . = __START_KERNEL; 30 . = __START_KERNEL;
31 phys_startup_64 = startup_64 - LOAD_OFFSET; 31 phys_startup_64 = startup_64 - LOAD_OFFSET;
32 _text = .; /* Text and read-only data */
33 .text : AT(ADDR(.text) - LOAD_OFFSET) { 32 .text : AT(ADDR(.text) - LOAD_OFFSET) {
33 _text = .; /* Text and read-only data */
34 /* First the code that has to be first for bootstrapping */ 34 /* First the code that has to be first for bootstrapping */
35 *(.text.head) 35 *(.text.head)
36 _stext = .; 36 _stext = .;
@@ -61,13 +61,13 @@ SECTIONS
61 .data : AT(ADDR(.data) - LOAD_OFFSET) { 61 .data : AT(ADDR(.data) - LOAD_OFFSET) {
62 DATA_DATA 62 DATA_DATA
63 CONSTRUCTORS 63 CONSTRUCTORS
64 _edata = .; /* End of data section */
64 } :data 65 } :data
65 66
66 _edata = .; /* End of data section */
67 67
68 . = ALIGN(PAGE_SIZE);
69 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
70 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 68 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
69 . = ALIGN(PAGE_SIZE);
70 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
71 *(.data.cacheline_aligned) 71 *(.data.cacheline_aligned)
72 } 72 }
73 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); 73 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES);
@@ -125,29 +125,29 @@ SECTIONS
125#undef VVIRT_OFFSET 125#undef VVIRT_OFFSET
126#undef VVIRT 126#undef VVIRT
127 127
128 . = ALIGN(THREAD_SIZE); /* init_task */
129 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 128 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
129 . = ALIGN(THREAD_SIZE); /* init_task */
130 *(.data.init_task) 130 *(.data.init_task)
131 }:data.init 131 }:data.init
132 132
133 . = ALIGN(PAGE_SIZE);
134 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 133 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
134 . = ALIGN(PAGE_SIZE);
135 *(.data.page_aligned) 135 *(.data.page_aligned)
136 } 136 }
137 137
138 /* might get freed after init */
139 . = ALIGN(PAGE_SIZE);
140 __smp_alt_begin = .;
141 __smp_locks = .;
142 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 138 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
139 /* might get freed after init */
140 . = ALIGN(PAGE_SIZE);
141 __smp_alt_begin = .;
142 __smp_locks = .;
143 *(.smp_locks) 143 *(.smp_locks)
144 __smp_locks_end = .;
145 . = ALIGN(PAGE_SIZE);
146 __smp_alt_end = .;
144 } 147 }
145 __smp_locks_end = .;
146 . = ALIGN(PAGE_SIZE);
147 __smp_alt_end = .;
148 148
149 . = ALIGN(PAGE_SIZE); /* Init code and data */ 149 . = ALIGN(PAGE_SIZE); /* Init code and data */
150 __init_begin = .; 150 __init_begin = .; /* paired with __init_end */
151 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { 151 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
152 _sinittext = .; 152 _sinittext = .;
153 INIT_TEXT 153 INIT_TEXT
@@ -159,40 +159,42 @@ SECTIONS
159 __initdata_end = .; 159 __initdata_end = .;
160 } 160 }
161 161
162 . = ALIGN(16); 162 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
163 __setup_start = .; 163 . = ALIGN(16);
164 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) } 164 __setup_start = .;
165 __setup_end = .; 165 *(.init.setup)
166 __initcall_start = .; 166 __setup_end = .;
167 }
167 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 168 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
169 __initcall_start = .;
168 INITCALLS 170 INITCALLS
171 __initcall_end = .;
169 } 172 }
170 __initcall_end = .;
171 __con_initcall_start = .;
172 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 173 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
174 __con_initcall_start = .;
173 *(.con_initcall.init) 175 *(.con_initcall.init)
176 __con_initcall_end = .;
174 } 177 }
175 __con_initcall_end = .;
176 __x86_cpu_dev_start = .;
177 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { 178 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
179 __x86_cpu_dev_start = .;
178 *(.x86_cpu_dev.init) 180 *(.x86_cpu_dev.init)
181 __x86_cpu_dev_end = .;
179 } 182 }
180 __x86_cpu_dev_end = .;
181 SECURITY_INIT 183 SECURITY_INIT
182 184
183 . = ALIGN(8); 185 . = ALIGN(8);
184 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { 186 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
185 __parainstructions = .; 187 __parainstructions = .;
186 *(.parainstructions) 188 *(.parainstructions)
187 __parainstructions_end = .; 189 __parainstructions_end = .;
188 } 190 }
189 191
190 . = ALIGN(8);
191 __alt_instructions = .;
192 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { 192 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
193 . = ALIGN(8);
194 __alt_instructions = .;
193 *(.altinstructions) 195 *(.altinstructions)
196 __alt_instructions_end = .;
194 } 197 }
195 __alt_instructions_end = .;
196 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { 198 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
197 *(.altinstr_replacement) 199 *(.altinstr_replacement)
198 } 200 }
@@ -207,9 +209,11 @@ SECTIONS
207 209
208#ifdef CONFIG_BLK_DEV_INITRD 210#ifdef CONFIG_BLK_DEV_INITRD
209 . = ALIGN(PAGE_SIZE); 211 . = ALIGN(PAGE_SIZE);
210 __initramfs_start = .; 212 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
211 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } 213 __initramfs_start = .;
212 __initramfs_end = .; 214 *(.init.ramfs)
215 __initramfs_end = .;
216 }
213#endif 217#endif
214 218
215#ifdef CONFIG_SMP 219#ifdef CONFIG_SMP
@@ -229,20 +233,29 @@ SECTIONS
229 . = ALIGN(PAGE_SIZE); 233 . = ALIGN(PAGE_SIZE);
230 __init_end = .; 234 __init_end = .;
231 235
232 . = ALIGN(PAGE_SIZE);
233 __nosave_begin = .;
234 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 236 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
235 *(.data.nosave) 237 . = ALIGN(PAGE_SIZE);
238 __nosave_begin = .;
239 *(.data.nosave)
240 . = ALIGN(PAGE_SIZE);
241 __nosave_end = .;
236 } :data.init2 /* use another section data.init2, see PERCPU_VADDR() above */ 242 } :data.init2 /* use another section data.init2, see PERCPU_VADDR() above */
237 . = ALIGN(PAGE_SIZE);
238 __nosave_end = .;
239 243
240 __bss_start = .; /* BSS */
241 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 244 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
245 . = ALIGN(PAGE_SIZE);
246 __bss_start = .; /* BSS */
242 *(.bss.page_aligned) 247 *(.bss.page_aligned)
243 *(.bss) 248 *(.bss)
244 } 249 __bss_stop = .;
245 __bss_stop = .; 250 }
251
252 .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
253 . = ALIGN(PAGE_SIZE);
254 __brk_base = . ;
255 . += 64 * 1024 ; /* 64k alignment slop space */
256 *(.brk_reservation) /* areas brk users have reserved */
257 __brk_limit = . ;
258 }
246 259
247 _end = . ; 260 _end = . ;
248 261
@@ -250,6 +263,7 @@ SECTIONS
250 /DISCARD/ : { 263 /DISCARD/ : {
251 *(.exitcall.exit) 264 *(.exitcall.exit)
252 *(.eh_frame) 265 *(.eh_frame)
266 *(.discard)
253 } 267 }
254 268
255 STABS_DEBUG 269 STABS_DEBUG
@@ -275,3 +289,10 @@ ASSERT((_end - _text <= KERNEL_IMAGE_SIZE),
275ASSERT((per_cpu__irq_stack_union == 0), 289ASSERT((per_cpu__irq_stack_union == 0),
276 "irq_stack_union is not at start of per-cpu area"); 290 "irq_stack_union is not at start of per-cpu area");
277#endif 291#endif
292
293#ifdef CONFIG_KEXEC
294#include <asm/kexec.h>
295
296ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
297 "kexec control code size is too big")
298#endif
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index 74de562812cc..a1d804bcd483 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -22,7 +22,7 @@
22#include <asm/paravirt.h> 22#include <asm/paravirt.h>
23#include <asm/setup.h> 23#include <asm/setup.h>
24 24
25#ifdef CONFIG_PARAVIRT 25#if defined CONFIG_PCI && defined CONFIG_PARAVIRT
26/* 26/*
27 * Interrupt control on vSMPowered systems: 27 * Interrupt control on vSMPowered systems:
28 * ~AC is a shadow of IF. If IF is 'on' AC should be 'off' 28 * ~AC is a shadow of IF. If IF is 'on' AC should be 'off'
@@ -114,6 +114,7 @@ static void __init set_vsmp_pv_ops(void)
114} 114}
115#endif 115#endif
116 116
117#ifdef CONFIG_PCI
117static int is_vsmp = -1; 118static int is_vsmp = -1;
118 119
119static void __init detect_vsmp_box(void) 120static void __init detect_vsmp_box(void)
@@ -139,6 +140,15 @@ int is_vsmp_box(void)
139 } 140 }
140} 141}
141 142
143#else
144static void __init detect_vsmp_box(void)
145{
146}
147int is_vsmp_box(void)
148{
149 return 0;
150}
151#endif
142void __init vsmp_init(void) 152void __init vsmp_init(void)
143{ 153{
144 detect_vsmp_box(); 154 detect_vsmp_box();
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 0a303c3ed11f..a58504ea78cc 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -59,7 +59,8 @@ config KVM_AMD
59 59
60config KVM_TRACE 60config KVM_TRACE
61 bool "KVM trace support" 61 bool "KVM trace support"
62 depends on KVM && MARKERS && SYSFS 62 depends on KVM && SYSFS
63 select MARKERS
63 select RELAY 64 select RELAY
64 select DEBUG_FS 65 select DEBUG_FS
65 default n 66 default n
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 5287081b3567..5ab239711cc2 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -107,7 +107,7 @@ static void async_hcall(unsigned long call, unsigned long arg1,
107 local_irq_save(flags); 107 local_irq_save(flags);
108 if (lguest_data.hcall_status[next_call] != 0xFF) { 108 if (lguest_data.hcall_status[next_call] != 0xFF) {
109 /* Table full, so do normal hcall which will flush table. */ 109 /* Table full, so do normal hcall which will flush table. */
110 hcall(call, arg1, arg2, arg3); 110 kvm_hypercall3(call, arg1, arg2, arg3);
111 } else { 111 } else {
112 lguest_data.hcalls[next_call].arg0 = call; 112 lguest_data.hcalls[next_call].arg0 = call;
113 lguest_data.hcalls[next_call].arg1 = arg1; 113 lguest_data.hcalls[next_call].arg1 = arg1;
@@ -134,13 +134,32 @@ static void async_hcall(unsigned long call, unsigned long arg1,
134 * 134 *
135 * So, when we're in lazy mode, we call async_hcall() to store the call for 135 * So, when we're in lazy mode, we call async_hcall() to store the call for
136 * future processing: */ 136 * future processing: */
137static void lazy_hcall(unsigned long call, 137static void lazy_hcall1(unsigned long call,
138 unsigned long arg1)
139{
140 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
141 kvm_hypercall1(call, arg1);
142 else
143 async_hcall(call, arg1, 0, 0);
144}
145
146static void lazy_hcall2(unsigned long call,
147 unsigned long arg1,
148 unsigned long arg2)
149{
150 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
151 kvm_hypercall2(call, arg1, arg2);
152 else
153 async_hcall(call, arg1, arg2, 0);
154}
155
156static void lazy_hcall3(unsigned long call,
138 unsigned long arg1, 157 unsigned long arg1,
139 unsigned long arg2, 158 unsigned long arg2,
140 unsigned long arg3) 159 unsigned long arg3)
141{ 160{
142 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) 161 if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
143 hcall(call, arg1, arg2, arg3); 162 kvm_hypercall3(call, arg1, arg2, arg3);
144 else 163 else
145 async_hcall(call, arg1, arg2, arg3); 164 async_hcall(call, arg1, arg2, arg3);
146} 165}
@@ -155,7 +174,7 @@ static void lguest_leave_lazy_mmu_mode(void)
155 174
156static void lguest_end_context_switch(struct task_struct *next) 175static void lguest_end_context_switch(struct task_struct *next)
157{ 176{
158 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); 177 kvm_hypercall0(LHCALL_FLUSH_ASYNC);
159 paravirt_end_context_switch(next); 178 paravirt_end_context_switch(next);
160} 179}
161 180
@@ -235,7 +254,7 @@ static void lguest_write_idt_entry(gate_desc *dt,
235 /* Keep the local copy up to date. */ 254 /* Keep the local copy up to date. */
236 native_write_idt_entry(dt, entrynum, g); 255 native_write_idt_entry(dt, entrynum, g);
237 /* Tell Host about this new entry. */ 256 /* Tell Host about this new entry. */
238 hcall(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1]); 257 kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1]);
239} 258}
240 259
241/* Changing to a different IDT is very rare: we keep the IDT up-to-date every 260/* Changing to a different IDT is very rare: we keep the IDT up-to-date every
@@ -247,7 +266,7 @@ static void lguest_load_idt(const struct desc_ptr *desc)
247 struct desc_struct *idt = (void *)desc->address; 266 struct desc_struct *idt = (void *)desc->address;
248 267
249 for (i = 0; i < (desc->size+1)/8; i++) 268 for (i = 0; i < (desc->size+1)/8; i++)
250 hcall(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b); 269 kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b);
251} 270}
252 271
253/* 272/*
@@ -267,8 +286,8 @@ static void lguest_load_idt(const struct desc_ptr *desc)
267 */ 286 */
268static void lguest_load_gdt(const struct desc_ptr *desc) 287static void lguest_load_gdt(const struct desc_ptr *desc)
269{ 288{
270 BUG_ON((desc->size+1)/8 != GDT_ENTRIES); 289 BUG_ON((desc->size + 1) / 8 != GDT_ENTRIES);
271 hcall(LHCALL_LOAD_GDT, __pa(desc->address), GDT_ENTRIES, 0); 290 kvm_hypercall2(LHCALL_LOAD_GDT, __pa(desc->address), GDT_ENTRIES);
272} 291}
273 292
274/* For a single GDT entry which changes, we do the lazy thing: alter our GDT, 293/* For a single GDT entry which changes, we do the lazy thing: alter our GDT,
@@ -278,7 +297,7 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
278 const void *desc, int type) 297 const void *desc, int type)
279{ 298{
280 native_write_gdt_entry(dt, entrynum, desc, type); 299 native_write_gdt_entry(dt, entrynum, desc, type);
281 hcall(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES, 0); 300 kvm_hypercall2(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES);
282} 301}
283 302
284/* OK, I lied. There are three "thread local storage" GDT entries which change 303/* OK, I lied. There are three "thread local storage" GDT entries which change
@@ -290,7 +309,7 @@ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu)
290 * can't handle us removing entries we're currently using. So we clear 309 * can't handle us removing entries we're currently using. So we clear
291 * the GS register here: if it's needed it'll be reloaded anyway. */ 310 * the GS register here: if it's needed it'll be reloaded anyway. */
292 lazy_load_gs(0); 311 lazy_load_gs(0);
293 lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu, 0); 312 lazy_hcall2(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu);
294} 313}
295 314
296/*G:038 That's enough excitement for now, back to ploughing through each of 315/*G:038 That's enough excitement for now, back to ploughing through each of
@@ -388,7 +407,7 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
388static unsigned long current_cr0; 407static unsigned long current_cr0;
389static void lguest_write_cr0(unsigned long val) 408static void lguest_write_cr0(unsigned long val)
390{ 409{
391 lazy_hcall(LHCALL_TS, val & X86_CR0_TS, 0, 0); 410 lazy_hcall1(LHCALL_TS, val & X86_CR0_TS);
392 current_cr0 = val; 411 current_cr0 = val;
393} 412}
394 413
@@ -402,7 +421,7 @@ static unsigned long lguest_read_cr0(void)
402 * the vowels have been optimized out. */ 421 * the vowels have been optimized out. */
403static void lguest_clts(void) 422static void lguest_clts(void)
404{ 423{
405 lazy_hcall(LHCALL_TS, 0, 0, 0); 424 lazy_hcall1(LHCALL_TS, 0);
406 current_cr0 &= ~X86_CR0_TS; 425 current_cr0 &= ~X86_CR0_TS;
407} 426}
408 427
@@ -424,7 +443,7 @@ static bool cr3_changed = false;
424static void lguest_write_cr3(unsigned long cr3) 443static void lguest_write_cr3(unsigned long cr3)
425{ 444{
426 lguest_data.pgdir = cr3; 445 lguest_data.pgdir = cr3;
427 lazy_hcall(LHCALL_NEW_PGTABLE, cr3, 0, 0); 446 lazy_hcall1(LHCALL_NEW_PGTABLE, cr3);
428 cr3_changed = true; 447 cr3_changed = true;
429} 448}
430 449
@@ -496,11 +515,17 @@ static void lguest_write_cr4(unsigned long val)
496 * into a process' address space. We set the entry then tell the Host the 515 * into a process' address space. We set the entry then tell the Host the
497 * toplevel and address this corresponds to. The Guest uses one pagetable per 516 * toplevel and address this corresponds to. The Guest uses one pagetable per
498 * process, so we need to tell the Host which one we're changing (mm->pgd). */ 517 * process, so we need to tell the Host which one we're changing (mm->pgd). */
518static void lguest_pte_update(struct mm_struct *mm, unsigned long addr,
519 pte_t *ptep)
520{
521 lazy_hcall3(LHCALL_SET_PTE, __pa(mm->pgd), addr, ptep->pte_low);
522}
523
499static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, 524static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr,
500 pte_t *ptep, pte_t pteval) 525 pte_t *ptep, pte_t pteval)
501{ 526{
502 *ptep = pteval; 527 *ptep = pteval;
503 lazy_hcall(LHCALL_SET_PTE, __pa(mm->pgd), addr, pteval.pte_low); 528 lguest_pte_update(mm, addr, ptep);
504} 529}
505 530
506/* The Guest calls this to set a top-level entry. Again, we set the entry then 531/* The Guest calls this to set a top-level entry. Again, we set the entry then
@@ -509,8 +534,8 @@ static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr,
509static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) 534static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
510{ 535{
511 *pmdp = pmdval; 536 *pmdp = pmdval;
512 lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, 537 lazy_hcall2(LHCALL_SET_PMD, __pa(pmdp) & PAGE_MASK,
513 (__pa(pmdp)&(PAGE_SIZE-1))/4, 0); 538 (__pa(pmdp) & (PAGE_SIZE - 1)) / 4);
514} 539}
515 540
516/* There are a couple of legacy places where the kernel sets a PTE, but we 541/* There are a couple of legacy places where the kernel sets a PTE, but we
@@ -526,7 +551,7 @@ static void lguest_set_pte(pte_t *ptep, pte_t pteval)
526{ 551{
527 *ptep = pteval; 552 *ptep = pteval;
528 if (cr3_changed) 553 if (cr3_changed)
529 lazy_hcall(LHCALL_FLUSH_TLB, 1, 0, 0); 554 lazy_hcall1(LHCALL_FLUSH_TLB, 1);
530} 555}
531 556
532/* Unfortunately for Lguest, the pv_mmu_ops for page tables were based on 557/* Unfortunately for Lguest, the pv_mmu_ops for page tables were based on
@@ -542,7 +567,7 @@ static void lguest_set_pte(pte_t *ptep, pte_t pteval)
542static void lguest_flush_tlb_single(unsigned long addr) 567static void lguest_flush_tlb_single(unsigned long addr)
543{ 568{
544 /* Simply set it to zero: if it was not, it will fault back in. */ 569 /* Simply set it to zero: if it was not, it will fault back in. */
545 lazy_hcall(LHCALL_SET_PTE, lguest_data.pgdir, addr, 0); 570 lazy_hcall3(LHCALL_SET_PTE, lguest_data.pgdir, addr, 0);
546} 571}
547 572
548/* This is what happens after the Guest has removed a large number of entries. 573/* This is what happens after the Guest has removed a large number of entries.
@@ -550,7 +575,7 @@ static void lguest_flush_tlb_single(unsigned long addr)
550 * have changed, ie. virtual addresses below PAGE_OFFSET. */ 575 * have changed, ie. virtual addresses below PAGE_OFFSET. */
551static void lguest_flush_tlb_user(void) 576static void lguest_flush_tlb_user(void)
552{ 577{
553 lazy_hcall(LHCALL_FLUSH_TLB, 0, 0, 0); 578 lazy_hcall1(LHCALL_FLUSH_TLB, 0);
554} 579}
555 580
556/* This is called when the kernel page tables have changed. That's not very 581/* This is called when the kernel page tables have changed. That's not very
@@ -558,7 +583,7 @@ static void lguest_flush_tlb_user(void)
558 * slow), so it's worth separating this from the user flushing above. */ 583 * slow), so it's worth separating this from the user flushing above. */
559static void lguest_flush_tlb_kernel(void) 584static void lguest_flush_tlb_kernel(void)
560{ 585{
561 lazy_hcall(LHCALL_FLUSH_TLB, 1, 0, 0); 586 lazy_hcall1(LHCALL_FLUSH_TLB, 1);
562} 587}
563 588
564/* 589/*
@@ -695,7 +720,7 @@ static int lguest_clockevent_set_next_event(unsigned long delta,
695 } 720 }
696 721
697 /* Please wake us this far in the future. */ 722 /* Please wake us this far in the future. */
698 hcall(LHCALL_SET_CLOCKEVENT, delta, 0, 0); 723 kvm_hypercall1(LHCALL_SET_CLOCKEVENT, delta);
699 return 0; 724 return 0;
700} 725}
701 726
@@ -706,7 +731,7 @@ static void lguest_clockevent_set_mode(enum clock_event_mode mode,
706 case CLOCK_EVT_MODE_UNUSED: 731 case CLOCK_EVT_MODE_UNUSED:
707 case CLOCK_EVT_MODE_SHUTDOWN: 732 case CLOCK_EVT_MODE_SHUTDOWN:
708 /* A 0 argument shuts the clock down. */ 733 /* A 0 argument shuts the clock down. */
709 hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0); 734 kvm_hypercall0(LHCALL_SET_CLOCKEVENT);
710 break; 735 break;
711 case CLOCK_EVT_MODE_ONESHOT: 736 case CLOCK_EVT_MODE_ONESHOT:
712 /* This is what we expect. */ 737 /* This is what we expect. */
@@ -781,8 +806,8 @@ static void lguest_time_init(void)
781static void lguest_load_sp0(struct tss_struct *tss, 806static void lguest_load_sp0(struct tss_struct *tss,
782 struct thread_struct *thread) 807 struct thread_struct *thread)
783{ 808{
784 lazy_hcall(LHCALL_SET_STACK, __KERNEL_DS|0x1, thread->sp0, 809 lazy_hcall3(LHCALL_SET_STACK, __KERNEL_DS | 0x1, thread->sp0,
785 THREAD_SIZE/PAGE_SIZE); 810 THREAD_SIZE / PAGE_SIZE);
786} 811}
787 812
788/* Let's just say, I wouldn't do debugging under a Guest. */ 813/* Let's just say, I wouldn't do debugging under a Guest. */
@@ -855,7 +880,7 @@ static void set_lguest_basic_apic_ops(void)
855/* STOP! Until an interrupt comes in. */ 880/* STOP! Until an interrupt comes in. */
856static void lguest_safe_halt(void) 881static void lguest_safe_halt(void)
857{ 882{
858 hcall(LHCALL_HALT, 0, 0, 0); 883 kvm_hypercall0(LHCALL_HALT);
859} 884}
860 885
861/* The SHUTDOWN hypercall takes a string to describe what's happening, and 886/* The SHUTDOWN hypercall takes a string to describe what's happening, and
@@ -865,7 +890,8 @@ static void lguest_safe_halt(void)
865 * rather than virtual addresses, so we use __pa() here. */ 890 * rather than virtual addresses, so we use __pa() here. */
866static void lguest_power_off(void) 891static void lguest_power_off(void)
867{ 892{
868 hcall(LHCALL_SHUTDOWN, __pa("Power down"), LGUEST_SHUTDOWN_POWEROFF, 0); 893 kvm_hypercall2(LHCALL_SHUTDOWN, __pa("Power down"),
894 LGUEST_SHUTDOWN_POWEROFF);
869} 895}
870 896
871/* 897/*
@@ -875,7 +901,7 @@ static void lguest_power_off(void)
875 */ 901 */
876static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p) 902static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p)
877{ 903{
878 hcall(LHCALL_SHUTDOWN, __pa(p), LGUEST_SHUTDOWN_POWEROFF, 0); 904 kvm_hypercall2(LHCALL_SHUTDOWN, __pa(p), LGUEST_SHUTDOWN_POWEROFF);
879 /* The hcall won't return, but to keep gcc happy, we're "done". */ 905 /* The hcall won't return, but to keep gcc happy, we're "done". */
880 return NOTIFY_DONE; 906 return NOTIFY_DONE;
881} 907}
@@ -916,7 +942,7 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
916 len = sizeof(scratch) - 1; 942 len = sizeof(scratch) - 1;
917 scratch[len] = '\0'; 943 scratch[len] = '\0';
918 memcpy(scratch, buf, len); 944 memcpy(scratch, buf, len);
919 hcall(LHCALL_NOTIFY, __pa(scratch), 0, 0); 945 kvm_hypercall1(LHCALL_NOTIFY, __pa(scratch));
920 946
921 /* This routine returns the number of bytes actually written. */ 947 /* This routine returns the number of bytes actually written. */
922 return len; 948 return len;
@@ -926,7 +952,7 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
926 * Launcher to reboot us. */ 952 * Launcher to reboot us. */
927static void lguest_restart(char *reason) 953static void lguest_restart(char *reason)
928{ 954{
929 hcall(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART, 0); 955 kvm_hypercall2(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART);
930} 956}
931 957
932/*G:050 958/*G:050
@@ -1046,6 +1072,8 @@ __init void lguest_init(void)
1046 pv_mmu_ops.read_cr3 = lguest_read_cr3; 1072 pv_mmu_ops.read_cr3 = lguest_read_cr3;
1047 pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; 1073 pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu;
1048 pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mmu_mode; 1074 pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mmu_mode;
1075 pv_mmu_ops.pte_update = lguest_pte_update;
1076 pv_mmu_ops.pte_update_defer = lguest_pte_update;
1049 1077
1050#ifdef CONFIG_X86_LOCAL_APIC 1078#ifdef CONFIG_X86_LOCAL_APIC
1051 /* apic read/write intercepts */ 1079 /* apic read/write intercepts */
@@ -1064,14 +1092,6 @@ __init void lguest_init(void)
1064 * lguest_init() where the rest of the fairly chaotic boot setup 1092 * lguest_init() where the rest of the fairly chaotic boot setup
1065 * occurs. */ 1093 * occurs. */
1066 1094
1067 /* The native boot code sets up initial page tables immediately after
1068 * the kernel itself, and sets init_pg_tables_end so they're not
1069 * clobbered. The Launcher places our initial pagetables somewhere at
1070 * the top of our physical memory, so we don't need extra space: set
1071 * init_pg_tables_end to the end of the kernel. */
1072 init_pg_tables_start = __pa(pg0);
1073 init_pg_tables_end = __pa(pg0);
1074
1075 /* As described in head_32.S, we map the first 128M of memory. */ 1095 /* As described in head_32.S, we map the first 128M of memory. */
1076 max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT; 1096 max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT;
1077 1097
diff --git a/arch/x86/lguest/i386_head.S b/arch/x86/lguest/i386_head.S
index 10b9bd35a8ff..f79541989471 100644
--- a/arch/x86/lguest/i386_head.S
+++ b/arch/x86/lguest/i386_head.S
@@ -27,8 +27,8 @@ ENTRY(lguest_entry)
27 /* We make the "initialization" hypercall now to tell the Host about 27 /* We make the "initialization" hypercall now to tell the Host about
28 * us, and also find out where it put our page tables. */ 28 * us, and also find out where it put our page tables. */
29 movl $LHCALL_LGUEST_INIT, %eax 29 movl $LHCALL_LGUEST_INIT, %eax
30 movl $lguest_data - __PAGE_OFFSET, %edx 30 movl $lguest_data - __PAGE_OFFSET, %ebx
31 int $LGUEST_TRAP_ENTRY 31 .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */
32 32
33 /* Set up the initial stack so we can run C code. */ 33 /* Set up the initial stack so we can run C code. */
34 movl $(init_thread_union+THREAD_SIZE),%esp 34 movl $(init_thread_union+THREAD_SIZE),%esp
diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S
index c22981fa2f3a..ad5441ed1b57 100644
--- a/arch/x86/lib/memcpy_64.S
+++ b/arch/x86/lib/memcpy_64.S
@@ -1,30 +1,38 @@
1/* Copyright 2002 Andi Kleen */ 1/* Copyright 2002 Andi Kleen */
2 2
3#include <linux/linkage.h> 3#include <linux/linkage.h>
4#include <asm/dwarf2.h> 4
5#include <asm/cpufeature.h> 5#include <asm/cpufeature.h>
6#include <asm/dwarf2.h>
6 7
7/* 8/*
8 * memcpy - Copy a memory block. 9 * memcpy - Copy a memory block.
9 * 10 *
10 * Input: 11 * Input:
11 * rdi destination 12 * rdi destination
12 * rsi source 13 * rsi source
13 * rdx count 14 * rdx count
14 * 15 *
15 * Output: 16 * Output:
16 * rax original destination 17 * rax original destination
17 */ 18 */
18 19
20/*
21 * memcpy_c() - fast string ops (REP MOVSQ) based variant.
22 *
23 * Calls to this get patched into the kernel image via the
24 * alternative instructions framework:
25 */
19 ALIGN 26 ALIGN
20memcpy_c: 27memcpy_c:
21 CFI_STARTPROC 28 CFI_STARTPROC
22 movq %rdi,%rax 29 movq %rdi, %rax
23 movl %edx,%ecx 30
24 shrl $3,%ecx 31 movl %edx, %ecx
25 andl $7,%edx 32 shrl $3, %ecx
33 andl $7, %edx
26 rep movsq 34 rep movsq
27 movl %edx,%ecx 35 movl %edx, %ecx
28 rep movsb 36 rep movsb
29 ret 37 ret
30 CFI_ENDPROC 38 CFI_ENDPROC
@@ -33,99 +41,110 @@ ENDPROC(memcpy_c)
33ENTRY(__memcpy) 41ENTRY(__memcpy)
34ENTRY(memcpy) 42ENTRY(memcpy)
35 CFI_STARTPROC 43 CFI_STARTPROC
36 pushq %rbx
37 CFI_ADJUST_CFA_OFFSET 8
38 CFI_REL_OFFSET rbx, 0
39 movq %rdi,%rax
40 44
41 movl %edx,%ecx 45 /*
42 shrl $6,%ecx 46 * Put the number of full 64-byte blocks into %ecx.
47 * Tail portion is handled at the end:
48 */
49 movq %rdi, %rax
50 movl %edx, %ecx
51 shrl $6, %ecx
43 jz .Lhandle_tail 52 jz .Lhandle_tail
44 53
45 .p2align 4 54 .p2align 4
46.Lloop_64: 55.Lloop_64:
56 /*
57 * We decrement the loop index here - and the zero-flag is
58 * checked at the end of the loop (instructions inbetween do
59 * not change the zero flag):
60 */
47 decl %ecx 61 decl %ecx
48 62
49 movq (%rsi),%r11 63 /*
50 movq 8(%rsi),%r8 64 * Move in blocks of 4x16 bytes:
65 */
66 movq 0*8(%rsi), %r11
67 movq 1*8(%rsi), %r8
68 movq %r11, 0*8(%rdi)
69 movq %r8, 1*8(%rdi)
51 70
52 movq %r11,(%rdi) 71 movq 2*8(%rsi), %r9
53 movq %r8,1*8(%rdi) 72 movq 3*8(%rsi), %r10
73 movq %r9, 2*8(%rdi)
74 movq %r10, 3*8(%rdi)
54 75
55 movq 2*8(%rsi),%r9 76 movq 4*8(%rsi), %r11
56 movq 3*8(%rsi),%r10 77 movq 5*8(%rsi), %r8
78 movq %r11, 4*8(%rdi)
79 movq %r8, 5*8(%rdi)
57 80
58 movq %r9,2*8(%rdi) 81 movq 6*8(%rsi), %r9
59 movq %r10,3*8(%rdi) 82 movq 7*8(%rsi), %r10
83 movq %r9, 6*8(%rdi)
84 movq %r10, 7*8(%rdi)
60 85
61 movq 4*8(%rsi),%r11 86 leaq 64(%rsi), %rsi
62 movq 5*8(%rsi),%r8 87 leaq 64(%rdi), %rdi
63 88
64 movq %r11,4*8(%rdi)
65 movq %r8,5*8(%rdi)
66
67 movq 6*8(%rsi),%r9
68 movq 7*8(%rsi),%r10
69
70 movq %r9,6*8(%rdi)
71 movq %r10,7*8(%rdi)
72
73 leaq 64(%rsi),%rsi
74 leaq 64(%rdi),%rdi
75 jnz .Lloop_64 89 jnz .Lloop_64
76 90
77.Lhandle_tail: 91.Lhandle_tail:
78 movl %edx,%ecx 92 movl %edx, %ecx
79 andl $63,%ecx 93 andl $63, %ecx
80 shrl $3,%ecx 94 shrl $3, %ecx
81 jz .Lhandle_7 95 jz .Lhandle_7
96
82 .p2align 4 97 .p2align 4
83.Lloop_8: 98.Lloop_8:
84 decl %ecx 99 decl %ecx
85 movq (%rsi),%r8 100 movq (%rsi), %r8
86 movq %r8,(%rdi) 101 movq %r8, (%rdi)
87 leaq 8(%rdi),%rdi 102 leaq 8(%rdi), %rdi
88 leaq 8(%rsi),%rsi 103 leaq 8(%rsi), %rsi
89 jnz .Lloop_8 104 jnz .Lloop_8
90 105
91.Lhandle_7: 106.Lhandle_7:
92 movl %edx,%ecx 107 movl %edx, %ecx
93 andl $7,%ecx 108 andl $7, %ecx
94 jz .Lende 109 jz .Lend
110
95 .p2align 4 111 .p2align 4
96.Lloop_1: 112.Lloop_1:
97 movb (%rsi),%r8b 113 movb (%rsi), %r8b
98 movb %r8b,(%rdi) 114 movb %r8b, (%rdi)
99 incq %rdi 115 incq %rdi
100 incq %rsi 116 incq %rsi
101 decl %ecx 117 decl %ecx
102 jnz .Lloop_1 118 jnz .Lloop_1
103 119
104.Lende: 120.Lend:
105 popq %rbx
106 CFI_ADJUST_CFA_OFFSET -8
107 CFI_RESTORE rbx
108 ret 121 ret
109.Lfinal:
110 CFI_ENDPROC 122 CFI_ENDPROC
111ENDPROC(memcpy) 123ENDPROC(memcpy)
112ENDPROC(__memcpy) 124ENDPROC(__memcpy)
113 125
114 /* Some CPUs run faster using the string copy instructions. 126 /*
115 It is also a lot simpler. Use this when possible */ 127 * Some CPUs run faster using the string copy instructions.
128 * It is also a lot simpler. Use this when possible:
129 */
116 130
117 .section .altinstr_replacement,"ax" 131 .section .altinstr_replacement, "ax"
1181: .byte 0xeb /* jmp <disp8> */ 1321: .byte 0xeb /* jmp <disp8> */
119 .byte (memcpy_c - memcpy) - (2f - 1b) /* offset */ 133 .byte (memcpy_c - memcpy) - (2f - 1b) /* offset */
1202: 1342:
121 .previous 135 .previous
122 .section .altinstructions,"a" 136
137 .section .altinstructions, "a"
123 .align 8 138 .align 8
124 .quad memcpy 139 .quad memcpy
125 .quad 1b 140 .quad 1b
126 .byte X86_FEATURE_REP_GOOD 141 .byte X86_FEATURE_REP_GOOD
127 /* Replace only beginning, memcpy is used to apply alternatives, so it 142
128 * is silly to overwrite itself with nops - reboot is only outcome... */ 143 /*
144 * Replace only beginning, memcpy is used to apply alternatives,
145 * so it is silly to overwrite itself with nops - reboot is the
146 * only outcome...
147 */
129 .byte 2b - 1b 148 .byte 2b - 1b
130 .byte 2b - 1b 149 .byte 2b - 1b
131 .previous 150 .previous
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
index 08537747cb58..fdd30d08ab52 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
@@ -14,7 +14,7 @@ obj-$(CONFIG_MMIOTRACE) += mmiotrace.o
14mmiotrace-y := kmmio.o pf_in.o mmio-mod.o 14mmiotrace-y := kmmio.o pf_in.o mmio-mod.o
15obj-$(CONFIG_MMIOTRACE_TEST) += testmmiotrace.o 15obj-$(CONFIG_MMIOTRACE_TEST) += testmmiotrace.o
16 16
17obj-$(CONFIG_NUMA) += numa_$(BITS).o 17obj-$(CONFIG_NUMA) += numa.o numa_$(BITS).o
18obj-$(CONFIG_K8_NUMA) += k8topology_64.o 18obj-$(CONFIG_K8_NUMA) += k8topology_64.o
19obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o 19obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o
20 20
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index e81dfa408157..58f621e81919 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -19,49 +19,6 @@ void kunmap(struct page *page)
19 kunmap_high(page); 19 kunmap_high(page);
20} 20}
21 21
22static void debug_kmap_atomic_prot(enum km_type type)
23{
24#ifdef CONFIG_DEBUG_HIGHMEM
25 static unsigned warn_count = 10;
26
27 if (unlikely(warn_count == 0))
28 return;
29
30 if (unlikely(in_interrupt())) {
31 if (in_irq()) {
32 if (type != KM_IRQ0 && type != KM_IRQ1 &&
33 type != KM_BIO_SRC_IRQ && type != KM_BIO_DST_IRQ &&
34 type != KM_BOUNCE_READ) {
35 WARN_ON(1);
36 warn_count--;
37 }
38 } else if (!irqs_disabled()) { /* softirq */
39 if (type != KM_IRQ0 && type != KM_IRQ1 &&
40 type != KM_SOFTIRQ0 && type != KM_SOFTIRQ1 &&
41 type != KM_SKB_SUNRPC_DATA &&
42 type != KM_SKB_DATA_SOFTIRQ &&
43 type != KM_BOUNCE_READ) {
44 WARN_ON(1);
45 warn_count--;
46 }
47 }
48 }
49
50 if (type == KM_IRQ0 || type == KM_IRQ1 || type == KM_BOUNCE_READ ||
51 type == KM_BIO_SRC_IRQ || type == KM_BIO_DST_IRQ) {
52 if (!irqs_disabled()) {
53 WARN_ON(1);
54 warn_count--;
55 }
56 } else if (type == KM_SOFTIRQ0 || type == KM_SOFTIRQ1) {
57 if (irq_count() == 0 && !irqs_disabled()) {
58 WARN_ON(1);
59 warn_count--;
60 }
61 }
62#endif
63}
64
65/* 22/*
66 * kmap_atomic/kunmap_atomic is significantly faster than kmap/kunmap because 23 * kmap_atomic/kunmap_atomic is significantly faster than kmap/kunmap because
67 * no global lock is needed and because the kmap code must perform a global TLB 24 * no global lock is needed and because the kmap code must perform a global TLB
@@ -81,7 +38,7 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
81 if (!PageHighMem(page)) 38 if (!PageHighMem(page))
82 return page_address(page); 39 return page_address(page);
83 40
84 debug_kmap_atomic_prot(type); 41 debug_kmap_atomic(type);
85 42
86 idx = type + KM_TYPE_NR*smp_processor_id(); 43 idx = type + KM_TYPE_NR*smp_processor_id();
87 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 44 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -119,22 +76,13 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
119 pagefault_enable(); 76 pagefault_enable();
120} 77}
121 78
122/* This is the same as kmap_atomic() but can map memory that doesn't 79/*
80 * This is the same as kmap_atomic() but can map memory that doesn't
123 * have a struct page associated with it. 81 * have a struct page associated with it.
124 */ 82 */
125void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) 83void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
126{ 84{
127 enum fixed_addresses idx; 85 return kmap_atomic_prot_pfn(pfn, type, kmap_prot);
128 unsigned long vaddr;
129
130 pagefault_disable();
131
132 idx = type + KM_TYPE_NR*smp_processor_id();
133 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
134 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot));
135 arch_flush_lazy_mmu_mode();
136
137 return (void*) vaddr;
138} 86}
139EXPORT_SYMBOL_GPL(kmap_atomic_pfn); /* temporarily in use by i915 GEM until vmap */ 87EXPORT_SYMBOL_GPL(kmap_atomic_pfn); /* temporarily in use by i915 GEM until vmap */
140 88
@@ -156,7 +104,6 @@ EXPORT_SYMBOL(kunmap);
156EXPORT_SYMBOL(kmap_atomic); 104EXPORT_SYMBOL(kmap_atomic);
157EXPORT_SYMBOL(kunmap_atomic); 105EXPORT_SYMBOL(kunmap_atomic);
158 106
159#ifdef CONFIG_NUMA
160void __init set_highmem_pages_init(void) 107void __init set_highmem_pages_init(void)
161{ 108{
162 struct zone *zone; 109 struct zone *zone;
@@ -180,11 +127,3 @@ void __init set_highmem_pages_init(void)
180 } 127 }
181 totalram_pages += totalhigh_pages; 128 totalram_pages += totalhigh_pages;
182} 129}
183#else
184void __init set_highmem_pages_init(void)
185{
186 add_highpages_with_active_regions(0, highstart_pfn, highend_pfn);
187
188 totalram_pages += totalhigh_pages;
189}
190#endif /* CONFIG_NUMA */
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index ce6a722587d8..fd3da1dda1c9 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -1,8 +1,345 @@
1#include <linux/ioport.h>
1#include <linux/swap.h> 2#include <linux/swap.h>
3
2#include <asm/cacheflush.h> 4#include <asm/cacheflush.h>
5#include <asm/e820.h>
6#include <asm/init.h>
3#include <asm/page.h> 7#include <asm/page.h>
8#include <asm/page_types.h>
4#include <asm/sections.h> 9#include <asm/sections.h>
5#include <asm/system.h> 10#include <asm/system.h>
11#include <asm/tlbflush.h>
12
13unsigned long __initdata e820_table_start;
14unsigned long __meminitdata e820_table_end;
15unsigned long __meminitdata e820_table_top;
16
17int after_bootmem;
18
19int direct_gbpages
20#ifdef CONFIG_DIRECT_GBPAGES
21 = 1
22#endif
23;
24
25static void __init find_early_table_space(unsigned long end, int use_pse,
26 int use_gbpages)
27{
28 unsigned long puds, pmds, ptes, tables, start;
29
30 puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
31 tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
32
33 if (use_gbpages) {
34 unsigned long extra;
35
36 extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT);
37 pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT;
38 } else
39 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
40
41 tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
42
43 if (use_pse) {
44 unsigned long extra;
45
46 extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
47#ifdef CONFIG_X86_32
48 extra += PMD_SIZE;
49#endif
50 ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
51 } else
52 ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
53
54 tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
55
56#ifdef CONFIG_X86_32
57 /* for fixmap */
58 tables += roundup(__end_of_fixed_addresses * sizeof(pte_t), PAGE_SIZE);
59#endif
60
61 /*
62 * RED-PEN putting page tables only on node 0 could
63 * cause a hotspot and fill up ZONE_DMA. The page tables
64 * need roughly 0.5KB per GB.
65 */
66#ifdef CONFIG_X86_32
67 start = 0x7000;
68 e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
69 tables, PAGE_SIZE);
70#else /* CONFIG_X86_64 */
71 start = 0x8000;
72 e820_table_start = find_e820_area(start, end, tables, PAGE_SIZE);
73#endif
74 if (e820_table_start == -1UL)
75 panic("Cannot find space for the kernel page tables");
76
77 e820_table_start >>= PAGE_SHIFT;
78 e820_table_end = e820_table_start;
79 e820_table_top = e820_table_start + (tables >> PAGE_SHIFT);
80
81 printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
82 end, e820_table_start << PAGE_SHIFT, e820_table_top << PAGE_SHIFT);
83}
84
85struct map_range {
86 unsigned long start;
87 unsigned long end;
88 unsigned page_size_mask;
89};
90
91#ifdef CONFIG_X86_32
92#define NR_RANGE_MR 3
93#else /* CONFIG_X86_64 */
94#define NR_RANGE_MR 5
95#endif
96
97static int __meminit save_mr(struct map_range *mr, int nr_range,
98 unsigned long start_pfn, unsigned long end_pfn,
99 unsigned long page_size_mask)
100{
101 if (start_pfn < end_pfn) {
102 if (nr_range >= NR_RANGE_MR)
103 panic("run out of range for init_memory_mapping\n");
104 mr[nr_range].start = start_pfn<<PAGE_SHIFT;
105 mr[nr_range].end = end_pfn<<PAGE_SHIFT;
106 mr[nr_range].page_size_mask = page_size_mask;
107 nr_range++;
108 }
109
110 return nr_range;
111}
112
113#ifdef CONFIG_X86_64
114static void __init init_gbpages(void)
115{
116 if (direct_gbpages && cpu_has_gbpages)
117 printk(KERN_INFO "Using GB pages for direct mapping\n");
118 else
119 direct_gbpages = 0;
120}
121#else
122static inline void init_gbpages(void)
123{
124}
125#endif
126
127/*
128 * Setup the direct mapping of the physical memory at PAGE_OFFSET.
129 * This runs before bootmem is initialized and gets pages directly from
130 * the physical memory. To access them they are temporarily mapped.
131 */
132unsigned long __init_refok init_memory_mapping(unsigned long start,
133 unsigned long end)
134{
135 unsigned long page_size_mask = 0;
136 unsigned long start_pfn, end_pfn;
137 unsigned long ret = 0;
138 unsigned long pos;
139
140 struct map_range mr[NR_RANGE_MR];
141 int nr_range, i;
142 int use_pse, use_gbpages;
143
144 printk(KERN_INFO "init_memory_mapping: %016lx-%016lx\n", start, end);
145
146 if (!after_bootmem)
147 init_gbpages();
148
149#ifdef CONFIG_DEBUG_PAGEALLOC
150 /*
151 * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
152 * This will simplify cpa(), which otherwise needs to support splitting
153 * large pages into small in interrupt context, etc.
154 */
155 use_pse = use_gbpages = 0;
156#else
157 use_pse = cpu_has_pse;
158 use_gbpages = direct_gbpages;
159#endif
160
161#ifdef CONFIG_X86_32
162#ifdef CONFIG_X86_PAE
163 set_nx();
164 if (nx_enabled)
165 printk(KERN_INFO "NX (Execute Disable) protection: active\n");
166#endif
167
168 /* Enable PSE if available */
169 if (cpu_has_pse)
170 set_in_cr4(X86_CR4_PSE);
171
172 /* Enable PGE if available */
173 if (cpu_has_pge) {
174 set_in_cr4(X86_CR4_PGE);
175 __supported_pte_mask |= _PAGE_GLOBAL;
176 }
177#endif
178
179 if (use_gbpages)
180 page_size_mask |= 1 << PG_LEVEL_1G;
181 if (use_pse)
182 page_size_mask |= 1 << PG_LEVEL_2M;
183
184 memset(mr, 0, sizeof(mr));
185 nr_range = 0;
186
187 /* head if not big page alignment ? */
188 start_pfn = start >> PAGE_SHIFT;
189 pos = start_pfn << PAGE_SHIFT;
190#ifdef CONFIG_X86_32
191 /*
192 * Don't use a large page for the first 2/4MB of memory
193 * because there are often fixed size MTRRs in there
194 * and overlapping MTRRs into large pages can cause
195 * slowdowns.
196 */
197 if (pos == 0)
198 end_pfn = 1<<(PMD_SHIFT - PAGE_SHIFT);
199 else
200 end_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
201 << (PMD_SHIFT - PAGE_SHIFT);
202#else /* CONFIG_X86_64 */
203 end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
204 << (PMD_SHIFT - PAGE_SHIFT);
205#endif
206 if (end_pfn > (end >> PAGE_SHIFT))
207 end_pfn = end >> PAGE_SHIFT;
208 if (start_pfn < end_pfn) {
209 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
210 pos = end_pfn << PAGE_SHIFT;
211 }
212
213 /* big page (2M) range */
214 start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
215 << (PMD_SHIFT - PAGE_SHIFT);
216#ifdef CONFIG_X86_32
217 end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
218#else /* CONFIG_X86_64 */
219 end_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
220 << (PUD_SHIFT - PAGE_SHIFT);
221 if (end_pfn > ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT)))
222 end_pfn = ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT));
223#endif
224
225 if (start_pfn < end_pfn) {
226 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
227 page_size_mask & (1<<PG_LEVEL_2M));
228 pos = end_pfn << PAGE_SHIFT;
229 }
230
231#ifdef CONFIG_X86_64
232 /* big page (1G) range */
233 start_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
234 << (PUD_SHIFT - PAGE_SHIFT);
235 end_pfn = (end >> PUD_SHIFT) << (PUD_SHIFT - PAGE_SHIFT);
236 if (start_pfn < end_pfn) {
237 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
238 page_size_mask &
239 ((1<<PG_LEVEL_2M)|(1<<PG_LEVEL_1G)));
240 pos = end_pfn << PAGE_SHIFT;
241 }
242
243 /* tail is not big page (1G) alignment */
244 start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
245 << (PMD_SHIFT - PAGE_SHIFT);
246 end_pfn = (end >> PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
247 if (start_pfn < end_pfn) {
248 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
249 page_size_mask & (1<<PG_LEVEL_2M));
250 pos = end_pfn << PAGE_SHIFT;
251 }
252#endif
253
254 /* tail is not big page (2M) alignment */
255 start_pfn = pos>>PAGE_SHIFT;
256 end_pfn = end>>PAGE_SHIFT;
257 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
258
259 /* try to merge same page size and continuous */
260 for (i = 0; nr_range > 1 && i < nr_range - 1; i++) {
261 unsigned long old_start;
262 if (mr[i].end != mr[i+1].start ||
263 mr[i].page_size_mask != mr[i+1].page_size_mask)
264 continue;
265 /* move it */
266 old_start = mr[i].start;
267 memmove(&mr[i], &mr[i+1],
268 (nr_range - 1 - i) * sizeof(struct map_range));
269 mr[i--].start = old_start;
270 nr_range--;
271 }
272
273 for (i = 0; i < nr_range; i++)
274 printk(KERN_DEBUG " %010lx - %010lx page %s\n",
275 mr[i].start, mr[i].end,
276 (mr[i].page_size_mask & (1<<PG_LEVEL_1G))?"1G":(
277 (mr[i].page_size_mask & (1<<PG_LEVEL_2M))?"2M":"4k"));
278
279 /*
280 * Find space for the kernel direct mapping tables.
281 *
282 * Later we should allocate these tables in the local node of the
283 * memory mapped. Unfortunately this is done currently before the
284 * nodes are discovered.
285 */
286 if (!after_bootmem)
287 find_early_table_space(end, use_pse, use_gbpages);
288
289#ifdef CONFIG_X86_32
290 for (i = 0; i < nr_range; i++)
291 kernel_physical_mapping_init(mr[i].start, mr[i].end,
292 mr[i].page_size_mask);
293 ret = end;
294#else /* CONFIG_X86_64 */
295 for (i = 0; i < nr_range; i++)
296 ret = kernel_physical_mapping_init(mr[i].start, mr[i].end,
297 mr[i].page_size_mask);
298#endif
299
300#ifdef CONFIG_X86_32
301 early_ioremap_page_table_range_init();
302
303 load_cr3(swapper_pg_dir);
304#endif
305
306#ifdef CONFIG_X86_64
307 if (!after_bootmem)
308 mmu_cr4_features = read_cr4();
309#endif
310 __flush_tlb_all();
311
312 if (!after_bootmem && e820_table_end > e820_table_start)
313 reserve_early(e820_table_start << PAGE_SHIFT,
314 e820_table_end << PAGE_SHIFT, "PGTABLE");
315
316 if (!after_bootmem)
317 early_memtest(start, end);
318
319 return ret >> PAGE_SHIFT;
320}
321
322
323/*
324 * devmem_is_allowed() checks to see if /dev/mem access to a certain address
325 * is valid. The argument is a physical page number.
326 *
327 *
328 * On x86, access has to be given to the first megabyte of ram because that area
329 * contains bios code and data regions used by X and dosemu and similar apps.
330 * Access has to be given to non-kernel-ram areas as well, these contain the PCI
331 * mmio resources as well as potential bios/acpi data regions.
332 */
333int devmem_is_allowed(unsigned long pagenr)
334{
335 if (pagenr <= 256)
336 return 1;
337 if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
338 return 0;
339 if (!page_is_ram(pagenr))
340 return 1;
341 return 0;
342}
6 343
7void free_init_pages(char *what, unsigned long begin, unsigned long end) 344void free_init_pages(char *what, unsigned long begin, unsigned long end)
8{ 345{
@@ -47,3 +384,10 @@ void free_initmem(void)
47 (unsigned long)(&__init_begin), 384 (unsigned long)(&__init_begin),
48 (unsigned long)(&__init_end)); 385 (unsigned long)(&__init_end));
49} 386}
387
388#ifdef CONFIG_BLK_DEV_INITRD
389void free_initrd_mem(unsigned long start, unsigned long end)
390{
391 free_init_pages("initrd memory", start, end);
392}
393#endif
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 47df0e1bbeb9..749559ed80f5 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -49,6 +49,7 @@
49#include <asm/paravirt.h> 49#include <asm/paravirt.h>
50#include <asm/setup.h> 50#include <asm/setup.h>
51#include <asm/cacheflush.h> 51#include <asm/cacheflush.h>
52#include <asm/init.h>
52 53
53unsigned long max_low_pfn_mapped; 54unsigned long max_low_pfn_mapped;
54unsigned long max_pfn_mapped; 55unsigned long max_pfn_mapped;
@@ -58,19 +59,14 @@ unsigned long highstart_pfn, highend_pfn;
58 59
59static noinline int do_test_wp_bit(void); 60static noinline int do_test_wp_bit(void);
60 61
61 62bool __read_mostly __vmalloc_start_set = false;
62static unsigned long __initdata table_start;
63static unsigned long __meminitdata table_end;
64static unsigned long __meminitdata table_top;
65
66static int __initdata after_init_bootmem;
67 63
68static __init void *alloc_low_page(void) 64static __init void *alloc_low_page(void)
69{ 65{
70 unsigned long pfn = table_end++; 66 unsigned long pfn = e820_table_end++;
71 void *adr; 67 void *adr;
72 68
73 if (pfn >= table_top) 69 if (pfn >= e820_table_top)
74 panic("alloc_low_page: ran out of memory"); 70 panic("alloc_low_page: ran out of memory");
75 71
76 adr = __va(pfn * PAGE_SIZE); 72 adr = __va(pfn * PAGE_SIZE);
@@ -90,7 +86,7 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
90 86
91#ifdef CONFIG_X86_PAE 87#ifdef CONFIG_X86_PAE
92 if (!(pgd_val(*pgd) & _PAGE_PRESENT)) { 88 if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
93 if (after_init_bootmem) 89 if (after_bootmem)
94 pmd_table = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE); 90 pmd_table = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
95 else 91 else
96 pmd_table = (pmd_t *)alloc_low_page(); 92 pmd_table = (pmd_t *)alloc_low_page();
@@ -117,7 +113,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
117 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { 113 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
118 pte_t *page_table = NULL; 114 pte_t *page_table = NULL;
119 115
120 if (after_init_bootmem) { 116 if (after_bootmem) {
121#ifdef CONFIG_DEBUG_PAGEALLOC 117#ifdef CONFIG_DEBUG_PAGEALLOC
122 page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); 118 page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
123#endif 119#endif
@@ -168,12 +164,12 @@ static pte_t *__init page_table_kmap_check(pte_t *pte, pmd_t *pmd,
168 if (pmd_idx_kmap_begin != pmd_idx_kmap_end 164 if (pmd_idx_kmap_begin != pmd_idx_kmap_end
169 && (vaddr >> PMD_SHIFT) >= pmd_idx_kmap_begin 165 && (vaddr >> PMD_SHIFT) >= pmd_idx_kmap_begin
170 && (vaddr >> PMD_SHIFT) <= pmd_idx_kmap_end 166 && (vaddr >> PMD_SHIFT) <= pmd_idx_kmap_end
171 && ((__pa(pte) >> PAGE_SHIFT) < table_start 167 && ((__pa(pte) >> PAGE_SHIFT) < e820_table_start
172 || (__pa(pte) >> PAGE_SHIFT) >= table_end)) { 168 || (__pa(pte) >> PAGE_SHIFT) >= e820_table_end)) {
173 pte_t *newpte; 169 pte_t *newpte;
174 int i; 170 int i;
175 171
176 BUG_ON(after_init_bootmem); 172 BUG_ON(after_bootmem);
177 newpte = alloc_low_page(); 173 newpte = alloc_low_page();
178 for (i = 0; i < PTRS_PER_PTE; i++) 174 for (i = 0; i < PTRS_PER_PTE; i++)
179 set_pte(newpte + i, pte[i]); 175 set_pte(newpte + i, pte[i]);
@@ -242,11 +238,14 @@ static inline int is_kernel_text(unsigned long addr)
242 * of max_low_pfn pages, by creating page tables starting from address 238 * of max_low_pfn pages, by creating page tables starting from address
243 * PAGE_OFFSET: 239 * PAGE_OFFSET:
244 */ 240 */
245static void __init kernel_physical_mapping_init(pgd_t *pgd_base, 241unsigned long __init
246 unsigned long start_pfn, 242kernel_physical_mapping_init(unsigned long start,
247 unsigned long end_pfn, 243 unsigned long end,
248 int use_pse) 244 unsigned long page_size_mask)
249{ 245{
246 int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
247 unsigned long start_pfn, end_pfn;
248 pgd_t *pgd_base = swapper_pg_dir;
250 int pgd_idx, pmd_idx, pte_ofs; 249 int pgd_idx, pmd_idx, pte_ofs;
251 unsigned long pfn; 250 unsigned long pfn;
252 pgd_t *pgd; 251 pgd_t *pgd;
@@ -255,6 +254,9 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base,
255 unsigned pages_2m, pages_4k; 254 unsigned pages_2m, pages_4k;
256 int mapping_iter; 255 int mapping_iter;
257 256
257 start_pfn = start >> PAGE_SHIFT;
258 end_pfn = end >> PAGE_SHIFT;
259
258 /* 260 /*
259 * First iteration will setup identity mapping using large/small pages 261 * First iteration will setup identity mapping using large/small pages
260 * based on use_pse, with other attributes same as set by 262 * based on use_pse, with other attributes same as set by
@@ -369,26 +371,6 @@ repeat:
369 mapping_iter = 2; 371 mapping_iter = 2;
370 goto repeat; 372 goto repeat;
371 } 373 }
372}
373
374/*
375 * devmem_is_allowed() checks to see if /dev/mem access to a certain address
376 * is valid. The argument is a physical page number.
377 *
378 *
379 * On x86, access has to be given to the first megabyte of ram because that area
380 * contains bios code and data regions used by X and dosemu and similar apps.
381 * Access has to be given to non-kernel-ram areas as well, these contain the PCI
382 * mmio resources as well as potential bios/acpi data regions.
383 */
384int devmem_is_allowed(unsigned long pagenr)
385{
386 if (pagenr <= 256)
387 return 1;
388 if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
389 return 0;
390 if (!page_is_ram(pagenr))
391 return 1;
392 return 0; 374 return 0;
393} 375}
394 376
@@ -545,8 +527,9 @@ void __init native_pagetable_setup_done(pgd_t *base)
545 * be partially populated, and so it avoids stomping on any existing 527 * be partially populated, and so it avoids stomping on any existing
546 * mappings. 528 * mappings.
547 */ 529 */
548static void __init early_ioremap_page_table_range_init(pgd_t *pgd_base) 530void __init early_ioremap_page_table_range_init(void)
549{ 531{
532 pgd_t *pgd_base = swapper_pg_dir;
550 unsigned long vaddr, end; 533 unsigned long vaddr, end;
551 534
552 /* 535 /*
@@ -641,7 +624,7 @@ static int __init noexec_setup(char *str)
641} 624}
642early_param("noexec", noexec_setup); 625early_param("noexec", noexec_setup);
643 626
644static void __init set_nx(void) 627void __init set_nx(void)
645{ 628{
646 unsigned int v[4], l, h; 629 unsigned int v[4], l, h;
647 630
@@ -793,6 +776,8 @@ void __init initmem_init(unsigned long start_pfn,
793#ifdef CONFIG_FLATMEM 776#ifdef CONFIG_FLATMEM
794 max_mapnr = num_physpages; 777 max_mapnr = num_physpages;
795#endif 778#endif
779 __vmalloc_start_set = true;
780
796 printk(KERN_NOTICE "%ldMB LOWMEM available.\n", 781 printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
797 pages_to_mb(max_low_pfn)); 782 pages_to_mb(max_low_pfn));
798 783
@@ -814,176 +799,66 @@ static void __init zone_sizes_init(void)
814 free_area_init_nodes(max_zone_pfns); 799 free_area_init_nodes(max_zone_pfns);
815} 800}
816 801
802static unsigned long __init setup_node_bootmem(int nodeid,
803 unsigned long start_pfn,
804 unsigned long end_pfn,
805 unsigned long bootmap)
806{
807 unsigned long bootmap_size;
808
809 /* don't touch min_low_pfn */
810 bootmap_size = init_bootmem_node(NODE_DATA(nodeid),
811 bootmap >> PAGE_SHIFT,
812 start_pfn, end_pfn);
813 printk(KERN_INFO " node %d low ram: %08lx - %08lx\n",
814 nodeid, start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
815 printk(KERN_INFO " node %d bootmap %08lx - %08lx\n",
816 nodeid, bootmap, bootmap + bootmap_size);
817 free_bootmem_with_active_regions(nodeid, end_pfn);
818 early_res_to_bootmem(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
819
820 return bootmap + bootmap_size;
821}
822
817void __init setup_bootmem_allocator(void) 823void __init setup_bootmem_allocator(void)
818{ 824{
819 int i; 825 int nodeid;
820 unsigned long bootmap_size, bootmap; 826 unsigned long bootmap_size, bootmap;
821 /* 827 /*
822 * Initialize the boot-time allocator (with low memory only): 828 * Initialize the boot-time allocator (with low memory only):
823 */ 829 */
824 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; 830 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
825 bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT, 831 bootmap = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, bootmap_size,
826 max_pfn_mapped<<PAGE_SHIFT, bootmap_size,
827 PAGE_SIZE); 832 PAGE_SIZE);
828 if (bootmap == -1L) 833 if (bootmap == -1L)
829 panic("Cannot find bootmem map of size %ld\n", bootmap_size); 834 panic("Cannot find bootmem map of size %ld\n", bootmap_size);
830 reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP"); 835 reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP");
831 836
832 /* don't touch min_low_pfn */
833 bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT,
834 min_low_pfn, max_low_pfn);
835 printk(KERN_INFO " mapped low ram: 0 - %08lx\n", 837 printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
836 max_pfn_mapped<<PAGE_SHIFT); 838 max_pfn_mapped<<PAGE_SHIFT);
837 printk(KERN_INFO " low ram: %08lx - %08lx\n", 839 printk(KERN_INFO " low ram: 0 - %08lx\n", max_low_pfn<<PAGE_SHIFT);
838 min_low_pfn<<PAGE_SHIFT, max_low_pfn<<PAGE_SHIFT);
839 printk(KERN_INFO " bootmap %08lx - %08lx\n",
840 bootmap, bootmap + bootmap_size);
841 for_each_online_node(i)
842 free_bootmem_with_active_regions(i, max_low_pfn);
843 early_res_to_bootmem(0, max_low_pfn<<PAGE_SHIFT);
844
845 after_init_bootmem = 1;
846}
847
848static void __init find_early_table_space(unsigned long end, int use_pse)
849{
850 unsigned long puds, pmds, ptes, tables, start;
851
852 puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
853 tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
854
855 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
856 tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
857 840
858 if (use_pse) { 841 for_each_online_node(nodeid) {
859 unsigned long extra; 842 unsigned long start_pfn, end_pfn;
860
861 extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
862 extra += PMD_SIZE;
863 ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
864 } else
865 ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
866
867 tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
868
869 /* for fixmap */
870 tables += roundup(__end_of_fixed_addresses * sizeof(pte_t), PAGE_SIZE);
871
872 /*
873 * RED-PEN putting page tables only on node 0 could
874 * cause a hotspot and fill up ZONE_DMA. The page tables
875 * need roughly 0.5KB per GB.
876 */
877 start = 0x7000;
878 table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
879 tables, PAGE_SIZE);
880 if (table_start == -1UL)
881 panic("Cannot find space for the kernel page tables");
882
883 table_start >>= PAGE_SHIFT;
884 table_end = table_start;
885 table_top = table_start + (tables>>PAGE_SHIFT);
886
887 printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
888 end, table_start << PAGE_SHIFT,
889 (table_start << PAGE_SHIFT) + tables);
890}
891 843
892unsigned long __init_refok init_memory_mapping(unsigned long start, 844#ifdef CONFIG_NEED_MULTIPLE_NODES
893 unsigned long end) 845 start_pfn = node_start_pfn[nodeid];
894{ 846 end_pfn = node_end_pfn[nodeid];
895 pgd_t *pgd_base = swapper_pg_dir; 847 if (start_pfn > max_low_pfn)
896 unsigned long start_pfn, end_pfn; 848 continue;
897 unsigned long big_page_start; 849 if (end_pfn > max_low_pfn)
898#ifdef CONFIG_DEBUG_PAGEALLOC 850 end_pfn = max_low_pfn;
899 /*
900 * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
901 * This will simplify cpa(), which otherwise needs to support splitting
902 * large pages into small in interrupt context, etc.
903 */
904 int use_pse = 0;
905#else 851#else
906 int use_pse = cpu_has_pse; 852 start_pfn = 0;
853 end_pfn = max_low_pfn;
907#endif 854#endif
908 855 bootmap = setup_node_bootmem(nodeid, start_pfn, end_pfn,
909 /* 856 bootmap);
910 * Find space for the kernel direct mapping tables.
911 */
912 if (!after_init_bootmem)
913 find_early_table_space(end, use_pse);
914
915#ifdef CONFIG_X86_PAE
916 set_nx();
917 if (nx_enabled)
918 printk(KERN_INFO "NX (Execute Disable) protection: active\n");
919#endif
920
921 /* Enable PSE if available */
922 if (cpu_has_pse)
923 set_in_cr4(X86_CR4_PSE);
924
925 /* Enable PGE if available */
926 if (cpu_has_pge) {
927 set_in_cr4(X86_CR4_PGE);
928 __supported_pte_mask |= _PAGE_GLOBAL;
929 }
930
931 /*
932 * Don't use a large page for the first 2/4MB of memory
933 * because there are often fixed size MTRRs in there
934 * and overlapping MTRRs into large pages can cause
935 * slowdowns.
936 */
937 big_page_start = PMD_SIZE;
938
939 if (start < big_page_start) {
940 start_pfn = start >> PAGE_SHIFT;
941 end_pfn = min(big_page_start>>PAGE_SHIFT, end>>PAGE_SHIFT);
942 } else {
943 /* head is not big page alignment ? */
944 start_pfn = start >> PAGE_SHIFT;
945 end_pfn = ((start + (PMD_SIZE - 1))>>PMD_SHIFT)
946 << (PMD_SHIFT - PAGE_SHIFT);
947 }
948 if (start_pfn < end_pfn)
949 kernel_physical_mapping_init(pgd_base, start_pfn, end_pfn, 0);
950
951 /* big page range */
952 start_pfn = ((start + (PMD_SIZE - 1))>>PMD_SHIFT)
953 << (PMD_SHIFT - PAGE_SHIFT);
954 if (start_pfn < (big_page_start >> PAGE_SHIFT))
955 start_pfn = big_page_start >> PAGE_SHIFT;
956 end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
957 if (start_pfn < end_pfn)
958 kernel_physical_mapping_init(pgd_base, start_pfn, end_pfn,
959 use_pse);
960
961 /* tail is not big page alignment ? */
962 start_pfn = end_pfn;
963 if (start_pfn > (big_page_start>>PAGE_SHIFT)) {
964 end_pfn = end >> PAGE_SHIFT;
965 if (start_pfn < end_pfn)
966 kernel_physical_mapping_init(pgd_base, start_pfn,
967 end_pfn, 0);
968 } 857 }
969 858
970 early_ioremap_page_table_range_init(pgd_base); 859 after_bootmem = 1;
971
972 load_cr3(swapper_pg_dir);
973
974 __flush_tlb_all();
975
976 if (!after_init_bootmem)
977 reserve_early(table_start << PAGE_SHIFT,
978 table_end << PAGE_SHIFT, "PGTABLE");
979
980 if (!after_init_bootmem)
981 early_memtest(start, end);
982
983 return end >> PAGE_SHIFT;
984} 860}
985 861
986
987/* 862/*
988 * paging_init() sets up the page tables - note that the first 8MB are 863 * paging_init() sets up the page tables - note that the first 8MB are
989 * already mapped by head.S. 864 * already mapped by head.S.
@@ -1179,17 +1054,47 @@ static noinline int do_test_wp_bit(void)
1179const int rodata_test_data = 0xC3; 1054const int rodata_test_data = 0xC3;
1180EXPORT_SYMBOL_GPL(rodata_test_data); 1055EXPORT_SYMBOL_GPL(rodata_test_data);
1181 1056
1057static int kernel_set_to_readonly;
1058
1059void set_kernel_text_rw(void)
1060{
1061 unsigned long start = PFN_ALIGN(_text);
1062 unsigned long size = PFN_ALIGN(_etext) - start;
1063
1064 if (!kernel_set_to_readonly)
1065 return;
1066
1067 pr_debug("Set kernel text: %lx - %lx for read write\n",
1068 start, start+size);
1069
1070 set_pages_rw(virt_to_page(start), size >> PAGE_SHIFT);
1071}
1072
1073void set_kernel_text_ro(void)
1074{
1075 unsigned long start = PFN_ALIGN(_text);
1076 unsigned long size = PFN_ALIGN(_etext) - start;
1077
1078 if (!kernel_set_to_readonly)
1079 return;
1080
1081 pr_debug("Set kernel text: %lx - %lx for read only\n",
1082 start, start+size);
1083
1084 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
1085}
1086
1182void mark_rodata_ro(void) 1087void mark_rodata_ro(void)
1183{ 1088{
1184 unsigned long start = PFN_ALIGN(_text); 1089 unsigned long start = PFN_ALIGN(_text);
1185 unsigned long size = PFN_ALIGN(_etext) - start; 1090 unsigned long size = PFN_ALIGN(_etext) - start;
1186 1091
1187#ifndef CONFIG_DYNAMIC_FTRACE
1188 /* Dynamic tracing modifies the kernel text section */
1189 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); 1092 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
1190 printk(KERN_INFO "Write protecting the kernel text: %luk\n", 1093 printk(KERN_INFO "Write protecting the kernel text: %luk\n",
1191 size >> 10); 1094 size >> 10);
1192 1095
1096 kernel_set_to_readonly = 1;
1097
1193#ifdef CONFIG_CPA_DEBUG 1098#ifdef CONFIG_CPA_DEBUG
1194 printk(KERN_INFO "Testing CPA: Reverting %lx-%lx\n", 1099 printk(KERN_INFO "Testing CPA: Reverting %lx-%lx\n",
1195 start, start+size); 1100 start, start+size);
@@ -1198,7 +1103,6 @@ void mark_rodata_ro(void)
1198 printk(KERN_INFO "Testing CPA: write protecting again\n"); 1103 printk(KERN_INFO "Testing CPA: write protecting again\n");
1199 set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT); 1104 set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT);
1200#endif 1105#endif
1201#endif /* CONFIG_DYNAMIC_FTRACE */
1202 1106
1203 start += size; 1107 start += size;
1204 size = (unsigned long)__end_rodata - start; 1108 size = (unsigned long)__end_rodata - start;
@@ -1217,13 +1121,6 @@ void mark_rodata_ro(void)
1217} 1121}
1218#endif 1122#endif
1219 1123
1220#ifdef CONFIG_BLK_DEV_INITRD
1221void free_initrd_mem(unsigned long start, unsigned long end)
1222{
1223 free_init_pages("initrd memory", start, end);
1224}
1225#endif
1226
1227int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, 1124int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
1228 int flags) 1125 int flags)
1229{ 1126{
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 07f44d491df1..1753e8020df6 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -48,6 +48,7 @@
48#include <asm/kdebug.h> 48#include <asm/kdebug.h>
49#include <asm/numa.h> 49#include <asm/numa.h>
50#include <asm/cacheflush.h> 50#include <asm/cacheflush.h>
51#include <asm/init.h>
51 52
52/* 53/*
53 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries. 54 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
@@ -61,12 +62,6 @@ static unsigned long dma_reserve __initdata;
61 62
62DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 63DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
63 64
64int direct_gbpages
65#ifdef CONFIG_DIRECT_GBPAGES
66 = 1
67#endif
68;
69
70static int __init parse_direct_gbpages_off(char *arg) 65static int __init parse_direct_gbpages_off(char *arg)
71{ 66{
72 direct_gbpages = 0; 67 direct_gbpages = 0;
@@ -87,12 +82,10 @@ early_param("gbpages", parse_direct_gbpages_on);
87 * around without checking the pgd every time. 82 * around without checking the pgd every time.
88 */ 83 */
89 84
90int after_bootmem;
91
92pteval_t __supported_pte_mask __read_mostly = ~_PAGE_IOMAP; 85pteval_t __supported_pte_mask __read_mostly = ~_PAGE_IOMAP;
93EXPORT_SYMBOL_GPL(__supported_pte_mask); 86EXPORT_SYMBOL_GPL(__supported_pte_mask);
94 87
95static int do_not_nx __cpuinitdata; 88static int disable_nx __cpuinitdata;
96 89
97/* 90/*
98 * noexec=on|off 91 * noexec=on|off
@@ -107,9 +100,9 @@ static int __init nonx_setup(char *str)
107 return -EINVAL; 100 return -EINVAL;
108 if (!strncmp(str, "on", 2)) { 101 if (!strncmp(str, "on", 2)) {
109 __supported_pte_mask |= _PAGE_NX; 102 __supported_pte_mask |= _PAGE_NX;
110 do_not_nx = 0; 103 disable_nx = 0;
111 } else if (!strncmp(str, "off", 3)) { 104 } else if (!strncmp(str, "off", 3)) {
112 do_not_nx = 1; 105 disable_nx = 1;
113 __supported_pte_mask &= ~_PAGE_NX; 106 __supported_pte_mask &= ~_PAGE_NX;
114 } 107 }
115 return 0; 108 return 0;
@@ -121,7 +114,7 @@ void __cpuinit check_efer(void)
121 unsigned long efer; 114 unsigned long efer;
122 115
123 rdmsrl(MSR_EFER, efer); 116 rdmsrl(MSR_EFER, efer);
124 if (!(efer & EFER_NX) || do_not_nx) 117 if (!(efer & EFER_NX) || disable_nx)
125 __supported_pte_mask &= ~_PAGE_NX; 118 __supported_pte_mask &= ~_PAGE_NX;
126} 119}
127 120
@@ -325,13 +318,9 @@ void __init cleanup_highmap(void)
325 } 318 }
326} 319}
327 320
328static unsigned long __initdata table_start;
329static unsigned long __meminitdata table_end;
330static unsigned long __meminitdata table_top;
331
332static __ref void *alloc_low_page(unsigned long *phys) 321static __ref void *alloc_low_page(unsigned long *phys)
333{ 322{
334 unsigned long pfn = table_end++; 323 unsigned long pfn = e820_table_end++;
335 void *adr; 324 void *adr;
336 325
337 if (after_bootmem) { 326 if (after_bootmem) {
@@ -341,7 +330,7 @@ static __ref void *alloc_low_page(unsigned long *phys)
341 return adr; 330 return adr;
342 } 331 }
343 332
344 if (pfn >= table_top) 333 if (pfn >= e820_table_top)
345 panic("alloc_low_page: ran out of memory"); 334 panic("alloc_low_page: ran out of memory");
346 335
347 adr = early_memremap(pfn * PAGE_SIZE, PAGE_SIZE); 336 adr = early_memremap(pfn * PAGE_SIZE, PAGE_SIZE);
@@ -581,58 +570,10 @@ phys_pud_update(pgd_t *pgd, unsigned long addr, unsigned long end,
581 return phys_pud_init(pud, addr, end, page_size_mask); 570 return phys_pud_init(pud, addr, end, page_size_mask);
582} 571}
583 572
584static void __init find_early_table_space(unsigned long end, int use_pse, 573unsigned long __init
585 int use_gbpages) 574kernel_physical_mapping_init(unsigned long start,
586{ 575 unsigned long end,
587 unsigned long puds, pmds, ptes, tables, start; 576 unsigned long page_size_mask)
588
589 puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
590 tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
591 if (use_gbpages) {
592 unsigned long extra;
593 extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT);
594 pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT;
595 } else
596 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
597 tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
598
599 if (use_pse) {
600 unsigned long extra;
601 extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
602 ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
603 } else
604 ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
605 tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
606
607 /*
608 * RED-PEN putting page tables only on node 0 could
609 * cause a hotspot and fill up ZONE_DMA. The page tables
610 * need roughly 0.5KB per GB.
611 */
612 start = 0x8000;
613 table_start = find_e820_area(start, end, tables, PAGE_SIZE);
614 if (table_start == -1UL)
615 panic("Cannot find space for the kernel page tables");
616
617 table_start >>= PAGE_SHIFT;
618 table_end = table_start;
619 table_top = table_start + (tables >> PAGE_SHIFT);
620
621 printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
622 end, table_start << PAGE_SHIFT, table_top << PAGE_SHIFT);
623}
624
625static void __init init_gbpages(void)
626{
627 if (direct_gbpages && cpu_has_gbpages)
628 printk(KERN_INFO "Using GB pages for direct mapping\n");
629 else
630 direct_gbpages = 0;
631}
632
633static unsigned long __meminit kernel_physical_mapping_init(unsigned long start,
634 unsigned long end,
635 unsigned long page_size_mask)
636{ 577{
637 578
638 unsigned long next, last_map_addr = end; 579 unsigned long next, last_map_addr = end;
@@ -669,176 +610,6 @@ static unsigned long __meminit kernel_physical_mapping_init(unsigned long start,
669 return last_map_addr; 610 return last_map_addr;
670} 611}
671 612
672struct map_range {
673 unsigned long start;
674 unsigned long end;
675 unsigned page_size_mask;
676};
677
678#define NR_RANGE_MR 5
679
680static int save_mr(struct map_range *mr, int nr_range,
681 unsigned long start_pfn, unsigned long end_pfn,
682 unsigned long page_size_mask)
683{
684
685 if (start_pfn < end_pfn) {
686 if (nr_range >= NR_RANGE_MR)
687 panic("run out of range for init_memory_mapping\n");
688 mr[nr_range].start = start_pfn<<PAGE_SHIFT;
689 mr[nr_range].end = end_pfn<<PAGE_SHIFT;
690 mr[nr_range].page_size_mask = page_size_mask;
691 nr_range++;
692 }
693
694 return nr_range;
695}
696
697/*
698 * Setup the direct mapping of the physical memory at PAGE_OFFSET.
699 * This runs before bootmem is initialized and gets pages directly from
700 * the physical memory. To access them they are temporarily mapped.
701 */
702unsigned long __init_refok init_memory_mapping(unsigned long start,
703 unsigned long end)
704{
705 unsigned long last_map_addr = 0;
706 unsigned long page_size_mask = 0;
707 unsigned long start_pfn, end_pfn;
708 unsigned long pos;
709
710 struct map_range mr[NR_RANGE_MR];
711 int nr_range, i;
712 int use_pse, use_gbpages;
713
714 printk(KERN_INFO "init_memory_mapping: %016lx-%016lx\n", start, end);
715
716 /*
717 * Find space for the kernel direct mapping tables.
718 *
719 * Later we should allocate these tables in the local node of the
720 * memory mapped. Unfortunately this is done currently before the
721 * nodes are discovered.
722 */
723 if (!after_bootmem)
724 init_gbpages();
725
726#ifdef CONFIG_DEBUG_PAGEALLOC
727 /*
728 * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
729 * This will simplify cpa(), which otherwise needs to support splitting
730 * large pages into small in interrupt context, etc.
731 */
732 use_pse = use_gbpages = 0;
733#else
734 use_pse = cpu_has_pse;
735 use_gbpages = direct_gbpages;
736#endif
737
738 if (use_gbpages)
739 page_size_mask |= 1 << PG_LEVEL_1G;
740 if (use_pse)
741 page_size_mask |= 1 << PG_LEVEL_2M;
742
743 memset(mr, 0, sizeof(mr));
744 nr_range = 0;
745
746 /* head if not big page alignment ?*/
747 start_pfn = start >> PAGE_SHIFT;
748 pos = start_pfn << PAGE_SHIFT;
749 end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
750 << (PMD_SHIFT - PAGE_SHIFT);
751 if (end_pfn > (end >> PAGE_SHIFT))
752 end_pfn = end >> PAGE_SHIFT;
753 if (start_pfn < end_pfn) {
754 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
755 pos = end_pfn << PAGE_SHIFT;
756 }
757
758 /* big page (2M) range*/
759 start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
760 << (PMD_SHIFT - PAGE_SHIFT);
761 end_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
762 << (PUD_SHIFT - PAGE_SHIFT);
763 if (end_pfn > ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT)))
764 end_pfn = ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT));
765 if (start_pfn < end_pfn) {
766 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
767 page_size_mask & (1<<PG_LEVEL_2M));
768 pos = end_pfn << PAGE_SHIFT;
769 }
770
771 /* big page (1G) range */
772 start_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
773 << (PUD_SHIFT - PAGE_SHIFT);
774 end_pfn = (end >> PUD_SHIFT) << (PUD_SHIFT - PAGE_SHIFT);
775 if (start_pfn < end_pfn) {
776 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
777 page_size_mask &
778 ((1<<PG_LEVEL_2M)|(1<<PG_LEVEL_1G)));
779 pos = end_pfn << PAGE_SHIFT;
780 }
781
782 /* tail is not big page (1G) alignment */
783 start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
784 << (PMD_SHIFT - PAGE_SHIFT);
785 end_pfn = (end >> PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
786 if (start_pfn < end_pfn) {
787 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
788 page_size_mask & (1<<PG_LEVEL_2M));
789 pos = end_pfn << PAGE_SHIFT;
790 }
791
792 /* tail is not big page (2M) alignment */
793 start_pfn = pos>>PAGE_SHIFT;
794 end_pfn = end>>PAGE_SHIFT;
795 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
796
797 /* try to merge same page size and continuous */
798 for (i = 0; nr_range > 1 && i < nr_range - 1; i++) {
799 unsigned long old_start;
800 if (mr[i].end != mr[i+1].start ||
801 mr[i].page_size_mask != mr[i+1].page_size_mask)
802 continue;
803 /* move it */
804 old_start = mr[i].start;
805 memmove(&mr[i], &mr[i+1],
806 (nr_range - 1 - i) * sizeof (struct map_range));
807 mr[i--].start = old_start;
808 nr_range--;
809 }
810
811 for (i = 0; i < nr_range; i++)
812 printk(KERN_DEBUG " %010lx - %010lx page %s\n",
813 mr[i].start, mr[i].end,
814 (mr[i].page_size_mask & (1<<PG_LEVEL_1G))?"1G":(
815 (mr[i].page_size_mask & (1<<PG_LEVEL_2M))?"2M":"4k"));
816
817 if (!after_bootmem)
818 find_early_table_space(end, use_pse, use_gbpages);
819
820 for (i = 0; i < nr_range; i++)
821 last_map_addr = kernel_physical_mapping_init(
822 mr[i].start, mr[i].end,
823 mr[i].page_size_mask);
824
825 if (!after_bootmem)
826 mmu_cr4_features = read_cr4();
827 __flush_tlb_all();
828
829 if (!after_bootmem && table_end > table_start)
830 reserve_early(table_start << PAGE_SHIFT,
831 table_end << PAGE_SHIFT, "PGTABLE");
832
833 printk(KERN_INFO "last_map_addr: %lx end: %lx\n",
834 last_map_addr, end);
835
836 if (!after_bootmem)
837 early_memtest(start, end);
838
839 return last_map_addr >> PAGE_SHIFT;
840}
841
842#ifndef CONFIG_NUMA 613#ifndef CONFIG_NUMA
843void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn) 614void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn)
844{ 615{
@@ -910,28 +681,6 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
910 681
911#endif /* CONFIG_MEMORY_HOTPLUG */ 682#endif /* CONFIG_MEMORY_HOTPLUG */
912 683
913/*
914 * devmem_is_allowed() checks to see if /dev/mem access to a certain address
915 * is valid. The argument is a physical page number.
916 *
917 *
918 * On x86, access has to be given to the first megabyte of ram because that area
919 * contains bios code and data regions used by X and dosemu and similar apps.
920 * Access has to be given to non-kernel-ram areas as well, these contain the PCI
921 * mmio resources as well as potential bios/acpi data regions.
922 */
923int devmem_is_allowed(unsigned long pagenr)
924{
925 if (pagenr <= 256)
926 return 1;
927 if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
928 return 0;
929 if (!page_is_ram(pagenr))
930 return 1;
931 return 0;
932}
933
934
935static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, 684static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel,
936 kcore_modules, kcore_vsyscall; 685 kcore_modules, kcore_vsyscall;
937 686
@@ -985,21 +734,48 @@ void __init mem_init(void)
985const int rodata_test_data = 0xC3; 734const int rodata_test_data = 0xC3;
986EXPORT_SYMBOL_GPL(rodata_test_data); 735EXPORT_SYMBOL_GPL(rodata_test_data);
987 736
737static int kernel_set_to_readonly;
738
739void set_kernel_text_rw(void)
740{
741 unsigned long start = PFN_ALIGN(_stext);
742 unsigned long end = PFN_ALIGN(__start_rodata);
743
744 if (!kernel_set_to_readonly)
745 return;
746
747 pr_debug("Set kernel text: %lx - %lx for read write\n",
748 start, end);
749
750 set_memory_rw(start, (end - start) >> PAGE_SHIFT);
751}
752
753void set_kernel_text_ro(void)
754{
755 unsigned long start = PFN_ALIGN(_stext);
756 unsigned long end = PFN_ALIGN(__start_rodata);
757
758 if (!kernel_set_to_readonly)
759 return;
760
761 pr_debug("Set kernel text: %lx - %lx for read only\n",
762 start, end);
763
764 set_memory_ro(start, (end - start) >> PAGE_SHIFT);
765}
766
988void mark_rodata_ro(void) 767void mark_rodata_ro(void)
989{ 768{
990 unsigned long start = PFN_ALIGN(_stext), end = PFN_ALIGN(__end_rodata); 769 unsigned long start = PFN_ALIGN(_stext), end = PFN_ALIGN(__end_rodata);
991 unsigned long rodata_start = 770 unsigned long rodata_start =
992 ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK; 771 ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
993 772
994#ifdef CONFIG_DYNAMIC_FTRACE
995 /* Dynamic tracing modifies the kernel text section */
996 start = rodata_start;
997#endif
998
999 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", 773 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
1000 (end - start) >> 10); 774 (end - start) >> 10);
1001 set_memory_ro(start, (end - start) >> PAGE_SHIFT); 775 set_memory_ro(start, (end - start) >> PAGE_SHIFT);
1002 776
777 kernel_set_to_readonly = 1;
778
1003 /* 779 /*
1004 * The rodata section (but not the kernel text!) should also be 780 * The rodata section (but not the kernel text!) should also be
1005 * not-executable. 781 * not-executable.
@@ -1019,13 +795,6 @@ void mark_rodata_ro(void)
1019 795
1020#endif 796#endif
1021 797
1022#ifdef CONFIG_BLK_DEV_INITRD
1023void free_initrd_mem(unsigned long start, unsigned long end)
1024{
1025 free_init_pages("initrd memory", start, end);
1026}
1027#endif
1028
1029int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, 798int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
1030 int flags) 799 int flags)
1031{ 800{
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index b6a61f3d7ef8..fe6f84ca121e 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -19,10 +19,11 @@
19#include <asm/iomap.h> 19#include <asm/iomap.h>
20#include <asm/pat.h> 20#include <asm/pat.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/highmem.h>
22 23
23int is_io_mapping_possible(resource_size_t base, unsigned long size) 24int is_io_mapping_possible(resource_size_t base, unsigned long size)
24{ 25{
25#ifndef CONFIG_X86_PAE 26#if !defined(CONFIG_X86_PAE) && defined(CONFIG_PHYS_ADDR_T_64BIT)
26 /* There is no way to map greater than 1 << 32 address without PAE */ 27 /* There is no way to map greater than 1 << 32 address without PAE */
27 if (base + size > 0x100000000ULL) 28 if (base + size > 0x100000000ULL)
28 return 0; 29 return 0;
@@ -31,16 +32,28 @@ int is_io_mapping_possible(resource_size_t base, unsigned long size)
31} 32}
32EXPORT_SYMBOL_GPL(is_io_mapping_possible); 33EXPORT_SYMBOL_GPL(is_io_mapping_possible);
33 34
34/* Map 'pfn' using fixed map 'type' and protections 'prot' 35void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
35 */
36void *
37iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
38{ 36{
39 enum fixed_addresses idx; 37 enum fixed_addresses idx;
40 unsigned long vaddr; 38 unsigned long vaddr;
41 39
42 pagefault_disable(); 40 pagefault_disable();
43 41
42 debug_kmap_atomic(type);
43 idx = type + KM_TYPE_NR * smp_processor_id();
44 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
45 set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
46 arch_flush_lazy_mmu_mode();
47
48 return (void *)vaddr;
49}
50
51/*
52 * Map 'pfn' using fixed map 'type' and protections 'prot'
53 */
54void *
55iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
56{
44 /* 57 /*
45 * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS. 58 * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
46 * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the 59 * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
@@ -50,12 +63,7 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
50 if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) 63 if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
51 prot = PAGE_KERNEL_UC_MINUS; 64 prot = PAGE_KERNEL_UC_MINUS;
52 65
53 idx = type + KM_TYPE_NR*smp_processor_id(); 66 return kmap_atomic_prot_pfn(pfn, type, prot);
54 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
55 set_pte(kmap_pte-idx, pfn_pte(pfn, prot));
56 arch_flush_lazy_mmu_mode();
57
58 return (void*) vaddr;
59} 67}
60EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); 68EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);
61 69
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 433f7bd4648a..0dfa09d69e80 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -22,13 +22,17 @@
22#include <asm/pgalloc.h> 22#include <asm/pgalloc.h>
23#include <asm/pat.h> 23#include <asm/pat.h>
24 24
25#ifdef CONFIG_X86_64 25static inline int phys_addr_valid(resource_size_t addr)
26
27static inline int phys_addr_valid(unsigned long addr)
28{ 26{
29 return addr < (1UL << boot_cpu_data.x86_phys_bits); 27#ifdef CONFIG_PHYS_ADDR_T_64BIT
28 return !(addr >> boot_cpu_data.x86_phys_bits);
29#else
30 return 1;
31#endif
30} 32}
31 33
34#ifdef CONFIG_X86_64
35
32unsigned long __phys_addr(unsigned long x) 36unsigned long __phys_addr(unsigned long x)
33{ 37{
34 if (x >= __START_KERNEL_map) { 38 if (x >= __START_KERNEL_map) {
@@ -38,8 +42,7 @@ unsigned long __phys_addr(unsigned long x)
38 } else { 42 } else {
39 VIRTUAL_BUG_ON(x < PAGE_OFFSET); 43 VIRTUAL_BUG_ON(x < PAGE_OFFSET);
40 x -= PAGE_OFFSET; 44 x -= PAGE_OFFSET;
41 VIRTUAL_BUG_ON(system_state == SYSTEM_BOOTING ? x > MAXMEM : 45 VIRTUAL_BUG_ON(!phys_addr_valid(x));
42 !phys_addr_valid(x));
43 } 46 }
44 return x; 47 return x;
45} 48}
@@ -56,10 +59,8 @@ bool __virt_addr_valid(unsigned long x)
56 if (x < PAGE_OFFSET) 59 if (x < PAGE_OFFSET)
57 return false; 60 return false;
58 x -= PAGE_OFFSET; 61 x -= PAGE_OFFSET;
59 if (system_state == SYSTEM_BOOTING ? 62 if (!phys_addr_valid(x))
60 x > MAXMEM : !phys_addr_valid(x)) {
61 return false; 63 return false;
62 }
63 } 64 }
64 65
65 return pfn_valid(x >> PAGE_SHIFT); 66 return pfn_valid(x >> PAGE_SHIFT);
@@ -68,18 +69,12 @@ EXPORT_SYMBOL(__virt_addr_valid);
68 69
69#else 70#else
70 71
71static inline int phys_addr_valid(unsigned long addr)
72{
73 return 1;
74}
75
76#ifdef CONFIG_DEBUG_VIRTUAL 72#ifdef CONFIG_DEBUG_VIRTUAL
77unsigned long __phys_addr(unsigned long x) 73unsigned long __phys_addr(unsigned long x)
78{ 74{
79 /* VMALLOC_* aren't constants; not available at the boot time */ 75 /* VMALLOC_* aren't constants */
80 VIRTUAL_BUG_ON(x < PAGE_OFFSET); 76 VIRTUAL_BUG_ON(x < PAGE_OFFSET);
81 VIRTUAL_BUG_ON(system_state != SYSTEM_BOOTING && 77 VIRTUAL_BUG_ON(__vmalloc_start_set && is_vmalloc_addr((void *) x));
82 is_vmalloc_addr((void *) x));
83 return x - PAGE_OFFSET; 78 return x - PAGE_OFFSET;
84} 79}
85EXPORT_SYMBOL(__phys_addr); 80EXPORT_SYMBOL(__phys_addr);
@@ -89,7 +84,9 @@ bool __virt_addr_valid(unsigned long x)
89{ 84{
90 if (x < PAGE_OFFSET) 85 if (x < PAGE_OFFSET)
91 return false; 86 return false;
92 if (system_state != SYSTEM_BOOTING && is_vmalloc_addr((void *) x)) 87 if (__vmalloc_start_set && is_vmalloc_addr((void *) x))
88 return false;
89 if (x >= FIXADDR_START)
93 return false; 90 return false;
94 return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT); 91 return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT);
95} 92}
@@ -508,13 +505,19 @@ static inline pte_t * __init early_ioremap_pte(unsigned long addr)
508 return &bm_pte[pte_index(addr)]; 505 return &bm_pte[pte_index(addr)];
509} 506}
510 507
508static unsigned long slot_virt[FIX_BTMAPS_SLOTS] __initdata;
509
511void __init early_ioremap_init(void) 510void __init early_ioremap_init(void)
512{ 511{
513 pmd_t *pmd; 512 pmd_t *pmd;
513 int i;
514 514
515 if (early_ioremap_debug) 515 if (early_ioremap_debug)
516 printk(KERN_INFO "early_ioremap_init()\n"); 516 printk(KERN_INFO "early_ioremap_init()\n");
517 517
518 for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
519 slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
520
518 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); 521 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
519 memset(bm_pte, 0, sizeof(bm_pte)); 522 memset(bm_pte, 0, sizeof(bm_pte));
520 pmd_populate_kernel(&init_mm, pmd, bm_pte); 523 pmd_populate_kernel(&init_mm, pmd, bm_pte);
@@ -581,6 +584,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
581 584
582static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; 585static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata;
583static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; 586static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata;
587
584static int __init check_early_ioremap_leak(void) 588static int __init check_early_ioremap_leak(void)
585{ 589{
586 int count = 0; 590 int count = 0;
@@ -602,7 +606,8 @@ static int __init check_early_ioremap_leak(void)
602} 606}
603late_initcall(check_early_ioremap_leak); 607late_initcall(check_early_ioremap_leak);
604 608
605static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot) 609static void __init __iomem *
610__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot)
606{ 611{
607 unsigned long offset, last_addr; 612 unsigned long offset, last_addr;
608 unsigned int nrpages; 613 unsigned int nrpages;
@@ -668,9 +673,9 @@ static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned lo
668 --nrpages; 673 --nrpages;
669 } 674 }
670 if (early_ioremap_debug) 675 if (early_ioremap_debug)
671 printk(KERN_CONT "%08lx + %08lx\n", offset, fix_to_virt(idx0)); 676 printk(KERN_CONT "%08lx + %08lx\n", offset, slot_virt[slot]);
672 677
673 prev_map[slot] = (void __iomem *)(offset + fix_to_virt(idx0)); 678 prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]);
674 return prev_map[slot]; 679 return prev_map[slot];
675} 680}
676 681
@@ -738,8 +743,3 @@ void __init early_iounmap(void __iomem *addr, unsigned long size)
738 } 743 }
739 prev_map[slot] = NULL; 744 prev_map[slot] = NULL;
740} 745}
741
742void __this_fixmap_does_not_exist(void)
743{
744 WARN_ON(1);
745}
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 6a518dd08a36..4f115e00486b 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -310,7 +310,7 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
310 struct kmmio_context *ctx = &get_cpu_var(kmmio_ctx); 310 struct kmmio_context *ctx = &get_cpu_var(kmmio_ctx);
311 311
312 if (!ctx->active) { 312 if (!ctx->active) {
313 pr_warning("kmmio: spurious debug trap on CPU %d.\n", 313 pr_debug("kmmio: spurious debug trap on CPU %d.\n",
314 smp_processor_id()); 314 smp_processor_id());
315 goto out; 315 goto out;
316 } 316 }
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 0bcd7883d036..605c8be06217 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -100,6 +100,9 @@ static int __init parse_memtest(char *arg)
100{ 100{
101 if (arg) 101 if (arg)
102 memtest_pattern = simple_strtoul(arg, NULL, 0); 102 memtest_pattern = simple_strtoul(arg, NULL, 0);
103 else
104 memtest_pattern = ARRAY_SIZE(patterns);
105
103 return 0; 106 return 0;
104} 107}
105 108
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 2c4baa88f2cb..c9342ed8b402 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -378,27 +378,34 @@ static void clear_trace_list(void)
378} 378}
379 379
380#ifdef CONFIG_HOTPLUG_CPU 380#ifdef CONFIG_HOTPLUG_CPU
381static cpumask_t downed_cpus; 381static cpumask_var_t downed_cpus;
382 382
383static void enter_uniprocessor(void) 383static void enter_uniprocessor(void)
384{ 384{
385 int cpu; 385 int cpu;
386 int err; 386 int err;
387 387
388 if (downed_cpus == NULL &&
389 !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) {
390 pr_notice(NAME "Failed to allocate mask\n");
391 goto out;
392 }
393
388 get_online_cpus(); 394 get_online_cpus();
389 downed_cpus = cpu_online_map; 395 cpumask_copy(downed_cpus, cpu_online_mask);
390 cpu_clear(first_cpu(cpu_online_map), downed_cpus); 396 cpumask_clear_cpu(cpumask_first(cpu_online_mask), downed_cpus);
391 if (num_online_cpus() > 1) 397 if (num_online_cpus() > 1)
392 pr_notice(NAME "Disabling non-boot CPUs...\n"); 398 pr_notice(NAME "Disabling non-boot CPUs...\n");
393 put_online_cpus(); 399 put_online_cpus();
394 400
395 for_each_cpu_mask(cpu, downed_cpus) { 401 for_each_cpu(cpu, downed_cpus) {
396 err = cpu_down(cpu); 402 err = cpu_down(cpu);
397 if (!err) 403 if (!err)
398 pr_info(NAME "CPU%d is down.\n", cpu); 404 pr_info(NAME "CPU%d is down.\n", cpu);
399 else 405 else
400 pr_err(NAME "Error taking CPU%d down: %d\n", cpu, err); 406 pr_err(NAME "Error taking CPU%d down: %d\n", cpu, err);
401 } 407 }
408out:
402 if (num_online_cpus() > 1) 409 if (num_online_cpus() > 1)
403 pr_warning(NAME "multiple CPUs still online, " 410 pr_warning(NAME "multiple CPUs still online, "
404 "may miss events.\n"); 411 "may miss events.\n");
@@ -411,10 +418,10 @@ static void __ref leave_uniprocessor(void)
411 int cpu; 418 int cpu;
412 int err; 419 int err;
413 420
414 if (cpus_weight(downed_cpus) == 0) 421 if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0)
415 return; 422 return;
416 pr_notice(NAME "Re-enabling CPUs...\n"); 423 pr_notice(NAME "Re-enabling CPUs...\n");
417 for_each_cpu_mask(cpu, downed_cpus) { 424 for_each_cpu(cpu, downed_cpus) {
418 err = cpu_up(cpu); 425 err = cpu_up(cpu);
419 if (!err) 426 if (!err)
420 pr_info(NAME "enabled CPU%d.\n", cpu); 427 pr_info(NAME "enabled CPU%d.\n", cpu);
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
new file mode 100644
index 000000000000..550df481accd
--- /dev/null
+++ b/arch/x86/mm/numa.c
@@ -0,0 +1,67 @@
1/* Common code for 32 and 64-bit NUMA */
2#include <linux/topology.h>
3#include <linux/module.h>
4#include <linux/bootmem.h>
5
6#ifdef CONFIG_DEBUG_PER_CPU_MAPS
7# define DBG(x...) printk(KERN_DEBUG x)
8#else
9# define DBG(x...)
10#endif
11
12/*
13 * Which logical CPUs are on which nodes
14 */
15cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
16EXPORT_SYMBOL(node_to_cpumask_map);
17
18/*
19 * Allocate node_to_cpumask_map based on number of available nodes
20 * Requires node_possible_map to be valid.
21 *
22 * Note: node_to_cpumask() is not valid until after this is done.
23 * (Use CONFIG_DEBUG_PER_CPU_MAPS to check this.)
24 */
25void __init setup_node_to_cpumask_map(void)
26{
27 unsigned int node, num = 0;
28
29 /* setup nr_node_ids if not done yet */
30 if (nr_node_ids == MAX_NUMNODES) {
31 for_each_node_mask(node, node_possible_map)
32 num = node;
33 nr_node_ids = num + 1;
34 }
35
36 /* allocate the map */
37 for (node = 0; node < nr_node_ids; node++)
38 alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]);
39
40 /* cpumask_of_node() will now work */
41 pr_debug("Node to cpumask map for %d nodes\n", nr_node_ids);
42}
43
44#ifdef CONFIG_DEBUG_PER_CPU_MAPS
45/*
46 * Returns a pointer to the bitmask of CPUs on Node 'node'.
47 */
48const struct cpumask *cpumask_of_node(int node)
49{
50 if (node >= nr_node_ids) {
51 printk(KERN_WARNING
52 "cpumask_of_node(%d): node > nr_node_ids(%d)\n",
53 node, nr_node_ids);
54 dump_stack();
55 return cpu_none_mask;
56 }
57 if (node_to_cpumask_map[node] == NULL) {
58 printk(KERN_WARNING
59 "cpumask_of_node(%d): no node_to_cpumask_map!\n",
60 node);
61 dump_stack();
62 return cpu_online_mask;
63 }
64 return node_to_cpumask_map[node];
65}
66EXPORT_SYMBOL(cpumask_of_node);
67#endif
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index 451fe95a0352..3daefa04ace5 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -416,10 +416,11 @@ void __init initmem_init(unsigned long start_pfn,
416 for_each_online_node(nid) 416 for_each_online_node(nid)
417 propagate_e820_map_node(nid); 417 propagate_e820_map_node(nid);
418 418
419 for_each_online_node(nid) 419 for_each_online_node(nid) {
420 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 420 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
421 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
422 }
421 423
422 NODE_DATA(0)->bdata = &bootmem_node_data[0];
423 setup_bootmem_allocator(); 424 setup_bootmem_allocator();
424} 425}
425 426
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 64c9cf043cdd..d73aaa892371 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -20,12 +20,6 @@
20#include <asm/acpi.h> 20#include <asm/acpi.h>
21#include <asm/k8.h> 21#include <asm/k8.h>
22 22
23#ifdef CONFIG_DEBUG_PER_CPU_MAPS
24# define DBG(x...) printk(KERN_DEBUG x)
25#else
26# define DBG(x...)
27#endif
28
29struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 23struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
30EXPORT_SYMBOL(node_data); 24EXPORT_SYMBOL(node_data);
31 25
@@ -49,12 +43,6 @@ DEFINE_EARLY_PER_CPU(int, x86_cpu_to_node_map, NUMA_NO_NODE);
49EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_node_map); 43EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_node_map);
50 44
51/* 45/*
52 * Which logical CPUs are on which nodes
53 */
54cpumask_t *node_to_cpumask_map;
55EXPORT_SYMBOL(node_to_cpumask_map);
56
57/*
58 * Given a shift value, try to populate memnodemap[] 46 * Given a shift value, try to populate memnodemap[]
59 * Returns : 47 * Returns :
60 * 1 if OK 48 * 1 if OK
@@ -661,36 +649,6 @@ void __init init_cpu_to_node(void)
661#endif 649#endif
662 650
663 651
664/*
665 * Allocate node_to_cpumask_map based on number of available nodes
666 * Requires node_possible_map to be valid.
667 *
668 * Note: node_to_cpumask() is not valid until after this is done.
669 * (Use CONFIG_DEBUG_PER_CPU_MAPS to check this.)
670 */
671void __init setup_node_to_cpumask_map(void)
672{
673 unsigned int node, num = 0;
674 cpumask_t *map;
675
676 /* setup nr_node_ids if not done yet */
677 if (nr_node_ids == MAX_NUMNODES) {
678 for_each_node_mask(node, node_possible_map)
679 num = node;
680 nr_node_ids = num + 1;
681 }
682
683 /* allocate the map */
684 map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t));
685 DBG("node_to_cpumask_map at %p for %d nodes\n", map, nr_node_ids);
686
687 pr_debug("Node to cpumask map at %p for %d nodes\n",
688 map, nr_node_ids);
689
690 /* node_to_cpumask() will now work */
691 node_to_cpumask_map = map;
692}
693
694void __cpuinit numa_set_node(int cpu, int node) 652void __cpuinit numa_set_node(int cpu, int node)
695{ 653{
696 int *cpu_to_node_map = early_per_cpu_ptr(x86_cpu_to_node_map); 654 int *cpu_to_node_map = early_per_cpu_ptr(x86_cpu_to_node_map);
@@ -723,12 +681,12 @@ void __cpuinit numa_clear_node(int cpu)
723 681
724void __cpuinit numa_add_cpu(int cpu) 682void __cpuinit numa_add_cpu(int cpu)
725{ 683{
726 cpu_set(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); 684 cpumask_set_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
727} 685}
728 686
729void __cpuinit numa_remove_cpu(int cpu) 687void __cpuinit numa_remove_cpu(int cpu)
730{ 688{
731 cpu_clear(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); 689 cpumask_clear_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
732} 690}
733 691
734#else /* CONFIG_DEBUG_PER_CPU_MAPS */ 692#else /* CONFIG_DEBUG_PER_CPU_MAPS */
@@ -739,20 +697,20 @@ void __cpuinit numa_remove_cpu(int cpu)
739static void __cpuinit numa_set_cpumask(int cpu, int enable) 697static void __cpuinit numa_set_cpumask(int cpu, int enable)
740{ 698{
741 int node = early_cpu_to_node(cpu); 699 int node = early_cpu_to_node(cpu);
742 cpumask_t *mask; 700 struct cpumask *mask;
743 char buf[64]; 701 char buf[64];
744 702
745 if (node_to_cpumask_map == NULL) { 703 mask = node_to_cpumask_map[node];
746 printk(KERN_ERR "node_to_cpumask_map NULL\n"); 704 if (mask == NULL) {
705 printk(KERN_ERR "node_to_cpumask_map[%i] NULL\n", node);
747 dump_stack(); 706 dump_stack();
748 return; 707 return;
749 } 708 }
750 709
751 mask = &node_to_cpumask_map[node];
752 if (enable) 710 if (enable)
753 cpu_set(cpu, *mask); 711 cpumask_set_cpu(cpu, mask);
754 else 712 else
755 cpu_clear(cpu, *mask); 713 cpumask_clear_cpu(cpu, mask);
756 714
757 cpulist_scnprintf(buf, sizeof(buf), mask); 715 cpulist_scnprintf(buf, sizeof(buf), mask);
758 printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", 716 printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
@@ -799,59 +757,6 @@ int early_cpu_to_node(int cpu)
799 return per_cpu(x86_cpu_to_node_map, cpu); 757 return per_cpu(x86_cpu_to_node_map, cpu);
800} 758}
801 759
802
803/* empty cpumask */
804static const cpumask_t cpu_mask_none;
805
806/*
807 * Returns a pointer to the bitmask of CPUs on Node 'node'.
808 */
809const cpumask_t *cpumask_of_node(int node)
810{
811 if (node_to_cpumask_map == NULL) {
812 printk(KERN_WARNING
813 "cpumask_of_node(%d): no node_to_cpumask_map!\n",
814 node);
815 dump_stack();
816 return (const cpumask_t *)&cpu_online_map;
817 }
818 if (node >= nr_node_ids) {
819 printk(KERN_WARNING
820 "cpumask_of_node(%d): node > nr_node_ids(%d)\n",
821 node, nr_node_ids);
822 dump_stack();
823 return &cpu_mask_none;
824 }
825 return &node_to_cpumask_map[node];
826}
827EXPORT_SYMBOL(cpumask_of_node);
828
829/*
830 * Returns a bitmask of CPUs on Node 'node'.
831 *
832 * Side note: this function creates the returned cpumask on the stack
833 * so with a high NR_CPUS count, excessive stack space is used. The
834 * node_to_cpumask_ptr function should be used whenever possible.
835 */
836cpumask_t node_to_cpumask(int node)
837{
838 if (node_to_cpumask_map == NULL) {
839 printk(KERN_WARNING
840 "node_to_cpumask(%d): no node_to_cpumask_map!\n", node);
841 dump_stack();
842 return cpu_online_map;
843 }
844 if (node >= nr_node_ids) {
845 printk(KERN_WARNING
846 "node_to_cpumask(%d): node > nr_node_ids(%d)\n",
847 node, nr_node_ids);
848 dump_stack();
849 return cpu_mask_none;
850 }
851 return node_to_cpumask_map[node];
852}
853EXPORT_SYMBOL(node_to_cpumask);
854
855/* 760/*
856 * --------- end of debug versions of the numa functions --------- 761 * --------- end of debug versions of the numa functions ---------
857 */ 762 */
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 9015e5e412b5..660cac75ae11 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -16,6 +16,7 @@
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/tlbflush.h> 17#include <asm/tlbflush.h>
18#include <asm/sections.h> 18#include <asm/sections.h>
19#include <asm/setup.h>
19#include <asm/uaccess.h> 20#include <asm/uaccess.h>
20#include <asm/pgalloc.h> 21#include <asm/pgalloc.h>
21#include <asm/proto.h> 22#include <asm/proto.h>
@@ -33,6 +34,7 @@ struct cpa_data {
33 unsigned long pfn; 34 unsigned long pfn;
34 unsigned force_split : 1; 35 unsigned force_split : 1;
35 int curpage; 36 int curpage;
37 struct page **pages;
36}; 38};
37 39
38/* 40/*
@@ -45,6 +47,7 @@ static DEFINE_SPINLOCK(cpa_lock);
45 47
46#define CPA_FLUSHTLB 1 48#define CPA_FLUSHTLB 1
47#define CPA_ARRAY 2 49#define CPA_ARRAY 2
50#define CPA_PAGES_ARRAY 4
48 51
49#ifdef CONFIG_PROC_FS 52#ifdef CONFIG_PROC_FS
50static unsigned long direct_pages_count[PG_LEVEL_NUM]; 53static unsigned long direct_pages_count[PG_LEVEL_NUM];
@@ -95,7 +98,7 @@ static inline unsigned long highmap_start_pfn(void)
95 98
96static inline unsigned long highmap_end_pfn(void) 99static inline unsigned long highmap_end_pfn(void)
97{ 100{
98 return __pa(roundup((unsigned long)_end, PMD_SIZE)) >> PAGE_SHIFT; 101 return __pa(roundup(_brk_end, PMD_SIZE)) >> PAGE_SHIFT;
99} 102}
100 103
101#endif 104#endif
@@ -201,10 +204,10 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
201 } 204 }
202} 205}
203 206
204static void cpa_flush_array(unsigned long *start, int numpages, int cache) 207static void cpa_flush_array(unsigned long *start, int numpages, int cache,
208 int in_flags, struct page **pages)
205{ 209{
206 unsigned int i, level; 210 unsigned int i, level;
207 unsigned long *addr;
208 211
209 BUG_ON(irqs_disabled()); 212 BUG_ON(irqs_disabled());
210 213
@@ -225,14 +228,22 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache)
225 * will cause all other CPUs to flush the same 228 * will cause all other CPUs to flush the same
226 * cachelines: 229 * cachelines:
227 */ 230 */
228 for (i = 0, addr = start; i < numpages; i++, addr++) { 231 for (i = 0; i < numpages; i++) {
229 pte_t *pte = lookup_address(*addr, &level); 232 unsigned long addr;
233 pte_t *pte;
234
235 if (in_flags & CPA_PAGES_ARRAY)
236 addr = (unsigned long)page_address(pages[i]);
237 else
238 addr = start[i];
239
240 pte = lookup_address(addr, &level);
230 241
231 /* 242 /*
232 * Only flush present addresses: 243 * Only flush present addresses:
233 */ 244 */
234 if (pte && (pte_val(*pte) & _PAGE_PRESENT)) 245 if (pte && (pte_val(*pte) & _PAGE_PRESENT))
235 clflush_cache_range((void *) *addr, PAGE_SIZE); 246 clflush_cache_range((void *)addr, PAGE_SIZE);
236 } 247 }
237} 248}
238 249
@@ -584,7 +595,9 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
584 unsigned int level; 595 unsigned int level;
585 pte_t *kpte, old_pte; 596 pte_t *kpte, old_pte;
586 597
587 if (cpa->flags & CPA_ARRAY) 598 if (cpa->flags & CPA_PAGES_ARRAY)
599 address = (unsigned long)page_address(cpa->pages[cpa->curpage]);
600 else if (cpa->flags & CPA_ARRAY)
588 address = cpa->vaddr[cpa->curpage]; 601 address = cpa->vaddr[cpa->curpage];
589 else 602 else
590 address = *cpa->vaddr; 603 address = *cpa->vaddr;
@@ -687,7 +700,9 @@ static int cpa_process_alias(struct cpa_data *cpa)
687 * No need to redo, when the primary call touched the direct 700 * No need to redo, when the primary call touched the direct
688 * mapping already: 701 * mapping already:
689 */ 702 */
690 if (cpa->flags & CPA_ARRAY) 703 if (cpa->flags & CPA_PAGES_ARRAY)
704 vaddr = (unsigned long)page_address(cpa->pages[cpa->curpage]);
705 else if (cpa->flags & CPA_ARRAY)
691 vaddr = cpa->vaddr[cpa->curpage]; 706 vaddr = cpa->vaddr[cpa->curpage];
692 else 707 else
693 vaddr = *cpa->vaddr; 708 vaddr = *cpa->vaddr;
@@ -698,7 +713,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
698 alias_cpa = *cpa; 713 alias_cpa = *cpa;
699 temp_cpa_vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT); 714 temp_cpa_vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);
700 alias_cpa.vaddr = &temp_cpa_vaddr; 715 alias_cpa.vaddr = &temp_cpa_vaddr;
701 alias_cpa.flags &= ~CPA_ARRAY; 716 alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
702 717
703 718
704 ret = __change_page_attr_set_clr(&alias_cpa, 0); 719 ret = __change_page_attr_set_clr(&alias_cpa, 0);
@@ -711,7 +726,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
711 * No need to redo, when the primary call touched the high 726 * No need to redo, when the primary call touched the high
712 * mapping already: 727 * mapping already:
713 */ 728 */
714 if (within(vaddr, (unsigned long) _text, (unsigned long) _end)) 729 if (within(vaddr, (unsigned long) _text, _brk_end))
715 return 0; 730 return 0;
716 731
717 /* 732 /*
@@ -724,7 +739,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
724 alias_cpa = *cpa; 739 alias_cpa = *cpa;
725 temp_cpa_vaddr = (cpa->pfn << PAGE_SHIFT) + __START_KERNEL_map - phys_base; 740 temp_cpa_vaddr = (cpa->pfn << PAGE_SHIFT) + __START_KERNEL_map - phys_base;
726 alias_cpa.vaddr = &temp_cpa_vaddr; 741 alias_cpa.vaddr = &temp_cpa_vaddr;
727 alias_cpa.flags &= ~CPA_ARRAY; 742 alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
728 743
729 /* 744 /*
730 * The high mapping range is imprecise, so ignore the return value. 745 * The high mapping range is imprecise, so ignore the return value.
@@ -745,7 +760,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
745 */ 760 */
746 cpa->numpages = numpages; 761 cpa->numpages = numpages;
747 /* for array changes, we can't use large page */ 762 /* for array changes, we can't use large page */
748 if (cpa->flags & CPA_ARRAY) 763 if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY))
749 cpa->numpages = 1; 764 cpa->numpages = 1;
750 765
751 if (!debug_pagealloc) 766 if (!debug_pagealloc)
@@ -769,7 +784,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
769 */ 784 */
770 BUG_ON(cpa->numpages > numpages); 785 BUG_ON(cpa->numpages > numpages);
771 numpages -= cpa->numpages; 786 numpages -= cpa->numpages;
772 if (cpa->flags & CPA_ARRAY) 787 if (cpa->flags & (CPA_PAGES_ARRAY | CPA_ARRAY))
773 cpa->curpage++; 788 cpa->curpage++;
774 else 789 else
775 *cpa->vaddr += cpa->numpages * PAGE_SIZE; 790 *cpa->vaddr += cpa->numpages * PAGE_SIZE;
@@ -786,7 +801,8 @@ static inline int cache_attr(pgprot_t attr)
786 801
787static int change_page_attr_set_clr(unsigned long *addr, int numpages, 802static int change_page_attr_set_clr(unsigned long *addr, int numpages,
788 pgprot_t mask_set, pgprot_t mask_clr, 803 pgprot_t mask_set, pgprot_t mask_clr,
789 int force_split, int array) 804 int force_split, int in_flag,
805 struct page **pages)
790{ 806{
791 struct cpa_data cpa; 807 struct cpa_data cpa;
792 int ret, cache, checkalias; 808 int ret, cache, checkalias;
@@ -801,15 +817,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
801 return 0; 817 return 0;
802 818
803 /* Ensure we are PAGE_SIZE aligned */ 819 /* Ensure we are PAGE_SIZE aligned */
804 if (!array) { 820 if (in_flag & CPA_ARRAY) {
805 if (*addr & ~PAGE_MASK) {
806 *addr &= PAGE_MASK;
807 /*
808 * People should not be passing in unaligned addresses:
809 */
810 WARN_ON_ONCE(1);
811 }
812 } else {
813 int i; 821 int i;
814 for (i = 0; i < numpages; i++) { 822 for (i = 0; i < numpages; i++) {
815 if (addr[i] & ~PAGE_MASK) { 823 if (addr[i] & ~PAGE_MASK) {
@@ -817,6 +825,18 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
817 WARN_ON_ONCE(1); 825 WARN_ON_ONCE(1);
818 } 826 }
819 } 827 }
828 } else if (!(in_flag & CPA_PAGES_ARRAY)) {
829 /*
830 * in_flag of CPA_PAGES_ARRAY implies it is aligned.
831 * No need to cehck in that case
832 */
833 if (*addr & ~PAGE_MASK) {
834 *addr &= PAGE_MASK;
835 /*
836 * People should not be passing in unaligned addresses:
837 */
838 WARN_ON_ONCE(1);
839 }
820 } 840 }
821 841
822 /* Must avoid aliasing mappings in the highmem code */ 842 /* Must avoid aliasing mappings in the highmem code */
@@ -825,6 +845,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
825 vm_unmap_aliases(); 845 vm_unmap_aliases();
826 846
827 cpa.vaddr = addr; 847 cpa.vaddr = addr;
848 cpa.pages = pages;
828 cpa.numpages = numpages; 849 cpa.numpages = numpages;
829 cpa.mask_set = mask_set; 850 cpa.mask_set = mask_set;
830 cpa.mask_clr = mask_clr; 851 cpa.mask_clr = mask_clr;
@@ -832,8 +853,8 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
832 cpa.curpage = 0; 853 cpa.curpage = 0;
833 cpa.force_split = force_split; 854 cpa.force_split = force_split;
834 855
835 if (array) 856 if (in_flag & (CPA_ARRAY | CPA_PAGES_ARRAY))
836 cpa.flags |= CPA_ARRAY; 857 cpa.flags |= in_flag;
837 858
838 /* No alias checking for _NX bit modifications */ 859 /* No alias checking for _NX bit modifications */
839 checkalias = (pgprot_val(mask_set) | pgprot_val(mask_clr)) != _PAGE_NX; 860 checkalias = (pgprot_val(mask_set) | pgprot_val(mask_clr)) != _PAGE_NX;
@@ -859,9 +880,10 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
859 * wbindv): 880 * wbindv):
860 */ 881 */
861 if (!ret && cpu_has_clflush) { 882 if (!ret && cpu_has_clflush) {
862 if (cpa.flags & CPA_ARRAY) 883 if (cpa.flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) {
863 cpa_flush_array(addr, numpages, cache); 884 cpa_flush_array(addr, numpages, cache,
864 else 885 cpa.flags, pages);
886 } else
865 cpa_flush_range(*addr, numpages, cache); 887 cpa_flush_range(*addr, numpages, cache);
866 } else 888 } else
867 cpa_flush_all(cache); 889 cpa_flush_all(cache);
@@ -874,14 +896,28 @@ static inline int change_page_attr_set(unsigned long *addr, int numpages,
874 pgprot_t mask, int array) 896 pgprot_t mask, int array)
875{ 897{
876 return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0, 898 return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0,
877 array); 899 (array ? CPA_ARRAY : 0), NULL);
878} 900}
879 901
880static inline int change_page_attr_clear(unsigned long *addr, int numpages, 902static inline int change_page_attr_clear(unsigned long *addr, int numpages,
881 pgprot_t mask, int array) 903 pgprot_t mask, int array)
882{ 904{
883 return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0, 905 return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0,
884 array); 906 (array ? CPA_ARRAY : 0), NULL);
907}
908
909static inline int cpa_set_pages_array(struct page **pages, int numpages,
910 pgprot_t mask)
911{
912 return change_page_attr_set_clr(NULL, numpages, mask, __pgprot(0), 0,
913 CPA_PAGES_ARRAY, pages);
914}
915
916static inline int cpa_clear_pages_array(struct page **pages, int numpages,
917 pgprot_t mask)
918{
919 return change_page_attr_set_clr(NULL, numpages, __pgprot(0), mask, 0,
920 CPA_PAGES_ARRAY, pages);
885} 921}
886 922
887int _set_memory_uc(unsigned long addr, int numpages) 923int _set_memory_uc(unsigned long addr, int numpages)
@@ -1029,7 +1065,7 @@ int set_memory_np(unsigned long addr, int numpages)
1029int set_memory_4k(unsigned long addr, int numpages) 1065int set_memory_4k(unsigned long addr, int numpages)
1030{ 1066{
1031 return change_page_attr_set_clr(&addr, numpages, __pgprot(0), 1067 return change_page_attr_set_clr(&addr, numpages, __pgprot(0),
1032 __pgprot(0), 1, 0); 1068 __pgprot(0), 1, 0, NULL);
1033} 1069}
1034 1070
1035int set_pages_uc(struct page *page, int numpages) 1071int set_pages_uc(struct page *page, int numpages)
@@ -1040,6 +1076,35 @@ int set_pages_uc(struct page *page, int numpages)
1040} 1076}
1041EXPORT_SYMBOL(set_pages_uc); 1077EXPORT_SYMBOL(set_pages_uc);
1042 1078
1079int set_pages_array_uc(struct page **pages, int addrinarray)
1080{
1081 unsigned long start;
1082 unsigned long end;
1083 int i;
1084 int free_idx;
1085
1086 for (i = 0; i < addrinarray; i++) {
1087 start = (unsigned long)page_address(pages[i]);
1088 end = start + PAGE_SIZE;
1089 if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL))
1090 goto err_out;
1091 }
1092
1093 if (cpa_set_pages_array(pages, addrinarray,
1094 __pgprot(_PAGE_CACHE_UC_MINUS)) == 0) {
1095 return 0; /* Success */
1096 }
1097err_out:
1098 free_idx = i;
1099 for (i = 0; i < free_idx; i++) {
1100 start = (unsigned long)page_address(pages[i]);
1101 end = start + PAGE_SIZE;
1102 free_memtype(start, end);
1103 }
1104 return -EINVAL;
1105}
1106EXPORT_SYMBOL(set_pages_array_uc);
1107
1043int set_pages_wb(struct page *page, int numpages) 1108int set_pages_wb(struct page *page, int numpages)
1044{ 1109{
1045 unsigned long addr = (unsigned long)page_address(page); 1110 unsigned long addr = (unsigned long)page_address(page);
@@ -1048,6 +1113,26 @@ int set_pages_wb(struct page *page, int numpages)
1048} 1113}
1049EXPORT_SYMBOL(set_pages_wb); 1114EXPORT_SYMBOL(set_pages_wb);
1050 1115
1116int set_pages_array_wb(struct page **pages, int addrinarray)
1117{
1118 int retval;
1119 unsigned long start;
1120 unsigned long end;
1121 int i;
1122
1123 retval = cpa_clear_pages_array(pages, addrinarray,
1124 __pgprot(_PAGE_CACHE_MASK));
1125
1126 for (i = 0; i < addrinarray; i++) {
1127 start = (unsigned long)page_address(pages[i]);
1128 end = start + PAGE_SIZE;
1129 free_memtype(start, end);
1130 }
1131
1132 return retval;
1133}
1134EXPORT_SYMBOL(set_pages_array_wb);
1135
1051int set_pages_x(struct page *page, int numpages) 1136int set_pages_x(struct page *page, int numpages)
1052{ 1137{
1053 unsigned long addr = (unsigned long)page_address(page); 1138 unsigned long addr = (unsigned long)page_address(page);
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 2ed37158012d..640339ee4fb2 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -677,10 +677,11 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
677 is_ram = pat_pagerange_is_ram(paddr, paddr + size); 677 is_ram = pat_pagerange_is_ram(paddr, paddr + size);
678 678
679 /* 679 /*
680 * reserve_pfn_range() doesn't support RAM pages. 680 * reserve_pfn_range() doesn't support RAM pages. Maintain the current
681 * behavior with RAM pages by returning success.
681 */ 682 */
682 if (is_ram != 0) 683 if (is_ram != 0)
683 return -EINVAL; 684 return 0;
684 685
685 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); 686 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags);
686 if (ret) 687 if (ret)
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index f2e477c91c1b..46c8834aedc0 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -50,7 +50,7 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pteval)
50 } 50 }
51 pte = pte_offset_kernel(pmd, vaddr); 51 pte = pte_offset_kernel(pmd, vaddr);
52 if (pte_val(pteval)) 52 if (pte_val(pteval))
53 set_pte_present(&init_mm, vaddr, pte, pteval); 53 set_pte_at(&init_mm, vaddr, pte, pteval);
54 else 54 else
55 pte_clear(&init_mm, vaddr, pte); 55 pte_clear(&init_mm, vaddr, pte);
56 56
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 574c8bc95ef0..c7d272b8574c 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -116,6 +116,36 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
116 reserve_early(phys, phys + length, "ACPI SLIT"); 116 reserve_early(phys, phys + length, "ACPI SLIT");
117} 117}
118 118
119/* Callback for Proximity Domain -> x2APIC mapping */
120void __init
121acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
122{
123 int pxm, node;
124 int apic_id;
125
126 if (srat_disabled())
127 return;
128 if (pa->header.length < sizeof(struct acpi_srat_x2apic_cpu_affinity)) {
129 bad_srat();
130 return;
131 }
132 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
133 return;
134 pxm = pa->proximity_domain;
135 node = setup_node(pxm);
136 if (node < 0) {
137 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
138 bad_srat();
139 return;
140 }
141
142 apic_id = pa->apic_id;
143 apicid_to_node[apic_id] = node;
144 acpi_numa = 1;
145 printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
146 pxm, apic_id, node);
147}
148
119/* Callback for Proximity Domain -> LAPIC mapping */ 149/* Callback for Proximity Domain -> LAPIC mapping */
120void __init 150void __init
121acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) 151acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index a654d59e4483..821e97017e95 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -187,11 +187,6 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask,
187 cpumask, cpumask_of(smp_processor_id())); 187 cpumask, cpumask_of(smp_processor_id()));
188 188
189 /* 189 /*
190 * Make the above memory operations globally visible before
191 * sending the IPI.
192 */
193 smp_mb();
194 /*
195 * We have to send the IPI only to 190 * We have to send the IPI only to
196 * CPUs affected. 191 * CPUs affected.
197 */ 192 */
diff --git a/arch/x86/oprofile/op_model_p4.c b/arch/x86/oprofile/op_model_p4.c
index 4c4a51c90bc2..819b131fd752 100644
--- a/arch/x86/oprofile/op_model_p4.c
+++ b/arch/x86/oprofile/op_model_p4.c
@@ -380,7 +380,7 @@ static unsigned int get_stagger(void)
380{ 380{
381#ifdef CONFIG_SMP 381#ifdef CONFIG_SMP
382 int cpu = smp_processor_id(); 382 int cpu = smp_processor_id();
383 return (cpu != first_cpu(per_cpu(cpu_sibling_map, cpu))); 383 return cpu != cpumask_first(__get_cpu_var(cpu_sibling_map));
384#endif 384#endif
385 return 0; 385 return 0;
386} 386}
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 82d22fc601ae..8c362b96b644 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -90,7 +90,7 @@ static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
90 return 0; 90 return 0;
91} 91}
92 92
93static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = { 93static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitconst = {
94/* 94/*
95 * Systems where PCI IO resource ISA alignment can be skipped 95 * Systems where PCI IO resource ISA alignment can be skipped
96 * when the ISA enable bit in the bridge control is not set 96 * when the ISA enable bit in the bridge control is not set
@@ -183,7 +183,7 @@ static int __devinit assign_all_busses(const struct dmi_system_id *d)
183} 183}
184#endif 184#endif
185 185
186static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { 186static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
187#ifdef __i386__ 187#ifdef __i386__
188/* 188/*
189 * Laptops which need pci=assign-busses to see Cardbus cards 189 * Laptops which need pci=assign-busses to see Cardbus cards
diff --git a/arch/x86/pci/early.c b/arch/x86/pci/early.c
index f6adf2c6d751..aaf26ae58cd5 100644
--- a/arch/x86/pci/early.c
+++ b/arch/x86/pci/early.c
@@ -69,11 +69,12 @@ void early_dump_pci_device(u8 bus, u8 slot, u8 func)
69 int j; 69 int j;
70 u32 val; 70 u32 val;
71 71
72 printk(KERN_INFO "PCI: %02x:%02x:%02x", bus, slot, func); 72 printk(KERN_INFO "pci 0000:%02x:%02x.%d config space:",
73 bus, slot, func);
73 74
74 for (i = 0; i < 256; i += 4) { 75 for (i = 0; i < 256; i += 4) {
75 if (!(i & 0x0f)) 76 if (!(i & 0x0f))
76 printk("\n%04x:",i); 77 printk("\n %02x:",i);
77 78
78 val = read_pci_config(bus, slot, func, i); 79 val = read_pci_config(bus, slot, func, i);
79 for (j = 0; j < 4; j++) { 80 for (j = 0; j < 4; j++) {
@@ -96,20 +97,22 @@ void early_dump_pci_devices(void)
96 for (func = 0; func < 8; func++) { 97 for (func = 0; func < 8; func++) {
97 u32 class; 98 u32 class;
98 u8 type; 99 u8 type;
100
99 class = read_pci_config(bus, slot, func, 101 class = read_pci_config(bus, slot, func,
100 PCI_CLASS_REVISION); 102 PCI_CLASS_REVISION);
101 if (class == 0xffffffff) 103 if (class == 0xffffffff)
102 break; 104 continue;
103 105
104 early_dump_pci_device(bus, slot, func); 106 early_dump_pci_device(bus, slot, func);
105 107
106 /* No multi-function device? */ 108 if (func == 0) {
107 type = read_pci_config_byte(bus, slot, func, 109 type = read_pci_config_byte(bus, slot,
110 func,
108 PCI_HEADER_TYPE); 111 PCI_HEADER_TYPE);
109 if (!(type & 0x80)) 112 if (!(type & 0x80))
110 break; 113 break;
114 }
111 } 115 }
112 } 116 }
113 } 117 }
114} 118}
115
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 7d388d5cf548..6dd89555fbfa 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -356,7 +356,7 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)
356DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); 356DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video);
357 357
358 358
359static struct dmi_system_id __devinitdata msi_k8t_dmi_table[] = { 359static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = {
360 { 360 {
361 .ident = "MSI-K8T-Neo2Fir", 361 .ident = "MSI-K8T-Neo2Fir",
362 .matches = { 362 .matches = {
@@ -413,7 +413,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
413 */ 413 */
414static u16 toshiba_line_size; 414static u16 toshiba_line_size;
415 415
416static struct dmi_system_id __devinitdata toshiba_ohci1394_dmi_table[] = { 416static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = {
417 { 417 {
418 .ident = "Toshiba PS5 based laptop", 418 .ident = "Toshiba PS5 based laptop",
419 .matches = { 419 .matches = {
@@ -495,26 +495,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015,
495 pci_siemens_interrupt_controller); 495 pci_siemens_interrupt_controller);
496 496
497/* 497/*
498 * Regular PCI devices have 256 bytes, but AMD Family 10h/11h CPUs have
499 * 4096 bytes configuration space for each function of their processor
500 * configuration space.
501 */
502static void amd_cpu_pci_cfg_space_size(struct pci_dev *dev)
503{
504 dev->cfg_size = pci_cfg_space_size_ext(dev);
505}
506DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, amd_cpu_pci_cfg_space_size);
507DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1201, amd_cpu_pci_cfg_space_size);
508DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1202, amd_cpu_pci_cfg_space_size);
509DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1203, amd_cpu_pci_cfg_space_size);
510DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1204, amd_cpu_pci_cfg_space_size);
511DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1300, amd_cpu_pci_cfg_space_size);
512DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1301, amd_cpu_pci_cfg_space_size);
513DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1302, amd_cpu_pci_cfg_space_size);
514DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1303, amd_cpu_pci_cfg_space_size);
515DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1304, amd_cpu_pci_cfg_space_size);
516
517/*
518 * SB600: Disable BAR1 on device 14.0 to avoid HPET resources from 498 * SB600: Disable BAR1 on device 14.0 to avoid HPET resources from
519 * confusing the PCI engine: 499 * confusing the PCI engine:
520 */ 500 */
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 5ead808dd70c..f1817f71e009 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -258,24 +258,7 @@ void pcibios_set_master(struct pci_dev *dev)
258 pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); 258 pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
259} 259}
260 260
261static void pci_unmap_page_range(struct vm_area_struct *vma)
262{
263 u64 addr = (u64)vma->vm_pgoff << PAGE_SHIFT;
264 free_memtype(addr, addr + vma->vm_end - vma->vm_start);
265}
266
267static void pci_track_mmap_page_range(struct vm_area_struct *vma)
268{
269 u64 addr = (u64)vma->vm_pgoff << PAGE_SHIFT;
270 unsigned long flags = pgprot_val(vma->vm_page_prot)
271 & _PAGE_CACHE_MASK;
272
273 reserve_memtype(addr, addr + vma->vm_end - vma->vm_start, flags, NULL);
274}
275
276static struct vm_operations_struct pci_mmap_ops = { 261static struct vm_operations_struct pci_mmap_ops = {
277 .open = pci_track_mmap_page_range,
278 .close = pci_unmap_page_range,
279 .access = generic_access_phys, 262 .access = generic_access_phys,
280}; 263};
281 264
@@ -283,11 +266,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
283 enum pci_mmap_state mmap_state, int write_combine) 266 enum pci_mmap_state mmap_state, int write_combine)
284{ 267{
285 unsigned long prot; 268 unsigned long prot;
286 u64 addr = vma->vm_pgoff << PAGE_SHIFT;
287 unsigned long len = vma->vm_end - vma->vm_start;
288 unsigned long flags;
289 unsigned long new_flags;
290 int retval;
291 269
292 /* I/O space cannot be accessed via normal processor loads and 270 /* I/O space cannot be accessed via normal processor loads and
293 * stores on this platform. 271 * stores on this platform.
@@ -308,27 +286,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
308 286
309 vma->vm_page_prot = __pgprot(prot); 287 vma->vm_page_prot = __pgprot(prot);
310 288
311 flags = pgprot_val(vma->vm_page_prot) & _PAGE_CACHE_MASK;
312 retval = reserve_memtype(addr, addr + len, flags, &new_flags);
313 if (retval)
314 return retval;
315
316 if (flags != new_flags) {
317 if (!is_new_memtype_allowed(flags, new_flags)) {
318 free_memtype(addr, addr+len);
319 return -EINVAL;
320 }
321 flags = new_flags;
322 }
323
324 if (((vma->vm_pgoff < max_low_pfn_mapped) ||
325 (vma->vm_pgoff >= (1UL<<(32 - PAGE_SHIFT)) &&
326 vma->vm_pgoff < max_pfn_mapped)) &&
327 ioremap_change_attr((unsigned long)__va(addr), len, flags)) {
328 free_memtype(addr, addr + len);
329 return -EINVAL;
330 }
331
332 if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 289 if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
333 vma->vm_end - vma->vm_start, 290 vma->vm_end - vma->vm_start,
334 vma->vm_page_prot)) 291 vma->vm_page_prot))
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index f1065b129e9c..4061bb0f267d 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -50,8 +50,6 @@ static int __init pci_legacy_init(void)
50 if (pci_root_bus) 50 if (pci_root_bus)
51 pci_bus_add_devices(pci_root_bus); 51 pci_bus_add_devices(pci_root_bus);
52 52
53 pcibios_fixup_peer_bridges();
54
55 return 0; 53 return 0;
56} 54}
57 55
@@ -67,6 +65,7 @@ int __init pci_subsys_init(void)
67 pci_visws_init(); 65 pci_visws_init();
68#endif 66#endif
69 pci_legacy_init(); 67 pci_legacy_init();
68 pcibios_fixup_peer_bridges();
70 pcibios_irq_init(); 69 pcibios_irq_init();
71 pcibios_init(); 70 pcibios_init();
72 71
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 89bf9242c80a..905bb526b133 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <linux/bitmap.h> 16#include <linux/bitmap.h>
17#include <linux/sort.h>
17#include <asm/e820.h> 18#include <asm/e820.h>
18#include <asm/pci_x86.h> 19#include <asm/pci_x86.h>
19 20
@@ -24,24 +25,49 @@
24/* Indicate if the mmcfg resources have been placed into the resource table. */ 25/* Indicate if the mmcfg resources have been placed into the resource table. */
25static int __initdata pci_mmcfg_resources_inserted; 26static int __initdata pci_mmcfg_resources_inserted;
26 27
28static __init int extend_mmcfg(int num)
29{
30 struct acpi_mcfg_allocation *new;
31 int new_num = pci_mmcfg_config_num + num;
32
33 new = kzalloc(sizeof(pci_mmcfg_config[0]) * new_num, GFP_KERNEL);
34 if (!new)
35 return -1;
36
37 if (pci_mmcfg_config) {
38 memcpy(new, pci_mmcfg_config,
39 sizeof(pci_mmcfg_config[0]) * new_num);
40 kfree(pci_mmcfg_config);
41 }
42 pci_mmcfg_config = new;
43
44 return 0;
45}
46
47static __init void fill_one_mmcfg(u64 addr, int segment, int start, int end)
48{
49 int i = pci_mmcfg_config_num;
50
51 pci_mmcfg_config_num++;
52 pci_mmcfg_config[i].address = addr;
53 pci_mmcfg_config[i].pci_segment = segment;
54 pci_mmcfg_config[i].start_bus_number = start;
55 pci_mmcfg_config[i].end_bus_number = end;
56}
57
27static const char __init *pci_mmcfg_e7520(void) 58static const char __init *pci_mmcfg_e7520(void)
28{ 59{
29 u32 win; 60 u32 win;
30 raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0xce, 2, &win); 61 raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0xce, 2, &win);
31 62
32 win = win & 0xf000; 63 win = win & 0xf000;
33 if(win == 0x0000 || win == 0xf000) 64 if (win == 0x0000 || win == 0xf000)
34 pci_mmcfg_config_num = 0; 65 return NULL;
35 else { 66
36 pci_mmcfg_config_num = 1; 67 if (extend_mmcfg(1) == -1)
37 pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); 68 return NULL;
38 if (!pci_mmcfg_config) 69
39 return NULL; 70 fill_one_mmcfg(win << 16, 0, 0, 255);
40 pci_mmcfg_config[0].address = win << 16;
41 pci_mmcfg_config[0].pci_segment = 0;
42 pci_mmcfg_config[0].start_bus_number = 0;
43 pci_mmcfg_config[0].end_bus_number = 255;
44 }
45 71
46 return "Intel Corporation E7520 Memory Controller Hub"; 72 return "Intel Corporation E7520 Memory Controller Hub";
47} 73}
@@ -50,13 +76,11 @@ static const char __init *pci_mmcfg_intel_945(void)
50{ 76{
51 u32 pciexbar, mask = 0, len = 0; 77 u32 pciexbar, mask = 0, len = 0;
52 78
53 pci_mmcfg_config_num = 1;
54
55 raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0x48, 4, &pciexbar); 79 raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0x48, 4, &pciexbar);
56 80
57 /* Enable bit */ 81 /* Enable bit */
58 if (!(pciexbar & 1)) 82 if (!(pciexbar & 1))
59 pci_mmcfg_config_num = 0; 83 return NULL;
60 84
61 /* Size bits */ 85 /* Size bits */
62 switch ((pciexbar >> 1) & 3) { 86 switch ((pciexbar >> 1) & 3) {
@@ -73,28 +97,23 @@ static const char __init *pci_mmcfg_intel_945(void)
73 len = 0x04000000U; 97 len = 0x04000000U;
74 break; 98 break;
75 default: 99 default:
76 pci_mmcfg_config_num = 0; 100 return NULL;
77 } 101 }
78 102
79 /* Errata #2, things break when not aligned on a 256Mb boundary */ 103 /* Errata #2, things break when not aligned on a 256Mb boundary */
80 /* Can only happen in 64M/128M mode */ 104 /* Can only happen in 64M/128M mode */
81 105
82 if ((pciexbar & mask) & 0x0fffffffU) 106 if ((pciexbar & mask) & 0x0fffffffU)
83 pci_mmcfg_config_num = 0; 107 return NULL;
84 108
85 /* Don't hit the APIC registers and their friends */ 109 /* Don't hit the APIC registers and their friends */
86 if ((pciexbar & mask) >= 0xf0000000U) 110 if ((pciexbar & mask) >= 0xf0000000U)
87 pci_mmcfg_config_num = 0; 111 return NULL;
88 112
89 if (pci_mmcfg_config_num) { 113 if (extend_mmcfg(1) == -1)
90 pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); 114 return NULL;
91 if (!pci_mmcfg_config) 115
92 return NULL; 116 fill_one_mmcfg(pciexbar & mask, 0, 0, (len >> 20) - 1);
93 pci_mmcfg_config[0].address = pciexbar & mask;
94 pci_mmcfg_config[0].pci_segment = 0;
95 pci_mmcfg_config[0].start_bus_number = 0;
96 pci_mmcfg_config[0].end_bus_number = (len >> 20) - 1;
97 }
98 117
99 return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; 118 return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub";
100} 119}
@@ -138,22 +157,77 @@ static const char __init *pci_mmcfg_amd_fam10h(void)
138 busnbits = 8; 157 busnbits = 8;
139 } 158 }
140 159
141 pci_mmcfg_config_num = (1 << segnbits); 160 if (extend_mmcfg(1 << segnbits) == -1)
142 pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]) *
143 pci_mmcfg_config_num, GFP_KERNEL);
144 if (!pci_mmcfg_config)
145 return NULL; 161 return NULL;
146 162
147 for (i = 0; i < (1 << segnbits); i++) { 163 for (i = 0; i < (1 << segnbits); i++)
148 pci_mmcfg_config[i].address = base + (1<<28) * i; 164 fill_one_mmcfg(base + (1<<28) * i, i, 0, (1 << busnbits) - 1);
149 pci_mmcfg_config[i].pci_segment = i;
150 pci_mmcfg_config[i].start_bus_number = 0;
151 pci_mmcfg_config[i].end_bus_number = (1 << busnbits) - 1;
152 }
153 165
154 return "AMD Family 10h NB"; 166 return "AMD Family 10h NB";
155} 167}
156 168
169static bool __initdata mcp55_checked;
170static const char __init *pci_mmcfg_nvidia_mcp55(void)
171{
172 int bus;
173 int mcp55_mmconf_found = 0;
174
175 static const u32 extcfg_regnum = 0x90;
176 static const u32 extcfg_regsize = 4;
177 static const u32 extcfg_enable_mask = 1<<31;
178 static const u32 extcfg_start_mask = 0xff<<16;
179 static const int extcfg_start_shift = 16;
180 static const u32 extcfg_size_mask = 0x3<<28;
181 static const int extcfg_size_shift = 28;
182 static const int extcfg_sizebus[] = {0x100, 0x80, 0x40, 0x20};
183 static const u32 extcfg_base_mask[] = {0x7ff8, 0x7ffc, 0x7ffe, 0x7fff};
184 static const int extcfg_base_lshift = 25;
185
186 /*
187 * do check if amd fam10h already took over
188 */
189 if (!acpi_disabled || pci_mmcfg_config_num || mcp55_checked)
190 return NULL;
191
192 mcp55_checked = true;
193 for (bus = 0; bus < 256; bus++) {
194 u64 base;
195 u32 l, extcfg;
196 u16 vendor, device;
197 int start, size_index, end;
198
199 raw_pci_ops->read(0, bus, PCI_DEVFN(0, 0), 0, 4, &l);
200 vendor = l & 0xffff;
201 device = (l >> 16) & 0xffff;
202
203 if (PCI_VENDOR_ID_NVIDIA != vendor || 0x0369 != device)
204 continue;
205
206 raw_pci_ops->read(0, bus, PCI_DEVFN(0, 0), extcfg_regnum,
207 extcfg_regsize, &extcfg);
208
209 if (!(extcfg & extcfg_enable_mask))
210 continue;
211
212 if (extend_mmcfg(1) == -1)
213 continue;
214
215 size_index = (extcfg & extcfg_size_mask) >> extcfg_size_shift;
216 base = extcfg & extcfg_base_mask[size_index];
217 /* base could > 4G */
218 base <<= extcfg_base_lshift;
219 start = (extcfg & extcfg_start_mask) >> extcfg_start_shift;
220 end = start + extcfg_sizebus[size_index] - 1;
221 fill_one_mmcfg(base, 0, start, end);
222 mcp55_mmconf_found++;
223 }
224
225 if (!mcp55_mmconf_found)
226 return NULL;
227
228 return "nVidia MCP55";
229}
230
157struct pci_mmcfg_hostbridge_probe { 231struct pci_mmcfg_hostbridge_probe {
158 u32 bus; 232 u32 bus;
159 u32 devfn; 233 u32 devfn;
@@ -171,8 +245,52 @@ static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = {
171 0x1200, pci_mmcfg_amd_fam10h }, 245 0x1200, pci_mmcfg_amd_fam10h },
172 { 0xff, PCI_DEVFN(0, 0), PCI_VENDOR_ID_AMD, 246 { 0xff, PCI_DEVFN(0, 0), PCI_VENDOR_ID_AMD,
173 0x1200, pci_mmcfg_amd_fam10h }, 247 0x1200, pci_mmcfg_amd_fam10h },
248 { 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID_NVIDIA,
249 0x0369, pci_mmcfg_nvidia_mcp55 },
174}; 250};
175 251
252static int __init cmp_mmcfg(const void *x1, const void *x2)
253{
254 const typeof(pci_mmcfg_config[0]) *m1 = x1;
255 const typeof(pci_mmcfg_config[0]) *m2 = x2;
256 int start1, start2;
257
258 start1 = m1->start_bus_number;
259 start2 = m2->start_bus_number;
260
261 return start1 - start2;
262}
263
264static void __init pci_mmcfg_check_end_bus_number(void)
265{
266 int i;
267 typeof(pci_mmcfg_config[0]) *cfg, *cfgx;
268
269 /* sort them at first */
270 sort(pci_mmcfg_config, pci_mmcfg_config_num,
271 sizeof(pci_mmcfg_config[0]), cmp_mmcfg, NULL);
272
273 /* last one*/
274 if (pci_mmcfg_config_num > 0) {
275 i = pci_mmcfg_config_num - 1;
276 cfg = &pci_mmcfg_config[i];
277 if (cfg->end_bus_number < cfg->start_bus_number)
278 cfg->end_bus_number = 255;
279 }
280
281 /* don't overlap please */
282 for (i = 0; i < pci_mmcfg_config_num - 1; i++) {
283 cfg = &pci_mmcfg_config[i];
284 cfgx = &pci_mmcfg_config[i+1];
285
286 if (cfg->end_bus_number < cfg->start_bus_number)
287 cfg->end_bus_number = 255;
288
289 if (cfg->end_bus_number >= cfgx->start_bus_number)
290 cfg->end_bus_number = cfgx->start_bus_number - 1;
291 }
292}
293
176static int __init pci_mmcfg_check_hostbridge(void) 294static int __init pci_mmcfg_check_hostbridge(void)
177{ 295{
178 u32 l; 296 u32 l;
@@ -186,31 +304,33 @@ static int __init pci_mmcfg_check_hostbridge(void)
186 304
187 pci_mmcfg_config_num = 0; 305 pci_mmcfg_config_num = 0;
188 pci_mmcfg_config = NULL; 306 pci_mmcfg_config = NULL;
189 name = NULL;
190 307
191 for (i = 0; !name && i < ARRAY_SIZE(pci_mmcfg_probes); i++) { 308 for (i = 0; i < ARRAY_SIZE(pci_mmcfg_probes); i++) {
192 bus = pci_mmcfg_probes[i].bus; 309 bus = pci_mmcfg_probes[i].bus;
193 devfn = pci_mmcfg_probes[i].devfn; 310 devfn = pci_mmcfg_probes[i].devfn;
194 raw_pci_ops->read(0, bus, devfn, 0, 4, &l); 311 raw_pci_ops->read(0, bus, devfn, 0, 4, &l);
195 vendor = l & 0xffff; 312 vendor = l & 0xffff;
196 device = (l >> 16) & 0xffff; 313 device = (l >> 16) & 0xffff;
197 314
315 name = NULL;
198 if (pci_mmcfg_probes[i].vendor == vendor && 316 if (pci_mmcfg_probes[i].vendor == vendor &&
199 pci_mmcfg_probes[i].device == device) 317 pci_mmcfg_probes[i].device == device)
200 name = pci_mmcfg_probes[i].probe(); 318 name = pci_mmcfg_probes[i].probe();
201 }
202 319
203 if (name) { 320 if (name)
204 printk(KERN_INFO "PCI: Found %s %s MMCONFIG support.\n", 321 printk(KERN_INFO "PCI: Found %s with MMCONFIG support.\n",
205 name, pci_mmcfg_config_num ? "with" : "without"); 322 name);
206 } 323 }
207 324
208 return name != NULL; 325 /* some end_bus_number is crazy, fix it */
326 pci_mmcfg_check_end_bus_number();
327
328 return pci_mmcfg_config_num != 0;
209} 329}
210 330
211static void __init pci_mmcfg_insert_resources(void) 331static void __init pci_mmcfg_insert_resources(void)
212{ 332{
213#define PCI_MMCFG_RESOURCE_NAME_LEN 19 333#define PCI_MMCFG_RESOURCE_NAME_LEN 24
214 int i; 334 int i;
215 struct resource *res; 335 struct resource *res;
216 char *names; 336 char *names;
@@ -228,9 +348,10 @@ static void __init pci_mmcfg_insert_resources(void)
228 struct acpi_mcfg_allocation *cfg = &pci_mmcfg_config[i]; 348 struct acpi_mcfg_allocation *cfg = &pci_mmcfg_config[i];
229 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1; 349 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
230 res->name = names; 350 res->name = names;
231 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u", 351 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN,
232 cfg->pci_segment); 352 "PCI MMCONFIG %u [%02x-%02x]", cfg->pci_segment,
233 res->start = cfg->address; 353 cfg->start_bus_number, cfg->end_bus_number);
354 res->start = cfg->address + (cfg->start_bus_number << 20);
234 res->end = res->start + (num_buses << 20) - 1; 355 res->end = res->start + (num_buses << 20) - 1;
235 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 356 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
236 insert_resource(&iomem_resource, res); 357 insert_resource(&iomem_resource, res);
@@ -354,8 +475,6 @@ static void __init pci_mmcfg_reject_broken(int early)
354 (pci_mmcfg_config[0].address == 0)) 475 (pci_mmcfg_config[0].address == 0))
355 return; 476 return;
356 477
357 cfg = &pci_mmcfg_config[0];
358
359 for (i = 0; i < pci_mmcfg_config_num; i++) { 478 for (i = 0; i < pci_mmcfg_config_num; i++) {
360 int valid = 0; 479 int valid = 0;
361 u64 addr, size; 480 u64 addr, size;
@@ -423,10 +542,10 @@ static void __init __pci_mmcfg_init(int early)
423 known_bridge = 1; 542 known_bridge = 1;
424 } 543 }
425 544
426 if (!known_bridge) { 545 if (!known_bridge)
427 acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); 546 acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
428 pci_mmcfg_reject_broken(early); 547
429 } 548 pci_mmcfg_reject_broken(early);
430 549
431 if ((pci_mmcfg_config_num == 0) || 550 if ((pci_mmcfg_config_num == 0) ||
432 (pci_mmcfg_config == NULL) || 551 (pci_mmcfg_config == NULL) ||
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index 30007ffc8e11..94349f8b2f96 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -112,13 +112,18 @@ static struct pci_raw_ops pci_mmcfg = {
112static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg) 112static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg)
113{ 113{
114 void __iomem *addr; 114 void __iomem *addr;
115 u32 size; 115 u64 start, size;
116 116
117 size = (cfg->end_bus_number + 1) << 20; 117 start = cfg->start_bus_number;
118 addr = ioremap_nocache(cfg->address, size); 118 start <<= 20;
119 start += cfg->address;
120 size = cfg->end_bus_number + 1 - cfg->start_bus_number;
121 size <<= 20;
122 addr = ioremap_nocache(start, size);
119 if (addr) { 123 if (addr) {
120 printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n", 124 printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n",
121 cfg->address, cfg->address + size - 1); 125 start, start + size - 1);
126 addr -= cfg->start_bus_number << 20;
122 } 127 }
123 return addr; 128 return addr;
124} 129}
@@ -157,7 +162,7 @@ void __init pci_mmcfg_arch_free(void)
157 162
158 for (i = 0; i < pci_mmcfg_config_num; ++i) { 163 for (i = 0; i < pci_mmcfg_config_num; ++i) {
159 if (pci_mmcfg_virt[i].virt) { 164 if (pci_mmcfg_virt[i].virt) {
160 iounmap(pci_mmcfg_virt[i].virt); 165 iounmap(pci_mmcfg_virt[i].virt + (pci_mmcfg_virt[i].cfg->start_bus_number << 20));
161 pci_mmcfg_virt[i].virt = NULL; 166 pci_mmcfg_virt[i].virt = NULL;
162 pci_mmcfg_virt[i].cfg = NULL; 167 pci_mmcfg_virt[i].cfg = NULL;
163 } 168 }
diff --git a/arch/x86/power/Makefile b/arch/x86/power/Makefile
index 9ff4d5b55ad1..58b32db33125 100644
--- a/arch/x86/power/Makefile
+++ b/arch/x86/power/Makefile
@@ -1,2 +1,7 @@
1# __restore_processor_state() restores %gs after S3 resume and so should not
2# itself be stack-protected
3nostackp := $(call cc-option, -fno-stack-protector)
4CFLAGS_cpu_$(BITS).o := $(nostackp)
5
1obj-$(CONFIG_PM_SLEEP) += cpu_$(BITS).o 6obj-$(CONFIG_PM_SLEEP) += cpu_$(BITS).o
2obj-$(CONFIG_HIBERNATION) += hibernate_$(BITS).o hibernate_asm_$(BITS).o 7obj-$(CONFIG_HIBERNATION) += hibernate_$(BITS).o hibernate_asm_$(BITS).o
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 274d06082f48..ce702c5b3a2c 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -12,6 +12,7 @@
12#include <asm/mtrr.h> 12#include <asm/mtrr.h>
13#include <asm/mce.h> 13#include <asm/mce.h>
14#include <asm/xcr.h> 14#include <asm/xcr.h>
15#include <asm/suspend.h>
15 16
16static struct saved_context saved_context; 17static struct saved_context saved_context;
17 18
diff --git a/arch/x86/power/cpu_64.c b/arch/x86/power/cpu_64.c
index e3b6cf70d62c..5343540f2607 100644
--- a/arch/x86/power/cpu_64.c
+++ b/arch/x86/power/cpu_64.c
@@ -15,6 +15,7 @@
15#include <asm/pgtable.h> 15#include <asm/pgtable.h>
16#include <asm/mtrr.h> 16#include <asm/mtrr.h>
17#include <asm/xcr.h> 17#include <asm/xcr.h>
18#include <asm/suspend.h>
18 19
19static void fix_processor_context(void); 20static void fix_processor_context(void);
20 21
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c
index 6dd000dd7933..65fdc86e923f 100644
--- a/arch/x86/power/hibernate_64.c
+++ b/arch/x86/power/hibernate_64.c
@@ -14,6 +14,7 @@
14#include <asm/page.h> 14#include <asm/page.h>
15#include <asm/pgtable.h> 15#include <asm/pgtable.h>
16#include <asm/mtrr.h> 16#include <asm/mtrr.h>
17#include <asm/suspend.h>
17 18
18/* References to section boundaries */ 19/* References to section boundaries */
19extern const void __nosave_begin, __nosave_end; 20extern const void __nosave_begin, __nosave_end;
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index e425a32e0a90..77b242c9a11e 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1762,9 +1762,9 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
1762{ 1762{
1763 pmd_t *kernel_pmd; 1763 pmd_t *kernel_pmd;
1764 1764
1765 init_pg_tables_start = __pa(pgd); 1765 max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
1766 init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE; 1766 xen_start_info->nr_pt_frames * PAGE_SIZE +
1767 max_pfn_mapped = PFN_DOWN(init_pg_tables_end + 512*1024); 1767 512*1024);
1768 1768
1769 kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); 1769 kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd);
1770 memcpy(level2_kernel_pgt, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); 1770 memcpy(level2_kernel_pgt, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD);
@@ -1916,7 +1916,6 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = {
1916 1916
1917#ifdef CONFIG_X86_PAE 1917#ifdef CONFIG_X86_PAE
1918 .set_pte_atomic = xen_set_pte_atomic, 1918 .set_pte_atomic = xen_set_pte_atomic,
1919 .set_pte_present = xen_set_pte_at,
1920 .pte_clear = xen_pte_clear, 1919 .pte_clear = xen_pte_clear,
1921 .pmd_clear = xen_pmd_clear, 1920 .pmd_clear = xen_pmd_clear,
1922#endif /* CONFIG_X86_PAE */ 1921#endif /* CONFIG_X86_PAE */
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 304d832710cd..429834ec1687 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -158,7 +158,7 @@ static void __init xen_fill_possible_map(void)
158 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); 158 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
159 if (rc >= 0) { 159 if (rc >= 0) {
160 num_processors++; 160 num_processors++;
161 cpu_set(i, cpu_possible_map); 161 set_cpu_possible(i, true);
162 } 162 }
163 } 163 }
164} 164}
@@ -197,7 +197,7 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
197 while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) { 197 while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
198 for (cpu = nr_cpu_ids - 1; !cpu_possible(cpu); cpu--) 198 for (cpu = nr_cpu_ids - 1; !cpu_possible(cpu); cpu--)
199 continue; 199 continue;
200 cpu_clear(cpu, cpu_possible_map); 200 set_cpu_possible(cpu, false);
201 } 201 }
202 202
203 for_each_possible_cpu (cpu) { 203 for_each_possible_cpu (cpu) {
@@ -210,7 +210,7 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
210 if (IS_ERR(idle)) 210 if (IS_ERR(idle))
211 panic("failed fork for CPU %d", cpu); 211 panic("failed fork for CPU %d", cpu);
212 212
213 cpu_set(cpu, cpu_present_map); 213 set_cpu_present(cpu, true);
214 } 214 }
215} 215}
216 216
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 981200830432..fa6dc4dd3b19 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -4,16 +4,13 @@
4mainmenu "Linux/Xtensa Kernel Configuration" 4mainmenu "Linux/Xtensa Kernel Configuration"
5 5
6config FRAME_POINTER 6config FRAME_POINTER
7 bool 7 def_bool n
8 default n
9 8
10config ZONE_DMA 9config ZONE_DMA
11 bool 10 def_bool y
12 default y
13 11
14config XTENSA 12config XTENSA
15 bool 13 def_bool y
16 default y
17 select HAVE_IDE 14 select HAVE_IDE
18 help 15 help
19 Xtensa processors are 32-bit RISC machines designed by Tensilica 16 Xtensa processors are 32-bit RISC machines designed by Tensilica
@@ -24,28 +21,25 @@ config XTENSA
24 a home page at <http://xtensa.sourceforge.net/>. 21 a home page at <http://xtensa.sourceforge.net/>.
25 22
26config RWSEM_XCHGADD_ALGORITHM 23config RWSEM_XCHGADD_ALGORITHM
27 bool 24 def_bool y
28 default y
29 25
30config GENERIC_FIND_NEXT_BIT 26config GENERIC_FIND_NEXT_BIT
31 bool 27 def_bool y
32 default y
33 28
34config GENERIC_HWEIGHT 29config GENERIC_HWEIGHT
35 bool 30 def_bool y
36 default y
37 31
38config GENERIC_HARDIRQS 32config GENERIC_HARDIRQS
39 bool 33 def_bool y
40 default y 34
35config GENERIC_GPIO
36 def_bool y
41 37
42config ARCH_HAS_ILOG2_U32 38config ARCH_HAS_ILOG2_U32
43 bool 39 def_bool n
44 default n
45 40
46config ARCH_HAS_ILOG2_U64 41config ARCH_HAS_ILOG2_U64
47 bool 42 def_bool n
48 default n
49 43
50config NO_IOPORT 44config NO_IOPORT
51 def_bool y 45 def_bool y
@@ -54,9 +48,18 @@ config HZ
54 int 48 int
55 default 100 49 default 100
56 50
51config GENERIC_TIME
52 def_bool y
53
57source "init/Kconfig" 54source "init/Kconfig"
58source "kernel/Kconfig.freezer" 55source "kernel/Kconfig.freezer"
59 56
57config MMU
58 def_bool n
59
60config VARIANT_IRQ_SWITCH
61 def_bool n
62
60menu "Processor type and features" 63menu "Processor type and features"
61 64
62choice 65choice
@@ -65,38 +68,41 @@ choice
65 68
66config XTENSA_VARIANT_FSF 69config XTENSA_VARIANT_FSF
67 bool "fsf - default (not generic) configuration" 70 bool "fsf - default (not generic) configuration"
71 select MMU
68 72
69config XTENSA_VARIANT_DC232B 73config XTENSA_VARIANT_DC232B
70 bool "dc232b - Diamond 232L Standard Core Rev.B (LE)" 74 bool "dc232b - Diamond 232L Standard Core Rev.B (LE)"
75 select MMU
71 help 76 help
72 This variant refers to Tensilica's Diamond 232L Standard core Rev.B (LE). 77 This variant refers to Tensilica's Diamond 232L Standard core Rev.B (LE).
73endchoice
74 78
75config MMU 79config XTENSA_VARIANT_S6000
76 bool 80 bool "s6000 - Stretch software configurable processor"
77 default y 81 select VARIANT_IRQ_SWITCH
82 select ARCH_REQUIRE_GPIOLIB
83endchoice
78 84
79config XTENSA_UNALIGNED_USER 85config XTENSA_UNALIGNED_USER
80 bool "Unaligned memory access in use space" 86 bool "Unaligned memory access in use space"
81 ---help--- 87 help
82 The Xtensa architecture currently does not handle unaligned 88 The Xtensa architecture currently does not handle unaligned
83 memory accesses in hardware but through an exception handler. 89 memory accesses in hardware but through an exception handler.
84 Per default, unaligned memory accesses are disabled in user space. 90 Per default, unaligned memory accesses are disabled in user space.
85 91
86 Say Y here to enable unaligned memory access in user space. 92 Say Y here to enable unaligned memory access in user space.
87 93
88config PREEMPT 94config PREEMPT
89 bool "Preemptible Kernel" 95 bool "Preemptible Kernel"
90 ---help--- 96 help
91 This option reduces the latency of the kernel when reacting to 97 This option reduces the latency of the kernel when reacting to
92 real-time or interactive events by allowing a low priority process to 98 real-time or interactive events by allowing a low priority process to
93 be preempted even if it is in kernel mode executing a system call. 99 be preempted even if it is in kernel mode executing a system call.
94 Unfortunately the kernel code has some race conditions if both 100 Unfortunately the kernel code has some race conditions if both
95 CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is 101 CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
96 currently disabled if you are building an SMP kernel. 102 currently disabled if you are building an SMP kernel.
97 103
98 Say Y here if you are building a kernel for a desktop, embedded 104 Say Y here if you are building a kernel for a desktop, embedded
99 or real-time system. Say N if you are unsure. 105 or real-time system. Say N if you are unsure.
100 106
101config MATH_EMULATION 107config MATH_EMULATION
102 bool "Math emulation" 108 bool "Math emulation"
@@ -105,6 +111,32 @@ config MATH_EMULATION
105 111
106endmenu 112endmenu
107 113
114config XTENSA_CALIBRATE_CCOUNT
115 def_bool n
116 help
117 On some platforms (XT2000, for example), the CPU clock rate can
118 vary. The frequency can be determined, however, by measuring
119 against a well known, fixed frequency, such as an UART oscillator.
120
121config SERIAL_CONSOLE
122 def_bool n
123
124config XTENSA_ISS_NETWORK
125 def_bool n
126
127menu "Bus options"
128
129config PCI
130 bool "PCI support"
131 default y
132 help
133 Find out whether you have a PCI motherboard. PCI is the name of a
134 bus system, i.e. the way the CPU talks to the other stuff inside
135 your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
136 VESA. If you have PCI, say Y, otherwise N.
137
138source "drivers/pci/Kconfig"
139
108menu "Platform options" 140menu "Platform options"
109 141
110choice 142choice
@@ -113,33 +145,35 @@ choice
113 145
114config XTENSA_PLATFORM_ISS 146config XTENSA_PLATFORM_ISS
115 bool "ISS" 147 bool "ISS"
148 select XTENSA_CALIBRATE_CCOUNT
149 select SERIAL_CONSOLE
150 select XTENSA_ISS_NETWORK
116 help 151 help
117 ISS is an acronym for Tensilica's Instruction Set Simulator. 152 ISS is an acronym for Tensilica's Instruction Set Simulator.
118 153
119config XTENSA_PLATFORM_XT2000 154config XTENSA_PLATFORM_XT2000
120 bool "XT2000" 155 bool "XT2000"
156 select XTENSA_CALIBRATE_CCOUNT
157 select PCI
121 help 158 help
122 XT2000 is the name of Tensilica's feature-rich emulation platform. 159 XT2000 is the name of Tensilica's feature-rich emulation platform.
123 This hardware is capable of running a full Linux distribution. 160 This hardware is capable of running a full Linux distribution.
124 161
125endchoice 162config XTENSA_PLATFORM_S6105
163 bool "S6105"
164 select SERIAL_CONSOLE
126 165
166endchoice
127 167
128config XTENSA_CALIBRATE_CCOUNT
129 bool "Auto calibration of the CPU clock rate"
130 ---help---
131 On some platforms (XT2000, for example), the CPU clock rate can
132 vary. The frequency can be determined, however, by measuring
133 against a well known, fixed frequency, such as an UART oscillator.
134 168
135config XTENSA_CPU_CLOCK 169config XTENSA_CPU_CLOCK
136 int "CPU clock rate [MHz]" 170 int "CPU clock rate [MHz]"
137 depends on !XTENSA_CALIBRATE_CCOUNT 171 depends on !XTENSA_CALIBRATE_CCOUNT
138 default "16" 172 default 16
139 173
140config GENERIC_CALIBRATE_DELAY 174config GENERIC_CALIBRATE_DELAY
141 bool "Auto calibration of the BogoMIPS value" 175 bool "Auto calibration of the BogoMIPS value"
142 ---help--- 176 help
143 The BogoMIPS value can easily be derived from the CPU frequency. 177 The BogoMIPS value can easily be derived from the CPU frequency.
144 178
145config CMDLINE_BOOL 179config CMDLINE_BOOL
@@ -156,52 +190,27 @@ config CMDLINE
156 time by entering them here. As a minimum, you should specify the 190 time by entering them here. As a minimum, you should specify the
157 memory size and the root device (e.g., mem=64M root=/dev/nfs). 191 memory size and the root device (e.g., mem=64M root=/dev/nfs).
158 192
159config SERIAL_CONSOLE
160 bool
161 depends on XTENSA_PLATFORM_ISS
162 default y
163
164config XTENSA_ISS_NETWORK
165 bool
166 depends on XTENSA_PLATFORM_ISS
167 default y
168
169source "mm/Kconfig" 193source "mm/Kconfig"
170 194
171endmenu 195endmenu
172 196
173menu "Bus options" 197config HOTPLUG
174 198 bool "Support for hot-pluggable devices"
175config PCI
176 bool "PCI support" if !XTENSA_PLATFORM_ISS
177 depends on !XTENSA_PLATFORM_ISS
178 default y
179 help 199 help
180 Find out whether you have a PCI motherboard. PCI is the name of a 200 Say Y here if you want to plug devices into your computer while
181 bus system, i.e. the way the CPU talks to the other stuff inside 201 the system is running, and be able to use them quickly. In many
182 your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or 202 cases, the devices can likewise be unplugged at any time too.
183 VESA. If you have PCI, say Y, otherwise N.
184 203
185source "drivers/pci/Kconfig" 204 One well known example of this is PCMCIA- or PC-cards, credit-card
205 size devices such as network cards, modems or hard drives which are
206 plugged into slots found on all modern laptop computers. Another
207 example, used on modern desktops as well as laptops, is USB.
186 208
187config HOTPLUG 209 Enable HOTPLUG and build a modular kernel. Get agent software
188 210 (from <http://linux-hotplug.sourceforge.net/>) and install it.
189 bool "Support for hot-pluggable devices" 211 Then your kernel will automatically call out to a user mode "policy
190 ---help--- 212 agent" (/sbin/hotplug) to load modules and set up software needed
191 Say Y here if you want to plug devices into your computer while 213 to use devices as you hotplug them.
192 the system is running, and be able to use them quickly. In many
193 cases, the devices can likewise be unplugged at any time too.
194
195 One well known example of this is PCMCIA- or PC-cards, credit-card
196 size devices such as network cards, modems or hard drives which are
197 plugged into slots found on all modern laptop computers. Another
198 example, used on modern desktops as well as laptops, is USB.
199
200 Enable HOTPLUG and build a modular kernel. Get agent software
201 (from <http://linux-hotplug.sourceforge.net/>) and install it.
202 Then your kernel will automatically call out to a user mode "policy
203 agent" (/sbin/hotplug) to load modules and set up software needed
204 to use devices as you hotplug them.
205 214
206source "drivers/pcmcia/Kconfig" 215source "drivers/pcmcia/Kconfig"
207 216
@@ -213,9 +222,8 @@ menu "Executable file formats"
213 222
214# only elf supported 223# only elf supported
215config KCORE_ELF 224config KCORE_ELF
216 bool 225 def_bool y
217 depends on PROC_FS 226 depends on PROC_FS
218 default y
219 help 227 help
220 If you enabled support for /proc file system then the file 228 If you enabled support for /proc file system then the file
221 /proc/kcore will contain the kernel core image in ELF format. This 229 /proc/kcore will contain the kernel core image in ELF format. This
@@ -240,7 +248,7 @@ source "fs/Kconfig"
240menu "Xtensa initrd options" 248menu "Xtensa initrd options"
241 depends on BLK_DEV_INITRD 249 depends on BLK_DEV_INITRD
242 250
243 config EMBEDDED_RAMDISK 251config EMBEDDED_RAMDISK
244 bool "Embed root filesystem ramdisk into the kernel" 252 bool "Embed root filesystem ramdisk into the kernel"
245 253
246config EMBEDDED_RAMDISK_IMAGE 254config EMBEDDED_RAMDISK_IMAGE
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index 1da55fe4beff..4caffac3ca2e 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -15,6 +15,7 @@
15 15
16variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf 16variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf
17variant-$(CONFIG_XTENSA_VARIANT_DC232B) := dc232b 17variant-$(CONFIG_XTENSA_VARIANT_DC232B) := dc232b
18variant-$(CONFIG_XTENSA_VARIANT_S6000) := s6000
18variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom 19variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
19 20
20VARIANT = $(variant-y) 21VARIANT = $(variant-y)
@@ -24,6 +25,7 @@ export VARIANT
24 25
25platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 26platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
26platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss 27platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
28platform-$(CONFIG_XTENSA_PLATFORM_S6105) := s6105
27 29
28PLATFORM = $(platform-y) 30PLATFORM = $(platform-y)
29export PLATFORM 31export PLATFORM
@@ -62,20 +64,23 @@ ifneq ($(VARIANT),)
62 endif 64 endif
63endif 65endif
64 66
65# 67# Only build variant and/or platform if it includes a Makefile
68
69buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
70buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
71
72# Find libgcc.a
66 73
67LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 74LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
68 75
69head-y := arch/xtensa/kernel/head.o 76head-y := arch/xtensa/kernel/head.o
70core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 77core-y += arch/xtensa/kernel/ arch/xtensa/mm/
71ifneq ($(PLATFORM),) 78core-y += $(buildvar) $(buildplf)
72core-y += arch/xtensa/platforms/$(PLATFORM)/ 79
73endif
74libs-y += arch/xtensa/lib/ $(LIBGCC) 80libs-y += arch/xtensa/lib/ $(LIBGCC)
75 81
76boot := arch/xtensa/boot 82boot := arch/xtensa/boot
77 83
78
79all: zImage 84all: zImage
80 85
81bzImage : zImage 86bzImage : zImage
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
new file mode 100644
index 000000000000..6e1deff41590
--- /dev/null
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -0,0 +1,530 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc7-s6
4# Tue Mar 10 11:09:26 2009
5#
6# CONFIG_FRAME_POINTER is not set
7CONFIG_ZONE_DMA=y
8CONFIG_XTENSA=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_GPIO=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_NO_IOPORT=y
17CONFIG_HZ=100
18CONFIG_GENERIC_TIME=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20
21#
22# General setup
23#
24CONFIG_EXPERIMENTAL=y
25CONFIG_BROKEN_ON_SMP=y
26CONFIG_LOCK_KERNEL=y
27CONFIG_INIT_ENV_ARG_LIMIT=32
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SYSVIPC=y
31CONFIG_SYSVIPC_SYSCTL=y
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set
35# CONFIG_AUDIT is not set
36
37#
38# RCU Subsystem
39#
40# CONFIG_CLASSIC_RCU is not set
41# CONFIG_TREE_RCU is not set
42CONFIG_PREEMPT_RCU=y
43# CONFIG_RCU_TRACE is not set
44# CONFIG_TREE_RCU_TRACE is not set
45# CONFIG_PREEMPT_RCU_TRACE is not set
46CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=16
49# CONFIG_GROUP_SCHED is not set
50# CONFIG_CGROUPS is not set
51# CONFIG_SYSFS_DEPRECATED_V2 is not set
52# CONFIG_RELAY is not set
53# CONFIG_NAMESPACES is not set
54CONFIG_BLK_DEV_INITRD=y
55CONFIG_INITRAMFS_SOURCE=""
56CONFIG_CC_OPTIMIZE_FOR_SIZE=y
57CONFIG_SYSCTL=y
58CONFIG_EMBEDDED=y
59CONFIG_SYSCTL_SYSCALL=y
60CONFIG_KALLSYMS=y
61# CONFIG_KALLSYMS_ALL is not set
62# CONFIG_KALLSYMS_EXTRA_PASS is not set
63# CONFIG_HOTPLUG is not set
64CONFIG_PRINTK=y
65CONFIG_BUG=y
66CONFIG_ELF_CORE=y
67# CONFIG_COMPAT_BRK is not set
68CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y
70CONFIG_ANON_INODES=y
71CONFIG_EPOLL=y
72CONFIG_SIGNALFD=y
73CONFIG_TIMERFD=y
74CONFIG_EVENTFD=y
75CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y
78# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set
80# CONFIG_PROFILING is not set
81# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
82CONFIG_SLABINFO=y
83CONFIG_RT_MUTEXES=y
84CONFIG_BASE_SMALL=0
85# CONFIG_MODULES is not set
86CONFIG_BLOCK=y
87# CONFIG_LBD is not set
88# CONFIG_BLK_DEV_IO_TRACE is not set
89# CONFIG_BLK_DEV_BSG is not set
90# CONFIG_BLK_DEV_INTEGRITY is not set
91
92#
93# IO Schedulers
94#
95CONFIG_IOSCHED_NOOP=y
96# CONFIG_IOSCHED_AS is not set
97# CONFIG_IOSCHED_DEADLINE is not set
98CONFIG_IOSCHED_CFQ=y
99# CONFIG_DEFAULT_AS is not set
100# CONFIG_DEFAULT_DEADLINE is not set
101CONFIG_DEFAULT_CFQ=y
102# CONFIG_DEFAULT_NOOP is not set
103CONFIG_DEFAULT_IOSCHED="cfq"
104# CONFIG_FREEZER is not set
105# CONFIG_MMU is not set
106CONFIG_VARIANT_IRQ_SWITCH=y
107
108#
109# Processor type and features
110#
111# CONFIG_XTENSA_VARIANT_FSF is not set
112# CONFIG_XTENSA_VARIANT_DC232B is not set
113CONFIG_XTENSA_VARIANT_S6000=y
114# CONFIG_XTENSA_UNALIGNED_USER is not set
115CONFIG_PREEMPT=y
116# CONFIG_MATH_EMULATION is not set
117# CONFIG_HIGHMEM is not set
118# CONFIG_XTENSA_CALIBRATE_CCOUNT is not set
119CONFIG_SERIAL_CONSOLE=y
120# CONFIG_XTENSA_ISS_NETWORK is not set
121
122#
123# Bus options
124#
125# CONFIG_PCI is not set
126# CONFIG_ARCH_SUPPORTS_MSI is not set
127
128#
129# Platform options
130#
131# CONFIG_XTENSA_PLATFORM_ISS is not set
132# CONFIG_XTENSA_PLATFORM_XT2000 is not set
133CONFIG_XTENSA_PLATFORM_S6105=y
134CONFIG_XTENSA_CPU_CLOCK=300
135CONFIG_GENERIC_CALIBRATE_DELAY=y
136CONFIG_CMDLINE_BOOL=y
137CONFIG_CMDLINE="console=ttyS1,38400 debug bootmem_debug loglevel=7"
138CONFIG_SELECT_MEMORY_MODEL=y
139CONFIG_FLATMEM_MANUAL=y
140# CONFIG_DISCONTIGMEM_MANUAL is not set
141# CONFIG_SPARSEMEM_MANUAL is not set
142CONFIG_FLATMEM=y
143CONFIG_FLAT_NODE_MEM_MAP=y
144CONFIG_PAGEFLAGS_EXTENDED=y
145CONFIG_SPLIT_PTLOCK_CPUS=4
146# CONFIG_PHYS_ADDR_T_64BIT is not set
147CONFIG_ZONE_DMA_FLAG=1
148CONFIG_VIRT_TO_BUS=y
149
150#
151# Executable file formats
152#
153CONFIG_KCORE_ELF=y
154CONFIG_BINFMT_FLAT=y
155# CONFIG_BINFMT_ZFLAT is not set
156# CONFIG_BINFMT_SHARED_FLAT is not set
157# CONFIG_HAVE_AOUT is not set
158# CONFIG_BINFMT_MISC is not set
159CONFIG_NET=y
160
161#
162# Networking options
163#
164CONFIG_COMPAT_NET_DEV_OPS=y
165CONFIG_PACKET=y
166# CONFIG_PACKET_MMAP is not set
167CONFIG_UNIX=y
168# CONFIG_NET_KEY is not set
169CONFIG_INET=y
170# CONFIG_IP_MULTICAST is not set
171# CONFIG_IP_ADVANCED_ROUTER is not set
172CONFIG_IP_FIB_HASH=y
173# CONFIG_IP_PNP is not set
174# CONFIG_NET_IPIP is not set
175# CONFIG_NET_IPGRE is not set
176# CONFIG_ARPD is not set
177# CONFIG_SYN_COOKIES is not set
178# CONFIG_INET_AH is not set
179# CONFIG_INET_ESP is not set
180# CONFIG_INET_IPCOMP is not set
181# CONFIG_INET_XFRM_TUNNEL is not set
182# CONFIG_INET_TUNNEL is not set
183# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
184# CONFIG_INET_XFRM_MODE_TUNNEL is not set
185# CONFIG_INET_XFRM_MODE_BEET is not set
186# CONFIG_INET_LRO is not set
187# CONFIG_INET_DIAG is not set
188# CONFIG_TCP_CONG_ADVANCED is not set
189CONFIG_TCP_CONG_CUBIC=y
190CONFIG_DEFAULT_TCP_CONG="cubic"
191# CONFIG_TCP_MD5SIG is not set
192# CONFIG_IPV6 is not set
193# CONFIG_NETWORK_SECMARK is not set
194# CONFIG_NETFILTER is not set
195# CONFIG_IP_DCCP is not set
196# CONFIG_IP_SCTP is not set
197# CONFIG_TIPC is not set
198# CONFIG_ATM is not set
199# CONFIG_BRIDGE is not set
200# CONFIG_NET_DSA is not set
201# CONFIG_VLAN_8021Q is not set
202# CONFIG_DECNET is not set
203# CONFIG_LLC2 is not set
204# CONFIG_IPX is not set
205# CONFIG_ATALK is not set
206# CONFIG_X25 is not set
207# CONFIG_LAPB is not set
208# CONFIG_ECONET is not set
209# CONFIG_WAN_ROUTER is not set
210# CONFIG_NET_SCHED is not set
211# CONFIG_DCB is not set
212
213#
214# Network testing
215#
216# CONFIG_NET_PKTGEN is not set
217# CONFIG_HAMRADIO is not set
218# CONFIG_CAN is not set
219# CONFIG_IRDA is not set
220# CONFIG_BT is not set
221# CONFIG_AF_RXRPC is not set
222# CONFIG_PHONET is not set
223# CONFIG_WIRELESS is not set
224# CONFIG_WIMAX is not set
225# CONFIG_RFKILL is not set
226# CONFIG_NET_9P is not set
227
228#
229# Device Drivers
230#
231
232#
233# Generic Driver Options
234#
235CONFIG_STANDALONE=y
236CONFIG_PREVENT_FIRMWARE_BUILD=y
237# CONFIG_DEBUG_DRIVER is not set
238# CONFIG_DEBUG_DEVRES is not set
239# CONFIG_SYS_HYPERVISOR is not set
240# CONFIG_CONNECTOR is not set
241# CONFIG_MTD is not set
242# CONFIG_PARPORT is not set
243CONFIG_BLK_DEV=y
244# CONFIG_BLK_DEV_COW_COMMON is not set
245# CONFIG_BLK_DEV_LOOP is not set
246# CONFIG_BLK_DEV_NBD is not set
247CONFIG_BLK_DEV_RAM=y
248CONFIG_BLK_DEV_RAM_COUNT=16
249CONFIG_BLK_DEV_RAM_SIZE=4096
250# CONFIG_BLK_DEV_XIP is not set
251# CONFIG_CDROM_PKTCDVD is not set
252# CONFIG_ATA_OVER_ETH is not set
253# CONFIG_BLK_DEV_HD is not set
254# CONFIG_MISC_DEVICES is not set
255CONFIG_HAVE_IDE=y
256# CONFIG_IDE is not set
257
258#
259# SCSI device support
260#
261# CONFIG_RAID_ATTRS is not set
262# CONFIG_SCSI is not set
263# CONFIG_SCSI_DMA is not set
264# CONFIG_SCSI_NETLINK is not set
265# CONFIG_ATA is not set
266# CONFIG_MD is not set
267# CONFIG_NETDEVICES is not set
268# CONFIG_ISDN is not set
269# CONFIG_PHONE is not set
270
271#
272# Input device support
273#
274# CONFIG_INPUT is not set
275
276#
277# Hardware I/O ports
278#
279# CONFIG_SERIO is not set
280# CONFIG_GAMEPORT is not set
281
282#
283# Character devices
284#
285# CONFIG_VT is not set
286# CONFIG_DEVKMEM is not set
287# CONFIG_SERIAL_NONSTANDARD is not set
288
289#
290# Serial drivers
291#
292CONFIG_SERIAL_8250=y
293CONFIG_SERIAL_8250_CONSOLE=y
294CONFIG_SERIAL_8250_NR_UARTS=2
295CONFIG_SERIAL_8250_RUNTIME_UARTS=2
296# CONFIG_SERIAL_8250_EXTENDED is not set
297
298#
299# Non-8250 serial port support
300#
301CONFIG_SERIAL_CORE=y
302CONFIG_SERIAL_CORE_CONSOLE=y
303CONFIG_UNIX98_PTYS=y
304# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
305# CONFIG_LEGACY_PTYS is not set
306# CONFIG_IPMI_HANDLER is not set
307# CONFIG_HW_RANDOM is not set
308# CONFIG_RTC is not set
309# CONFIG_GEN_RTC is not set
310# CONFIG_R3964 is not set
311# CONFIG_RAW_DRIVER is not set
312# CONFIG_TCG_TPM is not set
313# CONFIG_I2C is not set
314# CONFIG_SPI is not set
315CONFIG_ARCH_REQUIRE_GPIOLIB=y
316CONFIG_GPIOLIB=y
317# CONFIG_DEBUG_GPIO is not set
318# CONFIG_GPIO_SYSFS is not set
319
320#
321# Memory mapped GPIO expanders:
322#
323
324#
325# I2C GPIO expanders:
326#
327
328#
329# PCI GPIO expanders:
330#
331
332#
333# SPI GPIO expanders:
334#
335# CONFIG_W1 is not set
336# CONFIG_POWER_SUPPLY is not set
337# CONFIG_HWMON is not set
338# CONFIG_THERMAL is not set
339# CONFIG_THERMAL_HWMON is not set
340# CONFIG_WATCHDOG is not set
341CONFIG_SSB_POSSIBLE=y
342
343#
344# Sonics Silicon Backplane
345#
346# CONFIG_SSB is not set
347
348#
349# Multifunction device drivers
350#
351# CONFIG_MFD_CORE is not set
352# CONFIG_MFD_SM501 is not set
353# CONFIG_HTC_PASIC3 is not set
354# CONFIG_MFD_TMIO is not set
355# CONFIG_REGULATOR is not set
356
357#
358# Multimedia devices
359#
360
361#
362# Multimedia core support
363#
364# CONFIG_VIDEO_DEV is not set
365# CONFIG_DVB_CORE is not set
366# CONFIG_VIDEO_MEDIA is not set
367
368#
369# Multimedia drivers
370#
371# CONFIG_DAB is not set
372
373#
374# Graphics support
375#
376# CONFIG_VGASTATE is not set
377# CONFIG_VIDEO_OUTPUT_CONTROL is not set
378# CONFIG_FB is not set
379# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
380
381#
382# Display device support
383#
384# CONFIG_DISPLAY_SUPPORT is not set
385# CONFIG_SOUND is not set
386# CONFIG_USB_SUPPORT is not set
387# CONFIG_MMC is not set
388# CONFIG_MEMSTICK is not set
389# CONFIG_NEW_LEDS is not set
390# CONFIG_ACCESSIBILITY is not set
391# CONFIG_RTC_CLASS is not set
392# CONFIG_DMADEVICES is not set
393# CONFIG_UIO is not set
394# CONFIG_STAGING is not set
395
396#
397# File systems
398#
399# CONFIG_EXT2_FS is not set
400# CONFIG_EXT3_FS is not set
401# CONFIG_EXT4_FS is not set
402# CONFIG_REISERFS_FS is not set
403# CONFIG_JFS_FS is not set
404# CONFIG_FS_POSIX_ACL is not set
405CONFIG_FILE_LOCKING=y
406# CONFIG_XFS_FS is not set
407# CONFIG_OCFS2_FS is not set
408# CONFIG_BTRFS_FS is not set
409# CONFIG_DNOTIFY is not set
410# CONFIG_INOTIFY is not set
411# CONFIG_QUOTA is not set
412# CONFIG_AUTOFS_FS is not set
413# CONFIG_AUTOFS4_FS is not set
414# CONFIG_FUSE_FS is not set
415
416#
417# CD-ROM/DVD Filesystems
418#
419# CONFIG_ISO9660_FS is not set
420# CONFIG_UDF_FS is not set
421
422#
423# DOS/FAT/NT Filesystems
424#
425# CONFIG_MSDOS_FS is not set
426# CONFIG_VFAT_FS is not set
427# CONFIG_NTFS_FS is not set
428
429#
430# Pseudo filesystems
431#
432CONFIG_PROC_FS=y
433CONFIG_PROC_SYSCTL=y
434CONFIG_SYSFS=y
435# CONFIG_TMPFS is not set
436# CONFIG_HUGETLB_PAGE is not set
437# CONFIG_CONFIGFS_FS is not set
438# CONFIG_MISC_FILESYSTEMS is not set
439# CONFIG_NETWORK_FILESYSTEMS is not set
440
441#
442# Partition Types
443#
444# CONFIG_PARTITION_ADVANCED is not set
445CONFIG_MSDOS_PARTITION=y
446# CONFIG_NLS is not set
447# CONFIG_DLM is not set
448
449#
450# Xtensa initrd options
451#
452# CONFIG_EMBEDDED_RAMDISK is not set
453
454#
455# Kernel hacking
456#
457CONFIG_PRINTK_TIME=y
458# CONFIG_ENABLE_WARN_DEPRECATED is not set
459# CONFIG_ENABLE_MUST_CHECK is not set
460CONFIG_FRAME_WARN=1024
461# CONFIG_MAGIC_SYSRQ is not set
462# CONFIG_UNUSED_SYMBOLS is not set
463# CONFIG_DEBUG_FS is not set
464# CONFIG_HEADERS_CHECK is not set
465CONFIG_DEBUG_KERNEL=y
466CONFIG_DEBUG_SHIRQ=y
467CONFIG_DETECT_SOFTLOCKUP=y
468# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
469CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
470# CONFIG_SCHED_DEBUG is not set
471# CONFIG_SCHEDSTATS is not set
472# CONFIG_TIMER_STATS is not set
473# CONFIG_DEBUG_OBJECTS is not set
474# CONFIG_DEBUG_SLAB is not set
475# CONFIG_DEBUG_RT_MUTEXES is not set
476# CONFIG_RT_MUTEX_TESTER is not set
477CONFIG_DEBUG_SPINLOCK=y
478CONFIG_DEBUG_MUTEXES=y
479CONFIG_DEBUG_SPINLOCK_SLEEP=y
480# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
481# CONFIG_DEBUG_KOBJECT is not set
482# CONFIG_DEBUG_INFO is not set
483# CONFIG_DEBUG_VM is not set
484CONFIG_DEBUG_NOMMU_REGIONS=y
485# CONFIG_DEBUG_WRITECOUNT is not set
486# CONFIG_DEBUG_MEMORY_INIT is not set
487# CONFIG_DEBUG_LIST is not set
488# CONFIG_DEBUG_SG is not set
489# CONFIG_DEBUG_NOTIFIERS is not set
490# CONFIG_BOOT_PRINTK_DELAY is not set
491# CONFIG_RCU_TORTURE_TEST is not set
492# CONFIG_BACKTRACE_SELF_TEST is not set
493# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
494# CONFIG_FAULT_INJECTION is not set
495# CONFIG_SYSCTL_SYSCALL_CHECK is not set
496
497#
498# Tracers
499#
500# CONFIG_PREEMPT_TRACER is not set
501# CONFIG_SCHED_TRACER is not set
502# CONFIG_CONTEXT_SWITCH_TRACER is not set
503# CONFIG_BOOT_TRACER is not set
504# CONFIG_TRACE_BRANCH_PROFILING is not set
505# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
506# CONFIG_SAMPLES is not set
507
508#
509# Security options
510#
511# CONFIG_KEYS is not set
512# CONFIG_SECURITY is not set
513# CONFIG_SECURITYFS is not set
514# CONFIG_SECURITY_FILE_CAPABILITIES is not set
515# CONFIG_CRYPTO is not set
516
517#
518# Library routines
519#
520CONFIG_GENERIC_FIND_LAST_BIT=y
521# CONFIG_CRC_CCITT is not set
522# CONFIG_CRC16 is not set
523# CONFIG_CRC_T10DIF is not set
524# CONFIG_CRC_ITU_T is not set
525# CONFIG_CRC32 is not set
526# CONFIG_CRC7 is not set
527# CONFIG_LIBCRC32C is not set
528CONFIG_PLIST=y
529CONFIG_HAS_IOMEM=y
530CONFIG_HAS_DMA=y
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h
index 94c4c53a099e..8fc1c0c8de07 100644
--- a/arch/xtensa/include/asm/cacheflush.h
+++ b/arch/xtensa/include/asm/cacheflush.h
@@ -65,13 +65,17 @@ extern void __flush_invalidate_dcache_range(unsigned long, unsigned long);
65# define __flush_invalidate_dcache_range(p,s) __invalidate_dcache_range(p,s) 65# define __flush_invalidate_dcache_range(p,s) __invalidate_dcache_range(p,s)
66#endif 66#endif
67 67
68#if (DCACHE_WAY_SIZE > PAGE_SIZE) 68#if defined(CONFIG_MMU) && (DCACHE_WAY_SIZE > PAGE_SIZE)
69extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long); 69extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long);
70#else
71static inline void __flush_invalidate_dcache_page_alias(unsigned long virt,
72 unsigned long phys) { }
70#endif 73#endif
71#if (ICACHE_WAY_SIZE > PAGE_SIZE) 74#if defined(CONFIG_MMU) && (ICACHE_WAY_SIZE > PAGE_SIZE)
72extern void __invalidate_icache_page_alias(unsigned long, unsigned long); 75extern void __invalidate_icache_page_alias(unsigned long, unsigned long);
73#else 76#else
74# define __invalidate_icache_page_alias(v,p) do { } while(0) 77static inline void __invalidate_icache_page_alias(unsigned long virt,
78 unsigned long phys) { }
75#endif 79#endif
76 80
77/* 81/*
diff --git a/arch/xtensa/include/asm/dma.h b/arch/xtensa/include/asm/dma.h
index e30f3abf48f0..137ca3945b07 100644
--- a/arch/xtensa/include/asm/dma.h
+++ b/arch/xtensa/include/asm/dma.h
@@ -44,8 +44,9 @@
44 * the value desired). 44 * the value desired).
45 */ 45 */
46 46
47#ifndef MAX_DMA_ADDRESS
47#define MAX_DMA_ADDRESS (PAGE_OFFSET + XCHAL_KIO_SIZE - 1) 48#define MAX_DMA_ADDRESS (PAGE_OFFSET + XCHAL_KIO_SIZE - 1)
48 49#endif
49 50
50/* Reserve and release a DMA channel */ 51/* Reserve and release a DMA channel */
51extern int request_dma(unsigned int dmanr, const char * device_id); 52extern int request_dma(unsigned int dmanr, const char * device_id);
diff --git a/arch/xtensa/include/asm/flat.h b/arch/xtensa/include/asm/flat.h
new file mode 100644
index 000000000000..94c44abf15e4
--- /dev/null
+++ b/arch/xtensa/include/asm/flat.h
@@ -0,0 +1,12 @@
1#ifndef __ASM_XTENSA_FLAT_H
2#define __ASM_XTENSA_FLAT_H
3
4#define flat_argvp_envp_on_stack() 0
5#define flat_old_ram_flag(flags) (flags)
6#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
7#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp)
8#define flat_put_addr_at_rp(rp, val, relval ) put_unaligned(val, rp)
9#define flat_get_relocate_addr(rel) (rel)
10#define flat_set_persistent(relval, p) 0
11
12#endif /* __ASM_XTENSA_FLAT_H */
diff --git a/arch/xtensa/include/asm/ftrace.h b/arch/xtensa/include/asm/ftrace.h
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/xtensa/include/asm/ftrace.h
@@ -0,0 +1 @@
/* empty */
diff --git a/arch/xtensa/include/asm/gpio.h b/arch/xtensa/include/asm/gpio.h
new file mode 100644
index 000000000000..0763b0763960
--- /dev/null
+++ b/arch/xtensa/include/asm/gpio.h
@@ -0,0 +1,56 @@
1/*
2 * Generic GPIO API implementation for xtensa.
3 *
4 * Stolen from x86, which is derived from the generic GPIO API for powerpc:
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_XTENSA_GPIO_H
17#define _ASM_XTENSA_GPIO_H
18
19#include <asm-generic/gpio.h>
20
21#ifdef CONFIG_GPIOLIB
22
23/*
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41/*
42 * Not implemented, yet.
43 */
44static inline int gpio_to_irq(unsigned int gpio)
45{
46 return -ENOSYS;
47}
48
49static inline int irq_to_gpio(unsigned int irq)
50{
51 return -EINVAL;
52}
53
54#endif /* CONFIG_GPIOLIB */
55
56#endif /* _ASM_XTENSA_GPIO_H */
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h
index 07b7299dab20..d04cd3a625fa 100644
--- a/arch/xtensa/include/asm/io.h
+++ b/arch/xtensa/include/asm/io.h
@@ -69,21 +69,28 @@ static inline void * phys_to_virt(unsigned long address)
69 69
70static inline void *ioremap(unsigned long offset, unsigned long size) 70static inline void *ioremap(unsigned long offset, unsigned long size)
71{ 71{
72#ifdef CONFIG_MMU
72 if (offset >= XCHAL_KIO_PADDR 73 if (offset >= XCHAL_KIO_PADDR
73 && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) 74 && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
74 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR); 75 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
75
76 else 76 else
77 BUG(); 77 BUG();
78#else
79 return (void *)offset;
80#endif
78} 81}
79 82
80static inline void *ioremap_nocache(unsigned long offset, unsigned long size) 83static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
81{ 84{
85#ifdef CONFIG_MMU
82 if (offset >= XCHAL_KIO_PADDR 86 if (offset >= XCHAL_KIO_PADDR
83 && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) 87 && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
84 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR); 88 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
85 else 89 else
86 BUG(); 90 BUG();
91#else
92 return (void *)offset;
93#endif
87} 94}
88 95
89static inline void iounmap(void *addr) 96static inline void iounmap(void *addr)
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h
index 1620d1e0e695..dfac82dc52ad 100644
--- a/arch/xtensa/include/asm/irq.h
+++ b/arch/xtensa/include/asm/irq.h
@@ -14,6 +14,13 @@
14#include <platform/hardware.h> 14#include <platform/hardware.h>
15#include <variant/core.h> 15#include <variant/core.h>
16 16
17#ifdef CONFIG_VARIANT_IRQ_SWITCH
18#include <variant/irq.h>
19#else
20static inline void variant_irq_enable(unsigned int irq) { }
21static inline void variant_irq_disable(unsigned int irq) { }
22#endif
23
17#ifndef PLATFORM_NR_IRQS 24#ifndef PLATFORM_NR_IRQS
18# define PLATFORM_NR_IRQS 0 25# define PLATFORM_NR_IRQS 0
19#endif 26#endif
diff --git a/arch/xtensa/include/asm/mmu.h b/arch/xtensa/include/asm/mmu.h
index 44c5bb04c55c..04890d6e2335 100644
--- a/arch/xtensa/include/asm/mmu.h
+++ b/arch/xtensa/include/asm/mmu.h
@@ -11,7 +11,12 @@
11#ifndef _XTENSA_MMU_H 11#ifndef _XTENSA_MMU_H
12#define _XTENSA_MMU_H 12#define _XTENSA_MMU_H
13 13
14#ifndef CONFIG_MMU
15#include <asm/nommu.h>
16#else
17
14/* Default "unsigned long" context */ 18/* Default "unsigned long" context */
15typedef unsigned long mm_context_t; 19typedef unsigned long mm_context_t;
16 20
21#endif /* CONFIG_MMU */
17#endif /* _XTENSA_MMU_H */ 22#endif /* _XTENSA_MMU_H */
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h
index c0fd8e5b4513..dbd8731a876a 100644
--- a/arch/xtensa/include/asm/mmu_context.h
+++ b/arch/xtensa/include/asm/mmu_context.h
@@ -13,16 +13,20 @@
13#ifndef _XTENSA_MMU_CONTEXT_H 13#ifndef _XTENSA_MMU_CONTEXT_H
14#define _XTENSA_MMU_CONTEXT_H 14#define _XTENSA_MMU_CONTEXT_H
15 15
16#ifndef CONFIG_MMU
17#include <asm/nommu_context.h>
18#else
19
16#include <linux/stringify.h> 20#include <linux/stringify.h>
17#include <linux/sched.h> 21#include <linux/sched.h>
18 22
23#include <variant/core.h>
24
19#include <asm/pgtable.h> 25#include <asm/pgtable.h>
20#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
21#include <asm/tlbflush.h> 27#include <asm/tlbflush.h>
22#include <asm-generic/mm_hooks.h> 28#include <asm-generic/mm_hooks.h>
23 29
24#define XCHAL_MMU_ASID_BITS 8
25
26#if (XCHAL_HAVE_TLBS != 1) 30#if (XCHAL_HAVE_TLBS != 1)
27# error "Linux must have an MMU!" 31# error "Linux must have an MMU!"
28#endif 32#endif
@@ -133,4 +137,5 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
133 137
134} 138}
135 139
140#endif /* CONFIG_MMU */
136#endif /* _XTENSA_MMU_CONTEXT_H */ 141#endif /* _XTENSA_MMU_CONTEXT_H */
diff --git a/arch/xtensa/include/asm/nommu.h b/arch/xtensa/include/asm/nommu.h
new file mode 100644
index 000000000000..dce2c438c5ba
--- /dev/null
+++ b/arch/xtensa/include/asm/nommu.h
@@ -0,0 +1,3 @@
1typedef struct {
2 unsigned long end_brk;
3} mm_context_t;
diff --git a/arch/xtensa/include/asm/nommu_context.h b/arch/xtensa/include/asm/nommu_context.h
new file mode 100644
index 000000000000..599e7a2e729d
--- /dev/null
+++ b/arch/xtensa/include/asm/nommu_context.h
@@ -0,0 +1,25 @@
1static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
2{
3}
4
5static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
6{
7 return 0;
8}
9
10static inline void destroy_context(struct mm_struct *mm)
11{
12}
13
14static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
15{
16}
17
18static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
19 struct task_struct *tsk)
20{
21}
22
23static inline void deactivate_mm(struct task_struct *tsk, struct mm_struct *mm)
24{
25}
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h
index 11f7dc2dbec7..17e0c5383b10 100644
--- a/arch/xtensa/include/asm/page.h
+++ b/arch/xtensa/include/asm/page.h
@@ -14,6 +14,7 @@
14#include <asm/processor.h> 14#include <asm/processor.h>
15#include <asm/types.h> 15#include <asm/types.h>
16#include <asm/cache.h> 16#include <asm/cache.h>
17#include <platform/hardware.h>
17 18
18/* 19/*
19 * Fixed TLB translations in the processor. 20 * Fixed TLB translations in the processor.
@@ -32,8 +33,14 @@
32#define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) 33#define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
33#define PAGE_MASK (~(PAGE_SIZE-1)) 34#define PAGE_MASK (~(PAGE_SIZE-1))
34 35
36#ifdef CONFIG_MMU
35#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 37#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR
36#define MAX_MEM_PFN XCHAL_KSEG_SIZE 38#define MAX_MEM_PFN XCHAL_KSEG_SIZE
39#else
40#define PAGE_OFFSET 0
41#define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
42#endif
43
37#define PGTABLE_START 0x80000000 44#define PGTABLE_START 0x80000000
38 45
39/* 46/*
@@ -150,9 +157,11 @@ extern void copy_user_page(void*, void*, unsigned long, struct page*);
150 * addresses. 157 * addresses.
151 */ 158 */
152 159
160#define ARCH_PFN_OFFSET (PLATFORM_DEFAULT_MEM_START >> PAGE_SHIFT)
161
153#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) 162#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
154#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) 163#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
155#define pfn_valid(pfn) ((unsigned long)pfn < max_mapnr) 164#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
156#ifdef CONFIG_DISCONTIGMEM 165#ifdef CONFIG_DISCONTIGMEM
157# error CONFIG_DISCONTIGMEM not supported 166# error CONFIG_DISCONTIGMEM not supported
158#endif 167#endif
@@ -162,8 +171,9 @@ extern void copy_user_page(void*, void*, unsigned long, struct page*);
162#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 171#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
163#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 172#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
164 173
174#ifdef CONFIG_MMU
165#define WANT_PAGE_VIRTUAL 175#define WANT_PAGE_VIRTUAL
166 176#endif
167 177
168#endif /* __ASSEMBLY__ */ 178#endif /* __ASSEMBLY__ */
169 179
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h
index 8014d96b21f1..a138770c358e 100644
--- a/arch/xtensa/include/asm/pgtable.h
+++ b/arch/xtensa/include/asm/pgtable.h
@@ -183,7 +183,15 @@ extern unsigned long empty_zero_page[1024];
183 183
184#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) 184#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
185 185
186#ifdef CONFIG_MMU
186extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)]; 187extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
188extern void paging_init(void);
189extern void pgtable_cache_init(void);
190#else
191# define swapper_pg_dir NULL
192static inline void paging_init(void) { }
193static inline void pgtable_cache_init(void) { }
194#endif
187 195
188/* 196/*
189 * The pmd contains the kernel virtual address of the pte page. 197 * The pmd contains the kernel virtual address of the pte page.
@@ -383,8 +391,6 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
383 391
384#else 392#else
385 393
386extern void paging_init(void);
387
388#define kern_addr_valid(addr) (1) 394#define kern_addr_valid(addr) (1)
389 395
390extern void update_mmu_cache(struct vm_area_struct * vma, 396extern void update_mmu_cache(struct vm_area_struct * vma,
@@ -398,9 +404,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
398#define io_remap_pfn_range(vma,from,pfn,size,prot) \ 404#define io_remap_pfn_range(vma,from,pfn,size,prot) \
399 remap_pfn_range(vma, from, pfn, size, prot) 405 remap_pfn_range(vma, from, pfn, size, prot)
400 406
401
402extern void pgtable_cache_init(void);
403
404typedef pte_t *pte_addr_t; 407typedef pte_t *pte_addr_t;
405 408
406#endif /* !defined (__ASSEMBLY__) */ 409#endif /* !defined (__ASSEMBLY__) */
diff --git a/arch/xtensa/include/asm/platform.h b/arch/xtensa/include/asm/platform.h
index e3d5a48ad495..7d936e58e9be 100644
--- a/arch/xtensa/include/asm/platform.h
+++ b/arch/xtensa/include/asm/platform.h
@@ -74,16 +74,5 @@ extern int platform_pcibios_fixup (void);
74 */ 74 */
75extern void platform_calibrate_ccount (void); 75extern void platform_calibrate_ccount (void);
76 76
77/*
78 * platform_get_rtc_time returns RTC seconds (returns 0 for no error)
79 */
80extern int platform_get_rtc_time(time_t*);
81
82/*
83 * platform_set_rtc_time set RTC seconds (returns 0 for no error)
84 */
85extern int platform_set_rtc_time(time_t);
86
87
88#endif /* _XTENSA_PLATFORM_H */ 77#endif /* _XTENSA_PLATFORM_H */
89 78
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
index 07387d3b99f4..0ea4937c0b61 100644
--- a/arch/xtensa/include/asm/processor.h
+++ b/arch/xtensa/include/asm/processor.h
@@ -13,6 +13,7 @@
13 13
14#include <variant/core.h> 14#include <variant/core.h>
15#include <asm/coprocessor.h> 15#include <asm/coprocessor.h>
16#include <platform/hardware.h>
16 17
17#include <linux/compiler.h> 18#include <linux/compiler.h>
18#include <asm/ptrace.h> 19#include <asm/ptrace.h>
@@ -25,6 +26,8 @@
25# error Linux requires the Xtensa Windowed Registers Option. 26# error Linux requires the Xtensa Windowed Registers Option.
26#endif 27#endif
27 28
29#define ARCH_SLAB_MINALIGN XCHAL_DATA_WIDTH
30
28/* 31/*
29 * User space process size: 1 GB. 32 * User space process size: 1 GB.
30 * Windowed call ABI requires caller and callee to be located within the same 33 * Windowed call ABI requires caller and callee to be located within the same
@@ -33,7 +36,12 @@
33 * the 1 GB requirement applies to the stack as well. 36 * the 1 GB requirement applies to the stack as well.
34 */ 37 */
35 38
39#ifdef CONFIG_MMU
36#define TASK_SIZE __XTENSA_UL_CONST(0x40000000) 40#define TASK_SIZE __XTENSA_UL_CONST(0x40000000)
41#else
42#define TASK_SIZE (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
43#endif
44
37#define STACK_TOP TASK_SIZE 45#define STACK_TOP TASK_SIZE
38#define STACK_TOP_MAX STACK_TOP 46#define STACK_TOP_MAX STACK_TOP
39 47
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index a51d36a27389..80d24c485fd3 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -1463,6 +1463,7 @@ ENTRY(_spill_registers)
1463 callx0 a0 # should not return 1463 callx0 a0 # should not return
14641: j 1b 14641: j 1b
1465 1465
1466#ifdef CONFIG_MMU
1466/* 1467/*
1467 * We should never get here. Bail out! 1468 * We should never get here. Bail out!
1468 */ 1469 */
@@ -1775,7 +1776,7 @@ ENTRY(fast_store_prohibited)
1775 bbsi.l a2, PS_UM_BIT, 1f 1776 bbsi.l a2, PS_UM_BIT, 1f
1776 j _kernel_exception 1777 j _kernel_exception
17771: j _user_exception 17781: j _user_exception
1778 1779#endif /* CONFIG_MMU */
1779 1780
1780/* 1781/*
1781 * System Calls. 1782 * System Calls.
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index 67e69139520b..0817f9db836e 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -53,7 +53,7 @@ _start: _j 2f
532: l32r a0, 1b 532: l32r a0, 1b
54 jx a0 54 jx a0
55 55
56 .text 56 .section .init.text, "ax"
57 .align 4 57 .align 4
58_startup: 58_startup:
59 59
@@ -235,8 +235,9 @@ should_never_return:
235 */ 235 */
236 236
237.section ".bss.page_aligned", "w" 237.section ".bss.page_aligned", "w"
238#ifdef CONFIG_MMU
238ENTRY(swapper_pg_dir) 239ENTRY(swapper_pg_dir)
239 .fill PAGE_SIZE, 1, 0 240 .fill PAGE_SIZE, 1, 0
241#endif
240ENTRY(empty_zero_page) 242ENTRY(empty_zero_page)
241 .fill PAGE_SIZE, 1, 0 243 .fill PAGE_SIZE, 1, 0
242
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index f3b66fba5b8f..a36c85edd045 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -132,6 +132,18 @@ static void xtensa_irq_unmask(unsigned int irq)
132 set_sr (cached_irq_mask, INTENABLE); 132 set_sr (cached_irq_mask, INTENABLE);
133} 133}
134 134
135static void xtensa_irq_enable(unsigned int irq)
136{
137 variant_irq_enable(irq);
138 xtensa_irq_unmask(irq);
139}
140
141static void xtensa_irq_disable(unsigned int irq)
142{
143 xtensa_irq_mask(irq);
144 variant_irq_disable(irq);
145}
146
135static void xtensa_irq_ack(unsigned int irq) 147static void xtensa_irq_ack(unsigned int irq)
136{ 148{
137 set_sr(1 << irq, INTCLEAR); 149 set_sr(1 << irq, INTCLEAR);
@@ -146,6 +158,8 @@ static int xtensa_irq_retrigger(unsigned int irq)
146 158
147static struct irq_chip xtensa_irq_chip = { 159static struct irq_chip xtensa_irq_chip = {
148 .name = "xtensa", 160 .name = "xtensa",
161 .enable = xtensa_irq_enable,
162 .disable = xtensa_irq_disable,
149 .mask = xtensa_irq_mask, 163 .mask = xtensa_irq_mask,
150 .unmask = xtensa_irq_unmask, 164 .unmask = xtensa_irq_unmask,
151 .ack = xtensa_irq_ack, 165 .ack = xtensa_irq_ack,
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c
index 69675f216062..1b91a97f1d84 100644
--- a/arch/xtensa/kernel/platform.c
+++ b/arch/xtensa/kernel/platform.c
@@ -36,8 +36,6 @@ _F(void, power_off, (void), { while(1); });
36_F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); }); 36_F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); });
37_F(void, heartbeat, (void), { }); 37_F(void, heartbeat, (void), { });
38_F(int, pcibios_fixup, (void), { return 0; }); 38_F(int, pcibios_fixup, (void), { return 0; });
39_F(int, get_rtc_time, (time_t* t), { return 0; });
40_F(int, set_rtc_time, (time_t t), { return 0; });
41 39
42#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 40#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
43_F(void, calibrate_ccount, (void), 41_F(void, calibrate_ccount, (void),
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index 9185597eb6a0..031f36685710 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -172,7 +172,7 @@ void prepare_to_copy(struct task_struct *tsk)
172 * childregs. 172 * childregs.
173 */ 173 */
174 174
175int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 175int copy_thread(unsigned long clone_flags, unsigned long usp,
176 unsigned long unused, 176 unsigned long unused,
177 struct task_struct * p, struct pt_regs * regs) 177 struct task_struct * p, struct pt_regs * regs)
178{ 178{
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 4ec1633c2941..1e5a034fe011 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -84,7 +84,13 @@ sysmem_info_t __initdata sysmem;
84int initrd_is_mapped; 84int initrd_is_mapped;
85#endif 85#endif
86 86
87#ifdef CONFIG_MMU
87extern void init_mmu(void); 88extern void init_mmu(void);
89#else
90static inline void init_mmu(void) { }
91#endif
92
93extern void zones_init(void);
88 94
89/* 95/*
90 * Boot parameter parsing. 96 * Boot parameter parsing.
@@ -286,6 +292,7 @@ void __init setup_arch(char **cmdline_p)
286 292
287 293
288 paging_init(); 294 paging_init();
295 zones_init();
289 296
290#ifdef CONFIG_VT 297#ifdef CONFIG_VT
291# if defined(CONFIG_VGA_CONSOLE) 298# if defined(CONFIG_VGA_CONSOLE)
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 8df1e842f6d4..8848120d291b 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -14,7 +14,7 @@
14 14
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/time.h> 16#include <linux/time.h>
17#include <linux/timex.h> 17#include <linux/clocksource.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/init.h> 20#include <linux/init.h>
@@ -25,27 +25,31 @@
25#include <asm/timex.h> 25#include <asm/timex.h>
26#include <asm/platform.h> 26#include <asm/platform.h>
27 27
28
29DEFINE_SPINLOCK(rtc_lock);
30EXPORT_SYMBOL(rtc_lock);
31
32
33#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 28#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
34unsigned long ccount_per_jiffy; /* per 1/HZ */ 29unsigned long ccount_per_jiffy; /* per 1/HZ */
35unsigned long nsec_per_ccount; /* nsec per ccount increment */ 30unsigned long nsec_per_ccount; /* nsec per ccount increment */
36#endif 31#endif
37 32
38static long last_rtc_update = 0; 33static cycle_t ccount_read(void)
39
40/*
41 * Scheduler clock - returns current tim in nanosec units.
42 */
43
44unsigned long long sched_clock(void)
45{ 34{
46 return (unsigned long long)jiffies * (1000000000 / HZ); 35 return (cycle_t)get_ccount();
47} 36}
48 37
38static struct clocksource ccount_clocksource = {
39 .name = "ccount",
40 .rating = 200,
41 .read = ccount_read,
42 .mask = CLOCKSOURCE_MASK(32),
43 /*
44 * With a shift of 22 the lower limit of the cpu clock is
45 * 1MHz, where NSEC_PER_CCOUNT is 1000 or a bit less than
46 * 2^10: Since we have 32 bits and the multiplicator can
47 * already take up as much as 10 bits, this leaves us with
48 * remaining upper 22 bits.
49 */
50 .shift = 22,
51};
52
49static irqreturn_t timer_interrupt(int irq, void *dev_id); 53static irqreturn_t timer_interrupt(int irq, void *dev_id);
50static struct irqaction timer_irqaction = { 54static struct irqaction timer_irqaction = {
51 .handler = timer_interrupt, 55 .handler = timer_interrupt,
@@ -55,11 +59,11 @@ static struct irqaction timer_irqaction = {
55 59
56void __init time_init(void) 60void __init time_init(void)
57{ 61{
58 time_t sec_o, sec_n = 0; 62 xtime.tv_nsec = 0;
63 xtime.tv_sec = read_persistent_clock();
59 64
60 /* The platform must provide a function to calibrate the processor 65 set_normalized_timespec(&wall_to_monotonic,
61 * speed for the CALIBRATE. 66 -xtime.tv_sec, -xtime.tv_nsec);
62 */
63 67
64#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 68#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
65 printk("Calibrating CPU frequency "); 69 printk("Calibrating CPU frequency ");
@@ -67,19 +71,10 @@ void __init time_init(void)
67 printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ), 71 printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ),
68 (int)(ccount_per_jiffy/(10000/HZ))%100); 72 (int)(ccount_per_jiffy/(10000/HZ))%100);
69#endif 73#endif
70 74 ccount_clocksource.mult =
71 /* Set time from RTC (if provided) */ 75 clocksource_hz2mult(CCOUNT_PER_JIFFY * HZ,
72 76 ccount_clocksource.shift);
73 if (platform_get_rtc_time(&sec_o) == 0) 77 clocksource_register(&ccount_clocksource);
74 while (platform_get_rtc_time(&sec_n))
75 if (sec_o != sec_n)
76 break;
77
78 xtime.tv_nsec = 0;
79 last_rtc_update = xtime.tv_sec = sec_n;
80
81 set_normalized_timespec(&wall_to_monotonic,
82 -xtime.tv_sec, -xtime.tv_nsec);
83 78
84 /* Initialize the linux timer interrupt. */ 79 /* Initialize the linux timer interrupt. */
85 80
@@ -87,69 +82,6 @@ void __init time_init(void)
87 set_linux_timer(get_ccount() + CCOUNT_PER_JIFFY); 82 set_linux_timer(get_ccount() + CCOUNT_PER_JIFFY);
88} 83}
89 84
90
91int do_settimeofday(struct timespec *tv)
92{
93 time_t wtm_sec, sec = tv->tv_sec;
94 long wtm_nsec, nsec = tv->tv_nsec;
95 unsigned long delta;
96
97 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
98 return -EINVAL;
99
100 write_seqlock_irq(&xtime_lock);
101
102 /* This is revolting. We need to set "xtime" correctly. However, the
103 * value in this location is the value at the most recent update of
104 * wall time. Discover what correction gettimeofday() would have
105 * made, and then undo it!
106 */
107
108 delta = CCOUNT_PER_JIFFY;
109 delta += get_ccount() - get_linux_timer();
110 nsec -= delta * NSEC_PER_CCOUNT;
111
112 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
113 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
114
115 set_normalized_timespec(&xtime, sec, nsec);
116 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
117
118 ntp_clear();
119 write_sequnlock_irq(&xtime_lock);
120 return 0;
121}
122
123EXPORT_SYMBOL(do_settimeofday);
124
125
126void do_gettimeofday(struct timeval *tv)
127{
128 unsigned long flags;
129 unsigned long volatile sec, usec, delta, seq;
130
131 do {
132 seq = read_seqbegin_irqsave(&xtime_lock, flags);
133
134 sec = xtime.tv_sec;
135 usec = (xtime.tv_nsec / NSEC_PER_USEC);
136
137 delta = get_linux_timer() - get_ccount();
138
139 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
140
141 usec += (((unsigned long) CCOUNT_PER_JIFFY - delta)
142 * (unsigned long) NSEC_PER_CCOUNT) / NSEC_PER_USEC;
143
144 for (; usec >= 1000000; sec++, usec -= 1000000)
145 ;
146
147 tv->tv_sec = sec;
148 tv->tv_usec = usec;
149}
150
151EXPORT_SYMBOL(do_gettimeofday);
152
153/* 85/*
154 * The timer interrupt is called HZ times per second. 86 * The timer interrupt is called HZ times per second.
155 */ 87 */
@@ -178,16 +110,6 @@ again:
178 next += CCOUNT_PER_JIFFY; 110 next += CCOUNT_PER_JIFFY;
179 set_linux_timer(next); 111 set_linux_timer(next);
180 112
181 if (ntp_synced() &&
182 xtime.tv_sec - last_rtc_update >= 659 &&
183 abs((xtime.tv_nsec/1000)-(1000000-1000000/HZ))<5000000/HZ) {
184
185 if (platform_set_rtc_time(xtime.tv_sec+1) == 0)
186 last_rtc_update = xtime.tv_sec+1;
187 else
188 /* Do it again in 60 s */
189 last_rtc_update += 60;
190 }
191 write_sequnlock(&xtime_lock); 113 write_sequnlock(&xtime_lock);
192 } 114 }
193 115
@@ -213,4 +135,3 @@ void __cpuinit calibrate_delay(void)
213 (loops_per_jiffy/(10000/HZ)) % 100); 135 (loops_per_jiffy/(10000/HZ)) % 100);
214} 136}
215#endif 137#endif
216
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index c44f830b6c7a..9f0b71189e94 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -104,6 +104,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = {
104#endif 104#endif
105{ EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, 105{ EXCCAUSE_UNALIGNED, KRNL, fast_unaligned },
106#endif 106#endif
107#ifdef CONFIG_MMU
107{ EXCCAUSE_ITLB_MISS, 0, do_page_fault }, 108{ EXCCAUSE_ITLB_MISS, 0, do_page_fault },
108{ EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, 109{ EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss},
109{ EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, 110{ EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit },
@@ -118,6 +119,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = {
118{ EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, 119{ EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited },
119{ EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, 120{ EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault },
120{ EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, 121{ EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault },
122#endif /* CONFIG_MMU */
121/* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ 123/* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */
122#if XTENSA_HAVE_COPROCESSOR(0) 124#if XTENSA_HAVE_COPROCESSOR(0)
123COPROCESSOR(0), 125COPROCESSOR(0),
@@ -372,11 +374,10 @@ void show_trace(struct task_struct *task, unsigned long *sp)
372 unsigned long a0, a1, pc; 374 unsigned long a0, a1, pc;
373 unsigned long sp_start, sp_end; 375 unsigned long sp_start, sp_end;
374 376
375 a1 = (unsigned long)sp; 377 if (sp)
376 378 a1 = (unsigned long)sp;
377 if (a1 == 0) 379 else
378 __asm__ __volatile__ ("mov %0, a1\n" : "=a"(a1)); 380 a1 = task->thread.sp;
379
380 381
381 sp_start = a1 & ~(THREAD_SIZE-1); 382 sp_start = a1 & ~(THREAD_SIZE-1);
382 sp_end = sp_start + THREAD_SIZE; 383 sp_end = sp_start + THREAD_SIZE;
@@ -418,9 +419,8 @@ void show_stack(struct task_struct *task, unsigned long *sp)
418 int i = 0; 419 int i = 0;
419 unsigned long *stack; 420 unsigned long *stack;
420 421
421 if (sp == 0) 422 if (!sp)
422 __asm__ __volatile__ ("mov %0, a1\n" : "=a"(sp)); 423 sp = (unsigned long *)task->thread.sp;
423
424 stack = sp; 424 stack = sp;
425 425
426 printk("\nStack: "); 426 printk("\nStack: ");
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S
index eb2d7bb69ee0..74a7518faf16 100644
--- a/arch/xtensa/kernel/vectors.S
+++ b/arch/xtensa/kernel/vectors.S
@@ -309,6 +309,7 @@ ENTRY(_DoubleExceptionVector)
309 * All other exceptions are unexpected and thus unrecoverable! 309 * All other exceptions are unexpected and thus unrecoverable!
310 */ 310 */
311 311
312#ifdef CONFIG_MMU
312 .extern fast_second_level_miss_double_kernel 313 .extern fast_second_level_miss_double_kernel
313 314
314.Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ 315.Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */
@@ -319,6 +320,9 @@ ENTRY(_DoubleExceptionVector)
319 bnez a3, .Lunrecoverable 320 bnez a3, .Lunrecoverable
3201: movi a3, fast_second_level_miss_double_kernel 3211: movi a3, fast_second_level_miss_double_kernel
321 jx a3 322 jx a3
323#else
324.equ .Lksp, .Lunrecoverable
325#endif
322 326
323 /* Critical! We can't handle this situation. PANIC! */ 327 /* Critical! We can't handle this situation. PANIC! */
324 328
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index d506774f4b05..c1be9a4a740c 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -17,6 +17,7 @@
17#include <asm-generic/vmlinux.lds.h> 17#include <asm-generic/vmlinux.lds.h>
18 18
19#include <variant/core.h> 19#include <variant/core.h>
20#include <platform/hardware.h>
20OUTPUT_ARCH(xtensa) 21OUTPUT_ARCH(xtensa)
21ENTRY(_start) 22ENTRY(_start)
22 23
@@ -26,7 +27,9 @@ jiffies = jiffies_64 + 4;
26jiffies = jiffies_64; 27jiffies = jiffies_64;
27#endif 28#endif
28 29
30#ifndef KERNELOFFSET
29#define KERNELOFFSET 0xd0001000 31#define KERNELOFFSET 0xd0001000
32#endif
30 33
31/* Note: In the following macros, it would be nice to specify only the 34/* Note: In the following macros, it would be nice to specify only the
32 vector name and section kind and construct "sym" and "section" using 35 vector name and section kind and construct "sym" and "section" using
diff --git a/arch/xtensa/mm/Makefile b/arch/xtensa/mm/Makefile
index 64e304a2f884..f0b646d2f843 100644
--- a/arch/xtensa/mm/Makefile
+++ b/arch/xtensa/mm/Makefile
@@ -2,4 +2,5 @@
2# Makefile for the Linux/Xtensa-specific parts of the memory manager. 2# Makefile for the Linux/Xtensa-specific parts of the memory manager.
3# 3#
4 4
5obj-y := init.o fault.o tlb.o misc.o cache.o 5obj-y := init.o cache.o misc.o
6obj-$(CONFIG_MMU) += fault.o mmu.o tlb.o
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 34163cfaaffc..427e14fa43c5 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -24,15 +24,8 @@
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26 26
27#include <asm/pgtable.h>
28#include <asm/bootparam.h> 27#include <asm/bootparam.h>
29#include <asm/mmu_context.h>
30#include <asm/tlb.h>
31#include <asm/page.h> 28#include <asm/page.h>
32#include <asm/pgalloc.h>
33
34
35DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
36 29
37/* References to section boundaries */ 30/* References to section boundaries */
38 31
@@ -130,7 +123,8 @@ void __init bootmem_init(void)
130 123
131 /* Find an area to use for the bootmem bitmap. */ 124 /* Find an area to use for the bootmem bitmap. */
132 125
133 bootmap_size = bootmem_bootmap_pages(max_low_pfn) << PAGE_SHIFT; 126 bootmap_size = bootmem_bootmap_pages(max_low_pfn - min_low_pfn);
127 bootmap_size <<= PAGE_SHIFT;
134 bootmap_start = ~0; 128 bootmap_start = ~0;
135 129
136 for (i=0; i<sysmem.nr_banks; i++) 130 for (i=0; i<sysmem.nr_banks; i++)
@@ -145,8 +139,9 @@ void __init bootmem_init(void)
145 /* Reserve the bootmem bitmap area */ 139 /* Reserve the bootmem bitmap area */
146 140
147 mem_reserve(bootmap_start, bootmap_start + bootmap_size, 1); 141 mem_reserve(bootmap_start, bootmap_start + bootmap_size, 1);
148 bootmap_size = init_bootmem_node(NODE_DATA(0), min_low_pfn, 142 bootmap_size = init_bootmem_node(NODE_DATA(0),
149 bootmap_start >> PAGE_SHIFT, 143 bootmap_start >> PAGE_SHIFT,
144 min_low_pfn,
150 max_low_pfn); 145 max_low_pfn);
151 146
152 /* Add all remaining memory pieces into the bootmem map */ 147 /* Add all remaining memory pieces into the bootmem map */
@@ -158,14 +153,14 @@ void __init bootmem_init(void)
158} 153}
159 154
160 155
161void __init paging_init(void) 156void __init zones_init(void)
162{ 157{
163 unsigned long zones_size[MAX_NR_ZONES]; 158 unsigned long zones_size[MAX_NR_ZONES];
164 int i; 159 int i;
165 160
166 /* All pages are DMA-able, so we put them all in the DMA zone. */ 161 /* All pages are DMA-able, so we put them all in the DMA zone. */
167 162
168 zones_size[ZONE_DMA] = max_low_pfn; 163 zones_size[ZONE_DMA] = max_low_pfn - ARCH_PFN_OFFSET;
169 for (i = 1; i < MAX_NR_ZONES; i++) 164 for (i = 1; i < MAX_NR_ZONES; i++)
170 zones_size[i] = 0; 165 zones_size[i] = 0;
171 166
@@ -173,40 +168,7 @@ void __init paging_init(void)
173 zones_size[ZONE_HIGHMEM] = max_pfn - max_low_pfn; 168 zones_size[ZONE_HIGHMEM] = max_pfn - max_low_pfn;
174#endif 169#endif
175 170
176 /* Initialize the kernel's page tables. */ 171 free_area_init_node(0, zones_size, ARCH_PFN_OFFSET, NULL);
177
178 memset(swapper_pg_dir, 0, PAGE_SIZE);
179
180 free_area_init(zones_size);
181}
182
183/*
184 * Flush the mmu and reset associated register to default values.
185 */
186
187void __init init_mmu (void)
188{
189 /* Writing zeros to the <t>TLBCFG special registers ensure
190 * that valid values exist in the register. For existing
191 * PGSZID<w> fields, zero selects the first element of the
192 * page-size array. For nonexistent PGSZID<w> fields, zero is
193 * the best value to write. Also, when changing PGSZID<w>
194 * fields, the corresponding TLB must be flushed.
195 */
196 set_itlbcfg_register (0);
197 set_dtlbcfg_register (0);
198 flush_tlb_all ();
199
200 /* Set rasid register to a known value. */
201
202 set_rasid_register (ASID_USER_FIRST);
203
204 /* Set PTEVADDR special register to the start of the page
205 * table, which is in kernel mappable space (ie. not
206 * statically mapped). This register's value is undefined on
207 * reset.
208 */
209 set_ptevaddr_register (PGTABLE_START);
210} 172}
211 173
212/* 174/*
@@ -218,8 +180,8 @@ void __init mem_init(void)
218 unsigned long codesize, reservedpages, datasize, initsize; 180 unsigned long codesize, reservedpages, datasize, initsize;
219 unsigned long highmemsize, tmp, ram; 181 unsigned long highmemsize, tmp, ram;
220 182
221 max_mapnr = num_physpages = max_low_pfn; 183 max_mapnr = num_physpages = max_low_pfn - ARCH_PFN_OFFSET;
222 high_memory = (void *) __va(max_mapnr << PAGE_SHIFT); 184 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
223 highmemsize = 0; 185 highmemsize = 0;
224 186
225#ifdef CONFIG_HIGHMEM 187#ifdef CONFIG_HIGHMEM
@@ -229,7 +191,7 @@ void __init mem_init(void)
229 totalram_pages += free_all_bootmem(); 191 totalram_pages += free_all_bootmem();
230 192
231 reservedpages = ram = 0; 193 reservedpages = ram = 0;
232 for (tmp = 0; tmp < max_low_pfn; tmp++) { 194 for (tmp = 0; tmp < max_mapnr; tmp++) {
233 ram++; 195 ram++;
234 if (PageReserved(mem_map+tmp)) 196 if (PageReserved(mem_map+tmp))
235 reservedpages++; 197 reservedpages++;
@@ -279,23 +241,3 @@ void free_initmem(void)
279 printk("Freeing unused kernel memory: %dk freed\n", 241 printk("Freeing unused kernel memory: %dk freed\n",
280 (&__init_end - &__init_begin) >> 10); 242 (&__init_end - &__init_begin) >> 10);
281} 243}
282
283struct kmem_cache *pgtable_cache __read_mostly;
284
285static void pgd_ctor(void* addr)
286{
287 pte_t* ptep = (pte_t*)addr;
288 int i;
289
290 for (i = 0; i < 1024; i++, ptep++)
291 pte_clear(NULL, 0, ptep);
292
293}
294
295void __init pgtable_cache_init(void)
296{
297 pgtable_cache = kmem_cache_create("pgd",
298 PAGE_SIZE, PAGE_SIZE,
299 SLAB_HWCACHE_ALIGN,
300 pgd_ctor);
301}
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S
index c885664211d1..b048406d8756 100644
--- a/arch/xtensa/mm/misc.S
+++ b/arch/xtensa/mm/misc.S
@@ -84,6 +84,7 @@ ENTRY(copy_page)
84 84
85 retw 85 retw
86 86
87#ifdef CONFIG_MMU
87/* 88/*
88 * If we have to deal with cache aliasing, we use temporary memory mappings 89 * If we have to deal with cache aliasing, we use temporary memory mappings
89 * to ensure that the source and destination pages have the same color as 90 * to ensure that the source and destination pages have the same color as
@@ -311,6 +312,7 @@ ENTRY(__invalidate_icache_page_alias)
311/* End of special treatment in tlb miss exception */ 312/* End of special treatment in tlb miss exception */
312 313
313ENTRY(__tlbtemp_mapping_end) 314ENTRY(__tlbtemp_mapping_end)
315#endif /* CONFIG_MMU
314 316
315/* 317/*
316 * void __invalidate_icache_page(ulong start) 318 * void __invalidate_icache_page(ulong start)
diff --git a/arch/xtensa/mm/mmu.c b/arch/xtensa/mm/mmu.c
new file mode 100644
index 000000000000..4bb91a970f1f
--- /dev/null
+++ b/arch/xtensa/mm/mmu.c
@@ -0,0 +1,70 @@
1/*
2 * xtensa mmu stuff
3 *
4 * Extracted from init.c
5 */
6#include <linux/percpu.h>
7#include <linux/init.h>
8#include <linux/string.h>
9#include <linux/slab.h>
10#include <linux/cache.h>
11
12#include <asm/tlb.h>
13#include <asm/tlbflush.h>
14#include <asm/mmu_context.h>
15#include <asm/page.h>
16
17DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
18
19void __init paging_init(void)
20{
21 memset(swapper_pg_dir, 0, PAGE_SIZE);
22}
23
24/*
25 * Flush the mmu and reset associated register to default values.
26 */
27void __init init_mmu(void)
28{
29 /* Writing zeros to the <t>TLBCFG special registers ensure
30 * that valid values exist in the register. For existing
31 * PGSZID<w> fields, zero selects the first element of the
32 * page-size array. For nonexistent PGSZID<w> fields, zero is
33 * the best value to write. Also, when changing PGSZID<w>
34 * fields, the corresponding TLB must be flushed.
35 */
36 set_itlbcfg_register(0);
37 set_dtlbcfg_register(0);
38 flush_tlb_all();
39
40 /* Set rasid register to a known value. */
41
42 set_rasid_register(ASID_USER_FIRST);
43
44 /* Set PTEVADDR special register to the start of the page
45 * table, which is in kernel mappable space (ie. not
46 * statically mapped). This register's value is undefined on
47 * reset.
48 */
49 set_ptevaddr_register(PGTABLE_START);
50}
51
52struct kmem_cache *pgtable_cache __read_mostly;
53
54static void pgd_ctor(void *addr)
55{
56 pte_t *ptep = (pte_t *)addr;
57 int i;
58
59 for (i = 0; i < 1024; i++, ptep++)
60 pte_clear(NULL, 0, ptep);
61
62}
63
64void __init pgtable_cache_init(void)
65{
66 pgtable_cache = kmem_cache_create("pgd",
67 PAGE_SIZE, PAGE_SIZE,
68 SLAB_HWCACHE_ALIGN,
69 pgd_ctor);
70}
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 25d46c84eb08..4c559cf7da2d 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -18,6 +18,7 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/major.h> 19#include <linux/major.h>
20#include <linux/param.h> 20#include <linux/param.h>
21#include <linux/seq_file.h>
21#include <linux/serial.h> 22#include <linux/serial.h>
22#include <linux/serialP.h> 23#include <linux/serialP.h>
23 24
@@ -176,22 +177,24 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
176 /* Stub, once again.. */ 177 /* Stub, once again.. */
177} 178}
178 179
179static int rs_read_proc(char *page, char **start, off_t off, int count, 180static int rs_proc_show(struct seq_file *m, void *v)
180 int *eof, void *data)
181{ 181{
182 int len = 0; 182 seq_printf(m, "serinfo:1.0 driver:%s\n", serial_version);
183 off_t begin = 0; 183 return 0;
184 184}
185 len += sprintf(page, "serinfo:1.0 driver:%s\n", serial_version);
186 *eof = 1;
187
188 if (off >= len + begin)
189 return 0;
190 185
191 *start = page + (off - begin); 186static int rs_proc_open(struct inode *inode, struct file *file)
192 return ((count < begin + len - off) ? count : begin + len - off); 187{
188 return single_open(file, rs_proc_show, NULL);
193} 189}
194 190
191static const struct file_operations rs_proc_fops = {
192 .owner = THIS_MODULE,
193 .open = rs_proc_open,
194 .read = seq_read,
195 .llseek = seq_lseek,
196 .release = single_release,
197};
195 198
196static struct tty_operations serial_ops = { 199static struct tty_operations serial_ops = {
197 .open = rs_open, 200 .open = rs_open,
@@ -203,7 +206,7 @@ static struct tty_operations serial_ops = {
203 .chars_in_buffer = rs_chars_in_buffer, 206 .chars_in_buffer = rs_chars_in_buffer,
204 .hangup = rs_hangup, 207 .hangup = rs_hangup,
205 .wait_until_sent = rs_wait_until_sent, 208 .wait_until_sent = rs_wait_until_sent,
206 .read_proc = rs_read_proc 209 .proc_fops = &rs_proc_fops,
207}; 210};
208 211
209int __init rs_init(void) 212int __init rs_init(void)
diff --git a/arch/xtensa/platforms/s6105/Makefile b/arch/xtensa/platforms/s6105/Makefile
new file mode 100644
index 000000000000..0be6194bcb72
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/Makefile
@@ -0,0 +1,3 @@
1# Makefile for the Stretch S6105 eval board
2
3obj-y := setup.o device.o
diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
new file mode 100644
index 000000000000..78b08be5a92d
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -0,0 +1,67 @@
1/*
2 * s6105 platform devices
3 *
4 * Copyright (c) 2009 emlix GmbH
5 */
6
7#include <linux/kernel.h>
8#include <linux/init.h>
9#include <linux/platform_device.h>
10#include <linux/serial.h>
11#include <linux/serial_8250.h>
12
13#include <variant/hardware.h>
14
15#define UART_INTNUM 4
16
17static const signed char uart_irq_mappings[] = {
18 S6_INTC_UART(0),
19 S6_INTC_UART(1),
20 -1,
21};
22
23const signed char *platform_irq_mappings[NR_IRQS] = {
24 [UART_INTNUM] = uart_irq_mappings,
25};
26
27static struct plat_serial8250_port serial_platform_data[] = {
28 {
29 .membase = (void *)S6_REG_UART + 0x0000,
30 .mapbase = S6_REG_UART + 0x0000,
31 .irq = UART_INTNUM,
32 .uartclk = S6_SCLK,
33 .regshift = 2,
34 .iotype = SERIAL_IO_MEM,
35 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
36 },
37 {
38 .membase = (void *)S6_REG_UART + 0x1000,
39 .mapbase = S6_REG_UART + 0x1000,
40 .irq = UART_INTNUM,
41 .uartclk = S6_SCLK,
42 .regshift = 2,
43 .iotype = SERIAL_IO_MEM,
44 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
45 },
46 { },
47};
48
49static struct platform_device platform_devices[] = {
50 {
51 .name = "serial8250",
52 .id = PLAT8250_DEV_PLATFORM,
53 .dev = {
54 .platform_data = serial_platform_data,
55 },
56 },
57};
58
59static int __init device_init(void)
60{
61 int i;
62
63 for (i = 0; i < ARRAY_SIZE(platform_devices); i++)
64 platform_device_register(&platform_devices[i]);
65 return 0;
66}
67arch_initcall_sync(device_init);
diff --git a/arch/xtensa/platforms/s6105/include/platform/gpio.h b/arch/xtensa/platforms/s6105/include/platform/gpio.h
new file mode 100644
index 000000000000..fa11aa4b61e9
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/gpio.h
@@ -0,0 +1,27 @@
1#ifndef __ASM_XTENSA_S6105_GPIO_H
2#define __ASM_XTENSA_S6105_GPIO_H
3
4#define GPIO_BP_TEMP_ALARM 0
5#define GPIO_PB_RESET_IN 1
6#define GPIO_EXP_IRQ 2
7#define GPIO_TRIGGER_IRQ 3
8#define GPIO_RTC_IRQ 4
9#define GPIO_PHY_IRQ 5
10#define GPIO_IMAGER_RESET 6
11#define GPIO_SD_IRQ 7
12#define GPIO_MINI_BOOT_INH 8
13#define GPIO_BOARD_RESET 9
14#define GPIO_EXP_PRESENT 10
15#define GPIO_LED1_NGREEN 12
16#define GPIO_LED1_RED 13
17#define GPIO_LED0_NGREEN 14
18#define GPIO_LED0_NRED 15
19#define GPIO_SPI_CS0 16
20#define GPIO_SPI_CS1 17
21#define GPIO_SPI_CS3 19
22#define GPIO_SPI_CS4 20
23#define GPIO_SD_WP 21
24#define GPIO_BP_RESET 22
25#define GPIO_ALARM_OUT 23
26
27#endif /* __ASM_XTENSA_S6105_GPIO_H */
diff --git a/arch/xtensa/platforms/s6105/include/platform/hardware.h b/arch/xtensa/platforms/s6105/include/platform/hardware.h
new file mode 100644
index 000000000000..d628efac7089
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/hardware.h
@@ -0,0 +1,11 @@
1#ifndef __XTENSA_S6105_HARDWARE_H
2#define __XTENSA_S6105_HARDWARE_H
3
4#define PLATFORM_DEFAULT_MEM_START 0x40000000
5#define PLATFORM_DEFAULT_MEM_SIZE 0x08000000
6
7#define MAX_DMA_ADDRESS 0
8
9#define KERNELOFFSET (PLATFORM_DEFAULT_MEM_START + 0x1000)
10
11#endif /* __XTENSA_S6105_HARDWARE_H */
diff --git a/arch/xtensa/platforms/s6105/include/platform/serial.h b/arch/xtensa/platforms/s6105/include/platform/serial.h
new file mode 100644
index 000000000000..c8a771e5981b
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/serial.h
@@ -0,0 +1,8 @@
1#ifndef __ASM_XTENSA_S6105_SERIAL_H
2#define __ASM_XTENSA_S6105_SERIAL_H
3
4#include <variant/hardware.h>
5
6#define BASE_BAUD (S6_SCLK / 16)
7
8#endif /* __ASM_XTENSA_S6105_SERIAL_H */
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c
new file mode 100644
index 000000000000..ae041d5027a2
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/setup.c
@@ -0,0 +1,61 @@
1/*
2 * s6105 control routines
3 *
4 * Copyright (c) 2009 emlix GmbH
5 */
6#include <linux/irq.h>
7#include <linux/io.h>
8#include <linux/gpio.h>
9
10#include <asm/bootparam.h>
11
12#include <variant/hardware.h>
13#include <platform/gpio.h>
14
15void platform_halt(void)
16{
17 local_irq_disable();
18 while (1)
19 ;
20}
21
22void platform_power_off(void)
23{
24 platform_halt();
25}
26
27void platform_restart(void)
28{
29 platform_halt();
30}
31
32void __init platform_setup(char **cmdline)
33{
34 unsigned long reg;
35
36 reg = readl(S6_REG_GREG1 + S6_GREG1_CLKGATE);
37 reg &= ~(1 << S6_GREG1_BLOCK_SB);
38 writel(reg, S6_REG_GREG1 + S6_GREG1_CLKGATE);
39
40 reg = readl(S6_REG_GREG1 + S6_GREG1_BLOCKENA);
41 reg |= 1 << S6_GREG1_BLOCK_SB;
42 writel(reg, S6_REG_GREG1 + S6_GREG1_BLOCKENA);
43
44 printk(KERN_NOTICE "S6105 on Stretch S6000 - "
45 "Copyright (C) 2009 emlix GmbH <info@emlix.com>\n");
46}
47
48void __init platform_init(bp_tag_t *first)
49{
50 gpio_request(GPIO_LED1_NGREEN, "led1_green");
51 gpio_request(GPIO_LED1_RED, "led1_red");
52 gpio_direction_output(GPIO_LED1_NGREEN, 1);
53}
54
55void platform_heartbeat(void)
56{
57 static unsigned int c;
58
59 if (!(++c & 0x4F))
60 gpio_direction_output(GPIO_LED1_RED, !(c & 0x10));
61}
diff --git a/arch/xtensa/platforms/xt2000/include/platform/hardware.h b/arch/xtensa/platforms/xt2000/include/platform/hardware.h
index 41459ad07766..886ef156ded3 100644
--- a/arch/xtensa/platforms/xt2000/include/platform/hardware.h
+++ b/arch/xtensa/platforms/xt2000/include/platform/hardware.h
@@ -16,7 +16,6 @@
16#define _XTENSA_XT2000_HARDWARE_H 16#define _XTENSA_XT2000_HARDWARE_H
17 17
18#include <variant/core.h> 18#include <variant/core.h>
19#include <asm/io.h>
20 19
21/* 20/*
22 * Memory configuration. 21 * Memory configuration.
diff --git a/arch/xtensa/variants/s6000/Makefile b/arch/xtensa/variants/s6000/Makefile
new file mode 100644
index 000000000000..03b3975468bd
--- /dev/null
+++ b/arch/xtensa/variants/s6000/Makefile
@@ -0,0 +1,3 @@
1# s6000 Makefile
2
3obj-y += irq.o gpio.o
diff --git a/arch/xtensa/variants/s6000/gpio.c b/arch/xtensa/variants/s6000/gpio.c
new file mode 100644
index 000000000000..33a8d952934c
--- /dev/null
+++ b/arch/xtensa/variants/s6000/gpio.c
@@ -0,0 +1,71 @@
1/*
2 * s6000 gpio driver
3 *
4 * Copyright (c) 2009 emlix GmbH
5 * Authors: Oskar Schirmer <os@emlix.com>
6 * Johannes Weiner <jw@emlix.com>
7 */
8#include <linux/kernel.h>
9#include <linux/module.h>
10#include <linux/init.h>
11#include <linux/io.h>
12#include <linux/gpio.h>
13
14#include <variant/hardware.h>
15
16#define S6_GPIO_DATA 0x000
17#define S6_GPIO_IS 0x404
18#define S6_GPIO_IBE 0x408
19#define S6_GPIO_IEV 0x40C
20#define S6_GPIO_IE 0x410
21#define S6_GPIO_RIS 0x414
22#define S6_GPIO_MIS 0x418
23#define S6_GPIO_IC 0x41C
24#define S6_GPIO_AFSEL 0x420
25#define S6_GPIO_DIR 0x800
26#define S6_GPIO_BANK(nr) ((nr) * 0x1000)
27#define S6_GPIO_MASK(nr) (4 << (nr))
28#define S6_GPIO_OFFSET(nr) \
29 (S6_GPIO_BANK((nr) >> 3) + S6_GPIO_MASK((nr) & 7))
30
31static int direction_input(struct gpio_chip *chip, unsigned int off)
32{
33 writeb(0, S6_REG_GPIO + S6_GPIO_DIR + S6_GPIO_OFFSET(off));
34 return 0;
35}
36
37static int get(struct gpio_chip *chip, unsigned int off)
38{
39 return readb(S6_REG_GPIO + S6_GPIO_DATA + S6_GPIO_OFFSET(off));
40}
41
42static int direction_output(struct gpio_chip *chip, unsigned int off, int val)
43{
44 unsigned rel = S6_GPIO_OFFSET(off);
45 writeb(~0, S6_REG_GPIO + S6_GPIO_DIR + rel);
46 writeb(val ? ~0 : 0, S6_REG_GPIO + S6_GPIO_DATA + rel);
47 return 0;
48}
49
50static void set(struct gpio_chip *chip, unsigned int off, int val)
51{
52 writeb(val ? ~0 : 0, S6_REG_GPIO + S6_GPIO_DATA + S6_GPIO_OFFSET(off));
53}
54
55static struct gpio_chip gpiochip = {
56 .owner = THIS_MODULE,
57 .direction_input = direction_input,
58 .get = get,
59 .direction_output = direction_output,
60 .set = set,
61 .base = 0,
62 .ngpio = 24,
63 .can_sleep = 0, /* no blocking io needed */
64 .exported = 0, /* no exporting to userspace */
65};
66
67static int gpio_init(void)
68{
69 return gpiochip_add(&gpiochip);
70}
71device_initcall(gpio_init);
diff --git a/arch/xtensa/variants/s6000/include/variant/core.h b/arch/xtensa/variants/s6000/include/variant/core.h
new file mode 100644
index 000000000000..af007953027e
--- /dev/null
+++ b/arch/xtensa/variants/s6000/include/variant/core.h
@@ -0,0 +1,431 @@
1/*
2 * Xtensa processor core configuration information.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 1999-2008 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_CORE_CONFIGURATION_H
12#define _XTENSA_CORE_CONFIGURATION_H
13
14
15/****************************************************************************
16 Parameters Useful for Any Code, USER or PRIVILEGED
17 ****************************************************************************/
18
19/*
20 * Note: Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
21 * configured, and a value of 0 otherwise. These macros are always defined.
22 */
23
24
25/*----------------------------------------------------------------------
26 ISA
27 ----------------------------------------------------------------------*/
28
29#define XCHAL_HAVE_BE 0 /* big-endian byte ordering */
30#define XCHAL_HAVE_WINDOWED 1 /* windowed registers option */
31#define XCHAL_NUM_AREGS 64 /* num of physical addr regs */
32#define XCHAL_NUM_AREGS_LOG2 6 /* log2(XCHAL_NUM_AREGS) */
33#define XCHAL_MAX_INSTRUCTION_SIZE 8 /* max instr bytes (3..8) */
34#define XCHAL_HAVE_DEBUG 1 /* debug option */
35#define XCHAL_HAVE_DENSITY 1 /* 16-bit instructions */
36#define XCHAL_HAVE_LOOPS 1 /* zero-overhead loops */
37#define XCHAL_HAVE_NSA 1 /* NSA/NSAU instructions */
38#define XCHAL_HAVE_MINMAX 1 /* MIN/MAX instructions */
39#define XCHAL_HAVE_SEXT 1 /* SEXT instruction */
40#define XCHAL_HAVE_CLAMPS 1 /* CLAMPS instruction */
41#define XCHAL_HAVE_MUL16 1 /* MUL16S/MUL16U instructions */
42#define XCHAL_HAVE_MUL32 1 /* MULL instruction */
43#define XCHAL_HAVE_MUL32_HIGH 1 /* MULUH/MULSH instructions */
44#define XCHAL_HAVE_DIV32 0 /* QUOS/QUOU/REMS/REMU instructions */
45#define XCHAL_HAVE_L32R 1 /* L32R instruction */
46#define XCHAL_HAVE_ABSOLUTE_LITERALS 1 /* non-PC-rel (extended) L32R */
47#define XCHAL_HAVE_CONST16 0 /* CONST16 instruction */
48#define XCHAL_HAVE_ADDX 1 /* ADDX#/SUBX# instructions */
49#define XCHAL_HAVE_WIDE_BRANCHES 0 /* B*.W18 or B*.W15 instr's */
50#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* B[EQ/EQZ/NE/NEZ]T instr's */
51#define XCHAL_HAVE_CALL4AND12 1 /* (obsolete option) */
52#define XCHAL_HAVE_ABS 1 /* ABS instruction */
53/*#define XCHAL_HAVE_POPC 0*/ /* POPC instruction */
54/*#define XCHAL_HAVE_CRC 0*/ /* CRC instruction */
55#define XCHAL_HAVE_RELEASE_SYNC 0 /* L32AI/S32RI instructions */
56#define XCHAL_HAVE_S32C1I 0 /* S32C1I instruction */
57#define XCHAL_HAVE_SPECULATION 0 /* speculation */
58#define XCHAL_HAVE_FULL_RESET 0 /* all regs/state reset */
59#define XCHAL_NUM_CONTEXTS 1 /* */
60#define XCHAL_NUM_MISC_REGS 4 /* num of scratch regs (0..4) */
61#define XCHAL_HAVE_TAP_MASTER 0 /* JTAG TAP control instr's */
62#define XCHAL_HAVE_PRID 0 /* processor ID register */
63#define XCHAL_HAVE_THREADPTR 0 /* THREADPTR register */
64#define XCHAL_HAVE_BOOLEANS 1 /* boolean registers */
65#define XCHAL_HAVE_CP 1 /* CPENABLE reg (coprocessor) */
66#define XCHAL_CP_MAXCFG 8 /* max allowed cp id plus one */
67#define XCHAL_HAVE_MAC16 0 /* MAC16 package */
68#define XCHAL_HAVE_VECTORFPU2005 0 /* vector floating-point pkg */
69#define XCHAL_HAVE_FP 1 /* floating point pkg */
70#define XCHAL_HAVE_VECTRA1 0 /* Vectra I pkg */
71#define XCHAL_HAVE_VECTRALX 0 /* Vectra LX pkg */
72#define XCHAL_HAVE_HIFI2 0 /* HiFi2 Audio Engine pkg */
73
74
75/*----------------------------------------------------------------------
76 MISC
77 ----------------------------------------------------------------------*/
78
79#define XCHAL_NUM_WRITEBUFFER_ENTRIES 8 /* size of write buffer */
80#define XCHAL_INST_FETCH_WIDTH 8 /* instr-fetch width in bytes */
81#define XCHAL_DATA_WIDTH 16 /* data width in bytes */
82/* In T1050, applies to selected core load and store instructions (see ISA): */
83#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1 /* unaligned loads cause exc. */
84#define XCHAL_UNALIGNED_STORE_EXCEPTION 1 /* unaligned stores cause exc.*/
85
86#define XCHAL_SW_VERSION 701001 /* sw version of this header */
87
88#define XCHAL_CORE_ID "stretch_bali" /* alphanum core name
89 (CoreID) set in the Xtensa
90 Processor Generator */
91
92#define XCHAL_BUILD_UNIQUE_ID 0x000104B9 /* 22-bit sw build ID */
93
94/*
95 * These definitions describe the hardware targeted by this software.
96 */
97#define XCHAL_HW_CONFIGID0 0xC2F3F9FE /* ConfigID hi 32 bits*/
98#define XCHAL_HW_CONFIGID1 0x054104B9 /* ConfigID lo 32 bits*/
99#define XCHAL_HW_VERSION_NAME "LX1.0.2" /* full version name */
100#define XCHAL_HW_VERSION_MAJOR 2100 /* major ver# of targeted hw */
101#define XCHAL_HW_VERSION_MINOR 2 /* minor ver# of targeted hw */
102#define XCHAL_HW_VERSION 210002 /* major*100+minor */
103#define XCHAL_HW_REL_LX1 1
104#define XCHAL_HW_REL_LX1_0 1
105#define XCHAL_HW_REL_LX1_0_2 1
106#define XCHAL_HW_CONFIGID_RELIABLE 1
107/* If software targets a *range* of hardware versions, these are the bounds: */
108#define XCHAL_HW_MIN_VERSION_MAJOR 2100 /* major v of earliest tgt hw */
109#define XCHAL_HW_MIN_VERSION_MINOR 2 /* minor v of earliest tgt hw */
110#define XCHAL_HW_MIN_VERSION 210002 /* earliest targeted hw */
111#define XCHAL_HW_MAX_VERSION_MAJOR 2100 /* major v of latest tgt hw */
112#define XCHAL_HW_MAX_VERSION_MINOR 2 /* minor v of latest tgt hw */
113#define XCHAL_HW_MAX_VERSION 210002 /* latest targeted hw */
114
115
116/*----------------------------------------------------------------------
117 CACHE
118 ----------------------------------------------------------------------*/
119
120#define XCHAL_ICACHE_LINESIZE 16 /* I-cache line size in bytes */
121#define XCHAL_DCACHE_LINESIZE 16 /* D-cache line size in bytes */
122#define XCHAL_ICACHE_LINEWIDTH 4 /* log2(I line size in bytes) */
123#define XCHAL_DCACHE_LINEWIDTH 4 /* log2(D line size in bytes) */
124
125#define XCHAL_ICACHE_SIZE 32768 /* I-cache size in bytes or 0 */
126#define XCHAL_DCACHE_SIZE 32768 /* D-cache size in bytes or 0 */
127
128#define XCHAL_DCACHE_IS_WRITEBACK 1 /* writeback feature */
129
130
131
132
133/****************************************************************************
134 Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
135 ****************************************************************************/
136
137
138#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
139
140/*----------------------------------------------------------------------
141 CACHE
142 ----------------------------------------------------------------------*/
143
144#define XCHAL_HAVE_PIF 1 /* any outbound PIF present */
145
146/* If present, cache size in bytes == (ways * 2^(linewidth + setwidth)). */
147
148/* Number of cache sets in log2(lines per way): */
149#define XCHAL_ICACHE_SETWIDTH 9
150#define XCHAL_DCACHE_SETWIDTH 10
151
152/* Cache set associativity (number of ways): */
153#define XCHAL_ICACHE_WAYS 4
154#define XCHAL_DCACHE_WAYS 2
155
156/* Cache features: */
157#define XCHAL_ICACHE_LINE_LOCKABLE 1
158#define XCHAL_DCACHE_LINE_LOCKABLE 0
159#define XCHAL_ICACHE_ECC_PARITY 0
160#define XCHAL_DCACHE_ECC_PARITY 0
161
162/* Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits): */
163#define XCHAL_CA_BITS 4
164
165
166/*----------------------------------------------------------------------
167 INTERNAL I/D RAM/ROMs and XLMI
168 ----------------------------------------------------------------------*/
169
170#define XCHAL_NUM_INSTROM 0 /* number of core instr. ROMs */
171#define XCHAL_NUM_INSTRAM 0 /* number of core instr. RAMs */
172#define XCHAL_NUM_DATAROM 0 /* number of core data ROMs */
173#define XCHAL_NUM_DATARAM 1 /* number of core data RAMs */
174#define XCHAL_NUM_URAM 0 /* number of core unified RAMs*/
175#define XCHAL_NUM_XLMI 1 /* number of core XLMI ports */
176
177/* Data RAM 0: */
178#define XCHAL_DATARAM0_VADDR 0x3FFF0000
179#define XCHAL_DATARAM0_PADDR 0x3FFF0000
180#define XCHAL_DATARAM0_SIZE 65536
181#define XCHAL_DATARAM0_ECC_PARITY 0
182
183/* XLMI Port 0: */
184#define XCHAL_XLMI0_VADDR 0x37F80000
185#define XCHAL_XLMI0_PADDR 0x37F80000
186#define XCHAL_XLMI0_SIZE 262144
187#define XCHAL_XLMI0_ECC_PARITY 0
188
189
190/*----------------------------------------------------------------------
191 INTERRUPTS and TIMERS
192 ----------------------------------------------------------------------*/
193
194#define XCHAL_HAVE_INTERRUPTS 1 /* interrupt option */
195#define XCHAL_HAVE_HIGHPRI_INTERRUPTS 1 /* med/high-pri. interrupts */
196#define XCHAL_HAVE_NMI 1 /* non-maskable interrupt */
197#define XCHAL_HAVE_CCOUNT 1 /* CCOUNT reg. (timer option) */
198#define XCHAL_NUM_TIMERS 3 /* number of CCOMPAREn regs */
199#define XCHAL_NUM_INTERRUPTS 27 /* number of interrupts */
200#define XCHAL_NUM_INTERRUPTS_LOG2 5 /* ceil(log2(NUM_INTERRUPTS)) */
201#define XCHAL_NUM_EXTINTERRUPTS 20 /* num of external interrupts */
202#define XCHAL_NUM_INTLEVELS 4 /* number of interrupt levels
203 (not including level zero) */
204#define XCHAL_EXCM_LEVEL 1 /* level masked by PS.EXCM */
205 /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
206
207/* Masks of interrupts at each interrupt level: */
208#define XCHAL_INTLEVEL1_MASK 0x01F07FFF
209#define XCHAL_INTLEVEL2_MASK 0x02018000
210#define XCHAL_INTLEVEL3_MASK 0x04060000
211#define XCHAL_INTLEVEL4_MASK 0x00000000
212#define XCHAL_INTLEVEL5_MASK 0x00080000
213#define XCHAL_INTLEVEL6_MASK 0x00000000
214#define XCHAL_INTLEVEL7_MASK 0x00000000
215
216/* Masks of interrupts at each range 1..n of interrupt levels: */
217#define XCHAL_INTLEVEL1_ANDBELOW_MASK 0x01F07FFF
218#define XCHAL_INTLEVEL2_ANDBELOW_MASK 0x03F1FFFF
219#define XCHAL_INTLEVEL3_ANDBELOW_MASK 0x07F7FFFF
220#define XCHAL_INTLEVEL4_ANDBELOW_MASK 0x07F7FFFF
221#define XCHAL_INTLEVEL5_ANDBELOW_MASK 0x07FFFFFF
222#define XCHAL_INTLEVEL6_ANDBELOW_MASK 0x07FFFFFF
223#define XCHAL_INTLEVEL7_ANDBELOW_MASK 0x07FFFFFF
224
225/* Level of each interrupt: */
226#define XCHAL_INT0_LEVEL 1
227#define XCHAL_INT1_LEVEL 1
228#define XCHAL_INT2_LEVEL 1
229#define XCHAL_INT3_LEVEL 1
230#define XCHAL_INT4_LEVEL 1
231#define XCHAL_INT5_LEVEL 1
232#define XCHAL_INT6_LEVEL 1
233#define XCHAL_INT7_LEVEL 1
234#define XCHAL_INT8_LEVEL 1
235#define XCHAL_INT9_LEVEL 1
236#define XCHAL_INT10_LEVEL 1
237#define XCHAL_INT11_LEVEL 1
238#define XCHAL_INT12_LEVEL 1
239#define XCHAL_INT13_LEVEL 1
240#define XCHAL_INT14_LEVEL 1
241#define XCHAL_INT15_LEVEL 2
242#define XCHAL_INT16_LEVEL 2
243#define XCHAL_INT17_LEVEL 3
244#define XCHAL_INT18_LEVEL 3
245#define XCHAL_INT19_LEVEL 5
246#define XCHAL_INT20_LEVEL 1
247#define XCHAL_INT21_LEVEL 1
248#define XCHAL_INT22_LEVEL 1
249#define XCHAL_INT23_LEVEL 1
250#define XCHAL_INT24_LEVEL 1
251#define XCHAL_INT25_LEVEL 2
252#define XCHAL_INT26_LEVEL 3
253#define XCHAL_DEBUGLEVEL 4 /* debug interrupt level */
254#define XCHAL_HAVE_DEBUG_EXTERN_INT 1 /* OCD external db interrupt */
255#define XCHAL_NMILEVEL 5 /* NMI "level" (for use with
256 EXCSAVE/EPS/EPC_n, RFI n) */
257
258/* Type of each interrupt: */
259#define XCHAL_INT0_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
260#define XCHAL_INT1_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
261#define XCHAL_INT2_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
262#define XCHAL_INT3_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
263#define XCHAL_INT4_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
264#define XCHAL_INT5_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
265#define XCHAL_INT6_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
266#define XCHAL_INT7_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
267#define XCHAL_INT8_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
268#define XCHAL_INT9_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
269#define XCHAL_INT10_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
270#define XCHAL_INT11_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
271#define XCHAL_INT12_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
272#define XCHAL_INT13_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
273#define XCHAL_INT14_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
274#define XCHAL_INT15_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
275#define XCHAL_INT16_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
276#define XCHAL_INT17_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
277#define XCHAL_INT18_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
278#define XCHAL_INT19_TYPE XTHAL_INTTYPE_NMI
279#define XCHAL_INT20_TYPE XTHAL_INTTYPE_SOFTWARE
280#define XCHAL_INT21_TYPE XTHAL_INTTYPE_SOFTWARE
281#define XCHAL_INT22_TYPE XTHAL_INTTYPE_SOFTWARE
282#define XCHAL_INT23_TYPE XTHAL_INTTYPE_SOFTWARE
283#define XCHAL_INT24_TYPE XTHAL_INTTYPE_TIMER
284#define XCHAL_INT25_TYPE XTHAL_INTTYPE_TIMER
285#define XCHAL_INT26_TYPE XTHAL_INTTYPE_TIMER
286
287/* Masks of interrupts for each type of interrupt: */
288#define XCHAL_INTTYPE_MASK_UNCONFIGURED 0xF8000000
289#define XCHAL_INTTYPE_MASK_SOFTWARE 0x00F00000
290#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x00000000
291#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL 0x0007FFFF
292#define XCHAL_INTTYPE_MASK_TIMER 0x07000000
293#define XCHAL_INTTYPE_MASK_NMI 0x00080000
294#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
295
296/* Interrupt numbers assigned to specific interrupt sources: */
297#define XCHAL_TIMER0_INTERRUPT 24 /* CCOMPARE0 */
298#define XCHAL_TIMER1_INTERRUPT 25 /* CCOMPARE1 */
299#define XCHAL_TIMER2_INTERRUPT 26 /* CCOMPARE2 */
300#define XCHAL_TIMER3_INTERRUPT XTHAL_TIMER_UNCONFIGURED
301#define XCHAL_NMI_INTERRUPT 19 /* non-maskable interrupt */
302
303/* Interrupt numbers for levels at which only one interrupt is configured: */
304#define XCHAL_INTLEVEL5_NUM 19
305/* (There are many interrupts each at level(s) 1, 2, 3.) */
306
307
308/*
309 * External interrupt vectors/levels.
310 * These macros describe how Xtensa processor interrupt numbers
311 * (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
312 * map to external BInterrupt<n> pins, for those interrupts
313 * configured as external (level-triggered, edge-triggered, or NMI).
314 * See the Xtensa processor databook for more details.
315 */
316
317/* Core interrupt numbers mapped to each EXTERNAL interrupt number: */
318#define XCHAL_EXTINT0_NUM 0 /* (intlevel 1) */
319#define XCHAL_EXTINT1_NUM 1 /* (intlevel 1) */
320#define XCHAL_EXTINT2_NUM 2 /* (intlevel 1) */
321#define XCHAL_EXTINT3_NUM 3 /* (intlevel 1) */
322#define XCHAL_EXTINT4_NUM 4 /* (intlevel 1) */
323#define XCHAL_EXTINT5_NUM 5 /* (intlevel 1) */
324#define XCHAL_EXTINT6_NUM 6 /* (intlevel 1) */
325#define XCHAL_EXTINT7_NUM 7 /* (intlevel 1) */
326#define XCHAL_EXTINT8_NUM 8 /* (intlevel 1) */
327#define XCHAL_EXTINT9_NUM 9 /* (intlevel 1) */
328#define XCHAL_EXTINT10_NUM 10 /* (intlevel 1) */
329#define XCHAL_EXTINT11_NUM 11 /* (intlevel 1) */
330#define XCHAL_EXTINT12_NUM 12 /* (intlevel 1) */
331#define XCHAL_EXTINT13_NUM 13 /* (intlevel 1) */
332#define XCHAL_EXTINT14_NUM 14 /* (intlevel 1) */
333#define XCHAL_EXTINT15_NUM 15 /* (intlevel 2) */
334#define XCHAL_EXTINT16_NUM 16 /* (intlevel 2) */
335#define XCHAL_EXTINT17_NUM 17 /* (intlevel 3) */
336#define XCHAL_EXTINT18_NUM 18 /* (intlevel 3) */
337#define XCHAL_EXTINT19_NUM 19 /* (intlevel 5) */
338
339
340/*----------------------------------------------------------------------
341 EXCEPTIONS and VECTORS
342 ----------------------------------------------------------------------*/
343
344#define XCHAL_XEA_VERSION 2 /* Xtensa Exception Architecture
345 number: 1 == XEA1 (old)
346 2 == XEA2 (new)
347 0 == XEAX (extern) */
348#define XCHAL_HAVE_XEA1 0 /* Exception Architecture 1 */
349#define XCHAL_HAVE_XEA2 1 /* Exception Architecture 2 */
350#define XCHAL_HAVE_XEAX 0 /* External Exception Arch. */
351#define XCHAL_HAVE_EXCEPTIONS 1 /* exception option */
352#define XCHAL_HAVE_MEM_ECC_PARITY 0 /* local memory ECC/parity */
353#define XCHAL_HAVE_VECTOR_SELECT 0 /* relocatable vectors */
354#define XCHAL_HAVE_VECBASE 0 /* relocatable vectors */
355
356#define XCHAL_RESET_VECOFS 0x00000000
357#define XCHAL_RESET_VECTOR_VADDR 0x3FFE03D0
358#define XCHAL_RESET_VECTOR_PADDR 0x3FFE03D0
359#define XCHAL_USER_VECOFS 0x00000000
360#define XCHAL_USER_VECTOR_VADDR 0x40000220
361#define XCHAL_USER_VECTOR_PADDR 0x40000220
362#define XCHAL_KERNEL_VECOFS 0x00000000
363#define XCHAL_KERNEL_VECTOR_VADDR 0x40000200
364#define XCHAL_KERNEL_VECTOR_PADDR 0x40000200
365#define XCHAL_DOUBLEEXC_VECOFS 0x00000000
366#define XCHAL_DOUBLEEXC_VECTOR_VADDR 0x400002A0
367#define XCHAL_DOUBLEEXC_VECTOR_PADDR 0x400002A0
368#define XCHAL_WINDOW_OF4_VECOFS 0x00000000
369#define XCHAL_WINDOW_UF4_VECOFS 0x00000040
370#define XCHAL_WINDOW_OF8_VECOFS 0x00000080
371#define XCHAL_WINDOW_UF8_VECOFS 0x000000C0
372#define XCHAL_WINDOW_OF12_VECOFS 0x00000100
373#define XCHAL_WINDOW_UF12_VECOFS 0x00000140
374#define XCHAL_WINDOW_VECTORS_VADDR 0x40000000
375#define XCHAL_WINDOW_VECTORS_PADDR 0x40000000
376#define XCHAL_INTLEVEL2_VECOFS 0x00000000
377#define XCHAL_INTLEVEL2_VECTOR_VADDR 0x40000240
378#define XCHAL_INTLEVEL2_VECTOR_PADDR 0x40000240
379#define XCHAL_INTLEVEL3_VECOFS 0x00000000
380#define XCHAL_INTLEVEL3_VECTOR_VADDR 0x40000260
381#define XCHAL_INTLEVEL3_VECTOR_PADDR 0x40000260
382#define XCHAL_INTLEVEL4_VECOFS 0x00000000
383#define XCHAL_INTLEVEL4_VECTOR_VADDR 0x40000390
384#define XCHAL_INTLEVEL4_VECTOR_PADDR 0x40000390
385#define XCHAL_DEBUG_VECOFS XCHAL_INTLEVEL4_VECOFS
386#define XCHAL_DEBUG_VECTOR_VADDR XCHAL_INTLEVEL4_VECTOR_VADDR
387#define XCHAL_DEBUG_VECTOR_PADDR XCHAL_INTLEVEL4_VECTOR_PADDR
388#define XCHAL_NMI_VECOFS 0x00000000
389#define XCHAL_NMI_VECTOR_VADDR 0x400003B0
390#define XCHAL_NMI_VECTOR_PADDR 0x400003B0
391#define XCHAL_INTLEVEL5_VECOFS XCHAL_NMI_VECOFS
392#define XCHAL_INTLEVEL5_VECTOR_VADDR XCHAL_NMI_VECTOR_VADDR
393#define XCHAL_INTLEVEL5_VECTOR_PADDR XCHAL_NMI_VECTOR_PADDR
394
395
396/*----------------------------------------------------------------------
397 DEBUG
398 ----------------------------------------------------------------------*/
399
400#define XCHAL_HAVE_OCD 1 /* OnChipDebug option */
401#define XCHAL_NUM_IBREAK 2 /* number of IBREAKn regs */
402#define XCHAL_NUM_DBREAK 2 /* number of DBREAKn regs */
403#define XCHAL_HAVE_OCD_DIR_ARRAY 1 /* faster OCD option */
404
405
406/*----------------------------------------------------------------------
407 MMU
408 ----------------------------------------------------------------------*/
409
410/* See core-matmap.h header file for more details. */
411
412#define XCHAL_HAVE_TLBS 1 /* inverse of HAVE_CACHEATTR */
413#define XCHAL_HAVE_SPANNING_WAY 1 /* one way maps I+D 4GB vaddr */
414#define XCHAL_HAVE_IDENTITY_MAP 1 /* vaddr == paddr always */
415#define XCHAL_HAVE_CACHEATTR 0 /* CACHEATTR register present */
416#define XCHAL_HAVE_MIMIC_CACHEATTR 1 /* region protection */
417#define XCHAL_HAVE_XLT_CACHEATTR 0 /* region prot. w/translation */
418#define XCHAL_HAVE_PTP_MMU 0 /* full MMU (with page table
419 [autorefill] and protection)
420 usable for an MMU-based OS */
421/* If none of the above last 4 are set, it's a custom TLB configuration. */
422
423#define XCHAL_MMU_ASID_BITS 0 /* number of bits in ASIDs */
424#define XCHAL_MMU_RINGS 1 /* number of rings (1..4) */
425#define XCHAL_MMU_RING_BITS 0 /* num of bits in RING field */
426
427#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
428
429
430#endif /* _XTENSA_CORE_CONFIGURATION_H */
431
diff --git a/arch/xtensa/variants/s6000/include/variant/hardware.h b/arch/xtensa/variants/s6000/include/variant/hardware.h
new file mode 100644
index 000000000000..5d9ba098d84a
--- /dev/null
+++ b/arch/xtensa/variants/s6000/include/variant/hardware.h
@@ -0,0 +1,259 @@
1#ifndef __XTENSA_S6000_HARDWARE_H
2#define __XTENSA_S6000_HARDWARE_H
3
4#define S6_SCLK 1843200
5
6#define S6_MEM_REG 0x20000000
7#define S6_MEM_EFI 0x33F00000
8#define S6_MEM_PCIE_DATARAM1 0x34000000
9#define S6_MEM_XLMI 0x37F80000
10#define S6_MEM_PIF_DATARAM1 0x37FFC000
11#define S6_MEM_GMAC 0x38000000
12#define S6_MEM_I2S 0x3A000000
13#define S6_MEM_EGIB 0x3C000000
14#define S6_MEM_PCIE_CFG 0x3E000000
15#define S6_MEM_PIF_DATARAM 0x3FFE0000
16#define S6_MEM_XLMI_DATARAM 0x3FFF0000
17#define S6_MEM_DDR 0x40000000
18#define S6_MEM_PCIE_APER 0xC0000000
19#define S6_MEM_AUX 0xF0000000
20
21/* Device addresses */
22
23#define S6_REG_SCB S6_MEM_REG
24#define S6_REG_NB (S6_REG_SCB + 0x10000)
25#define S6_REG_LMSDMA (S6_REG_SCB + 0x20000)
26#define S6_REG_NI (S6_REG_SCB + 0x30000)
27#define S6_REG_NIDMA (S6_REG_SCB + 0x40000)
28#define S6_REG_NS (S6_REG_SCB + 0x50000)
29#define S6_REG_DDR (S6_REG_SCB + 0x60000)
30#define S6_REG_GREG1 (S6_REG_SCB + 0x70000)
31#define S6_REG_DP (S6_REG_SCB + 0x80000)
32#define S6_REG_DPDMA (S6_REG_SCB + 0x90000)
33#define S6_REG_EGIB (S6_REG_SCB + 0xA0000)
34#define S6_REG_PCIE (S6_REG_SCB + 0xB0000)
35#define S6_REG_I2S (S6_REG_SCB + 0xC0000)
36#define S6_REG_GMAC (S6_REG_SCB + 0xD0000)
37#define S6_REG_HIFDMA (S6_REG_SCB + 0xE0000)
38#define S6_REG_GREG2 (S6_REG_SCB + 0xF0000)
39
40#define S6_REG_APB S6_REG_SCB
41#define S6_REG_UART (S6_REG_APB + 0x0000)
42#define S6_REG_INTC (S6_REG_APB + 0x2000)
43#define S6_REG_SPI (S6_REG_APB + 0x3000)
44#define S6_REG_I2C (S6_REG_APB + 0x4000)
45#define S6_REG_GPIO (S6_REG_APB + 0x8000)
46
47/* Global register block */
48
49#define S6_GREG1_PLL_LOCKCLEAR 0x000
50#define S6_GREG1_PLL_LOCK_SYS 0
51#define S6_GREG1_PLL_LOCK_IO 1
52#define S6_GREG1_PLL_LOCK_AIM 2
53#define S6_GREG1_PLL_LOCK_DP0 3
54#define S6_GREG1_PLL_LOCK_DP2 4
55#define S6_GREG1_PLL_LOCK_DDR 5
56#define S6_GREG1_PLL_LOCKSTAT 0x004
57#define S6_GREG1_PLL_LOCKSTAT_CURLOCK 0
58#define S6_GREG1_PLL_LOCKSTAT_EVERUNLCK 8
59#define S6_GREG1_PLLSEL 0x010
60#define S6_GREG1_PLLSEL_AIM 0
61#define S6_GREG1_PLLSEL_AIM_DDR2 0
62#define S6_GREG1_PLLSEL_AIM_300MHZ 1
63#define S6_GREG1_PLLSEL_AIM_240MHZ 2
64#define S6_GREG1_PLLSEL_AIM_200MHZ 3
65#define S6_GREG1_PLLSEL_AIM_150MHZ 4
66#define S6_GREG1_PLLSEL_AIM_120MHZ 5
67#define S6_GREG1_PLLSEL_AIM_40MHZ 6
68#define S6_GREG1_PLLSEL_AIM_PLLAIMREF 7
69#define S6_GREG1_PLLSEL_AIM_MASK 7
70#define S6_GREG1_PLLSEL_DDR 8
71#define S6_GREG1_PLLSEL_DDR_HS 0
72#define S6_GREG1_PLLSEL_DDR_333MHZ 1
73#define S6_GREG1_PLLSEL_DDR_250MHZ 2
74#define S6_GREG1_PLLSEL_DDR_200MHZ 3
75#define S6_GREG1_PLLSEL_DDR_167MHZ 4
76#define S6_GREG1_PLLSEL_DDR_100MHZ 5
77#define S6_GREG1_PLLSEL_DDR_33MHZ 6
78#define S6_GREG1_PLLSEL_DDR_PLLIOREF 7
79#define S6_GREG1_PLLSEL_DDR_MASK 7
80#define S6_GREG1_PLLSEL_GMAC 16
81#define S6_GREG1_PLLSEL_GMAC_125MHZ 0
82#define S6_GREG1_PLLSEL_GMAC_25MHZ 1
83#define S6_GREG1_PLLSEL_GMAC_2500KHZ 2
84#define S6_GREG1_PLLSEL_GMAC_EXTERN 3
85#define S6_GREG1_PLLSEL_GMAC_MASK 3
86#define S6_GREG1_PLLSEL_GMII 18
87#define S6_GREG1_PLLSEL_GMII_111MHZ 0
88#define S6_GREG1_PLLSEL_GMII_IOREF 1
89#define S6_GREG1_PLLSEL_GMII_NONE 2
90#define S6_GREG1_PLLSEL_GMII_125MHZ 3
91#define S6_GREG1_PLLSEL_GMII_MASK 3
92#define S6_GREG1_SYSUNLOCKCNT 0x020
93#define S6_GREG1_IOUNLOCKCNT 0x024
94#define S6_GREG1_AIMUNLOCKCNT 0x028
95#define S6_GREG1_DP0UNLOCKCNT 0x02C
96#define S6_GREG1_DP2UNLOCKCNT 0x030
97#define S6_GREG1_DDRUNLOCKCNT 0x034
98#define S6_GREG1_CLKBAL0 0x040
99#define S6_GREG1_CLKBAL0_LSGB 0
100#define S6_GREG1_CLKBAL0_LSPX 8
101#define S6_GREG1_CLKBAL0_MEMDO 16
102#define S6_GREG1_CLKBAL0_HSXT1 24
103#define S6_GREG1_CLKBAL1 0x044
104#define S6_GREG1_CLKBAL1_HSISEF 0
105#define S6_GREG1_CLKBAL1_HSNI 8
106#define S6_GREG1_CLKBAL1_HSNS 16
107#define S6_GREG1_CLKBAL1_HSISEFCFG 24
108#define S6_GREG1_CLKBAL2 0x048
109#define S6_GREG1_CLKBAL2_LSNB 0
110#define S6_GREG1_CLKBAL2_LSSB 8
111#define S6_GREG1_CLKBAL2_LSREST 24
112#define S6_GREG1_CLKBAL3 0x04C
113#define S6_GREG1_CLKBAL3_ISEFXAD 0
114#define S6_GREG1_CLKBAL3_ISEFLMS 8
115#define S6_GREG1_CLKBAL3_ISEFISEF 16
116#define S6_GREG1_CLKBAL3_DDRDD 24
117#define S6_GREG1_CLKBAL4 0x050
118#define S6_GREG1_CLKBAL4_DDRDP 0
119#define S6_GREG1_CLKBAL4_DDRDO 8
120#define S6_GREG1_CLKBAL4_DDRNB 16
121#define S6_GREG1_CLKBAL4_DDRLMS 24
122#define S6_GREG1_BLOCKENA 0x100
123#define S6_GREG1_BLOCK_DDR 0
124#define S6_GREG1_BLOCK_DP 1
125#define S6_GREG1_BLOCK_NSNI 2
126#define S6_GREG1_BLOCK_PCIE 3
127#define S6_GREG1_BLOCK_GMAC 4
128#define S6_GREG1_BLOCK_I2S 5
129#define S6_GREG1_BLOCK_EGIB 6
130#define S6_GREG1_BLOCK_SB 7
131#define S6_GREG1_BLOCK_XT1 8
132#define S6_GREG1_CLKGATE 0x104
133#define S6_GREG1_BGATE_AIMNORTH 9
134#define S6_GREG1_BGATE_AIMEAST 10
135#define S6_GREG1_BGATE_AIMWEST 11
136#define S6_GREG1_BGATE_AIMSOUTH 12
137#define S6_GREG1_CHIPRES 0x108
138#define S6_GREG1_CHIPRES_SOFTRES 0
139#define S6_GREG1_CHIPRES_LOSTLOCK 1
140#define S6_GREG1_RESETCAUSE 0x10C
141#define S6_GREG1_RESETCAUSE_RESETN 0
142#define S6_GREG1_RESETCAUSE_GLOBAL 1
143#define S6_GREG1_RESETCAUSE_WDOGTIMER 2
144#define S6_GREG1_RESETCAUSE_SWCHIP 3
145#define S6_GREG1_RESETCAUSE_PLLSYSLOSS 4
146#define S6_GREG1_RESETCAUSE_PCIE 5
147#define S6_GREG1_RESETCAUSE_CREATEDGLOB 6
148#define S6_GREG1_REFCLOCKCNT 0x110
149#define S6_GREG1_RESETTIMER 0x114
150#define S6_GREG1_NMITIMER 0x118
151#define S6_GREG1_GLOBAL_TIMER 0x11C
152#define S6_GREG1_TIMER0 0x180
153#define S6_GREG1_TIMER1 0x184
154#define S6_GREG1_UARTCLOCKSEL 0x204
155#define S6_GREG1_CHIPVERSPACKG 0x208
156#define S6_GREG1_CHIPVERSPACKG_CHIPVID 0
157#define S6_GREG1_CHIPVERSPACKG_PACKSEL 8
158#define S6_GREG1_ONDIETERMCTRL 0x20C
159#define S6_GREG1_ONDIETERMCTRL_WEST 0
160#define S6_GREG1_ONDIETERMCTRL_NORTH 2
161#define S6_GREG1_ONDIETERMCTRL_EAST 4
162#define S6_GREG1_ONDIETERMCTRL_SOUTH 6
163#define S6_GREG1_ONDIETERMCTRL_NONE 0
164#define S6_GREG1_ONDIETERMCTRL_75OHM 2
165#define S6_GREG1_ONDIETERMCTRL_MASK 3
166#define S6_GREG1_BOOT_CFG0 0x210
167#define S6_GREG1_BOOT_CFG0_AIMSTRONG 1
168#define S6_GREG1_BOOT_CFG0_MINIBOOTDL 2
169#define S6_GREG1_BOOT_CFG0_OCDGPIO8SET 5
170#define S6_GREG1_BOOT_CFG0_OCDGPIOENA 6
171#define S6_GREG1_BOOT_CFG0_DOWNSTREAM 7
172#define S6_GREG1_BOOT_CFG0_PLLSYSDIV 8
173#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_300MHZ 1
174#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_240MHZ 2
175#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_200MHZ 3
176#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_150MHZ 4
177#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_120MHZ 5
178#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_40MHZ 6
179#define S6_GREG1_BOOT_CFG0_PLLSYSDIV_MASK 7
180#define S6_GREG1_BOOT_CFG0_BALHSLMS 12
181#define S6_GREG1_BOOT_CFG0_BALHSNB 18
182#define S6_GREG1_BOOT_CFG0_BALHSXAD 24
183#define S6_GREG1_BOOT_CFG1 0x214
184#define S6_GREG1_BOOT_CFG1_PCIE1LANE 1
185#define S6_GREG1_BOOT_CFG1_MPLLPRESCALE 2
186#define S6_GREG1_BOOT_CFG1_MPLLNCY 4
187#define S6_GREG1_BOOT_CFG1_MPLLNCY5 9
188#define S6_GREG1_BOOT_CFG1_BALHSREST 14
189#define S6_GREG1_BOOT_CFG1_BALHSPSMEMS 20
190#define S6_GREG1_BOOT_CFG1_BALLSGI 26
191#define S6_GREG1_BOOT_CFG2 0x218
192#define S6_GREG1_BOOT_CFG2_PEID 0
193#define S6_GREG1_BOOT_CFG3 0x21C
194#define S6_GREG1_DRAMBUSYHOLDOF 0x220
195#define S6_GREG1_DRAMBUSYHOLDOF_XT0 0
196#define S6_GREG1_DRAMBUSYHOLDOF_XT1 4
197#define S6_GREG1_DRAMBUSYHOLDOF_XT_MASK 7
198#define S6_GREG1_PCIEBAR1SIZE 0x224
199#define S6_GREG1_PCIEBAR2SIZE 0x228
200#define S6_GREG1_PCIEVENDOR 0x22C
201#define S6_GREG1_PCIEDEVICE 0x230
202#define S6_GREG1_PCIEREV 0x234
203#define S6_GREG1_PCIECLASS 0x238
204#define S6_GREG1_XT1DCACHEMISS 0x240
205#define S6_GREG1_XT1ICACHEMISS 0x244
206#define S6_GREG1_HWSEMAPHORE(n) (0x400 + 4 * (n))
207#define S6_GREG1_HWSEMAPHORE_NB 16
208
209/* peripheral interrupt numbers */
210
211#define S6_INTC_GPIO(n) (n) /* 0..3 */
212#define S6_INTC_I2C 4
213#define S6_INTC_SPI 5
214#define S6_INTC_NB_ERR 6
215#define S6_INTC_DMA_LMSERR 7
216#define S6_INTC_DMA_LMSLOWWMRK(n) (8 + (n)) /* 0..11 */
217#define S6_INTC_DMA_LMSPENDCNT(n) (20 + (n)) /* 0..11 */
218#define S6_INTC_DMA HOSTLOWWMRK(n) (32 + (n)) /* 0..6 */
219#define S6_INTC_DMA_HOSTPENDCNT(n) (39 + (n)) /* 0..6 */
220#define S6_INTC_DMA_HOSTERR 46
221#define S6_INTC_UART(n) (47 + (n)) /* 0..1 */
222#define S6_INTC_XAD 49
223#define S6_INTC_NI_ERR 50
224#define S6_INTC_NI_INFIFOFULL 51
225#define S6_INTC_DMA_NIERR 52
226#define S6_INTC_DMA_NILOWWMRK(n) (53 + (n)) /* 0..3 */
227#define S6_INTC_DMA_NIPENDCNT(n) (57 + (n)) /* 0..3 */
228#define S6_INTC_DDR 61
229#define S6_INTC_NS_ERR 62
230#define S6_INTC_EFI_CFGERR 63
231#define S6_INTC_EFI_ISEFTEST 64
232#define S6_INTC_EFI_WRITEERR 65
233#define S6_INTC_NMI_TIMER 66
234#define S6_INTC_PLLLOCK_SYS 67
235#define S6_INTC_PLLLOCK_IO 68
236#define S6_INTC_PLLLOCK_AIM 69
237#define S6_INTC_PLLLOCK_DP0 70
238#define S6_INTC_PLLLOCK_DP2 71
239#define S6_INTC_I2S_ERR 72
240#define S6_INTC_GMAC_STAT 73
241#define S6_INTC_GMAC_ERR 74
242#define S6_INTC_GIB_ERR 75
243#define S6_INTC_PCIE_ERR 76
244#define S6_INTC_PCIE_MSI(n) (77 + (n)) /* 0..3 */
245#define S6_INTC_PCIE_INTA 81
246#define S6_INTC_PCIE_INTB 82
247#define S6_INTC_PCIE_INTC 83
248#define S6_INTC_PCIE_INTD 84
249#define S6_INTC_SW(n) (85 + (n)) /* 0..9 */
250#define S6_INTC_SW_ENABLE(n) (85 + 256 + (n))
251#define S6_INTC_DMA_DP_ERR 95
252#define S6_INTC_DMA_DPLOWWMRK(n) (96 + (n)) /* 0..3 */
253#define S6_INTC_DMA_DPPENDCNT(n) (100 + (n)) /* 0..3 */
254#define S6_INTC_DMA_DPTERMCNT(n) (104 + (n)) /* 0..3 */
255#define S6_INTC_TIMER0 108
256#define S6_INTC_TIMER1 109
257#define S6_INTC_DMA_HOSTTERMCNT(n) (110 + (n)) /* 0..6 */
258
259#endif /* __XTENSA_S6000_HARDWARE_H */
diff --git a/arch/xtensa/variants/s6000/include/variant/irq.h b/arch/xtensa/variants/s6000/include/variant/irq.h
new file mode 100644
index 000000000000..fa031cb0acc4
--- /dev/null
+++ b/arch/xtensa/variants/s6000/include/variant/irq.h
@@ -0,0 +1,9 @@
1#ifndef __XTENSA_S6000_IRQ_H
2#define __XTENSA_S6000_IRQ_H
3
4#define NO_IRQ (-1)
5
6extern void variant_irq_enable(unsigned int irq);
7extern void variant_irq_disable(unsigned int irq);
8
9#endif /* __XTENSA_S6000_IRQ_H */
diff --git a/arch/xtensa/variants/s6000/include/variant/tie-asm.h b/arch/xtensa/variants/s6000/include/variant/tie-asm.h
new file mode 100644
index 000000000000..f02d0a3a2e20
--- /dev/null
+++ b/arch/xtensa/variants/s6000/include/variant/tie-asm.h
@@ -0,0 +1,304 @@
1/*
2 * This header file contains assembly-language definitions (assembly
3 * macros, etc.) for this specific Xtensa processor's TIE extensions
4 * and options. It is customized to this Xtensa processor configuration.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1999-2008 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_CORE_TIE_ASM_H
14#define _XTENSA_CORE_TIE_ASM_H
15
16/* Selection parameter values for save-area save/restore macros: */
17/* Option vs. TIE: */
18#define XTHAL_SAS_TIE 0x0001 /* custom extension or coprocessor */
19#define XTHAL_SAS_OPT 0x0002 /* optional (and not a coprocessor) */
20/* Whether used automatically by compiler: */
21#define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */
22#define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
23/* ABI handling across function calls: */
24#define XTHAL_SAS_CALR 0x0010 /* caller-saved */
25#define XTHAL_SAS_CALE 0x0020 /* callee-saved */
26#define XTHAL_SAS_GLOB 0x0040 /* global across function calls (in thread) */
27/* Misc */
28#define XTHAL_SAS_ALL 0xFFFF /* include all default NCP contents */
29
30
31
32/* Macro to save all non-coprocessor (extra) custom TIE and optional state
33 * (not including zero-overhead loop registers).
34 * Save area ptr (clobbered): ptr (16 byte aligned)
35 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
36 */
37 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
38 xchal_sa_start \continue, \ofs
39 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
40 xchal_sa_align \ptr, 0, 1024-4, 4, 4
41 rsr \at1, BR // boolean option
42 s32i \at1, \ptr, .Lxchal_ofs_ + 0
43 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
44 .endif
45 .endm // xchal_ncp_store
46
47/* Macro to save all non-coprocessor (extra) custom TIE and optional state
48 * (not including zero-overhead loop registers).
49 * Save area ptr (clobbered): ptr (16 byte aligned)
50 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
51 */
52 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
53 xchal_sa_start \continue, \ofs
54 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
55 xchal_sa_align \ptr, 0, 1024-4, 4, 4
56 l32i \at1, \ptr, .Lxchal_ofs_ + 0
57 wsr \at1, BR // boolean option
58 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
59 .endif
60 .endm // xchal_ncp_load
61
62
63
64#define XCHAL_NCP_NUM_ATMPS 1
65
66
67
68/* Macro to save the state of TIE coprocessor FPU.
69 * Save area ptr (clobbered): ptr (16 byte aligned)
70 * Scratch regs (clobbered): at1..at4 (only first XCHAL_CP0_NUM_ATMPS needed)
71 */
72#define xchal_cp_FPU_store xchal_cp0_store
73/* #define xchal_cp_FPU_store_a2 xchal_cp0_store a2 a3 a4 a5 a6 */
74 .macro xchal_cp0_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
75 xchal_sa_start \continue, \ofs
76 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
77 xchal_sa_align \ptr, 0, 0, 1, 16
78 rur232 \at1 // FCR
79 s32i \at1, \ptr, 0
80 rur233 \at1 // FSR
81 s32i \at1, \ptr, 4
82 SSI f0, \ptr, 8
83 SSI f1, \ptr, 12
84 SSI f2, \ptr, 16
85 SSI f3, \ptr, 20
86 SSI f4, \ptr, 24
87 SSI f5, \ptr, 28
88 SSI f6, \ptr, 32
89 SSI f7, \ptr, 36
90 SSI f8, \ptr, 40
91 SSI f9, \ptr, 44
92 SSI f10, \ptr, 48
93 SSI f11, \ptr, 52
94 SSI f12, \ptr, 56
95 SSI f13, \ptr, 60
96 SSI f14, \ptr, 64
97 SSI f15, \ptr, 68
98 .set .Lxchal_ofs_, .Lxchal_ofs_ + 72
99 .endif
100 .endm // xchal_cp0_store
101
102/* Macro to restore the state of TIE coprocessor FPU.
103 * Save area ptr (clobbered): ptr (16 byte aligned)
104 * Scratch regs (clobbered): at1..at4 (only first XCHAL_CP0_NUM_ATMPS needed)
105 */
106#define xchal_cp_FPU_load xchal_cp0_load
107/* #define xchal_cp_FPU_load_a2 xchal_cp0_load a2 a3 a4 a5 a6 */
108 .macro xchal_cp0_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
109 xchal_sa_start \continue, \ofs
110 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
111 xchal_sa_align \ptr, 0, 0, 1, 16
112 l32i \at1, \ptr, 0
113 wur232 \at1 // FCR
114 l32i \at1, \ptr, 4
115 wur233 \at1 // FSR
116 LSI f0, \ptr, 8
117 LSI f1, \ptr, 12
118 LSI f2, \ptr, 16
119 LSI f3, \ptr, 20
120 LSI f4, \ptr, 24
121 LSI f5, \ptr, 28
122 LSI f6, \ptr, 32
123 LSI f7, \ptr, 36
124 LSI f8, \ptr, 40
125 LSI f9, \ptr, 44
126 LSI f10, \ptr, 48
127 LSI f11, \ptr, 52
128 LSI f12, \ptr, 56
129 LSI f13, \ptr, 60
130 LSI f14, \ptr, 64
131 LSI f15, \ptr, 68
132 .set .Lxchal_ofs_, .Lxchal_ofs_ + 72
133 .endif
134 .endm // xchal_cp0_load
135
136#define XCHAL_CP0_NUM_ATMPS 1
137
138/* Macro to save the state of TIE coprocessor XAD.
139 * Save area ptr (clobbered): ptr (16 byte aligned)
140 * Scratch regs (clobbered): at1..at4 (only first XCHAL_CP6_NUM_ATMPS needed)
141 */
142#define xchal_cp_XAD_store xchal_cp6_store
143/* #define xchal_cp_XAD_store_a2 xchal_cp6_store a2 a3 a4 a5 a6 */
144 .macro xchal_cp6_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
145 xchal_sa_start \continue, \ofs
146 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
147 xchal_sa_align \ptr, 0, 0, 1, 16
148 rur0 \at1 // LDCBHI
149 s32i \at1, \ptr, 0
150 rur1 \at1 // LDCBLO
151 s32i \at1, \ptr, 4
152 rur2 \at1 // STCBHI
153 s32i \at1, \ptr, 8
154 rur3 \at1 // STCBLO
155 s32i \at1, \ptr, 12
156 rur8 \at1 // LDBRBASE
157 s32i \at1, \ptr, 16
158 rur9 \at1 // LDBROFF
159 s32i \at1, \ptr, 20
160 rur10 \at1 // LDBRINC
161 s32i \at1, \ptr, 24
162 rur11 \at1 // STBRBASE
163 s32i \at1, \ptr, 28
164 rur12 \at1 // STBROFF
165 s32i \at1, \ptr, 32
166 rur13 \at1 // STBRINC
167 s32i \at1, \ptr, 36
168 rur24 \at1 // SCRATCH0
169 s32i \at1, \ptr, 40
170 rur25 \at1 // SCRATCH1
171 s32i \at1, \ptr, 44
172 rur26 \at1 // SCRATCH2
173 s32i \at1, \ptr, 48
174 rur27 \at1 // SCRATCH3
175 s32i \at1, \ptr, 52
176 WRAS128I wra0, \ptr, 64
177 WRAS128I wra1, \ptr, 80
178 WRAS128I wra2, \ptr, 96
179 WRAS128I wra3, \ptr, 112
180 WRAS128I wra4, \ptr, 128
181 WRAS128I wra5, \ptr, 144
182 WRAS128I wra6, \ptr, 160
183 WRAS128I wra7, \ptr, 176
184 WRAS128I wra8, \ptr, 192
185 WRAS128I wra9, \ptr, 208
186 WRAS128I wra10, \ptr, 224
187 WRAS128I wra11, \ptr, 240
188 WRAS128I wra12, \ptr, 256
189 WRAS128I wra13, \ptr, 272
190 WRAS128I wra14, \ptr, 288
191 WRAS128I wra15, \ptr, 304
192 WRBS128I wrb0, \ptr, 320
193 WRBS128I wrb1, \ptr, 336
194 WRBS128I wrb2, \ptr, 352
195 WRBS128I wrb3, \ptr, 368
196 WRBS128I wrb4, \ptr, 384
197 WRBS128I wrb5, \ptr, 400
198 WRBS128I wrb6, \ptr, 416
199 WRBS128I wrb7, \ptr, 432
200 WRBS128I wrb8, \ptr, 448
201 WRBS128I wrb9, \ptr, 464
202 WRBS128I wrb10, \ptr, 480
203 WRBS128I wrb11, \ptr, 496
204 WRBS128I wrb12, \ptr, 512
205 WRBS128I wrb13, \ptr, 528
206 WRBS128I wrb14, \ptr, 544
207 WRBS128I wrb15, \ptr, 560
208 .set .Lxchal_ofs_, .Lxchal_ofs_ + 576
209 .endif
210 .endm // xchal_cp6_store
211
212/* Macro to restore the state of TIE coprocessor XAD.
213 * Save area ptr (clobbered): ptr (16 byte aligned)
214 * Scratch regs (clobbered): at1..at4 (only first XCHAL_CP6_NUM_ATMPS needed)
215 */
216#define xchal_cp_XAD_load xchal_cp6_load
217/* #define xchal_cp_XAD_load_a2 xchal_cp6_load a2 a3 a4 a5 a6 */
218 .macro xchal_cp6_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
219 xchal_sa_start \continue, \ofs
220 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
221 xchal_sa_align \ptr, 0, 0, 1, 16
222 l32i \at1, \ptr, 0
223 wur0 \at1 // LDCBHI
224 l32i \at1, \ptr, 4
225 wur1 \at1 // LDCBLO
226 l32i \at1, \ptr, 8
227 wur2 \at1 // STCBHI
228 l32i \at1, \ptr, 12
229 wur3 \at1 // STCBLO
230 l32i \at1, \ptr, 16
231 wur8 \at1 // LDBRBASE
232 l32i \at1, \ptr, 20
233 wur9 \at1 // LDBROFF
234 l32i \at1, \ptr, 24
235 wur10 \at1 // LDBRINC
236 l32i \at1, \ptr, 28
237 wur11 \at1 // STBRBASE
238 l32i \at1, \ptr, 32
239 wur12 \at1 // STBROFF
240 l32i \at1, \ptr, 36
241 wur13 \at1 // STBRINC
242 l32i \at1, \ptr, 40
243 wur24 \at1 // SCRATCH0
244 l32i \at1, \ptr, 44
245 wur25 \at1 // SCRATCH1
246 l32i \at1, \ptr, 48
247 wur26 \at1 // SCRATCH2
248 l32i \at1, \ptr, 52
249 wur27 \at1 // SCRATCH3
250 WRBL128I wrb0, \ptr, 320
251 WRBL128I wrb1, \ptr, 336
252 WRBL128I wrb2, \ptr, 352
253 WRBL128I wrb3, \ptr, 368
254 WRBL128I wrb4, \ptr, 384
255 WRBL128I wrb5, \ptr, 400
256 WRBL128I wrb6, \ptr, 416
257 WRBL128I wrb7, \ptr, 432
258 WRBL128I wrb8, \ptr, 448
259 WRBL128I wrb9, \ptr, 464
260 WRBL128I wrb10, \ptr, 480
261 WRBL128I wrb11, \ptr, 496
262 WRBL128I wrb12, \ptr, 512
263 WRBL128I wrb13, \ptr, 528
264 WRBL128I wrb14, \ptr, 544
265 WRBL128I wrb15, \ptr, 560
266 WRAL128I wra0, \ptr, 64
267 WRAL128I wra1, \ptr, 80
268 WRAL128I wra2, \ptr, 96
269 WRAL128I wra3, \ptr, 112
270 WRAL128I wra4, \ptr, 128
271 WRAL128I wra5, \ptr, 144
272 WRAL128I wra6, \ptr, 160
273 WRAL128I wra7, \ptr, 176
274 WRAL128I wra8, \ptr, 192
275 WRAL128I wra9, \ptr, 208
276 WRAL128I wra10, \ptr, 224
277 WRAL128I wra11, \ptr, 240
278 WRAL128I wra12, \ptr, 256
279 WRAL128I wra13, \ptr, 272
280 WRAL128I wra14, \ptr, 288
281 WRAL128I wra15, \ptr, 304
282 .set .Lxchal_ofs_, .Lxchal_ofs_ + 576
283 .endif
284 .endm // xchal_cp6_load
285
286#define XCHAL_CP6_NUM_ATMPS 1
287#define XCHAL_SA_NUM_ATMPS 1
288
289 /* Empty macros for unconfigured coprocessors: */
290 .macro xchal_cp1_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
291 .macro xchal_cp1_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
292 .macro xchal_cp2_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
293 .macro xchal_cp2_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
294 .macro xchal_cp3_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
295 .macro xchal_cp3_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
296 .macro xchal_cp4_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
297 .macro xchal_cp4_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
298 .macro xchal_cp5_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
299 .macro xchal_cp5_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
300 .macro xchal_cp7_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
301 .macro xchal_cp7_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
302
303#endif /*_XTENSA_CORE_TIE_ASM_H*/
304
diff --git a/arch/xtensa/variants/s6000/include/variant/tie.h b/arch/xtensa/variants/s6000/include/variant/tie.h
new file mode 100644
index 000000000000..be7ea843d5df
--- /dev/null
+++ b/arch/xtensa/variants/s6000/include/variant/tie.h
@@ -0,0 +1,191 @@
1/*
2 * This header file describes this specific Xtensa processor's TIE extensions
3 * that extend basic Xtensa core functionality. It is customized to this
4 * Xtensa processor configuration.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1999-2008 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_CORE_TIE_H
14#define _XTENSA_CORE_TIE_H
15
16#define XCHAL_CP_NUM 2 /* number of coprocessors */
17#define XCHAL_CP_MAX 7 /* max CP ID + 1 (0 if none) */
18#define XCHAL_CP_MASK 0x41 /* bitmask of all CPs by ID */
19#define XCHAL_CP_PORT_MASK 0x00 /* bitmask of only port CPs */
20
21/* Basic parameters of each coprocessor: */
22#define XCHAL_CP0_NAME "FPU"
23#define XCHAL_CP0_IDENT FPU
24#define XCHAL_CP0_SA_SIZE 72 /* size of state save area */
25#define XCHAL_CP0_SA_ALIGN 4 /* min alignment of save area */
26#define XCHAL_CP_ID_FPU 0 /* coprocessor ID (0..7) */
27#define XCHAL_CP6_NAME "XAD"
28#define XCHAL_CP6_IDENT XAD
29#define XCHAL_CP6_SA_SIZE 576 /* size of state save area */
30#define XCHAL_CP6_SA_ALIGN 16 /* min alignment of save area */
31#define XCHAL_CP_ID_XAD 6 /* coprocessor ID (0..7) */
32
33/* Filler info for unassigned coprocessors, to simplify arrays etc: */
34#define XCHAL_CP1_SA_SIZE 0
35#define XCHAL_CP1_SA_ALIGN 1
36#define XCHAL_CP2_SA_SIZE 0
37#define XCHAL_CP2_SA_ALIGN 1
38#define XCHAL_CP3_SA_SIZE 0
39#define XCHAL_CP3_SA_ALIGN 1
40#define XCHAL_CP4_SA_SIZE 0
41#define XCHAL_CP4_SA_ALIGN 1
42#define XCHAL_CP5_SA_SIZE 0
43#define XCHAL_CP5_SA_ALIGN 1
44#define XCHAL_CP7_SA_SIZE 0
45#define XCHAL_CP7_SA_ALIGN 1
46
47/* Save area for non-coprocessor optional and custom (TIE) state: */
48#define XCHAL_NCP_SA_SIZE 4
49#define XCHAL_NCP_SA_ALIGN 4
50
51/* Total save area for optional and custom state (NCP + CPn): */
52#define XCHAL_TOTAL_SA_SIZE 672 /* with 16-byte align padding */
53#define XCHAL_TOTAL_SA_ALIGN 16 /* actual minimum alignment */
54
55/*
56 * Detailed contents of save areas.
57 * NOTE: caller must define the XCHAL_SA_REG macro (not defined here)
58 * before expanding the XCHAL_xxx_SA_LIST() macros.
59 *
60 * XCHAL_SA_REG(s,ccused,abikind,kind,opt,name,galign,align,asize,
61 * dbnum,base,regnum,bitsz,gapsz,reset,x...)
62 *
63 * s = passed from XCHAL_*_LIST(s), eg. to select how to expand
64 * ccused = set if used by compiler without special options or code
65 * abikind = 0 (caller-saved), 1 (callee-saved), or 2 (thread-global)
66 * kind = 0 (special reg), 1 (TIE user reg), or 2 (TIE regfile reg)
67 * opt = 0 (custom TIE extension or coprocessor), or 1 (optional reg)
68 * name = lowercase reg name (no quotes)
69 * galign = group byte alignment (power of 2) (galign >= align)
70 * align = register byte alignment (power of 2)
71 * asize = allocated size in bytes (asize*8 == bitsz + gapsz + padsz)
72 * (not including any pad bytes required to galign this or next reg)
73 * dbnum = unique target number f/debug (see <xtensa-libdb-macros.h>)
74 * base = reg shortname w/o index (or sr=special, ur=TIE user reg)
75 * regnum = reg index in regfile, or special/TIE-user reg number
76 * bitsz = number of significant bits (regfile width, or ur/sr mask bits)
77 * gapsz = intervening bits, if bitsz bits not stored contiguously
78 * (padsz = pad bits at end [TIE regfile] or at msbits [ur,sr] of asize)
79 * reset = register reset value (or 0 if undefined at reset)
80 * x = reserved for future use (0 until then)
81 *
82 * To filter out certain registers, e.g. to expand only the non-global
83 * registers used by the compiler, you can do something like this:
84 *
85 * #define XCHAL_SA_REG(s,ccused,p...) SELCC##ccused(p)
86 * #define SELCC0(p...)
87 * #define SELCC1(abikind,p...) SELAK##abikind(p)
88 * #define SELAK0(p...) REG(p)
89 * #define SELAK1(p...) REG(p)
90 * #define SELAK2(p...)
91 * #define REG(kind,tie,name,galn,aln,asz,csz,dbnum,base,rnum,bsz,rst,x...) \
92 * ...what you want to expand...
93 */
94
95#define XCHAL_NCP_SA_NUM 1
96#define XCHAL_NCP_SA_LIST(s) \
97 XCHAL_SA_REG(s,0,0,0,1, br, 4, 4, 4,0x0204, sr,4 , 16,0,0,0)
98
99#define XCHAL_CP0_SA_NUM 18
100#define XCHAL_CP0_SA_LIST(s) \
101 XCHAL_SA_REG(s,0,0,1,0, fcr, 4, 4, 4,0x03E8, ur,232, 32,0,0,0) \
102 XCHAL_SA_REG(s,0,0,1,0, fsr, 4, 4, 4,0x03E9, ur,233, 32,0,0,0) \
103 XCHAL_SA_REG(s,0,0,2,0, f0, 4, 4, 4,0x0030, f,0 , 32,0,0,0) \
104 XCHAL_SA_REG(s,0,0,2,0, f1, 4, 4, 4,0x0031, f,1 , 32,0,0,0) \
105 XCHAL_SA_REG(s,0,0,2,0, f2, 4, 4, 4,0x0032, f,2 , 32,0,0,0) \
106 XCHAL_SA_REG(s,0,0,2,0, f3, 4, 4, 4,0x0033, f,3 , 32,0,0,0) \
107 XCHAL_SA_REG(s,0,0,2,0, f4, 4, 4, 4,0x0034, f,4 , 32,0,0,0) \
108 XCHAL_SA_REG(s,0,0,2,0, f5, 4, 4, 4,0x0035, f,5 , 32,0,0,0) \
109 XCHAL_SA_REG(s,0,0,2,0, f6, 4, 4, 4,0x0036, f,6 , 32,0,0,0) \
110 XCHAL_SA_REG(s,0,0,2,0, f7, 4, 4, 4,0x0037, f,7 , 32,0,0,0) \
111 XCHAL_SA_REG(s,0,0,2,0, f8, 4, 4, 4,0x0038, f,8 , 32,0,0,0) \
112 XCHAL_SA_REG(s,0,0,2,0, f9, 4, 4, 4,0x0039, f,9 , 32,0,0,0) \
113 XCHAL_SA_REG(s,0,0,2,0, f10, 4, 4, 4,0x003A, f,10 , 32,0,0,0) \
114 XCHAL_SA_REG(s,0,0,2,0, f11, 4, 4, 4,0x003B, f,11 , 32,0,0,0) \
115 XCHAL_SA_REG(s,0,0,2,0, f12, 4, 4, 4,0x003C, f,12 , 32,0,0,0) \
116 XCHAL_SA_REG(s,0,0,2,0, f13, 4, 4, 4,0x003D, f,13 , 32,0,0,0) \
117 XCHAL_SA_REG(s,0,0,2,0, f14, 4, 4, 4,0x003E, f,14 , 32,0,0,0) \
118 XCHAL_SA_REG(s,0,0,2,0, f15, 4, 4, 4,0x003F, f,15 , 32,0,0,0)
119
120#define XCHAL_CP1_SA_NUM 0
121#define XCHAL_CP1_SA_LIST(s) /* empty */
122
123#define XCHAL_CP2_SA_NUM 0
124#define XCHAL_CP2_SA_LIST(s) /* empty */
125
126#define XCHAL_CP3_SA_NUM 0
127#define XCHAL_CP3_SA_LIST(s) /* empty */
128
129#define XCHAL_CP4_SA_NUM 0
130#define XCHAL_CP4_SA_LIST(s) /* empty */
131
132#define XCHAL_CP5_SA_NUM 0
133#define XCHAL_CP5_SA_LIST(s) /* empty */
134
135#define XCHAL_CP6_SA_NUM 46
136#define XCHAL_CP6_SA_LIST(s) \
137 XCHAL_SA_REG(s,0,0,1,0, ldcbhi,16, 4, 4,0x0300, ur,0 , 32,0,0,0) \
138 XCHAL_SA_REG(s,0,0,1,0, ldcblo, 4, 4, 4,0x0301, ur,1 , 32,0,0,0) \
139 XCHAL_SA_REG(s,0,0,1,0, stcbhi, 4, 4, 4,0x0302, ur,2 , 32,0,0,0) \
140 XCHAL_SA_REG(s,0,0,1,0, stcblo, 4, 4, 4,0x0303, ur,3 , 32,0,0,0) \
141 XCHAL_SA_REG(s,0,0,1,0, ldbrbase, 4, 4, 4,0x0308, ur,8 , 32,0,0,0) \
142 XCHAL_SA_REG(s,0,0,1,0, ldbroff, 4, 4, 4,0x0309, ur,9 , 32,0,0,0) \
143 XCHAL_SA_REG(s,0,0,1,0, ldbrinc, 4, 4, 4,0x030A, ur,10 , 32,0,0,0) \
144 XCHAL_SA_REG(s,0,0,1,0, stbrbase, 4, 4, 4,0x030B, ur,11 , 32,0,0,0) \
145 XCHAL_SA_REG(s,0,0,1,0, stbroff, 4, 4, 4,0x030C, ur,12 , 32,0,0,0) \
146 XCHAL_SA_REG(s,0,0,1,0, stbrinc, 4, 4, 4,0x030D, ur,13 , 32,0,0,0) \
147 XCHAL_SA_REG(s,0,0,1,0, scratch0, 4, 4, 4,0x0318, ur,24 , 32,0,0,0) \
148 XCHAL_SA_REG(s,0,0,1,0, scratch1, 4, 4, 4,0x0319, ur,25 , 32,0,0,0) \
149 XCHAL_SA_REG(s,0,0,1,0, scratch2, 4, 4, 4,0x031A, ur,26 , 32,0,0,0) \
150 XCHAL_SA_REG(s,0,0,1,0, scratch3, 4, 4, 4,0x031B, ur,27 , 32,0,0,0) \
151 XCHAL_SA_REG(s,0,0,2,0, wra0,16,16,16,0x1010, wra,0 ,128,0,0,0) \
152 XCHAL_SA_REG(s,0,0,2,0, wra1,16,16,16,0x1011, wra,1 ,128,0,0,0) \
153 XCHAL_SA_REG(s,0,0,2,0, wra2,16,16,16,0x1012, wra,2 ,128,0,0,0) \
154 XCHAL_SA_REG(s,0,0,2,0, wra3,16,16,16,0x1013, wra,3 ,128,0,0,0) \
155 XCHAL_SA_REG(s,0,0,2,0, wra4,16,16,16,0x1014, wra,4 ,128,0,0,0) \
156 XCHAL_SA_REG(s,0,0,2,0, wra5,16,16,16,0x1015, wra,5 ,128,0,0,0) \
157 XCHAL_SA_REG(s,0,0,2,0, wra6,16,16,16,0x1016, wra,6 ,128,0,0,0) \
158 XCHAL_SA_REG(s,0,0,2,0, wra7,16,16,16,0x1017, wra,7 ,128,0,0,0) \
159 XCHAL_SA_REG(s,0,0,2,0, wra8,16,16,16,0x1018, wra,8 ,128,0,0,0) \
160 XCHAL_SA_REG(s,0,0,2,0, wra9,16,16,16,0x1019, wra,9 ,128,0,0,0) \
161 XCHAL_SA_REG(s,0,0,2,0, wra10,16,16,16,0x101A, wra,10 ,128,0,0,0) \
162 XCHAL_SA_REG(s,0,0,2,0, wra11,16,16,16,0x101B, wra,11 ,128,0,0,0) \
163 XCHAL_SA_REG(s,0,0,2,0, wra12,16,16,16,0x101C, wra,12 ,128,0,0,0) \
164 XCHAL_SA_REG(s,0,0,2,0, wra13,16,16,16,0x101D, wra,13 ,128,0,0,0) \
165 XCHAL_SA_REG(s,0,0,2,0, wra14,16,16,16,0x101E, wra,14 ,128,0,0,0) \
166 XCHAL_SA_REG(s,0,0,2,0, wra15,16,16,16,0x101F, wra,15 ,128,0,0,0) \
167 XCHAL_SA_REG(s,0,0,2,0, wrb0,16,16,16,0x1020, wrb,0 ,128,0,0,0) \
168 XCHAL_SA_REG(s,0,0,2,0, wrb1,16,16,16,0x1021, wrb,1 ,128,0,0,0) \
169 XCHAL_SA_REG(s,0,0,2,0, wrb2,16,16,16,0x1022, wrb,2 ,128,0,0,0) \
170 XCHAL_SA_REG(s,0,0,2,0, wrb3,16,16,16,0x1023, wrb,3 ,128,0,0,0) \
171 XCHAL_SA_REG(s,0,0,2,0, wrb4,16,16,16,0x1024, wrb,4 ,128,0,0,0) \
172 XCHAL_SA_REG(s,0,0,2,0, wrb5,16,16,16,0x1025, wrb,5 ,128,0,0,0) \
173 XCHAL_SA_REG(s,0,0,2,0, wrb6,16,16,16,0x1026, wrb,6 ,128,0,0,0) \
174 XCHAL_SA_REG(s,0,0,2,0, wrb7,16,16,16,0x1027, wrb,7 ,128,0,0,0) \
175 XCHAL_SA_REG(s,0,0,2,0, wrb8,16,16,16,0x1028, wrb,8 ,128,0,0,0) \
176 XCHAL_SA_REG(s,0,0,2,0, wrb9,16,16,16,0x1029, wrb,9 ,128,0,0,0) \
177 XCHAL_SA_REG(s,0,0,2,0, wrb10,16,16,16,0x102A, wrb,10 ,128,0,0,0) \
178 XCHAL_SA_REG(s,0,0,2,0, wrb11,16,16,16,0x102B, wrb,11 ,128,0,0,0) \
179 XCHAL_SA_REG(s,0,0,2,0, wrb12,16,16,16,0x102C, wrb,12 ,128,0,0,0) \
180 XCHAL_SA_REG(s,0,0,2,0, wrb13,16,16,16,0x102D, wrb,13 ,128,0,0,0) \
181 XCHAL_SA_REG(s,0,0,2,0, wrb14,16,16,16,0x102E, wrb,14 ,128,0,0,0) \
182 XCHAL_SA_REG(s,0,0,2,0, wrb15,16,16,16,0x102F, wrb,15 ,128,0,0,0)
183
184#define XCHAL_CP7_SA_NUM 0
185#define XCHAL_CP7_SA_LIST(s) /* empty */
186
187/* Byte length of instruction from its first nibble (op0 field), per FLIX. */
188#define XCHAL_OP0_FORMAT_LENGTHS 3,3,3,3,3,3,3,3,2,2,2,2,2,2,8,8
189
190#endif /*_XTENSA_CORE_TIE_H*/
191
diff --git a/arch/xtensa/variants/s6000/irq.c b/arch/xtensa/variants/s6000/irq.c
new file mode 100644
index 000000000000..6651e3285fcf
--- /dev/null
+++ b/arch/xtensa/variants/s6000/irq.c
@@ -0,0 +1,74 @@
1/*
2 * s6000 irq crossbar
3 *
4 * Copyright (c) 2009 emlix GmbH
5 * Authors: Johannes Weiner <jw@emlix.com>
6 * Oskar Schirmer <os@emlix.com>
7 */
8#include <linux/io.h>
9#include <asm/irq.h>
10#include <variant/hardware.h>
11
12/* S6_REG_INTC */
13#define INTC_STATUS 0x000
14#define INTC_RAW 0x010
15#define INTC_STATUS_AG 0x100
16#define INTC_CFG(n) (0x200 + 4 * (n))
17
18/*
19 * The s6000 has a crossbar that multiplexes interrupt output lines
20 * from the peripherals to input lines on the xtensa core.
21 *
22 * We leave the mapping decisions to the platform as it depends on the
23 * actually connected peripherals which distribution makes sense.
24 */
25extern const signed char *platform_irq_mappings[NR_IRQS];
26
27static unsigned long scp_to_intc_enable[] = {
28#define TO_INTC_ENABLE(n) (((n) << 1) + 1)
29 TO_INTC_ENABLE(0),
30 TO_INTC_ENABLE(1),
31 TO_INTC_ENABLE(2),
32 TO_INTC_ENABLE(3),
33 TO_INTC_ENABLE(4),
34 TO_INTC_ENABLE(5),
35 TO_INTC_ENABLE(6),
36 TO_INTC_ENABLE(7),
37 TO_INTC_ENABLE(8),
38 TO_INTC_ENABLE(9),
39 TO_INTC_ENABLE(10),
40 TO_INTC_ENABLE(11),
41 TO_INTC_ENABLE(12),
42 -1,
43 -1,
44 TO_INTC_ENABLE(13),
45 -1,
46 TO_INTC_ENABLE(14),
47 -1,
48 TO_INTC_ENABLE(15),
49#undef TO_INTC_ENABLE
50};
51
52static void irq_set(unsigned int irq, int enable)
53{
54 unsigned long en;
55 const signed char *m = platform_irq_mappings[irq];
56
57 if (!m)
58 return;
59 en = enable ? scp_to_intc_enable[irq] : 0;
60 while (*m >= 0) {
61 writel(en, S6_REG_INTC + INTC_CFG(*m));
62 m++;
63 }
64}
65
66void variant_irq_enable(unsigned int irq)
67{
68 irq_set(irq, 1);
69}
70
71void variant_irq_disable(unsigned int irq)
72{
73 irq_set(irq, 0);
74}